vendor: 8,121 bytes, lines 1-295
1/*! 2 * jQuery Validation Plugin v1.19.5 3 * 4 * https://jqueryvalidation.org/ 5 * 6 * Copyright (c) 2022 Jörn Zaefferer 7 * Released under the MIT license 8 */ 9(function( factory ) { 10 if ( typeof define === "function" && define.amd ) { 11 define( ["jquery"], factory ); 12 } else if (typeof module === "object" && module.exports) { 13 module.exports = factory( require( "jquery" ) ); 14 } else { 15 factory( jQuery ); 16 } 17}(function( $ ) { 18 19$.extend( $.fn, { 20 21 // https://jqueryvalidation.org/validate/ 22 validate: function( options ) { 23 24 // If nothing is selected, return nothing; can't chain anyway 25 if ( !this.length ) { 26 if ( options && options.debug && window.console ) { 27 console.warn( "Nothing selected, can't validate, returning nothing." ); 28 } 29 return; 30 } 31 32 // Check if a validator for this form was already created 33 var validator = $.data( this[ 0 ], "validator" ); 34 if ( validator ) { 35 return validator; 36 } 37 38 // Add novalidate tag if HTML5. 39 this.attr( "novalidate", "novalidate" ); 40 41 validator = new $.validator( options, this[ 0 ] ); 42 $.data( this[ 0 ], "validator", validator ); 43 44 if ( validator.settings.onsubmit ) { 45 46 this.on( "click.validate", ":submit", function( event ) { 47 48 // Track the used submit button to properly handle scripted 49 // submits later. 50 validator.submitButton = event.currentTarget; 51 52 // Allow suppressing validation by adding a cancel class to the submit button 53 if ( $( this ).hasClass( "cancel" ) ) { 54 validator.cancelSubmit = true; 55 } 56 57 // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button 58 if ( $( this ).attr( "formnovalidate" ) !== undefined ) { 59 validator.cancelSubmit = true; 60 } 61 } ); 62 63 // Validate the form on submit 64 this.on( "submit.validate", function( event ) { 65 if ( validator.settings.debug ) { 66 67 // Prevent form submit to be able to see console output 68 event.preventDefault(); 69 } 70 71 function handle() { 72 var hidden, result; 73 74 // Insert a hidden input as a replacement for the missing submit button 75 // The hidden input is inserted in two cases: 76 // - A user defined a `submitHandler` 77 // - There was a pending request due to `remote` method and `stopRequest()` 78 // was called to submit the form in case it's valid 79 if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) { 80 hidden = $( "<input type='hidden'/>" ) 81 .attr( "name", validator.submitButton.name ) 82 .val( $( validator.submitButton ).val() ) 83 .appendTo( validator.currentForm ); 84 } 85 86 if ( validator.settings.submitHandler && !validator.settings.debug ) { 87 result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); 88 if ( hidden ) { 89 90 // And clean up afterwards; thanks to no-block-scope, hidden can be referenced 91 hidden.remove(); 92 } 93 if ( result !== undefined ) { 94 return result; 95 } 96 return false; 97 } 98 return true; 99 } 100 101 // Prevent submit for invalid forms or custom submit handlers 102 if ( validator.cancelSubmit ) { 103 validator.cancelSubmit = false; 104 return handle(); 105 } 106 if ( validator.form() ) { 107 if ( validator.pendingRequest ) { 108 validator.formSubmitted = true; 109 return false; 110 } 111 return handle(); 112 } else { 113 validator.focusInvalid(); 114 return false; 115 } 116 } ); 117 } 118 119 return validator; 120 }, 121 122 // https://jqueryvalidation.org/valid/ 123 valid: function() { 124 var valid, validator, errorList; 125 126 if ( $( this[ 0 ] ).is( "form" ) ) { 127 valid = this.validate().form(); 128 } else { 129 errorList = []; 130 valid = true; 131 validator = $( this[ 0 ].form ).validate(); 132 this.each( function() { 133 valid = validator.element( this ) && valid; 134 if ( !valid ) { 135 errorList = errorList.concat( validator.errorList ); 136 } 137 } ); 138 validator.errorList = errorList; 139 } 140 return valid; 141 }, 142 143 // https://jqueryvalidation.org/rules/ 144 rules: function( command, argument ) { 145 var element = this[ 0 ], 146 isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false", 147 settings, staticRules, existingRules, data, param, filtered; 148 149 // If nothing is selected, return empty object; can't chain anyway 150 if ( element == null ) { 151 return; 152 } 153 154 if ( !element.form && isContentEditable ) { 155 element.form = this.closest( "form" )[ 0 ]; 156 element.name = this.attr( "name" ); 157 } 158 159 if ( element.form == null ) { 160 return; 161 } 162 163 if ( command ) { 164 settings = $.data( element.form, "validator" ).settings; 165 staticRules = settings.rules; 166 existingRules = $.validator.staticRules( element ); 167 switch ( command ) { 168 case "add": 169 $.extend( existingRules, $.validator.normalizeRule( argument ) ); 170 171 // Remove messages from rules, but allow them to be set separately 172 delete existingRules.messages; 173 staticRules[ element.name ] = existingRules; 174 if ( argument.messages ) { 175 settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages ); 176 } 177 break; 178 case "remove": 179 if ( !argument ) { 180 delete staticRules[ element.name ]; 181 return existingRules; 182 } 183 filtered = {}; 184 $.each( argument.split( /\s/ ), function( index, method ) { 185 filtered[ method ] = existingRules[ method ]; 186 delete existingRules[ method ]; 187 } ); 188 return filtered; 189 } 190 } 191 192 data = $.validator.normalizeRules( 193 $.extend( 194 {}, 195 $.validator.classRules( element ), 196 $.validator.attributeRules( element ), 197 $.validator.dataRules( element ), 198 $.validator.staticRules( element ) 199 ), element ); 200 201 // Make sure required is at front 202 if ( data.required ) { 203 param = data.required; 204 delete data.required; 205 data = $.extend( { required: param }, data ); 206 } 207 208 // Make sure remote is at back 209 if ( data.remote ) { 210 param = data.remote; 211 delete data.remote; 212 data = $.extend( data, { remote: param } ); 213 } 214 215 return data; 216 } 217} ); 218 219// JQuery trim is deprecated, provide a trim method based on String.prototype.trim 220var trim = function( str ) { 221 222 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill 223 return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" ); 224}; 225 226// Custom selectors 227$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support 228 229 // https://jqueryvalidation.org/blank-selector/ 230 blank: function( a ) { 231 return !trim( "" + $( a ).val() ); 232 }, 233 234 // https://jqueryvalidation.org/filled-selector/ 235 filled: function( a ) { 236 var val = $( a ).val(); 237 return val !== null && !!trim( "" + val ); 238 }, 239 240 // https://jqueryvalidation.org/unchecked-selector/ 241 unchecked: function( a ) { 242 return !$( a ).prop( "checked" ); 243 } 244} ); 245 246// Constructor for validator 247$.validator = function( options, form ) { 248 this.settings = $.extend( true, {}, $.validator.defaults, options ); 249 this.currentForm = form; 250 this.init(); 251}; 252 253// https://jqueryvalidation.org/jQuery.validator.format/ 254$.validator.format = function( source, params ) { 255 if ( arguments.length === 1 ) { 256 return function() { 257 var args = $.makeArray( arguments ); 258 args.unshift( source ); 259 return $.validator.format.apply( this, args ); 260 }; 261 } 262 if ( params === undefined ) { 263 return source; 264 } 265 if ( arguments.length > 2 && params.constructor !== Array ) { 266 params = $.makeArray( arguments ).slice( 1 ); 267 } 268 if ( params.constructor !== Array ) { 269 params = [ params ]; 270 } 271 $.each( params, function( i, n ) { 272 source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() { 273 return n; 274 } ); 275 } ); 276 return source; 277}; 278 279$.extend( $.validator, { 280 281 defaults: { 282 messages: {}, 283 groups: {}, 284 rules: {}, 285 errorClass: "error", 286 pendingClass: "pending", 287 validClass: "valid", 288 errorElement: "label", 289 focusCleanup: false, 290 focusInvalid: true, 291 errorContainer: $( [] ), 292 errorLabelContainer: $( [] ), 293 onsubmit: true, 294 ignore: ":hidden", 295 ignoreTitle: false
vendor: 5,102 bytes, lines 295-442
295, 296 onfocusin: function( element ) { 297 this.lastActive = element; 298 299 // Hide error label and remove error class on focus if enabled 300 if ( this.settings.focusCleanup ) { 301 if ( this.settings.unhighlight ) { 302 this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); 303 } 304 this.hideThese( this.errorsFor( element ) ); 305 } 306 }, 307 onfocusout: function( element ) { 308 if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) { 309 this.element( element ); 310 } 311 }, 312 onkeyup: function( element, event ) { 313 314 // Avoid revalidate the field when pressing one of the following keys 315 // Shift => 16 316 // Ctrl => 17 317 // Alt => 18 318 // Caps lock => 20 319 // End => 35 320 // Home => 36 321 // Left arrow => 37 322 // Up arrow => 38 323 // Right arrow => 39 324 // Down arrow => 40 325 // Insert => 45 326 // Num lock => 144 327 // AltGr key => 225 328 var excludedKeys = [ 329 16, 17, 18, 20, 35, 36, 37, 330 38, 39, 40, 45, 144, 225 331 ]; 332 333 if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) { 334 return; 335 } else if ( element.name in this.submitted || element.name in this.invalid ) { 336 this.element( element ); 337 } 338 }, 339 onclick: function( element ) { 340 341 // Click on selects, radiobuttons and checkboxes 342 if ( element.name in this.submitted ) { 343 this.element( element ); 344 345 // Or option elements, check parent select in that case 346 } else if ( element.parentNode.name in this.submitted ) { 347 this.element( element.parentNode ); 348 } 349 }, 350 highlight: function( element, errorClass, validClass ) { 351 if ( element.type === "radio" ) { 352 this.findByName( element.name ).addClass( errorClass ).removeClass( validClass ); 353 } else { 354 $( element ).addClass( errorClass ).removeClass( validClass ); 355 } 356 }, 357 unhighlight: function( element, errorClass, validClass ) { 358 if ( element.type === "radio" ) { 359 this.findByName( element.name ).removeClass( errorClass ).addClass( validClass ); 360 } else { 361 $( element ).removeClass( errorClass ).addClass( validClass ); 362 } 363 } 364 }, 365 366 // https://jqueryvalidation.org/jQuery.validator.setDefaults/ 367 setDefaults: function( settings ) { 368 $.extend( $.validator.defaults, settings ); 369 }, 370 371 messages: { 372 required: "This field is required.", 373 remote: "Please fix this field.", 374 email: "Please enter a valid email address.", 375 url: "Please enter a valid URL.", 376 date: "Please enter a valid date.", 377 dateISO: "Please enter a valid date (ISO).", 378 number: "Please enter a valid number.", 379 digits: "Please enter only digits.", 380 equalTo: "Please enter the same value again.", 381 maxlength: $.validator.format( "Please enter no more than {0} characters." ), 382 minlength: $.validator.format( "Please enter at least {0} characters." ), 383 rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ), 384 range: $.validator.format( "Please enter a value between {0} and {1}." ), 385 max: $.validator.format( "Please enter a value less than or equal to {0}." ), 386 min: $.validator.format( "Please enter a value greater than or equal to {0}." ), 387 step: $.validator.format( "Please enter a multiple of {0}." ) 388 }, 389 390 autoCreateRanges: false, 391 392 prototype: { 393 394 init: function() { 395 this.labelContainer = $( this.settings.errorLabelContainer ); 396 this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm ); 397 this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer ); 398 this.submitted = {}; 399 this.valueCache = {}; 400 this.pendingRequest = 0; 401 this.pending = {}; 402 this.invalid = {}; 403 this.reset(); 404 405 var currentForm = this.currentForm, 406 groups = ( this.groups = {} ), 407 rules; 408 $.each( this.settings.groups, function( key, value ) { 409 if ( typeof value === "string" ) { 410 value = value.split( /\s/ ); 411 } 412 $.each( value, function( index, name ) { 413 groups[ name ] = key; 414 } ); 415 } ); 416 rules = this.settings.rules; 417 $.each( rules, function( key, value ) { 418 rules[ key ] = $.validator.normalizeRule( value ); 419 } ); 420 421 function delegate( event ) { 422 var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false"; 423 424 // Set form expando on contenteditable 425 if ( !this.form && isContentEditable ) { 426 this.form = $( this ).closest( "form" )[ 0 ]; 427 this.name = $( this ).attr( "name" ); 428 } 429 430 // Ignore the element if it belongs to another form. This will happen mainly 431 // when setting the `form` attribute of an input to the id of another form. 432 if ( currentForm !== this.form ) { 433 return; 434 } 435 436 var validator = $.data( this.form, "validator" ), 437 eventType = "on" + event.type.replace( /^validate/, "" ), 438 settings = validator.settings; 439 if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) { 440 settings[ eventType ].call( validator, this, event ); 441 } 442 }
vendor: 38,721 bytes, lines 443-1691
443 444 $( this.currentForm ) 445 .on( "focusin.validate focusout.validate keyup.validate", 446 ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " + 447 "[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " + 448 "[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " + 449 "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate ) 450 451 // Support: Chrome, oldIE 452 // "select" is provided as event.target when clicking a option 453 .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate ); 454 455 if ( this.settings.invalidHandler ) { 456 $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler ); 457 } 458 }, 459 460 // https://jqueryvalidation.org/Validator.form/ 461 form: function() { 462 this.checkForm(); 463 $.extend( this.submitted, this.errorMap ); 464 this.invalid = $.extend( {}, this.errorMap ); 465 if ( !this.valid() ) { 466 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 467 } 468 this.showErrors(); 469 return this.valid(); 470 }, 471 472 checkForm: function() { 473 this.prepareForm(); 474 for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { 475 this.check( elements[ i ] ); 476 } 477 return this.valid(); 478 }, 479 480 // https://jqueryvalidation.org/Validator.element/ 481 element: function( element ) { 482 var cleanElement = this.clean( element ), 483 checkElement = this.validationTargetFor( cleanElement ), 484 v = this, 485 result = true, 486 rs, group; 487 488 if ( checkElement === undefined ) { 489 delete this.invalid[ cleanElement.name ]; 490 } else { 491 this.prepareElement( checkElement ); 492 this.currentElements = $( checkElement ); 493 494 // If this element is grouped, then validate all group elements already 495 // containing a value 496 group = this.groups[ checkElement.name ]; 497 if ( group ) { 498 $.each( this.groups, function( name, testgroup ) { 499 if ( testgroup === group && name !== checkElement.name ) { 500 cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) ); 501 if ( cleanElement && cleanElement.name in v.invalid ) { 502 v.currentElements.push( cleanElement ); 503 result = v.check( cleanElement ) && result; 504 } 505 } 506 } ); 507 } 508 509 rs = this.check( checkElement ) !== false; 510 result = result && rs; 511 if ( rs ) { 512 this.invalid[ checkElement.name ] = false; 513 } else { 514 this.invalid[ checkElement.name ] = true; 515 } 516 517 if ( !this.numberOfInvalids() ) { 518 519 // Hide error containers on last error 520 this.toHide = this.toHide.add( this.containers ); 521 } 522 this.showErrors(); 523 524 // Add aria-invalid status for screen readers 525 $( element ).attr( "aria-invalid", !rs ); 526 } 527 528 return result; 529 }, 530 531 // https://jqueryvalidation.org/Validator.showErrors/ 532 showErrors: function( errors ) { 533 if ( errors ) { 534 var validator = this; 535 536 // Add items to error list and map 537 $.extend( this.errorMap, errors ); 538 this.errorList = $.map( this.errorMap, function( message, name ) { 539 return { 540 message: message, 541 element: validator.findByName( name )[ 0 ] 542 }; 543 } ); 544 545 // Remove items from success list 546 this.successList = $.grep( this.successList, function( element ) { 547 return !( element.name in errors ); 548 } ); 549 } 550 if ( this.settings.showErrors ) { 551 this.settings.showErrors.call( this, this.errorMap, this.errorList ); 552 } else { 553 this.defaultShowErrors(); 554 } 555 }, 556 557 // https://jqueryvalidation.org/Validator.resetForm/ 558 resetForm: function() { 559 if ( $.fn.resetForm ) { 560 $( this.currentForm ).resetForm(); 561 } 562 this.invalid = {}; 563 this.submitted = {}; 564 this.prepareForm(); 565 this.hideErrors(); 566 var elements = this.elements() 567 .removeData( "previousValue" ) 568 .removeAttr( "aria-invalid" ); 569 570 this.resetElements( elements ); 571 }, 572 573 resetElements: function( elements ) { 574 var i; 575 576 if ( this.settings.unhighlight ) { 577 for ( i = 0; elements[ i ]; i++ ) { 578 this.settings.unhighlight.call( this, elements[ i ], 579 this.settings.errorClass, "" ); 580 this.findByName( elements[ i ].name ).removeClass( this.settings.validClass ); 581 } 582 } else { 583 elements 584 .removeClass( this.settings.errorClass ) 585 .removeClass( this.settings.validClass ); 586 } 587 }, 588 589 numberOfInvalids: function() { 590 return this.objectLength( this.invalid ); 591 }, 592 593 objectLength: function( obj ) { 594 /* jshint unused: false */ 595 var count = 0, 596 i; 597 for ( i in obj ) { 598 599 // This check allows counting elements with empty error 600 // message as invalid elements 601 if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) { 602 count++; 603 } 604 } 605 return count; 606 }, 607 608 hideErrors: function() { 609 this.hideThese( this.toHide ); 610 }, 611 612 hideThese: function( errors ) { 613 errors.not( this.containers ).text( "" ); 614 this.addWrapper( errors ).hide(); 615 }, 616 617 valid: function() { 618 return this.size() === 0; 619 }, 620 621 size: function() { 622 return this.errorList.length; 623 }, 624 625 focusInvalid: function() { 626 if ( this.settings.focusInvalid ) { 627 try { 628 $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] ) 629 .filter( ":visible" ) 630 .trigger( "focus" ) 631 632 // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find 633 .trigger( "focusin" ); 634 } catch ( e ) { 635 636 // Ignore IE throwing errors when focusing hidden elements 637 } 638 } 639 }, 640 641 findLastActive: function() { 642 var lastActive = this.lastActive; 643 return lastActive && $.grep( this.errorList, function( n ) { 644 return n.element.name === lastActive.name; 645 } ).length === 1 && lastActive; 646 }, 647 648 elements: function() { 649 var validator = this, 650 rulesCache = {}; 651 652 // Select all valid inputs inside the form (no submit or reset buttons) 653 return $( this.currentForm ) 654 .find( "input, select, textarea, [contenteditable]" ) 655 .not( ":submit, :reset, :image, :disabled" ) 656 .not( this.settings.ignore ) 657 .filter( function() { 658 var name = this.name || $( this ).attr( "name" ); // For contenteditable 659 var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false"; 660 661 if ( !name && validator.settings.debug && window.console ) { 662 console.error( "%o has no name assigned", this ); 663 } 664 665 // Set form expando on contenteditable 666 if ( isContentEditable ) { 667 this.form = $( this ).closest( "form" )[ 0 ]; 668 this.name = name; 669 } 670 671 // Ignore elements that belong to other/nested forms 672 if ( this.form !== validator.currentForm ) { 673 return false; 674 } 675 676 // Select only the first element for each name, and only those with rules specified 677 if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) { 678 return false; 679 } 680 681 rulesCache[ name ] = true; 682 return true; 683 } ); 684 }, 685 686 clean: function( selector ) { 687 return $( selector )[ 0 ]; 688 }, 689 690 errors: function() { 691 var errorClass = this.settings.errorClass.split( " " ).join( "." ); 692 return $( this.settings.errorElement + "." + errorClass, this.errorContext ); 693 }, 694 695 resetInternals: function() { 696 this.successList = []; 697 this.errorList = []; 698 this.errorMap = {}; 699 this.toShow = $( [] ); 700 this.toHide = $( [] ); 701 }, 702 703 reset: function() { 704 this.resetInternals(); 705 this.currentElements = $( [] ); 706 }, 707 708 prepareForm: function() { 709 this.reset(); 710 this.toHide = this.errors().add( this.containers ); 711 }, 712 713 prepareElement: function( element ) { 714 this.reset(); 715 this.toHide = this.errorsFor( element ); 716 }, 717 718 elementValue: function( element ) { 719 var $element = $( element ), 720 type = element.type, 721 isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false", 722 val, idx; 723 724 if ( type === "radio" || type === "checkbox" ) { 725 return this.findByName( element.name ).filter( ":checked" ).val(); 726 } else if ( type === "number" && typeof element.validity !== "undefined" ) { 727 return element.validity.badInput ? "NaN" : $element.val(); 728 } 729 730 if ( isContentEditable ) { 731 val = $element.text(); 732 } else { 733 val = $element.val(); 734 } 735 736 if ( type === "file" ) { 737 738 // Modern browser (chrome & safari) 739 if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) { 740 return val.substr( 12 ); 741 } 742 743 // Legacy browsers 744 // Unix-based path 745 idx = val.lastIndexOf( "/" ); 746 if ( idx >= 0 ) { 747 return val.substr( idx + 1 ); 748 } 749 750 // Windows-based path 751 idx = val.lastIndexOf( "\\" ); 752 if ( idx >= 0 ) { 753 return val.substr( idx + 1 ); 754 } 755 756 // Just the file name 757 return val; 758 } 759 760 if ( typeof val === "string" ) { 761 return val.replace( /\r/g, "" ); 762 } 763 return val; 764 }, 765 766 check: function( element ) { 767 element = this.validationTargetFor( this.clean( element ) ); 768 769 var rules = $( element ).rules(), 770 rulesCount = $.map( rules, function( n, i ) { 771 return i; 772 } ).length, 773 dependencyMismatch = false, 774 val = this.elementValue( element ), 775 result, method, rule, normalizer; 776 777 // Prioritize the local normalizer defined for this element over the global one 778 // if the former exists, otherwise user the global one in case it exists. 779 if ( typeof rules.normalizer === "function" ) { 780 normalizer = rules.normalizer; 781 } else if ( typeof this.settings.normalizer === "function" ) { 782 normalizer = this.settings.normalizer; 783 } 784 785 // If normalizer is defined, then call it to retreive the changed value instead 786 // of using the real one. 787 // Note that `this` in the normalizer is `element`. 788 if ( normalizer ) { 789 val = normalizer.call( element, val ); 790 791 // Delete the normalizer from rules to avoid treating it as a pre-defined method. 792 delete rules.normalizer; 793 } 794 795 for ( method in rules ) { 796 rule = { method: method, parameters: rules[ method ] }; 797 try { 798 result = $.validator.methods[ method ].call( this, val, element, rule.parameters ); 799 800 // If a method indicates that the field is optional and therefore valid, 801 // don't mark it as valid when there are no other rules 802 if ( result === "dependency-mismatch" && rulesCount === 1 ) { 803 dependencyMismatch = true; 804 continue; 805 } 806 dependencyMismatch = false; 807 808 if ( result === "pending" ) { 809 this.toHide = this.toHide.not( this.errorsFor( element ) ); 810 return; 811 } 812 813 if ( !result ) { 814 this.formatAndAdd( element, rule ); 815 return false; 816 } 817 } catch ( e ) { 818 if ( this.settings.debug && window.console ) { 819 console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); 820 } 821 if ( e instanceof TypeError ) { 822 e.message += ". Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method."; 823 } 824 825 throw e; 826 } 827 } 828 if ( dependencyMismatch ) { 829 return; 830 } 831 if ( this.objectLength( rules ) ) { 832 this.successList.push( element ); 833 } 834 return true; 835 }, 836 837 // Return the custom message for the given element and validation method 838 // specified in the element's HTML5 data attribute 839 // return the generic message if present and no method specific message is present 840 customDataMessage: function( element, method ) { 841 return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() + 842 method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" ); 843 }, 844 845 // Return the custom message for the given element name and validation method 846 customMessage: function( name, method ) { 847 var m = this.settings.messages[ name ]; 848 return m && ( m.constructor === String ? m : m[ method ] ); 849 }, 850 851 // Return the first defined argument, allowing empty strings 852 findDefined: function() { 853 for ( var i = 0; i < arguments.length; i++ ) { 854 if ( arguments[ i ] !== undefined ) { 855 return arguments[ i ]; 856 } 857 } 858 return undefined; 859 }, 860 861 // The second parameter 'rule' used to be a string, and extended to an object literal 862 // of the following form: 863 // rule = { 864 // method: "method name", 865 // parameters: "the given method parameters" 866 // } 867 // 868 // The old behavior still supported, kept to maintain backward compatibility with 869 // old code, and will be removed in the next major release. 870 defaultMessage: function( element, rule ) { 871 if ( typeof rule === "string" ) { 872 rule = { method: rule }; 873 } 874 875 var message = this.findDefined( 876 this.customMessage( element.name, rule.method ), 877 this.customDataMessage( element, rule.method ), 878 879 // 'title' is never undefined, so handle empty string as undefined 880 !this.settings.ignoreTitle && element.title || undefined, 881 $.validator.messages[ rule.method ], 882 "<strong>Warning: No message defined for " + element.name + "</strong>" 883 ), 884 theregex = /\$?\{(\d+)\}/g; 885 if ( typeof message === "function" ) { 886 message = message.call( this, rule.parameters, element ); 887 } else if ( theregex.test( message ) ) { 888 message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters ); 889 } 890 891 return message; 892 }, 893 894 formatAndAdd: function( element, rule ) { 895 var message = this.defaultMessage( element, rule ); 896 897 this.errorList.push( { 898 message: message, 899 element: element, 900 method: rule.method 901 } ); 902 903 this.errorMap[ element.name ] = message; 904 this.submitted[ element.name ] = message; 905 }, 906 907 addWrapper: function( toToggle ) { 908 if ( this.settings.wrapper ) { 909 toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); 910 } 911 return toToggle; 912 }, 913 914 defaultShowErrors: function() { 915 var i, elements, error; 916 for ( i = 0; this.errorList[ i ]; i++ ) { 917 error = this.errorList[ i ]; 918 if ( this.settings.highlight ) { 919 this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); 920 } 921 this.showLabel( error.element, error.message ); 922 } 923 if ( this.errorList.length ) { 924 this.toShow = this.toShow.add( this.containers ); 925 } 926 if ( this.settings.success ) { 927 for ( i = 0; this.successList[ i ]; i++ ) { 928 this.showLabel( this.successList[ i ] ); 929 } 930 } 931 if ( this.settings.unhighlight ) { 932 for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) { 933 this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass ); 934 } 935 } 936 this.toHide = this.toHide.not( this.toShow ); 937 this.hideErrors(); 938 this.addWrapper( this.toShow ).show(); 939 }, 940 941 validElements: function() { 942 return this.currentElements.not( this.invalidElements() ); 943 }, 944 945 invalidElements: function() { 946 return $( this.errorList ).map( function() { 947 return this.element; 948 } ); 949 }, 950 951 showLabel: function( element, message ) { 952 var place, group, errorID, v, 953 error = this.errorsFor( element ), 954 elementID = this.idOrName( element ), 955 describedBy = $( element ).attr( "aria-describedby" ); 956 957 if ( error.length ) { 958 959 // Refresh error/success class 960 error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); 961 962 // Replace message on existing label 963 error.html( message ); 964 } else { 965 966 // Create error element 967 error = $( "<" + this.settings.errorElement + ">" ) 968 .attr( "id", elementID + "-error" ) 969 .addClass( this.settings.errorClass ) 970 .html( message || "" ); 971 972 // Maintain reference to the element to be placed into the DOM 973 place = error; 974 if ( this.settings.wrapper ) { 975 976 // Make sure the element is visible, even in IE 977 // actually showing the wrapped element is handled elsewhere 978 place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent(); 979 } 980 if ( this.labelContainer.length ) { 981 this.labelContainer.append( place ); 982 } else if ( this.settings.errorPlacement ) { 983 this.settings.errorPlacement.call( this, place, $( element ) ); 984 } else { 985 place.insertAfter( element ); 986 } 987 988 // Link error back to the element 989 if ( error.is( "label" ) ) { 990 991 // If the error is a label, then associate using 'for' 992 error.attr( "for", elementID ); 993 994 // If the element is not a child of an associated label, then it's necessary 995 // to explicitly apply aria-describedby 996 } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) { 997 errorID = error.attr( "id" ); 998 999 // Respect existing non-error aria-describedby 1000 if ( !describedBy ) { 1001 describedBy = errorID; 1002 } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) { 1003 1004 // Add to end of list if not already present 1005 describedBy += " " + errorID; 1006 } 1007 $( element ).attr( "aria-describedby", describedBy ); 1008 1009 // If this element is grouped, then assign to all elements in the same group 1010 group = this.groups[ element.name ]; 1011 if ( group ) { 1012 v = this; 1013 $.each( v.groups, function( name, testgroup ) { 1014 if ( testgroup === group ) { 1015 $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm ) 1016 .attr( "aria-describedby", error.attr( "id" ) ); 1017 } 1018 } ); 1019 } 1020 } 1021 } 1022 if ( !message && this.settings.success ) { 1023 error.text( "" ); 1024 if ( typeof this.settings.success === "string" ) { 1025 error.addClass( this.settings.success ); 1026 } else { 1027 this.settings.success( error, element ); 1028 } 1029 } 1030 this.toShow = this.toShow.add( error ); 1031 }, 1032 1033 errorsFor: function( element ) { 1034 var name = this.escapeCssMeta( this.idOrName( element ) ), 1035 describer = $( element ).attr( "aria-describedby" ), 1036 selector = "label[for='" + name + "'], label[for='" + name + "'] *"; 1037 1038 // 'aria-describedby' should directly reference the error element 1039 if ( describer ) { 1040 selector = selector + ", #" + this.escapeCssMeta( describer ) 1041 .replace( /\s+/g, ", #" ); 1042 } 1043 1044 return this 1045 .errors() 1046 .filter( selector ); 1047 }, 1048 1049 // See https://api.jquery.com/category/selectors/, for CSS 1050 // meta-characters that should be escaped in order to be used with JQuery 1051 // as a literal part of a name/id or any selector. 1052 escapeCssMeta: function( string ) { 1053 if ( string === undefined ) { 1054 return ""; 1055 } 1056 1057 return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" ); 1058 }, 1059 1060 idOrName: function( element ) { 1061 return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name ); 1062 }, 1063 1064 validationTargetFor: function( element ) { 1065 1066 // If radio/checkbox, validate first element in group instead 1067 if ( this.checkable( element ) ) { 1068 element = this.findByName( element.name ); 1069 } 1070 1071 // Always apply ignore filter 1072 return $( element ).not( this.settings.ignore )[ 0 ]; 1073 }, 1074 1075 checkable: function( element ) { 1076 return ( /radio|checkbox/i ).test( element.type ); 1077 }, 1078 1079 findByName: function( name ) { 1080 return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" ); 1081 }, 1082 1083 getLength: function( value, element ) { 1084 switch ( element.nodeName.toLowerCase() ) { 1085 case "select": 1086 return $( "option:selected", element ).length; 1087 case "input": 1088 if ( this.checkable( element ) ) { 1089 return this.findByName( element.name ).filter( ":checked" ).length; 1090 } 1091 } 1092 return value.length; 1093 }, 1094 1095 depend: function( param, element ) { 1096 return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true; 1097 }, 1098 1099 dependTypes: { 1100 "boolean": function( param ) { 1101 return param; 1102 }, 1103 "string": function( param, element ) { 1104 return !!$( param, element.form ).length; 1105 }, 1106 "function": function( param, element ) { 1107 return param( element ); 1108 } 1109 }, 1110 1111 optional: function( element ) { 1112 var val = this.elementValue( element ); 1113 return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch"; 1114 }, 1115 1116 startRequest: function( element ) { 1117 if ( !this.pending[ element.name ] ) { 1118 this.pendingRequest++; 1119 $( element ).addClass( this.settings.pendingClass ); 1120 this.pending[ element.name ] = true; 1121 } 1122 }, 1123 1124 stopRequest: function( element, valid ) { 1125 this.pendingRequest--; 1126 1127 // Sometimes synchronization fails, make sure pendingRequest is never < 0 1128 if ( this.pendingRequest < 0 ) { 1129 this.pendingRequest = 0; 1130 } 1131 delete this.pending[ element.name ]; 1132 $( element ).removeClass( this.settings.pendingClass ); 1133 if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) { 1134 $( this.currentForm ).trigger( "submit" ); 1135 1136 // Remove the hidden input that was used as a replacement for the 1137 // missing submit button. The hidden input is added by `handle()` 1138 // to ensure that the value of the used submit button is passed on 1139 // for scripted submits triggered by this method 1140 if ( this.submitButton ) { 1141 $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove(); 1142 } 1143 1144 this.formSubmitted = false; 1145 } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) { 1146 $( this.currentForm ).triggerHandler( "invalid-form", [ this ] ); 1147 this.formSubmitted = false; 1148 } 1149 }, 1150 1151 previousValue: function( element, method ) { 1152 method = typeof method === "string" && method || "remote"; 1153 1154 return $.data( element, "previousValue" ) || $.data( element, "previousValue", { 1155 old: null, 1156 valid: true, 1157 message: this.defaultMessage( element, { method: method } ) 1158 } ); 1159 }, 1160 1161 // Cleans up all forms and elements, removes validator-specific events 1162 destroy: function() { 1163 this.resetForm(); 1164 1165 $( this.currentForm ) 1166 .off( ".validate" ) 1167 .removeData( "validator" ) 1168 .find( ".validate-equalTo-blur" ) 1169 .off( ".validate-equalTo" ) 1170 .removeClass( "validate-equalTo-blur" ) 1171 .find( ".validate-lessThan-blur" ) 1172 .off( ".validate-lessThan" ) 1173 .removeClass( "validate-lessThan-blur" ) 1174 .find( ".validate-lessThanEqual-blur" ) 1175 .off( ".validate-lessThanEqual" ) 1176 .removeClass( "validate-lessThanEqual-blur" ) 1177 .find( ".validate-greaterThanEqual-blur" ) 1178 .off( ".validate-greaterThanEqual" ) 1179 .removeClass( "validate-greaterThanEqual-blur" ) 1180 .find( ".validate-greaterThan-blur" ) 1181 .off( ".validate-greaterThan" ) 1182 .removeClass( "validate-greaterThan-blur" ); 1183 } 1184 1185 }, 1186 1187 classRuleSettings: { 1188 required: { required: true }, 1189 email: { email: true }, 1190 url: { url: true }, 1191 date: { date: true }, 1192 dateISO: { dateISO: true }, 1193 number: { number: true }, 1194 digits: { digits: true }, 1195 creditcard: { creditcard: true } 1196 }, 1197 1198 addClassRules: function( className, rules ) { 1199 if ( className.constructor === String ) { 1200 this.classRuleSettings[ className ] = rules; 1201 } else { 1202 $.extend( this.classRuleSettings, className ); 1203 } 1204 }, 1205 1206 classRules: function( element ) { 1207 var rules = {}, 1208 classes = $( element ).attr( "class" ); 1209 1210 if ( classes ) { 1211 $.each( classes.split( " " ), function() { 1212 if ( this in $.validator.classRuleSettings ) { 1213 $.extend( rules, $.validator.classRuleSettings[ this ] ); 1214 } 1215 } ); 1216 } 1217 return rules; 1218 }, 1219 1220 normalizeAttributeRule: function( rules, type, method, value ) { 1221 1222 // Convert the value to a number for number inputs, and for text for backwards compability 1223 // allows type="date" and others to be compared as strings 1224 if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { 1225 value = Number( value ); 1226 1227 // Support Opera Mini, which returns NaN for undefined minlength 1228 if ( isNaN( value ) ) { 1229 value = undefined; 1230 } 1231 } 1232 1233 if ( value || value === 0 ) { 1234 rules[ method ] = value; 1235 } else if ( type === method && type !== "range" ) { 1236 1237 // Exception: the jquery validate 'range' method 1238 // does not test for the html5 'range' type 1239 rules[ type === "date" ? "dateISO" : method ] = true; 1240 } 1241 }, 1242 1243 attributeRules: function( element ) { 1244 var rules = {}, 1245 $element = $( element ), 1246 type = element.getAttribute( "type" ), 1247 method, value; 1248 1249 for ( method in $.validator.methods ) { 1250 1251 // Support for <input required> in both html5 and older browsers 1252 if ( method === "required" ) { 1253 value = element.getAttribute( method ); 1254 1255 // Some browsers return an empty string for the required attribute 1256 // and non-HTML5 browsers might have required="" markup 1257 if ( value === "" ) { 1258 value = true; 1259 } 1260 1261 // Force non-HTML5 browsers to return bool 1262 value = !!value; 1263 } else { 1264 value = $element.attr( method ); 1265 } 1266 1267 this.normalizeAttributeRule( rules, type, method, value ); 1268 } 1269 1270 // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs 1271 if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) { 1272 delete rules.maxlength; 1273 } 1274 1275 return rules; 1276 }, 1277 1278 dataRules: function( element ) { 1279 var rules = {}, 1280 $element = $( element ), 1281 type = element.getAttribute( "type" ), 1282 method, value; 1283 1284 for ( method in $.validator.methods ) { 1285 value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() ); 1286 1287 // Cast empty attributes like `data-rule-required` to `true` 1288 if ( value === "" ) { 1289 value = true; 1290 } 1291 1292 this.normalizeAttributeRule( rules, type, method, value ); 1293 } 1294 return rules; 1295 }, 1296 1297 staticRules: function( element ) { 1298 var rules = {}, 1299 validator = $.data( element.form, "validator" ); 1300 1301 if ( validator.settings.rules ) { 1302 rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {}; 1303 } 1304 return rules; 1305 }, 1306 1307 normalizeRules: function( rules, element ) { 1308 1309 // Handle dependency check 1310 $.each( rules, function( prop, val ) { 1311 1312 // Ignore rule when param is explicitly false, eg. required:false 1313 if ( val === false ) { 1314 delete rules[ prop ]; 1315 return; 1316 } 1317 if ( val.param || val.depends ) { 1318 var keepRule = true; 1319 switch ( typeof val.depends ) { 1320 case "string": 1321 keepRule = !!$( val.depends, element.form ).length; 1322 break; 1323 case "function": 1324 keepRule = val.depends.call( element, element ); 1325 break; 1326 } 1327 if ( keepRule ) { 1328 rules[ prop ] = val.param !== undefined ? val.param : true; 1329 } else { 1330 $.data( element.form, "validator" ).resetElements( $( element ) ); 1331 delete rules[ prop ]; 1332 } 1333 } 1334 } ); 1335 1336 // Evaluate parameters 1337 $.each( rules, function( rule, parameter ) { 1338 rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter; 1339 } ); 1340 1341 // Clean number parameters 1342 $.each( [ "minlength", "maxlength" ], function() { 1343 if ( rules[ this ] ) { 1344 rules[ this ] = Number( rules[ this ] ); 1345 } 1346 } ); 1347 $.each( [ "rangelength", "range" ], function() { 1348 var parts; 1349 if ( rules[ this ] ) { 1350 if ( Array.isArray( rules[ this ] ) ) { 1351 rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ]; 1352 } else if ( typeof rules[ this ] === "string" ) { 1353 parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ ); 1354 rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ]; 1355 } 1356 } 1357 } ); 1358 1359 if ( $.validator.autoCreateRanges ) { 1360 1361 // Auto-create ranges 1362 if ( rules.min != null && rules.max != null ) { 1363 rules.range = [ rules.min, rules.max ]; 1364 delete rules.min; 1365 delete rules.max; 1366 } 1367 if ( rules.minlength != null && rules.maxlength != null ) { 1368 rules.rangelength = [ rules.minlength, rules.maxlength ]; 1369 delete rules.minlength; 1370 delete rules.maxlength; 1371 } 1372 } 1373 1374 return rules; 1375 }, 1376 1377 // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} 1378 normalizeRule: function( data ) { 1379 if ( typeof data === "string" ) { 1380 var transformed = {}; 1381 $.each( data.split( /\s/ ), function() { 1382 transformed[ this ] = true; 1383 } ); 1384 data = transformed; 1385 } 1386 return data; 1387 }, 1388 1389 // https://jqueryvalidation.org/jQuery.validator.addMethod/ 1390 addMethod: function( name, method, message ) { 1391 $.validator.methods[ name ] = method; 1392 $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; 1393 if ( method.length < 3 ) { 1394 $.validator.addClassRules( name, $.validator.normalizeRule( name ) ); 1395 } 1396 }, 1397 1398 // https://jqueryvalidation.org/jQuery.validator.methods/ 1399 methods: { 1400 1401 // https://jqueryvalidation.org/required-method/ 1402 required: function( value, element, param ) { 1403 1404 // Check if dependency is met 1405 if ( !this.depend( param, element ) ) { 1406 return "dependency-mismatch"; 1407 } 1408 if ( element.nodeName.toLowerCase() === "select" ) { 1409 1410 // Could be an array for select-multiple or a string, both are fine this way 1411 var val = $( element ).val(); 1412 return val && val.length > 0; 1413 } 1414 if ( this.checkable( element ) ) { 1415 return this.getLength( value, element ) > 0; 1416 } 1417 return value !== undefined && value !== null && value.length > 0; 1418 }, 1419 1420 // https://jqueryvalidation.org/email-method/ 1421 email: function( value, element ) { 1422 1423 // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address 1424 // Retrieved 2014-01-14 1425 // If you have a problem with this implementation, report a bug against the above spec 1426 // Or use custom methods to implement your own email validation 1427 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 ); 1428 }, 1429 1430 // https://jqueryvalidation.org/url-method/ 1431 url: function( value, element ) { 1432 1433 // Copyright (c) 2010-2013 Diego Perini, MIT licensed 1434 // https://gist.github.com/dperini/729294 1435 // see also https://mathiasbynens.be/demo/url-regex 1436 // modified to allow protocol-relative URLs 1437 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 ); 1438 }, 1439 1440 // https://jqueryvalidation.org/date-method/ 1441 date: ( function() { 1442 var called = false; 1443 1444 return function( value, element ) { 1445 if ( !called ) { 1446 called = true; 1447 if ( this.settings.debug && window.console ) { 1448 console.warn( 1449 "The `date` method is deprecated and will be removed in version '2.0.0'.\n" + 1450 "Please don't use it, since it relies on the Date constructor, which\n" + 1451 "behaves very differently across browsers and locales. Use `dateISO`\n" + 1452 "instead or one of the locale specific methods in `localizations/`\n" + 1453 "and `additional-methods.js`." 1454 ); 1455 } 1456 } 1457 1458 return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); 1459 }; 1460 }() ), 1461 1462 // https://jqueryvalidation.org/dateISO-method/ 1463 dateISO: function( value, element ) { 1464 return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); 1465 }, 1466 1467 // https://jqueryvalidation.org/number-method/ 1468 number: function( value, element ) { 1469 return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); 1470 }, 1471 1472 // https://jqueryvalidation.org/digits-method/ 1473 digits: function( value, element ) { 1474 return this.optional( element ) || /^\d+$/.test( value ); 1475 }, 1476 1477 // https://jqueryvalidation.org/minlength-method/ 1478 minlength: function( value, element, param ) { 1479 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 1480 return this.optional( element ) || length >= param; 1481 }, 1482 1483 // https://jqueryvalidation.org/maxlength-method/ 1484 maxlength: function( value, element, param ) { 1485 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 1486 return this.optional( element ) || length <= param; 1487 }, 1488 1489 // https://jqueryvalidation.org/rangelength-method/ 1490 rangelength: function( value, element, param ) { 1491 var length = Array.isArray( value ) ? value.length : this.getLength( value, element ); 1492 return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); 1493 }, 1494 1495 // https://jqueryvalidation.org/min-method/ 1496 min: function( value, element, param ) { 1497 return this.optional( element ) || value >= param; 1498 }, 1499 1500 // https://jqueryvalidation.org/max-method/ 1501 max: function( value, element, param ) { 1502 return this.optional( element ) || value <= param; 1503 }, 1504 1505 // https://jqueryvalidation.org/range-method/ 1506 range: function( value, element, param ) { 1507 return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); 1508 }, 1509 1510 // https://jqueryvalidation.org/step-method/ 1511 step: function( value, element, param ) { 1512 var type = $( element ).attr( "type" ), 1513 errorMessage = "Step attribute on input type " + type + " is not supported.", 1514 supportedTypes = [ "text", "number", "range" ], 1515 re = new RegExp( "\\b" + type + "\\b" ), 1516 notSupported = type && !re.test( supportedTypes.join() ), 1517 decimalPlaces = function( num ) { 1518 var match = ( "" + num ).match( /(?:\.(\d+))?$/ ); 1519 if ( !match ) { 1520 return 0; 1521 } 1522 1523 // Number of digits right of decimal point. 1524 return match[ 1 ] ? match[ 1 ].length : 0; 1525 }, 1526 toInt = function( num ) { 1527 return Math.round( num * Math.pow( 10, decimals ) ); 1528 }, 1529 valid = true, 1530 decimals; 1531 1532 // Works only for text, number and range input types 1533 // TODO find a way to support input types date, datetime, datetime-local, month, time and week 1534 if ( notSupported ) { 1535 throw new Error( errorMessage ); 1536 } 1537 1538 decimals = decimalPlaces( param ); 1539 1540 // Value can't have too many decimals 1541 if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) { 1542 valid = false; 1543 } 1544 1545 return this.optional( element ) || valid; 1546 }, 1547 1548 // https://jqueryvalidation.org/equalTo-method/ 1549 equalTo: function( value, element, param ) { 1550 1551 // Bind to the blur event of the target in order to revalidate whenever the target field is updated 1552 var target = $( param ); 1553 if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) { 1554 target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() { 1555 $( element ).valid(); 1556 } ); 1557 } 1558 return value === target.val(); 1559 }, 1560 1561 // https://jqueryvalidation.org/remote-method/ 1562 remote: function( value, element, param, method ) { 1563 if ( this.optional( element ) ) { 1564 return "dependency-mismatch"; 1565 } 1566 1567 method = typeof method === "string" && method || "remote"; 1568 1569 var previous = this.previousValue( element, method ), 1570 validator, data, optionDataString; 1571 1572 if ( !this.settings.messages[ element.name ] ) { 1573 this.settings.messages[ element.name ] = {}; 1574 } 1575 previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ]; 1576 this.settings.messages[ element.name ][ method ] = previous.message; 1577 1578 param = typeof param === "string" && { url: param } || param; 1579 optionDataString = $.param( $.extend( { data: value }, param.data ) ); 1580 if ( previous.old === optionDataString ) { 1581 return previous.valid; 1582 } 1583 1584 previous.old = optionDataString; 1585 validator = this; 1586 this.startRequest( element ); 1587 data = {}; 1588 data[ element.name ] = value; 1589 $.ajax( $.extend( true, { 1590 mode: "abort", 1591 port: "validate" + element.name, 1592 dataType: "json", 1593 data: data, 1594 context: validator.currentForm, 1595 success: function( response ) { 1596 var valid = response === true || response === "true", 1597 errors, message, submitted; 1598 1599 validator.settings.messages[ element.name ][ method ] = previous.originalMessage; 1600 if ( valid ) { 1601 submitted = validator.formSubmitted; 1602 validator.resetInternals(); 1603 validator.toHide = validator.errorsFor( element ); 1604 validator.formSubmitted = submitted; 1605 validator.successList.push( element ); 1606 validator.invalid[ element.name ] = false; 1607 validator.showErrors(); 1608 } else { 1609 errors = {}; 1610 message = response || validator.defaultMessage( element, { method: method, parameters: value } ); 1611 errors[ element.name ] = previous.message = message; 1612 validator.invalid[ element.name ] = true; 1613 validator.showErrors( errors ); 1614 } 1615 previous.valid = valid; 1616 validator.stopRequest( element, valid ); 1617 } 1618 }, param ) ); 1619 return "pending"; 1620 } 1621 } 1622 1623} ); 1624 1625// Ajax mode: abort 1626// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); 1627// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 1628 1629var pendingRequests = {}, 1630 ajax; 1631 1632// Use a prefilter if available (1.5+) 1633if ( $.ajaxPrefilter ) { 1634 $.ajaxPrefilter( function( settings, _, xhr ) { 1635 var port = settings.port; 1636 if ( settings.mode === "abort" ) { 1637 if ( pendingRequests[ port ] ) { 1638 pendingRequests[ port ].abort(); 1639 } 1640 pendingRequests[ port ] = xhr; 1641 } 1642 } ); 1643} else { 1644 1645 // Proxy ajax 1646 ajax = $.ajax; 1647 $.ajax = function( settings ) { 1648 var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, 1649 port = ( "port" in settings ? settings : $.ajaxSettings ).port; 1650 if ( mode === "abort" ) { 1651 if ( pendingRequests[ port ] ) { 1652 pendingRequests[ port ].abort(); 1653 } 1654 pendingRequests[ port ] = ajax.apply( this, arguments ); 1655 return pendingRequests[ port ]; 1656 } 1657 return ajax.apply( this, arguments ); 1658 }; 1659} 1660return $; 1661})); 1662/*! 1663 * jQuery Validation Plugin v1.19.5 1664 * 1665 * https://jqueryvalidation.org/ 1666 * 1667 * Copyright (c) 2022 Jörn Zaefferer 1668 * Released under the MIT license 1669 */ 1670(function( factory ) { 1671 if ( typeof define === "function" && define.amd ) { 1672 define( ["jquery", "./jquery.validate"], factory ); 1673 } else if (typeof module === "object" && module.exports) { 1674 module.exports = factory( require( "jquery" ) ); 1675 } else { 1676 factory( jQuery ); 1677 } 1678}(function( $ ) { 1679 1680( function() { 1681 1682 function stripHtml( value ) { 1683 1684 // Remove html tags and space chars 1685 return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " ) 1686 1687 // Remove punctuation 1688 .replace( /[.(),;:!?%#$'\"_+=\/\-âââ]*/g, "" ); 1689 } 1690 1691 $.validator.addMethod( "maxWords", function( value, element, params ) {
vendor: 4,584 bytes, lines 1692-1824
1692 return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params; 1693 }, $.validator.format( "Please enter {0} words or less." ) ); 1694 1695 $.validator.addMethod( "minWords", function( value, element, params ) { 1696 return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params; 1697 }, $.validator.format( "Please enter at least {0} words." ) ); 1698 1699 $.validator.addMethod( "rangeWords", function( value, element, params ) { 1700 var valueStripped = stripHtml( value ), 1701 regex = /\b\w+\b/g; 1702 return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ]; 1703 }, $.validator.format( "Please enter between {0} and {1} words." ) ); 1704 1705}() ); 1706 1707/** 1708 * This is used in the United States to process payments, deposits, 1709 * or transfers using the Automated Clearing House (ACH) or Fedwire 1710 * systems. A very common use case would be to validate a form for 1711 * an ACH bill payment. 1712 */ 1713$.validator.addMethod( "abaRoutingNumber", function( value ) { 1714 var checksum = 0; 1715 var tokens = value.split( "" ); 1716 var length = tokens.length; 1717 1718 // Length Check 1719 if ( length !== 9 ) { 1720 return false; 1721 } 1722 1723 // Calc the checksum 1724 // https://en.wikipedia.org/wiki/ABA_routing_transit_number 1725 for ( var i = 0; i < length; i += 3 ) { 1726 checksum += parseInt( tokens[ i ], 10 ) * 3 + 1727 parseInt( tokens[ i + 1 ], 10 ) * 7 + 1728 parseInt( tokens[ i + 2 ], 10 ); 1729 } 1730 1731 // If not zero and divisible by 10 then valid 1732 if ( checksum !== 0 && checksum % 10 === 0 ) { 1733 return true; 1734 } 1735 1736 return false; 1737}, "Please enter a valid routing number." ); 1738 1739// Accept a value from a file input based on a required mimetype 1740$.validator.addMethod( "accept", function( value, element, param ) { 1741 1742 // Split mime on commas in case we have multiple types we can accept 1743 var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*", 1744 optionalValue = this.optional( element ), 1745 i, file, regex; 1746 1747 // Element is optional 1748 if ( optionalValue ) { 1749 return optionalValue; 1750 } 1751 1752 if ( $( element ).attr( "type" ) === "file" ) { 1753 1754 // Escape string to be used in the regex 1755 // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex 1756 // Escape also "/*" as "/.*" as a wildcard 1757 typeParam = typeParam 1758 .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" ) 1759 .replace( /,/g, "|" ) 1760 .replace( /\/\*/g, "/.*" ); 1761 1762 // Check if the element has a FileList before checking each file 1763 if ( element.files && element.files.length ) { 1764 regex = new RegExp( ".?(" + typeParam + ")$", "i" ); 1765 for ( i = 0; i < element.files.length; i++ ) { 1766 file = element.files[ i ]; 1767 1768 // Grab the mimetype from the loaded file, verify it matches 1769 if ( !file.type.match( regex ) ) { 1770 return false; 1771 } 1772 } 1773 } 1774 } 1775 1776 // Either return true because we've validated each file, or because the 1777 // browser does not support element.files and the FileList feature 1778 return true; 1779}, $.validator.format( "Please enter a value with a valid mimetype." ) ); 1780 1781$.validator.addMethod( "alphanumeric", function( value, element ) { 1782 return this.optional( element ) || /^\w+$/i.test( value ); 1783}, "Letters, numbers, and underscores only please." ); 1784 1785/* 1786 * Dutch bank account numbers (not 'giro' numbers) have 9 digits 1787 * and pass the '11 check'. 1788 * We accept the notation with spaces, as that is common. 1789 * acceptable: 123456789 or 12 34 56 789 1790 */ 1791$.validator.addMethod( "bankaccountNL", function( value, element ) { 1792 if ( this.optional( element ) ) { 1793 return true; 1794 } 1795 if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) { 1796 return false; 1797 } 1798 1799 // Now '11 check' 1800 var account = value.replace( / /g, "" ), // Remove spaces 1801 sum = 0, 1802 len = account.length, 1803 pos, factor, digit; 1804 for ( pos = 0; pos < len; pos++ ) { 1805 factor = len - pos; 1806 digit = account.substring( pos, pos + 1 ); 1807 sum = sum + factor * digit; 1808 } 1809 return sum % 11 === 0; 1810}, "Please specify a valid bank account number." ); 1811 1812$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) { 1813 return this.optional( element ) || 1814 ( $.validator.methods.bankaccountNL.call( this, value, element ) ) || 1815 ( $.validator.methods.giroaccountNL.call( this, value, element ) ); 1816}, "Please specify a valid bank or giro account number." ); 1817 1818/** 1819 * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity. 1820 * 1821 * BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional) 1822 * 1823 * Validation is case-insensitive. Please make sure to normalize input yourself. 1824 *
1825 * BIC definition in detail: 1826 * - First 4 characters - bank code (only letters) 1827 * - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters) 1828 * - Next 2 characters - location code (letters and digits) 1829 * a. shall not start with '0' or '1' 1830 * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing) 1831 * - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits) 1832 */ 1833$.validator.addMethod( "bic", function( value, element ) { 1834 return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() ); 1835}, "Please specify a valid BIC code." ); 1836 1837/* 1838 * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities 1839 * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal 1840 * 1841 * Spanish CIF structure: 1842 * 1843 * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ] 1844 * 1845 * Where: 1846 * 1847 * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW] 1848 * P: 2 characters. Province. 1849 * N: 5 characters. Secuencial Number within the province. 1850 * C: 1 character. Control Digit: [0-9A-J]. 1851 * 1852 * [ T ]: Kind of Organizations. Possible values: 1853 * 1854 * A. Corporations 1855 * B. LLCs 1856 * C. General partnerships 1857 * D. Companies limited partnerships 1858 * E. Communities of goods 1859 * F. Cooperative Societies 1860 * G. Associations 1861 * H. Communities of homeowners in horizontal property regime 1862 * J. Civil Societies 1863 * K. Old format 1864 * L. Old format 1865 * M. Old format 1866 * N. Nonresident entities 1867 * P. Local authorities 1868 * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions 1869 * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008) 1870 * S. Organs of State Administration and regions 1871 * V. Agrarian Transformation 1872 * W. Permanent establishments of non-resident in Spain 1873 * 1874 * [ C ]: Control Digit. It can be a number or a letter depending on T value: 1875 * [ T ] --> [ C ] 1876 * ------ ---------- 1877 * A Number 1878 * B Number 1879 * E Number 1880 * H Number 1881 * K Letter 1882 * P Letter 1883 * Q Letter 1884 * S Letter 1885 * 1886 */ 1887$.validator.addMethod( "cifES", function( value, element ) { 1888 "use strict"; 1889 1890 if ( this.optional( element ) ) { 1891 return true; 1892 } 1893 1894 var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi ); 1895 var letter = value.substring( 0, 1 ), // [ T ] 1896 number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ] 1897 control = value.substring( 8, 9 ), // [ C ] 1898 all_sum = 0, 1899 even_sum = 0, 1900 odd_sum = 0, 1901 i, n, 1902 control_digit, 1903 control_letter; 1904 1905 function isOdd( n ) { 1906 return n % 2 === 0; 1907 } 1908 1909 // Quick format test 1910 if ( value.length !== 9 || !cifRegEx.test( value ) ) { 1911 return false; 1912 } 1913 1914 for ( i = 0; i < number.length; i++ ) { 1915 n = parseInt( number[ i ], 10 ); 1916 1917 // Odd positions 1918 if ( isOdd( i ) ) { 1919 1920 // Odd positions are multiplied first. 1921 n *= 2; 1922 1923 // If the multiplication is bigger than 10 we need to adjust 1924 odd_sum += n < 10 ? n : n - 9; 1925 1926 // Even positions 1927 // Just sum them 1928 } else { 1929 even_sum += n; 1930 } 1931 } 1932 1933 all_sum = even_sum + odd_sum; 1934 control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString(); 1935 control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit; 1936 control_letter = "JABCDEFGHI".substr( control_digit, 1
vendor: 41,214 bytes, lines 1936-3122
1936 ).toString(); 1937 1938 // Control must be a digit 1939 if ( letter.match( /[ABEH]/ ) ) { 1940 return control === control_digit; 1941 1942 // Control must be a letter 1943 } else if ( letter.match( /[KPQS]/ ) ) { 1944 return control === control_letter; 1945 } 1946 1947 // Can be either 1948 return control === control_digit || control === control_letter; 1949 1950}, "Please specify a valid CIF number." ); 1951 1952/* 1953 * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number. 1954 * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. 1955 */ 1956$.validator.addMethod( "cnhBR", function( value ) { 1957 1958 // Removing special characters from value 1959 value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); 1960 1961 // Checking value to have 11 digits only 1962 if ( value.length !== 11 ) { 1963 return false; 1964 } 1965 1966 var sum = 0, dsc = 0, firstChar, 1967 firstCN, secondCN, i, j, v; 1968 1969 firstChar = value.charAt( 0 ); 1970 1971 if ( new Array( 12 ).join( firstChar ) === value ) { 1972 return false; 1973 } 1974 1975 // Step 1 - using first Check Number: 1976 for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) { 1977 sum += +( value.charAt( i ) * j ); 1978 } 1979 1980 firstCN = sum % 11; 1981 if ( firstCN >= 10 ) { 1982 firstCN = 0; 1983 dsc = 2; 1984 } 1985 1986 sum = 0; 1987 for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) { 1988 sum += +( value.charAt( i ) * j ); 1989 } 1990 1991 secondCN = sum % 11; 1992 if ( secondCN >= 10 ) { 1993 secondCN = 0; 1994 } else { 1995 secondCN = secondCN - dsc; 1996 } 1997 1998 return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) ); 1999 2000}, "Please specify a valid CNH number." ); 2001 2002/* 2003 * Brazillian value number (Cadastrado de Pessoas Juridica). 2004 * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation. 2005 */ 2006$.validator.addMethod( "cnpjBR", function( value, element ) { 2007 "use strict"; 2008 2009 if ( this.optional( element ) ) { 2010 return true; 2011 } 2012 2013 // Removing no number 2014 value = value.replace( /[^\d]+/g, "" ); 2015 2016 // Checking value to have 14 digits only 2017 if ( value.length !== 14 ) { 2018 return false; 2019 } 2020 2021 // Elimina values invalidos conhecidos 2022 if ( value === "00000000000000" || 2023 value === "11111111111111" || 2024 value === "22222222222222" || 2025 value === "33333333333333" || 2026 value === "44444444444444" || 2027 value === "55555555555555" || 2028 value === "66666666666666" || 2029 value === "77777777777777" || 2030 value === "88888888888888" || 2031 value === "99999999999999" ) { 2032 return false; 2033 } 2034 2035 // Valida DVs 2036 var tamanho = ( value.length - 2 ); 2037 var numeros = value.substring( 0, tamanho ); 2038 var digitos = value.substring( tamanho ); 2039 var soma = 0; 2040 var pos = tamanho - 7; 2041 2042 for ( var i = tamanho; i >= 1; i-- ) { 2043 soma += numeros.charAt( tamanho - i ) * pos--; 2044 if ( pos < 2 ) { 2045 pos = 9; 2046 } 2047 } 2048 2049 var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; 2050 2051 if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) { 2052 return false; 2053 } 2054 2055 tamanho = tamanho + 1; 2056 numeros = value.substring( 0, tamanho ); 2057 soma = 0; 2058 pos = tamanho - 7; 2059 2060 for ( var il = tamanho; il >= 1; il-- ) { 2061 soma += numeros.charAt( tamanho - il ) * pos--; 2062 if ( pos < 2 ) { 2063 pos = 9; 2064 } 2065 } 2066 2067 resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; 2068 2069 if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) { 2070 return false; 2071 } 2072 2073 return true; 2074 2075}, "Please specify a CNPJ value number." ); 2076 2077/* 2078 * Brazillian CPF number (Cadastrado de Pessoas FÃsicas) is the equivalent of a Brazilian tax registration number. 2079 * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. 2080 */ 2081$.validator.addMethod( "cpfBR", function( value, element ) { 2082 "use strict"; 2083 2084 if ( this.optional( element ) ) { 2085 return true; 2086 } 2087 2088 // Removing special characters from value 2089 value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); 2090 2091 // Checking value to have 11 digits only 2092 if ( value.length !== 11 ) { 2093 return false; 2094 } 2095 2096 var sum = 0, 2097 firstCN, secondCN, checkResult, i; 2098 2099 firstCN = parseInt( value.substring( 9, 10 ), 10 ); 2100 secondCN = parseInt( value.substring( 10, 11 ), 10 ); 2101 2102 checkResult = function( sum, cn ) { 2103 var result = ( sum * 10 ) % 11; 2104 if ( ( result === 10 ) || ( result === 11 ) ) { 2105 result = 0; 2106 } 2107 return ( result === cn ); 2108 }; 2109 2110 // Checking for dump data 2111 if ( value === "" || 2112 value === "00000000000" || 2113 value === "11111111111" || 2114 value === "22222222222" || 2115 value === "33333333333" || 2116 value === "44444444444" || 2117 value === "55555555555" || 2118 value === "66666666666" || 2119 value === "77777777777" || 2120 value === "88888888888" || 2121 value === "99999999999" 2122 ) { 2123 return false; 2124 } 2125 2126 // Step 1 - using first Check Number: 2127 for ( i = 1; i <= 9; i++ ) { 2128 sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i ); 2129 } 2130 2131 // If first Check Number (CN) is valid, move to Step 2 - using second Check Number: 2132 if ( checkResult( sum, firstCN ) ) { 2133 sum = 0; 2134 for ( i = 1; i <= 10; i++ ) { 2135 sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i ); 2136 } 2137 return checkResult( sum, secondCN ); 2138 } 2139 return false; 2140 2141}, "Please specify a valid CPF number." ); 2142 2143// https://jqueryvalidation.org/creditcard-method/ 2144// based on https://en.wikipedia.org/wiki/Luhn_algorithm 2145$.validator.addMethod( "creditcard", function( value, element ) { 2146 if ( this.optional( element ) ) { 2147 return "dependency-mismatch"; 2148 } 2149 2150 // Accept only spaces, digits and dashes 2151 if ( /[^0-9 \-]+/.test( value ) ) { 2152 return false; 2153 } 2154 2155 var nCheck = 0, 2156 nDigit = 0, 2157 bEven = false, 2158 n, cDigit; 2159 2160 value = value.replace( /\D/g, "" ); 2161 2162 // Basing min and max length on 2163 // https://dev.ean.com/general-info/valid-card-types/ 2164 if ( value.length < 13 || value.length > 19 ) { 2165 return false; 2166 } 2167 2168 for ( n = value.length - 1; n >= 0; n-- ) { 2169 cDigit = value.charAt( n ); 2170 nDigit = parseInt( cDigit, 10 ); 2171 if ( bEven ) { 2172 if ( ( nDigit *= 2 ) > 9 ) { 2173 nDigit -= 9; 2174 } 2175 } 2176 2177 nCheck += nDigit; 2178 bEven = !bEven; 2179 } 2180 2181 return ( nCheck % 10 ) === 0; 2182}, "Please enter a valid credit card number." ); 2183 2184/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator 2185 * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 2186 * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) 2187 */ 2188$.validator.addMethod( "creditcardtypes", function( value, element, param ) { 2189 if ( /[^0-9\-]+/.test( value ) ) { 2190 return false; 2191 } 2192 2193 value = value.replace( /\D/g, "" ); 2194 2195 var validTypes = 0x0000; 2196 2197 if ( param.mastercard ) { 2198 validTypes |= 0x0001; 2199 } 2200 if ( param.visa ) { 2201 validTypes |= 0x0002; 2202 } 2203 if ( param.amex ) { 2204 validTypes |= 0x0004; 2205 } 2206 if ( param.dinersclub ) { 2207 validTypes |= 0x0008; 2208 } 2209 if ( param.enroute ) { 2210 validTypes |= 0x0010; 2211 } 2212 if ( param.discover ) { 2213 validTypes |= 0x0020; 2214 } 2215 if ( param.jcb ) { 2216 validTypes |= 0x0040; 2217 } 2218 if ( param.unknown ) { 2219 validTypes |= 0x0080; 2220 } 2221 if ( param.all ) { 2222 validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; 2223 } 2224 if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard 2225 return value.length === 16; 2226 } 2227 if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa 2228 return value.length === 16; 2229 } 2230 if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex 2231 return value.length === 15; 2232 } 2233 if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub 2234 return value.length === 14; 2235 } 2236 if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute 2237 return value.length === 15; 2238 } 2239 if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover 2240 return value.length === 16; 2241 } 2242 if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb 2243 return value.length === 16; 2244 } 2245 if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb 2246 return value.length === 15; 2247 } 2248 if ( validTypes & 0x0080 ) { // Unknown 2249 return true; 2250 } 2251 return false; 2252}, "Please enter a valid credit card number." ); 2253 2254/** 2255 * Validates currencies with any given symbols by @jameslouiz 2256 * Symbols can be optional or required. Symbols required by default 2257 * 2258 * Usage examples: 2259 * currency: ["£", false] - Use false for soft currency validation 2260 * currency: ["$", false] 2261 * currency: ["RM", false] - also works with text based symbols such as "RM" - Malaysia Ringgit etc 2262 * 2263 * <input class="currencyInput" name="currencyInput"> 2264 * 2265 * Soft symbol checking 2266 * currencyInput: { 2267 * currency: ["$", false] 2268 * } 2269 * 2270 * Strict symbol checking (default) 2271 * currencyInput: { 2272 * currency: "$" 2273 * //OR 2274 * currency: ["$", true] 2275 * } 2276 * 2277 * Multiple Symbols 2278 * currencyInput: { 2279 * currency: "$,£,¢" 2280 * } 2281 */ 2282$.validator.addMethod( "currency", function( value, element, param ) { 2283 var isParamString = typeof param === "string", 2284 symbol = isParamString ? param : param[ 0 ], 2285 soft = isParamString ? true : param[ 1 ], 2286 regex; 2287 2288 symbol = symbol.replace( /,/g, "" ); 2289 symbol = soft ? symbol + "]" : symbol + "]?"; 2290 regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$"; 2291 regex = new RegExp( regex ); 2292 return this.optional( element ) || regex.test( value ); 2293 2294}, "Please specify a valid currency." ); 2295 2296$.validator.addMethod( "dateFA", function( value, element ) { 2297 return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value ); 2298}, $.validator.messages.date ); 2299 2300/** 2301 * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy. 2302 * 2303 * @example $.validator.methods.date("01/01/1900") 2304 * @result true 2305 * 2306 * @example $.validator.methods.date("01/13/1990") 2307 * @result false 2308 * 2309 * @example $.validator.methods.date("01.01.1900") 2310 * @result false 2311 * 2312 * @example <input name="pippo" class="{dateITA:true}" /> 2313 * @desc Declares an optional input element whose value must be a valid date. 2314 * 2315 * @name $.validator.methods.dateITA 2316 * @type Boolean 2317 * @cat Plugins/Validate/Methods 2318 */ 2319$.validator.addMethod( "dateITA", function( value, element ) { 2320 var check = false, 2321 re = /^\d{1,2}\/\d{1,2}\/\d{4}$/, 2322 adata, gg, mm, aaaa, xdata; 2323 if ( re.test( value ) ) { 2324 adata = value.split( "/" ); 2325 gg = parseInt( adata[ 0 ], 10 ); 2326 mm = parseInt( adata[ 1 ], 10 ); 2327 aaaa = parseInt( adata[ 2 ], 10 ); 2328 xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) ); 2329 if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) { 2330 check = true; 2331 } else { 2332 check = false; 2333 } 2334 } else { 2335 check = false; 2336 } 2337 return this.optional( element ) || check; 2338}, $.validator.messages.date ); 2339 2340$.validator.addMethod( "dateNL", function( value, element ) { 2341 return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value ); 2342}, $.validator.messages.date ); 2343 2344// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept 2345$.validator.addMethod( "extension", function( value, element, param ) { 2346 param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif"; 2347 return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) ); 2348}, $.validator.format( "Please enter a value with a valid extension." ) ); 2349 2350/** 2351 * Dutch giro account numbers (not bank numbers) have max 7 digits 2352 */ 2353$.validator.addMethod( "giroaccountNL", function( value, element ) { 2354 return this.optional( element ) || /^[0-9]{1,7}$/.test( value ); 2355}, "Please specify a valid giro account number." ); 2356 2357$.validator.addMethod( "greaterThan", function( value, element, param ) { 2358 var target = $( param ); 2359 2360 if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) { 2361 target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() { 2362 $( element ).valid(); 2363 } ); 2364 } 2365 2366 return value > target.val(); 2367}, "Please enter a greater value." ); 2368 2369$.validator.addMethod( "greaterThanEqual", function( value, element, param ) { 2370 var target = $( param ); 2371 2372 if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) { 2373 target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() { 2374 $( element ).valid(); 2375 } ); 2376 } 2377 2378 return value >= target.val(); 2379}, "Please enter a greater value." ); 2380 2381/** 2382 * IBAN is the international bank account number. 2383 * It has a country - specific format, that is checked here too 2384 * 2385 * Validation is case-insensitive. Please make sure to normalize input yourself. 2386 */ 2387$.validator.addMethod( "iban", function( value, element ) { 2388 2389 // Some quick simple tests to prevent needless work 2390 if ( this.optional( element ) ) { 2391 return true; 2392 } 2393 2394 // Remove spaces and to upper case 2395 var iban = value.replace( / /g, "" ).toUpperCase(), 2396 ibancheckdigits = "", 2397 leadingZeroes = true, 2398 cRest = "", 2399 cOperator = "", 2400 countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p; 2401 2402 // Check for IBAN code length. 2403 // It contains: 2404 // country code ISO 3166-1 - two letters, 2405 // two check digits, 2406 // Basic Bank Account Number (BBAN) - up to 30 chars 2407 var minimalIBANlength = 5; 2408 if ( iban.length < minimalIBANlength ) { 2409 return false; 2410 } 2411 2412 // Check the country code and find the country specific format 2413 countrycode = iban.substring( 0, 2 ); 2414 bbancountrypatterns = { 2415 "AL": "\\d{8}[\\dA-Z]{16}", 2416 "AD": "\\d{8}[\\dA-Z]{12}", 2417 "AT": "\\d{16}", 2418 "AZ": "[\\dA-Z]{4}\\d{20}", 2419 "BE": "\\d{12}", 2420 "BH": "[A-Z]{4}[\\dA-Z]{14}", 2421 "BA": "\\d{16}", 2422 "BR": "\\d{23}[A-Z][\\dA-Z]", 2423 "BG": "[A-Z]{4}\\d{6}[\\dA-Z]{8}", 2424 "CR": "\\d{17}", 2425 "HR": "\\d{17}", 2426 "CY": "\\d{8}[\\dA-Z]{16}", 2427 "CZ": "\\d{20}", 2428 "DK": "\\d{14}", 2429 "DO": "[A-Z]{4}\\d{20}", 2430 "EE": "\\d{16}", 2431 "FO": "\\d{14}", 2432 "FI": "\\d{14}", 2433 "FR": "\\d{10}[\\dA-Z]{11}\\d{2}", 2434 "GE": "[\\dA-Z]{2}\\d{16}", 2435 "DE": "\\d{18}", 2436 "GI": "[A-Z]{4}[\\dA-Z]{15}", 2437 "GR": "\\d{7}[\\dA-Z]{16}", 2438 "GL": "\\d{14}", 2439 "GT": "[\\dA-Z]{4}[\\dA-Z]{20}", 2440 "HU": "\\d{24}", 2441 "IS": "\\d{22}", 2442 "IE": "[\\dA-Z]{4}\\d{14}", 2443 "IL": "\\d{19}", 2444 "IT": "[A-Z]\\d{10}[\\dA-Z]{12}", 2445 "KZ": "\\d{3}[\\dA-Z]{13}", 2446 "KW": "[A-Z]{4}[\\dA-Z]{22}", 2447 "LV": "[A-Z]{4}[\\dA-Z]{13}", 2448 "LB": "\\d{4}[\\dA-Z]{20}", 2449 "LI": "\\d{5}[\\dA-Z]{12}", 2450 "LT": "\\d{16}", 2451 "LU": "\\d{3}[\\dA-Z]{13}", 2452 "MK": "\\d{3}[\\dA-Z]{10}\\d{2}", 2453 "MT": "[A-Z]{4}\\d{5}[\\dA-Z]{18}", 2454 "MR": "\\d{23}", 2455 "MU": "[A-Z]{4}\\d{19}[A-Z]{3}", 2456 "MC": "\\d{10}[\\dA-Z]{11}\\d{2}", 2457 "MD": "[\\dA-Z]{2}\\d{18}", 2458 "ME": "\\d{18}", 2459 "NL": "[A-Z]{4}\\d{10}", 2460 "NO": "\\d{11}", 2461 "PK": "[\\dA-Z]{4}\\d{16}", 2462 "PS": "[\\dA-Z]{4}\\d{21}", 2463 "PL": "\\d{24}", 2464 "PT": "\\d{21}", 2465 "RO": "[A-Z]{4}[\\dA-Z]{16}", 2466 "SM": "[A-Z]\\d{10}[\\dA-Z]{12}", 2467 "SA": "\\d{2}[\\dA-Z]{18}", 2468 "RS": "\\d{18}", 2469 "SK": "\\d{20}", 2470 "SI": "\\d{15}", 2471 "ES": "\\d{20}", 2472 "SE": "\\d{20}", 2473 "CH": "\\d{5}[\\dA-Z]{12}", 2474 "TN": "\\d{20}", 2475 "TR": "\\d{5}[\\dA-Z]{17}", 2476 "AE": "\\d{3}\\d{16}", 2477 "GB": "[A-Z]{4}\\d{14}", 2478 "VG": "[\\dA-Z]{4}\\d{16}" 2479 }; 2480 2481 bbanpattern = bbancountrypatterns[ countrycode ]; 2482 2483 // As new countries will start using IBAN in the 2484 // future, we only check if the countrycode is known. 2485 // This prevents false negatives, while almost all 2486 // false positives introduced by this, will be caught 2487 // by the checksum validation below anyway. 2488 // Strict checking should return FALSE for unknown 2489 // countries. 2490 if ( typeof bbanpattern !== "undefined" ) { 2491 ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" ); 2492 if ( !( ibanregexp.test( iban ) ) ) { 2493 return false; // Invalid country specific format 2494 } 2495 } 2496 2497 // Now check the checksum, first convert to digits 2498 ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 ); 2499 for ( i = 0; i < ibancheck.length; i++ ) { 2500 charAt = ibancheck.charAt( i ); 2501 if ( charAt !== "0" ) { 2502 leadingZeroes = false; 2503 } 2504 if ( !leadingZeroes ) { 2505 ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt ); 2506 } 2507 } 2508 2509 // Calculate the result of: ibancheckdigits % 97 2510 for ( p = 0; p < ibancheckdigits.length; p++ ) { 2511 cChar = ibancheckdigits.charAt( p ); 2512 cOperator = "" + cRest + "" + cChar; 2513 cRest = cOperator % 97; 2514 } 2515 return cRest === 1; 2516}, "Please specify a valid IBAN." ); 2517 2518$.validator.addMethod( "integer", function( value, element ) { 2519 return this.optional( element ) || /^-?\d+$/.test( value ); 2520}, "A positive or negative non-decimal number please." ); 2521 2522$.validator.addMethod( "ipv4", function( value, element ) { 2523 return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value ); 2524}, "Please enter a valid IP v4 address." ); 2525 2526$.validator.addMethod( "ipv6", function( value, element ) { 2527 return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value ); 2528}, "Please enter a valid IP v6 address." ); 2529 2530$.validator.addMethod( "lessThan", function( value, element, param ) { 2531 var target = $( param ); 2532 2533 if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) { 2534 target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() { 2535 $( element ).valid(); 2536 } ); 2537 } 2538 2539 return value < target.val(); 2540}, "Please enter a lesser value." ); 2541 2542$.validator.addMethod( "lessThanEqual", function( value, element, param ) { 2543 var target = $( param ); 2544 2545 if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) { 2546 target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() { 2547 $( element ).valid(); 2548 } ); 2549 } 2550 2551 return value <= target.val(); 2552}, "Please enter a lesser value." ); 2553 2554$.validator.addMethod( "lettersonly", function( value, element ) { 2555 return this.optional( element ) || /^[a-z]+$/i.test( value ); 2556}, "Letters only please." ); 2557 2558$.validator.addMethod( "letterswithbasicpunc", function( value, element ) { 2559 return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value ); 2560}, "Letters or punctuation only please." ); 2561 2562// Limit the number of files in a FileList. 2563$.validator.addMethod( "maxfiles", function( value, element, param ) { 2564 if ( this.optional( element ) ) { 2565 return true; 2566 } 2567 2568 if ( $( element ).attr( "type" ) === "file" ) { 2569 if ( element.files && element.files.length > param ) { 2570 return false; 2571 } 2572 } 2573 2574 return true; 2575}, $.validator.format( "Please select no more than {0} files." ) ); 2576 2577// Limit the size of each individual file in a FileList. 2578$.validator.addMethod( "maxsize", function( value, element, param ) { 2579 if ( this.optional( element ) ) { 2580 return true; 2581 } 2582 2583 if ( $( element ).attr( "type" ) === "file" ) { 2584 if ( element.files && element.files.length ) { 2585 for ( var i = 0; i < element.files.length; i++ ) { 2586 if ( element.files[ i ].size > param ) { 2587 return false; 2588 } 2589 } 2590 } 2591 } 2592 2593 return true; 2594}, $.validator.format( "File size must not exceed {0} bytes each." ) ); 2595 2596// Limit the size of all files in a FileList. 2597$.validator.addMethod( "maxsizetotal", function( value, element, param ) { 2598 if ( this.optional( element ) ) { 2599 return true; 2600 } 2601 2602 if ( $( element ).attr( "type" ) === "file" ) { 2603 if ( element.files && element.files.length ) { 2604 var totalSize = 0; 2605 2606 for ( var i = 0; i < element.files.length; i++ ) { 2607 totalSize += element.files[ i ].size; 2608 if ( totalSize > param ) { 2609 return false; 2610 } 2611 } 2612 } 2613 } 2614 2615 return true; 2616}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) ); 2617 2618 2619$.validator.addMethod( "mobileNL", function( value, element ) { 2620 return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); 2621}, "Please specify a valid mobile number." ); 2622 2623$.validator.addMethod( "mobileRU", function( phone_number, element ) { 2624 var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); 2625 return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number ); 2626}, "Please specify a valid mobile number." ); 2627 2628/* For UK phone functions, do the following server side processing: 2629 * Compare original input with this RegEx pattern: 2630 * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ 2631 * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0' 2632 * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. 2633 * A number of very detailed GB telephone number RegEx patterns can also be found at: 2634 * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers 2635 */ 2636$.validator.addMethod( "mobileUK", function( phone_number, element ) { 2637 phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); 2638 return this.optional( element ) || phone_number.length > 9 && 2639 phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ ); 2640}, "Please specify a valid mobile number." ); 2641 2642$.validator.addMethod( "netmask", function( value, element ) { 2643 return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value ); 2644}, "Please enter a valid netmask." ); 2645 2646/* 2647 * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish 2648 * authorities to any foreigner. 2649 * 2650 * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal 2651 * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to 2652 * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter. 2653 */ 2654$.validator.addMethod( "nieES", function( value, element ) { 2655 "use strict"; 2656 2657 if ( this.optional( element ) ) { 2658 return true; 2659 } 2660 2661 var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi ); 2662 var validChars = "TRWAGMYFPDXBNJZSQVHLCKET", 2663 letter = value.substr( value.length - 1 ).toUpperCase(), 2664 number; 2665 2666 value = value.toString().toUpperCase(); 2667 2668 // Quick format test 2669 if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) { 2670 return false; 2671 } 2672 2673 // X means same number 2674 // Y means number + 10000000 2675 // Z means number + 20000000 2676 value = value.replace( /^[X]/, "0" ) 2677 .replace( /^[Y]/, "1" ) 2678 .replace( /^[Z]/, "2" ); 2679 2680 number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 ); 2681 2682 return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter; 2683 2684}, "Please specify a valid NIE number." ); 2685 2686/* 2687 * The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals 2688 */ 2689$.validator.addMethod( "nifES", function( value, element ) { 2690 "use strict"; 2691 2692 if ( this.optional( element ) ) { 2693 return true; 2694 } 2695 2696 value = value.toUpperCase(); 2697 2698 // Basic format test 2699 if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) { 2700 return false; 2701 } 2702 2703 // Test NIF 2704 if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) { 2705 return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) ); 2706 } 2707 2708 // Test specials NIF (starts with K, L or M) 2709 if ( /^[KLM]{1}/.test( value ) ) { 2710 return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) ); 2711 } 2712 2713 return false; 2714 2715}, "Please specify a valid NIF number." ); 2716 2717/* 2718 * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies 2719 */ 2720$.validator.addMethod( "nipPL", function( value ) { 2721 "use strict"; 2722 2723 value = value.replace( /[^0-9]/g, "" ); 2724 2725 if ( value.length !== 10 ) { 2726 return false; 2727 } 2728 2729 var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ]; 2730 var intSum = 0; 2731 for ( var i = 0; i < 9; i++ ) { 2732 intSum += arrSteps[ i ] * value[ i ]; 2733 } 2734 var int2 = intSum % 11; 2735 var intControlNr = ( int2 === 10 ) ? 0 : int2; 2736 2737 return ( intControlNr === parseInt( value[ 9 ], 10 ) ); 2738}, "Please specify a valid NIP number." ); 2739 2740/** 2741 * Created for project jquery-validation. 2742 * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a 2743 * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers 2744 * that are being used for validation. 2745 * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça 2746 * @author Cleiton da Silva Mendonça <[email protected]> 2747 * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça 2748 * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça 2749 */ 2750$.validator.addMethod( "nisBR", function( value ) { 2751 var number; 2752 var cn; 2753 var sum = 0; 2754 var dv; 2755 var count; 2756 var multiplier; 2757 2758 // Removing special characters from value 2759 value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" ); 2760 2761 // Checking value to have 11 digits only 2762 if ( value.length !== 11 ) { 2763 return false; 2764 } 2765 2766 //Get check number of value 2767 cn = parseInt( value.substring( 10, 11 ), 10 ); 2768 2769 //Get number with 10 digits of the value 2770 number = parseInt( value.substring( 0, 10 ), 10 ); 2771 2772 for ( count = 2; count < 12; count++ ) { 2773 multiplier = count; 2774 if ( count === 10 ) { 2775 multiplier = 2; 2776 } 2777 if ( count === 11 ) { 2778 multiplier = 3; 2779 } 2780 sum += ( ( number % 10 ) * multiplier ); 2781 number = parseInt( number / 10, 10 ); 2782 } 2783 dv = ( sum % 11 ); 2784 2785 if ( dv > 1 ) { 2786 dv = ( 11 - dv ); 2787 } else { 2788 dv = 0; 2789 } 2790 2791 if ( cn === dv ) { 2792 return true; 2793 } else { 2794 return false; 2795 } 2796}, "Please specify a valid NIS/PIS number." ); 2797 2798$.validator.addMethod( "notEqualTo", function( value, element, param ) { 2799 return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param ); 2800}, "Please enter a different value, values must not be the same." ); 2801 2802$.validator.addMethod( "nowhitespace", function( value, element ) { 2803 return this.optional( element ) || /^\S+$/i.test( value ); 2804}, "No white space please." ); 2805 2806/** 2807* Return true if the field value matches the given format RegExp 2808* 2809* @example $.validator.methods.pattern("AR1004",element,/^AR\d{4}$/) 2810* @result true 2811* 2812* @example $.validator.methods.pattern("BR1004",element,/^AR\d{4}$/) 2813* @result false 2814* 2815* @name $.validator.methods.pattern 2816* @type Boolean 2817* @cat Plugins/Validate/Methods 2818*/ 2819$.validator.addMethod( "pattern", function( value, element, param ) { 2820 if ( this.optional( element ) ) { 2821 return true; 2822 } 2823 if ( typeof param === "string" ) { 2824 param = new RegExp( "^(?:" + param + ")$" ); 2825 } 2826 return param.test( value ); 2827}, "Invalid format." ); 2828 2829/** 2830 * Dutch phone numbers have 10 digits (or 11 and start with +31). 2831 */ 2832$.validator.addMethod( "phoneNL", function( value, element ) { 2833 return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value ); 2834}, "Please specify a valid phone number." ); 2835 2836/** 2837 * Polish telephone numbers have 9 digits. 2838 * 2839 * Mobile phone numbers starts with following digits: 2840 * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88. 2841 * 2842 * Fixed-line numbers starts with area codes: 2843 * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33, 2844 * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61, 2845 * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84, 2846 * 85, 86, 87, 89, 91, 94, 95. 2847 * 2848 * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39. 2849 * 2850 * Excludes intelligent networks (premium rate, shared cost, free phone numbers). 2851 * 2852 * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en 2853 */ 2854$.validator.addMethod( "phonePL", function( phone_number, element ) { 2855 phone_number = phone_number.replace( /\s+/g, "" ); 2856 var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/; 2857 return this.optional( element ) || regexp.test( phone_number ); 2858}, "Please specify a valid phone number." ); 2859 2860/* For UK phone functions, do the following server side processing: 2861 * Compare original input with this RegEx pattern: 2862 * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ 2863 * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0' 2864 * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. 2865 * A number of very detailed GB telephone number RegEx patterns can also be found at: 2866 * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers 2867 */ 2868 2869// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers 2870$.validator.addMethod( "phonesUK", function( phone_number, element ) { 2871 phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); 2872 return this.optional( element ) || phone_number.length > 9 && 2873 phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ ); 2874}, "Please specify a valid uk phone number." ); 2875 2876/* For UK phone functions, do the following server side processing: 2877 * Compare original input with this RegEx pattern: 2878 * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ 2879 * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0' 2880 * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. 2881 * A number of very detailed GB telephone number RegEx patterns can also be found at: 2882 * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers 2883 */ 2884$.validator.addMethod( "phoneUK", function( phone_number, element ) { 2885 phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" ); 2886 return this.optional( element ) || phone_number.length > 9 && 2887 phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ ); 2888}, "Please specify a valid phone number." ); 2889 2890/** 2891 * Matches US phone number format 2892 * 2893 * where the area code may not start with 1 and the prefix may not start with 1 2894 * allows '-' or ' ' as a separator and allows parens around area code 2895 * some people may want to put a '1' in front of their number 2896 * 2897 * 1(212)-999-2345 or 2898 * 212 999 2344 or 2899 * 212-999-0983 2900 * 2901 * but not 2902 * 111-123-5434 2903 * and not 2904 * 212 123 4567 2905 */ 2906$.validator.addMethod( "phoneUS", function( phone_number, element ) { 2907 phone_number = phone_number.replace( /\s+/g, "" ); 2908 return this.optional( element ) || phone_number.length > 9 && 2909 phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ ); 2910}, "Please specify a valid phone number." ); 2911 2912/* 2913* Valida CEPs do brasileiros: 2914* 2915* Formatos aceitos: 2916* 99999-999 2917* 99.999-999 2918* 99999999 2919*/ 2920$.validator.addMethod( "postalcodeBR", function( cep_value, element ) { 2921 return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value ); 2922}, "Informe um CEP válido." ); 2923 2924/** 2925 * Matches a valid Canadian Postal Code 2926 * 2927 * @example jQuery.validator.methods.postalCodeCA( "H0H 0H0", element ) 2928 * @result true 2929 * 2930 * @example jQuery.validator.methods.postalCodeCA( "H0H0H0", element ) 2931 * @result false 2932 * 2933 * @name jQuery.validator.methods.postalCodeCA 2934 * @type Boolean 2935 * @cat Plugins/Validate/Methods 2936 */ 2937$.validator.addMethod( "postalCodeCA", function( value, element ) { 2938 return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value ); 2939}, "Please specify a valid postal code." ); 2940 2941/* Matches Italian postcode (CAP) */ 2942$.validator.addMethod( "postalcodeIT", function( value, element ) { 2943 return this.optional( element ) || /^\d{5}$/.test( value ); 2944}, "Please specify a valid postal code." ); 2945 2946$.validator.addMethod( "postalcodeNL", function( value, element ) { 2947 return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value ); 2948}, "Please specify a valid postal code." ); 2949 2950// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK) 2951$.validator.addMethod( "postcodeUK", function( value, element ) { 2952 return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value ); 2953}, "Please specify a valid UK postcode." ); 2954 2955/* 2956 * Lets you say "at least X inputs that match selector Y must be filled." 2957 * 2958 * The end result is that neither of these inputs: 2959 * 2960 * <input class="productinfo" name="partnumber"> 2961 * <input class="productinfo" name="description"> 2962 * 2963 * ...will validate unless at least one of them is filled. 2964 * 2965 * partnumber: {require_from_group: [1,".productinfo"]}, 2966 * description: {require_from_group: [1,".productinfo"]} 2967 * 2968 * options[0]: number of fields that must be filled in the group 2969 * options[1]: CSS selector that defines the group of conditionally required fields 2970 */ 2971$.validator.addMethod( "require_from_group", function( value, element, options ) { 2972 var $fields = $( options[ 1 ], element.form ), 2973 $fieldsFirst = $fields.eq( 0 ), 2974 validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ), 2975 isValid = $fields.filter( function() { 2976 return validator.elementValue( this ); 2977 } ).length >= options[ 0 ]; 2978 2979 // Store the cloned validator for future validation 2980 $fieldsFirst.data( "valid_req_grp", validator ); 2981 2982 // If element isn't being validated, run each require_from_group field's validation rules 2983 if ( !$( element ).data( "being_validated" ) ) { 2984 $fields.data( "being_validated", true ); 2985 $fields.each( function() { 2986 validator.element( this ); 2987 } ); 2988 $fields.data( "being_validated", false ); 2989 } 2990 return isValid; 2991}, $.validator.format( "Please fill at least {0} of these fields." ) ); 2992 2993/* 2994 * Lets you say "either at least X inputs that match selector Y must be filled, 2995 * OR they must all be skipped (left blank)." 2996 * 2997 * The end result, is that none of these inputs: 2998 * 2999 * <input class="productinfo" name="partnumber"> 3000 * <input class="productinfo" name="description"> 3001 * <input class="productinfo" name="color"> 3002 * 3003 * ...will validate unless either at least two of them are filled, 3004 * OR none of them are. 3005 * 3006 * partnumber: {skip_or_fill_minimum: [2,".productinfo"]}, 3007 * description: {skip_or_fill_minimum: [2,".productinfo"]}, 3008 * color: {skip_or_fill_minimum: [2,".productinfo"]} 3009 * 3010 * options[0]: number of fields that must be filled in the group 3011 * options[1]: CSS selector that defines the group of conditionally required fields 3012 * 3013 */ 3014$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) { 3015 var $fields = $( options[ 1 ], element.form ), 3016 $fieldsFirst = $fields.eq( 0 ), 3017 validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ), 3018 numberFilled = $fields.filter( function() { 3019 return validator.elementValue( this ); 3020 } ).length, 3021 isValid = numberFilled === 0 || numberFilled >= options[ 0 ]; 3022 3023 // Store the cloned validator for future validation 3024 $fieldsFirst.data( "valid_skip", validator ); 3025 3026 // If element isn't being validated, run each skip_or_fill_minimum field's validation rules 3027 if ( !$( element ).data( "being_validated" ) ) { 3028 $fields.data( "being_validated", true ); 3029 $fields.each( function() { 3030 validator.element( this ); 3031 } ); 3032 $fields.data( "being_validated", false ); 3033 } 3034 return isValid; 3035}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) ); 3036 3037/* Validates US States and/or Territories by @jdforsythe 3038 * Can be case insensitive or require capitalization - default is case insensitive 3039 * Can include US Territories or not - default does not 3040 * Can include US Military postal abbreviations (AA, AE, AP) - default does not 3041 * 3042 * Note: "States" always includes DC (District of Colombia) 3043 * 3044 * Usage examples: 3045 * 3046 * This is the default - case insensitive, no territories, no military zones 3047 * stateInput: { 3048 * caseSensitive: false, 3049 * includeTerritories: false, 3050 * includeMilitary: false 3051 * } 3052 * 3053 * Only allow capital letters, no territories, no military zones 3054 * stateInput: { 3055 * caseSensitive: false 3056 * } 3057 * 3058 * Case insensitive, include territories but not military zones 3059 * stateInput: { 3060 * includeTerritories: true 3061 * } 3062 * 3063 * Only allow capital letters, include territories and military zones 3064 * stateInput: { 3065 * caseSensitive: true, 3066 * includeTerritories: true, 3067 * includeMilitary: true 3068 * } 3069 * 3070 */ 3071$.validator.addMethod( "stateUS", function( value, element, options ) { 3072 var isDefault = typeof options === "undefined", 3073 caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive, 3074 includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories, 3075 includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary, 3076 regex; 3077 3078 if ( !includeTerritories && !includeMilitary ) { 3079 regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$"; 3080 } else if ( includeTerritories && includeMilitary ) { 3081 regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$"; 3082 } else if ( includeTerritories ) { 3083 regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$"; 3084 } else { 3085 regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$"; 3086 } 3087 3088 regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" ); 3089 return this.optional( element ) || regex.test( value ); 3090}, "Please specify a valid state." ); 3091 3092// TODO check if value starts with <, otherwise don't try stripping anything 3093$.validator.addMethod( "strippedminlength", function( value, element, param ) { 3094 return $( value ).text().length >= param; 3095}, $.validator.format( "Please enter at least {0} characters." ) ); 3096 3097$.validator.addMethod( "time", function( value, element ) { 3098 return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value ); 3099}, "Please enter a valid time, between 00:00 and 23:59." ); 3100 3101$.validator.addMethod( "time12h", function( value, element ) { 3102 return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value ); 3103}, "Please enter a valid time in 12-hour am/pm format." ); 3104 3105// Same as url, but TLD is optional 3106$.validator.addMethod( "url2", function( value, element ) { 3107 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,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); 3108}, $.validator.messages.url ); 3109 3110/** 3111 * Return true, if the value is a valid vehicle identification number (VIN). 3112 * 3113 * Works with all kind of text inputs. 3114 * 3115 * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" /> 3116 * @desc Declares a required input element whose value must be a valid vehicle identification number. 3117 * 3118 * @name $.validator.methods.vinUS 3119 * @type Boolean 3120 * @cat Plugins/Validate/Methods 3121 */ 3122$.validator.addMethod( "vinUS", function( v ) {
3123 if ( v.length !== 17 ) { 3124 return false; 3125 } 3126 3127 var LL = [ "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], 3128 VL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ], 3129 FL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ], 3130 rs = 0, 3131 i, n, d, f, cd, cdv; 3132 3133 for ( i = 0; i < 17; i++ ) { 3134 f = FL[ i ]; 3135 d = v.slice( i, i + 1 ); 3136 if ( i === 8 ) { 3137 cdv = d; 3138 } 3139 if ( !isNaN( d ) ) { 3140 d *= f; 3141 } else { 3142 for ( n = 0; n < LL.length; n++ ) { 3143 if ( d.toUpperCase() === LL[ n ] ) { 3144 d = VL[ n ]; 3145 d *= f; 3146 if ( isNaN( cdv ) && n === 8 ) { 3147 cdv = LL[ n ]; 3148 } 3149 break; 3150 } 3151 } 3152 } 3153 rs += d; 3154 } 3155 cd = rs % 11; 3156 if ( cd === 10 ) { 3157 cd = "X"; 3158 } 3159 if ( cd === cdv ) { 3160 return true; 3161 } 3162 return false; 3163}, "The specified vehicle identification number (VIN) is invalid." ); 3164 3165$.validator.addMethod( "zipcodeUS", function( value, element ) { 3166 return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value ); 3167}, "The specified US ZIP Code is invalid." ); 3168 3169$.validator.addMethod( "ziprange", function( value, element ) { 3170 return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value ); 3171}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." ); 3172return $; 3173})); 3174/*! 3175* jQuery Cycle2; version: 2.1.6c build: 20210125 3176* http://jquery.malsup.com/cycle2/ 3177* updated repo at https://github.com/thecarnie/cycle2/ 3178* Copyright (c) 2021 M. Alsup; Dual licensed: MIT/GPL 3179*/ 3180 3181/* Cycle2 core engine */ 3182;(function($) { 3183 "use strict"; 3184 3185 var version = '2.1.6c'; 3186 3187 $.fn.cycle = function( options ) { 3188 // fix mistakes with the ready state 3189 var o; 3190 if ( this.length === 0 && !$.isReady ) { 3191 o = { s: this.selector, c: this.context }; 3192 $.fn.cycle.log('requeuing slideshow (dom not ready)'); 3193 $(function() { 3194 $( o.s, o.c ).cycle(options); 3195 }); 3196 return this; 3197 } 3198 3199 return this.each(function() { 3200 var data, opts, shortName, val; 3201 var container = $(this); 3202 var log = $.fn.cycle.log; 3203 3204 if ( container.data('cycle.opts') ) 3205 return; // already initialized 3206 3207 if ( container.data('cycle-log') === false || 3208 ( options && options.log === false ) || 3209 ( opts && opts.log === false) ) { 3210 log = $.noop; 3211 } 3212 3213 log('--c2 init--'); 3214 data = container.data(); 3215 for (var p in data) { 3216 // allow props to be accessed sans 'cycle' prefix and log the overrides 3217 if (data.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) { 3218 val = data[p]; 3219 shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase); 3220 log(shortName+':', val, '('+typeof val +')'); 3221 data[shortName] = val; 3222 } 3223 } 3224 3225 opts = $.extend( {}, $.fn.cycle.defaults, data, options || {}); 3226 3227 opts.timeoutId = 0; 3228 opts.paused = opts.paused || false; // #57 3229 opts.container = container; 3230 opts._maxZ = opts.maxZ; 3231 3232 opts.API = $.extend ( { _container: container }, $.fn.cycle.API ); 3233 opts.API.log = log; 3234 opts.API.trigger = function( eventName, args ) { 3235 opts.container.trigger( eventName, args ); 3236 return opts.API; 3237 }; 3238 3239 container.data( 'cycle.opts', opts ); 3240 container.data( 'cycle.API', opts.API ); 3241 3242 // opportunity for plugins to modify opts and API 3243 opts.API.trigger('cycle-bootstrap', [ opts, opts.API ]); 3244 3245 opts.API.addInitialSlides(); 3246 opts.API.preInitSlideshow(); 3247 3248 if ( opts.slides.length ) 3249 opts.API.initSlideshow(); 3250 }); 3251 }; 3252 3253 $.fn.cycle.API = { 3254 opts: function() { 3255 return this._container.data( 'cycle.opts' ); 3256 }, 3257 addInitialSlides: function() { 3258 var opts = this.opts(); 3259 var slides = opts.slides; 3260 opts.slideCount = 0; 3261 opts.slides = $(); // empty set 3262 3263 // add slides that already exist
3264 slides = slides.jquery ? slides : opts.container.find( slides ); 3265 3266 if ( opts.random ) { 3267 // slides.sort(function() {return Math.random() - 0.5;}); 3268 // Change random sort to use Fisher-Yates shuffle #424 https://github.com/malsup/cycle2/pull/424 3269 3270 slides = (function(a) { // Fisher-Yates shuffle 3271 var i, j, t; 3272 i = a.length; 3273 while (--i > 0) { 3274 j = ~~(Math.random() * (i + 1)); 3275 t = a[j]; 3276 a[j] = a[i]; 3277 a[i] = t; 3278 } 3279 return a; 3280 })(slides); 3281 } 3282 3283 opts.API.add( slides ); 3284 }, 3285 3286 preInitSlideshow: function() { 3287 var opts = this.opts(); 3288 opts.API.trigger('cycle-pre-initialize', [ opts ]); 3289 var tx = $.fn.cycle.transitions[opts.fx]; 3290 if (tx && $.fn.cycle.varType(tx.preInit) ==='function') 3291 tx.preInit( opts ); 3292 opts._preInitialized = true; 3293 }, 3294 3295 postInitSlideshow: function() { 3296 var opts = this.opts(); 3297 opts.API.trigger('cycle-post-initialize', [ opts ]); 3298 var tx = $.fn.cycle.transitions[opts.fx]; 3299 if (tx && $.fn.cycle.varType(tx.postInit) ==='function') 3300 tx.postInit( opts ); 3301 }, 3302 3303 initSlideshow: function() { 3304 var opts = this.opts(); 3305 var pauseObj = opts.container; 3306 var slideOpts; 3307 opts.API.calcFirstSlide(); 3308 3309 if ( opts.container.css('position') == 'static' ) 3310 opts.container.css('position', 'relative'); 3311 3312 $(opts.slides[opts.currSlide]).css({ 3313 opacity: 1, 3314 display: 'block', 3315 visibility: 'visible' 3316 }); 3317 opts.API.stackSlides( opts.slides[opts.currSlide], opts.slides[opts.nextSlide], !opts.reverse ); 3318 3319 if ( opts.pauseOnHover ) { 3320 // allow pauseOnHover to specify an element 3321 if ( opts.pauseOnHover !== true ) 3322 pauseObj = $( opts.pauseOnHover ); 3323 3324 pauseObj.hover( 3325 function(){ opts.API.pause( true ); }, 3326 function(){ opts.API.resume( true ); } 3327 ); 3328 } 3329 3330 // stage initial transition 3331 if ( opts.timeout ) { 3332 slideOpts = opts.API.getSlideOpts( opts.currSlide ); 3333 opts.API.queueTransition( slideOpts, slideOpts.timeout + opts.delay ); 3334 } 3335 3336 opts._initialized = true; 3337 opts.API.updateView( true ); 3338 opts.API.trigger('cycle-initialized', [ opts ]); 3339 opts.API.postInitSlideshow(); 3340 }, 3341 3342 pause: function( hover ) { 3343 var opts = this.opts(), 3344 slideOpts = opts.API.getSlideOpts(), 3345 alreadyPaused = opts.hoverPaused || opts.paused; 3346 3347 if ( hover ) 3348 opts.hoverPaused = true; 3349 else 3350 opts.paused = true; 3351 3352 if ( ! alreadyPaused ) { 3353 opts.container.addClass('cycle-paused'); 3354 opts.API.trigger('cycle-paused', [ opts ]).log('cycle-paused'); 3355 3356 if ( slideOpts.timeout ) { 3357 clearTimeout( opts.timeoutId ); 3358 opts.timeoutId = 0; 3359 3360 // determine how much time is left for the current slide 3361 opts._remainingTimeout -= ( $.now() - opts._lastQueue ); 3362 if ( opts._remainingTimeout < 0 || isNaN(opts._remainingTimeout) ) 3363 opts._remainingTimeout = undefined; 3364 } 3365 } 3366 }, 3367 3368 resume: function( hover ) { 3369 var opts = this.opts(), 3370 alreadyResumed = !opts.hoverPaused && !opts.paused, 3371 remaining; 3372 3373 if ( hover ) 3374 opts.hoverPaused = false; 3375 else 3376 opts.paused = false;
3377 3378 3379 if ( ! alreadyResumed ) { 3380 opts.container.removeClass('cycle-paused'); 3381 // #gh-230; if an animation is in progress then don't queue a new transition; it will 3382 // happen naturally 3383 if ( opts.slides.filter(':animated').length === 0 ) 3384 opts.API.queueTransition( opts.API.getSlideOpts(), opts._remainingTimeout ); 3385 opts.API.trigger('cycle-resumed', [ opts, opts._remainingTimeout ] ).log('cycle-resumed'); 3386 } 3387 }, 3388 3389 add: function( slides, prepend ) { 3390 var opts = this.opts(); 3391 var oldSlideCount = opts.slideCount; 3392 var startSlideshow = false; 3393 var len; 3394 3395 if ( $.fn.cycle.varType(slides) == 'string') 3396 3397 // FIX: $.trim DEPRECATED in JQUERY 3.5+ 3398 // slides = $.trim( slides ); 3399 3400 slides = slides.trim(); 3401 3402 $( slides ).each(function(i) { 3403 var slideOpts; 3404 var slide = $(this); 3405 3406 if ( prepend ) 3407 opts.container.prepend( slide ); 3408 else 3409 opts.container.append( slide ); 3410 3411 opts.slideCount++; 3412 slideOpts = opts.API.buildSlideOpts( slide ); 3413 3414 if ( prepend ) 3415 opts.slides = $( slide ).add( opts.slides ); 3416 else 3417 opts.slides = opts.slides.add( slide ); 3418 3419 opts.API.initSlide( slideOpts, slide, --opts._maxZ ); 3420 3421 slide.data('cycle.opts', slideOpts); 3422 opts.API.trigger('cycle-slide-added', [ opts, slideOpts, slide ]); 3423 }); 3424 3425 opts.API.updateView( true ); 3426 3427 startSlideshow = opts._preInitialized && (oldSlideCount < 2 && opts.slideCount >= 1); 3428 if ( startSlideshow ) { 3429 if ( !opts._initialized ) 3430 opts.API.initSlideshow(); 3431 else if ( opts.timeout ) { 3432 len = opts.slides.length; 3433 opts.nextSlide = opts.reverse ? len - 1 : 1; 3434 if ( !opts.timeoutId ) { 3435 opts.API.queueTransition( opts ); 3436 } 3437 } 3438 } 3439 }, 3440 3441 calcFirstSlide: function() { 3442 var opts = this.opts(); 3443 var firstSlideIndex; 3444 3445 // check startingSlide option for "random" first slide 3446 if (typeof opts.startingSlide === 'string' && opts.startingSlide === 'random') { 3447 firstSlideIndex = Math.floor(Math.random() * opts.slides.length); 3448 } else { 3449 // original code 3450 firstSlideIndex = parseInt( opts.startingSlide || 0, 10 ); 3451 if (firstSlideIndex >= opts.slides.length || firstSlideIndex < 0) 3452 firstSlideIndex = 0; 3453 } 3454 3455 opts.currSlide = firstSlideIndex; 3456 if ( opts.reverse ) { 3457 opts.nextSlide = firstSlideIndex - 1; 3458 if (opts.nextSlide < 0) 3459 opts.nextSlide = opts.slides.length - 1; 3460 } 3461 else { 3462 opts.nextSlide = firstSlideIndex + 1; 3463 if (opts.nextSlide == opts.slides.length) 3464 opts.nextSlide = 0; 3465 } 3466 }, 3467 3468 calcNextSlide: function() { 3469 var opts = this.opts(); 3470 var roll; 3471 if ( opts.reverse ) { 3472 roll = (opts.nextSlide - 1) < 0; 3473 opts.nextSlide = roll ? opts.slideCount - 1 : opts.nextSlide-1; 3474 opts.currSlide = roll ? 0 : opts.nextSlide+1; 3475 } 3476 else { 3477 roll = (opts.nextSlide + 1) == opts.slides.length; 3478 opts.nextSlide = roll ? 0 : opts.nextSlide+1; 3479 opts.currSlide = roll ? opts.slides.length-1 : opts.nextSlide-1; 3480 } 3481 }, 3482 3483 calcTx: function( slideOpts, manual ) { 3484 var opts = slideOpts; 3485 var tx; 3486 3487 if ( opts._tempFx ) 3488 tx = $.fn.cycle.transitions[opts._tempFx]; 3489 else if ( manual && opts.manualFx ) 3490 tx = $.fn.cycle.transitions[opts.manualFx]; 3491 3492 if ( !tx ) 3493 tx = $.fn.cycle.transitions[opts.fx]; 3494 3495 opts._tempFx = null; 3496 this.opts()._tempFx = null; 3497 3498 if (!tx) { 3499 tx = $.fn.cycle.transitions.fade; 3500 opts.API.log('Transition "' + opts.fx + '" not found. Using fade.'); 3501 } 3502 return tx; 3503 }, 3504 3505 prepareTx: function( manual, fwd ) { 3506 var opts = this.opts(); 3507 var after, curr, next, slideOpts, tx; 3508 3509 if ( opts.slideCount < 2 ) { 3510 opts.timeoutId = 0; 3511 return; 3512 } 3513 if ( manual && ( !opts.busy || opts.manualTrump ) ) { 3514 opts.API.stopTransition(); 3515 opts.busy = false;
3516 clearTimeout(opts.timeoutId); 3517 opts.timeoutId = 0; 3518 } 3519 if ( opts.busy ) 3520 return; 3521 if ( opts.timeoutId === 0 && !manual ) 3522 return; 3523 3524 curr = opts.slides[opts.currSlide]; 3525 next = opts.slides[opts.nextSlide]; 3526 slideOpts = opts.API.getSlideOpts( opts.nextSlide ); 3527 tx = opts.API.calcTx( slideOpts, manual ); 3528 3529 opts._tx = tx; 3530 3531 if ( manual && slideOpts.manualSpeed !== undefined ) 3532 slideOpts.speed = slideOpts.manualSpeed; 3533 3534 // if ( opts.nextSlide === opts.currSlide ) 3535 // opts.API.calcNextSlide(); 3536 3537 // ensure that: 3538 // 1. advancing to a different slide 3539 // 2. this is either a manual event (prev/next, pager, cmd) or 3540 // a timer event and slideshow is not paused 3541 if ( opts.nextSlide != opts.currSlide && 3542 (manual || (!opts.paused && !opts.hoverPaused && opts.timeout) )) { // #62 3543 3544 opts.API.trigger('cycle-before', [ slideOpts, curr, next, fwd ]); 3545 if ( tx.before ) 3546 tx.before( slideOpts, curr, next, fwd ); 3547 3548 after = function() { 3549 opts.busy = false; 3550 // #76; bail if slideshow has been destroyed 3551 if (! opts.container.data( 'cycle.opts' ) ) 3552 return; 3553 3554 if (tx.after) 3555 tx.after( slideOpts, curr, next, fwd ); 3556 opts.API.trigger('cycle-after', [ slideOpts, curr, next, fwd ]); 3557 opts.API.queueTransition( slideOpts); 3558 opts.API.updateView( true ); 3559 }; 3560 3561 opts.busy = true; 3562 if (tx.transition) 3563 tx.transition(slideOpts, curr, next, fwd, after); 3564 else 3565 opts.API.doTransition( slideOpts, curr, next, fwd, after); 3566 3567 opts.API.calcNextSlide(); 3568 opts.API.updateView(); 3569 } else { 3570 opts.API.queueTransition( slideOpts ); 3571 } 3572 }, 3573 3574 // perform the actual animation 3575 doTransition: function( slideOpts, currEl, nextEl, fwd, callback) { 3576 var opts = slideOpts; 3577 var curr = $(currEl), next = $(nextEl); 3578 var fn = function() { 3579 // make sure animIn has something so that callback doesn't trigger immediately 3580 next.animate(opts.animIn || { opacity: 1}, opts.speed, opts.easeIn || opts.easing, callback); 3581 }; 3582 3583 next.css(opts.cssBefore || {}); 3584 curr.animate(opts.animOut || {}, opts.speed, opts.easeOut || opts.easing, function() { 3585 curr.css(opts.cssAfter || {}); 3586 if (!opts.sync) { 3587 fn(); 3588 } 3589 }); 3590 if (opts.sync) { 3591 fn(); 3592 } 3593 }, 3594 3595 queueTransition: function( slideOpts, specificTimeout ) { 3596 var opts = this.opts(); 3597 var timeout = specificTimeout !== undefined ? specificTimeout : slideOpts.timeout; 3598 if (opts.nextSlide === 0 && --opts.loop === 0) { 3599 opts.API.log('terminating; loop=0'); 3600 opts.timeout = 0; 3601 if ( timeout ) { 3602 setTimeout(function() { 3603 opts.API.trigger('cycle-finished', [ opts ]); 3604 }, timeout); 3605 } 3606 else { 3607 opts.API.trigger('cycle-finished', [ opts ]); 3608 } 3609 // reset nextSlide 3610 opts.nextSlide = opts.currSlide; 3611 return; 3612 } 3613 if ( opts.continueAuto !== undefined ) { 3614 if ( opts.continueAuto === false || 3615 ($.fn.cycle.varType(opts.continueAuto) ==='function' && opts.continueAuto() === false )) { 3616 opts.API.log('terminating automatic transitions'); 3617 opts.timeout = 0; 3618 if ( opts.timeoutId ) 3619 clearTimeout(opts.timeoutId); 3620 return; 3621 } 3622 } 3623 if ( timeout ) { 3624 opts._lastQueue = $.now(); 3625 if ( specificTimeout === undefined ) 3626 opts._remainingTimeout = slideOpts.timeout; 3627 3628 if ( !opts.paused && ! opts.hoverPaused ) { 3629 opts.timeoutId = setTimeout(function() { 3630 opts.API.prepareTx( false, !opts.reverse ); 3631 }, timeout ); 3632 } 3633 } 3634 }, 3635 3636 stopTransition: function() { 3637 var opts = this.opts(); 3638 if ( opts.slides.filter(':animated').length ) { 3639 opts.slides.stop(false, true); 3640 opts.API.trigger('cycle-transition-stopped', [ opts ]); 3641 } 3642 3643 if ( opts._tx && opts._tx.stopTransition ) 3644 opts._tx.stopTransition( opts ); 3645 }, 3646 3647 // advance slide forward or back 3648 advanceSlide: function( val ) { 3649 var opts = this.opts(); 3650 clearTimeout(opts.timeoutId); 3651 opts.timeoutId = 0; 3652 opts.nextSlide = opts.currSlide + val; 3653 3654 if (opts.nextSlide < 0) 3655 opts.nextSlide = opts.slides.length - 1; 3656 else if (opts.nextSlide >= opts.slides.length) 3657 opts.nextSlide = 0; 3658 3659 opts.API.prepareTx( true, val >= 0 ); 3660 return false;
3661 }, 3662 3663 buildSlideOpts: function( slide ) { 3664 var opts = this.opts(); 3665 var val, shortName; 3666 var slideOpts = slide.data() || {}; 3667 for (var p in slideOpts) { 3668 // allow props to be accessed sans 'cycle' prefix and log the overrides 3669 if (slideOpts.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) { 3670 val = slideOpts[p]; 3671 shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase); 3672 opts.API.log('['+(opts.slideCount-1)+']', shortName+':', val, '('+typeof val +')'); 3673 slideOpts[shortName] = val; 3674 } 3675 } 3676 3677 slideOpts = $.extend( {}, $.fn.cycle.defaults, opts, slideOpts ); 3678 slideOpts.slideNum = opts.slideCount; 3679 3680 try { 3681 // these props should always be read from the master state object 3682 delete slideOpts.API; 3683 delete slideOpts.slideCount; 3684 delete slideOpts.currSlide; 3685 delete slideOpts.nextSlide; 3686 delete slideOpts.slides; 3687 } catch(e) { 3688 // no op 3689 } 3690 return slideOpts; 3691 }, 3692 3693 getSlideOpts: function( index ) { 3694 var opts = this.opts(); 3695 if ( index === undefined ) 3696 index = opts.currSlide; 3697 3698 var slide = opts.slides[index]; 3699 var slideOpts = $(slide).data('cycle.opts'); 3700 return $.extend( {}, opts, slideOpts ); 3701 }, 3702 3703 initSlide: function( slideOpts, slide, suggestedZindex ) { 3704 var opts = this.opts(); 3705 slide.css( slideOpts.slideCss || {} ); 3706 if ( suggestedZindex > 0 ) 3707 slide.css( 'zIndex', suggestedZindex ); 3708 3709 // ensure that speed settings are sane 3710 if ( isNaN( slideOpts.speed ) ) 3711 slideOpts.speed = $.fx.speeds[slideOpts.speed] || $.fx.speeds._default; 3712 if ( !slideOpts.sync ) 3713 slideOpts.speed = slideOpts.speed / 2; 3714 3715 slide.addClass( opts.slideClass ); 3716 }, 3717 3718 updateView: function( isAfter, isDuring, forceEvent ) { 3719 var opts = this.opts(); 3720 if ( !opts._initialized ) 3721 return; 3722 var slideOpts = opts.API.getSlideOpts(); 3723 var currSlide = opts.slides[ opts.currSlide ]; 3724 3725 if ( ! isAfter && isDuring !== true ) { 3726 opts.API.trigger('cycle-update-view-before', [ opts, slideOpts, currSlide ]); 3727 if ( opts.updateView < 0 ) 3728 return; 3729 } 3730 3731 if ( opts.slideActiveClass ) { 3732 opts.slides.removeClass( opts.slideActiveClass ) 3733 .eq( opts.currSlide ).addClass( opts.slideActiveClass ); 3734 } 3735 3736 if ( isAfter && opts.hideNonActive ) 3737 opts.slides.filter( ':not(.' + opts.slideActiveClass + ')' ).css('visibility', 'hidden'); 3738 3739 if ( opts.updateView === 0 ) { 3740 setTimeout(function() { 3741 opts.API.trigger('cycle-update-view', [ opts, slideOpts, currSlide, isAfter ]); 3742 }, slideOpts.speed / (opts.sync ? 2 : 1) ); 3743 } 3744 3745 if ( opts.updateView !== 0 ) 3746 opts.API.trigger('cycle-update-view', [ opts, slideOpts, currSlide, isAfter ]); 3747 3748 if ( isAfter ) 3749 opts.API.trigger('cycle-update-view-after', [ opts, slideOpts, currSlide ]); 3750 }, 3751 3752 getComponent: function( name ) { 3753 var opts = this.opts(); 3754 var selector = opts[name]; 3755 if (typeof selector === 'string') { 3756 // if selector is a child, sibling combinator, adjancent selector then use find, otherwise query full dom 3757 return (/^\s*[\>|\+|~]/).test( selector ) ? opts.container.find( selector ) : $( selector ); 3758 } 3759 if (selector.jquery) 3760 return selector; 3761 3762 return $(selector); 3763 }, 3764 3765 stackSlides: function( curr, next, fwd ) { 3766 var opts = this.opts(); 3767 if ( !curr ) { 3768 curr = opts.slides[opts.currSlide]; 3769 next = opts.slides[opts.nextSlide]; 3770 fwd = !opts.reverse; 3771 } 3772 3773 // reset the zIndex for the common case: 3774 // curr slide on top, next slide beneath, and the rest in order to be shown 3775 $(curr).css('zIndex', opts.maxZ); 3776 3777 var i; 3778 var z = opts.maxZ - 2; 3779 var len = opts.slideCount; 3780 if (fwd) { 3781 for ( i = opts.currSlide + 1; i < len; i++ ) 3782 $( opts.slides[i] ).css( 'zIndex', z-- ); 3783 for ( i = 0; i < opts.currSlide; i++ ) 3784 $( opts.slides[i] ).css( 'zIndex', z-- ); 3785 } 3786 else { 3787 for ( i = opts.currSlide - 1; i >= 0; i-- ) 3788 $( opts.slides[i] ).css( 'zIndex', z-- ); 3789 for ( i = len - 1; i > opts.currSlide; i-- ) 3790 $( opts.slides[i] ).css( 'zIndex', z-- ); 3791 } 3792 3793 $(next).css('zIndex', opts.maxZ - 1); 3794 }, 3795 3796 getSlideIndex: function( el ) { 3797 return this.opts().slides.index( el ); 3798 } 3799 3800 }; // API 3801 3802// default logger 3803 $.fn.cycle.log = function log() { 3804 /*global console:true */ 3805 if (window.console && console.log) 3806 console.log('[cycle2] ' + Array.prototype.join.call(arguments, ' ') ); 3807 }; 3808 3809 $.fn.cycle.version = function() { return 'Cycle2: ' + version; }; 3810 3811 $.fn.cycle.varType = function(obj, fullClass) { 3812 3813 // get toPrototypeString() of obj (handles all types) 3814 // Early JS environments return '[object Object]' for null, so it's best to directly check for it. 3815 if (fullClass) { 3816 return (obj === null) ? '[object Null]' : Object.prototype.toString.call(obj); 3817 } 3818 if (obj == null) { return (obj + '').toLowerCase(); } // implicit toString() conversion 3819 3820 var deepType = Object.prototype.toString.call(obj).slice(8,-1).toLowerCase(); 3821 if (deepType === 'generatorfunction') { return 'function'; } 3822 3823 // Prevent overspecificity (for example, [object HTMLDivElement], etc). 3824 // Account for functionish Regexp (Android <=2.3), functionish <object> element (Chrome <=57, Firefox <=52), etc. 3825 // String.prototype.match is universally supported. 3826 3827 return deepType.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/) ? deepType : 3828 (typeof obj === 'object' || typeof obj === 'function') ? 'object' : typeof obj; 3829 }; 3830 3831// helper functions 3832 3833 function lowerCase(s) { 3834 return (s || '').toLowerCase(); 3835 } 3836 3837 3838 3839 3840// expose transition object 3841 $.fn.cycle.transitions = { 3842 custom: { 3843 }, 3844 none: { 3845 before: function( opts, curr, next, fwd ) { 3846 opts.API.stackSlides( next, curr, fwd ); 3847 opts.cssBefore = { opacity: 1, visibility: 'visible', display: 'block' }; 3848 } 3849 }, 3850 fade: { 3851 before: function( opts, curr, next, fwd ) {
3852 var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {}; 3853 opts.API.stackSlides( curr, next, fwd ); 3854 opts.cssBefore = $.extend(css, { opacity: 0, visibility: 'visible', display: 'block' }); 3855 opts.animIn = { opacity: 1 }; 3856 opts.animOut = { opacity: 0 }; 3857 } 3858 }, 3859 fadeout: { 3860 before: function( opts , curr, next, fwd ) { 3861 var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {}; 3862 opts.API.stackSlides( curr, next, fwd ); 3863 opts.cssBefore = $.extend(css, { opacity: 1, visibility: 'visible', display: 'block' }); 3864 opts.animOut = { opacity: 0 }; 3865 } 3866 }, 3867 scrollHorz: { 3868 before: function( opts, curr, next, fwd ) { 3869 opts.API.stackSlides( curr, next, fwd ); 3870 var w = opts.container.css('overflow','hidden').width(); 3871 opts.cssBefore = { left: fwd ? w : - w, top: 0, opacity: 1, visibility: 'visible', display: 'block' }; 3872 opts.cssAfter = { zIndex: opts._maxZ - 2, left: 0 }; 3873 opts.animIn = { left: 0 }; 3874 opts.animOut = { left: fwd ? -w : w }; 3875 } 3876 } 3877 }; 3878 3879// @see: http://jquery.malsup.com/cycle2/api 3880 $.fn.cycle.defaults = { 3881 allowWrap: true, 3882 autoSelector: '.cycle-slideshow[data-cycle-auto-init!=false]', 3883 delay: 0, 3884 easing: null, 3885 fx: 'fade', 3886 hideNonActive: true, 3887 loop: 0, 3888 manualFx: undefined, 3889 manualSpeed: undefined, 3890 manualTrump: true, 3891 maxZ: 100, 3892 pauseOnHover: false, 3893 reverse: false, 3894 slideActiveClass: 'cycle-slide-active', 3895 slideClass: 'cycle-slide', 3896 slideCss: { position: 'absolute', top: 0, left: 0 }, 3897 slides: '> img', 3898 speed: 500, 3899 startingSlide: 0, 3900 sync: true, 3901 timeout: 4000, 3902 updateView: 0 3903 }; 3904 3905// automatically find and run slideshows 3906 $(document).ready(function() { 3907 $( $.fn.cycle.defaults.autoSelector ).cycle(); 3908 }); 3909 3910})(jQuery); 3911 3912/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20200917 */ 3913(function($) { 3914 "use strict"; 3915 3916 $.extend($.fn.cycle.defaults, { 3917 autoHeight: 0, // setting this option to false disables autoHeight logic 3918 autoHeightSpeed: 250, 3919 autoHeightEasing: null 3920 }); 3921 3922 $(document).on( 'cycle-initialized', function( e, opts ) { 3923 var autoHeight = opts.autoHeight; 3924 var t = $.fn.cycle.varType( autoHeight ); 3925 var resizeThrottle = null; 3926 var ratio; 3927 3928 if ( t !== 'string' && t !== 'number' ) 3929 return; 3930 3931 // bind events 3932 opts.container.on( 'cycle-slide-added cycle-slide-removed', initAutoHeight ); 3933 opts.container.on( 'cycle-destroyed', onDestroy ); 3934 3935 if ( autoHeight == 'container' ) { 3936 opts.container.on( 'cycle-before', onBefore ); 3937 } 3938 else if ( t === 'string' && /\d+\:\d+/.test( autoHeight ) ) { 3939 // use ratio 3940 ratio = autoHeight.match(/(\d+)\:(\d+)/); 3941 ratio = ratio[1] / ratio[2]; 3942 opts._autoHeightRatio = ratio; 3943 } 3944 3945 // if autoHeight is a number then we don't need to recalculate the sentinel 3946 // index on resize 3947 if ( t !== 'number' ) { 3948 // bind unique resize handler per slideshow (so it can be 'off-ed' in onDestroy) 3949 opts._autoHeightOnResize = function () { 3950 clearTimeout( resizeThrottle ); 3951 resizeThrottle = setTimeout( onResize, 50 ); 3952 }; 3953 3954 $(window).on( 'resize orientationchange', opts._autoHeightOnResize ); 3955 } 3956 3957 setTimeout( onResize, 30 ); 3958 3959 function onResize() { 3960 initAutoHeight( e, opts ); 3961 } 3962 }); 3963 3964 function initAutoHeight( e, opts ) { 3965 var clone, height, sentinelIndex; 3966 var autoHeight = opts.autoHeight; 3967 3968 if ( autoHeight == 'container' ) { 3969 height = $( opts.slides[ opts.currSlide ] ).outerHeight(); 3970 opts.container.height( height ); 3971 } 3972 else if ( opts._autoHeightRatio ) {
3973 opts.container.height( opts.container.width() / opts._autoHeightRatio ); 3974 } 3975 else if ( autoHeight === 'calc' || ( $.fn.cycle.varType( autoHeight ) == 'number' && autoHeight >= 0 ) ) { 3976 if ( autoHeight === 'calc' ) 3977 sentinelIndex = calcSentinelIndex( e, opts ); 3978 else if ( autoHeight >= opts.slides.length ) 3979 sentinelIndex = 0; 3980 else 3981 sentinelIndex = autoHeight; 3982 3983 // only recreate sentinel if index is different 3984 if ( sentinelIndex == opts._sentinelIndex ) 3985 return; 3986 3987 opts._sentinelIndex = sentinelIndex; 3988 if ( opts._sentinel ) 3989 opts._sentinel.remove(); 3990 3991 // clone existing slide as sentinel 3992 clone = $( opts.slides[ sentinelIndex ].cloneNode(true) ); 3993 3994 // #50; remove special attributes from cloned content 3995 clone.removeAttr( 'id name rel' ).find( '[id],[name],[rel]' ).removeAttr( 'id name rel' ); 3996 3997 clone.css({ 3998 position: 'static', 3999 visibility: 'hidden', 4000 display: 'block' 4001 }).prependTo( opts.container ).addClass('cycle-sentinel cycle-slide').removeClass('cycle-slide-active'); 4002 clone.find( '*' ).css( 'visibility', 'hidden' ); 4003 4004 opts._sentinel = clone; 4005 } 4006 } 4007 4008 function calcSentinelIndex( e, opts ) { 4009 var index = 0, max = -1; 4010 4011 // calculate tallest slide index 4012 opts.slides.each(function(i) { 4013 var h = $(this).height(); 4014 if ( h > max ) { 4015 max = h; 4016 index = i; 4017 } 4018 }); 4019 return index; 4020 } 4021 4022 function onBefore( e, opts, outgoing, incoming, forward ) { 4023 var h = $(incoming).outerHeight(); 4024 opts.container.animate( { height: h }, opts.autoHeightSpeed, opts.autoHeightEasing ); 4025 } 4026 4027 function onDestroy( e, opts ) { 4028 if ( opts._autoHeightOnResize ) { 4029 $(window).off( 'resize orientationchange', opts._autoHeightOnResize ); 4030 opts._autoHeightOnResize = null; 4031 } 4032 opts.container.off( 'cycle-slide-added cycle-slide-removed', initAutoHeight ); 4033 opts.container.off( 'cycle-destroyed', onDestroy ); 4034 opts.container.off( 'cycle-before', onBefore ); 4035 4036 if ( opts._sentinel ) { 4037 opts._sentinel.remove(); 4038 opts._sentinel = null; 4039 } 4040 } 4041 4042})(jQuery); 4043 4044/*! caption plugin for Cycle2; version: 20200917 */ 4045(function($) { 4046 "use strict"; 4047 4048 $.extend($.fn.cycle.defaults, { 4049 caption: '> .cycle-caption', 4050 captionTemplate: '{{slideNum}} / {{slideCount}}', 4051 overlay: '> .cycle-overlay', 4052 overlayTemplate: '<div>{{title}}</div><div>{{desc}}</div>', 4053 captionModule: 'caption' 4054 }); 4055 4056 $(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) { 4057 if ( opts.captionModule !== 'caption' ) 4058 return; 4059 var el; 4060 $.each(['caption','overlay'], function() { 4061 var name = this; 4062 var template = slideOpts[name+'Template']; 4063 var el = opts.API.getComponent( name ); 4064 if( el.length && template ) { 4065 el.html( opts.API.tmpl( template, slideOpts, opts, currSlide ) ); 4066 el.show(); 4067 } 4068 else { 4069 el.hide(); 4070 } 4071 }); 4072 }); 4073 4074 $(document).on( 'cycle-destroyed', function( e, opts ) { 4075 var el; 4076 $.each(['caption','overlay'], function() { 4077 var name = this, template = opts[name+'Template']; 4078 if ( opts[name] && template ) { 4079 el = opts.API.getComponent( 'caption' ); 4080 el.empty(); 4081 } 4082 }); 4083 }); 4084 4085})(jQuery); 4086 4087/*! command plugin for Cycle2; version: 20200917 */ 4088(function($) { 4089 "use strict"; 4090 4091 var c2 = $.fn.cycle; 4092 4093 $.fn.cycle = function( options ) { 4094 var cmd, cmdFn, opts; 4095 var args = $.makeArray( arguments ); 4096 4097 if ( c2.varType( options ) == 'number' ) { 4098 return this.cycle( 'goto', options ); 4099 } 4100 4101 if ( c2.varType( options ) == 'string' ) { 4102 return this.each(function() { 4103 var cmdArgs; 4104 cmd = options; 4105 opts = $(this).data('cycle.opts'); 4106 4107 if ( opts === undefined ) { 4108 c2.log('slideshow must be initialized before sending commands; "' + cmd + '" ignored'); 4109 return; 4110 } 4111 else { 4112 cmd = cmd == 'goto' ? 'jump' : cmd; // issue #3; change 'goto' to 'jump' internally 4113 cmdFn = opts.API[ cmd ]; 4114 if ( $.fn.cycle.varType( cmdFn )==='function') { 4115 cmdArgs = $.makeArray( args ); 4116 cmdArgs.shift(); 4117 return cmdFn.apply( opts.API, cmdArgs ); 4118 } 4119 else { 4120 c2.log( 'unknown command: ', cmd ); 4121 } 4122 } 4123 }); 4124 } 4125 else { 4126 return c2.apply( this, arguments ); 4127 } 4128 }; 4129 4130// copy props 4131 $.extend( $.fn.cycle, c2 ); 4132 4133 $.extend( c2.API, { 4134 next: function() { 4135 var opts = this.opts(); 4136 if ( opts.busy && ! opts.manualTrump ) 4137 return; 4138 4139 var count = opts.reverse ? -1 : 1; 4140 if ( opts.allowWrap === false && ( opts.currSlide + count ) >= opts.slideCount ) 4141 return; 4142 4143 opts.API.advanceSlide( count );
4144 opts.API.trigger('cycle-next', [ opts ]).log('cycle-next'); 4145 }, 4146 4147 prev: function() { 4148 var opts = this.opts(); 4149 if ( opts.busy && ! opts.manualTrump ) 4150 return; 4151 var count = opts.reverse ? 1 : -1; 4152 if ( opts.allowWrap === false && ( opts.currSlide + count ) < 0 ) 4153 return; 4154 4155 opts.API.advanceSlide( count ); 4156 opts.API.trigger('cycle-prev', [ opts ]).log('cycle-prev'); 4157 }, 4158 4159 destroy: function() { 4160 this.stop(); //#204 4161 4162 var opts = this.opts(); 4163 var clean = (this.varType( $._data ) ==='function') ? $._data : $.noop; // hack for #184 and #201 4164 clearTimeout(opts.timeoutId); 4165 opts.timeoutId = 0; 4166 opts.API.stop(); 4167 opts.API.trigger( 'cycle-destroyed', [ opts ] ).log('cycle-destroyed'); 4168 opts.container.removeData(); 4169 clean( opts.container[0], 'parsedAttrs', false ); 4170 4171 // #75; remove inline styles 4172 if ( ! opts.retainStylesOnDestroy ) { 4173 opts.container.removeAttr( 'style' ); 4174 opts.slides.removeAttr( 'style' ); 4175 opts.slides.removeClass( opts.slideActiveClass ); 4176 } 4177 opts.slides.each(function() { 4178 var slide = $(this); 4179 slide.removeData(); 4180 slide.removeClass( opts.slideClass ); 4181 clean( this, 'parsedAttrs', false ); 4182 }); 4183 }, 4184 4185 jump: function( index, fx ) { 4186 // go to the requested slide 4187 var fwd; 4188 var opts = this.opts(); 4189 if ( opts.busy && ! opts.manualTrump ) 4190 return; 4191 var num = parseInt( index, 10 ); 4192 if (isNaN(num) || num < 0 || num >= opts.slides.length) { 4193 opts.API.log('goto: invalid slide index: ' + num); 4194 return; 4195 } 4196 if (num == opts.currSlide) { 4197 opts.API.log('goto: skipping, already on slide', num); 4198 return; 4199 } 4200 opts.nextSlide = num; 4201 clearTimeout(opts.timeoutId); 4202 opts.timeoutId = 0; 4203 opts.API.log('goto: ', num, ' (zero-index)'); 4204 fwd = opts.currSlide < opts.nextSlide; 4205 opts._tempFx = fx; 4206 opts.API.prepareTx( true, fwd ); 4207 }, 4208 4209 stop: function() { 4210 var opts = this.opts(); 4211 var pauseObj = opts.container; 4212 clearTimeout(opts.timeoutId); 4213 opts.timeoutId = 0; 4214 opts.API.stopTransition(); 4215 if ( opts.pauseOnHover ) { 4216 if ( opts.pauseOnHover !== true ) 4217 pauseObj = $( opts.pauseOnHover ); 4218 pauseObj.off('mouseenter mouseleave'); 4219 } 4220 opts.API.trigger('cycle-stopped', [ opts ]).log('cycle-stopped'); 4221 }, 4222 4223 reinit: function() { 4224 var opts = this.opts(); 4225 opts.API.destroy(); 4226 opts.container.cycle(); 4227 }, 4228 4229 remove: function( index ) { 4230 var opts = this.opts(); 4231 var slide, slideToRemove, slides = [], slideNum = 1; 4232 for ( var i=0; i < opts.slides.length; i++ ) { 4233 slide = opts.slides[i]; 4234 if ( i == index ) { 4235 slideToRemove = slide; 4236 } 4237 else { 4238 slides.push( slide ); 4239 $( slide ).data('cycle.opts').slideNum = slideNum; 4240 slideNum++; 4241 } 4242 } 4243 if ( slideToRemove ) { 4244 opts.slides = $( slides ); 4245 opts.slideCount--; 4246 $( slideToRemove ).remove(); 4247 if (index == opts.currSlide) 4248 opts.API.advanceSlide( 1 ); 4249 else if ( index < opts.currSlide ) 4250 opts.currSlide--; 4251 else 4252 opts.currSlide++; 4253 4254 opts.API.trigger('cycle-slide-removed', [ opts, index, slideToRemove ]).log('
4254cycle-slide-removed'); 4255 opts.API.updateView(); 4256 } 4257 } 4258 4259 }); 4260 4261// listen for clicks on elements with data-cycle-cmd attribute 4262 $(document).on('click.cycle', '[data-cycle-cmd]', function(e) { 4263 // issue cycle command 4264 e.preventDefault(); 4265 var el = $(this); 4266 var command = el.data('cycle-cmd'); 4267 var context = el.data('cycle-context') || '.cycle-slideshow'; 4268 $(context).cycle(command, el.data('cycle-arg')); 4269 }); 4270 4271 4272})(jQuery); 4273 4274/*! hash plugin for Cycle2; version: 20200917 */ 4275(function($) { 4276 "use strict"; 4277 4278 $(document).on( 'cycle-pre-initialize', function( e, opts ) { 4279 onHashChange( opts, true ); 4280 4281 opts._onHashChange = function() { 4282 onHashChange( opts, false ); 4283 }; 4284 4285 $( window ).on( 'hashchange', opts._onHashChange); 4286 }); 4287 4288 $(document).on( 'cycle-update-view', function( e, opts, slideOpts ) { 4289 if ( slideOpts.hash && ( '#' + slideOpts.hash ) != window.location.hash ) { 4290 opts._hashFence = true; 4291 window.location.hash = slideOpts.hash; 4292 } 4293 }); 4294 4295 $(document).on( 'cycle-destroyed', function( e, opts) { 4296 if ( opts._onHashChange ) { 4297 $( window ).off( 'hashchange', opts._onHashChange ); 4298 } 4299 }); 4300 4301 function onHashChange( opts, setStartingSlide ) { 4302 var hash; 4303 if ( opts._hashFence ) { 4304 opts._hashFence = false; 4305 return; 4306 } 4307 4308 hash = window.location.hash.substring(1); 4309 4310 opts.slides.each(function(i) { 4311 if ( $(this).data( 'cycle-hash' ) == hash ) { 4312 if ( setStartingSlide === true ) { 4313 opts.startingSlide = i; 4314 } 4315 else { 4316 var fwd = opts.currSlide < i; 4317 opts.nextSlide = i; 4318 opts.API.prepareTx( true, fwd ); 4319 } 4320 return false; 4321 } 4322 }); 4323 } 4324 4325})(jQuery); 4326 4327/*! loader plugin for Cycle2; version: 20200917 */ 4328(function($) { 4329 "use strict"; 4330 4331 $.extend($.fn.cycle.defaults, { 4332 loader: false 4333 }); 4334 4335 $(document).on( 'cycle-bootstrap', function( e, opts ) { 4336 var addFn; 4337 4338 if ( !opts.loader ) 4339 return; 4340 4341 // override API.add for this slideshow 4342 addFn = opts.API.add; 4343 opts.API.add = add; 4344 4345 function add( slides, prepend ) { 4346 var slideArr = []; 4347 if ( $.fn.cycle.varType( slides ) == 'string' ) 4348 4349 // FIX: $.trim DEPRECATED in JQUERY 3.5+ 4350 // slides = $.trim( slides ); 4351 4352 slides = slides.trim(); 4353 4354 else if ( $.fn.cycle.varType( slides) === 'array' ) { 4355 for (var i=0; i < slides.length; i++ ) 4356 slides[i] = $(slides[i])[0]; 4357 } 4358 4359 slides = $( slides ); 4360 var slideCount = slides.length; 4361 4362 if ( ! slideCount ) 4363 return; 4364 4365 slides.css('visibility','hidden').appendTo('body').each(function(i) { // appendTo fixes #56 4366 var count = 0; 4367 var slide = $(this); 4368 var images = slide.is('img') ? slide : slide.find('img'); 4369 slide.data('index', i); 4370 // allow some images to be marked as unimportant (and filter out images w/o src value) 4371 images = images.filter(':not(.cycle-loader-ignore)').filter(':not([src=""])'); 4372 if ( ! images.length ) { 4373 --slideCount; 4374 slideArr.push( slide ); 4375 return; 4376 } 4377 4378 count = images.length; 4379 images.each(function() { 4380 // add images that are already loaded 4381 if ( this.complete ) { 4382 imageLoaded(); 4383 } 4384 else { 4385 // fix for jQuery 3.0 deprecate .load() function 4386 // jakeparis referenced this pull request on Jun 23, 2016 https://github.com/malsup/cycle2/pull/779 4387 // cycle2 & center incompatible with JQuery 3.0.0 #778 https://github.com/malsup/cycle2/issues/778 4388 $(this).on("load", function() { 4389 imageLoaded(); 4390 }).on("error", function() { 4391 if ( --count === 0 ) { 4392 // ignore this slide 4393 opts.API.log('slide skipped;
4393 img not loaded:', this.src); 4394 if ( --slideCount === 0 && opts.loader == 'wait') { 4395 addFn.apply( opts.API, [ slideArr, prepend ] ); 4396 } 4397 } 4398 }); 4399 } 4400 }); 4401 4402 function imageLoaded() { 4403 if ( --count === 0 ) { 4404 --slideCount; 4405 addSlide( slide ); 4406 } 4407 } 4408 }); 4409 4410 if ( slideCount ) 4411 opts.container.addClass('cycle-loading'); 4412 4413 4414 function addSlide( slide ) { 4415 var curr; 4416 if ( opts.loader == 'wait' ) { 4417 slideArr.push( slide ); 4418 if ( slideCount === 0 ) { 4419 // #59; sort slides into original markup order 4420 slideArr.sort( sorter ); 4421 addFn.apply( opts.API, [ slideArr, prepend ] ); 4422 opts.container.removeClass('cycle-loading'); 4423 } 4424 } 4425 else { 4426 curr = $(opts.slides[opts.currSlide]); 4427 addFn.apply( opts.API, [ slide, prepend ] ); 4428 curr.show(); 4429 opts.container.removeClass('cycle-loading'); 4430 } 4431 } 4432 4433 function sorter(a, b) { 4434 return a.data('index') - b.data('index'); 4435 } 4436 } 4437 }); 4438 4439})(jQuery); 4440 4441/*! pager plugin for Cycle2; version: 20200917 */ 4442(function($) { 4443 "use strict"; 4444 4445 $.extend($.fn.cycle.defaults, { 4446 pager: '> .cycle-pager', 4447 pagerActiveClass: 'cycle-pager-active', 4448 pagerEvent: 'click.cycle', 4449 pagerEventBubble: undefined, 4450 pagerTemplate: '<span>•</span>' 4451 }); 4452 4453 $(document).on( 'cycle-bootstrap', function( e, opts, API ) { 4454 // add method to API 4455 API.buildPagerLink = buildPagerLink; 4456 }); 4457 4458 $(document).on( 'cycle-slide-added', function( e, opts, slideOpts, slideAdded ) { 4459 if ( opts.pager ) { 4460 opts.API.buildPagerLink ( opts, slideOpts, slideAdded ); 4461 opts.API.page = page; 4462 } 4463 }); 4464 4465 $(document).on( 'cycle-slide-removed', function( e, opts, index, slideRemoved ) { 4466 if ( opts.pager ) { 4467 var pagers = opts.API.getComponent( 'pager' ); 4468 pagers.each(function() { 4469 var pager = $(this); 4470 $( pager.children()[index] ).remove(); 4471 }); 4472 } 4473 }); 4474 4475 $(document).on( 'cycle-update-view', function( e, opts, slideOpts ) { 4476 var pagers; 4477 4478 if ( opts.pager ) { 4479 pagers = opts.API.getComponent( 'pager' ); 4480 pagers.each(function() { 4481 $(this).children().removeClass( opts.pagerActiveClass ) 4482 .eq( opts.currSlide ).addClass( opts.pagerActiveClass ); 4483 }); 4484 } 4485 }); 4486 4487 $(document).on( 'cycle-destroyed', function( e, opts ) { 4488 var pager = opts.API.getComponent( 'pager' ); 4489 4490 if ( pager ) { 4491 pager.children().off( opts.pagerEvent ); // #202 4492 if ( opts.pagerTemplate ) 4493 pager.empty(); 4494 } 4495 }); 4496 4497 function buildPagerLink( opts, slideOpts, slide ) { 4498 var pagerLink; 4499 var pagers = opts.API.getComponent( 'pager' ); 4500 pagers.each(function() { 4501 var pager = $(this); 4502 if ( slideOpts.pagerTemplate ) { 4503 var markup = opts.API.tmpl( slideOpts.pagerTemplate, slideOpts, opts, slide[0] ); 4504 pagerLink = $( markup ).appendTo( pager ); 4505 } 4506 else { 4507 pagerLink = pager.children().eq( opts.slideCount - 1 ); 4508 } 4509 pagerLink.on( opts.pagerEvent, function(e) { 4510 if ( ! opts.pagerEventBubble ) 4511 e.preventDefault(); 4512 opts.API.page( pager, e.currentTarget); 4513 }); 4514 }); 4515 } 4516 4517 function page( pager, target ) { 4518 /*jshint validthis:true */ 4519 var opts = this.opts(); 4520 if ( opts.busy && ! opts.manualTrump ) 4521 return; 4522 4523 var index = pager.children().index( target ); 4524 var nextSlide = index; 4525 var fwd = opts.currSlide < nextSlide; 4526 if (opts.currSlide == nextSlide) { 4527 return; // no op, clicked pager for the currently displayed slide 4528 } 4529 opts.nextSlide = nextSlide; 4530 opts._tempFx = opts.pagerFx; 4531 opts.API.prepareTx( true, fwd ); 4532 opts.API.trigger('cycle-pager-activated', [opts, pager, target ]); 4533 } 4534 4535})(jQuery); 4536 4537/*! prevnext plugin for Cycle2; version: 20200917 */ 4538(function($) { 4539 "use strict"; 4540 4541 $.extend($.fn.cycle.defaults, { 4542 next: '> .cycle-next', 4543 nextEvent: 'click.cycle', 4544 disabledClass: 'disabled', 4545 prev: '> .cycle-prev', 4546 prevEvent: 'click.cycle', 4547 swipe: false 4548 }); 4549 4550 $(document).on( 'cycle-initialized', function( e, opts ) { 4551 opts.API.getComponent( 'next' ).on( opts.nextEvent, function(e) { 4552 e.preventDefault(); 4553 opts.API.next(); 4554 }); 4555 4556 opts.API.getComponent( 'prev' ).on( opts.prevEvent, function(e) { 4557 e.preventDefault(); 4558 opts.API.prev(); 4559 }); 4560 4561 if ( opts.swipe ) {
4562 var nextEvent = opts.swipeVert ? 'swipeUp.cycle' : 'swipeLeft.cycle swipeleft.cycle'; 4563 var prevEvent = opts.swipeVert ? 'swipeDown.cycle' : 'swipeRight.cycle swiperight.cycle'; 4564 opts.container.on( nextEvent, function(e) { 4565 opts._tempFx = opts.swipeFx; 4566 opts.API.next(); 4567 }); 4568 opts.container.on( prevEvent, function() { 4569 opts._tempFx = opts.swipeFx; 4570 opts.API.prev(); 4571 }); 4572 } 4573 }); 4574 4575 $(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) { 4576 if ( opts.allowWrap ) 4577 return; 4578 4579 var cls = opts.disabledClass; 4580 var next = opts.API.getComponent( 'next' ); 4581 var prev = opts.API.getComponent( 'prev' ); 4582 var prevBoundry = opts._prevBoundry || 0; 4583 var nextBoundry = (opts._nextBoundry !== undefined)?opts._nextBoundry:opts.slideCount - 1; 4584 4585 if ( opts.currSlide == nextBoundry ) 4586 next.addClass( cls ).prop( 'disabled', true ); 4587 else 4588 next.removeClass( cls ).prop( 'disabled', false ); 4589 4590 if ( opts.currSlide === prevBoundry ) 4591 prev.addClass( cls ).prop( 'disabled', true ); 4592 else 4593 prev.removeClass( cls ).prop( 'disabled', false ); 4594 }); 4595 4596 4597 $(document).on( 'cycle-destroyed', function( e, opts ) { 4598 opts.API.getComponent( 'prev' ).off( opts.nextEvent ); 4599 opts.API.getComponent( 'next' ).off( opts.prevEvent ); 4600 opts.container.off( 'swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle' ); 4601 }); 4602 4603})(jQuery); 4604 4605/*! progressive loader plugin for Cycle2; version: 20200917 */ 4606(function($) { 4607 "use strict"; 4608 4609 $.extend($.fn.cycle.defaults, { 4610 progressive: false 4611 }); 4612 4613 $(document).on( 'cycle-pre-initialize', function( e, opts ) { 4614 if ( !opts.progressive ) 4615 return; 4616 4617 var API = opts.API; 4618 var nextFn = API.next; 4619 var prevFn = API.prev; 4620 var prepareTxFn = API.prepareTx; 4621 var type = $.fn.cycle.varType( opts.progressive ); 4622 var slides, scriptEl; 4623 4624 if ( type == 'array' ) { 4625 slides = opts.progressive; 4626 } 4627 else if ($.fn.cycle.varType( opts.progressive ) === 'function' ) { 4628 slides = opts.progressive( opts ); 4629 } 4630 else if ( type == 'string' ) { 4631 scriptEl = $( opts.progressive ); 4632 4633 4634 // FIX: $.trim DEPRECATED in JQUERY 3.5+ 4635 // slides = $.trim( scriptEl.html() ); 4636 4637 slides = scriptEl.html().trim(); 4638 4639 if ( !slides ) 4640 return; 4641 // is it json array? 4642 if ( /^(\[)/.test( slides ) ) { 4643 try { 4644 slides = $.parseJSON( slides ); 4645 } 4646 catch(err) { 4647 API.log( 'error parsing progressive slides', err ); 4648 return; 4649 } 4650 } 4651 else { 4652 // plain text, split on delimeter 4653 slides = slides.split( new RegExp( scriptEl.data('cycle-split') || '\n') ); 4654 4655 // #95; look for empty slide 4656 if ( ! slides[ slides.length - 1 ] ) 4657 slides.pop(); 4658 } 4659 } 4660 4661 4662 4663 if ( prepareTxFn ) { 4664 API.prepareTx = function( manual, fwd ) { 4665 var index, slide; 4666 4667 if ( manual || slides.length === 0 ) { 4668 prepareTxFn.apply( opts.API, [ manual, fwd ] ); 4669 return; 4670 } 4671 4672 if ( fwd && opts.currSlide == ( opts.slideCount-1) ) { 4673 slide = slides[ 0 ]; 4674 slides = slides.slice( 1 ); 4675 opts.container.one('cycle-slide-added', function(e, opts ) { 4676 setTimeout(function() { 4677 opts.API.advanceSlide( 1 ); 4678 },50); 4679 }); 4680 opts.API.add( slide ); 4681 } 4682 else if ( !fwd && opts.currSlide === 0 ) { 4683 index = slides.length-1; 4684 slide = slides[ index ]; 4685 slides = slides.slice( 0, index ); 4686 opts.container.one('cycle-slide-added', function(e, opts ) { 4687 setTimeout(function() { 4688 opts.currSlide = 1; 4689 opts.API.advanceSlide( -1 ); 4690 },50); 4691 }); 4692 opts.API.add( slide, true ); 4693 } 4694 else { 4695 prepareTxFn.apply( opts.API, [ manual, fwd ] ); 4696 } 4697 }; 4698 } 4699 4700 if ( nextFn ) { 4701 API.next = function() { 4702 var opts = this.opts(); 4703 if ( slides.length && opts.currSlide == ( opts.slideCount - 1 ) ) { 4704 var slide = slides[ 0 ]; 4705 slides = slides.slice( 1 ); 4706 opts.container.one('cycle-slide-added', function(e, opts ) { 4707 nextFn.apply( opts.API ); 4708 opts.container.removeClass('cycle-loading'); 4709 }); 4710 opts.container.addClass('cycle-loading'); 4711 opts.API.add( slide ); 4712 } 4713 else { 4714 nextFn.apply( opts.API ); 4715 } 4716 }; 4717 } 4718 4719 if ( prevFn ) { 4720 API.prev = function() { 4721 var opts = this.opts(); 4722 if ( slides.length && opts.currSlide === 0 ) { 4723 var index = slides.length-1; 4724 var slide = slides[ index ]; 4725 slides = slides.slice( 0, index ); 4726 opts.container.one('cycle-slide-added', function(e, opts ) { 4727 opts.currSlide = 1; 4728 opts.API.advanceSlide( -1 ); 4729 opts.container.removeClass('cycle-loading'); 4730 }); 4731 opts.container.addClass('cycle-loading'); 4732 opts.API.add( slide, true ); 4733 } 4734 else { 4735 prevFn.apply( opts.API ); 4736 } 4737 }; 4738 } 4739 }); 4740 4741})(jQuery); 4742 4743/*! tmpl plugin for Cycle2; version: 20200917 */ 4744(function($) { 4745 "use strict"; 4746 4747 $.extend($.fn.cycle.defaults, { 4748 tmplRegex: '{{((.)?.*?)}}' 4749 }); 4750 4751 $.extend($.fn.cycle.API, { 4752 tmpl: function( str, opts /*, ... */) { 4753 var regex = new RegExp( opts.tmplRegex || $.fn.cycle.defaults.tmplRegex, 'g' ); 4754 var args = $.makeArray( arguments ); 4755 args.shift(); 4756 return str.replace(regex, function(_, str) { 4757 var i, j, obj, prop, names = str.split('.'); 4758 for (i=0; i < args.length; i++) { 4759 obj = args[i]; 4760 if ( ! obj ) 4761 continue; 4762 if (names.length > 1) { 4763 prop = obj; 4764 for (j=0; j < names.length; j++) { 4765 obj = prop; 4766 prop = prop[ names[j] ] || str; 4767 } 4768 } else { 4769 prop = obj[str]; 4770 } 4771 4772 if ($.fn.cycle.varType(prop) ==='function') 4773 return prop.apply(obj, args); 4774 if (prop !== undefined && prop !== null && prop != str) 4775 return prop; 4776 } 4777 return str; 4778 }); 4779 } 4780 }); 4781 4782})(jQuery); 4783 4784/*! swipe plugin for Cycle2; version: 20200917 */ 4785(function($) { 4786 "use strict"; 4787
4788// this script adds support for touch events. the logic is lifted from jQuery Mobile. 4789// if you have jQuery Mobile installed, you do NOT need this script 4790 4791 var supportTouch = 'ontouchend' in document; 4792 4793 $.event.special.swipe = $.event.special.swipe || { 4794 scrollSupressionThreshold: 10, // More than this horizontal displacement, and we will suppress scrolling. 4795 durationThreshold: 1000, // More time than this, and it isn't a swipe. 4796 horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this. 4797 verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this. 4798 4799 setup: function() { 4800 var $this = $( this ); 4801 4802 $this.bind( 'touchstart', function( event ) { 4803 var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event; 4804 var stop, start = { 4805 time: ( new Date() ).getTime(), 4806 coords: [ data.pageX, data.pageY ], 4807 origin: $( event.target ) 4808 }; 4809 4810 function moveHandler( event ) { 4811 if ( !start ) 4812 return; 4813 4814 var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event; 4815 4816 stop = { 4817 time: ( new Date() ).getTime(), 4818 coords: [ data.pageX, data.pageY ] 4819 }; 4820 4821 // prevent scrolling 4822 if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) { 4823 event.preventDefault(); 4824 } 4825 } 4826 4827 $this.bind( 'touchmove', moveHandler ) 4828 .one( 'touchend', function( event ) { 4829 $this.unbind( 'touchmove', moveHandler ); 4830 4831 if ( start && stop ) { 4832 if ( stop.time - start.time < $.event.special.swipe.durationThreshold && 4833 Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold && 4834 Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) { 4835 4836 start.origin.trigger( "swipe" ) 4837 .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" ); 4838 } 4839 } 4840 start = stop = undefined; 4841 }); 4842 }); 4843 } 4844 }; 4845 4846 $.event.special.swipeleft = $.event.special.swipeleft || { 4847 setup: function() { 4848 $( this ).bind( 'swipe', $.noop ); 4849 } 4850 }; 4851 $.event.special.swiperight = $.event.special.swiperight || $.event.special.swipeleft; 4852 4853})(jQuery); 4854 4855/* jQuery tubular plugin 4856|* by Sean McCambridge 4857|* http://www.seanmccambridge.com/tubular 4858|* version: 1.0 4859|* updated: October 1, 2012 4860|* since 2010 4861|* licensed under the MIT License 4862|* Enjoy. 4863|* 4864|* Thanks, 4865|* Sean */ 4866 4867;(function ($, window) { 4868 4869 // test for feature support and return if failure 4870 4871 // defaults 4872 var defaults = { 4873 ratio: 16/9, // usually either 4/3 or 16/9 -- tweak as needed 4874 videoId: 'ZCAnLxRvNNc', // toy robot in space is a good default, no? 4875 mute: true, 4876 repeat: true, 4877 width: $(window).width(), 4878 wrapperZIndex: 99, 4879 playButtonClass: 'tubular-play', 4880 pauseButtonClass: 'tubular-pause', 4881 muteButtonClass: 'tubular-mute', 4882 volumeUpClass: 'tubular-volume-up', 4883 volumeDownClass: 'tubular-volume-down', 4884 increaseVolumeBy: 10, 4885 start: 0 4886 }; 4887 4888 // methods 4889 4890 var tubular = function(node, options) { // should be called on the wrapper div 4891 var options = $.extend({}, defaults, options), 4892 $body = $('body') // cache body node 4893 $node = $(node); // cache wrapper node 4894 4895 // build container 4896 var tubularContainer = '<div id="tubular-container" style="overflow: hidden; position: fixed; z-index: 1; width: 100%; height: 100%"><div id="tubular-player" style="position: absolute"></div></div><div id="tubular-shield" style="width: 100%; height: 100%; z-index: 2; position: absolute; left: 0; top: 0;"></div>'; 4897 4898 // set up css prereq's, inject tubular container and set up wrapper defaults 4899 $('html,body').css({'width': '100%', 'height': '100%'}); 4900 $body.prepend(tubularContainer); 4901 $node.css({position: 'relative', 'z-index': options.wrapperZIndex}); 4902 4903 // set up iframe player, use global scope so YT api can talk 4904 window.player; 4905 window.onYouTubeIframeAPIReady = function() { 4906 player = new YT.Player('tubular-player', { 4907 width: options.width,
4908 height: Math.ceil(options.width / options.ratio), 4909 videoId: options.videoId, 4910 playerVars: { 4911 controls: 0, 4912 showinfo: 0, 4913 modestbranding: 1, 4914 wmode: 'transparent' 4915 }, 4916 events: { 4917 'onReady': onPlayerReady, 4918 'onStateChange': onPlayerStateChange 4919 } 4920 }); 4921 } 4922 4923 window.onPlayerReady = function(e) { 4924 resize(); 4925 if (options.mute) e.target.mute(); 4926 e.target.seekTo(options.start); 4927 e.target.playVideo(); 4928 } 4929 4930 window.onPlayerStateChange = function(state) { 4931 if (state.data === 0 && options.repeat) { // video ended and repeat option is set true 4932 player.seekTo(options.start); // restart 4933 } 4934 } 4935 4936 // resize handler updates width, height and offset of player after resize/init 4937 var resize = function() { 4938 var width = $(window).width(), 4939 pWidth, // player width, to be defined 4940 height = $(window).height(), 4941 pHeight, // player height, tbd 4942 $tubularPlayer = $('#tubular-player'); 4943 4944 // when screen aspect ratio differs from video, video must center and underlay one dimension 4945 4946 if (width / options.ratio < height) { // if new video height < window height (gap underneath) 4947 pWidth = Math.ceil(height * options.ratio); // get new player width 4948 $tubularPlayer.width(pWidth).height(height).css({left: (width - pWidth) / 2, top: 0}); // player width is greater, offset left; reset top 4949 } else { // new video width < window width (gap to right) 4950 pHeight = Math.ceil(width / options.ratio); // get new player height 4951 $tubularPlayer.width(width).height(pHeight).css({left: 0, top: (height - pHeight) / 2}); // player height is greater, offset top; reset left 4952 } 4953 4954 } 4955 4956 // events 4957 $(window).on('resize.tubular', function() { 4958 resize(); 4959 }) 4960 4961 $('body').on('click','.' + options.playButtonClass, function(e) { // play button 4962 e.preventDefault(); 4963 player.playVideo(); 4964 }).on('click', '.' + options.pauseButtonClass, function(e) { // pause button 4965 e.preventDefault(); 4966 player.pauseVideo(); 4967 }).on('click', '.' + options.muteButtonClass, function(e) { // mute button 4968 e.preventDefault(); 4969 (player.isMuted()) ? player.unMute() : player.mute(); 4970 }).on('click', '.' + options.volumeDownClass, function(e) { // volume down button 4971 e.preventDefault(); 4972 var currentVolume = player.getVolume(); 4973 if (currentVolume < options.increaseVolumeBy) currentVolume = options.increaseVolumeBy; 4974 player.setVolume(currentVolume - options.increaseVolumeBy); 4975 }).on('click', '.' + options.volumeUpClass, function(e) { // volume up button 4976 e.preventDefault(); 4977 if (player.isMuted()) player.unMute(); // if mute is on, unmute 4978 var currentVolume = player.getVolume(); 4979 if (currentVolume > 100 - options.increaseVolumeBy) currentVolume = 100 - options.increaseVolumeBy; 4980 player.setVolume(currentVolume + options.increaseVolumeBy); 4981 }) 4982 } 4983 4984 // load yt iframe js api 4985 4986 var tag = document.createElement('script'); 4987 tag.src = "https://www.youtube.com/iframe_api"; 4988 var firstScriptTag = document.getElementsByTagName('script')[0]; 4989 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 4990 4991 // create plugin 4992 4993 $.fn.tubular = function (options) { 4994 return this.each(function () { 4995 if (!$.data(this, 'tubular_instantiated')) { // let's only run one 4996 $.data(this, 'tubular_instantiated', 4997 tubular(this, options)); 4998 } 4999 }); 5000 } 5001 5002})(jQuery, window); 5003;(function (global, factory) { 5004 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 5005 typeof define === 'function' && define.amd ? define(factory) : 5006 global.moment = factory() 5007}(this, (function () { 'use strict'; 5008 5009 var hookCallback; 5010 5011 function hooks() { 5012 return hookCallback.apply(null, arguments); 5013 } 5014 5015 // This is done to register the method called with moment() 5016 // without creating circular dependencies. 5017 function setHookCallback(callback) { 5018 hookCallback = callback; 5019 } 5020 5021 function isArray(input) { 5022 return ( 5023 input instanceof Array || 5024 Object.prototype.toString.call(input) === '[object Array]' 5025 ); 5026 } 5027 5028 function isObject(input) { 5029 // IE8 will treat undefined and null as object if it wasn't for 5030 // input != null 5031 return ( 5032 input != null && 5033 Object.prototype.toString.call(input) === '[object Object]' 5034 ); 5035 } 5036 5037 function hasOwnProp(a, b) { 5038 return Object.prototype.hasOwnProperty.call(a, b); 5039 } 5040 5041 function isObjectEmpty(obj) { 5042 if (Object.getOwnPropertyNames) { 5043 return Object.getOwnPropertyNames(obj).length === 0; 5044 } else { 5045 var k; 5046 for (k in obj) { 5047 if (hasOwnProp(obj, k)) { 5048 return false;
vendor: 11,478 bytes, lines 5049-5451
5049 } 5050 } 5051 return true; 5052 } 5053 } 5054 5055 function isUndefined(input) { 5056 return input === void 0; 5057 } 5058 5059 function isNumber(input) { 5060 return ( 5061 typeof input === 'number' || 5062 Object.prototype.toString.call(input) === '[object Number]' 5063 ); 5064 } 5065 5066 function isDate(input) { 5067 return ( 5068 input instanceof Date || 5069 Object.prototype.toString.call(input) === '[object Date]' 5070 ); 5071 } 5072 5073 function map(arr, fn) { 5074 var res = [], 5075 i, 5076 arrLen = arr.length; 5077 for (i = 0; i < arrLen; ++i) { 5078 res.push(fn(arr[i], i)); 5079 } 5080 return res; 5081 } 5082 5083 function extend(a, b) { 5084 for (var i in b) { 5085 if (hasOwnProp(b, i)) { 5086 a[i] = b[i]; 5087 } 5088 } 5089 5090 if (hasOwnProp(b, 'toString')) { 5091 a.toString = b.toString; 5092 } 5093 5094 if (hasOwnProp(b, 'valueOf')) { 5095 a.valueOf = b.valueOf; 5096 } 5097 5098 return a; 5099 } 5100 5101 function createUTC(input, format, locale, strict) { 5102 return createLocalOrUTC(input, format, locale, strict, true).utc(); 5103 } 5104 5105 function defaultParsingFlags() { 5106 // We need to deep clone this object. 5107 return { 5108 empty: false, 5109 unusedTokens: [], 5110 unusedInput: [], 5111 overflow: -2, 5112 charsLeftOver: 0, 5113 nullInput: false, 5114 invalidEra: null, 5115 invalidMonth: null, 5116 invalidFormat: false, 5117 userInvalidated: false, 5118 iso: false, 5119 parsedDateParts: [], 5120 era: null, 5121 meridiem: null, 5122 rfc2822: false, 5123 weekdayMismatch: false, 5124 }; 5125 } 5126 5127 function getParsingFlags(m) { 5128 if (m._pf == null) { 5129 m._pf = defaultParsingFlags(); 5130 } 5131 return m._pf; 5132 } 5133 5134 var some; 5135 if (Array.prototype.some) { 5136 some = Array.prototype.some; 5137 } else { 5138 some = function (fun) { 5139 var t = Object(this), 5140 len = t.length >>> 0, 5141 i; 5142 5143 for (i = 0; i < len; i++) { 5144 if (i in t && fun.call(this, t[i], i, t)) { 5145 return true; 5146 } 5147 } 5148 5149 return false; 5150 }; 5151 } 5152 5153 function isValid(m) { 5154 if (m._isValid == null) { 5155 var flags = getParsingFlags(m), 5156 parsedParts = some.call(flags.parsedDateParts, function (i) { 5157 return i != null; 5158 }), 5159 isNowValid = 5160 !isNaN(m._d.getTime()) && 5161 flags.overflow < 0 && 5162 !flags.empty && 5163 !flags.invalidEra && 5164 !flags.invalidMonth && 5165 !flags.invalidWeekday && 5166 !flags.weekdayMismatch && 5167 !flags.nullInput && 5168 !flags.invalidFormat && 5169 !flags.userInvalidated && 5170 (!flags.meridiem || (flags.meridiem && parsedParts)); 5171 5172 if (m._strict) { 5173 isNowValid = 5174 isNowValid && 5175 flags.charsLeftOver === 0 && 5176 flags.unusedTokens.length === 0 && 5177 flags.bigHour === undefined; 5178 } 5179 5180 if (Object.isFrozen == null || !Object.isFrozen(m)) { 5181 m._isValid = isNowValid; 5182 } else { 5183 return isNowValid; 5184 } 5185 } 5186 return m._isValid; 5187 } 5188 5189 function createInvalid(flags) { 5190 var m = createUTC(NaN); 5191 if (flags != null) { 5192 extend(getParsingFlags(m), flags); 5193 } else { 5194 getParsingFlags(m).userInvalidated = true; 5195 } 5196 5197 return m; 5198 } 5199 5200 // Plugins that add properties should also add the key here (null value), 5201 // so we can properly clone ourselves. 5202 var momentProperties = (hooks.momentProperties = []), 5203 updateInProgress = false; 5204 5205 function copyConfig(to, from) { 5206 var i, 5207 prop, 5208 val, 5209 momentPropertiesLen = momentProperties.length; 5210 5211 if (!isUndefined(from._isAMomentObject)) { 5212 to._isAMomentObject = from._isAMomentObject; 5213 } 5214 if (!isUndefined(from._i)) { 5215 to._i = from._i; 5216 } 5217 if (!isUndefined(from._f)) { 5218 to._f = from._f; 5219 } 5220 if (!isUndefined(from._l)) { 5221 to._l = from._l; 5222 } 5223 if (!isUndefined(from._strict)) { 5224 to._strict = from._strict; 5225 } 5226 if (!isUndefined(from._tzm)) { 5227 to._tzm = from._tzm; 5228 } 5229 if (!isUndefined(from._isUTC)) { 5230 to._isUTC = from._isUTC; 5231 } 5232 if (!isUndefined(from._offset)) { 5233 to._offset = from._offset; 5234 } 5235 if (!isUndefined(from._pf)) { 5236 to._pf = getParsingFlags(from); 5237 } 5238 if (!isUndefined(from._locale)) { 5239 to._locale = from._locale; 5240 } 5241 5242 if (momentPropertiesLen > 0) { 5243 for (i = 0; i < momentPropertiesLen; i++) { 5244 prop = momentProperties[i]; 5245 val = from[prop]; 5246 if (!isUndefined(val)) { 5247 to[prop] = val; 5248 } 5249 } 5250 } 5251 5252 return to; 5253 } 5254 5255 // Moment prototype object 5256 function Moment(config) { 5257 copyConfig(this, config); 5258 this._d = new Date(config._d != null ? config._d.getTime() : NaN); 5259 if (!this.isValid()) { 5260 this._d = new Date(NaN); 5261 } 5262 // Prevent infinite loop in case updateOffset creates new moment 5263 // objects. 5264 if (updateInProgress === false) { 5265 updateInProgress = true; 5266 hooks.updateOffset(this); 5267 updateInProgress = false; 5268 } 5269 } 5270 5271 function isMoment(obj) { 5272 return ( 5273 obj instanceof Moment || (obj != null && obj._isAMomentObject != null) 5274 ); 5275 } 5276 5277 function warn(msg) { 5278 if ( 5279 hooks.suppressDeprecationWarnings === false && 5280 typeof console !== 'undefined' && 5281 console.warn 5282 ) { 5283 console.warn('Deprecation warning: ' + msg); 5284 } 5285 } 5286 5287 function deprecate(msg, fn) { 5288 var firstTime = true; 5289 5290 return extend(function () { 5291 if (hooks.deprecationHandler != null) { 5292 hooks.deprecationHandler(null, msg); 5293 } 5294 if (firstTime) { 5295 var args = [], 5296 arg, 5297 i, 5298 key, 5299 argLen = arguments.length; 5300 for (i = 0; i < argLen; i++) { 5301 arg = ''; 5302 if (typeof arguments[i] === 'object') { 5303 arg += '\n[' + i + '] '; 5304 for (key in arguments[0]) { 5305 if (hasOwnProp(arguments[0], key)) { 5306 arg += key + ': ' + arguments[0][key] + ', '; 5307 } 5308 } 5309 arg = arg.slice(0, -2); // Remove trailing comma and space 5310 } else { 5311 arg = arguments[i]; 5312 } 5313 args.push(arg); 5314 } 5315 warn( 5316 msg + 5317 '\nArguments: ' + 5318 Array.prototype.slice.call(args).join('') + 5319 '\n' + 5320 new Error().stack 5321 ); 5322 firstTime = false; 5323 } 5324 return fn.apply(this, arguments); 5325 }, fn); 5326 } 5327 5328 var deprecations = {}; 5329 5330 function deprecateSimple(name, msg) { 5331 if (hooks.deprecationHandler != null) { 5332 hooks.deprecationHandler(name, msg); 5333 } 5334 if (!deprecations[name]) { 5335 warn(msg); 5336 deprecations[name] = true; 5337 } 5338 } 5339 5340 hooks.suppressDeprecationWarnings = false; 5341 hooks.deprecationHandler = null; 5342 5343 function isFunction(input) { 5344 return ( 5345 (typeof Function !== 'undefined' && input instanceof Function) || 5346 Object.prototype.toString.call(input) === '[object Function]' 5347 ); 5348 } 5349 5350 function set(config) { 5351 var prop, i; 5352 for (i in config) { 5353 if (hasOwnProp(config, i)) { 5354 prop = config[i]; 5355 if (isFunction(prop)) { 5356 this[i] = prop; 5357 } else { 5358 this['_' + i] = prop; 5359 } 5360 } 5361 } 5362 this._config = config; 5363 // Lenient ordinal parsing accepts just a number in addition to 5364 // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. 5365 // TODO: Remove "ordinalParse" fallback in next major release. 5366 this._dayOfMonthOrdinalParseLenient = new RegExp( 5367 (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + 5368 '|' + 5369 /\d{1,2}/.source 5370 ); 5371 } 5372 5373 function mergeConfigs(parentConfig, childConfig) { 5374 var res = extend({}, parentConfig), 5375 prop; 5376 for (prop in childConfig) { 5377 if (hasOwnProp(childConfig, prop)) { 5378 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { 5379 res[prop] = {}; 5380 extend(res[prop], parentConfig[prop]); 5381 extend(res[prop], childConfig[prop]); 5382 } else if (childConfig[prop] != null) { 5383 res[prop] = childConfig[prop]; 5384 } else { 5385 delete res[prop]; 5386 } 5387 } 5388 } 5389 for (prop in parentConfig) { 5390 if ( 5391 hasOwnProp(parentConfig, prop) && 5392 !hasOwnProp(childConfig, prop) && 5393 isObject(parentConfig[prop]) 5394 ) { 5395 // make sure changes to properties don't modify parent config 5396 res[prop] = extend({}, res[prop]); 5397 } 5398 } 5399 return res; 5400 } 5401 5402 function Locale(config) { 5403 if (config != null) { 5404 this.set(config); 5405 } 5406 } 5407 5408 var keys; 5409 5410 if (Object.keys) { 5411 keys = Object.keys; 5412 } else { 5413 keys = function (obj) { 5414 var i, 5415 res = []; 5416 for (i in obj) { 5417 if (hasOwnProp(obj, i)) { 5418 res.push(i); 5419 } 5420 } 5421 return res; 5422 }; 5423 } 5424 5425 var defaultCalendar = { 5426 sameDay: '[Today at] LT', 5427 nextDay: '[Tomorrow at] LT', 5428 nextWeek: 'dddd [at] LT', 5429 lastDay: '[Yesterday at] LT', 5430 lastWeek: '[Last] dddd [at] LT', 5431 sameElse: 'L', 5432 }; 5433 5434 function calendar(key, mom, now) { 5435 var output = this._calendar[key] || this._calendar['sameElse']; 5436 return isFunction(output) ? output.call(mom, now) : output; 5437 } 5438 5439 function zeroFill(number, targetLength, forceSign) { 5440 var absNumber = '' + Math.abs(number), 5441 zerosToFill = targetLength - absNumber.length, 5442 sign = number >= 0; 5443 return ( 5444 (sign ? (forceSign ? '+' : '') : '-') + 5445 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + 5446 absNumber 5447 ); 5448 } 5449 5450 var formattingTokens = 5451
vendor: 8,563 bytes, lines 5451-5755
5451 /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, 5452 localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, 5453 formatFunctions = {}, 5454 formatTokenFunctions = {}; 5455 5456 // token: 'M' 5457 // padded: ['MM', 2] 5458 // ordinal: 'Mo' 5459 // callback: function () { this.month() + 1 } 5460 function addFormatToken(token, padded, ordinal, callback) { 5461 var func = callback; 5462 if (typeof callback === 'string') { 5463 func = function () { 5464 return this[callback](); 5465 }; 5466 } 5467 if (token) { 5468 formatTokenFunctions[token] = func; 5469 } 5470 if (padded) { 5471 formatTokenFunctions[padded[0]] = function () { 5472 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 5473 }; 5474 } 5475 if (ordinal) { 5476 formatTokenFunctions[ordinal] = function () { 5477 return this.localeData().ordinal( 5478 func.apply(this, arguments), 5479 token 5480 ); 5481 }; 5482 } 5483 } 5484 5485 function removeFormattingTokens(input) { 5486 if (input.match(/\[[\s\S]/)) { 5487 return input.replace(/^\[|\]$/g, ''); 5488 } 5489 return input.replace(/\\/g, ''); 5490 } 5491 5492 function makeFormatFunction(format) { 5493 var array = format.match(formattingTokens), 5494 i, 5495 length; 5496 5497 for (i = 0, length = array.length; i < length; i++) { 5498 if (formatTokenFunctions[array[i]]) { 5499 array[i] = formatTokenFunctions[array[i]]; 5500 } else { 5501 array[i] = removeFormattingTokens(array[i]); 5502 } 5503 } 5504 5505 return function (mom) { 5506 var output = '', 5507 i; 5508 for (i = 0; i < length; i++) { 5509 output += isFunction(array[i]) 5510 ? array[i].call(mom, format) 5511 : array[i]; 5512 } 5513 return output; 5514 }; 5515 } 5516 5517 // format date using native date object 5518 function formatMoment(m, format) { 5519 if (!m.isValid()) { 5520 return m.localeData().invalidDate(); 5521 } 5522 5523 format = expandFormat(format, m.localeData()); 5524 formatFunctions[format] = 5525 formatFunctions[format] || makeFormatFunction(format); 5526 5527 return formatFunctions[format](m); 5528 } 5529 5530 function expandFormat(format, locale) { 5531 var i = 5; 5532 5533 function replaceLongDateFormatTokens(input) { 5534 return locale.longDateFormat(input) || input; 5535 } 5536 5537 localFormattingTokens.lastIndex = 0; 5538 while (i >= 0 && localFormattingTokens.test(format)) { 5539 format = format.replace( 5540 localFormattingTokens, 5541 replaceLongDateFormatTokens 5542 ); 5543 localFormattingTokens.lastIndex = 0; 5544 i -= 1; 5545 } 5546 5547 return format; 5548 } 5549 5550 var defaultLongDateFormat = { 5551 LTS: 'h:mm:ss A', 5552 LT: 'h:mm A', 5553 L: 'MM/DD/YYYY', 5554 LL: 'MMMM D, YYYY', 5555 LLL: 'MMMM D, YYYY h:mm A', 5556 LLLL: 'dddd, MMMM D, YYYY h:mm A', 5557 }; 5558 5559 function longDateFormat(key) { 5560 var format = this._longDateFormat[key], 5561 formatUpper = this._longDateFormat[key.toUpperCase()]; 5562 5563 if (format || !formatUpper) { 5564 return format; 5565 } 5566 5567 this._longDateFormat[key] = formatUpper 5568 .match(formattingTokens) 5569 .map(function (tok) { 5570 if ( 5571 tok === 'MMMM' || 5572 tok === 'MM' || 5573 tok === 'DD' || 5574 tok === 'dddd' 5575 ) { 5576 return tok.slice(1); 5577 } 5578 return tok; 5579 }) 5580 .join(''); 5581 5582 return this._longDateFormat[key]; 5583 } 5584 5585 var defaultInvalidDate = 'Invalid date'; 5586 5587 function invalidDate() { 5588 return this._invalidDate; 5589 } 5590 5591 var defaultOrdinal = '%d', 5592 defaultDayOfMonthOrdinalParse = /\d{1,2}/; 5593 5594 function ordinal(number) { 5595 return this._ordinal.replace('%d', number); 5596 } 5597 5598 var defaultRelativeTime = { 5599 future: 'in %s', 5600 past: '%s ago', 5601 s: 'a few seconds', 5602 ss: '%d seconds', 5603 m: 'a minute', 5604 mm: '%d minutes', 5605 h: 'an hour', 5606 hh: '%d hours', 5607 d: 'a day', 5608 dd: '%d days', 5609 w: 'a week', 5610 ww: '%d weeks', 5611 M: 'a month', 5612 MM: '%d months', 5613 y: 'a year', 5614 yy: '%d years', 5615 }; 5616 5617 function relativeTime(number, withoutSuffix, string, isFuture) { 5618 var output = this._relativeTime[string]; 5619 return isFunction(output) 5620 ? output(number, withoutSuffix, string, isFuture) 5621 : output.replace(/%d/i, number); 5622 } 5623 5624 function pastFuture(diff, output) { 5625 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 5626 return isFunction(format) ? format(output) : format.replace(/%s/i, output); 5627 } 5628 5629 var aliases = {}; 5630 5631 function addUnitAlias(unit, shorthand) { 5632 var lowerCase = unit.toLowerCase(); 5633 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 5634 } 5635 5636 function normalizeUnits(units) { 5637 return typeof units === 'string' 5638 ? aliases[units] || aliases[units.toLowerCase()] 5639 : undefined; 5640 } 5641 5642 function normalizeObjectUnits(inputObject) { 5643 var normalizedInput = {}, 5644 normalizedProp, 5645 prop; 5646 5647 for (prop in inputObject) { 5648 if (hasOwnProp(inputObject, prop)) { 5649 normalizedProp = normalizeUnits(prop); 5650 if (normalizedProp) { 5651 normalizedInput[normalizedProp] = inputObject[prop]; 5652 } 5653 } 5654 } 5655 5656 return normalizedInput; 5657 } 5658 5659 var priorities = {}; 5660 5661 function addUnitPriority(unit, priority) { 5662 priorities[unit] = priority; 5663 } 5664 5665 function getPrioritizedUnits(unitsObj) { 5666 var units = [], 5667 u; 5668 for (u in unitsObj) { 5669 if (hasOwnProp(unitsObj, u)) { 5670 units.push({ unit: u, priority: priorities[u] }); 5671 } 5672 } 5673 units.sort(function (a, b) { 5674 return a.priority - b.priority; 5675 }); 5676 return units; 5677 } 5678 5679 function isLeapYear(year) { 5680 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; 5681 } 5682 5683 function absFloor(number) { 5684 if (number < 0) { 5685 // -0 -> 0 5686 return Math.ceil(number) || 0; 5687 } else { 5688 return Math.floor(number); 5689 } 5690 } 5691 5692 function toInt(argumentForCoercion) { 5693 var coercedNumber = +argumentForCoercion, 5694 value = 0; 5695 5696 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 5697 value = absFloor(coercedNumber); 5698 } 5699 5700 return value; 5701 } 5702 5703 function makeGetSet(unit, keepTime) { 5704 return function (value) { 5705 if (value != null) { 5706 set$1(this, unit, value); 5707 hooks.updateOffset(this, keepTime); 5708 return this; 5709 } else { 5710 return get(this, unit); 5711 } 5712 }; 5713 } 5714 5715 function get(mom, unit) { 5716 return mom.isValid() 5717 ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() 5718 : NaN; 5719 } 5720 5721 function set$1(mom, unit, value) { 5722 if (mom.isValid() && !isNaN(value)) { 5723 if ( 5724 unit === 'FullYear' && 5725 isLeapYear(mom.year()) && 5726 mom.month() === 1 && 5727 mom.date() === 29 5728 ) { 5729 value = toInt(value); 5730 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( 5731 value, 5732 mom.month(), 5733 daysInMonth(value, mom.month()) 5734 ); 5735 } else { 5736 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 5737 } 5738 } 5739 } 5740 5741 // MOMENTS 5742 5743 function stringGet(units) { 5744 units = normalizeUnits(units); 5745 if (isFunction(this[units])) { 5746 return this[units](); 5747 } 5748 return this; 5749 } 5750 5751 function stringSet(units, value) { 5752 if (typeof units === 'object') { 5753 units = normalizeObjectUnits(units); 5754 var prioritized = getPrioritizedUnits(units), 5755 i
vendor: 7,151 bytes, lines 5755-5988
5755, 5756 prioritizedLen = prioritized.length; 5757 for (i = 0; i < prioritizedLen; i++) { 5758 this[prioritized[i].unit](units[prioritized[i].unit]); 5759 } 5760 } else { 5761 units = normalizeUnits(units); 5762 if (isFunction(this[units])) { 5763 return this[units](value); 5764 } 5765 } 5766 return this; 5767 } 5768 5769 var match1 = /\d/, // 0 - 9 5770 match2 = /\d\d/, // 00 - 99 5771 match3 = /\d{3}/, // 000 - 999 5772 match4 = /\d{4}/, // 0000 - 9999 5773 match6 = /[+-]?\d{6}/, // -999999 - 999999 5774 match1to2 = /\d\d?/, // 0 - 99 5775 match3to4 = /\d\d\d\d?/, // 999 - 9999 5776 match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 5777 match1to3 = /\d{1,3}/, // 0 - 999 5778 match1to4 = /\d{1,4}/, // 0 - 9999 5779 match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 5780 matchUnsigned = /\d+/, // 0 - inf 5781 matchSigned = /[+-]?\d+/, // -inf - inf 5782 matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z 5783 matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z 5784 matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 5785 // any word (or two) characters or numbers including two/three word month in arabic. 5786 // includes scottish gaelic two word and hyphenated months 5787 matchWord = 5788 /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, 5789 regexes; 5790 5791 regexes = {}; 5792 5793 function addRegexToken(token, regex, strictRegex) { 5794 regexes[token] = isFunction(regex) 5795 ? regex 5796 : function (isStrict, localeData) { 5797 return isStrict && strictRegex ? strictRegex : regex; 5798 }; 5799 } 5800 5801 function getParseRegexForToken(token, config) { 5802 if (!hasOwnProp(regexes, token)) { 5803 return new RegExp(unescapeFormat(token)); 5804 } 5805 5806 return regexes[token](config._strict, config._locale); 5807 } 5808 5809 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 5810 function unescapeFormat(s) { 5811 return regexEscape( 5812 s 5813 .replace('\\', '') 5814 .replace( 5815 /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, 5816 function (matched, p1, p2, p3, p4) { 5817 return p1 || p2 || p3 || p4; 5818 } 5819 ) 5820 ); 5821 } 5822 5823 function regexEscape(s) { 5824 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 5825 } 5826 5827 var tokens = {}; 5828 5829 function addParseToken(token, callback) { 5830 var i, 5831 func = callback, 5832 tokenLen; 5833 if (typeof token === 'string') { 5834 token = [token]; 5835 } 5836 if (isNumber(callback)) { 5837 func = function (input, array) { 5838 array[callback] = toInt(input); 5839 }; 5840 } 5841 tokenLen = token.length; 5842 for (i = 0; i < tokenLen; i++) { 5843 tokens[token[i]] = func; 5844 } 5845 } 5846 5847 function addWeekParseToken(token, callback) { 5848 addParseToken(token, function (input, array, config, token) { 5849 config._w = config._w || {}; 5850 callback(input, config._w, config, token); 5851 }); 5852 } 5853 5854 function addTimeToArrayFromToken(token, input, config) { 5855 if (input != null && hasOwnProp(tokens, token)) { 5856 tokens[token](input, config._a, config, token); 5857 } 5858 } 5859 5860 var YEAR = 0, 5861 MONTH = 1, 5862 DATE = 2, 5863 HOUR = 3, 5864 MINUTE = 4, 5865 SECOND = 5, 5866 MILLISECOND = 6, 5867 WEEK = 7, 5868 WEEKDAY = 8; 5869 5870 function mod(n, x) { 5871 return ((n % x) + x) % x; 5872 } 5873 5874 var indexOf; 5875 5876 if (Array.prototype.indexOf) { 5877 indexOf = Array.prototype.indexOf; 5878 } else { 5879 indexOf = function (o) { 5880 // I know 5881 var i; 5882 for (i = 0; i < this.length; ++i) { 5883 if (this[i] === o) { 5884 return i; 5885 } 5886 } 5887 return -1; 5888 }; 5889 } 5890 5891 function daysInMonth(year, month) { 5892 if (isNaN(year) || isNaN(month)) { 5893 return NaN; 5894 } 5895 var modMonth = mod(month, 12); 5896 year += (month - modMonth) / 12; 5897 return modMonth === 1 5898 ? isLeapYear(year) 5899 ? 29 5900 : 28 5901 : 31 - ((modMonth % 7) % 2); 5902 } 5903 5904 // FORMATTING 5905 5906 addFormatToken('M', ['MM', 2], 'Mo', function () { 5907 return this.month() + 1; 5908 }); 5909 5910 addFormatToken('MMM', 0, 0, function (format) { 5911 return this.localeData().monthsShort(this, format); 5912 }); 5913 5914 addFormatToken('MMMM', 0, 0, function (format) { 5915 return this.localeData().months(this, format); 5916 }); 5917 5918 // ALIASES 5919 5920 addUnitAlias('month', 'M'); 5921 5922 // PRIORITY 5923 5924 addUnitPriority('month', 8); 5925 5926 // PARSING 5927 5928 addRegexToken('M', match1to2); 5929 addRegexToken('MM', match1to2, match2); 5930 addRegexToken('MMM', function (isStrict, locale) { 5931 return locale.monthsShortRegex(isStrict); 5932 }); 5933 addRegexToken('MMMM', function (isStrict, locale) { 5934 return locale.monthsRegex(isStrict); 5935 }); 5936 5937 addParseToken(['M', 'MM'], function (input, array) { 5938 array[MONTH] = toInt(input) - 1; 5939 }); 5940 5941 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { 5942 var month = config._locale.monthsParse(input, token, config._strict); 5943 // if we didn't find a month name, mark the date as invalid. 5944 if (month != null) { 5945 array[MONTH] = month; 5946 } else { 5947 getParsingFlags(config).invalidMonth = input; 5948 } 5949 }); 5950 5951 // LOCALES 5952 5953 var defaultLocaleMonths = 5954 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 5955 '_' 5956 ), 5957 defaultLocaleMonthsShort = 5958 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 5959 MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, 5960 defaultMonthsShortRegex = matchWord, 5961 defaultMonthsRegex = matchWord; 5962 5963 function localeMonths(m, format) { 5964 if (!m) { 5965 return isArray(this._months) 5966 ? this._months 5967 : this._months['standalone']; 5968 } 5969 return isArray(this._months) 5970 ? this._months[m.month()] 5971 : this._months[ 5972 (this._months.isFormat || MONTHS_IN_FORMAT).test(format) 5973 ? 'format' 5974 : 'standalone' 5975 ][m.month()]; 5976 } 5977 5978 function localeMonthsShort(m, format) { 5979 if (!m) { 5980 return isArray(this._monthsShort) 5981 ? this._monthsShort 5982 : this._monthsShort['standalone']; 5983 } 5984 return isArray(this._monthsShort) 5985 ? this._monthsShort[m.month()] 5986 : this._monthsShort[ 5987 MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' 5988
vendor: 12,759 bytes, lines 5988-6400
5988 ][m.month()]; 5989 } 5990 5991 function handleStrictParse(monthName, format, strict) { 5992 var i, 5993 ii, 5994 mom, 5995 llc = monthName.toLocaleLowerCase(); 5996 if (!this._monthsParse) { 5997 // this is not used 5998 this._monthsParse = []; 5999 this._longMonthsParse = []; 6000 this._shortMonthsParse = []; 6001 for (i = 0; i < 12; ++i) { 6002 mom = createUTC([2000, i]); 6003 this._shortMonthsParse[i] = this.monthsShort( 6004 mom, 6005 '' 6006 ).toLocaleLowerCase(); 6007 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); 6008 } 6009 } 6010 6011 if (strict) { 6012 if (format === 'MMM') { 6013 ii = indexOf.call(this._shortMonthsParse, llc); 6014 return ii !== -1 ? ii : null; 6015 } else { 6016 ii = indexOf.call(this._longMonthsParse, llc); 6017 return ii !== -1 ? ii : null; 6018 } 6019 } else { 6020 if (format === 'MMM') { 6021 ii = indexOf.call(this._shortMonthsParse, llc); 6022 if (ii !== -1) { 6023 return ii; 6024 } 6025 ii = indexOf.call(this._longMonthsParse, llc); 6026 return ii !== -1 ? ii : null; 6027 } else { 6028 ii = indexOf.call(this._longMonthsParse, llc); 6029 if (ii !== -1) { 6030 return ii; 6031 } 6032 ii = indexOf.call(this._shortMonthsParse, llc); 6033 return ii !== -1 ? ii : null; 6034 } 6035 } 6036 } 6037 6038 function localeMonthsParse(monthName, format, strict) { 6039 var i, mom, regex; 6040 6041 if (this._monthsParseExact) { 6042 return handleStrictParse.call(this, monthName, format, strict); 6043 } 6044 6045 if (!this._monthsParse) { 6046 this._monthsParse = []; 6047 this._longMonthsParse = []; 6048 this._shortMonthsParse = []; 6049 } 6050 6051 // TODO: add sorting 6052 // Sorting makes sure if one month (or abbr) is a prefix of another 6053 // see sorting in computeMonthsParse 6054 for (i = 0; i < 12; i++) { 6055 // make the regex if we don't have it already 6056 mom = createUTC([2000, i]); 6057 if (strict && !this._longMonthsParse[i]) { 6058 this._longMonthsParse[i] = new RegExp( 6059 '^' + this.months(mom, '').replace('.', '') + '$', 6060 'i' 6061 ); 6062 this._shortMonthsParse[i] = new RegExp( 6063 '^' + this.monthsShort(mom, '').replace('.', '') + '$', 6064 'i' 6065 ); 6066 } 6067 if (!strict && !this._monthsParse[i]) { 6068 regex = 6069 '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 6070 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 6071 } 6072 // test the regex 6073 if ( 6074 strict && 6075 format === 'MMMM' && 6076 this._longMonthsParse[i].test(monthName) 6077 ) { 6078 return i; 6079 } else if ( 6080 strict && 6081 format === 'MMM' && 6082 this._shortMonthsParse[i].test(monthName) 6083 ) { 6084 return i; 6085 } else if (!strict && this._monthsParse[i].test(monthName)) { 6086 return i; 6087 } 6088 } 6089 } 6090 6091 // MOMENTS 6092 6093 function setMonth(mom, value) { 6094 var dayOfMonth; 6095 6096 if (!mom.isValid()) { 6097 // No op 6098 return mom; 6099 } 6100 6101 if (typeof value === 'string') { 6102 if (/^\d+$/.test(value)) { 6103 value = toInt(value); 6104 } else { 6105 value = mom.localeData().monthsParse(value); 6106 // TODO: Another silent failure? 6107 if (!isNumber(value)) { 6108 return mom; 6109 } 6110 } 6111 } 6112 6113 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); 6114 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); 6115 return mom; 6116 } 6117 6118 function getSetMonth(value) { 6119 if (value != null) { 6120 setMonth(this, value); 6121 hooks.updateOffset(this, true); 6122 return this; 6123 } else { 6124 return get(this, 'Month'); 6125 } 6126 } 6127 6128 function getDaysInMonth() { 6129 return daysInMonth(this.year(), this.month()); 6130 } 6131 6132 function monthsShortRegex(isStrict) { 6133 if (this._monthsParseExact) { 6134 if (!hasOwnProp(this, '_monthsRegex')) { 6135 computeMonthsParse.call(this); 6136 } 6137 if (isStrict) { 6138 return this._monthsShortStrictRegex; 6139 } else { 6140 return this._monthsShortRegex; 6141 } 6142 } else { 6143 if (!hasOwnProp(this, '_monthsShortRegex')) { 6144 this._monthsShortRegex = defaultMonthsShortRegex; 6145 } 6146 return this._monthsShortStrictRegex && isStrict 6147 ? this._monthsShortStrictRegex 6148 : this._monthsShortRegex; 6149 } 6150 } 6151 6152 function monthsRegex(isStrict) { 6153 if (this._monthsParseExact) { 6154 if (!hasOwnProp(this, '_monthsRegex')) { 6155 computeMonthsParse.call(this); 6156 } 6157 if (isStrict) { 6158 return this._monthsStrictRegex; 6159 } else { 6160 return this._monthsRegex; 6161 } 6162 } else { 6163 if (!hasOwnProp(this, '_monthsRegex')) { 6164 this._monthsRegex = defaultMonthsRegex; 6165 } 6166 return this._monthsStrictRegex && isStrict 6167 ? this._monthsStrictRegex 6168 : this._monthsRegex; 6169 } 6170 } 6171 6172 function computeMonthsParse() { 6173 function cmpLenRev(a, b) { 6174 return b.length - a.length; 6175 } 6176 6177 var shortPieces = [], 6178 longPieces = [], 6179 mixedPieces = [], 6180 i, 6181 mom; 6182 for (i = 0; i < 12; i++) { 6183 // make the regex if we don't have it already 6184 mom = createUTC([2000, i]); 6185 shortPieces.push(this.monthsShort(mom, '')); 6186 longPieces.push(this.months(mom, '')); 6187 mixedPieces.push(this.months(mom, '')); 6188 mixedPieces.push(this.monthsShort(mom, '')); 6189 } 6190 // Sorting makes sure if one month (or abbr) is a prefix of another it 6191 // will match the longer piece. 6192 shortPieces.sort(cmpLenRev); 6193 longPieces.sort(cmpLenRev); 6194 mixedPieces.sort(cmpLenRev); 6195 for (i = 0; i < 12; i++) { 6196 shortPieces[i] = regexEscape(shortPieces[i]); 6197 longPieces[i] = regexEscape(longPieces[i]); 6198 } 6199 for (i = 0; i < 24; i++) { 6200 mixedPieces[i] = regexEscape(mixedPieces[i]); 6201 } 6202 6203 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 6204 this._monthsShortRegex = this._monthsRegex; 6205 this._monthsStrictRegex = new RegExp( 6206 '^(' + longPieces.join('|') + ')', 6207 'i' 6208 ); 6209 this._monthsShortStrictRegex = new RegExp( 6210 '^(' + shortPieces.join('|') + ')', 6211 'i' 6212 ); 6213 } 6214 6215 // FORMATTING 6216 6217 addFormatToken('Y', 0, 0, function () { 6218 var y = this.year(); 6219 return y <= 9999 ? zeroFill(y, 4) : '+' + y; 6220 }); 6221 6222 addFormatToken(0, ['YY', 2], 0, function () { 6223 return this.year() % 100; 6224 }); 6225 6226 addFormatToken(0, ['YYYY', 4], 0, 'year'); 6227 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 6228 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 6229 6230 // ALIASES 6231 6232 addUnitAlias('year', 'y'); 6233 6234 // PRIORITIES 6235 6236 addUnitPriority('year', 1); 6237 6238 // PARSING 6239 6240 addRegexToken('Y', matchSigned); 6241 addRegexToken('YY', match1to2, match2); 6242 addRegexToken('YYYY', match1to4, match4); 6243 addRegexToken('YYYYY', match1to6, match6); 6244 addRegexToken('YYYYYY', match1to6, match6); 6245 6246 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 6247 addParseToken('YYYY', function (input, array) { 6248 array[YEAR] = 6249 input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); 6250 }); 6251 addParseToken('YY', function (input, array) { 6252 array[YEAR] = hooks.parseTwoDigitYear(input); 6253 }); 6254 addParseToken('Y', function (input, array) { 6255 array[YEAR] = parseInt(input, 10); 6256 }); 6257 6258 // HELPERS 6259 6260 function daysInYear(year) { 6261 return isLeapYear(year) ? 366 : 365; 6262 } 6263 6264 // HOOKS 6265 6266 hooks.parseTwoDigitYear = function (input) { 6267 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 6268 }; 6269 6270 // MOMENTS 6271 6272 var getSetYear = makeGetSet('FullYear', true); 6273 6274 function getIsLeapYear() { 6275 return isLeapYear(this.year()); 6276 } 6277 6278 function createDate(y, m, d, h, M, s, ms) { 6279 // can't just apply() to create a date: 6280 // https://stackoverflow.com/q/181348 6281 var date; 6282 // the date constructor remaps years 0-99 to 1900-1999 6283 if (y < 100 && y >= 0) { 6284 // preserve leap years using a full 400 year cycle, then reset 6285 date = new Date(y + 400, m, d, h, M, s, ms); 6286 if (isFinite(date.getFullYear())) { 6287 date.setFullYear(y); 6288 } 6289 } else { 6290 date = new Date(y, m, d, h, M, s, ms); 6291 } 6292 6293 return date; 6294 } 6295 6296 function createUTCDate(y) { 6297 var date, args; 6298 // the Date.UTC function remaps years 0-99 to 1900-1999 6299 if (y < 100 && y >= 0) { 6300 args = Array.prototype.slice.call(arguments); 6301 // preserve leap years using a full 400 year cycle, then reset 6302 args[0] = y + 400; 6303 date = new Date(Date.UTC.apply(null, args)); 6304 if (isFinite(date.getUTCFullYear())) { 6305 date.setUTCFullYear(y); 6306 } 6307 } else { 6308 date = new Date(Date.UTC.apply(null, arguments)); 6309 } 6310 6311 return date; 6312 } 6313 6314 // start-of-first-week - start-of-year 6315 function firstWeekOffset(year, dow, doy) { 6316 var // first-week day -- which january is always in the first week (4 for iso, 1 for other) 6317 fwd = 7 + dow - doy, 6318 // first-week day local weekday -- which local weekday is fwd 6319 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; 6320 6321 return -fwdlw + fwd - 1; 6322 } 6323 6324 // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 6325 function dayOfYearFromWeeks(year, week, weekday, dow, doy) { 6326 var localWeekday = (7 + weekday - dow) % 7, 6327 weekOffset = firstWeekOffset(year, dow, doy), 6328 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, 6329 resYear, 6330 resDayOfYear; 6331 6332 if (dayOfYear <= 0) { 6333 resYear = year - 1; 6334 resDayOfYear = daysInYear(resYear) + dayOfYear; 6335 } else if (dayOfYear > daysInYear(year)) { 6336 resYear = year + 1; 6337 resDayOfYear = dayOfYear - daysInYear(year); 6338 } else { 6339 resYear = year; 6340 resDayOfYear = dayOfYear; 6341 } 6342 6343 return { 6344 year: resYear, 6345 dayOfYear: resDayOfYear, 6346 }; 6347 } 6348 6349 function weekOfYear(mom, dow, doy) { 6350 var weekOffset = firstWeekOffset(mom.year(), dow, doy), 6351 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, 6352 resWeek, 6353 resYear; 6354 6355 if (week < 1) { 6356 resYear = mom.year() - 1; 6357 resWeek = week + weeksInYear(resYear, dow, doy); 6358 } else if (week > weeksInYear(mom.year(), dow, doy)) { 6359 resWeek = week - weeksInYear(mom.year(), dow, doy); 6360 resYear = mom.year() + 1; 6361 } else { 6362 resYear = mom.year(); 6363 resWeek = week; 6364 } 6365 6366 return { 6367 week: resWeek, 6368 year: resYear, 6369 }; 6370 } 6371 6372 function weeksInYear(year, dow, doy) { 6373 var weekOffset = firstWeekOffset(year, dow, doy), 6374 weekOffsetNext = firstWeekOffset(year + 1, dow, doy); 6375 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; 6376 } 6377 6378 // FORMATTING 6379 6380 addFormatToken('w', ['ww', 2], 'wo', 'week'); 6381 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 6382 6383 // ALIASES 6384 6385 addUnitAlias('week', 'w'); 6386 addUnitAlias('isoWeek', 'W'); 6387 6388 // PRIORITIES 6389 6390 addUnitPriority('week', 5); 6391 addUnitPriority('isoWeek', 5); 6392 6393 // PARSING 6394 6395 addRegexToken('w', match1to2); 6396 addRegexToken('ww', match1to2, match2); 6397 addRegexToken('W', match1to2); 6398 addRegexToken('WW', match1to2, match2); 6399 6400 addWeekParseToken(
vendor: 4,673 bytes, lines 6400-6566
6400 6401 ['w', 'ww', 'W', 'WW'], 6402 function (input, week, config, token) { 6403 week[token.substr(0, 1)] = toInt(input); 6404 } 6405 ); 6406 6407 // HELPERS 6408 6409 // LOCALES 6410 6411 function localeWeek(mom) { 6412 return weekOfYear(mom, this._week.dow, this._week.doy).week; 6413 } 6414 6415 var defaultLocaleWeek = { 6416 dow: 0, // Sunday is the first day of the week. 6417 doy: 6, // The week that contains Jan 6th is the first week of the year. 6418 }; 6419 6420 function localeFirstDayOfWeek() { 6421 return this._week.dow; 6422 } 6423 6424 function localeFirstDayOfYear() { 6425 return this._week.doy; 6426 } 6427 6428 // MOMENTS 6429 6430 function getSetWeek(input) { 6431 var week = this.localeData().week(this); 6432 return input == null ? week : this.add((input - week) * 7, 'd'); 6433 } 6434 6435 function getSetISOWeek(input) { 6436 var week = weekOfYear(this, 1, 4).week; 6437 return input == null ? week : this.add((input - week) * 7, 'd'); 6438 } 6439 6440 // FORMATTING 6441 6442 addFormatToken('d', 0, 'do', 'day'); 6443 6444 addFormatToken('dd', 0, 0, function (format) { 6445 return this.localeData().weekdaysMin(this, format); 6446 }); 6447 6448 addFormatToken('ddd', 0, 0, function (format) { 6449 return this.localeData().weekdaysShort(this, format); 6450 }); 6451 6452 addFormatToken('dddd', 0, 0, function (format) { 6453 return this.localeData().weekdays(this, format); 6454 }); 6455 6456 addFormatToken('e', 0, 0, 'weekday'); 6457 addFormatToken('E', 0, 0, 'isoWeekday'); 6458 6459 // ALIASES 6460 6461 addUnitAlias('day', 'd'); 6462 addUnitAlias('weekday', 'e'); 6463 addUnitAlias('isoWeekday', 'E'); 6464 6465 // PRIORITY 6466 addUnitPriority('day', 11); 6467 addUnitPriority('weekday', 11); 6468 addUnitPriority('isoWeekday', 11); 6469 6470 // PARSING 6471 6472 addRegexToken('d', match1to2); 6473 addRegexToken('e', match1to2); 6474 addRegexToken('E', match1to2); 6475 addRegexToken('dd', function (isStrict, locale) { 6476 return locale.weekdaysMinRegex(isStrict); 6477 }); 6478 addRegexToken('ddd', function (isStrict, locale) { 6479 return locale.weekdaysShortRegex(isStrict); 6480 }); 6481 addRegexToken('dddd', function (isStrict, locale) { 6482 return locale.weekdaysRegex(isStrict); 6483 }); 6484 6485 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { 6486 var weekday = config._locale.weekdaysParse(input, token, config._strict); 6487 // if we didn't get a weekday name, mark the date as invalid 6488 if (weekday != null) { 6489 week.d = weekday; 6490 } else { 6491 getParsingFlags(config).invalidWeekday = input; 6492 } 6493 }); 6494 6495 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { 6496 week[token] = toInt(input); 6497 }); 6498 6499 // HELPERS 6500 6501 function parseWeekday(input, locale) { 6502 if (typeof input !== 'string') { 6503 return input; 6504 } 6505 6506 if (!isNaN(input)) { 6507 return parseInt(input, 10); 6508 } 6509 6510 input = locale.weekdaysParse(input); 6511 if (typeof input === 'number') { 6512 return input; 6513 } 6514 6515 return null; 6516 } 6517 6518 function parseIsoWeekday(input, locale) { 6519 if (typeof input === 'string') { 6520 return locale.weekdaysParse(input) % 7 || 7; 6521 } 6522 return isNaN(input) ? null : input; 6523 } 6524 6525 // LOCALES 6526 function shiftWeekdays(ws, n) { 6527 return ws.slice(n, 7).concat(ws.slice(0, n)); 6528 } 6529 6530 var defaultLocaleWeekdays = 6531 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 6532 defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 6533 defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 6534 defaultWeekdaysRegex = matchWord, 6535 defaultWeekdaysShortRegex = matchWord, 6536 defaultWeekdaysMinRegex = matchWord; 6537 6538 function localeWeekdays(m, format) { 6539 var weekdays = isArray(this._weekdays) 6540 ? this._weekdays 6541 : this._weekdays[ 6542 m && m !== true && this._weekdays.isFormat.test(format) 6543 ? 'format' 6544 : 'standalone' 6545 ]; 6546 return m === true 6547 ? shiftWeekdays(weekdays, this._week.dow) 6548 : m 6549 ? weekdays[m.day()] 6550 : weekdays; 6551 } 6552 6553 function localeWeekdaysShort(m) { 6554 return m === true 6555 ? shiftWeekdays(this._weekdaysShort, this._week.dow) 6556 : m 6557 ? this._weekdaysShort[m.day()] 6558 : this._weekdaysShort; 6559 } 6560 6561 function localeWeekdaysMin(m) { 6562 return m === true 6563 ? shiftWeekdays(this._weekdaysMin, this._week.dow) 6564 : m 6565 ? this._weekdaysMin[m.day()] 6566
vendor: 16,698 bytes, lines 6566-7079
6566 : this._weekdaysMin; 6567 } 6568 6569 function handleStrictParse$1(weekdayName, format, strict) { 6570 var i, 6571 ii, 6572 mom, 6573 llc = weekdayName.toLocaleLowerCase(); 6574 if (!this._weekdaysParse) { 6575 this._weekdaysParse = []; 6576 this._shortWeekdaysParse = []; 6577 this._minWeekdaysParse = []; 6578 6579 for (i = 0; i < 7; ++i) { 6580 mom = createUTC([2000, 1]).day(i); 6581 this._minWeekdaysParse[i] = this.weekdaysMin( 6582 mom, 6583 '' 6584 ).toLocaleLowerCase(); 6585 this._shortWeekdaysParse[i] = this.weekdaysShort( 6586 mom, 6587 '' 6588 ).toLocaleLowerCase(); 6589 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); 6590 } 6591 } 6592 6593 if (strict) { 6594 if (format === 'dddd') { 6595 ii = indexOf.call(this._weekdaysParse, llc); 6596 return ii !== -1 ? ii : null; 6597 } else if (format === 'ddd') { 6598 ii = indexOf.call(this._shortWeekdaysParse, llc); 6599 return ii !== -1 ? ii : null; 6600 } else { 6601 ii = indexOf.call(this._minWeekdaysParse, llc); 6602 return ii !== -1 ? ii : null; 6603 } 6604 } else { 6605 if (format === 'dddd') { 6606 ii = indexOf.call(this._weekdaysParse, llc); 6607 if (ii !== -1) { 6608 return ii; 6609 } 6610 ii = indexOf.call(this._shortWeekdaysParse, llc); 6611 if (ii !== -1) { 6612 return ii; 6613 } 6614 ii = indexOf.call(this._minWeekdaysParse, llc); 6615 return ii !== -1 ? ii : null; 6616 } else if (format === 'ddd') { 6617 ii = indexOf.call(this._shortWeekdaysParse, llc); 6618 if (ii !== -1) { 6619 return ii; 6620 } 6621 ii = indexOf.call(this._weekdaysParse, llc); 6622 if (ii !== -1) { 6623 return ii; 6624 } 6625 ii = indexOf.call(this._minWeekdaysParse, llc); 6626 return ii !== -1 ? ii : null; 6627 } else { 6628 ii = indexOf.call(this._minWeekdaysParse, llc); 6629 if (ii !== -1) { 6630 return ii; 6631 } 6632 ii = indexOf.call(this._weekdaysParse, llc); 6633 if (ii !== -1) { 6634 return ii; 6635 } 6636 ii = indexOf.call(this._shortWeekdaysParse, llc); 6637 return ii !== -1 ? ii : null; 6638 } 6639 } 6640 } 6641 6642 function localeWeekdaysParse(weekdayName, format, strict) { 6643 var i, mom, regex; 6644 6645 if (this._weekdaysParseExact) { 6646 return handleStrictParse$1.call(this, weekdayName, format, strict); 6647 } 6648 6649 if (!this._weekdaysParse) { 6650 this._weekdaysParse = []; 6651 this._minWeekdaysParse = []; 6652 this._shortWeekdaysParse = []; 6653 this._fullWeekdaysParse = []; 6654 } 6655 6656 for (i = 0; i < 7; i++) { 6657 // make the regex if we don't have it already 6658 6659 mom = createUTC([2000, 1]).day(i); 6660 if (strict && !this._fullWeekdaysParse[i]) { 6661 this._fullWeekdaysParse[i] = new RegExp( 6662 '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 6663 'i' 6664 ); 6665 this._shortWeekdaysParse[i] = new RegExp( 6666 '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 6667 'i' 6668 ); 6669 this._minWeekdaysParse[i] = new RegExp( 6670 '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 6671 'i' 6672 ); 6673 } 6674 if (!this._weekdaysParse[i]) { 6675 regex = 6676 '^' + 6677 this.weekdays(mom, '') + 6678 '|^' + 6679 this.weekdaysShort(mom, '') + 6680 '|^' + 6681 this.weekdaysMin(mom, ''); 6682 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 6683 } 6684 // test the regex 6685 if ( 6686 strict && 6687 format === 'dddd' && 6688 this._fullWeekdaysParse[i].test(weekdayName) 6689 ) { 6690 return i; 6691 } else if ( 6692 strict && 6693 format === 'ddd' && 6694 this._shortWeekdaysParse[i].test(weekdayName) 6695 ) { 6696 return i; 6697 } else if ( 6698 strict && 6699 format === 'dd' && 6700 this._minWeekdaysParse[i].test(weekdayName) 6701 ) { 6702 return i; 6703 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { 6704 return i; 6705 } 6706 } 6707 } 6708 6709 // MOMENTS 6710 6711 function getSetDayOfWeek(input) { 6712 if (!this.isValid()) { 6713 return input != null ? this : NaN; 6714 } 6715 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); 6716 if (input != null) { 6717 input = parseWeekday(input, this.localeData()); 6718 return this.add(input - day, 'd'); 6719 } else { 6720 return day; 6721 } 6722 } 6723 6724 function getSetLocaleDayOfWeek(input) { 6725 if (!this.isValid()) { 6726 return input != null ? this : NaN; 6727 } 6728 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 6729 return input == null ? weekday : this.add(input - weekday, 'd'); 6730 } 6731 6732 function getSetISODayOfWeek(input) { 6733 if (!this.isValid()) { 6734 return input != null ? this : NaN; 6735 } 6736 6737 // behaves the same as moment#day except 6738 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 6739 // as a setter, sunday should belong to the previous week. 6740 6741 if (input != null) { 6742 var weekday = parseIsoWeekday(input, this.localeData()); 6743 return this.day(this.day() % 7 ? weekday : weekday - 7); 6744 } else { 6745 return this.day() || 7; 6746 } 6747 } 6748 6749 function weekdaysRegex(isStrict) { 6750 if (this._weekdaysParseExact) { 6751 if (!hasOwnProp(this, '_weekdaysRegex')) { 6752 computeWeekdaysParse.call(this); 6753 } 6754 if (isStrict) { 6755 return this._weekdaysStrictRegex; 6756 } else { 6757 return this._weekdaysRegex; 6758 } 6759 } else { 6760 if (!hasOwnProp(this, '_weekdaysRegex')) { 6761 this._weekdaysRegex = defaultWeekdaysRegex; 6762 } 6763 return this._weekdaysStrictRegex && isStrict 6764 ? this._weekdaysStrictRegex 6765 : this._weekdaysRegex; 6766 } 6767 } 6768 6769 function weekdaysShortRegex(isStrict) { 6770 if (this._weekdaysParseExact) { 6771 if (!hasOwnProp(this, '_weekdaysRegex')) { 6772 computeWeekdaysParse.call(this); 6773 } 6774 if (isStrict) { 6775 return this._weekdaysShortStrictRegex; 6776 } else { 6777 return this._weekdaysShortRegex; 6778 } 6779 } else { 6780 if (!hasOwnProp(this, '_weekdaysShortRegex')) { 6781 this._weekdaysShortRegex = defaultWeekdaysShortRegex; 6782 } 6783 return this._weekdaysShortStrictRegex && isStrict 6784 ? this._weekdaysShortStrictRegex 6785 : this._weekdaysShortRegex; 6786 } 6787 } 6788 6789 function weekdaysMinRegex(isStrict) { 6790 if (this._weekdaysParseExact) { 6791 if (!hasOwnProp(this, '_weekdaysRegex')) { 6792 computeWeekdaysParse.call(this); 6793 } 6794 if (isStrict) { 6795 return this._weekdaysMinStrictRegex; 6796 } else { 6797 return this._weekdaysMinRegex; 6798 } 6799 } else { 6800 if (!hasOwnProp(this, '_weekdaysMinRegex')) { 6801 this._weekdaysMinRegex = defaultWeekdaysMinRegex; 6802 } 6803 return this._weekdaysMinStrictRegex && isStrict 6804 ? this._weekdaysMinStrictRegex 6805 : this._weekdaysMinRegex; 6806 } 6807 } 6808 6809 function computeWeekdaysParse() { 6810 function cmpLenRev(a, b) { 6811 return b.length - a.length; 6812 } 6813 6814 var minPieces = [], 6815 shortPieces = [], 6816 longPieces = [], 6817 mixedPieces = [], 6818 i, 6819 mom, 6820 minp, 6821 shortp, 6822 longp; 6823 for (i = 0; i < 7; i++) { 6824 // make the regex if we don't have it already 6825 mom = createUTC([2000, 1]).day(i); 6826 minp = regexEscape(this.weekdaysMin(mom, '')); 6827 shortp = regexEscape(this.weekdaysShort(mom, '')); 6828 longp = regexEscape(this.weekdays(mom, '')); 6829 minPieces.push(minp); 6830 shortPieces.push(shortp); 6831 longPieces.push(longp); 6832 mixedPieces.push(minp); 6833 mixedPieces.push(shortp); 6834 mixedPieces.push(longp); 6835 } 6836 // Sorting makes sure if one weekday (or abbr) is a prefix of another it 6837 // will match the longer piece. 6838 minPieces.sort(cmpLenRev); 6839 shortPieces.sort(cmpLenRev); 6840 longPieces.sort(cmpLenRev); 6841 mixedPieces.sort(cmpLenRev); 6842 6843 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 6844 this._weekdaysShortRegex = this._weekdaysRegex; 6845 this._weekdaysMinRegex = this._weekdaysRegex; 6846 6847 this._weekdaysStrictRegex = new RegExp( 6848 '^(' + longPieces.join('|') + ')', 6849 'i' 6850 ); 6851 this._weekdaysShortStrictRegex = new RegExp( 6852 '^(' + shortPieces.join('|') + ')', 6853 'i' 6854 ); 6855 this._weekdaysMinStrictRegex = new RegExp( 6856 '^(' + minPieces.join('|') + ')', 6857 'i' 6858 ); 6859 } 6860 6861 // FORMATTING 6862 6863 function hFormat() { 6864 return this.hours() % 12 || 12; 6865 } 6866 6867 function kFormat() { 6868 return this.hours() || 24; 6869 } 6870 6871 addFormatToken('H', ['HH', 2], 0, 'hour'); 6872 addFormatToken('h', ['hh', 2], 0, hFormat); 6873 addFormatToken('k', ['kk', 2], 0, kFormat); 6874 6875 addFormatToken('hmm', 0, 0, function () { 6876 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); 6877 }); 6878 6879 addFormatToken('hmmss', 0, 0, function () { 6880 return ( 6881 '' + 6882 hFormat.apply(this) + 6883 zeroFill(this.minutes(), 2) + 6884 zeroFill(this.seconds(), 2) 6885 ); 6886 }); 6887 6888 addFormatToken('Hmm', 0, 0, function () { 6889 return '' + this.hours() + zeroFill(this.minutes(), 2); 6890 }); 6891 6892 addFormatToken('Hmmss', 0, 0, function () { 6893 return ( 6894 '' + 6895 this.hours() + 6896 zeroFill(this.minutes(), 2) + 6897 zeroFill(this.seconds(), 2) 6898 ); 6899 }); 6900 6901 function meridiem(token, lowercase) { 6902 addFormatToken(token, 0, 0, function () { 6903 return this.localeData().meridiem( 6904 this.hours(), 6905 this.minutes(), 6906 lowercase 6907 ); 6908 }); 6909 } 6910 6911 meridiem('a', true); 6912 meridiem('A', false); 6913 6914 // ALIASES 6915 6916 addUnitAlias('hour', 'h'); 6917 6918 // PRIORITY 6919 addUnitPriority('hour', 13); 6920 6921 // PARSING 6922 6923 function matchMeridiem(isStrict, locale) { 6924 return locale._meridiemParse; 6925 } 6926 6927 addRegexToken('a', matchMeridiem); 6928 addRegexToken('A', matchMeridiem); 6929 addRegexToken('H', match1to2); 6930 addRegexToken('h', match1to2); 6931 addRegexToken('k', match1to2); 6932 addRegexToken('HH', match1to2, match2); 6933 addRegexToken('hh', match1to2, match2); 6934 addRegexToken('kk', match1to2, match2); 6935 6936 addRegexToken('hmm', match3to4); 6937 addRegexToken('hmmss', match5to6); 6938 addRegexToken('Hmm', match3to4); 6939 addRegexToken('Hmmss', match5to6); 6940 6941 addParseToken(['H', 'HH'], HOUR); 6942 addParseToken(['k', 'kk'], function (input, array, config) { 6943 var kInput = toInt(input); 6944 array[HOUR] = kInput === 24 ? 0 : kInput; 6945 }); 6946 addParseToken(['a', 'A'], function (input, array, config) { 6947 config._isPm = config._locale.isPM(input); 6948 config._meridiem = input; 6949 }); 6950 addParseToken(['h', 'hh'], function (input, array, config) { 6951 array[HOUR] = toInt(input); 6952 getParsingFlags(config).bigHour = true; 6953 }); 6954 addParseToken('hmm', function (input, array, config) { 6955 var pos = input.length - 2; 6956 array[HOUR] = toInt(input.substr(0, pos)); 6957 array[MINUTE] = toInt(input.substr(pos)); 6958 getParsingFlags(config).bigHour = true; 6959 }); 6960 addParseToken('hmmss', function (input, array, config) { 6961 var pos1 = input.length - 4, 6962 pos2 = input.length - 2; 6963 array[HOUR] = toInt(input.substr(0, pos1)); 6964 array[MINUTE] = toInt(input.substr(pos1, 2)); 6965 array[SECOND] = toInt(input.substr(pos2)); 6966 getParsingFlags(config).bigHour = true; 6967 }); 6968 addParseToken('Hmm', function (input, array, config) { 6969 var pos = input.length - 2; 6970 array[HOUR] = toInt(input.substr(0, pos)); 6971 array[MINUTE] = toInt(input.substr(pos)); 6972 }); 6973 addParseToken('Hmmss', function (input, array, config) { 6974 var pos1 = input.length - 4, 6975 pos2 = input.length - 2; 6976 array[HOUR] = toInt(input.substr(0, pos1)); 6977 array[MINUTE] = toInt(input.substr(pos1, 2)); 6978 array[SECOND] = toInt(input.substr(pos2)); 6979 }); 6980 6981 // LOCALES 6982 6983 function localeIsPM(input) { 6984 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays 6985 // Using charAt should be more compatible. 6986 return (input + '').toLowerCase().charAt(0) === 'p'; 6987 } 6988 6989 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, 6990 // Setting the hour should keep the time, because the user explicitly 6991 // specified which hour they want. So trying to maintain the same hour (in 6992 // a new timezone) makes sense. Adding/subtracting hours does not follow 6993 // this rule. 6994 getSetHour = makeGetSet('Hours', true); 6995 6996 function localeMeridiem(hours, minutes, isLower) { 6997 if (hours > 11) { 6998 return isLower ? 'pm' : 'PM'; 6999 } else { 7000 return isLower ? 'am' : 'AM'; 7001 } 7002 } 7003 7004 var baseConfig = { 7005 calendar: defaultCalendar, 7006 longDateFormat: defaultLongDateFormat, 7007 invalidDate: defaultInvalidDate, 7008 ordinal: defaultOrdinal, 7009 dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, 7010 relativeTime: defaultRelativeTime, 7011 7012 months: defaultLocaleMonths, 7013 monthsShort: defaultLocaleMonthsShort, 7014 7015 week: defaultLocaleWeek, 7016 7017 weekdays: defaultLocaleWeekdays, 7018 weekdaysMin: defaultLocaleWeekdaysMin, 7019 weekdaysShort: defaultLocaleWeekdaysShort, 7020 7021 meridiemParse: defaultLocaleMeridiemParse, 7022 }; 7023 7024 // internal storage for locale config files 7025 var locales = {}, 7026 localeFamilies = {}, 7027 globalLocale; 7028 7029 function commonPrefix(arr1, arr2) { 7030 var i, 7031 minl = Math.min(arr1.length, arr2.length); 7032 for (i = 0; i < minl; i += 1) { 7033 if (arr1[i] !== arr2[i]) { 7034 return i; 7035 } 7036 } 7037 return minl; 7038 } 7039 7040 function normalizeLocale(key) { 7041 return key ? key.toLowerCase().replace('_', '-') : key; 7042 } 7043 7044 // pick the locale from the array 7045 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 7046 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 7047 function chooseLocale(names) { 7048 var i = 0, 7049 j, 7050 next, 7051 locale, 7052 split; 7053 7054 while (i < names.length) { 7055 split = normalizeLocale(names[i]).split('-'); 7056 j = split.length; 7057 next = normalizeLocale(names[i + 1]); 7058 next = next ? next.split('-') : null; 7059 while (j > 0) { 7060 locale = loadLocale(split.slice(0, j).join('-')); 7061 if (locale) { 7062 return locale; 7063 } 7064 if ( 7065 next && 7066 next.length >= j && 7067 commonPrefix(split, next) >= j - 1 7068 ) { 7069 //the next array item is better than a shallower substring of this one 7070 break; 7071 } 7072 j--; 7073 } 7074 i++; 7075 } 7076 return globalLocale; 7077 } 7078 7079 function
vendor: 7,557 bytes, lines 7079-7287
7079isLocaleNameSane(name) { 7080 // Prevent names that look like filesystem paths, i.e contain '/' or '\' 7081 return name.match('^[^/\\\\]*$') != null; 7082 } 7083 7084 function loadLocale(name) { 7085 var oldLocale = null, 7086 aliasedRequire; 7087 // TODO: Find a better way to register and load all the locales in Node 7088 if ( 7089 locales[name] === undefined && 7090 typeof module !== 'undefined' && 7091 module && 7092 module.exports && 7093 isLocaleNameSane(name) 7094 ) { 7095 try { 7096 oldLocale = globalLocale._abbr; 7097 aliasedRequire = require; 7098 aliasedRequire('./locale/' + name); 7099 getSetGlobalLocale(oldLocale); 7100 } catch (e) { 7101 // mark as not found to avoid repeating expensive file require call causing high CPU 7102 // when trying to find en-US, en_US, en-us for every format call 7103 locales[name] = null; // null means not found 7104 } 7105 } 7106 return locales[name]; 7107 } 7108 7109 // This function will load locale and then set the global locale. If 7110 // no arguments are passed in, it will simply return the current global 7111 // locale key. 7112 function getSetGlobalLocale(key, values) { 7113 var data; 7114 if (key) { 7115 if (isUndefined(values)) { 7116 data = getLocale(key); 7117 } else { 7118 data = defineLocale(key, values); 7119 } 7120 7121 if (data) { 7122 // moment.duration._locale = moment._locale = data; 7123 globalLocale = data; 7124 } else { 7125 if (typeof console !== 'undefined' && console.warn) { 7126 //warn user if arguments are passed but the locale could not be set 7127 console.warn( 7128 'Locale ' + key + ' not found. Did you forget to load it?' 7129 ); 7130 } 7131 } 7132 } 7133 7134 return globalLocale._abbr; 7135 } 7136 7137 function defineLocale(name, config) { 7138 if (config !== null) { 7139 var locale, 7140 parentConfig = baseConfig; 7141 config.abbr = name; 7142 if (locales[name] != null) { 7143 deprecateSimple( 7144 'defineLocaleOverride', 7145 'use moment.updateLocale(localeName, config) to change ' + 7146 'an existing locale. moment.defineLocale(localeName, ' + 7147 'config) should only be used for creating a new locale ' + 7148 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' 7149 ); 7150 parentConfig = locales[name]._config; 7151 } else if (config.parentLocale != null) { 7152 if (locales[config.parentLocale] != null) { 7153 parentConfig = locales[config.parentLocale]._config; 7154 } else { 7155 locale = loadLocale(config.parentLocale); 7156 if (locale != null) { 7157 parentConfig = locale._config; 7158 } else { 7159 if (!localeFamilies[config.parentLocale]) { 7160 localeFamilies[config.parentLocale] = []; 7161 } 7162 localeFamilies[config.parentLocale].push({ 7163 name: name, 7164 config: config, 7165 }); 7166 return null; 7167 } 7168 } 7169 } 7170 locales[name] = new Locale(mergeConfigs(parentConfig, config)); 7171 7172 if (localeFamilies[name]) { 7173 localeFamilies[name].forEach(function (x) { 7174 defineLocale(x.name, x.config); 7175 }); 7176 } 7177 7178 // backwards compat for now: also set the locale 7179 // make sure we set the locale AFTER all child locales have been 7180 // created, so we won't end up with the child locale set. 7181 getSetGlobalLocale(name); 7182 7183 return locales[name]; 7184 } else { 7185 // useful for testing 7186 delete locales[name]; 7187 return null; 7188 } 7189 } 7190 7191 function updateLocale(name, config) { 7192 if (config != null) { 7193 var locale, 7194 tmpLocale, 7195 parentConfig = baseConfig; 7196 7197 if (locales[name] != null && locales[name].parentLocale != null) { 7198 // Update existing child locale in-place to avoid memory-leaks 7199 locales[name].set(mergeConfigs(locales[name]._config, config)); 7200 } else { 7201 // MERGE 7202 tmpLocale = loadLocale(name); 7203 if (tmpLocale != null) { 7204 parentConfig = tmpLocale._config; 7205 } 7206 config = mergeConfigs(parentConfig, config); 7207 if (tmpLocale == null) { 7208 // updateLocale is called for creating a new locale 7209 // Set abbr so it will have a name (getters return 7210 // undefined otherwise). 7211 config.abbr = name; 7212 } 7213 locale = new Locale(config); 7214 locale.parentLocale = locales[name]; 7215 locales[name] = locale; 7216 } 7217 7218 // backwards compat for now: also set the locale 7219 getSetGlobalLocale(name); 7220 } else { 7221 // pass null for config to unupdate, useful for tests 7222 if (locales[name] != null) { 7223 if (locales[name].parentLocale != null) { 7224 locales[name] = locales[name].parentLocale; 7225 if (name === getSetGlobalLocale()) { 7226 getSetGlobalLocale(name); 7227 } 7228 } else if (locales[name] != null) { 7229 delete locales[name]; 7230 } 7231 } 7232 } 7233 return locales[name]; 7234 } 7235 7236 // returns locale data 7237 function getLocale(key) { 7238 var locale; 7239 7240 if (key && key._locale && key._locale._abbr) { 7241 key = key._locale._abbr; 7242 } 7243 7244 if (!key) { 7245 return globalLocale; 7246 } 7247 7248 if (!isArray(key)) { 7249 //short-circuit everything else 7250 locale = loadLocale(key); 7251 if (locale) { 7252 return locale; 7253 } 7254 key = [key]; 7255 } 7256 7257 return chooseLocale(key); 7258 } 7259 7260 function listLocales() { 7261 return keys(locales); 7262 } 7263 7264 function checkOverflow(m) { 7265 var overflow, 7266 a = m._a; 7267 7268 if (a && getParsingFlags(m).overflow === -2) { 7269 overflow = 7270 a[MONTH] < 0 || a[MONTH] > 11 7271 ? MONTH 7272 : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) 7273 ? DATE 7274 : a[HOUR] < 0 || 7275 a[HOUR] > 24 || 7276 (a[HOUR] === 24 && 7277 (a[MINUTE] !== 0 || 7278 a[SECOND] !== 0 || 7279 a[MILLISECOND] !== 0)) 7280 ? HOUR 7281 : a[MINUTE] < 0 || a[MINUTE] > 59 7282 ? MINUTE 7283 : a[SECOND] < 0 || a[SECOND] > 59 7284 ? SECOND 7285 : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 7286 ? MILLISECOND 7287
vendor: 8,763 bytes, lines 7287-7552
7287 : -1; 7288 7289 if ( 7290 getParsingFlags(m)._overflowDayOfYear && 7291 (overflow < YEAR || overflow > DATE) 7292 ) { 7293 overflow = DATE; 7294 } 7295 if (getParsingFlags(m)._overflowWeeks && overflow === -1) { 7296 overflow = WEEK; 7297 } 7298 if (getParsingFlags(m)._overflowWeekday && overflow === -1) { 7299 overflow = WEEKDAY; 7300 } 7301 7302 getParsingFlags(m).overflow = overflow; 7303 } 7304 7305 return m; 7306 } 7307 7308 // iso 8601 regex 7309 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) 7310 var extendedIsoRegex = 7311 /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 7312 basicIsoRegex = 7313 /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 7314 tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, 7315 isoDates = [ 7316 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], 7317 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], 7318 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], 7319 ['GGGG-[W]WW', /\d{4}-W\d\d/, false], 7320 ['YYYY-DDD', /\d{4}-\d{3}/], 7321 ['YYYY-MM', /\d{4}-\d\d/, false], 7322 ['YYYYYYMMDD', /[+-]\d{10}/], 7323 ['YYYYMMDD', /\d{8}/], 7324 ['GGGG[W]WWE', /\d{4}W\d{3}/], 7325 ['GGGG[W]WW', /\d{4}W\d{2}/, false], 7326 ['YYYYDDD', /\d{7}/], 7327 ['YYYYMM', /\d{6}/, false], 7328 ['YYYY', /\d{4}/, false], 7329 ], 7330 // iso time formats and regexes 7331 isoTimes = [ 7332 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], 7333 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], 7334 ['HH:mm:ss', /\d\d:\d\d:\d\d/], 7335 ['HH:mm', /\d\d:\d\d/], 7336 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], 7337 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], 7338 ['HHmmss', /\d\d\d\d\d\d/], 7339 ['HHmm', /\d\d\d\d/], 7340 ['HH', /\d\d/], 7341 ], 7342 aspNetJsonRegex = /^\/?Date\((-?\d+)/i, 7343 // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 7344 rfc2822 = 7345 /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, 7346 obsOffsets = { 7347 UT: 0, 7348 GMT: 0, 7349 EDT: -4 * 60, 7350 EST: -5 * 60, 7351 CDT: -5 * 60, 7352 CST: -6 * 60, 7353 MDT: -6 * 60, 7354 MST: -7 * 60, 7355 PDT: -7 * 60, 7356 PST: -8 * 60, 7357 }; 7358 7359 // date from iso format 7360 function configFromISO(config) { 7361 var i, 7362 l, 7363 string = config._i, 7364 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), 7365 allowTime, 7366 dateFormat, 7367 timeFormat, 7368 tzFormat, 7369 isoDatesLen = isoDates.length, 7370 isoTimesLen = isoTimes.length; 7371 7372 if (match) { 7373 getParsingFlags(config).iso = true; 7374 for (i = 0, l = isoDatesLen; i < l; i++) { 7375 if (isoDates[i][1].exec(match[1])) { 7376 dateFormat = isoDates[i][0]; 7377 allowTime = isoDates[i][2] !== false; 7378 break; 7379 } 7380 } 7381 if (dateFormat == null) { 7382 config._isValid = false; 7383 return; 7384 } 7385 if (match[3]) { 7386 for (i = 0, l = isoTimesLen; i < l; i++) { 7387 if (isoTimes[i][1].exec(match[3])) { 7388 // match[2] should be 'T' or space 7389 timeFormat = (match[2] || ' ') + isoTimes[i][0]; 7390 break; 7391 } 7392 } 7393 if (timeFormat == null) { 7394 config._isValid = false; 7395 return; 7396 } 7397 } 7398 if (!allowTime && timeFormat != null) { 7399 config._isValid = false; 7400 return; 7401 } 7402 if (match[4]) { 7403 if (tzRegex.exec(match[4])) { 7404 tzFormat = 'Z'; 7405 } else { 7406 config._isValid = false; 7407 return; 7408 } 7409 } 7410 config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); 7411 configFromStringAndFormat(config); 7412 } else { 7413 config._isValid = false; 7414 } 7415 } 7416 7417 function extractFromRFC2822Strings( 7418 yearStr, 7419 monthStr, 7420 dayStr, 7421 hourStr, 7422 minuteStr, 7423 secondStr 7424 ) { 7425 var result = [ 7426 untruncateYear(yearStr), 7427 defaultLocaleMonthsShort.indexOf(monthStr), 7428 parseInt(dayStr, 10), 7429 parseInt(hourStr, 10), 7430 parseInt(minuteStr, 10), 7431 ]; 7432 7433 if (secondStr) { 7434 result.push(parseInt(secondStr, 10)); 7435 } 7436 7437 return result; 7438 } 7439 7440 function untruncateYear(yearStr) { 7441 var year = parseInt(yearStr, 10); 7442 if (year <= 49) { 7443 return 2000 + year; 7444 } else if (year <= 999) { 7445 return 1900 + year; 7446 } 7447 return year; 7448 } 7449 7450 function preprocessRFC2822(s) { 7451 // Remove comments and folding whitespace and replace multiple-spaces with a single space 7452 return s 7453 .replace(/\([^()]*\)|[\n\t]/g, ' ') 7454 .replace(/(\s\s+)/g, ' ') 7455 .replace(/^\s\s*/, '') 7456 .replace(/\s\s*$/, ''); 7457 } 7458 7459 function checkWeekday(weekdayStr, parsedInput, config) { 7460 if (weekdayStr) { 7461 // TODO: Replace the vanilla JS Date object with an independent day-of-week check. 7462 var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), 7463 weekdayActual = new Date( 7464 parsedInput[0], 7465 parsedInput[1], 7466 parsedInput[2] 7467 ).getDay(); 7468 if (weekdayProvided !== weekdayActual) { 7469 getParsingFlags(config).weekdayMismatch = true; 7470 config._isValid = false; 7471 return false; 7472 } 7473 } 7474 return true; 7475 } 7476 7477 function calculateOffset(obsOffset, militaryOffset, numOffset) { 7478 if (obsOffset) { 7479 return obsOffsets[obsOffset]; 7480 } else if (militaryOffset) { 7481 // the only allowed military tz is Z 7482 return 0; 7483 } else { 7484 var hm = parseInt(numOffset, 10), 7485 m = hm % 100, 7486 h = (hm - m) / 100; 7487 return h * 60 + m; 7488 } 7489 } 7490 7491 // date and time from ref 2822 format 7492 function configFromRFC2822(config) { 7493 var match = rfc2822.exec(preprocessRFC2822(config._i)), 7494 parsedArray; 7495 if (match) { 7496 parsedArray = extractFromRFC2822Strings( 7497 match[4], 7498 match[3], 7499 match[2], 7500 match[5], 7501 match[6], 7502 match[7] 7503 ); 7504 if (!checkWeekday(match[1], parsedArray, config)) { 7505 return; 7506 } 7507 7508 config._a = parsedArray; 7509 config._tzm = calculateOffset(match[8], match[9], match[10]); 7510 7511 config._d = createUTCDate.apply(null, config._a); 7512 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 7513 7514 getParsingFlags(config).rfc2822 = true; 7515 } else { 7516 config._isValid = false; 7517 } 7518 } 7519 7520 // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict 7521 function configFromString(config) { 7522 var matched = aspNetJsonRegex.exec(config._i); 7523 if (matched !== null) { 7524 config._d = new Date(+matched[1]); 7525 return; 7526 } 7527 7528 configFromISO(config); 7529 if (config._isValid === false) { 7530 delete config._isValid; 7531 } else { 7532 return; 7533 } 7534 7535 configFromRFC2822(config); 7536 if (config._isValid === false) { 7537 delete config._isValid; 7538 } else { 7539 return; 7540 } 7541 7542 if (config._strict) { 7543 config._isValid = false; 7544 } else { 7545 // Final attempt, use Input Fallback 7546 hooks.createFromInputFallback(config); 7547 } 7548 } 7549 7550 hooks.createFromInputFallback = deprecate( 7551 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 7552
vendor: 18,279 bytes, lines 7552-8131
7552'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 7553 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', 7554 function (config) { 7555 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 7556 } 7557 ); 7558 7559 // Pick the first defined of two or three arguments. 7560 function defaults(a, b, c) { 7561 if (a != null) { 7562 return a; 7563 } 7564 if (b != null) { 7565 return b; 7566 } 7567 return c; 7568 } 7569 7570 function currentDateArray(config) { 7571 // hooks is actually the exported moment object 7572 var nowValue = new Date(hooks.now()); 7573 if (config._useUTC) { 7574 return [ 7575 nowValue.getUTCFullYear(), 7576 nowValue.getUTCMonth(), 7577 nowValue.getUTCDate(), 7578 ]; 7579 } 7580 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; 7581 } 7582 7583 // convert an array to a date. 7584 // the array should mirror the parameters below 7585 // note: all values past the year are optional and will default to the lowest possible value. 7586 // [year, month, day , hour, minute, second, millisecond] 7587 function configFromArray(config) { 7588 var i, 7589 date, 7590 input = [], 7591 currentDate, 7592 expectedWeekday, 7593 yearToUse; 7594 7595 if (config._d) { 7596 return; 7597 } 7598 7599 currentDate = currentDateArray(config); 7600 7601 //compute day of the year from weeks and weekdays 7602 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 7603 dayOfYearFromWeekInfo(config); 7604 } 7605 7606 //if the day of the year is set, figure out what it is 7607 if (config._dayOfYear != null) { 7608 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 7609 7610 if ( 7611 config._dayOfYear > daysInYear(yearToUse) || 7612 config._dayOfYear === 0 7613 ) { 7614 getParsingFlags(config)._overflowDayOfYear = true; 7615 } 7616 7617 date = createUTCDate(yearToUse, 0, config._dayOfYear); 7618 config._a[MONTH] = date.getUTCMonth(); 7619 config._a[DATE] = date.getUTCDate(); 7620 } 7621 7622 // Default to current date. 7623 // * if no year, month, day of month are given, default to today 7624 // * if day of month is given, default month and year 7625 // * if month is given, default only year 7626 // * if year is given, don't default anything 7627 for (i = 0; i < 3 && config._a[i] == null; ++i) { 7628 config._a[i] = input[i] = currentDate[i]; 7629 } 7630 7631 // Zero out whatever was not defaulted, including time 7632 for (; i < 7; i++) { 7633 config._a[i] = input[i] = 7634 config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; 7635 } 7636 7637 // Check for 24:00:00.000 7638 if ( 7639 config._a[HOUR] === 24 && 7640 config._a[MINUTE] === 0 && 7641 config._a[SECOND] === 0 && 7642 config._a[MILLISECOND] === 0 7643 ) { 7644 config._nextDay = true; 7645 config._a[HOUR] = 0; 7646 } 7647 7648 config._d = (config._useUTC ? createUTCDate : createDate).apply( 7649 null, 7650 input 7651 ); 7652 expectedWeekday = config._useUTC 7653 ? config._d.getUTCDay() 7654 : config._d.getDay(); 7655 7656 // Apply timezone offset from input. The actual utcOffset can be changed 7657 // with parseZone. 7658 if (config._tzm != null) { 7659 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 7660 } 7661 7662 if (config._nextDay) { 7663 config._a[HOUR] = 24; 7664 } 7665 7666 // check for mismatching day of week 7667 if ( 7668 config._w && 7669 typeof config._w.d !== 'undefined' && 7670 config._w.d !== expectedWeekday 7671 ) { 7672 getParsingFlags(config).weekdayMismatch = true; 7673 } 7674 } 7675 7676 function dayOfYearFromWeekInfo(config) { 7677 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; 7678 7679 w = config._w; 7680 if (w.GG != null || w.W != null || w.E != null) { 7681 dow = 1; 7682 doy = 4; 7683 7684 // TODO: We need to take the current isoWeekYear, but that depends on 7685 // how we interpret now (local, utc, fixed offset). So create 7686 // a now version of current config (take local/utc/offset flags, and 7687 // create now). 7688 weekYear = defaults( 7689 w.GG, 7690 config._a[YEAR], 7691 weekOfYear(createLocal(), 1, 4).year 7692 ); 7693 week = defaults(w.W, 1); 7694 weekday = defaults(w.E, 1); 7695 if (weekday < 1 || weekday > 7) { 7696 weekdayOverflow = true; 7697 } 7698 } else { 7699 dow = config._locale._week.dow; 7700 doy = config._locale._week.doy; 7701 7702 curWeek = weekOfYear(createLocal(), dow, doy); 7703 7704 weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); 7705 7706 // Default to current week. 7707 week = defaults(w.w, curWeek.week); 7708 7709 if (w.d != null) { 7710 // weekday -- low day numbers are considered next week 7711 weekday = w.d; 7712 if (weekday < 0 || weekday > 6) { 7713 weekdayOverflow = true; 7714 } 7715 } else if (w.e != null) { 7716 // local weekday -- counting starts from beginning of week 7717 weekday = w.e + dow; 7718 if (w.e < 0 || w.e > 6) { 7719 weekdayOverflow = true; 7720 } 7721 } else { 7722 // default to beginning of week 7723 weekday = dow; 7724 } 7725 } 7726 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { 7727 getParsingFlags(config)._overflowWeeks = true; 7728 } else if (weekdayOverflow != null) { 7729 getParsingFlags(config)._overflowWeekday = true; 7730 } else { 7731 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); 7732 config._a[YEAR] = temp.year; 7733 config._dayOfYear = temp.dayOfYear; 7734 } 7735 } 7736 7737 // constant that refers to the ISO standard 7738 hooks.ISO_8601 = function () {}; 7739 7740 // constant that refers to the RFC 2822 form 7741 hooks.RFC_2822 = function () {}; 7742 7743 // date from string and format string 7744 function configFromStringAndFormat(config) { 7745 // TODO: Move this to another part of the creation flow to prevent circular deps 7746 if (config._f === hooks.ISO_8601) { 7747 configFromISO(config); 7748 return; 7749 } 7750 if (config._f === hooks.RFC_2822) { 7751 configFromRFC2822(config); 7752 return; 7753 } 7754 config._a = []; 7755 getParsingFlags(config).empty = true; 7756 7757 // This array is used to make a Date, either with `new Date` or `Date.UTC` 7758 var string = '' + config._i, 7759 i, 7760 parsedInput, 7761 tokens, 7762 token, 7763 skipped, 7764 stringLength = string.length, 7765 totalParsedInputLength = 0, 7766 era, 7767 tokenLen; 7768 7769 tokens = 7770 expandFormat(config._f, config._locale).match(formattingTokens) || []; 7771 tokenLen = tokens.length; 7772 for (i = 0; i < tokenLen; i++) { 7773 token = tokens[i]; 7774 parsedInput = (string.match(getParseRegexForToken(token, config)) || 7775 [])[0]; 7776 if (parsedInput) { 7777 skipped = string.substr(0, string.indexOf(parsedInput)); 7778 if (skipped.length > 0) { 7779 getParsingFlags(config).unusedInput.push(skipped); 7780 } 7781 string = string.slice( 7782 string.indexOf(parsedInput) + parsedInput.length 7783 ); 7784 totalParsedInputLength += parsedInput.length; 7785 } 7786 // don't parse if it's not a known token 7787 if (formatTokenFunctions[token]) { 7788 if (parsedInput) { 7789 getParsingFlags(config).empty = false; 7790 } else { 7791 getParsingFlags(config).unusedTokens.push(token); 7792 } 7793 addTimeToArrayFromToken(token, parsedInput, config); 7794 } else if (config._strict && !parsedInput) { 7795 getParsingFlags(config).unusedTokens.push(token); 7796 } 7797 } 7798 7799 // add remaining unparsed input length to the string 7800 getParsingFlags(config).charsLeftOver = 7801 stringLength - totalParsedInputLength; 7802 if (string.length > 0) { 7803 getParsingFlags(config).unusedInput.push(string); 7804 } 7805 7806 // clear _12h flag if hour is <= 12 7807 if ( 7808 config._a[HOUR] <= 12 && 7809 getParsingFlags(config).bigHour === true && 7810 config._a[HOUR] > 0 7811 ) { 7812 getParsingFlags(config).bigHour = undefined; 7813 } 7814 7815 getParsingFlags(config).parsedDateParts = config._a.slice(0); 7816 getParsingFlags(config).meridiem = config._meridiem; 7817 // handle meridiem 7818 config._a[HOUR] = meridiemFixWrap( 7819 config._locale, 7820 config._a[HOUR], 7821 config._meridiem 7822 ); 7823 7824 // handle era 7825 era = getParsingFlags(config).era; 7826 if (era !== null) { 7827 config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); 7828 } 7829 7830 configFromArray(config); 7831 checkOverflow(config); 7832 } 7833 7834 function meridiemFixWrap(locale, hour, meridiem) { 7835 var isPm; 7836 7837 if (meridiem == null) { 7838 // nothing to do 7839 return hour; 7840 } 7841 if (locale.meridiemHour != null) { 7842 return locale.meridiemHour(hour, meridiem); 7843 } else if (locale.isPM != null) { 7844 // Fallback 7845 isPm = locale.isPM(meridiem); 7846 if (isPm && hour < 12) { 7847 hour += 12; 7848 } 7849 if (!isPm && hour === 12) { 7850 hour = 0; 7851 } 7852 return hour; 7853 } else { 7854 // this is not supposed to happen 7855 return hour; 7856 } 7857 } 7858 7859 // date from string and array of format strings 7860 function configFromStringAndArray(config) { 7861 var tempConfig, 7862 bestMoment, 7863 scoreToBeat, 7864 i, 7865 currentScore, 7866 validFormatFound, 7867 bestFormatIsValid = false, 7868 configfLen = config._f.length; 7869 7870 if (configfLen === 0) { 7871 getParsingFlags(config).invalidFormat = true; 7872 config._d = new Date(NaN); 7873 return; 7874 } 7875 7876 for (i = 0; i < configfLen; i++) { 7877 currentScore = 0; 7878 validFormatFound = false; 7879 tempConfig = copyConfig({}, config); 7880 if (config._useUTC != null) { 7881 tempConfig._useUTC = config._useUTC; 7882 } 7883 tempConfig._f = config._f[i]; 7884 configFromStringAndFormat(tempConfig); 7885 7886 if (isValid(tempConfig)) { 7887 validFormatFound = true; 7888 } 7889 7890 // if there is any input that was not parsed add a penalty for that format 7891 currentScore += getParsingFlags(tempConfig).charsLeftOver; 7892 7893 //or tokens 7894 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 7895 7896 getParsingFlags(tempConfig).score = currentScore; 7897 7898 if (!bestFormatIsValid) { 7899 if ( 7900 scoreToBeat == null || 7901 currentScore < scoreToBeat || 7902 validFormatFound 7903 ) { 7904 scoreToBeat = currentScore; 7905 bestMoment = tempConfig; 7906 if (validFormatFound) { 7907 bestFormatIsValid = true; 7908 } 7909 } 7910 } else { 7911 if (currentScore < scoreToBeat) { 7912 scoreToBeat = currentScore; 7913 bestMoment = tempConfig; 7914 } 7915 } 7916 } 7917 7918 extend(config, bestMoment || tempConfig); 7919 } 7920 7921 function configFromObject(config) { 7922 if (config._d) { 7923 return; 7924 } 7925 7926 var i = normalizeObjectUnits(config._i), 7927 dayOrDate = i.day === undefined ? i.date : i.day; 7928 config._a = map( 7929 [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], 7930 function (obj) { 7931 return obj && parseInt(obj, 10); 7932 } 7933 ); 7934 7935 configFromArray(config); 7936 } 7937 7938 function createFromConfig(config) { 7939 var res = new Moment(checkOverflow(prepareConfig(config))); 7940 if (res._nextDay) { 7941 // Adding is smart enough around DST 7942 res.add(1, 'd'); 7943 res._nextDay = undefined; 7944 } 7945 7946 return res; 7947 } 7948 7949 function prepareConfig(config) { 7950 var input = config._i, 7951 format = config._f; 7952 7953 config._locale = config._locale || getLocale(config._l); 7954 7955 if (input === null || (format === undefined && input === '')) { 7956 return createInvalid({ nullInput: true }); 7957 } 7958 7959 if (typeof input === 'string') { 7960 config._i = input = config._locale.preparse(input); 7961 } 7962 7963 if (isMoment(input)) { 7964 return new Moment(checkOverflow(input)); 7965 } else if (isDate(input)) { 7966 config._d = input; 7967 } else if (isArray(format)) { 7968 configFromStringAndArray(config); 7969 } else if (format) { 7970 configFromStringAndFormat(config); 7971 } else { 7972 configFromInput(config); 7973 } 7974 7975 if (!isValid(config)) { 7976 config._d = null; 7977 } 7978 7979 return config; 7980 } 7981 7982 function configFromInput(config) { 7983 var input = config._i; 7984 if (isUndefined(input)) { 7985 config._d = new Date(hooks.now()); 7986 } else if (isDate(input)) { 7987 config._d = new Date(input.valueOf()); 7988 } else if (typeof input === 'string') { 7989 configFromString(config); 7990 } else if (isArray(input)) { 7991 config._a = map(input.slice(0), function (obj) { 7992 return parseInt(obj, 10); 7993 }); 7994 configFromArray(config); 7995 } else if (isObject(input)) { 7996 configFromObject(config); 7997 } else if (isNumber(input)) { 7998 // from milliseconds 7999 config._d = new Date(input); 8000 } else { 8001 hooks.createFromInputFallback(config); 8002 } 8003 } 8004 8005 function createLocalOrUTC(input, format, locale, strict, isUTC) { 8006 var c = {}; 8007 8008 if (format === true || format === false) { 8009 strict = format; 8010 format = undefined; 8011 } 8012 8013 if (locale === true || locale === false) { 8014 strict = locale; 8015 locale = undefined; 8016 } 8017 8018 if ( 8019 (isObject(input) && isObjectEmpty(input)) || 8020 (isArray(input) && input.length === 0) 8021 ) { 8022 input = undefined; 8023 } 8024 // object construction must be done this way. 8025 // https://github.com/moment/moment/issues/1423 8026 c._isAMomentObject = true; 8027 c._useUTC = c._isUTC = isUTC; 8028 c._l = locale; 8029 c._i = input; 8030 c._f = format; 8031 c._strict = strict; 8032 8033 return createFromConfig(c); 8034 } 8035 8036 function createLocal(input, format, locale, strict) { 8037 return createLocalOrUTC(input, format, locale, strict, false); 8038 } 8039 8040 var prototypeMin = deprecate( 8041 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', 8042 function () { 8043 var other = createLocal.apply(null, arguments); 8044 if (this.isValid() && other.isValid()) { 8045 return other < this ? this : other; 8046 } else { 8047 return createInvalid(); 8048 } 8049 } 8050 ), 8051 prototypeMax = deprecate( 8052 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', 8053 function () { 8054 var other = createLocal.apply(null, arguments); 8055 if (this.isValid() && other.isValid()) { 8056 return other > this ? this : other; 8057 } else { 8058 return createInvalid(); 8059 } 8060 } 8061 ); 8062 8063 // Pick a moment m from moments so that m[fn](other) is true for all 8064 // other. This relies on the function fn to be transitive. 8065 // 8066 // moments should either be an array of moment objects or an array, whose 8067 // first element is an array of moment objects. 8068 function pickBy(fn, moments) { 8069 var res, i; 8070 if (moments.length === 1 && isArray(moments[0])) { 8071 moments = moments[0]; 8072 } 8073 if (!moments.length) { 8074 return createLocal(); 8075 } 8076 res = moments[0]; 8077 for (i = 1; i < moments.length; ++i) { 8078 if (!moments[i].isValid() || moments[i][fn](res)) { 8079 res = moments[i]; 8080 } 8081 } 8082 return res; 8083 } 8084 8085 // TODO: Use [].sort instead? 8086 function min() { 8087 var args = [].slice.call(arguments, 0); 8088 8089 return pickBy('isBefore', args); 8090 } 8091 8092 function max() { 8093 var args = [].slice.call(arguments, 0); 8094 8095 return pickBy('isAfter', args); 8096 } 8097 8098 var now = function () { 8099 return Date.now ? Date.now() : +new Date(); 8100 }; 8101 8102 var ordering = [ 8103 'year', 8104 'quarter', 8105 'month', 8106 'week', 8107 'day', 8108 'hour', 8109 'minute', 8110 'second', 8111 'millisecond', 8112 ]; 8113 8114 function isDurationValid(m) { 8115 var key, 8116 unitHasDecimal = false, 8117 i, 8118 orderLen = ordering.length; 8119 for (key in m) { 8120 if ( 8121 hasOwnProp(m, key) && 8122 !( 8123 indexOf.call(ordering, key) !== -1 && 8124 (m[key] == null || !isNaN(m[key])) 8125 ) 8126 ) { 8127 return false; 8128 } 8129 } 8130 8131 for (i = 0; i < orderLen
vendor: 10,251 bytes, lines 8131-8456
8131; ++i) { 8132 if (m[ordering[i]]) { 8133 if (unitHasDecimal) { 8134 return false; // only allow non-integers for smallest unit 8135 } 8136 if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { 8137 unitHasDecimal = true; 8138 } 8139 } 8140 } 8141 8142 return true; 8143 } 8144 8145 function isValid$1() { 8146 return this._isValid; 8147 } 8148 8149 function createInvalid$1() { 8150 return createDuration(NaN); 8151 } 8152 8153 function Duration(duration) { 8154 var normalizedInput = normalizeObjectUnits(duration), 8155 years = normalizedInput.year || 0, 8156 quarters = normalizedInput.quarter || 0, 8157 months = normalizedInput.month || 0, 8158 weeks = normalizedInput.week || normalizedInput.isoWeek || 0, 8159 days = normalizedInput.day || 0, 8160 hours = normalizedInput.hour || 0, 8161 minutes = normalizedInput.minute || 0, 8162 seconds = normalizedInput.second || 0, 8163 milliseconds = normalizedInput.millisecond || 0; 8164 8165 this._isValid = isDurationValid(normalizedInput); 8166 8167 // representation for dateAddRemove 8168 this._milliseconds = 8169 +milliseconds + 8170 seconds * 1e3 + // 1000 8171 minutes * 6e4 + // 1000 * 60 8172 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 8173 // Because of dateAddRemove treats 24 hours as different from a 8174 // day when working around DST, we need to store them separately 8175 this._days = +days + weeks * 7; 8176 // It is impossible to translate months into days without knowing 8177 // which months you are are talking about, so we have to store 8178 // it separately. 8179 this._months = +months + quarters * 3 + years * 12; 8180 8181 this._data = {}; 8182 8183 this._locale = getLocale(); 8184 8185 this._bubble(); 8186 } 8187 8188 function isDuration(obj) { 8189 return obj instanceof Duration; 8190 } 8191 8192 function absRound(number) { 8193 if (number < 0) { 8194 return Math.round(-1 * number) * -1; 8195 } else { 8196 return Math.round(number); 8197 } 8198 } 8199 8200 // compare two arrays, return the number of differences 8201 function compareArrays(array1, array2, dontConvert) { 8202 var len = Math.min(array1.length, array2.length), 8203 lengthDiff = Math.abs(array1.length - array2.length), 8204 diffs = 0, 8205 i; 8206 for (i = 0; i < len; i++) { 8207 if ( 8208 (dontConvert && array1[i] !== array2[i]) || 8209 (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) 8210 ) { 8211 diffs++; 8212 } 8213 } 8214 return diffs + lengthDiff; 8215 } 8216 8217 // FORMATTING 8218 8219 function offset(token, separator) { 8220 addFormatToken(token, 0, 0, function () { 8221 var offset = this.utcOffset(), 8222 sign = '+'; 8223 if (offset < 0) { 8224 offset = -offset; 8225 sign = '-'; 8226 } 8227 return ( 8228 sign + 8229 zeroFill(~~(offset / 60), 2) + 8230 separator + 8231 zeroFill(~~offset % 60, 2) 8232 ); 8233 }); 8234 } 8235 8236 offset('Z', ':'); 8237 offset('ZZ', ''); 8238 8239 // PARSING 8240 8241 addRegexToken('Z', matchShortOffset); 8242 addRegexToken('ZZ', matchShortOffset); 8243 addParseToken(['Z', 'ZZ'], function (input, array, config) { 8244 config._useUTC = true; 8245 config._tzm = offsetFromString(matchShortOffset, input); 8246 }); 8247 8248 // HELPERS 8249 8250 // timezone chunker 8251 // '+10:00' > ['10', '00'] 8252 // '-1530' > ['-15', '30'] 8253 var chunkOffset = /([\+\-]|\d\d)/gi; 8254 8255 function offsetFromString(matcher, string) { 8256 var matches = (string || '').match(matcher), 8257 chunk, 8258 parts, 8259 minutes; 8260 8261 if (matches === null) { 8262 return null; 8263 } 8264 8265 chunk = matches[matches.length - 1] || []; 8266 parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 8267 minutes = +(parts[1] * 60) + toInt(parts[2]); 8268 8269 return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; 8270 } 8271 8272 // Return a moment from input, that is local/utc/zone equivalent to model. 8273 function cloneWithOffset(input, model) { 8274 var res, diff; 8275 if (model._isUTC) { 8276 res = model.clone(); 8277 diff = 8278 (isMoment(input) || isDate(input) 8279 ? input.valueOf() 8280 : createLocal(input).valueOf()) - res.valueOf(); 8281 // Use low-level api, because this fn is low-level api. 8282 res._d.setTime(res._d.valueOf() + diff); 8283 hooks.updateOffset(res, false); 8284 return res; 8285 } else { 8286 return createLocal(input).local(); 8287 } 8288 } 8289 8290 function getDateOffset(m) { 8291 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 8292 // https://github.com/moment/moment/pull/1871 8293 return -Math.round(m._d.getTimezoneOffset()); 8294 } 8295 8296 // HOOKS 8297 8298 // This function will be called whenever a moment is mutated. 8299 // It is intended to keep the offset in sync with the timezone. 8300 hooks.updateOffset = function () {}; 8301 8302 // MOMENTS 8303 8304 // keepLocalTime = true means only change the timezone, without 8305 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 8306 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 8307 // +0200, so we adjust the time as needed, to be valid. 8308 // 8309 // Keeping the time actually adds/subtracts (one hour) 8310 // from the actual represented time. That is why we call updateOffset 8311 // a second time. In case it wants us to change the offset again 8312 // _changeInProgress == true case, then we have to adjust, because 8313 // there is no such time in the given timezone. 8314 function getSetOffset(input, keepLocalTime, keepMinutes) { 8315 var offset = this._offset || 0, 8316 localAdjust; 8317 if (!this.isValid()) { 8318 return input != null ? this : NaN; 8319 } 8320 if (input != null) { 8321 if (typeof input === 'string') { 8322 input = offsetFromString(matchShortOffset, input); 8323 if (input === null) { 8324 return this; 8325 } 8326 } else if (Math.abs(input) < 16 && !keepMinutes) { 8327 input = input * 60; 8328 } 8329 if (!this._isUTC && keepLocalTime) { 8330 localAdjust = getDateOffset(this); 8331 } 8332 this._offset = input; 8333 this._isUTC = true; 8334 if (localAdjust != null) { 8335 this.add(localAdjust, 'm'); 8336 } 8337 if (offset !== input) { 8338 if (!keepLocalTime || this._changeInProgress) { 8339 addSubtract( 8340 this, 8341 createDuration(input - offset, 'm'), 8342 1, 8343 false 8344 ); 8345 } else if (!this._changeInProgress) { 8346 this._changeInProgress = true; 8347 hooks.updateOffset(this, true); 8348 this._changeInProgress = null; 8349 } 8350 } 8351 return this; 8352 } else { 8353 return this._isUTC ? offset : getDateOffset(this); 8354 } 8355 } 8356 8357 function getSetZone(input, keepLocalTime) { 8358 if (input != null) { 8359 if (typeof input !== 'string') { 8360 input = -input; 8361 } 8362 8363 this.utcOffset(input, keepLocalTime); 8364 8365 return this; 8366 } else { 8367 return -this.utcOffset(); 8368 } 8369 } 8370 8371 function setOffsetToUTC(keepLocalTime) { 8372 return this.utcOffset(0, keepLocalTime); 8373 } 8374 8375 function setOffsetToLocal(keepLocalTime) { 8376 if (this._isUTC) { 8377 this.utcOffset(0, keepLocalTime); 8378 this._isUTC = false; 8379 8380 if (keepLocalTime) { 8381 this.subtract(getDateOffset(this), 'm'); 8382 } 8383 } 8384 return this; 8385 } 8386 8387 function setOffsetToParsedOffset() { 8388 if (this._tzm != null) { 8389 this.utcOffset(this._tzm, false, true); 8390 } else if (typeof this._i === 'string') { 8391 var tZone = offsetFromString(matchOffset, this._i); 8392 if (tZone != null) { 8393 this.utcOffset(tZone); 8394 } else { 8395 this.utcOffset(0, true); 8396 } 8397 } 8398 return this; 8399 } 8400 8401 function hasAlignedHourOffset(input) { 8402 if (!this.isValid()) { 8403 return false; 8404 } 8405 input = input ? createLocal(input).utcOffset() : 0; 8406 8407 return (this.utcOffset() - input) % 60 === 0; 8408 } 8409 8410 function isDaylightSavingTime() { 8411 return ( 8412 this.utcOffset() > this.clone().month(0).utcOffset() || 8413 this.utcOffset() > this.clone().month(5).utcOffset() 8414 ); 8415 } 8416 8417 function isDaylightSavingTimeShifted() { 8418 if (!isUndefined(this._isDSTShifted)) { 8419 return this._isDSTShifted; 8420 } 8421 8422 var c = {}, 8423 other; 8424 8425 copyConfig(c, this); 8426 c = prepareConfig(c); 8427 8428 if (c._a) { 8429 other = c._isUTC ? createUTC(c._a) : createLocal(c._a); 8430 this._isDSTShifted = 8431 this.isValid() && compareArrays(c._a, other.toArray()) > 0; 8432 } else { 8433 this._isDSTShifted = false; 8434 } 8435 8436 return this._isDSTShifted; 8437 } 8438 8439 function isLocal() { 8440 return this.isValid() ? !this._isUTC : false; 8441 } 8442 8443 function isUtcOffset() { 8444 return this.isValid() ? this._isUTC : false; 8445 } 8446 8447 function isUtc() { 8448 return this.isValid() ? this._isUTC && this._offset === 0 : false; 8449 } 8450 8451 // ASP.NET json date format regex 8452 var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, 8453 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 8454 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 8455 // and further modified to allow for strings containing both week and day 8456 isoRegex =
vendor: 9,121 bytes, lines 8456-8746
8456 8457 /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; 8458 8459 function createDuration(input, key) { 8460 var duration = input, 8461 // matching against regexp is expensive, do it on demand 8462 match = null, 8463 sign, 8464 ret, 8465 diffRes; 8466 8467 if (isDuration(input)) { 8468 duration = { 8469 ms: input._milliseconds, 8470 d: input._days, 8471 M: input._months, 8472 }; 8473 } else if (isNumber(input) || !isNaN(+input)) { 8474 duration = {}; 8475 if (key) { 8476 duration[key] = +input; 8477 } else { 8478 duration.milliseconds = +input; 8479 } 8480 } else if ((match = aspNetRegex.exec(input))) { 8481 sign = match[1] === '-' ? -1 : 1; 8482 duration = { 8483 y: 0, 8484 d: toInt(match[DATE]) * sign, 8485 h: toInt(match[HOUR]) * sign, 8486 m: toInt(match[MINUTE]) * sign, 8487 s: toInt(match[SECOND]) * sign, 8488 ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match 8489 }; 8490 } else if ((match = isoRegex.exec(input))) { 8491 sign = match[1] === '-' ? -1 : 1; 8492 duration = { 8493 y: parseIso(match[2], sign), 8494 M: parseIso(match[3], sign), 8495 w: parseIso(match[4], sign), 8496 d: parseIso(match[5], sign), 8497 h: parseIso(match[6], sign), 8498 m: parseIso(match[7], sign), 8499 s: parseIso(match[8], sign), 8500 }; 8501 } else if (duration == null) { 8502 // checks for null or undefined 8503 duration = {}; 8504 } else if ( 8505 typeof duration === 'object' && 8506 ('from' in duration || 'to' in duration) 8507 ) { 8508 diffRes = momentsDifference( 8509 createLocal(duration.from), 8510 createLocal(duration.to) 8511 ); 8512 8513 duration = {}; 8514 duration.ms = diffRes.milliseconds; 8515 duration.M = diffRes.months; 8516 } 8517 8518 ret = new Duration(duration); 8519 8520 if (isDuration(input) && hasOwnProp(input, '_locale')) { 8521 ret._locale = input._locale; 8522 } 8523 8524 if (isDuration(input) && hasOwnProp(input, '_isValid')) { 8525 ret._isValid = input._isValid; 8526 } 8527 8528 return ret; 8529 } 8530 8531 createDuration.fn = Duration.prototype; 8532 createDuration.invalid = createInvalid$1; 8533 8534 function parseIso(inp, sign) { 8535 // We'd normally use ~~inp for this, but unfortunately it also 8536 // converts floats to ints. 8537 // inp may be undefined, so careful calling replace on it. 8538 var res = inp && parseFloat(inp.replace(',', '.')); 8539 // apply sign while we're at it 8540 return (isNaN(res) ? 0 : res) * sign; 8541 } 8542 8543 function positiveMomentsDifference(base, other) { 8544 var res = {}; 8545 8546 res.months = 8547 other.month() - base.month() + (other.year() - base.year()) * 12; 8548 if (base.clone().add(res.months, 'M').isAfter(other)) { 8549 --res.months; 8550 } 8551 8552 res.milliseconds = +other - +base.clone().add(res.months, 'M'); 8553 8554 return res; 8555 } 8556 8557 function momentsDifference(base, other) { 8558 var res; 8559 if (!(base.isValid() && other.isValid())) { 8560 return { milliseconds: 0, months: 0 }; 8561 } 8562 8563 other = cloneWithOffset(other, base); 8564 if (base.isBefore(other)) { 8565 res = positiveMomentsDifference(base, other); 8566 } else { 8567 res = positiveMomentsDifference(other, base); 8568 res.milliseconds = -res.milliseconds; 8569 res.months = -res.months; 8570 } 8571 8572 return res; 8573 } 8574 8575 // TODO: remove 'name' arg after deprecation is removed 8576 function createAdder(direction, name) { 8577 return function (val, period) { 8578 var dur, tmp; 8579 //invert the arguments, but complain about it 8580 if (period !== null && !isNaN(+period)) { 8581 deprecateSimple( 8582 name, 8583 'moment().' + 8584 name + 8585 '(period, number) is deprecated. Please use moment().' + 8586 name + 8587 '(number, period). ' + 8588 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' 8589 ); 8590 tmp = val; 8591 val = period; 8592 period = tmp; 8593 } 8594 8595 dur = createDuration(val, period); 8596 addSubtract(this, dur, direction); 8597 return this; 8598 }; 8599 } 8600 8601 function addSubtract(mom, duration, isAdding, updateOffset) { 8602 var milliseconds = duration._milliseconds, 8603 days = absRound(duration._days), 8604 months = absRound(duration._months); 8605 8606 if (!mom.isValid()) { 8607 // No op 8608 return; 8609 } 8610 8611 updateOffset = updateOffset == null ? true : updateOffset; 8612 8613 if (months) { 8614 setMonth(mom, get(mom, 'Month') + months * isAdding); 8615 } 8616 if (days) { 8617 set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); 8618 } 8619 if (milliseconds) { 8620 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); 8621 } 8622 if (updateOffset) { 8623 hooks.updateOffset(mom, days || months); 8624 } 8625 } 8626 8627 var add = createAdder(1, 'add'), 8628 subtract = createAdder(-1, 'subtract'); 8629 8630 function isString(input) { 8631 return typeof input === 'string' || input instanceof String; 8632 } 8633 8634 // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined 8635 function isMomentInput(input) { 8636 return ( 8637 isMoment(input) || 8638 isDate(input) || 8639 isString(input) || 8640 isNumber(input) || 8641 isNumberOrStringArray(input) || 8642 isMomentInputObject(input) || 8643 input === null || 8644 input === undefined 8645 ); 8646 } 8647 8648 function isMomentInputObject(input) { 8649 var objectTest = isObject(input) && !isObjectEmpty(input), 8650 propertyTest = false, 8651 properties = [ 8652 'years', 8653 'year', 8654 'y', 8655 'months', 8656 'month', 8657 'M', 8658 'days', 8659 'day', 8660 'd', 8661 'dates', 8662 'date', 8663 'D', 8664 'hours', 8665 'hour', 8666 'h', 8667 'minutes', 8668 'minute', 8669 'm', 8670 'seconds', 8671 'second', 8672 's', 8673 'milliseconds', 8674 'millisecond', 8675 'ms', 8676 ], 8677 i, 8678 property, 8679 propertyLen = properties.length; 8680 8681 for (i = 0; i < propertyLen; i += 1) { 8682 property = properties[i]; 8683 propertyTest = propertyTest || hasOwnProp(input, property); 8684 } 8685 8686 return objectTest && propertyTest; 8687 } 8688 8689 function isNumberOrStringArray(input) { 8690 var arrayTest = isArray(input), 8691 dataTypeTest = false; 8692 if (arrayTest) { 8693 dataTypeTest = 8694 input.filter(function (item) { 8695 return !isNumber(item) && isString(input); 8696 }).length === 0; 8697 } 8698 return arrayTest && dataTypeTest; 8699 } 8700 8701 function isCalendarSpec(input) { 8702 var objectTest = isObject(input) && !isObjectEmpty(input), 8703 propertyTest = false, 8704 properties = [ 8705 'sameDay', 8706 'nextDay', 8707 'lastDay', 8708 'nextWeek', 8709 'lastWeek', 8710 'sameElse', 8711 ], 8712 i, 8713 property; 8714 8715 for (i = 0; i < properties.length; i += 1) { 8716 property = properties[i]; 8717 propertyTest = propertyTest || hasOwnProp(input, property); 8718 } 8719 8720 return objectTest && propertyTest; 8721 } 8722 8723 function getCalendarFormat(myMoment, now) { 8724 var diff = myMoment.diff(now, 'days', true); 8725 return diff < -6 8726 ? 'sameElse' 8727 : diff < -1 8728 ? 'lastWeek' 8729 : diff < 0 8730 ? 'lastDay' 8731 : diff < 1 8732 ? 'sameDay' 8733 : diff < 2 8734 ? 'nextDay' 8735 : diff < 7 8736 ? 'nextWeek' 8737 : 'sameElse'; 8738 } 8739 8740 function calendar$1(time, formats) { 8741 // Support for single parameter, formats only overload to the calendar function 8742 if (arguments.length === 1) { 8743 if (!arguments[0]) { 8744 time = undefined; 8745 formats = undefined; 8746 } else
vendor: 17,627 bytes, lines 8746-9304
8746 if (isMomentInput(arguments[0])) { 8747 time = arguments[0]; 8748 formats = undefined; 8749 } else if (isCalendarSpec(arguments[0])) { 8750 formats = arguments[0]; 8751 time = undefined; 8752 } 8753 } 8754 // We want to compare the start of today, vs this. 8755 // Getting start-of-today depends on whether we're local/utc/offset or not. 8756 var now = time || createLocal(), 8757 sod = cloneWithOffset(now, this).startOf('day'), 8758 format = hooks.calendarFormat(this, sod) || 'sameElse', 8759 output = 8760 formats && 8761 (isFunction(formats[format]) 8762 ? formats[format].call(this, now) 8763 : formats[format]); 8764 8765 return this.format( 8766 output || this.localeData().calendar(format, this, createLocal(now)) 8767 ); 8768 } 8769 8770 function clone() { 8771 return new Moment(this); 8772 } 8773 8774 function isAfter(input, units) { 8775 var localInput = isMoment(input) ? input : createLocal(input); 8776 if (!(this.isValid() && localInput.isValid())) { 8777 return false; 8778 } 8779 units = normalizeUnits(units) || 'millisecond'; 8780 if (units === 'millisecond') { 8781 return this.valueOf() > localInput.valueOf(); 8782 } else { 8783 return localInput.valueOf() < this.clone().startOf(units).valueOf(); 8784 } 8785 } 8786 8787 function isBefore(input, units) { 8788 var localInput = isMoment(input) ? input : createLocal(input); 8789 if (!(this.isValid() && localInput.isValid())) { 8790 return false; 8791 } 8792 units = normalizeUnits(units) || 'millisecond'; 8793 if (units === 'millisecond') { 8794 return this.valueOf() < localInput.valueOf(); 8795 } else { 8796 return this.clone().endOf(units).valueOf() < localInput.valueOf(); 8797 } 8798 } 8799 8800 function isBetween(from, to, units, inclusivity) { 8801 var localFrom = isMoment(from) ? from : createLocal(from), 8802 localTo = isMoment(to) ? to : createLocal(to); 8803 if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { 8804 return false; 8805 } 8806 inclusivity = inclusivity || '()'; 8807 return ( 8808 (inclusivity[0] === '(' 8809 ? this.isAfter(localFrom, units) 8810 : !this.isBefore(localFrom, units)) && 8811 (inclusivity[1] === ')' 8812 ? this.isBefore(localTo, units) 8813 : !this.isAfter(localTo, units)) 8814 ); 8815 } 8816 8817 function isSame(input, units) { 8818 var localInput = isMoment(input) ? input : createLocal(input), 8819 inputMs; 8820 if (!(this.isValid() && localInput.isValid())) { 8821 return false; 8822 } 8823 units = normalizeUnits(units) || 'millisecond'; 8824 if (units === 'millisecond') { 8825 return this.valueOf() === localInput.valueOf(); 8826 } else { 8827 inputMs = localInput.valueOf(); 8828 return ( 8829 this.clone().startOf(units).valueOf() <= inputMs && 8830 inputMs <= this.clone().endOf(units).valueOf() 8831 ); 8832 } 8833 } 8834 8835 function isSameOrAfter(input, units) { 8836 return this.isSame(input, units) || this.isAfter(input, units); 8837 } 8838 8839 function isSameOrBefore(input, units) { 8840 return this.isSame(input, units) || this.isBefore(input, units); 8841 } 8842 8843 function diff(input, units, asFloat) { 8844 var that, zoneDelta, output; 8845 8846 if (!this.isValid()) { 8847 return NaN; 8848 } 8849 8850 that = cloneWithOffset(input, this); 8851 8852 if (!that.isValid()) { 8853 return NaN; 8854 } 8855 8856 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; 8857 8858 units = normalizeUnits(units); 8859 8860 switch (units) { 8861 case 'year': 8862 output = monthDiff(this, that) / 12; 8863 break; 8864 case 'month': 8865 output = monthDiff(this, that); 8866 break; 8867 case 'quarter': 8868 output = monthDiff(this, that) / 3; 8869 break; 8870 case 'second': 8871 output = (this - that) / 1e3; 8872 break; // 1000 8873 case 'minute': 8874 output = (this - that) / 6e4; 8875 break; // 1000 * 60 8876 case 'hour': 8877 output = (this - that) / 36e5; 8878 break; // 1000 * 60 * 60 8879 case 'day': 8880 output = (this - that - zoneDelta) / 864e5; 8881 break; // 1000 * 60 * 60 * 24, negate dst 8882 case 'week': 8883 output = (this - that - zoneDelta) / 6048e5; 8884 break; // 1000 * 60 * 60 * 24 * 7, negate dst 8885 default: 8886 output = this - that; 8887 } 8888 8889 return asFloat ? output : absFloor(output); 8890 } 8891 8892 function monthDiff(a, b) { 8893 if (a.date() < b.date()) { 8894 // end-of-month calculations work correct when the start month has more 8895 // days than the end month. 8896 return -monthDiff(b, a); 8897 } 8898 // difference in months 8899 var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), 8900 // b is in (anchor - 1 month, anchor + 1 month) 8901 anchor = a.clone().add(wholeMonthDiff, 'months'), 8902 anchor2, 8903 adjust; 8904 8905 if (b - anchor < 0) { 8906 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); 8907 // linear across the month 8908 adjust = (b - anchor) / (anchor - anchor2); 8909 } else { 8910 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); 8911 // linear across the month 8912 adjust = (b - anchor) / (anchor2 - anchor); 8913 } 8914 8915 //check for negative zero, return zero if negative zero 8916 return -(wholeMonthDiff + adjust) || 0; 8917 } 8918 8919 hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 8920 hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; 8921 8922 function toString() { 8923 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 8924 } 8925 8926 function toISOString(keepOffset) { 8927 if (!this.isValid()) { 8928 return null; 8929 } 8930 var utc = keepOffset !== true, 8931 m = utc ? this.clone().utc() : this; 8932 if (m.year() < 0 || m.year() > 9999) { 8933 return formatMoment( 8934 m, 8935 utc 8936 ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' 8937 : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' 8938 ); 8939 } 8940 if (isFunction(Date.prototype.toISOString)) { 8941 // native implementation is ~50x faster, use it when we can 8942 if (utc) { 8943 return this.toDate().toISOString(); 8944 } else { 8945 return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) 8946 .toISOString() 8947 .replace('Z', formatMoment(m, 'Z')); 8948 } 8949 } 8950 return formatMoment( 8951 m, 8952 utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' 8953 ); 8954 } 8955 8956 /** 8957 * Return a human readable representation of a moment that can 8958 * also be evaluated to get a new moment which is the same 8959 * 8960 * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects 8961 */ 8962 function inspect() { 8963 if (!this.isValid()) { 8964 return 'moment.invalid(/* ' + this._i + ' */)'; 8965 } 8966 var func = 'moment', 8967 zone = '', 8968 prefix, 8969 year, 8970 datetime, 8971 suffix; 8972 if (!this.isLocal()) { 8973 func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; 8974 zone = 'Z'; 8975 } 8976 prefix = '[' + func + '("]'; 8977 year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; 8978 datetime = '-MM-DD[T]HH:mm:ss.SSS'; 8979 suffix = zone + '[")]'; 8980 8981 return this.format(prefix + year + datetime + suffix); 8982 } 8983 8984 function format(inputString) { 8985 if (!inputString) { 8986 inputString = this.isUtc() 8987 ? hooks.defaultFormatUtc 8988 : hooks.defaultFormat; 8989 } 8990 var output = formatMoment(this, inputString); 8991 return this.localeData().postformat(output); 8992 } 8993 8994 function from(time, withoutSuffix) { 8995 if ( 8996 this.isValid() && 8997 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 8998 ) { 8999 return createDuration({ to: this, from: time }) 9000 .locale(this.locale()) 9001 .humanize(!withoutSuffix); 9002 } else { 9003 return this.localeData().invalidDate(); 9004 } 9005 } 9006 9007 function fromNow(withoutSuffix) { 9008 return this.from(createLocal(), withoutSuffix); 9009 } 9010 9011 function to(time, withoutSuffix) { 9012 if ( 9013 this.isValid() && 9014 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 9015 ) { 9016 return createDuration({ from: this, to: time }) 9017 .locale(this.locale()) 9018 .humanize(!withoutSuffix); 9019 } else { 9020 return this.localeData().invalidDate(); 9021 } 9022 } 9023 9024 function toNow(withoutSuffix) { 9025 return this.to(createLocal(), withoutSuffix); 9026 } 9027 9028 // If passed a locale key, it will set the locale for this 9029 // instance. Otherwise, it will return the locale configuration 9030 // variables for this instance. 9031 function locale(key) { 9032 var newLocaleData; 9033 9034 if (key === undefined) { 9035 return this._locale._abbr; 9036 } else { 9037 newLocaleData = getLocale(key); 9038 if (newLocaleData != null) { 9039 this._locale = newLocaleData; 9040 } 9041 return this; 9042 } 9043 } 9044 9045 var lang = deprecate( 9046 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 9047 function (key) { 9048 if (key === undefined) { 9049 return this.localeData(); 9050 } else { 9051 return this.locale(key); 9052 } 9053 } 9054 ); 9055 9056 function localeData() { 9057 return this._locale; 9058 } 9059 9060 var MS_PER_SECOND = 1000, 9061 MS_PER_MINUTE = 60 * MS_PER_SECOND, 9062 MS_PER_HOUR = 60 * MS_PER_MINUTE, 9063 MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; 9064 9065 // actual modulo - handles negative numbers (for dates before 1970): 9066 function mod$1(dividend, divisor) { 9067 return ((dividend % divisor) + divisor) % divisor; 9068 } 9069 9070 function localStartOfDate(y, m, d) { 9071 // the date constructor remaps years 0-99 to 1900-1999 9072 if (y < 100 && y >= 0) { 9073 // preserve leap years using a full 400 year cycle, then reset 9074 return new Date(y + 400, m, d) - MS_PER_400_YEARS; 9075 } else { 9076 return new Date(y, m, d).valueOf(); 9077 } 9078 } 9079 9080 function utcStartOfDate(y, m, d) { 9081 // Date.UTC remaps years 0-99 to 1900-1999 9082 if (y < 100 && y >= 0) { 9083 // preserve leap years using a full 400 year cycle, then reset 9084 return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; 9085 } else { 9086 return Date.UTC(y, m, d); 9087 } 9088 } 9089 9090 function startOf(units) { 9091 var time, startOfDate; 9092 units = normalizeUnits(units); 9093 if (units === undefined || units === 'millisecond' || !this.isValid()) { 9094 return this; 9095 } 9096 9097 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 9098 9099 switch (units) { 9100 case 'year': 9101 time = startOfDate(this.year(), 0, 1); 9102 break; 9103 case 'quarter': 9104 time = startOfDate( 9105 this.year(), 9106 this.month() - (this.month() % 3), 9107 1 9108 ); 9109 break; 9110 case 'month': 9111 time = startOfDate(this.year(), this.month(), 1); 9112 break; 9113 case 'week': 9114 time = startOfDate( 9115 this.year(), 9116 this.month(), 9117 this.date() - this.weekday() 9118 ); 9119 break; 9120 case 'isoWeek': 9121 time = startOfDate( 9122 this.year(), 9123 this.month(), 9124 this.date() - (this.isoWeekday() - 1) 9125 ); 9126 break; 9127 case 'day': 9128 case 'date': 9129 time = startOfDate(this.year(), this.month(), this.date()); 9130 break; 9131 case 'hour': 9132 time = this._d.valueOf(); 9133 time -= mod$1( 9134 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 9135 MS_PER_HOUR 9136 ); 9137 break; 9138 case 'minute': 9139 time = this._d.valueOf(); 9140 time -= mod$1(time, MS_PER_MINUTE); 9141 break; 9142 case 'second': 9143 time = this._d.valueOf(); 9144 time -= mod$1(time, MS_PER_SECOND); 9145 break; 9146 } 9147 9148 this._d.setTime(time); 9149 hooks.updateOffset(this, true); 9150 return this; 9151 } 9152 9153 function endOf(units) { 9154 var time, startOfDate; 9155 units = normalizeUnits(units); 9156 if (units === undefined || units === 'millisecond' || !this.isValid()) { 9157 return this; 9158 } 9159 9160 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 9161 9162 switch (units) { 9163 case 'year': 9164 time = startOfDate(this.year() + 1, 0, 1) - 1; 9165 break; 9166 case 'quarter': 9167 time = 9168 startOfDate( 9169 this.year(), 9170 this.month() - (this.month() % 3) + 3, 9171 1 9172 ) - 1; 9173 break; 9174 case 'month': 9175 time = startOfDate(this.year(), this.month() + 1, 1) - 1; 9176 break; 9177 case 'week': 9178 time = 9179 startOfDate( 9180 this.year(), 9181 this.month(), 9182 this.date() - this.weekday() + 7 9183 ) - 1; 9184 break; 9185 case 'isoWeek': 9186 time = 9187 startOfDate( 9188 this.year(), 9189 this.month(), 9190 this.date() - (this.isoWeekday() - 1) + 7 9191 ) - 1; 9192 break; 9193 case 'day': 9194 case 'date': 9195 time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; 9196 break; 9197 case 'hour': 9198 time = this._d.valueOf(); 9199 time += 9200 MS_PER_HOUR - 9201 mod$1( 9202 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 9203 MS_PER_HOUR 9204 ) - 9205 1; 9206 break; 9207 case 'minute': 9208 time = this._d.valueOf(); 9209 time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; 9210 break; 9211 case 'second': 9212 time = this._d.valueOf(); 9213 time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; 9214 break; 9215 } 9216 9217 this._d.setTime(time); 9218 hooks.updateOffset(this, true); 9219 return this; 9220 } 9221 9222 function valueOf() { 9223 return this._d.valueOf() - (this._offset || 0) * 60000; 9224 } 9225 9226 function unix() { 9227 return Math.floor(this.valueOf() / 1000); 9228 } 9229 9230 function toDate() { 9231 return new Date(this.valueOf()); 9232 } 9233 9234 function toArray() { 9235 var m = this; 9236 return [ 9237 m.year(), 9238 m.month(), 9239 m.date(), 9240 m.hour(), 9241 m.minute(), 9242 m.second(), 9243 m.millisecond(), 9244 ]; 9245 } 9246 9247 function toObject() { 9248 var m = this; 9249 return { 9250 years: m.year(), 9251 months: m.month(), 9252 date: m.date(), 9253 hours: m.hours(), 9254 minutes: m.minutes(), 9255 seconds: m.seconds(), 9256 milliseconds: m.milliseconds(), 9257 }; 9258 } 9259 9260 function toJSON() { 9261 // new Date(NaN).toJSON() === null 9262 return this.isValid() ? this.toISOString() : null; 9263 } 9264 9265 function isValid$2() { 9266 return isValid(this); 9267 } 9268 9269 function parsingFlags() { 9270 return extend({}, getParsingFlags(this)); 9271 } 9272 9273 function invalidAt() { 9274 return getParsingFlags(this).overflow; 9275 } 9276 9277 function creationData() { 9278 return { 9279 input: this._i, 9280 format: this._f, 9281 locale: this._locale, 9282 isUTC: this._isUTC, 9283 strict: this._strict, 9284 }; 9285 } 9286 9287 addFormatToken('N', 0, 0, 'eraAbbr'); 9288 addFormatToken('NN', 0, 0, 'eraAbbr'); 9289 addFormatToken('NNN', 0, 0, 'eraAbbr'); 9290 addFormatToken('NNNN', 0, 0, 'eraName'); 9291 addFormatToken('NNNNN', 0, 0, 'eraNarrow'); 9292 9293 addFormatToken('y', ['y', 1], 'yo', 'eraYear'); 9294 addFormatToken('y', ['yy', 2], 0, 'eraYear'); 9295 addFormatToken('y', ['yyy', 3], 0, 'eraYear'); 9296 addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); 9297 9298 addRegexToken('N', matchEraAbbr); 9299 addRegexToken('NN', matchEraAbbr); 9300 addRegexToken('NNN', matchEraAbbr); 9301 addRegexToken('NNNN', matchEraName); 9302 addRegexToken('NNNNN', matchEraNarrow); 9303 9304 addParseToken(
vendor: 8,145 bytes, lines 9304-9579
9304 9305 ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], 9306 function (input, array, config, token) { 9307 var era = config._locale.erasParse(input, token, config._strict); 9308 if (era) { 9309 getParsingFlags(config).era = era; 9310 } else { 9311 getParsingFlags(config).invalidEra = input; 9312 } 9313 } 9314 ); 9315 9316 addRegexToken('y', matchUnsigned); 9317 addRegexToken('yy', matchUnsigned); 9318 addRegexToken('yyy', matchUnsigned); 9319 addRegexToken('yyyy', matchUnsigned); 9320 addRegexToken('yo', matchEraYearOrdinal); 9321 9322 addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); 9323 addParseToken(['yo'], function (input, array, config, token) { 9324 var match; 9325 if (config._locale._eraYearOrdinalRegex) { 9326 match = input.match(config._locale._eraYearOrdinalRegex); 9327 } 9328 9329 if (config._locale.eraYearOrdinalParse) { 9330 array[YEAR] = config._locale.eraYearOrdinalParse(input, match); 9331 } else { 9332 array[YEAR] = parseInt(input, 10); 9333 } 9334 }); 9335 9336 function localeEras(m, format) { 9337 var i, 9338 l, 9339 date, 9340 eras = this._eras || getLocale('en')._eras; 9341 for (i = 0, l = eras.length; i < l; ++i) { 9342 switch (typeof eras[i].since) { 9343 case 'string': 9344 // truncate time 9345 date = hooks(eras[i].since).startOf('day'); 9346 eras[i].since = date.valueOf(); 9347 break; 9348 } 9349 9350 switch (typeof eras[i].until) { 9351 case 'undefined': 9352 eras[i].until = +Infinity; 9353 break; 9354 case 'string': 9355 // truncate time 9356 date = hooks(eras[i].until).startOf('day').valueOf(); 9357 eras[i].until = date.valueOf(); 9358 break; 9359 } 9360 } 9361 return eras; 9362 } 9363 9364 function localeErasParse(eraName, format, strict) { 9365 var i, 9366 l, 9367 eras = this.eras(), 9368 name, 9369 abbr, 9370 narrow; 9371 eraName = eraName.toUpperCase(); 9372 9373 for (i = 0, l = eras.length; i < l; ++i) { 9374 name = eras[i].name.toUpperCase(); 9375 abbr = eras[i].abbr.toUpperCase(); 9376 narrow = eras[i].narrow.toUpperCase(); 9377 9378 if (strict) { 9379 switch (format) { 9380 case 'N': 9381 case 'NN': 9382 case 'NNN': 9383 if (abbr === eraName) { 9384 return eras[i]; 9385 } 9386 break; 9387 9388 case 'NNNN': 9389 if (name === eraName) { 9390 return eras[i]; 9391 } 9392 break; 9393 9394 case 'NNNNN': 9395 if (narrow === eraName) { 9396 return eras[i]; 9397 } 9398 break; 9399 } 9400 } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { 9401 return eras[i]; 9402 } 9403 } 9404 } 9405 9406 function localeErasConvertYear(era, year) { 9407 var dir = era.since <= era.until ? +1 : -1; 9408 if (year === undefined) { 9409 return hooks(era.since).year(); 9410 } else { 9411 return hooks(era.since).year() + (year - era.offset) * dir; 9412 } 9413 } 9414 9415 function getEraName() { 9416 var i, 9417 l, 9418 val, 9419 eras = this.localeData().eras(); 9420 for (i = 0, l = eras.length; i < l; ++i) { 9421 // truncate time 9422 val = this.clone().startOf('day').valueOf(); 9423 9424 if (eras[i].since <= val && val <= eras[i].until) { 9425 return eras[i].name; 9426 } 9427 if (eras[i].until <= val && val <= eras[i].since) { 9428 return eras[i].name; 9429 } 9430 } 9431 9432 return ''; 9433 } 9434 9435 function getEraNarrow() { 9436 var i, 9437 l, 9438 val, 9439 eras = this.localeData().eras(); 9440 for (i = 0, l = eras.length; i < l; ++i) { 9441 // truncate time 9442 val = this.clone().startOf('day').valueOf(); 9443 9444 if (eras[i].since <= val && val <= eras[i].until) { 9445 return eras[i].narrow; 9446 } 9447 if (eras[i].until <= val && val <= eras[i].since) { 9448 return eras[i].narrow; 9449 } 9450 } 9451 9452 return ''; 9453 } 9454 9455 function getEraAbbr() { 9456 var i, 9457 l, 9458 val, 9459 eras = this.localeData().eras(); 9460 for (i = 0, l = eras.length; i < l; ++i) { 9461 // truncate time 9462 val = this.clone().startOf('day').valueOf(); 9463 9464 if (eras[i].since <= val && val <= eras[i].until) { 9465 return eras[i].abbr; 9466 } 9467 if (eras[i].until <= val && val <= eras[i].since) { 9468 return eras[i].abbr; 9469 } 9470 } 9471 9472 return ''; 9473 } 9474 9475 function getEraYear() { 9476 var i, 9477 l, 9478 dir, 9479 val, 9480 eras = this.localeData().eras(); 9481 for (i = 0, l = eras.length; i < l; ++i) { 9482 dir = eras[i].since <= eras[i].until ? +1 : -1; 9483 9484 // truncate time 9485 val = this.clone().startOf('day').valueOf(); 9486 9487 if ( 9488 (eras[i].since <= val && val <= eras[i].until) || 9489 (eras[i].until <= val && val <= eras[i].since) 9490 ) { 9491 return ( 9492 (this.year() - hooks(eras[i].since).year()) * dir + 9493 eras[i].offset 9494 ); 9495 } 9496 } 9497 9498 return this.year(); 9499 } 9500 9501 function erasNameRegex(isStrict) { 9502 if (!hasOwnProp(this, '_erasNameRegex')) { 9503 computeErasParse.call(this); 9504 } 9505 return isStrict ? this._erasNameRegex : this._erasRegex; 9506 } 9507 9508 function erasAbbrRegex(isStrict) { 9509 if (!hasOwnProp(this, '_erasAbbrRegex')) { 9510 computeErasParse.call(this); 9511 } 9512 return isStrict ? this._erasAbbrRegex : this._erasRegex; 9513 } 9514 9515 function erasNarrowRegex(isStrict) { 9516 if (!hasOwnProp(this, '_erasNarrowRegex')) { 9517 computeErasParse.call(this); 9518 } 9519 return isStrict ? this._erasNarrowRegex : this._erasRegex; 9520 } 9521 9522 function matchEraAbbr(isStrict, locale) { 9523 return locale.erasAbbrRegex(isStrict); 9524 } 9525 9526 function matchEraName(isStrict, locale) { 9527 return locale.erasNameRegex(isStrict); 9528 } 9529 9530 function matchEraNarrow(isStrict, locale) { 9531 return locale.erasNarrowRegex(isStrict); 9532 } 9533 9534 function matchEraYearOrdinal(isStrict, locale) { 9535 return locale._eraYearOrdinalRegex || matchUnsigned; 9536 } 9537 9538 function computeErasParse() { 9539 var abbrPieces = [], 9540 namePieces = [], 9541 narrowPieces = [], 9542 mixedPieces = [], 9543 i, 9544 l, 9545 eras = this.eras(); 9546 9547 for (i = 0, l = eras.length; i < l; ++i) { 9548 namePieces.push(regexEscape(eras[i].name)); 9549 abbrPieces.push(regexEscape(eras[i].abbr)); 9550 narrowPieces.push(regexEscape(eras[i].narrow)); 9551 9552 mixedPieces.push(regexEscape(eras[i].name)); 9553 mixedPieces.push(regexEscape(eras[i].abbr)); 9554 mixedPieces.push(regexEscape(eras[i].narrow)); 9555 } 9556 9557 this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 9558 this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); 9559 this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); 9560 this._erasNarrowRegex = new RegExp( 9561 '^(' + narrowPieces.join('|') + ')', 9562 'i' 9563 ); 9564 } 9565 9566 // FORMATTING 9567 9568 addFormatToken(0, ['gg', 2], 0, function () { 9569 return this.weekYear() % 100; 9570 }); 9571 9572 addFormatToken(0, ['GG', 2], 0, function () { 9573 return this.isoWeekYear() % 100; 9574 }); 9575 9576 function addWeekYearFormatToken(token, getter) { 9577 addFormatToken(0, [token, token.length], 0, getter); 9578 } 9579
9580 addWeekYearFormatToken('gggg', 'weekYear'); 9581 addWeekYearFormatToken('ggggg', 'weekYear'); 9582 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 9583 addWeekYearFormatToken('GGGGG', 'isoWeekYear'); 9584 9585 // ALIASES 9586 9587 addUnitAlias('weekYear', 'gg'); 9588 addUnitAlias('isoWeekYear', 'GG'); 9589 9590 // PRIORITY 9591 9592 addUnitPriority('weekYear', 1); 9593 addUnitPriority('isoWeekYear', 1); 9594 9595 // PARSING 9596 9597 addRegexToken('G', matchSigned); 9598 addRegexToken('g', matchSigned); 9599 addRegexToken('GG', match1to2, match2); 9600 addRegexToken('gg', match1to2, match2); 9601 addRegexToken('GGGG', match1to4, match4); 9602 addRegexToken('gggg', match1to4, match4); 9603 addRegexToken('GGGGG', match1to6, match6); 9604 addRegexToken('ggggg', match1to6, match6); 9605 9606 addWeekParseToken( 9607 ['gggg', 'ggggg', 'GGGG', 'GGGGG'], 9608 function (input, week, config, token) { 9609 week[token.substr(0, 2)] = toInt(input); 9610 } 9611
vendor: 14,956 bytes, lines 9611-10160
9611); 9612 9613 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { 9614 week[token] = hooks.parseTwoDigitYear(input); 9615 }); 9616 9617 // MOMENTS 9618 9619 function getSetWeekYear(input) { 9620 return getSetWeekYearHelper.call( 9621 this, 9622 input, 9623 this.week(), 9624 this.weekday(), 9625 this.localeData()._week.dow, 9626 this.localeData()._week.doy 9627 ); 9628 } 9629 9630 function getSetISOWeekYear(input) { 9631 return getSetWeekYearHelper.call( 9632 this, 9633 input, 9634 this.isoWeek(), 9635 this.isoWeekday(), 9636 1, 9637 4 9638 ); 9639 } 9640 9641 function getISOWeeksInYear() { 9642 return weeksInYear(this.year(), 1, 4); 9643 } 9644 9645 function getISOWeeksInISOWeekYear() { 9646 return weeksInYear(this.isoWeekYear(), 1, 4); 9647 } 9648 9649 function getWeeksInYear() { 9650 var weekInfo = this.localeData()._week; 9651 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 9652 } 9653 9654 function getWeeksInWeekYear() { 9655 var weekInfo = this.localeData()._week; 9656 return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); 9657 } 9658 9659 function getSetWeekYearHelper(input, week, weekday, dow, doy) { 9660 var weeksTarget; 9661 if (input == null) { 9662 return weekOfYear(this, dow, doy).year; 9663 } else { 9664 weeksTarget = weeksInYear(input, dow, doy); 9665 if (week > weeksTarget) { 9666 week = weeksTarget; 9667 } 9668 return setWeekAll.call(this, input, week, weekday, dow, doy); 9669 } 9670 } 9671 9672 function setWeekAll(weekYear, week, weekday, dow, doy) { 9673 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), 9674 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); 9675 9676 this.year(date.getUTCFullYear()); 9677 this.month(date.getUTCMonth()); 9678 this.date(date.getUTCDate()); 9679 return this; 9680 } 9681 9682 // FORMATTING 9683 9684 addFormatToken('Q', 0, 'Qo', 'quarter'); 9685 9686 // ALIASES 9687 9688 addUnitAlias('quarter', 'Q'); 9689 9690 // PRIORITY 9691 9692 addUnitPriority('quarter', 7); 9693 9694 // PARSING 9695 9696 addRegexToken('Q', match1); 9697 addParseToken('Q', function (input, array) { 9698 array[MONTH] = (toInt(input) - 1) * 3; 9699 }); 9700 9701 // MOMENTS 9702 9703 function getSetQuarter(input) { 9704 return input == null 9705 ? Math.ceil((this.month() + 1) / 3) 9706 : this.month((input - 1) * 3 + (this.month() % 3)); 9707 } 9708 9709 // FORMATTING 9710 9711 addFormatToken('D', ['DD', 2], 'Do', 'date'); 9712 9713 // ALIASES 9714 9715 addUnitAlias('date', 'D'); 9716 9717 // PRIORITY 9718 addUnitPriority('date', 9); 9719 9720 // PARSING 9721 9722 addRegexToken('D', match1to2); 9723 addRegexToken('DD', match1to2, match2); 9724 addRegexToken('Do', function (isStrict, locale) { 9725 // TODO: Remove "ordinalParse" fallback in next major release. 9726 return isStrict 9727 ? locale._dayOfMonthOrdinalParse || locale._ordinalParse 9728 : locale._dayOfMonthOrdinalParseLenient; 9729 }); 9730 9731 addParseToken(['D', 'DD'], DATE); 9732 addParseToken('Do', function (input, array) { 9733 array[DATE] = toInt(input.match(match1to2)[0]); 9734 }); 9735 9736 // MOMENTS 9737 9738 var getSetDayOfMonth = makeGetSet('Date', true); 9739 9740 // FORMATTING 9741 9742 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 9743 9744 // ALIASES 9745 9746 addUnitAlias('dayOfYear', 'DDD'); 9747 9748 // PRIORITY 9749 addUnitPriority('dayOfYear', 4); 9750 9751 // PARSING 9752 9753 addRegexToken('DDD', match1to3); 9754 addRegexToken('DDDD', match3); 9755 addParseToken(['DDD', 'DDDD'], function (input, array, config) { 9756 config._dayOfYear = toInt(input); 9757 }); 9758 9759 // HELPERS 9760 9761 // MOMENTS 9762 9763 function getSetDayOfYear(input) { 9764 var dayOfYear = 9765 Math.round( 9766 (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 9767 ) + 1; 9768 return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); 9769 } 9770 9771 // FORMATTING 9772 9773 addFormatToken('m', ['mm', 2], 0, 'minute'); 9774 9775 // ALIASES 9776 9777 addUnitAlias('minute', 'm'); 9778 9779 // PRIORITY 9780 9781 addUnitPriority('minute', 14); 9782 9783 // PARSING 9784 9785 addRegexToken('m', match1to2); 9786 addRegexToken('mm', match1to2, match2); 9787 addParseToken(['m', 'mm'], MINUTE); 9788 9789 // MOMENTS 9790 9791 var getSetMinute = makeGetSet('Minutes', false); 9792 9793 // FORMATTING 9794 9795 addFormatToken('s', ['ss', 2], 0, 'second'); 9796 9797 // ALIASES 9798 9799 addUnitAlias('second', 's'); 9800 9801 // PRIORITY 9802 9803 addUnitPriority('second', 15); 9804 9805 // PARSING 9806 9807 addRegexToken('s', match1to2); 9808 addRegexToken('ss', match1to2, match2); 9809 addParseToken(['s', 'ss'], SECOND); 9810 9811 // MOMENTS 9812 9813 var getSetSecond = makeGetSet('Seconds', false); 9814 9815 // FORMATTING 9816 9817 addFormatToken('S', 0, 0, function () { 9818 return ~~(this.millisecond() / 100); 9819 }); 9820 9821 addFormatToken(0, ['SS', 2], 0, function () { 9822 return ~~(this.millisecond() / 10); 9823 }); 9824 9825 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 9826 addFormatToken(0, ['SSSS', 4], 0, function () { 9827 return this.millisecond() * 10; 9828 }); 9829 addFormatToken(0, ['SSSSS', 5], 0, function () { 9830 return this.millisecond() * 100; 9831 }); 9832 addFormatToken(0, ['SSSSSS', 6], 0, function () { 9833 return this.millisecond() * 1000; 9834 }); 9835 addFormatToken(0, ['SSSSSSS', 7], 0, function () { 9836 return this.millisecond() * 10000; 9837 }); 9838 addFormatToken(0, ['SSSSSSSS', 8], 0, function () { 9839 return this.millisecond() * 100000; 9840 }); 9841 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { 9842 return this.millisecond() * 1000000; 9843 }); 9844 9845 // ALIASES 9846 9847 addUnitAlias('millisecond', 'ms'); 9848 9849 // PRIORITY 9850 9851 addUnitPriority('millisecond', 16); 9852 9853 // PARSING 9854 9855 addRegexToken('S', match1to3, match1); 9856 addRegexToken('SS', match1to3, match2); 9857 addRegexToken('SSS', match1to3, match3); 9858 9859 var token, getSetMillisecond; 9860 for (token = 'SSSS'; token.length <= 9; token += 'S') { 9861 addRegexToken(token, matchUnsigned); 9862 } 9863 9864 function parseMs(input, array) { 9865 array[MILLISECOND] = toInt(('0.' + input) * 1000); 9866 } 9867 9868 for (token = 'S'; token.length <= 9; token += 'S') { 9869 addParseToken(token, parseMs); 9870 } 9871 9872 getSetMillisecond = makeGetSet('Milliseconds', false); 9873 9874 // FORMATTING 9875 9876 addFormatToken('z', 0, 0, 'zoneAbbr'); 9877 addFormatToken('zz', 0, 0, 'zoneName'); 9878 9879 // MOMENTS 9880 9881 function getZoneAbbr() { 9882 return this._isUTC ? 'UTC' : ''; 9883 } 9884 9885 function getZoneName() { 9886 return this._isUTC ? 'Coordinated Universal Time' : ''; 9887 } 9888 9889 var proto = Moment.prototype; 9890 9891 proto.add = add; 9892 proto.calendar = calendar$1; 9893 proto.clone = clone; 9894 proto.diff = diff; 9895 proto.endOf = endOf; 9896 proto.format = format; 9897 proto.from = from; 9898 proto.fromNow = fromNow; 9899 proto.to = to; 9900 proto.toNow = toNow; 9901 proto.get = stringGet; 9902 proto.invalidAt = invalidAt; 9903 proto.isAfter = isAfter; 9904 proto.isBefore = isBefore; 9905 proto.isBetween = isBetween; 9906 proto.isSame = isSame; 9907 proto.isSameOrAfter = isSameOrAfter; 9908 proto.isSameOrBefore = isSameOrBefore; 9909 proto.isValid = isValid$2; 9910 proto.lang = lang; 9911 proto.locale = locale; 9912 proto.localeData = localeData; 9913 proto.max = prototypeMax; 9914 proto.min = prototypeMin; 9915 proto.parsingFlags = parsingFlags; 9916 proto.set = stringSet; 9917 proto.startOf = startOf; 9918 proto.subtract = subtract; 9919 proto.toArray = toArray; 9920 proto.toObject = toObject; 9921 proto.toDate = toDate; 9922 proto.toISOString = toISOString; 9923 proto.inspect = inspect; 9924 if (typeof Symbol !== 'undefined' && Symbol.for != null) { 9925 proto[Symbol.for('nodejs.util.inspect.custom')] = function () { 9926 return 'Moment<' + this.format() + '>'; 9927 }; 9928 } 9929 proto.toJSON = toJSON; 9930 proto.toString = toString; 9931 proto.unix = unix; 9932 proto.valueOf = valueOf; 9933 proto.creationData = creationData; 9934 proto.eraName = getEraName; 9935 proto.eraNarrow = getEraNarrow; 9936 proto.eraAbbr = getEraAbbr; 9937 proto.eraYear = getEraYear; 9938 proto.year = getSetYear; 9939 proto.isLeapYear = getIsLeapYear; 9940 proto.weekYear = getSetWeekYear; 9941 proto.isoWeekYear = getSetISOWeekYear; 9942 proto.quarter = proto.quarters = getSetQuarter; 9943 proto.month = getSetMonth; 9944 proto.daysInMonth = getDaysInMonth; 9945 proto.week = proto.weeks = getSetWeek; 9946 proto.isoWeek = proto.isoWeeks = getSetISOWeek; 9947 proto.weeksInYear = getWeeksInYear; 9948 proto.weeksInWeekYear = getWeeksInWeekYear; 9949 proto.isoWeeksInYear = getISOWeeksInYear; 9950 proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; 9951 proto.date = getSetDayOfMonth; 9952 proto.day = proto.days = getSetDayOfWeek; 9953 proto.weekday = getSetLocaleDayOfWeek; 9954 proto.isoWeekday = getSetISODayOfWeek; 9955 proto.dayOfYear = getSetDayOfYear; 9956 proto.hour = proto.hours = getSetHour; 9957 proto.minute = proto.minutes = getSetMinute; 9958 proto.second = proto.seconds = getSetSecond; 9959 proto.millisecond = proto.milliseconds = getSetMillisecond; 9960 proto.utcOffset = getSetOffset; 9961 proto.utc = setOffsetToUTC; 9962 proto.local = setOffsetToLocal; 9963 proto.parseZone = setOffsetToParsedOffset; 9964 proto.hasAlignedHourOffset = hasAlignedHourOffset; 9965 proto.isDST = isDaylightSavingTime; 9966 proto.isLocal = isLocal; 9967 proto.isUtcOffset = isUtcOffset; 9968 proto.isUtc = isUtc; 9969 proto.isUTC = isUtc; 9970 proto.zoneAbbr = getZoneAbbr; 9971 proto.zoneName = getZoneName; 9972 proto.dates = deprecate( 9973 'dates accessor is deprecated. Use date instead.', 9974 getSetDayOfMonth 9975 ); 9976 proto.months = deprecate( 9977 'months accessor is deprecated. Use month instead', 9978 getSetMonth 9979 ); 9980 proto.years = deprecate( 9981 'years accessor is deprecated. Use year instead', 9982 getSetYear 9983 ); 9984 proto.zone = deprecate( 9985 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', 9986 getSetZone 9987 ); 9988 proto.isDSTShifted = deprecate( 9989 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', 9990 isDaylightSavingTimeShifted 9991 ); 9992 9993 function createUnix(input) { 9994 return createLocal(input * 1000); 9995 } 9996 9997 function createInZone() { 9998 return createLocal.apply(null, arguments).parseZone(); 9999 } 10000 10001 function preParsePostFormat(string) { 10002 return string; 10003 } 10004 10005 var proto$1 = Locale.prototype; 10006 10007 proto$1.calendar = calendar; 10008 proto$1.longDateFormat = longDateFormat; 10009 proto$1.invalidDate = invalidDate; 10010 proto$1.ordinal = ordinal; 10011 proto$1.preparse = preParsePostFormat; 10012 proto$1.postformat = preParsePostFormat; 10013 proto$1.relativeTime = relativeTime; 10014 proto$1.pastFuture = pastFuture; 10015 proto$1.set = set; 10016 proto$1.eras = localeEras; 10017 proto$1.erasParse = localeErasParse; 10018 proto$1.erasConvertYear = localeErasConvertYear; 10019 proto$1.erasAbbrRegex = erasAbbrRegex; 10020 proto$1.erasNameRegex = erasNameRegex; 10021 proto$1.erasNarrowRegex = erasNarrowRegex; 10022 10023 proto$1.months = localeMonths; 10024 proto$1.monthsShort = localeMonthsShort; 10025 proto$1.monthsParse = localeMonthsParse; 10026 proto$1.monthsRegex = monthsRegex; 10027 proto$1.monthsShortRegex = monthsShortRegex; 10028 proto$1.week = localeWeek; 10029 proto$1.firstDayOfYear = localeFirstDayOfYear; 10030 proto$1.firstDayOfWeek = localeFirstDayOfWeek; 10031 10032 proto$1.weekdays = localeWeekdays; 10033 proto$1.weekdaysMin = localeWeekdaysMin; 10034 proto$1.weekdaysShort = localeWeekdaysShort; 10035 proto$1.weekdaysParse = localeWeekdaysParse; 10036 10037 proto$1.weekdaysRegex = weekdaysRegex; 10038 proto$1.weekdaysShortRegex = weekdaysShortRegex; 10039 proto$1.weekdaysMinRegex = weekdaysMinRegex; 10040 10041 proto$1.isPM = localeIsPM; 10042 proto$1.meridiem = localeMeridiem; 10043 10044 function get$1(format, index, field, setter) { 10045 var locale = getLocale(), 10046 utc = createUTC().set(setter, index); 10047 return locale[field](utc, format); 10048 } 10049 10050 function listMonthsImpl(format, index, field) { 10051 if (isNumber(format)) { 10052 index = format; 10053 format = undefined; 10054 } 10055 10056 format = format || ''; 10057 10058 if (index != null) { 10059 return get$1(format, index, field, 'month'); 10060 } 10061 10062 var i, 10063 out = []; 10064 for (i = 0; i < 12; i++) { 10065 out[i] = get$1(format, i, field, 'month'); 10066 } 10067 return out; 10068 } 10069 10070 // () 10071 // (5) 10072 // (fmt, 5) 10073 // (fmt) 10074 // (true) 10075 // (true, 5) 10076 // (true, fmt, 5) 10077 // (true, fmt) 10078 function listWeekdaysImpl(localeSorted, format, index, field) { 10079 if (typeof localeSorted === 'boolean') { 10080 if (isNumber(format)) { 10081 index = format; 10082 format = undefined; 10083 } 10084 10085 format = format || ''; 10086 } else { 10087 format = localeSorted; 10088 index = format; 10089 localeSorted = false; 10090 10091 if (isNumber(format)) { 10092 index = format; 10093 format = undefined; 10094 } 10095 10096 format = format || ''; 10097 } 10098 10099 var locale = getLocale(), 10100 shift = localeSorted ? locale._week.dow : 0, 10101 i, 10102 out = []; 10103 10104 if (index != null) { 10105 return get$1(format, (index + shift) % 7, field, 'day'); 10106 } 10107 10108 for (i = 0; i < 7; i++) { 10109 out[i] = get$1(format, (i + shift) % 7, field, 'day'); 10110 } 10111 return out; 10112 } 10113 10114 function listMonths(format, index) { 10115 return listMonthsImpl(format, index, 'months'); 10116 } 10117 10118 function listMonthsShort(format, index) { 10119 return listMonthsImpl(format, index, 'monthsShort'); 10120 } 10121 10122 function listWeekdays(localeSorted, format, index) { 10123 return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); 10124 } 10125 10126 function listWeekdaysShort(localeSorted, format, index) { 10127 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); 10128 } 10129 10130 function listWeekdaysMin(localeSorted, format, index) { 10131 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); 10132 } 10133 10134 getSetGlobalLocale('en', { 10135 eras: [ 10136 { 10137 since: '0001-01-01', 10138 until: +Infinity, 10139 offset: 1, 10140 name: 'Anno Domini', 10141 narrow: 'AD', 10142 abbr: 'AD', 10143 }, 10144 { 10145 since: '0000-12-31', 10146 until: -Infinity, 10147 offset: 1, 10148 name: 'Before Christ', 10149 narrow: 'BC', 10150 abbr: 'BC', 10151 }, 10152 ], 10153 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 10154 ordinal: function (number) { 10155 var b = number % 10, 10156 output = 10157 toInt((number % 100) / 10) === 1 10158 ? 'th' 10159 : b === 1 10160
vendor: 8,915 bytes, lines 10160-10446
10160 ? 'st' 10161 : b === 2 10162 ? 'nd' 10163 : b === 3 10164 ? 'rd' 10165 : 'th'; 10166 return number + output; 10167 }, 10168 }); 10169 10170 // Side effect imports 10171 10172 hooks.lang = deprecate( 10173 'moment.lang is deprecated. Use moment.locale instead.', 10174 getSetGlobalLocale 10175 ); 10176 hooks.langData = deprecate( 10177 'moment.langData is deprecated. Use moment.localeData instead.', 10178 getLocale 10179 ); 10180 10181 var mathAbs = Math.abs; 10182 10183 function abs() { 10184 var data = this._data; 10185 10186 this._milliseconds = mathAbs(this._milliseconds); 10187 this._days = mathAbs(this._days); 10188 this._months = mathAbs(this._months); 10189 10190 data.milliseconds = mathAbs(data.milliseconds); 10191 data.seconds = mathAbs(data.seconds); 10192 data.minutes = mathAbs(data.minutes); 10193 data.hours = mathAbs(data.hours); 10194 data.months = mathAbs(data.months); 10195 data.years = mathAbs(data.years); 10196 10197 return this; 10198 } 10199 10200 function addSubtract$1(duration, input, value, direction) { 10201 var other = createDuration(input, value); 10202 10203 duration._milliseconds += direction * other._milliseconds; 10204 duration._days += direction * other._days; 10205 duration._months += direction * other._months; 10206 10207 return duration._bubble(); 10208 } 10209 10210 // supports only 2.0-style add(1, 's') or add(duration) 10211 function add$1(input, value) { 10212 return addSubtract$1(this, input, value, 1); 10213 } 10214 10215 // supports only 2.0-style subtract(1, 's') or subtract(duration) 10216 function subtract$1(input, value) { 10217 return addSubtract$1(this, input, value, -1); 10218 } 10219 10220 function absCeil(number) { 10221 if (number < 0) { 10222 return Math.floor(number); 10223 } else { 10224 return Math.ceil(number); 10225 } 10226 } 10227 10228 function bubble() { 10229 var milliseconds = this._milliseconds, 10230 days = this._days, 10231 months = this._months, 10232 data = this._data, 10233 seconds, 10234 minutes, 10235 hours, 10236 years, 10237 monthsFromDays; 10238 10239 // if we have a mix of positive and negative values, bubble down first 10240 // check: https://github.com/moment/moment/issues/2166 10241 if ( 10242 !( 10243 (milliseconds >= 0 && days >= 0 && months >= 0) || 10244 (milliseconds <= 0 && days <= 0 && months <= 0) 10245 ) 10246 ) { 10247 milliseconds += absCeil(monthsToDays(months) + days) * 864e5; 10248 days = 0; 10249 months = 0; 10250 } 10251 10252 // The following code bubbles up values, see the tests for 10253 // examples of what that means. 10254 data.milliseconds = milliseconds % 1000; 10255 10256 seconds = absFloor(milliseconds / 1000); 10257 data.seconds = seconds % 60; 10258 10259 minutes = absFloor(seconds / 60); 10260 data.minutes = minutes % 60; 10261 10262 hours = absFloor(minutes / 60); 10263 data.hours = hours % 24; 10264 10265 days += absFloor(hours / 24); 10266 10267 // convert days to months 10268 monthsFromDays = absFloor(daysToMonths(days)); 10269 months += monthsFromDays; 10270 days -= absCeil(monthsToDays(monthsFromDays)); 10271 10272 // 12 months -> 1 year 10273 years = absFloor(months / 12); 10274 months %= 12; 10275 10276 data.days = days; 10277 data.months = months; 10278 data.years = years; 10279 10280 return this; 10281 } 10282 10283 function daysToMonths(days) { 10284 // 400 years have 146097 days (taking into account leap year rules) 10285 // 400 years have 12 months === 4800 10286 return (days * 4800) / 146097; 10287 } 10288 10289 function monthsToDays(months) { 10290 // the reverse of daysToMonths 10291 return (months * 146097) / 4800; 10292 } 10293 10294 function as(units) { 10295 if (!this.isValid()) { 10296 return NaN; 10297 } 10298 var days, 10299 months, 10300 milliseconds = this._milliseconds; 10301 10302 units = normalizeUnits(units); 10303 10304 if (units === 'month' || units === 'quarter' || units === 'year') { 10305 days = this._days + milliseconds / 864e5; 10306 months = this._months + daysToMonths(days); 10307 switch (units) { 10308 case 'month': 10309 return months; 10310 case 'quarter': 10311 return months / 3; 10312 case 'year': 10313 return months / 12; 10314 } 10315 } else { 10316 // handle milliseconds separately because of floating point math errors (issue #1867) 10317 days = this._days + Math.round(monthsToDays(this._months)); 10318 switch (units) { 10319 case 'week': 10320 return days / 7 + milliseconds / 6048e5; 10321 case 'day': 10322 return days + milliseconds / 864e5; 10323 case 'hour': 10324 return days * 24 + milliseconds / 36e5; 10325 case 'minute': 10326 return days * 1440 + milliseconds / 6e4; 10327 case 'second': 10328 return days * 86400 + milliseconds / 1000; 10329 // Math.floor prevents floating point math errors here 10330 case 'millisecond': 10331 return Math.floor(days * 864e5) + milliseconds; 10332 default: 10333 throw new Error('Unknown unit ' + units); 10334 } 10335 } 10336 } 10337 10338 // TODO: Use this.as('ms')? 10339 function valueOf$1() { 10340 if (!this.isValid()) { 10341 return NaN; 10342 } 10343 return ( 10344 this._milliseconds + 10345 this._days * 864e5 + 10346 (this._months % 12) * 2592e6 + 10347 toInt(this._months / 12) * 31536e6 10348 ); 10349 } 10350 10351 function makeAs(alias) { 10352 return function () { 10353 return this.as(alias); 10354 }; 10355 } 10356 10357 var asMilliseconds = makeAs('ms'), 10358 asSeconds = makeAs('s'), 10359 asMinutes = makeAs('m'), 10360 asHours = makeAs('h'), 10361 asDays = makeAs('d'), 10362 asWeeks = makeAs('w'), 10363 asMonths = makeAs('M'), 10364 asQuarters = makeAs('Q'), 10365 asYears = makeAs('y'); 10366 10367 function clone$1() { 10368 return createDuration(this); 10369 } 10370 10371 function get$2(units) { 10372 units = normalizeUnits(units); 10373 return this.isValid() ? this[units + 's']() : NaN; 10374 } 10375 10376 function makeGetter(name) { 10377 return function () { 10378 return this.isValid() ? this._data[name] : NaN; 10379 }; 10380 } 10381 10382 var milliseconds = makeGetter('milliseconds'), 10383 seconds = makeGetter('seconds'), 10384 minutes = makeGetter('minutes'), 10385 hours = makeGetter('hours'), 10386 days = makeGetter('days'), 10387 months = makeGetter('months'), 10388 years = makeGetter('years'); 10389 10390 function weeks() { 10391 return absFloor(this.days() / 7); 10392 } 10393 10394 var round = Math.round, 10395 thresholds = { 10396 ss: 44, // a few seconds to seconds 10397 s: 45, // seconds to minute 10398 m: 45, // minutes to hour 10399 h: 22, // hours to day 10400 d: 26, // days to month/week 10401 w: null, // weeks to month 10402 M: 11, // months to year 10403 }; 10404 10405 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 10406 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 10407 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 10408 } 10409 10410 function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { 10411 var duration = createDuration(posNegDuration).abs(), 10412 seconds = round(duration.as('s')), 10413 minutes = round(duration.as('m')), 10414 hours = round(duration.as('h')), 10415 days = round(duration.as('d')), 10416 months = round(duration.as('M')), 10417 weeks = round(duration.as('w')), 10418 years = round(duration.as('y')), 10419 a = 10420 (seconds <= thresholds.ss && ['s', seconds]) || 10421 (seconds < thresholds.s && ['ss', seconds]) || 10422 (minutes <= 1 && ['m']) || 10423 (minutes < thresholds.m && ['mm', minutes]) || 10424 (hours <= 1 && ['h']) || 10425 (hours < thresholds.h && ['hh', hours]) || 10426 (days <= 1 && ['d']) || 10427 (days < thresholds.d && ['dd', days]); 10428 10429 if (thresholds.w != null) { 10430 a = 10431 a || 10432 (weeks <= 1 && ['w']) || 10433 (weeks < thresholds.w && ['ww', weeks]); 10434 } 10435 a = a || 10436 (months <= 1 && ['M']) || 10437 (months < thresholds.M && ['MM', months]) || 10438 (years <= 1 && ['y']) || ['yy', years]; 10439 10440 a[2] = withoutSuffix; 10441 a[3] = +posNegDuration > 0; 10442 a[4] = locale; 10443 return substituteTimeAgo.apply(null, a); 10444 } 10445 10446 // This function allows you to set the rounding function for relative time strings
vendor: 8,831 bytes, lines 10447-10718
10447 function getSetRelativeTimeRounding(roundingFunction) { 10448 if (roundingFunction === undefined) { 10449 return round; 10450 } 10451 if (typeof roundingFunction === 'function') { 10452 round = roundingFunction; 10453 return true; 10454 } 10455 return false; 10456 } 10457 10458 // This function allows you to set a threshold for relative time strings 10459 function getSetRelativeTimeThreshold(threshold, limit) { 10460 if (thresholds[threshold] === undefined) { 10461 return false; 10462 } 10463 if (limit === undefined) { 10464 return thresholds[threshold]; 10465 } 10466 thresholds[threshold] = limit; 10467 if (threshold === 's') { 10468 thresholds.ss = limit - 1; 10469 } 10470 return true; 10471 } 10472 10473 function humanize(argWithSuffix, argThresholds) { 10474 if (!this.isValid()) { 10475 return this.localeData().invalidDate(); 10476 } 10477 10478 var withSuffix = false, 10479 th = thresholds, 10480 locale, 10481 output; 10482 10483 if (typeof argWithSuffix === 'object') { 10484 argThresholds = argWithSuffix; 10485 argWithSuffix = false; 10486 } 10487 if (typeof argWithSuffix === 'boolean') { 10488 withSuffix = argWithSuffix; 10489 } 10490 if (typeof argThresholds === 'object') { 10491 th = Object.assign({}, thresholds, argThresholds); 10492 if (argThresholds.s != null && argThresholds.ss == null) { 10493 th.ss = argThresholds.s - 1; 10494 } 10495 } 10496 10497 locale = this.localeData(); 10498 output = relativeTime$1(this, !withSuffix, th, locale); 10499 10500 if (withSuffix) { 10501 output = locale.pastFuture(+this, output); 10502 } 10503 10504 return locale.postformat(output); 10505 } 10506 10507 var abs$1 = Math.abs; 10508 10509 function sign(x) { 10510 return (x > 0) - (x < 0) || +x; 10511 } 10512 10513 function toISOString$1() { 10514 // for ISO strings we do not use the normal bubbling rules: 10515 // * milliseconds bubble up until they become hours 10516 // * days do not bubble at all 10517 // * months bubble up until they become years 10518 // This is because there is no context-free conversion between hours and days 10519 // (think of clock changes) 10520 // and also not between days and months (28-31 days per month) 10521 if (!this.isValid()) { 10522 return this.localeData().invalidDate(); 10523 } 10524 10525 var seconds = abs$1(this._milliseconds) / 1000, 10526 days = abs$1(this._days), 10527 months = abs$1(this._months), 10528 minutes, 10529 hours, 10530 years, 10531 s, 10532 total = this.asSeconds(), 10533 totalSign, 10534 ymSign, 10535 daysSign, 10536 hmsSign; 10537 10538 if (!total) { 10539 // this is the same as C#'s (Noda) and python (isodate)... 10540 // but not other JS (goog.date) 10541 return 'P0D'; 10542 } 10543 10544 // 3600 seconds -> 60 minutes -> 1 hour 10545 minutes = absFloor(seconds / 60); 10546 hours = absFloor(minutes / 60); 10547 seconds %= 60; 10548 minutes %= 60; 10549 10550 // 12 months -> 1 year 10551 years = absFloor(months / 12); 10552 months %= 12; 10553 10554 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 10555 s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; 10556 10557 totalSign = total < 0 ? '-' : ''; 10558 ymSign = sign(this._months) !== sign(total) ? '-' : ''; 10559 daysSign = sign(this._days) !== sign(total) ? '-' : ''; 10560 hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; 10561 10562 return ( 10563 totalSign + 10564 'P' + 10565 (years ? ymSign + years + 'Y' : '') + 10566 (months ? ymSign + months + 'M' : '') + 10567 (days ? daysSign + days + 'D' : '') + 10568 (hours || minutes || seconds ? 'T' : '') + 10569 (hours ? hmsSign + hours + 'H' : '') + 10570 (minutes ? hmsSign + minutes + 'M' : '') + 10571 (seconds ? hmsSign + s + 'S' : '') 10572 ); 10573 } 10574 10575 var proto$2 = Duration.prototype; 10576 10577 proto$2.isValid = isValid$1; 10578 proto$2.abs = abs; 10579 proto$2.add = add$1; 10580 proto$2.subtract = subtract$1; 10581 proto$2.as = as; 10582 proto$2.asMilliseconds = asMilliseconds; 10583 proto$2.asSeconds = asSeconds; 10584 proto$2.asMinutes = asMinutes; 10585 proto$2.asHours = asHours; 10586 proto$2.asDays = asDays; 10587 proto$2.asWeeks = asWeeks; 10588 proto$2.asMonths = asMonths; 10589 proto$2.asQuarters = asQuarters; 10590 proto$2.asYears = asYears; 10591 proto$2.valueOf = valueOf$1; 10592 proto$2._bubble = bubble; 10593 proto$2.clone = clone$1; 10594 proto$2.get = get$2; 10595 proto$2.milliseconds = milliseconds; 10596 proto$2.seconds = seconds; 10597 proto$2.minutes = minutes; 10598 proto$2.hours = hours; 10599 proto$2.days = days; 10600 proto$2.weeks = weeks; 10601 proto$2.months = months; 10602 proto$2.years = years; 10603 proto$2.humanize = humanize; 10604 proto$2.toISOString = toISOString$1; 10605 proto$2.toString = toISOString$1; 10606 proto$2.toJSON = toISOString$1; 10607 proto$2.locale = locale; 10608 proto$2.localeData = localeData; 10609 10610 proto$2.toIsoString = deprecate( 10611 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', 10612 toISOString$1 10613 ); 10614 proto$2.lang = lang; 10615 10616 // FORMATTING 10617 10618 addFormatToken('X', 0, 0, 'unix'); 10619 addFormatToken('x', 0, 0, 'valueOf'); 10620 10621 // PARSING 10622 10623 addRegexToken('x', matchSigned); 10624 addRegexToken('X', matchTimestamp); 10625 addParseToken('X', function (input, array, config) { 10626 config._d = new Date(parseFloat(input) * 1000); 10627 }); 10628 addParseToken('x', function (input, array, config) { 10629 config._d = new Date(toInt(input)); 10630 }); 10631 10632 //! moment.js 10633 10634 hooks.version = '2.29.4'; 10635 10636 setHookCallback(createLocal); 10637 10638 hooks.fn = proto; 10639 hooks.min = min; 10640 hooks.max = max; 10641 hooks.now = now; 10642 hooks.utc = createUTC; 10643 hooks.unix = createUnix; 10644 hooks.months = listMonths; 10645 hooks.isDate = isDate; 10646 hooks.locale = getSetGlobalLocale; 10647 hooks.invalid = createInvalid; 10648 hooks.duration = createDuration; 10649 hooks.isMoment = isMoment; 10650 hooks.weekdays = listWeekdays; 10651 hooks.parseZone = createInZone; 10652 hooks.localeData = getLocale; 10653 hooks.isDuration = isDuration; 10654 hooks.monthsShort = listMonthsShort; 10655 hooks.weekdaysMin = listWeekdaysMin; 10656 hooks.defineLocale = defineLocale; 10657 hooks.updateLocale = updateLocale; 10658 hooks.locales = listLocales; 10659 hooks.weekdaysShort = listWeekdaysShort; 10660 hooks.normalizeUnits = normalizeUnits; 10661 hooks.relativeTimeRounding = getSetRelativeTimeRounding; 10662 hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; 10663 hooks.calendarFormat = getCalendarFormat; 10664 hooks.prototype = proto; 10665 10666 // currently HTML5 input type only supports 24-hour formats 10667 hooks.HTML5_FMT = { 10668 DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" /> 10669 DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" /> 10670 DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" /> 10671 DATE: 'YYYY-MM-DD', // <input type="date" /> 10672 TIME: 'HH:mm', // <input type="time" /> 10673 TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" /> 10674 TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" /> 10675 WEEK: 'GGGG-[W]WW', // <input type="week" /> 10676 MONTH: 'YYYY-MM', // <input type="month" /> 10677 }; 10678 10679 //! moment.js locale configuration 10680 10681 hooks.defineLocale('af', { 10682 months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( 10683 '_' 10684 ), 10685 monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), 10686 weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( 10687 '_' 10688 ), 10689 weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), 10690 weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), 10691 meridiemParse: /vm|nm/i, 10692 isPM: function (input) { 10693 return /^nm$/i.test(input); 10694 }, 10695 meridiem: function (hours, minutes, isLower) { 10696 if (hours < 12) { 10697 return isLower ? 'vm' : 'VM'; 10698 } else { 10699 return isLower ? 'nm' : 'NM'; 10700 } 10701 }, 10702 longDateFormat: { 10703 LT: 'HH:mm', 10704 LTS: 'HH:mm:ss', 10705 L: 'DD/MM/YYYY', 10706 LL: 'D MMMM YYYY', 10707 LLL: 'D MMMM YYYY HH:mm', 10708 LLLL: 'dddd, D MMMM YYYY HH:mm', 10709 }, 10710 calendar: { 10711 sameDay: '[Vandag om] LT', 10712 nextDay: '[Môre om] LT', 10713 nextWeek: 'dddd [om] LT', 10714 lastDay: '[Gister om] LT', 10715 lastWeek: '[Laas] dddd [om] LT', 10716 sameElse: 'L', 10717 }, 10718 relativeTime: {
vendor: 16,384 bytes, lines 10719-11211
10719 future: 'oor %s', 10720 past: '%s gelede', 10721 s: "'n paar sekondes", 10722 ss: '%d sekondes', 10723 m: "'n minuut", 10724 mm: '%d minute', 10725 h: "'n uur", 10726 hh: '%d ure', 10727 d: "'n dag", 10728 dd: '%d dae', 10729 M: "'n maand", 10730 MM: '%d maande', 10731 y: "'n jaar", 10732 yy: '%d jaar', 10733 }, 10734 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 10735 ordinal: function (number) { 10736 return ( 10737 number + 10738 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 10739 ); // Thanks to Joris Röling : https://github.com/jjupiter 10740 }, 10741 week: { 10742 dow: 1, // Maandag is die eerste dag van die week. 10743 doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. 10744 }, 10745 }); 10746 10747 //! moment.js locale configuration 10748 10749 var pluralForm = function (n) { 10750 return n === 0 10751 ? 0 10752 : n === 1 10753 ? 1 10754 : n === 2 10755 ? 2 10756 : n % 100 >= 3 && n % 100 <= 10 10757 ? 3 10758 : n % 100 >= 11 10759 ? 4 10760 : 5; 10761 }, 10762 plurals = { 10763 s: [ 10764 'Ø£Ù٠٠٠ثاÙÙØ©', 10765 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 10766 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 10767 '%d Ø«ÙØ§Ù', 10768 '%d ثاÙÙØ©', 10769 '%d ثاÙÙØ©', 10770 ], 10771 m: [ 10772 'Ø£Ù٠٠٠دÙÙÙØ©', 10773 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 10774 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 10775 '%d Ø¯ÙØ§Ø¦Ù', 10776 '%d دÙÙÙØ©', 10777 '%d دÙÙÙØ©', 10778 ], 10779 h: [ 10780 'Ø£Ù٠٠٠ساعة', 10781 'ساعة ÙØ§ØØ¯Ø©', 10782 ['ساعتاÙ', 'ساعتÙÙ'], 10783 '%d ساعات', 10784 '%d ساعة', 10785 '%d ساعة', 10786 ], 10787 d: [ 10788 'Ø£ÙÙ Ù Ù ÙÙÙ ', 10789 'ÙÙÙ ÙØ§ØØ¯', 10790 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 10791 '%d Ø£ÙØ§Ù ', 10792 '%d ÙÙÙ ÙØ§', 10793 '%d ÙÙÙ ', 10794 ], 10795 M: [ 10796 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 10797 'Ø´ÙØ± ÙØ§ØØ¯', 10798 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 10799 '%d Ø£Ø´ÙØ±', 10800 '%d Ø´ÙØ±Ø§', 10801 '%d Ø´ÙØ±', 10802 ], 10803 y: [ 10804 'Ø£Ù٠٠٠عا٠', 10805 'Ø¹Ø§Ù ÙØ§ØØ¯', 10806 ['عا٠اÙ', 'عا٠ÙÙ'], 10807 '%d Ø£Ø¹ÙØ§Ù ', 10808 '%d Ø¹Ø§Ù ÙØ§', 10809 '%d عا٠', 10810 ], 10811 }, 10812 pluralize = function (u) { 10813 return function (number, withoutSuffix, string, isFuture) { 10814 var f = pluralForm(number), 10815 str = plurals[u][pluralForm(number)]; 10816 if (f === 2) { 10817 str = str[withoutSuffix ? 0 : 1]; 10818 } 10819 return str.replace(/%d/i, number); 10820 }; 10821 }, 10822 months$1 = [ 10823 'جاÙÙÙ', 10824 'ÙÙÙØ±Ù', 10825 '٠ارس', 10826 'Ø£ÙØ±ÙÙ', 10827 '٠اÙ', 10828 'Ø¬ÙØ§Ù', 10829 'جÙÙÙÙØ©', 10830 'Ø£ÙØª', 10831 'سبت٠بر', 10832 'Ø£ÙØªÙبر', 10833 'ÙÙÙ٠بر', 10834 'Ø¯ÙØ³Ù بر', 10835 ]; 10836 10837 hooks.defineLocale('ar-dz', { 10838 months: months$1, 10839 monthsShort: months$1, 10840 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 10841 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 10842 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 10843 weekdaysParseExact: true, 10844 longDateFormat: { 10845 LT: 'HH:mm', 10846 LTS: 'HH:mm:ss', 10847 L: 'D/\u200FM/\u200FYYYY', 10848 LL: 'D MMMM YYYY', 10849 LLL: 'D MMMM YYYY HH:mm', 10850 LLLL: 'dddd D MMMM YYYY HH:mm', 10851 }, 10852 meridiemParse: /ص|Ù /, 10853 isPM: function (input) { 10854 return 'Ù ' === input; 10855 }, 10856 meridiem: function (hour, minute, isLower) { 10857 if (hour < 12) { 10858 return 'ص'; 10859 } else { 10860 return 'Ù '; 10861 } 10862 }, 10863 calendar: { 10864 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10865 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10866 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10867 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10868 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10869 sameElse: 'L', 10870 }, 10871 relativeTime: { 10872 future: 'بعد %s', 10873 past: 'Ù ÙØ° %s', 10874 s: pluralize('s'), 10875 ss: pluralize('s'), 10876 m: pluralize('m'), 10877 mm: pluralize('m'), 10878 h: pluralize('h'), 10879 hh: pluralize('h'), 10880 d: pluralize('d'), 10881 dd: pluralize('d'), 10882 M: pluralize('M'), 10883 MM: pluralize('M'), 10884 y: pluralize('y'), 10885 yy: pluralize('y'), 10886 }, 10887 postformat: function (string) { 10888 return string.replace(/,/g, 'Ø'); 10889 }, 10890 week: { 10891 dow: 0, // Sunday is the first day of the week. 10892 doy: 4, // The week that contains Jan 4th is the first week of the year. 10893 }, 10894 }); 10895 10896 //! moment.js locale configuration 10897 10898 hooks.defineLocale('ar-kw', { 10899 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 10900 '_' 10901 ), 10902 monthsShort: 10903 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 10904 '_' 10905 ), 10906 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥ØªÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 10907 weekdaysShort: 'Ø§ØØ¯_اتÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 10908 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 10909 weekdaysParseExact: true, 10910 longDateFormat: { 10911 LT: 'HH:mm', 10912 LTS: 'HH:mm:ss', 10913 L: 'DD/MM/YYYY', 10914 LL: 'D MMMM YYYY', 10915 LLL: 'D MMMM YYYY HH:mm', 10916 LLLL: 'dddd D MMMM YYYY HH:mm', 10917 }, 10918 calendar: { 10919 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10920 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10921 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10922 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10923 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 10924 sameElse: 'L', 10925 }, 10926 relativeTime: { 10927 future: 'ÙÙ %s', 10928 past: 'Ù ÙØ° %s', 10929 s: 'Ø«ÙØ§Ù', 10930 ss: '%d ثاÙÙØ©', 10931 m: 'دÙÙÙØ©', 10932 mm: '%d Ø¯ÙØ§Ø¦Ù', 10933 h: 'ساعة', 10934 hh: '%d ساعات', 10935 d: 'ÙÙÙ ', 10936 dd: '%d Ø£ÙØ§Ù ', 10937 M: 'Ø´ÙØ±', 10938 MM: '%d Ø£Ø´ÙØ±', 10939 y: 'Ø³ÙØ©', 10940 yy: '%d سÙÙØ§Øª', 10941 }, 10942 week: { 10943 dow: 0, // Sunday is the first day of the week. 10944 doy: 12, // The week that contains Jan 12th is the first week of the year. 10945 }, 10946 }); 10947 10948 //! moment.js locale configuration 10949 10950 var symbolMap = { 10951 1: '1', 10952 2: '2', 10953 3: '3', 10954 4: '4', 10955 5: '5', 10956 6: '6', 10957 7: '7', 10958 8: '8', 10959 9: '9', 10960 0: '0', 10961 }, 10962 pluralForm$1 = function (n) { 10963 return n === 0 10964 ? 0 10965 : n === 1 10966 ? 1 10967 : n === 2 10968 ? 2 10969 : n % 100 >= 3 && n % 100 <= 10 10970 ? 3 10971 : n % 100 >= 11 10972 ? 4 10973 : 5; 10974 }, 10975 plurals$1 = { 10976 s: [ 10977 'Ø£Ù٠٠٠ثاÙÙØ©', 10978 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 10979 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 10980 '%d Ø«ÙØ§Ù', 10981 '%d ثاÙÙØ©', 10982 '%d ثاÙÙØ©', 10983 ], 10984 m: [ 10985 'Ø£Ù٠٠٠دÙÙÙØ©', 10986 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 10987 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 10988 '%d Ø¯ÙØ§Ø¦Ù', 10989 '%d دÙÙÙØ©', 10990 '%d دÙÙÙØ©', 10991 ], 10992 h: [ 10993 'Ø£Ù٠٠٠ساعة', 10994 'ساعة ÙØ§ØØ¯Ø©', 10995 ['ساعتاÙ', 'ساعتÙÙ'], 10996 '%d ساعات', 10997 '%d ساعة', 10998 '%d ساعة', 10999 ], 11000 d: [ 11001 'Ø£ÙÙ Ù Ù ÙÙÙ ', 11002 'ÙÙÙ ÙØ§ØØ¯', 11003 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 11004 '%d Ø£ÙØ§Ù ', 11005 '%d ÙÙÙ ÙØ§', 11006 '%d ÙÙÙ ', 11007 ], 11008 M: [ 11009 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 11010 'Ø´ÙØ± ÙØ§ØØ¯', 11011 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 11012 '%d Ø£Ø´ÙØ±', 11013 '%d Ø´ÙØ±Ø§', 11014 '%d Ø´ÙØ±', 11015 ], 11016 y: [ 11017 'Ø£Ù٠٠٠عا٠', 11018 'Ø¹Ø§Ù ÙØ§ØØ¯', 11019 ['عا٠اÙ', 'عا٠ÙÙ'], 11020 '%d Ø£Ø¹ÙØ§Ù ', 11021 '%d Ø¹Ø§Ù ÙØ§', 11022 '%d عا٠', 11023 ], 11024 }, 11025 pluralize$1 = function (u) { 11026 return function (number, withoutSuffix, string, isFuture) { 11027 var f = pluralForm$1(number), 11028 str = plurals$1[u][pluralForm$1(number)]; 11029 if (f === 2) { 11030 str = str[withoutSuffix ? 0 : 1]; 11031 } 11032 return str.replace(/%d/i, number); 11033 }; 11034 }, 11035 months$2 = [ 11036 'ÙÙØ§Ùر', 11037 'ÙØ¨Ø±Ø§Ùر', 11038 '٠ارس', 11039 'أبرÙÙ', 11040 '٠اÙÙ', 11041 'ÙÙÙÙÙ', 11042 'ÙÙÙÙÙ', 11043 'أغسطس', 11044 'سبت٠بر', 11045 'Ø£ÙØªÙبر', 11046 'ÙÙÙ٠بر', 11047 'Ø¯ÙØ³Ù بر', 11048 ]; 11049 11050 hooks.defineLocale('ar-ly', { 11051 months: months$2, 11052 monthsShort: months$2, 11053 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 11054 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 11055 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 11056 weekdaysParseExact: true, 11057 longDateFormat: { 11058 LT: 'HH:mm', 11059 LTS: 'HH:mm:ss', 11060 L: 'D/\u200FM/\u200FYYYY', 11061 LL: 'D MMMM YYYY', 11062 LLL: 'D MMMM YYYY HH:mm', 11063 LLLL: 'dddd D MMMM YYYY HH:mm', 11064 }, 11065 meridiemParse: /ص|Ù /, 11066 isPM: function (input) { 11067 return 'Ù ' === input; 11068 }, 11069 meridiem: function (hour, minute, isLower) { 11070 if (hour < 12) { 11071 return 'ص'; 11072 } else { 11073 return 'Ù '; 11074 } 11075 }, 11076 calendar: { 11077 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11078 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11079 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11080 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11081 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11082 sameElse: 'L', 11083 }, 11084 relativeTime: { 11085 future: 'بعد %s', 11086 past: 'Ù ÙØ° %s', 11087 s: pluralize$1('s'), 11088 ss: pluralize$1('s'), 11089 m: pluralize$1('m'), 11090 mm: pluralize$1('m'), 11091 h: pluralize$1('h'), 11092 hh: pluralize$1('h'), 11093 d: pluralize$1('d'), 11094 dd: pluralize$1('d'), 11095 M: pluralize$1('M'), 11096 MM: pluralize$1('M'), 11097 y: pluralize$1('y'), 11098 yy: pluralize$1('y'), 11099 }, 11100 preparse: function (string) { 11101 return string.replace(/Ø/g, ','); 11102 }, 11103 postformat: function (string) { 11104 return string 11105 .replace(/\d/g, function (match) { 11106 return symbolMap[match]; 11107 }) 11108 .replace(/,/g, 'Ø'); 11109 }, 11110 week: { 11111 dow: 6, // Saturday is the first day of the week. 11112 doy: 12, // The week that contains Jan 12th is the first week of the year. 11113 }, 11114 }); 11115 11116 //! moment.js locale configuration 11117 11118 hooks.defineLocale('ar-ma', { 11119 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 11120 '_' 11121 ), 11122 monthsShort: 11123 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 11124 '_' 11125 ), 11126 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 11127 weekdaysShort: 'Ø§ØØ¯_اثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 11128 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 11129 weekdaysParseExact: true, 11130 longDateFormat: { 11131 LT: 'HH:mm', 11132 LTS: 'HH:mm:ss', 11133 L: 'DD/MM/YYYY', 11134 LL: 'D MMMM YYYY', 11135 LLL: 'D MMMM YYYY HH:mm', 11136 LLLL: 'dddd D MMMM YYYY HH:mm', 11137 }, 11138 calendar: { 11139 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11140 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11141 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11142 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11143 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11144 sameElse: 'L', 11145 }, 11146 relativeTime: { 11147 future: 'ÙÙ %s', 11148 past: 'Ù ÙØ° %s', 11149 s: 'Ø«ÙØ§Ù', 11150 ss: '%d ثاÙÙØ©', 11151 m: 'دÙÙÙØ©', 11152 mm: '%d Ø¯ÙØ§Ø¦Ù', 11153 h: 'ساعة', 11154 hh: '%d ساعات', 11155 d: 'ÙÙÙ ', 11156 dd: '%d Ø£ÙØ§Ù ', 11157 M: 'Ø´ÙØ±', 11158 MM: '%d Ø£Ø´ÙØ±', 11159 y: 'Ø³ÙØ©', 11160 yy: '%d سÙÙØ§Øª', 11161 }, 11162 week: { 11163 dow: 1, // Monday is the first day of the week. 11164 doy: 4, // The week that contains Jan 4th is the first week of the year. 11165 }, 11166 }); 11167 11168 //! moment.js locale configuration 11169 11170 var symbolMap$1 = { 11171 1: 'Ù¡', 11172 2: 'Ù¢', 11173 3: 'Ù£', 11174 4: 'Ù¤', 11175 5: 'Ù¥', 11176 6: 'Ù¦', 11177 7: 'Ù§', 11178 8: 'Ù¨', 11179 9: 'Ù©', 11180 0: 'Ù ', 11181 }, 11182 numberMap = { 11183 'Ù¡': '1', 11184 'Ù¢': '2', 11185 'Ù£': '3', 11186 'Ù¤': '4', 11187 'Ù¥': '5', 11188 'Ù¦': '6', 11189 'Ù§': '7', 11190 'Ù¨': '8', 11191 'Ù©': '9', 11192 'Ù ': '0', 11193 }; 11194 11195 hooks.defineLocale('ar-sa', { 11196 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 11197 '_' 11198 ), 11199 monthsShort: 11200 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 11201 '_' 11202 ), 11203 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 11204 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 11205 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 11206 weekdaysParseExact: true, 11207 longDateFormat: { 11208 LT: 'HH:mm', 11209 LTS: 'HH:mm:ss', 11210 L: 'DD/MM/YYYY', 11211 L
vendor: 30,231 bytes, lines 11211-12065
11211L: 'D MMMM YYYY', 11212 LLL: 'D MMMM YYYY HH:mm', 11213 LLLL: 'dddd D MMMM YYYY HH:mm', 11214 }, 11215 meridiemParse: /ص|Ù /, 11216 isPM: function (input) { 11217 return 'Ù ' === input; 11218 }, 11219 meridiem: function (hour, minute, isLower) { 11220 if (hour < 12) { 11221 return 'ص'; 11222 } else { 11223 return 'Ù '; 11224 } 11225 }, 11226 calendar: { 11227 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11228 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11229 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11230 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11231 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11232 sameElse: 'L', 11233 }, 11234 relativeTime: { 11235 future: 'ÙÙ %s', 11236 past: 'Ù ÙØ° %s', 11237 s: 'Ø«ÙØ§Ù', 11238 ss: '%d ثاÙÙØ©', 11239 m: 'دÙÙÙØ©', 11240 mm: '%d Ø¯ÙØ§Ø¦Ù', 11241 h: 'ساعة', 11242 hh: '%d ساعات', 11243 d: 'ÙÙÙ ', 11244 dd: '%d Ø£ÙØ§Ù ', 11245 M: 'Ø´ÙØ±', 11246 MM: '%d Ø£Ø´ÙØ±', 11247 y: 'Ø³ÙØ©', 11248 yy: '%d سÙÙØ§Øª', 11249 }, 11250 preparse: function (string) { 11251 return string 11252 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 11253 return numberMap[match]; 11254 }) 11255 .replace(/Ø/g, ','); 11256 }, 11257 postformat: function (string) { 11258 return string 11259 .replace(/\d/g, function (match) { 11260 return symbolMap$1[match]; 11261 }) 11262 .replace(/,/g, 'Ø'); 11263 }, 11264 week: { 11265 dow: 0, // Sunday is the first day of the week. 11266 doy: 6, // The week that contains Jan 6th is the first week of the year. 11267 }, 11268 }); 11269 11270 //! moment.js locale configuration 11271 11272 hooks.defineLocale('ar-tn', { 11273 months: 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 11274 '_' 11275 ), 11276 monthsShort: 11277 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 11278 '_' 11279 ), 11280 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 11281 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 11282 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 11283 weekdaysParseExact: true, 11284 longDateFormat: { 11285 LT: 'HH:mm', 11286 LTS: 'HH:mm:ss', 11287 L: 'DD/MM/YYYY', 11288 LL: 'D MMMM YYYY', 11289 LLL: 'D MMMM YYYY HH:mm', 11290 LLLL: 'dddd D MMMM YYYY HH:mm', 11291 }, 11292 calendar: { 11293 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11294 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11295 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11296 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11297 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11298 sameElse: 'L', 11299 }, 11300 relativeTime: { 11301 future: 'ÙÙ %s', 11302 past: 'Ù ÙØ° %s', 11303 s: 'Ø«ÙØ§Ù', 11304 ss: '%d ثاÙÙØ©', 11305 m: 'دÙÙÙØ©', 11306 mm: '%d Ø¯ÙØ§Ø¦Ù', 11307 h: 'ساعة', 11308 hh: '%d ساعات', 11309 d: 'ÙÙÙ ', 11310 dd: '%d Ø£ÙØ§Ù ', 11311 M: 'Ø´ÙØ±', 11312 MM: '%d Ø£Ø´ÙØ±', 11313 y: 'Ø³ÙØ©', 11314 yy: '%d سÙÙØ§Øª', 11315 }, 11316 week: { 11317 dow: 1, // Monday is the first day of the week. 11318 doy: 4, // The week that contains Jan 4th is the first week of the year. 11319 }, 11320 }); 11321 11322 //! moment.js locale configuration 11323 11324 var symbolMap$2 = { 11325 1: 'Ù¡', 11326 2: 'Ù¢', 11327 3: 'Ù£', 11328 4: 'Ù¤', 11329 5: 'Ù¥', 11330 6: 'Ù¦', 11331 7: 'Ù§', 11332 8: 'Ù¨', 11333 9: 'Ù©', 11334 0: 'Ù ', 11335 }, 11336 numberMap$1 = { 11337 'Ù¡': '1', 11338 'Ù¢': '2', 11339 'Ù£': '3', 11340 'Ù¤': '4', 11341 'Ù¥': '5', 11342 'Ù¦': '6', 11343 'Ù§': '7', 11344 'Ù¨': '8', 11345 'Ù©': '9', 11346 'Ù ': '0', 11347 }, 11348 pluralForm$2 = function (n) { 11349 return n === 0 11350 ? 0 11351 : n === 1 11352 ? 1 11353 : n === 2 11354 ? 2 11355 : n % 100 >= 3 && n % 100 <= 10 11356 ? 3 11357 : n % 100 >= 11 11358 ? 4 11359 : 5; 11360 }, 11361 plurals$2 = { 11362 s: [ 11363 'Ø£Ù٠٠٠ثاÙÙØ©', 11364 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 11365 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 11366 '%d Ø«ÙØ§Ù', 11367 '%d ثاÙÙØ©', 11368 '%d ثاÙÙØ©', 11369 ], 11370 m: [ 11371 'Ø£Ù٠٠٠دÙÙÙØ©', 11372 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 11373 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 11374 '%d Ø¯ÙØ§Ø¦Ù', 11375 '%d دÙÙÙØ©', 11376 '%d دÙÙÙØ©', 11377 ], 11378 h: [ 11379 'Ø£Ù٠٠٠ساعة', 11380 'ساعة ÙØ§ØØ¯Ø©', 11381 ['ساعتاÙ', 'ساعتÙÙ'], 11382 '%d ساعات', 11383 '%d ساعة', 11384 '%d ساعة', 11385 ], 11386 d: [ 11387 'Ø£ÙÙ Ù Ù ÙÙÙ ', 11388 'ÙÙÙ ÙØ§ØØ¯', 11389 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 11390 '%d Ø£ÙØ§Ù ', 11391 '%d ÙÙÙ ÙØ§', 11392 '%d ÙÙÙ ', 11393 ], 11394 M: [ 11395 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 11396 'Ø´ÙØ± ÙØ§ØØ¯', 11397 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 11398 '%d Ø£Ø´ÙØ±', 11399 '%d Ø´ÙØ±Ø§', 11400 '%d Ø´ÙØ±', 11401 ], 11402 y: [ 11403 'Ø£Ù٠٠٠عا٠', 11404 'Ø¹Ø§Ù ÙØ§ØØ¯', 11405 ['عا٠اÙ', 'عا٠ÙÙ'], 11406 '%d Ø£Ø¹ÙØ§Ù ', 11407 '%d Ø¹Ø§Ù ÙØ§', 11408 '%d عا٠', 11409 ], 11410 }, 11411 pluralize$2 = function (u) { 11412 return function (number, withoutSuffix, string, isFuture) { 11413 var f = pluralForm$2(number), 11414 str = plurals$2[u][pluralForm$2(number)]; 11415 if (f === 2) { 11416 str = str[withoutSuffix ? 0 : 1]; 11417 } 11418 return str.replace(/%d/i, number); 11419 }; 11420 }, 11421 months$3 = [ 11422 'ÙÙØ§Ùر', 11423 'ÙØ¨Ø±Ø§Ùر', 11424 '٠ارس', 11425 'أبرÙÙ', 11426 '٠اÙÙ', 11427 'ÙÙÙÙÙ', 11428 'ÙÙÙÙÙ', 11429 'أغسطس', 11430 'سبت٠بر', 11431 'Ø£ÙØªÙبر', 11432 'ÙÙÙ٠بر', 11433 'Ø¯ÙØ³Ù بر', 11434 ]; 11435 11436 hooks.defineLocale('ar', { 11437 months: months$3, 11438 monthsShort: months$3, 11439 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 11440 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 11441 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 11442 weekdaysParseExact: true, 11443 longDateFormat: { 11444 LT: 'HH:mm', 11445 LTS: 'HH:mm:ss', 11446 L: 'D/\u200FM/\u200FYYYY', 11447 LL: 'D MMMM YYYY', 11448 LLL: 'D MMMM YYYY HH:mm', 11449 LLLL: 'dddd D MMMM YYYY HH:mm', 11450 }, 11451 meridiemParse: /ص|Ù /, 11452 isPM: function (input) { 11453 return 'Ù ' === input; 11454 }, 11455 meridiem: function (hour, minute, isLower) { 11456 if (hour < 12) { 11457 return 'ص'; 11458 } else { 11459 return 'Ù '; 11460 } 11461 }, 11462 calendar: { 11463 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11464 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11465 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11466 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11467 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 11468 sameElse: 'L', 11469 }, 11470 relativeTime: { 11471 future: 'بعد %s', 11472 past: 'Ù ÙØ° %s', 11473 s: pluralize$2('s'), 11474 ss: pluralize$2('s'), 11475 m: pluralize$2('m'), 11476 mm: pluralize$2('m'), 11477 h: pluralize$2('h'), 11478 hh: pluralize$2('h'), 11479 d: pluralize$2('d'), 11480 dd: pluralize$2('d'), 11481 M: pluralize$2('M'), 11482 MM: pluralize$2('M'), 11483 y: pluralize$2('y'), 11484 yy: pluralize$2('y'), 11485 }, 11486 preparse: function (string) { 11487 return string 11488 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 11489 return numberMap$1[match]; 11490 }) 11491 .replace(/Ø/g, ','); 11492 }, 11493 postformat: function (string) { 11494 return string 11495 .replace(/\d/g, function (match) { 11496 return symbolMap$2[match]; 11497 }) 11498 .replace(/,/g, 'Ø'); 11499 }, 11500 week: { 11501 dow: 6, // Saturday is the first day of the week. 11502 doy: 12, // The week that contains Jan 12th is the first week of the year. 11503 }, 11504 }); 11505 11506 //! moment.js locale configuration 11507 11508 var suffixes = { 11509 1: '-inci', 11510 5: '-inci', 11511 8: '-inci', 11512 70: '-inci', 11513 80: '-inci', 11514 2: '-nci', 11515 7: '-nci', 11516 20: '-nci', 11517 50: '-nci', 11518 3: '-üncü', 11519 4: '-üncü', 11520 100: '-üncü', 11521 6: '-ncı', 11522 9: '-uncu', 11523 10: '-uncu', 11524 30: '-uncu', 11525 60: '-ıncı', 11526 90: '-ıncı', 11527 }; 11528 11529 hooks.defineLocale('az', { 11530 months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( 11531 '_' 11532 ), 11533 monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), 11534 weekdays: 11535 'Bazar_Bazar ertÉsi_ÃÉrÅÉnbÉ axÅamı_ÃÉrÅÉnbÉ_CümÉ axÅamı_CümÉ_ÅÉnbÉ'.split( 11536 '_' 11537 ), 11538 weekdaysShort: 'Baz_BzE_ÃAx_ÃÉr_CAx_Cüm_ÅÉn'.split('_'), 11539 weekdaysMin: 'Bz_BE_ÃA_ÃÉ_CA_Cü_ÅÉ'.split('_'), 11540 weekdaysParseExact: true, 11541 longDateFormat: { 11542 LT: 'HH:mm', 11543 LTS: 'HH:mm:ss', 11544 L: 'DD.MM.YYYY', 11545 LL: 'D MMMM YYYY', 11546 LLL: 'D MMMM YYYY HH:mm', 11547 LLLL: 'dddd, D MMMM YYYY HH:mm', 11548 }, 11549 calendar: { 11550 sameDay: '[bugün saat] LT', 11551 nextDay: '[sabah saat] LT', 11552 nextWeek: '[gÉlÉn hÉftÉ] dddd [saat] LT', 11553 lastDay: '[dünÉn] LT', 11554 lastWeek: '[keçÉn hÉftÉ] dddd [saat] LT', 11555 sameElse: 'L', 11556 }, 11557 relativeTime: { 11558 future: '%s sonra', 11559 past: '%s ÉvvÉl', 11560 s: 'bir neÃ§É saniyÉ', 11561 ss: '%d saniyÉ', 11562 m: 'bir dÉqiqÉ', 11563 mm: '%d dÉqiqÉ', 11564 h: 'bir saat', 11565 hh: '%d saat', 11566 d: 'bir gün', 11567 dd: '%d gün', 11568 M: 'bir ay', 11569 MM: '%d ay', 11570 y: 'bir il', 11571 yy: '%d il', 11572 }, 11573 meridiemParse: /gecÉ|sÉhÉr|gündüz|axÅam/, 11574 isPM: function (input) { 11575 return /^(gündüz|axÅam)$/.test(input); 11576 }, 11577 meridiem: function (hour, minute, isLower) { 11578 if (hour < 4) { 11579 return 'gecÉ'; 11580 } else if (hour < 12) { 11581 return 'sÉhÉr'; 11582 } else if (hour < 17) { 11583 return 'gündüz'; 11584 } else { 11585 return 'axÅam'; 11586 } 11587 }, 11588 dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, 11589 ordinal: function (number) { 11590 if (number === 0) { 11591 // special case for zero 11592 return number + '-ıncı'; 11593 } 11594 var a = number % 10, 11595 b = (number % 100) - a, 11596 c = number >= 100 ? 100 : null; 11597 return number + (suffixes[a] || suffixes[b] || suffixes[c]); 11598 }, 11599 week: { 11600 dow: 1, // Monday is the first day of the week. 11601 doy: 7, // The week that contains Jan 7th is the first week of the year. 11602 }, 11603 }); 11604 11605 //! moment.js locale configuration 11606 11607 function plural(word, num) { 11608 var forms = word.split('_'); 11609 return num % 10 === 1 && num % 100 !== 11 11610 ? forms[0] 11611 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 11612 ? forms[1] 11613 : forms[2]; 11614 } 11615 function relativeTimeWithPlural(number, withoutSuffix, key) { 11616 var format = { 11617 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑндÑ_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑндÑ_ÑекÑнд', 11618 mm: withoutSuffix ? 'Ñ Ð²ÑлÑна_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн' : 'Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн', 11619 hh: withoutSuffix ? 'гадзÑна_гадзÑнÑ_гадзÑн' : 'гадзÑнÑ_гадзÑнÑ_гадзÑн', 11620 dd: 'дзенÑ_днÑ_дзÑн', 11621 MM: 'меÑÑÑ_меÑÑÑÑ_меÑÑÑаÑ', 11622 yy: 'год_гадÑ_гадоÑ', 11623 }; 11624 if (key === 'm') { 11625 return withoutSuffix ? 'Ñ Ð²ÑлÑна' : 'Ñ Ð²ÑлÑнÑ'; 11626 } else if (key === 'h') { 11627 return withoutSuffix ? 'гадзÑна' : 'гадзÑнÑ'; 11628 } else { 11629 return number + ' ' + plural(format[key], +number); 11630 } 11631 } 11632 11633 hooks.defineLocale('be', { 11634 months: { 11635 format: 'ÑÑÑдзенÑ_лÑÑага_ÑакавÑка_кÑаÑавÑка_ÑÑаÑнÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑÑнÑ_веÑаÑнÑ_каÑÑÑÑÑнÑка_лÑÑÑапада_ÑнежнÑ'.split( 11636 '_' 11637 ), 11638 standalone: 11639 'ÑÑÑдзенÑ_лÑÑÑ_ÑакавÑк_кÑаÑавÑк_ÑÑавенÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑвенÑ_веÑаÑенÑ_каÑÑÑÑÑнÑк_лÑÑÑапад_ÑнежанÑ'.split( 11640 '_' 11641 ), 11642 }, 11643 monthsShort: 11644 'ÑÑÑд_лÑÑ_Ñак_кÑаÑ_ÑÑав_ÑÑÑв_лÑп_жнÑв_веÑ_каÑÑ_лÑÑÑ_Ñнеж'.split('_'), 11645 weekdays: { 11646 format: 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑадÑ_ÑаÑвеÑ_пÑÑнÑÑÑ_ÑÑбоÑÑ'.split( 11647 '_' 11648 ), 11649 standalone: 11650 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑада_ÑаÑвеÑ_пÑÑнÑÑа_ÑÑбоÑа'.split( 11651 '_' 11652 ), 11653 isFormat: /\[ ?[УÑÑ] ?(?:мÑнÑлÑÑ|наÑÑÑпнÑÑ)? ?\] ?dddd/, 11654 }, 11655 weekdaysShort: 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 11656 weekdaysMin: 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 11657 longDateFormat: { 11658 LT: 'HH:mm', 11659 LTS: 'HH:mm:ss', 11660 L: 'DD.MM.YYYY', 11661 LL: 'D MMMM YYYY г.', 11662 LLL: 'D MMMM YYYY г., HH:mm', 11663 LLLL: 'dddd, D MMMM YYYY г., HH:mm', 11664 }, 11665 calendar: { 11666 sameDay: '[СÑÐ½Ð½Ñ Ñ] LT', 11667 nextDay: '[ÐаÑÑÑа Ñ] LT', 11668 lastDay: '[УÑоÑа Ñ] LT', 11669 nextWeek: function () { 11670 return '[У] dddd [Ñ] LT'; 11671 }, 11672 lastWeek: function () { 11673 switch (this.day()) { 11674 case 0: 11675 case 3: 11676 case 5: 11677 case 6: 11678 return '[У мÑнÑлÑÑ] dddd [Ñ] LT'; 11679 case 1: 11680 case 2: 11681 case 4: 11682 return '[У мÑнÑлÑ] dddd [Ñ] LT'; 11683 } 11684 }, 11685 sameElse: 'L', 11686 }, 11687 relativeTime: { 11688 future: 'пÑаз %s', 11689 past: '%s ÑамÑ', 11690 s: 'некалÑÐºÑ ÑекÑнд', 11691 m: relativeTimeWithPlural, 11692 mm: relativeTimeWithPlural, 11693 h: relativeTimeWithPlural, 11694 hh: relativeTimeWithPlural, 11695 d: 'дзенÑ', 11696 dd: relativeTimeWithPlural, 11697 M: 'меÑÑÑ', 11698 MM: relativeTimeWithPlural, 11699 y: 'год', 11700 yy: relativeTimeWithPlural, 11701 }, 11702 meridiemParse: /ноÑÑ|ÑанÑÑÑ|днÑ|веÑаÑа/, 11703 isPM: function (input) { 11704 return /^(днÑ|веÑаÑа)$/.test(input); 11705 }, 11706 meridiem: function (hour, minute, isLower) { 11707 if (hour < 4) { 11708 return 'ноÑÑ'; 11709 } else if (hour < 12) { 11710 return 'ÑанÑÑÑ'; 11711 } else if (hour < 17) { 11712 return 'днÑ'; 11713 } else { 11714 return 'веÑаÑа'; 11715 } 11716 }, 11717 dayOfMonthOrdinalParse: /\d{1,2}-(Ñ|Ñ|га)/, 11718 ordinal: function (number, period) { 11719 switch (period) { 11720 case 'M': 11721 case 'd': 11722 case 'DDD': 11723 case 'w': 11724 case 'W': 11725 return (number % 10 === 2 || number % 10 === 3) && 11726 number % 100 !== 12 && 11727 number % 100 !== 13 11728 ? number + '-Ñ' 11729 : number + '-Ñ'; 11730 case 'D': 11731 return number + '-га'; 11732 default: 11733 return number; 11734 } 11735 }, 11736 week: { 11737 dow: 1, // Monday is the first day of the week. 11738 doy: 7, // The week that contains Jan 7th is the first week of the year. 11739 }, 11740 }); 11741 11742 //! moment.js locale configuration 11743 11744 hooks.defineLocale('bg', { 11745 months: 'ÑнÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_май_Ñни_Ñли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split( 11746 '_' 11747 ), 11748 monthsShort: 'ÑнÑ_Ñев_маÑ_апÑ_май_Ñни_Ñли_авг_Ñеп_окÑ_ное_дек'.split('_'), 11749 weekdays: 'неделÑ_понеделник_вÑоÑник_ÑÑÑда_ÑеÑвÑÑÑÑк_пеÑÑк_ÑÑбоÑа'.split( 11750 '_' 11751 ), 11752 weekdaysShort: 'нед_пон_вÑо_ÑÑÑ_ÑеÑ_пеÑ_ÑÑб'.split('_'), 11753 weekdaysMin: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 11754 longDateFormat: { 11755 LT: 'H:mm', 11756 LTS: 'H:mm:ss', 11757 L: 'D.MM.YYYY', 11758 LL: 'D MMMM YYYY', 11759 LLL: 'D MMMM YYYY H:mm', 11760 LLLL: 'dddd, D MMMM YYYY H:mm', 11761 }, 11762 calendar: { 11763 sameDay: '[ÐÐ½ÐµÑ Ð²] LT', 11764 nextDay: '[УÑÑе в] LT', 11765 nextWeek: 'dddd [в] LT', 11766 lastDay: '[ÐÑеÑа в] LT', 11767 lastWeek: function () { 11768 switch (this.day()) { 11769 case 0: 11770 case 3: 11771 case 6: 11772 return '[ÐиналаÑа] dddd [в] LT'; 11773 case 1: 11774 case 2: 11775 case 4: 11776 case 5: 11777 return '[ÐиналиÑ] dddd [в] LT'; 11778 } 11779 }, 11780 sameElse: 'L', 11781 }, 11782 relativeTime: { 11783 future: 'Ñлед %s', 11784 past: 'пÑеди %s', 11785 s: 'нÑколко ÑекÑнди', 11786 ss: '%d ÑекÑнди', 11787 m: 'минÑÑа', 11788 mm: '%d минÑÑи', 11789 h: 'ÑаÑ', 11790 hh: '%d ÑаÑа', 11791 d: 'ден', 11792 dd: '%d дена', 11793 w: 'ÑедмиÑа', 11794 ww: '%d ÑедмиÑи', 11795 M: 'меÑеÑ', 11796 MM: '%d меÑеÑа', 11797 y: 'година', 11798 yy: '%d години', 11799 }, 11800 dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 11801 ordinal: function (number) { 11802 var lastDigit = number % 10, 11803 last2Digits = number % 100; 11804 if (number === 0) { 11805 return number + '-ев'; 11806 } else if (last2Digits === 0) { 11807 return number + '-ен'; 11808 } else if (last2Digits > 10 && last2Digits < 20) { 11809 return number + '-Ñи'; 11810 } else if (lastDigit === 1) { 11811 return number + '-ви'; 11812 } else if (lastDigit === 2) { 11813 return number + '-Ñи'; 11814 } else if (lastDigit === 7 || lastDigit === 8) { 11815 return number + '-ми'; 11816 } else { 11817 return number + '-Ñи'; 11818 } 11819 }, 11820 week: { 11821 dow: 1, // Monday is the first day of the week. 11822 doy: 7, // The week that contains Jan 7th is the first week of the year. 11823 }, 11824 }); 11825 11826 //! moment.js locale configuration 11827 11828 hooks.defineLocale('bm', { 11829 months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_MÉkalo_ZuwÉnkalo_Zuluyekalo_Utikalo_SÉtanburukalo_ÉkutÉburukalo_Nowanburukalo_Desanburukalo'.split( 11830 '_' 11831 ), 11832 monthsShort: 'Zan_Few_Mar_Awi_MÉ_Zuw_Zul_Uti_SÉt_Éku_Now_Des'.split('_'), 11833 weekdays: 'Kari_NtÉnÉn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), 11834 weekdaysShort: 'Kar_NtÉ_Tar_Ara_Ala_Jum_Sib'.split('_'), 11835 weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), 11836 longDateFormat: { 11837 LT: 'HH:mm', 11838 LTS: 'HH:mm:ss', 11839 L: 'DD/MM/YYYY', 11840 LL: 'MMMM [tile] D [san] YYYY', 11841 LLL: 'MMMM [tile] D [san] YYYY [lÉrÉ] HH:mm', 11842 LLLL: 'dddd MMMM [tile] D [san] YYYY [lÉrÉ] HH:mm', 11843 }, 11844 calendar: { 11845 sameDay: '[Bi lÉrÉ] LT', 11846 nextDay: '[Sini lÉrÉ] LT', 11847 nextWeek: 'dddd [don lÉrÉ] LT', 11848 lastDay: '[Kunu lÉrÉ] LT', 11849 lastWeek: 'dddd [tÉmÉnen lÉrÉ] LT', 11850 sameElse: 'L', 11851 }, 11852 relativeTime: { 11853 future: '%s kÉnÉ', 11854 past: 'a bÉ %s bÉ', 11855 s: 'sanga dama dama', 11856 ss: 'sekondi %d', 11857 m: 'miniti kelen', 11858 mm: 'miniti %d', 11859 h: 'lÉrÉ kelen', 11860 hh: 'lÉrÉ %d', 11861 d: 'tile kelen', 11862 dd: 'tile %d', 11863 M: 'kalo kelen', 11864 MM: 'kalo %d', 11865 y: 'san kelen', 11866 yy: 'san %d', 11867 }, 11868 week: { 11869 dow: 1, // Monday is the first day of the week. 11870 doy: 4, // The week that contains Jan 4th is the first week of the year. 11871 }, 11872 }); 11873 11874 //! moment.js locale configuration 11875 11876 var symbolMap$3 = { 11877 1: 'à§§', 11878 2: '২', 11879 3: 'à§©', 11880 4: '৪', 11881 5: 'à§«', 11882 6: '৬', 11883 7: 'à§', 11884 8: 'à§®', 11885 9: '৯', 11886 0: '০', 11887 }, 11888 numberMap$2 = { 11889 'à§§': '1', 11890 '২': '2', 11891 'à§©': '3', 11892 '৪': '4', 11893 'à§«': '5', 11894 '৬': '6', 11895 'à§': '7', 11896 'à§®': '8', 11897 '৯': '9', 11898 '০': '0', 11899 }; 11900 11901 hooks.defineLocale('bn-bd', { 11902 months: 'à¦à¦¾à¦¨à§à§à¦¾à¦°à¦¿_ফà§à¦¬à§à¦°à§à§à¦¾à¦°à¦¿_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split( 11903 '_' 11904 ), 11905 monthsShort: 11906 'à¦à¦¾à¦¨à§_ফà§à¦¬à§à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦à§_ডিসà§'.split( 11907 '_' 11908 ), 11909 weekdays: 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à¦¬à¦¾à¦°_শনিবার'.split( 11910 '_' 11911 ), 11912 weekdaysShort: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿_শà§à¦à§à¦°_শনি'.split('_'), 11913 weekdaysMin: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹_শà§à¦à§à¦°_শনি'.split('_'), 11914 longDateFormat: { 11915 LT: 'A h:mm সমà§', 11916 LTS: 'A h:mm:ss সমà§', 11917 L: 'DD/MM/YYYY', 11918 LL: 'D MMMM YYYY', 11919 LLL: 'D MMMM YYYY, A h:mm সমà§', 11920 LLLL: 'dddd, D MMMM YYYY, A h:mm সমà§', 11921 }, 11922 calendar: { 11923 sameDay: '[à¦à¦] LT', 11924 nextDay: '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 11925 nextWeek: 'dddd, LT', 11926 lastDay: '[à¦à¦¤à¦à¦¾à¦²] LT', 11927 lastWeek: '[à¦à¦¤] dddd, LT', 11928 sameElse: 'L', 11929 }, 11930 relativeTime: { 11931 future: '%s পরà§', 11932 past: '%s à¦à¦à§', 11933 s: 'à¦à§à§à¦ সà§à¦à§à¦¨à§à¦¡', 11934 ss: '%d সà§à¦à§à¦¨à§à¦¡', 11935 m: 'à¦à¦ মিনিà¦', 11936 mm: '%d মিনিà¦', 11937 h: 'à¦à¦ à¦à¦¨à§à¦à¦¾', 11938 hh: '%d à¦à¦¨à§à¦à¦¾', 11939 d: 'à¦à¦ দিন', 11940 dd: '%d দিন', 11941 M: 'à¦à¦ মাস', 11942 MM: '%d মাস', 11943 y: 'à¦à¦ বà¦à¦°', 11944 yy: '%d বà¦à¦°', 11945 }, 11946 preparse: function (string) { 11947 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 11948 return numberMap$2[match]; 11949 }); 11950 }, 11951 postformat: function (string) { 11952 return string.replace(/\d/g, function (match) { 11953 return symbolMap$3[match]; 11954 }); 11955 }, 11956 11957 meridiemParse: /রাত|à¦à§à¦°|সà¦à¦¾à¦²|দà§à¦ªà§à¦°|বিà¦à¦¾à¦²|সনà§à¦§à§à¦¯à¦¾|রাত/, 11958 meridiemHour: function (hour, meridiem) { 11959 if (hour === 12) { 11960 hour = 0; 11961 } 11962 if (meridiem === 'রাত') { 11963 return hour < 4 ? hour : hour + 12; 11964 } else if (meridiem === 'à¦à§à¦°') { 11965 return hour; 11966 } else if (meridiem === 'সà¦à¦¾à¦²') { 11967 return hour; 11968 } else if (meridiem === 'দà§à¦ªà§à¦°') { 11969 return hour >= 3 ? hour : hour + 12; 11970 } else if (meridiem === 'বিà¦à¦¾à¦²') { 11971 return hour + 12; 11972 } else if (meridiem === 'সনà§à¦§à§à¦¯à¦¾') { 11973 return hour + 12; 11974 } 11975 }, 11976 11977 meridiem: function (hour, minute, isLower) { 11978 if (hour < 4) { 11979 return 'রাত'; 11980 } else if (hour < 6) { 11981 return 'à¦à§à¦°'; 11982 } else if (hour < 12) { 11983 return 'সà¦à¦¾à¦²'; 11984 } else if (hour < 15) { 11985 return 'দà§à¦ªà§à¦°'; 11986 } else if (hour < 18) { 11987 return 'বিà¦à¦¾à¦²'; 11988 } else if (hour < 20) { 11989 return 'সনà§à¦§à§à¦¯à¦¾'; 11990 } else { 11991 return 'রাত'; 11992 } 11993 }, 11994 week: { 11995 dow: 0, // Sunday is the first day of the week. 11996 doy: 6, // The week that contains Jan 6th is the first week of the year. 11997 }, 11998 }); 11999 12000 //! moment.js locale configuration 12001 12002 var symbolMap$4 = { 12003 1: 'à§§', 12004 2: '২', 12005 3: 'à§©', 12006 4: '৪', 12007 5: 'à§«', 12008 6: '৬', 12009 7: 'à§', 12010 8: 'à§®', 12011 9: '৯', 12012 0: '০', 12013 }, 12014 numberMap$3 = { 12015 'à§§': '1', 12016 '২': '2', 12017 'à§©': '3', 12018 '৪': '4', 12019 'à§«': '5', 12020 '৬': '6', 12021 'à§': '7', 12022 'à§®': '8', 12023 '৯': '9', 12024 '০': '0', 12025 }; 12026 12027 hooks.defineLocale('bn', { 12028 months: 'à¦à¦¾à¦¨à§à§à¦¾à¦°à¦¿_ফà§à¦¬à§à¦°à§à§à¦¾à¦°à¦¿_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split( 12029 '_' 12030 ), 12031 monthsShort: 12032 'à¦à¦¾à¦¨à§_ফà§à¦¬à§à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦à§_ডিসà§'.split( 12033 '_' 12034 ), 12035 weekdays: 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à¦¬à¦¾à¦°_শনিবার'.split( 12036 '_' 12037 ), 12038 weekdaysShort: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿_শà§à¦à§à¦°_শনি'.split('_'), 12039 weekdaysMin: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹_শà§à¦à§à¦°_শনি'.split('_'), 12040 longDateFormat: { 12041 LT: 'A h:mm সমà§', 12042 LTS: 'A h:mm:ss সমà§', 12043 L: 'DD/MM/YYYY', 12044 LL: 'D MMMM YYYY', 12045 LLL: 'D MMMM YYYY, A h:mm সমà§', 12046 LLLL: 'dddd, D MMMM YYYY, A h:mm সমà§', 12047 }, 12048 calendar: { 12049 sameDay: '[à¦à¦] LT', 12050 nextDay: '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 12051 nextWeek: 'dddd, LT', 12052 lastDay: '[à¦à¦¤à¦à¦¾à¦²] LT', 12053 lastWeek: '[à¦à¦¤] dddd, LT', 12054 sameElse: 'L', 12055 }, 12056 relativeTime: { 12057 future: '%s পরà§', 12058 past: '%s à¦à¦à§', 12059 s: 'à¦à§à§à¦ সà§à¦à§à¦¨à§à¦¡', 12060 ss: '%d সà§à¦à§à¦¨à§à¦¡', 12061 m: 'à¦à¦ মিনিà¦', 12062 mm: '%d মিনিà¦', 12063 h: 'à¦à¦ à¦à¦¨à§à¦à¦¾', 12064 hh: '%d à¦à¦¨à§à¦à¦¾', 12065
12065 d: 'à¦à¦ দিন', 12066 dd: '%d দিন', 12067 M: 'à¦à¦ মাস', 12068 MM: '%d মাস', 12069 y: 'à¦à¦ বà¦à¦°', 12070 yy: '%d বà¦à¦°', 12071 }, 12072 preparse: function (string) { 12073 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 12074 return numberMap$3[match]; 12075 }); 12076 }, 12077 postformat: function (string) { 12078 return string.replace(/\d/g, function (match) { 12079 return symbolMap$4[match]; 12080 }); 12081 }, 12082 meridiemParse: /রাত|সà¦à¦¾à¦²|দà§à¦ªà§à¦°|বিà¦à¦¾à¦²|রাত/, 12083 meridiemHour: function (hour, meridiem) { 12084 if (hour === 12) { 12085 hour = 0; 12086 } 12087 if ( 12088 (meridiem === 'রাত' && hour >= 4) || 12089 (meridiem === 'দà§à¦ªà§à¦°' && hour < 5) || 12090 meridiem === 'বিà¦à¦¾à¦²' 12091 ) { 12092 return hour + 12; 12093 } else { 12094 return hour; 12095 } 12096 }, 12097 meridiem: function (hour, minute, isLower) { 12098 if (hour < 4) { 12099 return 'রাত'; 12100 } else if (hour < 10) { 12101 return 'সà¦à¦¾à¦²'; 12102 } else if (hour < 17) { 12103 return 'দà§à¦ªà§à¦°'; 12104 } else if (hour < 20) { 12105 return 'বিà¦à¦¾à¦²'; 12106 } else { 12107 return 'রাত'; 12108 } 12109 }, 12110 week: { 12111 dow: 0, // Sunday is the first day of the week. 12112 doy: 6, // The week that contains Jan 6th is the first week of the year. 12113 }, 12114 }); 12115 12116 //! moment.js locale configuration 12117 12118 var symbolMap$5 = { 12119 1: '༡', 12120 2: '༢', 12121 3: '༣', 12122 4: '༤', 12123 5: '༥', 12124 6: '༦', 12125 7: '༧', 12126 8: '༨', 12127 9: '༩', 12128 0: '༠', 12129 }, 12130 numberMap$4 = { 12131 '༡': '1', 12132 '༢': '2', 12133 '༣': '3', 12134 '༤': '4', 12135 '༥': '5', 12136 '༦': '6', 12137 '༧': '7', 12138 '༨': '8', 12139 '༩': '9', 12140 '༠': '0', 12141 }; 12142 12143 hooks.defineLocale('bo', { 12144 months: 'à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½ ིà½à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½à½²à½¦à¼à½'.split( 12145 '_' 12146 ), 12147 monthsShort: 12148 'à½à¾³à¼1_à½à¾³à¼2_à½à¾³à¼3_à½à¾³à¼4_à½à¾³à¼5_à½à¾³à¼6_à½à¾³à¼7_à½à¾³à¼8_à½à¾³à¼9_à½à¾³à¼10_à½à¾³à¼11_à½à¾³à¼12'.split( 12149 '_' 12150 ), 12151 monthsShortRegex: /^(à½à¾³à¼\d{1,2})/, 12152 monthsParseExact: true, 12153 weekdays: 12154 'à½à½à½ à¼à½à½²à¼à½à¼_à½à½à½ à¼à½à¾³à¼à½à¼_à½à½à½ à¼à½à½²à½à¼à½à½à½¢à¼_à½à½à½ à¼à½£à¾·à½à¼à½à¼_à½à½à½ à¼à½à½´à½¢à¼à½à½´_à½à½à½ à¼à½à¼à½¦à½à½¦à¼_à½à½à½ à¼à½¦à¾¤à½ºà½à¼à½à¼'.split( 12155 '_' 12156 ), 12157 weekdaysShort: 'à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼'.split( 12158 '_' 12159 ), 12160 weekdaysMin: 'à½à½²_à½à¾³_à½à½²à½_ལྷà½_à½à½´à½¢_སà½à½¦_སྤེà½'.split('_'), 12161 longDateFormat: { 12162 LT: 'A h:mm', 12163 LTS: 'A h:mm:ss', 12164 L: 'DD/MM/YYYY', 12165 LL: 'D MMMM YYYY', 12166 LLL: 'D MMMM YYYY, A h:mm', 12167 LLLL: 'dddd, D MMMM YYYY, A h:mm', 12168 }, 12169 calendar: { 12170 sameDay: '[à½à½²à¼à½¢à½²à½] LT', 12171 nextDay: '[སà½à¼à½à½²à½] LT', 12172 nextWeek: '[à½à½à½´à½à¼à½à¾²à½à¼à½¢à¾à½ºà½¦à¼à½], LT', 12173 lastDay: '[à½à¼à½¦à½] LT', 12174 lastWeek: '[à½à½à½´à½à¼à½à¾²à½à¼à½à½à½ à¼à½] dddd, LT', 12175 sameElse: 'L', 12176 }, 12177 relativeTime: { 12178 future: '%s ལà¼', 12179 past: '%s སà¾à½à¼à½£', 12180 s: 'ལà½à¼à½¦à½', 12181 ss: '%d སà¾à½¢à¼à½à¼', 12182 m: 'སà¾à½¢à¼à½à¼à½à½ ིà½', 12183 mm: '%d སà¾à½¢à¼à½', 12184 h: 'à½à½´à¼à½à½¼à½à¼à½à½ ིà½', 12185 hh: '%d à½à½´à¼à½à½¼à½', 12186 d: 'à½à½²à½à¼à½à½ ིà½', 12187 dd: '%d à½à½²à½à¼', 12188 M: 'à½à¾³à¼à½à¼à½à½ ིà½', 12189 MM: '%d à½à¾³à¼à½', 12190 y: 'ལོà¼à½à½ ིà½', 12191 yy: '%d ལོ', 12192 }, 12193 preparse: function (string) { 12194 return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { 12195 return numberMap$4[match]; 12196 }); 12197 }, 12198 postformat: function (string) { 12199 return string.replace(/\d/g, function (match) { 12200 return symbolMap$5[match]; 12201 }); 12202 }, 12203 meridiemParse: /à½à½à½à¼à½à½¼|à½à½¼à½à½¦à¼à½à½¦|à½à½²à½à¼à½à½´à½|à½à½à½¼à½à¼à½à½|à½à½à½à¼à½à½¼/, 12204 meridiemHour: function (hour, meridiem) { 12205 if (hour === 12) { 12206 hour = 0; 12207 } 12208 if ( 12209 (meridiem === 'à½à½à½à¼à½à½¼' && hour >= 4) || 12210 (meridiem === 'à½à½²à½à¼à½à½´à½' && hour < 5) || 12211 meridiem === 'à½à½à½¼à½à¼à½à½' 12212 ) { 12213 return hour + 12; 12214 } else { 12215 return hour; 12216 } 12217 }, 12218 meridiem: function (hour, minute, isLower) { 12219 if (hour < 4) { 12220 return 'à½à½à½à¼à½à½¼'; 12221 } else if (hour < 10) { 12222 return 'à½à½¼à½à½¦à¼à½à½¦'; 12223 } else if (hour < 17) { 12224 return 'à½à½²à½à¼à½à½´à½'; 12225 } else if (hour < 20) { 12226 return 'à½à½à½¼à½à¼à½à½'; 12227 } else { 12228 return 'à½à½à½à¼à½à½¼'; 12229 } 12230 }, 12231 week: { 12232 dow: 0, // Sunday is the first day of the week. 12233 doy: 6, // The week that contains Jan 6th is the first week of the year. 12234 }, 12235 }); 12236 12237 //! moment.js locale configuration 12238 12239 function relativeTimeWithMutation(number, withoutSuffix, key) { 12240 var format = { 12241 mm: 'munutenn', 12242 MM: 'miz', 12243 dd: 'devezh', 12244 }; 12245 return number + ' ' + mutation(format[key], number); 12246 } 12247 function specialMutationForYears(number) { 12248 switch (lastNumber(number)) { 12249 case 1: 12250 case 3: 12251 case 4: 12252 case 5: 12253 case 9: 12254 return number + ' bloaz'; 12255 default: 12256 return number + ' vloaz'; 12257 } 12258 } 12259 function lastNumber(number) { 12260 if (number > 9) { 12261 return lastNumber(number % 10); 12262 } 12263 return number; 12264 } 12265 function mutation(text, number) { 12266 if (number === 2) { 12267 return softMutation(text); 12268 } 12269 return text; 12270 } 12271 function softMutation(text) { 12272 var mutationTable = { 12273 m: 'v', 12274 b: 'v', 12275 d: 'z', 12276 }; 12277 if (mutationTable[text.charAt(0)] === undefined) { 12278 return text; 12279 } 12280 return mutationTable[text.charAt(0)] + text.substring(1); 12281 } 12282 12283 var monthsParse = [ 12284 /^gen/i, 12285 /^c[ʼ\']hwe/i, 12286 /^meu/i, 12287 /^ebr/i, 12288 /^mae/i, 12289 /^(mez|eve)/i, 12290 /^gou/i, 12291 /^eos/i, 12292 /^gwe/i, 12293 /^her/i, 12294 /^du/i, 12295 /^ker/i, 12296 ], 12297 monthsRegex$1 = 12298 /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, 12299 monthsStrictRegex = 12300 /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, 12301 monthsShortStrictRegex = 12302 /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, 12303 fullWeekdaysParse = [ 12304 /^sul/i, 12305 /^lun/i, 12306 /^meurzh/i, 12307 /^merc[ʼ\']her/i, 12308 /^yaou/i, 12309 /^gwener/i, 12310 /^sadorn/i, 12311 ], 12312 shortWeekdaysParse = [ 12313 /^Sul/i, 12314 /^Lun/i, 12315 /^Meu/i, 12316 /^Mer/i, 12317 /^Yao/i, 12318 /^Gwe/i, 12319 /^Sad/i, 12320 ], 12321 minWeekdaysParse = [ 12322 /^Su/i, 12323 /^Lu/i, 12324 /^Me([^r]|$)/i, 12325 /^Mer/i, 12326 /^Ya/i, 12327 /^Gw/i, 12328 /^Sa/i, 12329 ]; 12330 12331 hooks.defineLocale('br', {
12332 months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( 12333 '_' 12334 ), 12335 monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), 12336 weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), 12337 weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), 12338 weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), 12339 weekdaysParse: minWeekdaysParse, 12340 fullWeekdaysParse: fullWeekdaysParse, 12341 shortWeekdaysParse: shortWeekdaysParse, 12342 minWeekdaysParse: minWeekdaysParse, 12343 12344 monthsRegex: monthsRegex$1, 12345 monthsShortRegex: monthsRegex$1, 12346 monthsStrictRegex: monthsStrictRegex, 12347 monthsShortStrictRegex: monthsShortStrictRegex, 12348 monthsParse: monthsParse, 12349 longMonthsParse: monthsParse, 12350 shortMonthsParse: monthsParse, 12351 12352 longDateFormat: { 12353 LT: 'HH:mm', 12354 LTS: 'HH:mm:ss', 12355 L: 'DD/MM/YYYY', 12356 LL: 'D [a viz] MMMM YYYY', 12357 LLL: 'D [a viz] MMMM YYYY HH:mm', 12358 LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', 12359 }, 12360 calendar: { 12361 sameDay: '[Hiziv da] LT', 12362 nextDay: '[Warcʼhoazh da] LT', 12363 nextWeek: 'dddd [da] LT', 12364 lastDay: '[Decʼh da] LT', 12365 lastWeek: 'dddd [paset da] LT', 12366 sameElse: 'L', 12367 }, 12368 relativeTime: { 12369 future: 'a-benn %s', 12370 past: '%s ʼzo', 12371 s: 'un nebeud segondennoù', 12372 ss: '%d eilenn', 12373 m: 'ur vunutenn', 12374 mm: relativeTimeWithMutation, 12375 h: 'un eur', 12376 hh: '%d eur', 12377 d: 'un devezh', 12378 dd: relativeTimeWithMutation, 12379 M: 'ur miz', 12380 MM: relativeTimeWithMutation, 12381 y: 'ur bloaz', 12382 yy: specialMutationForYears, 12383 }, 12384 dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, 12385 ordinal: function (number) { 12386 var output = number === 1 ? 'añ' : 'vet'; 12387 return number + output; 12388 }, 12389 week: { 12390 dow: 1, // Monday is the first day of the week. 12391 doy: 4, // The week that contains Jan 4th is the first week of the year. 12392 }, 12393 meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn 12394 isPM: function (token) { 12395 return token === 'g.m.'; 12396 }, 12397 meridiem: function (hour, minute, isLower) { 12398 return hour < 12 ? 'a.m.' : 'g.m.'; 12399 }, 12400 }); 12401 12402 //! moment.js locale configuration 12403 12404 function translate(number, withoutSuffix, key) { 12405 var result = number + ' '; 12406 switch (key) { 12407 case 'ss': 12408 if (number === 1) { 12409 result += 'sekunda'; 12410 } else if (number === 2 || number === 3 || number === 4) { 12411 result += 'sekunde'; 12412 } else { 12413 result += 'sekundi'; 12414 } 12415 return result; 12416 case 'm': 12417 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 12418 case 'mm': 12419 if (number === 1) { 12420 result += 'minuta'; 12421 } else if (number === 2 || number === 3 || number === 4) { 12422 result += 'minute'; 12423 } else { 12424 result += 'minuta'; 12425 } 12426 return result; 12427 case 'h': 12428 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 12429 case 'hh': 12430 if (number === 1) { 12431 result += 'sat'; 12432 } else if (number === 2 || number === 3 || number === 4) { 12433 result += 'sata'; 12434 } else { 12435 result += 'sati'; 12436 } 12437 return result; 12438 case 'dd': 12439 if (number === 1) { 12440 result += 'dan'; 12441 } else { 12442 result += 'dana'; 12443 } 12444 return result; 12445 case 'MM': 12446 if (number === 1) { 12447 result += 'mjesec'; 12448 } else if (number === 2 || number === 3 || number === 4) { 12449 result += 'mjeseca'; 12450 } else { 12451 result += 'mjeseci'; 12452 } 12453 return result; 12454 case 'yy': 12455 if (number === 1) { 12456 result += 'godina'; 12457 } else if (number === 2 || number === 3 || number === 4) { 12458 result += 'godine'; 12459 } else { 12460 result += 'godina'; 12461 } 12462 return result; 12463 } 12464 } 12465 12466 hooks.defineLocale('bs', { 12467 months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( 12468 '_' 12469 ), 12470 monthsShort: 12471 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( 12472 '_' 12473 ), 12474 monthsParseExact: true, 12475 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 12476 '_' 12477 ), 12478 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 12479 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 12480 weekdaysParseExact: true, 12481 longDateFormat: { 12482 LT: 'H:mm', 12483 LTS: 'H:mm:ss', 12484 L: 'DD.MM.YYYY', 12485 LL: 'D. MMMM YYYY', 12486 LLL: 'D. MMMM YYYY H:mm', 12487 LLLL: 'dddd, D. MMMM YYYY H:mm', 12488 }, 12489 calendar: { 12490 sameDay: '[danas u] LT', 12491 nextDay: '[sutra u] LT', 12492 nextWeek: function () { 12493 switch (this.day()) { 12494 case 0: 12495 return '[u] [nedjelju] [u] LT'; 12496 case 3: 12497 return '[u] [srijedu] [u] LT'; 12498 case 6: 12499 return '[u] [subotu] [u] LT'; 12500 case 1: 12501 case 2: 12502 case 4: 12503 case 5: 12504 return '[u] dddd [u] LT'; 12505 } 12506 }, 12507 lastDay: '[juÄer u] LT', 12508 lastWeek: function () { 12509 switch (this.day()) { 12510 case 0: 12511 case 3: 12512 return '[proÅ¡lu] dddd [u] LT'; 12513 case 6: 12514 return '[proÅ¡le] [subote] [u] LT'; 12515 case 1: 12516 case 2: 12517 case 4: 12518 case 5: 12519 return '[proÅ¡li] dddd [u] LT'; 12520 } 12521 }, 12522 sameElse: 'L', 12523 }, 12524 relativeTime: { 12525 future: 'za %s', 12526 past: 'prije %s', 12527 s: 'par sekundi', 12528 ss: translate, 12529 m: translate, 12530 mm: translate, 12531 h: translate, 12532 hh: translate, 12533 d: 'dan', 12534 dd: translate, 12535 M: 'mjesec', 12536 MM: translate, 12537 y: 'godinu', 12538 yy: translate, 12539 }, 12540 dayOfMonthOrdinalParse: /\d{1,2}\./, 12541 ordinal: '%d.', 12542 week: { 12543 dow: 1, // Monday is the first day of the week. 12544 doy: 7, // The week that contains Jan 7th is the first week of the year. 12545 }, 12546 }); 12547 12548 //! moment.js locale configuration 12549 12550 hooks.defineLocale('ca', { 12551 months: { 12552 standalone: 12553 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( 12554 '_' 12555 ), 12556 format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( 12557 '_' 12558 ), 12559 isFormat: /D[oD]?(\s)+MMMM/, 12560 }, 12561 monthsShort: 12562 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( 12563 '_' 12564 ), 12565 monthsParseExact: true, 12566 weekdays: 12567 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( 12568 '_' 12569 ), 12570 weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), 12571 weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), 12572 weekdaysParseExact: true, 12573 longDateFormat: { 12574 LT: 'H:mm', 12575 LTS: 'H:mm:ss', 12576 L: 'DD/MM/YYYY', 12577 LL: 'D MMMM [de] YYYY', 12578 ll: 'D MMM YYYY', 12579 LLL: 'D MMMM [de] YYYY [a les] H:mm', 12580 lll: 'D MMM YYYY, H:mm', 12581 LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', 12582 llll: 'ddd D MMM YYYY, H:mm', 12583 }, 12584 calendar: { 12585 sameDay: function () { 12586 return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 12587 }, 12588 nextDay: function () { 12589 return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 12590 }, 12591 nextWeek: function () { 12592 return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 12593 }, 12594 lastDay: function () { 12595 return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 12596 }, 12597 lastWeek: function () { 12598 return ( 12599 '[el] dddd [passat a ' + 12600 (this.hours() !== 1 ? 'les' : 'la') + 12601 '] LT' 12602 ); 12603 }, 12604 sameElse: 'L', 12605 }, 12606 relativeTime: { 12607 future: "d'aquà %s", 12608 past: 'fa %s', 12609 s: 'uns segons', 12610 ss: '%d segons', 12611 m: 'un minut', 12612 mm: '%d minuts', 12613 h: 'una hora', 12614 hh: '%d hores', 12615 d: 'un dia', 12616 dd: '%d dies', 12617 M: 'un mes', 12618 MM: '%d mesos', 12619 y: 'un any', 12620 yy: '%d anys', 12621 }, 12622 dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, 12623 ordinal: function (number, period) { 12624 var output = 12625 number === 1 12626 ? 'r' 12627 : number === 2 12628 ? 'n' 12629 : number === 3 12630 ? 'r' 12631 : number === 4 12632 ? 't' 12633 : 'è'; 12634 if (period === 'w' || period === 'W') { 12635 output = 'a'; 12636 } 12637 return number + output; 12638 }, 12639 week: { 12640 dow: 1, // Monday is the first day of the week. 12641 doy: 4, // The week that contains Jan 4th is the first week of the year. 12642 }, 12643 }); 12644 12645 //! moment.js locale configuration 12646 12647 var months$4 = { 12648 format: 'leden_únor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_záÅÃ_ÅÃjen_listopad_prosinec'.
vendor: 8,642 bytes, lines 12648-12852
12648split( 12649 '_' 12650 ), 12651 standalone: 12652 'ledna_února_bÅezna_dubna_kvÄtna_Äervna_Äervence_srpna_záÅÃ_ÅÃjna_listopadu_prosince'.split( 12653 '_' 12654 ), 12655 }, 12656 monthsShort = 'led_úno_bÅe_dub_kvÄ_Ävn_Ävc_srp_záÅ_ÅÃj_lis_pro'.split('_'), 12657 monthsParse$1 = [ 12658 /^led/i, 12659 /^úno/i, 12660 /^bÅe/i, 12661 /^dub/i, 12662 /^kvÄ/i, 12663 /^(Ävn|Äerven$|Äervna)/i, 12664 /^(Ävc|Äervenec|Äervence)/i, 12665 /^srp/i, 12666 /^záÅ/i, 12667 /^ÅÃj/i, 12668 /^lis/i, 12669 /^pro/i, 12670 ], 12671 // NOTE: 'Äerven' is substring of 'Äervenec'; therefore 'Äervenec' must precede 'Äerven' in the regex to be fully matched. 12672 // Otherwise parser matches '1. Äervenec' as '1. Äerven' + 'ec'. 12673 monthsRegex$2 = 12674 /^(leden|únor|bÅezen|duben|kvÄten|Äervenec|Äervence|Äerven|Äervna|srpen|záÅÃ|ÅÃjen|listopad|prosinec|led|úno|bÅe|dub|kvÄ|Ävn|Ävc|srp|záÅ|ÅÃj|lis|pro)/i; 12675 12676 function plural$1(n) { 12677 return n > 1 && n < 5 && ~~(n / 10) !== 1; 12678 } 12679 function translate$1(number, withoutSuffix, key, isFuture) { 12680 var result = number + ' '; 12681 switch (key) { 12682 case 's': // a few seconds / in a few seconds / a few seconds ago 12683 return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; 12684 case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago 12685 if (withoutSuffix || isFuture) { 12686 return result + (plural$1(number) ? 'sekundy' : 'sekund'); 12687 } else { 12688 return result + 'sekundami'; 12689 } 12690 case 'm': // a minute / in a minute / a minute ago 12691 return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; 12692 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 12693 if (withoutSuffix || isFuture) { 12694 return result + (plural$1(number) ? 'minuty' : 'minut'); 12695 } else { 12696 return result + 'minutami'; 12697 } 12698 case 'h': // an hour / in an hour / an hour ago 12699 return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; 12700 case 'hh': // 9 hours / in 9 hours / 9 hours ago 12701 if (withoutSuffix || isFuture) { 12702 return result + (plural$1(number) ? 'hodiny' : 'hodin'); 12703 } else { 12704 return result + 'hodinami'; 12705 } 12706 case 'd': // a day / in a day / a day ago 12707 return withoutSuffix || isFuture ? 'den' : 'dnem'; 12708 case 'dd': // 9 days / in 9 days / 9 days ago 12709 if (withoutSuffix || isFuture) { 12710 return result + (plural$1(number) ? 'dny' : 'dnÃ'); 12711 } else { 12712 return result + 'dny'; 12713 } 12714 case 'M': // a month / in a month / a month ago 12715 return withoutSuffix || isFuture ? 'mÄsÃc' : 'mÄsÃcem'; 12716 case 'MM': // 9 months / in 9 months / 9 months ago 12717 if (withoutSuffix || isFuture) { 12718 return result + (plural$1(number) ? 'mÄsÃce' : 'mÄsÃců'); 12719 } else { 12720 return result + 'mÄsÃci'; 12721 } 12722 case 'y': // a year / in a year / a year ago 12723 return withoutSuffix || isFuture ? 'rok' : 'rokem'; 12724 case 'yy': // 9 years / in 9 years / 9 years ago 12725 if (withoutSuffix || isFuture) { 12726 return result + (plural$1(number) ? 'roky' : 'let'); 12727 } else { 12728 return result + 'lety'; 12729 } 12730 } 12731 } 12732 12733 hooks.defineLocale('cs', { 12734 months: months$4, 12735 monthsShort: monthsShort, 12736 monthsRegex: monthsRegex$2, 12737 monthsShortRegex: monthsRegex$2, 12738 // NOTE: 'Äerven' is substring of 'Äervenec'; therefore 'Äervenec' must precede 'Äerven' in the regex to be fully matched. 12739 // Otherwise parser matches '1. Äervenec' as '1. Äerven' + 'ec'. 12740 monthsStrictRegex: 12741 /^(leden|ledna|února|únor|bÅezen|bÅezna|duben|dubna|kvÄten|kvÄtna|Äervenec|Äervence|Äerven|Äervna|srpen|srpna|záÅÃ|ÅÃjen|ÅÃjna|listopadu|listopad|prosinec|prosince)/i, 12742 monthsShortStrictRegex: 12743 /^(led|úno|bÅe|dub|kvÄ|Ävn|Ävc|srp|záÅ|ÅÃj|lis|pro)/i, 12744 monthsParse: monthsParse$1, 12745 longMonthsParse: monthsParse$1, 12746 shortMonthsParse: monthsParse$1, 12747 weekdays: 'nedÄle_pondÄlÃ_úterý_stÅeda_Ätvrtek_pátek_sobota'.split('_'), 12748 weekdaysShort: 'ne_po_út_st_Ät_pá_so'.split('_'), 12749 weekdaysMin: 'ne_po_út_st_Ät_pá_so'.split('_'), 12750 longDateFormat: { 12751 LT: 'H:mm', 12752 LTS: 'H:mm:ss', 12753 L: 'DD.MM.YYYY', 12754 LL: 'D. MMMM YYYY', 12755 LLL: 'D. MMMM YYYY H:mm', 12756 LLLL: 'dddd D. MMMM YYYY H:mm', 12757 l: 'D. M. YYYY', 12758 }, 12759 calendar: { 12760 sameDay: '[dnes v] LT', 12761 nextDay: '[zÃtra v] LT', 12762 nextWeek: function () { 12763 switch (this.day()) { 12764 case 0: 12765 return '[v nedÄli v] LT'; 12766 case 1: 12767 case 2: 12768 return '[v] dddd [v] LT'; 12769 case 3: 12770 return '[ve stÅedu v] LT'; 12771 case 4: 12772 return '[ve Ätvrtek v] LT'; 12773 case 5: 12774 return '[v pátek v] LT'; 12775 case 6: 12776 return '[v sobotu v] LT'; 12777 } 12778 }, 12779 lastDay: '[vÄera v] LT', 12780 lastWeek: function () { 12781 switch (this.day()) { 12782 case 0: 12783 return '[minulou nedÄli v] LT'; 12784 case 1: 12785 case 2: 12786 return '[minulé] dddd [v] LT'; 12787 case 3: 12788 return '[minulou stÅedu v] LT'; 12789 case 4: 12790 case 5: 12791 return '[minulý] dddd [v] LT'; 12792 case 6: 12793 return '[minulou sobotu v] LT'; 12794 } 12795 }, 12796 sameElse: 'L', 12797 }, 12798 relativeTime: { 12799 future: 'za %s', 12800 past: 'pÅed %s', 12801 s: translate$1, 12802 ss: translate$1, 12803 m: translate$1, 12804 mm: translate$1, 12805 h: translate$1, 12806 hh: translate$1, 12807 d: translate$1, 12808 dd: translate$1, 12809 M: translate$1, 12810 MM: translate$1, 12811 y: translate$1, 12812 yy: translate$1, 12813 }, 12814 dayOfMonthOrdinalParse: /\d{1,2}\./, 12815 ordinal: '%d.', 12816 week: { 12817 dow: 1, // Monday is the first day of the week. 12818 doy: 4, // The week that contains Jan 4th is the first week of the year. 12819 }, 12820 }); 12821 12822 //! moment.js locale configuration 12823 12824 hooks.defineLocale('cv', { 12825 months: 'кÓÑлаÑ_наÑÓÑ_пÑÑ_ака_май_Ò«ÓÑÑме_ÑÑÓ_Ò«ÑÑла_авÓн_Ñпа_Ñӳк_ÑаÑÑав'.split( 12826 '_' 12827 ), 12828 monthsShort: 'кÓÑ_наÑ_пÑÑ_ака_май_Ò«ÓÑ_ÑÑÓ_Ò«ÑÑ_авн_Ñпа_Ñӳк_ÑаÑ'.split('_'), 12829 weekdays: 12830 'вÑÑÑаÑникÑн_ÑÑнÑикÑн_ÑÑлаÑикÑн_ÑнкÑн_кÓҫнеÑникÑн_ÑÑнекÑн_ÑÓмаÑкÑн'.split( 12831 '_' 12832 ), 12833 weekdaysShort: 'вÑÑ_ÑÑн_ÑÑл_Ñн_кÓÒ«_ÑÑн_ÑÓм'.split('_'), 12834 weekdaysMin: 'вÑ_Ñн_ÑÑ_Ñн_кҫ_ÑÑ_Ñм'.split('_'), 12835 longDateFormat: { 12836 LT: 'HH:mm', 12837 LTS: 'HH:mm:ss', 12838 L: 'DD-MM-YYYY', 12839 LL: 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ]', 12840 LLL: 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm', 12841 LLLL: 'dddd, YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm', 12842 }, 12843 calendar: { 12844 sameDay: '[ÐаÑн] LT [ÑÐµÑ ÐµÑÑе]', 12845 nextDay: '[ЫÑан] LT [ÑÐµÑ ÐµÑÑе]', 12846 lastDay: '[ÓнеÑ] LT [ÑÐµÑ ÐµÑÑе]', 12847 nextWeek: '[ҪиÑеÑ] dddd LT [ÑÐµÑ ÐµÑÑе]', 12848 lastWeek: '[ÐÑÑнÓ] dddd LT [ÑÐµÑ ÐµÑÑе]', 12849 sameElse: 'L', 12850 }, 12851 relativeTime: { 12852 future: function (output) {
12853 var affix = /ÑÐµÑ ÐµÑ$/i.exec(output) 12854 ? 'Ñен' 12855 : /Ò«Ñл$/i.exec(output) 12856 ? 'Ñан' 12857 : 'Ñан'; 12858 return output + affix; 12859 }, 12860 past: '%s каÑлла', 12861 s: 'пÓÑ-ик ҫеккÑнÑ', 12862 ss: '%d ҫеккÑнÑ', 12863 m: 'пÓÑ Ð¼Ð¸Ð½ÑÑ', 12864 mm: '%d минÑÑ', 12865 h: 'пÓÑ ÑÐµÑ ÐµÑ', 12866 hh: '%d ÑÐµÑ ÐµÑ', 12867 d: 'пÓÑ ÐºÑн', 12868 dd: '%d кÑн', 12869 M: 'пÓÑ ÑйÓÑ ', 12870 MM: '%d ÑйÓÑ ', 12871 y: 'пÓÑ Ò«Ñл', 12872 yy: '%d Ò«Ñл', 12873 }, 12874 dayOfMonthOrdinalParse: /\d{1,2}-мÓÑ/, 12875 ordinal: '%d-мÓÑ', 12876 week: { 12877 dow: 1, // Monday is the first day of the week. 12878 doy: 7, // The week that contains Jan 7th is the first week of the year. 12879 }, 12880 }); 12881 12882 //! moment.js locale configuration 12883 12884 hooks.defineLocale('cy', { 12885 months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( 12886 '_' 12887 ), 12888 monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( 12889 '_' 12890 ), 12891 weekdays: 12892 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( 12893 '_' 12894 ), 12895 weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), 12896 weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), 12897 weekdaysParseExact: true, 12898 // time formats are the same as en-gb 12899 longDateFormat: { 12900 LT: 'HH:mm', 12901 LTS: 'HH:mm:ss', 12902 L: 'DD/MM/YYYY', 12903 LL: 'D MMMM YYYY', 12904 LLL: 'D MMMM YYYY HH:mm', 12905 LLLL: 'dddd, D MMMM YYYY HH:mm', 12906 }, 12907 calendar: { 12908 sameDay: '[Heddiw am] LT', 12909 nextDay: '[Yfory am] LT', 12910 nextWeek: 'dddd [am] LT', 12911 lastDay: '[Ddoe am] LT', 12912 lastWeek: 'dddd [diwethaf am] LT', 12913 sameElse: 'L', 12914 }, 12915 relativeTime: { 12916 future: 'mewn %s', 12917 past: '%s yn ôl', 12918 s: 'ychydig eiliadau', 12919 ss: '%d eiliad', 12920 m: 'munud', 12921 mm: '%d munud', 12922 h: 'awr', 12923 hh: '%d awr', 12924 d: 'diwrnod', 12925 dd: '%d diwrnod', 12926 M: 'mis', 12927 MM: '%d mis', 12928 y: 'blwyddyn', 12929 yy: '%d flynedd', 12930 }, 12931 dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, 12932 // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh 12933 ordinal: function (number) { 12934 var b = number, 12935 output = '', 12936 lookup = [ 12937 '', 12938 'af', 12939 'il', 12940 'ydd', 12941 'ydd', 12942 'ed', 12943 'ed', 12944 'ed', 12945 'fed', 12946 'fed', 12947 'fed', // 1af to 10fed 12948 'eg', 12949 'fed', 12950 'eg', 12951 'eg', 12952 'fed', 12953 'eg', 12954 'eg', 12955 'fed', 12956 'eg', 12957 'fed', // 11eg to 20fed 12958 ]; 12959 if (b > 20) { 12960 if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { 12961 output = 'fed'; // not 30ain, 70ain or 90ain 12962 } else { 12963 output = 'ain'; 12964 } 12965 } else if (b > 0) { 12966 output = lookup[b]; 12967 } 12968 return number + output; 12969 }, 12970 week: { 12971 dow: 1, // Monday is the first day of the week. 12972 doy: 4, // The week that contains Jan 4th is the first week of the year. 12973 }, 12974 }); 12975 12976 //! moment.js locale configuration 12977 12978 hooks.defineLocale('da', { 12979 months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( 12980 '_' 12981 ), 12982 monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 12983 weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 12984 weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), 12985 weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), 12986 longDateFormat: { 12987 LT: 'HH:mm', 12988 LTS: 'HH:mm:ss', 12989 L: 'DD.MM.YYYY', 12990 LL: 'D. MMMM YYYY', 12991 LLL: 'D. MMMM YYYY HH:mm', 12992 LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', 12993 }, 12994 calendar: { 12995 sameDay: '[i dag kl.] LT', 12996 nextDay: '[i morgen kl.] LT', 12997 nextWeek: 'pÃ¥ dddd [kl.] LT', 12998 lastDay: '[i gÃ¥r kl.] LT', 12999 lastWeek: '[i] dddd[s kl.] LT', 13000 sameElse: 'L', 13001 }, 13002 relativeTime: { 13003 future: 'om %s', 13004 past: '%s siden', 13005 s: 'fÃ¥ sekunder', 13006 ss: '%d sekunder', 13007 m: 'et minut', 13008 mm: '%d minutter', 13009 h: 'en time', 13010 hh: '%d timer', 13011 d: 'en dag', 13012 dd: '%d dage', 13013 M: 'en mÃ¥ned', 13014 MM: '%d mÃ¥neder', 13015 y: 'et Ã¥r', 13016 yy: '%d Ã¥r', 13017 }, 13018 dayOfMonthOrdinalParse: /\d{1,2}\./, 13019 ordinal: '%d.', 13020 week: { 13021 dow: 1, // Monday is the first day of the week. 13022 doy: 4, // The week that contains Jan 4th is the first week of the year. 13023 }, 13024 }); 13025 13026 //! moment.js locale configuration 13027 13028 function processRelativeTime(number, withoutSuffix, key, isFuture) { 13029 var format = { 13030 m: ['eine Minute', 'einer Minute'], 13031 h: ['eine Stunde', 'einer Stunde'], 13032 d: ['ein Tag', 'einem Tag'], 13033 dd: [number + ' Tage', number + ' Tagen'], 13034 w: ['eine Woche', 'einer Woche'], 13035 M: ['ein Monat', 'einem Monat'], 13036 MM: [number + ' Monate', number + ' Monaten'], 13037 y: ['ein Jahr', 'einem Jahr'],
vendor: 5,239 bytes, lines 13038-13183
13038 yy: [number + ' Jahre', number + ' Jahren'], 13039 }; 13040 return withoutSuffix ? format[key][0] : format[key][1]; 13041 } 13042 13043 hooks.defineLocale('de-at', { 13044 months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 13045 '_' 13046 ), 13047 monthsShort: 13048 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 13049 monthsParseExact: true, 13050 weekdays: 13051 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 13052 '_' 13053 ), 13054 weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 13055 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 13056 weekdaysParseExact: true, 13057 longDateFormat: { 13058 LT: 'HH:mm', 13059 LTS: 'HH:mm:ss', 13060 L: 'DD.MM.YYYY', 13061 LL: 'D. MMMM YYYY', 13062 LLL: 'D. MMMM YYYY HH:mm', 13063 LLLL: 'dddd, D. MMMM YYYY HH:mm', 13064 }, 13065 calendar: { 13066 sameDay: '[heute um] LT [Uhr]', 13067 sameElse: 'L', 13068 nextDay: '[morgen um] LT [Uhr]', 13069 nextWeek: 'dddd [um] LT [Uhr]', 13070 lastDay: '[gestern um] LT [Uhr]', 13071 lastWeek: '[letzten] dddd [um] LT [Uhr]', 13072 }, 13073 relativeTime: { 13074 future: 'in %s', 13075 past: 'vor %s', 13076 s: 'ein paar Sekunden', 13077 ss: '%d Sekunden', 13078 m: processRelativeTime, 13079 mm: '%d Minuten', 13080 h: processRelativeTime, 13081 hh: '%d Stunden', 13082 d: processRelativeTime, 13083 dd: processRelativeTime, 13084 w: processRelativeTime, 13085 ww: '%d Wochen', 13086 M: processRelativeTime, 13087 MM: processRelativeTime, 13088 y: processRelativeTime, 13089 yy: processRelativeTime, 13090 }, 13091 dayOfMonthOrdinalParse: /\d{1,2}\./, 13092 ordinal: '%d.', 13093 week: { 13094 dow: 1, // Monday is the first day of the week. 13095 doy: 4, // The week that contains Jan 4th is the first week of the year. 13096 }, 13097 }); 13098 13099 //! moment.js locale configuration 13100 13101 function processRelativeTime$1(number, withoutSuffix, key, isFuture) { 13102 var format = { 13103 m: ['eine Minute', 'einer Minute'], 13104 h: ['eine Stunde', 'einer Stunde'], 13105 d: ['ein Tag', 'einem Tag'], 13106 dd: [number + ' Tage', number + ' Tagen'], 13107 w: ['eine Woche', 'einer Woche'], 13108 M: ['ein Monat', 'einem Monat'], 13109 MM: [number + ' Monate', number + ' Monaten'], 13110 y: ['ein Jahr', 'einem Jahr'], 13111 yy: [number + ' Jahre', number + ' Jahren'], 13112 }; 13113 return withoutSuffix ? format[key][0] : format[key][1]; 13114 } 13115 13116 hooks.defineLocale('de-ch', { 13117 months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 13118 '_' 13119 ), 13120 monthsShort: 13121 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 13122 monthsParseExact: true, 13123 weekdays: 13124 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 13125 '_' 13126 ), 13127 weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 13128 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 13129 weekdaysParseExact: true, 13130 longDateFormat: { 13131 LT: 'HH:mm', 13132 LTS: 'HH:mm:ss', 13133 L: 'DD.MM.YYYY', 13134 LL: 'D. MMMM YYYY', 13135 LLL: 'D. MMMM YYYY HH:mm', 13136 LLLL: 'dddd, D. MMMM YYYY HH:mm', 13137 }, 13138 calendar: { 13139 sameDay: '[heute um] LT [Uhr]', 13140 sameElse: 'L', 13141 nextDay: '[morgen um] LT [Uhr]', 13142 nextWeek: 'dddd [um] LT [Uhr]', 13143 lastDay: '[gestern um] LT [Uhr]', 13144 lastWeek: '[letzten] dddd [um] LT [Uhr]', 13145 }, 13146 relativeTime: { 13147 future: 'in %s', 13148 past: 'vor %s', 13149 s: 'ein paar Sekunden', 13150 ss: '%d Sekunden', 13151 m: processRelativeTime$1, 13152 mm: '%d Minuten', 13153 h: processRelativeTime$1, 13154 hh: '%d Stunden', 13155 d: processRelativeTime$1, 13156 dd: processRelativeTime$1, 13157 w: processRelativeTime$1, 13158 ww: '%d Wochen', 13159 M: processRelativeTime$1, 13160 MM: processRelativeTime$1, 13161 y: processRelativeTime$1, 13162 yy: processRelativeTime$1, 13163 }, 13164 dayOfMonthOrdinalParse: /\d{1,2}\./, 13165 ordinal: '%d.', 13166 week: { 13167 dow: 1, // Monday is the first day of the week. 13168 doy: 4, // The week that contains Jan 4th is the first week of the year. 13169 }, 13170 }); 13171 13172 //! moment.js locale configuration 13173 13174 function processRelativeTime$2(number, withoutSuffix, key, isFuture) { 13175 var format = { 13176 m: ['eine Minute', 'einer Minute'], 13177 h: ['eine Stunde', 'einer Stunde'], 13178 d: ['ein Tag', 'einem Tag'], 13179 dd: [number + ' Tage', number + ' Tagen'], 13180 w: ['eine Woche', 'einer Woche'], 13181 M: ['ein Monat', 'einem Monat'], 13182 MM: [number + ' Monate', number + ' Monaten'], 13183 y: ['ein Jahr', 'einem Jahr'],
13184 yy: [number + ' Jahre', number + ' Jahren'], 13185 }; 13186 return withoutSuffix ? format[key][0] : format[key][1]; 13187 } 13188 13189 hooks.defineLocale('de', { 13190 months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 13191 '_' 13192 ), 13193 monthsShort: 13194 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 13195 monthsParseExact: true, 13196 weekdays: 13197 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 13198 '_' 13199 ), 13200 weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 13201 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 13202 weekdaysParseExact: true, 13203 longDateFormat: { 13204 LT: 'HH:mm', 13205 LTS: 'HH:mm:ss', 13206 L: 'DD.MM.YYYY', 13207 LL: 'D. MMMM YYYY', 13208 LLL: 'D. MMMM YYYY HH:mm', 13209 LLLL: 'dddd, D. MMMM YYYY HH:mm', 13210 }, 13211 calendar: { 13212 sameDay: '[heute um] LT [Uhr]', 13213 sameElse: 'L', 13214 nextDay: '[morgen um] LT [Uhr]', 13215 nextWeek: 'dddd [um] LT [Uhr]', 13216 lastDay: '[gestern um] LT [Uhr]', 13217 lastWeek: '[letzten] dddd [um] LT [Uhr]', 13218 }, 13219 relativeTime: { 13220 future: 'in %s', 13221 past: 'vor %s', 13222 s: 'ein paar Sekunden', 13223 ss: '%d Sekunden', 13224 m: processRelativeTime$2, 13225 mm: '%d Minuten', 13226 h: processRelativeTime$2, 13227 hh: '%d Stunden', 13228 d: processRelativeTime$2, 13229 dd: processRelativeTime$2, 13230 w: processRelativeTime$2, 13231 ww: '%d Wochen', 13232 M: processRelativeTime$2, 13233 MM: processRelativeTime$2, 13234 y: processRelativeTime$2, 13235 yy: processRelativeTime$2, 13236 }, 13237 dayOfMonthOrdinalParse: /\d{1,2}\./, 13238 ordinal: '%d.', 13239 week: { 13240 dow: 1, // Monday is the first day of the week. 13241 doy: 4, // The week that contains Jan 4th is the first week of the year. 13242 }, 13243 }); 13244 13245 //! moment.js locale configuration 13246 13247 var months$5 = [ 13248 'ÞÞ¬ÞÞªÞÞ¦ÞÞ©', 13249 'ÞÞ¬ÞÞ°ÞÞªÞÞ¦ÞÞ©', 13250 'ÞÞ§ÞÞ¨ÞÞª', 13251 'ÞÞÞÞ°ÞÞ©ÞÞª', 13252 'ÞÞ', 13253 'ÞÞ«ÞÞ°', 13254 'ÞÞªÞÞ¦ÞÞ¨', 13255 'ÞÞ¯ÞÞ¦ÞÞ°ÞÞª', 13256 'ÞÞ¬ÞÞ°ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 13257 'ÞÞ®ÞÞ°ÞÞ¯ÞÞ¦ÞÞª', 13258 'ÞÞ®ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 13259 'ÞÞ¨ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 13260 ], 13261 weekdays = [ 13262 'ÞÞ§ÞÞ¨ÞÞ°ÞÞ¦', 13263 'ÞÞ¯ÞÞ¦', 13264 'ÞÞ¦ÞÞ°ÞÞ§ÞÞ¦', 13265 'ÞÞªÞÞ¦', 13266 'ÞÞªÞÞ§ÞÞ°ÞÞ¦ÞÞ¨', 13267 'ÞÞªÞÞªÞÞª', 13268 'ÞÞ®ÞÞ¨ÞÞ¨ÞÞª', 13269 ]; 13270 13271 hooks.defineLocale('dv', { 13272 months: months$5, 13273 monthsShort: months$5, 13274 weekdays: weekdays, 13275 weekdaysShort: weekdays, 13276 weekdaysMin: 'ÞÞ§ÞÞ¨_ÞÞ¯ÞÞ¦_ÞÞ¦ÞÞ°_ÞÞªÞÞ¦_ÞÞªÞÞ§_ÞÞªÞÞª_ÞÞ®ÞÞ¨'.split('_'), 13277 longDateFormat: { 13278 LT: 'HH:mm', 13279 LTS: 'HH:mm:ss', 13280 L: 'D/M/YYYY', 13281 LL: 'D MMMM YYYY', 13282 LLL: 'D MMMM YYYY HH:mm', 13283 LLLL: 'dddd D MMMM YYYY HH:mm', 13284 }, 13285 meridiemParse: /ÞÞ|ÞÞ/, 13286 isPM: function (input) { 13287 return 'ÞÞ' === input; 13288 }, 13289 meridiem: function (hour, minute, isLower) { 13290 if (hour < 12) { 13291 return 'ÞÞ'; 13292 } else { 13293 return 'ÞÞ'; 13294 } 13295 }, 13296 calendar: { 13297 sameDay: '[ÞÞ¨ÞÞ¦ÞÞª] LT', 13298 nextDay: '[ÞÞ§ÞÞ¦ÞÞ§] LT', 13299 nextWeek: 'dddd LT', 13300 lastDay: '[ÞÞ¨ÞÞ°ÞÞ¬] LT', 13301 lastWeek: '[ÞÞ§ÞÞ¨ÞÞªÞÞ¨] dddd LT', 13302 sameElse: 'L', 13303 }, 13304 relativeTime: { 13305 future: 'ÞÞ¬ÞÞÞÞ¦ÞÞ¨ %s', 13306 past: 'ÞÞªÞÞ¨ÞÞ° %s', 13307 s: 'ÞÞ¨ÞÞªÞÞ°ÞÞªÞÞ®Þ Þ¬ÞÞ°', 13308 ss: 'd% ÞÞ¨ÞÞªÞÞ°ÞÞª', 13309 m: 'ÞÞ¨ÞÞ¨ÞÞ¬ÞÞ°', 13310 mm: 'ÞÞ¨ÞÞ¨ÞÞª %d', 13311 h: 'ÞÞ¦ÞÞ¨ÞÞ¨ÞÞ¬ÞÞ°', 13312 hh: 'ÞÞ¦ÞÞ¨ÞÞ¨ÞÞª %d', 13313 d: 'ÞÞªÞÞ¦ÞÞ¬ÞÞ°', 13314 dd: 'ÞÞªÞÞ¦ÞÞ° %d', 13315 M: 'ÞÞ¦ÞÞ¬ÞÞ°', 13316 MM: 'ÞÞ¦ÞÞ° %d', 13317 y: 'ÞÞ¦ÞÞ¦ÞÞ¬ÞÞ°', 13318 yy: 'ÞÞ¦ÞÞ¦ÞÞª %d', 13319 }, 13320 preparse: function (string) { 13321 return string.replace(/Ø/g, ','); 13322 }, 13323 postformat: function (string) { 13324 return string.replace(/,/g, 'Ø'); 13325 }, 13326 week: { 13327 dow: 7, // Sunday is the first day of the week. 13328 doy: 12, // The week that contains Jan 12th is the first week of the year. 13329 }, 13330 }); 13331 13332 //! moment.js locale configuration 13333 13334 function isFunction$1(input) { 13335 return ( 13336 (typeof Function !== 'undefined' && input instanceof Function) || 13337 Object.prototype.toString.call(input) === '[object Function]' 13338 ); 13339 } 13340 13341 hooks.defineLocale('el', { 13342 monthsNominativeEl: 13343 'ÎÎ±Î½Î¿Ï Î¬ÏιοÏ_ΦεβÏÎ¿Ï Î¬ÏιοÏ_ÎάÏÏιοÏ_ÎÏÏίλιοÏ_ÎάιοÏ_ÎοÏνιοÏ_ÎοÏλιοÏ_ÎÏÎ³Î¿Ï ÏÏοÏ_ΣεÏÏÎμβÏιοÏ_ÎκÏÏβÏιοÏ_ÎοÎμβÏιοÏ_ÎεκÎμβÏιοÏ'.split( 13344 '_' 13345 ), 13346 monthsGenitiveEl: 13347 'ÎÎ±Î½Î¿Ï Î±ÏÎ¯Î¿Ï _ΦεβÏÎ¿Ï Î±ÏÎ¯Î¿Ï _ÎαÏÏÎ¯Î¿Ï _ÎÏÏÎ¹Î»Î¯Î¿Ï _ÎαÎÎ¿Ï _ÎÎ¿Ï Î½Î¯Î¿Ï _ÎÎ¿Ï Î»Î¯Î¿Ï _ÎÏ Î³Î¿ÏÏÏÎ¿Ï _ΣεÏÏεμβÏÎ¯Î¿Ï _ÎκÏÏβÏÎ¯Î¿Ï _ÎοεμβÏÎ¯Î¿Ï _ÎεκεμβÏÎ¯Î¿Ï '.split( 13348 '_' 13349 ), 13350 months: function (momentToFormat, format) { 13351 if (!momentToFormat) { 13352 return this._monthsNominativeEl; 13353 } else if ( 13354 typeof format === 'string' && 13355 /D/.test(format.substring(0, format.indexOf('MMMM'))) 13356 ) { 13357 // if there is a day number before 'MMMM' 13358 return this._monthsGenitiveEl[momentToFormat.month()]; 13359 } else { 13360 return this._monthsNominativeEl[momentToFormat.month()]; 13361 } 13362 }, 13363 monthsShort: 'Îαν_Φεβ_ÎαÏ_ÎÏÏ_ÎαÏ_ÎÎ¿Ï Î½_ÎÎ¿Ï Î»_ÎÏ Î³_ΣεÏ_ÎκÏ_Îοε_Îεκ'.split('_'), 13364 weekdays: 'ÎÏ Ïιακή_ÎÎµÏ ÏÎÏα_ΤÏίÏη_ΤεÏάÏÏη_Î ÎμÏÏη_ΠαÏαÏÎºÎµÏ Î®_ΣάββαÏο'.split( 13365 '_' 13366 ), 13367 weekdaysShort: 'ÎÏ Ï_ÎÎµÏ _ΤÏι_ΤεÏ_Πεμ_ΠαÏ_Σαβ'.split('_'), 13368 weekdaysMin: 'ÎÏ _Îε_ΤÏ_Τε_Πε_Πα_Σα'.split('_'), 13369 meridiem: function (hours, minutes, isLower) { 13370 if (hours > 11) { 13371 return isLower ? 'μμ' : 'ÎÎ'; 13372 } else { 13373 return isLower ? 'Ïμ' : 'Î Î'; 13374 } 13375 }, 13376 isPM: function (input) { 13377 return (input + '').toLowerCase()[0] === 'μ'; 13378 }, 13379 meridiemParse: /[Î Î]\.?Î?\.?/i, 13380 longDateFormat: { 13381 LT: 'h:mm A', 13382 LTS: 'h:mm:ss A', 13383 L: 'DD/MM/YYYY', 13384 LL: 'D MMMM YYYY', 13385 LLL: 'D MMMM YYYY h:mm A', 13386 LLLL: 'dddd, D MMMM YYYY h:mm A', 13387 }, 13388 calendarEl: { 13389 sameDay: '[ΣήμεÏα {}] LT', 13390 nextDay: '[ÎÏÏιο {}] LT', 13391 nextWeek: 'dddd [{}] LT', 13392 lastDay: '[Î§Î¸ÎµÏ {}] LT', 13393 lastWeek: function () { 13394 switch (this.day()) { 13395 case 6: 13396 return '[Ïο ÏÏοηγοÏμενο] dddd [{}] LT'; 13397 default: 13398 return '[Ïην ÏÏοηγοÏμενη] dddd [{}] LT'; 13399 } 13400 }, 13401 sameElse: 'L', 13402 }, 13403 calendar: function (key, mom) { 13404 var output = this._calendarEl[key], 13405 hours = mom && mom.hours(); 13406 if (isFunction$1(output)) { 13407 output = output.apply(mom); 13408 } 13409 return output.replace('{}', hours % 12 === 1 ? 'ÏÏη' : 'ÏÏιÏ'); 13410 }, 13411 relativeTime: { 13412 future: 'Ïε %s', 13413 past: '%s ÏÏιν', 13414 s: 'λίγα Î´ÎµÏ ÏεÏÏλεÏÏα', 13415 ss: '%d Î´ÎµÏ ÏεÏÏλεÏÏα', 13416 m: 'Îνα λεÏÏÏ', 13417 mm: '%d λεÏÏά', 13418 h: 'μία ÏÏα', 13419 hh: '%d ÏÏεÏ', 13420 d: 'μία μÎÏα', 13421 dd: '%d μÎÏεÏ',
vendor: 16,384 bytes, lines 13422-13910
13422 M: 'ÎÎ½Î±Ï Î¼Î®Î½Î±Ï', 13423 MM: '%d μήνεÏ', 13424 y: 'ÎÎ½Î±Ï ÏÏÏνοÏ', 13425 yy: '%d ÏÏÏνια', 13426 }, 13427 dayOfMonthOrdinalParse: /\d{1,2}η/, 13428 ordinal: '%dη', 13429 week: { 13430 dow: 1, // Monday is the first day of the week. 13431 doy: 4, // The week that contains Jan 4st is the first week of the year. 13432 }, 13433 }); 13434 13435 //! moment.js locale configuration 13436 13437 hooks.defineLocale('en-au', { 13438 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13439 '_' 13440 ), 13441 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13442 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13443 '_' 13444 ), 13445 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13446 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13447 longDateFormat: { 13448 LT: 'h:mm A', 13449 LTS: 'h:mm:ss A', 13450 L: 'DD/MM/YYYY', 13451 LL: 'D MMMM YYYY', 13452 LLL: 'D MMMM YYYY h:mm A', 13453 LLLL: 'dddd, D MMMM YYYY h:mm A', 13454 }, 13455 calendar: { 13456 sameDay: '[Today at] LT', 13457 nextDay: '[Tomorrow at] LT', 13458 nextWeek: 'dddd [at] LT', 13459 lastDay: '[Yesterday at] LT', 13460 lastWeek: '[Last] dddd [at] LT', 13461 sameElse: 'L', 13462 }, 13463 relativeTime: { 13464 future: 'in %s', 13465 past: '%s ago', 13466 s: 'a few seconds', 13467 ss: '%d seconds', 13468 m: 'a minute', 13469 mm: '%d minutes', 13470 h: 'an hour', 13471 hh: '%d hours', 13472 d: 'a day', 13473 dd: '%d days', 13474 M: 'a month', 13475 MM: '%d months', 13476 y: 'a year', 13477 yy: '%d years', 13478 }, 13479 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13480 ordinal: function (number) { 13481 var b = number % 10, 13482 output = 13483 ~~((number % 100) / 10) === 1 13484 ? 'th' 13485 : b === 1 13486 ? 'st' 13487 : b === 2 13488 ? 'nd' 13489 : b === 3 13490 ? 'rd' 13491 : 'th'; 13492 return number + output; 13493 }, 13494 week: { 13495 dow: 0, // Sunday is the first day of the week. 13496 doy: 4, // The week that contains Jan 4th is the first week of the year. 13497 }, 13498 }); 13499 13500 //! moment.js locale configuration 13501 13502 hooks.defineLocale('en-ca', { 13503 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13504 '_' 13505 ), 13506 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13507 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13508 '_' 13509 ), 13510 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13511 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13512 longDateFormat: { 13513 LT: 'h:mm A', 13514 LTS: 'h:mm:ss A', 13515 L: 'YYYY-MM-DD', 13516 LL: 'MMMM D, YYYY', 13517 LLL: 'MMMM D, YYYY h:mm A', 13518 LLLL: 'dddd, MMMM D, YYYY h:mm A', 13519 }, 13520 calendar: { 13521 sameDay: '[Today at] LT', 13522 nextDay: '[Tomorrow at] LT', 13523 nextWeek: 'dddd [at] LT', 13524 lastDay: '[Yesterday at] LT', 13525 lastWeek: '[Last] dddd [at] LT', 13526 sameElse: 'L', 13527 }, 13528 relativeTime: { 13529 future: 'in %s', 13530 past: '%s ago', 13531 s: 'a few seconds', 13532 ss: '%d seconds', 13533 m: 'a minute', 13534 mm: '%d minutes', 13535 h: 'an hour', 13536 hh: '%d hours', 13537 d: 'a day', 13538 dd: '%d days', 13539 M: 'a month', 13540 MM: '%d months', 13541 y: 'a year', 13542 yy: '%d years', 13543 }, 13544 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13545 ordinal: function (number) { 13546 var b = number % 10, 13547 output = 13548 ~~((number % 100) / 10) === 1 13549 ? 'th' 13550 : b === 1 13551 ? 'st' 13552 : b === 2 13553 ? 'nd' 13554 : b === 3 13555 ? 'rd' 13556 : 'th'; 13557 return number + output; 13558 }, 13559 }); 13560 13561 //! moment.js locale configuration 13562 13563 hooks.defineLocale('en-gb', { 13564 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13565 '_' 13566 ), 13567 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13568 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13569 '_' 13570 ), 13571 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13572 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13573 longDateFormat: { 13574 LT: 'HH:mm', 13575 LTS: 'HH:mm:ss', 13576 L: 'DD/MM/YYYY', 13577 LL: 'D MMMM YYYY', 13578 LLL: 'D MMMM YYYY HH:mm', 13579 LLLL: 'dddd, D MMMM YYYY HH:mm', 13580 }, 13581 calendar: { 13582 sameDay: '[Today at] LT', 13583 nextDay: '[Tomorrow at] LT', 13584 nextWeek: 'dddd [at] LT', 13585 lastDay: '[Yesterday at] LT', 13586 lastWeek: '[Last] dddd [at] LT', 13587 sameElse: 'L', 13588 }, 13589 relativeTime: { 13590 future: 'in %s', 13591 past: '%s ago', 13592 s: 'a few seconds', 13593 ss: '%d seconds', 13594 m: 'a minute', 13595 mm: '%d minutes', 13596 h: 'an hour', 13597 hh: '%d hours', 13598 d: 'a day', 13599 dd: '%d days', 13600 M: 'a month', 13601 MM: '%d months', 13602 y: 'a year', 13603 yy: '%d years', 13604 }, 13605 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13606 ordinal: function (number) { 13607 var b = number % 10, 13608 output = 13609 ~~((number % 100) / 10) === 1 13610 ? 'th' 13611 : b === 1 13612 ? 'st' 13613 : b === 2 13614 ? 'nd' 13615 : b === 3 13616 ? 'rd' 13617 : 'th'; 13618 return number + output; 13619 }, 13620 week: { 13621 dow: 1, // Monday is the first day of the week. 13622 doy: 4, // The week that contains Jan 4th is the first week of the year. 13623 }, 13624 }); 13625 13626 //! moment.js locale configuration 13627 13628 hooks.defineLocale('en-ie', { 13629 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13630 '_' 13631 ), 13632 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13633 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13634 '_' 13635 ), 13636 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13637 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13638 longDateFormat: { 13639 LT: 'HH:mm', 13640 LTS: 'HH:mm:ss', 13641 L: 'DD/MM/YYYY', 13642 LL: 'D MMMM YYYY', 13643 LLL: 'D MMMM YYYY HH:mm', 13644 LLLL: 'dddd D MMMM YYYY HH:mm', 13645 }, 13646 calendar: { 13647 sameDay: '[Today at] LT', 13648 nextDay: '[Tomorrow at] LT', 13649 nextWeek: 'dddd [at] LT', 13650 lastDay: '[Yesterday at] LT', 13651 lastWeek: '[Last] dddd [at] LT', 13652 sameElse: 'L', 13653 }, 13654 relativeTime: { 13655 future: 'in %s', 13656 past: '%s ago', 13657 s: 'a few seconds', 13658 ss: '%d seconds', 13659 m: 'a minute', 13660 mm: '%d minutes', 13661 h: 'an hour', 13662 hh: '%d hours', 13663 d: 'a day', 13664 dd: '%d days', 13665 M: 'a month', 13666 MM: '%d months', 13667 y: 'a year', 13668 yy: '%d years', 13669 }, 13670 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13671 ordinal: function (number) { 13672 var b = number % 10, 13673 output = 13674 ~~((number % 100) / 10) === 1 13675 ? 'th' 13676 : b === 1 13677 ? 'st' 13678 : b === 2 13679 ? 'nd' 13680 : b === 3 13681 ? 'rd' 13682 : 'th'; 13683 return number + output; 13684 }, 13685 week: { 13686 dow: 1, // Monday is the first day of the week. 13687 doy: 4, // The week that contains Jan 4th is the first week of the year. 13688 }, 13689 }); 13690 13691 //! moment.js locale configuration 13692 13693 hooks.defineLocale('en-il', { 13694 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13695 '_' 13696 ), 13697 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13698 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13699 '_' 13700 ), 13701 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13702 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13703 longDateFormat: { 13704 LT: 'HH:mm', 13705 LTS: 'HH:mm:ss', 13706 L: 'DD/MM/YYYY', 13707 LL: 'D MMMM YYYY', 13708 LLL: 'D MMMM YYYY HH:mm', 13709 LLLL: 'dddd, D MMMM YYYY HH:mm', 13710 }, 13711 calendar: { 13712 sameDay: '[Today at] LT', 13713 nextDay: '[Tomorrow at] LT', 13714 nextWeek: 'dddd [at] LT', 13715 lastDay: '[Yesterday at] LT', 13716 lastWeek: '[Last] dddd [at] LT', 13717 sameElse: 'L', 13718 }, 13719 relativeTime: { 13720 future: 'in %s', 13721 past: '%s ago', 13722 s: 'a few seconds', 13723 ss: '%d seconds', 13724 m: 'a minute', 13725 mm: '%d minutes', 13726 h: 'an hour', 13727 hh: '%d hours', 13728 d: 'a day', 13729 dd: '%d days', 13730 M: 'a month', 13731 MM: '%d months', 13732 y: 'a year', 13733 yy: '%d years', 13734 }, 13735 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13736 ordinal: function (number) { 13737 var b = number % 10, 13738 output = 13739 ~~((number % 100) / 10) === 1 13740 ? 'th' 13741 : b === 1 13742 ? 'st' 13743 : b === 2 13744 ? 'nd' 13745 : b === 3 13746 ? 'rd' 13747 : 'th'; 13748 return number + output; 13749 }, 13750 }); 13751 13752 //! moment.js locale configuration 13753 13754 hooks.defineLocale('en-in', { 13755 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13756 '_' 13757 ), 13758 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13759 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13760 '_' 13761 ), 13762 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13763 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13764 longDateFormat: { 13765 LT: 'h:mm A', 13766 LTS: 'h:mm:ss A', 13767 L: 'DD/MM/YYYY', 13768 LL: 'D MMMM YYYY', 13769 LLL: 'D MMMM YYYY h:mm A', 13770 LLLL: 'dddd, D MMMM YYYY h:mm A', 13771 }, 13772 calendar: { 13773 sameDay: '[Today at] LT', 13774 nextDay: '[Tomorrow at] LT', 13775 nextWeek: 'dddd [at] LT', 13776 lastDay: '[Yesterday at] LT', 13777 lastWeek: '[Last] dddd [at] LT', 13778 sameElse: 'L', 13779 }, 13780 relativeTime: { 13781 future: 'in %s', 13782 past: '%s ago', 13783 s: 'a few seconds', 13784 ss: '%d seconds', 13785 m: 'a minute', 13786 mm: '%d minutes', 13787 h: 'an hour', 13788 hh: '%d hours', 13789 d: 'a day', 13790 dd: '%d days', 13791 M: 'a month', 13792 MM: '%d months', 13793 y: 'a year', 13794 yy: '%d years', 13795 }, 13796 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13797 ordinal: function (number) { 13798 var b = number % 10, 13799 output = 13800 ~~((number % 100) / 10) === 1 13801 ? 'th' 13802 : b === 1 13803 ? 'st' 13804 : b === 2 13805 ? 'nd' 13806 : b === 3 13807 ? 'rd' 13808 : 'th'; 13809 return number + output; 13810 }, 13811 week: { 13812 dow: 0, // Sunday is the first day of the week. 13813 doy: 6, // The week that contains Jan 1st is the first week of the year. 13814 }, 13815 }); 13816 13817 //! moment.js locale configuration 13818 13819 hooks.defineLocale('en-nz', { 13820 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13821 '_' 13822 ), 13823 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13824 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13825 '_' 13826 ), 13827 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13828 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13829 longDateFormat: { 13830 LT: 'h:mm A', 13831 LTS: 'h:mm:ss A', 13832 L: 'DD/MM/YYYY', 13833 LL: 'D MMMM YYYY', 13834 LLL: 'D MMMM YYYY h:mm A', 13835 LLLL: 'dddd, D MMMM YYYY h:mm A', 13836 }, 13837 calendar: { 13838 sameDay: '[Today at] LT', 13839 nextDay: '[Tomorrow at] LT', 13840 nextWeek: 'dddd [at] LT', 13841 lastDay: '[Yesterday at] LT', 13842 lastWeek: '[Last] dddd [at] LT', 13843 sameElse: 'L', 13844 }, 13845 relativeTime: { 13846 future: 'in %s', 13847 past: '%s ago', 13848 s: 'a few seconds', 13849 ss: '%d seconds', 13850 m: 'a minute', 13851 mm: '%d minutes', 13852 h: 'an hour', 13853 hh: '%d hours', 13854 d: 'a day', 13855 dd: '%d days', 13856 M: 'a month', 13857 MM: '%d months', 13858 y: 'a year', 13859 yy: '%d years', 13860 }, 13861 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13862 ordinal: function (number) { 13863 var b = number % 10, 13864 output = 13865 ~~((number % 100) / 10) === 1 13866 ? 'th' 13867 : b === 1 13868 ? 'st' 13869 : b === 2 13870 ? 'nd' 13871 : b === 3 13872 ? 'rd' 13873 : 'th'; 13874 return number + output; 13875 }, 13876 week: { 13877 dow: 1, // Monday is the first day of the week. 13878 doy: 4, // The week that contains Jan 4th is the first week of the year. 13879 }, 13880 }); 13881 13882 //! moment.js locale configuration 13883 13884 hooks.defineLocale('en-sg', { 13885 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 13886 '_' 13887 ), 13888 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 13889 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 13890 '_' 13891 ), 13892 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 13893 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 13894 longDateFormat: { 13895 LT: 'HH:mm', 13896 LTS: 'HH:mm:ss', 13897 L: 'DD/MM/YYYY', 13898 LL: 'D MMMM YYYY', 13899 LLL: 'D MMMM YYYY HH:mm', 13900 LLLL: 'dddd, D MMMM YYYY HH:mm', 13901 }, 13902 calendar: { 13903 sameDay: '[Today at] LT', 13904 nextDay: '[Tomorrow at] LT', 13905 nextWeek: 'dddd [at] LT', 13906 lastDay: '[Yesterday at] LT', 13907 lastWeek: '[Last] dddd [at] LT', 13908 sameElse: 'L', 13909 }, 13910
vendor: 16,384 bytes, lines 13910-14371
13910 relativeTime: { 13911 future: 'in %s', 13912 past: '%s ago', 13913 s: 'a few seconds', 13914 ss: '%d seconds', 13915 m: 'a minute', 13916 mm: '%d minutes', 13917 h: 'an hour', 13918 hh: '%d hours', 13919 d: 'a day', 13920 dd: '%d days', 13921 M: 'a month', 13922 MM: '%d months', 13923 y: 'a year', 13924 yy: '%d years', 13925 }, 13926 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 13927 ordinal: function (number) { 13928 var b = number % 10, 13929 output = 13930 ~~((number % 100) / 10) === 1 13931 ? 'th' 13932 : b === 1 13933 ? 'st' 13934 : b === 2 13935 ? 'nd' 13936 : b === 3 13937 ? 'rd' 13938 : 'th'; 13939 return number + output; 13940 }, 13941 week: { 13942 dow: 1, // Monday is the first day of the week. 13943 doy: 4, // The week that contains Jan 4th is the first week of the year. 13944 }, 13945 }); 13946 13947 //! moment.js locale configuration 13948 13949 hooks.defineLocale('eo', { 13950 months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aÅgusto_septembro_oktobro_novembro_decembro'.split( 13951 '_' 13952 ), 13953 monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aÅg_sept_okt_nov_dec'.split('_'), 13954 weekdays: 'dimanÄo_lundo_mardo_merkredo_ĵaÅdo_vendredo_sabato'.split('_'), 13955 weekdaysShort: 'dim_lun_mard_merk_ĵaÅ_ven_sab'.split('_'), 13956 weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), 13957 longDateFormat: { 13958 LT: 'HH:mm', 13959 LTS: 'HH:mm:ss', 13960 L: 'YYYY-MM-DD', 13961 LL: '[la] D[-an de] MMMM, YYYY', 13962 LLL: '[la] D[-an de] MMMM, YYYY HH:mm', 13963 LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', 13964 llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', 13965 }, 13966 meridiemParse: /[ap]\.t\.m/i, 13967 isPM: function (input) { 13968 return input.charAt(0).toLowerCase() === 'p'; 13969 }, 13970 meridiem: function (hours, minutes, isLower) { 13971 if (hours > 11) { 13972 return isLower ? 'p.t.m.' : 'P.T.M.'; 13973 } else { 13974 return isLower ? 'a.t.m.' : 'A.T.M.'; 13975 } 13976 }, 13977 calendar: { 13978 sameDay: '[HodiaÅ je] LT', 13979 nextDay: '[MorgaÅ je] LT', 13980 nextWeek: 'dddd[n je] LT', 13981 lastDay: '[HieraÅ je] LT', 13982 lastWeek: '[pasintan] dddd[n je] LT', 13983 sameElse: 'L', 13984 }, 13985 relativeTime: { 13986 future: 'post %s', 13987 past: 'antaÅ %s', 13988 s: 'kelkaj sekundoj', 13989 ss: '%d sekundoj', 13990 m: 'unu minuto', 13991 mm: '%d minutoj', 13992 h: 'unu horo', 13993 hh: '%d horoj', 13994 d: 'unu tago', //ne 'diurno', Äar estas uzita por proksimumo 13995 dd: '%d tagoj', 13996 M: 'unu monato', 13997 MM: '%d monatoj', 13998 y: 'unu jaro', 13999 yy: '%d jaroj', 14000 }, 14001 dayOfMonthOrdinalParse: /\d{1,2}a/, 14002 ordinal: '%da', 14003 week: { 14004 dow: 1, // Monday is the first day of the week. 14005 doy: 7, // The week that contains Jan 7th is the first week of the year. 14006 }, 14007 }); 14008 14009 //! moment.js locale configuration 14010 14011 var monthsShortDot = 14012 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 14013 '_' 14014 ), 14015 monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 14016 monthsParse$2 = [ 14017 /^ene/i, 14018 /^feb/i, 14019 /^mar/i, 14020 /^abr/i, 14021 /^may/i, 14022 /^jun/i, 14023 /^jul/i, 14024 /^ago/i, 14025 /^sep/i, 14026 /^oct/i, 14027 /^nov/i, 14028 /^dic/i, 14029 ], 14030 monthsRegex$3 = 14031 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 14032 14033 hooks.defineLocale('es-do', { 14034 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 14035 '_' 14036 ), 14037 monthsShort: function (m, format) { 14038 if (!m) { 14039 return monthsShortDot; 14040 } else if (/-MMM-/.test(format)) { 14041 return monthsShort$1[m.month()]; 14042 } else { 14043 return monthsShortDot[m.month()]; 14044 } 14045 }, 14046 monthsRegex: monthsRegex$3, 14047 monthsShortRegex: monthsRegex$3, 14048 monthsStrictRegex: 14049 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 14050 monthsShortStrictRegex: 14051 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 14052 monthsParse: monthsParse$2, 14053 longMonthsParse: monthsParse$2, 14054 shortMonthsParse: monthsParse$2, 14055 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 14056 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 14057 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 14058 weekdaysParseExact: true, 14059 longDateFormat: { 14060 LT: 'h:mm A', 14061 LTS: 'h:mm:ss A', 14062 L: 'DD/MM/YYYY', 14063 LL: 'D [de] MMMM [de] YYYY', 14064 LLL: 'D [de] MMMM [de] YYYY h:mm A', 14065 LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', 14066 }, 14067 calendar: { 14068 sameDay: function () { 14069 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14070 }, 14071 nextDay: function () { 14072 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14073 }, 14074 nextWeek: function () { 14075 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14076 }, 14077 lastDay: function () { 14078 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14079 }, 14080 lastWeek: function () { 14081 return ( 14082 '[el] dddd [pasado a la' + 14083 (this.hours() !== 1 ? 's' : '') + 14084 '] LT' 14085 ); 14086 }, 14087 sameElse: 'L', 14088 }, 14089 relativeTime: { 14090 future: 'en %s', 14091 past: 'hace %s', 14092 s: 'unos segundos', 14093 ss: '%d segundos', 14094 m: 'un minuto', 14095 mm: '%d minutos', 14096 h: 'una hora', 14097 hh: '%d horas', 14098 d: 'un dÃa', 14099 dd: '%d dÃas', 14100 w: 'una semana', 14101 ww: '%d semanas', 14102 M: 'un mes', 14103 MM: '%d meses', 14104 y: 'un año', 14105 yy: '%d años', 14106 }, 14107 dayOfMonthOrdinalParse: /\d{1,2}º/, 14108 ordinal: '%dº', 14109 week: { 14110 dow: 1, // Monday is the first day of the week. 14111 doy: 4, // The week that contains Jan 4th is the first week of the year. 14112 }, 14113 }); 14114 14115 //! moment.js locale configuration 14116 14117 var monthsShortDot$1 = 14118 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 14119 '_' 14120 ), 14121 monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 14122 monthsParse$3 = [ 14123 /^ene/i, 14124 /^feb/i, 14125 /^mar/i, 14126 /^abr/i, 14127 /^may/i, 14128 /^jun/i, 14129 /^jul/i, 14130 /^ago/i, 14131 /^sep/i, 14132 /^oct/i, 14133 /^nov/i, 14134 /^dic/i, 14135 ], 14136 monthsRegex$4 = 14137 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 14138 14139 hooks.defineLocale('es-mx', { 14140 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 14141 '_' 14142 ), 14143 monthsShort: function (m, format) { 14144 if (!m) { 14145 return monthsShortDot$1; 14146 } else if (/-MMM-/.test(format)) { 14147 return monthsShort$2[m.month()]; 14148 } else { 14149 return monthsShortDot$1[m.month()]; 14150 } 14151 }, 14152 monthsRegex: monthsRegex$4, 14153 monthsShortRegex: monthsRegex$4, 14154 monthsStrictRegex: 14155 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 14156 monthsShortStrictRegex: 14157 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 14158 monthsParse: monthsParse$3, 14159 longMonthsParse: monthsParse$3, 14160 shortMonthsParse: monthsParse$3, 14161 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 14162 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 14163 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 14164 weekdaysParseExact: true, 14165 longDateFormat: { 14166 LT: 'H:mm', 14167 LTS: 'H:mm:ss', 14168 L: 'DD/MM/YYYY', 14169 LL: 'D [de] MMMM [de] YYYY', 14170 LLL: 'D [de] MMMM [de] YYYY H:mm', 14171 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 14172 }, 14173 calendar: { 14174 sameDay: function () { 14175 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14176 }, 14177 nextDay: function () { 14178 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14179 }, 14180 nextWeek: function () { 14181 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14182 }, 14183 lastDay: function () { 14184 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14185 }, 14186 lastWeek: function () { 14187 return ( 14188 '[el] dddd [pasado a la' + 14189 (this.hours() !== 1 ? 's' : '') + 14190 '] LT' 14191 ); 14192 }, 14193 sameElse: 'L', 14194 }, 14195 relativeTime: { 14196 future: 'en %s', 14197 past: 'hace %s', 14198 s: 'unos segundos', 14199 ss: '%d segundos', 14200 m: 'un minuto', 14201 mm: '%d minutos', 14202 h: 'una hora', 14203 hh: '%d horas', 14204 d: 'un dÃa', 14205 dd: '%d dÃas', 14206 w: 'una semana', 14207 ww: '%d semanas', 14208 M: 'un mes', 14209 MM: '%d meses', 14210 y: 'un año', 14211 yy: '%d años', 14212 }, 14213 dayOfMonthOrdinalParse: /\d{1,2}º/, 14214 ordinal: '%dº', 14215 week: { 14216 dow: 0, // Sunday is the first day of the week. 14217 doy: 4, // The week that contains Jan 4th is the first week of the year. 14218 }, 14219 invalidDate: 'Fecha inválida', 14220 }); 14221 14222 //! moment.js locale configuration 14223 14224 var monthsShortDot$2 = 14225 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 14226 '_' 14227 ), 14228 monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 14229 monthsParse$4 = [ 14230 /^ene/i, 14231 /^feb/i, 14232 /^mar/i, 14233 /^abr/i, 14234 /^may/i, 14235 /^jun/i, 14236 /^jul/i, 14237 /^ago/i, 14238 /^sep/i, 14239 /^oct/i, 14240 /^nov/i, 14241 /^dic/i, 14242 ], 14243 monthsRegex$5 = 14244 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 14245 14246 hooks.defineLocale('es-us', { 14247 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 14248 '_' 14249 ), 14250 monthsShort: function (m, format) { 14251 if (!m) { 14252 return monthsShortDot$2; 14253 } else if (/-MMM-/.test(format)) { 14254 return monthsShort$3[m.month()]; 14255 } else { 14256 return monthsShortDot$2[m.month()]; 14257 } 14258 }, 14259 monthsRegex: monthsRegex$5, 14260 monthsShortRegex: monthsRegex$5, 14261 monthsStrictRegex: 14262 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 14263 monthsShortStrictRegex: 14264 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 14265 monthsParse: monthsParse$4, 14266 longMonthsParse: monthsParse$4, 14267 shortMonthsParse: monthsParse$4, 14268 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 14269 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 14270 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 14271 weekdaysParseExact: true, 14272 longDateFormat: { 14273 LT: 'h:mm A', 14274 LTS: 'h:mm:ss A', 14275 L: 'MM/DD/YYYY', 14276 LL: 'D [de] MMMM [de] YYYY', 14277 LLL: 'D [de] MMMM [de] YYYY h:mm A', 14278 LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', 14279 }, 14280 calendar: { 14281 sameDay: function () { 14282 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14283 }, 14284 nextDay: function () { 14285 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14286 }, 14287 nextWeek: function () { 14288 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14289 }, 14290 lastDay: function () { 14291 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14292 }, 14293 lastWeek: function () { 14294 return ( 14295 '[el] dddd [pasado a la' + 14296 (this.hours() !== 1 ? 's' : '') + 14297 '] LT' 14298 ); 14299 }, 14300 sameElse: 'L', 14301 }, 14302 relativeTime: { 14303 future: 'en %s', 14304 past: 'hace %s', 14305 s: 'unos segundos', 14306 ss: '%d segundos', 14307 m: 'un minuto', 14308 mm: '%d minutos', 14309 h: 'una hora', 14310 hh: '%d horas', 14311 d: 'un dÃa', 14312 dd: '%d dÃas', 14313 w: 'una semana', 14314 ww: '%d semanas', 14315 M: 'un mes', 14316 MM: '%d meses', 14317 y: 'un año', 14318 yy: '%d años', 14319 }, 14320 dayOfMonthOrdinalParse: /\d{1,2}º/, 14321 ordinal: '%dº', 14322 week: { 14323 dow: 0, // Sunday is the first day of the week. 14324 doy: 6, // The week that contains Jan 6th is the first week of the year. 14325 }, 14326 }); 14327 14328 //! moment.js locale configuration 14329 14330 var monthsShortDot$3 = 14331 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 14332 '_' 14333 ), 14334 monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 14335 monthsParse$5 = [ 14336 /^ene/i, 14337 /^feb/i, 14338 /^mar/i, 14339 /^abr/i, 14340 /^may/i, 14341 /^jun/i, 14342 /^jul/i, 14343 /^ago/i, 14344 /^sep/i, 14345 /^oct/i, 14346 /^nov/i, 14347 /^dic/i, 14348 ], 14349 monthsRegex$6 = 14350 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 14351 14352 hooks.defineLocale('es', { 14353 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 14354 '_' 14355 ), 14356 monthsShort: function (m, format) { 14357 if (!m) { 14358 return monthsShortDot$3; 14359 } else if (/-MMM-/.test(format)) { 14360 return monthsShort$4[m.month()]; 14361 } else { 14362 return monthsShortDot$3[m.month()]; 14363 } 14364 }, 14365 monthsRegex: monthsRegex$6, 14366 monthsShortRegex: monthsRegex$6, 14367 monthsStrictRegex: 14368 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 14369 monthsShortStrictRegex: 14370 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 14371 monthsParse: monthsParse$5,
14372 longMonthsParse: monthsParse$5, 14373 shortMonthsParse: monthsParse$5, 14374 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 14375 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 14376 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 14377 weekdaysParseExact: true, 14378 longDateFormat: { 14379 LT: 'H:mm', 14380 LTS: 'H:mm:ss', 14381 L: 'DD/MM/YYYY', 14382 LL: 'D [de] MMMM [de] YYYY', 14383 LLL: 'D [de] MMMM [de] YYYY H:mm', 14384 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 14385 }, 14386 calendar: { 14387 sameDay: function () { 14388 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14389 }, 14390 nextDay: function () { 14391 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14392 }, 14393 nextWeek: function () { 14394 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14395 }, 14396 lastDay: function () { 14397 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 14398 }, 14399 lastWeek: function () { 14400 return ( 14401 '[el] dddd [pasado a la' + 14402 (this.hours() !== 1 ? 's' : '') + 14403 '] LT' 14404 ); 14405 }, 14406 sameElse: 'L', 14407 }, 14408 relativeTime: { 14409 future: 'en %s', 14410 past: 'hace %s', 14411 s: 'unos segundos', 14412 ss: '%d segundos', 14413 m: 'un minuto', 14414 mm: '%d minutos', 14415 h: 'una hora', 14416 hh: '%d horas', 14417 d: 'un dÃa', 14418 dd: '%d dÃas', 14419 w: 'una semana', 14420 ww: '%d semanas', 14421 M: 'un mes', 14422 MM: '%d meses', 14423 y: 'un año', 14424 yy: '%d años', 14425 }, 14426 dayOfMonthOrdinalParse: /\d{1,2}º/, 14427 ordinal: '%dº', 14428 week: { 14429 dow: 1, // Monday is the first day of the week. 14430 doy: 4, // The week that contains Jan 4th is the first week of the year. 14431 }, 14432 invalidDate: 'Fecha inválida', 14433 }); 14434 14435 //! moment.js locale configuration 14436 14437 function processRelativeTime$3(number, withoutSuffix, key, isFuture) { 14438 var format = { 14439 s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], 14440 ss: [number + 'sekundi', number + 'sekundit'], 14441 m: ['ühe minuti', 'üks minut'], 14442 mm: [number + ' minuti', number + ' minutit'], 14443 h: ['ühe tunni', 'tund aega', 'üks tund'], 14444 hh: [number + ' tunni', number + ' tundi'], 14445 d: ['ühe päeva', 'üks päev'], 14446 M: ['kuu aja', 'kuu aega', 'üks kuu'], 14447 MM: [number + ' kuu', number + ' kuud'], 14448 y: ['ühe aasta', 'aasta', 'üks aasta'], 14449 yy: [number + ' aasta', number + ' aastat'], 14450 }; 14451 if (withoutSuffix) { 14452 return format[key][2] ? format[key][2] : format[key][1]; 14453 } 14454 return isFuture ? format[key][0] : format[key][1]; 14455 } 14456 14457 hooks.defineLocale('et', { 14458 months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( 14459 '_' 14460 ), 14461 monthsShort: 14462 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), 14463 weekdays: 14464 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( 14465 '_' 14466 ), 14467 weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), 14468 weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), 14469 longDateFormat: { 14470 LT: 'H:mm', 14471 LTS: 'H:mm:ss', 14472 L: 'DD.MM.YYYY', 14473 LL: 'D. MMMM YYYY', 14474 LLL: 'D. MMMM YYYY H:mm', 14475 LLLL: 'dddd, D. MMMM YYYY H:mm', 14476 }, 14477 calendar: { 14478 sameDay: '[Täna,] LT', 14479 nextDay: '[Homme,] LT', 14480 nextWeek: '[Järgmine] dddd LT', 14481 lastDay: '[Eile,] LT', 14482 lastWeek: '[Eelmine] dddd LT', 14483 sameElse: 'L', 14484 }, 14485 relativeTime: { 14486 future: '%s pärast', 14487 past: '%s tagasi', 14488 s: processRelativeTime$3, 14489 ss: processRelativeTime$3, 14490 m: processRelativeTime$3, 14491 mm: processRelativeTime$3, 14492 h: processRelativeTime$3, 14493 hh: processRelativeTime$3, 14494 d: processRelativeTime$3, 14495 dd: '%d päeva', 14496 M: processRelativeTime$3, 14497 MM: processRelativeTime$3, 14498 y: processRelativeTime$3, 14499 yy: processRelativeTime$3, 14500 }, 14501 dayOfMonthOrdinalParse: /\d{1,2}\./, 14502 ordinal: '%d.', 14503 week: { 14504 dow: 1, // Monday is the first day of the week. 14505 doy: 4, // The week that contains Jan 4th is the first week of the year. 14506 }, 14507 }); 14508 14509 //! moment.js locale configuration 14510 14511 hooks.defineLocale('eu', { 14512 months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( 14513 '_' 14514 ), 14515 monthsShort: 14516 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( 14517 '_' 14518 ), 14519 monthsParseExact: true, 14520 weekdays: 14521 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( 14522 '_' 14523 ), 14524 weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), 14525 weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), 14526 weekdaysParseExact: true, 14527 longDateFormat: { 14528 LT: 'HH:mm', 14529 LTS: 'HH:mm:ss', 14530 L: 'YYYY-MM-DD', 14531 LL: 'YYYY[ko] MMMM[ren] D[a]', 14532 LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', 14533 LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', 14534 l: 'YYYY-M-D', 14535 ll: 'YYYY[ko] MMM D[a]', 14536 lll: 'YYYY[ko] MMM D[a] HH:mm', 14537 llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', 14538 }, 14539 calendar: { 14540 sameDay: '[gaur] LT[etan]', 14541 nextDay: '[bihar] LT[etan]', 14542 nextWeek: 'dddd LT[etan]', 14543 lastDay: '[atzo] LT[etan]', 14544 lastWeek: '[aurreko] dddd LT[etan]', 14545 sameElse: 'L', 14546 }, 14547 relativeTime: { 14548 future: '%s barru', 14549 past: 'duela %s', 14550 s: 'segundo batzuk', 14551 ss: '%d segundo', 14552 m: 'minutu bat', 14553 mm: '%d minutu', 14554 h: 'ordu bat', 14555 hh: '%d ordu', 14556 d: 'egun bat', 14557 dd: '%d egun', 14558 M: 'hilabete bat', 14559 MM: '%d hilabete', 14560 y: 'urte bat', 14561 yy: '%d urte', 14562 }, 14563 dayOfMonthOrdinalParse: /\d{1,2}\./, 14564 ordinal: '%d.', 14565 week: { 14566 dow: 1, // Monday is the first day of the week. 14567 doy: 7, // The week that contains Jan 7th is the first week of the year. 14568 }, 14569 }); 14570 14571 //! moment.js locale configuration 14572 14573 var symbolMap$6 = { 14574 1: 'Û±', 14575 2: 'Û²', 14576 3: 'Û³', 14577 4: 'Û´', 14578 5: 'Ûµ', 14579 6: 'Û¶', 14580 7: 'Û·', 14581 8: 'Û¸', 14582 9: 'Û¹', 14583 0: 'Û°', 14584 }, 14585 numberMap$5 = { 14586 'Û±': '1', 14587 'Û²': '2', 14588 'Û³': '3', 14589 'Û´': '4', 14590 'Ûµ': '5', 14591 'Û¶': '6', 14592 'Û·': '7', 14593 'Û¸': '8', 14594 'Û¹': '9', 14595 'Û°': '0', 14596 }; 14597 14598 hooks.defineLocale('fa', { 14599 months: 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split( 14600 '_' 14601 ), 14602 monthsShort: 14603 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split( 14604 '_' 14605 ), 14606 weekdays: 14607 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split( 14608 '_' 14609 ), 14610 weekdaysShort: 14611 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split( 14612 '_' 14613 ), 14614 weekdaysMin: 'Û_د_س_Ú_Ù¾_ج_Ø´'.split('_'), 14615 weekdaysParseExact: true, 14616 longDateFormat: { 14617 LT: 'HH:mm', 14618 LTS: 'HH:mm:ss', 14619 L: 'DD/MM/YYYY', 14620 LL: 'D MMMM YYYY', 14621 LLL: 'D MMMM YYYY HH:mm', 14622 LLLL: 'dddd, D MMMM YYYY HH:mm', 14623 }, 14624 meridiemParse: /ÙØ¨Ù از Ø¸ÙØ±|بعد از Ø¸ÙØ±/, 14625 isPM: function (input) { 14626 return /بعد از Ø¸ÙØ±/.test(input); 14627 }, 14628 meridiem: function (hour, minute, isLower) { 14629 if (hour < 12) { 14630 return 'ÙØ¨Ù از Ø¸ÙØ±'; 14631 } else { 14632 return 'بعد از Ø¸ÙØ±'; 14633 } 14634 }, 14635 calendar: { 14636 sameDay: '[Ø§Ù Ø±ÙØ² ساعت] LT', 14637 nextDay: '[ÙØ±Ø¯Ø§ ساعت] LT', 14638 nextWeek: 'dddd [ساعت] LT', 14639 lastDay: '[Ø¯ÛØ±Ùز ساعت] LT', 14640 lastWeek: 'dddd [Ù¾ÛØ´] [ساعت] LT', 14641 sameElse: 'L', 14642 }, 14643 relativeTime: { 14644 future: 'در %s', 14645 past: '%s Ù¾ÛØ´', 14646 s: 'ÚÙØ¯ ثاÙÛÙ', 14647 ss: '%d ثاÙÛÙ', 14648 m: 'ÛÚ© دÙÛÙÙ', 14649 mm: '%d دÙÛÙÙ', 14650 h: 'ÛÚ© ساعت', 14651 hh: '%d ساعت', 14652 d: 'ÛÚ© Ø±ÙØ²', 14653 dd: '%d Ø±ÙØ²', 14654 M: 'ÛÚ© ٠اÙ', 14655 MM: '%d ٠اÙ', 14656 y: 'ÛÚ© ساÙ', 14657 yy: '%d ساÙ', 14658 }, 14659 preparse: function (string) { 14660 return string 14661 .replace(/[Û°-Û¹]/g, function (match) { 14662 return numberMap$5[match]; 14663 }) 14664 .replace(/Ø/g, ','); 14665 }, 14666 postformat: function (string) { 14667 return string 14668 .replace(/\d/g, function (match) { 14669 return symbolMap$6[match]; 14670 }) 14671 .replace(/,/g, 'Ø'); 14672 }, 14673 dayOfMonthOrdinalParse: /\d{1,2}Ù /, 14674 ordinal: '%dÙ ', 14675 week: { 14676 dow: 6, // Saturday is the first day of the week. 14677 doy: 12, // The week that contains Jan 12th is the first week of the year. 14678 }, 14679 }); 14680 14681 //! moment.js locale configuration 14682 14683 var numbersPast = 14684 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( 14685 ' ' 14686 ), 14687 numbersFuture = [ 14688 'nolla', 14689 'yhden', 14690 'kahden', 14691 'kolmen', 14692 'neljän', 14693 'viiden', 14694 'kuuden', 14695 numbersPast[7], 14696 numbersPast[8], 14697 numbersPast[9], 14698 ]; 14699 function translate$2(number, withoutSuffix, key, isFuture) { 14700 var result = ''; 14701 switch (key) { 14702 case 's': 14703 return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; 14704 case 'ss': 14705 result = isFuture ? 'sekunnin' : 'sekuntia'; 14706 break; 14707 case 'm': 14708 return isFuture ? 'minuutin' : 'minuutti'; 14709 case 'mm': 14710 result = isFuture ? 'minuutin' : 'minuuttia'; 14711 break; 14712 case 'h': 14713 return isFuture ? 'tunnin' : 'tunti'; 14714 case 'hh': 14715 result = isFuture ? 'tunnin' : 'tuntia'; 14716 break; 14717 case 'd': 14718 return isFuture ? 'päivän' : 'päivä'; 14719 case 'dd': 14720 result = isFuture ? 'päivän' : 'päivää'; 14721 break; 14722 case 'M': 14723 return isFuture ? 'kuukauden' : 'kuukausi'; 14724 case 'MM': 14725 result = isFuture ? 'kuukauden' : 'kuukautta'; 14726 break; 14727 case 'y': 14728 return isFuture ? 'vuoden' : 'vuosi'; 14729 case 'yy': 14730 result = isFuture ? 'vuoden' : 'vuotta'; 14731 break; 14732 } 14733 result = verbalNumber(number, isFuture) + ' ' + result; 14734 return result; 14735 } 14736 function verbalNumber(number, isFuture) { 14737 return number < 10 14738 ? isFuture 14739 ? numbersFuture[number] 14740 : numbersPast[number] 14741 : number; 14742 } 14743 14744 hooks.defineLocale('fi', { 14745 months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( 14746 '_' 14747 ), 14748 monthsShort: 14749 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( 14750 '_' 14751 ), 14752 weekdays: 14753 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( 14754 '_' 14755 ), 14756 weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), 14757 weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), 14758 longDateFormat: { 14759 LT: 'HH.mm', 14760 LTS: 'HH.mm.ss', 14761 L: 'DD.MM.YYYY', 14762 LL: 'Do MMMM[ta] YYYY', 14763 LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', 14764 LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', 14765 l: 'D.M.YYYY', 14766 ll: 'Do MMM YYYY', 14767 lll: 'Do MMM YYYY, [klo] HH.mm', 14768 llll: 'ddd, Do MMM YYYY, [klo] HH.mm', 14769 }, 14770 calendar: { 14771 sameDay: '[tänään] [klo] LT', 14772 nextDay: '[huomenna] [klo] LT', 14773 nextWeek: 'dddd [klo] LT', 14774 lastDay: '[eilen] [klo] LT', 14775 lastWeek: '[viime] dddd[na] [klo] LT', 14776 sameElse: 'L', 14777 }, 14778 relativeTime: { 14779 future: '%s päästä', 14780 past: '%s sitten', 14781 s: translate$2, 14782 ss: translate$2, 14783 m: translate$2, 14784 mm: translate$2, 14785 h: translate$2, 14786 hh: translate$2, 14787 d: translate$2, 14788 dd: translate$2, 14789 M: translate$2, 14790 MM: translate$2, 14791 y: translate$2, 14792 yy: translate$2, 14793 }, 14794 dayOfMonthOrdinalParse: /\d{1,2}\./, 14795 ordinal: '%d.', 14796 week: { 14797 dow: 1, // Monday is the first day of the week. 14798 doy: 4, // The week that contains Jan 4th is the first week of the year. 14799 }, 14800 }); 14801 14802 //! moment.js locale configuration 14803 14804 hooks.defineLocale('fil', { 14805 months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( 14806 '_' 14807 ), 14808 monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), 14809 weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( 14810 '_' 14811 ), 14812 weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), 14813 weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), 14814 longDateFormat: { 14815 LT: 'HH:mm', 14816 LTS: 'HH:mm:ss', 14817 L: 'MM/D/YYYY', 14818 LL: 'MMMM D, YYYY', 14819 LLL: 'MMMM D, YYYY HH:mm', 14820 LLLL: 'dddd, MMMM DD, YYYY HH:mm', 14821 }, 14822 calendar: { 14823 sameDay: 'LT [ngayong araw]', 14824 nextDay: '[Bukas ng] LT', 14825 nextWeek: 'LT [sa susunod na] dddd', 14826 lastDay: 'LT [kahapon]', 14827 lastWeek: 'LT [noong nakaraang] dddd', 14828 sameElse: 'L', 14829 }, 14830 relativeTime: { 14831 future: 'sa loob ng %s', 14832 past: '%s ang nakalipas', 14833 s: 'ilang segundo', 14834 ss: '%d segundo', 14835 m: 'isang minuto', 14836 mm: '%d minuto', 14837 h: 'isang oras', 14838 hh: '%d oras', 14839 d: 'isang araw', 14840 dd: '%d araw',
vendor: 12,427 bytes, lines 14841-15205
14841 M: 'isang buwan', 14842 MM: '%d buwan', 14843 y: 'isang taon', 14844 yy: '%d taon', 14845 }, 14846 dayOfMonthOrdinalParse: /\d{1,2}/, 14847 ordinal: function (number) { 14848 return number; 14849 }, 14850 week: { 14851 dow: 1, // Monday is the first day of the week. 14852 doy: 4, // The week that contains Jan 4th is the first week of the year. 14853 }, 14854 }); 14855 14856 //! moment.js locale configuration 14857 14858 hooks.defineLocale('fo', { 14859 months: 'januar_februar_mars_aprÃl_mai_juni_juli_august_september_oktober_november_desember'.split( 14860 '_' 14861 ), 14862 monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 14863 weekdays: 14864 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_frÃggjadagur_leygardagur'.split( 14865 '_' 14866 ), 14867 weekdaysShort: 'sun_mán_týs_mik_hós_frÃ_ley'.split('_'), 14868 weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), 14869 longDateFormat: { 14870 LT: 'HH:mm', 14871 LTS: 'HH:mm:ss', 14872 L: 'DD/MM/YYYY', 14873 LL: 'D MMMM YYYY', 14874 LLL: 'D MMMM YYYY HH:mm', 14875 LLLL: 'dddd D. MMMM, YYYY HH:mm', 14876 }, 14877 calendar: { 14878 sameDay: '[à dag kl.] LT', 14879 nextDay: '[à morgin kl.] LT', 14880 nextWeek: 'dddd [kl.] LT', 14881 lastDay: '[à gjár kl.] LT', 14882 lastWeek: '[sÃðstu] dddd [kl] LT', 14883 sameElse: 'L', 14884 }, 14885 relativeTime: { 14886 future: 'um %s', 14887 past: '%s sÃðani', 14888 s: 'fá sekund', 14889 ss: '%d sekundir', 14890 m: 'ein minuttur', 14891 mm: '%d minuttir', 14892 h: 'ein tÃmi', 14893 hh: '%d tÃmar', 14894 d: 'ein dagur', 14895 dd: '%d dagar', 14896 M: 'ein mánaður', 14897 MM: '%d mánaðir', 14898 y: 'eitt ár', 14899 yy: '%d ár', 14900 }, 14901 dayOfMonthOrdinalParse: /\d{1,2}\./, 14902 ordinal: '%d.', 14903 week: { 14904 dow: 1, // Monday is the first day of the week. 14905 doy: 4, // The week that contains Jan 4th is the first week of the year. 14906 }, 14907 }); 14908 14909 //! moment.js locale configuration 14910 14911 hooks.defineLocale('fr-ca', { 14912 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 14913 '_' 14914 ), 14915 monthsShort: 14916 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 14917 '_' 14918 ), 14919 monthsParseExact: true, 14920 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 14921 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 14922 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 14923 weekdaysParseExact: true, 14924 longDateFormat: { 14925 LT: 'HH:mm', 14926 LTS: 'HH:mm:ss', 14927 L: 'YYYY-MM-DD', 14928 LL: 'D MMMM YYYY', 14929 LLL: 'D MMMM YYYY HH:mm', 14930 LLLL: 'dddd D MMMM YYYY HH:mm', 14931 }, 14932 calendar: { 14933 sameDay: '[Aujourdâhui à ] LT', 14934 nextDay: '[Demain à ] LT', 14935 nextWeek: 'dddd [à ] LT', 14936 lastDay: '[Hier à ] LT', 14937 lastWeek: 'dddd [dernier à ] LT', 14938 sameElse: 'L', 14939 }, 14940 relativeTime: { 14941 future: 'dans %s', 14942 past: 'il y a %s', 14943 s: 'quelques secondes', 14944 ss: '%d secondes', 14945 m: 'une minute', 14946 mm: '%d minutes', 14947 h: 'une heure', 14948 hh: '%d heures', 14949 d: 'un jour', 14950 dd: '%d jours', 14951 M: 'un mois', 14952 MM: '%d mois', 14953 y: 'un an', 14954 yy: '%d ans', 14955 }, 14956 dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, 14957 ordinal: function (number, period) { 14958 switch (period) { 14959 // Words with masculine grammatical gender: mois, trimestre, jour 14960 default: 14961 case 'M': 14962 case 'Q': 14963 case 'D': 14964 case 'DDD': 14965 case 'd': 14966 return number + (number === 1 ? 'er' : 'e'); 14967 14968 // Words with feminine grammatical gender: semaine 14969 case 'w': 14970 case 'W': 14971 return number + (number === 1 ? 're' : 'e'); 14972 } 14973 }, 14974 }); 14975 14976 //! moment.js locale configuration 14977 14978 hooks.defineLocale('fr-ch', { 14979 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 14980 '_' 14981 ), 14982 monthsShort: 14983 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 14984 '_' 14985 ), 14986 monthsParseExact: true, 14987 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 14988 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 14989 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 14990 weekdaysParseExact: true, 14991 longDateFormat: { 14992 LT: 'HH:mm', 14993 LTS: 'HH:mm:ss', 14994 L: 'DD.MM.YYYY', 14995 LL: 'D MMMM YYYY', 14996 LLL: 'D MMMM YYYY HH:mm', 14997 LLLL: 'dddd D MMMM YYYY HH:mm', 14998 }, 14999 calendar: { 15000 sameDay: '[Aujourdâhui à ] LT', 15001 nextDay: '[Demain à ] LT', 15002 nextWeek: 'dddd [à ] LT', 15003 lastDay: '[Hier à ] LT', 15004 lastWeek: 'dddd [dernier à ] LT', 15005 sameElse: 'L', 15006 }, 15007 relativeTime: { 15008 future: 'dans %s', 15009 past: 'il y a %s', 15010 s: 'quelques secondes', 15011 ss: '%d secondes', 15012 m: 'une minute', 15013 mm: '%d minutes', 15014 h: 'une heure', 15015 hh: '%d heures', 15016 d: 'un jour', 15017 dd: '%d jours', 15018 M: 'un mois', 15019 MM: '%d mois', 15020 y: 'un an', 15021 yy: '%d ans', 15022 }, 15023 dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, 15024 ordinal: function (number, period) { 15025 switch (period) { 15026 // Words with masculine grammatical gender: mois, trimestre, jour 15027 default: 15028 case 'M': 15029 case 'Q': 15030 case 'D': 15031 case 'DDD': 15032 case 'd': 15033 return number + (number === 1 ? 'er' : 'e'); 15034 15035 // Words with feminine grammatical gender: semaine 15036 case 'w': 15037 case 'W': 15038 return number + (number === 1 ? 're' : 'e'); 15039 } 15040 }, 15041 week: { 15042 dow: 1, // Monday is the first day of the week. 15043 doy: 4, // The week that contains Jan 4th is the first week of the year. 15044 }, 15045 }); 15046 15047 //! moment.js locale configuration 15048 15049 var monthsStrictRegex$1 = 15050 /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, 15051 monthsShortStrictRegex$1 = 15052 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, 15053 monthsRegex$7 = 15054 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, 15055 monthsParse$6 = [ 15056 /^janv/i, 15057 /^févr/i, 15058 /^mars/i, 15059 /^avr/i, 15060 /^mai/i, 15061 /^juin/i, 15062 /^juil/i, 15063 /^août/i, 15064 /^sept/i, 15065 /^oct/i, 15066 /^nov/i, 15067 /^déc/i, 15068 ]; 15069 15070 hooks.defineLocale('fr', { 15071 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 15072 '_' 15073 ), 15074 monthsShort: 15075 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 15076 '_' 15077 ), 15078 monthsRegex: monthsRegex$7, 15079 monthsShortRegex: monthsRegex$7, 15080 monthsStrictRegex: monthsStrictRegex$1, 15081 monthsShortStrictRegex: monthsShortStrictRegex$1, 15082 monthsParse: monthsParse$6, 15083 longMonthsParse: monthsParse$6, 15084 shortMonthsParse: monthsParse$6, 15085 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 15086 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 15087 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 15088 weekdaysParseExact: true, 15089 longDateFormat: { 15090 LT: 'HH:mm', 15091 LTS: 'HH:mm:ss', 15092 L: 'DD/MM/YYYY', 15093 LL: 'D MMMM YYYY', 15094 LLL: 'D MMMM YYYY HH:mm', 15095 LLLL: 'dddd D MMMM YYYY HH:mm', 15096 }, 15097 calendar: { 15098 sameDay: '[Aujourdâhui à ] LT', 15099 nextDay: '[Demain à ] LT', 15100 nextWeek: 'dddd [à ] LT', 15101 lastDay: '[Hier à ] LT', 15102 lastWeek: 'dddd [dernier à ] LT', 15103 sameElse: 'L', 15104 }, 15105 relativeTime: { 15106 future: 'dans %s', 15107 past: 'il y a %s', 15108 s: 'quelques secondes', 15109 ss: '%d secondes', 15110 m: 'une minute', 15111 mm: '%d minutes', 15112 h: 'une heure', 15113 hh: '%d heures', 15114 d: 'un jour', 15115 dd: '%d jours', 15116 w: 'une semaine', 15117 ww: '%d semaines', 15118 M: 'un mois', 15119 MM: '%d mois', 15120 y: 'un an', 15121 yy: '%d ans', 15122 }, 15123 dayOfMonthOrdinalParse: /\d{1,2}(er|)/, 15124 ordinal: function (number, period) { 15125 switch (period) { 15126 // TODO: Return 'e' when day of month > 1. Move this case inside 15127 // block for masculine words below. 15128 // See https://github.com/moment/moment/issues/3375 15129 case 'D': 15130 return number + (number === 1 ? 'er' : ''); 15131 15132 // Words with masculine grammatical gender: mois, trimestre, jour 15133 default: 15134 case 'M': 15135 case 'Q': 15136 case 'DDD': 15137 case 'd': 15138 return number + (number === 1 ? 'er' : 'e'); 15139 15140 // Words with feminine grammatical gender: semaine 15141 case 'w': 15142 case 'W': 15143 return number + (number === 1 ? 're' : 'e'); 15144 } 15145 }, 15146 week: { 15147 dow: 1, // Monday is the first day of the week. 15148 doy: 4, // The week that contains Jan 4th is the first week of the year. 15149 }, 15150 }); 15151 15152 //! moment.js locale configuration 15153 15154 var monthsShortWithDots = 15155 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), 15156 monthsShortWithoutDots = 15157 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); 15158 15159 hooks.defineLocale('fy', { 15160 months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( 15161 '_' 15162 ), 15163 monthsShort: function (m, format) { 15164 if (!m) { 15165 return monthsShortWithDots; 15166 } else if (/-MMM-/.test(format)) { 15167 return monthsShortWithoutDots[m.month()]; 15168 } else { 15169 return monthsShortWithDots[m.month()]; 15170 } 15171 }, 15172 monthsParseExact: true, 15173 weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( 15174 '_' 15175 ), 15176 weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), 15177 weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), 15178 weekdaysParseExact: true, 15179 longDateFormat: { 15180 LT: 'HH:mm', 15181 LTS: 'HH:mm:ss', 15182 L: 'DD-MM-YYYY', 15183 LL: 'D MMMM YYYY', 15184 LLL: 'D MMMM YYYY HH:mm', 15185 LLLL: 'dddd D MMMM YYYY HH:mm', 15186 }, 15187 calendar: { 15188 sameDay: '[hjoed om] LT', 15189 nextDay: '[moarn om] LT', 15190 nextWeek: 'dddd [om] LT', 15191 lastDay: '[juster om] LT', 15192 lastWeek: '[ôfrûne] dddd [om] LT', 15193 sameElse: 'L', 15194 }, 15195 relativeTime: { 15196 future: 'oer %s', 15197 past: '%s lyn', 15198 s: 'in pear sekonden', 15199 ss: '%d sekonden', 15200 m: 'ien minút', 15201 mm: '%d minuten', 15202 h: 'ien oere', 15203 hh: '%d oeren', 15204 d: 'ien dei', 15205 dd: '%d dagen',
15206 M: 'ien moanne', 15207 MM: '%d moannen', 15208 y: 'ien jier', 15209 yy: '%d jierren', 15210 }, 15211 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 15212 ordinal: function (number) { 15213 return ( 15214 number + 15215 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 15216 ); 15217 }, 15218 week: { 15219 dow: 1, // Monday is the first day of the week. 15220 doy: 4, // The week that contains Jan 4th is the first week of the year. 15221 }, 15222 }); 15223 15224 //! moment.js locale configuration 15225 15226 var months$6 = [ 15227 'Eanáir', 15228 'Feabhra', 15229 'Márta', 15230 'Aibreán', 15231 'Bealtaine', 15232 'Meitheamh', 15233 'Iúil', 15234 'Lúnasa', 15235 'Meán Fómhair', 15236 'Deireadh Fómhair', 15237 'Samhain', 15238 'Nollaig', 15239 ], 15240 monthsShort$5 = [ 15241 'Ean', 15242 'Feabh', 15243 'Márt', 15244 'Aib', 15245 'Beal', 15246 'Meith', 15247 'Iúil', 15248 'Lún', 15249 'M.F.', 15250 'D.F.', 15251 'Samh', 15252 'Noll', 15253 ], 15254 weekdays$1 = [ 15255 'Dé Domhnaigh', 15256 'Dé Luain', 15257 'Dé Máirt', 15258 'Dé Céadaoin', 15259 'Déardaoin', 15260 'Dé hAoine', 15261 'Dé Sathairn', 15262 ], 15263 weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], 15264 weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; 15265 15266 hooks.defineLocale('ga', { 15267 months: months$6, 15268 monthsShort: monthsShort$5, 15269 monthsParseExact: true, 15270 weekdays: weekdays$1, 15271 weekdaysShort: weekdaysShort, 15272 weekdaysMin: weekdaysMin, 15273 longDateFormat: { 15274 LT: 'HH:mm', 15275 LTS: 'HH:mm:ss', 15276 L: 'DD/MM/YYYY', 15277 LL: 'D MMMM YYYY', 15278 LLL: 'D MMMM YYYY HH:mm', 15279 LLLL: 'dddd, D MMMM YYYY HH:mm', 15280 }, 15281 calendar: { 15282 sameDay: '[Inniu ag] LT', 15283 nextDay: '[Amárach ag] LT', 15284 nextWeek: 'dddd [ag] LT', 15285 lastDay: '[Inné ag] LT', 15286 lastWeek: 'dddd [seo caite] [ag] LT', 15287 sameElse: 'L', 15288 }, 15289 relativeTime: { 15290 future: 'i %s', 15291 past: '%s ó shin', 15292 s: 'cúpla soicind', 15293 ss: '%d soicind', 15294 m: 'nóiméad', 15295 mm: '%d nóiméad', 15296 h: 'uair an chloig', 15297 hh: '%d uair an chloig', 15298 d: 'lá', 15299 dd: '%d lá', 15300 M: 'mÃ', 15301 MM: '%d mÃonna', 15302 y: 'bliain', 15303 yy: '%d bliain', 15304 }, 15305 dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, 15306 ordinal: function (number) { 15307 var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; 15308 return number + output; 15309 }, 15310 week: { 15311 dow: 1, // Monday is the first day of the week. 15312 doy: 4, // The week that contains Jan 4th is the first week of the year. 15313 }, 15314 }); 15315 15316 //! moment.js locale configuration 15317 15318 var months$7 = [ 15319 'Am Faoilleach', 15320 'An Gearran', 15321 'Am Mà rt', 15322 'An Giblean', 15323 'An Cèitean', 15324 'An t-Ãgmhios', 15325 'An t-Iuchar', 15326 'An Lùnastal', 15327 'An t-Sultain', 15328 'An Dà mhair', 15329 'An t-Samhain', 15330 'An Dùbhlachd', 15331 ], 15332 monthsShort$6 = [ 15333 'Faoi', 15334 'Gear', 15335 'Mà rt', 15336 'Gibl', 15337 'Cèit', 15338 'Ãgmh', 15339 'Iuch', 15340 'Lùn', 15341 'Sult', 15342 'Dà mh', 15343 'Samh', 15344 'Dùbh', 15345 ], 15346 weekdays$2 = [ 15347 'Didòmhnaich', 15348 'Diluain', 15349 'Dimà irt', 15350 'Diciadain', 15351 'Diardaoin', 15352 'Dihaoine', 15353 'Disathairne', 15354 ], 15355 weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], 15356 weekdaysMin$1 = ['Dò', 'Lu', 'Mà ', 'Ci', 'Ar', 'Ha', 'Sa']; 15357 15358 hooks.defineLocale('gd', { 15359 months: months$7, 15360 monthsShort: monthsShort$6, 15361 monthsParseExact: true, 15362 weekdays: weekdays$2, 15363 weekdaysShort: weekdaysShort$1, 15364 weekdaysMin: weekdaysMin$1, 15365 longDateFormat: { 15366 LT: 'HH:mm', 15367 LTS: 'HH:mm:ss', 15368 L: 'DD/MM/YYYY', 15369 LL: 'D MMMM YYYY', 15370 LLL: 'D MMMM YYYY HH:mm', 15371 LLLL: 'dddd, D MMMM YYYY HH:mm', 15372 }, 15373 calendar: { 15374 sameDay: '[An-diugh aig] LT', 15375 nextDay: '[A-mà ireach aig] LT', 15376 nextWeek: 'dddd [aig] LT',
15377 lastDay: '[An-dè aig] LT', 15378 lastWeek: 'dddd [seo chaidh] [aig] LT', 15379 sameElse: 'L', 15380 }, 15381 relativeTime: { 15382 future: 'ann an %s', 15383 past: 'bho chionn %s', 15384 s: 'beagan diogan', 15385 ss: '%d diogan', 15386 m: 'mionaid', 15387 mm: '%d mionaidean', 15388 h: 'uair', 15389 hh: '%d uairean', 15390 d: 'latha', 15391 dd: '%d latha', 15392 M: 'mìos', 15393 MM: '%d mìosan', 15394 y: 'bliadhna', 15395 yy: '%d bliadhna', 15396 }, 15397 dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, 15398 ordinal: function (number) { 15399 var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; 15400 return number + output; 15401 }, 15402 week: { 15403 dow: 1, // Monday is the first day of the week. 15404 doy: 4, // The week that contains Jan 4th is the first week of the year. 15405 }, 15406 }); 15407 15408 //! moment.js locale configuration 15409 15410 hooks.defineLocale('gl', { 15411 months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( 15412 '_' 15413 ), 15414 monthsShort: 15415 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( 15416 '_' 15417 ), 15418 monthsParseExact: true, 15419 weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), 15420 weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), 15421 weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), 15422 weekdaysParseExact: true, 15423 longDateFormat: { 15424 LT: 'H:mm', 15425 LTS: 'H:mm:ss', 15426 L: 'DD/MM/YYYY', 15427 LL: 'D [de] MMMM [de] YYYY', 15428 LLL: 'D [de] MMMM [de] YYYY H:mm', 15429 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 15430 }, 15431 calendar: { 15432 sameDay: function () { 15433 return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; 15434 }, 15435 nextDay: function () { 15436 return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; 15437 }, 15438 nextWeek: function () { 15439 return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; 15440 }, 15441 lastDay: function () { 15442 return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; 15443 }, 15444 lastWeek: function () { 15445 return ( 15446 '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' 15447 ); 15448 }, 15449 sameElse: 'L', 15450 }, 15451 relativeTime: { 15452 future: function (str) { 15453 if (str.indexOf('un') === 0) { 15454 return 'n' + str; 15455 } 15456 return 'en ' + str; 15457 }, 15458 past: 'hai %s', 15459 s: 'uns segundos', 15460 ss: '%d segundos', 15461 m: 'un minuto', 15462 mm: '%d minutos', 15463 h: 'unha hora', 15464 hh: '%d horas', 15465 d: 'un dÃa', 15466 dd: '%d dÃas', 15467 M: 'un mes', 15468 MM: '%d meses', 15469 y: 'un ano', 15470 yy: '%d anos', 15471 }, 15472 dayOfMonthOrdinalParse: /\d{1,2}º/, 15473 ordinal: '%dº', 15474 week: { 15475 dow: 1, // Monday is the first day of the week. 15476 doy: 4, // The week that contains Jan 4th is the first week of the year. 15477 }, 15478 }); 15479 15480 //! moment.js locale configuration 15481 15482 function processRelativeTime$4(number, withoutSuffix, key, isFuture) { 15483 var format = { 15484 s: ['थà¥à¤¡à¤¯à¤¾ सॠà¤à¤à¤¡à¤¾à¤à¤¨à¥', 'थà¥à¤¡à¥ सॠà¤à¤à¤¡'], 15485 ss: [number + ' सॠà¤à¤à¤¡à¤¾à¤à¤¨à¥', number + ' सॠà¤à¤à¤¡'], 15486 m: ['à¤à¤à¤¾ मिणà¤à¤¾à¤¨', 'à¤à¤ मिनà¥à¤'], 15487 mm: [number + ' मिणà¤à¤¾à¤à¤¨à¥', number + ' मिणà¤à¤¾à¤'], 15488 h: ['à¤à¤à¤¾ वरान', 'à¤à¤ वर'], 15489 hh: [number + ' वराà¤à¤¨à¥', number + ' वराà¤'], 15490 d: ['à¤à¤à¤¾ दिसान', 'à¤à¤ दà¥à¤¸'], 15491 dd: [number + ' दिसाà¤à¤¨à¥', number + ' दà¥à¤¸'], 15492 M: ['à¤à¤à¤¾ मà¥à¤¹à¤¯à¤¨à¥à¤¯à¤¾à¤¨', 'à¤à¤ मà¥à¤¹à¤¯à¤¨à¥'], 15493 MM: [number + ' मà¥à¤¹à¤¯à¤¨à¥à¤¯à¤¾à¤¨à¥', number + ' मà¥à¤¹à¤¯à¤¨à¥'], 15494 y: ['à¤à¤à¤¾ वरà¥à¤¸à¤¾à¤¨', 'à¤à¤ वरà¥à¤¸'], 15495 yy: [number + ' वरà¥à¤¸à¤¾à¤à¤¨à¥', number + ' वरà¥à¤¸à¤¾à¤'], 15496 }; 15497 return isFuture ? format[key][0] : format[key][1]; 15498 } 15499 15500 hooks.defineLocale('gom-deva', { 15501 months: { 15502 standalone: 15503 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¥à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¤¯_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°'.split( 15504 '_' 15505 ), 15506 format: 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥à¤à¥à¤¯à¤¾_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥à¤à¥à¤¯à¤¾_मारà¥à¤à¤¾à¤à¥à¤¯à¤¾_à¤à¤ªà¥à¤°à¥à¤²à¤¾à¤à¥à¤¯à¤¾_मà¥à¤¯à¤¾à¤à¥à¤¯à¤¾_à¤à¥à¤¨à¤¾à¤à¥à¤¯à¤¾_à¤à¥à¤²à¤¯à¤¾à¤à¥à¤¯à¤¾_à¤à¤à¤¸à¥à¤à¤¾à¤à¥à¤¯à¤¾_सपà¥à¤à¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_à¤à¤à¥à¤à¥à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_डिसà¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾'.split( 15507 '_' 15508 ), 15509 isFormat: /MMMM(\s)+D[oD]?/, 15510 }, 15511 monthsShort: 15512 'à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_à¤à¤ªà¥à¤°à¥._मà¥_à¤à¥à¤¨_à¤à¥à¤²._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.'.split( 15513 '_' 15514 ), 15515 monthsParseExact: true, 15516 weekdays: 'à¤à¤¯à¤¤à¤¾à¤°_सà¥à¤®à¤¾à¤°_मà¤à¤à¤³à¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_बिरà¥à¤¸à¥à¤¤à¤¾à¤°_सà¥à¤à¥à¤°à¤¾à
vendor: 8,719 bytes, lines 15516-15755
15516¤°_शà¥à¤¨à¤µà¤¾à¤°'.split('_'), 15517 weekdaysShort: 'à¤à¤¯à¤¤._सà¥à¤®._मà¤à¤à¤³._बà¥à¤§._बà¥à¤°à¥à¤¸à¥à¤¤._सà¥à¤à¥à¤°._शà¥à¤¨.'.split('_'), 15518 weekdaysMin: 'à¤_सà¥_मà¤_बà¥_बà¥à¤°à¥_सà¥_शà¥'.split('_'), 15519 weekdaysParseExact: true, 15520 longDateFormat: { 15521 LT: 'A h:mm [वाà¤à¤¤à¤¾à¤]', 15522 LTS: 'A h:mm:ss [वाà¤à¤¤à¤¾à¤]', 15523 L: 'DD-MM-YYYY', 15524 LL: 'D MMMM YYYY', 15525 LLL: 'D MMMM YYYY A h:mm [वाà¤à¤¤à¤¾à¤]', 15526 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाà¤à¤¤à¤¾à¤]', 15527 llll: 'ddd, D MMM YYYY, A h:mm [वाà¤à¤¤à¤¾à¤]', 15528 }, 15529 calendar: { 15530 sameDay: '[à¤à¤¯à¤] LT', 15531 nextDay: '[फालà¥à¤¯à¤¾à¤] LT', 15532 nextWeek: '[फà¥à¤¡à¤²à¥] dddd[,] LT', 15533 lastDay: '[à¤à¤¾à¤²] LT', 15534 lastWeek: '[फाà¤à¤²à¥] dddd[,] LT', 15535 sameElse: 'L', 15536 }, 15537 relativeTime: { 15538 future: '%s', 15539 past: '%s à¤à¤¦à¥à¤', 15540 s: processRelativeTime$4, 15541 ss: processRelativeTime$4, 15542 m: processRelativeTime$4, 15543 mm: processRelativeTime$4, 15544 h: processRelativeTime$4, 15545 hh: processRelativeTime$4, 15546 d: processRelativeTime$4, 15547 dd: processRelativeTime$4, 15548 M: processRelativeTime$4, 15549 MM: processRelativeTime$4, 15550 y: processRelativeTime$4, 15551 yy: processRelativeTime$4, 15552 }, 15553 dayOfMonthOrdinalParse: /\d{1,2}(वà¥à¤°)/, 15554 ordinal: function (number, period) { 15555 switch (period) { 15556 // the ordinal 'वà¥à¤°' only applies to day of the month 15557 case 'D': 15558 return number + 'वà¥à¤°'; 15559 default: 15560 case 'M': 15561 case 'Q': 15562 case 'DDD': 15563 case 'd': 15564 case 'w': 15565 case 'W': 15566 return number; 15567 } 15568 }, 15569 week: { 15570 dow: 0, // Sunday is the first day of the week 15571 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) 15572 }, 15573 meridiemParse: /रातà¥|सà¤à¤¾à¤³à¥à¤|दनपाराà¤|साà¤à¤à¥/, 15574 meridiemHour: function (hour, meridiem) { 15575 if (hour === 12) { 15576 hour = 0; 15577 } 15578 if (meridiem === 'रातà¥') { 15579 return hour < 4 ? hour : hour + 12; 15580 } else if (meridiem === 'सà¤à¤¾à¤³à¥à¤') { 15581 return hour; 15582 } else if (meridiem === 'दनपाराà¤') { 15583 return hour > 12 ? hour : hour + 12; 15584 } else if (meridiem === 'साà¤à¤à¥') { 15585 return hour + 12; 15586 } 15587 }, 15588 meridiem: function (hour, minute, isLower) { 15589 if (hour < 4) { 15590 return 'रातà¥'; 15591 } else if (hour < 12) { 15592 return 'सà¤à¤¾à¤³à¥à¤'; 15593 } else if (hour < 16) { 15594 return 'दनपाराà¤'; 15595 } else if (hour < 20) { 15596 return 'साà¤à¤à¥'; 15597 } else { 15598 return 'रातà¥'; 15599 } 15600 }, 15601 }); 15602 15603 //! moment.js locale configuration 15604 15605 function processRelativeTime$5(number, withoutSuffix, key, isFuture) { 15606 var format = { 15607 s: ['thoddea sekondamni', 'thodde sekond'], 15608 ss: [number + ' sekondamni', number + ' sekond'], 15609 m: ['eka mintan', 'ek minut'], 15610 mm: [number + ' mintamni', number + ' mintam'], 15611 h: ['eka voran', 'ek vor'], 15612 hh: [number + ' voramni', number + ' voram'], 15613 d: ['eka disan', 'ek dis'], 15614 dd: [number + ' disamni', number + ' dis'], 15615 M: ['eka mhoinean', 'ek mhoino'], 15616 MM: [number + ' mhoineamni', number + ' mhoine'], 15617 y: ['eka vorsan', 'ek voros'], 15618 yy: [number + ' vorsamni', number + ' vorsam'], 15619 }; 15620 return isFuture ? format[key][0] : format[key][1]; 15621 } 15622 15623 hooks.defineLocale('gom-latn', { 15624 months: { 15625 standalone: 15626 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( 15627 '_' 15628 ), 15629 format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( 15630 '_' 15631 ), 15632 isFormat: /MMMM(\s)+D[oD]?/, 15633 }, 15634 monthsShort: 15635 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), 15636 monthsParseExact: true, 15637 weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), 15638 weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), 15639 weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), 15640 weekdaysParseExact: true, 15641 longDateFormat: { 15642 LT: 'A h:mm [vazta]', 15643 LTS: 'A h:mm:ss [vazta]', 15644 L: 'DD-MM-YYYY', 15645 LL: 'D MMMM YYYY', 15646 LLL: 'D MMMM YYYY A h:mm [vazta]', 15647 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', 15648 llll: 'ddd, D MMM YYYY, A h:mm [vazta]', 15649 }, 15650 calendar: { 15651 sameDay: '[Aiz] LT', 15652 nextDay: '[Faleam] LT', 15653 nextWeek: '[Fuddlo] dddd[,] LT', 15654 lastDay: '[Kal] LT', 15655 lastWeek: '[Fattlo] dddd[,] LT', 15656 sameElse: 'L', 15657 }, 15658 relativeTime: { 15659 future: '%s', 15660 past: '%s adim', 15661 s: processRelativeTime$5, 15662 ss: processRelativeTime$5, 15663 m: processRelativeTime$5, 15664 mm: processRelativeTime$5, 15665 h: processRelativeTime$5, 15666 hh: processRelativeTime$5, 15667 d: processRelativeTime$5, 15668 dd: processRelativeTime$5, 15669 M: processRelativeTime$5, 15670 MM: processRelativeTime$5, 15671 y: processRelativeTime$5, 15672 yy: processRelativeTime$5, 15673 }, 15674 dayOfMonthOrdinalParse: /\d{1,2}(er)/, 15675 ordinal: function (number, period) { 15676 switch (period) { 15677 // the ordinal 'er' only applies to day of the month 15678 case 'D': 15679 return number + 'er'; 15680 default: 15681 case 'M': 15682 case 'Q': 15683 case 'DDD': 15684 case 'd': 15685 case 'w': 15686 case 'W': 15687 return number; 15688 } 15689 }, 15690 week: { 15691 dow: 0, // Sunday is the first day of the week 15692 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) 15693 }, 15694 meridiemParse: /rati|sokallim|donparam|sanje/, 15695 meridiemHour: function (hour, meridiem) { 15696 if (hour === 12) { 15697 hour = 0; 15698 } 15699 if (meridiem === 'rati') { 15700 return hour < 4 ? hour : hour + 12; 15701 } else if (meridiem === 'sokallim') { 15702 return hour; 15703 } else if (meridiem === 'donparam') { 15704 return hour > 12 ? hour : hour + 12; 15705 } else if (meridiem === 'sanje') { 15706 return hour + 12; 15707 } 15708 }, 15709 meridiem: function (hour, minute, isLower) { 15710 if (hour < 4) { 15711 return 'rati'; 15712 } else if (hour < 12) { 15713 return 'sokallim'; 15714 } else if (hour < 16) { 15715 return 'donparam'; 15716 } else if (hour < 20) { 15717 return 'sanje'; 15718 } else { 15719 return 'rati'; 15720 } 15721 }, 15722 }); 15723 15724 //! moment.js locale configuration 15725 15726 var symbolMap$7 = { 15727 1: 'à«§', 15728 2: '૨', 15729 3: 'à«©', 15730 4: '૪', 15731 5: 'à««', 15732 6: '૬', 15733 7: 'à«', 15734 8: 'à«®', 15735 9: '૯', 15736 0: '૦', 15737 }, 15738 numberMap$6 = { 15739 'à«§': '1', 15740 '૨': '2', 15741 'à«©': '3', 15742 '૪': '4', 15743 'à««': '5', 15744 '૬': '6', 15745 'à«': '7', 15746 'à«®': '8', 15747 '૯': '9', 15748 '૦': '0', 15749 }; 15750 15751 hooks.defineLocale('gu', { 15752 months: 'àªàª¾àª¨à«àª¯à«àªàª°à«_ફà«àª¬à«àª°à«àªàª°à«_મારà«àª_àªàªªà«àª°àª¿àª²_મà«_àªà«àª¨_àªà«àª²àª¾àª_àªàªàª¸à«àª_સપà«àªà«àª®à«àª¬àª°_àªàªà«àªà«àª¬àª°_નવà«àª®à«àª¬àª°_ડિસà«àª®à«àª¬àª°'.split( 15753 '_' 15754 ), 15755 monthsShort:
vendor: 7,472 bytes, lines 15756-15958
15756 'àªàª¾àª¨à«àª¯à«._ફà«àª¬à«àª°à«._મારà«àª_àªàªªà«àª°àª¿._મà«_àªà«àª¨_àªà«àª²àª¾._àªàª._સપà«àªà«._àªàªà«àªà«._નવà«._ડિસà«.'.split( 15757 '_' 15758 ), 15759 monthsParseExact: true, 15760 weekdays: 'રવિવાર_સà«àª®àªµàª¾àª°_મàªàªàª³àªµàª¾àª°_બà«àª§à«àªµàª¾àª°_àªà«àª°à«àªµàª¾àª°_શà«àªà«àª°àªµàª¾àª°_શનિવાર'.split( 15761 '_' 15762 ), 15763 weekdaysShort: 'રવિ_સà«àª®_મàªàªàª³_બà«àª§à«_àªà«àª°à«_શà«àªà«àª°_શનિ'.split('_'), 15764 weekdaysMin: 'ર_સà«_મàª_બà«_àªà«_શà«_શ'.split('_'), 15765 longDateFormat: { 15766 LT: 'A h:mm વાàªà«àª¯à«', 15767 LTS: 'A h:mm:ss વાàªà«àª¯à«', 15768 L: 'DD/MM/YYYY', 15769 LL: 'D MMMM YYYY', 15770 LLL: 'D MMMM YYYY, A h:mm વાàªà«àª¯à«', 15771 LLLL: 'dddd, D MMMM YYYY, A h:mm વાàªà«àª¯à«', 15772 }, 15773 calendar: { 15774 sameDay: '[àªàª] LT', 15775 nextDay: '[àªàª¾àª²à«] LT', 15776 nextWeek: 'dddd, LT', 15777 lastDay: '[àªàªàªàª¾àª²à«] LT', 15778 lastWeek: '[પાàªàª²àª¾] dddd, LT', 15779 sameElse: 'L', 15780 }, 15781 relativeTime: { 15782 future: '%s મા', 15783 past: '%s પહà«àª²àª¾', 15784 s: 'ઠમà«àª પળà«', 15785 ss: '%d સà«àªàªàª¡', 15786 m: 'àªàª મિનિàª', 15787 mm: '%d મિનિàª', 15788 h: 'àªàª àªàª²àª¾àª', 15789 hh: '%d àªàª²àª¾àª', 15790 d: 'àªàª દિવસ', 15791 dd: '%d દિવસ', 15792 M: 'àªàª મહિનà«', 15793 MM: '%d મહિનà«', 15794 y: 'àªàª વરà«àª·', 15795 yy: '%d વરà«àª·', 15796 }, 15797 preparse: function (string) { 15798 return string.replace(/[૧૨૩૪૫૬à«à«®à«¯à«¦]/g, function (match) { 15799 return numberMap$6[match]; 15800 }); 15801 }, 15802 postformat: function (string) { 15803 return string.replace(/\d/g, function (match) { 15804 return symbolMap$7[match]; 15805 }); 15806 }, 15807 // Gujarati notation for meridiems are quite fuzzy in practice. While there exists 15808 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. 15809 meridiemParse: /રાત|બપà«àª°|સવાર|સાàªàª/, 15810 meridiemHour: function (hour, meridiem) { 15811 if (hour === 12) { 15812 hour = 0; 15813 } 15814 if (meridiem === 'રાત') { 15815 return hour < 4 ? hour : hour + 12; 15816 } else if (meridiem === 'સવાર') { 15817 return hour; 15818 } else if (meridiem === 'બપà«àª°') { 15819 return hour >= 10 ? hour : hour + 12; 15820 } else if (meridiem === 'સાàªàª') { 15821 return hour + 12; 15822 } 15823 }, 15824 meridiem: function (hour, minute, isLower) { 15825 if (hour < 4) { 15826 return 'રાત'; 15827 } else if (hour < 10) { 15828 return 'સવાર'; 15829 } else if (hour < 17) { 15830 return 'બપà«àª°'; 15831 } else if (hour < 20) { 15832 return 'સાàªàª'; 15833 } else { 15834 return 'રાત'; 15835 } 15836 }, 15837 week: { 15838 dow: 0, // Sunday is the first day of the week. 15839 doy: 6, // The week that contains Jan 6th is the first week of the year. 15840 }, 15841 }); 15842 15843 //! moment.js locale configuration 15844 15845 hooks.defineLocale('he', { 15846 months: '×× ××ר_פ×ר××ר_×רץ_×פר××_×××_××× ×_××××_××××ס×_ספ×××ר_×××§×××ר_× ××××ר_×צ××ר'.split( 15847 '_' 15848 ), 15849 monthsShort: 15850 '×× ×׳_פ×ר׳_×רץ_×פר׳_×××_××× ×_××××_×××׳_ספ×׳_××ק׳_× ××׳_×צ×׳'.split('_'), 15851 weekdays: 'ר×ש××_×©× ×_ש××ש×_ר×××¢×_×××ש×_ש×ש×_ש×ת'.split('_'), 15852 weekdaysShort: '×׳_×׳_×׳_×׳_×׳_×׳_ש׳'.split('_'), 15853 weekdaysMin: '×_×_×_×_×_×_ש'.split('_'), 15854 longDateFormat: { 15855 LT: 'HH:mm', 15856 LTS: 'HH:mm:ss', 15857 L: 'DD/MM/YYYY', 15858 LL: 'D [×]MMMM YYYY', 15859 LLL: 'D [×]MMMM YYYY HH:mm', 15860 LLLL: 'dddd, D [×]MMMM YYYY HH:mm', 15861 l: 'D/M/YYYY', 15862 ll: 'D MMM YYYY', 15863 lll: 'D MMM YYYY HH:mm', 15864 llll: 'ddd, D MMM YYYY HH:mm', 15865 }, 15866 calendar: { 15867 sameDay: '[×××× ×Ö¾]LT', 15868 nextDay: '[××ר ×Ö¾]LT', 15869 nextWeek: 'dddd [×שע×] LT', 15870 lastDay: '[×ת××× ×Ö¾]LT', 15871 lastWeek: '[××××] dddd [×××ר×× ×שע×] LT', 15872 sameElse: 'L', 15873 }, 15874 relativeTime: { 15875 future: '××¢×× %s', 15876 past: '××¤× × %s', 15877 s: '×ספר ×©× ××ת', 15878 ss: '%d ×©× ××ת', 15879 m: '××§×', 15880 mm: '%d ××§×ת', 15881 h: 'שע×', 15882 hh: function (number) { 15883 if (number === 2) { 15884 return 'שעת×××'; 15885 } 15886 return number + ' שע×ת'; 15887 }, 15888 d: '×××', 15889 dd: function (number) { 15890 if (number === 2) { 15891 return '××××××'; 15892 } 15893 return number + ' ××××'; 15894 }, 15895 M: '×××ש', 15896 MM: function (number) { 15897 if (number === 2) { 15898 return '×××ש×××'; 15899 } 15900 return number + ' ×××ש××'; 15901 }, 15902 y: '×©× ×', 15903 yy: function (number) { 15904 if (number === 2) { 15905 return '×©× ×ª×××'; 15906 } else if (number % 10 === 0 && number !== 10) { 15907 return number + ' ×©× ×'; 15908 } 15909 return number + ' ×©× ××'; 15910 }, 15911 }, 15912 meridiemParse: 15913 /×××"צ|××¤× ×"צ|×××¨× ×צ×ר×××|××¤× × ×צ×ר×××|××¤× ×ת ××קר|×××קר|×ער×/i, 15914 isPM: function (input) { 15915 return /^(×××"צ|×××¨× ×צ×ר×××|×ער×)$/.test(input); 15916 }, 15917 meridiem: function (hour, minute, isLower) { 15918 if (hour < 5) { 15919 return '××¤× ×ת ××קר'; 15920 } else if (hour < 10) { 15921 return '×××קר'; 15922 } else if (hour < 12) { 15923 return isLower ? '××¤× ×"צ' : '××¤× × ×צ×ר×××'; 15924 } else if (hour < 18) { 15925 return isLower ? '×××"צ' : '×××¨× ×צ×ר×××'; 15926 } else { 15927 return '×ער×'; 15928 } 15929 }, 15930 }); 15931 15932 //! moment.js locale configuration 15933 15934 var symbolMap$8 = { 15935 1: '१', 15936 2: '२', 15937 3: '३', 15938 4: '४', 15939 5: '५', 15940 6: '६', 15941 7: 'à¥', 15942 8: '८', 15943 9: '९', 15944 0: '०', 15945 }, 15946 numberMap$7 = { 15947 '१': '1', 15948 '२': '2', 15949 '३': '3', 15950 '४': '4', 15951 '५': '5', 15952 '६': '6', 15953 'à¥': '7', 15954 '८': '8', 15955 '९': '9', 15956 '०': '0', 15957 }, 15958 monthsParse$7 = [
vendor: 5,323 bytes, lines 15959-16067
15959 /^à¤à¤¨/i, 15960 /^फ़र|फर/i, 15961 /^मारà¥à¤/i, 15962 /^ठपà¥à¤°à¥/i, 15963 /^मà¤/i, 15964 /^à¤à¥à¤¨/i, 15965 /^à¤à¥à¤²/i, 15966 /^ठà¤/i, 15967 /^सितà¤|सित/i, 15968 /^ठà¤à¥à¤à¥/i, 15969 /^नव|नवà¤/i, 15970 /^दिसà¤|दिस/i, 15971 ], 15972 shortMonthsParse = [ 15973 /^à¤à¤¨/i, 15974 /^फ़र/i, 15975 /^मारà¥à¤/i, 15976 /^ठपà¥à¤°à¥/i, 15977 /^मà¤/i, 15978 /^à¤à¥à¤¨/i, 15979 /^à¤à¥à¤²/i, 15980 /^ठà¤/i, 15981 /^सित/i, 15982 /^ठà¤à¥à¤à¥/i, 15983 /^नव/i, 15984 /^दिस/i, 15985 ]; 15986 15987 hooks.defineLocale('hi', { 15988 months: { 15989 format: 'à¤à¤¨à¤µà¤°à¥_फ़रवरà¥_मारà¥à¤_ठपà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤¸à¥à¤¤_सितमà¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नवमà¥à¤¬à¤°_दिसमà¥à¤¬à¤°'.split( 15990 '_' 15991 ), 15992 standalone: 15993 'à¤à¤¨à¤µà¤°à¥_फरवरà¥_मारà¥à¤_ठपà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤¸à¥à¤¤_सितà¤à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नवà¤à¤¬à¤°_दिसà¤à¤¬à¤°'.split( 15994 '_' 15995 ), 15996 }, 15997 monthsShort: 15998 'à¤à¤¨._फ़र._मारà¥à¤_ठपà¥à¤°à¥._मà¤_à¤à¥à¤¨_à¤à¥à¤²._ठà¤._सित._ठà¤à¥à¤à¥._नव._दिस.'.split('_'), 15999 weekdays: 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤²à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 16000 weekdaysShort: 'रवि_सà¥à¤®_मà¤à¤à¤²_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 16001 weekdaysMin: 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 16002 longDateFormat: { 16003 LT: 'A h:mm बà¤à¥', 16004 LTS: 'A h:mm:ss बà¤à¥', 16005 L: 'DD/MM/YYYY', 16006 LL: 'D MMMM YYYY', 16007 LLL: 'D MMMM YYYY, A h:mm बà¤à¥', 16008 LLLL: 'dddd, D MMMM YYYY, A h:mm बà¤à¥', 16009 }, 16010 16011 monthsParse: monthsParse$7, 16012 longMonthsParse: monthsParse$7, 16013 shortMonthsParse: shortMonthsParse, 16014 16015 monthsRegex: 16016 /^(à¤à¤¨à¤µà¤°à¥|à¤à¤¨\.?|फ़रवरà¥|फरवरà¥|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥à¤²|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤|à¤à¥à¤²\.?|ठà¤à¤¸à¥à¤¤|ठà¤\.?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित\.?|ठà¤à¥à¤à¥à¤¬à¤°|ठà¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°|नव\.?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°|दिस\.?)/i, 16017 16018 monthsShortRegex: 16019 /^(à¤à¤¨à¤µà¤°à¥|à¤à¤¨\.?|फ़रवरà¥|फरवरà¥|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥à¤²|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤|à¤à¥à¤²\.?|ठà¤à¤¸à¥à¤¤|ठà¤\.?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित\.?|ठà¤à¥à¤à¥à¤¬à¤°|ठà¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°|नव\.?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°|दिस\.?)/i, 16020 16021 monthsStrictRegex: 16022 /^(à¤à¤¨à¤µà¤°à¥?|फ़रवरà¥|फरवरà¥?|मारà¥à¤?|ठपà¥à¤°à¥à¤²?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤?|ठà¤à¤¸à¥à¤¤?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित?\.?|ठà¤à¥à¤à¥à¤¬à¤°|ठà¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°?)/i, 16023 16024 monthsShortStrictRegex: 16025 /^(à¤à¤¨\.?|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²\.?|ठà¤\.?|सित\.?|ठà¤à¥à¤à¥\.?|नव\.?|दिस\.?)/i, 16026 16027 calendar: { 16028 sameDay: '[à¤à¤] LT', 16029 nextDay: '[à¤à¤²] LT', 16030 nextWeek: 'dddd, LT', 16031 lastDay: '[à¤à¤²] LT', 16032 lastWeek: '[पिà¤à¤²à¥] dddd, LT', 16033 sameElse: 'L', 16034 }, 16035 relativeTime: { 16036 future: '%s मà¥à¤', 16037 past: '%s पहलà¥', 16038 s: 'à¤à¥à¤ हॠà¤à¥à¤·à¤£', 16039 ss: '%d सà¥à¤à¤à¤¡', 16040 m: 'à¤à¤ मिनà¤', 16041 mm: '%d मिनà¤', 16042 h: 'à¤à¤ à¤à¤à¤à¤¾', 16043 hh: '%d à¤à¤à¤à¥', 16044 d: 'à¤à¤ दिन', 16045 dd: '%d दिन', 16046 M: 'à¤à¤ महà¥à¤¨à¥', 16047 MM: '%d महà¥à¤¨à¥', 16048 y: 'à¤à¤ वरà¥à¤·', 16049 yy: '%d वरà¥à¤·', 16050 }, 16051 preparse: function (string) { 16052 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 16053 return numberMap$7[match]; 16054 }); 16055 }, 16056 postformat: function (string) { 16057 return string.replace(/\d/g, function (match) { 16058 return symbolMap$8[match]; 16059 }); 16060 }, 16061 // Hindi notation for meridiems are quite fuzzy in practice. While there exists 16062 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. 16063 meridiemParse: /रात|सà¥à¤¬à¤¹|दà¥à¤ªà¤¹à¤°|शाम/, 16064 meridiemHour: function (hour, meridiem) { 16065 if (hour === 12) { 16066 hour = 0; 16067 }
vendor: 12,402 bytes, lines 16068-16413
16068 if (meridiem === 'रात') { 16069 return hour < 4 ? hour : hour + 12; 16070 } else if (meridiem === 'सà¥à¤¬à¤¹') { 16071 return hour; 16072 } else if (meridiem === 'दà¥à¤ªà¤¹à¤°') { 16073 return hour >= 10 ? hour : hour + 12; 16074 } else if (meridiem === 'शाम') { 16075 return hour + 12; 16076 } 16077 }, 16078 meridiem: function (hour, minute, isLower) { 16079 if (hour < 4) { 16080 return 'रात'; 16081 } else if (hour < 10) { 16082 return 'सà¥à¤¬à¤¹'; 16083 } else if (hour < 17) { 16084 return 'दà¥à¤ªà¤¹à¤°'; 16085 } else if (hour < 20) { 16086 return 'शाम'; 16087 } else { 16088 return 'रात'; 16089 } 16090 }, 16091 week: { 16092 dow: 0, // Sunday is the first day of the week. 16093 doy: 6, // The week that contains Jan 6th is the first week of the year. 16094 }, 16095 }); 16096 16097 //! moment.js locale configuration 16098 16099 function translate$3(number, withoutSuffix, key) { 16100 var result = number + ' '; 16101 switch (key) { 16102 case 'ss': 16103 if (number === 1) { 16104 result += 'sekunda'; 16105 } else if (number === 2 || number === 3 || number === 4) { 16106 result += 'sekunde'; 16107 } else { 16108 result += 'sekundi'; 16109 } 16110 return result; 16111 case 'm': 16112 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 16113 case 'mm': 16114 if (number === 1) { 16115 result += 'minuta'; 16116 } else if (number === 2 || number === 3 || number === 4) { 16117 result += 'minute'; 16118 } else { 16119 result += 'minuta'; 16120 } 16121 return result; 16122 case 'h': 16123 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 16124 case 'hh': 16125 if (number === 1) { 16126 result += 'sat'; 16127 } else if (number === 2 || number === 3 || number === 4) { 16128 result += 'sata'; 16129 } else { 16130 result += 'sati'; 16131 } 16132 return result; 16133 case 'dd': 16134 if (number === 1) { 16135 result += 'dan'; 16136 } else { 16137 result += 'dana'; 16138 } 16139 return result; 16140 case 'MM': 16141 if (number === 1) { 16142 result += 'mjesec'; 16143 } else if (number === 2 || number === 3 || number === 4) { 16144 result += 'mjeseca'; 16145 } else { 16146 result += 'mjeseci'; 16147 } 16148 return result; 16149 case 'yy': 16150 if (number === 1) { 16151 result += 'godina'; 16152 } else if (number === 2 || number === 3 || number === 4) { 16153 result += 'godine'; 16154 } else { 16155 result += 'godina'; 16156 } 16157 return result; 16158 } 16159 } 16160 16161 hooks.defineLocale('hr', { 16162 months: { 16163 format: 'sijeÄnja_veljaÄe_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( 16164 '_' 16165 ), 16166 standalone: 16167 'sijeÄanj_veljaÄa_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( 16168 '_' 16169 ), 16170 }, 16171 monthsShort: 16172 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( 16173 '_' 16174 ), 16175 monthsParseExact: true, 16176 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 16177 '_' 16178 ), 16179 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 16180 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 16181 weekdaysParseExact: true, 16182 longDateFormat: { 16183 LT: 'H:mm', 16184 LTS: 'H:mm:ss', 16185 L: 'DD.MM.YYYY', 16186 LL: 'Do MMMM YYYY', 16187 LLL: 'Do MMMM YYYY H:mm', 16188 LLLL: 'dddd, Do MMMM YYYY H:mm', 16189 }, 16190 calendar: { 16191 sameDay: '[danas u] LT', 16192 nextDay: '[sutra u] LT', 16193 nextWeek: function () { 16194 switch (this.day()) { 16195 case 0: 16196 return '[u] [nedjelju] [u] LT'; 16197 case 3: 16198 return '[u] [srijedu] [u] LT'; 16199 case 6: 16200 return '[u] [subotu] [u] LT'; 16201 case 1: 16202 case 2: 16203 case 4: 16204 case 5: 16205 return '[u] dddd [u] LT'; 16206 } 16207 }, 16208 lastDay: '[juÄer u] LT', 16209 lastWeek: function () { 16210 switch (this.day()) { 16211 case 0: 16212 return '[proÅ¡lu] [nedjelju] [u] LT'; 16213 case 3: 16214 return '[proÅ¡lu] [srijedu] [u] LT'; 16215 case 6: 16216 return '[proÅ¡le] [subote] [u] LT'; 16217 case 1: 16218 case 2: 16219 case 4: 16220 case 5: 16221 return '[proÅ¡li] dddd [u] LT'; 16222 } 16223 }, 16224 sameElse: 'L', 16225 }, 16226 relativeTime: { 16227 future: 'za %s', 16228 past: 'prije %s', 16229 s: 'par sekundi', 16230 ss: translate$3, 16231 m: translate$3, 16232 mm: translate$3, 16233 h: translate$3, 16234 hh: translate$3, 16235 d: 'dan', 16236 dd: translate$3, 16237 M: 'mjesec', 16238 MM: translate$3, 16239 y: 'godinu', 16240 yy: translate$3, 16241 }, 16242 dayOfMonthOrdinalParse: /\d{1,2}\./, 16243 ordinal: '%d.', 16244 week: { 16245 dow: 1, // Monday is the first day of the week. 16246 doy: 7, // The week that contains Jan 7th is the first week of the year. 16247 }, 16248 }); 16249 16250 //! moment.js locale configuration 16251 16252 var weekEndings = 16253 'vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton'.split(' '); 16254 function translate$4(number, withoutSuffix, key, isFuture) { 16255 var num = number; 16256 switch (key) { 16257 case 's': 16258 return isFuture || withoutSuffix 16259 ? 'néhány másodperc' 16260 : 'néhány másodperce'; 16261 case 'ss': 16262 return num + (isFuture || withoutSuffix) 16263 ? ' másodperc' 16264 : ' másodperce'; 16265 case 'm': 16266 return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); 16267 case 'mm': 16268 return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); 16269 case 'h': 16270 return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); 16271 case 'hh': 16272 return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); 16273 case 'd': 16274 return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); 16275 case 'dd': 16276 return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); 16277 case 'M': 16278 return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 16279 case 'MM': 16280 return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 16281 case 'y': 16282 return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); 16283 case 'yy': 16284 return num + (isFuture || withoutSuffix ? ' év' : ' éve'); 16285 } 16286 return ''; 16287 } 16288 function week(isFuture) { 16289 return ( 16290 (isFuture ? '' : '[múlt] ') + 16291 '[' + 16292 weekEndings[this.day()] + 16293 '] LT[-kor]' 16294 ); 16295 } 16296 16297 hooks.defineLocale('hu', { 16298 months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( 16299 '_' 16300 ), 16301 monthsShort: 16302 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split( 16303 '_' 16304 ), 16305 monthsParseExact: true, 16306 weekdays: 'vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat'.split('_'), 16307 weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), 16308 weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), 16309 longDateFormat: { 16310 LT: 'H:mm', 16311 LTS: 'H:mm:ss', 16312 L: 'YYYY.MM.DD.', 16313 LL: 'YYYY. MMMM D.', 16314 LLL: 'YYYY. MMMM D. H:mm', 16315 LLLL: 'YYYY. MMMM D., dddd H:mm', 16316 }, 16317 meridiemParse: /de|du/i, 16318 isPM: function (input) { 16319 return input.charAt(1).toLowerCase() === 'u'; 16320 }, 16321 meridiem: function (hours, minutes, isLower) { 16322 if (hours < 12) { 16323 return isLower === true ? 'de' : 'DE'; 16324 } else { 16325 return isLower === true ? 'du' : 'DU'; 16326 } 16327 }, 16328 calendar: { 16329 sameDay: '[ma] LT[-kor]', 16330 nextDay: '[holnap] LT[-kor]', 16331 nextWeek: function () { 16332 return week.call(this, true); 16333 }, 16334 lastDay: '[tegnap] LT[-kor]', 16335 lastWeek: function () { 16336 return week.call(this, false); 16337 }, 16338 sameElse: 'L', 16339 }, 16340 relativeTime: { 16341 future: '%s múlva', 16342 past: '%s', 16343 s: translate$4, 16344 ss: translate$4, 16345 m: translate$4, 16346 mm: translate$4, 16347 h: translate$4, 16348 hh: translate$4, 16349 d: translate$4, 16350 dd: translate$4, 16351 M: translate$4, 16352 MM: translate$4, 16353 y: translate$4, 16354 yy: translate$4, 16355 }, 16356 dayOfMonthOrdinalParse: /\d{1,2}\./, 16357 ordinal: '%d.', 16358 week: { 16359 dow: 1, // Monday is the first day of the week. 16360 doy: 4, // The week that contains Jan 4th is the first week of the year. 16361 }, 16362 }); 16363 16364 //! moment.js locale configuration 16365 16366 hooks.defineLocale('hy-am', { 16367 months: { 16368 format: 'Õ°Õ¸ÖÕ¶Õ¾Õ¡ÖÕ«_ÖÕ¥Õ¿ÖÕ¾Õ¡ÖÕ«_Õ´Õ¡ÖÕ¿Õ«_Õ¡ÕºÖÕ«Õ¬Õ«_Õ´Õ¡ÕµÕ«Õ½Õ«_Õ°Õ¸ÖÕ¶Õ«Õ½Õ«_Õ°Õ¸ÖÕ¬Õ«Õ½Õ«_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½Õ«_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥ÖÕ«_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«'.split( 16369 '_' 16370 ), 16371 standalone: 16372 'Õ°Õ¸ÖÕ¶Õ¾Õ¡Ö_ÖÕ¥Õ¿ÖÕ¾Õ¡Ö_Õ´Õ¡ÖÕ¿_Õ¡ÕºÖÕ«Õ¬_Õ´Õ¡ÕµÕ«Õ½_Õ°Õ¸ÖÕ¶Õ«Õ½_Õ°Õ¸ÖÕ¬Õ«Õ½_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö'.split( 16373 '_' 16374 ), 16375 }, 16376 monthsShort: 'Õ°Õ¶Õ¾_ÖÕ¿Ö_Õ´ÖÕ¿_Õ¡ÕºÖ_Õ´ÕµÕ½_Õ°Õ¶Õ½_Õ°Õ¬Õ½_Ö Õ£Õ½_Õ½ÕºÕ¿_Õ°Õ¯Õ¿_Õ¶Õ´Õ¢_Õ¤Õ¯Õ¿'.split('_'), 16377 weekdays: 16378 'Õ¯Õ«ÖÕ¡Õ¯Õ«_Õ¥ÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¥ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¹Õ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«_Õ¸ÖÖÕ¢Õ¡Õ©_Õ·Õ¡Õ¢Õ¡Õ©'.split( 16379 '_' 16380 ), 16381 weekdaysShort: 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 16382 weekdaysMin: 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 16383 longDateFormat: { 16384 LT: 'HH:mm', 16385 LTS: 'HH:mm:ss', 16386 L: 'DD.MM.YYYY', 16387 LL: 'D MMMM YYYY Õ©.', 16388 LLL: 'D MMMM YYYY Õ©., HH:mm', 16389 LLLL: 'dddd, D MMMM YYYY Õ©., HH:mm', 16390 }, 16391 calendar: { 16392 sameDay: '[Õ¡ÕµÕ½Ö Ö] LT', 16393 nextDay: '[Õ¾Õ¡Õ²Õ¨] LT', 16394 lastDay: '[Õ¥ÖÕ¥Õ¯] LT', 16395 nextWeek: function () { 16396 return 'dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 16397 }, 16398 lastWeek: function () { 16399 return '[Õ¡Õ¶ÖÕ¡Õ®] dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 16400 }, 16401 sameElse: 'L', 16402 }, 16403 relativeTime: { 16404 future: '%s Õ°Õ¥Õ¿Õ¸', 16405 past: '%s Õ¡Õ¼Õ¡Õ»', 16406 s: 'Õ´Õ« ÖÕ¡Õ¶Õ« Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶', 16407 ss: '%d Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶', 16408 m: 'ÖÕ¸ÕºÕ¥', 16409 mm: '%d ÖÕ¸ÕºÕ¥', 16410 h: 'ÕªÕ¡Õ´', 16411 hh: '%d ÕªÕ¡Õ´', 16412 d: 'Ö Ö', 16413 dd: '%d Ö Ö',
16414 M: 'Õ¡Õ´Õ«Õ½', 16415 MM: '%d Õ¡Õ´Õ«Õ½', 16416 y: 'Õ¿Õ¡ÖÕ«', 16417 yy: '%d Õ¿Õ¡ÖÕ«', 16418 }, 16419 meridiemParse: /Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡|Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡|ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶/, 16420 isPM: function (input) { 16421 return /^(ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶)$/.test(input); 16422 }, 16423 meridiem: function (hour) { 16424 if (hour < 4) { 16425 return 'Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡'; 16426 } else if (hour < 12) { 16427 return 'Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡'; 16428 } else if (hour < 17) { 16429 return 'ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡'; 16430 } else { 16431 return 'Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶'; 16432 } 16433 }, 16434 dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(Õ«Õ¶|ÖÕ¤)/, 16435 ordinal: function (number, period) { 16436 switch (period) { 16437 case 'DDD': 16438 case 'w': 16439 case 'W': 16440 case 'DDDo': 16441 if (number === 1) { 16442 return number + '-Õ«Õ¶'; 16443 } 16444 return number + '-ÖÕ¤'; 16445 default: 16446 return number; 16447 } 16448 }, 16449 week: { 16450 dow: 1, // Monday is the first day of the week. 16451 doy: 7, // The week that contains Jan 7th is the first week of the year. 16452 }, 16453 }); 16454 16455 //! moment.js locale configuration 16456 16457 hooks.defineLocale('id', { 16458 months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( 16459 '_' 16460 ), 16461 monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), 16462 weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), 16463 weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), 16464 weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), 16465 longDateFormat: { 16466 LT: 'HH.mm', 16467 LTS: 'HH.mm.ss', 16468 L: 'DD/MM/YYYY', 16469 LL: 'D MMMM YYYY', 16470 LLL: 'D MMMM YYYY [pukul] HH.mm', 16471 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 16472 }, 16473 meridiemParse: /pagi|siang|sore|malam/, 16474 meridiemHour: function (hour, meridiem) { 16475 if (hour === 12) { 16476 hour = 0; 16477 } 16478 if (meridiem === 'pagi') { 16479 return hour; 16480 } else if (meridiem === 'siang') { 16481 return hour >= 11 ? hour : hour + 12; 16482 } else if (meridiem === 'sore' || meridiem === 'malam') { 16483 return hour + 12; 16484 } 16485 }, 16486 meridiem: function (hours, minutes, isLower) { 16487 if (hours < 11) { 16488 return 'pagi'; 16489 } else if (hours < 15) { 16490 return 'siang'; 16491 } else if (hours < 19) { 16492 return 'sore'; 16493 } else { 16494 return 'malam'; 16495 } 16496 }, 16497 calendar: { 16498 sameDay: '[Hari ini pukul] LT', 16499 nextDay: '[Besok pukul] LT', 16500 nextWeek: 'dddd [pukul] LT', 16501 lastDay: '[Kemarin pukul] LT', 16502 lastWeek: 'dddd [lalu pukul] LT', 16503 sameElse: 'L', 16504 }, 16505 relativeTime: { 16506 future: 'dalam %s', 16507 past: '%s yang lalu', 16508 s: 'beberapa detik', 16509 ss: '%d detik', 16510 m: 'semenit', 16511 mm: '%d menit', 16512 h: 'sejam', 16513 hh: '%d jam', 16514 d: 'sehari', 16515 dd: '%d hari', 16516 M: 'sebulan', 16517 MM: '%d bulan', 16518 y: 'setahun', 16519 yy: '%d tahun', 16520 }, 16521 week: { 16522 dow: 0, // Sunday is the first day of the week. 16523 doy: 6, // The week that contains Jan 6th is the first week of the year. 16524 }, 16525 }); 16526 16527 //! moment.js locale configuration 16528 16529 function plural$2(n) { 16530 if (n % 100 === 11) { 16531 return true; 16532 } else if (n % 10 === 1) { 16533 return false; 16534 } 16535 return true; 16536 } 16537 function translate$5(number, withoutSuffix, key, isFuture) { 16538 var result = number + ' '; 16539 switch (key) { 16540 case 's': 16541 return withoutSuffix || isFuture 16542 ? 'nokkrar sekúndur' 16543 : 'nokkrum sekúndum'; 16544 case 'ss': 16545 if (plural$2(number)) { 16546 return ( 16547 result + 16548 (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') 16549 ); 16550 } 16551 return result + 'sekúnda'; 16552 case 'm': 16553 return withoutSuffix ? 'mÃnúta' : 'mÃnútu'; 16554 case 'mm': 16555 if (plural$2(number)) { 16556 return ( 16557 result + (withoutSuffix || isFuture ? 'mÃnútur' : 'mÃnútum') 16558 ); 16559 } else if (withoutSuffix) { 16560 return result + 'mÃnúta'; 16561 } 16562 return result + 'mÃnútu'; 16563 case 'hh': 16564 if (plural$2(number)) { 16565 return ( 16566 result + 16567 (withoutSuffix || isFuture 16568 ? 'klukkustundir' 16569 : 'klukkustundum') 16570 ); 16571 } 16572 return result + 'klukkustund'; 16573 case 'd': 16574 if (withoutSuffix) { 16575 return 'dagur'; 16576 } 16577 return isFuture ? 'dag' : 'degi'; 16578 case 'dd': 16579 if (plural$2(number)) { 16580 if (withoutSuffix) { 16581 return result + 'dagar'; 16582 } 16583 return result + (isFuture ? 'daga' : 'dögum'); 16584 } else if (withoutSuffix) { 16585 return result + 'dagur'; 16586 } 16587 return result + (isFuture ? 'dag' : 'degi'); 16588 case 'M': 16589 if (withoutSuffix) { 16590 return 'mánuður'; 16591 } 16592 return isFuture ? 'mánuð' : 'mánuði'; 16593 case 'MM': 16594 if (plural$2(number)) { 16595 if (withoutSuffix) { 16596 return result + 'mánuðir'; 16597 } 16598 return result + (isFuture ? 'mánuði' : 'mánuðum'); 16599 } else if (withoutSuffix) { 16600 return result + 'mánuður'; 16601 } 16602 return result + (isFuture ? 'mánuð' : 'mánuði'); 16603 case 'y': 16604 return withoutSuffix || isFuture ? 'ár' : 'ári'; 16605 case 'yy': 16606 if (plural$2(number)) { 16607 return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); 16608 } 16609 return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); 16610 } 16611 } 16612 16613 hooks.defineLocale('is', { 16614 months: 'janúar_febrúar_mars_aprÃl_maÃ_júnÃ_júlÃ_ágúst_september_október_nóvember_desember'.split( 16615 '_' 16616 ), 16617 monthsShort: 'jan_feb_mar_apr_maÃ_jún_júl_ágú_sep_okt_nóv_des'.split('_'), 16618 weekdays: 16619 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( 16620 '_' 16621 ), 16622 weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), 16623 weekdaysMin: 'Su_Má_Ãr_Mi_Fi_Fö_La'.split('_'), 16624 longDateFormat: { 16625 LT: 'H:mm', 16626 LTS: 'H:mm:ss', 16627 L: 'DD.MM.YYYY', 16628 LL: 'D. MMMM YYYY', 16629 LLL: 'D. MMMM YYYY [kl.] H:mm', 16630 LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', 16631 }, 16632 calendar: { 16633 sameDay: '[à dag kl.] LT', 16634 nextDay: '[á morgun kl.] LT', 16635 nextWeek: 'dddd [kl.] LT', 16636 lastDay: '[à gær kl.] LT', 16637 lastWeek: '[sÃðasta] dddd [kl.] LT', 16638 sameElse: 'L', 16639 }, 16640 relativeTime: { 16641 future: 'eftir %s', 16642 past: 'fyrir %s sÃðan', 16643 s: translate$5, 16644 ss: translate$5, 16645 m: translate$5, 16646 mm: translate$5, 16647 h: 'klukkustund', 16648 hh: translate$5, 16649 d: translate$5, 16650 dd: translate$5, 16651 M: translate$5, 16652 MM: translate$5, 16653 y: translate$5, 16654 yy: translate$5, 16655 }, 16656 dayOfMonthOrdinalParse: /\d{1,2}\./, 16657 ordinal: '%d.', 16658 week: { 16659 dow: 1, // Monday is the first day of the week. 16660 doy: 4, // The week that contains Jan 4th is the first week of the year. 16661 }, 16662 }); 16663 16664 //! moment.js locale configuration 16665 16666 hooks.defineLocale('it-ch', { 16667 months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( 16668 '_' 16669 ), 16670 monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), 16671 weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( 16672 '_' 16673 ), 16674 weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), 16675 weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), 16676 longDateFormat: { 16677 LT: 'HH:mm', 16678 LTS: 'HH:mm:ss', 16679 L: 'DD.MM.YYYY', 16680 LL: 'D MMMM YYYY', 16681 LLL: 'D MMMM YYYY HH:mm', 16682 LLLL: 'dddd D MMMM YYYY HH:mm', 16683 }, 16684 calendar: { 16685 sameDay: '[Oggi alle] LT', 16686 nextDay: '[Domani alle] LT', 16687 nextWeek: 'dddd [alle] LT', 16688 lastDay: '[Ieri alle] LT', 16689 lastWeek: function () { 16690 switch (this.day()) { 16691 case 0: 16692 return '[la scorsa] dddd [alle] LT'; 16693 default: 16694 return '[lo scorso] dddd [alle] LT'; 16695 } 16696 }, 16697 sameElse: 'L', 16698 }, 16699 relativeTime: { 16700 future: function (s) { 16701 return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; 16702 }, 16703 past: '%s fa', 16704 s: 'alcuni secondi', 16705 ss: '%d secondi', 16706 m: 'un minuto', 16707 mm: '%d minuti', 16708 h: "un'ora", 16709 hh: '%d ore', 16710 d: 'un giorno', 16711 dd: '%d giorni', 16712 M: 'un mese', 16713 MM: '%d mesi', 16714 y: 'un anno', 16715 yy: '%d anni', 16716 }, 16717 dayOfMonthOrdinalParse: /\d{1,2}º/, 16718 ordinal: '%dº', 16719 week: { 16720 dow: 1, // Monday is the first day of the week. 16721 doy: 4, // The week that contains Jan 4th is the first week of the year. 16722 }, 16723 }); 16724 16725 //! moment.js locale configuration 16726 16727 hooks.defineLocale('it', { 16728 months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( 16729 '_' 16730 ), 16731 monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), 16732 weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( 16733 '_' 16734 ), 16735 weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), 16736 weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), 16737 longDateFormat: { 16738 LT: 'HH:mm', 16739 LTS: 'HH:mm:ss', 16740 L: 'DD/MM/YYYY', 16741 LL: 'D MMMM YYYY', 16742 LLL: 'D MMMM YYYY HH:mm', 16743 LLLL: 'dddd D MMMM YYYY HH:mm', 16744 }, 16745 calendar: { 16746 sameDay: function () { 16747 return ( 16748 '[Oggi a' + 16749 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 16750 ']LT' 16751 ); 16752 }, 16753 nextDay: function () { 16754 return ( 16755 '[Domani a' + 16756 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 16757 ']LT' 16758 ); 16759 }, 16760 nextWeek: function () { 16761 return ( 16762 'dddd [a' + 16763 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 16764 ']LT' 16765 ); 16766 }, 16767 lastDay: function () { 16768 return ( 16769 '[Ieri a' + 16770 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 16771 ']LT' 16772 ); 16773 }, 16774 lastWeek: function () { 16775 switch (this.day()) { 16776 case 0: 16777 return ( 16778 '[La scorsa] dddd [a' + 16779 (this.hours() > 1 16780 ? 'lle ' 16781 : this.hours() === 0 16782 ? ' ' 16783 : "ll'") + 16784 ']LT' 16785 ); 16786 default: 16787 return ( 16788 '[Lo scorso] dddd [a' + 16789 (this.hours() > 1 16790 ? 'lle ' 16791 : this.hours() === 0 16792 ? ' ' 16793 : "ll'") + 16794 ']LT' 16795 ); 16796 } 16797 }, 16798 sameElse: 'L', 16799 }, 16800 relativeTime: { 16801 future: 'tra %s', 16802 past: '%s fa', 16803 s: 'alcuni secondi', 16804 ss: '%d secondi', 16805 m: 'un minuto', 16806 mm: '%d minuti', 16807 h: "un'ora", 16808 hh: '%d ore', 16809 d: 'un giorno', 16810 dd: '%d giorni', 16811 w: 'una settimana', 16812 ww: '%d settimane', 16813 M: 'un mese', 16814 MM: '%d mesi', 16815 y: 'un anno', 16816 yy: '%d anni', 16817 }, 16818 dayOfMonthOrdinalParse: /\d{1,2}º/, 16819 ordinal: '%dº', 16820 week: { 16821 dow: 1, // Monday is the first day of the week. 16822 doy: 4, // The week that contains Jan 4th is the first week of the year. 16823 }, 16824 }); 16825 16826 //! moment.js locale configuration 16827 16828 hooks.defineLocale('ja', { 16829 eras: [ 16830 { 16831 since: '2019-05-01', 16832 offset: 1, 16833 name: '令å', 16834 narrow: 'ã¿', 16835 abbr: 'R', 16836 }, 16837 { 16838 since: '1989-01-08', 16839 until: '2019-04-30', 16840 offset: 1, 16841 name: 'å¹³æ', 16842 narrow: 'ã»', 16843 abbr: 'H', 16844 }, 16845 { 16846 since: '1926-12-25', 16847 until: '1989-01-07', 16848 offset: 1, 16849 name: 'æå', 16850 narrow: 'ã¼', 16851 abbr: 'S', 16852 }, 16853 { 16854 since: '1912-07-30', 16855 until: '1926-12-24', 16856 offset: 1, 16857 name: '大æ£', 16858 narrow: 'ã½', 16859 abbr: 'T', 16860 }, 16861 { 16862 since: '1873-01-01', 16863 until: '1912-07-29', 16864 offset: 6, 16865 name: 'ææ²»', 16866 narrow: 'ã¾', 16867 abbr: 'M', 16868 }, 16869 { 16870 since: '0001-01-01', 16871 until: '1873-12-31', 16872 offset: 1, 16873 name: '西æ¦', 16874 narrow: 'AD', 16875 abbr: 'AD', 16876 }, 16877 { 16878 since: '0000-12-31', 16879 until: -Infinity, 16880 offset: 1, 16881 name: 'ç´å å', 16882 narrow: 'BC', 16883 abbr: 'BC', 16884 }, 16885 ], 16886 eraYearOrdinalRegex: /(å |\d+)å¹´/, 16887 eraYearOrdinalParse: function (input, match) { 16888 return match[1] === 'å ' ? 1 : parseInt(match[1] || input, 10); 16889 }, 16890 months: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 16891 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 16892 '_' 16893 ), 16894 weekdays: 'æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥'.split('_'), 16895 weekdaysShort: 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 16896 weekdaysMin: 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 16897 longDate
16897Format: { 16898 LT: 'HH:mm', 16899 LTS: 'HH:mm:ss', 16900 L: 'YYYY/MM/DD', 16901 LL: 'YYYYå¹´MæDæ¥', 16902 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 16903 LLLL: 'YYYYå¹´MæDæ¥ dddd HH:mm', 16904 l: 'YYYY/MM/DD', 16905 ll: 'YYYYå¹´MæDæ¥', 16906 lll: 'YYYYå¹´MæDæ¥ HH:mm', 16907 llll: 'YYYYå¹´MæDæ¥(ddd) HH:mm', 16908 }, 16909 meridiemParse: /åå|åå¾/i, 16910 isPM: function (input) { 16911 return input === 'åå¾'; 16912 }, 16913 meridiem: function (hour, minute, isLower) { 16914 if (hour < 12) { 16915 return 'åå'; 16916 } else { 16917 return 'åå¾'; 16918 } 16919 }, 16920 calendar: { 16921 sameDay: '[仿¥] LT', 16922 nextDay: '[ææ¥] LT', 16923 nextWeek: function (now) { 16924 if (now.week() !== this.week()) { 16925 return '[æ¥é±]dddd LT'; 16926 } else { 16927 return 'dddd LT'; 16928 } 16929 }, 16930 lastDay: '[æ¨æ¥] LT', 16931 lastWeek: function (now) { 16932 if (this.week() !== now.week()) { 16933 return '[å é±]dddd LT'; 16934 } else { 16935 return 'dddd LT'; 16936 } 16937 }, 16938 sameElse: 'L', 16939 }, 16940 dayOfMonthOrdinalParse: /\d{1,2}æ¥/, 16941 ordinal: function (number, period) { 16942 switch (period) { 16943 case 'y': 16944 return number === 1 ? 'å å¹´' : number + 'å¹´'; 16945 case 'd': 16946 case 'D': 16947 case 'DDD': 16948 return number + 'æ¥'; 16949 default: 16950 return number; 16951 } 16952 }, 16953 relativeTime: { 16954 future: '%så¾', 16955 past: '%så', 16956 s: 'æ°ç§', 16957 ss: '%dç§', 16958 m: '1å', 16959 mm: '%då', 16960 h: '1æé', 16961 hh: '%dæé', 16962 d: '1æ¥', 16963 dd: '%dæ¥', 16964 M: '1ã¶æ', 16965 MM: '%dã¶æ', 16966 y: '1å¹´', 16967 yy: '%då¹´', 16968 }, 16969 }); 16970 16971 //! moment.js locale configuration 16972 16973 hooks.defineLocale('jv', { 16974 months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( 16975 '_' 16976 ), 16977 monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), 16978 weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), 16979 weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), 16980 weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), 16981 longDateFormat: { 16982 LT: 'HH.mm', 16983 LTS: 'HH.mm.ss', 16984 L: 'DD/MM/YYYY', 16985 LL: 'D MMMM YYYY', 16986 LLL: 'D MMMM YYYY [pukul] HH.mm', 16987 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 16988 }, 16989 meridiemParse: /enjing|siyang|sonten|ndalu/, 16990 meridiemHour: function (hour, meridiem) { 16991 if (hour === 12) { 16992 hour = 0; 16993 } 16994 if (meridiem === 'enjing') { 16995 return hour; 16996 } else if (meridiem === 'siyang') { 16997 return hour >= 11 ? hour : hour + 12; 16998 } else if (meridiem === 'sonten' || meridiem === 'ndalu') { 16999 return hour + 12; 17000 } 17001 }, 17002 meridiem: function (hours, minutes, isLower) { 17003 if (hours < 11) { 17004 return 'enjing'; 17005 } else if (hours < 15) { 17006 return 'siyang'; 17007 } else if (hours < 19) { 17008 return 'sonten'; 17009 } else { 17010 return 'ndalu'; 17011 } 17012 }, 17013 calendar: { 17014 sameDay: '[Dinten puniko pukul] LT', 17015 nextDay: '[Mbenjang pukul] LT', 17016 nextWeek: 'dddd [pukul] LT', 17017 lastDay: '[Kala wingi pukul] LT', 17018 lastWeek: 'dddd [kepengker pukul] LT', 17019 sameElse: 'L', 17020 }, 17021 relativeTime: { 17022 future: 'wonten ing %s', 17023 past: '%s ingkang kepengker', 17024 s: 'sawetawis detik', 17025 ss: '%d detik', 17026 m: 'setunggal menit', 17027 mm: '%d menit', 17028 h: 'setunggal jam', 17029 hh: '%d jam', 17030 d: 'sedinten', 17031 dd: '%d dinten', 17032 M: 'sewulan', 17033 MM: '%d wulan', 17034 y: 'setaun', 17035 yy: '%d taun', 17036 }, 17037 week: { 17038 dow: 1, // Monday is the first day of the week. 17039 doy: 7, // The week that contains Jan 7th is the first week of the year. 17040 }, 17041 }); 17042 17043 //! moment.js locale configuration 17044 17045 hooks.defineLocale('ka', { 17046 months: 'áááááá á_ááááá áááá_ááá á¢á_ááá ááá_áááá¡á_ááááá¡á_ááááá¡á_ááááá¡á¢á_á¡áá¥á¢ááááá á_áá¥á¢ááááá á_ááááááá á_áááááááá á'.split( 17047 '_' 17048 ), 17049 monthsShort: 'ááá_ááá_ááá _ááá _ááá_ááá_ááá_ááá_á¡áá¥_áá¥á¢_ááá_ááá'.split('_'), 17050 weekdays: { 17051 standalone: 17052 'áááá á_áá á¨ááááá_á¡ááá¨ááááá_ááá®á¨ááááá_á®á£áá¨ááááá_ááá áá¡áááá_á¨ááááá'.
17052split( 17053 '_' 17054 ), 17055 format: 'áááá áá¡_áá á¨ááááá¡_á¡ááá¨ááááá¡_ááá®á¨ááááá¡_á®á£áá¨ááááá¡_ááá áá¡áááá¡_á¨ááááá¡'.split( 17056 '_' 17057 ), 17058 isFormat: /(á¬ááá|á¨ááááá)/, 17059 }, 17060 weekdaysShort: 'ááá_áá á¨_á¡áá_ááá®_á®á£á_ááá _á¨áá'.split('_'), 17061 weekdaysMin: 'áá_áá _á¡á_áá_á®á£_áá_á¨á'.split('_'), 17062 longDateFormat: { 17063 LT: 'HH:mm', 17064 LTS: 'HH:mm:ss', 17065 L: 'DD/MM/YYYY', 17066 LL: 'D MMMM YYYY', 17067 LLL: 'D MMMM YYYY HH:mm', 17068 LLLL: 'dddd, D MMMM YYYY HH:mm', 17069 }, 17070 calendar: { 17071 sameDay: '[áá¦áá¡] LT[-áá]', 17072 nextDay: '[á®ááá] LT[-áá]', 17073 lastDay: '[áá£á¨áá] LT[-áá]', 17074 nextWeek: '[á¨ááááá] dddd LT[-áá]', 17075 lastWeek: '[á¬ááá] dddd LT-áá', 17076 sameElse: 'L', 17077 }, 17078 relativeTime: { 17079 future: function (s) { 17080 return s.replace( 17081 /(á¬áá|á¬á£á|á¡ááá|á¬áá|áá¦|áá)(á|á)/, 17082 function ($0, $1, $2) { 17083 return $2 === 'á' ? $1 + 'á¨á' : $1 + $2 + 'á¨á'; 17084 } 17085 ); 17086 }, 17087 past: function (s) { 17088 if (/(á¬ááá|á¬á£áá|á¡áááá|áá¦á|ááá)/.test(s)) { 17089 return s.replace(/(á|á)$/, 'áá¡ á¬áá'); 17090 } 17091 if (/á¬ááá/.test(s)) { 17092 return s.replace(/á¬ááá$/, 'á¬ááá¡ á¬áá'); 17093 } 17094 return s; 17095 }, 17096 s: 'á áááááááá á¬ááá', 17097 ss: '%d á¬ááá', 17098 m: 'á¬á£áá', 17099 mm: '%d á¬á£áá', 17100 h: 'á¡áááá', 17101 hh: '%d á¡áááá', 17102 d: 'áá¦á', 17103 dd: '%d áá¦á', 17104 M: 'ááá', 17105 MM: '%d ááá', 17106 y: 'á¬ááá', 17107 yy: '%d á¬ááá', 17108 }, 17109 dayOfMonthOrdinalParse: /0|1-áá|áá-\d{1,2}|\d{1,2}-á/, 17110 ordinal: function (number) { 17111 if (number === 0) { 17112 return number; 17113 } 17114 if (number === 1) { 17115 return number + '-áá'; 17116 } 17117 if ( 17118 number < 20 || 17119 (number <= 100 && number % 20 === 0) || 17120 number % 100 === 0 17121 ) { 17122 return 'áá-' + number; 17123 } 17124 return number + '-á'; 17125 }, 17126 week: { 17127 dow: 1, 17128 doy: 7, 17129 }, 17130 }); 17131 17132 //! moment.js locale configuration 17133 17134 var suffixes$1 = { 17135 0: '-ÑÑ', 17136 1: '-ÑÑ', 17137 2: '-ÑÑ', 17138 3: '-ÑÑ', 17139 4: '-ÑÑ', 17140 5: '-ÑÑ', 17141 6: '-ÑÑ', 17142 7: '-ÑÑ', 17143 8: '-ÑÑ', 17144 9: '-ÑÑ', 17145 10: '-ÑÑ', 17146 20: '-ÑÑ', 17147 30: '-ÑÑ', 17148 40: '-ÑÑ', 17149 50: '-ÑÑ', 17150 60: '-ÑÑ', 17151 70: '-ÑÑ', 17152 80: '-ÑÑ', 17153 90: '-ÑÑ', 17154 100: '-ÑÑ', 17155 }; 17156 17157 hooks.defineLocale('kk', { 17158 months: 'ÒаңÑаÑ_аÒпан_наÑÑÑз_ÑÓÑÑÑ_мамÑÑ_маÑÑÑм_ÑÑлде_ÑамÑз_ÒÑÑкүйек_Òазан_ÒаÑаÑа_желÑоÒÑан'.split( 17159 '_' 17160 ), 17161 monthsShort: 'Òаң_аÒп_наÑ_ÑÓÑ_мам_маÑ_ÑÑл_Ñам_ÒÑÑ_Òаз_ÒаÑ_жел'.split('_'), 17162 weekdays: 'жекÑенбÑ_дүйÑенбÑ_ÑейÑенбÑ_ÑÓÑÑенбÑ_бейÑенбÑ_жұма_ÑенбÑ'.split( 17163 '_' 17164 ), 17165 weekdaysShort: 'жек_дүй_Ñей_ÑÓÑ_бей_жұм_Ñен'.split('_'), 17166 weekdaysMin: 'жк_дй_Ñй_ÑÑ_бй_жм_Ñн'.split('_'), 17167 longDateFormat: { 17168 LT: 'HH:mm', 17169 LTS: 'HH:mm:ss', 17170 L: 'DD.MM.YYYY', 17171 LL: 'D MMMM YYYY', 17172 LLL: 'D MMMM YYYY HH:mm', 17173 LLLL: 'dddd, D MMMM YYYY HH:mm', 17174 }, 17175 calendar: { 17176 sameDay: '[ÐүгÑн ÑаÒаÑ] LT', 17177 nextDay: '[ÐÑÑең ÑаÒаÑ] LT', 17178 nextWeek: 'dddd [ÑаÒаÑ] LT', 17179 lastDay: '[ÐеÑе ÑаÒаÑ] LT', 17180 lastWeek: '[Ó¨Ñкен апÑанÑÒ£] dddd [ÑаÒаÑ] LT', 17181 sameElse: 'L', 17182 }, 17183 relativeTime: { 17184 future: '%s ÑÑÑнде', 17185 past: '%s бұÑÑн', 17186 s: 'бÑÑнеÑе ÑекÑнд', 17187 ss: '%d ÑекÑнд', 17188 m: 'бÑÑ Ð¼Ð¸Ð½ÑÑ', 17189 mm: '%d минÑÑ', 17190 h: 'бÑÑ ÑаÒаÑ', 17191 hh: '%d ÑаÒаÑ', 17192 d: 'бÑÑ ÐºÒ¯Ð½', 17193 dd: '%d күн', 17194 M: 'бÑÑ Ð°Ð¹', 17195 MM: '%d ай', 17196 y: 'бÑÑ Ð¶Ñл', 17197 yy: '%d жÑл', 17198 }, 17199 dayOfMonthOrdinalParse: /\d{1,2}-(ÑÑ|ÑÑ)/, 17200 ordinal: function (number) { 17201 var a = number % 10, 17202 b = number >= 100 ? 100 : null; 17203 return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); 17204 }, 17205 week: { 17206 dow: 1, // Monday is the first day of the week. 17207 doy: 7, // The week that contains Jan 7th is the first week of the year. 17208 }, 17209 }); 17210 17211 //! moment.js locale configuration 17212 17213 var symbolMap$9 = { 17214 1: 'á¡', 17215 2: 'á¢', 17216 3: 'á£', 17217 4: 'á¤', 17218 5: 'á¥', 17219 6: 'á¦', 17220 7: 'á§', 17221 8: 'á¨', 17222 9: 'á©', 17223 0: 'á ', 17224 }, 17225 numberMap$8 = { 17226 'á¡': '1', 17227 'á¢': '2', 17228 'á£': '3', 17229 'á¤': '4', 17230 'á¥': '5', 17231 'á¦': '6', 17232 'á§': '7', 17233 'á¨': '8', 17234 'á©': '9', 17235 'á ': '0', 17236 }; 17237 17238 hooks.defineLocale('km', { 17239 months: 'áááá¶_áá»áááá_áá¸áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split( 17240 '_' 17241 ), 17242 monthsShort: 17243 'áááá¶_áá»áááá_áá¸áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split( 17244 '_' 17245 ), 17246 weekdays: 'á¢á¶áá·ááá_á áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá áá'.split('_'), 17247 weekdaysShort: 'á¢á¶_á _á¢_á_ááá_áá»_á'.split('_'), 17248 weekdaysMin: 'á¢á¶_á _á¢_á_ááá_áá»_á'.split('_'), 17249 weekdaysParseExact: true, 17250 longDateFormat: { 17251 LT: 'HH:mm', 17252 LTS: 'HH:mm:ss', 17253 L: 'DD/MM/YYYY', 17254 LL: 'D MMMM YYYY', 17255 LLL: 'D MMMM YYYY HH:mm', 17256 LLLL: 'dddd, D MMMM YYYY HH:mm', 17257 }, 17258 meridiemParse: /áááá¹á|áááá¶á /, 17259 isPM: function (input) { 17260 return input === 'áááá¶á '; 17261 }, 17262 meridiem: function (hour, minute, isLower) { 17263 if (hour < 12) {
vendor: 22,558 bytes, lines 17264-17902
17264 return 'áááá¹á'; 17265 } else { 17266 return 'áááá¶á '; 17267 } 17268 }, 17269 calendar: { 17270 sameDay: '[ááááááá áááá] LT', 17271 nextDay: '[ááá¢áá áááá] LT', 17272 nextWeek: 'dddd [áááá] LT', 17273 lastDay: '[áááá·ááá·á áááá] LT', 17274 lastWeek: 'dddd [ááááá¶á ááá»á] [áááá] LT', 17275 sameElse: 'L', 17276 }, 17277 relativeTime: { 17278 future: '%sááá', 17279 past: '%sáá»á', 17280 s: 'ááá»áááá¶ááá·áá¶áá¸', 17281 ss: '%d áá·áá¶áá¸', 17282 m: 'áá½ááá¶áá¸', 17283 mm: '%d áá¶áá¸', 17284 h: 'áá½ááááá', 17285 hh: '%d áááá', 17286 d: 'áá½ááááá', 17287 dd: '%d áááá', 17288 M: 'áá½ááá', 17289 MM: '%d áá', 17290 y: 'áá½ááááá¶á', 17291 yy: '%d áááá¶á', 17292 }, 17293 dayOfMonthOrdinalParse: /áá¸\d{1,2}/, 17294 ordinal: 'áá¸%d', 17295 preparse: function (string) { 17296 return string.replace(/[á¡á¢á£á¤á¥á¦á§á¨á©á ]/g, function (match) { 17297 return numberMap$8[match]; 17298 }); 17299 }, 17300 postformat: function (string) { 17301 return string.replace(/\d/g, function (match) { 17302 return symbolMap$9[match]; 17303 }); 17304 }, 17305 week: { 17306 dow: 1, // Monday is the first day of the week. 17307 doy: 4, // The week that contains Jan 4th is the first week of the year. 17308 }, 17309 }); 17310 17311 //! moment.js locale configuration 17312 17313 var symbolMap$a = { 17314 1: 'à³§', 17315 2: '೨', 17316 3: '೩', 17317 4: '೪', 17318 5: '೫', 17319 6: '೬', 17320 7: 'à³', 17321 8: 'à³®', 17322 9: '೯', 17323 0: '೦', 17324 }, 17325 numberMap$9 = { 17326 'à³§': '1', 17327 '೨': '2', 17328 '೩': '3', 17329 '೪': '4', 17330 '೫': '5', 17331 '೬': '6', 17332 'à³': '7', 17333 'à³®': '8', 17334 '೯': '9', 17335 '೦': '0', 17336 }; 17337 17338 hooks.defineLocale('kn', { 17339 months: 'à²à²¨à²µà²°à²¿_ಫà³à²¬à³à²°à²µà²°à²¿_ಮಾರà³à²à³_à²à²ªà³à²°à²¿à²²à³_ಮà³à³_à²à³à²¨à³_à²à³à²²à³à³_à²à²à²¸à³à²à³_ಸà³à²ªà³à²à³à²à²¬à²°à³_ಠà²à³à²à³à³à³à²¬à²°à³_ನವà³à²à²¬à²°à³_ಡಿಸà³à²à²¬à²°à³'.split( 17340 '_' 17341 ), 17342 monthsShort: 17343 'à²à²¨_ಫà³à²¬à³à²°_ಮಾರà³à²à³_à²à²ªà³à²°à²¿à²²à³_ಮà³à³_à²à³à²¨à³_à²à³à²²à³à³_à²à²à²¸à³à²à³_ಸà³à²ªà³à²à³à²_ಠà²à³à²à³à³à³_ನವà³à²_ಡಿಸà³à²'.split( 17344 '_' 17345 ), 17346 monthsParseExact: true, 17347 weekdays: 'à²à²¾à²¨à³à²µà²¾à²°_ಸà³à³à³à²®à²µà²¾à²°_ಮà²à²à²³à²µà²¾à²°_ಬà³à²§à²µà²¾à²°_à²à³à²°à³à²µà²¾à²°_ಶà³à²à³à²°à²µà²¾à²°_ಶನಿವಾರ'.split( 17348 '_' 17349 ), 17350 weekdaysShort: 'à²à²¾à²¨à³_ಸà³à³à³à²®_ಮà²à²à²³_ಬà³à²§_à²à³à²°à³_ಶà³à²à³à²°_ಶನಿ'.split('_'), 17351 weekdaysMin: 'à²à²¾_ಸà³à³à³_ಮà²_ಬà³_à²à³_ಶà³_ಶ'.split('_'), 17352 longDateFormat: { 17353 LT: 'A h:mm', 17354 LTS: 'A h:mm:ss', 17355 L: 'DD/MM/YYYY', 17356 LL: 'D MMMM YYYY', 17357 LLL: 'D MMMM YYYY, A h:mm', 17358 LLLL: 'dddd, D MMMM YYYY, A h:mm', 17359 }, 17360 calendar: { 17361 sameDay: '[à²à²à²¦à³] LT', 17362 nextDay: '[ನಾಳà³] LT', 17363 nextWeek: 'dddd, LT', 17364 lastDay: '[ನಿನà³à²¨à³] LT', 17365 lastWeek: '[à²à³à³à²¨à³à²¯] dddd, LT', 17366 sameElse: 'L', 17367 }, 17368 relativeTime: { 17369 future: '%s ನà²à²¤à²°', 17370 past: '%s ಹಿà²à²¦à³', 17371 s: 'à²à³à²²à²µà³ à²à³à²·à²£à²à²³à³', 17372 ss: '%d ಸà³à²à³à²à²¡à³à²à²³à³', 17373 m: 'à²à²à²¦à³ ನಿಮಿಷ', 17374 mm: '%d ನಿಮಿಷ', 17375 h: 'à²à²à²¦à³ à²à²à²à³', 17376 hh: '%d à²à²à²à³', 17377 d: 'à²à²à²¦à³ ದಿನ', 17378 dd: '%d ದಿನ', 17379 M: 'à²à²à²¦à³ ತಿà²à²à²³à³', 17380 MM: '%d ತಿà²à²à²³à³', 17381 y: 'à²à²à²¦à³ ವರà³à²·', 17382 yy: '%d ವರà³à²·', 17383 }, 17384 preparse: function (string) { 17385 return string.replace(/[೧೨೩೪೫೬à³à³®à³¯à³¦]/g, function (match) { 17386 return numberMap$9[match]; 17387 }); 17388 }, 17389 postformat: function (string) { 17390 return string.replace(/\d/g, function (match) { 17391 return symbolMap$a[match]; 17392 }); 17393 }, 17394 meridiemParse: /ರಾತà³à²°à²¿|ಬà³à²³à²¿à²à³à²à³|ಮಧà³à²¯à²¾à²¹à³à²¨|ಸà²à²à³/, 17395 meridiemHour: function (hour, meridiem) { 17396 if (hour === 12) { 17397 hour = 0; 17398 } 17399 if (meridiem === 'ರಾತà³à²°à²¿') { 17400 return hour < 4 ? hour : hour + 12; 17401 } else if (meridiem === 'ಬà³à²³à²¿à²à³à²à³') { 17402 return hour; 17403 } else if (meridiem === 'ಮಧà³à²¯à²¾à²¹à³à²¨') { 17404 return hour >= 10 ? hour : hour + 12; 17405 } else if (meridiem === 'ಸà²à²à³') { 17406 return hour + 12; 17407 } 17408 }, 17409 meridiem: function (hour, minute, isLower) { 17410 if (hour < 4) { 17411 return 'ರಾತà³à²°à²¿'; 17412 } else if (hour < 10) { 17413 return 'ಬà³à²³à²¿à²à³à²à³'; 17414 } else if (hour < 17) { 17415 return 'ಮಧà³à²¯à²¾à²¹à³à²¨'; 17416 } else if (hour < 20) { 17417 return 'ಸà²à²à³'; 17418 } else { 17419 return 'ರಾತà³à²°à²¿'; 17420 } 17421 }, 17422 dayOfMonthOrdinalParse: /\d{1,2}(ನà³à³)/, 17423 ordinal: function (number) { 17424 return number + 'ನà³à³'; 17425 }, 17426 week: { 17427 dow: 0, // Sunday is the first day of the week. 17428 doy: 6, // The week that contains Jan 6th is the first week of the year. 17429 }, 17430 }); 17431 17432 //! moment.js locale configuration 17433 17434 hooks.defineLocale('ko', { 17435 months: '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'), 17436 monthsShort: '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split( 17437 '_' 17438 ), 17439 weekdays: 'ì¼ìì¼_ììì¼_íìì¼_ììì¼_목ìì¼_ê¸ìì¼_í ìì¼'.split('_'), 17440 weekdaysShort: 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 17441 weekdaysMin: 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 17442 longDateFormat: { 17443 LT: 'A h:mm', 17444 LTS: 'A h:mm:ss', 17445 L: 'YYYY.MM.DD.', 17446 LL: 'YYYYë MMMM Dì¼', 17447 LLL: 'YYYYë MMMM Dì¼ A h:mm', 17448 LLLL: 'YYYYë MMMM Dì¼ dddd A h:mm', 17449 l: 'YYYY.MM.DD.', 17450 ll: 'YYYYë MMMM Dì¼', 17451 lll: 'YYYYë MMMM Dì¼ A h:mm', 17452 llll: 'YYYYë MMMM Dì¼ dddd A h:mm', 17453 }, 17454 calendar: { 17455 sameDay: 'ì¤ë LT', 17456 nextDay: 'ë´ì¼ LT', 17457 nextWeek: 'dddd LT', 17458 lastDay: 'ì´ì LT', 17459 lastWeek: 'ì§ë주 dddd LT', 17460 sameElse: 'L', 17461 }, 17462 relativeTime: { 17463 future: '%s í', 17464 past: '%s ì ', 17465 s: 'ëª ì´', 17466 ss: '%dì´', 17467 m: '1ë¶', 17468 mm: '%dë¶', 17469 h: 'í ìê°', 17470 hh: '%dìê°', 17471 d: 'í루', 17472 dd: '%dì¼', 17473 M: 'í ë¬', 17474 MM: '%dë¬', 17475 y: 'ì¼ ë ', 17476 yy: '%dë ', 17477 }, 17478 dayOfMonthOrdinalParse: /\d{1,2}(ì¼|ì|주)/, 17479 ordinal: function (number, period) { 17480 switch (period) { 17481 case 'd': 17482 case 'D': 17483 case 'DDD': 17484 return number + 'ì¼'; 17485 case 'M': 17486 return number + 'ì'; 17487 case 'w': 17488 case 'W': 17489 return number + '주'; 17490 default: 17491 return number; 17492 } 17493 }, 17494 meridiemParse: /ì¤ì |ì¤í/, 17495 isPM: function (token) { 17496 return token === 'ì¤í'; 17497 }, 17498 meridiem: function (hour, minute, isUpper) { 17499 return hour < 12 ? 'ì¤ì ' : 'ì¤í'; 17500 }, 17501 }); 17502 17503 //! moment.js locale configuration 17504 17505 var symbolMap$b = { 17506 1: 'Ù¡', 17507 2: 'Ù¢', 17508 3: 'Ù£', 17509 4: 'Ù¤', 17510 5: 'Ù¥', 17511 6: 'Ù¦', 17512 7: 'Ù§', 17513 8: 'Ù¨', 17514 9: 'Ù©', 17515 0: 'Ù ', 17516 }, 17517 numberMap$a = { 17518 'Ù¡': '1', 17519 'Ù¢': '2', 17520 'Ù£': '3', 17521 'Ù¤': '4', 17522 'Ù¥': '5', 17523 'Ù¦': '6', 17524 'Ù§': '7', 17525 'Ù¨': '8', 17526 'Ù©': '9', 17527 'Ù ': '0', 17528 }, 17529 months$8 = [ 17530 'کاÙÙÙÛ Ø¯ÙÙÛÙ ', 17531 'Ø´ÙØ¨Ø§Øª', 17532 'ئازار', 17533 'ÙÛØ³Ø§Ù', 17534 'Ø¦Ø§ÛØ§Ø±', 17535 'ØÙزÛÛØ±Ø§Ù', 17536 'تÛÙ Ù ÙØ²', 17537 'ئاب', 17538 'ئÛÛÙÙÙÙ', 17539 'تشرÛÙÛ ÛÛÙÛÙ ', 17540 'تشرÛÙÛ Ø¯ÙÙÛÙ ', 17541 'ÙØ§ÙÙÙÛ ÛÛÚ©ÛÙ ', 17542 ]; 17543 17544 hooks.defineLocale('ku', { 17545 months: months$8, 17546 monthsShort: months$8, 17547 weekdays: 17548 'ÛÙâÙØ´ÙâÙ Ù Ùâ_دÙÙØ´ÙâÙ Ù Ùâ_Ø³ÛØ´ÙâÙ Ù Ùâ_ÚÙØ§Ø±Ø´ÙâÙ Ù Ùâ_Ù¾ÛÙØ¬Ø´ÙâÙ Ù Ùâ_ÙÙâÛÙÛ_Ø´ÙâÙ Ù Ùâ'.split( 17549 '_' 17550 ), 17551 weekdaysShort: 17552 'ÛÙâÙØ´ÙâÙ _دÙÙØ´ÙâÙ _Ø³ÛØ´ÙâÙ _ÚÙØ§Ø±Ø´ÙâÙ _Ù¾ÛÙØ¬Ø´ÙâÙ _ÙÙâÛÙÛ_Ø´ÙâÙ Ù Ùâ'.split('_'), 17553 weekdaysMin: 'Û_د_س_Ú_Ù¾_Ù_Ø´'.split('_'), 17554 weekdaysParseExact: true, 17555 longDateFormat: { 17556 LT: 'HH:mm', 17557 LTS: 'HH:mm:ss', 17558 L: 'DD/MM/YYYY', 17559 LL: 'D MMMM YYYY', 17560 LLL: 'D MMMM YYYY HH:mm', 17561 LLLL: 'dddd, D MMMM YYYY HH:mm', 17562 }, 17563 meridiemParse: /ئÛÙØ§Ø±Ùâ|بÙâÛØ§ÙÛ/, 17564 isPM: function (input) { 17565 return /ئÛÙØ§Ø±Ùâ/.test(input); 17566 }, 17567 meridiem: function (hour, minute, isLower) { 17568 if (hour < 12) { 17569 return 'بÙâÛØ§ÙÛ'; 17570 } else { 17571 return 'ئÛÙØ§Ø±Ùâ'; 17572 } 17573 }, 17574 calendar: { 17575 sameDay: '[ئÙâÙ Ø±Û ÙØ§ØªÚÙ ÛØ±] LT', 17576 nextDay: '[بÙâÛØ§ÙÛ ÙØ§ØªÚÙ ÛØ±] LT', 17577 nextWeek: 'dddd [ÙØ§ØªÚÙ ÛØ±] LT', 17578 lastDay: '[دÙÛÙÛ ÙØ§ØªÚÙ ÛØ±] LT', 17579 lastWeek: 'dddd [ÙØ§ØªÚÙ ÛØ±] LT', 17580 sameElse: 'L', 17581 }, 17582 relativeTime: { 17583 future: 'ÙÙâ %s', 17584 past: '%s', 17585 s: 'ÚÙâÙØ¯ ÚØ±ÙÙâÛÙâÙ', 17586 ss: 'ÚØ±ÙÙâ %d', 17587 m: 'ÛÙâÙ Ø®ÙÙÙâÙ', 17588 mm: '%d Ø®ÙÙÙâÙ', 17589 h: 'ÛÙâÙ ÙØ§ØªÚÙ ÛØ±', 17590 hh: '%d ÙØ§ØªÚÙ ÛØ±', 17591 d: 'ÛÙâÙ ÚÛÚ', 17592 dd: '%d ÚÛÚ', 17593 M: 'ÛÙâ٠٠اÙÚ¯', 17594 MM: '%d ٠اÙÚ¯', 17595 y: 'ÛÙâ٠ساڵ', 17596 yy: '%d ساڵ', 17597 }, 17598 preparse: function (string) { 17599 return string 17600 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 17601 return numberMap$a[match]; 17602 }) 17603 .replace(/Ø/g, ','); 17604 }, 17605 postformat: function (string) { 17606 return string 17607 .replace(/\d/g, function (match) { 17608 return symbolMap$b[match]; 17609 }) 17610 .replace(/,/g, 'Ø'); 17611 }, 17612 week: { 17613 dow: 6, // Saturday is the first day of the week. 17614 doy: 12, // The week that contains Jan 12th is the first week of the year. 17615 }, 17616 }); 17617 17618 //! moment.js locale configuration 17619 17620 var suffixes$2 = { 17621 0: '-ÑÒ¯', 17622 1: '-Ñи', 17623 2: '-Ñи', 17624 3: '-ÑÒ¯', 17625 4: '-ÑÒ¯', 17626 5: '-Ñи', 17627 6: '-ÑÑ', 17628 7: '-Ñи', 17629 8: '-Ñи', 17630 9: '-ÑÑ', 17631 10: '-ÑÑ', 17632 20: '-ÑÑ', 17633 30: '-ÑÑ', 17634 40: '-ÑÑ', 17635 50: '-ÑÒ¯', 17636 60: '-ÑÑ', 17637 70: '-Ñи', 17638 80: '-Ñи', 17639 90: '-ÑÑ', 17640 100: '-ÑÒ¯', 17641 }; 17642 17643 hooks.defineLocale('ky', { 17644 months: 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 17645 '_' 17646 ), 17647 monthsShort: 'Ñнв_Ñев_маÑÑ_апÑ_май_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split( 17648 '_' 17649 ), 17650 weekdays: 'ÐекÑемби_ÐүйÑөмбү_ШейÑемби_ШаÑÑемби_ÐейÑемби_ÐÑма_ÐÑемби'.split( 17651 '_' 17652 ), 17653 weekdaysShort: 'Ðек_Ðүй_Шей_ШаÑ_Ðей_ÐÑм_ÐÑе'.split('_'), 17654 weekdaysMin: 'Ðк_Ðй_Шй_ШÑ_Ðй_Ðм_ÐÑ'.split('_'), 17655 longDateFormat: { 17656 LT: 'HH:mm', 17657 LTS: 'HH:mm:ss', 17658 L: 'DD.MM.YYYY', 17659 LL: 'D MMMM YYYY', 17660 LLL: 'D MMMM YYYY HH:mm', 17661 LLLL: 'dddd, D MMMM YYYY HH:mm', 17662 }, 17663 calendar: { 17664 sameDay: '[Ðүгүн ÑааÑ] LT', 17665 nextDay: '[ÐÑÑең ÑааÑ] LT', 17666 nextWeek: 'dddd [ÑааÑ] LT', 17667 lastDay: '[ÐеÑÑÑ ÑааÑ] LT', 17668 lastWeek: '[Ó¨Ñкөн апÑанÑн] dddd [күнү] [ÑааÑ] LT', 17669 sameElse: 'L', 17670 }, 17671 relativeTime: { 17672 future: '%s иÑинде', 17673 past: '%s мÑÑÑн', 17674 s: 'биÑнеÑе ÑекÑнд', 17675 ss: '%d ÑекÑнд', 17676 m: 'Ð±Ð¸Ñ Ð¼Ò¯Ð½Ó©Ñ', 17677 mm: '%d мүнөÑ', 17678 h: 'Ð±Ð¸Ñ ÑааÑ', 17679 hh: '%d ÑааÑ', 17680 d: 'Ð±Ð¸Ñ ÐºÒ¯Ð½', 17681 dd: '%d күн', 17682 M: 'Ð±Ð¸Ñ Ð°Ð¹', 17683 MM: '%d ай', 17684 y: 'Ð±Ð¸Ñ Ð¶Ñл', 17685 yy: '%d жÑл', 17686 }, 17687 dayOfMonthOrdinalParse: /\d{1,2}-(Ñи|ÑÑ|ÑÒ¯|ÑÑ)/, 17688 ordinal: function (number) { 17689 var a = number % 10, 17690 b = number >= 100 ? 100 : null; 17691 return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); 17692 }, 17693 week: { 17694 dow: 1, // Monday is the first day of the week. 17695 doy: 7, // The week that contains Jan 7th is the first week of the year. 17696 }, 17697 }); 17698 17699 //! moment.js locale configuration 17700 17701 function processRelativeTime$6(number, withoutSuffix, key, isFuture) { 17702 var format = { 17703 m: ['eng Minutt', 'enger Minutt'], 17704 h: ['eng Stonn', 'enger Stonn'], 17705 d: ['een Dag', 'engem Dag'], 17706 M: ['ee Mount', 'engem Mount'], 17707 y: ['ee Joer', 'engem Joer'], 17708 }; 17709 return withoutSuffix ? format[key][0] : format[key][1]; 17710 } 17711 function processFutureTime(string) { 17712 var number = string.substr(0, string.indexOf(' ')); 17713 if (eifelerRegelAppliesToNumber(number)) { 17714 return 'a ' + string; 17715 } 17716 return 'an ' + string; 17717 } 17718 function processPastTime(string) { 17719 var number = string.substr(0, string.indexOf(' ')); 17720 if (eifelerRegelAppliesToNumber(number)) { 17721 return 'viru ' + string; 17722 } 17723 return 'virun ' + string; 17724 } 17725 /** 17726 * Returns true if the word before the given number loses the '-n' ending. 17727 * e.g. 'an 10 Deeg' but 'a 5 Deeg' 17728 * 17729 * @param number {integer} 17730 * @returns {boolean} 17731 */ 17732 function eifelerRegelAppliesToNumber(number) { 17733 number = parseInt(number, 10); 17734 if (isNaN(number)) { 17735 return false; 17736 } 17737 if (number < 0) { 17738 // Negative Number --> always true 17739 return true; 17740 } else if (number < 10) { 17741 // Only 1 digit 17742 if (4 <= number && number <= 7) { 17743 return true; 17744 } 17745 return false; 17746 } else if (number < 100) { 17747 // 2 digits 17748 var lastDigit = number % 10, 17749 firstDigit = number / 10; 17750 if (lastDigit === 0) { 17751 return eifelerRegelAppliesToNumber(firstDigit); 17752 } 17753 return eifelerRegelAppliesToNumber(lastDigit); 17754 } else if (number < 10000) { 17755 // 3 or 4 digits --> recursively check first digit 17756 while (number >= 10) { 17757 number = number / 10; 17758 } 17759 return eifelerRegelAppliesToNumber(number); 17760 } else { 17761 // Anything larger than 4 digits: recursively check first n-3 digits 17762 number = number / 1000; 17763 return eifelerRegelAppliesToNumber(number); 17764 } 17765 } 17766 17767 hooks.defineLocale('lb', { 17768 months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( 17769 '_' 17770 ), 17771 monthsShort: 17772 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( 17773 '_' 17774 ), 17775 monthsParseExact: true, 17776 weekdays: 17777 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( 17778 '_' 17779 ), 17780 weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), 17781 weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), 17782 weekdaysParseExact: true, 17783 longDateFormat: { 17784 LT: 'H:mm [Auer]', 17785 LTS: 'H:mm:ss [Auer]', 17786 L: 'DD.MM.YYYY', 17787 LL: 'D. MMMM YYYY', 17788 LLL: 'D. MMMM YYYY H:mm [Auer]', 17789 LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', 17790 }, 17791 calendar: { 17792 sameDay: '[Haut um] LT', 17793 sameElse: 'L', 17794 nextDay: '[Muer um] LT', 17795 nextWeek: 'dddd [um] LT', 17796 lastDay: '[Gëschter um] LT', 17797 lastWeek: function () { 17798 // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule 17799 switch (this.day()) { 17800 case 2: 17801 case 4: 17802 return '[Leschten] dddd [um] LT'; 17803 default: 17804 return '[Leschte] dddd [um] LT'; 17805 } 17806 }, 17807 }, 17808 relativeTime: { 17809 future: processFutureTime, 17810 past: processPastTime, 17811 s: 'e puer Sekonnen', 17812 ss: '%d Sekonnen', 17813 m: processRelativeTime$6, 17814 mm: '%d Minutten', 17815 h: processRelativeTime$6, 17816 hh: '%d Stonnen', 17817 d: processRelativeTime$6, 17818 dd: '%d Deeg', 17819 M: processRelativeTime$6, 17820 MM: '%d Méint', 17821 y: processRelativeTime$6, 17822 yy: '%d Joer', 17823 }, 17824 dayOfMonthOrdinalParse: /\d{1,2}\./, 17825 ordinal: '%d.', 17826 week: { 17827 dow: 1, // Monday is the first day of the week. 17828 doy: 4, // The week that contains Jan 4th is the first week of the year. 17829 }, 17830 }); 17831 17832 //! moment.js locale configuration 17833 17834 hooks.defineLocale('lo', { 17835 months: 'ມັàºàºàºàº_àºàº¸àº¡àºàº²_ມີàºàº²_à»àº¡àºªàº²_àºàº¶àºàºªàº°àºàº²_ມິàºàº¸àºàº²_àºà»àº¥àº°àºàº»àº_ສິàºàº«àº²_àºàº±àºàºàº²_àºàº¸àº¥àº²_àºàº°àºàº´àº_àºàº±àºàº§àº²'.split( 17836 '_' 17837 ), 17838 monthsShort: 17839 'ມັàºàºàºàº_àºàº¸àº¡àºàº²_ມີàºàº²_à»àº¡àºªàº²_àºàº¶àºàºªàº°àºàº²_ມິàºàº¸àºàº²_àºà»àº¥àº°àºàº»àº_ສິàºàº«àº²_àºàº±àºàºàº²_àºàº¸àº¥àº²_àºàº°àºàº´àº_àºàº±àºàº§àº²'.split( 17840 '_' 17841 ), 17842 weekdays: 'àºàº²àºàº´àº_àºàº±àº_àºàº±àºàºàº²àº_àºàº¸àº_àºàº°àº«àº±àº_ສຸàº_à»àºªàº»àº²'.split('_'), 17843 weekdaysShort: 'àºàº´àº_àºàº±àº_àºàº±àºàºàº²àº_àºàº¸àº_àºàº°àº«àº±àº_ສຸàº_à»àºªàº»àº²'.split('_'), 17844 weekdaysMin: 'àº_àº_àºàº_àº_àºàº«_ສàº_ສ'.split('_'), 17845 weekdaysParseExact: true, 17846 longDateFormat: { 17847 LT: 'HH:mm', 17848 LTS: 'HH:mm:ss', 17849 L: 'DD/MM/YYYY', 17850 LL: 'D MMMM YYYY', 17851 LLL: 'D MMMM YYYY HH:mm', 17852 LLLL: 'ວັàºdddd D MMMM YYYY HH:mm', 17853 }, 17854 meridiemParse: /àºàºàºà»àºàº»à»àº²|àºàºàºà»àº¥àº/, 17855 isPM: function (input) { 17856 return input === 'àºàºàºà»àº¥àº'; 17857 }, 17858 meridiem: function (hour, minute, isLower) { 17859 if (hour < 12) { 17860 return 'àºàºàºà»àºàº»à»àº²'; 17861 } else { 17862 return 'àºàºàºà»àº¥àº'; 17863 } 17864 }, 17865 calendar: { 17866 sameDay: '[ມືà»àºàºµà»à»àº§àº¥àº²] LT', 17867 nextDay: '[ມືà»àºàº·à»àºà»àº§àº¥àº²] LT', 17868 nextWeek: '[ວັàº]dddd[à»à»àº²à»àº§àº¥àº²] LT', 17869 lastDay: '[ມືà»àº§àº²àºàºàºµà»à»àº§àº¥àº²] LT', 17870 lastWeek: '[ວັàº]dddd[à»àº¥à»àº§àºàºµà»à»àº§àº¥àº²] LT', 17871 sameElse: 'L', 17872 }, 17873 relativeTime: { 17874 future: 'àºàºµàº %s', 17875 past: '%sàºà»àº²àºàº¡àº²', 17876 s: 'àºà»à»à»àºàº»à»àº²à»àºàº§àº´àºàº²àºàºµ', 17877 ss: '%d ວິàºàº²àºàºµ', 17878 m: '1 àºàº²àºàºµ', 17879 mm: '%d àºàº²àºàºµ', 17880 h: '1 àºàº»à»àº§à»àº¡àº', 17881 hh: '%d àºàº»à»àº§à»àº¡àº', 17882 d: '1 ມືà»', 17883 dd: '%d ມືà»', 17884 M: '1 à»àºàº·àºàº', 17885 MM: '%d à»àºàº·àºàº', 17886 y: '1 àºàºµ', 17887 yy: '%d àºàºµ', 17888 }, 17889 dayOfMonthOrdinalParse: /(àºàºµà»)\d{1,2}/, 17890 ordinal: function (number) { 17891 return 'àºàºµà»' + number; 17892 }, 17893 }); 17894 17895 //! moment.js locale configuration 17896 17897 var units = { 17898 ss: 'sekundÄ_sekundžių_sekundes', 17899 m: 'minutÄ_minutÄs_minutÄ', 17900 mm: 'minutÄs_minuÄių_minutes', 17901 h: 'valanda_valandos_valandÄ ', 17902 hh: 'valandos_valandų_valandas',
vendor: 4,462 bytes, lines 17903-18024
17903 d: 'diena_dienos_dienÄ ', 17904 dd: 'dienos_dienų_dienas', 17905 M: 'mÄnuo_mÄnesio_mÄnesį', 17906 MM: 'mÄnesiai_mÄnesių_mÄnesius', 17907 y: 'metai_metų_metus', 17908 yy: 'metai_metų_metus', 17909 }; 17910 function translateSeconds(number, withoutSuffix, key, isFuture) { 17911 if (withoutSuffix) { 17912 return 'kelios sekundÄs'; 17913 } else { 17914 return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; 17915 } 17916 } 17917 function translateSingular(number, withoutSuffix, key, isFuture) { 17918 return withoutSuffix 17919 ? forms(key)[0] 17920 : isFuture 17921 ? forms(key)[1] 17922 : forms(key)[2]; 17923 } 17924 function special(number) { 17925 return number % 10 === 0 || (number > 10 && number < 20); 17926 } 17927 function forms(key) { 17928 return units[key].split('_'); 17929 } 17930 function translate$6(number, withoutSuffix, key, isFuture) { 17931 var result = number + ' '; 17932 if (number === 1) { 17933 return ( 17934 result + translateSingular(number, withoutSuffix, key[0], isFuture) 17935 ); 17936 } else if (withoutSuffix) { 17937 return result + (special(number) ? forms(key)[1] : forms(key)[0]); 17938 } else { 17939 if (isFuture) { 17940 return result + forms(key)[1]; 17941 } else { 17942 return result + (special(number) ? forms(key)[1] : forms(key)[2]); 17943 } 17944 } 17945 } 17946 hooks.defineLocale('lt', { 17947 months: { 17948 format: 'sausio_vasario_kovo_balandžio_gegužÄs_birželio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodžio'.split( 17949 '_' 17950 ), 17951 standalone: 17952 'sausis_vasaris_kovas_balandis_gegužÄ_birželis_liepa_rugpjÅ«tis_rugsÄjis_spalis_lapkritis_gruodis'.split( 17953 '_' 17954 ), 17955 isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, 17956 }, 17957 monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), 17958 weekdays: { 17959 format: 'sekmadienį_pirmadienį_antradienį_treÄiadienį_ketvirtadienį_penktadienį_Å¡eÅ¡tadienį'.split( 17960 '_' 17961 ), 17962 standalone: 17963 'sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis'.split( 17964 '_' 17965 ), 17966 isFormat: /dddd HH:mm/, 17967 }, 17968 weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡'.split('_'), 17969 weekdaysMin: 'S_P_A_T_K_Pn_Å '.split('_'), 17970 weekdaysParseExact: true, 17971 longDateFormat: { 17972 LT: 'HH:mm', 17973 LTS: 'HH:mm:ss', 17974 L: 'YYYY-MM-DD', 17975 LL: 'YYYY [m.] MMMM D [d.]', 17976 LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 17977 LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', 17978 l: 'YYYY-MM-DD', 17979 ll: 'YYYY [m.] MMMM D [d.]', 17980 lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 17981 llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', 17982 }, 17983 calendar: { 17984 sameDay: '[Å iandien] LT', 17985 nextDay: '[Rytoj] LT', 17986 nextWeek: 'dddd LT', 17987 lastDay: '[Vakar] LT', 17988 lastWeek: '[PraÄjusį] dddd LT', 17989 sameElse: 'L', 17990 }, 17991 relativeTime: { 17992 future: 'po %s', 17993 past: 'prieÅ¡ %s', 17994 s: translateSeconds, 17995 ss: translate$6, 17996 m: translateSingular, 17997 mm: translate$6, 17998 h: translateSingular, 17999 hh: translate$6, 18000 d: translateSingular, 18001 dd: translate$6, 18002 M: translateSingular, 18003 MM: translate$6, 18004 y: translateSingular, 18005 yy: translate$6, 18006 }, 18007 dayOfMonthOrdinalParse: /\d{1,2}-oji/, 18008 ordinal: function (number) { 18009 return number + '-oji'; 18010 }, 18011 week: { 18012 dow: 1, // Monday is the first day of the week. 18013 doy: 4, // The week that contains Jan 4th is the first week of the year. 18014 }, 18015 }); 18016 18017 //! moment.js locale configuration 18018 18019 var units$1 = { 18020 ss: 'sekundes_sekundÄm_sekunde_sekundes'.split('_'), 18021 m: 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 18022 mm: 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 18023 h: 'stundas_stundÄm_stunda_stundas'.split('_'), 18024 hh: 'stundas_stundÄm_stunda_stundas'.split('_'),
18025 d: 'dienas_dienÄm_diena_dienas'.split('_'), 18026 dd: 'dienas_dienÄm_diena_dienas'.split('_'), 18027 M: 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 18028 MM: 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 18029 y: 'gada_gadiem_gads_gadi'.split('_'), 18030 yy: 'gada_gadiem_gads_gadi'.split('_'), 18031 }; 18032 /** 18033 * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. 18034 */ 18035 function format$1(forms, number, withoutSuffix) { 18036 if (withoutSuffix) { 18037 // E.g. "21 minÅ«te", "3 minÅ«tes". 18038 return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; 18039 } else { 18040 // E.g. "21 minÅ«tes" as in "pÄc 21 minÅ«tes". 18041 // E.g. "3 minÅ«tÄm" as in "pÄc 3 minÅ«tÄm". 18042 return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; 18043 } 18044 } 18045 function relativeTimeWithPlural$1(number, withoutSuffix, key) { 18046 return number + ' ' + format$1(units$1[key], number, withoutSuffix); 18047 } 18048 function relativeTimeWithSingular(number, withoutSuffix, key) { 18049 return format$1(units$1[key], number, withoutSuffix); 18050 } 18051 function relativeSeconds(number, withoutSuffix) { 18052 return withoutSuffix ? 'dažas sekundes' : 'dažÄm sekundÄm'; 18053 } 18054 18055 hooks.defineLocale('lv', { 18056 months: 'janvÄris_februÄris_marts_aprÄ«lis_maijs_jÅ«nijs_jÅ«lijs_augusts_septembris_oktobris_novembris_decembris'.split( 18057 '_' 18058 ), 18059 monthsShort: 'jan_feb_mar_apr_mai_jÅ«n_jÅ«l_aug_sep_okt_nov_dec'.split('_'), 18060 weekdays: 18061 'svÄtdiena_pirmdiena_otrdiena_treÅ¡diena_ceturtdiena_piektdiena_sestdiena'.split( 18062 '_' 18063 ), 18064 weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), 18065 weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), 18066 weekdaysParseExact: true, 18067 longDateFormat: { 18068 LT: 'HH:mm', 18069 LTS: 'HH:mm:ss', 18070 L: 'DD.MM.YYYY.', 18071 LL: 'YYYY. [gada] D. MMMM', 18072 LLL: 'YYYY. [gada] D. MMMM, HH:mm', 18073 LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', 18074 }, 18075 calendar: { 18076 sameDay: '[Å odien pulksten] LT', 18077 nextDay: '[RÄ«t pulksten] LT', 18078 nextWeek: 'dddd [pulksten] LT', 18079 lastDay: '[Vakar pulksten] LT', 18080 lastWeek: '[PagÄjuÅ¡Ä] dddd [pulksten] LT', 18081 sameElse: 'L', 18082 }, 18083 relativeTime: { 18084 future: 'pÄc %s', 18085 past: 'pirms %s', 18086 s: relativeSeconds, 18087 ss: relativeTimeWithPlural$1, 18088 m: relativeTimeWithSingular, 18089 mm: relativeTimeWithPlural$1, 18090 h: relativeTimeWithSingular, 18091 hh: relativeTimeWithPlural$1, 18092 d: relativeTimeWithSingular, 18093 dd: relativeTimeWithPlural$1, 18094 M: relativeTimeWithSingular, 18095 MM: relativeTimeWithPlural$1, 18096 y: relativeTimeWithSingular, 18097 yy: relativeTimeWithPlural$1, 18098 }, 18099 dayOfMonthOrdinalParse: /\d{1,2}\./, 18100 ordinal: '%d.', 18101 week: { 18102 dow: 1, // Monday is the first day of the week. 18103 doy: 4, // The week that contains Jan 4th is the first week of the year. 18104 }, 18105 }); 18106 18107 //! moment.js locale configuration 18108 18109 var translator = { 18110 words: { 18111 //Different grammatical cases 18112 ss: ['sekund', 'sekunda', 'sekundi'], 18113 m: ['jedan minut', 'jednog minuta'], 18114 mm: ['minut', 'minuta', 'minuta'], 18115 h: ['jedan sat', 'jednog sata'], 18116 hh: ['sat', 'sata', 'sati'], 18117 dd: ['dan', 'dana', 'dana'], 18118 MM: ['mjesec', 'mjeseca', 'mjeseci'], 18119 yy: ['godina', 'godine', 'godina'], 18120 }, 18121 correctGrammaticalCase: function (number, wordKey) { 18122 return number === 1 18123 ? wordKey[0] 18124 : number >= 2 && number <= 4 18125 ? wordKey[1] 18126 : wordKey[2]; 18127 }, 18128 translate: function (number, withoutSuffix, key) { 18129 var wordKey = translator.words[key]; 18130 if (key.length === 1) { 18131 return withoutSuffix ? wordKey[0] : wordKey[1]; 18132 } else { 18133 return ( 18134 number + 18135 ' ' + 18136 translator.correctGrammaticalCase(number, wordKey) 18137 ); 18138 } 18139 }, 18140 }; 18141 18142 hooks.defineLocale('me', { 18143 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( 18144 '_' 18145 ), 18146 monthsShort: 18147 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), 18148 monthsParseExact: true, 18149 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 18150 '_' 18151 ), 18152 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 18153 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 18154 weekdaysParseExact: true, 18155 longDateFormat: { 18156 LT: 'H:mm', 18157 LTS: 'H:mm:ss', 18158 L: 'DD.MM.YYYY', 18159 LL: 'D. MMMM YYYY', 18160 LLL: 'D. MMMM YYYY H:mm', 18161 LLLL: 'dddd, D. MMMM YYYY H:mm', 18162 }, 18163 calendar: { 18164 sameDay: '[danas u] LT', 18165 nextDay: '[sjutra u] LT', 18166 18167 nextWeek: function () { 18168 switch (this.day()) { 18169 case 0: 18170 return '[u] [nedjelju] [u] LT'; 18171 case 3: 18172 return '[u] [srijedu] [u] LT'; 18173 case 6: 18174 return '[u] [subotu] [u] LT'; 18175 case 1: 18176 case 2: 18177 case 4: 18178 case 5: 18179 return '[u] dddd [u] LT'; 18180 } 18181 }, 18182 lastDay: '[juÄe u] LT', 18183 lastWeek: function () { 18184 var lastWeekDays = [ 18185 '[proÅ¡le] [nedjelje] [u] LT', 18186 '[proÅ¡log] [ponedjeljka] [u] LT', 18187 '[proÅ¡log] [utorka] [u] LT', 18188 '[proÅ¡le] [srijede] [u] LT', 18189 '[proÅ¡log] [Äetvrtka] [u] LT', 18190 '[proÅ¡log] [petka] [u] LT', 18191 '[proÅ¡le] [subote] [u] LT', 18192 ]; 18193 return lastWeekDays[this.day()]; 18194 }, 18195 sameElse: 'L', 18196 }, 18197 relativeTime: { 18198 future: 'za %s', 18199 past: 'prije %s', 18200 s: 'nekoliko sekundi', 18201 ss: translator.translate, 18202 m: translator.translate, 18203 mm: translator.translate, 18204 h: translator.translate, 18205 hh: translator.translate, 18206 d: 'dan', 18207 dd: translator.translate, 18208 M: 'mjesec', 18209 MM: translator.translate, 18210 y: 'godinu', 18211 yy: translator.translate, 18212 }, 18213 dayOfMonthOrdinalParse: /\d{1,2}\./, 18214 ordinal: '%d.', 18215 week: { 18216 dow: 1, // Monday is the first day of the week. 18217 doy: 7, // The week that contains Jan 7th is the first week of the year. 18218 }, 18219 }); 18220 18221 //! moment.js locale configuration 18222 18223 hooks.defineLocale('mi', { 18224 months: 'Kohi-tÄte_Hui-tanguru_PoutÅ«-te-rangi_Paenga-whÄwhÄ_Haratua_Pipiri_HÅngoingoi_Here-turi-kÅkÄ_Mahuru_Whiringa-Ä-nuku_Whiringa-Ä-rangi_Hakihea'.split( 18225 '_' 18226 ), 18227 monthsShort: 18228 'Kohi_Hui_Pou_Pae_Hara_Pipi_HÅngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( 18229 '_' 18230 ), 18231 monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 18232 monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 18233 monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 18234 monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, 18235 weekdays: 'RÄtapu_Mane_TÅ«rei_Wenerei_TÄite_Paraire_HÄtarei'.split('_'), 18236 weekdaysShort: 'Ta_Ma_TÅ«_We_TÄi_Pa_HÄ'.split('_'), 18237 weekdaysMin: 'Ta_Ma_TÅ«_We_TÄi_Pa_HÄ'.split('_'), 18238 longDateFormat: { 18239 LT: 'HH:mm', 18240 LTS: 'HH:mm:ss', 18241 L: 'DD/MM/YYYY', 18242 LL: 'D MMMM YYYY', 18243 LLL: 'D MMMM YYYY [i] HH:mm', 18244 LLLL: 'dddd, D MMMM YYYY [i] HH:mm', 18245 }, 18246 calendar: { 18247 sameDay: '[i teie mahana, i] LT', 18248 nextDay: '[apopo i] LT', 18249 nextWeek: 'dddd [i] LT', 18250 lastDay: '[inanahi i] LT', 18251 lastWeek: 'dddd [whakamutunga i] LT', 18252 sameElse: 'L', 18253 }, 18254 relativeTime: { 18255 future: 'i roto i %s', 18256 past: '%s i mua', 18257 s: 'te hÄkona ruarua', 18258 ss: '%d hÄkona', 18259 m: 'he meneti', 18260 mm: '%d meneti', 18261 h: 'te haora', 18262 hh: '%d haora', 18263 d: 'he ra', 18264 dd: '%d ra', 18265 M: 'he marama', 18266 MM: '%d marama', 18267 y: 'he tau', 18268 yy: '%d tau', 18269 }, 18270 dayOfMonthOrdinalParse: /\d{1,2}º/, 18271 ordinal: '%dº', 18272 week: { 18273 dow: 1, // Monday is the first day of the week. 18274 doy: 4, // The week that contains Jan 4th is the first week of the year. 18275 }, 18276 }); 18277 18278 //! moment.js locale configuration 18279 18280 hooks.defineLocale('mk', { 18281 months: 'ÑанÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_маÑ_ÑÑни_ÑÑли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split( 18282 '_' 18283 ), 18284 monthsShort: 'Ñан_Ñев_маÑ_апÑ_маÑ_ÑÑн_ÑÑл_авг_Ñеп_окÑ_ное_дек'.split('_'), 18285 weekdays: 'недела_понеделник_вÑоÑник_ÑÑеда_ÑеÑвÑÑок_пеÑок_ÑабоÑа'.split( 18286 '_' 18287 ), 18288 weekdaysShort: 'нед_пон_вÑо_ÑÑе_ÑеÑ_пеÑ_Ñаб'.split('_'), 18289 weekdaysMin: 'нe_пo_вÑ_ÑÑ_Ñе_пе_Ña'.split('_'), 18290 longDateFormat: { 18291 LT: 'H:mm', 18292 LTS: 'H:mm:ss', 18293 L: 'D.MM.YYYY', 18294 LL: 'D MMMM YYYY', 18295 LLL: 'D MMMM YYYY H:mm', 18296 LLLL: 'dddd, D MMMM YYYY H:mm', 18297 }, 18298 calendar: { 18299 sameDay: '[ÐÐµÐ½ÐµÑ Ð²Ð¾] LT', 18300 nextDay: '[УÑÑе во] LT', 18301 nextWeek: '[Ðо] dddd [во] LT', 18302 lastDay: '[ÐÑеÑа во] LT', 18303 lastWeek: function () { 18304 switch (this.day()) { 18305 case 0: 18306 case 3: 18307 case 6: 18308 return '[ÐзминаÑаÑа] dddd [во] LT'; 18309 case 1: 18310 case 2: 18311 case 4: 18312 case 5: 18313 return '[ÐзминаÑиоÑ] dddd [во] LT'; 18314 } 18315 }, 18316 sameElse: 'L', 18317 }, 18318 relativeTime: { 18319 future: 'за %s', 18320 past: 'пÑед %s', 18321 s: 'Ð½ÐµÐºÐ¾Ð»ÐºÑ ÑекÑнди', 18322 ss: '%d ÑекÑнди', 18323 m: 'една минÑÑа', 18324 mm: '%d минÑÑи', 18325 h: 'еден ÑаÑ', 18326 hh: '%d ÑаÑа', 18327 d: 'еден ден', 18328 dd: '%d дена', 18329 M: 'еден меÑеÑ', 18330 MM: '%d меÑеÑи', 18331 y: 'една година', 18332 yy: '%d години', 18333 }, 18334 dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 18335 ordinal: function (number) { 18336 var lastDigit = number % 10, 18337 last2Digits = number % 100; 18338 if (number === 0) { 18339 return number + '-ев'; 18340 } else if (last2Digits === 0) { 18341 return number + '-ен'; 18342 } else if (last2Digits > 10 && last2Digits < 20) { 18343 return number + '-Ñи'; 18344 } else if (lastDigit === 1) { 18345 return number + '-ви'; 18346 } else if (lastDigit === 2) { 18347 return number + '-Ñи'; 18348 } else if (lastDigit === 7 || lastDigit === 8) { 18349 return number + '-ми'; 18350 } else { 18351 return number + '-Ñи'; 18352 } 18353 }, 18354 week: { 18355 dow: 1, // Monday is the first day of the week. 18356 doy: 7, // The week that contains Jan 7th is the first week of the year. 18357 }, 18358 }); 18359 18360 //! moment.js locale configuration 18361 18362 hooks.defineLocale('ml', { 18363 months: 'à´à´¨àµà´µà´°à´¿_à´«àµà´¬àµà´°àµà´µà´°à´¿_മാർà´àµà´à
vendor: 5,964 bytes, lines 18363-18500
18363µ_à´à´ªàµà´°à´¿àµ½_à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ_à´à´à´¸àµà´±àµà´±àµ_à´¸àµà´ªàµà´±àµà´±à´à´¬àµ¼_à´à´àµà´àµà´¬àµ¼_നവà´à´¬àµ¼_à´¡à´¿à´¸à´à´¬àµ¼'.split( 18364 '_' 18365 ), 18366 monthsShort: 18367 'à´à´¨àµ._à´«àµà´¬àµà´°àµ._മാർ._à´à´ªàµà´°à´¿._à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ._à´à´._à´¸àµà´ªàµà´±àµà´±._à´à´àµà´àµ._നവà´._à´¡à´¿à´¸à´.'.split( 18368 '_' 18369 ), 18370 monthsParseExact: true, 18371 weekdays: 18372 'à´à´¾à´¯à´±à´¾à´´àµà´_തിà´àµà´à´³à´¾à´´àµà´_à´àµà´µàµà´µà´¾à´´àµà´_à´¬àµà´§à´¨à´¾à´´àµà´_à´µàµà´¯à´¾à´´à´¾à´´àµà´_à´µàµà´³àµà´³à´¿à´¯à´¾à´´àµà´_ശനിയാഴàµà´'.split( 18373 '_' 18374 ), 18375 weekdaysShort: 'à´à´¾à´¯àµ¼_തിà´àµà´àµ¾_à´àµà´µàµà´µ_à´¬àµà´§àµ»_à´µàµà´¯à´¾à´´à´_à´µàµà´³àµà´³à´¿_ശനി'.split('_'), 18376 weekdaysMin: 'à´à´¾_തി_à´àµ_à´¬àµ_à´µàµà´¯à´¾_à´µàµ_à´¶'.split('_'), 18377 longDateFormat: { 18378 LT: 'A h:mm -à´¨àµ', 18379 LTS: 'A h:mm:ss -à´¨àµ', 18380 L: 'DD/MM/YYYY', 18381 LL: 'D MMMM YYYY', 18382 LLL: 'D MMMM YYYY, A h:mm -à´¨àµ', 18383 LLLL: 'dddd, D MMMM YYYY, A h:mm -à´¨àµ', 18384 }, 18385 calendar: { 18386 sameDay: '[à´à´¨àµà´¨àµ] LT', 18387 nextDay: '[നാളàµ] LT', 18388 nextWeek: 'dddd, LT', 18389 lastDay: '[à´à´¨àµà´¨à´²àµ] LT', 18390 lastWeek: '[à´à´´à´¿à´àµà´] dddd, LT', 18391 sameElse: 'L', 18392 }, 18393 relativeTime: { 18394 future: '%s à´à´´à´¿à´àµà´àµ', 18395 past: '%s à´®àµàµ»à´ªàµ', 18396 s: 'ഠൽപ നിമിഷà´àµà´àµ¾', 18397 ss: '%d à´¸àµà´àµà´àµ»à´¡àµ', 18398 m: 'à´à´°àµ മിനിറàµà´±àµ', 18399 mm: '%d മിനിറàµà´±àµ', 18400 h: 'à´à´°àµ മണിà´àµà´àµàµ¼', 18401 hh: '%d മണിà´àµà´àµàµ¼', 18402 d: 'à´à´°àµ ദിവസà´', 18403 dd: '%d ദിവസà´', 18404 M: 'à´à´°àµ മാസà´', 18405 MM: '%d മാസà´', 18406 y: 'à´à´°àµ വർഷà´', 18407 yy: '%d വർഷà´', 18408 }, 18409 meridiemParse: /രാതàµà´°à´¿|രാവിലàµ|à´à´àµà´ à´à´´à´¿à´àµà´àµ|à´µàµà´àµà´¨àµà´¨àµà´°à´|രാതàµà´°à´¿/i, 18410 meridiemHour: function (hour, meridiem) { 18411 if (hour === 12) { 18412 hour = 0; 18413 } 18414 if ( 18415 (meridiem === 'രാതàµà´°à´¿' && hour >= 4) || 18416 meridiem === 'à´à´àµà´ à´à´´à´¿à´àµà´àµ' || 18417 meridiem === 'à´µàµà´àµà´¨àµà´¨àµà´°à´' 18418 ) { 18419 return hour + 12; 18420 } else { 18421 return hour; 18422 } 18423 }, 18424 meridiem: function (hour, minute, isLower) { 18425 if (hour < 4) { 18426 return 'രാതàµà´°à´¿'; 18427 } else if (hour < 12) { 18428 return 'രാവിലàµ'; 18429 } else if (hour < 17) { 18430 return 'à´à´àµà´ à´à´´à´¿à´àµà´àµ'; 18431 } else if (hour < 20) { 18432 return 'à´µàµà´àµà´¨àµà´¨àµà´°à´'; 18433 } else { 18434 return 'രാതàµà´°à´¿'; 18435 } 18436 }, 18437 }); 18438 18439 //! moment.js locale configuration 18440 18441 function translate$7(number, withoutSuffix, key, isFuture) { 18442 switch (key) { 18443 case 's': 18444 return withoutSuffix ? 'Ñ ÑÐ´Ñ Ñн ÑекÑнд' : 'Ñ ÑÐ´Ñ Ñн ÑекÑндÑн'; 18445 case 'ss': 18446 return number + (withoutSuffix ? ' ÑекÑнд' : ' ÑекÑндÑн'); 18447 case 'm': 18448 case 'mm': 18449 return number + (withoutSuffix ? ' минÑÑ' : ' минÑÑÑн'); 18450 case 'h': 18451 case 'hh': 18452 return number + (withoutSuffix ? ' Ñаг' : ' Ñагийн'); 18453 case 'd': 18454 case 'dd': 18455 return number + (withoutSuffix ? ' өдөÑ' : ' өдÑийн'); 18456 case 'M': 18457 case 'MM': 18458 return number + (withoutSuffix ? ' ÑаÑ' : ' ÑаÑÑн'); 18459 case 'y': 18460 case 'yy': 18461 return number + (withoutSuffix ? ' жил' : ' жилийн'); 18462 default: 18463 return number; 18464 } 18465 } 18466 18467 hooks.defineLocale('mn', { 18468 months: 'ÐÑгдүгÑÑÑ ÑаÑ_ХоÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÓ©ÑөвдүгÑÑÑ ÑаÑ_ТавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑгадÑÐ³Ð°Ð°Ñ ÑаÑ_ÐолдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐаймдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑдүгÑÑÑ ÑаÑ_ÐÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑван нÑгдүгÑÑÑ ÑаÑ_ÐÑван Ñ Ð¾ÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ'.split( 18469 '_' 18470 ), 18471 monthsShort: 18472 '1 ÑаÑ_2 ÑаÑ_3 ÑаÑ_4 ÑаÑ_5 ÑаÑ_6 ÑаÑ_7 ÑаÑ_8 ÑаÑ_9 ÑаÑ_10 ÑаÑ_11 ÑаÑ_12 ÑаÑ'.split( 18473 '_' 18474 ), 18475 monthsParseExact: true, 18476 weekdays: 'ÐÑм_Ðаваа_ÐÑгмаÑ_ÐÑ Ð°Ð³Ð²Ð°_ÐÒ¯ÑÑв_ÐааÑан_ÐÑмба'.split('_'), 18477 weekdaysShort: 'ÐÑм_Ðав_ÐÑг_ÐÑ Ð°_ÐÒ¯Ñ_Ðаа_ÐÑм'.split('_'), 18478 weekdaysMin: 'ÐÑ_Ðа_ÐÑ_ÐÑ _ÐÒ¯_Ðа_ÐÑ'.split('_'), 18479 weekdaysParseExact: true, 18480 longDateFormat: { 18481 LT: 'HH:mm', 18482 LTS: 'HH:mm:ss', 18483 L: 'YYYY-MM-DD', 18484 LL: 'YYYY Ð¾Ð½Ñ MMMMÑн D', 18485 LLL: 'YYYY Ð¾Ð½Ñ MMMMÑн D HH:mm', 18486 LLLL: 'dddd, YYYY Ð¾Ð½Ñ MMMMÑн D HH:mm', 18487 }, 18488 meridiemParse: /Ò®Ó¨|ҮХ/i, 18489 isPM: function (input) { 18490 return input === 'ҮХ'; 18491 }, 18492 meridiem: function (hour, minute, isLower) { 18493 if (hour < 12) { 18494 return 'Ò®Ó¨'; 18495 } else { 18496 return 'ҮХ'; 18497 } 18498 }, 18499 calendar: { 18500 sameDay: '[ӨнөөдөÑ] LT',
vendor: 7,396 bytes, lines 18501-18710
18501 nextDay: '[ÐаÑгааÑ] LT', 18502 nextWeek: '[ÐÑÑÑ ] dddd LT', 18503 lastDay: '[Ó¨ÑигдөÑ] LT', 18504 lastWeek: '[ӨнгөÑÑөн] dddd LT', 18505 sameElse: 'L', 18506 }, 18507 relativeTime: { 18508 future: '%s даÑаа', 18509 past: '%s өмнө', 18510 s: translate$7, 18511 ss: translate$7, 18512 m: translate$7, 18513 mm: translate$7, 18514 h: translate$7, 18515 hh: translate$7, 18516 d: translate$7, 18517 dd: translate$7, 18518 M: translate$7, 18519 MM: translate$7, 18520 y: translate$7, 18521 yy: translate$7, 18522 }, 18523 dayOfMonthOrdinalParse: /\d{1,2} өдөÑ/, 18524 ordinal: function (number, period) { 18525 switch (period) { 18526 case 'd': 18527 case 'D': 18528 case 'DDD': 18529 return number + ' өдөÑ'; 18530 default: 18531 return number; 18532 } 18533 }, 18534 }); 18535 18536 //! moment.js locale configuration 18537 18538 var symbolMap$c = { 18539 1: '१', 18540 2: '२', 18541 3: '३', 18542 4: '४', 18543 5: '५', 18544 6: '६', 18545 7: 'à¥', 18546 8: '८', 18547 9: '९', 18548 0: '०', 18549 }, 18550 numberMap$b = { 18551 '१': '1', 18552 '२': '2', 18553 '३': '3', 18554 '४': '4', 18555 '५': '5', 18556 '६': '6', 18557 'à¥': '7', 18558 '८': '8', 18559 '९': '9', 18560 '०': '0', 18561 }; 18562 18563 function relativeTimeMr(number, withoutSuffix, string, isFuture) { 18564 var output = ''; 18565 if (withoutSuffix) { 18566 switch (string) { 18567 case 's': 18568 output = 'à¤à¤¾à¤¹à¥ सà¥à¤à¤à¤¦'; 18569 break; 18570 case 'ss': 18571 output = '%d सà¥à¤à¤à¤¦'; 18572 break; 18573 case 'm': 18574 output = 'à¤à¤ मिनिà¤'; 18575 break; 18576 case 'mm': 18577 output = '%d मिनिà¤à¥'; 18578 break; 18579 case 'h': 18580 output = 'à¤à¤ तास'; 18581 break; 18582 case 'hh': 18583 output = '%d तास'; 18584 break; 18585 case 'd': 18586 output = 'à¤à¤ दिवस'; 18587 break; 18588 case 'dd': 18589 output = '%d दिवस'; 18590 break; 18591 case 'M': 18592 output = 'à¤à¤ महिना'; 18593 break; 18594 case 'MM': 18595 output = '%d महिनà¥'; 18596 break; 18597 case 'y': 18598 output = 'à¤à¤ वरà¥à¤·'; 18599 break; 18600 case 'yy': 18601 output = '%d वरà¥à¤·à¥'; 18602 break; 18603 } 18604 } else { 18605 switch (string) { 18606 case 's': 18607 output = 'à¤à¤¾à¤¹à¥ सà¥à¤à¤à¤¦à¤¾à¤'; 18608 break; 18609 case 'ss': 18610 output = '%d सà¥à¤à¤à¤¦à¤¾à¤'; 18611 break; 18612 case 'm': 18613 output = 'à¤à¤à¤¾ मिनिà¤à¤¾'; 18614 break; 18615 case 'mm': 18616 output = '%d मिनिà¤à¤¾à¤'; 18617 break; 18618 case 'h': 18619 output = 'à¤à¤à¤¾ तासा'; 18620 break; 18621 case 'hh': 18622 output = '%d तासाà¤'; 18623 break; 18624 case 'd': 18625 output = 'à¤à¤à¤¾ दिवसा'; 18626 break; 18627 case 'dd': 18628 output = '%d दिवसाà¤'; 18629 break; 18630 case 'M': 18631 output = 'à¤à¤à¤¾ महिनà¥à¤¯à¤¾'; 18632 break; 18633 case 'MM': 18634 output = '%d महिनà¥à¤¯à¤¾à¤'; 18635 break; 18636 case 'y': 18637 output = 'à¤à¤à¤¾ वरà¥à¤·à¤¾'; 18638 break; 18639 case 'yy': 18640 output = '%d वरà¥à¤·à¤¾à¤'; 18641 break; 18642 } 18643 } 18644 return output.replace(/%d/i, number); 18645 } 18646 18647 hooks.defineLocale('mr', { 18648 months: 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¤¿à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¥_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°'.split( 18649 '_' 18650 ), 18651 monthsShort: 18652 'à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤._à¤à¤ªà¥à¤°à¤¿._मà¥._à¤à¥à¤¨._à¤à¥à¤²à¥._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.'.split( 18653 '_' 18654 ), 18655 monthsParseExact: true, 18656 weekdays: 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤³à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 18657 weekdaysShort: 'रवि_सà¥à¤®_मà¤à¤à¤³_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 18658 weekdaysMin: 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 18659 longDateFormat: { 18660 LT: 'A h:mm वाà¤à¤¤à¤¾', 18661 LTS: 'A h:mm:ss वाà¤à¤¤à¤¾', 18662 L: 'DD/MM/YYYY', 18663 LL: 'D MMMM YYYY', 18664 LLL: 'D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾', 18665 LLLL: 'dddd, D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾', 18666 }, 18667 calendar: { 18668 sameDay: '[à¤à¤] LT', 18669 nextDay: '[à¤à¤¦à¥à¤¯à¤¾] LT', 18670 nextWeek: 'dddd, LT', 18671 lastDay: '[à¤à¤¾à¤²] LT', 18672 lastWeek: '[माà¤à¥à¤²] dddd, LT', 18673 sameElse: 'L', 18674 }, 18675 relativeTime: { 18676 future: '%sमधà¥à¤¯à¥', 18677 past: '%sपà¥à¤°à¥à¤µà¥', 18678 s: relativeTimeMr, 18679 ss: relativeTimeMr, 18680 m: relativeTimeMr, 18681 mm: relativeTimeMr, 18682 h: relativeTimeMr, 18683 hh: relativeTimeMr, 18684 d: relativeTimeMr, 18685 dd: relativeTimeMr, 18686 M: relativeTimeMr, 18687 MM: relativeTimeMr, 18688 y: relativeTimeMr, 18689 yy: relativeTimeMr, 18690 }, 18691 preparse: function (string) { 18692 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 18693 return numberMap$b[match]; 18694 }); 18695 }, 18696 postformat: function (string) { 18697 return string.replace(/\d/g, function (match) { 18698 return symbolMap$c[match]; 18699 }); 18700 }, 18701 meridiemParse: /पहाà¤à¥|सà¤à¤¾à¤³à¥|दà¥à¤ªà¤¾à¤°à¥|सायà¤à¤à¤¾à¤³à¥|रातà¥à¤°à¥/, 18702 meridiemHour: function (hour, meridiem) { 18703 if (hour === 12) { 18704 hour = 0; 18705 } 18706 if (meridiem === 'पहाà¤à¥' || meridiem === 'सà¤à¤¾à¤³à¥') { 18707 return hour; 18708 } else if ( 18709 meridiem === 'दà¥à¤ªà¤¾à¤°à¥' || 18710 meridiem === 'सायà¤à¤à¤¾à¤³à¥' ||
vendor: 6,988 bytes, lines 18711-18916
18711 meridiem === 'रातà¥à¤°à¥' 18712 ) { 18713 return hour >= 12 ? hour : hour + 12; 18714 } 18715 }, 18716 meridiem: function (hour, minute, isLower) { 18717 if (hour >= 0 && hour < 6) { 18718 return 'पहाà¤à¥'; 18719 } else if (hour < 12) { 18720 return 'सà¤à¤¾à¤³à¥'; 18721 } else if (hour < 17) { 18722 return 'दà¥à¤ªà¤¾à¤°à¥'; 18723 } else if (hour < 20) { 18724 return 'सायà¤à¤à¤¾à¤³à¥'; 18725 } else { 18726 return 'रातà¥à¤°à¥'; 18727 } 18728 }, 18729 week: { 18730 dow: 0, // Sunday is the first day of the week. 18731 doy: 6, // The week that contains Jan 6th is the first week of the year. 18732 }, 18733 }); 18734 18735 //! moment.js locale configuration 18736 18737 hooks.defineLocale('ms-my', { 18738 months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( 18739 '_' 18740 ), 18741 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 18742 weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 18743 weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 18744 weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 18745 longDateFormat: { 18746 LT: 'HH.mm', 18747 LTS: 'HH.mm.ss', 18748 L: 'DD/MM/YYYY', 18749 LL: 'D MMMM YYYY', 18750 LLL: 'D MMMM YYYY [pukul] HH.mm', 18751 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 18752 }, 18753 meridiemParse: /pagi|tengahari|petang|malam/, 18754 meridiemHour: function (hour, meridiem) { 18755 if (hour === 12) { 18756 hour = 0; 18757 } 18758 if (meridiem === 'pagi') { 18759 return hour; 18760 } else if (meridiem === 'tengahari') { 18761 return hour >= 11 ? hour : hour + 12; 18762 } else if (meridiem === 'petang' || meridiem === 'malam') { 18763 return hour + 12; 18764 } 18765 }, 18766 meridiem: function (hours, minutes, isLower) { 18767 if (hours < 11) { 18768 return 'pagi'; 18769 } else if (hours < 15) { 18770 return 'tengahari'; 18771 } else if (hours < 19) { 18772 return 'petang'; 18773 } else { 18774 return 'malam'; 18775 } 18776 }, 18777 calendar: { 18778 sameDay: '[Hari ini pukul] LT', 18779 nextDay: '[Esok pukul] LT', 18780 nextWeek: 'dddd [pukul] LT', 18781 lastDay: '[Kelmarin pukul] LT', 18782 lastWeek: 'dddd [lepas pukul] LT', 18783 sameElse: 'L', 18784 }, 18785 relativeTime: { 18786 future: 'dalam %s', 18787 past: '%s yang lepas', 18788 s: 'beberapa saat', 18789 ss: '%d saat', 18790 m: 'seminit', 18791 mm: '%d minit', 18792 h: 'sejam', 18793 hh: '%d jam', 18794 d: 'sehari', 18795 dd: '%d hari', 18796 M: 'sebulan', 18797 MM: '%d bulan', 18798 y: 'setahun', 18799 yy: '%d tahun', 18800 }, 18801 week: { 18802 dow: 1, // Monday is the first day of the week. 18803 doy: 7, // The week that contains Jan 7th is the first week of the year. 18804 }, 18805 }); 18806 18807 //! moment.js locale configuration 18808 18809 hooks.defineLocale('ms', { 18810 months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( 18811 '_' 18812 ), 18813 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 18814 weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 18815 weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 18816 weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 18817 longDateFormat: { 18818 LT: 'HH.mm', 18819 LTS: 'HH.mm.ss', 18820 L: 'DD/MM/YYYY', 18821 LL: 'D MMMM YYYY', 18822 LLL: 'D MMMM YYYY [pukul] HH.mm', 18823 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 18824 }, 18825 meridiemParse: /pagi|tengahari|petang|malam/, 18826 meridiemHour: function (hour, meridiem) { 18827 if (hour === 12) { 18828 hour = 0; 18829 } 18830 if (meridiem === 'pagi') { 18831 return hour; 18832 } else if (meridiem === 'tengahari') { 18833 return hour >= 11 ? hour : hour + 12; 18834 } else if (meridiem === 'petang' || meridiem === 'malam') { 18835 return hour + 12; 18836 } 18837 }, 18838 meridiem: function (hours, minutes, isLower) { 18839 if (hours < 11) { 18840 return 'pagi'; 18841 } else if (hours < 15) { 18842 return 'tengahari'; 18843 } else if (hours < 19) { 18844 return 'petang'; 18845 } else { 18846 return 'malam'; 18847 } 18848 }, 18849 calendar: { 18850 sameDay: '[Hari ini pukul] LT', 18851 nextDay: '[Esok pukul] LT', 18852 nextWeek: 'dddd [pukul] LT', 18853 lastDay: '[Kelmarin pukul] LT', 18854 lastWeek: 'dddd [lepas pukul] LT', 18855 sameElse: 'L', 18856 }, 18857 relativeTime: { 18858 future: 'dalam %s', 18859 past: '%s yang lepas', 18860 s: 'beberapa saat', 18861 ss: '%d saat', 18862 m: 'seminit', 18863 mm: '%d minit', 18864 h: 'sejam', 18865 hh: '%d jam', 18866 d: 'sehari', 18867 dd: '%d hari', 18868 M: 'sebulan', 18869 MM: '%d bulan', 18870 y: 'setahun', 18871 yy: '%d tahun', 18872 }, 18873 week: { 18874 dow: 1, // Monday is the first day of the week. 18875 doy: 7, // The week that contains Jan 7th is the first week of the year. 18876 }, 18877 }); 18878 18879 //! moment.js locale configuration 18880 18881 hooks.defineLocale('mt', { 18882 months: 'Jannar_Frar_Marzu_April_Mejju_Ä unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_DiÄembru'.split( 18883 '_' 18884 ), 18885 monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ä un_Lul_Aww_Set_Ott_Nov_DiÄ'.split('_'), 18886 weekdays: 18887 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ä imgħa_Is-Sibt'.split( 18888 '_' 18889 ), 18890 weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ä im_Sib'.split('_'), 18891 weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ä i_Si'.split('_'), 18892 longDateFormat: { 18893 LT: 'HH:mm', 18894 LTS: 'HH:mm:ss', 18895 L: 'DD/MM/YYYY', 18896 LL: 'D MMMM YYYY', 18897 LLL: 'D MMMM YYYY HH:mm', 18898 LLLL: 'dddd, D MMMM YYYY HH:mm', 18899 }, 18900 calendar: { 18901 sameDay: '[Illum fil-]LT', 18902 nextDay: '[Għada fil-]LT', 18903 nextWeek: 'dddd [fil-]LT', 18904 lastDay: '[Il-bieraħ fil-]LT', 18905 lastWeek: 'dddd [li għadda] [fil-]LT', 18906 sameElse: 'L', 18907 }, 18908 relativeTime: { 18909 future: 'fâ %s', 18910 past: '%s ilu', 18911 s: 'ftit sekondi', 18912 ss: '%d sekondi', 18913 m: 'minuta', 18914 mm: '%d minuti', 18915 h: 'siegħa', 18916 hh: '%d siegħat',
18917 d: 'Ä¡urnata', 18918 dd: '%d Ä¡ranet', 18919 M: 'xahar', 18920 MM: '%d xhur', 18921 y: 'sena', 18922 yy: '%d sni', 18923 }, 18924 dayOfMonthOrdinalParse: /\d{1,2}º/, 18925 ordinal: '%dº', 18926 week: { 18927 dow: 1, // Monday is the first day of the week. 18928 doy: 4, // The week that contains Jan 4th is the first week of the year. 18929 }, 18930 }); 18931 18932 //! moment.js locale configuration 18933 18934 var symbolMap$d = { 18935 1: 'á', 18936 2: 'á', 18937 3: 'á', 18938 4: 'á', 18939 5: 'á ', 18940 6: 'á', 18941 7: 'á', 18942 8: 'á', 18943 9: 'á', 18944 0: 'á', 18945 }, 18946 numberMap$c = { 18947 'á': '1', 18948 'á': '2', 18949 'á': '3', 18950 'á': '4', 18951 'á ': '5', 18952 'á': '6', 18953 'á': '7', 18954 'á': '8', 18955 'á': '9', 18956 'á': '0', 18957 }; 18958 18959 hooks.defineLocale('my', { 18960 months: 'áááºááá«áá®_áá±áá±á¬áºáá«áá®_áááº_á§áá¼á®_áá±_áá½ááº_áá°ááá¯ááº_áá¼áá¯ááº_á ááºáááºáá¬_á¡á±á¬ááºááá¯áá¬_ááá¯áááºáá¬_áá®áááºáá¬'.split( 18961 '_' 18962 ), 18963 monthsShort: 'áááº_áá±_áááº_áá¼á®_áá±_áá½ááº_ááá¯ááº_áá¼_á ááº_á¡á±á¬ááº_ááá¯_áá®'.split('_'), 18964 weekdays: 'ááááºá¹ááá½á±_ááááºá¹áá¬_á¡ááºá¹áá«_áá¯áá¹ááá°á¸_áá¼á¬áááá±á¸_áá±á¬áá¼á¬_á áá±'.split( 18965 '_' 18966 ), 18967 weekdaysShort: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 18968 weekdaysMin: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 18969 18970 longDateFormat: { 18971 LT: 'HH:mm', 18972 LTS: 'HH:mm:ss', 18973 L: 'DD/MM/YYYY', 18974 LL: 'D MMMM YYYY', 18975 LLL: 'D MMMM YYYY HH:mm', 18976 LLLL: 'dddd D MMMM YYYY HH:mm', 18977 }, 18978 calendar: { 18979 sameDay: '[ááá±.] LT [áá¾á¬]', 18980 nextDay: '[ááááºáá¼ááº] LT [áá¾á¬]', 18981 nextWeek: 'dddd LT [áá¾á¬]', 18982 lastDay: '[ááá±.á] LT [áá¾á¬]', 18983 lastWeek: '[áá¼á®á¸áá²á·áá±á¬] dddd LT [áá¾á¬]', 18984 sameElse: 'L', 18985 }, 18986 relativeTime: { 18987 future: 'áá¬áááºá· %s áá¾á¬', 18988 past: 'áá½ááºáá²á·áá±á¬ %s á', 18989 s: 'á áá¹áááº.á¡áááºá¸áááº', 18990 ss: '%d á áá¹ááá·áº', 18991 m: 'áá áºáááá áº', 18992 mm: '%d áááá áº', 18993 h: 'áá áºáá¬áá®', 18994 hh: '%d áá¬áá®', 18995 d: 'áá áºáááº', 18996 dd: '%d áááº', 18997 M: 'áá áºá', 18998 MM: '%d á', 18999 y: 'áá áºáá¾á áº', 19000 yy: '%d áá¾á áº', 19001 }, 19002 preparse: function (string) { 19003 return string.replace(/[ááááá ááááá]/g, function (match) { 19004 return numberMap$c[match]; 19005 }); 19006 }, 19007 postformat: function (string) { 19008 return string.replace(/\d/g, function (match) { 19009 return symbolMap$d[match]; 19010 }); 19011 }, 19012 week: { 19013 dow: 1, // Monday is the first day of the week. 19014 doy: 4, // The week that contains Jan 4th is the first week of the year. 19015 }, 19016 }); 19017 19018 //! moment.js locale configuration 19019 19020 hooks.defineLocale('nb', { 19021 months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( 19022 '_' 19023 ), 19024 monthsShort: 19025 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), 19026 monthsParseExact: true, 19027 weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 19028 weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), 19029 weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), 19030 weekdaysParseExact: true, 19031 longDateFormat: { 19032 LT: 'HH:mm', 19033 LTS: 'HH:mm:ss', 19034 L: 'DD.MM.YYYY', 19035 LL: 'D. MMMM YYYY', 19036 LLL: 'D. MMMM YYYY [kl.] HH:mm', 19037 LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', 19038 }, 19039 calendar: { 19040 sameDay: '[i dag kl.] LT', 19041 nextDay: '[i morgen kl.] LT', 19042 nextWeek: 'dddd [kl.] LT', 19043 lastDay: '[i gÃ¥r kl.] LT', 19044 lastWeek: '[forrige] dddd [kl.] LT', 19045 sameElse: 'L', 19046 }, 19047 relativeTime: { 19048 future: 'om %s', 19049 past: '%s siden', 19050 s: 'noen sekunder', 19051 ss: '%d sekunder', 19052 m: 'ett minutt', 19053 mm: '%d minutter', 19054 h: 'en time', 19055 hh: '%d timer', 19056 d: 'en dag', 19057 dd: '%d dager', 19058 w: 'en uke', 19059 ww: '%d uker', 19060 M: 'en mÃ¥ned', 19061 MM: '%d mÃ¥neder', 19062 y: 'ett Ã¥r', 19063 yy: '%d Ã¥r', 19064 }, 19065 dayOfMonthOrdinalParse: /\d{1,2}\./, 19066 ordinal: '%d.', 19067 week: { 19068 dow: 1, // Monday is the first day of the week. 19069 doy: 4, // The week that contains Jan 4th is the first week of the year. 19070 }, 19071 }); 19072 19073 //! moment.js locale configuration 19074 19075 var symbolMap$e = { 19076 1: '१', 19077 2: '२', 19078 3: '३', 19079 4: '४', 19080 5: '५', 19081 6: '६', 19082 7: 'à¥', 19083 8: '८', 19084 9: '९', 19085 0: '०', 19086 }, 19087 numberMap$d = { 19088 '१': '1', 19089 '२': '2', 19090 '३': '3', 19091 '४': '4', 19092 '५': '5', 19093 '६': '6', 19094 'à¥': '7', 19095 '८': '8', 19096 '९': '9', 19097 '०': '0', 19098 }; 19099 19100 hooks.defineLocale('ne', { 19101 months: 'à¤à¤¨à¤µà¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤°à¥_मारà¥à¤_ठपà¥à¤°à¤¿à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤·à¥à¤_सà¥à¤ªà¥à¤à¥à¤®à¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नà¥à¤à¥à¤®à¥à¤¬à¤°_डिसà¥à¤®à¥à¤¬à¤°'.split( 19102 '_' 19103 ), 19104 monthsShort: 19105 'à¤à¤¨._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_ठपà¥à¤°à¤¿._मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤._ठà¤._सà¥à¤ªà¥à¤._ठà¤à¥à¤à¥._नà¥à¤à¥._डिसà¥.'.split( 19106 '_' 19107 ), 19108 monthsParseExact: true, 19109 weekdays: 'à¤à¤à¤¤à¤¬à¤¾à¤°_सà¥à¤®à¤¬à¤¾à¤°_मà¤à¥à¤à¤²à¤¬à¤¾à¤°_बà¥à¤§à¤¬à¤¾à¤°_बिहिबार_शà¥à¤à¥à¤°à¤¬à¤¾à¤°_शनिबार'.split( 19110 '_' 19111 ), 19112 weekdaysShort: 'à¤à¤à¤¤._सà¥à¤®._मà¤à¥à¤à¤²._बà¥à¤§._बिहि._शà¥à¤à¥à¤°._शनि.'.split('_'), 19113 weekdaysMin: 'à¤._सà¥._मà¤._बà¥._बि._शà¥._श.'.split('_'), 19114 weekdaysParseExact: true, 19115 longDateFormat: { 19116 LT: 'Aà¤à¥ h:mm बà¤à¥', 19117 LTS: 'Aà¤à¥ h:mm:ss बà¤à¥', 19118 L: 'DD/MM/YYYY', 19119 LL: 'D MMMM YYYY', 19120 LLL: 'D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥', 19121 LLLL: 'dddd, D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥', 19122 }, 19123 preparse: function (string) { 19124 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 19125 return numberMap$d[match]; 19126 }); 19127 }, 19128 postformat: function (string) { 19129 return string.replace(/\d/g, function (match) { 19130 return symbolMap$e[match]; 19131 }); 19132 },
vendor: 4,970 bytes, lines 19133-19272
19133 meridiemParse: /राति|बिहान|दिà¤à¤à¤¸à¥|साà¤à¤/, 19134 meridiemHour: function (hour, meridiem) { 19135 if (hour === 12) { 19136 hour = 0; 19137 } 19138 if (meridiem === 'राति') { 19139 return hour < 4 ? hour : hour + 12; 19140 } else if (meridiem === 'बिहान') { 19141 return hour; 19142 } else if (meridiem === 'दिà¤à¤à¤¸à¥') { 19143 return hour >= 10 ? hour : hour + 12; 19144 } else if (meridiem === 'साà¤à¤') { 19145 return hour + 12; 19146 } 19147 }, 19148 meridiem: function (hour, minute, isLower) { 19149 if (hour < 3) { 19150 return 'राति'; 19151 } else if (hour < 12) { 19152 return 'बिहान'; 19153 } else if (hour < 16) { 19154 return 'दिà¤à¤à¤¸à¥'; 19155 } else if (hour < 20) { 19156 return 'साà¤à¤'; 19157 } else { 19158 return 'राति'; 19159 } 19160 }, 19161 calendar: { 19162 sameDay: '[à¤à¤] LT', 19163 nextDay: '[à¤à¥à¤²à¤¿] LT', 19164 nextWeek: '[à¤à¤à¤à¤¦à¥] dddd[,] LT', 19165 lastDay: '[हिà¤à¥] LT', 19166 lastWeek: '[à¤à¤à¤à¥] dddd[,] LT', 19167 sameElse: 'L', 19168 }, 19169 relativeTime: { 19170 future: '%sमा', 19171 past: '%s ठà¤à¤¾à¤¡à¤¿', 19172 s: 'à¤à¥à¤¹à¥ à¤à¥à¤·à¤£', 19173 ss: '%d सà¥à¤à¥à¤£à¥à¤¡', 19174 m: 'à¤à¤ मिनà¥à¤', 19175 mm: '%d मिनà¥à¤', 19176 h: 'à¤à¤ à¤à¤£à¥à¤à¤¾', 19177 hh: '%d à¤à¤£à¥à¤à¤¾', 19178 d: 'à¤à¤ दिन', 19179 dd: '%d दिन', 19180 M: 'à¤à¤ महिना', 19181 MM: '%d महिना', 19182 y: 'à¤à¤ बरà¥à¤·', 19183 yy: '%d बरà¥à¤·', 19184 }, 19185 week: { 19186 dow: 0, // Sunday is the first day of the week. 19187 doy: 6, // The week that contains Jan 6th is the first week of the year. 19188 }, 19189 }); 19190 19191 //! moment.js locale configuration 19192 19193 var monthsShortWithDots$1 = 19194 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), 19195 monthsShortWithoutDots$1 = 19196 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'), 19197 monthsParse$8 = [ 19198 /^jan/i, 19199 /^feb/i, 19200 /^maart|mrt.?$/i, 19201 /^apr/i, 19202 /^mei$/i, 19203 /^jun[i.]?$/i, 19204 /^jul[i.]?$/i, 19205 /^aug/i, 19206 /^sep/i, 19207 /^okt/i, 19208 /^nov/i, 19209 /^dec/i, 19210 ], 19211 monthsRegex$8 = 19212 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; 19213 19214 hooks.defineLocale('nl-be', { 19215 months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( 19216 '_' 19217 ), 19218 monthsShort: function (m, format) { 19219 if (!m) { 19220 return monthsShortWithDots$1; 19221 } else if (/-MMM-/.test(format)) { 19222 return monthsShortWithoutDots$1[m.month()]; 19223 } else { 19224 return monthsShortWithDots$1[m.month()]; 19225 } 19226 }, 19227 19228 monthsRegex: monthsRegex$8, 19229 monthsShortRegex: monthsRegex$8, 19230 monthsStrictRegex: 19231 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, 19232 monthsShortStrictRegex: 19233 /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, 19234 19235 monthsParse: monthsParse$8, 19236 longMonthsParse: monthsParse$8, 19237 shortMonthsParse: monthsParse$8, 19238 19239 weekdays: 19240 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), 19241 weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), 19242 weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), 19243 weekdaysParseExact: true, 19244 longDateFormat: { 19245 LT: 'HH:mm', 19246 LTS: 'HH:mm:ss', 19247 L: 'DD/MM/YYYY', 19248 LL: 'D MMMM YYYY', 19249 LLL: 'D MMMM YYYY HH:mm', 19250 LLLL: 'dddd D MMMM YYYY HH:mm', 19251 }, 19252 calendar: { 19253 sameDay: '[vandaag om] LT', 19254 nextDay: '[morgen om] LT', 19255 nextWeek: 'dddd [om] LT', 19256 lastDay: '[gisteren om] LT', 19257 lastWeek: '[afgelopen] dddd [om] LT', 19258 sameElse: 'L', 19259 }, 19260 relativeTime: { 19261 future: 'over %s', 19262 past: '%s geleden', 19263 s: 'een paar seconden', 19264 ss: '%d seconden', 19265 m: 'één minuut', 19266 mm: '%d minuten', 19267 h: 'één uur', 19268 hh: '%d uur', 19269 d: 'één dag', 19270 dd: '%d dagen', 19271 M: 'één maand', 19272 MM: '%d maanden',
vendor: 4,329 bytes, lines 19273-19398
19273 y: 'één jaar', 19274 yy: '%d jaar', 19275 }, 19276 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 19277 ordinal: function (number) { 19278 return ( 19279 number + 19280 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 19281 ); 19282 }, 19283 week: { 19284 dow: 1, // Monday is the first day of the week. 19285 doy: 4, // The week that contains Jan 4th is the first week of the year. 19286 }, 19287 }); 19288 19289 //! moment.js locale configuration 19290 19291 var monthsShortWithDots$2 = 19292 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), 19293 monthsShortWithoutDots$2 = 19294 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'), 19295 monthsParse$9 = [ 19296 /^jan/i, 19297 /^feb/i, 19298 /^maart|mrt.?$/i, 19299 /^apr/i, 19300 /^mei$/i, 19301 /^jun[i.]?$/i, 19302 /^jul[i.]?$/i, 19303 /^aug/i, 19304 /^sep/i, 19305 /^okt/i, 19306 /^nov/i, 19307 /^dec/i, 19308 ], 19309 monthsRegex$9 = 19310 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; 19311 19312 hooks.defineLocale('nl', { 19313 months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( 19314 '_' 19315 ), 19316 monthsShort: function (m, format) { 19317 if (!m) { 19318 return monthsShortWithDots$2; 19319 } else if (/-MMM-/.test(format)) { 19320 return monthsShortWithoutDots$2[m.month()]; 19321 } else { 19322 return monthsShortWithDots$2[m.month()]; 19323 } 19324 }, 19325 19326 monthsRegex: monthsRegex$9, 19327 monthsShortRegex: monthsRegex$9, 19328 monthsStrictRegex: 19329 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, 19330 monthsShortStrictRegex: 19331 /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, 19332 19333 monthsParse: monthsParse$9, 19334 longMonthsParse: monthsParse$9, 19335 shortMonthsParse: monthsParse$9, 19336 19337 weekdays: 19338 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), 19339 weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), 19340 weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), 19341 weekdaysParseExact: true, 19342 longDateFormat: { 19343 LT: 'HH:mm', 19344 LTS: 'HH:mm:ss', 19345 L: 'DD-MM-YYYY', 19346 LL: 'D MMMM YYYY', 19347 LLL: 'D MMMM YYYY HH:mm', 19348 LLLL: 'dddd D MMMM YYYY HH:mm', 19349 }, 19350 calendar: { 19351 sameDay: '[vandaag om] LT', 19352 nextDay: '[morgen om] LT', 19353 nextWeek: 'dddd [om] LT', 19354 lastDay: '[gisteren om] LT', 19355 lastWeek: '[afgelopen] dddd [om] LT', 19356 sameElse: 'L', 19357 }, 19358 relativeTime: { 19359 future: 'over %s', 19360 past: '%s geleden', 19361 s: 'een paar seconden', 19362 ss: '%d seconden', 19363 m: 'één minuut', 19364 mm: '%d minuten', 19365 h: 'één uur', 19366 hh: '%d uur', 19367 d: 'één dag', 19368 dd: '%d dagen', 19369 w: 'één week', 19370 ww: '%d weken', 19371 M: 'één maand', 19372 MM: '%d maanden', 19373 y: 'één jaar', 19374 yy: '%d jaar', 19375 }, 19376 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 19377 ordinal: function (number) { 19378 return ( 19379 number + 19380 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 19381 ); 19382 }, 19383 week: { 19384 dow: 1, // Monday is the first day of the week. 19385 doy: 4, // The week that contains Jan 4th is the first week of the year. 19386 }, 19387 }); 19388 19389 //! moment.js locale configuration 19390 19391 hooks.defineLocale('nn', { 19392 months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( 19393 '_' 19394 ), 19395 monthsShort: 19396 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), 19397 monthsParseExact: true, 19398 weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
19399 weekdaysShort: 'su._mÃ¥._ty._on._to._fr._lau.'.split('_'), 19400 weekdaysMin: 'su_mÃ¥_ty_on_to_fr_la'.split('_'), 19401 weekdaysParseExact: true, 19402 longDateFormat: { 19403 LT: 'HH:mm', 19404 LTS: 'HH:mm:ss', 19405 L: 'DD.MM.YYYY', 19406 LL: 'D. MMMM YYYY', 19407 LLL: 'D. MMMM YYYY [kl.] H:mm', 19408 LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', 19409 }, 19410 calendar: { 19411 sameDay: '[I dag klokka] LT', 19412 nextDay: '[I morgon klokka] LT', 19413 nextWeek: 'dddd [klokka] LT', 19414 lastDay: '[I gÃ¥r klokka] LT', 19415 lastWeek: '[FøregÃ¥ande] dddd [klokka] LT', 19416 sameElse: 'L', 19417 }, 19418 relativeTime: { 19419 future: 'om %s', 19420 past: '%s sidan', 19421 s: 'nokre sekund', 19422 ss: '%d sekund', 19423 m: 'eit minutt', 19424 mm: '%d minutt', 19425 h: 'ein time', 19426 hh: '%d timar', 19427 d: 'ein dag', 19428 dd: '%d dagar', 19429 w: 'ei veke', 19430 ww: '%d veker', 19431 M: 'ein mÃ¥nad', 19432 MM: '%d mÃ¥nader', 19433 y: 'eit Ã¥r', 19434 yy: '%d Ã¥r', 19435 }, 19436 dayOfMonthOrdinalParse: /\d{1,2}\./, 19437 ordinal: '%d.', 19438 week: { 19439 dow: 1, // Monday is the first day of the week. 19440 doy: 4, // The week that contains Jan 4th is the first week of the year. 19441 }, 19442 }); 19443 19444 //! moment.js locale configuration 19445 19446 hooks.defineLocale('oc-lnc', { 19447 months: { 19448 standalone: 19449 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( 19450 '_' 19451 ), 19452 format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( 19453 '_' 19454 ), 19455 isFormat: /D[oD]?(\s)+MMMM/, 19456 }, 19457 monthsShort: 19458 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( 19459 '_' 19460 ), 19461 monthsParseExact: true, 19462 weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( 19463 '_' 19464 ), 19465 weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), 19466 weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), 19467 weekdaysParseExact: true, 19468 longDateFormat: { 19469 LT: 'H:mm', 19470 LTS: 'H:mm:ss', 19471 L: 'DD/MM/YYYY', 19472 LL: 'D MMMM [de] YYYY', 19473 ll: 'D MMM YYYY', 19474 LLL: 'D MMMM [de] YYYY [a] H:mm', 19475 lll: 'D MMM YYYY, H:mm', 19476 LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', 19477 llll: 'ddd D MMM YYYY, H:mm', 19478 }, 19479 calendar: { 19480 sameDay: '[uèi a] LT', 19481 nextDay: '[deman a] LT', 19482 nextWeek: 'dddd [a] LT', 19483 lastDay: '[ièr a] LT', 19484 lastWeek: 'dddd [passat a] LT', 19485 sameElse: 'L', 19486 }, 19487 relativeTime: { 19488 future: "d'aquà %s", 19489 past: 'fa %s', 19490 s: 'unas segondas', 19491 ss: '%d segondas', 19492 m: 'una minuta', 19493 mm: '%d minutas', 19494 h: 'una ora', 19495 hh: '%d oras', 19496 d: 'un jorn', 19497 dd: '%d jorns', 19498 M: 'un mes', 19499 MM: '%d meses', 19500 y: 'un an', 19501 yy: '%d ans', 19502 }, 19503 dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, 19504 ordinal: function (number, period) { 19505 var output = 19506 number === 1 19507 ? 'r' 19508 : number === 2 19509 ? 'n' 19510 : number === 3 19511 ? 'r' 19512 : number === 4 19513 ? 't' 19514 : 'è'; 19515 if (period === 'w' || period === 'W') { 19516 output = 'a'; 19517 } 19518 return number + output; 19519 }, 19520 week: { 19521 dow: 1, // Monday is the first day of the week. 19522 doy: 4, 19523 }, 19524 }); 19525 19526 //! moment.js locale configuration 19527 19528 var symbolMap$f = { 19529 1: 'à©§', 19530 2: '੨', 19531 3: 'à©©', 19532 4: '੪', 19533 5: 'à©«', 19534 6: '੬', 19535 7: 'à©', 19536 8: 'à©®', 19537 9: '੯', 19538 0: '੦', 19539 }, 19540 numberMap$e = { 19541 'à©§': '1', 19542 '੨': '2', 19543 'à©©': '3', 19544 '੪': '4', 19545 'à©«': '5', 19546 '੬': '6', 19547 'à©': '7', 19548 'à©®': '8', 19549 '੯': '9', 19550 '੦': '0', 19551 }; 19552 19553 hooks.defineLocale('pa-in', { 19554 // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. 19555 months: 'à¨à¨¨à¨µà¨°à©_ਫ਼ਰਵਰà©_ਮਾਰà¨_ਠਪà©à¨°à©à¨²_ਮà¨_à¨à©à¨¨_à¨à©à¨²à¨¾à¨_ਠà¨à¨¸à¨¤_ਸਤੰਬਰ_ਠà¨à¨¤à©à¨¬à¨°_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( 19556 '_' 19557 ), 19558 monthsShort: 19559 'à¨à¨¨à¨µà¨°à©_ਫ਼ਰਵਰà©_ਮਾਰà¨_ਠਪà©à¨°à©à¨²_ਮà¨_à¨à©à¨¨_à¨à©à¨²à¨¾à¨_ਠà¨à¨¸à¨¤_ਸਤੰਬਰ_ਠà¨à¨¤à©à¨¬à¨°_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( 19560 '_' 19561 ), 19562 weekdays: 'à¨à¨¤à¨µà¨¾à¨°_ਸà©à¨®à¨µà¨¾à¨°_ਮੰà¨à¨²à¨µà¨¾à¨°_ਬà©à¨§à¨µà¨¾à¨°_ਵà©à¨°à¨µà¨¾à¨°_ਸ਼à©à©±à¨à¨°à¨µà¨¾à¨°_ਸ਼ਨà©à¨à¨°à¨µà¨¾à¨°'.split( 19563 '_' 19564 ), 19565 weekdaysShort: 'à¨à¨¤_ਸà©à¨®_ਮੰà¨à¨²_ਬà©à¨§_ਵà©à¨°_ਸ਼à©à¨à¨°_ਸ਼ਨà©'.split('_'), 19566 weekdaysMin: 'à¨à¨¤_ਸà©à¨®_ਮੰà¨à¨²_ਬà©à¨§_ਵà©à¨°_ਸ਼à©à¨à¨°_ਸ਼ਨà©'.split('_'), 19567 longDateFormat: { 19568 LT: 'A h:mm ਵà¨à©', 19569 LTS: 'A h:mm:ss ਵà¨à©', 19570 L: 'DD/MM/YYYY', 19571 LL: 'D MMMM YYYY', 19572 LLL: 'D MMMM YYYY, A h:mm ਵà¨à©', 19573 LLLL: 'dddd, D MMMM YYYY, A h:mm ਵà¨à©', 19574 }, 19575 calendar: { 19576 sameDay: '[ਠà¨] LT', 19577 nextDay: '[à¨à¨²] LT', 19578 nextWeek: '[ਠà¨à¨²à¨¾] dddd, LT', 19579 lastDay: '[à¨à¨²] LT', 19580 lastWeek: '[ਪਿà¨à¨²à©] dddd, LT', 19581 sameElse: 'L', 19582 }, 19583 relativeTime: { 19584 future: '%s ਵਿੱà¨', 19585 past: '%s ਪਿà¨à¨²à©', 19586 s: 'à¨à©à¨ ਸà¨à¨¿à©°à¨', 19587 ss: '%d ਸà¨à¨¿à©°à¨', 19588 m: 'à¨à¨ ਮਿੰà¨', 19589 mm: '%d ਮਿੰà¨', 19590 h: 'à¨à©±à¨ à¨à©°à¨à¨¾', 19591 hh: '%d à¨à©°à¨à©', 19592 d: 'à¨à©±à¨ ਦਿਨ', 19593 dd: '%d ਦਿਨ', 19594 M: 'à¨à©±à¨ ਮਹà©à¨¨à¨¾', 19595 MM: '%d ਮਹà©à¨¨à©', 19596 y: 'à¨à©±à¨ ਸਾਲ', 19597 yy: '%d ਸਾਲ', 19598 }, 19599 preparse: function (string) { 19600 return string.replace(/[੧੨੩੪੫੬à©à©®à©¯à©¦]/g, function (match) { 19601 return numberMap$e[match]; 19602 }); 19603 }, 19604 postformat: function (string) { 19605 return string.replace(/\d/g, function (match) { 19606 return symbolMap$f[match]; 19607 }); 19608 }, 19609 // Punjabi notation for meridiems are quite fuzzy in practice. While there exists 19610 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. 19611 meridiemParse: /ਰਾਤ|ਸਵà©à¨°|ਦà©à¨ªà¨¹à¨¿à¨°|ਸ਼ਾਮ/, 19612 meridiemHour: function (hour, meridiem) { 19613 if (hour === 12) { 19614 hour = 0; 19615 } 19616 if (meridiem === 'ਰਾਤ') { 19617 return hour < 4 ? hour : hour + 12; 19618 } else if (meridiem === 'ਸਵà©à¨°') { 19619 return hour; 19620 } else if (meridiem === 'ਦà©à¨ªà¨¹à¨¿à¨°') { 19621 return hour >= 10 ? hour : hour + 12; 19622 } else if (meridiem === 'ਸ਼ਾਮ') { 19623 return hour + 12; 19624 } 19625 }, 19626 meridiem: function (hour, minute, isLower) { 19627 if (hour < 4) { 19628 return 'ਰਾਤ'; 19629 } else if (hour < 10) { 19630 return 'ਸਵà©à¨°'; 19631 } else if (hour < 17) { 19632 return 'ਦà©à¨ªà¨¹à¨¿à¨°'; 19633 } else if (hour < 20) { 19634 return 'ਸ਼ਾਮ'; 19635 } else { 19636 return 'ਰਾਤ'; 19637 } 19638 }, 19639 week: { 19640 dow: 0, // Sunday is the first day of the week. 19641 doy: 6, // The week that contains Jan 6th is the first week of the year. 19642 }, 19643 }); 19644 19645 //! moment.js locale configuration 19646 19647 var monthsNominative =
vendor: 24,151 bytes, lines 19648-20309
19648 'styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_październik_listopad_grudzieÅ'.split( 19649 '_' 19650 ), 19651 monthsSubjective = 19652 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_października_listopada_grudnia'.split( 19653 '_' 19654 ), 19655 monthsParse$a = [ 19656 /^sty/i, 19657 /^lut/i, 19658 /^mar/i, 19659 /^kwi/i, 19660 /^maj/i, 19661 /^cze/i, 19662 /^lip/i, 19663 /^sie/i, 19664 /^wrz/i, 19665 /^paź/i, 19666 /^lis/i, 19667 /^gru/i, 19668 ]; 19669 function plural$3(n) { 19670 return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; 19671 } 19672 function translate$8(number, withoutSuffix, key) { 19673 var result = number + ' '; 19674 switch (key) { 19675 case 'ss': 19676 return result + (plural$3(number) ? 'sekundy' : 'sekund'); 19677 case 'm': 19678 return withoutSuffix ? 'minuta' : 'minutÄ'; 19679 case 'mm': 19680 return result + (plural$3(number) ? 'minuty' : 'minut'); 19681 case 'h': 19682 return withoutSuffix ? 'godzina' : 'godzinÄ'; 19683 case 'hh': 19684 return result + (plural$3(number) ? 'godziny' : 'godzin'); 19685 case 'ww': 19686 return result + (plural$3(number) ? 'tygodnie' : 'tygodni'); 19687 case 'MM': 19688 return result + (plural$3(number) ? 'miesiÄ ce' : 'miesiÄcy'); 19689 case 'yy': 19690 return result + (plural$3(number) ? 'lata' : 'lat'); 19691 } 19692 } 19693 19694 hooks.defineLocale('pl', { 19695 months: function (momentToFormat, format) { 19696 if (!momentToFormat) { 19697 return monthsNominative; 19698 } else if (/D MMMM/.test(format)) { 19699 return monthsSubjective[momentToFormat.month()]; 19700 } else { 19701 return monthsNominative[momentToFormat.month()]; 19702 } 19703 }, 19704 monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), 19705 monthsParse: monthsParse$a, 19706 longMonthsParse: monthsParse$a, 19707 shortMonthsParse: monthsParse$a, 19708 weekdays: 19709 'niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄ tek_sobota'.split('_'), 19710 weekdaysShort: 'ndz_pon_wt_År_czw_pt_sob'.split('_'), 19711 weekdaysMin: 'Nd_Pn_Wt_År_Cz_Pt_So'.split('_'), 19712 longDateFormat: { 19713 LT: 'HH:mm', 19714 LTS: 'HH:mm:ss', 19715 L: 'DD.MM.YYYY', 19716 LL: 'D MMMM YYYY', 19717 LLL: 'D MMMM YYYY HH:mm', 19718 LLLL: 'dddd, D MMMM YYYY HH:mm', 19719 }, 19720 calendar: { 19721 sameDay: '[DziÅ o] LT', 19722 nextDay: '[Jutro o] LT', 19723 nextWeek: function () { 19724 switch (this.day()) { 19725 case 0: 19726 return '[W niedzielÄ o] LT'; 19727 19728 case 2: 19729 return '[We wtorek o] LT'; 19730 19731 case 3: 19732 return '[W ÅrodÄ o] LT'; 19733 19734 case 6: 19735 return '[W sobotÄ o] LT'; 19736 19737 default: 19738 return '[W] dddd [o] LT'; 19739 } 19740 }, 19741 lastDay: '[Wczoraj o] LT', 19742 lastWeek: function () { 19743 switch (this.day()) { 19744 case 0: 19745 return '[W zeszÅÄ niedzielÄ o] LT'; 19746 case 3: 19747 return '[W zeszÅÄ ÅrodÄ o] LT'; 19748 case 6: 19749 return '[W zeszÅÄ sobotÄ o] LT'; 19750 default: 19751 return '[W zeszÅy] dddd [o] LT'; 19752 } 19753 }, 19754 sameElse: 'L', 19755 }, 19756 relativeTime: { 19757 future: 'za %s', 19758 past: '%s temu', 19759 s: 'kilka sekund', 19760 ss: translate$8, 19761 m: translate$8, 19762 mm: translate$8, 19763 h: translate$8, 19764 hh: translate$8, 19765 d: '1 dzieÅ', 19766 dd: '%d dni', 19767 w: 'tydzieÅ', 19768 ww: translate$8, 19769 M: 'miesiÄ c', 19770 MM: translate$8, 19771 y: 'rok', 19772 yy: translate$8, 19773 }, 19774 dayOfMonthOrdinalParse: /\d{1,2}\./, 19775 ordinal: '%d.', 19776 week: { 19777 dow: 1, // Monday is the first day of the week. 19778 doy: 4, // The week that contains Jan 4th is the first week of the year. 19779 }, 19780 }); 19781 19782 //! moment.js locale configuration 19783 19784 hooks.defineLocale('pt-br', { 19785 months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( 19786 '_' 19787 ), 19788 monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), 19789 weekdays: 19790 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( 19791 '_' 19792 ), 19793 weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), 19794 weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), 19795 weekdaysParseExact: true, 19796 longDateFormat: { 19797 LT: 'HH:mm', 19798 LTS: 'HH:mm:ss', 19799 L: 'DD/MM/YYYY', 19800 LL: 'D [de] MMMM [de] YYYY', 19801 LLL: 'D [de] MMMM [de] YYYY [à s] HH:mm', 19802 LLLL: 'dddd, D [de] MMMM [de] YYYY [à s] HH:mm', 19803 }, 19804 calendar: { 19805 sameDay: '[Hoje à s] LT', 19806 nextDay: '[Amanhã à s] LT', 19807 nextWeek: 'dddd [à s] LT', 19808 lastDay: '[Ontem à s] LT', 19809 lastWeek: function () { 19810 return this.day() === 0 || this.day() === 6 19811 ? '[Ãltimo] dddd [à s] LT' // Saturday + Sunday 19812 : '[Ãltima] dddd [à s] LT'; // Monday - Friday 19813 }, 19814 sameElse: 'L', 19815 }, 19816 relativeTime: { 19817 future: 'em %s', 19818 past: 'há %s', 19819 s: 'poucos segundos', 19820 ss: '%d segundos', 19821 m: 'um minuto', 19822 mm: '%d minutos', 19823 h: 'uma hora', 19824 hh: '%d horas', 19825 d: 'um dia', 19826 dd: '%d dias', 19827 M: 'um mês', 19828 MM: '%d meses', 19829 y: 'um ano', 19830 yy: '%d anos', 19831 }, 19832 dayOfMonthOrdinalParse: /\d{1,2}º/, 19833 ordinal: '%dº', 19834 invalidDate: 'Data inválida', 19835 }); 19836 19837 //! moment.js locale configuration 19838 19839 hooks.defineLocale('pt', { 19840 months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( 19841 '_' 19842 ), 19843 monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), 19844 weekdays: 19845 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( 19846 '_' 19847 ), 19848 weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), 19849 weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), 19850 weekdaysParseExact: true, 19851 longDateFormat: { 19852 LT: 'HH:mm', 19853 LTS: 'HH:mm:ss', 19854 L: 'DD/MM/YYYY', 19855 LL: 'D [de] MMMM [de] YYYY', 19856 LLL: 'D [de] MMMM [de] YYYY HH:mm', 19857 LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', 19858 }, 19859 calendar: { 19860 sameDay: '[Hoje à s] LT', 19861 nextDay: '[Amanhã à s] LT', 19862 nextWeek: 'dddd [à s] LT', 19863 lastDay: '[Ontem à s] LT', 19864 lastWeek: function () { 19865 return this.day() === 0 || this.day() === 6 19866 ? '[Ãltimo] dddd [à s] LT' // Saturday + Sunday 19867 : '[Ãltima] dddd [à s] LT'; // Monday - Friday 19868 }, 19869 sameElse: 'L', 19870 }, 19871 relativeTime: { 19872 future: 'em %s', 19873 past: 'há %s', 19874 s: 'segundos', 19875 ss: '%d segundos', 19876 m: 'um minuto', 19877 mm: '%d minutos', 19878 h: 'uma hora', 19879 hh: '%d horas', 19880 d: 'um dia', 19881 dd: '%d dias', 19882 w: 'uma semana', 19883 ww: '%d semanas', 19884 M: 'um mês', 19885 MM: '%d meses', 19886 y: 'um ano', 19887 yy: '%d anos', 19888 }, 19889 dayOfMonthOrdinalParse: /\d{1,2}º/, 19890 ordinal: '%dº', 19891 week: { 19892 dow: 1, // Monday is the first day of the week. 19893 doy: 4, // The week that contains Jan 4th is the first week of the year. 19894 }, 19895 }); 19896 19897 //! moment.js locale configuration 19898 19899 function relativeTimeWithPlural$2(number, withoutSuffix, key) { 19900 var format = { 19901 ss: 'secunde', 19902 mm: 'minute', 19903 hh: 'ore', 19904 dd: 'zile', 19905 ww: 'sÄptÄmâni', 19906 MM: 'luni', 19907 yy: 'ani', 19908 }, 19909 separator = ' '; 19910 if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { 19911 separator = ' de '; 19912 } 19913 return number + separator + format[key]; 19914 } 19915 19916 hooks.defineLocale('ro', { 19917 months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( 19918 '_' 19919 ), 19920 monthsShort: 19921 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( 19922 '_' 19923 ), 19924 monthsParseExact: true, 19925 weekdays: 'duminicÄ_luni_marÈi_miercuri_joi_vineri_sâmbÄtÄ'.split('_'), 19926 weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), 19927 weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), 19928 longDateFormat: { 19929 LT: 'H:mm', 19930 LTS: 'H:mm:ss', 19931 L: 'DD.MM.YYYY', 19932 LL: 'D MMMM YYYY', 19933 LLL: 'D MMMM YYYY H:mm', 19934 LLLL: 'dddd, D MMMM YYYY H:mm', 19935 }, 19936 calendar: { 19937 sameDay: '[azi la] LT', 19938 nextDay: '[mâine la] LT', 19939 nextWeek: 'dddd [la] LT', 19940 lastDay: '[ieri la] LT', 19941 lastWeek: '[fosta] dddd [la] LT', 19942 sameElse: 'L', 19943 }, 19944 relativeTime: { 19945 future: 'peste %s', 19946 past: '%s în urmÄ', 19947 s: 'câteva secunde', 19948 ss: relativeTimeWithPlural$2, 19949 m: 'un minut', 19950 mm: relativeTimeWithPlural$2, 19951 h: 'o orÄ', 19952 hh: relativeTimeWithPlural$2, 19953 d: 'o zi', 19954 dd: relativeTimeWithPlural$2, 19955 w: 'o sÄptÄmânÄ', 19956 ww: relativeTimeWithPlural$2, 19957 M: 'o lunÄ', 19958 MM: relativeTimeWithPlural$2, 19959 y: 'un an', 19960 yy: relativeTimeWithPlural$2, 19961 }, 19962 week: { 19963 dow: 1, // Monday is the first day of the week. 19964 doy: 7, // The week that contains Jan 7th is the first week of the year. 19965 }, 19966 }); 19967 19968 //! moment.js locale configuration 19969 19970 function plural$4(word, num) { 19971 var forms = word.split('_'); 19972 return num % 10 === 1 && num % 100 !== 11 19973 ? forms[0] 19974 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 19975 ? forms[1] 19976 : forms[2]; 19977 } 19978 function relativeTimeWithPlural$3(number, withoutSuffix, key) { 19979 var format = { 19980 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑндÑ_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑндÑ_ÑекÑнд', 19981 mm: withoutSuffix ? 'минÑÑа_минÑÑÑ_минÑÑ' : 'минÑÑÑ_минÑÑÑ_минÑÑ', 19982 hh: 'ÑаÑ_ÑаÑа_ÑаÑов', 19983 dd: 'денÑ_днÑ_дней', 19984 ww: 'неделÑ_недели_неделÑ', 19985 MM: 'меÑÑÑ_меÑÑÑа_меÑÑÑев', 19986 yy: 'год_года_леÑ', 19987 }; 19988 if (key === 'm') { 19989 return withoutSuffix ? 'минÑÑа' : 'минÑÑÑ'; 19990 } else { 19991 return number + ' ' + plural$4(format[key], +number); 19992 } 19993 } 19994 var monthsParse$b = [ 19995 /^Ñнв/i, 19996 /^Ñев/i, 19997 /^маÑ/i, 19998 /^апÑ/i, 19999 /^ма[йÑ]/i, 20000 /^иÑн/i, 20001 /^иÑл/i, 20002 /^авг/i, 20003 /^Ñен/i, 20004 /^окÑ/i, 20005 /^ноÑ/i, 20006 /^дек/i, 20007 ]; 20008 20009 // http://new.gramota.ru/spravka/rules/139-prop : § 103 20010 // СокÑаÑÐµÐ½Ð¸Ñ Ð¼ÐµÑÑÑев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 20011 // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 20012 hooks.defineLocale('ru', { 20013 months: { 20014 format: 'ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 20015 '_' 20016 ), 20017 standalone: 20018 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 20019 '_' 20020 ), 20021 }, 20022 monthsShort: { 20023 // по CLDR именно "иÑл." и "иÑн.", но какой ÑмÑÑл менÑÑÑ Ð±ÑÐºÐ²Ñ Ð½Ð° ÑоÑкÑ? 20024 format: 'Ñнв._ÑевÑ._маÑ._апÑ._маÑ_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.'.split( 20025 '_' 20026 ), 20027 standalone: 20028 'Ñнв._ÑевÑ._маÑÑ_апÑ._май_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.'.split( 20029 '_' 20030 ), 20031 }, 20032 weekdays: { 20033 standalone: 20034 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа'.split( 20035 '_' 20036 ), 20037 format: 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ'.split( 20038 '_' 20039 ), 20040 isFormat: /\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ|ÑÑÑ)? ?] ?dddd/, 20041 }, 20042 weekdaysShort: 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 20043 weekdaysMin: 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 20044 monthsParse: monthsParse$b, 20045 longMonthsParse: monthsParse$b, 20046 shortMonthsParse: monthsParse$b, 20047 20048 // полнÑе Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸, по ÑÑи бÑквÑ, Ð´Ð»Ñ Ð½ÐµÐºÐ¾ÑоÑÑÑ , по 4 бÑквÑ, ÑокÑаÑÐµÐ½Ð¸Ñ Ñ ÑоÑкой и без ÑоÑки 20049 monthsRegex: 20050 /^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i, 20051 20052 // ÐºÐ¾Ð¿Ð¸Ñ Ð¿ÑедÑдÑÑего 20053 monthsShortRegex: 20054 /^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i, 20055 20056 // полнÑе Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸ 20057 monthsStrictRegex: 20058 /^(ÑнваÑ[ÑÑ]|ÑевÑал[ÑÑ]|маÑÑа?|апÑел[ÑÑ]|ма[Ñй]|иÑн[ÑÑ]|иÑл[ÑÑ]|авгÑÑÑа?|ÑенÑÑбÑ[ÑÑ]|окÑÑбÑ[ÑÑ]|ноÑбÑ[ÑÑ]|декабÑ[ÑÑ])/i, 20059 20060 // ÐÑÑажение, коÑоÑое ÑооÑвеÑÑÑвÑÐµÑ ÑолÑко ÑокÑаÑÑннÑм ÑоÑмам 20061 monthsShortStrictRegex: 20062 /^(Ñнв\.|ÑевÑ?\.|маÑ[Ñ.]|апÑ\.|ма[Ñй]|иÑн[ÑÑ.]|иÑл[ÑÑ.]|авг\.|ÑенÑ?\.|окÑ\.|ноÑб?\.|дек\.)/i, 20063 longDateFormat: { 20064 LT: 'H:mm', 20065 LTS: 'H:mm:ss', 20066 L: 'DD.MM.YYYY', 20067 LL: 'D MMMM YYYY г.', 20068 LLL: 'D MMMM YYYY г., H:mm', 20069 LLLL: 'dddd, D MMMM YYYY г., H:mm', 20070 }, 20071 calendar: { 20072 sameDay: '[СегоднÑ, в] LT', 20073 nextDay: '[ÐавÑÑа, в] LT', 20074 lastDay: '[ÐÑеÑа, в] LT', 20075 nextWeek: function (now) { 20076 if (now.week() !== this.week()) { 20077 switch (this.day()) { 20078 case 0: 20079 return '[Ð ÑледÑÑÑее] dddd, [в] LT'; 20080 case 1: 20081 case 2: 20082 case 4: 20083 return '[Ð ÑледÑÑÑий] dddd, [в] LT'; 20084 case 3: 20085 case 5: 20086 case 6: 20087 return '[Ð ÑледÑÑÑÑÑ] dddd, [в] LT'; 20088 } 20089 } else { 20090 if (this.day() === 2) { 20091 return '[Ðо] dddd, [в] LT'; 20092 } else { 20093 return '[Ð] dddd, [в] LT'; 20094 } 20095 } 20096 }, 20097 lastWeek: function (now) { 20098 if (now.week() !== this.week()) { 20099 switch (this.day()) { 20100 case 0: 20101 return '[РпÑоÑлое] dddd, [в] LT'; 20102 case 1: 20103 case 2: 20104 case 4: 20105 return '[РпÑоÑлÑй] dddd, [в] LT'; 20106 case 3: 20107 case 5: 20108 case 6: 20109 return '[РпÑоÑлÑÑ] dddd, [в] LT'; 20110 } 20111 } else { 20112 if (this.day() === 2) { 20113 return '[Ðо] dddd, [в] LT'; 20114 } else { 20115 return '[Ð] dddd, [в] LT'; 20116 } 20117 } 20118 }, 20119 sameElse: 'L', 20120 }, 20121 relativeTime: { 20122 future: 'ÑеÑез %s', 20123 past: '%s назад', 20124 s: 'неÑколÑко ÑекÑнд', 20125 ss: relativeTimeWithPlural$3, 20126 m: relativeTimeWithPlural$3, 20127 mm: relativeTimeWithPlural$3, 20128 h: 'ÑаÑ', 20129 hh: relativeTimeWithPlural$3, 20130 d: 'денÑ', 20131 dd: relativeTimeWithPlural$3, 20132 w: 'неделÑ', 20133 ww: relativeTimeWithPlural$3, 20134 M: 'меÑÑÑ', 20135 MM: relativeTimeWithPlural$3, 20136 y: 'год', 20137 yy: relativeTimeWithPlural$3, 20138 }, 20139 meridiemParse: /ноÑи|ÑÑÑа|днÑ|веÑеÑа/i, 20140 isPM: function (input) { 20141 return /^(днÑ|веÑеÑа)$/.test(input); 20142 }, 20143 meridiem: function (hour, minute, isLower) { 20144 if (hour < 4) { 20145 return 'ноÑи'; 20146 } else if (hour < 12) { 20147 return 'ÑÑÑа'; 20148 } else if (hour < 17) { 20149 return 'днÑ'; 20150 } else { 20151 return 'веÑеÑа'; 20152 } 20153 }, 20154 dayOfMonthOrdinalParse: /\d{1,2}-(й|го|Ñ)/, 20155 ordinal: function (number, period) { 20156 switch (period) { 20157 case 'M': 20158 case 'd': 20159 case 'DDD': 20160 return number + '-й'; 20161 case 'D': 20162 return number + '-го'; 20163 case 'w': 20164 case 'W': 20165 return number + '-Ñ'; 20166 default: 20167 return number; 20168 } 20169 }, 20170 week: { 20171 dow: 1, // Monday is the first day of the week. 20172 doy: 4, // The week that contains Jan 4th is the first week of the year. 20173 }, 20174 }); 20175 20176 //! moment.js locale configuration 20177 20178 var months$9 = [ 20179 'جÙÙØ±Ù', 20180 'ÙÙØ¨Ø±ÙرÙ', 20181 '٠ارÚ', 20182 'اپرÙÙ', 20183 '٠ئÙ', 20184 'جÙÙ', 20185 'جÙÙØ§Ø¡Ù', 20186 'آگسٽ', 20187 'سÙپٽ٠بر', 20188 'Ø¢ÚªÙ½ÙØ¨Ø±', 20189 'ÙÙ٠بر', 20190 'ÚØ³Ù بر', 20191 ], 20192 days$1 = ['Ø¢ÚØ±', 'سÙ٠ر', 'اڱارÙ', 'اربع', 'Ø®Ù ÙØ³', 'ج٠ع', 'ÚÙÚØ±']; 20193 20194 hooks.defineLocale('sd', { 20195 months: months$9, 20196 monthsShort: months$9, 20197 weekdays: days$1, 20198 weekdaysShort: days$1, 20199 weekdaysMin: days$1, 20200 longDateFormat: { 20201 LT: 'HH:mm', 20202 LTS: 'HH:mm:ss', 20203 L: 'DD/MM/YYYY', 20204 LL: 'D MMMM YYYY', 20205 LLL: 'D MMMM YYYY HH:mm', 20206 LLLL: 'ddddØ D MMMM YYYY HH:mm', 20207 }, 20208 meridiemParse: /صبØ|شا٠/, 20209 isPM: function (input) { 20210 return 'شا٠' === input; 20211 }, 20212 meridiem: function (hour, minute, isLower) { 20213 if (hour < 12) { 20214 return 'صبØ'; 20215 } 20216 return 'شا٠'; 20217 }, 20218 calendar: { 20219 sameDay: '[اÚ] LT', 20220 nextDay: '[Ø³ÚØ§Ú»Ù] LT', 20221 nextWeek: 'dddd [اڳÙÙ ÙÙØªÙ تÙ] LT', 20222 lastDay: '[ڪاÙÙÙ] LT', 20223 lastWeek: '[گزرÙÙ ÙÙØªÙ] dddd [تÙ] LT', 20224 sameElse: 'L', 20225 }, 20226 relativeTime: { 20227 future: '%s Ù¾ÙØ¡', 20228 past: '%s اڳ', 20229 s: 'ÚÙØ¯ سÙÚªÙÚ', 20230 ss: '%d سÙÚªÙÚ', 20231 m: 'ÙÚª Ù ÙÙ½', 20232 mm: '%d Ù ÙÙ½', 20233 h: 'ÙÚª ÚªÙØ§Úª', 20234 hh: '%d ÚªÙØ§Úª', 20235 d: 'ÙÚª ÚÙÙÙÙ', 20236 dd: '%d ÚÙÙÙÙ', 20237 M: 'ÙÚª Ù ÙÙÙÙ', 20238 MM: '%d Ù ÙÙÙØ§', 20239 y: 'ÙÚª ساÙ', 20240 yy: '%d ساÙ', 20241 }, 20242 preparse: function (string) { 20243 return string.replace(/Ø/g, ','); 20244 }, 20245 postformat: function (string) { 20246 return string.replace(/,/g, 'Ø'); 20247 }, 20248 week: { 20249 dow: 1, // Monday is the first day of the week. 20250 doy: 4, // The week that contains Jan 4th is the first week of the year. 20251 }, 20252 }); 20253 20254 //! moment.js locale configuration 20255 20256 hooks.defineLocale('se', { 20257 months: 'oÄÄajagemánnu_guovvamánnu_njukÄamánnu_cuoÅománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_ÄakÄamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( 20258 '_' 20259 ), 20260 monthsShort: 20261 'oÄÄj_guov_njuk_cuo_mies_geas_suoi_borg_ÄakÄ_golg_skáb_juov'.split('_'), 20262 weekdays: 20263 'sotnabeaivi_vuossárga_maÅÅebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( 20264 '_' 20265 ), 20266 weekdaysShort: 'sotn_vuos_maÅ_gask_duor_bear_láv'.split('_'), 20267 weekdaysMin: 's_v_m_g_d_b_L'.split('_'), 20268 longDateFormat: { 20269 LT: 'HH:mm', 20270 LTS: 'HH:mm:ss', 20271 L: 'DD.MM.YYYY', 20272 LL: 'MMMM D. [b.] YYYY', 20273 LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', 20274 LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', 20275 }, 20276 calendar: { 20277 sameDay: '[otne ti] LT', 20278 nextDay: '[ihttin ti] LT', 20279 nextWeek: 'dddd [ti] LT', 20280 lastDay: '[ikte ti] LT', 20281 lastWeek: '[ovddit] dddd [ti] LT', 20282 sameElse: 'L', 20283 }, 20284 relativeTime: { 20285 future: '%s geažes', 20286 past: 'maÅit %s', 20287 s: 'moadde sekunddat', 20288 ss: '%d sekunddat', 20289 m: 'okta minuhta', 20290 mm: '%d minuhtat', 20291 h: 'okta diimmu', 20292 hh: '%d diimmut', 20293 d: 'okta beaivi', 20294 dd: '%d beaivvit', 20295 M: 'okta mánnu', 20296 MM: '%d mánut', 20297 y: 'okta jahki', 20298 yy: '%d jagit', 20299 }, 20300 dayOfMonthOrdinalParse: /\d{1,2}\./, 20301 ordinal: '%d.', 20302 week: { 20303 dow: 1, // Monday is the first day of the week. 20304 doy: 4, // The week that contains Jan 4th is the first week of the year. 20305 }, 20306 }); 20307 20308 //! moment.js locale configuration 20309
vendor: 16,384 bytes, lines 20310-20722
20310 /*jshint -W100*/ 20311 hooks.defineLocale('si', { 20312 months: 'ජනà·à·à¶»à·_à¶´à·à¶¶à¶»à·à·à¶»à·_මà·à¶»à·à¶à·_à¶ à¶´à·âà¶»à·à¶½à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·à·à·à¶à·_à·à·à¶´à·à¶à·à¶¸à·à¶¶à¶»à·_à¶à¶à·à¶à·à¶¶à¶»à·_à¶±à·à·à·à¶¸à·à¶¶à¶»à·_දà·à·à·à¶¸à·à¶¶à¶»à·'.split( 20313 '_' 20314 ), 20315 monthsShort: 'ජන_à¶´à·à¶¶_මà·à¶»à·_à¶ à¶´à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·_à·à·à¶´à·_à¶à¶à·_à¶±à·à·à·_දà·à·à·'.split( 20316 '_' 20317 ), 20318 weekdays: 20319 'à¶à¶»à·à¶¯à·_à·à¶³à·à¶¯à·_à¶ à¶à·à¶»à·à·à·à¶¯à·_බදà·à¶¯à·_à¶¶à·âà¶»à·à·à·à¶´à¶à·à¶±à·à¶¯à·_à·à·à¶à·à¶»à·à¶¯à·_à·à·à¶±à·à·à¶»à·à¶¯à·'.split( 20320 '_' 20321 ), 20322 weekdaysShort: 'à¶à¶»à·_à·à¶³à·_à¶ à¶_බදà·_à¶¶à·âà¶»à·_à·à·à¶à·_à·à·à¶±'.split('_'), 20323 weekdaysMin: 'à¶_à·_à¶ _à¶¶_à¶¶à·âà¶»_à·à·_à·à·'.split('_'), 20324 weekdaysParseExact: true, 20325 longDateFormat: { 20326 LT: 'a h:mm', 20327 LTS: 'a h:mm:ss', 20328 L: 'YYYY/MM/DD', 20329 LL: 'YYYY MMMM D', 20330 LLL: 'YYYY MMMM D, a h:mm', 20331 LLLL: 'YYYY MMMM D [à·à·à¶±à·] dddd, a h:mm:ss', 20332 }, 20333 calendar: { 20334 sameDay: '[චද] LT[à¶§]', 20335 nextDay: '[à·à·à¶§] LT[à¶§]', 20336 nextWeek: 'dddd LT[à¶§]', 20337 lastDay: '[à¶à¶ºà·] LT[à¶§]', 20338 lastWeek: '[à¶´à·à·à¶à·à¶º] dddd LT[à¶§]', 20339 sameElse: 'L', 20340 }, 20341 relativeTime: { 20342 future: '%sà¶à·à¶±à·', 20343 past: '%sà¶à¶§ à¶´à·à¶»', 20344 s: 'à¶à¶à·à¶´à¶» à¶à·à·à·à¶´à¶º', 20345 ss: 'à¶à¶à·à¶´à¶» %d', 20346 m: 'මà·à¶±à·à¶à·à¶à·à·', 20347 mm: 'මà·à¶±à·à¶à·à¶à· %d', 20348 h: 'à¶´à·à¶º', 20349 hh: 'à¶´à·à¶º %d', 20350 d: 'දà·à¶±à¶º', 20351 dd: 'දà·à¶± %d', 20352 M: 'මà·à·à¶º', 20353 MM: 'මà·à· %d', 20354 y: 'à·à·à¶»', 20355 yy: 'à·à·à¶» %d', 20356 }, 20357 dayOfMonthOrdinalParse: /\d{1,2} à·à·à¶±à·/, 20358 ordinal: function (number) { 20359 return number + ' à·à·à¶±à·'; 20360 }, 20361 meridiemParse: /à¶´à·à¶» à·à¶»à·|à¶´à·à· à·à¶»à·|à¶´à·.à·|à¶´.à·./, 20362 isPM: function (input) { 20363 return input === 'à¶´.à·.' || input === 'à¶´à·à· à·à¶»à·'; 20364 }, 20365 meridiem: function (hours, minutes, isLower) { 20366 if (hours > 11) { 20367 return isLower ? 'à¶´.à·.' : 'à¶´à·à· à·à¶»à·'; 20368 } else { 20369 return isLower ? 'à¶´à·.à·.' : 'à¶´à·à¶» à·à¶»à·'; 20370 } 20371 }, 20372 }); 20373 20374 //! moment.js locale configuration 20375 20376 var months$a = 20377 'január_február_marec_aprÃl_máj_jún_júl_august_september_október_november_december'.split( 20378 '_' 20379 ), 20380 monthsShort$7 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); 20381 function plural$5(n) { 20382 return n > 1 && n < 5; 20383 } 20384 function translate$9(number, withoutSuffix, key, isFuture) { 20385 var result = number + ' '; 20386 switch (key) { 20387 case 's': // a few seconds / in a few seconds / a few seconds ago 20388 return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; 20389 case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago 20390 if (withoutSuffix || isFuture) { 20391 return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); 20392 } else { 20393 return result + 'sekundami'; 20394 } 20395 case 'm': // a minute / in a minute / a minute ago 20396 return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; 20397 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 20398 if (withoutSuffix || isFuture) { 20399 return result + (plural$5(number) ? 'minúty' : 'minút'); 20400 } else { 20401 return result + 'minútami'; 20402 } 20403 case 'h': // an hour / in an hour / an hour ago 20404 return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; 20405 case 'hh': // 9 hours / in 9 hours / 9 hours ago 20406 if (withoutSuffix || isFuture) { 20407 return result + (plural$5(number) ? 'hodiny' : 'hodÃn'); 20408 } else { 20409 return result + 'hodinami'; 20410 } 20411 case 'd': // a day / in a day / a day ago 20412 return withoutSuffix || isFuture ? 'deÅ' : 'dÅom'; 20413 case 'dd': // 9 days / in 9 days / 9 days ago 20414 if (withoutSuffix || isFuture) { 20415 return result + (plural$5(number) ? 'dni' : 'dnÃ'); 20416 } else { 20417 return result + 'dÅami'; 20418 } 20419 case 'M': // a month / in a month / a month ago 20420 return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; 20421 case 'MM': // 9 months / in 9 months / 9 months ago 20422 if (withoutSuffix || isFuture) { 20423 return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); 20424 } else { 20425 return result + 'mesiacmi'; 20426 } 20427 case 'y': // a year / in a year / a year ago 20428 return withoutSuffix || isFuture ? 'rok' : 'rokom'; 20429 case 'yy': // 9 years / in 9 years / 9 years ago 20430 if (withoutSuffix || isFuture) { 20431 return result + (plural$5(number) ? 'roky' : 'rokov'); 20432 } else { 20433 return result + 'rokmi'; 20434 } 20435 } 20436 } 20437 20438 hooks.defineLocale('sk', { 20439 months: months$a, 20440 monthsShort: monthsShort$7, 20441 weekdays: 'nedeľa_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota'.split('_'), 20442 weekdaysShort: 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 20443 weekdaysMin: 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 20444 longDateFormat: { 20445 LT: 'H:mm', 20446 LTS: 'H:mm:ss', 20447 L: 'DD.MM.YYYY', 20448 LL: 'D. MMMM YYYY', 20449 LLL: 'D. MMMM YYYY H:mm', 20450 LLLL: 'dddd D. MMMM YYYY H:mm', 20451 }, 20452 calendar: { 20453 sameDay: '[dnes o] LT', 20454 nextDay: '[zajtra o] LT', 20455 nextWeek: function () { 20456 switch (this.day()) { 20457 case 0: 20458 return '[v nedeľu o] LT'; 20459 case 1: 20460 case 2: 20461 return '[v] dddd [o] LT'; 20462 case 3: 20463 return '[v stredu o] LT'; 20464 case 4: 20465 return '[vo Å¡tvrtok o] LT'; 20466 case 5: 20467 return '[v piatok o] LT'; 20468 case 6: 20469 return '[v sobotu o] LT'; 20470 } 20471 }, 20472 lastDay: '[vÄera o] LT', 20473 lastWeek: function () { 20474 switch (this.day()) { 20475 case 0: 20476 return '[minulú nedeľu o] LT'; 20477 case 1: 20478 case 2: 20479 return '[minulý] dddd [o] LT'; 20480 case 3: 20481 return '[minulú stredu o] LT'; 20482 case 4: 20483 case 5: 20484 return '[minulý] dddd [o] LT'; 20485 case 6: 20486 return '[minulú sobotu o] LT'; 20487 } 20488 }, 20489 sameElse: 'L', 20490 }, 20491 relativeTime: { 20492 future: 'za %s', 20493 past: 'pred %s', 20494 s: translate$9, 20495 ss: translate$9, 20496 m: translate$9, 20497 mm: translate$9, 20498 h: translate$9, 20499 hh: translate$9, 20500 d: translate$9, 20501 dd: translate$9, 20502 M: translate$9, 20503 MM: translate$9, 20504 y: translate$9, 20505 yy: translate$9, 20506 }, 20507 dayOfMonthOrdinalParse: /\d{1,2}\./, 20508 ordinal: '%d.', 20509 week: { 20510 dow: 1, // Monday is the first day of the week. 20511 doy: 4, // The week that contains Jan 4th is the first week of the year. 20512 }, 20513 }); 20514 20515 //! moment.js locale configuration 20516 20517 function processRelativeTime$7(number, withoutSuffix, key, isFuture) { 20518 var result = number + ' '; 20519 switch (key) { 20520 case 's': 20521 return withoutSuffix || isFuture 20522 ? 'nekaj sekund' 20523 : 'nekaj sekundami'; 20524 case 'ss': 20525 if (number === 1) { 20526 result += withoutSuffix ? 'sekundo' : 'sekundi'; 20527 } else if (number === 2) { 20528 result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; 20529 } else if (number < 5) { 20530 result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; 20531 } else { 20532 result += 'sekund'; 20533 } 20534 return result; 20535 case 'm': 20536 return withoutSuffix ? 'ena minuta' : 'eno minuto'; 20537 case 'mm': 20538 if (number === 1) { 20539 result += withoutSuffix ? 'minuta' : 'minuto'; 20540 } else if (number === 2) { 20541 result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; 20542 } else if (number < 5) { 20543 result += withoutSuffix || isFuture ? 'minute' : 'minutami'; 20544 } else { 20545 result += withoutSuffix || isFuture ? 'minut' : 'minutami'; 20546 } 20547 return result; 20548 case 'h': 20549 return withoutSuffix ? 'ena ura' : 'eno uro'; 20550 case 'hh': 20551 if (number === 1) { 20552 result += withoutSuffix ? 'ura' : 'uro'; 20553 } else if (number === 2) { 20554 result += withoutSuffix || isFuture ? 'uri' : 'urama'; 20555 } else if (number < 5) { 20556 result += withoutSuffix || isFuture ? 'ure' : 'urami'; 20557 } else { 20558 result += withoutSuffix || isFuture ? 'ur' : 'urami'; 20559 } 20560 return result; 20561 case 'd': 20562 return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; 20563 case 'dd': 20564 if (number === 1) { 20565 result += withoutSuffix || isFuture ? 'dan' : 'dnem'; 20566 } else if (number === 2) { 20567 result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; 20568 } else { 20569 result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; 20570 } 20571 return result; 20572 case 'M': 20573 return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; 20574 case 'MM': 20575 if (number === 1) { 20576 result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; 20577 } else if (number === 2) { 20578 result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; 20579 } else if (number < 5) { 20580 result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; 20581 } else { 20582 result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; 20583 } 20584 return result; 20585 case 'y': 20586 return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; 20587 case 'yy': 20588 if (number === 1) { 20589 result += withoutSuffix || isFuture ? 'leto' : 'letom'; 20590 } else if (number === 2) { 20591 result += withoutSuffix || isFuture ? 'leti' : 'letoma'; 20592 } else if (number < 5) { 20593 result += withoutSuffix || isFuture ? 'leta' : 'leti'; 20594 } else { 20595 result += withoutSuffix || isFuture ? 'let' : 'leti'; 20596 } 20597 return result; 20598 } 20599 } 20600 20601 hooks.defineLocale('sl', { 20602 months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( 20603 '_' 20604 ), 20605 monthsShort: 20606 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( 20607 '_' 20608 ), 20609 monthsParseExact: true, 20610 weekdays: 'nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota'.split('_'), 20611 weekdaysShort: 'ned._pon._tor._sre._Äet._pet._sob.'.split('_'), 20612 weekdaysMin: 'ne_po_to_sr_Äe_pe_so'.split('_'), 20613 weekdaysParseExact: true, 20614 longDateFormat: { 20615 LT: 'H:mm', 20616 LTS: 'H:mm:ss', 20617 L: 'DD. MM. YYYY', 20618 LL: 'D. MMMM YYYY', 20619 LLL: 'D. MMMM YYYY H:mm', 20620 LLLL: 'dddd, D. MMMM YYYY H:mm', 20621 }, 20622 calendar: { 20623 sameDay: '[danes ob] LT', 20624 nextDay: '[jutri ob] LT', 20625 20626 nextWeek: function () { 20627 switch (this.day()) { 20628 case 0: 20629 return '[v] [nedeljo] [ob] LT'; 20630 case 3: 20631 return '[v] [sredo] [ob] LT'; 20632 case 6: 20633 return '[v] [soboto] [ob] LT'; 20634 case 1: 20635 case 2: 20636 case 4: 20637 case 5: 20638 return '[v] dddd [ob] LT'; 20639 } 20640 }, 20641 lastDay: '[vÄeraj ob] LT', 20642 lastWeek: function () { 20643 switch (this.day()) { 20644 case 0: 20645 return '[prejÅ¡njo] [nedeljo] [ob] LT'; 20646 case 3: 20647 return '[prejÅ¡njo] [sredo] [ob] LT'; 20648 case 6: 20649 return '[prejÅ¡njo] [soboto] [ob] LT'; 20650 case 1: 20651 case 2: 20652 case 4: 20653 case 5: 20654 return '[prejÅ¡nji] dddd [ob] LT'; 20655 } 20656 }, 20657 sameElse: 'L', 20658 }, 20659 relativeTime: { 20660 future: 'Äez %s', 20661 past: 'pred %s', 20662 s: processRelativeTime$7, 20663 ss: processRelativeTime$7, 20664 m: processRelativeTime$7, 20665 mm: processRelativeTime$7, 20666 h: processRelativeTime$7, 20667 hh: processRelativeTime$7, 20668 d: processRelativeTime$7, 20669 dd: processRelativeTime$7, 20670 M: processRelativeTime$7, 20671 MM: processRelativeTime$7, 20672 y: processRelativeTime$7, 20673 yy: processRelativeTime$7, 20674 }, 20675 dayOfMonthOrdinalParse: /\d{1,2}\./, 20676 ordinal: '%d.', 20677 week: { 20678 dow: 1, // Monday is the first day of the week. 20679 doy: 7, // The week that contains Jan 7th is the first week of the year. 20680 }, 20681 }); 20682 20683 //! moment.js locale configuration 20684 20685 hooks.defineLocale('sq', { 20686 months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( 20687 '_' 20688 ), 20689 monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), 20690 weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( 20691 '_' 20692 ), 20693 weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), 20694 weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), 20695 weekdaysParseExact: true, 20696 meridiemParse: /PD|MD/, 20697 isPM: function (input) { 20698 return input.charAt(0) === 'M'; 20699 }, 20700 meridiem: function (hours, minutes, isLower) { 20701 return hours < 12 ? 'PD' : 'MD'; 20702 }, 20703 longDateFormat: { 20704 LT: 'HH:mm', 20705 LTS: 'HH:mm:ss', 20706 L: 'DD/MM/YYYY', 20707 LL: 'D MMMM YYYY', 20708 LLL: 'D MMMM YYYY HH:mm', 20709 LLLL: 'dddd, D MMMM YYYY HH:mm', 20710 }, 20711 calendar: { 20712 sameDay: '[Sot në] LT', 20713 nextDay: '[Nesër në] LT', 20714 nextWeek: 'dddd [në] LT', 20715 lastDay: '[Dje në] LT', 20716 lastWeek: 'dddd [e kaluar në] LT', 20717 sameElse: 'L', 20718 }, 20719 relativeTime: { 20720 future: 'në %s', 20721 past: '%s më parë', 20722
vendor: 10,129 bytes, lines 20722-20993
20722 s: 'disa sekonda', 20723 ss: '%d sekonda', 20724 m: 'një minutë', 20725 mm: '%d minuta', 20726 h: 'një orë', 20727 hh: '%d orë', 20728 d: 'një ditë', 20729 dd: '%d ditë', 20730 M: 'një muaj', 20731 MM: '%d muaj', 20732 y: 'një vit', 20733 yy: '%d vite', 20734 }, 20735 dayOfMonthOrdinalParse: /\d{1,2}\./, 20736 ordinal: '%d.', 20737 week: { 20738 dow: 1, // Monday is the first day of the week. 20739 doy: 4, // The week that contains Jan 4th is the first week of the year. 20740 }, 20741 }); 20742 20743 //! moment.js locale configuration 20744 20745 var translator$1 = { 20746 words: { 20747 //Different grammatical cases 20748 ss: ['ÑекÑнда', 'ÑекÑнде', 'ÑекÑнди'], 20749 m: ['Ñедан минÑÑ', 'Ñедног минÑÑа'], 20750 mm: ['минÑÑ', 'минÑÑа', 'минÑÑа'], 20751 h: ['Ñедан ÑаÑ', 'Ñедног ÑаÑа'], 20752 hh: ['ÑаÑ', 'ÑаÑа', 'ÑаÑи'], 20753 d: ['Ñедан дан', 'Ñедног дана'], 20754 dd: ['дан', 'дана', 'дана'], 20755 M: ['Ñедан меÑеÑ', 'Ñедног меÑеÑа'], 20756 MM: ['меÑеÑ', 'меÑеÑа', 'меÑеÑи'], 20757 y: ['ÑÐµÐ´Ð½Ñ Ð³Ð¾Ð´Ð¸Ð½Ñ', 'Ñедне године'], 20758 yy: ['годинÑ', 'године', 'година'], 20759 }, 20760 correctGrammaticalCase: function (number, wordKey) { 20761 if ( 20762 number % 10 >= 1 && 20763 number % 10 <= 4 && 20764 (number % 100 < 10 || number % 100 >= 20) 20765 ) { 20766 return number % 10 === 1 ? wordKey[0] : wordKey[1]; 20767 } 20768 return wordKey[2]; 20769 }, 20770 translate: function (number, withoutSuffix, key, isFuture) { 20771 var wordKey = translator$1.words[key], 20772 word; 20773 20774 if (key.length === 1) { 20775 // Nominativ 20776 if (key === 'y' && withoutSuffix) return 'Ñедна година'; 20777 return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; 20778 } 20779 20780 word = translator$1.correctGrammaticalCase(number, wordKey); 20781 // Nominativ 20782 if (key === 'yy' && withoutSuffix && word === 'годинÑ') { 20783 return number + ' година'; 20784 } 20785 20786 return number + ' ' + word; 20787 }, 20788 }; 20789 20790 hooks.defineLocale('sr-cyrl', { 20791 months: 'ÑанÑаÑ_ÑебÑÑаÑ_маÑÑ_апÑил_маÑ_ÑÑн_ÑÑл_авгÑÑÑ_ÑепÑембаÑ_окÑобаÑ_новембаÑ_деÑембаÑ'.split( 20792 '_' 20793 ), 20794 monthsShort: 20795 'Ñан._Ñеб._маÑ._апÑ._маÑ_ÑÑн_ÑÑл_авг._Ñеп._окÑ._нов._деÑ.'.split('_'), 20796 monthsParseExact: true, 20797 weekdays: 'недеÑа_понедеÑак_ÑÑоÑак_ÑÑеда_ÑеÑвÑÑак_пеÑак_ÑÑбоÑа'.split('_'), 20798 weekdaysShort: 'нед._пон._ÑÑо._ÑÑе._ÑеÑ._пеÑ._ÑÑб.'.split('_'), 20799 weekdaysMin: 'не_по_ÑÑ_ÑÑ_Ñе_пе_ÑÑ'.split('_'), 20800 weekdaysParseExact: true, 20801 longDateFormat: { 20802 LT: 'H:mm', 20803 LTS: 'H:mm:ss', 20804 L: 'D. M. YYYY.', 20805 LL: 'D. MMMM YYYY.', 20806 LLL: 'D. MMMM YYYY. H:mm', 20807 LLLL: 'dddd, D. MMMM YYYY. H:mm', 20808 }, 20809 calendar: { 20810 sameDay: '[Ð´Ð°Ð½Ð°Ñ Ñ] LT', 20811 nextDay: '[ÑÑÑÑа Ñ] LT', 20812 nextWeek: function () { 20813 switch (this.day()) { 20814 case 0: 20815 return '[Ñ] [недеÑÑ] [Ñ] LT'; 20816 case 3: 20817 return '[Ñ] [ÑÑедÑ] [Ñ] LT'; 20818 case 6: 20819 return '[Ñ] [ÑÑбоÑÑ] [Ñ] LT'; 20820 case 1: 20821 case 2: 20822 case 4: 20823 case 5: 20824 return '[Ñ] dddd [Ñ] LT'; 20825 } 20826 }, 20827 lastDay: '[ÑÑÑе Ñ] LT', 20828 lastWeek: function () { 20829 var lastWeekDays = [ 20830 '[пÑоÑле] [недеÑе] [Ñ] LT', 20831 '[пÑоÑлог] [понедеÑка] [Ñ] LT', 20832 '[пÑоÑлог] [ÑÑоÑка] [Ñ] LT', 20833 '[пÑоÑле] [ÑÑеде] [Ñ] LT', 20834 '[пÑоÑлог] [ÑеÑвÑÑка] [Ñ] LT', 20835 '[пÑоÑлог] [пеÑка] [Ñ] LT', 20836 '[пÑоÑле] [ÑÑбоÑе] [Ñ] LT', 20837 ]; 20838 return lastWeekDays[this.day()]; 20839 }, 20840 sameElse: 'L', 20841 }, 20842 relativeTime: { 20843 future: 'за %s', 20844 past: 'пÑе %s', 20845 s: 'неколико ÑекÑнди', 20846 ss: translator$1.translate, 20847 m: translator$1.translate, 20848 mm: translator$1.translate, 20849 h: translator$1.translate, 20850 hh: translator$1.translate, 20851 d: translator$1.translate, 20852 dd: translator$1.translate, 20853 M: translator$1.translate, 20854 MM: translator$1.translate, 20855 y: translator$1.translate, 20856 yy: translator$1.translate, 20857 }, 20858 dayOfMonthOrdinalParse: /\d{1,2}\./, 20859 ordinal: '%d.', 20860 week: { 20861 dow: 1, // Monday is the first day of the week. 20862 doy: 7, // The week that contains Jan 1st is the first week of the year. 20863 }, 20864 }); 20865 20866 //! moment.js locale configuration 20867 20868 var translator$2 = { 20869 words: { 20870 //Different grammatical cases 20871 ss: ['sekunda', 'sekunde', 'sekundi'], 20872 m: ['jedan minut', 'jednog minuta'], 20873 mm: ['minut', 'minuta', 'minuta'], 20874 h: ['jedan sat', 'jednog sata'], 20875 hh: ['sat', 'sata', 'sati'], 20876 d: ['jedan dan', 'jednog dana'], 20877 dd: ['dan', 'dana', 'dana'], 20878 M: ['jedan mesec', 'jednog meseca'], 20879 MM: ['mesec', 'meseca', 'meseci'], 20880 y: ['jednu godinu', 'jedne godine'], 20881 yy: ['godinu', 'godine', 'godina'], 20882 }, 20883 correctGrammaticalCase: function (number, wordKey) { 20884 if ( 20885 number % 10 >= 1 && 20886 number % 10 <= 4 && 20887 (number % 100 < 10 || number % 100 >= 20) 20888 ) { 20889 return number % 10 === 1 ? wordKey[0] : wordKey[1]; 20890 } 20891 return wordKey[2]; 20892 }, 20893 translate: function (number, withoutSuffix, key, isFuture) { 20894 var wordKey = translator$2.words[key], 20895 word; 20896 20897 if (key.length === 1) { 20898 // Nominativ 20899 if (key === 'y' && withoutSuffix) return 'jedna godina'; 20900 return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; 20901 } 20902 20903 word = translator$2.correctGrammaticalCase(number, wordKey); 20904 // Nominativ 20905 if (key === 'yy' && withoutSuffix && word === 'godinu') { 20906 return number + ' godina'; 20907 } 20908 20909 return number + ' ' + word; 20910 }, 20911 }; 20912 20913 hooks.defineLocale('sr', { 20914 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( 20915 '_' 20916 ), 20917 monthsShort: 20918 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), 20919 monthsParseExact: true, 20920 weekdays: 'nedelja_ponedeljak_utorak_sreda_Äetvrtak_petak_subota'.split( 20921 '_' 20922 ), 20923 weekdaysShort: 'ned._pon._uto._sre._Äet._pet._sub.'.split('_'), 20924 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 20925 weekdaysParseExact: true, 20926 longDateFormat: { 20927 LT: 'H:mm', 20928 LTS: 'H:mm:ss', 20929 L: 'D. M. YYYY.', 20930 LL: 'D. MMMM YYYY.', 20931 LLL: 'D. MMMM YYYY. H:mm', 20932 LLLL: 'dddd, D. MMMM YYYY. H:mm', 20933 }, 20934 calendar: { 20935 sameDay: '[danas u] LT', 20936 nextDay: '[sutra u] LT', 20937 nextWeek: function () { 20938 switch (this.day()) { 20939 case 0: 20940 return '[u] [nedelju] [u] LT'; 20941 case 3: 20942 return '[u] [sredu] [u] LT'; 20943 case 6: 20944 return '[u] [subotu] [u] LT'; 20945 case 1: 20946 case 2: 20947 case 4: 20948 case 5: 20949 return '[u] dddd [u] LT'; 20950 } 20951 }, 20952 lastDay: '[juÄe u] LT', 20953 lastWeek: function () { 20954 var lastWeekDays = [ 20955 '[proÅ¡le] [nedelje] [u] LT', 20956 '[proÅ¡log] [ponedeljka] [u] LT', 20957 '[proÅ¡log] [utorka] [u] LT', 20958 '[proÅ¡le] [srede] [u] LT', 20959 '[proÅ¡log] [Äetvrtka] [u] LT', 20960 '[proÅ¡log] [petka] [u] LT', 20961 '[proÅ¡le] [subote] [u] LT', 20962 ]; 20963 return lastWeekDays[this.day()]; 20964 }, 20965 sameElse: 'L', 20966 }, 20967 relativeTime: { 20968 future: 'za %s', 20969 past: 'pre %s', 20970 s: 'nekoliko sekundi', 20971 ss: translator$2.translate, 20972 m: translator$2.translate, 20973 mm: translator$2.translate, 20974 h: translator$2.translate, 20975 hh: translator$2.translate, 20976 d: translator$2.translate, 20977 dd: translator$2.translate, 20978 M: translator$2.translate, 20979 MM: translator$2.translate, 20980 y: translator$2.translate, 20981 yy: translator$2.translate, 20982 }, 20983 dayOfMonthOrdinalParse: /\d{1,2}\./, 20984 ordinal: '%d.', 20985 week: { 20986 dow: 1, // Monday is the first day of the week. 20987 doy: 7, // The week that contains Jan 7th is the first week of the year. 20988 }, 20989 }); 20990 20991 //! moment.js locale configuration 20992 20993 hooks.defineLocale('ss', {
20994 months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( 20995 '_' 20996 ), 20997 monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), 20998 weekdays: 20999 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( 21000 '_' 21001 ), 21002 weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), 21003 weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), 21004 weekdaysParseExact: true, 21005 longDateFormat: { 21006 LT: 'h:mm A', 21007 LTS: 'h:mm:ss A', 21008 L: 'DD/MM/YYYY', 21009 LL: 'D MMMM YYYY', 21010 LLL: 'D MMMM YYYY h:mm A', 21011 LLLL: 'dddd, D MMMM YYYY h:mm A', 21012 }, 21013 calendar: { 21014 sameDay: '[Namuhla nga] LT', 21015 nextDay: '[Kusasa nga] LT', 21016 nextWeek: 'dddd [nga] LT', 21017 lastDay: '[Itolo nga] LT', 21018 lastWeek: 'dddd [leliphelile] [nga] LT', 21019 sameElse: 'L', 21020 }, 21021 relativeTime: { 21022 future: 'nga %s', 21023 past: 'wenteka nga %s', 21024 s: 'emizuzwana lomcane', 21025 ss: '%d mzuzwana', 21026 m: 'umzuzu', 21027 mm: '%d emizuzu', 21028 h: 'lihora', 21029 hh: '%d emahora', 21030 d: 'lilanga', 21031 dd: '%d emalanga', 21032 M: 'inyanga', 21033 MM: '%d tinyanga', 21034 y: 'umnyaka', 21035 yy: '%d iminyaka', 21036 }, 21037 meridiemParse: /ekuseni|emini|entsambama|ebusuku/, 21038 meridiem: function (hours, minutes, isLower) { 21039 if (hours < 11) { 21040 return 'ekuseni'; 21041 } else if (hours < 15) { 21042 return 'emini'; 21043 } else if (hours < 19) { 21044 return 'entsambama'; 21045 } else { 21046 return 'ebusuku'; 21047 } 21048 }, 21049 meridiemHour: function (hour, meridiem) { 21050 if (hour === 12) { 21051 hour = 0; 21052 } 21053 if (meridiem === 'ekuseni') { 21054 return hour; 21055 } else if (meridiem === 'emini') { 21056 return hour >= 11 ? hour : hour + 12; 21057 } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { 21058 if (hour === 0) { 21059 return 0; 21060 } 21061 return hour + 12; 21062 } 21063 }, 21064 dayOfMonthOrdinalParse: /\d{1,2}/, 21065 ordinal: '%d', 21066 week: { 21067 dow: 1, // Monday is the first day of the week. 21068 doy: 4, // The week that contains Jan 4th is the first week of the year. 21069 }, 21070 }); 21071 21072 //! moment.js locale configuration 21073 21074 hooks.defineLocale('sv', { 21075 months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( 21076 '_' 21077 ), 21078 monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 21079 weekdays: 'söndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), 21080 weekdaysShort: 'sön_mÃ¥n_tis_ons_tor_fre_lör'.split('_'), 21081 weekdaysMin: 'sö_mÃ¥_ti_on_to_fr_lö'.split('_'), 21082 longDateFormat: { 21083 LT: 'HH:mm', 21084 LTS: 'HH:mm:ss', 21085 L: 'YYYY-MM-DD', 21086 LL: 'D MMMM YYYY', 21087 LLL: 'D MMMM YYYY [kl.] HH:mm', 21088 LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', 21089 lll: 'D MMM YYYY HH:mm', 21090 llll: 'ddd D MMM YYYY HH:mm', 21091 }, 21092 calendar: { 21093 sameDay: '[Idag] LT', 21094 nextDay: '[Imorgon] LT', 21095 lastDay: '[IgÃ¥r] LT', 21096 nextWeek: '[PÃ¥] dddd LT', 21097 lastWeek: '[I] dddd[s] LT', 21098 sameElse: 'L', 21099 }, 21100 relativeTime: { 21101 future: 'om %s', 21102 past: 'för %s sedan', 21103 s: 'nÃ¥gra sekunder', 21104 ss: '%d sekunder', 21105 m: 'en minut', 21106 mm: '%d minuter', 21107 h: 'en timme', 21108 hh: '%d timmar', 21109 d: 'en dag', 21110 dd: '%d dagar', 21111 M: 'en mÃ¥nad', 21112 MM: '%d mÃ¥nader', 21113 y: 'ett Ã¥r', 21114 yy: '%d Ã¥r', 21115 }, 21116 dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, 21117 ordinal: function (number) { 21118 var b = number % 10, 21119 output = 21120 ~~((number % 100) / 10) === 1 21121 ? ':e' 21122 : b === 1 21123 ? ':a' 21124 : b === 2 21125 ? ':a' 21126 : b === 3 21127 ? ':e' 21128 : ':e'; 21129 return number + output; 21130 }, 21131 week: { 21132 dow: 1, // Monday is the first day of the week. 21133 doy: 4, // The week that contains Jan 4th is the first week of the year. 21134 }, 21135 }); 21136 21137 //! moment.js locale configuration 21138 21139 hooks.defineLocale('sw', { 21140 months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( 21141 '_' 21142 ), 21143 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), 21144 weekdays: 21145 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( 21146 '_' 21147 ), 21148 weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), 21149 weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), 21150 weekdaysParseExact: true, 21151 longDateFormat: { 21152 LT: 'hh:mm A', 21153 LTS: 'HH:mm:ss', 21154 L: 'DD.MM.YYYY', 21155 LL: 'D MMMM YYYY', 21156 LLL: 'D MMMM YYYY HH:mm', 21157 LLLL: 'dddd, D MMMM YYYY HH:mm', 21158 }, 21159 calendar: { 21160 sameDay: '[leo saa] LT', 21161 nextDay: '[kesho saa] LT', 21162 nextWeek: '[wiki ijayo] dddd [saat] LT', 21163 lastDay: '[jana] LT', 21164 lastWeek: '[wiki iliyopita] dddd [saat] LT', 21165 sameElse: 'L', 21166 }, 21167 relativeTime: { 21168 future: '%s baadaye', 21169 past: 'tokea %s', 21170 s: 'hivi punde', 21171 ss: 'sekunde %d', 21172 m: 'dakika moja', 21173 mm: 'dakika %d', 21174 h: 'saa limoja', 21175 hh: 'masaa %d', 21176 d: 'siku moja', 21177 dd: 'siku %d', 21178 M: 'mwezi mmoja', 21179 MM: 'miezi %d', 21180 y: 'mwaka mmoja', 21181 yy: 'miaka %d', 21182 }, 21183 week: { 21184 dow: 1, // Monday is the first day of the week. 21185 doy: 7, // The week that contains Jan 7th is the first week of the year. 21186 }, 21187 }); 21188 21189 //! moment.js locale configuration 21190 21191 var symbolMap$g = { 21192 1: '௧', 21193 2: '௨', 21194 3: '௩', 21195 4: '௪', 21196 5: '௫', 21197 6: '௬', 21198 7: 'à¯', 21199 8: '௮', 21200 9: '௯', 21201 0: '௦', 21202 }, 21203 numberMap$f = { 21204 '௧': '1', 21205 '௨': '2', 21206 '௩': '3', 21207 '௪': '4', 21208 '௫': '5', 21209 '௬': '6', 21210 'à¯': '7', 21211 '௮': '8', 21212 '௯': '9', 21213 '௦': '0', 21214 }; 21215 21216 hooks.defineLocale('ta', { 21217 months: 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ª
vendor: 14,848 bytes, lines 21217-21590
21217à®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split( 21218 '_' 21219 ), 21220 monthsShort: 21221 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split( 21222 '_' 21223 ), 21224 weekdays: 21225 'à®à®¾à®¯à®¿à®±à¯à®±à¯à®à¯à®à®¿à®´à®®à¯_திà®à¯à®à®à¯à®à®¿à®´à®®à¯_à®à¯à®µà¯à®µà®¾à®¯à¯à®à®¿à®´à®®à¯_பà¯à®¤à®©à¯à®à®¿à®´à®®à¯_வியாழà®à¯à®à®¿à®´à®®à¯_வà¯à®³à¯à®³à®¿à®à¯à®à®¿à®´à®®à¯_à®à®©à®¿à®à¯à®à®¿à®´à®®à¯'.split( 21226 '_' 21227 ), 21228 weekdaysShort: 'à®à®¾à®¯à®¿à®±à¯_திà®à¯à®à®³à¯_à®à¯à®µà¯à®µà®¾à®¯à¯_பà¯à®¤à®©à¯_வியாழனà¯_வà¯à®³à¯à®³à®¿_à®à®©à®¿'.split( 21229 '_' 21230 ), 21231 weekdaysMin: 'à®à®¾_தி_à®à¯_பà¯_வி_வà¯_à®'.split('_'), 21232 longDateFormat: { 21233 LT: 'HH:mm', 21234 LTS: 'HH:mm:ss', 21235 L: 'DD/MM/YYYY', 21236 LL: 'D MMMM YYYY', 21237 LLL: 'D MMMM YYYY, HH:mm', 21238 LLLL: 'dddd, D MMMM YYYY, HH:mm', 21239 }, 21240 calendar: { 21241 sameDay: '[à®à®©à¯à®±à¯] LT', 21242 nextDay: '[நாளà¯] LT', 21243 nextWeek: 'dddd, LT', 21244 lastDay: '[நà¯à®±à¯à®±à¯] LT', 21245 lastWeek: '[à®à®à®¨à¯à®¤ வாரமà¯] dddd, LT', 21246 sameElse: 'L', 21247 }, 21248 relativeTime: { 21249 future: '%s à®à®²à¯', 21250 past: '%s à®®à¯à®©à¯', 21251 s: 'à®à®°à¯ à®à®¿à®² விநாà®à®¿à®à®³à¯', 21252 ss: '%d விநாà®à®¿à®à®³à¯', 21253 m: 'à®à®°à¯ நிமிà®à®®à¯', 21254 mm: '%d நிமிà®à®à¯à®à®³à¯', 21255 h: 'à®à®°à¯ மணி நà¯à®°à®®à¯', 21256 hh: '%d மணி நà¯à®°à®®à¯', 21257 d: 'à®à®°à¯ நாளà¯', 21258 dd: '%d நாà®à¯à®à®³à¯', 21259 M: 'à®à®°à¯ மாதமà¯', 21260 MM: '%d மாதà®à¯à®à®³à¯', 21261 y: 'à®à®°à¯ வரà¯à®à®®à¯', 21262 yy: '%d à®à®£à¯à®à¯à®à®³à¯', 21263 }, 21264 dayOfMonthOrdinalParse: /\d{1,2}வதà¯/, 21265 ordinal: function (number) { 21266 return number + 'வதà¯'; 21267 }, 21268 preparse: function (string) { 21269 return string.replace(/[௧௨௩௪௫௬à¯à¯®à¯¯à¯¦]/g, function (match) { 21270 return numberMap$f[match]; 21271 }); 21272 }, 21273 postformat: function (string) { 21274 return string.replace(/\d/g, function (match) { 21275 return symbolMap$g[match]; 21276 }); 21277 }, 21278 // refer http://ta.wikipedia.org/s/1er1 21279 meridiemParse: /யாமமà¯|வà¯à®à®±à¯|à®à®¾à®²à¯|நணà¯à®ªà®à®²à¯|à®à®±à¯à®ªà®¾à®à¯|மாலà¯/, 21280 meridiem: function (hour, minute, isLower) { 21281 if (hour < 2) { 21282 return ' யாமமà¯'; 21283 } else if (hour < 6) { 21284 return ' வà¯à®à®±à¯'; // வà¯à®à®±à¯ 21285 } else if (hour < 10) { 21286 return ' à®à®¾à®²à¯'; // à®à®¾à®²à¯ 21287 } else if (hour < 14) { 21288 return ' நணà¯à®ªà®à®²à¯'; // நணà¯à®ªà®à®²à¯ 21289 } else if (hour < 18) { 21290 return ' à®à®±à¯à®ªà®¾à®à¯'; // à®à®±à¯à®ªà®¾à®à¯ 21291 } else if (hour < 22) { 21292 return ' மாலà¯'; // மால௠21293 } else { 21294 return ' யாமமà¯'; 21295 } 21296 }, 21297 meridiemHour: function (hour, meridiem) { 21298 if (hour === 12) { 21299 hour = 0; 21300 } 21301 if (meridiem === 'யாமமà¯') { 21302 return hour < 2 ? hour : hour + 12; 21303 } else if (meridiem === 'வà¯à®à®±à¯' || meridiem === 'à®à®¾à®²à¯') { 21304 return hour; 21305 } else if (meridiem === 'நணà¯à®ªà®à®²à¯') { 21306 return hour >= 10 ? hour : hour + 12; 21307 } else { 21308 return hour + 12; 21309 } 21310 }, 21311 week: { 21312 dow: 0, // Sunday is the first day of the week. 21313 doy: 6, // The week that contains Jan 6th is the first week of the year. 21314 }, 21315 }); 21316 21317 //! moment.js locale configuration 21318 21319 hooks.defineLocale('te', { 21320 months: 'à°à°¨à°µà°°à°¿_à°«à°¿à°¬à±à°°à°µà°°à°¿_మారà±à°à°¿_à°à°ªà±à°°à°¿à°²à±_à°®à±_à°à±à°¨à±_à°à±à°²à±_à°à°à°¸à±à°à±_à°¸à±à°ªà±à°à±à°à°¬à°°à±_à° à°à±à°à±à°¬à°°à±_నవà°à°¬à°°à±_à°¡à°¿à°¸à±à°à°¬à°°à±'.split( 21321 '_' 21322 ), 21323 monthsShort: 21324 'à°à°¨._à°«à°¿à°¬à±à°°._మారà±à°à°¿_à°à°ªà±à°°à°¿._à°®à±_à°à±à°¨à±_à°à±à°²à±_à°à°._à°¸à±à°ªà±._à° à°à±à°à±._నవ._à°¡à°¿à°¸à±.'.split( 21325 '_' 21326 ), 21327 monthsParseExact: true, 21328 weekdays: 21329 'à°à°¦à°¿à°µà°¾à°°à°_à°¸à±à°®à°µà°¾à°°à°_à°®à°à°à°³à°µà°¾à°°à°_à°¬à±à°§à°µà°¾à°°à°_à°à±à°°à±à°µà°¾à°°à°_à°¶à±à°à±à°°à°µà°¾à°°à°_శనివారà°'.split( 21330 '_' 21331 ), 21332 weekdaysShort: 'à°à°¦à°¿_à°¸à±à°®_à°®à°à°à°³_à°¬à±à°§_à°à±à°°à±_à°¶à±à°à±à°°_శని'.split('_'), 21333 weekdaysMin: 'à°_à°¸à±_à°®à°_à°¬à±_à°à±_à°¶à±_à°¶'.split('_'), 21334 longDateFormat: { 21335 LT: 'A h:mm', 21336 LTS: 'A h:mm:ss', 21337 L: 'DD/MM/YYYY', 21338 LL: 'D MMMM YYYY', 21339 LLL: 'D MMMM YYYY, A h:mm', 21340 LLLL: 'dddd, D MMMM YYYY, A h:mm', 21341 }, 21342 calendar: { 21343 sameDay: '[à°¨à±à°¡à±] LT', 21344 nextDay: '[à°°à±à°ªà±] LT', 21345 nextWeek: 'dddd, LT', 21346 lastDay: '[నినà±à°¨] LT', 21347 lastWeek: '[à°à°¤] dddd, LT', 21348 sameElse: 'L', 21349 }, 21350 relativeTime: { 21351 future: '%s à°²à±', 21352 past: '%s à°à±à°°à°¿à°¤à°', 21353 s: 'à°à±à°¨à±à°¨à°¿ à°à±à°·à°£à°¾à°²à±', 21354 ss: '%d à°¸à±à°à°¨à±à°²à±', 21355 m: 'à°à° నిమిషà°', 21356 mm: '%d నిమిషాలà±', 21357 h: 'à°à° à°à°à°', 21358 hh: '%d à°à°à°à°²à±', 21359 d: 'à°à° à°°à±à°à±', 21360 dd: '%d à°°à±à°à±à°²à±', 21361 M: 'à°à° à°¨à±à°²', 21362 MM: '%d à°¨à±à°²à°²à±', 21363 y: 'à°à° à°¸à°à°µà°¤à±à°¸à°°à°', 21364 yy: '%d à°¸à°à°µà°¤à±à°¸à°°à°¾à°²à±', 21365 }, 21366 dayOfMonthOrdinalParse: /\d{1,2}à°µ/, 21367 ordinal: '%dà°µ', 21368 meridiemParse: /రాతà±à°°à°¿|à°à°¦à°¯à°|మధà±à°¯à°¾à°¹à±à°¨à°|సాయà°à°¤à±à°°à°/, 21369 meridiemHour: function (hour, meridiem) { 21370 if (hour === 12) { 21371 hour = 0; 21372 } 21373 if (meridiem === 'రాతà±à°°à°¿') { 21374 return hour < 4 ? hour : hour + 12; 21375 } else if (meridiem === 'à°à°¦à°¯à°') { 21376 return hour; 21377 } else if (meridiem === 'మధà±à°¯à°¾à°¹à±à°¨à°') { 21378 return hour >= 10 ? hour : hour + 12; 21379 } else if (meridiem === 'సాయà°à°¤à±à°°à°') { 21380 return hour + 12; 21381 } 21382 }, 21383 meridiem: function (hour, minute, isLower) { 21384 if (hour < 4) { 21385 return 'రాతà±à°°à°¿'; 21386 } else if (hour < 10) { 21387 return 'à°à°¦à°¯à°'; 21388 } else if (hour < 17) { 21389 return 'మధà±à°¯à°¾à°¹à±à°¨à°'; 21390 } else if (hour < 20) { 21391 return 'సాయà°à°¤à±à°°à°'; 21392 } else { 21393 return 'రాతà±à°°à°¿'; 21394 } 21395 }, 21396 week: { 21397 dow: 0, // Sunday is the first day of the week. 21398 doy: 6, // The week that contains Jan 6th is the first week of the year. 21399 }, 21400 }); 21401 21402 //! moment.js locale configuration 21403 21404 hooks.defineLocale('tet', { 21405 months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( 21406 '_' 21407 ), 21408 monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), 21409 weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), 21410 weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), 21411 weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), 21412 longDateFormat: { 21413 LT: 'HH:mm', 21414 LTS: 'HH:mm:ss', 21415 L: 'DD/MM/YYYY', 21416 LL: 'D MMMM YYYY', 21417 LLL: 'D MMMM YYYY HH:mm', 21418 LLLL: 'dddd, D MMMM YYYY HH:mm', 21419 }, 21420 calendar: { 21421 sameDay: '[Ohin iha] LT', 21422 nextDay: '[Aban iha] LT', 21423 nextWeek: 'dddd [iha] LT', 21424 lastDay: '[Horiseik iha] LT', 21425 lastWeek: 'dddd [semana kotuk] [iha] LT', 21426 sameElse: 'L', 21427 }, 21428 relativeTime: { 21429 future: 'iha %s', 21430 past: '%s liuba', 21431 s: 'segundu balun', 21432 ss: 'segundu %d', 21433 m: 'minutu ida', 21434 mm: 'minutu %d', 21435 h: 'oras ida', 21436 hh: 'oras %d', 21437 d: 'loron ida', 21438 dd: 'loron %d', 21439 M: 'fulan ida', 21440 MM: 'fulan %d', 21441 y: 'tinan ida', 21442 yy: 'tinan %d', 21443 }, 21444 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 21445 ordinal: function (number) { 21446 var b = number % 10, 21447 output = 21448 ~~((number % 100) / 10) === 1 21449 ? 'th' 21450 : b === 1 21451 ? 'st' 21452 : b === 2 21453 ? 'nd' 21454 : b === 3 21455 ? 'rd' 21456 : 'th'; 21457 return number + output; 21458 }, 21459 week: { 21460 dow: 1, // Monday is the first day of the week. 21461 doy: 4, // The week that contains Jan 4th is the first week of the year. 21462 }, 21463 }); 21464 21465 //! moment.js locale configuration 21466 21467 var suffixes$3 = { 21468 0: '-Ñм', 21469 1: '-Ñм', 21470 2: '-Ñм', 21471 3: '-Ñм', 21472 4: '-Ñм', 21473 5: '-Ñм', 21474 6: '-Ñм', 21475 7: '-Ñм', 21476 8: '-Ñм', 21477 9: '-Ñм', 21478 10: '-Ñм', 21479 12: '-Ñм', 21480 13: '-Ñм', 21481 20: '-Ñм', 21482 30: '-Ñм', 21483 40: '-Ñм', 21484 50: '-Ñм', 21485 60: '-Ñм', 21486 70: '-Ñм', 21487 80: '-Ñм', 21488 90: '-Ñм', 21489 100: '-Ñм', 21490 }; 21491 21492 hooks.defineLocale('tg', { 21493 months: { 21494 format: 'ÑнваÑи_ÑевÑали_маÑÑи_апÑели_майи_иÑни_иÑли_авгÑÑÑи_ÑенÑÑбÑи_окÑÑбÑи_ноÑбÑи_декабÑи'.split( 21495 '_' 21496 ), 21497 standalone: 21498 'ÑнваÑ_ÑевÑал_маÑÑ_апÑел_май_иÑн_иÑл_авгÑÑÑ_ÑенÑÑбÑ_окÑÑбÑ_ноÑбÑ_декабÑ'.split( 21499 '_' 21500 ), 21501 }, 21502 monthsShort: 'Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 21503 weekdays: 'ÑкÑанбе_дÑÑанбе_ÑеÑанбе_ÑоÑÑанбе_панҷÑанбе_Ò·ÑмÑа_Ñанбе'.split( 21504 '_' 21505 ), 21506 weekdaysShort: 'ÑÑб_дÑб_ÑÑб_ÑÑб_пÑб_Ò·Ñм_Ñнб'.split('_'), 21507 weekdaysMin: 'ÑÑ_дÑ_ÑÑ_ÑÑ_пÑ_ҷм_Ñб'.split('_'), 21508 longDateFormat: { 21509 LT: 'HH:mm', 21510 LTS: 'HH:mm:ss', 21511 L: 'DD.MM.YYYY', 21512 LL: 'D MMMM YYYY', 21513 LLL: 'D MMMM YYYY HH:mm', 21514 LLLL: 'dddd, D MMMM YYYY HH:mm', 21515 }, 21516 calendar: { 21517 sameDay: '[ÐмÑӯз ÑоаÑи] LT', 21518 nextDay: '[ФаÑдо ÑоаÑи] LT', 21519 lastDay: '[ÐиÑӯз ÑоаÑи] LT', 21520 nextWeek: 'dddd[и] [ҳаÑÑаи оÑнда ÑоаÑи] LT', 21521 lastWeek: 'dddd[и] [ҳаÑÑаи гÑзаÑÑа ÑоаÑи] LT', 21522 sameElse: 'L', 21523 }, 21524 relativeTime: { 21525 future: 'баÑди %s', 21526 past: '%s пеÑ', 21527 s: 'ÑкÑанд ÑониÑ', 21528 m: 'Ñк даÒиÒа', 21529 mm: '%d даÒиÒа', 21530 h: 'Ñк ÑоаÑ', 21531 hh: '%d ÑоаÑ', 21532 d: 'Ñк Ñӯз', 21533 dd: '%d Ñӯз', 21534 M: 'Ñк моҳ', 21535 MM: '%d моҳ', 21536 y: 'Ñк Ñол', 21537 yy: '%d Ñол', 21538 }, 21539 meridiemParse: /Ñаб|ÑÑбҳ|Ñӯз|бегоҳ/, 21540 meridiemHour: function (hour, meridiem) { 21541 if (hour === 12) { 21542 hour = 0; 21543 } 21544 if (meridiem === 'Ñаб') { 21545 return hour < 4 ? hour : hour + 12; 21546 } else if (meridiem === 'ÑÑбҳ') { 21547 return hour; 21548 } else if (meridiem === 'Ñӯз') { 21549 return hour >= 11 ? hour : hour + 12; 21550 } else if (meridiem === 'бегоҳ') { 21551 return hour + 12; 21552 } 21553 }, 21554 meridiem: function (hour, minute, isLower) { 21555 if (hour < 4) { 21556 return 'Ñаб'; 21557 } else if (hour < 11) { 21558 return 'ÑÑбҳ'; 21559 } else if (hour < 16) { 21560 return 'Ñӯз'; 21561 } else if (hour < 19) { 21562 return 'бегоҳ'; 21563 } else { 21564 return 'Ñаб'; 21565 } 21566 }, 21567 dayOfMonthOrdinalParse: /\d{1,2}-(Ñм|Ñм)/, 21568 ordinal: function (number) { 21569 var a = number % 10, 21570 b = number >= 100 ? 100 : null; 21571 return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); 21572 }, 21573 week: { 21574 dow: 1, // Monday is the first day of the week. 21575 doy: 7, // The week that contains Jan 1th is the first week of the year. 21576 }, 21577 }); 21578 21579 //! moment.js locale configuration 21580 21581 hooks.defineLocale('th', { 21582 months: 'มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡'.split( 21583 '_' 21584 ), 21585 monthsShort: 21586 'ม.à¸._à¸.à¸._มี.à¸._à¹à¸¡.ย._à¸.à¸._มิ.ย._à¸.à¸._ส.à¸._à¸.ย._à¸.à¸._à¸.ย._à¸.à¸.'.split( 21587 '_' 21588 ), 21589 monthsParseExact: true, 21590 weekdays: 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.
vendor: 6,144 bytes, lines 21590-21767
21590split('_'), 21591 weekdaysShort: 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ª_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.split('_'), // yes, three characters difference 21592 weekdaysMin: 'à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.'.split('_'), 21593 weekdaysParseExact: true, 21594 longDateFormat: { 21595 LT: 'H:mm', 21596 LTS: 'H:mm:ss', 21597 L: 'DD/MM/YYYY', 21598 LL: 'D MMMM YYYY', 21599 LLL: 'D MMMM YYYY à¹à¸§à¸¥à¸² H:mm', 21600 LLLL: 'วัà¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² H:mm', 21601 }, 21602 meridiemParse: /à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸|หลัà¸à¹à¸à¸µà¹à¸¢à¸/, 21603 isPM: function (input) { 21604 return input === 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 21605 }, 21606 meridiem: function (hour, minute, isLower) { 21607 if (hour < 12) { 21608 return 'à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸'; 21609 } else { 21610 return 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 21611 } 21612 }, 21613 calendar: { 21614 sameDay: '[วัà¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 21615 nextDay: '[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 21616 nextWeek: 'dddd[หà¸à¹à¸² à¹à¸§à¸¥à¸²] LT', 21617 lastDay: '[à¹à¸¡à¸·à¹à¸à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 21618 lastWeek: '[วัà¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT', 21619 sameElse: 'L', 21620 }, 21621 relativeTime: { 21622 future: 'à¸à¸µà¸ %s', 21623 past: '%sà¸à¸µà¹à¹à¸¥à¹à¸§', 21624 s: 'à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ', 21625 ss: '%d วิà¸à¸²à¸à¸µ', 21626 m: '1 à¸à¸²à¸à¸µ', 21627 mm: '%d à¸à¸²à¸à¸µ', 21628 h: '1 à¸à¸±à¹à¸§à¹à¸¡à¸', 21629 hh: '%d à¸à¸±à¹à¸§à¹à¸¡à¸', 21630 d: '1 วัà¸', 21631 dd: '%d วัà¸', 21632 w: '1 สัà¸à¸à¸²à¸«à¹', 21633 ww: '%d สัà¸à¸à¸²à¸«à¹', 21634 M: '1 à¹à¸à¸·à¸à¸', 21635 MM: '%d à¹à¸à¸·à¸à¸', 21636 y: '1 à¸à¸µ', 21637 yy: '%d à¸à¸µ', 21638 }, 21639 }); 21640 21641 //! moment.js locale configuration 21642 21643 var suffixes$4 = { 21644 1: "'inji", 21645 5: "'inji", 21646 8: "'inji", 21647 70: "'inji", 21648 80: "'inji", 21649 2: "'nji", 21650 7: "'nji", 21651 20: "'nji", 21652 50: "'nji", 21653 3: "'ünji", 21654 4: "'ünji", 21655 100: "'ünji", 21656 6: "'njy", 21657 9: "'unjy", 21658 10: "'unjy", 21659 30: "'unjy", 21660 60: "'ynjy", 21661 90: "'ynjy", 21662 }; 21663 21664 hooks.defineLocale('tk', { 21665 months: 'Ãanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( 21666 '_' 21667 ), 21668 monthsShort: 'Ãan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), 21669 weekdays: 'ÃekÅenbe_DuÅenbe_SiÅenbe_ÃarÅenbe_PenÅenbe_Anna_Åenbe'.split( 21670 '_' 21671 ), 21672 weekdaysShort: 'Ãek_DuÅ_SiÅ_Ãar_Pen_Ann_Åen'.split('_'), 21673 weekdaysMin: 'Ãk_DÅ_SÅ_Ãr_Pn_An_Ån'.split('_'), 21674 longDateFormat: { 21675 LT: 'HH:mm', 21676 LTS: 'HH:mm:ss', 21677 L: 'DD.MM.YYYY', 21678 LL: 'D MMMM YYYY', 21679 LLL: 'D MMMM YYYY HH:mm', 21680 LLLL: 'dddd, D MMMM YYYY HH:mm', 21681 }, 21682 calendar: { 21683 sameDay: '[bugün sagat] LT', 21684 nextDay: '[ertir sagat] LT', 21685 nextWeek: '[indiki] dddd [sagat] LT', 21686 lastDay: '[düýn] LT', 21687 lastWeek: '[geçen] dddd [sagat] LT', 21688 sameElse: 'L', 21689 }, 21690 relativeTime: { 21691 future: '%s soÅ', 21692 past: '%s öÅ', 21693 s: 'birnäçe sekunt', 21694 m: 'bir minut', 21695 mm: '%d minut', 21696 h: 'bir sagat', 21697 hh: '%d sagat', 21698 d: 'bir gün', 21699 dd: '%d gün', 21700 M: 'bir aý', 21701 MM: '%d aý', 21702 y: 'bir ýyl', 21703 yy: '%d ýyl', 21704 }, 21705 ordinal: function (number, period) { 21706 switch (period) { 21707 case 'd': 21708 case 'D': 21709 case 'Do': 21710 case 'DD': 21711 return number; 21712 default: 21713 if (number === 0) { 21714 // special case for zero 21715 return number + "'unjy"; 21716 } 21717 var a = number % 10, 21718 b = (number % 100) - a, 21719 c = number >= 100 ? 100 : null; 21720 return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); 21721 } 21722 }, 21723 week: { 21724 dow: 1, // Monday is the first day of the week. 21725 doy: 7, // The week that contains Jan 7th is the first week of the year. 21726 }, 21727 }); 21728 21729 //! moment.js locale configuration 21730 21731 hooks.defineLocale('tl-ph', { 21732 months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( 21733 '_' 21734 ), 21735 monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), 21736 weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( 21737 '_' 21738 ), 21739 weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), 21740 weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), 21741 longDateFormat: { 21742 LT: 'HH:mm', 21743 LTS: 'HH:mm:ss', 21744 L: 'MM/D/YYYY', 21745 LL: 'MMMM D, YYYY', 21746 LLL: 'MMMM D, YYYY HH:mm', 21747 LLLL: 'dddd, MMMM DD, YYYY HH:mm', 21748 }, 21749 calendar: { 21750 sameDay: 'LT [ngayong araw]', 21751 nextDay: '[Bukas ng] LT', 21752 nextWeek: 'LT [sa susunod na] dddd', 21753 lastDay: 'LT [kahapon]', 21754 lastWeek: 'LT [noong nakaraang] dddd', 21755 sameElse: 'L', 21756 }, 21757 relativeTime: { 21758 future: 'sa loob ng %s', 21759 past: '%s ang nakalipas', 21760 s: 'ilang segundo', 21761 ss: '%d segundo', 21762 m: 'isang minuto', 21763 mm: '%d minuto', 21764 h: 'isang oras', 21765 hh: '%d oras', 21766 d: 'isang araw', 21767 dd: '%d araw',
21768 M: 'isang buwan', 21769 MM: '%d buwan', 21770 y: 'isang taon', 21771 yy: '%d taon', 21772 }, 21773 dayOfMonthOrdinalParse: /\d{1,2}/, 21774 ordinal: function (number) { 21775 return number; 21776 }, 21777 week: { 21778 dow: 1, // Monday is the first day of the week. 21779 doy: 4, // The week that contains Jan 4th is the first week of the year. 21780 }, 21781 }); 21782 21783 //! moment.js locale configuration 21784 21785 var numbersNouns = 'pagh_waâ_chaâ_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); 21786 21787 function translateFuture(output) { 21788 var time = output; 21789 time = 21790 output.indexOf('jaj') !== -1 21791 ? time.slice(0, -3) + 'leS' 21792 : output.indexOf('jar') !== -1 21793 ? time.slice(0, -3) + 'waQ' 21794 : output.indexOf('DIS') !== -1 21795 ? time.slice(0, -3) + 'nem' 21796 : time + ' pIq'; 21797 return time; 21798 } 21799 21800 function translatePast(output) { 21801 var time = output; 21802 time = 21803 output.indexOf('jaj') !== -1 21804 ? time.slice(0, -3) + 'Huâ' 21805 : output.indexOf('jar') !== -1 21806 ? time.slice(0, -3) + 'wen' 21807 : output.indexOf('DIS') !== -1 21808 ? time.slice(0, -3) + 'ben' 21809 : time + ' ret'; 21810 return time; 21811 } 21812 21813 function translate$a(number, withoutSuffix, string, isFuture) { 21814 var numberNoun = numberAsNoun(number); 21815 switch (string) { 21816 case 'ss': 21817 return numberNoun + ' lup'; 21818 case 'mm': 21819 return numberNoun + ' tup'; 21820 case 'hh': 21821 return numberNoun + ' rep'; 21822 case 'dd': 21823 return numberNoun + ' jaj'; 21824 case 'MM': 21825 return numberNoun + ' jar'; 21826 case 'yy': 21827 return numberNoun + ' DIS'; 21828 } 21829 } 21830 21831 function numberAsNoun(number) { 21832 var hundred = Math.floor((number % 1000) / 100), 21833 ten = Math.floor((number % 100) / 10), 21834 one = number % 10, 21835 word = ''; 21836 if (hundred > 0) { 21837 word += numbersNouns[hundred] + 'vatlh'; 21838 } 21839 if (ten > 0) { 21840 word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; 21841 } 21842 if (one > 0) { 21843 word += (word !== '' ? ' ' : '') + numbersNouns[one]; 21844 } 21845 return word === '' ? 'pagh' : word; 21846 } 21847 21848 hooks.defineLocale('tlh', { 21849 months: 'teraâ jar waâ_teraâ jar chaâ_teraâ jar wej_teraâ jar loS_teraâ jar vagh_teraâ jar jav_teraâ jar Soch_teraâ jar chorgh_teraâ jar Hut_teraâ jar waâmaH_teraâ jar waâmaH waâ_teraâ jar waâmaH chaâ'.split( 21850 '_' 21851 ), 21852 monthsShort: 21853 'jar waâ_jar chaâ_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar waâmaH_jar waâmaH waâ_jar waâmaH chaâ'.split( 21854 '_' 21855 ), 21856 monthsParseExact: true, 21857 weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( 21858 '_' 21859 ), 21860 weekdaysShort: 21861 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), 21862 weekdaysMin: 21863 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), 21864 longDateFormat: { 21865 LT: 'HH:mm', 21866 LTS: 'HH:mm:ss', 21867 L: 'DD.MM.YYYY', 21868 LL: 'D MMMM YYYY', 21869 LLL: 'D MMMM YYYY HH:mm', 21870 LLLL: 'dddd, D MMMM YYYY HH:mm', 21871 }, 21872 calendar: { 21873 sameDay: '[DaHjaj] LT', 21874 nextDay: '[waâleS] LT', 21875 nextWeek: 'LLL', 21876 lastDay: '[waâHuâ] LT', 21877 lastWeek: 'LLL', 21878 sameElse: 'L', 21879 }, 21880 relativeTime: { 21881 future: translateFuture, 21882 past: translatePast, 21883 s: 'puS lup', 21884 ss: translate$a, 21885 m: 'waâ tup', 21886 mm: translate$a, 21887 h: 'waâ rep', 21888 hh: translate$a, 21889 d: 'waâ jaj', 21890 dd: translate$a, 21891 M: 'waâ jar', 21892 MM: translate$a, 21893 y: 'waâ DIS', 21894 yy: translate$a, 21895 }, 21896 dayOfMonthOrdinalParse: /\d{1,2}\./, 21897 ordinal: '%d.', 21898 week: { 21899 dow: 1, // Monday is the first day of the week. 21900 doy: 4, // The week that contains Jan 4th is the first week of the year. 21901 }, 21902 }); 21903 21904 //! moment.js locale configuration 21905 21906 var suffixes$5 = { 21907 1: "'inci", 21908 5: "'inci", 21909 8: "'inci", 21910 70: "'inci", 21911 80: "'inci", 21912 2: "'nci", 21913 7: "'nci", 21914 20: "'nci", 21915 50: "'nci", 21916 3: "'üncü", 21917 4: "'üncü", 21918 100: "'üncü", 21919 6: "'ncı", 21920 9: "'uncu", 21921 10: "'uncu", 21922 30: "'uncu", 21923 60: "'ıncı", 21924 90: "'ıncı", 21925 }; 21926 21927 hooks.defineLocale('tr', { 21928 months: 'Ocak_Åubat_Mart_Nisan_Mayıs_Haziran_Temmuz_AÄustos_Eylül_Ekim_Kasım_Aralık'.split( 21929 '_' 21930 ), 21931 monthsShort: 'Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara'.split('_'), 21932 weekdays: 'Pazar_Pazartesi_Salı_ÃarÅamba_PerÅembe_Cuma_Cumartesi'.split( 21933 '_' 21934 ), 21935 weekdaysShort: 'Paz_Pzt_Sal_Ãar_Per_Cum_Cmt'.split('_'), 21936 weekdaysMin: 'Pz_Pt_Sa_Ãa_Pe_Cu_Ct'.split('_'), 21937 meridiem: function (hours, minutes, isLower) { 21938 if (hours < 12) { 21939 return isLower ? 'öö' : 'ÃÃ'; 21940 } else { 21941 return isLower ? 'ös' : 'ÃS'; 21942 } 21943 }, 21944 meridiemParse: /öö|ÃÃ|ös|ÃS/, 21945 isPM: function (input) { 21946 return input === 'ös' || input === 'ÃS'; 21947 }, 21948 longDateFormat: { 21949 LT: 'HH:mm', 21950 LTS: 'HH:mm:ss', 21951 L: 'DD.MM.YYYY', 21952 LL: 'D MMMM YYYY', 21953 LLL: 'D MMMM YYYY HH:mm', 21954 LLLL: 'dddd, D MMMM YYYY HH:mm', 21955 }, 21956 calendar: { 21957 sameDay: '[bugün saat] LT', 21958 nextDay: '[yarın saat] LT', 21959 nextWeek: '[gelecek] dddd [saat] LT', 21960 lastDay: '[dün] LT', 21961 lastWeek: '[geçen] dddd [saat] LT', 21962 sameElse: 'L', 21963 }, 21964 relativeTime: { 21965 future: '%s sonra', 21966 past: '%s önce', 21967 s: 'birkaç saniye', 21968 ss: '%d saniye', 21969 m: 'bir dakika', 21970 mm: '%d dakika', 21971 h: 'bir saat', 21972 hh: '%d saat', 21973 d: 'bir gün', 21974 dd: '%d gün', 21975 w: 'bir hafta', 21976 ww: '%d hafta', 21977 M: 'bir ay', 21978 MM: '%d ay', 21979 y: 'bir yıl', 21980 yy: '%d yıl', 21981 }, 21982 ordinal: function (number, period) { 21983 switch (period) { 21984 case 'd': 21985 case 'D': 21986 case 'Do': 21987 case 'DD': 21988 return number; 21989 default: 21990 if (number === 0) { 21991 // special case for zero 21992 return number + "'ıncı"; 21993 } 21994 var a = number % 10, 21995 b = (number % 100) - a, 21996 c = number >= 100 ? 100 : null; 21997 return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]); 21998 } 21999 }, 22000 week: { 22001 dow: 1, // Monday is the first day of the week. 22002 doy: 7, // The week that contains Jan 7th is the first week of the year. 22003 }, 22004 }); 22005 22006 //! moment.js locale configuration 22007 22008 // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. 22009 // This is currently too difficult (maybe even impossible) to add. 22010 hooks.defineLocale('tzl', { 22011 months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( 22012 '_' 22013 ), 22014 monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), 22015 weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), 22016 weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), 22017 weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), 22018 longDateFormat: { 22019 LT: 'HH.mm', 22020 LTS: 'HH.mm.ss', 22021 L: 'DD.MM.YYYY', 22022 LL: 'D. MMMM [dallas] YYYY', 22023 LLL: 'D. MMMM [dallas] YYYY HH.mm', 22024 LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', 22025 }, 22026 meridiemParse: /d\'o|d\'a/i, 22027 isPM: function (input) { 22028 return "d'o" === input.toLowerCase(); 22029 }, 22030 meridiem: function (hours, minutes, isLower) { 22031 if (hours > 11) { 22032 return isLower ? "d'o" : "D'O"; 22033 } else { 22034 return isLower ? "d'a" : "D'A"; 22035 } 22036 }, 22037 calendar: {
vendor: 2,026 bytes, lines 22038-22093
22038 sameDay: '[oxhi à ] LT', 22039 nextDay: '[demà à ] LT', 22040 nextWeek: 'dddd [à ] LT', 22041 lastDay: '[ieiri à ] LT', 22042 lastWeek: '[sür el] dddd [lasteu à ] LT', 22043 sameElse: 'L', 22044 }, 22045 relativeTime: { 22046 future: 'osprei %s', 22047 past: 'ja%s', 22048 s: processRelativeTime$8, 22049 ss: processRelativeTime$8, 22050 m: processRelativeTime$8, 22051 mm: processRelativeTime$8, 22052 h: processRelativeTime$8, 22053 hh: processRelativeTime$8, 22054 d: processRelativeTime$8, 22055 dd: processRelativeTime$8, 22056 M: processRelativeTime$8, 22057 MM: processRelativeTime$8, 22058 y: processRelativeTime$8, 22059 yy: processRelativeTime$8, 22060 }, 22061 dayOfMonthOrdinalParse: /\d{1,2}\./, 22062 ordinal: '%d.', 22063 week: { 22064 dow: 1, // Monday is the first day of the week. 22065 doy: 4, // The week that contains Jan 4th is the first week of the year. 22066 }, 22067 }); 22068 22069 function processRelativeTime$8(number, withoutSuffix, key, isFuture) { 22070 var format = { 22071 s: ['viensas secunds', "'iensas secunds"], 22072 ss: [number + ' secunds', '' + number + ' secunds'], 22073 m: ["'n mÃut", "'iens mÃut"], 22074 mm: [number + ' mÃuts', '' + number + ' mÃuts'], 22075 h: ["'n þora", "'iensa þora"], 22076 hh: [number + ' þoras', '' + number + ' þoras'], 22077 d: ["'n ziua", "'iensa ziua"], 22078 dd: [number + ' ziuas', '' + number + ' ziuas'], 22079 M: ["'n mes", "'iens mes"], 22080 MM: [number + ' mesen', '' + number + ' mesen'], 22081 y: ["'n ar", "'iens ar"], 22082 yy: [number + ' ars', '' + number + ' ars'], 22083 }; 22084 return isFuture 22085 ? format[key][0] 22086 : withoutSuffix 22087 ? format[key][0] 22088 : format[key][1]; 22089 } 22090 22091 //! moment.js locale configuration 22092 22093 hooks.defineLocale('tzm-latn', {
22094 months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( 22095 '_' 22096 ), 22097 monthsShort: 22098 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( 22099 '_' 22100 ), 22101 weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 22102 weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 22103 weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 22104 longDateFormat: { 22105 LT: 'HH:mm', 22106 LTS: 'HH:mm:ss', 22107 L: 'DD/MM/YYYY', 22108 LL: 'D MMMM YYYY', 22109 LLL: 'D MMMM YYYY HH:mm', 22110 LLLL: 'dddd D MMMM YYYY HH:mm', 22111 }, 22112 calendar: { 22113 sameDay: '[asdkh g] LT', 22114 nextDay: '[aska g] LT', 22115 nextWeek: 'dddd [g] LT', 22116 lastDay: '[assant g] LT', 22117 lastWeek: 'dddd [g] LT', 22118 sameElse: 'L', 22119 }, 22120 relativeTime: { 22121 future: 'dadkh s yan %s', 22122 past: 'yan %s', 22123 s: 'imik', 22124 ss: '%d imik', 22125 m: 'minuá¸', 22126 mm: '%d minuá¸', 22127 h: 'saÉa', 22128 hh: '%d tassaÉin', 22129 d: 'ass', 22130 dd: '%d ossan', 22131 M: 'ayowr', 22132 MM: '%d iyyirn', 22133 y: 'asgas', 22134 yy: '%d isgasn', 22135 }, 22136 week: { 22137 dow: 6, // Saturday is the first day of the week. 22138 doy: 12, // The week that contains Jan 12th is the first week of the year. 22139 }, 22140 }); 22141 22142 //! moment.js locale configuration 22143 22144 hooks.defineLocale('tzm', { 22145 months: 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split( 22146 '_' 22147 ), 22148 monthsShort: 22149 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split( 22150 '_' 22151 ), 22152 weekdays: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 22153 weekdaysShort: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 22154 weekdaysMin: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 22155 longDateFormat: { 22156 LT: 'HH:mm', 22157 LTS: 'HH:mm:ss', 22158 L: 'DD/MM/YYYY', 22159 LL: 'D MMMM YYYY', 22160 LLL: 'D MMMM YYYY HH:mm', 22161 LLLL: 'dddd D MMMM YYYY HH:mm', 22162 }, 22163 calendar: { 22164 sameDay: '[â´°âµâ´·âµ â´´] LT', 22165 nextDay: '[â´°âµâ´½â´° â´´] LT', 22166 nextWeek: 'dddd [â´´] LT', 22167 lastDay: '[â´°âµâ´°âµâµ â´´] LT', 22168 lastWeek: 'dddd [â´´] LT', 22169 sameElse: 'L', 22170 }, 22171 relativeTime: { 22172 future: 'ⴷⴰⴷⵠⵠⵢⴰⵠ%s', 22173 past: 'ⵢⴰⵠ%s', 22174 s: 'âµâµâµâ´½', 22175 ss: '%d âµâµâµâ´½', 22176 m: 'âµâµâµâµâ´º', 22177 mm: '%d âµâµâµâµâ´º', 22178 h: 'âµâ´°âµâ´°',
vendor: 5,789 bytes, lines 22179-22324
22179 hh: '%d âµâ´°âµâµâ´°âµâµâµ', 22180 d: 'â´°âµâµ', 22181 dd: '%d oâµâµâ´°âµ', 22182 M: 'â´°âµ¢oâµâµ', 22183 MM: '%d âµâµ¢âµ¢âµâµâµ', 22184 y: 'â´°âµâ´³â´°âµ', 22185 yy: '%d âµâµâ´³â´°âµâµ', 22186 }, 22187 week: { 22188 dow: 6, // Saturday is the first day of the week. 22189 doy: 12, // The week that contains Jan 12th is the first week of the year. 22190 }, 22191 }); 22192 22193 //! moment.js locale configuration 22194 22195 hooks.defineLocale('ug-cn', { 22196 months: 'ÙØ§ÙÛØ§Ø±_ÙÛÛØ±Ø§Ù_٠ارت_ئاپرÛÙ_٠اÙ_ئÙÙÛÙ_ئÙÙÛÙ_Ø¦Ø§ÛØºÛست_سÛÙØªÛØ¨ÙØ±_ئÛÙØªÛØ¨ÙØ±_ÙÙÙØ§Ø¨Ùر_دÛÙØ§Ø¨Ùر'.split( 22197 '_' 22198 ), 22199 monthsShort: 22200 'ÙØ§ÙÛØ§Ø±_ÙÛÛØ±Ø§Ù_٠ارت_ئاپرÛÙ_٠اÙ_ئÙÙÛÙ_ئÙÙÛÙ_Ø¦Ø§ÛØºÛست_سÛÙØªÛØ¨ÙØ±_ئÛÙØªÛØ¨ÙØ±_ÙÙÙØ§Ø¨Ùر_دÛÙØ§Ø¨Ùر'.split( 22201 '_' 22202 ), 22203 weekdays: 'ÙÛÙØ´ÛÙØ¨Û_Ø¯ÛØ´ÛÙØ¨Û_سÛÙØ´ÛÙØ¨Û_ÚØ§Ø±Ø´ÛÙØ¨Û_Ù¾ÛÙØ´ÛÙØ¨Û_جÛÙ Û_Ø´ÛÙØ¨Û'.split( 22204 '_' 22205 ), 22206 weekdaysShort: 'ÙÛ_دÛ_سÛ_ÚØ§_Ù¾Û_جÛ_Ø´Û'.split('_'), 22207 weekdaysMin: 'ÙÛ_دÛ_سÛ_ÚØ§_Ù¾Û_جÛ_Ø´Û'.split('_'), 22208 longDateFormat: { 22209 LT: 'HH:mm', 22210 LTS: 'HH:mm:ss', 22211 L: 'YYYY-MM-DD', 22212 LL: 'YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙ', 22213 LLL: 'YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙØ HH:mm', 22214 LLLL: 'ddddØ YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙØ HH:mm', 22215 }, 22216 meridiemParse: /ÙÛØ±ÙÙ ÙÛÚÛ|سÛÚ¾ÛØ±|ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ|ÚÛØ´|ÚÛØ´ØªÙÙ ÙÛÙÙÙ|ÙÛÚ/, 22217 meridiemHour: function (hour, meridiem) { 22218 if (hour === 12) { 22219 hour = 0; 22220 } 22221 if ( 22222 meridiem === 'ÙÛØ±ÙÙ ÙÛÚÛ' || 22223 meridiem === 'سÛÚ¾ÛØ±' || 22224 meridiem === 'ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ' 22225 ) { 22226 return hour; 22227 } else if (meridiem === 'ÚÛØ´ØªÙÙ ÙÛÙÙÙ' || meridiem === 'ÙÛÚ') { 22228 return hour + 12; 22229 } else { 22230 return hour >= 11 ? hour : hour + 12; 22231 } 22232 }, 22233 meridiem: function (hour, minute, isLower) { 22234 var hm = hour * 100 + minute; 22235 if (hm < 600) { 22236 return 'ÙÛØ±ÙÙ ÙÛÚÛ'; 22237 } else if (hm < 900) { 22238 return 'سÛÚ¾ÛØ±'; 22239 } else if (hm < 1130) { 22240 return 'ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ'; 22241 } else if (hm < 1230) { 22242 return 'ÚÛØ´'; 22243 } else if (hm < 1800) { 22244 return 'ÚÛØ´ØªÙÙ ÙÛÙÙÙ'; 22245 } else { 22246 return 'ÙÛÚ'; 22247 } 22248 }, 22249 calendar: { 22250 sameDay: '[بÛÚ¯ÛÙ Ø³Ø§Ø¦ÛØª] LT', 22251 nextDay: '[Ø¦ÛØªÛ Ø³Ø§Ø¦ÛØª] LT', 22252 nextWeek: '[ÙÛÙÛØ±ÙÙ] dddd [Ø³Ø§Ø¦ÛØª] LT', 22253 lastDay: '[تÛÙÛÚ¯ÛÙ] LT', 22254 lastWeek: '[Ø¦Ø§ÙØ¯ÙÙÙÙ] dddd [Ø³Ø§Ø¦ÛØª] LT', 22255 sameElse: 'L', 22256 }, 22257 relativeTime: { 22258 future: '%s ÙÛÙÙÙ', 22259 past: '%s Ø¨ÛØ±ÛÙ', 22260 s: 'ÙÛÚÚÛ Ø³ÛÙÙÙØª', 22261 ss: '%d سÛÙÙÙØª', 22262 m: 'Ø¨ÙØ± Ù ÙÙÛØª', 22263 mm: '%d Ù ÙÙÛØª', 22264 h: 'Ø¨ÙØ± Ø³Ø§Ø¦ÛØª', 22265 hh: '%d Ø³Ø§Ø¦ÛØª', 22266 d: 'Ø¨ÙØ± ÙÛÙ', 22267 dd: '%d ÙÛÙ', 22268 M: 'Ø¨ÙØ± ئاÙ', 22269 MM: '%d ئاÙ', 22270 y: 'Ø¨ÙØ± ÙÙÙ', 22271 yy: '%d ÙÙÙ', 22272 }, 22273 22274 dayOfMonthOrdinalParse: /\d{1,2}(-ÙÛÙÙ|-ئاÙ|-Ú¾ÛپتÛ)/, 22275 ordinal: function (number, period) { 22276 switch (period) { 22277 case 'd': 22278 case 'D': 22279 case 'DDD': 22280 return number + '-ÙÛÙÙ'; 22281 case 'w': 22282 case 'W': 22283 return number + '-Ú¾ÛپتÛ'; 22284 default: 22285 return number; 22286 } 22287 }, 22288 preparse: function (string) { 22289 return string.replace(/Ø/g, ','); 22290 }, 22291 postformat: function (string) { 22292 return string.replace(/,/g, 'Ø'); 22293 }, 22294 week: { 22295 // GB/T 7408-1994ãæ°æ®å åäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988çæ 22296 dow: 1, // Monday is the first day of the week. 22297 doy: 7, // The week that contains Jan 1st is the first week of the year. 22298 }, 22299 }); 22300 22301 //! moment.js locale configuration 22302 22303 function plural$6(word, num) { 22304 var forms = word.split('_'); 22305 return num % 10 === 1 && num % 100 !== 11 22306 ? forms[0] 22307 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 22308 ? forms[1] 22309 : forms[2]; 22310 } 22311 function relativeTimeWithPlural$4(number, withoutSuffix, key) { 22312 var format = { 22313 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑнди_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑнди_ÑекÑнд', 22314 mm: withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½', 22315 hh: withoutSuffix ? 'година_години_годин' : 'годинÑ_години_годин', 22316 dd: 'денÑ_днÑ_днÑв', 22317 MM: 'мÑÑÑÑÑ_мÑÑÑÑÑ_мÑÑÑÑÑв', 22318 yy: 'ÑÑк_Ñоки_ÑокÑв', 22319 }; 22320 if (key === 'm') { 22321 return withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ'; 22322 } else if (key === 'h') { 22323 return withoutSuffix ? 'година' : 'годинÑ'; 22324 } else {
vendor: 8,961 bytes, lines 22325-22579
22325 return number + ' ' + plural$6(format[key], +number); 22326 } 22327 } 22328 function weekdaysCaseReplace(m, format) { 22329 var weekdays = { 22330 nominative: 22331 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑеда_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑа'.split( 22332 '_' 22333 ), 22334 accusative: 22335 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑедÑ_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑÑ'.split( 22336 '_' 22337 ), 22338 genitive: 22339 'недÑлÑ_понедÑлка_вÑвÑоÑка_ÑеÑеди_ÑеÑвеÑга_пâÑÑниÑÑ_ÑÑбоÑи'.split( 22340 '_' 22341 ), 22342 }, 22343 nounCase; 22344 22345 if (m === true) { 22346 return weekdays['nominative'] 22347 .slice(1, 7) 22348 .concat(weekdays['nominative'].slice(0, 1)); 22349 } 22350 if (!m) { 22351 return weekdays['nominative']; 22352 } 22353 22354 nounCase = /(\[[ÐвУÑ]\]) ?dddd/.test(format) 22355 ? 'accusative' 22356 : /\[?(?:минÑлоÑ|наÑÑÑпноÑ)? ?\] ?dddd/.test(format) 22357 ? 'genitive' 22358 : 'nominative'; 22359 return weekdays[nounCase][m.day()]; 22360 } 22361 function processHoursFunction(str) { 22362 return function () { 22363 return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; 22364 }; 22365 } 22366 22367 hooks.defineLocale('uk', { 22368 months: { 22369 format: 'ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ'.split( 22370 '_' 22371 ), 22372 standalone: 22373 'ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ'.split( 22374 '_' 22375 ), 22376 }, 22377 monthsShort: 'ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд'.split( 22378 '_' 22379 ), 22380 weekdays: weekdaysCaseReplace, 22381 weekdaysShort: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 22382 weekdaysMin: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 22383 longDateFormat: { 22384 LT: 'HH:mm', 22385 LTS: 'HH:mm:ss', 22386 L: 'DD.MM.YYYY', 22387 LL: 'D MMMM YYYY Ñ.', 22388 LLL: 'D MMMM YYYY Ñ., HH:mm', 22389 LLLL: 'dddd, D MMMM YYYY Ñ., HH:mm', 22390 }, 22391 calendar: { 22392 sameDay: processHoursFunction('[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ '), 22393 nextDay: processHoursFunction('[ÐавÑÑа '), 22394 lastDay: processHoursFunction('[ÐÑоÑа '), 22395 nextWeek: processHoursFunction('[У] dddd ['), 22396 lastWeek: function () { 22397 switch (this.day()) { 22398 case 0: 22399 case 3: 22400 case 5: 22401 case 6: 22402 return processHoursFunction('[ÐинÑлоÑ] dddd [').call(this); 22403 case 1: 22404 case 2: 22405 case 4: 22406 return processHoursFunction('[ÐинÑлого] dddd [').call(this); 22407 } 22408 }, 22409 sameElse: 'L', 22410 }, 22411 relativeTime: { 22412 future: 'за %s', 22413 past: '%s ÑомÑ', 22414 s: 'декÑлÑка ÑекÑнд', 22415 ss: relativeTimeWithPlural$4, 22416 m: relativeTimeWithPlural$4, 22417 mm: relativeTimeWithPlural$4, 22418 h: 'годинÑ', 22419 hh: relativeTimeWithPlural$4, 22420 d: 'денÑ', 22421 dd: relativeTimeWithPlural$4, 22422 M: 'мÑÑÑÑÑ', 22423 MM: relativeTimeWithPlural$4, 22424 y: 'ÑÑк', 22425 yy: relativeTimeWithPlural$4, 22426 }, 22427 // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason 22428 meridiemParse: /ноÑÑ|ÑанкÑ|днÑ|веÑоÑа/, 22429 isPM: function (input) { 22430 return /^(днÑ|веÑоÑа)$/.test(input); 22431 }, 22432 meridiem: function (hour, minute, isLower) { 22433 if (hour < 4) { 22434 return 'ноÑÑ'; 22435 } else if (hour < 12) { 22436 return 'ÑанкÑ'; 22437 } else if (hour < 17) { 22438 return 'днÑ'; 22439 } else { 22440 return 'веÑоÑа'; 22441 } 22442 }, 22443 dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, 22444 ordinal: function (number, period) { 22445 switch (period) { 22446 case 'M': 22447 case 'd': 22448 case 'DDD': 22449 case 'w': 22450 case 'W': 22451 return number + '-й'; 22452 case 'D': 22453 return number + '-го'; 22454 default: 22455 return number; 22456 } 22457 }, 22458 week: { 22459 dow: 1, // Monday is the first day of the week. 22460 doy: 7, // The week that contains Jan 7th is the first week of the year. 22461 }, 22462 }); 22463 22464 //! moment.js locale configuration 22465 22466 var months$b = [ 22467 'جÙÙØ±Û', 22468 'ÙØ±ÙرÛ', 22469 '٠ارÚ', 22470 'اپرÛÙ', 22471 '٠ئÛ', 22472 'جÙÙ', 22473 'جÙÙØ§Ø¦Û', 22474 'اگست', 22475 'ست٠بر', 22476 'Ø§Ú©ØªÙØ¨Ø±', 22477 'ÙÙ٠بر', 22478 'دس٠بر', 22479 ], 22480 days$2 = ['Ø§ØªÙØ§Ø±', 'Ù¾ÛØ±', 'Ù ÙÚ¯Ù', 'بدھ', 'ج٠عرات', 'ج٠عÛ', 'ÛÙØªÛ']; 22481 22482 hooks.defineLocale('ur', { 22483 months: months$b, 22484 monthsShort: months$b, 22485 weekdays: days$2, 22486 weekdaysShort: days$2, 22487 weekdaysMin: days$2, 22488 longDateFormat: { 22489 LT: 'HH:mm', 22490 LTS: 'HH:mm:ss', 22491 L: 'DD/MM/YYYY', 22492 LL: 'D MMMM YYYY', 22493 LLL: 'D MMMM YYYY HH:mm', 22494 LLLL: 'ddddØ D MMMM YYYY HH:mm', 22495 }, 22496 meridiemParse: /صبØ|شا٠/, 22497 isPM: function (input) { 22498 return 'شا٠' === input; 22499 }, 22500 meridiem: function (hour, minute, isLower) { 22501 if (hour < 12) { 22502 return 'صبØ'; 22503 } 22504 return 'شا٠'; 22505 }, 22506 calendar: { 22507 sameDay: '[آج بÙÙØª] LT', 22508 nextDay: '[ک٠بÙÙØª] LT', 22509 nextWeek: 'dddd [بÙÙØª] LT', 22510 lastDay: '[Ú¯Ø°Ø´ØªÛ Ø±ÙØ² بÙÙØª] LT', 22511 lastWeek: '[گذشتÛ] dddd [بÙÙØª] LT', 22512 sameElse: 'L', 22513 }, 22514 relativeTime: { 22515 future: '%s بعد', 22516 past: '%s ÙØ¨Ù', 22517 s: 'ÚÙØ¯ سÛÚ©ÙÚ', 22518 ss: '%d سÛÚ©ÙÚ', 22519 m: 'اÛÚ© Ù ÙÙ¹', 22520 mm: '%d Ù ÙÙ¹', 22521 h: 'اÛÚ© Ú¯Ú¾ÙÙ¹Û', 22522 hh: '%d Ú¯Ú¾ÙÙ¹Û', 22523 d: 'اÛÚ© دÙ', 22524 dd: '%d دÙ', 22525 M: 'اÛÚ© ٠اÛ', 22526 MM: '%d ٠اÛ', 22527 y: 'اÛÚ© ساÙ', 22528 yy: '%d ساÙ', 22529 }, 22530 preparse: function (string) { 22531 return string.replace(/Ø/g, ','); 22532 }, 22533 postformat: function (string) { 22534 return string.replace(/,/g, 'Ø'); 22535 }, 22536 week: { 22537 dow: 1, // Monday is the first day of the week. 22538 doy: 4, // The week that contains Jan 4th is the first week of the year. 22539 }, 22540 }); 22541 22542 //! moment.js locale configuration 22543 22544 hooks.defineLocale('uz-latn', { 22545 months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( 22546 '_' 22547 ), 22548 monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), 22549 weekdays: 22550 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( 22551 '_' 22552 ), 22553 weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), 22554 weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), 22555 longDateFormat: { 22556 LT: 'HH:mm', 22557 LTS: 'HH:mm:ss', 22558 L: 'DD/MM/YYYY', 22559 LL: 'D MMMM YYYY', 22560 LLL: 'D MMMM YYYY HH:mm', 22561 LLLL: 'D MMMM YYYY, dddd HH:mm', 22562 }, 22563 calendar: { 22564 sameDay: '[Bugun soat] LT [da]', 22565 nextDay: '[Ertaga] LT [da]', 22566 nextWeek: 'dddd [kuni soat] LT [da]', 22567 lastDay: '[Kecha soat] LT [da]', 22568 lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", 22569 sameElse: 'L', 22570 }, 22571 relativeTime: { 22572 future: 'Yaqin %s ichida', 22573 past: 'Bir necha %s oldin', 22574 s: 'soniya', 22575 ss: '%d soniya', 22576 m: 'bir daqiqa', 22577 mm: '%d daqiqa', 22578 h: 'bir soat', 22579 hh: '%d soat',
vendor: 5,209 bytes, lines 22580-22724
22580 d: 'bir kun', 22581 dd: '%d kun', 22582 M: 'bir oy', 22583 MM: '%d oy', 22584 y: 'bir yil', 22585 yy: '%d yil', 22586 }, 22587 week: { 22588 dow: 1, // Monday is the first day of the week. 22589 doy: 7, // The week that contains Jan 7th is the first week of the year. 22590 }, 22591 }); 22592 22593 //! moment.js locale configuration 22594 22595 hooks.defineLocale('uz', { 22596 months: 'ÑнваÑ_ÑевÑал_маÑÑ_апÑел_май_иÑн_иÑл_авгÑÑÑ_ÑенÑÑбÑ_окÑÑбÑ_ноÑбÑ_декабÑ'.split( 22597 '_' 22598 ), 22599 monthsShort: 'Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 22600 weekdays: 'ЯкÑанба_ÐÑÑанба_СеÑанба_ЧоÑÑанба_ÐайÑанба_ÐÑма_Шанба'.split('_'), 22601 weekdaysShort: 'ЯкÑ_ÐÑÑ_СеÑ_ЧоÑ_Ðай_ÐÑм_Шан'.split('_'), 22602 weekdaysMin: 'Як_ÐÑ_Се_Чо_Ðа_ÐÑ_Ша'.split('_'), 22603 longDateFormat: { 22604 LT: 'HH:mm', 22605 LTS: 'HH:mm:ss', 22606 L: 'DD/MM/YYYY', 22607 LL: 'D MMMM YYYY', 22608 LLL: 'D MMMM YYYY HH:mm', 22609 LLLL: 'D MMMM YYYY, dddd HH:mm', 22610 }, 22611 calendar: { 22612 sameDay: '[ÐÑгÑн ÑоаÑ] LT [да]', 22613 nextDay: '[ÐÑÑага] LT [да]', 22614 nextWeek: 'dddd [кÑни ÑоаÑ] LT [да]', 22615 lastDay: '[ÐеÑа ÑоаÑ] LT [да]', 22616 lastWeek: '[УÑган] dddd [кÑни ÑоаÑ] LT [да]', 22617 sameElse: 'L', 22618 }, 22619 relativeTime: { 22620 future: 'Якин %s иÑида', 22621 past: 'ÐÐ¸Ñ Ð½ÐµÑа %s олдин', 22622 s: 'ÑÑÑÑаÑ', 22623 ss: '%d ÑÑÑÑаÑ', 22624 m: 'Ð±Ð¸Ñ Ð´Ð°ÐºÐ¸ÐºÐ°', 22625 mm: '%d дакика', 22626 h: 'Ð±Ð¸Ñ ÑоаÑ', 22627 hh: '%d ÑоаÑ', 22628 d: 'Ð±Ð¸Ñ ÐºÑн', 22629 dd: '%d кÑн', 22630 M: 'Ð±Ð¸Ñ Ð¾Ð¹', 22631 MM: '%d ой', 22632 y: 'Ð±Ð¸Ñ Ð¹Ð¸Ð»', 22633 yy: '%d йил', 22634 }, 22635 week: { 22636 dow: 1, // Monday is the first day of the week. 22637 doy: 7, // The week that contains Jan 4th is the first week of the year. 22638 }, 22639 }); 22640 22641 //! moment.js locale configuration 22642 22643 hooks.defineLocale('vi', { 22644 months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( 22645 '_' 22646 ), 22647 monthsShort: 22648 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( 22649 '_' 22650 ), 22651 monthsParseExact: true, 22652 weekdays: 'chá»§ nháºt_thứ hai_thứ ba_thứ tư_thứ nÄm_thứ sáu_thứ bảy'.split( 22653 '_' 22654 ), 22655 weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 22656 weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 22657 weekdaysParseExact: true, 22658 meridiemParse: /sa|ch/i, 22659 isPM: function (input) { 22660 return /^ch$/i.test(input); 22661 }, 22662 meridiem: function (hours, minutes, isLower) { 22663 if (hours < 12) { 22664 return isLower ? 'sa' : 'SA'; 22665 } else { 22666 return isLower ? 'ch' : 'CH'; 22667 } 22668 }, 22669 longDateFormat: { 22670 LT: 'HH:mm', 22671 LTS: 'HH:mm:ss', 22672 L: 'DD/MM/YYYY', 22673 LL: 'D MMMM [nÄm] YYYY', 22674 LLL: 'D MMMM [nÄm] YYYY HH:mm', 22675 LLLL: 'dddd, D MMMM [nÄm] YYYY HH:mm', 22676 l: 'DD/M/YYYY', 22677 ll: 'D MMM YYYY', 22678 lll: 'D MMM YYYY HH:mm', 22679 llll: 'ddd, D MMM YYYY HH:mm', 22680 }, 22681 calendar: { 22682 sameDay: '[Hôm nay lúc] LT', 22683 nextDay: '[Ngà y mai lúc] LT', 22684 nextWeek: 'dddd [tuần tá»i lúc] LT', 22685 lastDay: '[Hôm qua lúc] LT', 22686 lastWeek: 'dddd [tuần trưá»c lúc] LT', 22687 sameElse: 'L', 22688 }, 22689 relativeTime: { 22690 future: '%s tá»i', 22691 past: '%s trưá»c', 22692 s: 'và i giây', 22693 ss: '%d giây', 22694 m: 'má»t phút', 22695 mm: '%d phút', 22696 h: 'má»t giá»', 22697 hh: '%d giá»', 22698 d: 'má»t ngà y', 22699 dd: '%d ngà y', 22700 w: 'má»t tuần', 22701 ww: '%d tuần', 22702 M: 'má»t tháng', 22703 MM: '%d tháng', 22704 y: 'má»t nÄm', 22705 yy: '%d nÄm', 22706 }, 22707 dayOfMonthOrdinalParse: /\d{1,2}/, 22708 ordinal: function (number) { 22709 return number; 22710 }, 22711 week: { 22712 dow: 1, // Monday is the first day of the week. 22713 doy: 4, // The week that contains Jan 4th is the first week of the year. 22714 }, 22715 }); 22716 22717 //! moment.js locale configuration 22718 22719 hooks.defineLocale('x-pseudo', { 22720 months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Ãp~rÃl_~Máý_~Júñé~_Júl~ý_Ãú~gúst~_Sép~témb~ér_Ã~ctób~ér_Ã~óvém~bér_~Décé~mbér'.split( 22721 '_' 22722 ), 22723 monthsShort: 22724 'J~áñ_~Féb_~Már_~Ãpr_~Máý_~Júñ_~Júl_~Ãúg_~Sép_~Ãct_~Ãóv_~Déc'.
22724split( 22725 '_' 22726 ), 22727 monthsParseExact: true, 22728 weekdays: 22729 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~FrÃd~áý_S~átúr~dáý'.split( 22730 '_' 22731 ), 22732 weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~FrÃ_~Sát'.split('_'), 22733 weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), 22734 weekdaysParseExact: true, 22735 longDateFormat: { 22736 LT: 'HH:mm', 22737 L: 'DD/MM/YYYY', 22738 LL: 'D MMMM YYYY', 22739 LLL: 'D MMMM YYYY HH:mm', 22740 LLLL: 'dddd, D MMMM YYYY HH:mm', 22741 }, 22742 calendar: { 22743 sameDay: '[T~ódá~ý át] LT', 22744 nextDay: '[T~ómó~rró~w át] LT', 22745 nextWeek: 'dddd [át] LT', 22746 lastDay: '[Ã~ést~érdá~ý át] LT', 22747 lastWeek: '[L~ást] dddd [át] LT', 22748 sameElse: 'L', 22749 }, 22750 relativeTime: { 22751 future: 'Ã~ñ %s', 22752 past: '%s á~gó', 22753 s: 'á ~féw ~sécó~ñds', 22754 ss: '%d s~écóñ~ds',
vendor: 16,384 bytes, lines 22755-23229
22755 m: 'á ~mÃñ~úté', 22756 mm: '%d m~Ãñú~tés', 22757 h: 'á~ñ hó~úr', 22758 hh: '%d h~óúrs', 22759 d: 'á ~dáý', 22760 dd: '%d d~áýs', 22761 M: 'á ~móñ~th', 22762 MM: '%d m~óñt~hs', 22763 y: 'á ~ýéár', 22764 yy: '%d ý~éárs', 22765 }, 22766 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 22767 ordinal: function (number) { 22768 var b = number % 10, 22769 output = 22770 ~~((number % 100) / 10) === 1 22771 ? 'th' 22772 : b === 1 22773 ? 'st' 22774 : b === 2 22775 ? 'nd' 22776 : b === 3 22777 ? 'rd' 22778 : 'th'; 22779 return number + output; 22780 }, 22781 week: { 22782 dow: 1, // Monday is the first day of the week. 22783 doy: 4, // The week that contains Jan 4th is the first week of the year. 22784 }, 22785 }); 22786 22787 //! moment.js locale configuration 22788 22789 hooks.defineLocale('yo', { 22790 months: 'SẹÌrẹÌ_EÌreÌleÌ_ẸrẹÌnaÌ_IÌgbeÌ_EÌbibi_OÌkuÌdu_Agẹmo_OÌguÌn_Owewe_á»ÌwaÌraÌ_BeÌluÌ_á»ÌpẹÌÌ'.split( 22791 '_' 22792 ), 22793 monthsShort: 'SẹÌr_EÌrl_Ẹrn_IÌgb_EÌbi_OÌkuÌ_Agẹ_OÌguÌ_Owe_á»ÌwaÌ_BeÌl_á»ÌpẹÌÌ'.split('_'), 22794 weekdays: 'AÌiÌkuÌ_AjeÌ_IÌsẹÌgun_á»já»ÌruÌ_á»já»Ìbá»_ẸtiÌ_AÌbaÌmẹÌta'.split('_'), 22795 weekdaysShort: 'AÌiÌk_AjeÌ_IÌsẹÌ_á»jr_á»jb_ẸtiÌ_AÌbaÌ'.split('_'), 22796 weekdaysMin: 'AÌiÌ_Aj_IÌs_á»r_á»b_Ẹt_AÌb'.split('_'), 22797 longDateFormat: { 22798 LT: 'h:mm A', 22799 LTS: 'h:mm:ss A', 22800 L: 'DD/MM/YYYY', 22801 LL: 'D MMMM YYYY', 22802 LLL: 'D MMMM YYYY h:mm A', 22803 LLLL: 'dddd, D MMMM YYYY h:mm A', 22804 }, 22805 calendar: { 22806 sameDay: '[OÌniÌ ni] LT', 22807 nextDay: '[á»Ìla ni] LT', 22808 nextWeek: "dddd [á»sáº¹Ì toÌn'bá»] [ni] LT", 22809 lastDay: '[AÌna ni] LT', 22810 lastWeek: 'dddd [á»sáº¹Ì toÌlá»Ì] [ni] LT', 22811 sameElse: 'L', 22812 }, 22813 relativeTime: { 22814 future: 'niÌ %s', 22815 past: '%s ká»jaÌ', 22816 s: 'iÌsẹjuÌ aayaÌ die', 22817 ss: 'aayaÌ %d', 22818 m: 'iÌsẹjuÌ kan', 22819 mm: 'iÌsẹjuÌ %d', 22820 h: 'waÌkati kan', 22821 hh: 'waÌkati %d', 22822 d: 'á»já»Ì kan', 22823 dd: 'á»já»Ì %d', 22824 M: 'osuÌ kan', 22825 MM: 'osuÌ %d', 22826 y: 'á»duÌn kan', 22827 yy: 'á»duÌn %d', 22828 }, 22829 dayOfMonthOrdinalParse: /á»já»Ì\s\d{1,2}/, 22830 ordinal: 'á»já»Ì %d', 22831 week: { 22832 dow: 1, // Monday is the first day of the week. 22833 doy: 4, // The week that contains Jan 4th is the first week of the year. 22834 }, 22835 }); 22836 22837 //! moment.js locale configuration 22838 22839 hooks.defineLocale('zh-cn', { 22840 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 22841 '_' 22842 ), 22843 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 22844 '_' 22845 ), 22846 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 22847 weekdaysShort: '卿¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å '.split('_'), 22848 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 22849 longDateFormat: { 22850 LT: 'HH:mm', 22851 LTS: 'HH:mm:ss', 22852 L: 'YYYY/MM/DD', 22853 LL: 'YYYYå¹´MæDæ¥', 22854 LLL: 'YYYYå¹´MæDæ¥Ahç¹mmå', 22855 LLLL: 'YYYYå¹´MæDæ¥ddddAhç¹mmå', 22856 l: 'YYYY/M/D', 22857 ll: 'YYYYå¹´MæDæ¥', 22858 lll: 'YYYYå¹´MæDæ¥ HH:mm', 22859 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 22860 }, 22861 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 22862 meridiemHour: function (hour, meridiem) { 22863 if (hour === 12) { 22864 hour = 0; 22865 } 22866 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 22867 return hour; 22868 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 22869 return hour + 12; 22870 } else { 22871 // 'ä¸å' 22872 return hour >= 11 ? hour : hour + 12; 22873 } 22874 }, 22875 meridiem: function (hour, minute, isLower) { 22876 var hm = hour * 100 + minute; 22877 if (hm < 600) { 22878 return '忍'; 22879 } else if (hm < 900) { 22880 return 'æ©ä¸'; 22881 } else if (hm < 1130) { 22882 return 'ä¸å'; 22883 } else if (hm < 1230) { 22884 return 'ä¸å'; 22885 } else if (hm < 1800) { 22886 return 'ä¸å'; 22887 } else { 22888 return 'æä¸'; 22889 } 22890 }, 22891 calendar: { 22892 sameDay: '[ä»å¤©]LT', 22893 nextDay: '[æå¤©]LT', 22894 nextWeek: function (now) { 22895 if (now.week() !== this.week()) { 22896 return '[ä¸]dddLT'; 22897 } else { 22898 return '[æ¬]dddLT'; 22899 } 22900 }, 22901 lastDay: '[æ¨å¤©]LT', 22902 lastWeek: function (now) { 22903 if (this.week() !== now.week()) { 22904 return '[ä¸]dddLT'; 22905 } else { 22906 return '[æ¬]dddLT'; 22907 } 22908 }, 22909 sameElse: 'L', 22910 }, 22911 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|å¨)/, 22912 ordinal: function (number, period) { 22913 switch (period) { 22914 case 'd': 22915 case 'D': 22916 case 'DDD': 22917 return number + 'æ¥'; 22918 case 'M': 22919 return number + 'æ'; 22920 case 'w': 22921 case 'W': 22922 return number + 'å¨'; 22923 default: 22924 return number; 22925 } 22926 }, 22927 relativeTime: { 22928 future: '%så', 22929 past: '%så', 22930 s: 'å ç§', 22931 ss: '%d ç§', 22932 m: '1 åé', 22933 mm: '%d åé', 22934 h: '1 å°æ¶', 22935 hh: '%d å°æ¶', 22936 d: '1 天', 22937 dd: '%d 天', 22938 w: '1 å¨', 22939 ww: '%d å¨', 22940 M: '1 个æ', 22941 MM: '%d 个æ', 22942 y: '1 å¹´', 22943 yy: '%d å¹´', 22944 }, 22945 week: { 22946 // GB/T 7408-1994ãæ°æ®å åäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988çæ 22947 dow: 1, // Monday is the first day of the week. 22948 doy: 4, // The week that contains Jan 4th is the first week of the year. 22949 }, 22950 }); 22951 22952 //! moment.js locale configuration 22953 22954 hooks.defineLocale('zh-hk', { 22955 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 22956 '_' 22957 ), 22958 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 22959 '_' 22960 ), 22961 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 22962 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 22963 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 22964 longDateFormat: { 22965 LT: 'HH:mm', 22966 LTS: 'HH:mm:ss', 22967 L: 'YYYY/MM/DD', 22968 LL: 'YYYYå¹´MæDæ¥', 22969 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 22970 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 22971 l: 'YYYY/M/D', 22972 ll: 'YYYYå¹´MæDæ¥', 22973 lll: 'YYYYå¹´MæDæ¥ HH:mm', 22974 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 22975 }, 22976 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 22977 meridiemHour: function (hour, meridiem) { 22978 if (hour === 12) { 22979 hour = 0; 22980 } 22981 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 22982 return hour; 22983 } else if (meridiem === 'ä¸å') { 22984 return hour >= 11 ? hour : hour + 12; 22985 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 22986 return hour + 12; 22987 } 22988 }, 22989 meridiem: function (hour, minute, isLower) { 22990 var hm = hour * 100 + minute; 22991 if (hm < 600) { 22992 return '忍'; 22993 } else if (hm < 900) { 22994 return 'æ©ä¸'; 22995 } else if (hm < 1200) { 22996 return 'ä¸å'; 22997 } else if (hm === 1200) { 22998 return 'ä¸å'; 22999 } else if (hm < 1800) { 23000 return 'ä¸å'; 23001 } else { 23002 return 'æä¸'; 23003 } 23004 }, 23005 calendar: { 23006 sameDay: '[ä»å¤©]LT', 23007 nextDay: '[æå¤©]LT', 23008 nextWeek: '[ä¸]ddddLT', 23009 lastDay: '[æ¨å¤©]LT', 23010 lastWeek: '[ä¸]ddddLT', 23011 sameElse: 'L', 23012 }, 23013 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 23014 ordinal: function (number, period) { 23015 switch (period) { 23016 case 'd': 23017 case 'D': 23018 case 'DDD': 23019 return number + 'æ¥'; 23020 case 'M': 23021 return number + 'æ'; 23022 case 'w': 23023 case 'W': 23024 return number + 'é±'; 23025 default: 23026 return number; 23027 } 23028 }, 23029 relativeTime: { 23030 future: '%så¾', 23031 past: '%så', 23032 s: 'å¹¾ç§', 23033 ss: '%d ç§', 23034 m: '1 åé', 23035 mm: '%d åé', 23036 h: '1 å°æ', 23037 hh: '%d å°æ', 23038 d: '1 天', 23039 dd: '%d 天', 23040 M: '1 åæ', 23041 MM: '%d åæ', 23042 y: '1 å¹´', 23043 yy: '%d å¹´', 23044 }, 23045 }); 23046 23047 //! moment.js locale configuration 23048 23049 hooks.defineLocale('zh-mo', { 23050 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 23051 '_' 23052 ), 23053 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 23054 '_' 23055 ), 23056 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 23057 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 23058 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 23059 longDateFormat: { 23060 LT: 'HH:mm', 23061 LTS: 'HH:mm:ss', 23062 L: 'DD/MM/YYYY', 23063 LL: 'YYYYå¹´MæDæ¥', 23064 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 23065 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 23066 l: 'D/M/YYYY', 23067 ll: 'YYYYå¹´MæDæ¥', 23068 lll: 'YYYYå¹´MæDæ¥ HH:mm', 23069 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 23070 }, 23071 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 23072 meridiemHour: function (hour, meridiem) { 23073 if (hour === 12) { 23074 hour = 0; 23075 } 23076 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 23077 return hour; 23078 } else if (meridiem === 'ä¸å') { 23079 return hour >= 11 ? hour : hour + 12; 23080 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 23081 return hour + 12; 23082 } 23083 }, 23084 meridiem: function (hour, minute, isLower) { 23085 var hm = hour * 100 + minute; 23086 if (hm < 600) { 23087 return '忍'; 23088 } else if (hm < 900) { 23089 return 'æ©ä¸'; 23090 } else if (hm < 1130) { 23091 return 'ä¸å'; 23092 } else if (hm < 1230) { 23093 return 'ä¸å'; 23094 } else if (hm < 1800) { 23095 return 'ä¸å'; 23096 } else { 23097 return 'æä¸'; 23098 } 23099 }, 23100 calendar: { 23101 sameDay: '[ä»å¤©] LT', 23102 nextDay: '[æå¤©] LT', 23103 nextWeek: '[ä¸]dddd LT', 23104 lastDay: '[æ¨å¤©] LT', 23105 lastWeek: '[ä¸]dddd LT', 23106 sameElse: 'L', 23107 }, 23108 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 23109 ordinal: function (number, period) { 23110 switch (period) { 23111 case 'd': 23112 case 'D': 23113 case 'DDD': 23114 return number + 'æ¥'; 23115 case 'M': 23116 return number + 'æ'; 23117 case 'w': 23118 case 'W': 23119 return number + 'é±'; 23120 default: 23121 return number; 23122 } 23123 }, 23124 relativeTime: { 23125 future: '%så §', 23126 past: '%så', 23127 s: 'å¹¾ç§', 23128 ss: '%d ç§', 23129 m: '1 åé', 23130 mm: '%d åé', 23131 h: '1 å°æ', 23132 hh: '%d å°æ', 23133 d: '1 天', 23134 dd: '%d 天', 23135 M: '1 åæ', 23136 MM: '%d åæ', 23137 y: '1 å¹´', 23138 yy: '%d å¹´', 23139 }, 23140 }); 23141 23142 //! moment.js locale configuration 23143 23144 hooks.defineLocale('zh-tw', { 23145 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 23146 '_' 23147 ), 23148 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 23149 '_' 23150 ), 23151 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 23152 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 23153 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 23154 longDateFormat: { 23155 LT: 'HH:mm', 23156 LTS: 'HH:mm:ss', 23157 L: 'YYYY/MM/DD', 23158 LL: 'YYYYå¹´MæDæ¥', 23159 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 23160 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 23161 l: 'YYYY/M/D', 23162 ll: 'YYYYå¹´MæDæ¥', 23163 lll: 'YYYYå¹´MæDæ¥ HH:mm', 23164 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 23165 }, 23166 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 23167 meridiemHour: function (hour, meridiem) { 23168 if (hour === 12) { 23169 hour = 0; 23170 } 23171 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 23172 return hour; 23173 } else if (meridiem === 'ä¸å') { 23174 return hour >= 11 ? hour : hour + 12; 23175 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 23176 return hour + 12; 23177 } 23178 }, 23179 meridiem: function (hour, minute, isLower) { 23180 var hm = hour * 100 + minute; 23181 if (hm < 600) { 23182 return '忍'; 23183 } else if (hm < 900) { 23184 return 'æ©ä¸'; 23185 } else if (hm < 1130) { 23186 return 'ä¸å'; 23187 } else if (hm < 1230) { 23188 return 'ä¸å'; 23189 } else if (hm < 1800) { 23190 return 'ä¸å'; 23191 } else { 23192 return 'æä¸'; 23193 } 23194 }, 23195 calendar: { 23196 sameDay: '[ä»å¤©] LT', 23197 nextDay: '[æå¤©] LT', 23198 nextWeek: '[ä¸]dddd LT', 23199 lastDay: '[æ¨å¤©] LT', 23200 lastWeek: '[ä¸]dddd LT', 23201 sameElse: 'L', 23202 }, 23203 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 23204 ordinal: function (number, period) { 23205 switch (period) { 23206 case 'd': 23207 case 'D': 23208 case 'DDD': 23209 return number + 'æ¥'; 23210 case 'M': 23211 return number + 'æ'; 23212 case 'w': 23213 case 'W': 23214 return number + 'é±'; 23215 default: 23216 return number; 23217 } 23218 }, 23219 relativeTime: { 23220 future: '%så¾', 23221 past: '%så', 23222 s: 'å¹¾ç§', 23223 ss: '%d ç§', 23224 m: '1 åé', 23225 mm: '%d åé', 23226 h: '1 å°æ', 23227 hh: '%d å°æ', 23228 d: '1 天', 23229 dd: '%
vendor: 12,199 bytes, lines 23229-23650
23229d 天', 23230 M: '1 åæ', 23231 MM: '%d åæ', 23232 y: '1 å¹´', 23233 yy: '%d å¹´', 23234 }, 23235 }); 23236 23237 hooks.locale('en'); 23238 23239 return hooks; 23240 23241}))); 23242//! moment-timezone.js 23243//! version : 0.5.43 23244//! Copyright (c) JS Foundation and other contributors 23245//! license : MIT 23246//! github.com/moment/moment-timezone 23247 23248(function (root, factory) { 23249 "use strict"; 23250 23251 /*global define*/ 23252 if (typeof module === 'object' && module.exports) { 23253 module.exports = factory(require('moment')); // Node 23254 } else if (typeof define === 'function' && define.amd) { 23255 define(['moment'], factory); // AMD 23256 } else { 23257 factory(root.moment); // Browser 23258 } 23259}(this, function (moment) { 23260 "use strict"; 23261 23262 // Resolves es6 module loading issue 23263 if (moment.version === undefined && moment.default) { 23264 moment = moment.default; 23265 } 23266 23267 // Do not load moment-timezone a second time. 23268 // if (moment.tz !== undefined) { 23269 // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); 23270 // return moment; 23271 // } 23272 23273 var VERSION = "0.5.43", 23274 zones = {}, 23275 links = {}, 23276 countries = {}, 23277 names = {}, 23278 guesses = {}, 23279 cachedGuess; 23280 23281 if (!moment || typeof moment.version !== 'string') { 23282 logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); 23283 } 23284 23285 var momentVersion = moment.version.split('.'), 23286 major = +momentVersion[0], 23287 minor = +momentVersion[1]; 23288 23289 // Moment.js version check 23290 if (major < 2 || (major === 2 && minor < 6)) { 23291 logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); 23292 } 23293 23294 /************************************ 23295 Unpacking 23296 ************************************/ 23297 23298 function charCodeToInt(charCode) { 23299 if (charCode > 96) { 23300 return charCode - 87; 23301 } else if (charCode > 64) { 23302 return charCode - 29; 23303 } 23304 return charCode - 48; 23305 } 23306 23307 function unpackBase60(string) { 23308 var i = 0, 23309 parts = string.split('.'), 23310 whole = parts[0], 23311 fractional = parts[1] || '', 23312 multiplier = 1, 23313 num, 23314 out = 0, 23315 sign = 1; 23316 23317 // handle negative numbers 23318 if (string.charCodeAt(0) === 45) { 23319 i = 1; 23320 sign = -1; 23321 } 23322 23323 // handle digits before the decimal 23324 for (i; i < whole.length; i++) { 23325 num = charCodeToInt(whole.charCodeAt(i)); 23326 out = 60 * out + num; 23327 } 23328 23329 // handle digits after the decimal 23330 for (i = 0; i < fractional.length; i++) { 23331 multiplier = multiplier / 60; 23332 num = charCodeToInt(fractional.charCodeAt(i)); 23333 out += num * multiplier; 23334 } 23335 23336 return out * sign; 23337 } 23338 23339 function arrayToInt (array) { 23340 for (var i = 0; i < array.length; i++) { 23341 array[i] = unpackBase60(array[i]); 23342 } 23343 } 23344 23345 function intToUntil (array, length) { 23346 for (var i = 0; i < length; i++) { 23347 array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds 23348 } 23349 23350 array[length - 1] = Infinity; 23351 } 23352 23353 function mapIndices (source, indices) { 23354 var out = [], i; 23355 23356 for (i = 0; i < indices.length; i++) { 23357 out[i] = source[indices[i]]; 23358 } 23359 23360 return out; 23361 } 23362 23363 function unpack (string) { 23364 var data = string.split('|'), 23365 offsets = data[2].split(' '), 23366 indices = data[3].split(''), 23367 untils = data[4].split(' '); 23368 23369 arrayToInt(offsets); 23370 arrayToInt(indices); 23371 arrayToInt(untils); 23372 23373 intToUntil(untils, indices.length); 23374 23375 return { 23376 name : data[0], 23377 abbrs : mapIndices(data[1].split(' '), indices), 23378 offsets : mapIndices(offsets, indices), 23379 untils : untils, 23380 population : data[5] | 0 23381 }; 23382 } 23383 23384 /************************************ 23385 Zone object 23386 ************************************/ 23387 23388 function Zone (packedString) { 23389 if (packedString) { 23390 this._set(unpack(packedString)); 23391 } 23392 } 23393 23394 Zone.prototype = { 23395 _set : function (unpacked) { 23396 this.name = unpacked.name; 23397 this.abbrs = unpacked.abbrs; 23398 this.untils = unpacked.untils; 23399 this.offsets = unpacked.offsets; 23400 this.population = unpacked.population; 23401 }, 23402 23403 _index : function (timestamp) { 23404 var target = +timestamp, 23405 untils = this.untils, 23406 i; 23407 23408 for (i = 0; i < untils.length; i++) { 23409 if (target < untils[i]) { 23410 return i; 23411 } 23412 } 23413 }, 23414 23415 countries : function () { 23416 var zone_name = this.name; 23417 return Object.keys(countries).filter(function (country_code) { 23418 return countries[country_code].zones.indexOf(zone_name) !== -1; 23419 }); 23420 }, 23421 23422 parse : function (timestamp) { 23423 var target = +timestamp, 23424 offsets = this.offsets, 23425 untils = this.untils, 23426 max = untils.length - 1, 23427 offset, offsetNext, offsetPrev, i; 23428 23429 for (i = 0; i < max; i++) { 23430 offset = offsets[i]; 23431 offsetNext = offsets[i + 1]; 23432 offsetPrev = offsets[i ? i - 1 : i]; 23433 23434 if (offset < offsetNext && tz.moveAmbiguousForward) { 23435 offset = offsetNext; 23436 } else if (offset > offsetPrev && tz.moveInvalidForward) { 23437 offset = offsetPrev; 23438 } 23439 23440 if (target < untils[i] - (offset * 60000)) { 23441 return offsets[i]; 23442 } 23443 } 23444 23445 return offsets[max]; 23446 }, 23447 23448 abbr : function (mom) { 23449 return this.abbrs[this._index(mom)]; 23450 }, 23451 23452 offset : function (mom) { 23453 logError("zone.offset has been deprecated in favor of zone.utcOffset"); 23454 return this.offsets[this._index(mom)]; 23455 }, 23456 23457 utcOffset : function (mom) { 23458 return this.offsets[this._index(mom)]; 23459 } 23460 }; 23461 23462 /************************************ 23463 Country object 23464 ************************************/ 23465 23466 function Country (country_name, zone_names) { 23467 this.name = country_name; 23468 this.zones = zone_names; 23469 } 23470 23471 /************************************ 23472 Current Timezone 23473 ************************************/ 23474 23475 function OffsetAt(at) { 23476 var timeString = at.toTimeString(); 23477 var abbr = timeString.match(/\([a-z ]+\)/i); 23478 if (abbr && abbr[0]) { 23479 // 17:56:31 GMT-0600 (CST) 23480 // 17:56:31 GMT-0600 (Central Standard Time) 23481 abbr = abbr[0].match(/[A-Z]/g); 23482 abbr = abbr ? abbr.join('') : undefined; 23483 } else { 23484 // 17:56:31 CST 23485 // 17:56:31 GMT+0800 (å°åæ¨æºæé) 23486 abbr = timeString.match(/[A-Z]{3,5}/g); 23487 abbr = abbr ? abbr[0] : undefined; 23488 } 23489 23490 if (abbr === 'GMT') { 23491 abbr = undefined; 23492 } 23493 23494 this.at = +at; 23495 this.abbr = abbr; 23496 this.offset = at.getTimezoneOffset(); 23497 } 23498 23499 function ZoneScore(zone) { 23500 this.zone = zone; 23501 this.offsetScore = 0; 23502 this.abbrScore = 0; 23503 } 23504 23505 ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { 23506 this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); 23507 if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { 23508 this.abbrScore++; 23509 } 23510 }; 23511 23512 function findChange(low, high) { 23513 var mid, diff; 23514 23515 while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { 23516 mid = new OffsetAt(new Date(low.at + diff)); 23517 if (mid.offset === low.offset) { 23518 low = mid; 23519 } else { 23520 high = mid; 23521 } 23522 } 23523 23524 return low; 23525 } 23526 23527 function userOffsets() { 23528 var startYear = new Date().getFullYear() - 2, 23529 last = new OffsetAt(new Date(startYear, 0, 1)), 23530 offsets = [last], 23531 change, next, i; 23532 23533 for (i = 1; i < 48; i++) { 23534 next = new OffsetAt(new Date(startYear, i, 1)); 23535 if (next.offset !== last.offset) { 23536 change = findChange(last, next); 23537 offsets.push(change); 23538 offsets.push(new OffsetAt(new Date(change.at + 6e4))); 23539 } 23540 last = next; 23541 } 23542 23543 for (i = 0; i < 4; i++) { 23544 offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); 23545 offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); 23546 } 23547 23548 return offsets; 23549 } 23550 23551 function sortZoneScores (a, b) { 23552 if (a.offsetScore !== b.offsetScore) { 23553 return a.offsetScore - b.offsetScore; 23554 } 23555 if (a.abbrScore !== b.abbrScore) { 23556 return a.abbrScore - b.abbrScore; 23557 } 23558 if (a.zone.population !== b.zone.population) { 23559 return b.zone.population - a.zone.population; 23560 } 23561 return b.zone.name.localeCompare(a.zone.name); 23562 } 23563 23564 function addToGuesses (name, offsets) { 23565 var i, offset; 23566 arrayToInt(offsets); 23567 for (i = 0; i < offsets.length; i++) { 23568 offset = offsets[i]; 23569 guesses[offset] = guesses[offset] || {}; 23570 guesses[offset][name] = true; 23571 } 23572 } 23573 23574 function guessesForUserOffsets (offsets) { 23575 var offsetsLength = offsets.length, 23576 filteredGuesses = {}, 23577 out = [], 23578 i, j, guessesOffset; 23579 23580 for (i = 0; i < offsetsLength; i++) { 23581 guessesOffset = guesses[offsets[i].offset] || {}; 23582 for (j in guessesOffset) { 23583 if (guessesOffset.hasOwnProperty(j)) { 23584 filteredGuesses[j] = true; 23585 } 23586 } 23587 } 23588 23589 for (i in filteredGuesses) { 23590 if (filteredGuesses.hasOwnProperty(i)) { 23591 out.push(names[i]); 23592 } 23593 } 23594 23595 return out; 23596 } 23597 23598 function rebuildGuess () { 23599 23600 // use Intl API when available and returning valid time zone 23601 try { 23602 var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; 23603 if (intlName && intlName.length > 3) { 23604 var name = names[normalizeName(intlName)]; 23605 if (name) { 23606 return name; 23607 } 23608 logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); 23609 } 23610 } catch (e) { 23611 // Intl unavailable, fall back to manual guessing. 23612 } 23613 23614 var offsets = userOffsets(), 23615 offsetsLength = offsets.length, 23616 guesses = guessesForUserOffsets(offsets), 23617 zoneScores = [], 23618 zoneScore, i, j; 23619 23620 for (i = 0; i < guesses.length; i++) { 23621 zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); 23622 for (j = 0; j < offsetsLength; j++) { 23623 zoneScore.scoreOffsetAt(offsets[j]); 23624 } 23625 zoneScores.push(zoneScore); 23626 } 23627 23628 zoneScores.sort(sortZoneScores); 23629 23630 return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; 23631 } 23632 23633 function guess (ignoreCache) { 23634 if (!cachedGuess || ignoreCache) { 23635 cachedGuess = rebuildGuess(); 23636 } 23637 return cachedGuess; 23638 } 23639 23640 /************************************ 23641 Global Methods 23642 ************************************/ 23643 23644 function normalizeName (name) { 23645 return (name || '').toLowerCase().replace(/\//g, '_'); 23646 } 23647 23648 function addZone (packed) { 23649 var i, name, split, normalized; 23650
vendor: 1,942 bytes, lines 23651-23729
23651 if (typeof packed === "string") { 23652 packed = [packed]; 23653 } 23654 23655 for (i = 0; i < packed.length; i++) { 23656 split = packed[i].split('|'); 23657 name = split[0]; 23658 normalized = normalizeName(name); 23659 zones[normalized] = packed[i]; 23660 names[normalized] = name; 23661 addToGuesses(normalized, split[2].split(' ')); 23662 } 23663 } 23664 23665 function getZone (name, caller) { 23666 23667 name = normalizeName(name); 23668 23669 var zone = zones[name]; 23670 var link; 23671 23672 if (zone instanceof Zone) { 23673 return zone; 23674 } 23675 23676 if (typeof zone === 'string') { 23677 zone = new Zone(zone); 23678 zones[name] = zone; 23679 return zone; 23680 } 23681 23682 // Pass getZone to prevent recursion more than 1 level deep 23683 if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { 23684 zone = zones[name] = new Zone(); 23685 zone._set(link); 23686 zone.name = names[name]; 23687 return zone; 23688 } 23689 23690 return null; 23691 } 23692 23693 function getNames () { 23694 var i, out = []; 23695 23696 for (i in names) { 23697 if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { 23698 out.push(names[i]); 23699 } 23700 } 23701 23702 return out.sort(); 23703 } 23704 23705 function getCountryNames () { 23706 return Object.keys(countries); 23707 } 23708 23709 function addLink (aliases) { 23710 var i, alias, normal0, normal1; 23711 23712 if (typeof aliases === "string") { 23713 aliases = [aliases]; 23714 } 23715 23716 for (i = 0; i < aliases.length; i++) { 23717 alias = aliases[i].split('|'); 23718 23719 normal0 = normalizeName(alias[0]); 23720 normal1 = normalizeName(alias[1]); 23721 23722 links[normal0] = normal1; 23723 names[normal0] = alias[0]; 23724 23725 links[normal1] = normal0; 23726 names[normal1] = alias[1]; 23727 } 23728 } 23729
vendor: 6,104 bytes, lines 23730-23933
23730 function addCountries (data) { 23731 var i, country_code, country_zones, split; 23732 if (!data || !data.length) return; 23733 for (i = 0; i < data.length; i++) { 23734 split = data[i].split('|'); 23735 country_code = split[0].toUpperCase(); 23736 country_zones = split[1].split(' '); 23737 countries[country_code] = new Country( 23738 country_code, 23739 country_zones 23740 ); 23741 } 23742 } 23743 23744 function getCountry (name) { 23745 name = name.toUpperCase(); 23746 return countries[name] || null; 23747 } 23748 23749 function zonesForCountry(country, with_offset) { 23750 country = getCountry(country); 23751 23752 if (!country) return null; 23753 23754 var zones = country.zones.sort(); 23755 23756 if (with_offset) { 23757 return zones.map(function (zone_name) { 23758 var zone = getZone(zone_name); 23759 return { 23760 name: zone_name, 23761 offset: zone.utcOffset(new Date()) 23762 }; 23763 }); 23764 } 23765 23766 return zones; 23767 } 23768 23769 function loadData (data) { 23770 addZone(data.zones); 23771 addLink(data.links); 23772 addCountries(data.countries); 23773 tz.dataVersion = data.version; 23774 } 23775 23776 function zoneExists (name) { 23777 if (!zoneExists.didShowError) { 23778 zoneExists.didShowError = true; 23779 logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); 23780 } 23781 return !!getZone(name); 23782 } 23783 23784 function needsOffset (m) { 23785 var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); 23786 return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); 23787 } 23788 23789 function logError (message) { 23790 if (typeof console !== 'undefined' && typeof console.error === 'function') { 23791 console.error(message); 23792 } 23793 } 23794 23795 /************************************ 23796 moment.tz namespace 23797 ************************************/ 23798 23799 function tz (input) { 23800 var args = Array.prototype.slice.call(arguments, 0, -1), 23801 name = arguments[arguments.length - 1], 23802 zone = getZone(name), 23803 out = moment.utc.apply(null, args); 23804 23805 if (zone && !moment.isMoment(input) && needsOffset(out)) { 23806 out.add(zone.parse(out), 'minutes'); 23807 } 23808 23809 out.tz(name); 23810 23811 return out; 23812 } 23813 23814 tz.version = VERSION; 23815 tz.dataVersion = ''; 23816 tz._zones = zones; 23817 tz._links = links; 23818 tz._names = names; 23819 tz._countries = countries; 23820 tz.add = addZone; 23821 tz.link = addLink; 23822 tz.load = loadData; 23823 tz.zone = getZone; 23824 tz.zoneExists = zoneExists; // deprecated in 0.1.0 23825 tz.guess = guess; 23826 tz.names = getNames; 23827 tz.Zone = Zone; 23828 tz.unpack = unpack; 23829 tz.unpackBase60 = unpackBase60; 23830 tz.needsOffset = needsOffset; 23831 tz.moveInvalidForward = true; 23832 tz.moveAmbiguousForward = false; 23833 tz.countries = getCountryNames; 23834 tz.zonesForCountry = zonesForCountry; 23835 23836 /************************************ 23837 Interface with Moment.js 23838 ************************************/ 23839 23840 var fn = moment.fn; 23841 23842 moment.tz = tz; 23843 23844 moment.defaultZone = null; 23845 23846 moment.updateOffset = function (mom, keepTime) { 23847 var zone = moment.defaultZone, 23848 offset; 23849 23850 if (mom._z === undefined) { 23851 if (zone && needsOffset(mom) && !mom._isUTC) { 23852 mom._d = moment.utc(mom._a)._d; 23853 mom.utc().add(zone.parse(mom), 'minutes'); 23854 } 23855 mom._z = zone; 23856 } 23857 if (mom._z) { 23858 offset = mom._z.utcOffset(mom); 23859 if (Math.abs(offset) < 16) { 23860 offset = offset / 60; 23861 } 23862 if (mom.utcOffset !== undefined) { 23863 var z = mom._z; 23864 mom.utcOffset(-offset, keepTime); 23865 mom._z = z; 23866 } else { 23867 mom.zone(offset, keepTime); 23868 } 23869 } 23870 }; 23871 23872 fn.tz = function (name, keepTime) { 23873 if (name) { 23874 if (typeof name !== 'string') { 23875 throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); 23876 } 23877 this._z = getZone(name); 23878 if (this._z) { 23879 moment.updateOffset(this, keepTime); 23880 } else { 23881 logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); 23882 } 23883 return this; 23884 } 23885 if (this._z) { return this._z.name; } 23886 }; 23887 23888 function abbrWrap (old) { 23889 return function () { 23890 if (this._z) { return this._z.abbr(this); } 23891 return old.call(this); 23892 }; 23893 } 23894 23895 function resetZoneWrap (old) { 23896 return function () { 23897 this._z = null; 23898 return old.apply(this, arguments); 23899 }; 23900 } 23901 23902 function resetZoneWrap2 (old) { 23903 return function () { 23904 if (arguments.length > 0) this._z = null; 23905 return old.apply(this, arguments); 23906 }; 23907 } 23908 23909 fn.zoneName = abbrWrap(fn.zoneName); 23910 fn.zoneAbbr = abbrWrap(fn.zoneAbbr); 23911 fn.utc = resetZoneWrap(fn.utc); 23912 fn.local = resetZoneWrap(fn.local); 23913 fn.utcOffset = resetZoneWrap2(fn.utcOffset); 23914 23915 moment.tz.setDefault = function(name) { 23916 if (major < 2 || (major === 2 && minor < 9)) { 23917 logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); 23918 } 23919 moment.defaultZone = name ? getZone(name) : null; 23920 return moment; 23921 }; 23922 23923 // Cloning a moment should include the _z property. 23924 var momentProperties = moment.momentProperties; 23925 if (Object.prototype.toString.call(momentProperties) === '[object Array]') { 23926 // moment 2.8.1+ 23927 momentProperties.push('_z'); 23928 momentProperties.push('_a'); 23929 } else if (momentProperties) { 23930 // moment 2.7.0 23931 momentProperties._z = null; 23932 } 23933
23934 loadData({ 23935 "version": "2023c", 23936 "zones": [ 23937 "Africa/Abidjan|GMT|0|0||48e5", 23938 "Africa/Nairobi|EAT|-30|0||47e5", 23939 "Africa/Algiers|CET|-10|0||26e5", 23940 "Africa/Lagos|WAT|-10|0||17e6", 23941 "Africa/Khartoum|CAT|-20|0||51e5", 23942 "Africa/Cairo|EET EEST|-20 -30|0101010101010|29NW0 1cL0 1cN0 1fz0 1a10 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0|15e6", 23943 "Africa/Casablanca|+00 +01|0 -10|010101010101010101010101|1Vq20 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|32e5", 23944 "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6", 23945 "Africa/Johannesburg|SAST|-20|0||84e5", 23946 "Africa/Juba|EAT CAT|-30 -20|01|24nx0|", 23947 "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|", 23948 "Africa/Tripoli|EET|-20|0||11e5", 23949 "America/Adak|HST HDT|a0 90|01010101010101010101010|1VkA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326", 23950 "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1Vkz0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4", 23951 "America/Santo_Domingo|AST|40|0||29e5", 23952 "America/Fortaleza|-03|30|0||34e5", 23953 "America/Asuncion|-03 -04|30 40|01010101010101010101010|1Vq30 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5", 23954 "America/Panama|EST|50|0||15e5", 23955 "America/Mexico_City|CST CDT|60 50|01010101010|1VsU0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6", 23956 "America/Managua|CST|60|0||22e5", 23957 "America/Caracas|-04|40|0||29e5", 23958 "America/Lima|-05|50|0||11e6", 23959 "America/Denver|MST MDT|70 60|01010101010101010101010|1Vkx0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5", 23960 "America/Campo_Grande|-03 -04|30 40|0101|1Vc30 1HB0 FX0|77e4", 23961 "America/Chicago|CST CDT|60 50|01010101010101010101010|1Vkw0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5", 23962 "America/Chihuahua|MST MDT CST|70 60 60|01010101012|1VsV0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4", 23963 "America/Ciudad_Juarez|MST MDT CST|70 60 60|010101010120101010101010|1Vkx0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|", 23964 "America/Phoenix|MST|70|0||42e5", 23965 "America/Whitehorse|PST PDT MST|80 70 70|0101012|1Vky0 1zb0 Op0 1zb0 Op0 1z90|23e3", 23966 "America/New_York|EST EDT|50 40|01010101010101010101010|1Vkv0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6", 23967 "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1Vky0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6", 23968 "America/Halifax|AST ADT|40 30|01010101010101010101010|1Vku0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4", 23969 "America/Godthab|-03 -02 -01|30 20 10|0101010101012121212121|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 2so0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3", 23970 "America/Grand_Turk|AST EDT EST|40 40 50|01212121212121212121212|1Vkv0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|37e2", 23971 "America/Havana|CST CDT|50 40|01010101010101010101010|1Vkt0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5", 23972 "America/Mazatlan|MST MDT|70 60|01010101010|1VsV0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|44e4", 23973 "America/Metlakatla|AKST AKDT PST|90 80 80|012010101010101010101010|1Vkz0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2", 23974 "America/Miquelon|-03 -02|30 20|01010101010101010101010|1Vkt0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2", 23975 "America/Noronha|-02|20|0||30e2", 23976 "America/Ojinaga|MST MDT CST CDT|70 60 60 50|01010101012323232323232|1Vkx0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 Rc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e3", 23977 "America/Santiago|-03 -04|30 40|01010101010101010101010|1VJD0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|62e5", 23978 "America/Sao_Paulo|-02 -03|20 30|0101|1Vc20 1HB0 FX0|20e6", 23979 "Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4", 23980 "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1Vktu 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4", 23981 "Antarctica/Casey|+11 +08|-b0 -80|0101010|1Vkh0 1o30 14k0 1kr0 12l0 1o01|10", 23982 "Asia/Bangkok|+07|-70|0||15e6", 23983 "Asia/Vladivostok|+10|-a0|0||60e4", 23984 "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1VsE0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5",
23985 "Asia/Tashkent|+05|-50|0||23e5", 23986 "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1VsC0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5", 23987 "Europe/Istanbul|+03|-30|0||13e6", 23988 "Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40", 23989 "Asia/Dhaka|+06|-60|0||16e6", 23990 "Asia/Amman|EET EEST +03|-20 -30 -30|01010101012|1VrW0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 LA0 1C00|25e5", 23991 "Asia/Kamchatka|+12|-c0|0||18e4", 23992 "Asia/Dubai|+04|-40|0||39e5", 23993 "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1VpW0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5", 23994 "Asia/Kuala_Lumpur|+08|-80|0||71e5", 23995 "Asia/Kolkata|IST|-5u|0||15e6", 23996 "Asia/Chita|+09|-90|0||33e4", 23997 "Asia/Shanghai|CST|-80|0||23e6", 23998 "Asia/Colombo|+0530|-5u|0||22e5", 23999 "Asia/Damascus|EET EEST +03|-20 -30 -30|01010101012|1VrW0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5", 24000 "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5", 24001 "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1Vpz0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0|18e5", 24002 "Asia/Hong_Kong|HKT|-80|0||73e5", 24003 "Asia/Jakarta|WIB|-70|0||31e6", 24004 "Asia/Jayapura|WIT|-90|0||26e4", 24005 "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1Vpc0 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4", 24006 "Asia/Kabul|+0430|-4u|0||46e5", 24007 "Asia/Karachi|PKT|-50|0||24e6", 24008 "Asia/Kathmandu|+0545|-5J|0||12e5", 24009 "Asia/Sakhalin|+11|-b0|0||58e4", 24010 "Asia/Makassar|WITA|-80|0||15e5", 24011 "Asia/Manila|PST|-80|0||24e6", 24012 "Asia/Pyongyang|KST KST|-8u -90|01|1VGf0|29e5", 24013 "Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4", 24014 "Asia/Rangoon|+0630|-6u|0||48e5", 24015 "Asia/Seoul|KST|-90|0||23e6", 24016 "Asia/Tehran|+0330 +0430|-3u -4u|01010101010|1VoIu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6", 24017 "Asia/Tokyo|JST|-90|0||38e6", 24018 "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5", 24019 "Atlantic/Cape_Verde|-01|10|0||50e4", 24020 "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1VsEu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5", 24021 "Australia/Brisbane|AEST|-a0|0||20e5", 24022 "Australia/Darwin|ACST|-9u|0||12e4", 24023 "Australia/Eucla|+0845|-8J|0||368", 24024 "Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1VsD0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347", 24025 "Australia/Perth|AWST|-80|0||18e5", 24026 "Pacific/Easter|-05 -06|50 60|01010101010101010101010|1VJD0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|30e2", 24027 "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5", 24028 "Etc/GMT-1|+01|-10|0||", 24029 "Pacific/Tongatapu|+13|-d0|0||75e3", 24030 "Pacific/Kiritimati|+14|-e0|0||51e2", 24031 "Etc/GMT-2|+02|-20|0||", 24032 "Pacific/Tahiti|-10|a0|0||18e4", 24033 "Pacific/Niue|-11|b0|0||12e2", 24034 "Etc/GMT+12|-12|c0|0||", 24035 "Pacific/Galapagos|-06|60|0||25e3", 24036 "Etc/GMT+7|-07|70|0||", 24037 "Pacific/Pitcairn|-08|80|0||56", 24038 "Pacific/Gambier|-09|90|0||125", 24039 "Etc/UTC|UTC|0|0||", 24040 "Europe/London|GMT BST|0 -10|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6", 24041 "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1Vq00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4", 24042 "Europe/Moscow|MSK|-30|0||16e6", 24043 "Europe/Volgograd|MSK +04|-30 -40|010|1WQL0 5gn0|10e5", 24044 "Pacific/Honolulu|HST|a0|0||37e4", 24045 "MET|MET MEST|-10 -20|01010101010101010101010|1Vq10 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|", 24046 "Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1VsC0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600", 24047 "Pacific/Apia|+14 +13|-e0 -d0|01010101|1VsC0 1cM0 1fA0 1a00 1fA0 1a00 1fA0|37e3", 24048 "Pacific/Fiji|+13 +12|-d0 -c0|01010101|1UVO0 1VA0 s00 20o0 pc0 2hc0 bc0|88e4", 24049 "Pacific/Guam|ChST|-a0|0||17e4", 24050 "Pacific/Marquesas|-0930|9u|0||86e2", 24051 "Pacific/Pago_Pago|SST|b0|0||37e2", 24052 "Pacific/Norfolk|+11 +12|-b0 -c0|01010101010101010101|219P0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|25e4" 24053 ], 24054 "links": [ 24055 "Africa/Abidjan|Africa/Accra", 24056 "Africa/Abidjan|Africa/Bamako", 24057 "Africa/Abidjan|Africa/Banjul", 24058 "Africa/Abidjan|Africa/Bissau", 24059 "Africa/Abidjan|Africa/Conakry", 24060 "Africa/Abidjan|Africa/Dakar", 24061 "Africa/Abidjan|Africa/Freetown", 24062 "Africa/Abidjan|Africa/Lome", 24063 "Africa/Abidjan|Africa/Monrovia", 24064 "Africa/Abidjan|Africa/Nouakchott", 24065 "Africa/Abidjan|Africa/Ouagadougou", 24066 "Africa/Abidjan|Africa/Timbuktu", 24067 "Africa/Abidjan|America/Danmarkshavn", 24068 "Africa/Abidjan|Atlantic/Reykjavik", 24069 "Africa/Abidjan|Atlantic/St_Helena", 24070 "Africa/Abidjan|Etc/GMT", 24071 "Africa/Abidjan|Etc/GMT+0", 24072 "Africa/Abidjan|Etc/GMT-0", 24073 "Africa/Abidjan|Etc/GMT0", 24074 "Africa/Abidjan|Etc/Greenwich", 24075 "Africa/Abidjan|GMT", 24076 "Africa/Abidjan|GMT+0", 24077 "Africa/Abidjan|GMT-0", 24078 "Africa/Abidjan|GMT0", 24079 "Africa/Abidjan|Greenwich", 24080 "Africa/Abidjan|Iceland", 24081 "Africa/Algiers|Africa/Tunis", 24082 "Africa/Cairo|Egypt", 24083 "Africa/Casablanca|Africa/El_Aaiun", 24084 "Africa/Johannesburg|Africa/Maseru", 24085 "Africa/Johannesburg|Africa/Mbabane", 24086 "Africa/Khartoum|Africa/Blantyre", 24087 "Africa/Khartoum|Africa/Bujumbura", 24088 "Africa/Khartoum|Africa/Gaborone", 24089 "Africa/Khartoum|Africa/Harare",
24090 "Africa/Khartoum|Africa/Kigali", 24091 "Africa/Khartoum|Africa/Lubumbashi", 24092 "Africa/Khartoum|Africa/Lusaka", 24093 "Africa/Khartoum|Africa/Maputo", 24094 "Africa/Khartoum|Africa/Windhoek", 24095 "Africa/Lagos|Africa/Bangui", 24096 "Africa/Lagos|Africa/Brazzaville", 24097 "Africa/Lagos|Africa/Douala", 24098 "Africa/Lagos|Africa/Kinshasa", 24099 "Africa/Lagos|Africa/Libreville", 24100 "Africa/Lagos|Africa/Luanda", 24101 "Africa/Lagos|Africa/Malabo", 24102 "Africa/Lagos|Africa/Ndjamena", 24103 "Africa/Lagos|Africa/Niamey", 24104 "Africa/Lagos|Africa/Porto-Novo", 24105 "Africa/Nairobi|Africa/Addis_Ababa", 24106 "Africa/Nairobi|Africa/Asmara", 24107 "Africa/Nairobi|Africa/Asmera", 24108 "Africa/Nairobi|Africa/Dar_es_Salaam", 24109 "Africa/Nairobi|Africa/Djibouti", 24110 "Africa/Nairobi|Africa/Kampala", 24111 "Africa/Nairobi|Africa/Mogadishu", 24112 "Africa/Nairobi|Indian/Antananarivo", 24113 "Africa/Nairobi|Indian/Comoro", 24114 "Africa/Nairobi|Indian/Mayotte", 24115 "Africa/Tripoli|Europe/Kaliningrad", 24116 "Africa/Tripoli|Libya", 24117 "America/Adak|America/Atka", 24118 "America/Adak|US/Aleutian", 24119 "America/Anchorage|America/Juneau", 24120 "America/Anchorage|America/Nome", 24121 "America/Anchorage|America/Sitka", 24122 "America/Anchorage|America/Yakutat", 24123 "America/Anchorage|US/Alaska", 24124 "America/Campo_Grande|America/Cuiaba", 24125 "America/Caracas|America/Boa_Vista", 24126 "America/Caracas|America/Guyana", 24127 "America/Caracas|America/La_Paz", 24128 "America/Caracas|America/Manaus", 24129 "America/Caracas|America/Porto_Velho", 24130 "America/Caracas|Brazil/West", 24131 "America/Caracas|Etc/GMT+4", 24132 "America/Chicago|America/Indiana/Knox", 24133 "America/Chicago|America/Indiana/Tell_City", 24134 "America/Chicago|America/Knox_IN", 24135 "America/Chicago|America/Matamoros", 24136 "America/Chicago|America/Menominee", 24137 "America/Chicago|America/North_Dakota/Beulah", 24138 "America/Chicago|America/North_Dakota/Center", 24139 "America/Chicago|America/North_Dakota/New_Salem", 24140 "America/Chicago|America/Rainy_River", 24141 "America/Chicago|America/Rankin_Inlet", 24142 "America/Chicago|America/Resolute", 24143 "America/Chicago|America/Winnipeg", 24144 "America/Chicago|CST6CDT", 24145 "America/Chicago|Canada/Central", 24146 "America/Chicago|US/Central", 24147 "America/Chicago|US/Indiana-Starke", 24148 "America/Denver|America/Boise", 24149 "America/Denver|America/Cambridge_Bay", 24150 "America/Denver|America/Edmonton", 24151 "America/Denver|America/Inuvik", 24152 "America/Denver|America/Shiprock", 24153 "America/Denver|America/Yellowknife", 24154 "America/Denver|Canada/Mountain", 24155 "America/Denver|MST7MDT", 24156 "America/Denver|Navajo", 24157 "America/Denver|US/Mountain", 24158 "America/Fortaleza|America/Araguaina", 24159 "America/Fortaleza|America/Argentina/Buenos_Aires", 24160 "America/Fortaleza|America/Argentina/Catamarca", 24161 "America/Fortaleza|America/Argentina/ComodRivadavia", 24162 "America/Fortaleza|America/Argentina/Cordoba", 24163 "America/Fortaleza|America/Argentina/Jujuy", 24164 "America/Fortaleza|America/Argentina/La_Rioja", 24165 "America/Fortaleza|America/Argentina/Mendoza", 24166 "America/Fortaleza|America/Argentina/Rio_Gallegos", 24167 "America/Fortaleza|America/Argentina/Salta", 24168 "America/Fortaleza|America/Argentina/San_Juan", 24169 "America/Fortaleza|America/Argentina/San_Luis", 24170 "America/Fortaleza|America/Argentina/Tucuman", 24171 "America/Fortaleza|America/Argentina/Ushuaia", 24172 "America/Fortaleza|America/Bahia", 24173 "America/Fortaleza|America/Belem", 24174 "America/Fortaleza|America/Buenos_Aires", 24175 "America/Fortaleza|America/Catamarca", 24176 "America/Fortaleza|America/Cayenne", 24177 "America/Fortaleza|America/Cordoba", 24178 "America/Fortaleza|America/Jujuy", 24179 "America/Fortaleza|America/Maceio", 24180 "America/Fortaleza|America/Mendoza", 24181 "America/Fortaleza|America/Montevideo", 24182 "America/Fortaleza|America/Paramaribo", 24183 "America/Fortaleza|America/Punta_Arenas", 24184 "America/Fortaleza|America/Recife", 24185 "America/Fortaleza|America/Rosario", 24186 "America/Fortaleza|America/Santarem", 24187 "America/Fortaleza|Antarctica/Palmer", 24188 "America/Fortaleza|Antarctica/Rothera", 24189 "America/Fortaleza|Atlantic/Stanley", 24190 "America/Fortaleza|Etc/GMT+3", 24191 "America/Godthab|America/Nuuk", 24192 "America/Halifax|America/Glace_Bay", 24193 "America/Halifax|America/Goose_Bay", 24194 "America/Halifax|America/Moncton", 24195 "America/Halifax|America/Thule", 24196 "America/Halifax|Atlantic/Bermuda", 24197 "America/Halifax|Canada/Atlantic", 24198 "America/Havana|Cuba", 24199 "America/Lima|America/Bogota", 24200 "America/Lima|America/Eirunepe", 24201 "America/Lima|America/Guayaquil", 24202 "America/Lima|America/Porto_Acre", 24203 "America/Lima|America/Rio_Branco", 24204 "America/Lima|Brazil/Acre",
24205 "America/Lima|Etc/GMT+5", 24206 "America/Los_Angeles|America/Ensenada", 24207 "America/Los_Angeles|America/Santa_Isabel", 24208 "America/Los_Angeles|America/Tijuana", 24209 "America/Los_Angeles|America/Vancouver", 24210 "America/Los_Angeles|Canada/Pacific", 24211 "America/Los_Angeles|Mexico/BajaNorte", 24212 "America/Los_Angeles|PST8PDT", 24213 "America/Los_Angeles|US/Pacific", 24214 "America/Managua|America/Belize", 24215 "America/Managua|America/Costa_Rica", 24216 "America/Managua|America/El_Salvador", 24217 "America/Managua|America/Guatemala", 24218 "America/Managua|America/Regina", 24219 "America/Managua|America/Swift_Current", 24220 "America/Managua|America/Tegucigalpa", 24221 "America/Managua|Canada/Saskatchewan", 24222 "America/Mazatlan|Mexico/BajaSur", 24223 "America/Mexico_City|America/Bahia_Banderas", 24224 "America/Mexico_City|America/Merida", 24225 "America/Mexico_City|America/Monterrey", 24226 "America/Mexico_City|Mexico/General", 24227 "America/New_York|America/Detroit", 24228 "America/New_York|America/Fort_Wayne", 24229 "America/New_York|America/Indiana/Indianapolis", 24230 "America/New_York|America/Indiana/Marengo", 24231 "America/New_York|America/Indiana/Petersburg", 24232 "America/New_York|America/Indiana/Vevay", 24233 "America/New_York|America/Indiana/Vincennes", 24234 "America/New_York|America/Indiana/Winamac", 24235 "America/New_York|America/Indianapolis", 24236 "America/New_York|America/Iqaluit", 24237 "America/New_York|America/Kentucky/Louisville", 24238 "America/New_York|America/Kentucky/Monticello", 24239 "America/New_York|America/Louisville", 24240 "America/New_York|America/Montreal", 24241 "America/New_York|America/Nassau", 24242 "America/New_York|America/Nipigon", 24243 "America/New_York|America/Pangnirtung", 24244 "America/New_York|America/Port-au-Prince", 24245 "America/New_York|America/Thunder_Bay", 24246 "America/New_York|America/Toronto", 24247 "America/New_York|Canada/Eastern", 24248 "America/New_York|EST5EDT", 24249 "America/New_York|US/East-Indiana", 24250 "America/New_York|US/Eastern", 24251 "America/New_York|US/Michigan", 24252 "America/Noronha|Atlantic/South_Georgia", 24253 "America/Noronha|Brazil/DeNoronha", 24254 "America/Noronha|Etc/GMT+2", 24255 "America/Panama|America/Atikokan", 24256 "America/Panama|America/Cancun", 24257 "America/Panama|America/Cayman", 24258 "America/Panama|America/Coral_Harbour", 24259 "America/Panama|America/Jamaica", 24260 "America/Panama|EST", 24261 "America/Panama|Jamaica", 24262 "America/Phoenix|America/Creston", 24263 "America/Phoenix|America/Dawson_Creek", 24264 "America/Phoenix|America/Fort_Nelson", 24265 "America/Phoenix|America/Hermosillo", 24266 "America/Phoenix|MST", 24267 "America/Phoenix|US/Arizona", 24268 "America/Santiago|Chile/Continental", 24269 "America/Santo_Domingo|America/Anguilla", 24270 "America/Santo_Domingo|America/Antigua", 24271 "America/Santo_Domingo|America/Aruba", 24272 "America/Santo_Domingo|America/Barbados", 24273 "America/Santo_Domingo|America/Blanc-Sablon", 24274 "America/Santo_Domingo|America/Curacao", 24275 "America/Santo_Domingo|America/Dominica", 24276 "America/Santo_Domingo|America/Grenada", 24277 "America/Santo_Domingo|America/Guadeloupe", 24278 "America/Santo_Domingo|America/Kralendijk", 24279 "America/Santo_Domingo|America/Lower_Princes", 24280 "America/Santo_Domingo|America/Marigot", 24281 "America/Santo_Domingo|America/Martinique", 24282 "America/Santo_Domingo|America/Montserrat", 24283 "America/Santo_Domingo|America/Port_of_Spain", 24284 "America/Santo_Domingo|America/Puerto_Rico", 24285 "America/Santo_Domingo|America/St_Barthelemy", 24286 "America/Santo_Domingo|America/St_Kitts", 24287 "America/Santo_Domingo|America/St_Lucia", 24288 "America/Santo_Domingo|America/St_Thomas", 24289 "America/Santo_Domingo|America/St_Vincent", 24290 "America/Santo_Domingo|America/Tortola", 24291 "America/Santo_Domingo|America/Virgin", 24292 "America/Sao_Paulo|Brazil/East",
24293 "America/St_Johns|Canada/Newfoundland", 24294 "America/Whitehorse|America/Dawson", 24295 "America/Whitehorse|Canada/Yukon", 24296 "Asia/Bangkok|Antarctica/Davis", 24297 "Asia/Bangkok|Asia/Barnaul", 24298 "Asia/Bangkok|Asia/Ho_Chi_Minh", 24299 "Asia/Bangkok|Asia/Hovd", 24300 "Asia/Bangkok|Asia/Krasnoyarsk", 24301 "Asia/Bangkok|Asia/Novokuznetsk", 24302 "Asia/Bangkok|Asia/Novosibirsk", 24303 "Asia/Bangkok|Asia/Phnom_Penh", 24304 "Asia/Bangkok|Asia/Saigon", 24305 "Asia/Bangkok|Asia/Tomsk", 24306 "Asia/Bangkok|Asia/Vientiane", 24307 "Asia/Bangkok|Etc/GMT-7", 24308 "Asia/Bangkok|Indian/Christmas", 24309 "Asia/Chita|Asia/Dili", 24310 "Asia/Chita|Asia/Khandyga", 24311 "Asia/Chita|Asia/Yakutsk", 24312 "Asia/Chita|Etc/GMT-9", 24313 "Asia/Chita|Pacific/Palau", 24314 "Asia/Dhaka|Antarctica/Vostok", 24315 "Asia/Dhaka|Asia/Almaty", 24316 "Asia/Dhaka|Asia/Bishkek", 24317 "Asia/Dhaka|Asia/Dacca", 24318 "Asia/Dhaka|Asia/Kashgar", 24319 "Asia/Dhaka|Asia/Omsk", 24320 "Asia/Dhaka|Asia/Qostanay", 24321 "Asia/Dhaka|Asia/Thimbu", 24322 "Asia/Dhaka|Asia/Thimphu", 24323 "Asia/Dhaka|Asia/Urumqi", 24324 "Asia/Dhaka|Etc/GMT-6", 24325 "Asia/Dhaka|Indian/Chagos", 24326 "Asia/Dubai|Asia/Baku", 24327 "Asia/Dubai|Asia/Muscat", 24328 "Asia/Dubai|Asia/Tbilisi", 24329 "Asia/Dubai|Asia/Yerevan", 24330 "Asia/Dubai|Etc/GMT-4", 24331 "Asia/Dubai|Europe/Astrakhan", 24332 "Asia/Dubai|Europe/Samara", 24333 "Asia/Dubai|Europe/Saratov", 24334 "Asia/Dubai|Europe/Ulyanovsk", 24335 "Asia/Dubai|Indian/Mahe", 24336 "Asia/Dubai|Indian/Mauritius", 24337 "Asia/Dubai|Indian/Reunion", 24338 "Asia/Gaza|Asia/Hebron", 24339 "Asia/Hong_Kong|Hongkong", 24340 "Asia/Jakarta|Asia/Pontianak", 24341 "Asia/Jerusalem|Asia/Tel_Aviv", 24342 "Asia/Jerusalem|Israel", 24343 "Asia/Kamchatka|Asia/Anadyr", 24344 "Asia/Kamchatka|Etc/GMT-12", 24345 "Asia/Kamchatka|Kwajalein", 24346 "Asia/Kamchatka|Pacific/Funafuti", 24347 "Asia/Kamchatka|Pacific/Kwajalein", 24348 "Asia/Kamchatka|Pacific/Majuro", 24349 "Asia/Kamchatka|Pacific/Nauru", 24350 "Asia/Kamchatka|Pacific/Tarawa", 24351 "Asia/Kamchatka|Pacific/Wake", 24352 "Asia/Kamchatka|Pacific/Wallis", 24353 "Asia/Kathmandu|Asia/Katmandu", 24354 "Asia/Kolkata|Asia/Calcutta", 24355 "Asia/Kuala_Lumpur|Asia/Brunei", 24356 "Asia/Kuala_Lumpur|Asia/Choibalsan", 24357 "Asia/Kuala_Lumpur|Asia/Irkutsk", 24358 "Asia/Kuala_Lumpur|Asia/Kuching", 24359 "Asia/Kuala_Lumpur|Asia/Singapore", 24360 "Asia/Kuala_Lumpur|Asia/Ulaanbaatar", 24361 "Asia/Kuala_Lumpur|Asia/Ulan_Bator", 24362 "Asia/Kuala_Lumpur|Etc/GMT-8", 24363 "Asia/Kuala_Lumpur|Singapore", 24364 "Asia/Makassar|Asia/Ujung_Pandang", 24365 "Asia/Rangoon|Asia/Yangon", 24366 "Asia/Rangoon|Indian/Cocos", 24367 "Asia/Sakhalin|Asia/Magadan", 24368 "Asia/Sakhalin|Asia/Srednekolymsk", 24369 "Asia/Sakhalin|Etc/GMT-11", 24370 "Asia/Sakhalin|Pacific/Bougainville", 24371 "Asia/Sakhalin|Pacific/Efate", 24372 "Asia/Sakhalin|Pacific/Guadalcanal", 24373 "Asia/Sakhalin|Pacific/Kosrae", 24374 "Asia/Sakhalin|Pacific/Noumea", 24375 "Asia/Sakhalin|Pacific/Pohnpei", 24376 "Asia/Sakhalin|Pacific/Ponape", 24377 "Asia/Seoul|ROK", 24378 "Asia/Shanghai|Asia/Chongqing", 24379 "Asia/Shanghai|Asia/Chungking", 24380 "Asia/Shanghai|Asia/Harbin", 24381 "Asia/Shanghai|Asia/Macao", 24382 "Asia/Shanghai|Asia/Macau", 24383 "Asia/Shanghai|Asia/Taipei", 24384 "Asia/Shanghai|PRC", 24385 "Asia/Shanghai|ROC", 24386 "Asia/Tashkent|Antarctica/Mawson", 24387 "Asia/Tashkent|Asia/Aqtau", 24388 "Asia/Tashkent|Asia/Aqtobe", 24389 "Asia/Tashkent|Asia/Ashgabat", 24390 "Asia/Tashkent|Asia/Ashkhabad", 24391 "Asia/Tashkent|Asia/Atyrau", 24392 "Asia/Tashkent|Asia/Dushanbe", 24393 "Asia/Tashkent|Asia/Oral", 24394 "Asia/Tashkent|Asia/Samarkand", 24395 "Asia/Tashkent|Asia/Yekaterinburg", 24396 "Asia/Tashkent|Etc/GMT-5", 24397 "Asia/Tashkent|Indian/Kerguelen", 24398 "Asia/Tashkent|Indian/Maldives", 24399 "Asia/Tehran|Iran", 24400 "Asia/Tokyo|Japan", 24401 "Asia/Vladivostok|Antarctica/DumontDUrville", 24402 "Asia/Vladivostok|Asia/Ust-Nera", 24403 "Asia/Vladivostok|Etc/GMT-10", 24404 "Asia/Vladivostok|Pacific/Chuuk", 24405 "Asia/Vladivostok|Pacific/Port_Moresby", 24406 "Asia/Vladivostok|Pacific/Truk", 24407 "Asia/Vladivostok|Pacific/Yap", 24408 "Atlantic/Azores|America/Scoresbysund", 24409 "Atlantic/Cape_Verde|Etc/GMT+1", 24410 "Australia/Adelaide|Australia/Broken_Hill", 24411 "Australia/Adelaide|Australia/South", 24412 "Australia/Adelaide|Australia/Yancowinna", 24413 "Australia/Brisbane|Australia/Lindeman", 24414 "Australia/Brisbane|Australia/Queensland", 24415 "Australia/Darwin|Australia/North", 24416 "Australia/Lord_Howe|Australia/LHI", 24417 "Australia/Perth|Australia/West", 24418 "Australia/Sydney|Antarctica/Macquarie", 24419 "Australia/Sydney|Australia/ACT", 24420 "Australia/Sydney|Australia/Canberra", 24421 "Australia/Sydney|Australia/Currie", 24422 "Australia/Sydney|Australia/Hobart", 24423 "Australia/Sydney|Australia/Melbourne", 24424 "Australia/Sydney|Australia/NSW", 24425 "Australia/Sydney|Australia/Tasmania", 24426 "Australia/Sydney|Australia/Victoria", 24427 "Etc/UTC|Etc/UCT", 24428 "Etc/UTC|Etc/Universal", 24429 "Etc/UTC|Etc/Zulu", 24430 "Etc/UTC|UCT", 24431 "Etc/UTC|UTC", 24432 "Etc/UTC|Universal", 24433 "Etc/UTC|Zulu", 24434 "Europe/Athens|Asia/Famagusta", 24435 "Europe/Athens|Asia/Nicosia", 24436 "Europe/Athens|EET", 24437 "Europe/Athens|Europe/Bucharest", 24438 "Europe/Athens|Europe/Helsinki", 24439 "Europe/Athens|Europe/Kiev", 24440 "Europe/Athens|Europe/Kyiv", 24441 "Europe/Athens|Europe/Mariehamn", 24442 "Europe/Athens|Europe/Nicosia", 24443 "Europe/Athens|Europe/Riga", 24444 "Europe/Athens|Europe/Sofia", 24445 "Europe/Athens|Europe/Tallinn", 24446 "Europe/Athens|Europe/Uzhgorod", 24447 "Europe/Athens|Europe/Vilnius", 24448 "Europe/Athens|Europe/Zaporozhye", 24449 "Europe/Chisinau|Europe/Tiraspol", 24450 "Europe/Dublin|Eire", 24451 "Europe/Istanbul|Antarctica/Syowa", 24452 "Europe/Istanbul|Asia/Aden", 24453 "Europe/Istanbul|Asia/Baghdad", 24454 "Europe/Istanbul|Asia/Bahrain", 24455 "Europe/Istanbul|Asia/Istanbul", 24456 "Europe/Istanbul|Asia/Kuwait", 24457 "Europe/Istanbul|Asia/Qatar", 24458 "Europe/Istanbul|Asia/Riyadh", 24459 "Europe/Istanbul|Etc/GMT-3", 24460 "Europe/Istanbul|Europe/Minsk", 24461 "Europe/Istanbul|Turkey", 24462 "Europe/Lisbon|Atlantic/Canary", 24463 "Europe/Lisbon|Atlantic/Faeroe", 24464 "Europe/Lisbon|Atlantic/Faroe", 24465 "Europe/Lisbon|Atlantic/Madeira", 24466 "Europe/Lisbon|Portugal", 24467 "Europe/Lisbon|WET", 24468 "Europe/London|Europe/Belfast", 24469 "Europe/London|Europe/Guernsey", 24470 "Europe/London|Europe/Isle_of_Man", 24471 "Europe/London|Europe/Jersey", 24472 "Europe/London|GB", 24473 "Europe/London|GB-Eire", 24474 "Europe/Moscow|Europe/Kirov", 24475 "Europe/Moscow|Europe/Simferopol", 24476 "Europe/Moscow|W-SU", 24477 "Europe/Paris|Africa/Ceuta", 24478 "Europe/Paris|Arctic/Longyearbyen", 24479 "Europe/Paris|Atlantic/Jan_Mayen", 24480 "Europe/Paris|CET", 24481 "Europe/Paris|Europe/Amsterdam", 24482 "Europe/Paris|Europe/Andorra", 24483 "Europe/Paris|Europe/Belgrade", 24484 "Europe/Paris|Europe/Berlin", 24485 "Europe/Paris|Europe/Bratislava", 24486 "Europe/Paris|Europe/Brussels", 24487 "Europe/Paris|Europe/Budapest", 24488 "Europe/Paris|Europe/Busingen", 24489 "Europe/Paris|Europe/Copenhagen", 24490 "Europe/Paris|Europe/Gibraltar", 24491 "Europe/Paris|Europe/Ljubljana", 24492 "Europe/Paris|Europe/Luxembourg", 24493 "Europe/Paris|Europe/Madrid", 24494 "Europe/Paris|Europe/Malta", 24495 "Europe/Paris|Europe/Monaco", 24496 "Europe/Paris|Europe/Oslo", 24497 "Europe/Paris|Europe/Podgorica", 24498 "Europe/Paris|Europe/Prague", 24499 "Europe/Paris|Europe/Rome", 24500 "Europe/Paris|Europe/San_Marino", 24501 "Europe/Paris|Europe/Sarajevo", 24502 "Europe/Paris|Europe/Skopje", 24503 "Europe/Paris|Europe/Stockholm", 24504 "Europe/Paris|Europe/Tirane", 24505 "Europe/Paris|Europe/Vaduz", 24506 "Europe/Paris|Europe/Vatican", 24507 "Europe/Paris|Europe/Vienna", 24508 "Europe/Paris|Europe/Warsaw", 24509 "Europe/Paris|Europe/Zagreb", 24510 "Europe/Paris|Europe/Zurich", 24511 "Europe/Paris|Poland", 24512 "Pacific/Auckland|Antarctica/McMurdo", 24513 "Pacific/Auckland|Antarctica/South_Pole", 24514 "Pacific/Auckland|NZ", 24515 "Pacific/Chatham|NZ-CHAT", 24516 "Pacific/Easter|Chile/EasterIsland", 24517 "Pacific/Galapagos|Etc/GMT+6", 24518 "Pacific/Gambier|Etc/GMT+9", 24519 "Pacific/Guam|Pacific/Saipan", 24520 "Pacific/Honolulu|HST", 24521 "Pacific/Honolulu|Pacific/Johnston", 24522 "Pacific/Honolulu|US/Hawaii", 24523 "Pacific/Kiritimati|Etc/GMT-14", 24524 "Pacific/Niue|Etc/GMT+11", 24525 "Pacific/Pago_Pago|Pacific/Midway", 24526 "Pacific/Pago_Pago|Pacific/Samoa", 24527 "Pacific/Pago_Pago|US/Samoa", 24528 "Pacific/Pitcairn|Etc/GMT+8", 24529 "Pacific/Tahiti|Etc/GMT+10", 24530 "Pacific/Tahiti|Pacific/Rarotonga", 24531 "Pacific/Tongatapu|Etc/GMT-13", 24532 "Pacific/Tongatapu|Pacific/Enderbury", 24533 "Pacific/Tongatapu|Pacific/Fakaofo", 24534 "Pacific/Tongatapu|Pacific/Kanton" 24535 ], 24536 "countries": [ 24537 "AD|Europe/Andorra", 24538 "AE|Asia/Dubai", 24539 "AF|Asia/Kabul", 24540 "AG|America/Puerto_Rico America/Antigua", 24541 "AI|America/Puerto_Rico America/Anguilla", 24542 "AL|Europe/Tirane", 24543 "AM|Asia/Yerevan", 24544 "AO|Africa/Lagos Africa/Luanda", 24545 "AQ|Antarctica/Casey Antarctica/Davis Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Troll Asia/Urumqi Pacific/Auckland Pacific/Port_Moresby Asia/Riyadh Antarctica/McMurdo Antarctica/DumontDUrville Antarctica/Syowa Antarctica/Vostok", 24546 "AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia", 24547 "AS|Pacific/Pago_Pago", 24548 "AT|Europe/Vienna", 24549 "AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla", 24550 "AW|America/Puerto_Rico America/Aruba", 24551 "AX|Europe/Helsinki Europe/Mariehamn", 24552 "AZ|Asia/Baku", 24553 "BA|Europe/Belgrade Europe/Sarajevo", 24554 "BB|America/Barbados", 24555 "BD|Asia/Dhaka", 24556 "BE|Europe/Brussels", 24557 "BF|Africa/Abidjan Africa/Ouagadougou", 24558 "BG|Europe/Sofia", 24559 "BH|Asia/Qatar Asia/Bahrain", 24560 "BI|Africa/Maputo Africa/Bujumbura", 24561 "BJ|Africa/Lagos Africa/Porto-Novo", 24562 "BL|America/Puerto_Rico America/St_Barthelemy", 24563 "BM|Atlantic/Bermuda", 24564 "BN|Asia/Kuching Asia/Brunei", 24565 "BO|America/La_Paz", 24566 "BQ|America/Puerto_Rico America/Kralendijk", 24567 "BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco", 24568 "BS|America/Toronto America/Nassau", 24569 "BT|Asia/Thimphu", 24570 "BW|Africa/Maputo Africa/Gaborone", 24571 "BY|Europe/Minsk", 24572 "BZ|America/Belize", 24573 "CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Toronto America/Iqaluit America/Winnipeg America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Inuvik America/Dawson_Creek America/Fort_Nelson America/Whitehorse America/Dawson America/Vancouver America/Panama America/Puerto_Rico America/Phoenix America/Blanc-Sablon America/Atikokan America/Creston", 24574 "CC|Asia/Yangon Indian/Cocos", 24575 "CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi", 24576 "CF|Africa/Lagos Africa/Bangui", 24577 "CG|Africa/Lagos Africa/Brazzaville", 24578 "CH|Europe/Zurich", 24579 "CI|Africa/Abidjan", 24580 "CK|Pacific/Rarotonga", 24581 "CL|America/Santiago America/Punta_Arenas Pacific/Easter", 24582 "CM|Africa/Lagos Africa/Douala", 24583 "CN|Asia/Shanghai Asia/Urumqi", 24584 "CO|America/Bogota", 24585 "CR|America/Costa_Rica", 24586 "CU|America/Havana", 24587 "CV|Atlantic/Cape_Verde", 24588 "CW|America/Puerto_Rico America/Curacao", 24589 "CX|Asia/Bangkok Indian/Christmas", 24590 "CY|Asia/Nicosia Asia/Famagusta", 24591 "CZ|Europe/Prague", 24592 "DE|Europe/Zurich Europe/Berlin Europe/Busingen", 24593 "DJ|Africa/Nairobi Africa/Djibouti", 24594 "DK|Europe/Berlin Europe/Copenhagen", 24595 "DM|America/Puerto_Rico America/Dominica", 24596 "DO|America/Santo_Domingo", 24597 "DZ|Africa/Algiers", 24598 "EC|America/Guayaquil Pacific/Galapagos", 24599 "EE|Europe/Tallinn", 24600 "EG|Africa/Cairo", 24601 "EH|Africa/El_Aaiun", 24602 "ER|Africa/Nairobi Africa/Asmara", 24603 "ES|Europe/Madrid Africa/Ceuta Atlantic/Canary", 24604 "ET|Africa/Nairobi Africa/Addis_Ababa", 24605 "FI|Europe/Helsinki", 24606 "FJ|Pacific/Fiji", 24607 "FK|Atlantic/Stanley", 24608 "FM|Pacific/Kosrae Pacific/Port_Moresby Pacific/Guadalcanal Pacific/Chuuk Pacific/Pohnpei", 24609 "FO|Atlantic/Faroe", 24610 "FR|Europe/Paris", 24611 "GA|Africa/Lagos Africa/Libreville", 24612 "GB|Europe/London", 24613 "GD|America/Puerto_Rico America/Grenada", 24614 "GE|Asia/Tbilisi", 24615 "GF|America/Cayenne",
24616 "GG|Europe/London Europe/Guernsey", 24617 "GH|Africa/Abidjan Africa/Accra", 24618 "GI|Europe/Gibraltar", 24619 "GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule", 24620 "GM|Africa/Abidjan Africa/Banjul", 24621 "GN|Africa/Abidjan Africa/Conakry", 24622 "GP|America/Puerto_Rico America/Guadeloupe", 24623 "GQ|Africa/Lagos Africa/Malabo", 24624 "GR|Europe/Athens", 24625 "GS|Atlantic/South_Georgia", 24626 "GT|America/Guatemala", 24627 "GU|Pacific/Guam", 24628 "GW|Africa/Bissau", 24629 "GY|America/Guyana", 24630 "HK|Asia/Hong_Kong", 24631 "HN|America/Tegucigalpa", 24632 "HR|Europe/Belgrade Europe/Zagreb", 24633 "HT|America/Port-au-Prince", 24634 "HU|Europe/Budapest", 24635 "ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura", 24636 "IE|Europe/Dublin", 24637 "IL|Asia/Jerusalem", 24638 "IM|Europe/London Europe/Isle_of_Man", 24639 "IN|Asia/Kolkata", 24640 "IO|Indian/Chagos", 24641 "IQ|Asia/Baghdad", 24642 "IR|Asia/Tehran", 24643 "IS|Africa/Abidjan Atlantic/Reykjavik", 24644 "IT|Europe/Rome", 24645 "JE|Europe/London Europe/Jersey", 24646 "JM|America/Jamaica", 24647 "JO|Asia/Amman", 24648 "JP|Asia/Tokyo", 24649 "KE|Africa/Nairobi", 24650 "KG|Asia/Bishkek", 24651 "KH|Asia/Bangkok Asia/Phnom_Penh", 24652 "KI|Pacific/Tarawa Pacific/Kanton Pacific/Kiritimati", 24653 "KM|Africa/Nairobi Indian/Comoro", 24654 "KN|America/Puerto_Rico America/St_Kitts", 24655 "KP|Asia/Pyongyang", 24656 "KR|Asia/Seoul", 24657 "KW|Asia/Riyadh Asia/Kuwait", 24658 "KY|America/Panama America/Cayman", 24659 "KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral", 24660 "LA|Asia/Bangkok Asia/Vientiane", 24661 "LB|Asia/Beirut", 24662 "LC|America/Puerto_Rico America/St_Lucia", 24663 "LI|Europe/Zurich Europe/Vaduz", 24664 "LK|Asia/Colombo", 24665 "LR|Africa/Monrovia", 24666 "LS|Africa/Johannesburg Africa/Maseru", 24667 "LT|Europe/Vilnius", 24668 "LU|Europe/Brussels Europe/Luxembourg", 24669 "LV|Europe/Riga", 24670 "LY|Africa/Tripoli", 24671 "MA|Africa/Casablanca", 24672 "MC|Europe/Paris Europe/Monaco", 24673 "MD|Europe/Chisinau", 24674 "ME|Europe/Belgrade Europe/Podgorica", 24675 "MF|America/Puerto_Rico America/Marigot", 24676 "MG|Africa/Nairobi Indian/Antananarivo", 24677 "MH|Pacific/Tarawa Pacific/Kwajalein Pacific/Majuro", 24678 "MK|Europe/Belgrade Europe/Skopje", 24679 "ML|Africa/Abidjan Africa/Bamako", 24680 "MM|Asia/Yangon", 24681 "MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan", 24682 "MO|Asia/Macau", 24683 "MP|Pacific/Guam Pacific/Saipan", 24684 "MQ|America/Martinique", 24685 "MR|Africa/Abidjan Africa/Nouakchott", 24686 "MS|America/Puerto_Rico America/Montserrat", 24687 "MT|Europe/Malta", 24688 "MU|Indian/Mauritius", 24689 "MV|Indian/Maldives", 24690 "MW|Africa/Maputo Africa/Blantyre", 24691 "MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Chihuahua America/Ciudad_Juarez America/Ojinaga America/Mazatlan America/Bahia_Banderas America/Hermosillo America/Tijuana", 24692 "MY|Asia/Kuching Asia/Singapore Asia/Kuala_Lumpur", 24693 "MZ|Africa/Maputo", 24694 "NA|Africa/Windhoek", 24695 "NC|Pacific/Noumea", 24696 "NE|Africa/Lagos Africa/Niamey", 24697 "NF|Pacific/Norfolk", 24698 "NG|Africa/Lagos", 24699 "NI|America/Managua", 24700 "NL|Europe/Brussels Europe/Amsterdam", 24701 "NO|Europe/Berlin Europe/Oslo", 24702 "NP|Asia/Kathmandu", 24703 "NR|Pacific/Nauru", 24704 "NU|Pacific/Niue", 24705 "NZ|Pacific/Auckland Pacific/Chatham", 24706 "OM|Asia/Dubai Asia/Muscat", 24707 "PA|America/Panama", 24708 "PE|America/Lima", 24709 "PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier", 24710 "PG|Pacific/Port_Moresby Pacific/Bougainville", 24711 "PH|Asia/Manila", 24712 "PK|Asia/Karachi", 24713 "PL|Europe/Warsaw", 24714 "PM|America/Miquelon", 24715 "PN|Pacific/Pitcairn", 24716 "PR|America/Puerto_Rico", 24717 "PS|Asia/Gaza Asia/Hebron", 24718 "PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores", 24719 "PW|Pacific/Palau", 24720 "PY|America/Asuncion", 24721 "QA|Asia/Qatar", 24722 "RE|Asia/Dubai Indian/Reunion", 24723 "RO|Europe/Bucharest", 24724 "RS|Europe/Belgrade", 24725 "RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Volgograd Europe/Astrakhan Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr",
vendor: 9,354 bytes, lines 24726-24957
24726 "RW|Africa/Maputo Africa/Kigali", 24727 "SA|Asia/Riyadh", 24728 "SB|Pacific/Guadalcanal", 24729 "SC|Asia/Dubai Indian/Mahe", 24730 "SD|Africa/Khartoum", 24731 "SE|Europe/Berlin Europe/Stockholm", 24732 "SG|Asia/Singapore", 24733 "SH|Africa/Abidjan Atlantic/St_Helena", 24734 "SI|Europe/Belgrade Europe/Ljubljana", 24735 "SJ|Europe/Berlin Arctic/Longyearbyen", 24736 "SK|Europe/Prague Europe/Bratislava", 24737 "SL|Africa/Abidjan Africa/Freetown", 24738 "SM|Europe/Rome Europe/San_Marino", 24739 "SN|Africa/Abidjan Africa/Dakar", 24740 "SO|Africa/Nairobi Africa/Mogadishu", 24741 "SR|America/Paramaribo", 24742 "SS|Africa/Juba", 24743 "ST|Africa/Sao_Tome", 24744 "SV|America/El_Salvador", 24745 "SX|America/Puerto_Rico America/Lower_Princes", 24746 "SY|Asia/Damascus", 24747 "SZ|Africa/Johannesburg Africa/Mbabane", 24748 "TC|America/Grand_Turk", 24749 "TD|Africa/Ndjamena", 24750 "TF|Asia/Dubai Indian/Maldives Indian/Kerguelen", 24751 "TG|Africa/Abidjan Africa/Lome", 24752 "TH|Asia/Bangkok", 24753 "TJ|Asia/Dushanbe", 24754 "TK|Pacific/Fakaofo", 24755 "TL|Asia/Dili", 24756 "TM|Asia/Ashgabat", 24757 "TN|Africa/Tunis", 24758 "TO|Pacific/Tongatapu", 24759 "TR|Europe/Istanbul", 24760 "TT|America/Puerto_Rico America/Port_of_Spain", 24761 "TV|Pacific/Tarawa Pacific/Funafuti", 24762 "TW|Asia/Taipei", 24763 "TZ|Africa/Nairobi Africa/Dar_es_Salaam", 24764 "UA|Europe/Simferopol Europe/Kyiv", 24765 "UG|Africa/Nairobi Africa/Kampala", 24766 "UM|Pacific/Pago_Pago Pacific/Tarawa Pacific/Midway Pacific/Wake", 24767 "US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu", 24768 "UY|America/Montevideo", 24769 "UZ|Asia/Samarkand Asia/Tashkent", 24770 "VA|Europe/Rome Europe/Vatican", 24771 "VC|America/Puerto_Rico America/St_Vincent", 24772 "VE|America/Caracas", 24773 "VG|America/Puerto_Rico America/Tortola", 24774 "VI|America/Puerto_Rico America/St_Thomas", 24775 "VN|Asia/Bangkok Asia/Ho_Chi_Minh", 24776 "VU|Pacific/Efate", 24777 "WF|Pacific/Tarawa Pacific/Wallis", 24778 "WS|Pacific/Apia", 24779 "YE|Asia/Riyadh Asia/Aden", 24780 "YT|Africa/Nairobi Indian/Mayotte", 24781 "ZA|Africa/Johannesburg", 24782 "ZM|Africa/Maputo Africa/Lusaka", 24783 "ZW|Africa/Maputo Africa/Harare" 24784 ] 24785 }); 24786 24787 24788 return moment; 24789})); 24790/* 24791 24792 countUp.js 24793 by @inorganik 24794 24795*/ 24796 24797// target = id of html element or var of previously selected html element where counting occurs 24798// startVal = the value you want to begin at 24799// endVal = the value you want to arrive at 24800// decimals = number of decimal places, default 0 24801// duration = duration of animation in seconds, default 2 24802// options = optional object of options (see below) 24803 24804var CountUp = function(target, startVal, endVal, decimals, duration, options) { 24805 24806 // make sure requestAnimationFrame and cancelAnimationFrame are defined 24807 // polyfill for browsers without native support 24808 // by Opera engineer Erik Möller 24809 var lastTime = 0; 24810 var vendors = ['webkit', 'moz', 'ms', 'o']; 24811 for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 24812 window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; 24813 window.cancelAnimationFrame = 24814 window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; 24815 } 24816 if (!window.requestAnimationFrame) { 24817 window.requestAnimationFrame = function(callback, element) { 24818 var currTime = new Date().getTime(); 24819 var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 24820 var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 24821 timeToCall); 24822 lastTime = currTime + timeToCall; 24823 return id; 24824 }; 24825 } 24826 if (!window.cancelAnimationFrame) { 24827 window.cancelAnimationFrame = function(id) { 24828 clearTimeout(id); 24829 }; 24830 } 24831 24832 var self = this; 24833 24834 // default options 24835 self.options = { 24836 useEasing : true, // toggle easing 24837 useGrouping : true, // 1,000,000 vs 1000000 24838 separator : ',', // character to use as a separator 24839 decimal : '.', // character to use as a decimal 24840 easingFn: null, // optional custom easing closure function, default is Robert Penner's easeOutExpo 24841 formattingFn: null // optional custom formatting function, default is self.formatNumber below 24842 }; 24843 // extend default options with passed options object 24844 for (var key in options) { 24845 if (options.hasOwnProperty(key)) { 24846 self.options[key] = options[key]; 24847 } 24848 } 24849 if (self.options.separator === '') { self.options.useGrouping = false; } 24850 if (!self.options.prefix) self.options.prefix = ''; 24851 if (!self.options.suffix) self.options.suffix = ''; 24852 24853 self.d = (typeof target === 'string') ? document.getElementById(target) : target; 24854 self.startVal = Number(startVal); 24855 self.endVal = Number(endVal); 24856 self.countDown = (self.startVal > self.endVal); 24857 self.frameVal = self.startVal; 24858 self.decimals = Math.max(0, decimals || 0); 24859 self.dec = Math.pow(10, self.decimals); 24860 self.duration = Number(duration) * 1000 || 2000; 24861 24862 self.formatNumber = function(nStr) { 24863 nStr = nStr.toFixed(self.decimals); 24864 nStr += ''; 24865 var x, x1, x2, rgx; 24866 x = nStr.split('.'); 24867 x1 = x[0]; 24868 x2 = x.length > 1 ? self.options.decimal + x[1] : ''; 24869 rgx = /(\d+)(\d{3})/; 24870 if (self.options.useGrouping) { 24871 while (rgx.test(x1)) { 24872 x1 = x1.replace(rgx, '$1' + self.options.separator + '$2'); 24873 } 24874 } 24875 return self.options.prefix + x1 + x2 + self.options.suffix; 24876 }; 24877 // Robert Penner's easeOutExpo 24878 self.easeOutExpo = function(t, b, c, d) { 24879 return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b; 24880 }; 24881 24882 self.easingFn = self.options.easingFn ? self.options.easingFn : self.easeOutExpo; 24883 self.formattingFn = self.options.formattingFn ? self.options.formattingFn : self.formatNumber; 24884 24885 self.version = function () { return '1.8.1'; }; 24886 24887 // Print value to target 24888 self.printValue = function(value) { 24889 var result = self.formattingFn(value); 24890/* 24891 if (self.d.tagName === 'INPUT') { 24892 this.d.value = result; 24893 } 24894 else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') { 24895 this.d.textContent = result; 24896 } 24897 else {*/ 24898 this.d.innerHTML = result; 24899 //} 24900 }; 24901 24902 self.count = function(timestamp) { 24903 24904 if (!self.startTime) { self.startTime = timestamp; } 24905 24906 self.timestamp = timestamp; 24907 var progress = timestamp - self.startTime; 24908 self.remaining = self.duration - progress; 24909 24910 // to ease or not to ease 24911 if (self.options.useEasing) { 24912 if (self.countDown) { 24913 self.frameVal = self.startVal - self.easingFn(progress, 0, self.startVal - self.endVal, self.duration); 24914 } else { 24915 self.frameVal = self.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration); 24916 } 24917 } else { 24918 if (self.countDown) { 24919 self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration)); 24920 } else { 24921 self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration); 24922 } 24923 } 24924 24925 // don't go past endVal since progress can exceed duration in the last frame 24926 if (self.countDown) { 24927 self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal; 24928 } else { 24929 self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal; 24930 } 24931 24932 // decimal 24933 self.frameVal = Math.round(self.frameVal*self.dec)/self.dec; 24934 24935 // format and print value 24936 self.printValue(self.frameVal); 24937 24938 // whether to continue 24939 if (progress < self.duration) { 24940 self.rAF = requestAnimationFrame(self.count); 24941 } else { 24942 if (self.callback) { self.callback(); } 24943 } 24944 }; 24945 // start your animation 24946 self.start = function(callback) { 24947 self.callback = callback; 24948 self.rAF = requestAnimationFrame(self.count); 24949 return false; 24950 }; 24951 // toggles pause/resume animation 24952 self.pauseResume = function() { 24953 if (!self.paused) { 24954 self.paused = true; 24955 cancelAnimationFrame(self.rAF); 24956 } else { 24957 self.paused = false;
24958 delete self.startTime; 24959 self.duration = self.remaining; 24960 self.startVal = self.frameVal; 24961 requestAnimationFrame(self.count); 24962 } 24963 }; 24964 // reset to startVal so animation can be run again 24965 self.reset = function() { 24966 self.paused = false; 24967 delete self.startTime; 24968 self.startVal = startVal; 24969 cancelAnimationFrame(self.rAF); 24970 self.printValue(self.startVal); 24971 }; 24972 // pass a new endVal and start animation 24973 self.update = function (newEndVal) { 24974 cancelAnimationFrame(self.rAF); 24975 self.paused = false; 24976 delete self.startTime; 24977 self.startVal = self.frameVal; 24978 self.endVal = Number(newEndVal); 24979 self.countDown = (self.startVal > self.endVal); 24980 self.rAF = requestAnimationFrame(self.count); 24981 }; 24982 24983 // format startVal on initialization 24984 self.printValue(self.startVal); 24985}; 24986 24987 24988 24989(function($) { 24990 24991 $.fn.countup = function(params) { 24992 // make sure dependency is present 24993 if (typeof CountUp !== 'function') { 24994 console.error('countUp.js is a required dependency of countUp-jquery.js.'); 24995 return; 24996 } 24997 24998 var defaults = { 24999 startVal: 0, 25000 decimals: 0, 25001 duration: 2, 25002 }; 25003 25004 if (typeof params === 'number') { 25005 defaults.endVal = params; 25006 } 25007 else if (typeof params === 'object') { 25008 $.extend(defaults, params); 25009 } 25010 else { 25011 console.error('countUp-jquery requires its argument to be either an object or number'); 25012 return; 25013 } 25014 25015 this.each(function(i, elem) { 25016 var countUp = new CountUp(elem, defaults.startVal, defaults.endVal, defaults.decimals, defaults.duration, defaults.options); 25017 25018 countUp.start(); 25019 }); 25020 25021 25022 25023 return this; 25024 25025 }; 25026 25027}(jQuery));
vendor: 124,186 bytes, lines 25028-28668
25028(function (global, factory) { 25029 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 25030 typeof define === 'function' && define.amd ? define(['exports'], factory) : 25031 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.IMask = {})); 25032})(this, (function (exports) { 'use strict'; 25033 25034 /** Checks if value is string */ 25035 function isString(str) { 25036 return typeof str === 'string' || str instanceof String; 25037 } 25038 25039 /** Checks if value is object */ 25040 function isObject(obj) { 25041 var _obj$constructor; 25042 return typeof obj === 'object' && obj != null && (obj == null || (_obj$constructor = obj.constructor) == null ? void 0 : _obj$constructor.name) === 'Object'; 25043 } 25044 function pick(obj, keys) { 25045 if (Array.isArray(keys)) return pick(obj, (_, k) => keys.includes(k)); 25046 return Object.entries(obj).reduce((acc, _ref) => { 25047 let [k, v] = _ref; 25048 if (keys(v, k)) acc[k] = v; 25049 return acc; 25050 }, {}); 25051 } 25052 25053 /** Direction */ 25054 const DIRECTION = { 25055 NONE: 'NONE', 25056 LEFT: 'LEFT', 25057 FORCE_LEFT: 'FORCE_LEFT', 25058 RIGHT: 'RIGHT', 25059 FORCE_RIGHT: 'FORCE_RIGHT' 25060 }; 25061 25062 /** Direction */ 25063 25064 function forceDirection(direction) { 25065 switch (direction) { 25066 case DIRECTION.LEFT: 25067 return DIRECTION.FORCE_LEFT; 25068 case DIRECTION.RIGHT: 25069 return DIRECTION.FORCE_RIGHT; 25070 default: 25071 return direction; 25072 } 25073 } 25074 25075 /** Escapes regular expression control chars */ 25076 function escapeRegExp(str) { 25077 return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, '\\$1'); 25078 } 25079 25080 // cloned from https://github.com/epoberezkin/fast-deep-equal with small changes 25081 function objectIncludes(b, a) { 25082 if (a === b) return true; 25083 const arrA = Array.isArray(a), 25084 arrB = Array.isArray(b); 25085 let i; 25086 if (arrA && arrB) { 25087 if (a.length != b.length) return false; 25088 for (i = 0; i < a.length; i++) if (!objectIncludes(a[i], b[i])) return false; 25089 return true; 25090 } 25091 if (arrA != arrB) return false; 25092 if (a && b && typeof a === 'object' && typeof b === 'object') { 25093 const dateA = a instanceof Date, 25094 dateB = b instanceof Date; 25095 if (dateA && dateB) return a.getTime() == b.getTime(); 25096 if (dateA != dateB) return false; 25097 const regexpA = a instanceof RegExp, 25098 regexpB = b instanceof RegExp; 25099 if (regexpA && regexpB) return a.toString() == b.toString(); 25100 if (regexpA != regexpB) return false; 25101 const keys = Object.keys(a); 25102 // if (keys.length !== Object.keys(b).length) return false; 25103 25104 for (i = 0; i < keys.length; i++) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; 25105 for (i = 0; i < keys.length; i++) if (!objectIncludes(b[keys[i]], a[keys[i]])) return false; 25106 return true; 25107 } else if (a && b && typeof a === 'function' && typeof b === 'function') { 25108 return a.toString() === b.toString(); 25109 } 25110 return false; 25111 } 25112 25113 /** Selection range */ 25114 25115 /** Provides details of changing input */ 25116 class ActionDetails { 25117 /** Current input value */ 25118 25119 /** Current cursor position */ 25120 25121 /** Old input value */ 25122 25123 /** Old selection */ 25124 25125 constructor(opts) { 25126 Object.assign(this, opts); 25127 25128 // double check if left part was changed (autofilling, other non-standard input triggers) 25129 while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) { 25130 --this.oldSelection.start; 25131 } 25132 if (this.insertedCount) { 25133 // double check right part 25134 while (this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end)) { 25135 if (this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end) ++this.oldSelection.end;else ++this.cursorPos; 25136 } 25137 } 25138 } 25139 25140 /** Start changing position */ 25141 get startChangePos() { 25142 return Math.min(this.cursorPos, this.oldSelection.start); 25143 } 25144 25145 /** Inserted symbols count */ 25146 get insertedCount() { 25147 return this.cursorPos - this.startChangePos; 25148 } 25149 25150 /** Inserted symbols */ 25151 get inserted() { 25152 return this.value.substr(this.startChangePos, this.insertedCount); 25153 } 25154 25155 /** Removed symbols count */ 25156 get removedCount() { 25157 // Math.max for opposite operation 25158 return Math.max(this.oldSelection.end - this.startChangePos || 25159 // for Delete 25160 this.oldValue.length - this.value.length, 0); 25161 } 25162 25163 /** Removed symbols */ 25164 get removed() { 25165 return this.oldValue.substr(this.startChangePos, this.removedCount); 25166 } 25167 25168 /** Unchanged head symbols */ 25169 get head() { 25170 return this.value.substring(0, this.startChangePos); 25171 } 25172 25173 /** Unchanged tail symbols */ 25174 get tail() { 25175 return this.value.substring(this.startChangePos + this.insertedCount); 25176 } 25177 25178 /** Remove direction */ 25179 get removeDirection() { 25180 if (!this.removedCount || this.insertedCount) return DIRECTION.NONE; 25181 25182 // align right if delete at right 25183 return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && 25184 // if not range removed (event with backspace) 25185 this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT; 25186 } 25187 } 25188 25189 /** Applies mask on element */ 25190 function IMask(el, opts) { 25191 // currently available only for input-like elements 25192 return new IMask.InputMask(el, opts); 25193 } 25194 25195 // TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754 25196 // export function maskedClass(mask: string): typeof MaskedPattern; 25197 // export function maskedClass(mask: DateConstructor): typeof MaskedDate; 25198 // export function maskedClass(mask: NumberConstructor): typeof MaskedNumber; 25199 // export function maskedClass(mask: Array<any> | ArrayConstructor): typeof MaskedDynamic; 25200 // export function maskedClass(mask: MaskedDate): typeof MaskedDate; 25201 // export function maskedClass(mask: MaskedNumber): typeof MaskedNumber; 25202 // export function maskedClass(mask: MaskedEnum): typeof MaskedEnum; 25203 // export function maskedClass(mask: MaskedRange): typeof MaskedRange; 25204 // export function maskedClass(mask: MaskedRegExp): typeof MaskedRegExp; 25205 // export function maskedClass(mask: MaskedFunction): typeof MaskedFunction; 25206 // export function maskedClass(mask: MaskedPattern): typeof MaskedPattern; 25207 // export function maskedClass(mask: MaskedDynamic): typeof MaskedDynamic; 25208 // export function maskedClass(mask: Masked): typeof Masked; 25209 // export function maskedClass(mask: typeof Masked): typeof Masked; 25210 // export function maskedClass(mask: typeof MaskedDate): typeof MaskedDate; 25211 // export function maskedClass(mask: typeof MaskedNumber): typeof MaskedNumber; 25212 // export function maskedClass(mask: typeof MaskedEnum): typeof MaskedEnum; 25213 // export function maskedClass(mask: typeof MaskedRange): typeof MaskedRange; 25214 // export function maskedClass(mask: typeof MaskedRegExp): typeof MaskedRegExp; 25215 // export function maskedClass(mask: typeof MaskedFunction): typeof MaskedFunction; 25216 // export function maskedClass(mask: typeof MaskedPattern): typeof MaskedPattern; 25217 // export function maskedClass(mask: typeof MaskedDynamic): typeof MaskedDynamic; 25218 // export function maskedClass<Mask extends typeof Masked> (mask: Mask): Mask; 25219 // export function maskedClass(mask: RegExp): typeof MaskedRegExp; 25220 // export function maskedClass(mask: (value: string, ...args: any[]) => boolean): typeof MaskedFunction; 25221 25222 /** Get Masked class by mask type */ 25223 function maskedClass(mask) /* TODO */{ 25224 if (mask == null) throw new Error('mask property should be defined'); 25225 if (mask instanceof RegExp) return IMask.MaskedRegExp; 25226 if (isString(mask)) return IMask.MaskedPattern; 25227 if (mask === Date) return IMask.MaskedDate; 25228 if (mask === Number) return IMask.MaskedNumber; 25229 if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic; 25230 if (IMask.Masked && mask.prototype instanceof IMask.Masked) return mask; 25231 if (IMask.Masked && mask instanceof IMask.Masked) return mask.constructor; 25232 if (mask instanceof Function) return IMask.MaskedFunction; 25233 console.warn('Mask not found for mask', mask); // eslint-disable-line no-console 25234 return IMask.Masked; 25235 } 25236 function normalizeOpts(opts) { 25237 if (!opts) throw new Error('Options in not defined'); 25238 if (IMask.Masked) { 25239 if (opts.prototype instanceof IMask.Masked) return { 25240 mask: opts 25241 }; 25242 25243 /* 25244 handle cases like: 25245 1) opts = Masked 25246 2) opts = { mask: Masked, ...instanceOpts } 25247 */ 25248 const { 25249 mask = undefined, 25250 ...instanceOpts 25251 } = opts instanceof IMask.Masked ? { 25252 mask: opts 25253 } : isObject(opts) && opts.mask instanceof IMask.Masked ? opts : {}; 25254 if (mask) { 25255 const _mask = mask.mask; 25256 return { 25257 ...pick(mask, (_, k) => !k.startsWith('_')), 25258 mask: mask.constructor, 25259 _mask, 25260 ...instanceOpts 25261 }; 25262 } 25263 } 25264 if (!isObject(opts)) return { 25265 mask: opts 25266 }; 25267 return { 25268 ...opts 25269 }; 25270 } 25271 25272 // TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754 25273 25274 // From masked 25275 // export default function createMask<Opts extends Masked, ReturnMasked=Opts> (opts: Opts): ReturnMasked; 25276 // // From masked class 25277 // export default function createMask<Opts extends MaskedOptions<typeof Masked>, ReturnMasked extends Masked=InstanceType<Opts['mask']>> (opts: Opts): ReturnMasked; 25278 // export default function createMask<Opts extends MaskedOptions<typeof MaskedDate>, ReturnMasked extends MaskedDate=MaskedDate<Opts['parent']>> (opts: Opts): ReturnMasked; 25279 // export default function createMask<Opts extends MaskedOptions<typeof MaskedNumber>, ReturnMasked extends MaskedNumber=MaskedNumber<Opts['parent']>> (opts: Opts): ReturnMasked; 25280 // export default function createMask<Opts extends MaskedOptions<typeof MaskedEnum>, ReturnMasked extends MaskedEnum=MaskedEnum<Opts['parent']>> (opts: Opts): ReturnMasked; 25281 // export default function createMask<Opts extends MaskedOptions<typeof MaskedRange>, ReturnMasked extends MaskedRange=MaskedRange<Opts['parent']>> (opts: Opts): ReturnMasked; 25282 // export default function createMask<Opts extends MaskedOptions<typeof MaskedRegExp>, ReturnMasked extends MaskedRegExp=MaskedRegExp<Opts['parent']>> (opts: Opts): ReturnMasked; 25283 // export default function createMask<Opts extends MaskedOptions<typeof MaskedFunction>, ReturnMasked extends MaskedFunction=MaskedFunction<Opts['parent']>> (opts: Opts): ReturnMasked; 25284 // export default function createMask<Opts extends MaskedOptions<typeof MaskedPattern>, ReturnMasked extends MaskedPattern=MaskedPattern<Opts['parent']>> (opts: Opts): ReturnMasked; 25285 // export default function createMask<Opts extends MaskedOptions<typeof MaskedDynamic>, ReturnMasked extends MaskedDynamic=MaskedDynamic<Opts['parent']>> (opts: Opts): ReturnMasked; 25286 // // From mask opts 25287 // export default function createMask<Opts extends MaskedOptions<Masked>, ReturnMasked=Opts extends MaskedOptions<infer M> ? M : never> (opts: Opts): ReturnMasked; 25288 // export default function createMask<Opts extends MaskedNumberOptions, ReturnMasked extends MaskedNumber=MaskedNumber<Opts['parent']>> (opts: Opts): ReturnMasked; 25289 // export default function createMask<Opts extends MaskedDateFactoryOptions, ReturnMasked extends MaskedDate=MaskedDate<Opts['parent']>> (opts: Opts): ReturnMasked; 25290 // export default function createMask<Opts extends MaskedEnumOptions, ReturnMasked extends MaskedEnum=MaskedEnum<Opts['parent']>> (opts: Opts): ReturnMasked; 25291 // export default function createMask<Opts extends MaskedRangeOptions, ReturnMasked extends MaskedRange=MaskedRange<Opts['parent']>> (opts: Opts): ReturnMasked; 25292 // export default function createMask<Opts extends MaskedPatternOptions, ReturnMasked extends MaskedPattern=MaskedPattern<Opts['parent']>> (opts: Opts): ReturnMasked; 25293 // export default function createMask<Opts extends MaskedDynamicOptions, ReturnMasked extends MaskedDynamic=MaskedDynamic<Opts['parent']>> (opts: Opts): ReturnMasked; 25294 // export default function createMask<Opts extends MaskedOptions<RegExp>, ReturnMasked extends MaskedRegExp=MaskedRegExp<Opts['parent']>> (opts: Opts): ReturnMasked; 25295 // export default function createMask<Opts extends MaskedOptions<Function>, ReturnMasked extends MaskedFunction=MaskedFunction<Opts['parent']>> (opts: Opts): ReturnMasked; 25296 25297 /** Creates new {@link Masked} depending on mask type */ 25298 function createMask(opts) { 25299 if (IMask.Masked && opts instanceof IMask.Masked) return opts; 25300 const nOpts = normalizeOpts(opts); 25301 const MaskedClass = maskedClass(nOpts.mask); 25302 if (!MaskedClass) throw new Error("Masked class is not found for provided mask " + nOpts.mask + ", appropriate module needs to be imported manually before creating mask."); 25303 if (nOpts.mask === MaskedClass) delete nOpts.mask; 25304 if (nOpts._mask) { 25305 nOpts.mask = nOpts._mask; 25306 delete nOpts._mask; 25307 } 25308 return new MaskedClass(nOpts); 25309 } 25310 IMask.createMask = createMask; 25311 25312 /** Generic element API to use with mask */ 25313 class MaskElement { 25314 /** */ 25315 25316 /** */ 25317 25318 /** */ 25319 25320 /** Safely returns selection start */ 25321 get selectionStart() { 25322 let start; 25323 try { 25324 start = this._unsafeSelectionStart; 25325 } catch {} 25326 return start != null ? start : this.value.length; 25327 } 25328 25329 /** Safely returns selection end */ 25330 get selectionEnd() { 25331 let end; 25332 try { 25333 end = this._unsafeSelectionEnd; 25334 } catch {} 25335 return end != null ? end : this.value.length; 25336 } 25337 25338 /** Safely sets element selection */ 25339 select(start, end) { 25340 if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return; 25341 try { 25342 this._unsafeSelect(start, end); 25343 } catch {} 25344 } 25345 25346 /** */ 25347 get isActive() { 25348 return false; 25349 } 25350 /** */ 25351 25352 /** */ 25353 25354 /** */ 25355 } 25356 IMask.MaskElement = MaskElement; 25357 25358 const KEY_Z = 90; 25359 const KEY_Y = 89; 25360 25361 /** Bridge between HTMLElement and {@link Masked} */ 25362 class HTMLMaskElement extends MaskElement { 25363 /** HTMLElement to use mask on */ 25364 25365 constructor(input) { 25366 super(); 25367 this.input = input; 25368 this._onKeydown = this._onKeydown.bind(this); 25369 this._onInput = this._onInput.bind(this); 25370 this._onBeforeinput = this._onBeforeinput.bind(this); 25371 this._onCompositionEnd = this._onCompositionEnd.bind(this); 25372 } 25373 get rootElement() { 25374 var _this$input$getRootNo, _this$input$getRootNo2, _this$input; 25375 return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) == null ? void 0 : _this$input$getRootNo2.call(_this$input)) != null ? _this$input$getRootNo : document; 25376 } 25377 25378 /** Is element in focus */ 25379 get isActive() { 25380 return this.input === this.rootElement.activeElement; 25381 } 25382 25383 /** Binds HTMLElement events to mask internal events */ 25384 bindEvents(handlers) { 25385 this.input.addEventListener('keydown', this._onKeydown); 25386 this.input.addEventListener('input', this._onInput); 25387 this.input.addEventListener('beforeinput', this._onBeforeinput); 25388 this.input.addEventListener('compositionend', this._onCompositionEnd); 25389 this.input.addEventListener('drop', handlers.drop); 25390 this.input.addEventListener('click', handlers.click); 25391 this.input.addEventListener('focus', handlers.focus); 25392 this.input.addEventListener('blur', handlers.commit); 25393 this._handlers = handlers; 25394 } 25395 _onKeydown(e) { 25396 if (this._handlers.redo && (e.keyCode === KEY_Z && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === KEY_Y && e.ctrlKey)) { 25397 e.preventDefault(); 25398 return this._handlers.redo(e); 25399 } 25400 if (this._handlers.undo && e.keyCode === KEY_Z && (e.metaKey || e.ctrlKey)) { 25401 e.preventDefault(); 25402 return this._handlers.undo(e); 25403 } 25404 if (!e.isComposing) this._handlers.selectionChange(e); 25405 } 25406 _onBeforeinput(e) { 25407 if (e.inputType === 'historyUndo' && this._handlers.undo) { 25408 e.preventDefault(); 25409 return this._handlers.undo(e); 25410 } 25411 if (e.inputType === 'historyRedo' && this._handlers.redo) { 25412 e.preventDefault(); 25413 return this._handlers.redo(e); 25414 } 25415 } 25416 _onCompositionEnd(e) { 25417 this._handlers.input(e); 25418 } 25419 _onInput(e) { 25420 if (!e.isComposing) this._handlers.input(e); 25421 } 25422 25423 /** Unbinds HTMLElement events to mask internal events */ 25424 unbindEvents() { 25425 this.input.removeEventListener('keydown', this._onKeydown); 25426 this.input.removeEventListener('input', this._onInput); 25427 this.input.removeEventListener('beforeinput', this._onBeforeinput); 25428 this.input.removeEventListener('compositionend', this._onCompositionEnd); 25429 this.input.removeEventListener('drop', this._handlers.drop); 25430 this.input.removeEventListener('click', this._handlers.click); 25431 this.input.removeEventListener('focus', this._handlers.focus); 25432 this.input.removeEventListener('blur', this._handlers.commit); 25433 this._handlers = {}; 25434 } 25435 } 25436 IMask.HTMLMaskElement = HTMLMaskElement; 25437 25438 /** Bridge between InputElement and {@link Masked} */ 25439 class HTMLInputMaskElement extends HTMLMaskElement { 25440 /** InputElement to use mask on */ 25441 25442 constructor(input) { 25443 super(input); 25444 this.input = input; 25445 } 25446 25447 /** Returns InputElement selection start */ 25448 get _unsafeSelectionStart() { 25449 return this.input.selectionStart != null ? this.input.selectionStart : this.value.length; 25450 } 25451 25452 /** Returns InputElement selection end */ 25453 get _unsafeSelectionEnd() { 25454 return this.input.selectionEnd; 25455 } 25456 25457 /** Sets InputElement selection */ 25458 _unsafeSelect(start, end) { 25459 this.input.setSelectionRange(start, end); 25460 } 25461 get value() { 25462 return this.input.value; 25463 } 25464 set value(value) { 25465 this.input.value = value; 25466 } 25467 } 25468 IMask.HTMLMaskElement = HTMLMaskElement; 25469 25470 class HTMLContenteditableMaskElement extends HTMLMaskElement { 25471 /** Returns HTMLElement selection start */ 25472 get _unsafeSelectionStart() { 25473 const root = this.rootElement; 25474 const selection = root.getSelection && root.getSelection(); 25475 const anchorOffset = selection && selection.anchorOffset; 25476 const focusOffset = selection && selection.focusOffset; 25477 if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) { 25478 return anchorOffset; 25479 } 25480 return focusOffset; 25481 } 25482 25483 /** Returns HTMLElement selection end */ 25484 get _unsafeSelectionEnd() { 25485 const root = this.rootElement; 25486 const selection = root.getSelection && root.getSelection(); 25487 const anchorOffset = selection && selection.anchorOffset; 25488 const focusOffset = selection && selection.focusOffset; 25489 if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) { 25490 return anchorOffset; 25491 } 25492 return focusOffset; 25493 } 25494 25495 /** Sets HTMLElement selection */ 25496 _unsafeSelect(start, end) { 25497 if (!this.rootElement.createRange) return; 25498 const range = this.rootElement.createRange(); 25499 range.setStart(this.input.firstChild || this.input, start); 25500 range.setEnd(this.input.lastChild || this.input, end); 25501 const root = this.rootElement; 25502 const selection = root.getSelection && root.getSelection(); 25503 if (selection) { 25504 selection.removeAllRanges(); 25505 selection.addRange(range); 25506 } 25507 } 25508 25509 /** HTMLElement value */ 25510 get value() { 25511 return this.input.textContent || ''; 25512 } 25513 set value(value) { 25514 this.input.textContent = value; 25515 } 25516 } 25517 IMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement; 25518 25519 class InputHistory { 25520 constructor() { 25521 this.states = []; 25522 this.currentIndex = 0; 25523 } 25524 get currentState() { 25525 return this.states[this.currentIndex]; 25526 } 25527 get isEmpty() { 25528 return this.states.length === 0; 25529 } 25530 push(state) { 25531 // if current index points before the last element then remove the future 25532 if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1; 25533 this.states.push(state); 25534 if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift(); 25535 this.currentIndex = this.states.length - 1; 25536 } 25537 go(steps) { 25538 this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1); 25539 return this.currentState; 25540 } 25541 undo() { 25542 return this.go(-1); 25543 } 25544 redo() { 25545 return this.go(+1); 25546 } 25547 clear() { 25548 this.states.length = 0; 25549 this.currentIndex = 0; 25550 } 25551 } 25552 InputHistory.MAX_LENGTH = 100; 25553 25554 /** Listens to element events and controls changes between element and {@link Masked} */ 25555 class InputMask { 25556 /** 25557 View element 25558 */ 25559 25560 /** Internal {@link Masked} model */ 25561 25562 constructor(el, opts) { 25563 this.el = el instanceof MaskElement ? el : el.isContentEditable && el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA' ? new HTMLContenteditableMaskElement(el) : new HTMLInputMaskElement(el); 25564 this.masked = createMask(opts); 25565 this._listeners = {}; 25566 this._value = ''; 25567 this._unmaskedValue = ''; 25568 this._rawInputValue = ''; 25569 this.history = new InputHistory(); 25570 this._saveSelection = this._saveSelection.bind(this); 25571 this._onInput = this._onInput.bind(this); 25572 this._onChange = this._onChange.bind(this); 25573 this._onDrop = this._onDrop.bind(this); 25574 this._onFocus = this._onFocus.bind(this); 25575 this._onClick = this._onClick.bind(this); 25576 this._onUndo = this._onUndo.bind(this); 25577 this._onRedo = this._onRedo.bind(this); 25578 this.alignCursor = this.alignCursor.bind(this); 25579 this.alignCursorFriendly = this.alignCursorFriendly.bind(this); 25580 this._bindEvents(); 25581 25582 // refresh 25583 this.updateValue(); 25584 this._onChange(); 25585 } 25586 maskEquals(mask) { 25587 var _this$masked; 25588 return mask == null || ((_this$masked = this.masked) == null ? void 0 : _this$masked.maskEquals(mask)); 25589 } 25590 25591 /** Masked */ 25592 get mask() { 25593 return this.masked.mask; 25594 } 25595 set mask(mask) { 25596 if (this.maskEquals(mask)) return; 25597 if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) { 25598 // TODO "any" no idea 25599 this.masked.updateOptions({ 25600 mask 25601 }); 25602 return; 25603 } 25604 const masked = mask instanceof IMask.Masked ? mask : createMask({ 25605 mask 25606 }); 25607 masked.unmaskedValue = this.masked.unmaskedValue; 25608 this.masked = masked; 25609 } 25610 25611 /** Raw value */ 25612 get value() { 25613 return this._value; 25614 } 25615 set value(str) { 25616 if (this.value === str) return; 25617 this.masked.value = str; 25618 this.updateControl('auto'); 25619 } 25620 25621 /** Unmasked value */ 25622 get unmaskedValue() { 25623 return this._unmaskedValue; 25624 } 25625 set unmaskedValue(str) { 25626 if (this.unmaskedValue === str) return; 25627 this.masked.unmaskedValue = str; 25628 this.updateControl('auto'); 25629 } 25630 25631 /** Raw input value */ 25632 get rawInputValue() { 25633 return this._rawInputValue; 25634 } 25635 set rawInputValue(str) { 25636 if (this.rawInputValue === str) return; 25637 this.masked.rawInputValue = str; 25638 this.updateControl(); 25639 this.alignCursor(); 25640 } 25641 25642 /** Typed unmasked value */ 25643 get typedValue() { 25644 return this.masked.typedValue; 25645 } 25646 set typedValue(val) { 25647 if (this.masked.typedValueEquals(val)) return; 25648 this.masked.typedValue = val; 25649 this.updateControl('auto'); 25650 } 25651 25652 /** Display value */ 25653 get displayValue() { 25654 return this.masked.displayValue; 25655 } 25656 25657 /** Starts listening to element events */ 25658 _bindEvents() { 25659 this.el.bindEvents({ 25660 selectionChange: this._saveSelection, 25661 input: this._onInput, 25662 drop: this._onDrop, 25663 click: this._onClick, 25664 focus: this._onFocus, 25665 commit: this._onChange, 25666 undo: this._onUndo, 25667 redo: this._onRedo 25668 }); 25669 } 25670 25671 /** Stops listening to element events */ 25672 _unbindEvents() { 25673 if (this.el) this.el.unbindEvents(); 25674 } 25675 25676 /** Fires custom event */ 25677 _fireEvent(ev, e) { 25678 const listeners = this._listeners[ev]; 25679 if (!listeners) return; 25680 listeners.forEach(l => l(e)); 25681 } 25682 25683 /** Current selection start */ 25684 get selectionStart() { 25685 return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart; 25686 } 25687 25688 /** Current cursor position */ 25689 get cursorPos() { 25690 return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd; 25691 } 25692 set cursorPos(pos) { 25693 if (!this.el || !this.el.isActive) return; 25694 this.el.select(pos, pos); 25695 this._saveSelection(); 25696 } 25697 25698 /** Stores current selection */ 25699 _saveSelection( /* ev */ 25700 ) { 25701 if (this.displayValue !== this.el.value) { 25702 console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console 25703 } 25704 this._selection = { 25705 start: this.selectionStart, 25706 end: this.cursorPos 25707 }; 25708 } 25709 25710 /** Syncronizes model value from view */ 25711 updateValue() { 25712 this.masked.value = this.el.value; 25713 this._value = this.masked.value; 25714 this._unmaskedValue = this.masked.unmaskedValue; 25715 this._rawInputValue = this.masked.rawInputValue; 25716 } 25717 25718 /** Syncronizes view from model value, fires change events */ 25719 updateControl(cursorPos) { 25720 const newUnmaskedValue = this.masked.unmaskedValue; 25721 const newValue = this.masked.value; 25722 const newRawInputValue = this.masked.rawInputValue; 25723 const newDisplayValue = this.displayValue; 25724 const isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue || this._rawInputValue !== newRawInputValue; 25725 this._unmaskedValue = newUnmaskedValue; 25726 this._value = newValue; 25727 this._rawInputValue = newRawInputValue; 25728 if (this.el.value !== newDisplayValue) this.el.value = newDisplayValue; 25729 if (cursorPos === 'auto') this.alignCursor();else if (cursorPos != null) this.cursorPos = cursorPos; 25730 if (isChanged) this._fireChangeEvents(); 25731 if (!this._historyChanging && (isChanged || this.history.isEmpty)) this.history.push({ 25732 unmaskedValue: newUnmaskedValue, 25733 selection: { 25734 start: this.selectionStart, 25735 end: this.cursorPos 25736 } 25737 }); 25738 } 25739 25740 /** Updates options with deep equal check, recreates {@link Masked} model if mask type changes */ 25741 updateOptions(opts) { 25742 const { 25743 mask, 25744 ...restOpts 25745 } = opts; // TODO types, yes, mask is optional 25746 25747 const updateMask = !this.maskEquals(mask); 25748 const updateOpts = this.masked.optionsIsChanged(restOpts); 25749 if (updateMask) this.mask = mask; 25750 if (updateOpts) this.masked.updateOptions(restOpts); // TODO 25751 25752 if (updateMask || updateOpts) this.updateControl(); 25753 } 25754 25755 /** Updates cursor */ 25756 updateCursor(cursorPos) { 25757 if (cursorPos == null) return; 25758 this.cursorPos = cursorPos; 25759 25760 // also queue change cursor for mobile browsers 25761 this._delayUpdateCursor(cursorPos); 25762 } 25763 25764 /** Delays cursor update to support mobile browsers */ 25765 _delayUpdateCursor(cursorPos) { 25766 this._abortUpdateCursor(); 25767 this._changingCursorPos = cursorPos; 25768 this._cursorChanging = setTimeout(() => { 25769 if (!this.el) return; // if was destroyed 25770 this.cursorPos = this._changingCursorPos; 25771 this._abortUpdateCursor(); 25772 }, 10); 25773 } 25774 25775 /** Fires custom events */ 25776 _fireChangeEvents() { 25777 this._fireEvent('accept', this._inputEvent); 25778 if (this.masked.isComplete) this._fireEvent('complete', this._inputEvent); 25779 } 25780 25781 /** Aborts delayed cursor update */ 25782 _abortUpdateCursor() { 25783 if (this._cursorChanging) { 25784 clearTimeout(this._cursorChanging); 25785 delete this._cursorChanging; 25786 } 25787 } 25788 25789 /** Aligns cursor to nearest available position */ 25790 alignCursor() { 25791 this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT)); 25792 } 25793 25794 /** Aligns cursor only if selection is empty */ 25795 alignCursorFriendly() { 25796 if (this.selectionStart !== this.cursorPos) return; // skip if range is selected 25797 this.alignCursor(); 25798 } 25799 25800 /** Adds listener on custom event */ 25801 on(ev, handler) { 25802 if (!this._listeners[ev]) this._listeners[ev] = []; 25803 this._listeners[ev].push(handler); 25804 return this; 25805 } 25806 25807 /** Removes custom event listener */ 25808 off(ev, handler) { 25809 if (!this._listeners[ev]) return this; 25810 if (!handler) { 25811 delete this._listeners[ev]; 25812 return this; 25813 } 25814 const hIndex = this._listeners[ev].indexOf(handler); 25815 if (hIndex >= 0) this._listeners[ev].splice(hIndex, 1); 25816 return this; 25817 } 25818 25819 /** Handles view input event */ 25820 _onInput(e) { 25821 this._inputEvent = e; 25822 this._abortUpdateCursor(); 25823 const details = new ActionDetails({ 25824 // new state 25825 value: this.el.value, 25826 cursorPos: this.cursorPos, 25827 // old state 25828 oldValue: this.displayValue, 25829 oldSelection: this._selection 25830 }); 25831 const oldRawValue = this.masked.rawInputValue; 25832 const offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, { 25833 input: true, 25834 raw: true 25835 }).offset; 25836 25837 // force align in remove direction only if no input chars were removed 25838 // otherwise we still need to align with NONE (to get out from fixed symbols for instance) 25839 const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE; 25840 let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection); 25841 if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE); 25842 this.updateControl(cursorPos); 25843 delete this._inputEvent; 25844 } 25845 25846 /** Handles view change event and commits model value */ 25847 _onChange() { 25848 if (this.displayValue !== this.el.value) this.updateValue(); 25849 this.masked.doCommit(); 25850 this.updateControl(); 25851 this._saveSelection(); 25852 } 25853 25854 /** Handles view drop event, prevents by default */ 25855 _onDrop(ev) { 25856 ev.preventDefault(); 25857 ev.stopPropagation(); 25858 } 25859 25860 /** Restore last selection on focus */ 25861 _onFocus(ev) { 25862 this.alignCursorFriendly(); 25863 } 25864 25865 /** Restore last selection on focus */ 25866 _onClick(ev) { 25867 this.alignCursorFriendly(); 25868 } 25869 _onUndo() { 25870 this._applyHistoryState(this.history.undo()); 25871 } 25872 _onRedo() { 25873 this._applyHistoryState(this.history.redo()); 25874 } 25875 _applyHistoryState(state) { 25876 if (!state) return; 25877 this._historyChanging = true; 25878 this.unmaskedValue = state.unmaskedValue; 25879 this.el.select(state.selection.start, state.selection.end); 25880 this._saveSelection(); 25881 this._historyChanging = false; 25882 } 25883 25884 /** Unbind view events and removes element reference */ 25885 destroy() { 25886 this._unbindEvents(); 25887 this._listeners.length = 0; 25888 delete this.el; 25889 } 25890 } 25891 IMask.InputMask = InputMask; 25892 25893 /** Provides details of changing model value */ 25894 class ChangeDetails { 25895 /** Inserted symbols */ 25896 25897 /** Additional offset if any changes occurred before tail */ 25898 25899 /** Raw inserted is used by dynamic mask */ 25900 25901 /** Can skip chars */ 25902 25903 static normalize(prep) { 25904 return Array.isArray(prep) ? prep : [prep, new ChangeDetails()]; 25905 } 25906 constructor(details) { 25907 Object.assign(this, { 25908 inserted: '', 25909 rawInserted: '', 25910 tailShift: 0, 25911 skip: false 25912 }, details); 25913 } 25914 25915 /** Aggregate changes */ 25916 aggregate(details) { 25917 this.inserted += details.inserted; 25918 this.rawInserted += details.rawInserted; 25919 this.tailShift += details.tailShift; 25920 this.skip = this.skip || details.skip; 25921 return this; 25922 } 25923 25924 /** Total offset considering all changes */ 25925 get offset() { 25926 return this.tailShift + this.inserted.length; 25927 } 25928 get consumed() { 25929 return Boolean(this.rawInserted) || this.skip; 25930 } 25931 equals(details) { 25932 return this.inserted === details.inserted && this.tailShift === details.tailShift && this.rawInserted === details.rawInserted && this.skip === details.skip; 25933 } 25934 } 25935 IMask.ChangeDetails = ChangeDetails; 25936 25937 /** Provides details of continuous extracted tail */ 25938 class ContinuousTailDetails { 25939 /** Tail value as string */ 25940 25941 /** Tail start position */ 25942 25943 /** Start position */ 25944 25945 constructor(value, from, stop) { 25946 if (value === void 0) { 25947 value = ''; 25948 } 25949 if (from === void 0) { 25950 from = 0; 25951 } 25952 this.value = value; 25953 this.from = from; 25954 this.stop = stop; 25955 } 25956 toString() { 25957 return this.value; 25958 } 25959 extend(tail) { 25960 this.value += String(tail); 25961 } 25962 appendTo(masked) { 25963 return masked.append(this.toString(), { 25964 tail: true 25965 }).aggregate(masked._appendPlaceholder()); 25966 } 25967 get state() { 25968 return { 25969 value: this.value, 25970 from: this.from, 25971 stop: this.stop 25972 }; 25973 } 25974 set state(state) { 25975 Object.assign(this, state); 25976 } 25977 unshift(beforePos) { 25978 if (!this.value.length || beforePos != null && this.from >= beforePos) return ''; 25979 const shiftChar = this.value[0]; 25980 this.value = this.value.slice(1); 25981 return shiftChar; 25982 } 25983 shift() { 25984 if (!this.value.length) return ''; 25985 const shiftChar = this.value[this.value.length - 1]; 25986 this.value = this.value.slice(0, -1); 25987 return shiftChar; 25988 } 25989 } 25990 25991 /** Append flags */ 25992 25993 /** Extract flags */ 25994 25995 // see https://github.com/microsoft/TypeScript/issues/6223 25996 25997 /** Provides common masking stuff */ 25998 class Masked { 25999 /** */ 26000 26001 /** */ 26002 26003 /** Transforms value before mask processing */ 26004 26005 /** Transforms each char before mask processing */ 26006 26007 /** Validates if value is acceptable */ 26008 26009 /** Does additional processing at the end of editing */ 26010 26011 /** Format typed value to string */ 26012 26013 /** Parse string to get typed value */ 26014 26015 /** Enable characters overwriting */ 26016 26017 /** */ 26018 26019 /** */ 26020 26021 /** */ 26022 26023 /** */ 26024 26025 constructor(opts) { 26026 this._value = ''; 26027 this._update({ 26028 ...Masked.DEFAULTS, 26029 ...opts 26030 }); 26031 this._initialized = true; 26032 } 26033 26034 /** Sets and applies new options */ 26035 updateOptions(opts) { 26036 if (!this.optionsIsChanged(opts)) return; 26037 this.withValueRefresh(this._update.bind(this, opts)); 26038 } 26039 26040 /** Sets new options */ 26041 _update(opts) { 26042 Object.assign(this, opts); 26043 } 26044 26045 /** Mask state */ 26046 get state() { 26047 return { 26048 _value: this.value, 26049 _rawInputValue: this.rawInputValue 26050 }; 26051 } 26052 set state(state) { 26053 this._value = state._value; 26054 } 26055 26056 /** Resets value */ 26057 reset() { 26058 this._value = ''; 26059 } 26060 get value() { 26061 return this._value; 26062 } 26063 set value(value) { 26064 this.resolve(value, { 26065 input: true 26066 }); 26067 } 26068 26069 /** Resolve new value */ 26070 resolve(value, flags) { 26071 if (flags === void 0) { 26072 flags = { 26073 input: true 26074 }; 26075 } 26076 this.reset(); 26077 this.append(value, flags, ''); 26078 this.doCommit(); 26079 } 26080 get unmaskedValue() { 26081 return this.value; 26082 } 26083 set unmaskedValue(value) { 26084 this.resolve(value, {}); 26085 } 26086 get typedValue() { 26087 return this.parse ? this.parse(this.value, this) : this.unmaskedValue; 26088 } 26089 set typedValue(value) { 26090 if (this.format) { 26091 this.value = this.format(value, this); 26092 } else { 26093 this.unmaskedValue = String(value); 26094 } 26095 } 26096 26097 /** Value that includes raw user input */ 26098 get rawInputValue() { 26099 return this.extractInput(0, this.displayValue.length, { 26100 raw: true 26101 }); 26102 } 26103 set rawInputValue(value) { 26104 this.resolve(value, { 26105 raw: true 26106 }); 26107 } 26108 get displayValue() { 26109 return this.value; 26110 } 26111 get isComplete() { 26112 return true; 26113 } 26114 get isFilled() { 26115 return this.isComplete; 26116 } 26117 26118 /** Finds nearest input position in direction */ 26119 nearestInputPos(cursorPos, direction) { 26120 return cursorPos; 26121 } 26122 totalInputPositions(fromPos, toPos) { 26123 if (fromPos === void 0) { 26124 fromPos = 0; 26125 } 26126 if (toPos === void 0) { 26127 toPos = this.displayValue.length; 26128 } 26129 return Math.min(this.displayValue.length, toPos - fromPos); 26130 } 26131 26132 /** Extracts value in range considering flags */ 26133 extractInput(fromPos, toPos, flags) { 26134 if (fromPos === void 0) { 26135 fromPos = 0; 26136 } 26137 if (toPos === void 0) { 26138 toPos = this.displayValue.length; 26139 } 26140 return this.displayValue.slice(fromPos, toPos); 26141 } 26142 26143 /** Extracts tail in range */ 26144 extractTail(fromPos, toPos) { 26145 if (fromPos === void 0) { 26146 fromPos = 0; 26147 } 26148 if (toPos === void 0) { 26149 toPos = this.displayValue.length; 26150 } 26151 return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos); 26152 } 26153 26154 /** Appends tail */ 26155 appendTail(tail) { 26156 if (isString(tail)) tail = new ContinuousTailDetails(String(tail)); 26157 return tail.appendTo(this); 26158 } 26159 26160 /** Appends char */ 26161 _appendCharRaw(ch, flags) { 26162 if (!ch) return new ChangeDetails(); 26163 this._value += ch; 26164 return new ChangeDetails({ 26165 inserted: ch, 26166 rawInserted: ch 26167 }); 26168 } 26169 26170 /** Appends char */ 26171 _appendChar(ch, flags, checkTail) { 26172 if (flags === void 0) { 26173 flags = {}; 26174 } 26175 const consistentState = this.state; 26176 let details; 26177 [ch, details] = this.doPrepareChar(ch, flags); 26178 if (ch) { 26179 details = details.aggregate(this._appendCharRaw(ch, flags)); 26180 26181 // TODO handle `skip`? 26182 26183 // try `autofix` lookahead 26184 if (!details.rawInserted && this.autofix === 'pad') { 26185 const noFixState = this.state; 26186 this.state = consistentState; 26187 let fixDetails = this.pad(flags); 26188 const chDetails = this._appendCharRaw(ch, flags); 26189 fixDetails = fixDetails.aggregate(chDetails); 26190 26191 // if fix was applied or 26192 // if details are equal use skip restoring state optimization 26193 if (chDetails.rawInserted || fixDetails.equals(details)) { 26194 details = fixDetails; 26195 } else { 26196 this.state = noFixState; 26197 } 26198 } 26199 } 26200 if (details.inserted) { 26201 let consistentTail; 26202 let appended = this.doValidate(flags) !== false; 26203 if (appended && checkTail != null) { 26204 // validation ok, check tail 26205 const beforeTailState = this.state; 26206 if (this.overwrite === true) { 26207 consistentTail = checkTail.state; 26208 for (let i = 0; i < details.rawInserted.length; ++i) { 26209 checkTail.unshift(this.displayValue.length - details.tailShift); 26210 } 26211 } 26212 let tailDetails = this.appendTail(checkTail); 26213 appended = tailDetails.rawInserted.length === checkTail.toString().length; 26214 26215 // not ok, try shift 26216 if (!(appended && tailDetails.inserted) && this.overwrite === 'shift') { 26217 this.state = beforeTailState; 26218 consistentTail = checkTail.state; 26219 for (let i = 0; i < details.rawInserted.length; ++i) { 26220 checkTail.shift(); 26221 } 26222 tailDetails = this.appendTail(checkTail); 26223 appended = tailDetails.rawInserted.length === checkTail.toString().length; 26224 } 26225 26226 // if ok, rollback state after tail 26227 if (appended && tailDetails.inserted) this.state = beforeTailState; 26228 } 26229 26230 // revert all if something went wrong 26231 if (!appended) { 26232 details = new ChangeDetails(); 26233 this.state = consistentState; 26234 if (checkTail && consistentTail) checkTail.state = consistentTail; 26235 } 26236 } 26237 return details; 26238 } 26239 26240 /** Appends optional placeholder at the end */ 26241 _appendPlaceholder() { 26242 return new ChangeDetails(); 26243 } 26244 26245 /** Appends optional eager placeholder at the end */ 26246 _appendEager() { 26247 return new ChangeDetails(); 26248 } 26249 26250 /** Appends symbols considering flags */ 26251 append(str, flags, tail) { 26252 if (!isString(str)) throw new Error('value should be string'); 26253 const checkTail = isString(tail) ? new ContinuousTailDetails(String(tail)) : tail; 26254 if (flags != null && flags.tail) flags._beforeTailState = this.state; 26255 let details; 26256 [str, details] = this.doPrepare(str, flags); 26257 for (let ci = 0; ci < str.length; ++ci) { 26258 const d = this._appendChar(str[ci], flags, checkTail); 26259 if (!d.rawInserted && !this.doSkipInvalid(str[ci], flags, checkTail)) break; 26260 details.aggregate(d); 26261 } 26262 if ((this.eager === true || this.eager === 'append') && flags != null && flags.input && str) { 26263 details.aggregate(this._appendEager()); 26264 } 26265 26266 // append tail but aggregate only tailShift 26267 if (checkTail != null) { 26268 details.tailShift += this.appendTail(checkTail).tailShift; 26269 // TODO it's a good idea to clear state after appending ends 26270 // but it causes bugs when one append calls another (when dynamic dispatch set rawInputValue) 26271 // this._resetBeforeTailState(); 26272 } 26273 return details; 26274 } 26275 remove(fromPos, toPos) { 26276 if (fromPos === void 0) { 26277 fromPos = 0; 26278 } 26279 if (toPos === void 0) { 26280 toPos = this.displayValue.length; 26281 } 26282 this._value = this.displayValue.slice(0, fromPos) + this.displayValue.slice(toPos); 26283 return new ChangeDetails(); 26284 } 26285 26286 /** Calls function and reapplies current value */ 26287 withValueRefresh(fn) { 26288 if (this._refreshing || !this._initialized) return fn(); 26289 this._refreshing = true; 26290 const rawInput = this.rawInputValue; 26291 const value = this.value; 26292 const ret = fn(); 26293 this.rawInputValue = rawInput; 26294 // append lost trailing chars at the end 26295 if (this.value && this.value !== value && value.indexOf(this.value) === 0) { 26296 this.append(value.slice(this.displayValue.length), {}, ''); 26297 this.doCommit(); 26298 } 26299 delete this._refreshing; 26300 return ret; 26301 } 26302 runIsolated(fn) { 26303 if (this._isolated || !this._initialized) return fn(this); 26304 this._isolated = true; 26305 const state = this.state; 26306 const ret = fn(this); 26307 this.state = state; 26308 delete this._isolated; 26309 return ret; 26310 } 26311 doSkipInvalid(ch, flags, checkTail) { 26312 return Boolean(this.skipInvalid); 26313 } 26314 26315 /** Prepares string before mask processing */ 26316 doPrepare(str, flags) { 26317 if (flags === void 0) { 26318 flags = {}; 26319 } 26320 return ChangeDetails.normalize(this.prepare ? this.prepare(str, this, flags) : str); 26321 } 26322 26323 /** Prepares each char before mask processing */ 26324 doPrepareChar(str, flags) { 26325 if (flags === void 0) { 26326 flags = {}; 26327 } 26328 return ChangeDetails.normalize(this.prepareChar ? this.prepareChar(str, this, flags) : str); 26329 } 26330 26331 /** Validates if value is acceptable */ 26332 doValidate(flags) { 26333 return (!this.validate || this.validate(this.value, this, flags)) && (!this.parent || this.parent.doValidate(flags)); 26334 } 26335 26336 /** Does additional processing at the end of editing */ 26337 doCommit() { 26338 if (this.commit) this.commit(this.value, this); 26339 } 26340 splice(start, deleteCount, inserted, removeDirection, flags) { 26341 if (inserted === void 0) { 26342 inserted = ''; 26343 } 26344 if (removeDirection === void 0) { 26345 removeDirection = DIRECTION.NONE; 26346 } 26347 if (flags === void 0) { 26348 flags = { 26349 input: true 26350 }; 26351 } 26352 const tailPos = start + deleteCount; 26353 const tail = this.extractTail(tailPos); 26354 const eagerRemove = this.eager === true || this.eager === 'remove'; 26355 let oldRawValue; 26356 if (eagerRemove) { 26357 removeDirection = forceDirection(removeDirection); 26358 oldRawValue = this.extractInput(0, tailPos, { 26359 raw: true 26360 }); 26361 } 26362 let startChangePos = start; 26363 const details = new ChangeDetails(); 26364 26365 // if it is just deletion without insertion 26366 if (removeDirection !== DIRECTION.NONE) { 26367 startChangePos = this.nearestInputPos(start, deleteCount > 1 && start !== 0 && !eagerRemove ? DIRECTION.NONE : removeDirection); 26368 26369 // adjust tailShift if start was aligned 26370 details.tailShift = startChangePos - start; 26371 } 26372 details.aggregate(this.remove(startChangePos)); 26373 if (eagerRemove && removeDirection !== DIRECTION.NONE && oldRawValue === this.rawInputValue) { 26374 if (removeDirection === DIRECTION.FORCE_LEFT) { 26375 let valLength; 26376 while (oldRawValue === this.rawInputValue && (valLength = this.displayValue.length)) { 26377 details.aggregate(new ChangeDetails({ 26378 tailShift: -1 26379 })).aggregate(this.remove(valLength - 1)); 26380 } 26381 } else if (removeDirection === DIRECTION.FORCE_RIGHT) { 26382 tail.unshift(); 26383 } 26384 } 26385 return details.aggregate(this.append(inserted, flags, tail)); 26386 } 26387 maskEquals(mask) { 26388 return this.mask === mask; 26389 } 26390 optionsIsChanged(opts) { 26391 return !objectIncludes(this, opts); 26392 } 26393 typedValueEquals(value) { 26394 const tval = this.typedValue; 26395 return value === tval || Masked.EMPTY_VALUES.includes(value) && Masked.EMPTY_VALUES.includes(tval) || (this.format ? this.format(value, this) === this.format(this.typedValue, this) : false); 26396 } 26397 pad(flags) { 26398 return new ChangeDetails(); 26399 } 26400 } 26401 Masked.DEFAULTS = { 26402 skipInvalid: true 26403 }; 26404 Masked.EMPTY_VALUES = [undefined, null, '']; 26405 IMask.Masked = Masked; 26406 26407 class ChunksTailDetails { 26408 /** */ 26409 26410 constructor(chunks, from) { 26411 if (chunks === void 0) { 26412 chunks = []; 26413 } 26414 if (from === void 0) { 26415 from = 0; 26416 } 26417 this.chunks = chunks; 26418 this.from = from; 26419 } 26420 toString() { 26421 return this.chunks.map(String).join(''); 26422 } 26423 extend(tailChunk) { 26424 if (!String(tailChunk)) return; 26425 tailChunk = isString(tailChunk) ? new ContinuousTailDetails(String(tailChunk)) : tailChunk; 26426 const lastChunk = this.chunks[this.chunks.length - 1]; 26427 const extendLast = lastChunk && ( 26428 // if stops are same or tail has no stop 26429 lastChunk.stop === tailChunk.stop || tailChunk.stop == null) && 26430 // if tail chunk goes just after last chunk 26431 tailChunk.from === lastChunk.from + lastChunk.toString().length; 26432 if (tailChunk instanceof ContinuousTailDetails) { 26433 // check the ability to extend previous chunk 26434 if (extendLast) { 26435 // extend previous chunk 26436 lastChunk.extend(tailChunk.toString()); 26437 } else { 26438 // append new chunk 26439 this.chunks.push(tailChunk); 26440 } 26441 } else if (tailChunk instanceof ChunksTailDetails) { 26442 if (tailChunk.stop == null) { 26443 // unwrap floating chunks to parent, keeping `from` pos 26444 let firstTailChunk; 26445 while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) { 26446 firstTailChunk = tailChunk.chunks.shift(); // not possible to be `undefined` because length was checked above 26447 firstTailChunk.from += tailChunk.from; 26448 this.extend(firstTailChunk); 26449 } 26450 } 26451 26452 // if tail chunk still has value 26453 if (tailChunk.toString()) { 26454 // if chunks contains stops, then popup stop to container 26455 tailChunk.stop = tailChunk.blockIndex; 26456 this.chunks.push(tailChunk); 26457 } 26458 } 26459 } 26460 appendTo(masked) { 26461 if (!(masked instanceof IMask.MaskedPattern)) { 26462 const tail = new ContinuousTailDetails(this.toString()); 26463 return tail.appendTo(masked); 26464 } 26465 const details = new ChangeDetails(); 26466 for (let ci = 0; ci < this.chunks.length; ++ci) { 26467 const chunk = this.chunks[ci]; 26468 const lastBlockIter = masked._mapPosToBlock(masked.displayValue.length); 26469 const stop = chunk.stop; 26470 let chunkBlock; 26471 if (stop != null && ( 26472 // if block not found or stop is behind lastBlock 26473 !lastBlockIter || lastBlockIter.index <= stop)) { 26474 if (chunk instanceof ChunksTailDetails || 26475 // for continuous block also check if stop is exist 26476 masked._stops.indexOf(stop) >= 0) { 26477 details.aggregate(masked._appendPlaceholder(stop)); 26478 } 26479 chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop]; 26480 } 26481 if (chunkBlock) { 26482 const tailDetails = chunkBlock.appendTail(chunk); 26483 details.aggregate(tailDetails); 26484 26485 // get not inserted chars 26486 const remainChars = chunk.toString().slice(tailDetails.rawInserted.length); 26487 if (remainChars) details.aggregate(masked.append(remainChars, { 26488 tail: true 26489 })); 26490 } else { 26491 details.aggregate(masked.append(chunk.toString(), { 26492 tail: true 26493 })); 26494 } 26495 } 26496 return details; 26497 } 26498 get state() { 26499 return { 26500 chunks: this.chunks.map(c => c.state), 26501 from: this.from, 26502 stop: this.stop, 26503 blockIndex: this.blockIndex 26504 }; 26505 } 26506 set state(state) { 26507 const { 26508 chunks, 26509 ...props 26510 } = state; 26511 Object.assign(this, props); 26512 this.chunks = chunks.map(cstate => { 26513 const chunk = "chunks" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails(); 26514 chunk.state = cstate; 26515 return chunk; 26516 }); 26517 } 26518 unshift(beforePos) { 26519 if (!this.chunks.length || beforePos != null && this.from >= beforePos) return ''; 26520 const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos; 26521 let ci = 0; 26522 while (ci < this.chunks.length) { 26523 const chunk = this.chunks[ci]; 26524 const shiftChar = chunk.unshift(chunkShiftPos); 26525 if (chunk.toString()) { 26526 // chunk still contains value 26527 // but not shifted - means no more available chars to shift 26528 if (!shiftChar) break; 26529 ++ci; 26530 } else { 26531 // clean if chunk has no value 26532 this.chunks.splice(ci, 1); 26533 } 26534 if (shiftChar) return shiftChar; 26535 } 26536 return ''; 26537 } 26538 shift() { 26539 if (!this.chunks.length) return ''; 26540 let ci = this.chunks.length - 1; 26541 while (0 <= ci) { 26542 const chunk = this.chunks[ci]; 26543 const shiftChar = chunk.shift(); 26544 if (chunk.toString()) { 26545 // chunk still contains value 26546 // but not shifted - means no more available chars to shift 26547 if (!shiftChar) break; 26548 --ci; 26549 } else { 26550 // clean if chunk has no value 26551 this.chunks.splice(ci, 1); 26552 } 26553 if (shiftChar) return shiftChar; 26554 } 26555 return ''; 26556 } 26557 } 26558 26559 class PatternCursor { 26560 constructor(masked, pos) { 26561 this.masked = masked; 26562 this._log = []; 26563 const { 26564 offset, 26565 index 26566 } = masked._mapPosToBlock(pos) || (pos < 0 ? 26567 // first 26568 { 26569 index: 0, 26570 offset: 0 26571 } : 26572 // last 26573 { 26574 index: this.masked._blocks.length, 26575 offset: 0 26576 }); 26577 this.offset = offset; 26578 this.index = index; 26579 this.ok = false; 26580 } 26581 get block() { 26582 return this.masked._blocks[this.index]; 26583 } 26584 get pos() { 26585 return this.masked._blockStartPos(this.index) + this.offset; 26586 } 26587 get state() { 26588 return { 26589 index: this.index, 26590 offset: this.offset, 26591 ok: this.ok 26592 }; 26593 } 26594 set state(s) { 26595 Object.assign(this, s); 26596 } 26597 pushState() { 26598 this._log.push(this.state); 26599 } 26600 popState() { 26601 const s = this._log.pop(); 26602 if (s) this.state = s; 26603 return s; 26604 } 26605 bindBlock() { 26606 if (this.block) return; 26607 if (this.index < 0) { 26608 this.index = 0; 26609 this.offset = 0; 26610 } 26611 if (this.index >= this.masked._blocks.length) { 26612 this.index = this.masked._blocks.length - 1; 26613 this.offset = this.block.displayValue.length; // TODO this is stupid type error, `block` depends on index that was changed above 26614 } 26615 } 26616 _pushLeft(fn) { 26617 this.pushState(); 26618 for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) { 26619 var _this$block; 26620 if (fn()) return this.ok = true; 26621 } 26622 return this.ok = false; 26623 } 26624 _pushRight(fn) { 26625 this.pushState(); 26626 for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) { 26627 if (fn()) return this.ok = true; 26628 } 26629 return this.ok = false; 26630 } 26631 pushLeftBeforeFilled() { 26632 return this._pushLeft(() => { 26633 if (this.block.isFixed || !this.block.value) return; 26634 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT); 26635 if (this.offset !== 0) return true; 26636 }); 26637 } 26638 pushLeftBeforeInput() { 26639 // cases: 26640 // filled input: 00| 26641 // optional empty input: 00[]| 26642 // nested block: XX<[]>| 26643 return this._pushLeft(() => { 26644 if (this.block.isFixed) return; 26645 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT); 26646 return true; 26647 }); 26648 } 26649 pushLeftBeforeRequired() { 26650 return this._pushLeft(() => { 26651 if (this.block.isFixed || this.block.isOptional && !this.block.value) return; 26652 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT); 26653 return true; 26654 }); 26655 } 26656 pushRightBeforeFilled() { 26657 return this._pushRight(() => { 26658 if (this.block.isFixed || !this.block.value) return; 26659 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT); 26660 if (this.offset !== this.block.value.length) return true; 26661 }); 26662 } 26663 pushRightBeforeInput() { 26664 return this._pushRight(() => { 26665 if (this.block.isFixed) return; 26666 26667 // const o = this.offset; 26668 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE); 26669 // HACK cases like (STILL DOES NOT WORK FOR NESTED) 26670 // aa|X 26671 // aa<X|[]>X_ - this will not work 26672 // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue; 26673 return true; 26674 }); 26675 } 26676 pushRightBeforeRequired() { 26677 return this._pushRight(() => { 26678 if (this.block.isFixed || this.block.isOptional && !this.block.value) return; 26679 26680 // TODO check |[*]XX_ 26681 this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE); 26682 return true; 26683 }); 26684 } 26685 } 26686 26687 class PatternFixedDefinition { 26688 /** */ 26689 26690 /** */ 26691 26692 /** */ 26693 26694 /** */ 26695 26696 /** */ 26697 26698 /** */ 26699 26700 constructor(opts) { 26701 Object.assign(this, opts); 26702 this._value = ''; 26703 this.isFixed = true; 26704 } 26705 get value() { 26706 return this._value; 26707 } 26708 get unmaskedValue() { 26709 return this.isUnmasking ? this.value : ''; 26710 } 26711 get rawInputValue() { 26712 return this._isRawInput ? this.value : ''; 26713 } 26714 get displayValue() { 26715 return this.value; 26716 } 26717 reset() { 26718 this._isRawInput = false; 26719 this._value = ''; 26720 } 26721 remove(fromPos, toPos) { 26722 if (fromPos === void 0) { 26723 fromPos = 0; 26724 } 26725 if (toPos === void 0) { 26726 toPos = this._value.length; 26727 } 26728 this._value = this._value.slice(0, fromPos) + this._value.slice(toPos); 26729 if (!this._value) this._isRawInput = false; 26730 return new ChangeDetails(); 26731 } 26732 nearestInputPos(cursorPos, direction) { 26733 if (direction === void 0) { 26734 direction = DIRECTION.NONE; 26735 } 26736 const minPos = 0; 26737 const maxPos = this._value.length; 26738 switch (direction) { 26739 case DIRECTION.LEFT: 26740 case DIRECTION.FORCE_LEFT: 26741 return minPos; 26742 case DIRECTION.NONE: 26743 case DIRECTION.RIGHT: 26744 case DIRECTION.FORCE_RIGHT: 26745 default: 26746 return maxPos; 26747 } 26748 } 26749 totalInputPositions(fromPos, toPos) { 26750 if (fromPos === void 0) { 26751 fromPos = 0; 26752 } 26753 if (toPos === void 0) { 26754 toPos = this._value.length; 26755 } 26756 return this._isRawInput ? toPos - fromPos : 0; 26757 } 26758 extractInput(fromPos, toPos, flags) { 26759 if (fromPos === void 0) { 26760 fromPos = 0; 26761 } 26762 if (toPos === void 0) { 26763 toPos = this._value.length; 26764 } 26765 if (flags === void 0) { 26766 flags = {}; 26767 } 26768 return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || ''; 26769 } 26770 get isComplete() { 26771 return true; 26772 } 26773 get isFilled() { 26774 return Boolean(this._value); 26775 } 26776 _appendChar(ch, flags) { 26777 if (flags === void 0) { 26778 flags = {}; 26779 } 26780 if (this.isFilled) return new ChangeDetails(); 26781 const appendEager = this.eager === true || this.eager === 'append'; 26782 const appended = this.char === ch; 26783 const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail; 26784 const details = new ChangeDetails({ 26785 inserted: this.char, 26786 rawInserted: isResolved ? this.char : '' 26787 }); 26788 this._value = this.char; 26789 this._isRawInput = isResolved && (flags.raw || flags.input); 26790 return details; 26791 } 26792 _appendEager() { 26793 return this._appendChar(this.char, { 26794 tail: true 26795 }); 26796 } 26797 _appendPlaceholder() { 26798 const details = new ChangeDetails(); 26799 if (this.isFilled) return details; 26800 this._value = details.inserted = this.char; 26801 return details; 26802 } 26803 extractTail() { 26804 return new ContinuousTailDetails(''); 26805 } 26806 appendTail(tail) { 26807 if (isString(tail)) tail = new ContinuousTailDetails(String(tail)); 26808 return tail.appendTo(this); 26809 } 26810 append(str, flags, tail) { 26811 const details = this._appendChar(str[0], flags); 26812 if (tail != null) { 26813 details.tailShift += this.appendTail(tail).tailShift; 26814 } 26815 return details; 26816 } 26817 doCommit() {} 26818 get state() { 26819 return { 26820 _value: this._value, 26821 _rawInputValue: this.rawInputValue 26822 }; 26823 } 26824 set state(state) { 26825 this._value = state._value; 26826 this._isRawInput = Boolean(state._rawInputValue); 26827 } 26828 pad(flags) { 26829 return this._appendPlaceholder(); 26830 } 26831 } 26832 26833 class PatternInputDefinition { 26834 /** */ 26835 26836 /** */ 26837 26838 /** */ 26839 26840 /** */ 26841 26842 /** */ 26843 26844 /** */ 26845 26846 /** */ 26847 26848 /** */ 26849 26850 constructor(opts) { 26851 const { 26852 parent, 26853 isOptional, 26854 placeholderChar, 26855 displayChar, 26856 lazy, 26857 eager, 26858 ...maskOpts 26859 } = opts; 26860 this.masked = createMask(maskOpts); 26861 Object.assign(this, { 26862 parent, 26863 isOptional, 26864 placeholderChar, 26865 displayChar, 26866 lazy, 26867 eager 26868 }); 26869 } 26870 reset() { 26871 this.isFilled = false; 26872 this.masked.reset(); 26873 } 26874 remove(fromPos, toPos) { 26875 if (fromPos === void 0) { 26876 fromPos = 0; 26877 } 26878 if (toPos === void 0) { 26879 toPos = this.value.length; 26880 } 26881 if (fromPos === 0 && toPos >= 1) { 26882 this.isFilled = false; 26883 return this.masked.remove(fromPos, toPos); 26884 } 26885 return new ChangeDetails(); 26886 } 26887 get value() { 26888 return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : ''); 26889 } 26890 get unmaskedValue() { 26891 return this.masked.unmaskedValue; 26892 } 26893 get rawInputValue() { 26894 return this.masked.rawInputValue; 26895 } 26896 get displayValue() { 26897 return this.masked.value && this.displayChar || this.value; 26898 } 26899 get isComplete() { 26900 return Boolean(this.masked.value) || this.isOptional; 26901 } 26902 _appendChar(ch, flags) { 26903 if (flags === void 0) { 26904 flags = {}; 26905 } 26906 if (this.isFilled) return new ChangeDetails(); 26907 const state = this.masked.state; 26908 // simulate input 26909 let details = this.masked._appendChar(ch, this.currentMaskFlags(flags)); 26910 if (details.inserted && this.doValidate(flags) === false) { 26911 details = new ChangeDetails(); 26912 this.masked.state = state; 26913 } 26914 if (!details.inserted && !this.isOptional && !this.lazy && !flags.input) { 26915 details.inserted = this.placeholderChar; 26916 } 26917 details.skip = !details.inserted && !this.isOptional; 26918 this.isFilled = Boolean(details.inserted); 26919 return details; 26920 } 26921 append(str, flags, tail) { 26922 // TODO probably should be done via _appendChar 26923 return this.masked.append(str, this.currentMaskFlags(flags), tail); 26924 } 26925 _appendPlaceholder() { 26926 if (this.isFilled || this.isOptional) return new ChangeDetails(); 26927 this.isFilled = true; 26928 return new ChangeDetails({ 26929 inserted: this.placeholderChar 26930 }); 26931 } 26932 _appendEager() { 26933 return new ChangeDetails(); 26934 } 26935 extractTail(fromPos, toPos) { 26936 return this.masked.extractTail(fromPos, toPos); 26937 } 26938 appendTail(tail) { 26939 return this.masked.appendTail(tail); 26940 } 26941 extractInput(fromPos, toPos, flags) { 26942 if (fromPos === void 0) { 26943 fromPos = 0; 26944 } 26945 if (toPos === void 0) { 26946 toPos = this.value.length; 26947 } 26948 return this.masked.extractInput(fromPos, toPos, flags); 26949 } 26950 nearestInputPos(cursorPos, direction) { 26951 if (direction === void 0) { 26952 direction = DIRECTION.NONE; 26953 } 26954 const minPos = 0; 26955 const maxPos = this.value.length; 26956 const boundPos = Math.min(Math.max(cursorPos, minPos), maxPos); 26957 switch (direction) { 26958 case DIRECTION.LEFT: 26959 case DIRECTION.FORCE_LEFT: 26960 return this.isComplete ? boundPos : minPos; 26961 case DIRECTION.RIGHT: 26962 case DIRECTION.FORCE_RIGHT: 26963 return this.isComplete ? boundPos : maxPos; 26964 case DIRECTION.NONE: 26965 default: 26966 return boundPos; 26967 } 26968 } 26969 totalInputPositions(fromPos, toPos) { 26970 if (fromPos === void 0) { 26971 fromPos = 0; 26972 } 26973 if (toPos === void 0) { 26974 toPos = this.value.length; 26975 } 26976 return this.value.slice(fromPos, toPos).length; 26977 } 26978 doValidate(flags) { 26979 return this.masked.doValidate(this.currentMaskFlags(flags)) && (!this.parent || this.parent.doValidate(this.currentMaskFlags(flags))); 26980 } 26981 doCommit() { 26982 this.masked.doCommit(); 26983 } 26984 get state() { 26985 return { 26986 _value: this.value, 26987 _rawInputValue: this.rawInputValue, 26988 masked: this.masked.state, 26989 isFilled: this.isFilled 26990 }; 26991 } 26992 set state(state) { 26993 this.masked.state = state.masked; 26994 this.isFilled = state.isFilled; 26995 } 26996 currentMaskFlags(flags) { 26997 var _flags$_beforeTailSta; 26998 return { 26999 ...flags, 27000 _beforeTailState: (flags == null || (_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.masked) || (flags == null ? void 0 : flags._beforeTailState) 27001 }; 27002 } 27003 pad(flags) { 27004 return new ChangeDetails(); 27005 } 27006 } 27007 PatternInputDefinition.DEFAULT_DEFINITIONS = { 27008 '0': /\d/, 27009 'a': /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, 27010 // http://stackoverflow.com/a/22075070 27011 '*': /./ 27012 }; 27013 27014 /** Masking by RegExp */ 27015 class MaskedRegExp extends Masked { 27016 /** */ 27017 27018 /** Enable characters overwriting */ 27019 27020 /** */ 27021 27022 /** */ 27023 27024 /** */ 27025 27026 updateOptions(opts) { 27027 super.updateOptions(opts); 27028 } 27029 _update(opts) { 27030 const mask = opts.mask; 27031 if (mask) opts.validate = value => value.search(mask) >= 0; 27032 super._update(opts); 27033 } 27034 } 27035 IMask.MaskedRegExp = MaskedRegExp; 27036 27037 /** Pattern mask */ 27038 class MaskedPattern extends Masked { 27039 /** */ 27040 27041 /** */ 27042 27043 /** Single char for empty input */ 27044 27045 /** Single char for filled input */ 27046 27047 /** Show placeholder only when needed */ 27048 27049 /** Enable characters overwriting */ 27050 27051 /** */ 27052 27053 /** */ 27054 27055 /** */ 27056 27057 constructor(opts) { 27058 super({ 27059 ...MaskedPattern.DEFAULTS, 27060 ...opts, 27061 definitions: Object.assign({}, PatternInputDefinition.DEFAULT_DEFINITIONS, opts == null ? void 0 : opts.definitions) 27062 }); 27063 } 27064 updateOptions(opts) { 27065 super.updateOptions(opts); 27066 } 27067 _update(opts) { 27068 opts.definitions = Object.assign({}, this.definitions, opts.definitions); 27069 super._update(opts); 27070 this._rebuildMask(); 27071 } 27072 _rebuildMask() { 27073 const defs = this.definitions; 27074 this._blocks = []; 27075 this.exposeBlock = undefined; 27076 this._stops = []; 27077 this._maskedBlocks = {}; 27078 const pattern = this.mask; 27079 if (!pattern || !defs) return; 27080 let unmaskingBlock = false; 27081 let optionalBlock = false; 27082 for (let i = 0; i < pattern.length; ++i) { 27083 if (this.blocks) { 27084 const p = pattern.slice(i); 27085 const bNames = Object.keys(this.blocks).filter(bName => p.indexOf(bName) === 0); 27086 // order by key length 27087 bNames.sort((a, b) => b.length - a.length); 27088 // use block name with max length 27089 const bName = bNames[0]; 27090 if (bName) { 27091 const { 27092 expose, 27093 repeat, 27094 ...bOpts 27095 } = normalizeOpts(this.blocks[bName]); // TODO type Opts<Arg & Extra> 27096 const blockOpts = { 27097 lazy: this.lazy, 27098 eager: this.eager, 27099 placeholderChar: this.placeholderChar, 27100 displayChar: this.displayChar, 27101 overwrite: this.overwrite, 27102 autofix: this.autofix, 27103 ...bOpts, 27104 repeat, 27105 parent: this 27106 }; 27107 const maskedBlock = repeat != null ? new IMask.RepeatBlock(blockOpts /* TODO */) : createMask(blockOpts); 27108 if (maskedBlock) { 27109 this._blocks.push(maskedBlock); 27110 if (expose) this.exposeBlock = maskedBlock; 27111 27112 // store block index 27113 if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = []; 27114 this._maskedBlocks[bName].push(this._blocks.length - 1); 27115 } 27116 i += bName.length - 1; 27117 continue; 27118 } 27119 } 27120 let char = pattern[i]; 27121 let isInput = (char in defs); 27122 if (char === MaskedPattern.STOP_CHAR) { 27123 this._stops.push(this._blocks.length); 27124 continue; 27125 } 27126 if (char === '{' || char === '}') { 27127 unmaskingBlock = !unmaskingBlock; 27128 continue; 27129 } 27130 if (char === '[' || char === ']') { 27131 optionalBlock = !optionalBlock; 27132 continue; 27133 } 27134 if (char === MaskedPattern.ESCAPE_CHAR) { 27135 ++i; 27136 char = pattern[i]; 27137 if (!char) break; 27138 isInput = false; 27139 } 27140 const def = isInput ? new PatternInputDefinition({ 27141 isOptional: optionalBlock, 27142 lazy: this.lazy, 27143 eager: this.eager, 27144 placeholderChar: this.placeholderChar, 27145 displayChar: this.displayChar, 27146 ...normalizeOpts(defs[char]), 27147 parent: this 27148 }) : new PatternFixedDefinition({ 27149 char, 27150 eager: this.eager, 27151 isUnmasking: unmaskingBlock 27152 }); 27153 this._blocks.push(def); 27154 } 27155 } 27156 get state() { 27157 return { 27158 ...super.state, 27159 _blocks: this._blocks.map(b => b.state) 27160 }; 27161 } 27162 set state(state) { 27163 if (!state) { 27164 this.reset(); 27165 return; 27166 } 27167 const { 27168 _blocks, 27169 ...maskedState 27170 } = state; 27171 this._blocks.forEach((b, bi) => b.state = _blocks[bi]); 27172 super.state = maskedState; 27173 } 27174 reset() { 27175 super.reset(); 27176 this._blocks.forEach(b => b.reset()); 27177 } 27178 get isComplete() { 27179 return this.exposeBlock ? this.exposeBlock.isComplete : this._blocks.every(b => b.isComplete); 27180 } 27181 get isFilled() { 27182 return this._blocks.every(b => b.isFilled); 27183 } 27184 get isFixed() { 27185 return this._blocks.every(b => b.isFixed); 27186 } 27187 get isOptional() { 27188 return this._blocks.every(b => b.isOptional); 27189 } 27190 doCommit() { 27191 this._blocks.forEach(b => b.doCommit()); 27192 super.doCommit(); 27193 } 27194 get unmaskedValue() { 27195 return this.exposeBlock ? this.exposeBlock.unmaskedValue : this._blocks.reduce((str, b) => str += b.unmaskedValue, ''); 27196 } 27197 set unmaskedValue(unmaskedValue) { 27198 if (this.exposeBlock) { 27199 const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length); 27200 this.exposeBlock.unmaskedValue = unmaskedValue; 27201 this.appendTail(tail); 27202 this.doCommit(); 27203 } else super.unmaskedValue = unmaskedValue; 27204 } 27205 get value() { 27206 return this.exposeBlock ? this.exposeBlock.value : 27207 // TODO return _value when not in change? 27208 this._blocks.reduce((str, b) => str += b.value, ''); 27209 } 27210 set value(value) { 27211 if (this.exposeBlock) { 27212 const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length); 27213 this.exposeBlock.value = value; 27214 this.appendTail(tail); 27215 this.doCommit(); 27216 } else super.value = value; 27217 } 27218 get typedValue() { 27219 return this.exposeBlock ? this.exposeBlock.typedValue : super.typedValue; 27220 } 27221 set typedValue(value) { 27222 if (this.exposeBlock) { 27223 const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length); 27224 this.exposeBlock.typedValue = value; 27225 this.appendTail(tail); 27226 this.doCommit(); 27227 } else super.typedValue = value; 27228 } 27229 get displayValue() { 27230 return this._blocks.reduce((str, b) => str += b.displayValue, ''); 27231 } 27232 appendTail(tail) { 27233 return super.appendTail(tail).aggregate(this._appendPlaceholder()); 27234 } 27235 _appendEager() { 27236 var _this$_mapPosToBlock; 27237 const details = new ChangeDetails(); 27238 let startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index; 27239 if (startBlockIndex == null) return details; 27240 27241 // TODO test if it works for nested pattern masks 27242 if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex; 27243 for (let bi = startBlockIndex; bi < this._blocks.length; ++bi) { 27244 const d = this._blocks[bi]._appendEager(); 27245 if (!d.inserted) break; 27246 details.aggregate(d); 27247 } 27248 return details; 27249 } 27250 _appendCharRaw(ch, flags) { 27251 if (flags === void 0) { 27252 flags = {}; 27253 } 27254 const blockIter = this._mapPosToBlock(this.displayValue.length); 27255 const details = new ChangeDetails(); 27256 if (!blockIter) return details; 27257 for (let bi = blockIter.index, block; block = this._blocks[bi]; ++bi) { 27258 var _flags$_beforeTailSta; 27259 const blockDetails = block._appendChar(ch, { 27260 ...flags, 27261 _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi] 27262 }); 27263 details.aggregate(blockDetails); 27264 if (blockDetails.consumed) break; // go next char 27265 } 27266 return details; 27267 } 27268 extractTail(fromPos, toPos) { 27269 if (fromPos === void 0) { 27270 fromPos = 0; 27271 } 27272 if (toPos === void 0) { 27273 toPos = this.displayValue.length; 27274 } 27275 const chunkTail = new ChunksTailDetails(); 27276 if (fromPos === toPos) return chunkTail; 27277 this._forEachBlocksInRange(fromPos, toPos, (b, bi, bFromPos, bToPos) => { 27278 const blockChunk = b.extractTail(bFromPos, bToPos); 27279 blockChunk.stop = this._findStopBefore(bi); 27280 blockChunk.from = this._blockStartPos(bi); 27281 if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi; 27282 chunkTail.extend(blockChunk); 27283 }); 27284 return chunkTail; 27285 } 27286 extractInput(fromPos, toPos, flags) { 27287 if (fromPos === void 0) { 27288 fromPos = 0; 27289 } 27290 if (toPos === void 0) { 27291 toPos = this.displayValue.length; 27292 } 27293 if (flags === void 0) { 27294 flags = {}; 27295 } 27296 if (fromPos === toPos) return ''; 27297 let input = ''; 27298 this._forEachBlocksInRange(fromPos, toPos, (b, _, fromPos, toPos) => { 27299 input += b.extractInput(fromPos, toPos, flags); 27300 }); 27301 return input; 27302 } 27303 _findStopBefore(blockIndex) { 27304 let stopBefore; 27305 for (let si = 0; si < this._stops.length; ++si) { 27306 const stop = this._stops[si]; 27307 if (stop <= blockIndex) stopBefore = stop;else break; 27308 } 27309 return stopBefore; 27310 } 27311 27312 /** Appends placeholder depending on laziness */ 27313 _appendPlaceholder(toBlockIndex) { 27314 const details = new ChangeDetails(); 27315 if (this.lazy && toBlockIndex == null) return details; 27316 const startBlockIter = this._mapPosToBlock(this.displayValue.length); 27317 if (!startBlockIter) return details; 27318 const startBlockIndex = startBlockIter.index; 27319 const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length; 27320 this._blocks.slice(startBlockIndex, endBlockIndex).forEach(b => { 27321 if (!b.lazy || toBlockIndex != null) { 27322 var _blocks2; 27323 details.aggregate(b._appendPlaceholder((_blocks2 = b._blocks) == null ? void 0 : _blocks2.length)); 27324 } 27325 }); 27326 return details; 27327 } 27328 27329 /** Finds block in pos */ 27330 _mapPosToBlock(pos) { 27331 let accVal = ''; 27332 for (let bi = 0; bi < this._blocks.length; ++bi) { 27333 const block = this._blocks[bi]; 27334 const blockStartPos = accVal.length; 27335 accVal += block.displayValue; 27336 if (pos <= accVal.length) { 27337 return { 27338 index: bi, 27339 offset: pos - blockStartPos 27340 }; 27341 } 27342 } 27343 } 27344 _blockStartPos(blockIndex) { 27345 return this._blocks.slice(0, blockIndex).reduce((pos, b) => pos += b.displayValue.length, 0); 27346 } 27347 _forEachBlocksInRange(fromPos, toPos, fn) { 27348 if (toPos === void 0) { 27349 toPos = this.displayValue.length; 27350 } 27351 const fromBlockIter = this._mapPosToBlock(fromPos); 27352 if (fromBlockIter) { 27353 const toBlockIter = this._mapPosToBlock(toPos); 27354 // process first block 27355 const isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index; 27356 const fromBlockStartPos = fromBlockIter.offset; 27357 const fromBlockEndPos = toBlockIter && isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].displayValue.length; 27358 fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos); 27359 if (toBlockIter && !isSameBlock) { 27360 // process intermediate blocks 27361 for (let bi = fromBlockIter.index + 1; bi < toBlockIter.index; ++bi) { 27362 fn(this._blocks[bi], bi, 0, this._blocks[bi].displayValue.length); 27363 } 27364 27365 // process last block 27366 fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset); 27367 } 27368 } 27369 } 27370 remove(fromPos, toPos) { 27371 if (fromPos === void 0) { 27372 fromPos = 0; 27373 } 27374 if (toPos === void 0) { 27375 toPos = this.displayValue.length; 27376 } 27377 const removeDetails = super.remove(fromPos, toPos); 27378 this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => { 27379 removeDetails.aggregate(b.remove(bFromPos, bToPos)); 27380 }); 27381 return removeDetails; 27382 } 27383 nearestInputPos(cursorPos, direction) { 27384 if (direction === void 0) { 27385 direction = DIRECTION.NONE; 27386 } 27387 if (!this._blocks.length) return 0; 27388 const cursor = new PatternCursor(this, cursorPos); 27389 if (direction === DIRECTION.NONE) { 27390 // ------------------------------------------------- 27391 // NONE should only go out from fixed to the right! 27392 // ------------------------------------------------- 27393 if (cursor.pushRightBeforeInput()) return cursor.pos; 27394 cursor.popState(); 27395 if (cursor.pushLeftBeforeInput()) return cursor.pos; 27396 return this.displayValue.length; 27397 } 27398 27399 // FORCE is only about a|* otherwise is 0 27400 if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) { 27401 // try to break fast when *|a 27402 if (direction === DIRECTION.LEFT) { 27403 cursor.pushRightBeforeFilled(); 27404 if (cursor.ok && cursor.pos === cursorPos) return cursorPos; 27405 cursor.popState(); 27406 } 27407 27408 // forward flow 27409 cursor.pushLeftBeforeInput(); 27410 cursor.pushLeftBeforeRequired(); 27411 cursor.pushLeftBeforeFilled(); 27412 27413 // backward flow 27414 if (direction === DIRECTION.LEFT) { 27415 cursor.pushRightBeforeInput(); 27416 cursor.pushRightBeforeRequired(); 27417 if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos; 27418 cursor.popState(); 27419 if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos; 27420 cursor.popState(); 27421 } 27422 if (cursor.ok) return cursor.pos; 27423 if (direction === DIRECTION.FORCE_LEFT) return 0; 27424 cursor.popState(); 27425 if (cursor.ok) return cursor.pos; 27426 cursor.popState(); 27427 if (cursor.ok) return cursor.pos; 27428 return 0; 27429 } 27430 if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) { 27431 // forward flow 27432 cursor.pushRightBeforeInput(); 27433 cursor.pushRightBeforeRequired(); 27434 if (cursor.pushRightBeforeFilled()) return cursor.pos; 27435 if (direction === DIRECTION.FORCE_RIGHT) return this.displayValue.length; 27436 27437 // backward flow 27438 cursor.popState(); 27439 if (cursor.ok) return cursor.pos; 27440 cursor.popState(); 27441 if (cursor.ok) return cursor.pos; 27442 return this.nearestInputPos(cursorPos, DIRECTION.LEFT); 27443 } 27444 return cursorPos; 27445 } 27446 totalInputPositions(fromPos, toPos) { 27447 if (fromPos === void 0) { 27448 fromPos = 0; 27449 } 27450 if (toPos === void 0) { 27451 toPos = this.displayValue.length; 27452 } 27453 let total = 0; 27454 this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => { 27455 total += b.totalInputPositions(bFromPos, bToPos); 27456 }); 27457 return total; 27458 } 27459 27460 /** Get block by name */ 27461 maskedBlock(name) { 27462 return this.maskedBlocks(name)[0]; 27463 } 27464 27465 /** Get all blocks by name */ 27466 maskedBlocks(name) { 27467 const indices = this._maskedBlocks[name]; 27468 if (!indices) return []; 27469 return indices.map(gi => this._blocks[gi]); 27470 } 27471 pad(flags) { 27472 const details = new ChangeDetails(); 27473 this._forEachBlocksInRange(0, this.displayValue.length, b => details.aggregate(b.pad(flags))); 27474 return details; 27475 } 27476 } 27477 MaskedPattern.DEFAULTS = { 27478 ...Masked.DEFAULTS, 27479 lazy: true, 27480 placeholderChar: '_' 27481 }; 27482 MaskedPattern.STOP_CHAR = '`'; 27483 MaskedPattern.ESCAPE_CHAR = '\\'; 27484 MaskedPattern.InputDefinition = PatternInputDefinition; 27485 MaskedPattern.FixedDefinition = PatternFixedDefinition; 27486 IMask.MaskedPattern = MaskedPattern; 27487 27488 /** Pattern which accepts ranges */ 27489 class MaskedRange extends MaskedPattern { 27490 /** 27491 Optionally sets max length of pattern. 27492 Used when pattern length is longer then `to` param length. Pads zeros at start in this case. 27493 */ 27494 27495 /** Min bound */ 27496 27497 /** Max bound */ 27498 27499 get _matchFrom() { 27500 return this.maxLength - String(this.from).length; 27501 } 27502 constructor(opts) { 27503 super(opts); // mask will be created in _update 27504 } 27505 updateOptions(opts) { 27506 super.updateOptions(opts); 27507 } 27508 _update(opts) { 27509 const { 27510 to = this.to || 0, 27511 from = this.from || 0, 27512 maxLength = this.maxLength || 0, 27513 autofix = this.autofix, 27514 ...patternOpts 27515 } = opts; 27516 this.to = to; 27517 this.from = from; 27518 this.maxLength = Math.max(String(to).length, maxLength); 27519 this.autofix = autofix; 27520 const fromStr = String(this.from).padStart(this.maxLength, '0'); 27521 const toStr = String(this.to).padStart(this.maxLength, '0'); 27522 let sameCharsCount = 0; 27523 while (sameCharsCount < toStr.length && toStr[sameCharsCount] === fromStr[sameCharsCount]) ++sameCharsCount; 27524 patternOpts.mask = toStr.slice(0, sameCharsCount).replace(/0/g, '\\0') + '0'.repeat(this.maxLength - sameCharsCount); 27525 super._update(patternOpts); 27526 } 27527 get isComplete() { 27528 return super.isComplete && Boolean(this.value); 27529 } 27530 boundaries(str) { 27531 let minstr = ''; 27532 let maxstr = ''; 27533 const [, placeholder, num] = str.match(/^(\D*)(\d*)(\D*)/) || []; 27534 if (num) { 27535 minstr = '0'.repeat(placeholder.length) + num; 27536 maxstr = '9'.repeat(placeholder.length) + num; 27537 } 27538 minstr = minstr.padEnd(this.maxLength, '0'); 27539 maxstr = maxstr.padEnd(this.maxLength, '9'); 27540 return [minstr, maxstr]; 27541 } 27542 doPrepareChar(ch, flags) { 27543 if (flags === void 0) { 27544 flags = {}; 27545 } 27546 let details; 27547 [ch, details] = super.doPrepareChar(ch.replace(/\D/g, ''), flags); 27548 if (!ch) details.skip = !this.isComplete; 27549 return [ch, details]; 27550 } 27551 _appendCharRaw(ch, flags) { 27552 if (flags === void 0) { 27553 flags = {}; 27554 } 27555 if (!this.autofix || this.value.length + 1 > this.maxLength) return super._appendCharRaw(ch, flags); 27556 const fromStr = String(this.from).padStart(this.maxLength, '0'); 27557 const toStr = String(this.to).padStart(this.maxLength, '0'); 27558 const [minstr, maxstr] = this.boundaries(this.value + ch); 27559 if (Number(maxstr) < this.from) return super._appendCharRaw(fromStr[this.value.length], flags); 27560 if (Number(minstr) > this.to) { 27561 if (!flags.tail && this.autofix === 'pad' && this.value.length + 1 < this.maxLength) { 27562 return super._appendCharRaw(fromStr[this.value.length], flags).aggregate(this._appendCharRaw(ch, flags)); 27563 } 27564 return super._appendCharRaw(toStr[this.value.length], flags); 27565 } 27566 return super._appendCharRaw(ch, flags); 27567 } 27568 doValidate(flags) { 27569 const str = this.value; 27570 const firstNonZero = str.search(/[^0]/); 27571 if (firstNonZero === -1 && str.length <= this._matchFrom) return true; 27572 const [minstr, maxstr] = this.boundaries(str); 27573 return this.from <= Number(maxstr) && Number(minstr) <= this.to && super.doValidate(flags); 27574 } 27575 pad(flags) { 27576 const details = new ChangeDetails(); 27577 if (this.value.length === this.maxLength) return details; 27578 const value = this.value; 27579 const padLength = this.maxLength - this.value.length; 27580 if (padLength) { 27581 this.reset(); 27582 for (let i = 0; i < padLength; ++i) { 27583 details.aggregate(super._appendCharRaw('0', flags)); 27584 } 27585 27586 // append tail 27587 value.split('').forEach(ch => this._appendCharRaw(ch)); 27588 } 27589 return details; 27590 } 27591 } 27592 IMask.MaskedRange = MaskedRange; 27593 27594 const DefaultPattern = 'd{.}`m{.}`Y'; 27595 27596 // Make format and parse required when pattern is provided 27597 27598 /** Date mask */ 27599 class MaskedDate extends MaskedPattern { 27600 static extractPatternOptions(opts) { 27601 const { 27602 mask, 27603 pattern, 27604 ...patternOpts 27605 } = opts; 27606 return { 27607 ...patternOpts, 27608 mask: isString(mask) ? mask : pattern 27609 }; 27610 } 27611 27612 /** Pattern mask for date according to {@link MaskedDate#format} */ 27613 27614 /** Start date */ 27615 27616 /** End date */ 27617 27618 /** Format typed value to string */ 27619 27620 /** Parse string to get typed value */ 27621 27622 constructor(opts) { 27623 super(MaskedDate.extractPatternOptions({ 27624 ...MaskedDate.DEFAULTS, 27625 ...opts 27626 })); 27627 } 27628 updateOptions(opts) { 27629 super.updateOptions(opts); 27630 } 27631 _update(opts) { 27632 const { 27633 mask, 27634 pattern, 27635 blocks, 27636 ...patternOpts 27637 } = { 27638 ...MaskedDate.DEFAULTS, 27639 ...opts 27640 }; 27641 const patternBlocks = Object.assign({}, MaskedDate.GET_DEFAULT_BLOCKS()); 27642 // adjust year block 27643 if (opts.min) patternBlocks.Y.from = opts.min.getFullYear(); 27644 if (opts.max) patternBlocks.Y.to = opts.max.getFullYear(); 27645 if (opts.min && opts.max && patternBlocks.Y.from === patternBlocks.Y.to) { 27646 patternBlocks.m.from = opts.min.getMonth() + 1; 27647 patternBlocks.m.to = opts.max.getMonth() + 1; 27648 if (patternBlocks.m.from === patternBlocks.m.to) { 27649 patternBlocks.d.from = opts.min.getDate(); 27650 patternBlocks.d.to = opts.max.getDate(); 27651 } 27652 } 27653 Object.assign(patternBlocks, this.blocks, blocks); 27654 super._update({ 27655 ...patternOpts, 27656 mask: isString(mask) ? mask : pattern, 27657 blocks: patternBlocks 27658 }); 27659 } 27660 doValidate(flags) { 27661 const date = this.date; 27662 return super.doValidate(flags) && (!this.isComplete || this.isDateExist(this.value) && date != null && (this.min == null || this.min <= date) && (this.max == null || date <= this.max)); 27663 } 27664 27665 /** Checks if date is exists */ 27666 isDateExist(str) { 27667 return this.format(this.parse(str, this), this).indexOf(str) >= 0; 27668 } 27669 27670 /** Parsed Date */ 27671 get date() { 27672 return this.typedValue; 27673 } 27674 set date(date) { 27675 this.typedValue = date; 27676 } 27677 get typedValue() { 27678 return this.isComplete ? super.typedValue : null; 27679 } 27680 set typedValue(value) { 27681 super.typedValue = value; 27682 } 27683 maskEquals(mask) { 27684 return mask === Date || super.maskEquals(mask); 27685 } 27686 optionsIsChanged(opts) { 27687 return super.optionsIsChanged(MaskedDate.extractPatternOptions(opts)); 27688 } 27689 } 27690 MaskedDate.GET_DEFAULT_BLOCKS = () => ({ 27691 d: { 27692 mask: MaskedRange, 27693 from: 1, 27694 to: 31, 27695 maxLength: 2 27696 }, 27697 m: { 27698 mask: MaskedRange, 27699 from: 1, 27700 to: 12, 27701 maxLength: 2 27702 }, 27703 Y: { 27704 mask: MaskedRange, 27705 from: 1900, 27706 to: 9999 27707 } 27708 }); 27709 MaskedDate.DEFAULTS = { 27710 ...MaskedPattern.DEFAULTS, 27711 mask: Date, 27712 pattern: DefaultPattern, 27713 format: (date, masked) => { 27714 if (!date) return ''; 27715 const day = String(date.getDate()).padStart(2, '0'); 27716 const month = String(date.getMonth() + 1).padStart(2, '0'); 27717 const year = date.getFullYear(); 27718 return [day, month, year].join('.'); 27719 }, 27720 parse: (str, masked) => { 27721 const [day, month, year] = str.split('.').map(Number); 27722 return new Date(year, month - 1, day); 27723 } 27724 }; 27725 IMask.MaskedDate = MaskedDate; 27726 27727 /** Dynamic mask for choosing appropriate mask in run-time */ 27728 class MaskedDynamic extends Masked { 27729 constructor(opts) { 27730 super({ 27731 ...MaskedDynamic.DEFAULTS, 27732 ...opts 27733 }); 27734 this.currentMask = undefined; 27735 } 27736 updateOptions(opts) { 27737 super.updateOptions(opts); 27738 } 27739 _update(opts) { 27740 super._update(opts); 27741 if ('mask' in opts) { 27742 this.exposeMask = undefined; 27743 // mask could be totally dynamic with only `dispatch` option 27744 this.compiledMasks = Array.isArray(opts.mask) ? opts.mask.map(m => { 27745 const { 27746 expose, 27747 ...maskOpts 27748 } = normalizeOpts(m); 27749 const masked = createMask({ 27750 overwrite: this._overwrite, 27751 eager: this._eager, 27752 skipInvalid: this._skipInvalid, 27753 ...maskOpts 27754 }); 27755 if (expose) this.exposeMask = masked; 27756 return masked; 27757 }) : []; 27758 27759 // this.currentMask = this.doDispatch(''); // probably not needed but lets see 27760 } 27761 } 27762 _appendCharRaw(ch, flags) { 27763 if (flags === void 0) { 27764 flags = {}; 27765 } 27766 const details = this._applyDispatch(ch, flags); 27767 if (this.currentMask) { 27768 details.aggregate(this.currentMask._appendChar(ch, this.currentMaskFlags(flags))); 27769 } 27770 return details; 27771 } 27772 _applyDispatch(appended, flags, tail) { 27773 if (appended === void 0) { 27774 appended = ''; 27775 } 27776 if (flags === void 0) { 27777 flags = {}; 27778 } 27779 if (tail === void 0) { 27780 tail = ''; 27781 } 27782 const prevValueBeforeTail = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._value : this.value; 27783 const inputValue = this.rawInputValue; 27784 const insertValue = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._rawInputValue : inputValue; 27785 const tailValue = inputValue.slice(insertValue.length); 27786 const prevMask = this.currentMask; 27787 const details = new ChangeDetails(); 27788 const prevMaskState = prevMask == null ? void 0 : prevMask.state; 27789 27790 // clone flags to prevent overwriting `_beforeTailState` 27791 this.currentMask = this.doDispatch(appended, { 27792 ...flags 27793 }, tail); 27794 27795 // restore state after dispatch 27796 if (this.currentMask) { 27797 if (this.currentMask !== prevMask) { 27798 // if mask changed reapply input 27799 this.currentMask.reset(); 27800 if (insertValue) { 27801 this.currentMask.append(insertValue, { 27802 raw: true 27803 }); 27804 details.tailShift = this.currentMask.value.length - prevValueBeforeTail.length; 27805 } 27806 if (tailValue) { 27807 details.tailShift += this.currentMask.append(tailValue, { 27808 raw: true, 27809 tail: true 27810 }).tailShift; 27811 } 27812 } else if (prevMaskState) { 27813 // Dispatch can do something bad with state, so 27814 // restore prev mask state 27815 this.currentMask.state = prevMaskState; 27816 } 27817 } 27818 return details; 27819 } 27820 _appendPlaceholder() { 27821 const details = this._applyDispatch(); 27822 if (this.currentMask) { 27823 details.aggregate(this.currentMask._appendPlaceholder()); 27824 } 27825 return details; 27826 } 27827 _appendEager() { 27828 const details = this._applyDispatch(); 27829 if (this.currentMask) { 27830 details.aggregate(this.currentMask._appendEager()); 27831 } 27832 return details; 27833 } 27834 appendTail(tail) { 27835 const details = new ChangeDetails(); 27836 if (tail) details.aggregate(this._applyDispatch('', {}, tail)); 27837 return details.aggregate(this.currentMask ? this.currentMask.appendTail(tail) : super.appendTail(tail)); 27838 } 27839 currentMaskFlags(flags) { 27840 var _flags$_beforeTailSta, _flags$_beforeTailSta2; 27841 return { 27842 ...flags, 27843 _beforeTailState: ((_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.currentMaskRef) === this.currentMask && ((_flags$_beforeTailSta2 = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta2.currentMask) || flags._beforeTailState 27844 }; 27845 } 27846 doDispatch(appended, flags, tail) { 27847 if (flags === void 0) { 27848 flags = {}; 27849 } 27850 if (tail === void 0) { 27851 tail = ''; 27852 } 27853 return this.dispatch(appended, this, flags, tail); 27854 } 27855 doValidate(flags) { 27856 return super.doValidate(flags) && (!this.currentMask || this.currentMask.doValidate(this.currentMaskFlags(flags))); 27857 } 27858 doPrepare(str, flags) { 27859 if (flags === void 0) { 27860 flags = {}; 27861 } 27862 let [s, details] = super.doPrepare(str, flags); 27863 if (this.currentMask) { 27864 let currentDetails; 27865 [s, currentDetails] = super.doPrepare(s, this.currentMaskFlags(flags)); 27866 details = details.aggregate(currentDetails); 27867 } 27868 return [s, details]; 27869 } 27870 doPrepareChar(str, flags) { 27871 if (flags === void 0) { 27872 flags = {}; 27873 } 27874 let [s, details] = super.doPrepareChar(str, flags); 27875 if (this.currentMask) { 27876 let currentDetails; 27877 [s, currentDetails] = super.doPrepareChar(s, this.currentMaskFlags(flags)); 27878 details = details.aggregate(currentDetails); 27879 } 27880 return [s, details]; 27881 } 27882 reset() { 27883 var _this$currentMask; 27884 (_this$currentMask = this.currentMask) == null || _this$currentMask.reset(); 27885 this.compiledMasks.forEach(m => m.reset()); 27886 } 27887 get value() { 27888 return this.exposeMask ? this.exposeMask.value : this.currentMask ? this.currentMask.value : ''; 27889 } 27890 set value(value) { 27891 if (this.exposeMask) { 27892 this.exposeMask.value = value; 27893 this.currentMask = this.exposeMask; 27894 this._applyDispatch(); 27895 } else super.value = value; 27896 } 27897 get unmaskedValue() { 27898 return this.exposeMask ? this.exposeMask.unmaskedValue : this.currentMask ? this.currentMask.unmaskedValue : ''; 27899 } 27900 set unmaskedValue(unmaskedValue) { 27901 if (this.exposeMask) { 27902 this.exposeMask.unmaskedValue = unmaskedValue; 27903 this.currentMask = this.exposeMask; 27904 this._applyDispatch(); 27905 } else super.unmaskedValue = unmaskedValue; 27906 } 27907 get typedValue() { 27908 return this.exposeMask ? this.exposeMask.typedValue : this.currentMask ? this.currentMask.typedValue : ''; 27909 } 27910 set typedValue(typedValue) { 27911 if (this.exposeMask) { 27912 this.exposeMask.typedValue = typedValue; 27913 this.currentMask = this.exposeMask; 27914 this._applyDispatch(); 27915 return; 27916 } 27917 let unmaskedValue = String(typedValue); 27918 27919 // double check it 27920 if (this.currentMask) { 27921 this.currentMask.typedValue = typedValue; 27922 unmaskedValue = this.currentMask.unmaskedValue; 27923 } 27924 this.unmaskedValue = unmaskedValue; 27925 } 27926 get displayValue() { 27927 return this.currentMask ? this.currentMask.displayValue : ''; 27928 } 27929 get isComplete() { 27930 var _this$currentMask2; 27931 return Boolean((_this$currentMask2 = this.currentMask) == null ? void 0 : _this$currentMask2.isComplete); 27932 } 27933 get isFilled() { 27934 var _this$currentMask3; 27935 return Boolean((_this$currentMask3 = this.currentMask) == null ? void 0 : _this$currentMask3.isFilled); 27936 } 27937 remove(fromPos, toPos) { 27938 const details = new ChangeDetails(); 27939 if (this.currentMask) { 27940 details.aggregate(this.currentMask.remove(fromPos, toPos)) 27941 // update with dispatch 27942 .aggregate(this._applyDispatch()); 27943 } 27944 return details; 27945 } 27946 get state() { 27947 var _this$currentMask4; 27948 return { 27949 ...super.state, 27950 _rawInputValue: this.rawInputValue, 27951 compiledMasks: this.compiledMasks.map(m => m.state), 27952 currentMaskRef: this.currentMask, 27953 currentMask: (_this$currentMask4 = this.currentMask) == null ? void 0 : _this$currentMask4.state 27954 }; 27955 } 27956 set state(state) { 27957 const { 27958 compiledMasks, 27959 currentMaskRef, 27960 currentMask, 27961 ...maskedState 27962 } = state; 27963 if (compiledMasks) this.compiledMasks.forEach((m, mi) => m.state = compiledMasks[mi]); 27964 if (currentMaskRef != null) { 27965 this.currentMask = currentMaskRef; 27966 this.currentMask.state = currentMask; 27967 } 27968 super.state = maskedState; 27969 } 27970 extractInput(fromPos, toPos, flags) { 27971 return this.currentMask ? this.currentMask.extractInput(fromPos, toPos, flags) : ''; 27972 } 27973 extractTail(fromPos, toPos) { 27974 return this.currentMask ? this.currentMask.extractTail(fromPos, toPos) : super.extractTail(fromPos, toPos); 27975 } 27976 doCommit() { 27977 if (this.currentMask) this.currentMask.doCommit(); 27978 super.doCommit(); 27979 } 27980 nearestInputPos(cursorPos, direction) { 27981 return this.currentMask ? this.currentMask.nearestInputPos(cursorPos, direction) : super.nearestInputPos(cursorPos, direction); 27982 } 27983 get overwrite() { 27984 return this.currentMask ? this.currentMask.overwrite : this._overwrite; 27985 } 27986 set overwrite(overwrite) { 27987 this._overwrite = overwrite; 27988 } 27989 get eager() { 27990 return this.currentMask ? this.currentMask.eager : this._eager; 27991 } 27992 set eager(eager) { 27993 this._eager = eager; 27994 } 27995 get skipInvalid() { 27996 return this.currentMask ? this.currentMask.skipInvalid : this._skipInvalid; 27997 } 27998 set skipInvalid(skipInvalid) { 27999 this._skipInvalid = skipInvalid; 28000 } 28001 get autofix() { 28002 return this.currentMask ? this.currentMask.autofix : this._autofix; 28003 } 28004 set autofix(autofix) { 28005 this._autofix = autofix; 28006 } 28007 maskEquals(mask) { 28008 return Array.isArray(mask) ? this.compiledMasks.every((m, mi) => { 28009 if (!mask[mi]) return; 28010 const { 28011 mask: oldMask, 28012 ...restOpts 28013 } = mask[mi]; 28014 return objectIncludes(m, restOpts) && m.maskEquals(oldMask); 28015 }) : super.maskEquals(mask); 28016 } 28017 typedValueEquals(value) { 28018 var _this$currentMask5; 28019 return Boolean((_this$currentMask5 = this.currentMask) == null ? void 0 : _this$currentMask5.typedValueEquals(value)); 28020 } 28021 } 28022 /** Currently chosen mask */ 28023 /** Currently chosen mask */ 28024 /** Compliled {@link Masked} options */ 28025 /** Chooses {@link Masked} depending on input value */ 28026 MaskedDynamic.DEFAULTS = { 28027 ...Masked.DEFAULTS, 28028 dispatch: (appended, masked, flags, tail) => { 28029 if (!masked.compiledMasks.length) return; 28030 const inputValue = masked.rawInputValue; 28031 28032 // simulate input 28033 const inputs = masked.compiledMasks.map((m, index) => { 28034 const isCurrent = masked.currentMask === m; 28035 const startInputPos = isCurrent ? m.displayValue.length : m.nearestInputPos(m.displayValue.length, DIRECTION.FORCE_LEFT); 28036 if (m.rawInputValue !== inputValue) { 28037 m.reset(); 28038 m.append(inputValue, { 28039 raw: true 28040 }); 28041 } else if (!isCurrent) { 28042 m.remove(startInputPos); 28043 } 28044 m.append(appended, masked.currentMaskFlags(flags)); 28045 m.appendTail(tail); 28046 return { 28047 index, 28048 weight: m.rawInputValue.length, 28049 totalInputPositions: m.totalInputPositions(0, Math.max(startInputPos, m.nearestInputPos(m.displayValue.length, DIRECTION.FORCE_LEFT))) 28050 }; 28051 }); 28052 28053 // pop masks with longer values first 28054 inputs.sort((i1, i2) => i2.weight - i1.weight || i2.totalInputPositions - i1.totalInputPositions); 28055 return masked.compiledMasks[inputs[0].index]; 28056 } 28057 }; 28058 IMask.MaskedDynamic = MaskedDynamic; 28059 28060 /** Pattern which validates enum values */ 28061 class MaskedEnum extends MaskedPattern { 28062 constructor(opts) { 28063 super({ 28064 ...MaskedEnum.DEFAULTS, 28065 ...opts 28066 }); // mask will be created in _update 28067 } 28068 updateOptions(opts) { 28069 super.updateOptions(opts); 28070 } 28071 _update(opts) { 28072 const { 28073 enum: enum_, 28074 ...eopts 28075 } = opts; 28076 if (enum_) { 28077 const lengths = enum_.map(e => e.length); 28078 const requiredLength = Math.min(...lengths); 28079 const optionalLength = Math.max(...lengths) - requiredLength; 28080 eopts.mask = '*'.repeat(requiredLength); 28081 if (optionalLength) eopts.mask += '[' + '*'.repeat(optionalLength) + ']'; 28082 this.enum = enum_; 28083 } 28084 super._update(eopts); 28085 } 28086 _appendCharRaw(ch, flags) { 28087 if (flags === void 0) { 28088 flags = {}; 28089 } 28090 const matchFrom = Math.min(this.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length); 28091 const matches = this.enum.filter(e => this.matchValue(e, this.unmaskedValue + ch, matchFrom)); 28092 if (matches.length) { 28093 if (matches.length === 1) { 28094 this._forEachBlocksInRange(0, this.value.length, (b, bi) => { 28095 const mch = matches[0][bi]; 28096 if (bi >= this.value.length || mch === b.value) return; 28097 b.reset(); 28098 b._appendChar(mch, flags); 28099 }); 28100 } 28101 const d = super._appendCharRaw(matches[0][this.value.length], flags); 28102 if (matches.length === 1) { 28103 matches[0].slice(this.unmaskedValue.length).split('').forEach(mch => d.aggregate(super._appendCharRaw(mch))); 28104 } 28105 return d; 28106 } 28107 return new ChangeDetails({ 28108 skip: !this.isComplete 28109 }); 28110 } 28111 extractTail(fromPos, toPos) { 28112 if (fromPos === void 0) { 28113 fromPos = 0; 28114 } 28115 if (toPos === void 0) { 28116 toPos = this.displayValue.length; 28117 } 28118 // just drop tail 28119 return new ContinuousTailDetails('', fromPos); 28120 } 28121 remove(fromPos, toPos) { 28122 if (fromPos === void 0) { 28123 fromPos = 0; 28124 } 28125 if (toPos === void 0) { 28126 toPos = this.displayValue.length; 28127 } 28128 if (fromPos === toPos) return new ChangeDetails(); 28129 const matchFrom = Math.min(super.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length); 28130 let pos; 28131 for (pos = fromPos; pos >= 0; --pos) { 28132 const matches = this.enum.filter(e => this.matchValue(e, this.value.slice(matchFrom, pos), matchFrom)); 28133 if (matches.length > 1) break; 28134 } 28135 const details = super.remove(pos, toPos); 28136 details.tailShift += pos - fromPos; 28137 return details; 28138 } 28139 get isComplete() { 28140 return this.enum.indexOf(this.value) >= 0; 28141 } 28142 } 28143 /** Match enum value */ 28144 MaskedEnum.DEFAULTS = { 28145 ...MaskedPattern.DEFAULTS, 28146 matchValue: (estr, istr, matchFrom) => estr.indexOf(istr, matchFrom) === matchFrom 28147 }; 28148 IMask.MaskedEnum = MaskedEnum; 28149 28150 /** Masking by custom Function */ 28151 class MaskedFunction extends Masked { 28152 /** */ 28153 28154 /** Enable characters overwriting */ 28155 28156 /** */ 28157 28158 /** */ 28159 28160 /** */ 28161 28162 updateOptions(opts) { 28163 super.updateOptions(opts); 28164 } 28165 _update(opts) { 28166 super._update({ 28167 ...opts, 28168 validate: opts.mask 28169 }); 28170 } 28171 } 28172 IMask.MaskedFunction = MaskedFunction; 28173 28174 var _MaskedNumber; 28175 /** Number mask */ 28176 class MaskedNumber extends Masked { 28177 /** Single char */ 28178 28179 /** Single char */ 28180 28181 /** Array of single chars */ 28182 28183 /** */ 28184 28185 /** */ 28186 28187 /** Digits after point */ 28188 28189 /** Flag to remove leading and trailing zeros in the end of editing */ 28190 28191 /** Flag to pad trailing zeros after point in the end of editing */ 28192 28193 /** Enable characters overwriting */ 28194 28195 /** */ 28196 28197 /** */ 28198 28199 /** */ 28200 28201 /** Format typed value to string */ 28202 28203 /** Parse string to get typed value */ 28204 28205 constructor(opts) { 28206 super({ 28207 ...MaskedNumber.DEFAULTS, 28208 ...opts 28209 }); 28210 } 28211 updateOptions(opts) { 28212 super.updateOptions(opts); 28213 } 28214 _update(opts) { 28215 super._update(opts); 28216 this._updateRegExps(); 28217 } 28218 _updateRegExps() { 28219 const start = '^' + (this.allowNegative ? '[+|\\-]?' : ''); 28220 const mid = '\\d*'; 28221 const end = (this.scale ? "(" + escapeRegExp(this.radix) + "\\d{0," + this.scale + "})?" : '') + '$'; 28222 this._numberRegExp = new RegExp(start + mid + end); 28223 this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(escapeRegExp).join('') + "]", 'g'); 28224 this._thousandsSeparatorRegExp = new RegExp(escapeRegExp(this.thousandsSeparator), 'g'); 28225 } 28226 _removeThousandsSeparators(value) { 28227 return value.replace(this._thousandsSeparatorRegExp, ''); 28228 } 28229 _insertThousandsSeparators(value) { 28230 // https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript 28231 const parts = value.split(this.radix); 28232 parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandsSeparator); 28233 return parts.join(this.radix); 28234 } 28235 doPrepareChar(ch, flags) { 28236 if (flags === void 0) { 28237 flags = {}; 28238 } 28239 const [prepCh, details] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && ( 28240 /* 28241 radix should be mapped when 28242 1) input is done from keyboard = flags.input && flags.raw 28243 2) unmasked value is set = !flags.input && !flags.raw 28244 and should not be mapped when 28245 1) value is set = flags.input && !flags.raw 28246 2) raw value is set = !flags.input && flags.raw 28247 */ 28248 flags.input && flags.raw || !flags.input && !flags.raw) ? ch.replace(this._mapToRadixRegExp, this.radix) : ch), flags); 28249 if (ch && !prepCh) details.skip = true; 28250 if (prepCh && !this.allowPositive && !this.value && prepCh !== '-') details.aggregate(this._appendChar('-')); 28251 return [prepCh, details]; 28252 } 28253 _separatorsCount(to, extendOnSeparators) { 28254 if (extendOnSeparators === void 0) { 28255 extendOnSeparators = false; 28256 } 28257 let count = 0; 28258 for (let pos = 0; pos < to; ++pos) { 28259 if (this._value.indexOf(this.thousandsSeparator, pos) === pos) { 28260 ++count; 28261 if (extendOnSeparators) to += this.thousandsSeparator.length; 28262 } 28263 } 28264 return count; 28265 } 28266 _separatorsCountFromSlice(slice) { 28267 if (slice === void 0) { 28268 slice = this._value; 28269 } 28270 return this._separatorsCount(this._removeThousandsSeparators(slice).length, true); 28271 } 28272 extractInput(fromPos, toPos, flags) { 28273 if (fromPos === void 0) { 28274 fromPos = 0; 28275 } 28276 if (toPos === void 0) { 28277 toPos = this.displayValue.length; 28278 } 28279 [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos); 28280 return this._removeThousandsSeparators(super.extractInput(fromPos, toPos, flags)); 28281 } 28282 _appendCharRaw(ch, flags) { 28283 if (flags === void 0) { 28284 flags = {}; 28285 } 28286 const prevBeforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value; 28287 const prevBeforeTailSeparatorsCount = this._separatorsCountFromSlice(prevBeforeTailValue); 28288 this._value = this._removeThousandsSeparators(this.value); 28289 const oldValue = this._value; 28290 this._value += ch; 28291 const num = this.number; 28292 let accepted = !isNaN(num); 28293 let skip = false; 28294 if (accepted) { 28295 let fixedNum; 28296 if (this.min != null && this.min < 0 && this.number < this.min) fixedNum = this.min; 28297 if (this.max != null && this.max > 0 && this.number > this.max) fixedNum = this.max; 28298 if (fixedNum != null) { 28299 if (this.autofix) { 28300 this._value = this.format(fixedNum, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix); 28301 skip || (skip = oldValue === this._value && !flags.tail); // if not changed on tail it's still ok to proceed 28302 } else { 28303 accepted = false; 28304 } 28305 } 28306 accepted && (accepted = Boolean(this._value.match(this._numberRegExp))); 28307 } 28308 let appendDetails; 28309 if (!accepted) { 28310 this._value = oldValue; 28311 appendDetails = new ChangeDetails(); 28312 } else { 28313 appendDetails = new ChangeDetails({ 28314 inserted: this._value.slice(oldValue.length), 28315 rawInserted: skip ? '' : ch, 28316 skip 28317 }); 28318 } 28319 this._value = this._insertThousandsSeparators(this._value); 28320 const beforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value; 28321 const beforeTailSeparatorsCount = this._separatorsCountFromSlice(beforeTailValue); 28322 appendDetails.tailShift += (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length; 28323 return appendDetails; 28324 } 28325 _findSeparatorAround(pos) { 28326 if (this.thousandsSeparator) { 28327 const searchFrom = pos - this.thousandsSeparator.length + 1; 28328 const separatorPos = this.value.indexOf(this.thousandsSeparator, searchFrom); 28329 if (separatorPos <= pos) return separatorPos; 28330 } 28331 return -1; 28332 } 28333 _adjustRangeWithSeparators(from, to) { 28334 const separatorAroundFromPos = this._findSeparatorAround(from); 28335 if (separatorAroundFromPos >= 0) from = separatorAroundFromPos; 28336 const separatorAroundToPos = this._findSeparatorAround(to); 28337 if (separatorAroundToPos >= 0) to = separatorAroundToPos + this.thousandsSeparator.length; 28338 return [from, to]; 28339 } 28340 remove(fromPos, toPos) { 28341 if (fromPos === void 0) { 28342 fromPos = 0; 28343 } 28344 if (toPos === void 0) { 28345 toPos = this.displayValue.length; 28346 } 28347 [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos); 28348 const valueBeforePos = this.value.slice(0, fromPos); 28349 const valueAfterPos = this.value.slice(toPos); 28350 const prevBeforeTailSeparatorsCount = this._separatorsCount(valueBeforePos.length); 28351 this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(valueBeforePos + valueAfterPos)); 28352 const beforeTailSeparatorsCount = this._separatorsCountFromSlice(valueBeforePos); 28353 return new ChangeDetails({ 28354 tailShift: (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length 28355 }); 28356 } 28357 nearestInputPos(cursorPos, direction) { 28358 if (!this.thousandsSeparator) return cursorPos; 28359 switch (direction) { 28360 case DIRECTION.NONE: 28361 case DIRECTION.LEFT: 28362 case DIRECTION.FORCE_LEFT: 28363 { 28364 const separatorAtLeftPos = this._findSeparatorAround(cursorPos - 1); 28365 if (separatorAtLeftPos >= 0) { 28366 const separatorAtLeftEndPos = separatorAtLeftPos + this.thousandsSeparator.length; 28367 if (cursorPos < separatorAtLeftEndPos || this.value.length <= separatorAtLeftEndPos || direction === DIRECTION.FORCE_LEFT) { 28368 return separatorAtLeftPos; 28369 } 28370 } 28371 break; 28372 } 28373 case DIRECTION.RIGHT: 28374 case DIRECTION.FORCE_RIGHT: 28375 { 28376 const separatorAtRightPos = this._findSeparatorAround(cursorPos); 28377 if (separatorAtRightPos >= 0) { 28378 return separatorAtRightPos + this.thousandsSeparator.length; 28379 } 28380 } 28381 } 28382 return cursorPos; 28383 } 28384 doCommit() { 28385 if (this.value) { 28386 const number = this.number; 28387 let validnum = number; 28388 28389 // check bounds 28390 if (this.min != null) validnum = Math.max(validnum, this.min); 28391 if (this.max != null) validnum = Math.min(validnum, this.max); 28392 if (validnum !== number) this.unmaskedValue = this.format(validnum, this); 28393 let formatted = this.value; 28394 if (this.normalizeZeros) formatted = this._normalizeZeros(formatted); 28395 if (this.padFractionalZeros && this.scale > 0) formatted = this._padFractionalZeros(formatted); 28396 this._value = formatted; 28397 } 28398 super.doCommit(); 28399 } 28400 _normalizeZeros(value) { 28401 const parts = this._removeThousandsSeparators(value).split(this.radix); 28402 28403 // remove leading zeros 28404 parts[0] = parts[0].replace(/^(\D*)(0*)(\d*)/, (match, sign, zeros, num) => sign + num); 28405 // add leading zero 28406 if (value.length && !/\d$/.test(parts[0])) parts[0] = parts[0] + '0'; 28407 if (parts.length > 1) { 28408 parts[1] = parts[1].replace(/0*$/, ''); // remove trailing zeros 28409 if (!parts[1].length) parts.length = 1; // remove fractional 28410 } 28411 return this._insertThousandsSeparators(parts.join(this.radix)); 28412 } 28413 _padFractionalZeros(value) { 28414 if (!value) return value; 28415 const parts = value.split(this.radix); 28416 if (parts.length < 2) parts.push(''); 28417 parts[1] = parts[1].padEnd(this.scale, '0'); 28418 return parts.join(this.radix); 28419 } 28420 doSkipInvalid(ch, flags, checkTail) { 28421 if (flags === void 0) { 28422 flags = {}; 28423 } 28424 const dropFractional = this.scale === 0 && ch !== this.thousandsSeparator && (ch === this.radix || ch === MaskedNumber.UNMASKED_RADIX || this.mapToRadix.includes(ch)); 28425 return super.doSkipInvalid(ch, flags, checkTail) && !dropFractional; 28426 } 28427 get unmaskedValue() { 28428 return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, MaskedNumber.UNMASKED_RADIX); 28429 } 28430 set unmaskedValue(unmaskedValue) { 28431 super.unmaskedValue = unmaskedValue; 28432 } 28433 get typedValue() { 28434 return this.parse(this.unmaskedValue, this); 28435 } 28436 set typedValue(n) { 28437 this.rawInputValue = this.format(n, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix); 28438 } 28439 28440 /** Parsed Number */ 28441 get number() { 28442 return this.typedValue; 28443 } 28444 set number(number) { 28445 this.typedValue = number; 28446 } 28447 get allowNegative() { 28448 return this.min != null && this.min < 0 || this.max != null && this.max < 0; 28449 } 28450 get allowPositive() { 28451 return this.min != null && this.min > 0 || this.max != null && this.max > 0; 28452 } 28453 typedValueEquals(value) { 28454 // handle 0 -> '' case (typed = 0 even if value = '') 28455 // for details see https://github.com/uNmAnNeR/imaskjs/issues/134 28456 return (super.typedValueEquals(value) || MaskedNumber.EMPTY_VALUES.includes(value) && MaskedNumber.EMPTY_VALUES.includes(this.typedValue)) && !(value === 0 && this.value === ''); 28457 } 28458 } 28459 _MaskedNumber = MaskedNumber; 28460 MaskedNumber.UNMASKED_RADIX = '.'; 28461 MaskedNumber.EMPTY_VALUES = [...Masked.EMPTY_VALUES, 0]; 28462 MaskedNumber.DEFAULTS = { 28463 ...Masked.DEFAULTS, 28464 mask: Number, 28465 radix: ',', 28466 thousandsSeparator: '', 28467 mapToRadix: [_MaskedNumber.UNMASKED_RADIX], 28468 min: Number.MIN_SAFE_INTEGER, 28469 max: Number.MAX_SAFE_INTEGER, 28470 scale: 2, 28471 normalizeZeros: true, 28472 padFractionalZeros: false, 28473 parse: Number, 28474 format: n => n.toLocaleString('en-US', { 28475 useGrouping: false, 28476 maximumFractionDigits: 20 28477 }) 28478 }; 28479 IMask.MaskedNumber = MaskedNumber; 28480 28481 /** Mask pipe source and destination types */ 28482 const PIPE_TYPE = { 28483 MASKED: 'value', 28484 UNMASKED: 'unmaskedValue', 28485 TYPED: 'typedValue' 28486 }; 28487 /** Creates new pipe function depending on mask type, source and destination options */ 28488 function createPipe(arg, from, to) { 28489 if (from === void 0) { 28490 from = PIPE_TYPE.MASKED; 28491 } 28492 if (to === void 0) { 28493 to = PIPE_TYPE.MASKED; 28494 } 28495 const masked = createMask(arg); 28496 return value => masked.runIsolated(m => { 28497 m[from] = value; 28498 return m[to]; 28499 }); 28500 } 28501 28502 /** Pipes value through mask depending on mask type, source and destination options */ 28503 function pipe(value, mask, from, to) { 28504 return createPipe(mask, from, to)(value); 28505 } 28506 IMask.PIPE_TYPE = PIPE_TYPE; 28507 IMask.createPipe = createPipe; 28508 IMask.pipe = pipe; 28509 28510 /** Pattern mask */ 28511 class RepeatBlock extends MaskedPattern { 28512 get repeatFrom() { 28513 var _ref; 28514 return (_ref = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === Infinity ? 0 : this.repeat) != null ? _ref : 0; 28515 } 28516 get repeatTo() { 28517 var _ref2; 28518 return (_ref2 = Array.isArray(this.repeat) ? this.repeat[1] : this.repeat) != null ? _ref2 : Infinity; 28519 } 28520 constructor(opts) { 28521 super(opts); 28522 } 28523 updateOptions(opts) { 28524 super.updateOptions(opts); 28525 } 28526 _update(opts) { 28527 var _ref3, _ref4, _this$_blocks; 28528 const { 28529 repeat, 28530 ...blockOpts 28531 } = normalizeOpts(opts); // TODO type 28532 this._blockOpts = Object.assign({}, this._blockOpts, blockOpts); 28533 const block = createMask(this._blockOpts); 28534 this.repeat = (_ref3 = (_ref4 = repeat != null ? repeat : block.repeat) != null ? _ref4 : this.repeat) != null ? _ref3 : Infinity; // TODO type 28535 28536 super._update({ 28537 mask: 'm'.repeat(Math.max(this.repeatTo === Infinity && ((_this$_blocks = this._blocks) == null ? void 0 : _this$_blocks.length) || 0, this.repeatFrom)), 28538 blocks: { 28539 m: block 28540 }, 28541 eager: block.eager, 28542 overwrite: block.overwrite, 28543 skipInvalid: block.skipInvalid, 28544 lazy: block.lazy, 28545 placeholderChar: block.placeholderChar, 28546 displayChar: block.displayChar 28547 }); 28548 } 28549 _allocateBlock(bi) { 28550 if (bi < this._blocks.length) return this._blocks[bi]; 28551 if (this.repeatTo === Infinity || this._blocks.length < this.repeatTo) { 28552 this._blocks.push(createMask(this._blockOpts)); 28553 this.mask += 'm'; 28554 return this._blocks[this._blocks.length - 1]; 28555 } 28556 } 28557 _appendCharRaw(ch, flags) { 28558 if (flags === void 0) { 28559 flags = {}; 28560 } 28561 const details = new ChangeDetails(); 28562 for (let bi = (_this$_mapPosToBlock$ = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index) != null ? _this$_mapPosToBlock$ : Math.max(this._blocks.length - 1, 0), block, allocated; 28563 // try to get a block or 28564 // try to allocate a new block if not allocated already 28565 block = (_this$_blocks$bi = this._blocks[bi]) != null ? _this$_blocks$bi : allocated = !allocated && this._allocateBlock(bi); ++bi) { 28566 var _this$_mapPosToBlock$, _this$_mapPosToBlock, _this$_blocks$bi, _flags$_beforeTailSta; 28567 const blockDetails = block._appendChar(ch, { 28568 ...flags, 28569 _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi] 28570 }); 28571 if (blockDetails.skip && allocated) { 28572 // remove the last allocated block and break 28573 this._blocks.pop(); 28574 this.mask = this.mask.slice(1); 28575 break; 28576 } 28577 details.aggregate(blockDetails); 28578 if (blockDetails.consumed) break; // go next char 28579 } 28580 return details; 28581 } 28582 _trimEmptyTail(fromPos, toPos) { 28583 var _this$_mapPosToBlock2, _this$_mapPosToBlock3; 28584 if (fromPos === void 0) { 28585 fromPos = 0; 28586 } 28587 const firstBlockIndex = Math.max(((_this$_mapPosToBlock2 = this._mapPosToBlock(fromPos)) == null ? void 0 : _this$_mapPosToBlock2.index) || 0, this.repeatFrom, 0); 28588 let lastBlockIndex; 28589 if (toPos != null) lastBlockIndex = (_this$_mapPosToBlock3 = this._mapPosToBlock(toPos)) == null ? void 0 : _this$_mapPosToBlock3.index; 28590 if (lastBlockIndex == null) lastBlockIndex = this._blocks.length - 1; 28591 let removeCount = 0; 28592 for (let blockIndex = lastBlockIndex; firstBlockIndex <= blockIndex; --blockIndex, ++removeCount) { 28593 if (this._blocks[blockIndex].unmaskedValue) break; 28594 } 28595 if (removeCount) { 28596 this._blocks.splice(lastBlockIndex - removeCount + 1, removeCount); 28597 this.mask = this.mask.slice(removeCount); 28598 } 28599 } 28600 reset() { 28601 super.reset(); 28602 this._trimEmptyTail(); 28603 } 28604 remove(fromPos, toPos) { 28605 if (fromPos === void 0) { 28606 fromPos = 0; 28607 } 28608 if (toPos === void 0) { 28609 toPos = this.displayValue.length; 28610 } 28611 const removeDetails = super.remove(fromPos, toPos); 28612 this._trimEmptyTail(fromPos, toPos); 28613 return removeDetails; 28614 } 28615 totalInputPositions(fromPos, toPos) { 28616 if (fromPos === void 0) { 28617 fromPos = 0; 28618 } 28619 if (toPos == null && this.repeatTo === Infinity) return Infinity; 28620 return super.totalInputPositions(fromPos, toPos); 28621 } 28622 get state() { 28623 return super.state; 28624 } 28625 set state(state) { 28626 this._blocks.length = state._blocks.length; 28627 this.mask = this.mask.slice(0, this._blocks.length); 28628 super.state = state; 28629 } 28630 } 28631 IMask.RepeatBlock = RepeatBlock; 28632 28633 try { 28634 globalThis.IMask = IMask; 28635 } catch {} 28636 28637 exports.ChangeDetails = ChangeDetails; 28638 exports.ChunksTailDetails = ChunksTailDetails; 28639 exports.DIRECTION = DIRECTION; 28640 exports.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement; 28641 exports.HTMLInputMaskElement = HTMLInputMaskElement; 28642 exports.HTMLMaskElement = HTMLMaskElement; 28643 exports.InputMask = InputMask; 28644 exports.MaskElement = MaskElement; 28645 exports.Masked = Masked; 28646 exports.MaskedDate = MaskedDate; 28647 exports.MaskedDynamic = MaskedDynamic; 28648 exports.MaskedEnum = MaskedEnum; 28649 exports.MaskedFunction = MaskedFunction; 28650 exports.MaskedNumber = MaskedNumber; 28651 exports.MaskedPattern = MaskedPattern; 28652 exports.MaskedRange = MaskedRange; 28653 exports.MaskedRegExp = MaskedRegExp; 28654 exports.PIPE_TYPE = PIPE_TYPE; 28655 exports.PatternFixedDefinition = PatternFixedDefinition; 28656 exports.PatternInputDefinition = PatternInputDefinition; 28657 exports.RepeatBlock = RepeatBlock; 28658 exports.createMask = createMask; 28659 exports.createPipe = createPipe; 28660 exports.default = IMask; 28661 exports.forceDirection = forceDirection; 28662 exports.normalizeOpts = normalizeOpts; 28663 exports.pipe = pipe; 28664 28665 Object.defineProperty(exports, '__esModule', { value: true }); 28666 28667})); 28668//# sourceMappingURL=imask.js.map
28669 28670(function (global, factory) { 28671 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : 28672 typeof define === 'function' && define.amd ? define(['jquery'], factory) : 28673 (factory(global.jQuery)); 28674}(this, (function ($) { 'use strict'; 28675 28676$ = $ && $.hasOwnProperty('default') ? $['default'] : $; 28677 28678/** 28679 * @author Mudit Ameta 28680 * @license https://github.com/zeusdeux/isInViewport/blob/master/license.md MIT 28681 */ 28682 28683// expose isInViewport as a custom pseudo-selector 28684$.extend($.expr.pseudos || $.expr[':'], { 28685 // if $.expr.createPseudo is available, use it 28686 'in-viewport': $.expr.createPseudo 28687 ? $.expr.createPseudo(function (argsString) { return function (currElement) { return isInViewport(currElement, getSelectorArgs(argsString)); }; }) 28688 : function (currObj, index, meta) { return isInViewport(currObj, getSelectorArgs(meta[3])); } 28689}); 28690 28691 28692// expose isInViewport as a function too 28693// this lets folks pass around actual objects as options (like custom viewport) 28694// and doesn't tie 'em down to strings. It also prevents isInViewport from 28695// having to look up and wrap the dom element corresponding to the viewport selector 28696$.fn.isInViewport = function(options) { 28697 return this.filter(function (i, el) { return isInViewport(el, options); }) 28698}; 28699 28700$.fn.run = run; 28701 28702// lets you chain any arbitrary function or an array of functions and returns a jquery object 28703function run(args) { 28704 var this$1 = this; 28705 28706 if (arguments.length === 1 && typeof args === 'function') { 28707 args = [args]; 28708 } 28709 28710 if (!(args instanceof Array)) { 28711 throw new SyntaxError('isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions') 28712 } 28713 28714 args.forEach(function (arg) { 28715 if (typeof arg !== 'function') { 28716 console.warn('isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions'); 28717 console.warn('isInViewport: Ignoring non-function values in array and moving on'); 28718 } else { 28719 [].slice.call(this$1).forEach(function (t) { return arg.call($(t)); }); 28720 } 28721 }); 28722 28723 return this 28724} 28725 28726 28727// gets the width of the scrollbar 28728function getScrollbarWidth(viewport) { 28729 // append a div that has 100% width to get true width of viewport 28730 var el = $('<div></div>').css({ 28731 width: '100%' 28732 }); 28733 viewport.append(el); 28734 28735 // subtract true width from the viewport width which is inclusive 28736 // of scrollbar by default 28737 var scrollBarWidth = viewport.width() - el.width(); 28738 28739 // remove our element from DOM 28740 el.remove(); 28741 return scrollBarWidth 28742} 28743 28744 28745// Returns true if DOM element `element` is in viewport 28746function isInViewport(element, options) { 28747 var ref = element.getBoundingClientRect(); 28748 var top = ref.top; 28749 var bottom = ref.bottom; 28750 var left = ref.left; 28751 var right = ref.right; 28752 28753 var settings = $.extend({ 28754 tolerance: 0, 28755 viewport: window 28756 }, options); 28757 var isVisibleFlag = false; 28758 var $viewport = settings.viewport.jquery ? settings.viewport : $(settings.viewport); 28759 28760 if (!$viewport.length) { 28761 console.warn('isInViewport: The viewport selector you have provided matches no element on page.'); 28762 console.warn('isInViewport: Defaulting to viewport as window'); 28763 $viewport = $(window); 28764 } 28765 28766 var $viewportHeight = $viewport.height(); 28767 var $viewportWidth = $viewport.width(); 28768 var typeofViewport = $viewport[0].toString(); 28769 28770 // if the viewport is other than window recalculate the top, 28771 // bottom,left and right wrt the new viewport 28772 // the [object DOMWindow] check is for window object type in PhantomJS 28773 if ($viewport[0] !== window && typeofViewport !== '[object Window]' && typeofViewport !== '[object DOMWindow]') { 28774 // use getBoundingClientRect() instead of $.Offset() 28775 // since the original top/bottom positions are calculated relative to browser viewport and not document 28776 var viewportRect = $viewport[0].getBoundingClientRect(); 28777 28778 // recalculate these relative to viewport 28779 top = top - viewportRect.top; 28780 bottom = bottom - viewportRect.top; 28781 left = left - viewportRect.left; 28782 right = right - viewportRect.left; 28783 28784 // get the scrollbar width from cache or calculate it 28785 isInViewport.scrollBarWidth = isInViewport.scrollBarWidth || getScrollbarWidth($viewport); 28786 28787 // remove the width of the scrollbar from the viewport width 28788 $viewportWidth -= isInViewport.scrollBarWidth; 28789 } 28790 28791 // handle falsy, non-number and non-integer tolerance value 28792 // same as checking using isNaN and then setting to 0 28793 // bitwise operators deserve some love too you know 28794 settings.tolerance = ~~Math.round(parseFloat(settings.tolerance)); 28795 28796 if (settings.tolerance < 0) {
28797 settings.tolerance = $viewportHeight + settings.tolerance; // viewport height - tol 28798 } 28799 28800 // the element is NOT in viewport iff it is completely out of 28801 // viewport laterally or if it is completely out of the tolerance 28802 // region. Therefore, if it is partially in view then it is considered 28803 // to be in the viewport and hence true is returned. Because we have adjusted 28804 // the left/right positions relative to the viewport, we should check the 28805 // element's right against the viewport's 0 (left side), and the element's 28806 // left against the viewport's width to see if it is outside of the viewport. 28807 28808 if (right <= 0 || left >= $viewportWidth) { 28809 return isVisibleFlag 28810 } 28811 28812 // if the element is bound to some tolerance 28813 isVisibleFlag = settings.tolerance ? top <= settings.tolerance && bottom >= settings.tolerance : bottom > 0 && top <= $viewportHeight; 28814 28815 return isVisibleFlag 28816} 28817 28818 28819// get the selector args from the args string proved by Sizzle 28820function getSelectorArgs(argsString) { 28821 if (argsString) { 28822 var args = argsString.split(','); 28823 28824 // when user only gives viewport and no tolerance 28825 if (args.length === 1 && isNaN(args[0])) { 28826 args[1] = args[0]; 28827 args[0] = void 0; 28828 } 28829 28830 return { 28831 tolerance: args[0] ? args[0].trim() : void 0, 28832 viewport: args[1] ? $(args[1].trim()) : void 0 28833 } 28834 } 28835 return {} 28836} 28837 28838}))); 28839 28840//# sourceMappingURL=isInViewport.js.map 28841 28842(function (factory) { 28843 if (typeof define === 'function' && define.amd) { 28844 // AMD 28845 define(['jquery'], factory); 28846 } else if (typeof exports === 'object') { 28847 // CommonJS 28848 factory(require('jquery')); 28849 } else { 28850 // Browser globals 28851 factory(jQuery); 28852 } 28853}(function ($) { 28854 var CountTo = function (element, options) { 28855 this.$element = $(element); 28856 this.options = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options); 28857 this.init(); 28858 }; 28859 28860 CountTo.DEFAULTS = { 28861 from: 0, // the number the element should start at 28862 to: 0, // the number the element should end at 28863 speed: 1000, // how long it should take to count between the target numbers 28864 refreshInterval: 100, // how often the element should be updated
vendor: 2,942 bytes, lines 28865-28971
28865 decimals: 0, // the number of decimal places to show 28866 formatter: formatter, // handler for formatting the value before rendering 28867 onUpdate: null, // callback method for every time the element is updated 28868 onComplete: null // callback method for when the element finishes updating 28869 }; 28870 28871 CountTo.prototype.init = function () { 28872 this.value = this.options.from; 28873 this.loops = Math.ceil(this.options.speed / this.options.refreshInterval); 28874 this.loopCount = 0; 28875 this.increment = (this.options.to - this.options.from) / this.loops; 28876 }; 28877 28878 CountTo.prototype.dataOptions = function () { 28879 var options = { 28880 from: this.$element.data('from'), 28881 to: this.$element.data('to'), 28882 speed: this.$element.data('speed'), 28883 refreshInterval: this.$element.data('refresh-interval'), 28884 decimals: this.$element.data('decimals') 28885 }; 28886 28887 var keys = Object.keys(options); 28888 28889 for (var i in keys) { 28890 var key = keys[i]; 28891 28892 if (typeof(options[key]) === 'undefined') { 28893 delete options[key]; 28894 } 28895 } 28896 28897 return options; 28898 }; 28899 28900 CountTo.prototype.update = function () { 28901 this.value += this.increment; 28902 this.loopCount++; 28903 28904 this.render(); 28905 28906 if (typeof(this.options.onUpdate) == 'function') { 28907 this.options.onUpdate.call(this.$element, this.value); 28908 } 28909 28910 if (this.loopCount >= this.loops) { 28911 clearInterval(this.interval); 28912 this.value = this.options.to; 28913 28914 if (typeof(this.options.onComplete) == 'function') { 28915 this.options.onComplete.call(this.$element, this.value); 28916 } 28917 } 28918 }; 28919 28920 CountTo.prototype.render = function () { 28921 var formattedValue = this.options.formatter.call(this.$element, this.value, this.options); 28922 this.$element.text(formattedValue); 28923 }; 28924 28925 CountTo.prototype.restart = function () { 28926 this.stop(); 28927 this.init(); 28928 this.start(); 28929 }; 28930 28931 CountTo.prototype.start = function () { 28932 this.stop(); 28933 this.render(); 28934 this.interval = setInterval(this.update.bind(this), this.options.refreshInterval); 28935 }; 28936 28937 CountTo.prototype.stop = function () { 28938 if (this.interval) { 28939 clearInterval(this.interval); 28940 } 28941 }; 28942 28943 CountTo.prototype.toggle = function () { 28944 if (this.interval) { 28945 this.stop(); 28946 } else { 28947 this.start(); 28948 } 28949 }; 28950 28951 function formatter(value, options) { 28952 return value.toFixed(options.decimals); 28953 } 28954 28955 $.fn.countTo = function (option) { 28956 return this.each(function () { 28957 var $this = $(this); 28958 var data = $this.data('countTo'); 28959 var init = !data || typeof(option) === 'object'; 28960 var options = typeof(option) === 'object' ? option : {}; 28961 var method = typeof(option) === 'string' ? option : 'start'; 28962 28963 if (init) { 28964 if (data) data.stop(); 28965 $this.data('countTo', data = new CountTo(this, options)); 28966 } 28967 28968 data[method].call(data); 28969 }); 28970 }; 28971}));
vendor: 10,006 bytes, lines 28972-29217
28972/*! 28973 * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/) 28974 * Copyright (c) 2016 Edson Hilios 28975 * 28976 * Permission is hereby granted, free of charge, to any person obtaining a copy of 28977 * this software and associated documentation files (the "Software"), to deal in 28978 * the Software without restriction, including without limitation the rights to 28979 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 28980 * the Software, and to permit persons to whom the Software is furnished to do so, 28981 * subject to the following conditions: 28982 * 28983 * The above copyright notice and this permission notice shall be included in all 28984 * copies or substantial portions of the Software. 28985 * 28986 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28987 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 28988 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 28989 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 28990 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 28991 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28992 */ 28993(function(factory) { 28994 "use strict"; 28995 if (typeof define === "function" && define.amd) { 28996 define([ "jquery" ], factory); 28997 } else { 28998 factory(jQuery); 28999 } 29000})(function($) { 29001 "use strict"; 29002 var instances = [], matchers = [], defaultOptions = { 29003 precision: 100, 29004 elapse: false, 29005 defer: false 29006 }; 29007 matchers.push(/^[0-9]*$/.source); 29008 matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source); 29009 matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source); 29010 matchers = new RegExp(matchers.join("|")); 29011 function parseDateString(dateString) { 29012 if (dateString instanceof Date) { 29013 return dateString; 29014 } 29015 if (String(dateString).match(matchers)) { 29016 if (String(dateString).match(/^[0-9]*$/)) { 29017 dateString = Number(dateString); 29018 } 29019 if (String(dateString).match(/\-/)) { 29020 dateString = String(dateString).replace(/\-/g, "/"); 29021 } 29022 return new Date(dateString); 29023 } else { 29024 throw new Error("Couldn't cast `" + dateString + "` to a date object."); 29025 } 29026 } 29027 var DIRECTIVE_KEY_MAP = { 29028 Y: "years", 29029 m: "months", 29030 n: "daysToMonth", 29031 d: "daysToWeek", 29032 w: "weeks", 29033 W: "weeksToMonth", 29034 H: "hours", 29035 M: "minutes", 29036 S: "seconds", 29037 D: "totalDays", 29038 I: "totalHours", 29039 N: "totalMinutes", 29040 T: "totalSeconds" 29041 }; 29042 function escapedRegExp(str) { 29043 var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); 29044 return new RegExp(sanitize); 29045 } 29046 function strftime(offsetObject) { 29047 return function(format) { 29048 var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi); 29049 if (directives) { 29050 for (var i = 0, len = directives.length; i < len; ++i) { 29051 var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || "", plural = directive[3] || "", value = null; 29052 directive = directive[2]; 29053 if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) { 29054 value = DIRECTIVE_KEY_MAP[directive]; 29055 value = Number(offsetObject[value]); 29056 } 29057 if (value !== null) { 29058 if (modifier === "!") { 29059 value = pluralize(plural, value); 29060 } 29061 if (modifier === "") { 29062 if (value < 10) { 29063 value = "0" + value.toString(); 29064 } 29065 } 29066 format = format.replace(regexp, value.toString()); 29067 } 29068 } 29069 } 29070 format = format.replace(/%%/, "%"); 29071 return format; 29072 }; 29073 } 29074 function pluralize(format, count) { 29075 var plural = "s", singular = ""; 29076 if (format) { 29077 format = format.replace(/(:|;|\s)/gi, "").split(/\,/); 29078 if (format.length === 1) { 29079 plural = format[0]; 29080 } else { 29081 singular = format[0]; 29082 plural = format[1]; 29083 } 29084 } 29085 if (Math.abs(count) > 1) { 29086 return plural; 29087 } else { 29088 return singular; 29089 } 29090 } 29091 var Countdown = function(el, finalDate, options) { 29092 this.el = el; 29093 this.$el = $(el); 29094 this.interval = null; 29095 this.offset = {}; 29096 this.options = $.extend({}, defaultOptions); 29097 this.instanceNumber = instances.length; 29098 instances.push(this); 29099 this.$el.data("countdown-instance", this.instanceNumber); 29100 if (options) { 29101 if (typeof options === "function") { 29102 this.$el.on("update.countdown", options); 29103 this.$el.on("stoped.countdown", options); 29104 this.$el.on("finish.countdown", options); 29105 } else { 29106 this.options = $.extend({}, defaultOptions, options); 29107 } 29108 } 29109 this.setFinalDate(finalDate); 29110 if (this.options.defer === false) { 29111 this.start(); 29112 } 29113 }; 29114 $.extend(Countdown.prototype, { 29115 start: function() { 29116 if (this.interval !== null) { 29117 clearInterval(this.interval); 29118 } 29119 var self = this; 29120 this.update(); 29121 this.interval = setInterval(function() { 29122 self.update.call(self); 29123 }, this.options.precision); 29124 }, 29125 stop: function() { 29126 clearInterval(this.interval); 29127 this.interval = null; 29128 this.dispatchEvent("stoped"); 29129 }, 29130 toggle: function() { 29131 if (this.interval) { 29132 this.stop(); 29133 } else { 29134 this.start(); 29135 } 29136 }, 29137 pause: function() { 29138 this.stop(); 29139 }, 29140 resume: function() { 29141 this.start(); 29142 }, 29143 remove: function() { 29144 this.stop.call(this); 29145 instances[this.instanceNumber] = null; 29146 delete this.$el.data().countdownInstance; 29147 }, 29148 setFinalDate: function(value) { 29149 this.finalDate = parseDateString(value); 29150 }, 29151 update: function() { 29152 if (this.$el.closest("html").length === 0) { 29153 this.remove(); 29154 return; 29155 } 29156 var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(), newTotalSecsLeft; 29157 newTotalSecsLeft = this.finalDate.getTime() - now.getTime(); 29158 newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3); 29159 newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft); 29160 if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) { 29161 return; 29162 } else { 29163 this.totalSecsLeft = newTotalSecsLeft; 29164 } 29165 this.elapsed = now >= this.finalDate; 29166 this.offset = { 29167 seconds: this.totalSecsLeft % 60, 29168 minutes: Math.floor(this.totalSecsLeft / 60) % 60, 29169 hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24, 29170 days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, 29171 daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, 29172 daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368), 29173 weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7), 29174 weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4, 29175 months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368), 29176 years: Math.abs(this.finalDate.getFullYear() - now.getFullYear()), 29177 totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24), 29178 totalHours: Math.floor(this.totalSecsLeft / 60 / 60), 29179 totalMinutes: Math.floor(this.totalSecsLeft / 60), 29180 totalSeconds: this.totalSecsLeft 29181 }; 29182 if (!this.options.elapse && this.totalSecsLeft === 0) { 29183 this.stop(); 29184 this.dispatchEvent("finish"); 29185 } else { 29186 this.dispatchEvent("update"); 29187 } 29188 }, 29189 dispatchEvent: function(eventName) { 29190 var event = $.Event(eventName + ".countdown"); 29191 event.finalDate = this.finalDate; 29192 event.elapsed = this.elapsed; 29193 event.offset = $.extend({}, this.offset); 29194 event.strftime = strftime(this.offset); 29195 this.$el.trigger(event); 29196 } 29197 }); 29198 $.fn.countdown = function() { 29199 var argumentsArray = Array.prototype.slice.call(arguments, 0); 29200 return this.each(function() { 29201 var instanceNumber = $(this).data("countdown-instance"); 29202 if (instanceNumber !== undefined) { 29203 var instance = instances[instanceNumber], method = argumentsArray[0]; 29204 if (Countdown.prototype.hasOwnProperty(method)) { 29205 instance[method].apply(instance, argumentsArray.slice(1)); 29206 } else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) { 29207 instance.setFinalDate.call(instance, method); 29208 instance.start(); 29209 } else { 29210 $.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method)); 29211 } 29212 } else { 29213 new Countdown(this, argumentsArray[0], argumentsArray[1]); 29214 } 29215 }); 29216 }; 29217});
29217 29218/* 29219 * jQuery Easing v1.4.1 - http://gsgd.co.uk/sandbox/jquery/easing/ 29220 * Open source under the BSD License. 29221 * Copyright © 2008 George McGinley Smith 29222 * All rights reserved. 29223 * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE 29224*/ 29225 29226(function (factory) { 29227 if (typeof define === "function" && define.amd) { 29228 define(['jquery'], function ($) { 29229 return factory($); 29230 }); 29231 } else if (typeof module === "object" && typeof module.exports === "object") { 29232 exports = factory(require('jquery')); 29233 } else { 29234 factory(jQuery); 29235 } 29236})(function($){ 29237 29238// Preserve the original jQuery "swing" easing as "jswing" 29239 if (typeof $.easing !== 'undefined') { 29240 $.easing['jswing'] = $.easing['swing']; 29241 } 29242 29243 var pow = Math.pow, 29244 sqrt = Math.sqrt, 29245 sin = Math.sin, 29246 cos = Math.cos, 29247 PI = Math.PI, 29248 c1 = 1.70158, 29249 c2 = c1 * 1.525, 29250 c3 = c1 + 1, 29251 c4 = ( 2 * PI ) / 3, 29252 c5 = ( 2 * PI ) / 4.5; 29253 29254// x is the fraction of animation progress, in the range 0..1 29255 function bounceOut(x) { 29256 var n1 = 7.5625, 29257 d1 = 2.75; 29258 if ( x < 1/d1 ) { 29259 return n1*x*x; 29260 } else if ( x < 2/d1 ) { 29261 return n1*(x-=(1.5/d1))*x + .75; 29262 } else if ( x < 2.5/d1 ) { 29263 return n1*(x-=(2.25/d1))*x + .9375; 29264 } else { 29265 return n1*(x-=(2.625/d1))*x + .984375; 29266 } 29267 } 29268 29269 $.extend( $.easing, 29270 { 29271 def: 'easeOutQuad', 29272 swing: function (x) { 29273 return $.easing[$.easing.def](x); 29274 }, 29275 easeInQuad: function (x) { 29276 return x * x; 29277 }, 29278 easeOutQuad: function (x) { 29279 return 1 - ( 1 - x ) * ( 1 - x ); 29280 }, 29281 easeInOutQuad: function (x) { 29282 return x < 0.5 ? 29283 2 * x * x : 29284 1 - pow( -2 * x + 2, 2 ) / 2; 29285 }, 29286 easeInCubic: function (x) { 29287 return x * x * x; 29288 }, 29289 easeOutCubic: function (x) { 29290 return 1 - pow( 1 - x, 3 ); 29291 }, 29292 easeInOutCubic: function (x) { 29293 return x < 0.5 ? 29294 4 * x * x * x : 29295 1 - pow( -2 * x + 2, 3 ) / 2; 29296 }, 29297 easeInQuart: function (x) { 29298 return x * x * x * x; 29299 }, 29300 easeOutQuart: function (x) { 29301 return 1 - pow( 1 - x, 4 ); 29302 }, 29303 easeInOutQuart: function (x) { 29304 return x < 0.5 ? 29305 8 * x * x * x * x : 29306 1 - pow( -2 * x + 2, 4 ) / 2; 29307 }, 29308 easeInQuint: function (x) { 29309 return x * x * x * x * x; 29310 }, 29311 easeOutQuint: function (x) { 29312 return 1 - pow( 1 - x, 5 ); 29313 }, 29314 easeInOutQuint: function (x) { 29315 return x < 0.5 ? 29316 16 * x * x * x * x * x : 29317 1 - pow( -2 * x + 2, 5 ) / 2; 29318 }, 29319 easeInSine: function (x) { 29320 return 1 - cos( x * PI/2 ); 29321 }, 29322 easeOutSine: function (x) { 29323 return sin( x * PI/2 ); 29324 }, 29325 easeInOutSine: function (x) { 29326 return -( cos( PI * x ) - 1 ) / 2; 29327 }, 29328 easeInExpo: function (x) { 29329 return x === 0 ? 0 : pow( 2, 10 * x - 10 ); 29330 }, 29331 easeOutExpo: function (x) { 29332 return x === 1 ? 1 : 1 - pow( 2, -10 * x ); 29333 }, 29334 easeInOutExpo: function (x) { 29335 return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 29336 pow( 2, 20 * x - 10 ) / 2 : 29337 ( 2 - pow( 2, -20 * x + 10 ) ) / 2; 29338 }, 29339 easeInCirc: function (x) { 29340 return 1 - sqrt( 1 - pow( x, 2 ) ); 29341 }, 29342 easeOutCirc: function (x) { 29343 return sqrt( 1 - pow( x - 1, 2 ) ); 29344 }, 29345 easeInOutCirc: function (x) { 29346 return x < 0.5 ? 29347 ( 1 - sqrt( 1 - pow( 2 * x, 2 ) ) ) / 2 : 29348 ( sqrt( 1 - pow( -2 * x + 2, 2 ) ) + 1 ) / 2; 29349 }, 29350 easeInElastic: function (x) { 29351 return x === 0 ? 0 : x === 1 ? 1 : 29352 -pow( 2, 10 * x - 10 ) * sin( ( x * 10 - 10.75 ) * c4 ); 29353 }, 29354 easeOutElastic: function (x) { 29355 return x === 0 ? 0 : x === 1 ? 1 : 29356 pow( 2, -10 * x ) * sin( ( x * 10 - 0.75 ) * c4 ) + 1; 29357 }, 29358 easeInOutElastic: function (x) { 29359 return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 29360 -( pow( 2, 20 * x - 10 ) * sin( ( 20 * x - 11.125 ) * c5 )) / 2 : 29361 pow( 2, -20 * x + 10 ) * sin( ( 20 * x - 11.125 ) * c5 ) / 2 + 1; 29362 }, 29363 easeInBack: function (x) { 29364 return c3 * x * x * x - c1 * x * x; 29365 }, 29366 easeOutBack: function (x) { 29367 return 1 + c3 * pow( x - 1, 3 ) + c1 * pow( x - 1, 2 ); 29368 }, 29369 easeInOutBack: function (x) { 29370 return x < 0.5 ? 29371 ( pow( 2 * x, 2 ) * ( ( c2 + 1 ) * 2 * x - c2 ) ) / 2 : 29372 ( pow( 2 * x - 2, 2 ) *( ( c2 + 1 ) * ( x * 2 - 2 ) + c2 ) + 2 ) / 2; 29373 }, 29374 easeInBounce: function (x) { 29375 return 1 - bounceOut( 1 - x ); 29376 }, 29377 easeOutBounce: bounceOut, 29378 easeInOutBounce: function (x) { 29379 return x < 0.5 ? 29380 ( 1 - bounceOut( 1 - 2 * x ) ) / 2 : 29381 ( 1 + bounceOut( 2 * x - 1 ) ) / 2; 29382 } 29383 }); 29384 29385}); 29386 29387/*! 29388 * dist/jquery.inputmask 29389 * https://github.com/RobinHerbots/Inputmask 29390 * Copyright (c) 2010 - 2021 Robin Herbots 29391 * Licensed under the MIT license 29392 * Version: 5.0.7 29393 */ 29394!function(e, t) { 29395 if ("object" == typeof exports && "object" == typeof module) module.exports = t(require("jquery")); else if ("function" == typeof define && define.amd) define([ "jquery" ], t); else { 29396 var i = "object" == typeof exports ? t(require("jquery")) : t(e.jQuery); 29397 for (var a in i) ("object" == typeof exports ? exports : e)[a] = i[a]; 29398 } 29399}(self, (function(e) { 29400 return function() { 29401 "use strict"; 29402 var t = { 29403 3046: function(e, t, i) { 29404 var a; 29405 Object.defineProperty(t, "__esModule", { 29406 value: !0 29407 }), t.default = void 0, i(3851), i(219), i(207), i(5296); 29408 var n = ((a = i(2394)) && a.__esModule ? a : { 29409 default: a 29410 }).default; 29411 t.default = n; 29412 }, 29413 8741: function(e, t) { 29414 Object.defineProperty(t, "__esModule", { 29415 value: !0 29416 }), t.default = void 0; 29417 var i = !("undefined" == typeof window || !window.document || !window.document.createElement); 29418 t.default = i; 29419 }, 29420 3976: function(e, t, i) { 29421 Object.defineProperty(t, "__esModule", { 29422 value: !0 29423 }), t.default = void 0; 29424 var a, n = (a = i(5581)) && a.__esModule ? a : { 29425 default: a 29426 }; 29427 var r = { 29428 _maxTestPos: 500, 29429 placeholder: "_", 29430 optionalmarker: [ "[", "]" ], 29431 quantifiermarker: [ "{", "}" ], 29432 groupmarker: [ "(", ")" ], 29433 alternatormarker: "|", 29434 escapeChar: "\\", 29435 mask: null, 29436 regex: null, 29437 oncomplete: function() {}, 29438 onincomplete: function() {}, 29439 oncleared: function() {}, 29440 repeat: 0, 29441 greedy: !1, 29442 autoUnmask: !1, 29443 removeMaskOnSubmit: !1, 29444 clearMaskOnLostFocus: !0, 29445 insertMode: !0, 29446 insertModeVisual: !0, 29447 clearIncomplete: !1, 29448 alias: null, 29449 onKeyDown: function() {}, 29450 onBeforeMask: null, 29451 onBeforePaste: function(e, t) { 29452 return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e; 29453 }, 29454 onBeforeWrite: null, 29455 onUnMask: null, 29456 showMaskOnFocus: !0, 29457 showMaskOnHover: !0, 29458 onKeyValidation: function() {}, 29459 skipOptionalPartCharacter: " ", 29460 numericInput: !1, 29461 rightAlign: !1, 29462 undoOnEscape: !0, 29463 radixPoint: "", 29464 _radixDance: !1, 29465 groupSeparator: "", 29466 keepStatic: null, 29467 positionCaretOnTab: !0, 29468 tabThrough: !1, 29469 supportsInputType: [ "text", "tel", "url", "password", "search" ], 29470 ignorables: [ n.default.BACKSPACE, n.default.TAB, n.default["PAUSE/BREAK"], n.default.ESCAPE, n.default.PAGE_UP, n.default.PAGE_DOWN, n.default.END, n.default.HOME, n.default.LEFT, n.default.UP, n.default.RIGHT, n.default.DOWN, n.default.INSERT, n.default.DELETE, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 29471 isComplete: null, 29472 preValidation: null, 29473 postValidation: null, 29474 staticDefinitionSymbol: void 0, 29475 jitMasking: !1, 29476 nullable: !0, 29477 inputEventOnly: !1, 29478 noValuePatching: !1, 29479 positionCaretOnClick: "lvp", 29480 casing: null, 29481 inputmode: "text", 29482 importDataAttributes: !0, 29483 shiftPositions: !0, 29484 usePrototypeDefinitions: !0, 29485 validationEventTimeOut: 3e3, 29486 substitutes: {} 29487 }; 29488 t.default = r; 29489 }, 29490 7392: function(e, t) { 29491 Object.defineProperty(t, "__esModule", { 29492 value: !0 29493 }), t.default = void 0; 29494 t.default = { 29495 9: { 29496 validator: "[0-9\uff10-\uff19]", 29497 definitionSymbol: "*" 29498 }, 29499 a: { 29500 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 29501 definitionSymbol: "*" 29502 }, 29503 "*": { 29504 validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]" 29505 } 29506 }; 29507 }, 29508 3287: function(e, t, i) { 29509 Object.defineProperty(t, "__esModule", { 29510 value: !0 29511 }), t.default = void 0; 29512 var a, n = (a = i(2047)) && a.__esModule ? a : { 29513 default: a 29514 }; 29515 if (void 0 === n.default) throw "jQuery not loaded!"; 29516 var r = n.default; 29517 t.default = r; 29518 }, 29519 9845: function(e, t, i) { 29520 Object.defineProperty(t, "__esModule", { 29521 value: !0 29522 }), t.ua = t.mobile = t.iphone = t.iemobile = t.ie = void 0; 29523 var a, n = (a = i(9380)) && a.__esModule ? a : { 29524 default: a 29525 }; 29526 var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, s = "ontouchstart" in n.default, l = /iemobile/i.test(r), u = /iphone/i.test(r) && !l; 29527 t.iphone = u, t.iemobile = l, t.mobile = s, t.ie = o, t.ua = r; 29528 }, 29529 7184: function(e, t) { 29530 Object.defineProperty(t, "__esModule", { 29531 value: !0 29532 }), t.default = function(e) { 29533 return e.replace(i, "\\$1"); 29534 }; 29535 var i = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim"); 29536 }, 29537 6030: function(e, t, i) { 29538 Object.defineProperty(t, "__esModule", { 29539 value: !0 29540 }), t.EventHandlers = void 0; 29541 var a, n = i(8711), r = (a = i(5581)) && a.__esModule ? a : { 29542 default: a 29543 }, o = i(9845), s = i(7215), l = i(7760), u = i(4713); 29544 function c(e, t) { 29545 var i = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; 29546 if (!i) { 29547 if (Array.isArray(e) || (i = function(e, t) { 29548 if (!e) return; 29549 if ("string" == typeof e) return f(e, t); 29550 var i = Object.prototype.toString.call(e).slice(8, -1); 29551 "Object" === i && e.constructor && (i = e.constructor.name); 29552 if ("Map" === i || "Set" === i) return Array.from(e); 29553 if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return f(e, t); 29554 }(e)) || t && e && "number" == typeof e.length) { 29555 i && (e = i); 29556 var a = 0, n = function() {}; 29557 return { 29558 s: n, 29559 n: function() { 29560 return a >= e.length ? { 29561 done: !0 29562 } : { 29563 done: !1, 29564 value: e[a++] 29565 }; 29566 }, 29567 e: function(e) { 29568 throw e; 29569 }, 29570 f: n 29571 }; 29572 } 29573 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 29574 } 29575 var r, o = !0, s = !1; 29576 return { 29577 s: function() { 29578 i = i.call(e); 29579 }, 29580 n: function() { 29581 var e = i.next(); 29582 return o = e.done, e; 29583 }, 29584 e: function(e) { 29585 s = !0, r = e; 29586 }, 29587 f: function() { 29588 try { 29589 o || null == i.return || i.return(); 29590 } finally { 29591 if (s) throw r; 29592 } 29593 } 29594 }; 29595 } 29596 function f(e, t) { 29597 (null == t || t > e.length) && (t = e.length); 29598 for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i]; 29599 return a; 29600 } 29601 var d = { 29602 keydownEvent: function(e) { 29603 var t = this.inputmask,
vendor: 18,925 bytes, lines 29603-29854
29603i = t.opts, a = t.dependencyLib, c = t.maskset, f = this, d = a(f), p = e.keyCode, h = n.caret.call(t, f), m = i.onKeyDown.call(this, e, n.getBuffer.call(t), h, i); 29604 if (void 0 !== m) return m; 29605 if (p === r.default.BACKSPACE || p === r.default.DELETE || o.iphone && p === r.default.BACKSPACE_SAFARI || e.ctrlKey && p === r.default.X && !("oncut" in f)) e.preventDefault(), 29606 s.handleRemove.call(t, f, p, h), (0, l.writeBuffer)(f, n.getBuffer.call(t, !0), c.p, e, f.inputmask._valueGet() !== n.getBuffer.call(t).join("")); else if (p === r.default.END || p === r.default.PAGE_DOWN) { 29607 e.preventDefault(); 29608 var v = n.seekNext.call(t, n.getLastValidPosition.call(t)); 29609 n.caret.call(t, f, e.shiftKey ? h.begin : v, v, !0); 29610 } else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(), 29611 n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : i.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0, 29612 l.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : p !== r.default.INSERT || e.shiftKey || e.ctrlKey || void 0 !== t.userOptions.insertMode ? !0 === i.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0), 29613 !0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0), 29614 h.begin >= 0 && h.end > 0 && (e.preventDefault(), n.caret.call(t, f, h.begin, h.end))) : (h.begin = n.seekNext.call(t, h.begin, !0), 29615 h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(), 29616 n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || i.insertModeVisual && !1 === i.insertMode && (p === r.default.RIGHT ? setTimeout((function() { 29617 var e = n.caret.call(t, f); 29618 n.caret.call(t, f, e.begin); 29619 }), 0) : p === r.default.LEFT && setTimeout((function() { 29620 var e = n.translatePosition.call(t, f.inputmask.caretPos.begin); 29621 n.translatePosition.call(t, f.inputmask.caretPos.end); 29622 t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1)); 29623 }), 0)) : s.isSelection.call(t, h) ? i.insertMode = !i.insertMode : (i.insertMode = !i.insertMode, 29624 n.caret.call(t, f, h.begin, h.begin)); 29625 t.ignorable = i.ignorables.includes(p); 29626 }, 29627 keypressEvent: function(e, t, i, a, o) { 29628 var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), m = e.keyCode; 29629 if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return m === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0), 29630 setTimeout((function() { 29631 h.trigger("change"); 29632 }), 0)), u.skipInputEvent = !0, !0; 29633 if (m) { 29634 44 !== m && 46 !== m || 3 !== e.location || "" === c.radixPoint || (m = c.radixPoint.charCodeAt(0)); 29635 var v, g = t ? { 29636 begin: o, 29637 end: o 29638 } : n.caret.call(u, p), k = String.fromCharCode(m); 29639 k = c.substitutes[k] || k, d.writeOutBuffer = !0; 29640 var y = s.isValid.call(u, g, k, a, void 0, void 0, void 0, t); 29641 if (!1 !== y && (n.resetMaskSet.call(u, !0), v = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos), 29642 d.p = v), v = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, v) : v, 29643 !1 !== i && (setTimeout((function() { 29644 c.onKeyValidation.call(p, m, y); 29645 }), 0), d.writeOutBuffer && !1 !== y)) { 29646 var b = n.getBuffer.call(u); 29647 (0, l.writeBuffer)(p, b, v, e, !0 !== t); 29648 } 29649 if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = v), y; 29650 } 29651 }, 29652 keyupEvent: function(e) { 29653 var t = this.inputmask; 29654 !t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input"); 29655 }, 29656 pasteEvent: function(e) { 29657 var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this); 29658 i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t)); 29659 var s = r.substr(0, o.begin), u = r.substr(o.end, r.length); 29660 if (s == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join("") && (s = ""), 29661 u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join("") && (u = ""), 29662 window.clipboardData && window.clipboardData.getData) r = s + window.clipboardData.getData("Text") + u; else { 29663 if (!e.clipboardData || !e.clipboardData.getData) return !0; 29664 r = s + e.clipboardData.getData("text/plain") + u; 29665 } 29666 var f = r; 29667 if (i.isRTL) { 29668 f = f.split(""); 29669 var d, p = c(n.getBufferTemplate.call(i)); 29670 try { 29671 for (p.s(); !(d = p.n()).done; ) { 29672 var h = d.value; 29673 f[0] === h && f.shift(); 29674 } 29675 } catch (e) { 29676 p.e(e); 29677 } finally { 29678 p.f(); 29679 } 29680 f = f.join(""); 29681 } 29682 if ("function" == typeof a.onBeforePaste) { 29683 if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1; 29684 f || (f = r); 29685 } 29686 (0, l.checkVal)(this, !0, !1, f.toString().split(""), e), e.preventDefault(); 29687 }, 29688 inputFallBackEvent: function(e) { 29689 var t = this.inputmask, i = t.opts, a = t.dependencyLib; 29690 var s = this, c = s.inputmask._valueGet(!0), f = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, s, void 0, void 0, !0); 29691 if (f !== c) { 29692 c = function(e, i, a) { 29693 if (o.iemobile) { 29694 var r = i.replace(n.getBuffer.call(t).join(""), ""); 29695 if (1 === r.length) { 29696 var s = i.split(""); 29697 s.splice(a.begin, 0, r), i = s.join(""); 29698 } 29699 } 29700 return i; 29701 }(0, c, p); 29702 var h = function(e, a, r) { 29703 for (var o, s, l, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = a.substr(0, r.begin).split(""), p = a.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, m = f.length >= p.length ? f.length : p.length, v = "", g = [], k = "~"; c.length < h; ) c.push(k); 29704 for (;d.length < h; ) d.push(k); 29705 for (;f.length < m; ) f.unshift(k); 29706 for (;p.length < m; ) p.unshift(k); 29707 var y = c.concat(f), b = d.concat(p); 29708 for (s = 0, o = y.length; s < o; s++) switch (l = u.getPlaceholder.call(t, n.translatePosition.call(t, s)), 29709 v) { 29710 case "insertText": 29711 b[s - 1] === y[s] && r.begin == y.length - 1 && g.push(y[s]), s = o; 29712 break; 29713 29714 case "insertReplacementText": 29715 case "deleteContentBackward": 29716 y[s] === k ? r.end++ : s = o; 29717 break; 29718 29719 default: 29720 y[s] !== b[s] && (y[s + 1] !== k && y[s + 1] !== l && void 0 !== y[s + 1] || (b[s] !== l || b[s + 1] !== k) && b[s] !== k ? b[s + 1] === k && b[s] === y[s + 1] ? (v = "insertText", 29721 g.push(y[s]), r.begin--, r.end--) : y[s] !== l && y[s] !== k && (y[s + 1] === k || b[s] !== y[s] && b[s + 1] === y[s + 1]) ? (v = "insertReplacementText", 29722 g.push(y[s]), r.begin--) : y[s] === k ? (v = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === i.radixPoint) && r.end++) : s = o : (v = "insertText", 29723 g.push(y[s]), r.begin--, r.end--)); 29724 } 29725 return { 29726 action: v, 29727 data: g, 29728 caret: r 29729 }; 29730 }(c, f, p); 29731 switch ((s.inputmask.shadowRoot || s.ownerDocument).activeElement !== s && s.focus(), 29732 (0, l.writeBuffer)(s, n.getBuffer.call(t)), n.caret.call(t, s, p.begin, p.end, !0), 29733 h.action) { 29734 case "insertText": 29735 case "insertReplacementText": 29736 h.data.forEach((function(e, i) { 29737 var n = new a.Event("keypress"); 29738 n.keyCode = e.charCodeAt(0), t.ignorable = !1, d.keypressEvent.call(s, n); 29739 })), setTimeout((function() { 29740 t.$el.trigger("keyup"); 29741 }), 0); 29742 break; 29743 29744 case "deleteContentBackward": 29745 var m = new a.Event("keydown"); 29746 m.keyCode = r.default.BACKSPACE, d.keydownEvent.call(s, m); 29747 break; 29748 29749 default: 29750 (0, l.applyInputValue)(s, c); 29751 } 29752 e.preventDefault(); 29753 } 29754 }, 29755 compositionendEvent: function(e) { 29756 var t = this.inputmask; 29757 t.isComposing = !1, t.$el.trigger("input"); 29758 }, 29759 setValueEvent: function(e) { 29760 var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1]; 29761 void 0 === a && (a = i.inputmask._valueGet(!0)), (0, l.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]); 29762 }, 29763 focusEvent: function(e) { 29764 var t = this.inputmask, i = t.opts, a = this, r = a.inputmask._valueGet(); 29765 i.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, l.writeBuffer)(a, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))), 29766 !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || s.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || d.clickEvent.apply(a, [ e, !0 ]), 29767 t.undoValue = t._valueGet(!0); 29768 }, 29769 invalidEvent: function(e) { 29770 this.inputmask.validationEvent = !0; 29771 }, 29772 mouseleaveEvent: function() { 29773 var e = this.inputmask, t = e.opts, i = this; 29774 e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0, 29775 l.HandleNativePlaceholder)(i, e.originalPlaceholder); 29776 }, 29777 clickEvent: function(e, t) { 29778 var i = this.inputmask, a = this; 29779 if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) { 29780 var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t); 29781 void 0 !== r && n.caret.call(i, a, r); 29782 } 29783 }, 29784 cutEvent: function(e) { 29785 var t = this.inputmask, i = t.maskset, a = this, o = n.caret.call(t, a), u = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end), c = t.isRTL ? u.reverse().join("") : u.join(""); 29786 window.navigator.clipboard ? window.navigator.clipboard.writeText(c) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData("Text", c), 29787 s.handleRemove.call(t, a, r.default.DELETE, o), (0, l.writeBuffer)(a, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0)); 29788 }, 29789 blurEvent: function(e) { 29790 var t = this.inputmask, i = t.opts, a = (0, t.dependencyLib)(this), r = this; 29791 if (r.inputmask) { 29792 (0, l.HandleNativePlaceholder)(r, t.originalPlaceholder); 29793 var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice(); 29794 "" !== o && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : l.clearOptionalTail.call(t, u)), 29795 !1 === s.isComplete.call(t, u) && (setTimeout((function() { 29796 a.trigger("incomplete"); 29797 }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())), 29798 (0, l.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0), 29799 a.trigger("change")); 29800 } 29801 }, 29802 mouseenterEvent: function() { 29803 var e = this.inputmask, t = e.opts, i = this; 29804 if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) { 29805 var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join(""); 29806 e.placeholder !== a && i.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = i.placeholder), 29807 t.showMaskOnHover && (0, l.HandleNativePlaceholder)(i, a); 29808 } 29809 }, 29810 submitEvent: function() { 29811 var e = this.inputmask, t = e.opts; 29812 e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""), 29813 t.clearIncomplete && !1 === s.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""), 29814 t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() { 29815 (0, l.writeBuffer)(e.el, n.getBuffer.call(e)); 29816 }), 0)); 29817 }, 29818 resetEvent: function() { 29819 var e = this.inputmask; 29820 e.refreshValue = !0, setTimeout((function() { 29821 (0, l.applyInputValue)(e.el, e._valueGet(!0)); 29822 }), 0); 29823 } 29824 }; 29825 t.EventHandlers = d; 29826 }, 29827 9716: function(e, t, i) { 29828 Object.defineProperty(t, "__esModule", { 29829 value: !0 29830 }), t.EventRuler = void 0; 29831 var a = s(i(2394)), n = s(i(5581)), r = i(8711), o = i(7760); 29832 function s(e) { 29833 return e && e.__esModule ? e : { 29834 default: e 29835 }; 29836 } 29837 var l = { 29838 on: function(e, t, i) { 29839 var s = e.inputmask.dependencyLib, l = function(t) { 29840 t.originalEvent && (t = t.originalEvent || t, arguments[0] = t); 29841 var l, u = this, c = u.inputmask, f = c ? c.opts : void 0; 29842 if (void 0 === c && "FORM" !== this.nodeName) { 29843 var d = s.data(u, "_inputmask_opts"); 29844 s(u).off(), d && new a.default(d).mask(u); 29845 } else { 29846 if ([ "submit", "reset", "setvalue" ].includes(t.type) || "FORM" === this.nodeName || !(u.disabled || u.readOnly && !("keydown" === t.type && t.ctrlKey && 67 === t.keyCode || !1 === f.tabThrough && t.keyCode === n.default.TAB))) { 29847 switch (t.type) { 29848 case "input": 29849 if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1, 29850 t.preventDefault(); 29851 break; 29852 29853 case "keydown": 29854 c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.ke
29854yCode === n.default.KEY_229; 29855 break; 29856 29857 case "keyup": 29858 case "compositionend": 29859 c.isComposing && (c.skipInputEvent = !1); 29860 break; 29861 29862 case "keypress": 29863 if (!0 === c.skipKeyPressEvent) return t.preventDefault(); 29864 c.skipKeyPressEvent = !0; 29865 break; 29866 29867 case "click": 29868 case "focus": 29869 return c.validationEvent ? (c.validationEvent = !1, e.blur(), (0, o.HandleNativePlaceholder)(e, (c.isRTL ? r.getBufferTemplate.call(c).slice().reverse() : r.getBufferTemplate.call(c)).join("")), 29870 setTimeout((function() { 29871 e.focus(); 29872 }), f.validationEventTimeOut), !1) : (l = arguments, setTimeout((function() { 29873 e.inputmask && i.apply(u, l); 29874 }), 0), !1); 29875 } 29876 var p = i.apply(u, arguments); 29877 return !1 === p && (t.preventDefault(), t.stopPropagation()), p; 29878 } 29879 t.preventDefault(); 29880 } 29881 }; 29882 [ "submit", "reset" ].includes(t) ? (l = l.bind(e), null !== e.form && s(e.form).on(t, l)) : s(e).on(t, l), 29883 e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l); 29884 }, 29885 off: function(e, t) { 29886 if (e.inputmask && e.inputmask.events) { 29887 var i = e.inputmask.dependencyLib, a = e.inputmask.events; 29888 for (var n in t && ((a = [])[t] = e.inputmask.events[t]), a) { 29889 for (var r = a[n]; r.length > 0; ) { 29890 var o = r.pop(); 29891 [ "submit", "reset" ].includes(n) ? null !== e.form && i(e.form).off(n, o) : i(e).off(n, o); 29892 } 29893 delete e.inputmask.events[n]; 29894 } 29895 } 29896 } 29897 }; 29898 t.EventRuler = l; 29899 }, 29900 219: function(e, t, i) { 29901 var a = d(i(2394)), n = d(i(5581)), r = d(i(7184)), o = i(8711), s = i(4713); 29902 function l(e) { 29903 return l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 29904 return typeof e; 29905 } : function(e) { 29906 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 29907 }, l(e); 29908 } 29909 function u(e, t) { 29910 return function(e) { 29911 if (Array.isArray(e)) return e; 29912 }(e) || function(e, t) { 29913 var i = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; 29914 if (null == i) return; 29915 var a, n, r = [], o = !0, s = !1; 29916 try { 29917 for (i = i.call(e); !(o = (a = i.next()).done) && (r.push(a.value), !t || r.length !== t); o = !0) ; 29918 } catch (e) { 29919 s = !0, n = e; 29920 } finally { 29921 try { 29922 o || null == i.return || i.return(); 29923 } finally { 29924 if (s) throw n; 29925 } 29926 } 29927 return r; 29928 }(e, t) || function(e, t) { 29929 if (!e) return; 29930 if ("string" == typeof e) return c(e, t); 29931 var i = Object.prototype.toString.call(e).slice(8, -1); 29932 "Object" === i && e.constructor && (i = e.constructor.name); 29933 if ("Map" === i || "Set" === i) return Array.from(e); 29934 if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t); 29935 }(e, t) || function() { 29936 throw new TypeError("Invalid attempt to de
29936structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 29937 }(); 29938 } 29939 function c(e, t) { 29940 (null == t || t > e.length) && (t = e.length); 29941 for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i]; 29942 return a; 29943 } 29944 function f(e, t) { 29945 for (var i = 0; i < t.length; i++) { 29946 var a = t[i]; 29947 a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), 29948 Object.defineProperty(e, a.key, a); 29949 } 29950 } 29951 function d(e) { 29952 return e && e.__esModule ? e : { 29953 default: e 29954 }; 29955 } 29956 var p = a.default.dependencyLib, h = function() { 29957 function e(t, i, a) { 29958 !function(e, t) { 29959 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 29960 }(this, e), this.mask = t, this.format = i, this.opts = a, this._date = new Date(1, 0, 1), 29961 this.initDateObject(t, this.opts); 29962 } 29963 var t, i, a; 29964 return t = e, (i = [ { 29965 key: "date", 29966 get: function() { 29967 return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)), 29968 this._date; 29969 } 29970 }, { 29971 key: "initDateObject", 29972 value: function(e, t) { 29973 var i; 29974 for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) { 29975 var a = new RegExp("\\d+$").exec(i[0]), n = a ? i[0][0] + "x" : i[0], r = void 0; 29976 if (void 0 !== e) { 29977 if (a) { 29978 var o = P(t).lastIndex, s = O(i.index, t); 29979 P(t).lastIndex = o, r = e.slice(0, e.indexOf(s.nextMatch[0])); 29980 } else r = e.slice(0, n.length); 29981 e = e.slice(r.length); 29982 } 29983 Object.prototype.hasOwnProperty.call(g, n) && this.setValue(this, r, n, g[n][2], g[n][1]); 29984 } 29985 } 29986 }, { 29987 key: "setValue", 29988 value: function(e, t, i, a, n) { 29989 if (void 0 !== t && (e[a] = "ampm" === a ? t : t.replace(/[^0-9]/g, "0"), e["raw" + a] = t.replace(/\s/g, "_")), 29990 void 0 !== n) { 29991 var r = e[a]; 29992 ("day" === a && 29 === parseInt(r) || "month" === a && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)), 29993 "day" === a && (v = !0, 0 === parseInt(r) && (r = 1)), "month" === a && (v = !0), 29994 "year" === a && (v = !0, r.length < 4 && (r = w(r, 4, !0))), "" === r || isNaN(r) || n.call(e._date, r), 29995 "ampm" === a && n.call(e._date, r); 29996 } 29997 } 29998 }, { 29999 key: "reset", 30000 value: function() { 30001 this._date = new Date(1, 0, 1); 30002 } 30003 }, { 30004 key: "reInit", 30005 value: function() { 30006 this._date = void 0, this.date; 30007 } 30008 } ]) && f(t.prototype, i), a && f(t, a), Object.defineProperty(t, "prototype", { 30009 writable: !1 30010 }), e; 30011 }(), m = (new Date).getFullYear(), v = !1, g = { 30012 d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ], 30013 dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() { 30014 return w(Date.prototype.getDate.call(this), 2); 30015 } ], 30016 ddd: [ "" ], 30017 dddd: [ "" ], 30018 m: [ "[1-9]|1[012]", function(e) { 30019 var t = e ? parseInt(e) : 0; 30020 return t > 0 && t--, Date.prototype.setMonth.call(this, t); 30021 }, "month", function() { 30022 return Date.prototype.getMonth.call(this) + 1; 30023 } ], 30024 mm: [ "0[1-9]|1[012]", function(e) { 30025 var t = e ? parseInt(e) : 0; 30026 return t > 0 && t--, Date.prototype.setMonth.call(this, t); 30027 }, "month", function() { 30028 return w(Date.prototype.getMonth.call(this) + 1, 2); 30029 } ], 30030 mmm: [ "" ], 30031 mmmm: [ "" ], 30032 yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() { 30033 return w(Date.prototype.getFullYear.call(this), 2); 30034 } ], 30035 yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() { 30036 return w(Date.prototype.getFullYear.call(this), 4); 30037 } ], 30038 h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 30039 hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() { 30040 return w(Date.prototype.getHours.call(this), 2); 30041 } ], 30042 hx: [ function(e) { 30043 return "[0-9]{".concat(e, "}"); 30044 }, Date.prototype.setHours, "hours", function(e) { 30045 return Date.prototype.getHours; 30046 } ], 30047 H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 30048 HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() { 30049 return w(Date.prototype.getHours.call(this), 2); 30050 } ], 30051 Hx: [ function(e) { 30052 return "[0-9]{".concat(e, "}"); 30053 }, Date.prototype.setHours, "hours", function(e) { 30054 return function() { 30055 return w(Date.prototype.getHours.call(this), e); 30056 }; 30057 } ], 30058 M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ], 30059 MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() { 30060 return w(Date.prototype.getMinutes.call(this), 2); 30061 } ], 30062 s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ], 30063 ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() { 30064 return w(Date.prototype.getSeconds.call(this), 2); 30065 } ], 30066 l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() { 30067 return w(Date.prototype.getMilliseconds.call(this), 3); 30068 } ], 30069 L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() { 30070 return w(Date.prototype.getMilliseconds.call(this), 2); 30071 } ], 30072 t: [ "[ap]", y, "ampm", b, 1 ], 30073 tt: [ "[ap]m", y, "ampm", b, 2 ], 30074 T: [ "[AP]", y, "ampm", b, 1 ], 30075 TT: [ "[AP]M", y, "ampm", b, 2 ], 30076 Z: [ ".*", void 0, "Z", function() { 30077 var e = this.toString().match(/\((.+)\)/)[1]; 30078 e.includes(" ") && (e = (e = e.replace("-", " ").toUpperCase()).split(" ").map((function(e) { 30079 return u(e, 1)[0]; 30080 })).join("")); 30081 return e; 30082 } ], 30083 o: [ "" ], 30084 S: [ "" ] 30085 }, k = { 30086 isoDate: "yyyy-mm-dd", 30087 isoTime: "HH:MM:ss", 30088 isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 30089 isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 30090 }; 30091 function y(e) { 30092 var t = this.getHours(); 30093 e.toLowerCase().includes("p") ? this.setHours(t + 12) : e.toLowerCase().includes("a") && t >= 12 && this.setHours(t - 12); 30094 } 30095 function b() { 30096 var e = this.getHours(); 30097 return (e = e || 12) >= 12 ? "PM" : "AM"; 30098 } 30099 function x(e) { 30100 var t = new RegExp("\\d+$").exec(e[0]); 30101 if (t && void 0 !== t[0]) { 30102 var i = g[e[0][0] + "x"].slice(""); 30103 return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i; 30104 } 30105 if (g[e[0]]) return g[e[0]]; 30106 } 30107 function P(e) { 30108 if (!e.tokenizer) { 30109 var t = [], i = []; 30110 for (var a in g) if (/\.*x$/.test(a)) { 30111 var n = a[0] + "\\d+"; 30112 -1 === i.indexOf(n) && i.push(n); 30113 } else -1 === t.indexOf(a[0]) && t.push(a[0]); 30114 e.tokenizer = "(" + (i.length > 0 ? i.join("|") + "|" : "") + t.join("+|") + ")+?|.", 30115 e.tokenizer = new RegExp(e.tokenizer, "g"); 30116 } 30117 return e.tokenizer; 30118 } 30119 function E(e, t, i) { 30120 if (!v) return !0; 30121 if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || "29" == e.day && (!isFinite(e.rawyear) || void 0 === e.rawyear || "" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t; 30122 if ("29" == e.day) { 30123 var a = O(t.pos, i); 30124 if ("yyyy" === a.targetMatch[0] && t.pos - a.targetMatchIndex == 2) return t.remove = t.pos + 1, 30125 t; 30126 } else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03", 30127 e.date.setDate(3), e.date.setMonth(1), t.insert = [ { 30128 pos: t.pos, 30129 c: "0" 30130 }, { 30131 pos: t.pos + 1, 30132 c: t.c 30133 } ], t.caret = o.seekNext.call(this, t.pos + 1), t; 30134 return !1; 30135 } 30136 function S(e, t, i, a) { 30137 var n, o, s = ""; 30138 for (P(i).lastIndex = 0; n = P(i).exec(e); ) { 30139 if (void 0 === t) if (o = x(n)) s += "(" + o[0] + ")"; else switch (n[0]) { 30140 case "[": 30141 s += "("; 30142 break; 30143 30144 case "]": 30145 s += ")?"; 30146 break; 30147 30148 default: 30149 s += (0, r.default)(n[0]); 30150 } else if (o = x(n)) if (!0 !== a && o[3]) s += o[3].call(t.date); else o[2] ? s += t["raw" + o[2]] : s += n[0]; else s += n[0]; 30151 } 30152 return s; 30153 } 30154 function w(e, t, i) { 30155 for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + "0" : "0" + e; 30156 return e; 30157 } 30158 function _(e, t, i) { 30159 return "string" == typeof e ? new h(e, t, i) : e && "object" === l(e) && Object.prototype.hasOwnProperty.call(e, "date") ? e : void 0; 30160 } 30161 function M(e, t) { 30162 return S(t.inputFormat, { 30163 date: e 30164 }, t); 30165 } 30166 function O(e, t) { 30167 var i, a, n = 0, r = 0; 30168 for (P(t).lastIndex = 0; a = P(t).exec(t.inputFormat); ) { 30169 var o = new RegExp("\\d+$").exec(a[0]); 30170 if ((n += r = o ? parseInt(o[0]) : a[0].length) >= e + 1) { 30171 i = a, a = P(t).exec(t.inputFormat); 30172 break; 30173 } 30174 } 30175 return { 30176 targetMatchIndex: n - r, 30177 nextMatch: a, 30178 targetMatch: i 30179 }; 30180 } 30181 a.default.extendAliases({ 30182 datetime: { 30183 mask: function(e) { 30184 return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = k[e.inputFormat] || e.inputFormat, 30185 e.displayFormat = k[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = k[e.outputFormat] || e.outputFormat || e.inputFormat, 30186 e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""), 30187 e.regex = S(e.inputFormat, void 0, e), e.min = _(e.min, e.inputFormat, e), e.max = _(e.max, e.inputFormat, e), 30188 null; 30189 }, 30190 placeholder: "", 30191 inputFormat: "isoDateTime", 30192 displayFormat: null, 30193 outputFormat: null, 30194 min: null, 30195 max: null, 30196 skipOptionalPartCharacter: "", 30197 i18n: { 30198 dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], 30199 monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
vendor: 11,038 bytes, lines 30199-30389
30199November", "December" ], 30200 ordinalSuffix: [ "st", "nd", "rd", "th" ] 30201 }, 30202 preValidation: function(e, t, i, a, n, r, o, s) { 30203 if (s) return !0; 30204 if (isNaN(i) && e[t] !== i) { 30205 var l = O(t, n); 30206 if (l.nextMatch && l.nextMatch[0] === i && l.targetMatch[0].length > 1) { 30207 var u = g[l.targetMatch[0]][0]; 30208 if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0", 30209 { 30210 fuzzy: !0, 30211 buffer: e, 30212 refreshFromBuffer: { 30213 start: t - 1, 30214 end: t + 1 30215 }, 30216 pos: t + 1 30217 }; 30218 } 30219 } 30220 return !0; 30221 }, 30222 postValidation: function(e, t, i, a, n, r, o, l) { 30223 var u, c; 30224 if (o) return !0; 30225 if (!1 === a && (((u = O(t + 1, n)).targetMatch && u.targetMatchIndex === t && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]] || (u = O(t + 2, n)).targetMatch && u.targetMatchIndex === t + 1 && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]]) && (c = g[u.targetMatch[0]][0]), 30226 void 0 !== c && (void 0 !== r.validPositions[t + 1] && new RegExp(c).test(i + "0") ? (e[t] = i, 30227 e[t + 1] = "0", a = { 30228 pos: t + 2, 30229 caret: t 30230 }) : new RegExp(c).test("0" + i) && (e[t] = "0", e[t + 1] = i, a = { 30231 pos: t + 2 30232 })), !1 === a)) return a; 30233 if (a.fuzzy && (e = a.buffer, t = a.pos), (u = O(t, n)).targetMatch && u.targetMatch[0] && void 0 !== g[u.targetMatch[0]]) { 30234 var f = g[u.targetMatch[0]]; 30235 c = f[0]; 30236 var d = e.slice(u.targetMatchIndex, u.targetMatchIndex + u.targetMatch[0].length); 30237 if (!1 === new RegExp(c).test(d.join("")) && 2 === u.targetMatch[0].length && r.validPositions[u.targetMatchIndex] && r.validPositions[u.targetMatchIndex + 1] && (r.validPositions[u.targetMatchIndex + 1].input = "0"), 30238 "year" == f[2]) for (var p = s.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h], 30239 delete r.validPositions[h]; 30240 } 30241 var v = a, k = _(e.join(""), n.inputFormat, n); 30242 return v && k.date.getTime() == k.date.getTime() && (n.prefillYear && (v = function(e, t, i) { 30243 if (e.year !== e.rawyear) { 30244 var a = m.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = a.slice(0, n.length), o = a.slice(n.length); 30245 if (2 === n.length && n === r) { 30246 var s = new Date(m, e.month - 1, e.day); 30247 e.day == s.getDate() && (!i.max || i.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(m), 30248 e.year = a, t.insert = [ { 30249 pos: t.pos + 1, 30250 c: o[0] 30251 }, { 30252 pos: t.pos + 2, 30253 c: o[1] 30254 } ]); 30255 } 30256 } 30257 return t; 30258 }(k, v, n)), v = function(e, t, i, a, n) { 30259 if (!t) return t; 30260 if (t && i.min && i.min.date.getTime() == i.min.date.getTime()) { 30261 var r; 30262 for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) { 30263 var o; 30264 if ((o = x(r)) && o[3]) { 30265 for (var s = o[1], l = e[o[2]], u = i.min[o[2]], c = i.max ? i.max[o[2]] : u, f = [], d = !1, p = 0; p < u.length; p++) void 0 !== a.validPositions[p + r.index] || d ? (f[p] = l[p], 30266 d = d || l[p] > u[p]) : (f[p] = u[p], "year" === o[2] && l.length - 1 == p && u != c && (f = (parseInt(f.join("")) + 1).toString().split("")), 30267 "ampm" === o[2] && u != c && i.min.date.getTime() > e.date.getTime() && (f[p] = c[p])); 30268 s.call(e._date, f.join("")); 30269 } 30270 } 30271 t = i.min.date.getTime() <= e.date.getTime(), e.reInit(); 30272 } 30273 return t && i.max && i.max.date.getTime() == i.max.date.getTime() && (t = i.max.date.getTime() >= e.date.getTime()), 30274 t; 30275 }(k, v = E.call(this, k, v, n), n, r)), void 0 !== t && v && a.pos !== t ? { 30276 buffer: S(n.inputFormat, k, n).split(""), 30277 refreshFromBuffer: { 30278 start: t, 30279 end: a.pos 30280 }, 30281 pos: a.caret || a.pos 30282 } : v; 30283 }, 30284 onKeyDown: function(e, t, i, a) { 30285 e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(M(new Date, a)), 30286 p(this).trigger("setvalue")); 30287 }, 30288 onUnMask: function(e, t, i) { 30289 return t ? S(i.outputFormat, _(e, i.inputFormat, i), i, !0) : t; 30290 }, 30291 casing: function(e, t, i, a) { 30292 return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e; 30293 }, 30294 onBeforeMask: function(e, t) { 30295 return "[object Date]" === Object.prototype.toString.call(e) && (e = M(e, t)), e; 30296 }, 30297 insertMode: !1, 30298 shiftPositions: !1, 30299 keepStatic: !1, 30300 inputmode: "numeric", 30301 prefillYear: !0 30302 } 30303 }); 30304 }, 30305 3851: function(e, t, i) { 30306 var a, n = (a = i(2394)) && a.__esModule ? a : { 30307 default: a 30308 }, r = i(8711), o = i(4713); 30309 n.default.extendDefinitions({ 30310 A: { 30311 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 30312 casing: "upper" 30313 }, 30314 "&": { 30315 validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 30316 casing: "upper" 30317 }, 30318 "#": { 30319 validator: "[0-9A-Fa-f]", 30320 casing: "upper" 30321 } 30322 }); 30323 var s = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]"); 30324 function l(e, t, i, a, n) { 30325 return i - 1 > -1 && "." !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && "." !== t.buffer[i - 2] ? t.buffer[i - 2] + e : "0" + e) : e = "00" + e, 30326 s.test(e); 30327 } 30328 n.default.extendAliases({ 30329 cssunit: { 30330 regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" 30331 }, 30332 url: { 30333 regex: "(https?|ftp)://.*", 30334 autoUnmask: !1, 30335 keepStatic: !1, 30336 tabThrough: !0 30337 }, 30338 ip: { 30339 mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}", 30340 definitions: { 30341 i: { 30342 validator: l 30343 }, 30344 j: { 30345 validator: l 30346 }, 30347 k: { 30348 validator: l 30349 }, 30350 l: { 30351 validator: l 30352 } 30353 }, 30354 onUnMask: function(e, t, i) { 30355 return e; 30356 }, 30357 inputmode: "decimal", 30358 substitutes: { 30359 ",": "." 30360 } 30361 }, 30362 email: { 30363 mask: function(e) { 30364 var t = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", i = t; 30365 if (e.separator) for (var a = 0; a < e.quantifier; a++) i += "[".concat(e.separator).concat(t, "]"); 30366 return i; 30367 }, 30368 greedy: !1, 30369 casing: "lower", 30370 separator: null, 30371 quantifier: 5, 30372 skipOptionalPartCharacter: "", 30373 onBeforePaste: function(e, t) { 30374 return (e = e.toLowerCase()).replace("mailto:", ""); 30375 }, 30376 definitions: { 30377 "*": { 30378 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]" 30379 }, 30380 "-": { 30381 validator: "[0-9A-Za-z-]" 30382 } 30383 }, 30384 onUnMask: function(e, t, i) { 30385 return e; 30386 }, 30387 inputmode: "email" 30388 }, 30389 mac: {
vendor: 14,422 bytes, lines 30390-30621
30390 mask: "##:##:##:##:##:##" 30391 }, 30392 vin: { 30393 mask: "V{13}9{4}", 30394 definitions: { 30395 V: { 30396 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 30397 casing: "upper" 30398 } 30399 }, 30400 clearIncomplete: !0, 30401 autoUnmask: !0 30402 }, 30403 ssn: { 30404 mask: "999-99-9999", 30405 postValidation: function(e, t, i, a, n, s, l) { 30406 var u = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0); 30407 return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join("")); 30408 } 30409 } 30410 }); 30411 }, 30412 207: function(e, t, i) { 30413 var a = s(i(2394)), n = s(i(5581)), r = s(i(7184)), o = i(8711); 30414 function s(e) { 30415 return e && e.__esModule ? e : { 30416 default: e 30417 }; 30418 } 30419 var l = a.default.dependencyLib; 30420 function u(e, t) { 30421 for (var i = "", n = 0; n < e.length; n++) a.default.prototype.definitions[e.charAt(n)] || t.definitions[e.charAt(n)] || t.optionalmarker[0] === e.charAt(n) || t.optionalmarker[1] === e.charAt(n) || t.quantifiermarker[0] === e.charAt(n) || t.quantifiermarker[1] === e.charAt(n) || t.groupmarker[0] === e.charAt(n) || t.groupmarker[1] === e.charAt(n) || t.alternatormarker === e.charAt(n) ? i += "\\" + e.charAt(n) : i += e.charAt(n); 30422 return i; 30423 } 30424 function c(e, t, i, a) { 30425 if (e.length > 0 && t > 0 && (!i.digitsOptional || a)) { 30426 var n = e.indexOf(i.radixPoint), r = !1; 30427 i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === n && (e.push(i.radixPoint), 30428 n = e.length - 1); 30429 for (var o = 1; o <= t; o++) isFinite(e[n + o]) || (e[n + o] = "0"); 30430 } 30431 return r && e.push(i.negationSymbol.back), e; 30432 } 30433 function f(e, t) { 30434 var i = 0; 30435 if ("+" === e) { 30436 for (i in t.validPositions) ; 30437 i = o.seekNext.call(this, parseInt(i)); 30438 } 30439 for (var a in t.tests) if ((a = parseInt(a)) >= i) for (var n = 0, r = t.tests[a].length; n < r; n++) if ((void 0 === t.validPositions[a] || "-" === e) && t.tests[a][n].match.def === e) return a + (void 0 !== t.validPositions[a] && "-" !== e ? 1 : 0); 30440 return i; 30441 } 30442 function d(e, t) { 30443 var i = -1; 30444 for (var a in t.validPositions) { 30445 var n = t.validPositions[a]; 30446 if (n && n.match.def === e) { 30447 i = parseInt(a); 30448 break; 30449 } 30450 } 30451 return i; 30452 } 30453 function p(e, t, i, a, n) { 30454 var r = t.buffer ? t.buffer.indexOf(n.radixPoint) : -1, o = (-1 !== r || a && n.jitMasking) && new RegExp(n.definitions[9].validator).test(e); 30455 return n._radixDance && -1 !== r && o && null == t.validPositions[r] ? { 30456 insert: { 30457 pos: r === i ? r + 1 : r, 30458 c: n.radixPoint 30459 }, 30460 pos: i 30461 } : o; 30462 } 30463 a.default.extendAliases({ 30464 numeric: { 30465 mask: function(e) { 30466 e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && "0" !== e.digits && ("." === e.radixPoint ? e.groupSeparator = "," : "," === e.radixPoint ? e.groupSeparator = "." : e.groupSeparator = ""), 30467 " " === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)), 30468 "radixFocus" === e.positionCaretOnClick && "" === e.placeholder && (e.positionCaretOnClick = "lvp"); 30469 var t = "0", i = e.radixPoint; 30470 !0 === e.numericInput && void 0 === e.__financeInput ? (t = "1", e.positionCaretOnClick = "radixFocus" === e.positionCaretOnClick ? "lvp" : e.positionCaretOnClick, 30471 e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = "," === e.radixPoint ? "?" : "!", 30472 "" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = "[" + e.radixPoint + "]", 30473 e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1, 30474 e.numericInput = !0); 30475 var a, n = "[+]"; 30476 if (n += u(e.prefix, e), "" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {}, 30477 e.definitions[e.groupSeparator].validator = "[" + e.groupSeparator + "]", e.definitions[e.groupSeparator].placeholder = e.groupSeparator, 30478 e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0), 30479 n += e._mask(e)) : n += "9{+}", void 0 !== e.digits && 0 !== e.digits) { 30480 var o = e.digits.toString().split(","); 30481 isFinite(o[0]) && o[1] && isFinite(o[1]) ? n += i + t + "{" + e.digits + "}" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (a = n + i + t + "{0," + e.digits + "}", 30482 e.keepStatic = !0) : n += i + t + "{" + e.digits + "}"); 30483 } else e.inputmode = "numeric"; 30484 return n += u(e.suffix, e), n += "[-]", a && (n = [ a + u(e.suffix, e) + "[-]", n ]), 30485 e.greedy = !1, function(e) { 30486 void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0, 30487 r.default)(e.groupSeparator), "g"), ""), "," === e.radixPoint && (e.min = e.min.replace(e.radixPoint, ".")), 30488 e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)), 30489 null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, r.default)(e.groupSeparator), "g"), ""), 30490 "," === e.radixPoint && (e.max = e.max.replace(e.radixPoint, ".")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN, 30491 isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = "done"); 30492 }(e), "" !== e.radixPoint && (e.substitutes["." == e.radixPoint ? "," : "."] = e.radixPoint), 30493 n; 30494 }, 30495 _mask: function(e) { 30496 return "(" + e.groupSeparator + "999){+|1}"; 30497 }, 30498 digits: "*", 30499 digitsOptional: !0, 30500 enforceDigitsOnBlur: !1, 30501 radixPoint: ".", 30502 positionCaretOnClick: "radixFocus", 30503 _radixDance: !0, 30504 groupSeparator: "", 30505 allowMinus: !0, 30506 negationSymbol: { 30507 front: "-", 30508 back: "" 30509 }, 30510 prefix: "", 30511 suffix: "", 30512 min: null, 30513 max: null, 30514 SetMaxOnOverflow: !1, 30515 step: 1, 30516 inputType: "text", 30517 unmaskAsNumber: !1, 30518 roundingFN: Math.round, 30519 inputmode: "decimal", 30520 shortcuts: { 30521 k: "1000", 30522 m: "1000000" 30523 }, 30524 placeholder: "0", 30525 greedy: !1, 30526 rightAlign: !0, 30527 insertMode: !0, 30528 autoUnmask: !1, 30529 skipOptionalPartCharacter: "", 30530 usePrototypeDefinitions: !1, 30531 stripLeadingZeroes: !0, 30532 definitions: { 30533 0: { 30534 validator: p 30535 }, 30536 1: { 30537 validator: p, 30538 definitionSymbol: "9" 30539 }, 30540 9: { 30541 validator: "[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]", 30542 definitionSymbol: "*" 30543 }, 30544 "+": { 30545 validator: function(e, t, i, a, n) { 30546 return n.allowMinus && ("-" === e || e === n.negationSymbol.front); 30547 } 30548 }, 30549 "-": { 30550 validator: function(e, t, i, a, n) { 30551 return n.allowMinus && e === n.negationSymbol.back; 30552 } 30553 } 30554 }, 30555 preValidation: function(e, t, i, a, n, r, o, s) { 30556 if (!1 !== n.__financeInput && i === n.radixPoint) return !1; 30557 var l = e.indexOf(n.radixPoint), u = t; 30558 if (t = function(e, t, i, a, n) { 30559 return n._radixDance && n.numericInput && t !== n.negationSymbol.back && e <= i && (i > 0 || t == n.radixPoint) && (void 0 === a.validPositions[e - 1] || a.validPositions[e - 1].input !== n.negationSymbol.back) && (e -= 1), 30560 e; 30561 }(t, i, l, r, n), "-" === i || i === n.negationSymbol.front) { 30562 if (!0 !== n.allowMinus) return !1; 30563 var c = !1, p = d("+", r), h = d("-", r); 30564 return -1 !== p && (c = [ p, h ]), !1 !== c ? { 30565 remove: c, 30566 caret: u - n.negationSymbol.back.length 30567 } : { 30568 insert: [ { 30569 pos: f.call(this, "+", r), 30570 c: n.negationSymbol.front, 30571 fromIsValid: !0 30572 }, { 30573 pos: f.call(this, "-", r), 30574 c: n.negationSymbol.back, 30575 fromIsValid: void 0 30576 } ], 30577 caret: u + n.negationSymbol.back.length 30578 }; 30579 } 30580 if (i === n.groupSeparator) return { 30581 caret: u 30582 }; 30583 if (s) return !0; 30584 if (-1 !== l && !0 === n._radixDance && !1 === a && i === n.radixPoint && void 0 !== n.digits && (isNaN(n.digits) || parseInt(n.digits) > 0) && l !== t) return { 30585 caret: n._radixDance && t === l - 1 ? l + 1 : l 30586 }; 30587 if (!1 === n.__financeInput) if (a) { 30588 if (n.digitsOptional) return { 30589 rewritePosition: o.end 30590 }; 30591 if (!n.digitsOptional) { 30592 if (o.begin > l && o.end <= l) return i === n.radixPoint ? { 30593 insert: { 30594 pos: l + 1, 30595 c: "0", 30596 fromIsValid: !0 30597 }, 30598 rewritePosition: l 30599 } : { 30600 rewritePosition: l + 1 30601 }; 30602 if (o.begin < l) return { 30603 rewritePosition: o.begin - 1 30604 }; 30605 } 30606 } else if (!n.showMaskOnHover && !n.showMaskOnFocus && !n.digitsOptional && n.digits > 0 && "" === this.__valueGet.call(this.el)) return { 30607 rewritePosition: l 30608 }; 30609 return { 30610 rewritePosition: t 30611 }; 30612 }, 30613 postValidation: function(e, t, i, a, n, r, o) { 30614 if (!1 === a) return a; 30615 if (o) return !0; 30616 if (null !== n.min || null !== n.max) { 30617 var s = n.onUnMask(e.slice().reverse().join(""), void 0, l.extend({}, n, { 30618 unmaskAsNumber: !0 30619 })); 30620 if (null !== n.min && s < n.min && (s.toString().length > n.min.toString().length || s < 0)) return !1; 30621 if (null !== n.max && s >
vendor: 4,182 bytes, lines 30621-30672
30621 n.max) return !!n.SetMaxOnOverflow && { 30622 refreshFromBuffer: !0, 30623 buffer: c(n.max.toString().replace(".", n.radixPoint).split(""), n.digits, n).reverse() 30624 }; 30625 } 30626 return a; 30627 }, 30628 onUnMask: function(e, t, i) { 30629 if ("" === t && !0 === i.nullable) return t; 30630 var a = e.replace(i.prefix, ""); 30631 return a = (a = a.replace(i.suffix, "")).replace(new RegExp((0, r.default)(i.groupSeparator), "g"), ""), 30632 "" !== i.placeholder.charAt(0) && (a = a.replace(new RegExp(i.placeholder.charAt(0), "g"), "0")), 30633 i.unmaskAsNumber ? ("" !== i.radixPoint && -1 !== a.indexOf(i.radixPoint) && (a = a.replace(r.default.call(this, i.radixPoint), ".")), 30634 a = (a = a.replace(new RegExp("^" + (0, r.default)(i.negationSymbol.front)), "-")).replace(new RegExp((0, 30635 r.default)(i.negationSymbol.back) + "$"), ""), Number(a)) : a; 30636 }, 30637 isComplete: function(e, t) { 30638 var i = (t.numericInput ? e.slice().reverse() : e).join(""); 30639 return i = (i = (i = (i = (i = i.replace(new RegExp("^" + (0, r.default)(t.negationSymbol.front)), "-")).replace(new RegExp((0, 30640 r.default)(t.negationSymbol.back) + "$"), "")).replace(t.prefix, "")).replace(t.suffix, "")).replace(new RegExp((0, 30641 r.default)(t.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t.radixPoint && (i = i.replace((0, 30642 r.default)(t.radixPoint), ".")), isFinite(i); 30643 }, 30644 onBeforeMask: function(e, t) { 30645 var i = t.radixPoint || ","; 30646 isFinite(t.digits) && (t.digits = parseInt(t.digits)), "number" != typeof e && "number" !== t.inputType || "" === i || (e = e.toString().replace(".", i)); 30647 var a = "-" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, n = e.split(i), o = n[0].replace(/[^\-0-9]/g, ""), s = n.length > 1 ? n[1].replace(/[^0-9]/g, "") : "", l = n.length > 1; 30648 e = o + ("" !== s ? i + s : s); 30649 var u = 0; 30650 if ("" !== i && (u = t.digitsOptional ? t.digits < s.length ? t.digits : s.length : t.digits, 30651 "" !== s || !t.digitsOptional)) { 30652 var f = Math.pow(10, u || 1); 30653 e = e.replace((0, r.default)(i), "."), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(u)), 30654 e = e.toString().replace(".", i); 30655 } 30656 if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))), 30657 null !== t.min || null !== t.max) { 30658 var d = e.toString().replace(i, "."); 30659 null !== t.min && d < t.min ? e = t.min.toString().replace(".", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(".", i)); 30660 } 30661 return a && "-" !== e.charAt(0) && (e = "-" + e), c(e.toString().split(""), u, t, l).join(""); 30662 }, 30663 onBeforeWrite: function(e, t, i, a) { 30664 function n(e, t) { 30665 if (!1 !== a.__financeInput || t) { 30666 var i = e.indexOf(a.radixPoint); 30667 -1 !== i && e.splice(i, 1); 30668 } 30669 if ("" !== a.groupSeparator) for (;-1 !== (i = e.indexOf(a.groupSeparator)); ) e.splice(i, 1); 30670 return e; 30671 } 30672 var o, s;
vendor: 14,257 bytes, lines 30673-30870
30673 if (a.stripLeadingZeroes && (s = function(e, t) { 30674 var i = new RegExp("(^" + ("" !== t.negationSymbol.front ? (0, r.default)(t.negationSymbol.front) + "?" : "") + (0, 30675 r.default)(t.prefix) + ")(.*)(" + (0, r.default)(t.suffix) + ("" != t.negationSymbol.back ? (0, 30676 r.default)(t.negationSymbol.back) + "?" : "") + "$)").exec(e.slice().reverse().join("")), a = i ? i[2] : "", n = !1; 30677 return a && (a = a.split(t.radixPoint.charAt(0))[0], n = new RegExp("^[0" + t.groupSeparator + "]*").exec(a)), 30678 !(!n || !(n[0].length > 1 || n[0].length > 0 && n[0].length < a.length)) && n; 30679 }(t, a))) for (var u = t.join("").lastIndexOf(s[0].split("").reverse().join("")) - (s[0] == s.input ? 0 : 1), f = s[0] == s.input ? 1 : 0, d = s[0].length - f; d > 0; d--) delete this.maskset.validPositions[u + d], 30680 delete t[u + d]; 30681 if (e) switch (e.type) { 30682 case "blur": 30683 case "checkval": 30684 if (null !== a.min) { 30685 var p = a.onUnMask(t.slice().reverse().join(""), void 0, l.extend({}, a, { 30686 unmaskAsNumber: !0 30687 })); 30688 if (null !== a.min && p < a.min) return { 30689 refreshFromBuffer: !0, 30690 buffer: c(a.min.toString().replace(".", a.radixPoint).split(""), a.digits, a).reverse() 30691 }; 30692 } 30693 if (t[t.length - 1] === a.negationSymbol.front) { 30694 var h = new RegExp("(^" + ("" != a.negationSymbol.front ? (0, r.default)(a.negationSymbol.front) + "?" : "") + (0, 30695 r.default)(a.prefix) + ")(.*)(" + (0, r.default)(a.suffix) + ("" != a.negationSymbol.back ? (0, 30696 r.default)(a.negationSymbol.back) + "?" : "") + "$)").exec(n(t.slice(), !0).reverse().join("")); 30697 0 == (h ? h[2] : "") && (o = { 30698 refreshFromBuffer: !0, 30699 buffer: [ 0 ] 30700 }); 30701 } else if ("" !== a.radixPoint) { 30702 t.indexOf(a.radixPoint) === a.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + a.suffix.length) : (t.splice(0, 1 + a.suffix.length), 30703 o = { 30704 refreshFromBuffer: !0, 30705 buffer: n(t) 30706 })); 30707 } 30708 if (a.enforceDigitsOnBlur) { 30709 var m = (o = o || {}) && o.buffer || t.slice().reverse(); 30710 o.refreshFromBuffer = !0, o.buffer = c(m, a.digits, a, !0).reverse(); 30711 } 30712 } 30713 return o; 30714 }, 30715 onKeyDown: function(e, t, i, a) { 30716 var r, o, s = l(this), u = String.fromCharCode(e.keyCode).toLowerCase(); 30717 if ((o = a.shortcuts && a.shortcuts[u]) && o.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(o)), 30718 s.trigger("setvalue"), !1; 30719 if (e.ctrlKey) switch (e.keyCode) { 30720 case n.default.UP: 30721 return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(a.step)), 30722 s.trigger("setvalue"), !1; 30723 30724 case n.default.DOWN: 30725 return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(a.step)), 30726 s.trigger("setvalue"), !1; 30727 } 30728 if (!e.shiftKey && (e.keyCode === n.default.DELETE || e.keyCode === n.default.BACKSPACE || e.keyCode === n.default.BACKSPACE_SAFARI) && i.begin !== t.length) { 30729 if (t[e.keyCode === n.default.DELETE ? i.begin - 1 : i.end] === a.negationSymbol.front) return r = t.slice().reverse(), 30730 "" !== a.negationSymbol.front && r.shift(), "" !== a.negationSymbol.back && r.pop(), 30731 s.trigger("setvalue", [ r.join(""), i.begin ]), !1; 30732 if (!0 === a._radixDance) { 30733 var f = t.indexOf(a.radixPoint); 30734 if (a.digitsOptional) { 30735 if (0 === f) return (r = t.slice().reverse()).pop(), s.trigger("setvalue", [ r.join(""), i.begin >= r.length ? r.length : i.begin ]), 30736 !1; 30737 } else if (-1 !== f && (i.begin < f || i.end < f || e.keyCode === n.default.DELETE && i.begin === f)) return i.begin !== i.end || e.keyCode !== n.default.BACKSPACE && e.keyCode !== n.default.BACKSPACE_SAFARI || i.begin++, 30738 (r = t.slice().reverse()).splice(r.length - i.begin, i.begin - i.end + 1), r = c(r, a.digits, a).join(""), 30739 s.trigger("setvalue", [ r, i.begin >= r.length ? f + 1 : i.begin ]), !1; 30740 } 30741 } 30742 } 30743 }, 30744 currency: { 30745 prefix: "", 30746 groupSeparator: ",", 30747 alias: "numeric", 30748 digits: 2, 30749 digitsOptional: !1 30750 }, 30751 decimal: { 30752 alias: "numeric" 30753 }, 30754 integer: { 30755 alias: "numeric", 30756 inputmode: "numeric", 30757 digits: 0 30758 }, 30759 percentage: { 30760 alias: "numeric", 30761 min: 0, 30762 max: 100, 30763 suffix: " %", 30764 digits: 0, 30765 allowMinus: !1 30766 }, 30767 indianns: { 30768 alias: "numeric", 30769 _mask: function(e) { 30770 return "(" + e.groupSeparator + "99){*|1}(" + e.groupSeparator + "999){1|1}"; 30771 }, 30772 groupSeparator: ",", 30773 radixPoint: ".", 30774 placeholder: "0", 30775 digits: 2, 30776 digitsOptional: !1 30777 } 30778 }); 30779 }, 30780 9380: function(e, t, i) { 30781 var a; 30782 Object.defineProperty(t, "__esModule", { 30783 value: !0 30784 }), t.default = void 0; 30785 var n = ((a = i(8741)) && a.__esModule ? a : { 30786 default: a 30787 }).default ? window : {}; 30788 t.default = n; 30789 }, 30790 7760: function(e, t, i) { 30791 Object.defineProperty(t, "__esModule", { 30792 value: !0 30793 }), t.HandleNativePlaceholder = function(e, t) { 30794 var i = e ? e.inputmask : this; 30795 if (l.ie) { 30796 if (e.inputmask._valueGet() !== t && (e.placeholder !== t || "" === e.placeholder)) { 30797 var a = o.getBuffer.call(i).slice(), n = e.inputmask._valueGet(); 30798 if (n !== t) { 30799 var r = o.getLastValidPosition.call(i); 30800 -1 === r && n === o.getBufferTemplate.call(i).join("") ? a = [] : -1 !== r && f.call(i, a), 30801 p(e, a); 30802 } 30803 } 30804 } else e.placeholder !== t && (e.placeholder = t, "" === e.placeholder && e.removeAttribute("placeholder")); 30805 }, t.applyInputValue = c, t.checkVal = d, t.clearOptionalTail = f, t.unmaskedvalue = function(e) { 30806 var t = e ? e.inputmask : this, i = t.opts, a = t.maskset; 30807 if (e) { 30808 if (void 0 === e.inputmask) return e.value; 30809 e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0)); 30810 } 30811 var n = [], r = a.validPositions; 30812 for (var s in r) r[s] && r[s].match && (1 != r[s].match.static || Array.isArray(a.metadata) && !0 !== r[s].generatedInput) && n.push(r[s].input); 30813 var l = 0 === n.length ? "" : (t.isRTL ? n.reverse() : n).join(""); 30814 if ("function" == typeof i.onUnMask) { 30815 var u = (t.isRTL ? o.getBuffer.call(t).slice().reverse() : o.getBuffer.call(t)).join(""); 30816 l = i.onUnMask.call(t, u, l, i); 30817 } 30818 return l; 30819 }, t.writeBuffer = p; 30820 var a, n = (a = i(5581)) && a.__esModule ? a : { 30821 default: a 30822 }, r = i(4713), o = i(8711), s = i(7215), l = i(9845), u = i(6030); 30823 function c(e, t) { 30824 var i = e ? e.inputmask : this, a = i.opts; 30825 e.inputmask.refreshValue = !1, "function" == typeof a.onBeforeMask && (t = a.onBeforeMask.call(i, t, a) || t), 30826 d(e, !0, !1, t = t.toString().split("")), i.undoValue = i._valueGet(!0), (a.clearMaskOnLostFocus || a.clearIncomplete) && e.inputmask._valueGet() === o.getBufferTemplate.call(i).join("") && -1 === o.getLastValidPosition.call(i) && e.inputmask._valueSet(""); 30827 } 30828 function f(e) { 30829 e.length = 0; 30830 for (var t, i = r.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t); 30831 return e; 30832 } 30833 function d(e, t, i, a, n) { 30834 var l = e ? e.inputmask : this, c = l.maskset, f = l.opts, d = l.dependencyLib, h = a.slice(), m = "", v = -1, g = void 0, k = f.skipOptionalPartCharacter; 30835 f.skipOptionalPartCharacter = "", o.resetMaskSet.call(l), c.tests = {}, v = f.radixPoint ? o.determineNewCaretPosition.call(l, { 30836 begin: 0, 30837 end: 0 30838 }, !1, !1 === f.__financeInput ? "radixFocus" : void 0).begin : 0, c.p = v, l.caretPos = { 30839 begin: v 30840 }; 30841 var y = [], b = l.caretPos; 30842 if (h.forEach((function(e, t) { 30843 if (void 0 !== e) { 30844 var a = new d.Event("_checkval"); 30845 a.keyCode = e.toString().charCodeAt(0), m += e; 30846 var n = o.getLastValidPosition.call(l, void 0, !0); 30847 !function(e, t) { 30848 for (var i = r.getMaskTemplate.call(l, !0, 0).slice(e, o.seekNext.call(l, e, !1, !1)).join("").replace(/'/g, ""), a = i.indexOf(t); a > 0 && " " === i[a - 1]; ) a--; 30849 var n = 0 === a && !o.isMask.call(l, e) && (r.getTest.call(l, e).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e).match.static && r.getTest.call(l, e).match.nativeDef === "'" + t.charAt(0) || " " === r.getTest.call(l, e).match.nativeDef && (r.getTest.call(l, e + 1).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e + 1).match.static && r.getTest.call(l, e + 1).match.nativeDef === "'" + t.charAt(0))); 30850 if (!n && a > 0 && !o.isMask.call(l, e, !1, !0)) { 30851 var s = o.seekNext.call(l, e); 30852 l.caretPos.begin < s && (l.caretPos = { 30853 begin: s 30854 }); 30855 } 30856 return n; 30857 }(v, m) ? (g = u.EventHandlers.keypressEvent.call(l, a, !0, !1, i, l.caretPos.begin)) && (v = l.caretPos.begin + 1, 30858 m = "") : g = u.EventHandlers.keypressEvent.call(l, a, !0, !1, i, n + 1), g ? (void 0 !== g.pos && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static && void 0 === c.validPositions[g.pos].alternation && (y.push(g.pos), 30859 l.isRTL || (g.forwardPosition = g.pos + 1)), p.call(l, void 0, o.getBuffer.call(l), g.forwardPosition, a, !1), 30860 l.caretPos = { 30861 begin: g.forwardPosition, 30862 end: g.forwardPosition 30863 }, b = l.caretPos) : void 0 === c.validPositions[t] && h[t] === r.getPlaceholder.call(l, t) && o.isMask.call(l, t, !0) ? l.caretPos.begin++ : l.caretPos = b; 30864 } 30865 })), y.length > 0) { 30866 var x, P, E = o.seekNext.call(l, -1, void 0, !1); 30867 if (!s.isComplete.call(l, o.getBuffer.call(l)) && y.length <= E || s.isComplete.call(l, o.getBuffer.call(l)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) { 30868 var w = new d.Event("_checkval"); 30869 if ((P = c.validPositions[x]).generatedInput = !0, w.keyCode = P.input.charCodeAt(0), 30870 (g = u.EventHandlers.keypressEvent.call(l, w, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.val
vendor: 4,849 bytes, lines 30870-30945
30870idPositions[g.pos].match.static) y.push(g.pos); else if (!g) break; 30871 S++; 30872 } 30873 } 30874 t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type && l.undoValue !== o.getBuffer.call(l).join("") || "paste" === n.type)), 30875 f.skipOptionalPartCharacter = k; 30876 } 30877 function p(e, t, i, a, r) { 30878 var l = e ? e.inputmask : this, u = l.opts, c = l.dependencyLib; 30879 if (a && "function" == typeof u.onBeforeWrite) { 30880 var f = u.onBeforeWrite.call(l, a, t, i, u); 30881 if (f) { 30882 if (f.refreshFromBuffer) { 30883 var d = f.refreshFromBuffer; 30884 s.refreshFromBuffer.call(l, !0 === d ? d : d.start, d.end, f.buffer || t), t = o.getBuffer.call(l, !0); 30885 } 30886 void 0 !== i && (i = void 0 !== f.caret ? f.caret : i); 30887 } 30888 } 30889 if (void 0 !== e && (e.inputmask._valueSet(t.join("")), void 0 === i || void 0 !== a && "blur" === a.type || o.caret.call(l, e, i, void 0, void 0, void 0 !== a && "keydown" === a.type && (a.keyCode === n.default.DELETE || a.keyCode === n.default.BACKSPACE)), 30890 !0 === r)) { 30891 var p = c(e), h = e.inputmask._valueGet(); 30892 e.inputmask.skipInputEvent = !0, p.trigger("input"), setTimeout((function() { 30893 h === o.getBufferTemplate.call(l).join("") ? p.trigger("cleared") : !0 === s.isComplete.call(l, t) && p.trigger("complete"); 30894 }), 0); 30895 } 30896 } 30897 }, 30898 2394: function(e, t, i) { 30899 Object.defineProperty(t, "__esModule", { 30900 value: !0 30901 }), t.default = void 0, i(7149), i(3194); 30902 var a = i(157), n = v(i(3287)), r = v(i(9380)), o = i(2391), s = i(4713), l = i(8711), u = i(7215), c = i(7760), f = i(9716), d = v(i(7392)), p = v(i(3976)), h = v(i(8741)); 30903 function m(e) { 30904 return m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 30905 return typeof e; 30906 } : function(e) { 30907 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 30908 }, m(e); 30909 } 30910 function v(e) { 30911 return e && e.__esModule ? e : { 30912 default: e 30913 }; 30914 } 30915 var g = r.default.document, k = "_inputmask_opts"; 30916 function y(e, t, i) { 30917 if (h.default) { 30918 if (!(this instanceof y)) return new y(e, t, i); 30919 this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0, 30920 !0 !== i && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {}, 30921 e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions, 30922 this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1, 30923 this.undoValue = void 0, this.$el = void 0, this.skipKeyPressEvent = !1, this.skipInputEvent = !1, 30924 this.validationEvent = !1, this.ignorable = !1, this.maxLength, this.mouseEnter = !1, 30925 this.originalPlaceholder = void 0, this.isComposing = !1; 30926 } 30927 } 30928 function b(e, t, i) { 30929 var a = y.prototype.aliases[e]; 30930 return a ? (a.alias && b(a.alias, void 0, i), n.default.extend(!0, i, a), n.default.extend(!0, i, t), 30931 !0) : (null === i.mask && (i.mask = e), !1); 30932 } 30933 y.prototype = { 30934 dataAttribute: "data-inputmask", 30935 defaults: p.default, 30936 definitions: d.default, 30937 aliases: {}, 30938 masksCache: {}, 30939 get isRTL() { 30940 return this.opts.isRTL || this.opts.numericInput; 30941 }, 30942 mask: function(e) { 30943 var t = this; 30944 return "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), 30945 (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : Array.from(e)).forEac
vendor: 4,243 bytes, lines 30945-30999
30945h((function(e, i) { 30946 var s = n.default.extend(!0, {}, t.opts); 30947 if (function(e, t, i, a) { 30948 function o(t, n) { 30949 var o = "" === a ? t : a + "-" + t; 30950 null !== (n = void 0 !== n ? n : e.getAttribute(o)) && ("string" == typeof n && (0 === t.indexOf("on") ? n = r.default[n] : "false" === n ? n = !1 : "true" === n && (n = !0)), 30951 i[t] = n); 30952 } 30953 if (!0 === t.importDataAttributes) { 30954 var s, l, u, c, f = e.getAttribute(a); 30955 if (f && "" !== f && (f = f.replace(/'/g, '"'), l = JSON.parse("{" + f + "}")), 30956 l) for (c in u = void 0, l) if ("alias" === c.toLowerCase()) { 30957 u = l[c]; 30958 break; 30959 } 30960 for (s in o("alias", u), i.alias && b(i.alias, i, t), t) { 30961 if (l) for (c in u = void 0, l) if (c.toLowerCase() === s.toLowerCase()) { 30962 u = l[c]; 30963 break; 30964 } 30965 o(s, u); 30966 } 30967 } 30968 n.default.extend(!0, t, i), ("rtl" === e.dir || t.rightAlign) && (e.style.textAlign = "right"); 30969 ("rtl" === e.dir || t.numericInput) && (e.dir = "ltr", e.removeAttribute("dir"), 30970 t.isRTL = !0); 30971 return Object.keys(i).length; 30972 }(e, s, n.default.extend(!0, {}, t.userOptions), t.dataAttribute)) { 30973 var l = (0, o.generateMaskSet)(s, t.noMasksCache); 30974 void 0 !== l && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()), 30975 e.inputmask = new y(void 0, void 0, !0), e.inputmask.opts = s, e.inputmask.noMasksCache = t.noMasksCache, 30976 e.inputmask.userOptions = n.default.extend(!0, {}, t.userOptions), e.inputmask.el = e, 30977 e.inputmask.$el = (0, n.default)(e), e.inputmask.maskset = l, n.default.data(e, k, t.userOptions), 30978 a.mask.call(e.inputmask)); 30979 } 30980 })), e && e[0] && e[0].inputmask || this; 30981 }, 30982 option: function(e, t) { 30983 return "string" == typeof e ? this.opts[e] : "object" === m(e) ? (n.default.extend(this.userOptions, e), 30984 this.el && !0 !== t && this.mask(this.el), this) : void 0; 30985 }, 30986 unmaskedvalue: function(e) { 30987 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 30988 void 0 === this.el || void 0 !== e) { 30989 var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 30990 c.checkVal.call(this, void 0, !1, !1, t), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, l.getBuffer.call(this), 0, this.opts); 30991 } 30992 return c.unmaskedvalue.call(this, this.el); 30993 }, 30994 remove: function() { 30995 if (this.el) { 30996 n.default.data(this.el, k, null); 30997 var e = this.opts.autoUnmask ? (0, c.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask); 30998 e !== l.getBufferTemplate.call(this).join("") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(""), 30999 f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Ob
30999ject.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", { 31000 get: this.__valueGet, 31001 set: this.__valueSet, 31002 configurable: !0 31003 }) : g.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet), 31004 this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0; 31005 } 31006 return this.el; 31007 }, 31008 getemptymask: function() { 31009 return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 31010 l.getBufferTemplate.call(this).join(""); 31011 }, 31012 hasMaskedValue: function() { 31013 return !this.opts.autoUnmask; 31014 }, 31015 isComplete: function() { 31016 return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 31017 u.isComplete.call(this, l.getBuffer.call(this)); 31018 }, 31019 getmetadata: function() { 31020 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 31021 Array.isArray(this.maskset.metadata)) { 31022 var e = s.getMaskTemplate.call(this, !0, 0, !1).join(""); 31023 return this.maskset.metadata.forEach((function(t) { 31024 return t.mask !== e || (e = t, !1); 31025 })), e; 31026 } 31027 return this.maskset.metadata; 31028 }, 31029 isValid: function(e) { 31030 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 31031 e) { 31032 var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 31033 c.checkVal.call(this, void 0, !0, !1, t); 31034 } else e = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join(""); 31035 for (var i = l.getBuffer.call(this), a = l.determineLastRequiredPosition.call(this), n = i.length - 1; n > a && !l.isMask.call(this, n); n--) ; 31036 return i.splice(a, n + 1 - a), u.isComplete.call(this, i) && e === (this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join("")); 31037 }, 31038 format: function(e, t) { 31039 this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache); 31040 var i = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 31041 c.checkVal.call(this, void 0, !0, !1, i); 31042 var a = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join(""); 31043 return t ? { 31044 value: a, 31045 metadata: this.getmetadata() 31046 } : a; 31047 }, 31048 setValue: function(e) { 31049 this.el && (0, n.default)(this.el).trigger("setvalue", [ e ]); 31050 }, 31051 analyseMask: o.analyseMask 31052 }, y.extendDefaults = function(e) { 31053 n.default.extend(!0, y.prototype.defaults, e); 31054 }, y.extendDefinitions = function(e) { 31055 n.default.extend(!0, y.prototype.definitions, e); 31056 }, y.extendAliases = function(e) { 31057 n.default.extend(!0, y.prototype.aliases, e); 31058 }, y.format = function(e, t, i) { 31059 return y(t).format(e, i); 31060 }, y.unmask = function(e, t) { 31061 return y(t).unmaskedvalue(e); 31062 }, y.isValid = function(e, t) { 31063 return y(t).isValid(e); 31064 }, y.remove = function(e) { 31065 "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) { 31066 e.inputmask && e.inputmask.remove(); 31067 })); 31068 }, y.setValue = function(e, t) { 31069 "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
31070 e.inputmask ? e.inputmask.setValue(t) : (0, n.default)(e).trigger("setvalue", [ t ]); 31071 })); 31072 }, y.dependencyLib = n.default, r.default.Inputmask = y; 31073 var x = y; 31074 t.default = x; 31075 }, 31076 5296: function(e, t, i) { 31077 function a(e) { 31078 return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 31079 return typeof e; 31080 } : function(e) { 31081 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 31082 }, a(e); 31083 } 31084 var n = h(i(9380)), r = h(i(2394)), o = h(i(8741)); 31085 function s(e, t) { 31086 for (var i = 0; i < t.length; i++) { 31087 var a = t[i]; 31088 a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), 31089 Object.defineProperty(e, a.key, a); 31090 } 31091 } 31092 function l(e, t) { 31093 if (t && ("object" === a(t) || "function" == typeof t)) return t; 31094 if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined"); 31095 return function(e) { 31096 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 31097 return e; 31098 }(e); 31099 } 31100 function u(e) { 31101 var t = "function" == typeof Map ? new Map : void 0; 31102 return u = function(e) { 31103 if (null === e || (i = e, -1 === Function.toString.call(i).indexOf("[native code]"))) return e; 31104 var i; 31105 if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function"); 31106 if (void 0 !== t) { 31107 if (t.has(e)) return t.get(e); 31108 t.set(e, a); 31109 } 31110 function a() { 31111 return c(e, arguments, p(this).constructor); 31112 } 31113 return a.prototype = Object.create(e.prototype, { 31114 constructor: { 31115 value: a, 31116 enumerable: !1, 31117 writable: !0, 31118 configurable: !0 31119 } 31120 }), d(a, e); 31121 }, u(e); 31122 } 31123 function c(e, t, i) { 31124 return c = f() ? Reflect.construct : function(e, t, i) { 31125 var a = [ null ]; 31126 a.push.apply(a, t); 31127 var n = new (Function.bind.apply(e, a)); 31128 return i && d(n, i.prototype), n; 31129 }, c.apply(null, arguments); 31130 } 31131 function f() { 31132 if ("undefined" == typeof Reflect || !Reflect.construct) return !1; 31133 if (Reflect.construct.sham) return !1; 31134 if ("function" == typeof Proxy) return !0; 31135 try { 31136 return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), 31137 !0; 31138 } catch (e) { 31139 return !1; 31140 } 31141 } 31142 function d(e, t) { 31143 return d = Object.setPrototypeOf || function(e, t) { 31144 return e.__proto__ = t, e; 31145 }, d(e, t); 31146 } 31147 function p(e) { 31148 return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { 31149 return e.__proto__ || Object.getPrototypeOf(e); 31150 }, p(e); 31151 } 31152 function h(e) {
31153 return e && e.__esModule ? e : { 31154 default: e 31155 }; 31156 } 31157 var m = n.default.document; 31158 if (o.default && m && m.head && m.head.attachShadow && n.default.customElements && void 0 === n.default.customElements.get("input-mask")) { 31159 var v = function(e) { 31160 !function(e, t) { 31161 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); 31162 Object.defineProperty(e, "prototype", { 31163 value: Object.create(t && t.prototype, { 31164 constructor: { 31165 value: e, 31166 writable: !0, 31167 configurable: !0 31168 } 31169 }), 31170 writable: !1 31171 }), t && d(e, t); 31172 }(c, e); 31173 var t, i, a, n, o, u = (t = c, i = f(), function() { 31174 var e, a = p(t); 31175 if (i) { 31176 var n = p(this).constructor; 31177 e = Reflect.construct(a, arguments, n); 31178 } else e = a.apply(this, arguments); 31179 return l(this, e); 31180 }); 31181 function c() { 31182 var e; 31183 !function(e, t) { 31184 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 31185 }(this, c); 31186 var t = (e = u.call(this)).getAttributeNames(), i = e.attachShadow({ 31187 mode: "closed" 31188 }), a = m.createElement("input"); 31189 for (var n in a.type = "text", i.appendChild(a), t) Object.prototype.hasOwnProperty.call(t, n) && a.setAttribute(t[n], e.getAttribute(t[n])); 31190 var o = new r.default; 31191 return o.dataAttribute = "", o.mask(a), a.inputmask.shadowRoot = i, e; 31192 } 31193 return a = c, n && s(a.prototype, n), o && s(a, o), Object.defineProperty(a, "prototype", { 31194 writable: !1 31195 }), a; 31196 }(u(HTMLElement)); 31197 n.default.customElements.define("input-mask", v); 31198 } 31199 }, 31200 443: function(e, t, i) { 31201 var a = o(i(2047)), n = o(i(2394)); 31202 function r(e) { 31203 return r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 31204 return typeof e; 31205 } : function(e) { 31206 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 31207 }, r(e); 31208 } 31209 function o(e) { 31210 return e && e.__esModule ? e : { 31211 default: e 31212 }; 31213 } 31214 void 0 === a.default.fn.inputmask && (a.default.fn.inputmask = function(e, t) { 31215 var i, o = this[0]; 31216 if (void 0 === t && (t = {}), "string" == typeof e) switch (e) { 31217 case "unmaskedvalue": 31218 return o && o.inputmask ? o.inputmask.unmaskedvalue() : (0, a.default)(o).val(); 31219 31220 case "remove": 31221 return this.each((function() { 31222 this.inputmask && this.inputmask.remove(); 31223 })); 31224 31225 case "getemptymask": 31226 return o && o.inputmask ? o.inputmask.getemptymask() : ""; 31227 31228 case "hasMaskedValue": 31229 return !(!o || !o.inputmask) && o.inputmask.hasMaskedValue(); 31230 31231 case "isComplete": 31232 return !o || !o.inputmask || o.inputmask.isComplete(); 31233 31234 case "getmetadata": 31235 return o && o.inputmask ? o.inputmask.getmetadata() : void 0; 31236 31237 case "setvalue": 31238 n.default.setValue(o, t); 31239 break; 31240 31241 case "option": 31242 if ("string" != typeof t) return this.each((function() { 31243 if (void 0 !== this.inputmask) return this.inputmask.option(t); 31244 })); 31245 if (o && void 0 !== o.inputmask) return o.inputmask.option(t); 31246 break; 31247 31248 default: 31249 return t.alias = e, i = new n.default(t), this.each((function() { 31250 i.mask(this); 31251 })); 31252 } else { 31253 if (Array.isArray(e)) return t.alias = e, i = new n.default(t), this.each((function() { 31254 i.mask(this); 31255 })); 31256 if ("object" == r(e)) return i = new n.default(e), void 0 === e.mask && void 0 === e.alias ? this.each((function() { 31257 if (void 0 !== this.inputmask) return this.inputmask.option(e); 31258 i.mask(this); 31259 })) : this.each((function() { 31260 i.mask(this); 31261 })); 31262 if (void 0 === e) return this.each((function() { 31263 (i = new n.default(t)).mask(this); 31264 })); 31265 } 31266 }); 31267 }, 31268 2391: function(e, t, i) { 31269 Object.defineProperty(t, "__esModule", { 31270 value: !0 31271 }), t.analyseMask = function(e, t, i) { 31272 var a, o, s, l, u, c, f = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, d = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, p = !1, h = new n.default, m = [], v = [], g = !1; 31273 function k(e, a, n) { 31274 n = void 0 !== n ? n : e.matches.length; 31275 var o = e.matches[n - 1]; 31276 if (t) 0 === a.indexOf("[") || p && /\\d|\\s|\\w/i.test(a) || "." === a ? e.matches.splice(n++, 0, { 31277 fn: new RegExp(a, i.casing ? "i" : ""), 31278 static: !1, 31279 optionality: !1, 31280 newBlockMarker: void 0 === o ? "master" : o.def !== a, 31281 casing: null, 31282 def: a, 31283 placeholder: void 0, 31284 nativeDef: a 31285 }) : (p && (a = a[a.length - 1]), a.split("").forEach((function(t, a) { 31286 o = e.matches[n - 1], e.matches.splice(n++, 0, { 31287 fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp("[" + (i.staticDefinitionSymbol || t) + "]", i.casing ? "i" : "") : null, 31288 static: !0, 31289 optionality: !1, 31290 newBlockMarker: void 0 === o ? "master" : o.def !== t && !0 !== o.static, 31291 casing: null, 31292 def: i.staticDefinitionSymbol || t, 31293 placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0, 31294 nativeDef: (p ? "'" : "") + t 31295 }); 31296 }))), p = !1; else { 31297 var s = i.definitions && i.definitions[a] || i.usePrototypeDefinitions && r.default.prototype.definitions[a]; 31298 s && !p ? e.matches.splice(n++, 0, { 31299 fn: s.validator ? "string" == typeof s.validator ? new RegExp(s.validator, i.casing ? "i" : "") : new function() { 31300 this.test = s.validator; 31301 } : new RegExp("."), 31302 static: s.static || !1, 31303 optionality: s.optional || !1, 31304 newBlockMarker: void 0 === o || s.optional ? "master" : o.def !== (s.definitionSymbol || a), 31305 casing: s.casing, 31306 def: s.definitionSymbol || a, 31307 placeholder: s.placeholder, 31308 nativeDef: a, 31309 generated: s.generated 31310 }) : (e.matches.splice(n++, 0, { 31311 fn: /[a-z]/i.test(i.staticDefinitionSymbol || a) ? new RegExp("[" + (i.staticDefinitionSymbol || a) + "]", i.casing ? "i" : "") : null, 31312 static: !0, 31313 optionality: !1, 31314 newBlockMarker: void 0 === o ? "master" : o.def !== a && !0 !== o.static, 31315 casing: null, 31316 def: i.staticDefinitionSymbol || a, 31317 placeholder: void 0 !== i.staticDefinitionSymbol ? a : void 0, 31318 nativeDef: (p ? "'" : "") + a 31319 }), p = !1); 31320 } 31321 } 31322 function y() { 31323 if (m.length > 0) { 31324 if (k(l = m[m.length - 1], o), l.isAlternator) { 31325 u = m.pop(); 31326 for (var e = 0; e < u.matches.length; e++) u.matches[e].isGroup && (u.matches[e].isGroup = !1); 31327 m.length > 0 ? (l = m[m.length - 1]).matches.push(u) : h.matches.push(u); 31328 } 31329 } else k(h, o); 31330 } 31331 function b(e) { 31332 var t = new n.default(!0); 31333 return t.openGroup = !1, t.matches = e, t; 31334 } 31335 function x() { 31336 if ((s = m.pop()).openGroup = !1, void 0 !== s) if (m.length > 0) { 31337 if ((l = m[m.length - 1]).matches.push(s), l.isAlternator) { 31338 for (var e = (u = m.pop()).matches[0].matches ? u.matches[0].matches.length : 1, t = 0; t < u.matches.length; t++) u.matches[t].isGroup = !1, 31339 u.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (u.matches[t].matches ? u.matches[t].matches.length : 1) && (i.keepStatic = !0), 31340 e = u.matches[t].matches ? u.matches[t].matches.length : 1; 31341 m.length > 0 ? (l = m[m.length - 1]).matches.push(u) : h.matches.push(u); 31342 } 31343 } else h.matches.push(s); else y(); 31344 } 31345 function P(e) { 31346 var t = e.pop(); 31347 return t.isQuantifier && (t = b([ e.pop(), t ])), t; 31348 } 31349 t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0); 31350 for (;a = t ? d.exec(e) : f.exec(e); ) { 31351 if (o = a[0], t) { 31352 switch (o.charAt(0)) { 31353 case "?": 31354 o = "{0,1}"; 31355 break; 31356 31357 case "+": 31358 case "*": 31359 o = "{" + o + "}"; 31360 break; 31361 31362 case "|": 31363 if (0 === m.length) { 31364 var E = b(h.matches); 31365 E.openGroup = !0, m.push(E), h.matches = [], g = !0; 31366 } 31367 } 31368 if ("\\d" === o) o = "[0-9]"; 31369 } 31370 if (p) y(); else switch (o.charAt(0)) { 31371 case "$": 31372 case "^": 31373 t || y(); 31374 break; 31375 31376 case i.escapeChar: 31377 p = !0, t && y(); 31378 break; 31379 31380 case i.optionalmarker[1]: 31381 case i.groupmarker[1]: 31382 x(); 31383 break; 31384 31385 case i.optionalmarker[0]: 31386 m.push(new n.default(!1, !0)); 31387 break; 31388 31389 case i.groupmarker[0]: 31390 m.push(new n.default(!0)); 31391 break; 31392 31393 case i.quantifiermarker[0]: 31394 var S = new n.default(!1, !1, !0), w = (o = o.replace(/[{}?]/g, "")).split("|"), _ = w[0].split(","), M = isNaN(_[0]) ? _[0] : parseInt(_[0]), O = 1 === _.length ? M : isNaN(_[1]) ? _[1] : parseInt(_[1]), T = isNaN(w[1]) ? w[1] : parseInt(w[1]); 31395 "*" !== M && "+" !== M || (M = "*" === O ? 0 : 1), S.quantifier = { 31396 min: M, 31397 max: O, 31398 jit: T 31399 }; 31400 var A = m.length > 0 ? m[m.length - 1].matches : h.matches; 31401 if ((a = A.pop()).isAlternator) { 31402 A.push(a), A = a.matches; 31403 var C = new n.default(!0), D = A.pop(); 31404 A.push(C), A = C.matches, a = D; 31405 } 31406 a.isGroup || (a = b([ a ])), A.push(a), A.push(S); 31407 break; 31408 31409 case i.alternatormarker: 31410 if (m.length > 0) { 31411 var j = (l = m[m.length - 1]).matches[l.matches.length - 1]; 31412 c = l.openGroup && (void 0 === j.matches || !1 === j.isGroup && !1 === j.isAlternator) ? m.pop() : P(l.matches); 31413 } else c = P(h.matches); 31414 if (c.isAlternator) m.push(c); else if (c.alternatorGroup ? (u = m.pop(), c.alternatorGroup = !1) : u = new n.default(!1, !1, !1, !0), 31415 u.matches.push(c), m.push(u), c.openGroup) { 31416 c.openGroup = !1; 31417 var B = new n.default(!0); 31418 B.alternatorGroup = !0, m.push(B); 31419 } 31420 break; 31421 31422 default: 31423 y(); 31424 } 31425 } 31426 g && x(); 31427 for (;m.length > 0; ) s = m.pop(), h.matches.push(s); 31428 h.matches.length > 0 && (!function e(a) {
31429 a && a.matches && a.matches.forEach((function(n, r) { 31430 var o = a.matches[r + 1]; 31431 (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && n && n.isGroup && (n.isGroup = !1, 31432 t || (k(n, i.groupmarker[0], 0), !0 !== n.openGroup && k(n, i.groupmarker[1]))), 31433 e(n); 31434 })); 31435 }(h), v.push(h)); 31436 (i.numericInput || i.isRTL) && function e(t) { 31437 for (var a in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, a)) { 31438 var n = parseInt(a); 31439 if (t.matches[a].isQuantifier && t.matches[n + 1] && t.matches[n + 1].isGroup) { 31440 var r = t.matches[a]; 31441 t.matches.splice(a, 1), t.matches.splice(n + 1, 0, r); 31442 } 31443 void 0 !== t.matches[a].matches ? t.matches[a] = e(t.matches[a]) : t.matches[a] = ((o = t.matches[a]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]), 31444 o); 31445 } 31446 var o; 31447 return t; 31448 }(v[0]); 31449 return v; 31450 }, t.generateMaskSet = function(e, t) { 31451 var i; 31452 function n(e, i, n) { 31453 var o, s, l = !1; 31454 if (null !== e && "" !== e || ((l = null !== n.regex) ? e = (e = n.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (l = !0, 31455 e = ".*")), 1 === e.length && !1 === n.greedy && 0 !== n.repeat && (n.placeholder = ""), 31456 n.repeat > 0 || "*" === n.repeat || "+" === n.repeat) { 31457 var u = "*" === n.repeat ? 0 : "+" === n.repeat ? 1 : n.repeat; 31458 e = n.groupmarker[0] + e + n.groupmarker[1] + n.quantifiermarker[0] + u + "," + n.repeat + n.quantifiermarker[1]; 31459 } 31460 return s = l ? "regex_" + n.regex : n.numericInput ? e.split("").reverse().join("") : e, 31461 null !== n.keepStatic && (s = "ks_" + n.keepStatic + s), void 0 === r.default.prototype.masksCache[s] || !0 === t ? (o = { 31462 mask: e, 31463 maskToken: r.default.prototype.analyseMask(e, l, n), 31464 validPositions: {}, 31465 _buffer: void 0, 31466 buffer: void 0, 31467 tests: {}, 31468 excludes: {}, 31469 metadata: i, 31470 maskLength: void 0, 31471 jitOffset: {} 31472 }, !0 !== t && (r.default.prototype.masksCache[s] = o, o = a.default.extend(!0, {}, r.default.prototype.masksCache[s]))) : o = a.default.extend(!0, {}, r.default.prototype.masksCache[s]), 31473 o; 31474 } 31475 "function" == typeof e.mask && (e.mask = e.mask(e)); 31476 if (Array.isArray(e.mask)) { 31477 if (e.mask.length > 1) { 31478 null === e.keepStatic && (e.keepStatic = !0); 31479 var o = e.groupmarker[0]; 31480 return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) { 31481 o.length > 1 && (o += e.alternatormarker), void 0 !== t.mask && "function" != typeof t.mask ? o += t.mask : o += t; 31482 })), n(o += e.groupmarker[1], e.mask, e); 31483 } 31484 e.mask = e.mask.pop(); 31485 } 31486 i = e.mask && void 0 !== e.mask.mask && "function" != typeof e.mask.mask ? n(e.mask.mask, e.mask, e) : n(e.mask, e.mask, e); 31487 null === e.keepStatic && (e.keepStatic = !1); 31488 return i; 31489 }; 31490 var a = o(i(3287)), n = o(i(9695)), r = o(i(2394)); 31491 function o(e) {
vendor: 59,793 bytes, lines 31492-32321
31492 return e && e.__esModule ? e : { 31493 default: e 31494 }; 31495 } 31496 }, 31497 157: function(e, t, i) { 31498 Object.defineProperty(t, "__esModule", { 31499 value: !0 31500 }), t.mask = function() { 31501 var e = this, t = this.opts, i = this.el, a = this.dependencyLib; 31502 s.EventRuler.off(i); 31503 var f = function(t, i) { 31504 "textarea" !== t.tagName.toLowerCase() && i.ignorables.push(n.default.ENTER); 31505 var l = t.getAttribute("type"), u = "input" === t.tagName.toLowerCase() && i.supportsInputType.includes(l) || t.isContentEditable || "textarea" === t.tagName.toLowerCase(); 31506 if (!u) if ("input" === t.tagName.toLowerCase()) { 31507 var c = document.createElement("input"); 31508 c.setAttribute("type", l), u = "text" === c.type, c = null; 31509 } else u = "partial"; 31510 return !1 !== u ? function(t) { 31511 var n, l; 31512 function u() { 31513 return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== r.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? o.clearOptionalTail.call(e, r.getBuffer.call(e).slice()).reverse() : o.clearOptionalTail.call(e, r.getBuffer.call(e).slice())).join("") : n.call(this) : "" : n.call(this); 31514 } 31515 function c(e) { 31516 l.call(this, e), this.inputmask && (0, o.applyInputValue)(this, e); 31517 } 31518 if (!t.inputmask.__valueGet) { 31519 if (!0 !== i.noValuePatching) { 31520 if (Object.getOwnPropertyDescriptor) { 31521 var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0; 31522 f && f.get && f.set ? (n = f.get, l = f.set, Object.defineProperty(t, "value", { 31523 get: u, 31524 set: c, 31525 configurable: !0 31526 })) : "input" !== t.tagName.toLowerCase() && (n = function() { 31527 return this.textContent; 31528 }, l = function(e) { 31529 this.textContent = e; 31530 }, Object.defineProperty(t, "value", { 31531 get: u, 31532 set: c, 31533 configurable: !0 31534 })); 31535 } else document.__lookupGetter__ && t.__lookupGetter__("value") && (n = t.__lookupGetter__("value"), 31536 l = t.__lookupSetter__("value"), t.__defineGetter__("value", u), t.__defineSetter__("value", c)); 31537 t.inputmask.__valueGet = n, t.inputmask.__valueSet = l; 31538 } 31539 t.inputmask._valueGet = function(t) { 31540 return e.isRTL && !0 !== t ? n.call(this.el).split("").reverse().join("") : n.call(this.el); 31541 }, t.inputmask._valueSet = function(t, i) { 31542 l.call(this.el, null == t ? "" : !0 !== i && e.isRTL ? t.split("").reverse().join("") : t); 31543 }, void 0 === n && (n = function() { 31544 return this.value; 31545 }, l = function(e) { 31546 this.value = e; 31547 }, function(t) { 31548 if (a.valHooks && (void 0 === a.valHooks[t] || !0 !== a.valHooks[t].inputmaskpatch)) { 31549 var n = a.valHooks[t] && a.valHooks[t].get ? a.valHooks[t].get : function(e) { 31550 return e.value; 31551 }, s = a.valHooks[t] && a.valHooks[t].set ? a.valHooks[t].set : function(e, t) { 31552 return e.value = t, e; 31553 }; 31554 a.valHooks[t] = { 31555 get: function(t) { 31556 if (t.inputmask) { 31557 if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue(); 31558 var a = n(t); 31559 return -1 !== r.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? a : ""; 31560 } 31561 return n(t); 31562 }, 31563 set: function(e, t) { 31564 var i = s(e, t); 31565 return e.inputmask && (0, o.applyInputValue)(e, t), i; 31566 }, 31567 inputmaskpatch: !0 31568 }; 31569 } 31570 }(t.type), function(t) { 31571 s.EventRuler.on(t, "mouseenter", (function() { 31572 var t = this.inputmask._valueGet(!0); 31573 t !== (e.isRTL ? r.getBuffer.call(e).reverse() : r.getBuffer.call(e)).join("") && (0, 31574 o.applyInputValue)(this, t); 31575 })); 31576 }(t)); 31577 } 31578 }(t) : t.inputmask = void 0, u; 31579 }(i, t); 31580 if (!1 !== f) { 31581 e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0, 31582 -1 === e.maxLength && (e.maxLength = void 0), "inputMode" in i && null === i.getAttribute("inputmode") && (i.inputMode = t.inputmode, 31583 i.setAttribute("inputmode", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ "cc-number", "cc-exp" ].indexOf(i.autocomplete), 31584 l.iphone && (t.insertModeVisual = !1), s.EventRuler.on(i, "submit", c.EventHandlers.submitEvent), 31585 s.EventRuler.on(i, "reset", c.EventHandlers.resetEvent), s.EventRuler.on(i, "blur", c.EventHandlers.blurEvent), 31586 s.EventRuler.on(i, "focus", c.EventHandlers.focusEvent), s.EventRuler.on(i, "invalid", c.EventHandlers.invalidEvent), 31587 s.EventRuler.on(i, "click", c.EventHandlers.clickEvent), s.EventRuler.on(i, "mouseleave", c.EventHandlers.mouseleaveEvent), 31588 s.EventRuler.on(i, "mouseenter", c.EventHandlers.mouseenterEvent), s.EventRuler.on(i, "paste", c.EventHandlers.pasteEvent), 31589 s.EventRuler.on(i, "cut", c.EventHandlers.cutEvent), s.EventRuler.on(i, "complete", t.oncomplete), 31590 s.EventRuler.on(i, "incomplete", t.onincomplete), s.EventRuler.on(i, "cleared", t.oncleared), 31591 !0 !== t.inputEventOnly && (s.EventRuler.on(i, "keydown", c.EventHandlers.keydownEvent), 31592 s.EventRuler.on(i, "keypress", c.EventHandlers.keypressEvent), s.EventRuler.on(i, "keyup", c.EventHandlers.keyupEvent)), 31593 (l.mobile || t.inputEventOnly) && i.removeAttribute("maxLength"), s.EventRuler.on(i, "input", c.EventHandlers.inputFallBackEvent), 31594 s.EventRuler.on(i, "compositionend", c.EventHandlers.compositionendEvent)), s.EventRuler.on(i, "setvalue", c.EventHandlers.setValueEvent), 31595 r.getBufferTemplate.call(e).join(""), e.undoValue = e._valueGet(!0); 31596 var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement; 31597 if ("" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) { 31598 (0, o.applyInputValue)(i, i.inputmask._valueGet(!0), t); 31599 var p = r.getBuffer.call(e).slice(); 31600 !1 === u.isComplete.call(e, p) && t.clearIncomplete && r.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === r.getLastValidPosition.call(e) ? p = [] : o.clearOptionalTail.call(e, p)), 31601 (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || "" !== i.inputmask._valueGet(!0)) && (0, 31602 o.writeBuffer)(i, p), d === i && r.caret.call(e, i, r.seekNext.call(e, r.getLastValidPosition.call(e))); 31603 } 31604 } 31605 }; 31606 var a, n = (a = i(5581)) && a.__esModule ? a : { 31607 default: a 31608 }, r = i(8711), o = i(7760), s = i(9716), l = i(9845), u = i(7215), c = i(6030); 31609 }, 31610 9695: function(e, t) { 31611 Object.defineProperty(t, "__esModule", { 31612 value: !0 31613 }), t.default = function(e, t, i, a) { 31614 this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1, 31615 this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = a || !1, 31616 this.quantifier = { 31617 min: 1, 31618 max: 1 31619 }; 31620 }; 31621 }, 31622 3194: function() { 31623 Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", { 31624 value: function(e, t) { 31625 if (null == this) throw new TypeError('"this" is null or not defined'); 31626 var i = Object(this), a = i.length >>> 0; 31627 if (0 === a) return !1; 31628 for (var n = 0 | t, r = Math.max(n >= 0 ? n : a - Math.abs(n), 0); r < a; ) { 31629 if (i[r] === e) return !0; 31630 r++; 31631 } 31632 return !1; 31633 } 31634 }); 31635 }, 31636 7149: function() { 31637 function e(t) { 31638 return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 31639 return typeof e; 31640 } : function(e) { 31641 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 31642 }, e(t); 31643 } 31644 "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e("test".__proto__) ? function(e) { 31645 return e.__proto__; 31646 } : function(e) { 31647 return e.constructor.prototype; 31648 }); 31649 }, 31650 8711: function(e, t, i) { 31651 Object.defineProperty(t, "__esModule", { 31652 value: !0 31653 }), t.caret = function(e, t, i, a, n) { 31654 var r, o = this, s = this.opts; 31655 if (void 0 === t) return "selectionStart" in e && "selectionEnd" in e ? (t = e.selectionStart, 31656 i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset, 31657 i = r.endOffset) : document.selection && document.selection.createRange && (r = document.selection.createRange(), 31658 t = 0 - r.duplicate().moveStart("character", -e.inputmask._valueGet().length), i = t + r.text.length), 31659 { 31660 begin: a ? t : u.call(o, t), 31661 end: a ? i : u.call(o, i) 31662 }; 31663 if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]), 31664 void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin), 31665 "number" == typeof t) { 31666 t = a ? t : u.call(o, t), i = "number" == typeof (i = a ? i : u.call(o, i)) ? i : t; 31667 var l = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i; 31668 if (e.scrollLeft = l > e.scrollWidth ? l : 0, e.inputmask.caretPos = { 31669 begin: t, 31670 end: i 31671 }, s.insertModeVisual && !1 === s.insertMode && t === i && (n || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if ("setSelectionRange" in e) e.setSelectionRange(t, i); else if (window.getSelection) { 31672 if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) { 31673 var c = document.createTextNode(""); 31674 e.appendChild(c); 31675 } 31676 r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length), 31677 r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length), 31678 r.collapse(!0); 31679 var f = window.getSelection(); 31680 f.removeAllRanges(), f.addRange(r); 31681 } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd("character", i), 31682 r.moveStart("character", t), r.select()); 31683 } 31684 }, t.determineLastRequiredPosition = function(e) { 31685 var t, i, r = this, s = this.maskset, l = this.dependencyLib, u = a.getMaskTemplate.call(r, !0, o.call(r), !0, !0), c = u.length, f = o.call(r), d = {}, p = s.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0; 31686 for (t = f + 1; t < u.length; t++) i = a.getTestTemplate.call(r, t, h, t - 1), h = i.locator.slice(), 31687 d[t] = l.extend(!0, {}, i); 31688 var m = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0; 31689 for (t = c - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || m && (m !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && n.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(","), m.toString().split(",")) && "" !== a.getTests.call(r, t)[0].def)) && u[t] === a.getPlaceholder.call(r, t, i.match)); t--) c--; 31690 return e ? { 31691 l: c, 31692 def: d[c] ? d[c].match : void 0 31693 } : c; 31694 }, t.determineNewCaretPosition = function(e, t, i) { 31695 var n = this, u = this.maskset, c = this.opts; 31696 t && (n.isRTL ? e.end = e.begin : e.begin = e.end); 31697 if (e.begin === e.end) { 31698 switch (i = i || c.positionCaretOnClick) { 31699 case "none": 31700 break; 31701 31702 case "select": 31703 e = { 31704 begin: 0, 31705 end: r.call(n).length 31706 }; 31707 break; 31708 31709 case "ignore": 31710 e.end = e.begin = l.call(n, o.call(n)); 31711 break; 31712 31713 case "radixFocus": 31714 if (function(e) { 31715 if ("" !== c.radixPoint && 0 !== c.digits) { 31716 var t = u.validPositions; 31717 if (void 0 === t[e] || t[e].input === a.getPlaceholder.call(n, e)) { 31718 if (e < l.call(n, -1)) return !0; 31719 var i = r.call(n).indexOf(c.radixPoint); 31720 if (-1 !== i) { 31721 for (var o in t) if (t[o] && i < o && t[o].input !== a.getPlaceholder.call(n, o)) return !1; 31722 return !0; 31723 } 31724 } 31725 } 31726 return !1; 31727 }(e.begin)) { 31728 var f = r.call(n).join("").indexOf(c.radixPoint); 31729 e.end = e.begin = c.numericInput ? l.call(n, f) : f; 31730 break; 31731 } 31732 31733 default: 31734 var d = e.begin, p = o.call(n, d, !0), h = l.call(n, -1 !== p || s.call(n, 0) ? p : -1); 31735 if (d <= h) e.end = e.begin = s.call(n, d, !1, !0) ? d : l.call(n, d); else { 31736 var m = u.validPositions[p], v = a.getTestTemplate.call(n, h, m ? m.match.locator : void 0, m), g = a.getPlaceholder.call(n, h, v.match); 31737 if ("" !== g && r.call(n)[h] !== g && !0 !== v.match.optionalQuantifier && !0 !== v.match.newBlockMarker || !s.call(n, h, c.keepStatic, !0) && v.match.def === g) { 31738 var k = l.call(n, h); 31739 (d >= k || d === h) && (h = k); 31740 } 31741 e.end = e.begin = h; 31742 } 31743 } 31744 return e; 31745 } 31746 }, t.getBuffer = r, t.getBufferTemplate = function() { 31747 var e = this.maskset; 31748 void 0 === e._buffer && (e._buffer = a.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice())); 31749 return e._buffer; 31750 }, t.getLastValidPosition = o, t.isMask = s, t.resetMaskSet = function(e) { 31751 var t = this.maskset; 31752 t.buffer = void 0, !0 !== e && (t.validPositions = {}, t.p = 0); 31753 }, t.seekNext = l, t.seekPrevious = function(e, t) { 31754 var i = this, n = e - 1; 31755 if (e <= 0) return 0; 31756 for (;n > 0 && (!0 === t && (!0 !== a.getTest.call(i, n).match.newBlockMarker || !s.call(i, n, void 0, !0)) || !0 !== t && !s.call(i, n, void 0, !0)); ) n--; 31757 return n; 31758 }, t.translatePosition = u; 31759 var a = i(4713), n = i(7215); 31760 function r(e) { 31761 var t = this.maskset; 31762 return void 0 !== t.buffer && !0 !== e || (t.buffer = a.getMaskTemplate.call(this, !0, o.call(this), !0), 31763 void 0 === t._buffer && (t._buffer = t.buffer.slice())), t.buffer; 31764 } 31765 function o(e, t, i) { 31766 var a = this.maskset, n = -1, r = -1, o = i || a.validPositions; 31767 for (var s in void 0 === e && (e = -1), o) { 31768 var l = parseInt(s); 31769 o[l] && (t || !0 !== o[l].generatedInput) && (l <= e && (n = l), l >= e && (r = l)); 31770 } 31771 return -1 === n || n == e ? r : -1 == r || e - n < r - e ? n : r; 31772 } 31773 function s(e, t, i) { 31774 var n = this, r = this.maskset, o = a.getTestTemplate.call(n, e).match; 31775 if ("" === o.def && (o = a.getTest.call(n, e).match), !0 !== o.static) return o.fn; 31776 if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0; 31777 if (!0 !== t && e > -1) { 31778 if (i) { 31779 var s = a.getTests.call(n, e); 31780 return s.length > 1 + ("" === s[s.length - 1].match.def ? 1 : 0); 31781 } 31782 var l = a.determineTestTemplate.call(n, e, a.getTests.call(n, e)), u = a.getPlaceholder.call(n, e, l.match); 31783 return l.match.def !== u; 31784 } 31785 return !1; 31786 } 31787 function l(e, t, i) { 31788 var n = this; 31789 void 0 === i && (i = !0); 31790 for (var r = e + 1; "" !== a.getTest.call(n, r).match.def && (!0 === t && (!0 !== a.getTest.call(n, r).match.newBlockMarker || !s.call(n, r, void 0, !0)) || !0 !== t && !s.call(n, r, void 0, i)); ) r++; 31791 return r; 31792 } 31793 function u(e) { 31794 var t = this.opts, i = this.el; 31795 return !this.isRTL || "number" != typeof e || t.greedy && "" === t.placeholder || !i || (e = Math.abs(this._valueGet().length - e)), 31796 e; 31797 } 31798 }, 31799 4713: function(e, t, i) { 31800 Object.defineProperty(t, "__esModule", { 31801 value: !0 31802 }), t.determineTestTemplate = u, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, a, n) { 31803 var r = this, o = this.opts, c = this.maskset, f = o.greedy; 31804 n && o.greedy && (o.greedy = !1, r.maskset.tests = {}); 31805 t = t || 0; 31806 var p, h, m, v, g = [], k = 0; 31807 do { 31808 if (!0 === e && c.validPositions[k]) m = n && c.validPositions[k].match.optionality && void 0 === c.validPositions[k + 1] && (!0 === c.validPositions[k].generatedInput || c.validPositions[k].input == o.skipOptionalPartCharacter && k > 0) ? u.call(r, k, d.call(r, k, p, k - 1)) : c.validPositions[k], 31809 h = m.match, p = m.locator.slice(), g.push(!0 === i ? m.input : !1 === i ? h.nativeDef : s.call(r, k, h)); else { 31810 m = l.call(r, k, p, k - 1), h = m.match, p = m.locator.slice(); 31811 var y = !0 !== a && (!1 !== o.jitMasking ? o.jitMasking : h.jit); 31812 (v = (v && h.static && h.def !== o.groupSeparator && null === h.fn || c.validPositions[k - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && c.tests[k] && 1 === c.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === i ? h.nativeDef : s.call(r, k, h)) : v = !1; 31813 } 31814 k++; 31815 } while (!0 !== h.static || "" !== h.def || t > k); 31816 "" === g[g.length - 1] && g.pop(); 31817 !1 === i && void 0 !== c.maskLength || (c.maskLength = k - 1); 31818 return o.greedy = f, g; 31819 }, t.getPlaceholder = s, t.getTest = c, t.getTestTemplate = l, t.getTests = d, t.isSubsetOf = f; 31820 var a, n = (a = i(2394)) && a.__esModule ? a : { 31821 default: a 31822 }; 31823 function r(e, t) { 31824 var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join(""); 31825 if ("" !== i) for (;i.length < t; ) i += "0"; 31826 return i; 31827 } 31828 function o(e) { 31829 var t = e.locator[e.alternation]; 31830 return "string" == typeof t && t.length > 0 && (t = t.split(",")[0]), void 0 !== t ? t.toString() : ""; 31831 } 31832 function s(e, t, i) { 31833 var a = this.opts, n = this.maskset; 31834 if (void 0 !== (t = t || c.call(this, e).match).placeholder || !0 === i) return "function" == typeof t.placeholder ? t.placeholder(a) : t.placeholder; 31835 if (!0 === t.static) { 31836 if (e > -1 && void 0 === n.validPositions[e]) { 31837 var r, o = d.call(this, e), s = []; 31838 if (o.length > 1 + ("" === o[o.length - 1].match.def ? 1 : 0)) for (var l = 0; l < o.length; l++) if ("" !== o[l].match.def && !0 !== o[l].match.optionality && !0 !== o[l].match.optionalQuantifier && (!0 === o[l].match.static || void 0 === r || !1 !== o[l].match.fn.test(r.match.def, n, e, !0, a)) && (s.push(o[l]), 31839 !0 === o[l].match.static && (r = o[l]), s.length > 1 && /[0-9a-bA-Z]/.test(s[0].match.def))) return a.placeholder.charAt(e % a.placeholder.length); 31840 } 31841 return t.def; 31842 } 31843 return a.placeholder.charAt(e % a.placeholder.length); 31844 } 31845 function l(e, t, i) { 31846 return this.maskset.validPositions[e] || u.call(this, e, d.call(this, e, t ? t.slice() : t, i)); 31847 } 31848 function u(e, t) { 31849 var i = this.opts, a = function(e, t) { 31850 var i = 0, a = !1; 31851 t.forEach((function(e) { 31852 e.match.optionality && (0 !== i && i !== e.match.optionality && (a = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality)); 31853 })), i && (0 == e || 1 == t.length ? i = 0 : a || (i = 0)); 31854 return i; 31855 }(e, t); 31856 e = e > 0 ? e - 1 : 0; 31857 var n, o, s, l = r(c.call(this, e)); 31858 i.greedy && t.length > 1 && "" === t[t.length - 1].match.def && t.pop(); 31859 for (var u = 0; u < t.length; u++) { 31860 var f = t[u]; 31861 n = r(f, l.length); 31862 var d = Math.abs(n - l); 31863 (void 0 === o || "" !== n && d < o || s && !i.greedy && s.match.optionality && s.match.optionality - a > 0 && "master" === s.match.newBlockMarker && (!f.match.optionality || f.match.optionality - a < 1 || !f.match.newBlockMarker) || s && !i.greedy && s.match.optionalQuantifier && !f.match.optionalQuantifier) && (o = d, 31864 s = f); 31865 } 31866 return s; 31867 } 31868 function c(e, t) { 31869 var i = this.maskset; 31870 return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0]; 31871 } 31872 function f(e, t, i) { 31873 function a(e) { 31874 for (var t, i = [], a = -1, n = 0, r = e.length; n < r; n++) if ("-" === e.charAt(n)) for (t = e.charCodeAt(n + 1); ++a < t; ) i.push(String.fromCharCode(a)); else a = e.charCodeAt(n), 31875 i.push(e.charAt(n)); 31876 return i.join(""); 31877 } 31878 return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== a(t.match.fn.toString().replace(/[[\]/]/g, "")).indexOf(a(e.match.fn.toString().replace(/[[\]/]/g, ""))); 31879 } 31880 function d(e, t, i) { 31881 var a, r, o = this, s = this.dependencyLib, l = this.maskset, c = this.opts, d = this.el, p = l.maskToken, h = t ? i : 0, m = t ? t.slice() : [ 0 ], v = [], g = !1, k = t ? t.join("") : ""; 31882 function y(t, i, r, o) { 31883 function s(r, o, u) { 31884 function p(e, t) { 31885 var i = 0 === t.matches.indexOf(e); 31886 return i || t.matches.every((function(a, n) { 31887 return !0 === a.isQuantifier ? i = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(a, "matches") && (i = p(e, a)), 31888 !i; 31889 })), i; 31890 } 31891 function m(e, t, i) { 31892 var a, n; 31893 if ((l.tests[e] || l.validPositions[e]) && (l.tests[e] || [ l.validPositions[e] ]).every((function(e, r) { 31894 if (e.mloc[t]) return a = e, !1; 31895 var o = void 0 !== i ? i : e.alternation, s = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1; 31896 return (void 0 === n || s < n) && -1 !== s && (a = e, n = s), !0; 31897 })), a) { 31898 var r = a.locator[a.alternation]; 31899 return (a.mloc[t] || a.mloc[r] || a.locator).slice((void 0 !== i ? i : a.alternation) + 1); 31900 } 31901 return void 0 !== i ? m(e, t) : void 0; 31902 } 31903 function b(e, t) { 31904 var i = e.alternation, a = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]); 31905 if (!a && i > t.alternation) for (var n = t.alternation; n < i; n++) if (e.locator[n] !== t.locator[n]) { 31906 i = n, a = !0; 31907 break; 31908 } 31909 if (a) { 31910 e.mloc = e.mloc || {}; 31911 var r = e.locator[i]; 31912 if (void 0 !== r) { 31913 if ("string" == typeof r && (r = r.split(",")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()), 31914 void 0 !== t) { 31915 for (var o in t.mloc) "string" == typeof o && (o = o.split(",")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]); 31916 e.locator[i] = Object.keys(e.mloc).join(","); 31917 } 31918 return !0; 31919 } 31920 e.alternation = void 0; 31921 } 31922 return !1; 31923 } 31924 function x(e, t) { 31925 if (e.locator.length !== t.locator.length) return !1; 31926 for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1; 31927 return !0; 31928 } 31929 if (h > e + c._maxTestPos) throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + l.mask; 31930 if (h === e && void 0 === r.matches) { 31931 if (v.push({ 31932 match: r, 31933 locator: o.reverse(), 31934 cd: k, 31935 mloc: {} 31936 }), !r.optionality || void 0 !== u || !(c.definitions && c.definitions[r.nativeDef] && c.definitions[r.nativeDef].optional || n.default.prototype.definitions[r.nativeDef] && n.default.prototype.definitions[r.nativeDef].optional)) return !0; 31937 g = !0, h = e; 31938 } else if (void 0 !== r.matches) { 31939 if (r.isGroup && u !== r) { 31940 if (r = s(t.matches[t.matches.indexOf(r) + 1], o, u)) return !0; 31941 } else if (r.isOptional) { 31942 var P = r, E = v.length; 31943 if (r = y(r, i, o, u)) { 31944 if (v.forEach((function(e, t) { 31945 t >= E && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1); 31946 })), a = v[v.length - 1].match, void 0 !== u || !p(a, P)) return !0; 31947 g = !0, h = e; 31948 } 31949 } else if (r.isAlternator) { 31950 var S, w = r, _ = [], M = v.slice(), O = o.length, T = !1, A = i.length > 0 ? i.shift() : -1; 31951 if (-1 === A || "string" == typeof A) { 31952 var C, D = h, j = i.slice(), B = []; 31953 if ("string" == typeof A) B = A.split(","); else for (C = 0; C < w.matches.length; C++) B.push(C.toString()); 31954 if (void 0 !== l.excludes[e]) { 31955 for (var R = B.slice(), L = 0, I = l.excludes[e].length; L < I; L++) { 31956 var F = l.excludes[e][L].toString().split(":"); 31957 o.length == F[1] && B.splice(B.indexOf(F[0]), 1); 31958 } 31959 0 === B.length && (delete l.excludes[e], B = R); 31960 } 31961 (!0 === c.keepStatic || isFinite(parseInt(c.keepStatic)) && D >= c.keepStatic) && (B = B.slice(0, 1)); 31962 for (var N = 0; N < B.length; N++) { 31963 C = parseInt(B[N]), v = [], i = "string" == typeof A && m(h, C, O) || j.slice(); 31964 var V = w.matches[C]; 31965 if (V && s(V, [ C ].concat(o), u)) r = !0; else if (0 === N && (T = !0), V && V.matches && V.matches.length > w.matches[0].matches.length) break; 31966 S = v.slice(), h = D, v = []; 31967 for (var G = 0; G < S.length; G++) { 31968 var H = S[G], K = !1; 31969 H.match.jit = H.match.jit || T, H.alternation = H.alternation || O, b(H); 31970 for (var U = 0; U < _.length; U++) { 31971 var $ = _[U]; 31972 if ("string" != typeof A || void 0 !== H.alternation && B.includes(H.locator[H.alternation].toString())) { 31973 if (H.match.nativeDef === $.match.nativeDef) { 31974 K = !0, b($, H); 31975 break; 31976 } 31977 if (f(H, $, c)) { 31978 b(H, $) && (K = !0, _.splice(_.indexOf($), 0, H)); 31979 break; 31980 } 31981 if (f($, H, c)) { 31982 b($, H); 31983 break; 31984 } 31985 if (Z = $, !0 === (W = H).match.static && !0 !== Z.match.static && Z.match.fn.test(W.match.def, l, e, !1, c, !1)) { 31986 x(H, $) || void 0 !== d.inputmask.userOptions.keepStatic ? b(H, $) && (K = !0, _.splice(_.indexOf($), 0, H)) : c.keepStatic = !0; 31987 break; 31988 } 31989 } 31990 } 31991 K || _.push(H); 31992 } 31993 } 31994 v = M.concat(_), h = e, g = v.length > 0, r = _.length > 0, i = j.slice(); 31995 } else r = s(w.matches[A] || t.matches[A], [ A ].concat(o), u); 31996 if (r) return !0; 31997 } else if (r.isQuantifier && u !== t.matches[t.matches.indexOf(r) - 1]) for (var q = r, z = i.length > 0 ? i.shift() : 0; z < (isNaN(q.quantifier.max) ? z + 1 : q.quantifier.max) && h <= e; z++) { 31998 var Q = t.matches[t.matches.indexOf(q) - 1]; 31999 if (r = s(Q, [ z ].concat(o), Q)) { 32000 if ((a = v[v.length - 1].match).optionalQuantifier = z >= q.quantifier.min, a.jit = (z + 1) * (Q.matches.indexOf(a) + 1) > q.quantifier.jit, 32001 a.optionalQuantifier && p(a, Q)) { 32002 g = !0, h = e; 32003 break; 32004 } 32005 return a.jit && (l.jitOffset[e] = Q.matches.length - Q.matches.indexOf(a)), !0; 32006 } 32007 } else if (r = y(r, i, o, u)) return !0; 32008 } else h++; 32009 var W, Z; 32010 } 32011 for (var u = i.length > 0 ? i.shift() : 0; u < t.matches.length; u++) if (!0 !== t.matches[u].isQuantifier) { 32012 var p = s(t.matches[u], [ u ].concat(r), o); 32013 if (p && h === e) return p; 32014 if (h > e) break; 32015 } 32016 } 32017 if (e > -1) { 32018 if (void 0 === t) { 32019 for (var b, x = e - 1; void 0 === (b = l.validPositions[x] || l.tests[x]) && x > -1; ) x--; 32020 void 0 !== b && x > -1 && (m = function(e, t) { 32021 var i, a = []; 32022 return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === c.keepStatic ? 0 === (a = u.call(o, e, t.slice()).locator.slice()).length && (a = t[0].locator.slice()) : t.forEach((function(e) { 32023 "" !== e.def && (0 === a.length ? (i = e.alternation, a = e.locator.slice()) : e.locator[i] && -1 === a[i].toString().indexOf(e.locator[i]) && (a[i] += "," + e.locator[i])); 32024 }))), a; 32025 }(x, b), k = m.join(""), h = x); 32026 } 32027 if (l.tests[e] && l.tests[e][0].cd === k) return l.tests[e]; 32028 for (var P = m.shift(); P < p.length; P++) { 32029 if (y(p[P], m, [ P ]) && h === e || h > e) break; 32030 } 32031 } 32032 return (0 === v.length || g) && v.push({ 32033 match: { 32034 fn: null, 32035 static: !0, 32036 optionality: !1, 32037 casing: null, 32038 def: "", 32039 placeholder: "" 32040 }, 32041 locator: [], 32042 mloc: {}, 32043 cd: k 32044 }), void 0 !== t && l.tests[e] ? r = s.extend(!0, [], v) : (l.tests[e] = s.extend(!0, [], v), 32045 r = l.tests[e]), v.forEach((function(e) { 32046 e.match.optionality = !1; 32047 })), r; 32048 } 32049 }, 32050 7215: function(e, t, i) { 32051 Object.defineProperty(t, "__esModule", { 32052 value: !0 32053 }), t.alternate = l, t.checkAlternationMatch = function(e, t, i) { 32054 for (var a, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(",") : [], s = 0; s < o.length; s++) -1 !== (a = e.indexOf(o[s])) && e.splice(a, 1); 32055 for (var l = 0; l < e.length; l++) if (n.includes(e[l])) { 32056 r = !0; 32057 break; 32058 } 32059 return r; 32060 }, t.handleRemove = function(e, t, i, a, s) { 32061 var u = this, c = this.maskset, f = this.opts; 32062 if ((f.numericInput || u.isRTL) && (t === r.default.BACKSPACE ? t = r.default.DELETE : t === r.default.DELETE && (t = r.default.BACKSPACE), 32063 u.isRTL)) { 32064 var d = i.end; 32065 i.end = i.begin, i.begin = d; 32066 } 32067 var p, h = o.getLastValidPosition.call(u, void 0, !0); 32068 i.end >= o.getBuffer.call(u).length && h >= i.end && (i.end = h + 1); 32069 t === r.default.BACKSPACE ? i.end - i.begin < 1 && (i.begin = o.seekPrevious.call(u, i.begin)) : t === r.default.DELETE && i.begin === i.end && (i.end = o.isMask.call(u, i.end, !0, !0) ? i.end + 1 : o.seekNext.call(u, i.end) + 1); 32070 if (!1 !== (p = v.call(u, i))) { 32071 if (!0 !== a && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(u, i.begin).match.def.indexOf("|")) { 32072 var m = l.call(u, !0); 32073 if (m) { 32074 var g = void 0 !== m.caret ? m.caret : m.pos ? o.seekNext.call(u, m.pos.begin ? m.pos.begin : m.pos) : o.getLastValidPosition.call(u, -1, !0); 32075 (t !== r.default.DELETE || i.begin > g) && i.begin; 32076 } 32077 } 32078 !0 !== a && (c.p = t === r.default.DELETE ? i.begin + p : i.begin, c.p = o.determineNewCaretPosition.call(u, { 32079 begin: c.p, 32080 end: c.p 32081 }, !1, !1 === f.insertMode && t === r.default.BACKSPACE ? "none" : void 0).begin); 32082 } 32083 }, t.isComplete = c, t.isSelection = f, t.isValid = d, t.refreshFromBuffer = h, 32084 t.revalidateMask = v; 32085 var a, n = i(4713), r = (a = i(5581)) && a.__esModule ? a : { 32086 default: a 32087 }, o = i(8711), s = i(6030); 32088 function l(e, t, i, a, r, s) { 32089 var u, c, f, p, h, m, v, g, k, y, b, x = this, P = this.dependencyLib, E = this.opts, S = x.maskset, w = P.extend(!0, {}, S.validPositions), _ = P.extend(!0, {}, S.tests), M = !1, O = !1, T = void 0 !== r ? r : o.getLastValidPosition.call(x); 32090 if (s && (y = s.begin, b = s.end, s.begin > s.end && (y = s.end, b = s.begin)), 32091 -1 === T && void 0 === r) u = 0, c = (p = n.getTest.call(x, u)).alternation; else for (;T >= 0; T--) if ((f = S.validPositions[T]) && void 0 !== f.alternation) { 32092 if (p && p.locator[f.alternation] !== f.locator[f.alternation]) break; 32093 u = T, c = S.validPositions[u].alternation, p = f; 32094 } 32095 if (void 0 !== c) { 32096 v = parseInt(u), S.excludes[v] = S.excludes[v] || [], !0 !== e && S.excludes[v].push((0, 32097 n.getDecisionTaker)(p) + ":" + p.alternation); 32098 var A = [], C = -1; 32099 for (h = v; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === C && e <= h && void 0 !== t && (A.push(t), 32100 C = A.length - 1), (m = S.validPositions[h]) && !0 !== m.generatedInput && (void 0 === s || h < y || h >= b) && A.push(m.input), 32101 delete S.validPositions[h]; 32102 for (-1 === C && void 0 !== t && (A.push(t), C = A.length - 1); void 0 !== S.excludes[v] && S.excludes[v].length < 10; ) { 32103 for (S.tests = {}, o.resetMaskSet.call(x, !0), M = !0, h = 0; h < A.length && (g = M.caret || o.getLastValidPosition.call(x, void 0, !0) + 1, 32104 k = A[h], M = d.call(x, g, k, !1, a, !0)); h++) h === C && (O = M), 1 == e && M && (O = { 32105 caretPos: h 32106 }); 32107 if (M) break; 32108 if (o.resetMaskSet.call(x), p = n.getTest.call(x, v), S.validPositions = P.extend(!0, {}, w), 32109 S.tests = P.extend(!0, {}, _), !S.excludes[v]) { 32110 O = l.call(x, e, t, i, a, v - 1, s); 32111 break; 32112 } 32113 var D = (0, n.getDecisionTaker)(p); 32114 if (-1 !== S.excludes[v].indexOf(D + ":" + p.alternation)) { 32115 O = l.call(x, e, t, i, a, v - 1, s); 32116 break; 32117 } 32118 for (S.excludes[v].push(D + ":" + p.alternation), h = v; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h]; 32119 } 32120 } 32121 return O && !1 === E.keepStatic || delete S.excludes[v], O; 32122 } 32123 function u(e, t, i) { 32124 var a = this.opts, n = this.maskset; 32125 switch (a.casing || t.casing) { 32126 case "upper": 32127 e = e.toUpperCase(); 32128 break; 32129 32130 case "lower": 32131 e = e.toLowerCase(); 32132 break; 32133 32134 case "title": 32135 var o = n.validPositions[i - 1]; 32136 e = 0 === i || o && o.input === String.fromCharCode(r.default.SPACE) ? e.toUpperCase() : e.toLowerCase(); 32137 break; 32138 32139 default: 32140 if ("function" == typeof a.casing) { 32141 var s = Array.prototype.slice.call(arguments); 32142 s.push(n.validPositions), e = a.casing.apply(this, s); 32143 } 32144 } 32145 return e; 32146 } 32147 function c(e) { 32148 var t = this, i = this.opts, a = this.maskset; 32149 if ("function" == typeof i.isComplete) return i.isComplete(e, i); 32150 if ("*" !== i.repeat) { 32151 var r = !1, s = o.determineLastRequiredPosition.call(t, !0), l = o.seekPrevious.call(t, s.l); 32152 if (void 0 === s.def || s.def.newBlockMarker || s.def.optionality || s.def.optionalQuantifier) { 32153 r = !0; 32154 for (var u = 0; u <= l; u++) { 32155 var c = n.getTestTemplate.call(t, u).match; 32156 if (!0 !== c.static && void 0 === a.validPositions[u] && !0 !== c.optionality && !0 !== c.optionalQuantifier || !0 === c.static && e[u] !== n.getPlaceholder.call(t, u, c)) { 32157 r = !1; 32158 break; 32159 } 32160 } 32161 } 32162 return r; 32163 } 32164 } 32165 function f(e) { 32166 var t = this.opts.insertMode ? 0 : 1; 32167 return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t; 32168 } 32169 function d(e, t, i, a, r, s, p) { 32170 var g = this, k = this.dependencyLib, y = this.opts, b = g.maskset; 32171 i = !0 === i; 32172 var x = e; 32173 function P(e) { 32174 if (void 0 !== e) { 32175 if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]), 32176 e.remove.sort((function(e, t) { 32177 return t.pos - e.pos; 32178 })).forEach((function(e) { 32179 v.call(g, { 32180 begin: e, 32181 end: e + 1 32182 }); 32183 })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]), 32184 e.insert.sort((function(e, t) { 32185 return e.pos - t.pos; 32186 })).forEach((function(e) { 32187 "" !== e.c && d.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a); 32188 })), e.insert = void 0), e.refreshFromBuffer && e.buffer) { 32189 var t = e.refreshFromBuffer; 32190 h.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0; 32191 } 32192 void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0); 32193 } 32194 return e; 32195 } 32196 function E(t, i, r) { 32197 var s = !1; 32198 return n.getTests.call(g, t).every((function(l, c) { 32199 var d = l.match; 32200 if (o.getBuffer.call(g, !0), !1 !== (s = (!d.jit || void 0 !== b.validPositions[o.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, r, y, f.call(g, e)) : (i === d.def || i === y.skipOptionalPartCharacter) && "" !== d.def && { 32201 c: n.getPlaceholder.call(g, t, d, !0) || d.def, 32202 pos: t 32203 }))) { 32204 var p = void 0 !== s.c ? s.c : i, h = t; 32205 return p = p === y.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p, 32206 !0 !== (s = P(s)) && void 0 !== s.pos && s.pos !== t && (h = s.pos), !0 !== s && void 0 === s.pos && void 0 === s.c ? !1 : (!1 === v.call(g, e, k.extend({}, l, { 32207 input: u.call(g, p, d, h) 32208 }), a, h) && (s = !1), !1); 32209 } 32210 return !0; 32211 })), s; 32212 } 32213 void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin); 32214 var S = !0, w = k.extend(!0, {}, b.validPositions); 32215 if (!1 === y.keepStatic && void 0 !== b.excludes[x] && !0 !== r && !0 !== a) for (var _ = x; _ < (g.isRTL ? e.begin : e.end); _++) void 0 !== b.excludes[_] && (b.excludes[_] = void 0, 32216 delete b.tests[_]); 32217 if ("function" == typeof y.preValidation && !0 !== a && !0 !== s && (S = P(S = y.preValidation.call(g, o.getBuffer.call(g), x, t, f.call(g, e), y, b, e, i || r))), 32218 !0 === S) { 32219 if (S = E(x, t, i), (!i || !0 === a) && !1 === S && !0 !== s) { 32220 var M = b.validPositions[x]; 32221 if (!M || !0 !== M.match.static || M.match.def !== t && t !== y.skipOptionalPartCharacter) { 32222 if (y.insertMode || void 0 === b.validPositions[o.seekNext.call(g, x)] || e.end > x) { 32223 var O = !1; 32224 if (b.jitOffset[x] && void 0 === b.validPositions[o.seekNext.call(g, x)] && !1 !== (S = d.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== r && (S.caret = x), 32225 O = !0), e.end > x && (b.validPositions[x] = void 0), !O && !o.isMask.call(g, x, y.keepStatic && 0 === x)) for (var T = x + 1, A = o.seekNext.call(g, x, !1, 0 !== x); T <= A; T++) if (!1 !== (S = E(T, t, i))) { 32226 S = m.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T; 32227 break; 32228 } 32229 } 32230 } else S = { 32231 caret: o.seekNext.call(g, x) 32232 }; 32233 } 32234 !1 !== S || !y.keepStatic || !c.call(g, o.getBuffer.call(g)) && 0 !== x || i || !0 === r ? f.call(g, e) && b.tests[x] && b.tests[x].length > 1 && y.keepStatic && !i && !0 !== r && (S = l.call(g, !0)) : S = l.call(g, x, t, i, a, void 0, e), 32235 !0 === S && (S = { 32236 pos: x 32237 }); 32238 } 32239 if ("function" == typeof y.postValidation && !0 !== a && !0 !== s) { 32240 var C = y.postValidation.call(g, o.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, y, b, i, p); 32241 void 0 !== C && (S = !0 === C ? S : C); 32242 } 32243 S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === s ? (o.resetMaskSet.call(g, !0), 32244 b.validPositions = k.extend(!0, {}, w)) : m.call(g, void 0, x, !0); 32245 var D = P(S); 32246 void 0 !== g.maxLength && (o.getBuffer.call(g).length > g.maxLength && !a && (o.resetMaskSet.call(g, !0), 32247 b.validPositions = k.extend(!0, {}, w), D = !1)); 32248 return D; 32249 } 32250 function p(e, t, i) { 32251 for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), s = 0; s < o.length; s++) { 32252 if (o[s].match && (o[s].match.nativeDef === t.match[i.shiftPositions ? "def" : "nativeDef"] && (!i.shiftPositions || !t.match.static) || o[s].match.nativeDef === t.match.nativeDef || i.regex && !o[s].match.static && o[s].match.fn.test(t.input))) { 32253 r = !0; 32254 break; 32255 } 32256 if (o[s].match && o[s].match.def === t.match.nativeDef) { 32257 r = void 0; 32258 break; 32259 } 32260 } 32261 return !1 === r && void 0 !== a.jitOffset[e] && (r = p.call(this, e + a.jitOffset[e], t, i)), 32262 r; 32263 } 32264 function h(e, t, i) { 32265 var a, n, r = this, l = this.maskset, u = this.opts, c = this.dependencyLib, f = u.skipOptionalPartCharacter, d = r.isRTL ? i.slice().reverse() : i; 32266 if (u.skipOptionalPartCharacter = "", !0 === e) o.resetMaskSet.call(r), l.tests = {}, 32267 e = 0, t = i.length, n = o.determineNewCaretPosition.call(r, { 32268 begin: 0, 32269 end: 0 32270 }, !1).begin; else { 32271 for (a = e; a < t; a++) delete l.validPositions[a]; 32272 n = e; 32273 } 32274 var p = new c.Event("keypress"); 32275 for (a = e; a < t; a++) { 32276 p.keyCode = d[a].toString().charCodeAt(0), r.ignorable = !1; 32277 var h = s.EventHandlers.keypressEvent.call(r, p, !0, !1, !1, n); 32278 !1 !== h && void 0 !== h && (n = h.forwardPosition); 32279 } 32280 u.skipOptionalPartCharacter = f; 32281 } 32282 function m(e, t, i) { 32283 var a = this, r = this.maskset, s = this.dependencyLib; 32284 if (void 0 === e) for (e = t - 1; e > 0 && !r.validPositions[e]; e--) ; 32285 for (var l = e; l < t; l++) { 32286 if (void 0 === r.validPositions[l] && !o.isMask.call(a, l, !1)) if (0 == l ? n.getTest.call(a, l) : r.validPositions[l - 1]) { 32287 var u = n.getTests.call(a, l).slice(); 32288 "" === u[u.length - 1].match.def && u.pop(); 32289 var c, f = n.determineTestTemplate.call(a, l, u); 32290 if (f && (!0 !== f.match.jit || "master" === f.match.newBlockMarker && (c = r.validPositions[l + 1]) && !0 === c.match.optionalQuantifier) && ((f = s.extend({}, f, { 32291 input: n.getPlaceholder.call(a, l, f.match, !0) || f.match.def 32292 })).generatedInput = !0, v.call(a, l, f, !0), !0 !== i)) { 32293 var p = r.validPositions[t].input; 32294 return r.validPositions[t] = void 0, d.call(a, t, p, !0, !0); 32295 } 32296 } 32297 } 32298 } 32299 function v(e, t, i, a) { 32300 var r = this, s = this.maskset, l = this.opts, u = this.dependencyLib; 32301 function c(e, t, i) { 32302 var a = t[e]; 32303 if (void 0 !== a && !0 === a.match.static && !0 !== a.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) { 32304 var n = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1]; 32305 return n && r; 32306 } 32307 return !1; 32308 } 32309 var f = 0, h = void 0 !== e.begin ? e.begin : e, m = void 0 !== e.end ? e.end : e, v = !0; 32310 if (e.begin > e.end && (h = e.end, m = e.begin), a = void 0 !== a ? a : h, h !== m || l.insertMode && void 0 !== s.validPositions[a] && void 0 === i || void 0 === t || t.match.optionalQuantifier || t.match.optionality) { 32311 var g, k = u.extend(!0, {}, s.validPositions), y = o.getLastValidPosition.call(r, void 0, !0); 32312 for (s.p = h, g = y; g >= h; g--) delete s.validPositions[g], void 0 === t && delete s.tests[g + 1]; 32313 var b, x, P = a, E = P; 32314 for (t && (s.validPositions[a] = u.extend(!0, {}, t), E++, P++), g = t ? m : m - 1; g <= y; g++) { 32315 if (void 0 !== (b = k[g]) && !0 !== b.generatedInput && (g >= m || g >= h && c(g, k, { 32316 begin: h, 32317 end: m 32318 }))) { 32319 for (;"" !== n.getTest.call(r, E).match.def; ) { 32320 if (!1 !== (x = p.call(r, E, b, l)) || "+" === b.match.def) { 32321 "+" === b.match.def && o.getBuffer.call(r, !0);
32322 var S = d.call(r, E, b.input, "+" !== b.match.def, !0); 32323 if (v = !1 !== S, P = (S.pos || E) + 1, !v && x) break; 32324 } else v = !1; 32325 if (v) { 32326 void 0 === t && b.match.static && g === e.begin && f++; 32327 break; 32328 } 32329 if (!v && o.getBuffer.call(r), E > s.maskLength) break; 32330 E++; 32331 } 32332 "" == n.getTest.call(r, E).match.def && (v = !1), E = P; 32333 } 32334 if (!v) break; 32335 } 32336 if (!v) return s.validPositions = u.extend(!0, {}, k), o.resetMaskSet.call(r, !0), 32337 !1; 32338 } else t && n.getTest.call(r, a).match.cd === t.match.cd && (s.validPositions[a] = u.extend(!0, {}, t)); 32339 return o.resetMaskSet.call(r, !0), f; 32340 } 32341 }, 32342 2047: function(t) { 32343 t.exports = e; 32344 }, 32345 5581: function(e) { 32346 e.exports = JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"Z":90,"CONTROL":17,"PAUSE/BREAK":19,"WINDOWS_LEFT":91,"WINDOWS_RIGHT":92,"KEY_229":229}'); 32347 } 32348 }, i = {}; 32349 function a(e) { 32350 var n = i[e]; 32351 if (void 0 !== n) return n.exports; 32352 var r = i[e] = { 32353 exports: {} 32354 }; 32355 return t[e](r, r.exports, a), r.exports; 32356 } 32357 var n = {}; 32358 return function() { 32359 var e = n; 32360 Object.defineProperty(e, "__esModule", { 32361 value: !0 32362 }), e.default = void 0; 32363 var t, i = (t = a(3046)) && t.__esModule ? t : { 32364 default: t 32365 }; 32366 a(443); 32367 var r = i.default; 32368 e.default = r; 32369 }(), n; 32370 }(); 32371})); 32372/** 32373 * author Christopher Blum 32374 * - based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/ 32375 * - forked from http://github.com/zuk/jquery.inview/ 32376 */ 32377(function (factory) { 32378 if (typeof define == 'function' && define.amd) { 32379 // AMD 32380 define(['jquery'], factory); 32381 } else if (typeof exports === 'object') { 32382 // Node, CommonJS 32383 module.exports = factory(require('jquery')); 32384 } else { 32385 // Browser globals 32386 factory(jQuery); 32387 } 32388}(function ($) { 32389 32390 var inviewObjects = [], viewportSize, viewportOffset, 32391 d = document, w = window, documentElement = d.documentElement, timer; 32392 32393 $.event.special.inview = { 32394 add: function(data) { 32395 inviewObjects.push({ data: data, $element: $(this), element: this }); 32396 // Use setInterval in order to also make sure this captures elements within 32397 // "overflow:scroll" elements or elements that appeared in the dom tree due to 32398 // dom manipulation and reflow 32399 // old: $(window).scroll(checkInView); 32400 // 32401 // By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays 32402 // intervals while the user scrolls. Therefore the inview event might fire a bit late there 32403 // 32404 // Don't waste cycles with an interval until we get at least one element that 32405 // has bound to the inview event. 32406 if (!timer && inviewObjects.length) { 32407 timer = setInterval(checkInView, 250); 32408 } 32409 }, 32410 32411 remove: function(data) { 32412 for (var i=0; i<inviewObjects.length; i++) { 32413 var inviewObject = inviewObjects[i]; 32414 if (inviewObject.element === this && inviewObject.data.guid === data.guid) { 32415 inviewObjects.splice(i, 1); 32416 break; 32417 } 32418 } 32419 32420 // Clear interval when we no longer have any elements listening 32421 if (!inviewObjects.length) { 32422 clearInterval(timer); 32423 timer = null; 32424 } 32425 } 32426 }; 32427 32428 function getViewportSize() { 32429 var mode, domObject, size = { height: w.innerHeight, width: w.innerWidth }; 32430 32431 // if this is correct then return it. iPad has compat Mode, so will 32432 // go into check clientHeight/clientWidth (which has the wrong value). 32433 if (!size.height) { 32434 mode = d.compatMode;
32435 if (mode || !$.support.boxModel) { // IE, Gecko 32436 domObject = mode === 'CSS1Compat' ? 32437 documentElement : // Standards 32438 d.body; // Quirks 32439 size = { 32440 height: domObject.clientHeight, 32441 width: domObject.clientWidth 32442 }; 32443 } 32444 } 32445 32446 return size; 32447 } 32448 32449 function getViewportOffset() { 32450 return { 32451 top: w.pageYOffset || documentElement.scrollTop || d.body.scrollTop, 32452 left: w.pageXOffset || documentElement.scrollLeft || d.body.scrollLeft 32453 }; 32454 } 32455 32456 function checkInView() { 32457 if (!inviewObjects.length) { 32458 return; 32459 } 32460 32461 var i = 0, $elements = $.map(inviewObjects, function(inviewObject) { 32462 var selector = inviewObject.data.selector, 32463 $element = inviewObject.$element; 32464 return selector ? $element.find(selector) : $element; 32465 }); 32466 32467 viewportSize = viewportSize || getViewportSize(); 32468 viewportOffset = viewportOffset || getViewportOffset(); 32469 32470 for (; i<inviewObjects.length; i++) { 32471 // Ignore elements that are not in the DOM tree 32472 if (!$.contains(documentElement, $elements[i][0])) { 32473 continue; 32474 } 32475 32476 var $element = $($elements[i]), 32477 elementSize = { height: $element[0].offsetHeight, width: $element[0].offsetWidth }, 32478 elementOffset = $element.offset(), 32479 inView = $element.data('inview'); 32480 32481 // Don't ask me why because I haven't figured out yet: 32482 // viewportOffset and viewportSize are sometimes suddenly null in Firefox 5. 32483 // Even though it sounds weird: 32484 // It seems that the execution of this function is interferred by the onresize/onscroll event 32485 // where viewportOffset and viewportSize are unset 32486 if (!viewportOffset || !viewportSize) { 32487 return; 32488 } 32489 32490 if (elementOffset.top + elementSize.height > viewportOffset.top && 32491 elementOffset.top < viewportOffset.top + viewportSize.height && 32492 elementOffset.left + elementSize.width > viewportOffset.left && 32493 elementOffset.left < viewportOffset.left + viewportSize.width) { 32494 if (!inView) { 32495 $element.data('inview', true).trigger('inview', [true]); 32496 } 32497 } else if (inView) { 32498 $element.data('inview', false).trigger('inview', [false]); 32499 } 32500 } 32501 } 32502 32503 $(w).on("scroll resize scrollstop", function() { 32504 viewportSize = viewportOffset = null; 32505 }); 32506 32507 // IE < 9 scrolls to focused elements without firing the "scroll" event 32508 if (!documentElement.addEventListener && documentElement.attachEvent) { 32509 documentElement.attachEvent("onfocusin", function() { 32510 viewportOffset = null; 32511 }); 32512 } 32513})); 32514 32515/*! 32516 * jQuery.localScroll 32517 * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 32518 * Licensed under MIT 32519 * http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html 32520 * @author Ariel Flesler 32521 * @version 1.4.0 32522 */ 32523 ;(function(plugin) { 32524 // AMD Support 32525 if (typeof define === 'function' && define.amd) { 32526 define(['jquery'], plugin); 32527 } else { 32528 plugin(jQuery); 32529 } 32530}(function($) { 32531 var URI = location.href.replace(/#.*/, ''); // local url without hash 32532 32533 var $localScroll = $.localScroll = function(settings) { 32534 $('body').localScroll(settings); 32535 }; 32536 32537 // Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option. 32538 // @see http://demos.flesler.com/jquery/scrollTo/ 32539 // The defaults are public and can be overriden. 32540 $localScroll.defaults = { 32541 duration: 1000, // How long to animate. 32542 axis: 'y', // Which of top and left should be modified. 32543 event: 'click', // On which event to react. 32544 stop: true, // Avoid queuing animations 32545 target: window // What to scroll (selector or element). The whole window by default. 32546 /* 32547 lock: false, // ignore events if already animating 32548 lazy: false, // if true, links can be added later, and will still work. 32549 filter: null, // filter some anchors out of the matched elements. 32550 hash: false // if true, the hash of the selected link, will appear on the address bar. 32551 */ 32552 }; 32553 32554 $.fn.localScroll = function(settings) { 32555 settings = $.extend({}, $localScroll.defaults, settings); 32556 32557 if (settings.hash && location.hash) { 32558 if (settings.target) window.scrollTo(0, 0); 32559 scroll(0, location, settings); 32560 } 32561 32562 return settings.lazy ? 32563 // use event delegation, more links can be added later. 32564 this.on(settings.event, 'a,area', function(e) { 32565 if (filter.call(this)) { 32566 scroll(e, this, settings); 32567 } 32568 }) : 32569 // bind concretely, to each matching link 32570 this.find('a,area') 32571 .filter(filter).bind(settings.event, function(e) { 32572 scroll(e, this, settings); 32573 }).end() 32574 .end(); 32575 32576 function filter() {// is this a link that points to an anchor and passes a possible filter ? href is checked to avoid a bug in FF. 32577 return !!this.href && !!this.hash && this.href.replace(this.hash,'') === URI && (!settings.filter || $(this).is(settings.filter)); 32578 } 32579 }; 32580 32581 // Not needed anymore, kept for backwards compatibility 32582 $localScroll.hash = function() {}; 32583 32584 function scroll(e, link, settings) { 32585 var id = link.hash.slice(1), 32586 elem = document.getElementById(id) || document.getElementsByName(id)[0]; 32587 32588 if (!elem) return; 32589 32590 if (e) e.preventDefault(); 32591 32592 var $target = $(settings.target); 32593 32594 if (settings.lock && $target.is(':animated') || 32595 settings.onBefore && settings.onBefore(e, elem, $target) === false) 32596 return; 32597 32598 if (settings.stop) { 32599 $target.stop(true); // remove all its animations 32600 } 32601 32602 if (settings.hash) { 32603 var attr = elem.id === id ? 'id' : 'name', 32604 $a = $('<a> </a>').attr(attr, id).css({ 32605 position:'absolute', 32606 top: $(window).scrollTop(), 32607 left: $(window).scrollLeft() 32608 }); 32609 32610 elem[attr] = ''; 32611 $('body').prepend($a); 32612 location.hash = link.hash; 32613 $a.remove(); 32614 elem[attr] = id; 32615 } 32616 32617 $target 32618 .scrollTo(elem, settings) // do scroll 32619 .trigger('notify.serialScroll',[elem]); // notify serialScroll about this change 32620 } 32621 32622 // AMD requirement 32623 return $localScroll; 32624 32625})); 32626/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 32627 * Licensed under the MIT License (LICENSE.txt). 32628 * 32629 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 32630 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 32631 * Thanks to: Seamus Leahy for adding deltaX and deltaY 32632 * 32633 * Version: 3.0.6 32634 * 32635 * Requires: 1.2.2+ 32636 */ 32637(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1
32637),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 32638d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); 32639/** 32640 * jquery.placeholder http://matoilic.github.com/jquery.placeholder 32641 * 32642 * @version v0.2.4 32643 * @author Mato Ilic <[email protected]> 32644 * @copyright 2013 Mato Ilic 32645 * 32646 * Dual licensed under the MIT and GPL licenses: 32647 * http://www.opensource.org/licenses/mit-license.php 32648 * http://www.gnu.org/licenses/gpl.html 32649 */ 32650;(function($, doc, debug) { 32651 var input = ('placeholder' in doc.createElement('input')), 32652 textarea = ('placeholder' in doc.createElement('textarea')), 32653 selector = ':input[placeholder]'; 32654 32655 $.placeholder = {input: input, textarea: textarea}; 32656 32657 //skip if there is native browser support for the placeholder attribute 32658 if(!debug && input && textarea) { 32659 $.fn.placeholder = function() {}; 32660 return; 32661 } 32662 32663 if(!debug && input && !textarea) { 32664 selector = 'textarea[placeholder]'; 32665 } 32666 32667 /* patch jQuery.fn.val to return an empty value if the value matches 32668 * the placeholder 32669 */ 32670 $.fn.realVal = $.fn.val; 32671 $.fn.val = function() { 32672 var $element = $(this), val, placeholder; 32673 if(arguments.length > 0) return $element.realVal.apply(this, arguments); 32674 32675 val = $element.realVal(); 32676 placeholder = $element.attr('placeholder'); 32677 32678 return ((val == placeholder) ? '' : val); 32679 }; 32680 32681 function clearForm() { 32682 $(this).find(selector).each(removePlaceholder); 32683 } 32684 32685 function extractAttributes(elem) { 32686 var attr = elem.attributes, copy = {}, skip = /^jQuery\d+/; 32687 for(var i = 0; i < attr.length; i++) { 32688 if(attr[i].specified && !skip.test(attr[i].name)) { 32689 copy[attr[i].name] = attr[i].value; 32690 } 32691 } 32692 return copy; 32693 } 32694 32695 function removePlaceholder() { 32696 var $target = $(this), $clone, $orig; 32697 32698 if($target.is(':password')) return; 32699 32700 if($target.data('password')) { 32701 $orig = $target.next().show().focus(); 32702 $('label[for=' + $target.attr('id') + ']').attr('for', $orig.attr('id')); 32703 $target.remove(); 32704 } else if($target.realVal() == $target.attr('placeholder')) { 32705 $target.val(''); 32706 $target.removeClass('placeholder'); 32707 } 32708 } 32709 32710 function setPlaceholder() { 32711 var $target = $(this), $clone, plceholder, hasVal, cid; 32712 placeholder = $target.attr('placeholder'); 32713 32714 if($.trim($target.val()).length > 0) return; 32715 32716 if($target.is(':password')) { 32717 cid = $target.attr('id') + '-clone'; 32718 $clone = $('<input/>') 32719 .attr($.extend(extractAttributes(this), {type: 'text', value: placeholder, 'data-password': 1, id: cid})) 32720 .addClass('placeholder'); 32721 32722 $target.before($clone).hide(); 32723 $('label[for=' + $target.attr('id') + ']').attr('for', cid); 32724 } else { 32725 $target.val(placeholder); 32726 $target.addClass('placeholder'); 32727 } 32728 } 32729 32730 $.fn.placeholder = function() { 32731 this.filter(selector).each(setPlaceholder); 32732 return this; 32733 }; 32734 32735 $(function($) { 32736 var $doc = $(doc); 32737 $doc.on('submit', 'form', clearForm); 32738 $doc.on('focus', selector, removePlaceholder); 32739 $doc.on('blur', selector, setPlaceholder); 32740 $(selector).placeholder(); 32741 }); 32742})(jQuery, document, window.debug); 32743 32744/*! 32745 * jQuery.scrollTo 32746 * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 32747 * Licensed under MIT 32748 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 32749 * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery 32750 * @author Ariel Flesler 32751 * @version 2.1.2 32752 */ 32753;(function(factory) { 32754 'use strict'; 32755 if (typeof define === 'function' && define.amd) { 32756 // AMD 32757 define(['jquery'], factory); 32758 } else if (typeof module !== 'undefined' && module.exports) { 32759 // CommonJS 32760 module.exports = factory(require('jquery')); 32761 } else { 32762 // Global 32763 factory(jQuery); 32764 } 32765})(function($) { 32766 'use strict'; 32767 32768 var $scrollTo = $.scrollTo = function(target, duration, settings) { 32769 return $(window).scrollTo(target, duration, settings); 32770 }; 32771 32772 $scrollTo.defaults = { 32773 axis:'xy', 32774 duration: 0, 32775 limit:true 32776 }; 32777 32778 function isWin(elem) { 32779 return !elem.nodeName || 32780 $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1; 32781 } 32782 32783 $.fn.scrollTo = function(target, duration, settings) { 32784 if (typeof duration === 'object') { 32785 settings = duration; 32786 duration = 0; 32787 } 32788 if (typeof settings === 'function') { 32789 settings = { onAfter:settings }; 32790 } 32791 if (target === 'max') { 32792 target = 9e9; 32793 } 32794 32795 settings = $.extend({}, $scrollTo.defaults, settings); 32796 // Speed is still recognized for backwards compatibility 32797 duration = duration || settings.duration; 32798 // Make sure the settings are given right 32799 var queue = settings.queue && settings.axis.length > 1; 32800 if (queue) { 32801 // Let's keep the overall duration 32802 duration /= 2; 32803 } 32804 settings.offset = both(settings.offset); 32805 settings.over = both(settings.over); 32806 32807 return this.each(function() { 32808 // Null target yields nothing, just like jQuery does 32809 if (target === null) return; 32810 32811 var win = isWin(this), 32812 elem = win ? this.contentWindow || window : this, 32813 $elem = $(elem), 32814 targ = target, 32815 attr = {}, 32816 toff; 32817 32818 switch (typeof targ) { 32819 // A number will pass the regex 32820 case 'number': 32821 case 'string': 32822 if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { 32823 targ = both(targ); 32824 // We are done 32825 break; 32826 } 32827 // Relative/Absolute selector 32828 targ = win ? $(targ) : $(targ, elem); 32829 /* falls through */
32830 case 'object': 32831 if (targ.length === 0) return; 32832 // DOMElement / jQuery 32833 if (targ.is || targ.style) { 32834 // Get the real position of the target 32835 toff = (targ = $(targ)).offset(); 32836 } 32837 } 32838 32839 var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; 32840 32841 $.each(settings.axis.split(''), function(i, axis) { 32842 var Pos = axis === 'x' ? 'Left' : 'Top', 32843 pos = Pos.toLowerCase(), 32844 key = 'scroll' + Pos, 32845 prev = $elem[key](), 32846 max = $scrollTo.max(elem, axis); 32847 32848 if (toff) {// jQuery / DOMElement 32849 attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]); 32850 32851 // If it's a dom element, reduce the margin 32852 if (settings.margin) { 32853 attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0; 32854 attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0; 32855 } 32856 32857 attr[key] += offset[pos] || 0; 32858 32859 if (settings.over[pos]) { 32860 // Scroll to a fraction of its width/height 32861 attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos]; 32862 } 32863 } else { 32864 var val = targ[pos]; 32865 // Handle percentage values 32866 attr[key] = val.slice && val.slice(-1) === '%' ? 32867 parseFloat(val) / 100 * max 32868 : val; 32869 } 32870 32871 // Number or 'number' 32872 if (settings.limit && /^\d+$/.test(attr[key])) { 32873 // Check the limits 32874 attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); 32875 } 32876 32877 // Don't waste time animating, if there's no need. 32878 if (!i && settings.axis.length > 1) { 32879 if (prev === attr[key]) { 32880 // No animation needed 32881 attr = {}; 32882 } else if (queue) { 32883 // Intermediate animation 32884 animate(settings.onAfterFirst); 32885 // Don't animate this axis again in the next iteration. 32886 attr = {}; 32887 } 32888 } 32889 }); 32890 32891 animate(settings.onAfter); 32892 32893 function animate(callback) { 32894 var opts = $.extend({}, settings, { 32895 // The queue setting conflicts with animate() 32896 // Force it to always be true 32897 queue: true, 32898 duration: duration, 32899 complete: callback && function() { 32900 callback.call(elem, targ, settings); 32901 } 32902 }); 32903 $elem.animate(attr, opts); 32904 } 32905 }); 32906 }; 32907 32908 // Max scrolling position, works on quirks mode 32909 // It only fails (not too badly) on IE, quirks mode. 32910 $scrollTo.max = function(elem, axis) { 32911 var Dim = axis === 'x' ? 'Width' : 'Height', 32912 scroll = 'scroll'+Dim; 32913 32914 if (!isWin(elem)) 32915 return elem[scroll] - $(elem)[Dim.toLowerCase()](); 32916 32917 var size = 'client' + Dim, 32918 doc = elem.ownerDocument || elem.document, 32919 html = doc.documentElement, 32920 body = doc.body; 32921 32922 return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]); 32923 }; 32924 32925 function both(val) { 32926 return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val }; 32927 } 32928 32929 // Add special hooks so that window scroll properties can be animated 32930 $.Tween.propHooks.scrollLeft = 32931 $.Tween.propHooks.scrollTop = { 32932 get: function(t) { 32933 return $(t.elem)[t.prop](); 32934 }, 32935 set: function(t) { 32936 var curr = this.get(t); 32937 // If interrupt is true and user scrolled, stop animating 32938 if (t.options.interrupt && t._last && t._last !== curr) { 32939 return $(t.elem).stop(); 32940 } 32941 var next = Math.round(t.now); 32942 // Don't waste CPU 32943 // Browsers don't render floating point scroll 32944 if (curr !== next) { 32945 $(t.elem)[t.prop](next); 32946 t._last = this.get(t); 32947 } 32948 } 32949 }; 32950 32951 // AMD requirement 32952 return $scrollTo; 32953}); 32954 32955/** 32956 * jQuery serializeObject 32957 * @copyright 2014, macek <[email protected]> 32958 * @link https://github.com/macek/jquery-serialize-object 32959 * @license BSD 32960 * @version 2.5.0 32961 */ 32962(function(root, factory) { 32963 32964 // AMD 32965 if (typeof define === "function" && define.amd) { 32966 define(["exports", "jquery"], function(exports, $) { 32967 return factory(exports, $); 32968 }); 32969 } 32970 32971 // CommonJS 32972 else if (typeof exports !== "undefined") { 32973 var $ = require("jquery"); 32974 factory(exports, $); 32975 } 32976 32977 // Browser 32978 else { 32979 factory(root, (root.jQuery || root.Zepto || root.ender || root.$)); 32980 } 32981 32982}(this, function(exports, $) { 32983 32984 var patterns = { 32985 validate: /^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i, 32986 key: /[a-z0-9_]+|(?=\[\])/gi, 32987 push: /^$/, 32988 fixed: /^\d+$/, 32989 named: /^[a-z0-9_]+$/i 32990 }; 32991 32992 function FormSerializer(helper, $form) { 32993 32994 // private variables 32995 var data = {}, 32996 pushes = {}; 32997 32998 // private API 32999 function build(base, key, value) { 33000 base[key] = value; 33001 return base; 33002 } 33003 33004 function makeObject(root, value) { 33005 33006 var keys = root.match(patterns.key), k; 33007 33008 // nest, nest, ..., nest 33009 while ((k = keys.pop()) !== undefined) { 33010 // foo[] 33011 if (patterns.push.test(k)) { 33012 var idx = incrementPush(root.replace(/\[\]$/, '')); 33013 value = build([], idx, value); 33014 } 33015 33016 // foo[n] 33017 else if (patterns.fixed.test(k)) { 33018 value = build([], k, value); 33019 } 33020 33021 // foo; foo[bar] 33022 else if (patterns.named.test(k)) { 33023 value = build({}, k, value); 33024 } 33025 } 33026 33027 return value; 33028 } 33029 33030 function incrementPush(key) { 33031 if (pushes[key] === undefined) { 33032 pushes[key] = 0; 33033 } 33034 return pushes[key]++; 33035 } 33036 33037 function encode(pair) { 33038 switch ($('[name="' + pair.name + '"]', $form).attr("type")) { 33039 case "checkbox": 33040 return pair.value === "on" ? true : pair.value; 33041 default: 33042 return pair.value; 33043 } 33044 } 33045 33046 function addPair(pair) { 33047 if (!patterns.validate.test(pair.name)) return this; 33048 var obj = makeObject(pair.name, encode(pair)); 33049 data = helper.extend(true, data, obj); 33050 return this; 33051 } 33052 33053 function addPairs(pairs) { 33054 if (!helper.isArray(pairs)) {
33055 throw new Error("formSerializer.addPairs expects an Array"); 33056 } 33057 for (var i=0, len=pairs.length; i<len; i++) { 33058 this.addPair(pairs[i]); 33059 } 33060 return this; 33061 } 33062 33063 function serialize() { 33064 return data; 33065 } 33066 33067 function serializeJSON() { 33068 return JSON.stringify(serialize()); 33069 } 33070 33071 // public API 33072 this.addPair = addPair; 33073 this.addPairs = addPairs; 33074 this.serialize = serialize; 33075 this.serializeJSON = serializeJSON; 33076 } 33077 33078 FormSerializer.patterns = patterns; 33079 33080 FormSerializer.serializeObject = function serializeObject() { 33081 return new FormSerializer($, this). 33082 addPairs(this.serializeArray()). 33083 serialize(); 33084 }; 33085 33086 FormSerializer.serializeJSON = function serializeJSON() { 33087 return new FormSerializer($, this). 33088 addPairs(this.serializeArray()). 33089 serializeJSON(); 33090 }; 33091 33092 if (typeof $.fn !== "undefined") { 33093 $.fn.serializeObject = FormSerializer.serializeObject; 33094 $.fn.serializeJSON = FormSerializer.serializeJSON; 33095 } 33096 33097 exports.FormSerializer = FormSerializer; 33098 33099 return FormSerializer; 33100})); 33101 33102/*! 33103 * jQuery-ajaxTransport-XDomainRequest - v1.0.4 - 2015-03-05 33104 * https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest 33105 * Copyright (c) 2015 Jason Moon (@JSONMOON) 33106 * Licensed MIT (/blob/master/LICENSE.txt) 33107 */ 33108(function(factory) { 33109 if (typeof define === 'function' && define.amd) { 33110 // AMD. Register as anonymous module. 33111 define(['jquery'], factory); 33112 } else if (typeof exports === 'object') { 33113 // CommonJS 33114 module.exports = factory(require('jquery')); 33115 } else { 33116 // Browser globals. 33117 factory(jQuery); 33118 } 33119}(function($) { 33120 33121// Only continue if we're on IE8/IE9 with jQuery 1.5+ (contains the ajaxTransport function)
33122if ($.support.cors || !$.ajaxTransport || !window.XDomainRequest) { 33123 return $; 33124} 33125 33126var httpRegEx = /^(https?:)?\/\//i; 33127var getOrPostRegEx = /^get|post$/i; 33128var sameSchemeRegEx = new RegExp('^(\/\/|' + location.protocol + ')', 'i'); 33129 33130// ajaxTransport exists in jQuery 1.5+ 33131$.ajaxTransport('* text html xml json', function(options, userOptions, jqXHR) { 33132 33133 // Only continue if the request is: asynchronous, uses GET or POST method, has HTTP or HTTPS protocol, and has the same scheme as the calling page 33134 if (!options.crossDomain || !options.async || !getOrPostRegEx.test(options.type) || !httpRegEx.test(options.url) || !sameSchemeRegEx.test(options.url)) { 33135 return; 33136 } 33137 33138 var xdr = null; 33139 33140 return { 33141 send: function(headers, complete) { 33142 var postData = ''; 33143 var userType = (userOptions.dataType || '').toLowerCase(); 33144 33145 xdr = new XDomainRequest(); 33146 if (/^\d+$/.test(userOptions.timeout)) { 33147 xdr.timeout = userOptions.timeout; 33148 } 33149 33150 xdr.ontimeout = function() { 33151 complete(500, 'timeout'); 33152 }; 33153 33154 xdr.onload = function() { 33155 var allResponseHeaders = 'Content-Length: ' + xdr.responseText.length + '\r\nContent-Type: ' + xdr.contentType; 33156 var status = { 33157 code: 200, 33158 message: 'success' 33159 }; 33160 var responses = { 33161 text: xdr.responseText 33162 }; 33163 try { 33164 if (userType === 'html' || /text\/html/i.test(xdr.contentType)) { 33165 responses.html = xdr.responseText; 33166 } else if (userType === 'json' || (userType !== 'text' && /\/json/i.test(xdr.contentType))) { 33167 try { 33168 responses.json = $.parseJSON(xdr.responseText); 33169 } catch(e) { 33170 status.code = 500; 33171 status.message = 'parseerror'; 33172 //throw 'Invalid JSON: ' + xdr.responseText; 33173 } 33174 } else if (userType === 'xml' || (userType !== 'text' && /\/xml/i.test(xdr.contentType))) { 33175 var doc = new ActiveXObject('Microsoft.XMLDOM'); 33176 doc.async = false; 33177 try { 33178 doc.loadXML(xdr.responseText); 33179 } catch(e) { 33180 doc = undefined; 33181 } 33182 if (!doc || !doc.documentElement || doc.getElementsByTagName('parsererror').length) { 33183 status.code = 500; 33184 status.message = 'parseerror'; 33185 throw 'Invalid XML: ' + xdr.responseText; 33186 } 33187 responses.xml = doc; 33188 } 33189 } catch(parseMessage) { 33190 throw parseMessage; 33191 } finally { 33192 complete(status.code, status.message, responses, allResponseHeaders); 33193 } 33194 }; 33195 33196 // set an empty handler for 'onprogress' so requests don't get aborted 33197 xdr.onprogress = function(){}; 33198 xdr.onerror = function() { 33199 complete(500, 'error', { 33200 text: xdr.responseText 33201 }); 33202 }; 33203 33204 if (userOptions.data) { 33205 postData = ($.type(userOptions.data) === 'string') ? userOptions.data : $.param(userOptions.data); 33206 } 33207 xdr.open(options.type, options.url); 33208 xdr.send(postData); 33209 }, 33210 abort: function() { 33211 if (xdr) { 33212 xdr.abort(); 33213 } 33214 } 33215 }; 33216}); 33217 33218return $; 33219 33220})); 33221/** 33222 * @license 33223 * Lodash <https://lodash.com/> 33224 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 33225 * Released under MIT license <https://lodash.com/license> 33226 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 33227 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 33228 */ 33229;(function() { 33230 33231 /** Used as a safe reference for `undefined` in pre-ES5 environments. */ 33232 var undefined; 33233 33234 /** Used as the semantic version number. */ 33235 var VERSION = '4.17.15'; 33236 33237 /** Used as the size to enable large array optimizations. */ 33238 var LARGE_ARRAY_SIZE = 200; 33239 33240 /** Error message constants. */ 33241 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', 33242 FUNC_ERROR_TEXT = 'Expected a function'; 33243 33244 /** Used to stand-in for `undefined` hash values. */ 33245 var HASH_UNDEFINED = '__lodash_hash_undefined__'; 33246 33247 /** Used as the maximum memoize cache size. */ 33248 var MAX_MEMOIZE_SIZE = 500; 33249 33250 /** Used as the internal argument placeholder. */ 33251 var PLACEHOLDER = '__lodash_placeholder__';
vendor: 4,789 bytes, lines 33252-33386
33252 33253 /** Used to compose bitmasks for cloning. */ 33254 var CLONE_DEEP_FLAG = 1, 33255 CLONE_FLAT_FLAG = 2, 33256 CLONE_SYMBOLS_FLAG = 4; 33257 33258 /** Used to compose bitmasks for value comparisons. */ 33259 var COMPARE_PARTIAL_FLAG = 1, 33260 COMPARE_UNORDERED_FLAG = 2; 33261 33262 /** Used to compose bitmasks for function metadata. */ 33263 var WRAP_BIND_FLAG = 1, 33264 WRAP_BIND_KEY_FLAG = 2, 33265 WRAP_CURRY_BOUND_FLAG = 4, 33266 WRAP_CURRY_FLAG = 8, 33267 WRAP_CURRY_RIGHT_FLAG = 16, 33268 WRAP_PARTIAL_FLAG = 32, 33269 WRAP_PARTIAL_RIGHT_FLAG = 64, 33270 WRAP_ARY_FLAG = 128, 33271 WRAP_REARG_FLAG = 256, 33272 WRAP_FLIP_FLAG = 512; 33273 33274 /** Used as default options for `_.truncate`. */ 33275 var DEFAULT_TRUNC_LENGTH = 30, 33276 DEFAULT_TRUNC_OMISSION = '...'; 33277 33278 /** Used to detect hot functions by number of calls within a span of milliseconds. */ 33279 var HOT_COUNT = 800, 33280 HOT_SPAN = 16; 33281 33282 /** Used to indicate the type of lazy iteratees. */ 33283 var LAZY_FILTER_FLAG = 1, 33284 LAZY_MAP_FLAG = 2, 33285 LAZY_WHILE_FLAG = 3; 33286 33287 /** Used as references for various `Number` constants. */ 33288 var INFINITY = 1 / 0, 33289 MAX_SAFE_INTEGER = 9007199254740991, 33290 MAX_INTEGER = 1.7976931348623157e+308, 33291 NAN = 0 / 0; 33292 33293 /** Used as references for the maximum length and index of an array. */ 33294 var MAX_ARRAY_LENGTH = 4294967295, 33295 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, 33296 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; 33297 33298 /** Used to associate wrap methods with their bit flags. */ 33299 var wrapFlags = [ 33300 ['ary', WRAP_ARY_FLAG], 33301 ['bind', WRAP_BIND_FLAG], 33302 ['bindKey', WRAP_BIND_KEY_FLAG], 33303 ['curry', WRAP_CURRY_FLAG], 33304 ['curryRight', WRAP_CURRY_RIGHT_FLAG], 33305 ['flip', WRAP_FLIP_FLAG], 33306 ['partial', WRAP_PARTIAL_FLAG], 33307 ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], 33308 ['rearg', WRAP_REARG_FLAG] 33309 ]; 33310 33311 /** `Object#toString` result references. */ 33312 var argsTag = '[object Arguments]', 33313 arrayTag = '[object Array]', 33314 asyncTag = '[object AsyncFunction]', 33315 boolTag = '[object Boolean]', 33316 dateTag = '[object Date]', 33317 domExcTag = '[object DOMException]', 33318 errorTag = '[object Error]', 33319 funcTag = '[object Function]', 33320 genTag = '[object GeneratorFunction]', 33321 mapTag = '[object Map]', 33322 numberTag = '[object Number]', 33323 nullTag = '[object Null]', 33324 objectTag = '[object Object]', 33325 promiseTag = '[object Promise]', 33326 proxyTag = '[object Proxy]', 33327 regexpTag = '[object RegExp]', 33328 setTag = '[object Set]', 33329 stringTag = '[object String]', 33330 symbolTag = '[object Symbol]', 33331 undefinedTag = '[object Undefined]', 33332 weakMapTag = '[object WeakMap]', 33333 weakSetTag = '[object WeakSet]'; 33334 33335 var arrayBufferTag = '[object ArrayBuffer]', 33336 dataViewTag = '[object DataView]', 33337 float32Tag = '[object Float32Array]', 33338 float64Tag = '[object Float64Array]', 33339 int8Tag = '[object Int8Array]', 33340 int16Tag = '[object Int16Array]', 33341 int32Tag = '[object Int32Array]', 33342 uint8Tag = '[object Uint8Array]', 33343 uint8ClampedTag = '[object Uint8ClampedArray]', 33344 uint16Tag = '[object Uint16Array]', 33345 uint32Tag = '[object Uint32Array]'; 33346 33347 /** Used to match empty string literals in compiled template source. */ 33348 var reEmptyStringLeading = /\b__p \+= '';/g, 33349 reEmptyStringMiddle = /\b(__p \+=) '' \+/g, 33350 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; 33351 33352 /** Used to match HTML entities and HTML characters. */ 33353 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, 33354 reUnescapedHtml = /[&<>"']/g, 33355 reHasEscapedHtml = RegExp(reEscapedHtml.source), 33356 reHasUnescapedHtml = RegExp(reUnescapedHtml.source); 33357 33358 /** Used to match template delimiters. */ 33359 var reEscape = /<%-([\s\S]+?)%>/g, 33360 reEvaluate = /<%([\s\S]+?)%>/g, 33361 reInterpolate = /<%=([\s\S]+?)%>/g; 33362 33363 /** Used to match property names within property paths. */ 33364 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, 33365 reIsPlainProp = /^\w*$/, 33366 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; 33367 33368 /** 33369 * Used to match `RegExp` 33370 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). 33371 */ 33372 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, 33373 reHasRegExpChar = RegExp(reRegExpChar.source); 33374 33375 /** Used to match leading and trailing whitespace. */ 33376 var reTrim = /^\s+|\s+$/g, 33377 reTrimStart = /^\s+/, 33378 reTrimEnd = /\s+$/; 33379 33380 /** Used to match wrap detail comments. */ 33381 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, 33382 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, 33383 reSplitDetails = /,? & /; 33384 33385 /** Used to match words composed of alphanumeric characters. */ 33386 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g
vendor: 6,239 bytes, lines 33386-33521
33386; 33387 33388 /** Used to match backslashes in property paths. */ 33389 var reEscapeChar = /\\(\\)?/g; 33390 33391 /** 33392 * Used to match 33393 * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). 33394 */ 33395 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; 33396 33397 /** Used to match `RegExp` flags from their coerced string values. */ 33398 var reFlags = /\w*$/; 33399 33400 /** Used to detect bad signed hexadecimal string values. */ 33401 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; 33402 33403 /** Used to detect binary string values. */ 33404 var reIsBinary = /^0b[01]+$/i; 33405 33406 /** Used to detect host constructors (Safari). */ 33407 var reIsHostCtor = /^\[object .+?Constructor\]$/; 33408 33409 /** Used to detect octal string values. */ 33410 var reIsOctal = /^0o[0-7]+$/i; 33411 33412 /** Used to detect unsigned integer values. */ 33413 var reIsUint = /^(?:0|[1-9]\d*)$/; 33414 33415 /** Used to match Latin Unicode letters (excluding mathematical operators). */ 33416 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; 33417 33418 /** Used to ensure capturing order of template delimiters. */ 33419 var reNoMatch = /($^)/; 33420 33421 /** Used to match unescaped characters in compiled string literals. */ 33422 var reUnescapedString = /['\n\r\u2028\u2029\\]/g; 33423 33424 /** Used to compose unicode character classes. */ 33425 var rsAstralRange = '\\ud800-\\udfff', 33426 rsComboMarksRange = '\\u0300-\\u036f', 33427 reComboHalfMarksRange = '\\ufe20-\\ufe2f', 33428 rsComboSymbolsRange = '\\u20d0-\\u20ff', 33429 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, 33430 rsDingbatRange = '\\u2700-\\u27bf', 33431 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', 33432 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', 33433 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', 33434 rsPunctuationRange = '\\u2000-\\u206f', 33435 rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', 33436 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', 33437 rsVarRange = '\\ufe0e\\ufe0f', 33438 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; 33439 33440 /** Used to compose unicode capture groups. */ 33441 var rsApos = "['\u2019]", 33442 rsAstral = '[' + rsAstralRange + ']', 33443 rsBreak = '[' + rsBreakRange + ']', 33444 rsCombo = '[' + rsComboRange + ']', 33445 rsDigits = '\\d+', 33446 rsDingbat = '[' + rsDingbatRange + ']', 33447 rsLower = '[' + rsLowerRange + ']', 33448 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', 33449 rsFitz = '\\ud83c[\\udffb-\\udfff]', 33450 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', 33451 rsNonAstral = '[^' + rsAstralRange + ']', 33452 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', 33453 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', 33454 rsUpper = '[' + rsUpperRange + ']', 33455 rsZWJ = '\\u200d'; 33456 33457 /** Used to compose unicode regexes. */ 33458 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', 33459 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', 33460 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', 33461 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', 33462 reOptMod = rsModifier + '?', 33463 rsOptVar = '[' + rsVarRange + ']?', 33464 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', 33465 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', 33466 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', 33467 rsSeq = rsOptVar + reOptMod + rsOptJoin, 33468 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, 33469 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; 33470 33471 /** Used to match apostrophes. */ 33472 var reApos = RegExp(rsApos, 'g'); 33473 33474 /** 33475 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and 33476 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). 33477 */ 33478 var reComboMark = RegExp(rsCombo, 'g'); 33479 33480 /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ 33481 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); 33482 33483 /** Used to match complex or compound words. */ 33484 var reUnicodeWord = RegExp([ 33485 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', 33486 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', 33487 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, 33488 rsUpper + '+' + rsOptContrUpper, 33489 rsOrdUpper, 33490 rsOrdLower, 33491 rsDigits, 33492 rsEmoji 33493 ].join('|'), 'g'); 33494 33495 /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ 33496 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); 33497 33498 /** Used to detect strings that need a more robust regexp to match words. */ 33499 var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; 33500 33501 /** Used to assign default `context` object properties. */ 33502 var contextProps = [ 33503 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 33504 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 33505 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 33506 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', 33507 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' 33508 ]; 33509 33510 /** Used to make template sourceURLs easier to identify. */ 33511 var templateCounter = -1; 33512 33513 /** Used to identify `toStringTag` values of typed arrays. */ 33514 var typedArrayTags = {}; 33515 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = 33516 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = 33517 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = 33518 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = 33519 typedArrayTags[uint32Tag] = true; 33520 typedArrayTags[argsTag] = typedArrayTags[arrayTag] = 33521 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
vendor: 5,923 bytes, lines 33522-33656
33522 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = 33523 typedArrayTags[errorTag] = typedArrayTags[funcTag] = 33524 typedArrayTags[mapTag] = typedArrayTags[numberTag] = 33525 typedArrayTags[objectTag] = typedArrayTags[regexpTag] = 33526 typedArrayTags[setTag] = typedArrayTags[stringTag] = 33527 typedArrayTags[weakMapTag] = false; 33528 33529 /** Used to identify `toStringTag` values supported by `_.clone`. */ 33530 var cloneableTags = {}; 33531 cloneableTags[argsTag] = cloneableTags[arrayTag] = 33532 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = 33533 cloneableTags[boolTag] = cloneableTags[dateTag] = 33534 cloneableTags[float32Tag] = cloneableTags[float64Tag] = 33535 cloneableTags[int8Tag] = cloneableTags[int16Tag] = 33536 cloneableTags[int32Tag] = cloneableTags[mapTag] = 33537 cloneableTags[numberTag] = cloneableTags[objectTag] = 33538 cloneableTags[regexpTag] = cloneableTags[setTag] = 33539 cloneableTags[stringTag] = cloneableTags[symbolTag] = 33540 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = 33541 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; 33542 cloneableTags[errorTag] = cloneableTags[funcTag] = 33543 cloneableTags[weakMapTag] = false; 33544 33545 /** Used to map Latin Unicode letters to basic Latin letters. */ 33546 var deburredLetters = { 33547 // Latin-1 Supplement block. 33548 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', 33549 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', 33550 '\xc7': 'C', '\xe7': 'c', 33551 '\xd0': 'D', '\xf0': 'd', 33552 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', 33553 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', 33554 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', 33555 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', 33556 '\xd1': 'N', '\xf1': 'n', 33557 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', 33558 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', 33559 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', 33560 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', 33561 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', 33562 '\xc6': 'Ae', '\xe6': 'ae', 33563 '\xde': 'Th', '\xfe': 'th', 33564 '\xdf': 'ss', 33565 // Latin Extended-A block. 33566 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', 33567 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', 33568 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', 33569 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', 33570 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', 33571 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', 33572 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', 33573 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', 33574 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', 33575 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', 33576 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', 33577 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', 33578 '\u0134': 'J', '\u0135': 'j', 33579 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', 33580 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', 33581 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', 33582 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', 33583 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', 33584 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', 33585 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', 33586 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', 33587 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', 33588 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', 33589 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', 33590 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', 33591 '\u0163': 't', '\u0165': 't', '\u0167': 't', 33592 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', 33593 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', 33594 '\u0174': 'W', '\u0175': 'w', 33595 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', 33596 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', 33597 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', 33598 '\u0132': 'IJ', '\u0133': 'ij', 33599 '\u0152': 'Oe', '\u0153': 'oe', 33600 '\u0149': "'n", '\u017f': 's' 33601 }; 33602 33603 /** Used to map characters to HTML entities. */ 33604 var htmlEscapes = { 33605 '&': '&', 33606 '<': '<', 33607 '>': '>', 33608 '"': '"', 33609 "'": ''' 33610 }; 33611 33612 /** Used to map HTML entities to characters. */ 33613 var htmlUnescapes = { 33614 '&': '&', 33615 '<': '<', 33616 '>': '>', 33617 '"': '"', 33618 ''': "'" 33619 }; 33620 33621 /** Used to escape characters for inclusion in compiled string literals. */ 33622 var stringEscapes = { 33623 '\\': '\\', 33624 "'": "'", 33625 '\n': 'n', 33626 '\r': 'r', 33627 '\u2028': 'u2028', 33628 '\u2029': 'u2029' 33629 }; 33630 33631 /** Built-in method references without a dependency on `root`. */ 33632 var freeParseFloat = parseFloat, 33633 freeParseInt = parseInt; 33634 33635 /** Detect free variable `global` from Node.js. */ 33636 var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; 33637 33638 /** Detect free variable `self`. */ 33639 var freeSelf = typeof self == 'object' && self && self.Object === Object && self; 33640 33641 /** Used as a reference to the global object. */ 33642 var root = freeGlobal || freeSelf || Function('return this')(); 33643 33644 /** Detect free variable `exports`. */ 33645 var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; 33646 33647 /** Detect free variable `module`. */ 33648 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; 33649 33650 /** Detect the popular CommonJS extension `module.exports`. */ 33651 var moduleExports = freeModule && freeModule.exports === freeExports; 33652 33653 /** Detect free variable `process` from Node.js. */ 33654 var freeProcess = moduleExports && freeGlobal.process; 33655 33656 /** Used to access faster Node.js helpers. */
vendor: 8,860 bytes, lines 33657-33950
33657 var nodeUtil = (function() { 33658 try { 33659 // Use `util.types` for Node.js 10+. 33660 var types = freeModule && freeModule.require && freeModule.require('util').types; 33661 33662 if (types) { 33663 return types; 33664 } 33665 33666 // Legacy `process.binding('util')` for Node.js < 10. 33667 return freeProcess && freeProcess.binding && freeProcess.binding('util'); 33668 } catch (e) {} 33669 }()); 33670 33671 /* Node.js helper references. */ 33672 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, 33673 nodeIsDate = nodeUtil && nodeUtil.isDate, 33674 nodeIsMap = nodeUtil && nodeUtil.isMap, 33675 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, 33676 nodeIsSet = nodeUtil && nodeUtil.isSet, 33677 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; 33678 33679 /*--------------------------------------------------------------------------*/ 33680 33681 /** 33682 * A faster alternative to `Function#apply`, this function invokes `func` 33683 * with the `this` binding of `thisArg` and the arguments of `args`. 33684 * 33685 * @private 33686 * @param {Function} func The function to invoke. 33687 * @param {*} thisArg The `this` binding of `func`. 33688 * @param {Array} args The arguments to invoke `func` with. 33689 * @returns {*} Returns the result of `func`. 33690 */ 33691 function apply(func, thisArg, args) { 33692 switch (args.length) { 33693 case 0: return func.call(thisArg); 33694 case 1: return func.call(thisArg, args[0]); 33695 case 2: return func.call(thisArg, args[0], args[1]); 33696 case 3: return func.call(thisArg, args[0], args[1], args[2]); 33697 } 33698 return func.apply(thisArg, args); 33699 } 33700 33701 /** 33702 * A specialized version of `baseAggregator` for arrays. 33703 * 33704 * @private 33705 * @param {Array} [array] The array to iterate over. 33706 * @param {Function} setter The function to set `accumulator` values. 33707 * @param {Function} iteratee The iteratee to transform keys. 33708 * @param {Object} accumulator The initial aggregated object. 33709 * @returns {Function} Returns `accumulator`. 33710 */ 33711 function arrayAggregator(array, setter, iteratee, accumulator) { 33712 var index = -1, 33713 length = array == null ? 0 : array.length; 33714 33715 while (++index < length) { 33716 var value = array[index]; 33717 setter(accumulator, value, iteratee(value), array); 33718 } 33719 return accumulator; 33720 } 33721 33722 /** 33723 * A specialized version of `_.forEach` for arrays without support for 33724 * iteratee shorthands. 33725 * 33726 * @private 33727 * @param {Array} [array] The array to iterate over. 33728 * @param {Function} iteratee The function invoked per iteration. 33729 * @returns {Array} Returns `array`. 33730 */ 33731 function arrayEach(array, iteratee) { 33732 var index = -1, 33733 length = array == null ? 0 : array.length; 33734 33735 while (++index < length) { 33736 if (iteratee(array[index], index, array) === false) { 33737 break; 33738 } 33739 } 33740 return array; 33741 } 33742 33743 /** 33744 * A specialized version of `_.forEachRight` for arrays without support for 33745 * iteratee shorthands. 33746 * 33747 * @private 33748 * @param {Array} [array] The array to iterate over. 33749 * @param {Function} iteratee The function invoked per iteration. 33750 * @returns {Array} Returns `array`. 33751 */ 33752 function arrayEachRight(array, iteratee) { 33753 var length = array == null ? 0 : array.length; 33754 33755 while (length--) { 33756 if (iteratee(array[length], length, array) === false) { 33757 break; 33758 } 33759 } 33760 return array; 33761 } 33762 33763 /** 33764 * A specialized version of `_.every` for arrays without support for 33765 * iteratee shorthands. 33766 * 33767 * @private 33768 * @param {Array} [array] The array to iterate over. 33769 * @param {Function} predicate The function invoked per iteration. 33770 * @returns {boolean} Returns `true` if all elements pass the predicate check, 33771 * else `false`. 33772 */ 33773 function arrayEvery(array, predicate) { 33774 var index = -1, 33775 length = array == null ? 0 : array.length; 33776 33777 while (++index < length) { 33778 if (!predicate(array[index], index, array)) { 33779 return false; 33780 } 33781 } 33782 return true; 33783 } 33784 33785 /** 33786 * A specialized version of `_.filter` for arrays without support for 33787 * iteratee shorthands. 33788 * 33789 * @private 33790 * @param {Array} [array] The array to iterate over. 33791 * @param {Function} predicate The function invoked per iteration. 33792 * @returns {Array} Returns the new filtered array. 33793 */ 33794 function arrayFilter(array, predicate) { 33795 var index = -1, 33796 length = array == null ? 0 : array.length, 33797 resIndex = 0, 33798 result = []; 33799 33800 while (++index < length) { 33801 var value = array[index]; 33802 if (predicate(value, index, array)) { 33803 result[resIndex++] = value; 33804 } 33805 } 33806 return result; 33807 } 33808 33809 /** 33810 * A specialized version of `_.includes` for arrays without support for 33811 * specifying an index to search from. 33812 * 33813 * @private 33814 * @param {Array} [array] The array to inspect. 33815 * @param {*} target The value to search for. 33816 * @returns {boolean} Returns `true` if `target` is found, else `false`. 33817 */ 33818 function arrayIncludes(array, value) { 33819 var length = array == null ? 0 : array.length; 33820 return !!length && baseIndexOf(array, value, 0) > -1; 33821 } 33822 33823 /** 33824 * This function is like `arrayIncludes` except that it accepts a comparator. 33825 * 33826 * @private 33827 * @param {Array} [array] The array to inspect. 33828 * @param {*} target The value to search for. 33829 * @param {Function} comparator The comparator invoked per element. 33830 * @returns {boolean} Returns `true` if `target` is found, else `false`. 33831 */ 33832 function arrayIncludesWith(array, value, comparator) { 33833 var index = -1, 33834 length = array == null ? 0 : array.length; 33835 33836 while (++index < length) { 33837 if (comparator(value, array[index])) { 33838 return true; 33839 } 33840 } 33841 return false; 33842 } 33843 33844 /** 33845 * A specialized version of `_.map` for arrays without support for iteratee 33846 * shorthands. 33847 * 33848 * @private 33849 * @param {Array} [array] The array to iterate over. 33850 * @param {Function} iteratee The function invoked per iteration. 33851 * @returns {Array} Returns the new mapped array. 33852 */ 33853 function arrayMap(array, iteratee) { 33854 var index = -1, 33855 length = array == null ? 0 : array.length, 33856 result = Array(length); 33857 33858 while (++index < length) { 33859 result[index] = iteratee(array[index], index, array); 33860 } 33861 return result; 33862 } 33863 33864 /** 33865 * Appends the elements of `values` to `array`. 33866 * 33867 * @private 33868 * @param {Array} array The array to modify. 33869 * @param {Array} values The values to append. 33870 * @returns {Array} Returns `array`. 33871 */ 33872 function arrayPush(array, values) { 33873 var index = -1, 33874 length = values.length, 33875 offset = array.length; 33876 33877 while (++index < length) { 33878 array[offset + index] = values[index]; 33879 } 33880 return array; 33881 } 33882 33883 /** 33884 * A specialized version of `_.reduce` for arrays without support for 33885 * iteratee shorthands. 33886 * 33887 * @private 33888 * @param {Array} [array] The array to iterate over. 33889 * @param {Function} iteratee The function invoked per iteration. 33890 * @param {*} [accumulator] The initial value. 33891 * @param {boolean} [initAccum] Specify using the first element of `array` as 33892 * the initial value. 33893 * @returns {*} Returns the accumulated value. 33894 */ 33895 function arrayReduce(array, iteratee, accumulator, initAccum) { 33896 var index = -1, 33897 length = array == null ? 0 : array.length; 33898 33899 if (initAccum && length) { 33900 accumulator = array[++index]; 33901 } 33902 while (++index < length) { 33903 accumulator = iteratee(accumulator, array[index], index, array); 33904 } 33905 return accumulator; 33906 } 33907 33908 /** 33909 * A specialized version of `_.reduceRight` for arrays without support for 33910 * iteratee shorthands. 33911 * 33912 * @private 33913 * @param {Array} [array] The array to iterate over. 33914 * @param {Function} iteratee The function invoked per iteration. 33915 * @param {*} [accumulator] The initial value. 33916 * @param {boolean} [initAccum] Specify using the last element of `array` as 33917 * the initial value. 33918 * @returns {*} Returns the accumulated value. 33919 */ 33920 function arrayReduceRight(array, iteratee, accumulator, initAccum) { 33921 var length = array == null ? 0 : array.length; 33922 if (initAccum && length) { 33923 accumulator = array[--length]; 33924 } 33925 while (length--) { 33926 accumulator = iteratee(accumulator, array[length], length, array); 33927 } 33928 return accumulator; 33929 } 33930 33931 /** 33932 * A specialized version of `_.some` for arrays without support for iteratee 33933 * shorthands. 33934 * 33935 * @private 33936 * @param {Array} [array] The array to iterate over. 33937 * @param {Function} predicate The function invoked per iteration. 33938 * @returns {boolean} Returns `true` if any element passes the predicate check, 33939 * else `false`. 33940 */ 33941 function arraySome(array, predicate) { 33942 var index = -1, 33943 length = array == null ? 0 : array.length; 33944 33945 while (++index < length) { 33946 if (predicate(array[index], index, array)) { 33947 return true; 33948 } 33949 } 33950 return false;
vendor: 6,984 bytes, lines 33951-34182
33951 } 33952 33953 /** 33954 * Gets the size of an ASCII `string`. 33955 * 33956 * @private 33957 * @param {string} string The string inspect. 33958 * @returns {number} Returns the string size. 33959 */ 33960 var asciiSize = baseProperty('length'); 33961 33962 /** 33963 * Converts an ASCII `string` to an array. 33964 * 33965 * @private 33966 * @param {string} string The string to convert. 33967 * @returns {Array} Returns the converted array. 33968 */ 33969 function asciiToArray(string) { 33970 return string.split(''); 33971 } 33972 33973 /** 33974 * Splits an ASCII `string` into an array of its words. 33975 * 33976 * @private 33977 * @param {string} The string to inspect. 33978 * @returns {Array} Returns the words of `string`. 33979 */ 33980 function asciiWords(string) { 33981 return string.match(reAsciiWord) || []; 33982 } 33983 33984 /** 33985 * The base implementation of methods like `_.findKey` and `_.findLastKey`, 33986 * without support for iteratee shorthands, which iterates over `collection` 33987 * using `eachFunc`. 33988 * 33989 * @private 33990 * @param {Array|Object} collection The collection to inspect. 33991 * @param {Function} predicate The function invoked per iteration. 33992 * @param {Function} eachFunc The function to iterate over `collection`. 33993 * @returns {*} Returns the found element or its key, else `undefined`. 33994 */ 33995 function baseFindKey(collection, predicate, eachFunc) { 33996 var result; 33997 eachFunc(collection, function(value, key, collection) { 33998 if (predicate(value, key, collection)) { 33999 result = key; 34000 return false; 34001 } 34002 }); 34003 return result; 34004 } 34005 34006 /** 34007 * The base implementation of `_.findIndex` and `_.findLastIndex` without 34008 * support for iteratee shorthands. 34009 * 34010 * @private 34011 * @param {Array} array The array to inspect. 34012 * @param {Function} predicate The function invoked per iteration. 34013 * @param {number} fromIndex The index to search from. 34014 * @param {boolean} [fromRight] Specify iterating from right to left. 34015 * @returns {number} Returns the index of the matched value, else `-1`. 34016 */ 34017 function baseFindIndex(array, predicate, fromIndex, fromRight) { 34018 var length = array.length, 34019 index = fromIndex + (fromRight ? 1 : -1); 34020 34021 while ((fromRight ? index-- : ++index < length)) { 34022 if (predicate(array[index], index, array)) { 34023 return index; 34024 } 34025 } 34026 return -1; 34027 } 34028 34029 /** 34030 * The base implementation of `_.indexOf` without `fromIndex` bounds checks. 34031 * 34032 * @private 34033 * @param {Array} array The array to inspect. 34034 * @param {*} value The value to search for. 34035 * @param {number} fromIndex The index to search from. 34036 * @returns {number} Returns the index of the matched value, else `-1`. 34037 */ 34038 function baseIndexOf(array, value, fromIndex) { 34039 return value === value 34040 ? strictIndexOf(array, value, fromIndex) 34041 : baseFindIndex(array, baseIsNaN, fromIndex); 34042 } 34043 34044 /** 34045 * This function is like `baseIndexOf` except that it accepts a comparator. 34046 * 34047 * @private 34048 * @param {Array} array The array to inspect. 34049 * @param {*} value The value to search for. 34050 * @param {number} fromIndex The index to search from. 34051 * @param {Function} comparator The comparator invoked per element. 34052 * @returns {number} Returns the index of the matched value, else `-1`. 34053 */ 34054 function baseIndexOfWith(array, value, fromIndex, comparator) { 34055 var index = fromIndex - 1, 34056 length = array.length; 34057 34058 while (++index < length) { 34059 if (comparator(array[index], value)) { 34060 return index; 34061 } 34062 } 34063 return -1; 34064 } 34065 34066 /** 34067 * The base implementation of `_.isNaN` without support for number objects. 34068 * 34069 * @private 34070 * @param {*} value The value to check. 34071 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. 34072 */ 34073 function baseIsNaN(value) { 34074 return value !== value; 34075 } 34076 34077 /** 34078 * The base implementation of `_.mean` and `_.meanBy` without support for 34079 * iteratee shorthands. 34080 * 34081 * @private 34082 * @param {Array} array The array to iterate over. 34083 * @param {Function} iteratee The function invoked per iteration. 34084 * @returns {number} Returns the mean. 34085 */ 34086 function baseMean(array, iteratee) { 34087 var length = array == null ? 0 : array.length; 34088 return length ? (baseSum(array, iteratee) / length) : NAN; 34089 } 34090 34091 /** 34092 * The base implementation of `_.property` without support for deep paths. 34093 * 34094 * @private 34095 * @param {string} key The key of the property to get. 34096 * @returns {Function} Returns the new accessor function. 34097 */ 34098 function baseProperty(key) { 34099 return function(object) { 34100 return object == null ? undefined : object[key]; 34101 }; 34102 } 34103 34104 /** 34105 * The base implementation of `_.propertyOf` without support for deep paths. 34106 * 34107 * @private 34108 * @param {Object} object The object to query. 34109 * @returns {Function} Returns the new accessor function. 34110 */ 34111 function basePropertyOf(object) { 34112 return function(key) { 34113 return object == null ? undefined : object[key]; 34114 }; 34115 } 34116 34117 /** 34118 * The base implementation of `_.reduce` and `_.reduceRight`, without support 34119 * for iteratee shorthands, which iterates over `collection` using `eachFunc`. 34120 * 34121 * @private 34122 * @param {Array|Object} collection The collection to iterate over. 34123 * @param {Function} iteratee The function invoked per iteration. 34124 * @param {*} accumulator The initial value. 34125 * @param {boolean} initAccum Specify using the first or last element of 34126 * `collection` as the initial value. 34127 * @param {Function} eachFunc The function to iterate over `collection`. 34128 * @returns {*} Returns the accumulated value. 34129 */ 34130 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { 34131 eachFunc(collection, function(value, index, collection) { 34132 accumulator = initAccum 34133 ? (initAccum = false, value) 34134 : iteratee(accumulator, value, index, collection); 34135 }); 34136 return accumulator; 34137 } 34138 34139 /** 34140 * The base implementation of `_.sortBy` which uses `comparer` to define the 34141 * sort order of `array` and replaces criteria objects with their corresponding 34142 * values. 34143 * 34144 * @private 34145 * @param {Array} array The array to sort. 34146 * @param {Function} comparer The function to define sort order. 34147 * @returns {Array} Returns `array`. 34148 */ 34149 function baseSortBy(array, comparer) { 34150 var length = array.length; 34151 34152 array.sort(comparer); 34153 while (length--) { 34154 array[length] = array[length].value; 34155 } 34156 return array; 34157 } 34158 34159 /** 34160 * The base implementation of `_.sum` and `_.sumBy` without support for 34161 * iteratee shorthands. 34162 * 34163 * @private 34164 * @param {Array} array The array to iterate over. 34165 * @param {Function} iteratee The function invoked per iteration. 34166 * @returns {number} Returns the sum. 34167 */ 34168 function baseSum(array, iteratee) { 34169 var result, 34170 index = -1, 34171 length = array.length; 34172 34173 while (++index < length) { 34174 var current = iteratee(array[index]); 34175 if (current !== undefined) { 34176 result = result === undefined ? current : (result + current); 34177 } 34178 } 34179 return result; 34180 } 34181 34182 /**
vendor: 5,596 bytes, lines 34183-34375
34183 * The base implementation of `_.times` without support for iteratee shorthands 34184 * or max array length checks. 34185 * 34186 * @private 34187 * @param {number} n The number of times to invoke `iteratee`. 34188 * @param {Function} iteratee The function invoked per iteration. 34189 * @returns {Array} Returns the array of results. 34190 */ 34191 function baseTimes(n, iteratee) { 34192 var index = -1, 34193 result = Array(n); 34194 34195 while (++index < n) { 34196 result[index] = iteratee(index); 34197 } 34198 return result; 34199 } 34200 34201 /** 34202 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array 34203 * of key-value pairs for `object` corresponding to the property names of `props`. 34204 * 34205 * @private 34206 * @param {Object} object The object to query. 34207 * @param {Array} props The property names to get values for. 34208 * @returns {Object} Returns the key-value pairs. 34209 */ 34210 function baseToPairs(object, props) { 34211 return arrayMap(props, function(key) { 34212 return [key, object[key]]; 34213 }); 34214 } 34215 34216 /** 34217 * The base implementation of `_.unary` without support for storing metadata. 34218 * 34219 * @private 34220 * @param {Function} func The function to cap arguments for. 34221 * @returns {Function} Returns the new capped function. 34222 */ 34223 function baseUnary(func) { 34224 return function(value) { 34225 return func(value); 34226 }; 34227 } 34228 34229 /** 34230 * The base implementation of `_.values` and `_.valuesIn` which creates an 34231 * array of `object` property values corresponding to the property names 34232 * of `props`. 34233 * 34234 * @private 34235 * @param {Object} object The object to query. 34236 * @param {Array} props The property names to get values for. 34237 * @returns {Object} Returns the array of property values. 34238 */ 34239 function baseValues(object, props) { 34240 return arrayMap(props, function(key) { 34241 return object[key]; 34242 }); 34243 } 34244 34245 /** 34246 * Checks if a `cache` value for `key` exists. 34247 * 34248 * @private 34249 * @param {Object} cache The cache to query. 34250 * @param {string} key The key of the entry to check. 34251 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 34252 */ 34253 function cacheHas(cache, key) { 34254 return cache.has(key); 34255 } 34256 34257 /** 34258 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol 34259 * that is not found in the character symbols. 34260 * 34261 * @private 34262 * @param {Array} strSymbols The string symbols to inspect. 34263 * @param {Array} chrSymbols The character symbols to find. 34264 * @returns {number} Returns the index of the first unmatched string symbol. 34265 */ 34266 function charsStartIndex(strSymbols, chrSymbols) { 34267 var index = -1, 34268 length = strSymbols.length; 34269 34270 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} 34271 return index; 34272 } 34273 34274 /** 34275 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol 34276 * that is not found in the character symbols. 34277 * 34278 * @private 34279 * @param {Array} strSymbols The string symbols to inspect. 34280 * @param {Array} chrSymbols The character symbols to find. 34281 * @returns {number} Returns the index of the last unmatched string symbol. 34282 */ 34283 function charsEndIndex(strSymbols, chrSymbols) { 34284 var index = strSymbols.length; 34285 34286 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} 34287 return index; 34288 } 34289 34290 /** 34291 * Gets the number of `placeholder` occurrences in `array`. 34292 * 34293 * @private 34294 * @param {Array} array The array to inspect. 34295 * @param {*} placeholder The placeholder to search for. 34296 * @returns {number} Returns the placeholder count. 34297 */ 34298 function countHolders(array, placeholder) { 34299 var length = array.length, 34300 result = 0; 34301 34302 while (length--) { 34303 if (array[length] === placeholder) { 34304 ++result; 34305 } 34306 } 34307 return result; 34308 } 34309 34310 /** 34311 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A 34312 * letters to basic Latin letters. 34313 * 34314 * @private 34315 * @param {string} letter The matched letter to deburr. 34316 * @returns {string} Returns the deburred letter. 34317 */ 34318 var deburrLetter = basePropertyOf(deburredLetters); 34319 34320 /** 34321 * Used by `_.escape` to convert characters to HTML entities. 34322 * 34323 * @private 34324 * @param {string} chr The matched character to escape. 34325 * @returns {string} Returns the escaped character. 34326 */ 34327 var escapeHtmlChar = basePropertyOf(htmlEscapes); 34328 34329 /** 34330 * Used by `_.template` to escape characters for inclusion in compiled string literals. 34331 * 34332 * @private 34333 * @param {string} chr The matched character to escape. 34334 * @returns {string} Returns the escaped character. 34335 */ 34336 function escapeStringChar(chr) { 34337 return '\\' + stringEscapes[chr]; 34338 } 34339 34340 /** 34341 * Gets the value at `key` of `object`. 34342 * 34343 * @private 34344 * @param {Object} [object] The object to query. 34345 * @param {string} key The key of the property to get. 34346 * @returns {*} Returns the property value. 34347 */ 34348 function getValue(object, key) { 34349 return object == null ? undefined : object[key]; 34350 } 34351 34352 /** 34353 * Checks if `string` contains Unicode symbols. 34354 * 34355 * @private 34356 * @param {string} string The string to inspect. 34357 * @returns {boolean} Returns `true` if a symbol is found, else `false`. 34358 */ 34359 function hasUnicode(string) { 34360 return reHasUnicode.test(string); 34361 } 34362 34363 /** 34364 * Checks if `string` contains a word composed of Unicode symbols. 34365 * 34366 * @private 34367 * @param {string} string The string to inspect. 34368 * @returns {boolean} Returns `true` if a word is found, else `false`. 34369 */ 34370 function hasUnicodeWord(string) { 34371 return reHasUnicodeWord.test(string); 34372 } 34373 34374 /** 34375 * Converts `iterator` to an array.
vendor: 4,118 bytes, lines 34376-34541
34376 * 34377 * @private 34378 * @param {Object} iterator The iterator to convert. 34379 * @returns {Array} Returns the converted array. 34380 */ 34381 function iteratorToArray(iterator) { 34382 var data, 34383 result = []; 34384 34385 while (!(data = iterator.next()).done) { 34386 result.push(data.value); 34387 } 34388 return result; 34389 } 34390 34391 /** 34392 * Converts `map` to its key-value pairs. 34393 * 34394 * @private 34395 * @param {Object} map The map to convert. 34396 * @returns {Array} Returns the key-value pairs. 34397 */ 34398 function mapToArray(map) { 34399 var index = -1, 34400 result = Array(map.size); 34401 34402 map.forEach(function(value, key) { 34403 result[++index] = [key, value]; 34404 }); 34405 return result; 34406 } 34407 34408 /** 34409 * Creates a unary function that invokes `func` with its argument transformed. 34410 * 34411 * @private 34412 * @param {Function} func The function to wrap. 34413 * @param {Function} transform The argument transform. 34414 * @returns {Function} Returns the new function. 34415 */ 34416 function overArg(func, transform) { 34417 return function(arg) { 34418 return func(transform(arg)); 34419 }; 34420 } 34421 34422 /** 34423 * Replaces all `placeholder` elements in `array` with an internal placeholder 34424 * and returns an array of their indexes. 34425 * 34426 * @private 34427 * @param {Array} array The array to modify. 34428 * @param {*} placeholder The placeholder to replace. 34429 * @returns {Array} Returns the new array of placeholder indexes. 34430 */ 34431 function replaceHolders(array, placeholder) { 34432 var index = -1, 34433 length = array.length, 34434 resIndex = 0, 34435 result = []; 34436 34437 while (++index < length) { 34438 var value = array[index]; 34439 if (value === placeholder || value === PLACEHOLDER) { 34440 array[index] = PLACEHOLDER; 34441 result[resIndex++] = index; 34442 } 34443 } 34444 return result; 34445 } 34446 34447 /** 34448 * Converts `set` to an array of its values. 34449 * 34450 * @private 34451 * @param {Object} set The set to convert. 34452 * @returns {Array} Returns the values. 34453 */ 34454 function setToArray(set) { 34455 var index = -1, 34456 result = Array(set.size); 34457 34458 set.forEach(function(value) { 34459 result[++index] = value; 34460 }); 34461 return result; 34462 } 34463 34464 /** 34465 * Converts `set` to its value-value pairs. 34466 * 34467 * @private 34468 * @param {Object} set The set to convert. 34469 * @returns {Array} Returns the value-value pairs. 34470 */ 34471 function setToPairs(set) { 34472 var index = -1, 34473 result = Array(set.size); 34474 34475 set.forEach(function(value) { 34476 result[++index] = [value, value]; 34477 }); 34478 return result; 34479 } 34480 34481 /** 34482 * A specialized version of `_.indexOf` which performs strict equality 34483 * comparisons of values, i.e. `===`. 34484 * 34485 * @private 34486 * @param {Array} array The array to inspect. 34487 * @param {*} value The value to search for. 34488 * @param {number} fromIndex The index to search from. 34489 * @returns {number} Returns the index of the matched value, else `-1`. 34490 */ 34491 function strictIndexOf(array, value, fromIndex) { 34492 var index = fromIndex - 1, 34493 length = array.length; 34494 34495 while (++index < length) { 34496 if (array[index] === value) { 34497 return index; 34498 } 34499 } 34500 return -1; 34501 } 34502 34503 /** 34504 * A specialized version of `_.lastIndexOf` which performs strict equality 34505 * comparisons of values, i.e. `===`. 34506 * 34507 * @private 34508 * @param {Array} array The array to inspect. 34509 * @param {*} value The value to search for. 34510 * @param {number} fromIndex The index to search from. 34511 * @returns {number} Returns the index of the matched value, else `-1`. 34512 */ 34513 function strictLastIndexOf(array, value, fromIndex) { 34514 var index = fromIndex + 1; 34515 while (index--) { 34516 if (array[index] === value) { 34517 return index; 34518 } 34519 } 34520 return index; 34521 } 34522 34523 /** 34524 * Gets the number of symbols in `string`. 34525 * 34526 * @private 34527 * @param {string} string The string to inspect. 34528 * @returns {number} Returns the string size. 34529 */ 34530 function stringSize(string) { 34531 return hasUnicode(string) 34532 ? unicodeSize(string) 34533 : asciiSize(string); 34534 } 34535 34536 /** 34537 * Converts `string` to an array. 34538 * 34539 * @private 34540 * @param {string} string The string to convert. 34541 * @returns {Array} Returns the converted array.
vendor: 10,876 bytes, lines 34542-34815
34542 */ 34543 function stringToArray(string) { 34544 return hasUnicode(string) 34545 ? unicodeToArray(string) 34546 : asciiToArray(string); 34547 } 34548 34549 /** 34550 * Used by `_.unescape` to convert HTML entities to characters. 34551 * 34552 * @private 34553 * @param {string} chr The matched character to unescape. 34554 * @returns {string} Returns the unescaped character. 34555 */ 34556 var unescapeHtmlChar = basePropertyOf(htmlUnescapes); 34557 34558 /** 34559 * Gets the size of a Unicode `string`. 34560 * 34561 * @private 34562 * @param {string} string The string inspect. 34563 * @returns {number} Returns the string size. 34564 */ 34565 function unicodeSize(string) { 34566 var result = reUnicode.lastIndex = 0; 34567 while (reUnicode.test(string)) { 34568 ++result; 34569 } 34570 return result; 34571 } 34572 34573 /** 34574 * Converts a Unicode `string` to an array. 34575 * 34576 * @private 34577 * @param {string} string The string to convert. 34578 * @returns {Array} Returns the converted array. 34579 */ 34580 function unicodeToArray(string) { 34581 return string.match(reUnicode) || []; 34582 } 34583 34584 /** 34585 * Splits a Unicode `string` into an array of its words. 34586 * 34587 * @private 34588 * @param {string} The string to inspect. 34589 * @returns {Array} Returns the words of `string`. 34590 */ 34591 function unicodeWords(string) { 34592 return string.match(reUnicodeWord) || []; 34593 } 34594 34595 /*--------------------------------------------------------------------------*/ 34596 34597 /** 34598 * Create a new pristine `lodash` function using the `context` object. 34599 * 34600 * @static 34601 * @memberOf _ 34602 * @since 1.1.0 34603 * @category Util 34604 * @param {Object} [context=root] The context object. 34605 * @returns {Function} Returns a new `lodash` function. 34606 * @example 34607 * 34608 * _.mixin({ 'foo': _.constant('foo') }); 34609 * 34610 * var lodash = _.runInContext(); 34611 * lodash.mixin({ 'bar': lodash.constant('bar') }); 34612 * 34613 * _.isFunction(_.foo); 34614 * // => true 34615 * _.isFunction(_.bar); 34616 * // => false 34617 * 34618 * lodash.isFunction(lodash.foo); 34619 * // => false 34620 * lodash.isFunction(lodash.bar); 34621 * // => true 34622 * 34623 * // Create a suped-up `defer` in Node.js. 34624 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; 34625 */ 34626 var runInContext = (function runInContext(context) { 34627 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); 34628 34629 /** Built-in constructor references. */ 34630 var Array = context.Array, 34631 Date = context.Date, 34632 Error = context.Error, 34633 Function = context.Function, 34634 Math = context.Math, 34635 Object = context.Object, 34636 RegExp = context.RegExp, 34637 String = context.String, 34638 TypeError = context.TypeError; 34639 34640 /** Used for built-in method references. */ 34641 var arrayProto = Array.prototype, 34642 funcProto = Function.prototype, 34643 objectProto = Object.prototype; 34644 34645 /** Used to detect overreaching core-js shims. */ 34646 var coreJsData = context['__core-js_shared__']; 34647 34648 /** Used to resolve the decompiled source of functions. */ 34649 var funcToString = funcProto.toString; 34650 34651 /** Used to check objects for own properties. */ 34652 var hasOwnProperty = objectProto.hasOwnProperty; 34653 34654 /** Used to generate unique IDs. */ 34655 var idCounter = 0; 34656 34657 /** Used to detect methods masquerading as native. */ 34658 var maskSrcKey = (function() { 34659 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); 34660 return uid ? ('Symbol(src)_1.' + uid) : ''; 34661 }()); 34662 34663 /** 34664 * Used to resolve the 34665 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) 34666 * of values. 34667 */ 34668 var nativeObjectToString = objectProto.toString; 34669 34670 /** Used to infer the `Object` constructor. */ 34671 var objectCtorString = funcToString.call(Object); 34672 34673 /** Used to restore the original `_` reference in `_.noConflict`. */ 34674 var oldDash = root._; 34675 34676 /** Used to detect if a method is native. */ 34677 var reIsNative = RegExp('^' + 34678 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') 34679 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' 34680 ); 34681 34682 /** Built-in value references. */ 34683 var Buffer = moduleExports ? context.Buffer : undefined, 34684 Symbol = context.Symbol, 34685 Uint8Array = context.Uint8Array, 34686 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, 34687 getPrototype = overArg(Object.getPrototypeOf, Object), 34688 objectCreate = Object.create, 34689 propertyIsEnumerable = objectProto.propertyIsEnumerable, 34690 splice = arrayProto.splice, 34691 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, 34692 symIterator = Symbol ? Symbol.iterator : undefined, 34693 symToStringTag = Symbol ? Symbol.toStringTag : undefined; 34694 34695 var defineProperty = (function() { 34696 try { 34697 var func = getNative(Object, 'defineProperty'); 34698 func({}, '', {}); 34699 return func; 34700 } catch (e) {} 34701 }()); 34702 34703 /** Mocked built-ins. */ 34704 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, 34705 ctxNow = Date && Date.now !== root.Date.now && Date.now, 34706 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; 34707 34708 /* Built-in method references for those with the same name as other `lodash` methods. */ 34709 var nativeCeil = Math.ceil, 34710 nativeFloor = Math.floor, 34711 nativeGetSymbols = Object.getOwnPropertySymbols, 34712 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, 34713 nativeIsFinite = context.isFinite, 34714 nativeJoin = arrayProto.join, 34715 nativeKeys = overArg(Object.keys, Object), 34716 nativeMax = Math.max, 34717 nativeMin = Math.min, 34718 nativeNow = Date.now, 34719 nativeParseInt = context.parseInt, 34720 nativeRandom = Math.random, 34721 nativeReverse = arrayProto.reverse; 34722 34723 /* Built-in method references that are verified to be native. */ 34724 var DataView = getNative(context, 'DataView'), 34725 Map = getNative(context, 'Map'), 34726 Promise = getNative(context, 'Promise'), 34727 Set = getNative(context, 'Set'), 34728 WeakMap = getNative(context, 'WeakMap'), 34729 nativeCreate = getNative(Object, 'create'); 34730 34731 /** Used to store function metadata. */ 34732 var metaMap = WeakMap && new WeakMap; 34733 34734 /** Used to lookup unminified function names. */ 34735 var realNames = {}; 34736 34737 /** Used to detect maps, sets, and weakmaps. */ 34738 var dataViewCtorString = toSource(DataView), 34739 mapCtorString = toSource(Map), 34740 promiseCtorString = toSource(Promise), 34741 setCtorString = toSource(Set), 34742 weakMapCtorString = toSource(WeakMap); 34743 34744 /** Used to convert symbols to primitives and strings. */ 34745 var symbolProto = Symbol ? Symbol.prototype : undefined, 34746 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, 34747 symbolToString = symbolProto ? symbolProto.toString : undefined; 34748 34749 /*------------------------------------------------------------------------*/ 34750 34751 /** 34752 * Creates a `lodash` object which wraps `value` to enable implicit method 34753 * chain sequences. Methods that operate on and return arrays, collections, 34754 * and functions can be chained together. Methods that retrieve a single value 34755 * or may return a primitive value will automatically end the chain sequence 34756 * and return the unwrapped value. Otherwise, the value must be unwrapped 34757 * with `_#value`. 34758 * 34759 * Explicit chain sequences, which must be unwrapped with `_#value`, may be 34760 * enabled using `_.chain`. 34761 * 34762 * The execution of chained methods is lazy, that is, it's deferred until 34763 * `_#value` is implicitly or explicitly called. 34764 * 34765 * Lazy evaluation allows several methods to support shortcut fusion. 34766 * Shortcut fusion is an optimization to merge iteratee calls; this avoids 34767 * the creation of intermediate arrays and can greatly reduce the number of 34768 * iteratee executions. Sections of a chain sequence qualify for shortcut 34769 * fusion if the section is applied to an array and iteratees accept only 34770 * one argument. The heuristic for whether a section qualifies for shortcut 34771 * fusion is subject to change. 34772 * 34773 * Chaining is supported in custom builds as long as the `_#value` method is 34774 * directly or indirectly included in the build. 34775 * 34776 * In addition to lodash methods, wrappers have `Array` and `String` methods. 34777 * 34778 * The wrapper `Array` methods are: 34779 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` 34780 * 34781 * The wrapper `String` methods are: 34782 * `replace` and `split` 34783 * 34784 * The wrapper methods that support shortcut fusion are: 34785 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, 34786 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, 34787 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` 34788 * 34789 * The chainable wrapper methods are: 34790 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, 34791 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, 34792 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, 34793 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, 34794 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, 34795 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, 34796 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, 34797 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, 34798 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, 34799 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, 34800 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, 34801 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, 34802 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, 34803 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, 34804 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, 34805 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, 34806 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, 34807 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, 34808 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, 34809 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, 34810 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, 34811 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, 34812 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, 34813 * `zipObject`, `zipObjectDeep`, and `zipWith` 34814 * 34815 * The wrapper methods that are **not** chainable by default are:
vendor: 18,450 bytes, lines 34816-35468
34816 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, 34817 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, 34818 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, 34819 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, 34820 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, 34821 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, 34822 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, 34823 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, 34824 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, 34825 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, 34826 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, 34827 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, 34828 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, 34829 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, 34830 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, 34831 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, 34832 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, 34833 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, 34834 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, 34835 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, 34836 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, 34837 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, 34838 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, 34839 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, 34840 * `upperFirst`, `value`, and `words` 34841 * 34842 * @name _ 34843 * @constructor 34844 * @category Seq 34845 * @param {*} value The value to wrap in a `lodash` instance. 34846 * @returns {Object} Returns the new `lodash` wrapper instance. 34847 * @example 34848 * 34849 * function square(n) { 34850 * return n * n; 34851 * } 34852 * 34853 * var wrapped = _([1, 2, 3]); 34854 * 34855 * // Returns an unwrapped value. 34856 * wrapped.reduce(_.add); 34857 * // => 6 34858 * 34859 * // Returns a wrapped value. 34860 * var squares = wrapped.map(square); 34861 * 34862 * _.isArray(squares); 34863 * // => false 34864 * 34865 * _.isArray(squares.value()); 34866 * // => true 34867 */ 34868 function lodash(value) { 34869 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { 34870 if (value instanceof LodashWrapper) { 34871 return value; 34872 } 34873 if (hasOwnProperty.call(value, '__wrapped__')) { 34874 return wrapperClone(value); 34875 } 34876 } 34877 return new LodashWrapper(value); 34878 } 34879 34880 /** 34881 * The base implementation of `_.create` without support for assigning 34882 * properties to the created object. 34883 * 34884 * @private 34885 * @param {Object} proto The object to inherit from. 34886 * @returns {Object} Returns the new object. 34887 */ 34888 var baseCreate = (function() { 34889 function object() {} 34890 return function(proto) { 34891 if (!isObject(proto)) { 34892 return {}; 34893 } 34894 if (objectCreate) { 34895 return objectCreate(proto); 34896 } 34897 object.prototype = proto; 34898 var result = new object; 34899 object.prototype = undefined; 34900 return result; 34901 }; 34902 }()); 34903 34904 /** 34905 * The function whose prototype chain sequence wrappers inherit from. 34906 * 34907 * @private 34908 */ 34909 function baseLodash() { 34910 // No operation performed. 34911 } 34912 34913 /** 34914 * The base constructor for creating `lodash` wrapper objects. 34915 * 34916 * @private 34917 * @param {*} value The value to wrap. 34918 * @param {boolean} [chainAll] Enable explicit method chain sequences. 34919 */ 34920 function LodashWrapper(value, chainAll) { 34921 this.__wrapped__ = value; 34922 this.__actions__ = []; 34923 this.__chain__ = !!chainAll; 34924 this.__index__ = 0; 34925 this.__values__ = undefined; 34926 } 34927 34928 /** 34929 * By default, the template delimiters used by lodash are like those in 34930 * embedded Ruby (ERB) as well as ES2015 template strings. Change the 34931 * following template settings to use alternative delimiters. 34932 * 34933 * @static 34934 * @memberOf _ 34935 * @type {Object} 34936 */ 34937 lodash.templateSettings = { 34938 34939 /** 34940 * Used to detect `data` property values to be HTML-escaped. 34941 * 34942 * @memberOf _.templateSettings 34943 * @type {RegExp} 34944 */ 34945 'escape': reEscape, 34946 34947 /** 34948 * Used to detect code to be evaluated. 34949 * 34950 * @memberOf _.templateSettings 34951 * @type {RegExp} 34952 */ 34953 'evaluate': reEvaluate, 34954 34955 /** 34956 * Used to detect `data` property values to inject. 34957 * 34958 * @memberOf _.templateSettings 34959 * @type {RegExp} 34960 */ 34961 'interpolate': reInterpolate, 34962 34963 /** 34964 * Used to reference the data object in the template text. 34965 * 34966 * @memberOf _.templateSettings 34967 * @type {string} 34968 */ 34969 'variable': '', 34970 34971 /** 34972 * Used to import variables into the compiled template. 34973 * 34974 * @memberOf _.templateSettings 34975 * @type {Object} 34976 */ 34977 'imports': { 34978 34979 /** 34980 * A reference to the `lodash` function. 34981 * 34982 * @memberOf _.templateSettings.imports 34983 * @type {Function} 34984 */ 34985 '_': lodash 34986 } 34987 }; 34988 34989 // Ensure wrappers are instances of `baseLodash`. 34990 lodash.prototype = baseLodash.prototype; 34991 lodash.prototype.constructor = lodash; 34992 34993 LodashWrapper.prototype = baseCreate(baseLodash.prototype); 34994 LodashWrapper.prototype.constructor = LodashWrapper; 34995 34996 /*------------------------------------------------------------------------*/ 34997 34998 /** 34999 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. 35000 * 35001 * @private 35002 * @constructor 35003 * @param {*} value The value to wrap. 35004 */ 35005 function LazyWrapper(value) { 35006 this.__wrapped__ = value; 35007 this.__actions__ = []; 35008 this.__dir__ = 1; 35009 this.__filtered__ = false; 35010 this.__iteratees__ = []; 35011 this.__takeCount__ = MAX_ARRAY_LENGTH; 35012 this.__views__ = []; 35013 } 35014 35015 /** 35016 * Creates a clone of the lazy wrapper object. 35017 * 35018 * @private 35019 * @name clone 35020 * @memberOf LazyWrapper 35021 * @returns {Object} Returns the cloned `LazyWrapper` object. 35022 */ 35023 function lazyClone() { 35024 var result = new LazyWrapper(this.__wrapped__); 35025 result.__actions__ = copyArray(this.__actions__); 35026 result.__dir__ = this.__dir__; 35027 result.__filtered__ = this.__filtered__; 35028 result.__iteratees__ = copyArray(this.__iteratees__); 35029 result.__takeCount__ = this.__takeCount__; 35030 result.__views__ = copyArray(this.__views__); 35031 return result; 35032 } 35033 35034 /** 35035 * Reverses the direction of lazy iteration. 35036 * 35037 * @private 35038 * @name reverse 35039 * @memberOf LazyWrapper 35040 * @returns {Object} Returns the new reversed `LazyWrapper` object. 35041 */ 35042 function lazyReverse() { 35043 if (this.__filtered__) { 35044 var result = new LazyWrapper(this); 35045 result.__dir__ = -1; 35046 result.__filtered__ = true; 35047 } else { 35048 result = this.clone(); 35049 result.__dir__ *= -1; 35050 } 35051 return result; 35052 } 35053 35054 /** 35055 * Extracts the unwrapped value from its lazy wrapper. 35056 * 35057 * @private 35058 * @name value 35059 * @memberOf LazyWrapper 35060 * @returns {*} Returns the unwrapped value. 35061 */ 35062 function lazyValue() { 35063 var array = this.__wrapped__.value(), 35064 dir = this.__dir__, 35065 isArr = isArray(array), 35066 isRight = dir < 0, 35067 arrLength = isArr ? array.length : 0, 35068 view = getView(0, arrLength, this.__views__), 35069 start = view.start, 35070 end = view.end, 35071 length = end - start, 35072 index = isRight ? end : (start - 1), 35073 iteratees = this.__iteratees__, 35074 iterLength = iteratees.length, 35075 resIndex = 0, 35076 takeCount = nativeMin(length, this.__takeCount__); 35077 35078 if (!isArr || (!isRight && arrLength == length && takeCount == length)) { 35079 return baseWrapperValue(array, this.__actions__); 35080 } 35081 var result = []; 35082 35083 outer: 35084 while (length-- && resIndex < takeCount) { 35085 index += dir; 35086 35087 var iterIndex = -1, 35088 value = array[index]; 35089 35090 while (++iterIndex < iterLength) { 35091 var data = iteratees[iterIndex], 35092 iteratee = data.iteratee, 35093 type = data.type, 35094 computed = iteratee(value); 35095 35096 if (type == LAZY_MAP_FLAG) { 35097 value = computed; 35098 } else if (!computed) { 35099 if (type == LAZY_FILTER_FLAG) { 35100 continue outer; 35101 } else { 35102 break outer; 35103 } 35104 } 35105 } 35106 result[resIndex++] = value; 35107 } 35108 return result; 35109 } 35110 35111 // Ensure `LazyWrapper` is an instance of `baseLodash`. 35112 LazyWrapper.prototype = baseCreate(baseLodash.prototype); 35113 LazyWrapper.prototype.constructor = LazyWrapper; 35114 35115 /*------------------------------------------------------------------------*/ 35116 35117 /** 35118 * Creates a hash object. 35119 * 35120 * @private 35121 * @constructor 35122 * @param {Array} [entries] The key-value pairs to cache. 35123 */ 35124 function Hash(entries) { 35125 var index = -1, 35126 length = entries == null ? 0 : entries.length; 35127 35128 this.clear(); 35129 while (++index < length) { 35130 var entry = entries[index]; 35131 this.set(entry[0], entry[1]); 35132 } 35133 } 35134 35135 /** 35136 * Removes all key-value entries from the hash. 35137 * 35138 * @private 35139 * @name clear 35140 * @memberOf Hash 35141 */ 35142 function hashClear() { 35143 this.__data__ = nativeCreate ? nativeCreate(null) : {}; 35144 this.size = 0; 35145 } 35146 35147 /** 35148 * Removes `key` and its value from the hash. 35149 * 35150 * @private 35151 * @name delete 35152 * @memberOf Hash 35153 * @param {Object} hash The hash to modify. 35154 * @param {string} key The key of the value to remove. 35155 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 35156 */ 35157 function hashDelete(key) { 35158 var result = this.has(key) && delete this.__data__[key]; 35159 this.size -= result ? 1 : 0; 35160 return result; 35161 } 35162 35163 /** 35164 * Gets the hash value for `key`. 35165 * 35166 * @private 35167 * @name get 35168 * @memberOf Hash 35169 * @param {string} key The key of the value to get. 35170 * @returns {*} Returns the entry value. 35171 */ 35172 function hashGet(key) { 35173 var data = this.__data__; 35174 if (nativeCreate) { 35175 var result = data[key]; 35176 return result === HASH_UNDEFINED ? undefined : result; 35177 } 35178 return hasOwnProperty.call(data, key) ? data[key] : undefined; 35179 } 35180 35181 /** 35182 * Checks if a hash value for `key` exists. 35183 * 35184 * @private 35185 * @name has 35186 * @memberOf Hash 35187 * @param {string} key The key of the entry to check. 35188 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 35189 */ 35190 function hashHas(key) { 35191 var data = this.__data__; 35192 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); 35193 } 35194 35195 /** 35196 * Sets the hash `key` to `value`. 35197 * 35198 * @private 35199 * @name set 35200 * @memberOf Hash 35201 * @param {string} key The key of the value to set. 35202 * @param {*} value The value to set. 35203 * @returns {Object} Returns the hash instance. 35204 */ 35205 function hashSet(key, value) { 35206 var data = this.__data__; 35207 this.size += this.has(key) ? 0 : 1; 35208 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; 35209 return this; 35210 } 35211 35212 // Add methods to `Hash`. 35213 Hash.prototype.clear = hashClear; 35214 Hash.prototype['delete'] = hashDelete; 35215 Hash.prototype.get = hashGet; 35216 Hash.prototype.has = hashHas; 35217 Hash.prototype.set = hashSet; 35218 35219 /*------------------------------------------------------------------------*/ 35220 35221 /** 35222 * Creates an list cache object. 35223 * 35224 * @private 35225 * @constructor 35226 * @param {Array} [entries] The key-value pairs to cache. 35227 */ 35228 function ListCache(entries) { 35229 var index = -1, 35230 length = entries == null ? 0 : entries.length; 35231 35232 this.clear(); 35233 while (++index < length) { 35234 var entry = entries[index]; 35235 this.set(entry[0], entry[1]); 35236 } 35237 } 35238 35239 /** 35240 * Removes all key-value entries from the list cache. 35241 * 35242 * @private 35243 * @name clear 35244 * @memberOf ListCache 35245 */ 35246 function listCacheClear() { 35247 this.__data__ = []; 35248 this.size = 0; 35249 } 35250 35251 /** 35252 * Removes `key` and its value from the list cache. 35253 * 35254 * @private 35255 * @name delete 35256 * @memberOf ListCache 35257 * @param {string} key The key of the value to remove. 35258 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 35259 */ 35260 function listCacheDelete(key) { 35261 var data = this.__data__, 35262 index = assocIndexOf(data, key); 35263 35264 if (index < 0) { 35265 return false; 35266 } 35267 var lastIndex = data.length - 1; 35268 if (index == lastIndex) { 35269 data.pop(); 35270 } else { 35271 splice.call(data, index, 1); 35272 } 35273 --this.size; 35274 return true; 35275 } 35276 35277 /** 35278 * Gets the list cache value for `key`. 35279 * 35280 * @private 35281 * @name get 35282 * @memberOf ListCache 35283 * @param {string} key The key of the value to get. 35284 * @returns {*} Returns the entry value. 35285 */ 35286 function listCacheGet(key) { 35287 var data = this.__data__, 35288 index = assocIndexOf(data, key); 35289 35290 return index < 0 ? undefined : data[index][1]; 35291 } 35292 35293 /** 35294 * Checks if a list cache value for `key` exists. 35295 * 35296 * @private 35297 * @name has 35298 * @memberOf ListCache 35299 * @param {string} key The key of the entry to check. 35300 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 35301 */ 35302 function listCacheHas(key) { 35303 return assocIndexOf(this.__data__, key) > -1; 35304 } 35305 35306 /** 35307 * Sets the list cache `key` to `value`. 35308 * 35309 * @private 35310 * @name set 35311 * @memberOf ListCache 35312 * @param {string} key The key of the value to set. 35313 * @param {*} value The value to set. 35314 * @returns {Object} Returns the list cache instance. 35315 */ 35316 function listCacheSet(key, value) { 35317 var data = this.__data__, 35318 index = assocIndexOf(data, key); 35319 35320 if (index < 0) { 35321 ++this.size; 35322 data.push([key, value]); 35323 } else { 35324 data[index][1] = value; 35325 } 35326 return this; 35327 } 35328 35329 // Add methods to `ListCache`. 35330 ListCache.prototype.clear = listCacheClear; 35331 ListCache.prototype['delete'] = listCacheDelete; 35332 ListCache.prototype.get = listCacheGet; 35333 ListCache.prototype.has = listCacheHas; 35334 ListCache.prototype.set = listCacheSet; 35335 35336 /*------------------------------------------------------------------------*/ 35337 35338 /** 35339 * Creates a map cache object to store key-value pairs. 35340 * 35341 * @private 35342 * @constructor 35343 * @param {Array} [entries] The key-value pairs to cache. 35344 */ 35345 function MapCache(entries) { 35346 var index = -1, 35347 length = entries == null ? 0 : entries.length; 35348 35349 this.clear(); 35350 while (++index < length) { 35351 var entry = entries[index]; 35352 this.set(entry[0], entry[1]); 35353 } 35354 } 35355 35356 /** 35357 * Removes all key-value entries from the map. 35358 * 35359 * @private 35360 * @name clear 35361 * @memberOf MapCache 35362 */ 35363 function mapCacheClear() { 35364 this.size = 0; 35365 this.__data__ = { 35366 'hash': new Hash, 35367 'map': new (Map || ListCache), 35368 'string': new Hash 35369 }; 35370 } 35371 35372 /** 35373 * Removes `key` and its value from the map. 35374 * 35375 * @private 35376 * @name delete 35377 * @memberOf MapCache 35378 * @param {string} key The key of the value to remove. 35379 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 35380 */ 35381 function mapCacheDelete(key) { 35382 var result = getMapData(this, key)['delete'](key); 35383 this.size -= result ? 1 : 0; 35384 return result; 35385 } 35386 35387 /** 35388 * Gets the map value for `key`. 35389 * 35390 * @private 35391 * @name get 35392 * @memberOf MapCache 35393 * @param {string} key The key of the value to get. 35394 * @returns {*} Returns the entry value. 35395 */ 35396 function mapCacheGet(key) { 35397 return getMapData(this, key).get(key); 35398 } 35399 35400 /** 35401 * Checks if a map value for `key` exists. 35402 * 35403 * @private 35404 * @name has 35405 * @memberOf MapCache 35406 * @param {string} key The key of the entry to check. 35407 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 35408 */ 35409 function mapCacheHas(key) { 35410 return getMapData(this, key).has(key); 35411 } 35412 35413 /** 35414 * Sets the map `key` to `value`. 35415 * 35416 * @private 35417 * @name set 35418 * @memberOf MapCache 35419 * @param {string} key The key of the value to set. 35420 * @param {*} value The value to set. 35421 * @returns {Object} Returns the map cache instance. 35422 */ 35423 function mapCacheSet(key, value) { 35424 var data = getMapData(this, key), 35425 size = data.size; 35426 35427 data.set(key, value); 35428 this.size += data.size == size ? 0 : 1; 35429 return this; 35430 } 35431 35432 // Add methods to `MapCache`. 35433 MapCache.prototype.clear = mapCacheClear; 35434 MapCache.prototype['delete'] = mapCacheDelete; 35435 MapCache.prototype.get = mapCacheGet; 35436 MapCache.prototype.has = mapCacheHas; 35437 MapCache.prototype.set = mapCacheSet; 35438 35439 /*------------------------------------------------------------------------*/ 35440 35441 /** 35442 * 35443 * Creates an array cache object to store unique values. 35444 * 35445 * @private 35446 * @constructor 35447 * @param {Array} [values] The values to cache. 35448 */ 35449 function SetCache(values) { 35450 var index = -1, 35451 length = values == null ? 0 : values.length; 35452 35453 this.__data__ = new MapCache; 35454 while (++index < length) { 35455 this.add(values[index]); 35456 } 35457 } 35458 35459 /** 35460 * Adds `value` to the array cache. 35461 * 35462 * @private 35463 * @name add 35464 * @memberOf SetCache 35465 * @alias push 35466 * @param {*} value The value to cache. 35467 * @returns {Object} Returns the cache instance. 35468 */
vendor: 3,741 bytes, lines 35469-35605
35469 function setCacheAdd(value) { 35470 this.__data__.set(value, HASH_UNDEFINED); 35471 return this; 35472 } 35473 35474 /** 35475 * Checks if `value` is in the array cache. 35476 * 35477 * @private 35478 * @name has 35479 * @memberOf SetCache 35480 * @param {*} value The value to search for. 35481 * @returns {number} Returns `true` if `value` is found, else `false`. 35482 */ 35483 function setCacheHas(value) { 35484 return this.__data__.has(value); 35485 } 35486 35487 // Add methods to `SetCache`. 35488 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; 35489 SetCache.prototype.has = setCacheHas; 35490 35491 /*------------------------------------------------------------------------*/ 35492 35493 /** 35494 * Creates a stack cache object to store key-value pairs. 35495 * 35496 * @private 35497 * @constructor 35498 * @param {Array} [entries] The key-value pairs to cache. 35499 */ 35500 function Stack(entries) { 35501 var data = this.__data__ = new ListCache(entries); 35502 this.size = data.size; 35503 } 35504 35505 /** 35506 * Removes all key-value entries from the stack. 35507 * 35508 * @private 35509 * @name clear 35510 * @memberOf Stack 35511 */ 35512 function stackClear() { 35513 this.__data__ = new ListCache; 35514 this.size = 0; 35515 } 35516 35517 /** 35518 * Removes `key` and its value from the stack. 35519 * 35520 * @private 35521 * @name delete 35522 * @memberOf Stack 35523 * @param {string} key The key of the value to remove. 35524 * @returns {boolean} Returns `true` if the entry was removed, else `false`. 35525 */ 35526 function stackDelete(key) { 35527 var data = this.__data__, 35528 result = data['delete'](key); 35529 35530 this.size = data.size; 35531 return result; 35532 } 35533 35534 /** 35535 * Gets the stack value for `key`. 35536 * 35537 * @private 35538 * @name get 35539 * @memberOf Stack 35540 * @param {string} key The key of the value to get. 35541 * @returns {*} Returns the entry value. 35542 */ 35543 function stackGet(key) { 35544 return this.__data__.get(key); 35545 } 35546 35547 /** 35548 * Checks if a stack value for `key` exists. 35549 * 35550 * @private 35551 * @name has 35552 * @memberOf Stack 35553 * @param {string} key The key of the entry to check. 35554 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. 35555 */ 35556 function stackHas(key) { 35557 return this.__data__.has(key); 35558 } 35559 35560 /** 35561 * Sets the stack `key` to `value`. 35562 * 35563 * @private 35564 * @name set 35565 * @memberOf Stack 35566 * @param {string} key The key of the value to set. 35567 * @param {*} value The value to set. 35568 * @returns {Object} Returns the stack cache instance. 35569 */ 35570 function stackSet(key, value) { 35571 var data = this.__data__; 35572 if (data instanceof ListCache) { 35573 var pairs = data.__data__; 35574 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { 35575 pairs.push([key, value]); 35576 this.size = ++data.size; 35577 return this; 35578 } 35579 data = this.__data__ = new MapCache(pairs); 35580 } 35581 data.set(key, value); 35582 this.size = data.size; 35583 return this; 35584 } 35585 35586 // Add methods to `Stack`. 35587 Stack.prototype.clear = stackClear; 35588 Stack.prototype['delete'] = stackDelete; 35589 Stack.prototype.get = stackGet; 35590 Stack.prototype.has = stackHas; 35591 Stack.prototype.set = stackSet; 35592 35593 /*------------------------------------------------------------------------*/ 35594 35595 /** 35596 * Creates an array of the enumerable property names of the array-like `value`. 35597 * 35598 * @private 35599 * @param {*} value The value to query. 35600 * @param {boolean} inherited Specify returning inherited property names. 35601 * @returns {Array} Returns the array of property names. 35602 */ 35603 function arrayLikeKeys(value, inherited) { 35604 var isArr = isArray(value), 35605 isArg = !isArr && isArguments(value),
vendor: 43,113 bytes, lines 35606-36882
35606 isBuff = !isArr && !isArg && isBuffer(value), 35607 isType = !isArr && !isArg && !isBuff && isTypedArray(value), 35608 skipIndexes = isArr || isArg || isBuff || isType, 35609 result = skipIndexes ? baseTimes(value.length, String) : [], 35610 length = result.length; 35611 35612 for (var key in value) { 35613 if ((inherited || hasOwnProperty.call(value, key)) && 35614 !(skipIndexes && ( 35615 // Safari 9 has enumerable `arguments.length` in strict mode. 35616 key == 'length' || 35617 // Node.js 0.10 has enumerable non-index properties on buffers. 35618 (isBuff && (key == 'offset' || key == 'parent')) || 35619 // PhantomJS 2 has enumerable non-index properties on typed arrays. 35620 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || 35621 // Skip index properties. 35622 isIndex(key, length) 35623 ))) { 35624 result.push(key); 35625 } 35626 } 35627 return result; 35628 } 35629 35630 /** 35631 * A specialized version of `_.sample` for arrays. 35632 * 35633 * @private 35634 * @param {Array} array The array to sample. 35635 * @returns {*} Returns the random element. 35636 */ 35637 function arraySample(array) { 35638 var length = array.length; 35639 return length ? array[baseRandom(0, length - 1)] : undefined; 35640 } 35641 35642 /** 35643 * A specialized version of `_.sampleSize` for arrays. 35644 * 35645 * @private 35646 * @param {Array} array The array to sample. 35647 * @param {number} n The number of elements to sample. 35648 * @returns {Array} Returns the random elements. 35649 */ 35650 function arraySampleSize(array, n) { 35651 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); 35652 } 35653 35654 /** 35655 * A specialized version of `_.shuffle` for arrays. 35656 * 35657 * @private 35658 * @param {Array} array The array to shuffle. 35659 * @returns {Array} Returns the new shuffled array. 35660 */ 35661 function arrayShuffle(array) { 35662 return shuffleSelf(copyArray(array)); 35663 } 35664 35665 /** 35666 * This function is like `assignValue` except that it doesn't assign 35667 * `undefined` values. 35668 * 35669 * @private 35670 * @param {Object} object The object to modify. 35671 * @param {string} key The key of the property to assign. 35672 * @param {*} value The value to assign. 35673 */ 35674 function assignMergeValue(object, key, value) { 35675 if ((value !== undefined && !eq(object[key], value)) || 35676 (value === undefined && !(key in object))) { 35677 baseAssignValue(object, key, value); 35678 } 35679 } 35680 35681 /** 35682 * Assigns `value` to `key` of `object` if the existing value is not equivalent 35683 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 35684 * for equality comparisons. 35685 * 35686 * @private 35687 * @param {Object} object The object to modify. 35688 * @param {string} key The key of the property to assign. 35689 * @param {*} value The value to assign. 35690 */ 35691 function assignValue(object, key, value) { 35692 var objValue = object[key]; 35693 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || 35694 (value === undefined && !(key in object))) { 35695 baseAssignValue(object, key, value); 35696 } 35697 } 35698 35699 /** 35700 * Gets the index at which the `key` is found in `array` of key-value pairs. 35701 * 35702 * @private 35703 * @param {Array} array The array to inspect. 35704 * @param {*} key The key to search for. 35705 * @returns {number} Returns the index of the matched value, else `-1`. 35706 */ 35707 function assocIndexOf(array, key) { 35708 var length = array.length; 35709 while (length--) { 35710 if (eq(array[length][0], key)) { 35711 return length; 35712 } 35713 } 35714 return -1; 35715 } 35716 35717 /** 35718 * Aggregates elements of `collection` on `accumulator` with keys transformed 35719 * by `iteratee` and values set by `setter`. 35720 * 35721 * @private 35722 * @param {Array|Object} collection The collection to iterate over. 35723 * @param {Function} setter The function to set `accumulator` values. 35724 * @param {Function} iteratee The iteratee to transform keys. 35725 * @param {Object} accumulator The initial aggregated object. 35726 * @returns {Function} Returns `accumulator`. 35727 */ 35728 function baseAggregator(collection, setter, iteratee, accumulator) { 35729 baseEach(collection, function(value, key, collection) { 35730 setter(accumulator, value, iteratee(value), collection); 35731 }); 35732 return accumulator; 35733 } 35734 35735 /** 35736 * The base implementation of `_.assign` without support for multiple sources 35737 * or `customizer` functions. 35738 * 35739 * @private 35740 * @param {Object} object The destination object. 35741 * @param {Object} source The source object. 35742 * @returns {Object} Returns `object`. 35743 */ 35744 function baseAssign(object, source) { 35745 return object && copyObject(source, keys(source), object); 35746 } 35747 35748 /** 35749 * The base implementation of `_.assignIn` without support for multiple sources 35750 * or `customizer` functions. 35751 * 35752 * @private 35753 * @param {Object} object The destination object. 35754 * @param {Object} source The source object. 35755 * @returns {Object} Returns `object`. 35756 */ 35757 function baseAssignIn(object, source) { 35758 return object && copyObject(source, keysIn(source), object); 35759 } 35760 35761 /** 35762 * The base implementation of `assignValue` and `assignMergeValue` without 35763 * value checks. 35764 * 35765 * @private 35766 * @param {Object} object The object to modify. 35767 * @param {string} key The key of the property to assign. 35768 * @param {*} value The value to assign. 35769 */ 35770 function baseAssignValue(object, key, value) { 35771 if (key == '__proto__' && defineProperty) { 35772 defineProperty(object, key, { 35773 'configurable': true, 35774 'enumerable': true, 35775 'value': value, 35776 'writable': true 35777 }); 35778 } else { 35779 object[key] = value; 35780 } 35781 } 35782 35783 /** 35784 * The base implementation of `_.at` without support for individual paths. 35785 * 35786 * @private 35787 * @param {Object} object The object to iterate over. 35788 * @param {string[]} paths The property paths to pick. 35789 * @returns {Array} Returns the picked elements. 35790 */ 35791 function baseAt(object, paths) { 35792 var index = -1, 35793 length = paths.length, 35794 result = Array(length), 35795 skip = object == null; 35796 35797 while (++index < length) { 35798 result[index] = skip ? undefined : get(object, paths[index]); 35799 } 35800 return result; 35801 } 35802 35803 /** 35804 * The base implementation of `_.clamp` which doesn't coerce arguments. 35805 * 35806 * @private 35807 * @param {number} number The number to clamp. 35808 * @param {number} [lower] The lower bound. 35809 * @param {number} upper The upper bound. 35810 * @returns {number} Returns the clamped number. 35811 */ 35812 function baseClamp(number, lower, upper) { 35813 if (number === number) { 35814 if (upper !== undefined) { 35815 number = number <= upper ? number : upper; 35816 } 35817 if (lower !== undefined) { 35818 number = number >= lower ? number : lower; 35819 } 35820 } 35821 return number; 35822 } 35823 35824 /** 35825 * The base implementation of `_.clone` and `_.cloneDeep` which tracks 35826 * traversed objects. 35827 * 35828 * @private 35829 * @param {*} value The value to clone. 35830 * @param {boolean} bitmask The bitmask flags. 35831 * 1 - Deep clone 35832 * 2 - Flatten inherited properties 35833 * 4 - Clone symbols 35834 * @param {Function} [customizer] The function to customize cloning. 35835 * @param {string} [key] The key of `value`. 35836 * @param {Object} [object] The parent object of `value`. 35837 * @param {Object} [stack] Tracks traversed objects and their clone counterparts. 35838 * @returns {*} Returns the cloned value. 35839 */ 35840 function baseClone(value, bitmask, customizer, key, object, stack) { 35841 var result, 35842 isDeep = bitmask & CLONE_DEEP_FLAG, 35843 isFlat = bitmask & CLONE_FLAT_FLAG, 35844 isFull = bitmask & CLONE_SYMBOLS_FLAG; 35845 35846 if (customizer) { 35847 result = object ? customizer(value, key, object, stack) : customizer(value); 35848 } 35849 if (result !== undefined) { 35850 return result; 35851 } 35852 if (!isObject(value)) { 35853 return value; 35854 } 35855 var isArr = isArray(value); 35856 if (isArr) { 35857 result = initCloneArray(value); 35858 if (!isDeep) { 35859 return copyArray(value, result); 35860 } 35861 } else { 35862 var tag = getTag(value), 35863 isFunc = tag == funcTag || tag == genTag; 35864 35865 if (isBuffer(value)) { 35866 return cloneBuffer(value, isDeep); 35867 } 35868 if (tag == objectTag || tag == argsTag || (isFunc && !object)) { 35869 result = (isFlat || isFunc) ? {} : initCloneObject(value); 35870 if (!isDeep) { 35871 return isFlat 35872 ? copySymbolsIn(value, baseAssignIn(result, value)) 35873 : copySymbols(value, baseAssign(result, value)); 35874 } 35875 } else { 35876 if (!cloneableTags[tag]) { 35877 return object ? value : {}; 35878 } 35879 result = initCloneByTag(value, tag, isDeep); 35880 } 35881 } 35882 // Check for circular references and return its corresponding clone. 35883 stack || (stack = new Stack); 35884 var stacked = stack.get(value); 35885 if (stacked) { 35886 return stacked; 35887 } 35888 stack.set(value, result); 35889 35890 if (isSet(value)) { 35891 value.forEach(function(subValue) { 35892 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); 35893 }); 35894 } else if (isMap(value)) { 35895 value.forEach(function(subValue, key) { 35896 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); 35897 }); 35898 } 35899 35900 var keysFunc = isFull 35901 ? (isFlat ? getAllKeysIn : getAllKeys) 35902 : (isFlat ? keysIn : keys); 35903 35904 var props = isArr ? undefined : keysFunc(value); 35905 arrayEach(props || value, function(subValue, key) { 35906 if (props) { 35907 key = subValue; 35908 subValue = value[key]; 35909 } 35910 // Recursively populate clone (susceptible to call stack limits). 35911 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); 35912 }); 35913 return result; 35914 } 35915 35916 /** 35917 * The base implementation of `_.conforms` which doesn't clone `source`. 35918 * 35919 * @private 35920 * @param {Object} source The object of property predicates to conform to. 35921 * @returns {Function} Returns the new spec function. 35922 */ 35923 function baseConforms(source) { 35924 var props = keys(source); 35925 return function(object) { 35926 return baseConformsTo(object, source, props); 35927 }; 35928 } 35929 35930 /** 35931 * The base implementation of `_.conformsTo` which accepts `props` to check. 35932 * 35933 * @private 35934 * @param {Object} object The object to inspect. 35935 * @param {Object} source The object of property predicates to conform to. 35936 * @returns {boolean} Returns `true` if `object` conforms, else `false`. 35937 */ 35938 function baseConformsTo(object, source, props) { 35939 var length = props.length; 35940 if (object == null) { 35941 return !length; 35942 } 35943 object = Object(object); 35944 while (length--) { 35945 var key = props[length], 35946 predicate = source[key], 35947 value = object[key]; 35948 35949 if ((value === undefined && !(key in object)) || !predicate(value)) { 35950 return false; 35951 } 35952 } 35953 return true; 35954 } 35955 35956 /** 35957 * The base implementation of `_.delay` and `_.defer` which accepts `args` 35958 * to provide to `func`. 35959 * 35960 * @private 35961 * @param {Function} func The function to delay. 35962 * @param {number} wait The number of milliseconds to delay invocation. 35963 * @param {Array} args The arguments to provide to `func`. 35964 * @returns {number|Object} Returns the timer id or timeout object. 35965 */ 35966 function baseDelay(func, wait, args) { 35967 if (typeof func != 'function') { 35968 throw new TypeError(FUNC_ERROR_TEXT); 35969 } 35970 return setTimeout(function() { func.apply(undefined, args); }, wait); 35971 } 35972 35973 /** 35974 * The base implementation of methods like `_.difference` without support 35975 * for excluding multiple arrays or iteratee shorthands. 35976 * 35977 * @private 35978 * @param {Array} array The array to inspect. 35979 * @param {Array} values The values to exclude. 35980 * @param {Function} [iteratee] The iteratee invoked per element. 35981 * @param {Function} [comparator] The comparator invoked per element. 35982 * @returns {Array} Returns the new array of filtered values. 35983 */ 35984 function baseDifference(array, values, iteratee, comparator) { 35985 var index = -1, 35986 includes = arrayIncludes, 35987 isCommon = true, 35988 length = array.length, 35989 result = [], 35990 valuesLength = values.length; 35991 35992 if (!length) { 35993 return result; 35994 } 35995 if (iteratee) { 35996 values = arrayMap(values, baseUnary(iteratee)); 35997 } 35998 if (comparator) { 35999 includes = arrayIncludesWith; 36000 isCommon = false; 36001 } 36002 else if (values.length >= LARGE_ARRAY_SIZE) { 36003 includes = cacheHas; 36004 isCommon = false; 36005 values = new SetCache(values); 36006 } 36007 outer: 36008 while (++index < length) { 36009 var value = array[index], 36010 computed = iteratee == null ? value : iteratee(value); 36011 36012 value = (comparator || value !== 0) ? value : 0; 36013 if (isCommon && computed === computed) { 36014 var valuesIndex = valuesLength; 36015 while (valuesIndex--) { 36016 if (values[valuesIndex] === computed) { 36017 continue outer; 36018 } 36019 } 36020 result.push(value); 36021 } 36022 else if (!includes(values, computed, comparator)) { 36023 result.push(value); 36024 } 36025 } 36026 return result; 36027 } 36028 36029 /** 36030 * The base implementation of `_.forEach` without support for iteratee shorthands. 36031 * 36032 * @private 36033 * @param {Array|Object} collection The collection to iterate over. 36034 * @param {Function} iteratee The function invoked per iteration. 36035 * @returns {Array|Object} Returns `collection`. 36036 */ 36037 var baseEach = createBaseEach(baseForOwn); 36038 36039 /** 36040 * The base implementation of `_.forEachRight` without support for iteratee shorthands. 36041 * 36042 * @private 36043 * @param {Array|Object} collection The collection to iterate over. 36044 * @param {Function} iteratee The function invoked per iteration. 36045 * @returns {Array|Object} Returns `collection`. 36046 */ 36047 var baseEachRight = createBaseEach(baseForOwnRight, true); 36048 36049 /** 36050 * The base implementation of `_.every` without support for iteratee shorthands. 36051 * 36052 * @private 36053 * @param {Array|Object} collection The collection to iterate over. 36054 * @param {Function} predicate The function invoked per iteration. 36055 * @returns {boolean} Returns `true` if all elements pass the predicate check, 36056 * else `false` 36057 */ 36058 function baseEvery(collection, predicate) { 36059 var result = true; 36060 baseEach(collection, function(value, index, collection) { 36061 result = !!predicate(value, index, collection); 36062 return result; 36063 }); 36064 return result; 36065 } 36066 36067 /** 36068 * The base implementation of methods like `_.max` and `_.min` which accepts a 36069 * `comparator` to determine the extremum value. 36070 * 36071 * @private 36072 * @param {Array} array The array to iterate over. 36073 * @param {Function} iteratee The iteratee invoked per iteration. 36074 * @param {Function} comparator The comparator used to compare values. 36075 * @returns {*} Returns the extremum value. 36076 */ 36077 function baseExtremum(array, iteratee, comparator) { 36078 var index = -1, 36079 length = array.length; 36080 36081 while (++index < length) { 36082 var value = array[index], 36083 current = iteratee(value); 36084 36085 if (current != null && (computed === undefined 36086 ? (current === current && !isSymbol(current)) 36087 : comparator(current, computed) 36088 )) { 36089 var computed = current, 36090 result = value; 36091 } 36092 } 36093 return result; 36094 } 36095 36096 /** 36097 * The base implementation of `_.fill` without an iteratee call guard. 36098 * 36099 * @private 36100 * @param {Array} array The array to fill. 36101 * @param {*} value The value to fill `array` with. 36102 * @param {number} [start=0] The start position. 36103 * @param {number} [end=array.length] The end position. 36104 * @returns {Array} Returns `array`. 36105 */ 36106 function baseFill(array, value, start, end) { 36107 var length = array.length; 36108 36109 start = toInteger(start); 36110 if (start < 0) { 36111 start = -start > length ? 0 : (length + start); 36112 } 36113 end = (end === undefined || end > length) ? length : toInteger(end); 36114 if (end < 0) { 36115 end += length; 36116 } 36117 end = start > end ? 0 : toLength(end); 36118 while (start < end) { 36119 array[start++] = value; 36120 } 36121 return array; 36122 } 36123 36124 /** 36125 * The base implementation of `_.filter` without support for iteratee shorthands. 36126 * 36127 * @private 36128 * @param {Array|Object} collection The collection to iterate over. 36129 * @param {Function} predicate The function invoked per iteration. 36130 * @returns {Array} Returns the new filtered array. 36131 */ 36132 function baseFilter(collection, predicate) { 36133 var result = []; 36134 baseEach(collection, function(value, index, collection) { 36135 if (predicate(value, index, collection)) { 36136 result.push(value); 36137 } 36138 }); 36139 return result; 36140 } 36141 36142 /** 36143 * The base implementation of `_.flatten` with support for restricting flattening. 36144 * 36145 * @private 36146 * @param {Array} array The array to flatten. 36147 * @param {number} depth The maximum recursion depth. 36148 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. 36149 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. 36150 * @param {Array} [result=[]] The initial result value. 36151 * @returns {Array} Returns the new flattened array. 36152 */ 36153 function baseFlatten(array, depth, predicate, isStrict, result) { 36154 var index = -1, 36155 length = array.length; 36156 36157 predicate || (predicate = isFlattenable); 36158 result || (result = []); 36159 36160 while (++index < length) { 36161 var value = array[index]; 36162 if (depth > 0 && predicate(value)) { 36163 if (depth > 1) { 36164 // Recursively flatten arrays (susceptible to call stack limits). 36165 baseFlatten(value, depth - 1, predicate, isStrict, result); 36166 } else { 36167 arrayPush(result, value); 36168 } 36169 } else if (!isStrict) { 36170 result[result.length] = value; 36171 } 36172 } 36173 return result; 36174 } 36175 36176 /** 36177 * The base implementation of `baseForOwn` which iterates over `object` 36178 * properties returned by `keysFunc` and invokes `iteratee` for each property. 36179 * Iteratee functions may exit iteration early by explicitly returning `false`. 36180 * 36181 * @private 36182 * @param {Object} object The object to iterate over. 36183 * @param {Function} iteratee The function invoked per iteration. 36184 * @param {Function} keysFunc The function to get the keys of `object`. 36185 * @returns {Object} Returns `object`. 36186 */ 36187 var baseFor = createBaseFor(); 36188 36189 /** 36190 * This function is like `baseFor` except that it iterates over properties 36191 * in the opposite order. 36192 * 36193 * @private 36194 * @param {Object} object The object to iterate over. 36195 * @param {Function} iteratee The function invoked per iteration. 36196 * @param {Function} keysFunc The function to get the keys of `object`. 36197 * @returns {Object} Returns `object`. 36198 */ 36199 var baseForRight = createBaseFor(true); 36200 36201 /** 36202 * The base implementation of `_.forOwn` without support for iteratee shorthands. 36203 * 36204 * @private 36205 * @param {Object} object The object to iterate over. 36206 * @param {Function} iteratee The function invoked per iteration. 36207 * @returns {Object} Returns `object`. 36208 */ 36209 function baseForOwn(object, iteratee) { 36210 return object && baseFor(object, iteratee, keys); 36211 } 36212 36213 /** 36214 * The base implementation of `_.forOwnRight` without support for iteratee shorthands. 36215 * 36216 * @private 36217 * @param {Object} object The object to iterate over. 36218 * @param {Function} iteratee The function invoked per iteration. 36219 * @returns {Object} Returns `object`. 36220 */ 36221 function baseForOwnRight(object, iteratee) { 36222 return object && baseForRight(object, iteratee, keys); 36223 } 36224 36225 /** 36226 * The base implementation of `_.functions` which creates an array of 36227 * `object` function property names filtered from `props`. 36228 * 36229 * @private 36230 * @param {Object} object The object to inspect. 36231 * @param {Array} props The property names to filter. 36232 * @returns {Array} Returns the function names. 36233 */ 36234 function baseFunctions(object, props) { 36235 return arrayFilter(props, function(key) { 36236 return isFunction(object[key]); 36237 }); 36238 } 36239 36240 /** 36241 * The base implementation of `_.get` without support for default values. 36242 * 36243 * @private 36244 * @param {Object} object The object to query. 36245 * @param {Array|string} path The path of the property to get. 36246 * @returns {*} Returns the resolved value. 36247 */ 36248 function baseGet(object, path) { 36249 path = castPath(path, object); 36250 36251 var index = 0, 36252 length = path.length; 36253 36254 while (object != null && index < length) { 36255 object = object[toKey(path[index++])]; 36256 } 36257 return (index && index == length) ? object : undefined; 36258 } 36259 36260 /** 36261 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses 36262 * `keysFunc` and `symbolsFunc` to get the enumerable property names and 36263 * symbols of `object`. 36264 * 36265 * @private 36266 * @param {Object} object The object to query. 36267 * @param {Function} keysFunc The function to get the keys of `object`. 36268 * @param {Function} symbolsFunc The function to get the symbols of `object`. 36269 * @returns {Array} Returns the array of property names and symbols. 36270 */ 36271 function baseGetAllKeys(object, keysFunc, symbolsFunc) { 36272 var result = keysFunc(object); 36273 return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); 36274 } 36275 36276 /** 36277 * The base implementation of `getTag` without fallbacks for buggy environments. 36278 * 36279 * @private 36280 * @param {*} value The value to query. 36281 * @returns {string} Returns the `toStringTag`. 36282 */ 36283 function baseGetTag(value) { 36284 if (value == null) { 36285 return value === undefined ? undefinedTag : nullTag; 36286 } 36287 return (symToStringTag && symToStringTag in Object(value)) 36288 ? getRawTag(value) 36289 : objectToString(value); 36290 } 36291 36292 /** 36293 * The base implementation of `_.gt` which doesn't coerce arguments. 36294 * 36295 * @private 36296 * @param {*} value The value to compare. 36297 * @param {*} other The other value to compare. 36298 * @returns {boolean} Returns `true` if `value` is greater than `other`, 36299 * else `false`. 36300 */ 36301 function baseGt(value, other) { 36302 return value > other; 36303 } 36304 36305 /** 36306 * The base implementation of `_.has` without support for deep paths. 36307 * 36308 * @private 36309 * @param {Object} [object] The object to query. 36310 * @param {Array|string} key The key to check. 36311 * @returns {boolean} Returns `true` if `key` exists, else `false`. 36312 */ 36313 function baseHas(object, key) { 36314 return object != null && hasOwnProperty.call(object, key); 36315 } 36316 36317 /** 36318 * The base implementation of `_.hasIn` without support for deep paths. 36319 * 36320 * @private 36321 * @param {Object} [object] The object to query. 36322 * @param {Array|string} key The key to check. 36323 * @returns {boolean} Returns `true` if `key` exists, else `false`. 36324 */ 36325 function baseHasIn(object, key) { 36326 return object != null && key in Object(object); 36327 } 36328 36329 /** 36330 * The base implementation of `_.inRange` which doesn't coerce arguments. 36331 * 36332 * @private 36333 * @param {number} number The number to check. 36334 * @param {number} start The start of the range. 36335 * @param {number} end The end of the range. 36336 * @returns {boolean} Returns `true` if `number` is in the range, else `false`. 36337 */ 36338 function baseInRange(number, start, end) { 36339 return number >= nativeMin(start, end) && number < nativeMax(start, end); 36340 } 36341 36342 /** 36343 * The base implementation of methods like `_.intersection`, without support 36344 * for iteratee shorthands, that accepts an array of arrays to inspect. 36345 * 36346 * @private 36347 * @param {Array} arrays The arrays to inspect. 36348 * @param {Function} [iteratee] The iteratee invoked per element. 36349 * @param {Function} [comparator] The comparator invoked per element. 36350 * @returns {Array} Returns the new array of shared values. 36351 */ 36352 function baseIntersection(arrays, iteratee, comparator) { 36353 var includes = comparator ? arrayIncludesWith : arrayIncludes, 36354 length = arrays[0].length, 36355 othLength = arrays.length, 36356 othIndex = othLength, 36357 caches = Array(othLength), 36358 maxLength = Infinity, 36359 result = []; 36360 36361 while (othIndex--) { 36362 var array = arrays[othIndex]; 36363 if (othIndex && iteratee) { 36364 array = arrayMap(array, baseUnary(iteratee)); 36365 } 36366 maxLength = nativeMin(array.length, maxLength); 36367 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) 36368 ? new SetCache(othIndex && array) 36369 : undefined; 36370 } 36371 array = arrays[0]; 36372 36373 var index = -1, 36374 seen = caches[0]; 36375 36376 outer: 36377 while (++index < length && result.length < maxLength) { 36378 var value = array[index], 36379 computed = iteratee ? iteratee(value) : value; 36380 36381 value = (comparator || value !== 0) ? value : 0; 36382 if (!(seen 36383 ? cacheHas(seen, computed) 36384 : includes(result, computed, comparator) 36385 )) { 36386 othIndex = othLength; 36387 while (--othIndex) { 36388 var cache = caches[othIndex]; 36389 if (!(cache 36390 ? cacheHas(cache, computed) 36391 : includes(arrays[othIndex], computed, comparator)) 36392 ) { 36393 continue outer; 36394 } 36395 } 36396 if (seen) { 36397 seen.push(computed); 36398 } 36399 result.push(value); 36400 } 36401 } 36402 return result; 36403 } 36404 36405 /** 36406 * The base implementation of `_.invert` and `_.invertBy` which inverts 36407 * `object` with values transformed by `iteratee` and set by `setter`. 36408 * 36409 * @private 36410 * @param {Object} object The object to iterate over. 36411 * @param {Function} setter The function to set `accumulator` values. 36412 * @param {Function} iteratee The iteratee to transform values. 36413 * @param {Object} accumulator The initial inverted object. 36414 * @returns {Function} Returns `accumulator`. 36415 */ 36416 function baseInverter(object, setter, iteratee, accumulator) { 36417 baseForOwn(object, function(value, key, object) { 36418 setter(accumulator, iteratee(value), key, object); 36419 }); 36420 return accumulator; 36421 } 36422 36423 /** 36424 * The base implementation of `_.invoke` without support for individual 36425 * method arguments. 36426 * 36427 * @private 36428 * @param {Object} object The object to query. 36429 * @param {Array|string} path The path of the method to invoke. 36430 * @param {Array} args The arguments to invoke the method with. 36431 * @returns {*} Returns the result of the invoked method. 36432 */ 36433 function baseInvoke(object, path, args) { 36434 path = castPath(path, object); 36435 object = parent(object, path); 36436 var func = object == null ? object : object[toKey(last(path))]; 36437 return func == null ? undefined : apply(func, object, args); 36438 } 36439 36440 /** 36441 * The base implementation of `_.isArguments`. 36442 * 36443 * @private 36444 * @param {*} value The value to check. 36445 * @returns {boolean} Returns `true` if `value` is an `arguments` object, 36446 */ 36447 function baseIsArguments(value) { 36448 return isObjectLike(value) && baseGetTag(value) == argsTag; 36449 } 36450 36451 /** 36452 * The base implementation of `_.isArrayBuffer` without Node.js optimizations. 36453 * 36454 * @private 36455 * @param {*} value The value to check. 36456 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. 36457 */ 36458 function baseIsArrayBuffer(value) { 36459 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; 36460 } 36461 36462 /** 36463 * The base implementation of `_.isDate` without Node.js optimizations. 36464 * 36465 * @private 36466 * @param {*} value The value to check. 36467 * @returns {boolean} Returns `true` if `value` is a date object, else `false`. 36468 */ 36469 function baseIsDate(value) { 36470 return isObjectLike(value) && baseGetTag(value) == dateTag; 36471 } 36472 36473 /** 36474 * The base implementation of `_.isEqual` which supports partial comparisons 36475 * and tracks traversed objects. 36476 * 36477 * @private 36478 * @param {*} value The value to compare. 36479 * @param {*} other The other value to compare. 36480 * @param {boolean} bitmask The bitmask flags. 36481 * 1 - Unordered comparison 36482 * 2 - Partial comparison 36483 * @param {Function} [customizer] The function to customize comparisons. 36484 * @param {Object} [stack] Tracks traversed `value` and `other` objects. 36485 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 36486 */ 36487 function baseIsEqual(value, other, bitmask, customizer, stack) { 36488 if (value === other) { 36489 return true; 36490 } 36491 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { 36492 return value !== value && other !== other; 36493 } 36494 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); 36495 } 36496 36497 /** 36498 * A specialized version of `baseIsEqual` for arrays and objects which performs 36499 * deep comparisons and tracks traversed objects enabling objects with circular 36500 * references to be compared. 36501 * 36502 * @private 36503 * @param {Object} object The object to compare. 36504 * @param {Object} other The other object to compare. 36505 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 36506 * @param {Function} customizer The function to customize comparisons. 36507 * @param {Function} equalFunc The function to determine equivalents of values. 36508 * @param {Object} [stack] Tracks traversed `object` and `other` objects. 36509 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 36510 */ 36511 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { 36512 var objIsArr = isArray(object), 36513 othIsArr = isArray(other), 36514 objTag = objIsArr ? arrayTag : getTag(object), 36515 othTag = othIsArr ? arrayTag : getTag(other); 36516 36517 objTag = objTag == argsTag ? objectTag : objTag; 36518 othTag = othTag == argsTag ? objectTag : othTag; 36519 36520 var objIsObj = objTag == objectTag, 36521 othIsObj = othTag == objectTag, 36522 isSameTag = objTag == othTag; 36523 36524 if (isSameTag && isBuffer(object)) { 36525 if (!isBuffer(other)) { 36526 return false; 36527 } 36528 objIsArr = true; 36529 objIsObj = false; 36530 } 36531 if (isSameTag && !objIsObj) { 36532 stack || (stack = new Stack); 36533 return (objIsArr || isTypedArray(object)) 36534 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) 36535 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); 36536 } 36537 if (!(bitmask & COMPARE_PARTIAL_FLAG)) { 36538 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), 36539 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); 36540 36541 if (objIsWrapped || othIsWrapped) { 36542 var objUnwrapped = objIsWrapped ? object.value() : object, 36543 othUnwrapped = othIsWrapped ? other.value() : other; 36544 36545 stack || (stack = new Stack); 36546 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); 36547 } 36548 } 36549 if (!isSameTag) { 36550 return false; 36551 } 36552 stack || (stack = new Stack); 36553 return equalObjects(object, other, bitmask, customizer, equalFunc, stack); 36554 } 36555 36556 /** 36557 * The base implementation of `_.isMap` without Node.js optimizations. 36558 * 36559 * @private 36560 * @param {*} value The value to check. 36561 * @returns {boolean} Returns `true` if `value` is a map, else `false`. 36562 */ 36563 function baseIsMap(value) { 36564 return isObjectLike(value) && getTag(value) == mapTag; 36565 } 36566 36567 /** 36568 * The base implementation of `_.isMatch` without support for iteratee shorthands. 36569 * 36570 * @private 36571 * @param {Object} object The object to inspect. 36572 * @param {Object} source The object of property values to match. 36573 * @param {Array} matchData The property names, values, and compare flags to match. 36574 * @param {Function} [customizer] The function to customize comparisons. 36575 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 36576 */ 36577 function baseIsMatch(object, source, matchData, customizer) { 36578 var index = matchData.length, 36579 length = index, 36580 noCustomizer = !customizer; 36581 36582 if (object == null) { 36583 return !length; 36584 } 36585 object = Object(object); 36586 while (index--) { 36587 var data = matchData[index]; 36588 if ((noCustomizer && data[2]) 36589 ? data[1] !== object[data[0]] 36590 : !(data[0] in object) 36591 ) { 36592 return false; 36593 } 36594 } 36595 while (++index < length) { 36596 data = matchData[index]; 36597 var key = data[0], 36598 objValue = object[key], 36599 srcValue = data[1]; 36600 36601 if (noCustomizer && data[2]) { 36602 if (objValue === undefined && !(key in object)) { 36603 return false; 36604 } 36605 } else { 36606 var stack = new Stack; 36607 if (customizer) { 36608 var result = customizer(objValue, srcValue, key, object, source, stack); 36609 } 36610 if (!(result === undefined 36611 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) 36612 : result 36613 )) { 36614 return false; 36615 } 36616 } 36617 } 36618 return true; 36619 } 36620 36621 /** 36622 * The base implementation of `_.isNative` without bad shim checks. 36623 * 36624 * @private 36625 * @param {*} value The value to check. 36626 * @returns {boolean} Returns `true` if `value` is a native function, 36627 * else `false`. 36628 */ 36629 function baseIsNative(value) { 36630 if (!isObject(value) || isMasked(value)) { 36631 return false; 36632 } 36633 var pattern = isFunction(value) ? reIsNative : reIsHostCtor; 36634 return pattern.test(toSource(value)); 36635 } 36636 36637 /** 36638 * The base implementation of `_.isRegExp` without Node.js optimizations. 36639 * 36640 * @private 36641 * @param {*} value The value to check. 36642 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. 36643 */ 36644 function baseIsRegExp(value) { 36645 return isObjectLike(value) && baseGetTag(value) == regexpTag; 36646 } 36647 36648 /** 36649 * The base implementation of `_.isSet` without Node.js optimizations. 36650 * 36651 * @private 36652 * @param {*} value The value to check. 36653 * @returns {boolean} Returns `true` if `value` is a set, else `false`. 36654 */ 36655 function baseIsSet(value) { 36656 return isObjectLike(value) && getTag(value) == setTag; 36657 } 36658 36659 /** 36660 * The base implementation of `_.isTypedArray` without Node.js optimizations. 36661 * 36662 * @private 36663 * @param {*} value The value to check. 36664 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. 36665 */ 36666 function baseIsTypedArray(value) { 36667 return isObjectLike(value) && 36668 isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; 36669 } 36670 36671 /** 36672 * The base implementation of `_.iteratee`. 36673 * 36674 * @private 36675 * @param {*} [value=_.identity] The value to convert to an iteratee. 36676 * @returns {Function} Returns the iteratee. 36677 */ 36678 function baseIteratee(value) { 36679 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. 36680 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. 36681 if (typeof value == 'function') { 36682 return value; 36683 } 36684 if (value == null) { 36685 return identity; 36686 } 36687 if (typeof value == 'object') { 36688 return isArray(value) 36689 ? baseMatchesProperty(value[0], value[1]) 36690 : baseMatches(value); 36691 } 36692 return property(value); 36693 } 36694 36695 /** 36696 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. 36697 * 36698 * @private 36699 * @param {Object} object The object to query. 36700 * @returns {Array} Returns the array of property names. 36701 */ 36702 function baseKeys(object) { 36703 if (!isPrototype(object)) { 36704 return nativeKeys(object); 36705 } 36706 var result = []; 36707 for (var key in Object(object)) { 36708 if (hasOwnProperty.call(object, key) && key != 'constructor') { 36709 result.push(key); 36710 } 36711 } 36712 return result; 36713 } 36714 36715 /** 36716 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. 36717 * 36718 * @private 36719 * @param {Object} object The object to query. 36720 * @returns {Array} Returns the array of property names. 36721 */ 36722 function baseKeysIn(object) { 36723 if (!isObject(object)) { 36724 return nativeKeysIn(object); 36725 } 36726 var isProto = isPrototype(object), 36727 result = []; 36728 36729 for (var key in object) { 36730 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { 36731 result.push(key); 36732 } 36733 } 36734 return result; 36735 } 36736 36737 /** 36738 * The base implementation of `_.lt` which doesn't coerce arguments. 36739 * 36740 * @private 36741 * @param {*} value The value to compare. 36742 * @param {*} other The other value to compare. 36743 * @returns {boolean} Returns `true` if `value` is less than `other`, 36744 * else `false`. 36745 */ 36746 function baseLt(value, other) { 36747 return value < other; 36748 } 36749 36750 /** 36751 * The base implementation of `_.map` without support for iteratee shorthands. 36752 * 36753 * @private 36754 * @param {Array|Object} collection The collection to iterate over. 36755 * @param {Function} iteratee The function invoked per iteration. 36756 * @returns {Array} Returns the new mapped array. 36757 */ 36758 function baseMap(collection, iteratee) { 36759 var index = -1, 36760 result = isArrayLike(collection) ? Array(collection.length) : []; 36761 36762 baseEach(collection, function(value, key, collection) { 36763 result[++index] = iteratee(value, key, collection); 36764 }); 36765 return result; 36766 } 36767 36768 /** 36769 * The base implementation of `_.matches` which doesn't clone `source`. 36770 * 36771 * @private 36772 * @param {Object} source The object of property values to match. 36773 * @returns {Function} Returns the new spec function. 36774 */ 36775 function baseMatches(source) { 36776 var matchData = getMatchData(source); 36777 if (matchData.length == 1 && matchData[0][2]) { 36778 return matchesStrictComparable(matchData[0][0], matchData[0][1]); 36779 } 36780 return function(object) { 36781 return object === source || baseIsMatch(object, source, matchData); 36782 }; 36783 } 36784 36785 /** 36786 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. 36787 * 36788 * @private 36789 * @param {string} path The path of the property to get. 36790 * @param {*} srcValue The value to match. 36791 * @returns {Function} Returns the new spec function. 36792 */ 36793 function baseMatchesProperty(path, srcValue) { 36794 if (isKey(path) && isStrictComparable(srcValue)) { 36795 return matchesStrictComparable(toKey(path), srcValue); 36796 } 36797 return function(object) { 36798 var objValue = get(object, path); 36799 return (objValue === undefined && objValue === srcValue) 36800 ? hasIn(object, path) 36801 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); 36802 }; 36803 } 36804 36805 /** 36806 * The base implementation of `_.merge` without support for multiple sources. 36807 * 36808 * @private 36809 * @param {Object} object The destination object. 36810 * @param {Object} source The source object. 36811 * @param {number} srcIndex The index of `source`. 36812 * @param {Function} [customizer] The function to customize merged values. 36813 * @param {Object} [stack] Tracks traversed source values and their merged 36814 * counterparts. 36815 */ 36816 function baseMerge(object, source, srcIndex, customizer, stack) { 36817 if (object === source) { 36818 return; 36819 } 36820 baseFor(source, function(srcValue, key) { 36821 stack || (stack = new Stack); 36822 if (isObject(srcValue)) { 36823 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); 36824 } 36825 else { 36826 var newValue = customizer 36827 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) 36828 : undefined; 36829 36830 if (newValue === undefined) { 36831 newValue = srcValue; 36832 } 36833 assignMergeValue(object, key, newValue); 36834 } 36835 }, keysIn); 36836 } 36837 36838 /** 36839 * A specialized version of `baseMerge` for arrays and objects which performs 36840 * deep merges and tracks traversed objects enabling objects with circular 36841 * references to be merged. 36842 * 36843 * @private 36844 * @param {Object} object The destination object. 36845 * @param {Object} source The source object. 36846 * @param {string} key The key of the value to merge. 36847 * @param {number} srcIndex The index of `source`. 36848 * @param {Function} mergeFunc The function to merge values. 36849 * @param {Function} [customizer] The function to customize assigned values. 36850 * @param {Object} [stack] Tracks traversed source values and their merged 36851 * counterparts. 36852 */ 36853 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { 36854 var objValue = safeGet(object, key), 36855 srcValue = safeGet(source, key), 36856 stacked = stack.get(srcValue); 36857 36858 if (stacked) { 36859 assignMergeValue(object, key, stacked); 36860 return; 36861 } 36862 var newValue = customizer 36863 ? customizer(objValue, srcValue, (key + ''), object, source, stack) 36864 : undefined; 36865 36866 var isCommon = newValue === undefined; 36867 36868 if (isCommon) { 36869 var isArr = isArray(srcValue), 36870 isBuff = !isArr && isBuffer(srcValue), 36871 isTyped = !isArr && !isBuff && isTypedArray(srcValue); 36872 36873 newValue = srcValue; 36874 if (isArr || isBuff || isTyped) { 36875 if (isArray(objValue)) { 36876 newValue = objValue; 36877 } 36878 else if (isArrayLikeObject(objValue)) { 36879 newValue = copyArray(objValue); 36880 } 36881 else if (isBuff) { 36882 isCommon = false;
vendor: 15,233 bytes, lines 36883-37361
36883 newValue = cloneBuffer(srcValue, true); 36884 } 36885 else if (isTyped) { 36886 isCommon = false; 36887 newValue = cloneTypedArray(srcValue, true); 36888 } 36889 else { 36890 newValue = []; 36891 } 36892 } 36893 else if (isPlainObject(srcValue) || isArguments(srcValue)) { 36894 newValue = objValue; 36895 if (isArguments(objValue)) { 36896 newValue = toPlainObject(objValue); 36897 } 36898 else if (!isObject(objValue) || isFunction(objValue)) { 36899 newValue = initCloneObject(srcValue); 36900 } 36901 } 36902 else { 36903 isCommon = false; 36904 } 36905 } 36906 if (isCommon) { 36907 // Recursively merge objects and arrays (susceptible to call stack limits). 36908 stack.set(srcValue, newValue); 36909 mergeFunc(newValue, srcValue, srcIndex, customizer, stack); 36910 stack['delete'](srcValue); 36911 } 36912 assignMergeValue(object, key, newValue); 36913 } 36914 36915 /** 36916 * The base implementation of `_.nth` which doesn't coerce arguments. 36917 * 36918 * @private 36919 * @param {Array} array The array to query. 36920 * @param {number} n The index of the element to return. 36921 * @returns {*} Returns the nth element of `array`. 36922 */ 36923 function baseNth(array, n) { 36924 var length = array.length; 36925 if (!length) { 36926 return; 36927 } 36928 n += n < 0 ? length : 0; 36929 return isIndex(n, length) ? array[n] : undefined; 36930 } 36931 36932 /** 36933 * The base implementation of `_.orderBy` without param guards. 36934 * 36935 * @private 36936 * @param {Array|Object} collection The collection to iterate over. 36937 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. 36938 * @param {string[]} orders The sort orders of `iteratees`. 36939 * @returns {Array} Returns the new sorted array. 36940 */ 36941 function baseOrderBy(collection, iteratees, orders) { 36942 var index = -1; 36943 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); 36944 36945 var result = baseMap(collection, function(value, key, collection) { 36946 var criteria = arrayMap(iteratees, function(iteratee) { 36947 return iteratee(value); 36948 }); 36949 return { 'criteria': criteria, 'index': ++index, 'value': value }; 36950 }); 36951 36952 return baseSortBy(result, function(object, other) { 36953 return compareMultiple(object, other, orders); 36954 }); 36955 } 36956 36957 /** 36958 * The base implementation of `_.pick` without support for individual 36959 * property identifiers. 36960 * 36961 * @private 36962 * @param {Object} object The source object. 36963 * @param {string[]} paths The property paths to pick. 36964 * @returns {Object} Returns the new object. 36965 */ 36966 function basePick(object, paths) { 36967 return basePickBy(object, paths, function(value, path) { 36968 return hasIn(object, path); 36969 }); 36970 } 36971 36972 /** 36973 * The base implementation of `_.pickBy` without support for iteratee shorthands. 36974 * 36975 * @private 36976 * @param {Object} object The source object. 36977 * @param {string[]} paths The property paths to pick. 36978 * @param {Function} predicate The function invoked per property. 36979 * @returns {Object} Returns the new object. 36980 */ 36981 function basePickBy(object, paths, predicate) { 36982 var index = -1, 36983 length = paths.length, 36984 result = {}; 36985 36986 while (++index < length) { 36987 var path = paths[index], 36988 value = baseGet(object, path); 36989 36990 if (predicate(value, path)) { 36991 baseSet(result, castPath(path, object), value); 36992 } 36993 } 36994 return result; 36995 } 36996 36997 /** 36998 * A specialized version of `baseProperty` which supports deep paths. 36999 * 37000 * @private 37001 * @param {Array|string} path The path of the property to get. 37002 * @returns {Function} Returns the new accessor function. 37003 */ 37004 function basePropertyDeep(path) { 37005 return function(object) { 37006 return baseGet(object, path); 37007 }; 37008 } 37009 37010 /** 37011 * The base implementation of `_.pullAllBy` without support for iteratee 37012 * shorthands. 37013 * 37014 * @private 37015 * @param {Array} array The array to modify. 37016 * @param {Array} values The values to remove. 37017 * @param {Function} [iteratee] The iteratee invoked per element. 37018 * @param {Function} [comparator] The comparator invoked per element. 37019 * @returns {Array} Returns `array`. 37020 */ 37021 function basePullAll(array, values, iteratee, comparator) { 37022 var indexOf = comparator ? baseIndexOfWith : baseIndexOf, 37023 index = -1, 37024 length = values.length, 37025 seen = array; 37026 37027 if (array === values) { 37028 values = copyArray(values); 37029 } 37030 if (iteratee) { 37031 seen = arrayMap(array, baseUnary(iteratee)); 37032 } 37033 while (++index < length) { 37034 var fromIndex = 0, 37035 value = values[index], 37036 computed = iteratee ? iteratee(value) : value; 37037 37038 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { 37039 if (seen !== array) { 37040 splice.call(seen, fromIndex, 1); 37041 } 37042 splice.call(array, fromIndex, 1); 37043 } 37044 } 37045 return array; 37046 } 37047 37048 /** 37049 * The base implementation of `_.pullAt` without support for individual 37050 * indexes or capturing the removed elements. 37051 * 37052 * @private 37053 * @param {Array} array The array to modify. 37054 * @param {number[]} indexes The indexes of elements to remove. 37055 * @returns {Array} Returns `array`. 37056 */ 37057 function basePullAt(array, indexes) { 37058 var length = array ? indexes.length : 0, 37059 lastIndex = length - 1; 37060 37061 while (length--) { 37062 var index = indexes[length]; 37063 if (length == lastIndex || index !== previous) { 37064 var previous = index; 37065 if (isIndex(index)) { 37066 splice.call(array, index, 1); 37067 } else { 37068 baseUnset(array, index); 37069 } 37070 } 37071 } 37072 return array; 37073 } 37074 37075 /** 37076 * The base implementation of `_.random` without support for returning 37077 * floating-point numbers. 37078 * 37079 * @private 37080 * @param {number} lower The lower bound. 37081 * @param {number} upper The upper bound. 37082 * @returns {number} Returns the random number. 37083 */ 37084 function baseRandom(lower, upper) { 37085 return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); 37086 } 37087 37088 /** 37089 * The base implementation of `_.range` and `_.rangeRight` which doesn't 37090 * coerce arguments. 37091 * 37092 * @private 37093 * @param {number} start The start of the range. 37094 * @param {number} end The end of the range. 37095 * @param {number} step The value to increment or decrement by. 37096 * @param {boolean} [fromRight] Specify iterating from right to left. 37097 * @returns {Array} Returns the range of numbers. 37098 */ 37099 function baseRange(start, end, step, fromRight) { 37100 var index = -1, 37101 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), 37102 result = Array(length); 37103 37104 while (length--) { 37105 result[fromRight ? length : ++index] = start; 37106 start += step; 37107 } 37108 return result; 37109 } 37110 37111 /** 37112 * The base implementation of `_.repeat` which doesn't coerce arguments. 37113 * 37114 * @private 37115 * @param {string} string The string to repeat. 37116 * @param {number} n The number of times to repeat the string. 37117 * @returns {string} Returns the repeated string. 37118 */ 37119 function baseRepeat(string, n) { 37120 var result = ''; 37121 if (!string || n < 1 || n > MAX_SAFE_INTEGER) { 37122 return result; 37123 } 37124 // Leverage the exponentiation by squaring algorithm for a faster repeat. 37125 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. 37126 do { 37127 if (n % 2) { 37128 result += string; 37129 } 37130 n = nativeFloor(n / 2); 37131 if (n) { 37132 string += string; 37133 } 37134 } while (n); 37135 37136 return result; 37137 } 37138 37139 /** 37140 * The base implementation of `_.rest` which doesn't validate or coerce arguments. 37141 * 37142 * @private 37143 * @param {Function} func The function to apply a rest parameter to. 37144 * @param {number} [start=func.length-1] The start position of the rest parameter. 37145 * @returns {Function} Returns the new function. 37146 */ 37147 function baseRest(func, start) { 37148 return setToString(overRest(func, start, identity), func + ''); 37149 } 37150 37151 /** 37152 * The base implementation of `_.sample`. 37153 * 37154 * @private 37155 * @param {Array|Object} collection The collection to sample. 37156 * @returns {*} Returns the random element. 37157 */ 37158 function baseSample(collection) { 37159 return arraySample(values(collection)); 37160 } 37161 37162 /** 37163 * The base implementation of `_.sampleSize` without param guards. 37164 * 37165 * @private 37166 * @param {Array|Object} collection The collection to sample. 37167 * @param {number} n The number of elements to sample. 37168 * @returns {Array} Returns the random elements. 37169 */ 37170 function baseSampleSize(collection, n) { 37171 var array = values(collection); 37172 return shuffleSelf(array, baseClamp(n, 0, array.length)); 37173 } 37174 37175 /** 37176 * The base implementation of `_.set`. 37177 * 37178 * @private 37179 * @param {Object} object The object to modify. 37180 * @param {Array|string} path The path of the property to set. 37181 * @param {*} value The value to set. 37182 * @param {Function} [customizer] The function to customize path creation. 37183 * @returns {Object} Returns `object`. 37184 */ 37185 function baseSet(object, path, value, customizer) { 37186 if (!isObject(object)) { 37187 return object; 37188 } 37189 path = castPath(path, object); 37190 37191 var index = -1, 37192 length = path.length, 37193 lastIndex = length - 1, 37194 nested = object; 37195 37196 while (nested != null && ++index < length) { 37197 var key = toKey(path[index]), 37198 newValue = value; 37199 37200 if (index != lastIndex) { 37201 var objValue = nested[key]; 37202 newValue = customizer ? customizer(objValue, key, nested) : undefined; 37203 if (newValue === undefined) { 37204 newValue = isObject(objValue) 37205 ? objValue 37206 : (isIndex(path[index + 1]) ? [] : {}); 37207 } 37208 } 37209 assignValue(nested, key, newValue); 37210 nested = nested[key]; 37211 } 37212 return object; 37213 } 37214 37215 /** 37216 * The base implementation of `setData` without support for hot loop shorting. 37217 * 37218 * @private 37219 * @param {Function} func The function to associate metadata with. 37220 * @param {*} data The metadata. 37221 * @returns {Function} Returns `func`. 37222 */ 37223 var baseSetData = !metaMap ? identity : function(func, data) { 37224 metaMap.set(func, data); 37225 return func; 37226 }; 37227 37228 /** 37229 * The base implementation of `setToString` without support for hot loop shorting. 37230 * 37231 * @private 37232 * @param {Function} func The function to modify. 37233 * @param {Function} string The `toString` result. 37234 * @returns {Function} Returns `func`. 37235 */ 37236 var baseSetToString = !defineProperty ? identity : function(func, string) { 37237 return defineProperty(func, 'toString', { 37238 'configurable': true, 37239 'enumerable': false, 37240 'value': constant(string), 37241 'writable': true 37242 }); 37243 }; 37244 37245 /** 37246 * The base implementation of `_.shuffle`. 37247 * 37248 * @private 37249 * @param {Array|Object} collection The collection to shuffle. 37250 * @returns {Array} Returns the new shuffled array. 37251 */ 37252 function baseShuffle(collection) { 37253 return shuffleSelf(values(collection)); 37254 } 37255 37256 /** 37257 * The base implementation of `_.slice` without an iteratee call guard. 37258 * 37259 * @private 37260 * @param {Array} array The array to slice. 37261 * @param {number} [start=0] The start position. 37262 * @param {number} [end=array.length] The end position. 37263 * @returns {Array} Returns the slice of `array`. 37264 */ 37265 function baseSlice(array, start, end) { 37266 var index = -1, 37267 length = array.length; 37268 37269 if (start < 0) { 37270 start = -start > length ? 0 : (length + start); 37271 } 37272 end = end > length ? length : end; 37273 if (end < 0) { 37274 end += length; 37275 } 37276 length = start > end ? 0 : ((end - start) >>> 0); 37277 start >>>= 0; 37278 37279 var result = Array(length); 37280 while (++index < length) { 37281 result[index] = array[index + start]; 37282 } 37283 return result; 37284 } 37285 37286 /** 37287 * The base implementation of `_.some` without support for iteratee shorthands. 37288 * 37289 * @private 37290 * @param {Array|Object} collection The collection to iterate over. 37291 * @param {Function} predicate The function invoked per iteration. 37292 * @returns {boolean} Returns `true` if any element passes the predicate check, 37293 * else `false`. 37294 */ 37295 function baseSome(collection, predicate) { 37296 var result; 37297 37298 baseEach(collection, function(value, index, collection) { 37299 result = predicate(value, index, collection); 37300 return !result; 37301 }); 37302 return !!result; 37303 } 37304 37305 /** 37306 * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which 37307 * performs a binary search of `array` to determine the index at which `value` 37308 * should be inserted into `array` in order to maintain its sort order. 37309 * 37310 * @private 37311 * @param {Array} array The sorted array to inspect. 37312 * @param {*} value The value to evaluate. 37313 * @param {boolean} [retHighest] Specify returning the highest qualified index. 37314 * @returns {number} Returns the index at which `value` should be inserted 37315 * into `array`. 37316 */ 37317 function baseSortedIndex(array, value, retHighest) { 37318 var low = 0, 37319 high = array == null ? low : array.length; 37320 37321 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { 37322 while (low < high) { 37323 var mid = (low + high) >>> 1, 37324 computed = array[mid]; 37325 37326 if (computed !== null && !isSymbol(computed) && 37327 (retHighest ? (computed <= value) : (computed < value))) { 37328 low = mid + 1; 37329 } else { 37330 high = mid; 37331 } 37332 } 37333 return high; 37334 } 37335 return baseSortedIndexBy(array, value, identity, retHighest); 37336 } 37337 37338 /** 37339 * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` 37340 * which invokes `iteratee` for `value` and each element of `array` to compute 37341 * their sort ranking. The iteratee is invoked with one argument; (value). 37342 * 37343 * @private 37344 * @param {Array} array The sorted array to inspect. 37345 * @param {*} value The value to evaluate. 37346 * @param {Function} iteratee The iteratee invoked per element. 37347 * @param {boolean} [retHighest] Specify returning the highest qualified index. 37348 * @returns {number} Returns the index at which `value` should be inserted 37349 * into `array`. 37350 */ 37351 function baseSortedIndexBy(array, value, iteratee, retHighest) { 37352 value = iteratee(value); 37353 37354 var low = 0, 37355 high = array == null ? 0 : array.length, 37356 valIsNaN = value !== value, 37357 valIsNull = value === null, 37358 valIsSymbol = isSymbol(value), 37359 valIsUndefined = value === undefined; 37360 37361 while (low < high) {
vendor: 51,297 bytes, lines 37362-38839
37362 var mid = nativeFloor((low + high) / 2), 37363 computed = iteratee(array[mid]), 37364 othIsDefined = computed !== undefined, 37365 othIsNull = computed === null, 37366 othIsReflexive = computed === computed, 37367 othIsSymbol = isSymbol(computed); 37368 37369 if (valIsNaN) { 37370 var setLow = retHighest || othIsReflexive; 37371 } else if (valIsUndefined) { 37372 setLow = othIsReflexive && (retHighest || othIsDefined); 37373 } else if (valIsNull) { 37374 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); 37375 } else if (valIsSymbol) { 37376 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); 37377 } else if (othIsNull || othIsSymbol) { 37378 setLow = false; 37379 } else { 37380 setLow = retHighest ? (computed <= value) : (computed < value); 37381 } 37382 if (setLow) { 37383 low = mid + 1; 37384 } else { 37385 high = mid; 37386 } 37387 } 37388 return nativeMin(high, MAX_ARRAY_INDEX); 37389 } 37390 37391 /** 37392 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without 37393 * support for iteratee shorthands. 37394 * 37395 * @private 37396 * @param {Array} array The array to inspect. 37397 * @param {Function} [iteratee] The iteratee invoked per element. 37398 * @returns {Array} Returns the new duplicate free array. 37399 */ 37400 function baseSortedUniq(array, iteratee) { 37401 var index = -1, 37402 length = array.length, 37403 resIndex = 0, 37404 result = []; 37405 37406 while (++index < length) { 37407 var value = array[index], 37408 computed = iteratee ? iteratee(value) : value; 37409 37410 if (!index || !eq(computed, seen)) { 37411 var seen = computed; 37412 result[resIndex++] = value === 0 ? 0 : value; 37413 } 37414 } 37415 return result; 37416 } 37417 37418 /** 37419 * The base implementation of `_.toNumber` which doesn't ensure correct 37420 * conversions of binary, hexadecimal, or octal string values. 37421 * 37422 * @private 37423 * @param {*} value The value to process. 37424 * @returns {number} Returns the number. 37425 */ 37426 function baseToNumber(value) { 37427 if (typeof value == 'number') { 37428 return value; 37429 } 37430 if (isSymbol(value)) { 37431 return NAN; 37432 } 37433 return +value; 37434 } 37435 37436 /** 37437 * The base implementation of `_.toString` which doesn't convert nullish 37438 * values to empty strings. 37439 * 37440 * @private 37441 * @param {*} value The value to process. 37442 * @returns {string} Returns the string. 37443 */ 37444 function baseToString(value) { 37445 // Exit early for strings to avoid a performance hit in some environments. 37446 if (typeof value == 'string') { 37447 return value; 37448 } 37449 if (isArray(value)) { 37450 // Recursively convert values (susceptible to call stack limits). 37451 return arrayMap(value, baseToString) + ''; 37452 } 37453 if (isSymbol(value)) { 37454 return symbolToString ? symbolToString.call(value) : ''; 37455 } 37456 var result = (value + ''); 37457 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; 37458 } 37459 37460 /** 37461 * The base implementation of `_.uniqBy` without support for iteratee shorthands. 37462 * 37463 * @private 37464 * @param {Array} array The array to inspect. 37465 * @param {Function} [iteratee] The iteratee invoked per element. 37466 * @param {Function} [comparator] The comparator invoked per element. 37467 * @returns {Array} Returns the new duplicate free array. 37468 */ 37469 function baseUniq(array, iteratee, comparator) { 37470 var index = -1, 37471 includes = arrayIncludes, 37472 length = array.length, 37473 isCommon = true, 37474 result = [], 37475 seen = result; 37476 37477 if (comparator) { 37478 isCommon = false; 37479 includes = arrayIncludesWith; 37480 } 37481 else if (length >= LARGE_ARRAY_SIZE) { 37482 var set = iteratee ? null : createSet(array); 37483 if (set) { 37484 return setToArray(set); 37485 } 37486 isCommon = false; 37487 includes = cacheHas; 37488 seen = new SetCache; 37489 } 37490 else { 37491 seen = iteratee ? [] : result; 37492 } 37493 outer: 37494 while (++index < length) { 37495 var value = array[index], 37496 computed = iteratee ? iteratee(value) : value; 37497 37498 value = (comparator || value !== 0) ? value : 0; 37499 if (isCommon && computed === computed) { 37500 var seenIndex = seen.length; 37501 while (seenIndex--) { 37502 if (seen[seenIndex] === computed) { 37503 continue outer; 37504 } 37505 } 37506 if (iteratee) { 37507 seen.push(computed); 37508 } 37509 result.push(value); 37510 } 37511 else if (!includes(seen, computed, comparator)) { 37512 if (seen !== result) { 37513 seen.push(computed); 37514 } 37515 result.push(value); 37516 } 37517 } 37518 return result; 37519 } 37520 37521 /** 37522 * The base implementation of `_.unset`. 37523 * 37524 * @private 37525 * @param {Object} object The object to modify. 37526 * @param {Array|string} path The property path to unset. 37527 * @returns {boolean} Returns `true` if the property is deleted, else `false`. 37528 */ 37529 function baseUnset(object, path) { 37530 path = castPath(path, object); 37531 object = parent(object, path); 37532 return object == null || delete object[toKey(last(path))]; 37533 } 37534 37535 /** 37536 * The base implementation of `_.update`. 37537 * 37538 * @private 37539 * @param {Object} object The object to modify. 37540 * @param {Array|string} path The path of the property to update. 37541 * @param {Function} updater The function to produce the updated value. 37542 * @param {Function} [customizer] The function to customize path creation. 37543 * @returns {Object} Returns `object`. 37544 */ 37545 function baseUpdate(object, path, updater, customizer) { 37546 return baseSet(object, path, updater(baseGet(object, path)), customizer); 37547 } 37548 37549 /** 37550 * The base implementation of methods like `_.dropWhile` and `_.takeWhile` 37551 * without support for iteratee shorthands. 37552 * 37553 * @private 37554 * @param {Array} array The array to query. 37555 * @param {Function} predicate The function invoked per iteration. 37556 * @param {boolean} [isDrop] Specify dropping elements instead of taking them. 37557 * @param {boolean} [fromRight] Specify iterating from right to left. 37558 * @returns {Array} Returns the slice of `array`. 37559 */ 37560 function baseWhile(array, predicate, isDrop, fromRight) { 37561 var length = array.length, 37562 index = fromRight ? length : -1; 37563 37564 while ((fromRight ? index-- : ++index < length) && 37565 predicate(array[index], index, array)) {} 37566 37567 return isDrop 37568 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) 37569 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); 37570 } 37571 37572 /** 37573 * The base implementation of `wrapperValue` which returns the result of 37574 * performing a sequence of actions on the unwrapped `value`, where each 37575 * successive action is supplied the return value of the previous. 37576 * 37577 * @private 37578 * @param {*} value The unwrapped value. 37579 * @param {Array} actions Actions to perform to resolve the unwrapped value. 37580 * @returns {*} Returns the resolved value. 37581 */ 37582 function baseWrapperValue(value, actions) { 37583 var result = value; 37584 if (result instanceof LazyWrapper) { 37585 result = result.value(); 37586 } 37587 return arrayReduce(actions, function(result, action) { 37588 return action.func.apply(action.thisArg, arrayPush([result], action.args)); 37589 }, result); 37590 } 37591 37592 /** 37593 * The base implementation of methods like `_.xor`, without support for 37594 * iteratee shorthands, that accepts an array of arrays to inspect. 37595 * 37596 * @private 37597 * @param {Array} arrays The arrays to inspect. 37598 * @param {Function} [iteratee] The iteratee invoked per element. 37599 * @param {Function} [comparator] The comparator invoked per element. 37600 * @returns {Array} Returns the new array of values. 37601 */ 37602 function baseXor(arrays, iteratee, comparator) { 37603 var length = arrays.length; 37604 if (length < 2) { 37605 return length ? baseUniq(arrays[0]) : []; 37606 } 37607 var index = -1, 37608 result = Array(length); 37609 37610 while (++index < length) { 37611 var array = arrays[index], 37612 othIndex = -1; 37613 37614 while (++othIndex < length) { 37615 if (othIndex != index) { 37616 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); 37617 } 37618 } 37619 } 37620 return baseUniq(baseFlatten(result, 1), iteratee, comparator); 37621 } 37622 37623 /** 37624 * This base implementation of `_.zipObject` which assigns values using `assignFunc`. 37625 * 37626 * @private 37627 * @param {Array} props The property identifiers. 37628 * @param {Array} values The property values. 37629 * @param {Function} assignFunc The function to assign values. 37630 * @returns {Object} Returns the new object. 37631 */ 37632 function baseZipObject(props, values, assignFunc) { 37633 var index = -1, 37634 length = props.length, 37635 valsLength = values.length, 37636 result = {}; 37637 37638 while (++index < length) { 37639 var value = index < valsLength ? values[index] : undefined; 37640 assignFunc(result, props[index], value); 37641 } 37642 return result; 37643 } 37644 37645 /** 37646 * Casts `value` to an empty array if it's not an array like object. 37647 * 37648 * @private 37649 * @param {*} value The value to inspect. 37650 * @returns {Array|Object} Returns the cast array-like object. 37651 */ 37652 function castArrayLikeObject(value) { 37653 return isArrayLikeObject(value) ? value : []; 37654 } 37655 37656 /** 37657 * Casts `value` to `identity` if it's not a function. 37658 * 37659 * @private 37660 * @param {*} value The value to inspect. 37661 * @returns {Function} Returns cast function. 37662 */ 37663 function castFunction(value) { 37664 return typeof value == 'function' ? value : identity; 37665 } 37666 37667 /** 37668 * Casts `value` to a path array if it's not one. 37669 * 37670 * @private 37671 * @param {*} value The value to inspect. 37672 * @param {Object} [object] The object to query keys on. 37673 * @returns {Array} Returns the cast property path array. 37674 */ 37675 function castPath(value, object) { 37676 if (isArray(value)) { 37677 return value; 37678 } 37679 return isKey(value, object) ? [value] : stringToPath(toString(value)); 37680 } 37681 37682 /** 37683 * A `baseRest` alias which can be replaced with `identity` by module 37684 * replacement plugins. 37685 * 37686 * @private 37687 * @type {Function} 37688 * @param {Function} func The function to apply a rest parameter to. 37689 * @returns {Function} Returns the new function. 37690 */ 37691 var castRest = baseRest; 37692 37693 /** 37694 * Casts `array` to a slice if it's needed. 37695 * 37696 * @private 37697 * @param {Array} array The array to inspect. 37698 * @param {number} start The start position. 37699 * @param {number} [end=array.length] The end position. 37700 * @returns {Array} Returns the cast slice. 37701 */ 37702 function castSlice(array, start, end) { 37703 var length = array.length; 37704 end = end === undefined ? length : end; 37705 return (!start && end >= length) ? array : baseSlice(array, start, end); 37706 } 37707 37708 /** 37709 * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). 37710 * 37711 * @private 37712 * @param {number|Object} id The timer id or timeout object of the timer to clear. 37713 */ 37714 var clearTimeout = ctxClearTimeout || function(id) { 37715 return root.clearTimeout(id); 37716 }; 37717 37718 /** 37719 * Creates a clone of `buffer`. 37720 * 37721 * @private 37722 * @param {Buffer} buffer The buffer to clone. 37723 * @param {boolean} [isDeep] Specify a deep clone. 37724 * @returns {Buffer} Returns the cloned buffer. 37725 */ 37726 function cloneBuffer(buffer, isDeep) { 37727 if (isDeep) { 37728 return buffer.slice(); 37729 } 37730 var length = buffer.length, 37731 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); 37732 37733 buffer.copy(result); 37734 return result; 37735 } 37736 37737 /** 37738 * Creates a clone of `arrayBuffer`. 37739 * 37740 * @private 37741 * @param {ArrayBuffer} arrayBuffer The array buffer to clone. 37742 * @returns {ArrayBuffer} Returns the cloned array buffer. 37743 */ 37744 function cloneArrayBuffer(arrayBuffer) { 37745 var result = new arrayBuffer.constructor(arrayBuffer.byteLength); 37746 new Uint8Array(result).set(new Uint8Array(arrayBuffer)); 37747 return result; 37748 } 37749 37750 /** 37751 * Creates a clone of `dataView`. 37752 * 37753 * @private 37754 * @param {Object} dataView The data view to clone. 37755 * @param {boolean} [isDeep] Specify a deep clone. 37756 * @returns {Object} Returns the cloned data view. 37757 */ 37758 function cloneDataView(dataView, isDeep) { 37759 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; 37760 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); 37761 } 37762 37763 /** 37764 * Creates a clone of `regexp`. 37765 * 37766 * @private 37767 * @param {Object} regexp The regexp to clone. 37768 * @returns {Object} Returns the cloned regexp. 37769 */ 37770 function cloneRegExp(regexp) { 37771 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); 37772 result.lastIndex = regexp.lastIndex; 37773 return result; 37774 } 37775 37776 /** 37777 * Creates a clone of the `symbol` object. 37778 * 37779 * @private 37780 * @param {Object} symbol The symbol object to clone. 37781 * @returns {Object} Returns the cloned symbol object. 37782 */ 37783 function cloneSymbol(symbol) { 37784 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; 37785 } 37786 37787 /** 37788 * Creates a clone of `typedArray`. 37789 * 37790 * @private 37791 * @param {Object} typedArray The typed array to clone. 37792 * @param {boolean} [isDeep] Specify a deep clone. 37793 * @returns {Object} Returns the cloned typed array. 37794 */ 37795 function cloneTypedArray(typedArray, isDeep) { 37796 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; 37797 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); 37798 } 37799 37800 /** 37801 * Compares values to sort them in ascending order. 37802 * 37803 * @private 37804 * @param {*} value The value to compare. 37805 * @param {*} other The other value to compare. 37806 * @returns {number} Returns the sort order indicator for `value`. 37807 */ 37808 function compareAscending(value, other) { 37809 if (value !== other) { 37810 var valIsDefined = value !== undefined, 37811 valIsNull = value === null, 37812 valIsReflexive = value === value, 37813 valIsSymbol = isSymbol(value); 37814 37815 var othIsDefined = other !== undefined, 37816 othIsNull = other === null, 37817 othIsReflexive = other === other, 37818 othIsSymbol = isSymbol(other); 37819 37820 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || 37821 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || 37822 (valIsNull && othIsDefined && othIsReflexive) || 37823 (!valIsDefined && othIsReflexive) || 37824 !valIsReflexive) { 37825 return 1; 37826 } 37827 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || 37828 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || 37829 (othIsNull && valIsDefined && valIsReflexive) || 37830 (!othIsDefined && valIsReflexive) || 37831 !othIsReflexive) { 37832 return -1; 37833 } 37834 } 37835 return 0; 37836 } 37837 37838 /** 37839 * Used by `_.orderBy` to compare multiple properties of a value to another 37840 * and stable sort them. 37841 * 37842 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, 37843 * specify an order of "desc" for descending or "asc" for ascending sort order 37844 * of corresponding values. 37845 * 37846 * @private 37847 * @param {Object} object The object to compare. 37848 * @param {Object} other The other object to compare. 37849 * @param {boolean[]|string[]} orders The order to sort by for each property. 37850 * @returns {number} Returns the sort order indicator for `object`. 37851 */ 37852 function compareMultiple(object, other, orders) { 37853 var index = -1, 37854 objCriteria = object.criteria, 37855 othCriteria = other.criteria, 37856 length = objCriteria.length, 37857 ordersLength = orders.length; 37858 37859 while (++index < length) { 37860 var result = compareAscending(objCriteria[index], othCriteria[index]); 37861 if (result) { 37862 if (index >= ordersLength) { 37863 return result; 37864 } 37865 var order = orders[index]; 37866 return result * (order == 'desc' ? -1 : 1); 37867 } 37868 } 37869 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications 37870 // that causes it, under certain circumstances, to provide the same value for 37871 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 37872 // for more details. 37873 // 37874 // This also ensures a stable sort in V8 and other engines. 37875 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. 37876 return object.index - other.index; 37877 } 37878 37879 /** 37880 * Creates an array that is the composition of partially applied arguments, 37881 * placeholders, and provided arguments into a single array of arguments. 37882 * 37883 * @private 37884 * @param {Array} args The provided arguments. 37885 * @param {Array} partials The arguments to prepend to those provided. 37886 * @param {Array} holders The `partials` placeholder indexes. 37887 * @params {boolean} [isCurried] Specify composing for a curried function. 37888 * @returns {Array} Returns the new array of composed arguments. 37889 */ 37890 function composeArgs(args, partials, holders, isCurried) { 37891 var argsIndex = -1, 37892 argsLength = args.length, 37893 holdersLength = holders.length, 37894 leftIndex = -1, 37895 leftLength = partials.length, 37896 rangeLength = nativeMax(argsLength - holdersLength, 0), 37897 result = Array(leftLength + rangeLength), 37898 isUncurried = !isCurried; 37899 37900 while (++leftIndex < leftLength) { 37901 result[leftIndex] = partials[leftIndex]; 37902 } 37903 while (++argsIndex < holdersLength) { 37904 if (isUncurried || argsIndex < argsLength) { 37905 result[holders[argsIndex]] = args[argsIndex]; 37906 } 37907 } 37908 while (rangeLength--) { 37909 result[leftIndex++] = args[argsIndex++]; 37910 } 37911 return result; 37912 } 37913 37914 /** 37915 * This function is like `composeArgs` except that the arguments composition 37916 * is tailored for `_.partialRight`. 37917 * 37918 * @private 37919 * @param {Array} args The provided arguments. 37920 * @param {Array} partials The arguments to append to those provided. 37921 * @param {Array} holders The `partials` placeholder indexes. 37922 * @params {boolean} [isCurried] Specify composing for a curried function. 37923 * @returns {Array} Returns the new array of composed arguments. 37924 */ 37925 function composeArgsRight(args, partials, holders, isCurried) { 37926 var argsIndex = -1, 37927 argsLength = args.length, 37928 holdersIndex = -1, 37929 holdersLength = holders.length, 37930 rightIndex = -1, 37931 rightLength = partials.length, 37932 rangeLength = nativeMax(argsLength - holdersLength, 0), 37933 result = Array(rangeLength + rightLength), 37934 isUncurried = !isCurried; 37935 37936 while (++argsIndex < rangeLength) { 37937 result[argsIndex] = args[argsIndex]; 37938 } 37939 var offset = argsIndex; 37940 while (++rightIndex < rightLength) { 37941 result[offset + rightIndex] = partials[rightIndex]; 37942 } 37943 while (++holdersIndex < holdersLength) { 37944 if (isUncurried || argsIndex < argsLength) { 37945 result[offset + holders[holdersIndex]] = args[argsIndex++]; 37946 } 37947 } 37948 return result; 37949 } 37950 37951 /** 37952 * Copies the values of `source` to `array`. 37953 * 37954 * @private 37955 * @param {Array} source The array to copy values from. 37956 * @param {Array} [array=[]] The array to copy values to. 37957 * @returns {Array} Returns `array`. 37958 */ 37959 function copyArray(source, array) { 37960 var index = -1, 37961 length = source.length; 37962 37963 array || (array = Array(length)); 37964 while (++index < length) { 37965 array[index] = source[index]; 37966 } 37967 return array; 37968 } 37969 37970 /** 37971 * Copies properties of `source` to `object`. 37972 * 37973 * @private 37974 * @param {Object} source The object to copy properties from. 37975 * @param {Array} props The property identifiers to copy. 37976 * @param {Object} [object={}] The object to copy properties to. 37977 * @param {Function} [customizer] The function to customize copied values. 37978 * @returns {Object} Returns `object`. 37979 */ 37980 function copyObject(source, props, object, customizer) { 37981 var isNew = !object; 37982 object || (object = {}); 37983 37984 var index = -1, 37985 length = props.length; 37986 37987 while (++index < length) { 37988 var key = props[index]; 37989 37990 var newValue = customizer 37991 ? customizer(object[key], source[key], key, object, source) 37992 : undefined; 37993 37994 if (newValue === undefined) { 37995 newValue = source[key]; 37996 } 37997 if (isNew) { 37998 baseAssignValue(object, key, newValue); 37999 } else { 38000 assignValue(object, key, newValue); 38001 } 38002 } 38003 return object; 38004 } 38005 38006 /** 38007 * Copies own symbols of `source` to `object`. 38008 * 38009 * @private 38010 * @param {Object} source The object to copy symbols from. 38011 * @param {Object} [object={}] The object to copy symbols to. 38012 * @returns {Object} Returns `object`. 38013 */ 38014 function copySymbols(source, object) { 38015 return copyObject(source, getSymbols(source), object); 38016 } 38017 38018 /** 38019 * Copies own and inherited symbols of `source` to `object`. 38020 * 38021 * @private 38022 * @param {Object} source The object to copy symbols from. 38023 * @param {Object} [object={}] The object to copy symbols to. 38024 * @returns {Object} Returns `object`. 38025 */ 38026 function copySymbolsIn(source, object) { 38027 return copyObject(source, getSymbolsIn(source), object); 38028 } 38029 38030 /** 38031 * Creates a function like `_.groupBy`. 38032 * 38033 * @private 38034 * @param {Function} setter The function to set accumulator values. 38035 * @param {Function} [initializer] The accumulator object initializer. 38036 * @returns {Function} Returns the new aggregator function. 38037 */ 38038 function createAggregator(setter, initializer) { 38039 return function(collection, iteratee) { 38040 var func = isArray(collection) ? arrayAggregator : baseAggregator, 38041 accumulator = initializer ? initializer() : {}; 38042 38043 return func(collection, setter, getIteratee(iteratee, 2), accumulator); 38044 }; 38045 } 38046 38047 /** 38048 * Creates a function like `_.assign`. 38049 * 38050 * @private 38051 * @param {Function} assigner The function to assign values. 38052 * @returns {Function} Returns the new assigner function. 38053 */ 38054 function createAssigner(assigner) { 38055 return baseRest(function(object, sources) { 38056 var index = -1, 38057 length = sources.length, 38058 customizer = length > 1 ? sources[length - 1] : undefined, 38059 guard = length > 2 ? sources[2] : undefined; 38060 38061 customizer = (assigner.length > 3 && typeof customizer == 'function') 38062 ? (length--, customizer) 38063 : undefined; 38064 38065 if (guard && isIterateeCall(sources[0], sources[1], guard)) { 38066 customizer = length < 3 ? undefined : customizer; 38067 length = 1; 38068 } 38069 object = Object(object); 38070 while (++index < length) { 38071 var source = sources[index]; 38072 if (source) { 38073 assigner(object, source, index, customizer); 38074 } 38075 } 38076 return object; 38077 }); 38078 } 38079 38080 /** 38081 * Creates a `baseEach` or `baseEachRight` function. 38082 * 38083 * @private 38084 * @param {Function} eachFunc The function to iterate over a collection. 38085 * @param {boolean} [fromRight] Specify iterating from right to left. 38086 * @returns {Function} Returns the new base function. 38087 */ 38088 function createBaseEach(eachFunc, fromRight) { 38089 return function(collection, iteratee) { 38090 if (collection == null) { 38091 return collection; 38092 } 38093 if (!isArrayLike(collection)) { 38094 return eachFunc(collection, iteratee); 38095 } 38096 var length = collection.length, 38097 index = fromRight ? length : -1, 38098 iterable = Object(collection); 38099 38100 while ((fromRight ? index-- : ++index < length)) { 38101 if (iteratee(iterable[index], index, iterable) === false) { 38102 break; 38103 } 38104 } 38105 return collection; 38106 }; 38107 } 38108 38109 /** 38110 * Creates a base function for methods like `_.forIn` and `_.forOwn`. 38111 * 38112 * @private 38113 * @param {boolean} [fromRight] Specify iterating from right to left. 38114 * @returns {Function} Returns the new base function. 38115 */ 38116 function createBaseFor(fromRight) { 38117 return function(object, iteratee, keysFunc) { 38118 var index = -1, 38119 iterable = Object(object), 38120 props = keysFunc(object), 38121 length = props.length; 38122 38123 while (length--) { 38124 var key = props[fromRight ? length : ++index]; 38125 if (iteratee(iterable[key], key, iterable) === false) { 38126 break; 38127 } 38128 } 38129 return object; 38130 }; 38131 } 38132 38133 /** 38134 * Creates a function that wraps `func` to invoke it with the optional `this` 38135 * binding of `thisArg`. 38136 * 38137 * @private 38138 * @param {Function} func The function to wrap. 38139 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 38140 * @param {*} [thisArg] The `this` binding of `func`. 38141 * @returns {Function} Returns the new wrapped function. 38142 */ 38143 function createBind(func, bitmask, thisArg) { 38144 var isBind = bitmask & WRAP_BIND_FLAG, 38145 Ctor = createCtor(func); 38146 38147 function wrapper() { 38148 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 38149 return fn.apply(isBind ? thisArg : this, arguments); 38150 } 38151 return wrapper; 38152 } 38153 38154 /** 38155 * Creates a function like `_.lowerFirst`. 38156 * 38157 * @private 38158 * @param {string} methodName The name of the `String` case method to use. 38159 * @returns {Function} Returns the new case function. 38160 */ 38161 function createCaseFirst(methodName) { 38162 return function(string) { 38163 string = toString(string); 38164 38165 var strSymbols = hasUnicode(string) 38166 ? stringToArray(string) 38167 : undefined; 38168 38169 var chr = strSymbols 38170 ? strSymbols[0] 38171 : string.charAt(0); 38172 38173 var trailing = strSymbols 38174 ? castSlice(strSymbols, 1).join('') 38175 : string.slice(1); 38176 38177 return chr[methodName]() + trailing; 38178 }; 38179 } 38180 38181 /** 38182 * Creates a function like `_.camelCase`. 38183 * 38184 * @private 38185 * @param {Function} callback The function to combine each word. 38186 * @returns {Function} Returns the new compounder function. 38187 */ 38188 function createCompounder(callback) { 38189 return function(string) { 38190 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); 38191 }; 38192 } 38193 38194 /** 38195 * Creates a function that produces an instance of `Ctor` regardless of 38196 * whether it was invoked as part of a `new` expression or by `call` or `apply`. 38197 * 38198 * @private 38199 * @param {Function} Ctor The constructor to wrap. 38200 * @returns {Function} Returns the new wrapped function. 38201 */ 38202 function createCtor(Ctor) { 38203 return function() { 38204 // Use a `switch` statement to work with class constructors. See 38205 // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist 38206 // for more details. 38207 var args = arguments; 38208 switch (args.length) { 38209 case 0: return new Ctor; 38210 case 1: return new Ctor(args[0]); 38211 case 2: return new Ctor(args[0], args[1]); 38212 case 3: return new Ctor(args[0], args[1], args[2]); 38213 case 4: return new Ctor(args[0], args[1], args[2], args[3]); 38214 case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); 38215 case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); 38216 case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); 38217 } 38218 var thisBinding = baseCreate(Ctor.prototype), 38219 result = Ctor.apply(thisBinding, args); 38220 38221 // Mimic the constructor's `return` behavior. 38222 // See https://es5.github.io/#x13.2.2 for more details. 38223 return isObject(result) ? result : thisBinding; 38224 }; 38225 } 38226 38227 /** 38228 * Creates a function that wraps `func` to enable currying. 38229 * 38230 * @private 38231 * @param {Function} func The function to wrap. 38232 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 38233 * @param {number} arity The arity of `func`. 38234 * @returns {Function} Returns the new wrapped function. 38235 */ 38236 function createCurry(func, bitmask, arity) { 38237 var Ctor = createCtor(func); 38238 38239 function wrapper() { 38240 var length = arguments.length, 38241 args = Array(length), 38242 index = length, 38243 placeholder = getHolder(wrapper); 38244 38245 while (index--) { 38246 args[index] = arguments[index]; 38247 } 38248 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) 38249 ? [] 38250 : replaceHolders(args, placeholder); 38251 38252 length -= holders.length; 38253 if (length < arity) { 38254 return createRecurry( 38255 func, bitmask, createHybrid, wrapper.placeholder, undefined, 38256 args, holders, undefined, undefined, arity - length); 38257 } 38258 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 38259 return apply(fn, this, args); 38260 } 38261 return wrapper; 38262 } 38263 38264 /** 38265 * Creates a `_.find` or `_.findLast` function. 38266 * 38267 * @private 38268 * @param {Function} findIndexFunc The function to find the collection index. 38269 * @returns {Function} Returns the new find function. 38270 */ 38271 function createFind(findIndexFunc) { 38272 return function(collection, predicate, fromIndex) { 38273 var iterable = Object(collection); 38274 if (!isArrayLike(collection)) { 38275 var iteratee = getIteratee(predicate, 3); 38276 collection = keys(collection); 38277 predicate = function(key) { return iteratee(iterable[key], key, iterable); }; 38278 } 38279 var index = findIndexFunc(collection, predicate, fromIndex); 38280 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; 38281 }; 38282 } 38283 38284 /** 38285 * Creates a `_.flow` or `_.flowRight` function. 38286 * 38287 * @private 38288 * @param {boolean} [fromRight] Specify iterating from right to left. 38289 * @returns {Function} Returns the new flow function. 38290 */ 38291 function createFlow(fromRight) { 38292 return flatRest(function(funcs) { 38293 var length = funcs.length, 38294 index = length, 38295 prereq = LodashWrapper.prototype.thru; 38296 38297 if (fromRight) { 38298 funcs.reverse(); 38299 } 38300 while (index--) { 38301 var func = funcs[index]; 38302 if (typeof func != 'function') { 38303 throw new TypeError(FUNC_ERROR_TEXT); 38304 } 38305 if (prereq && !wrapper && getFuncName(func) == 'wrapper') { 38306 var wrapper = new LodashWrapper([], true); 38307 } 38308 } 38309 index = wrapper ? index : length; 38310 while (++index < length) { 38311 func = funcs[index]; 38312 38313 var funcName = getFuncName(func), 38314 data = funcName == 'wrapper' ? getData(func) : undefined; 38315 38316 if (data && isLaziable(data[0]) && 38317 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && 38318 !data[4].length && data[9] == 1 38319 ) { 38320 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); 38321 } else { 38322 wrapper = (func.length == 1 && isLaziable(func)) 38323 ? wrapper[funcName]() 38324 : wrapper.thru(func); 38325 } 38326 } 38327 return function() { 38328 var args = arguments, 38329 value = args[0]; 38330 38331 if (wrapper && args.length == 1 && isArray(value)) { 38332 return wrapper.plant(value).value(); 38333 } 38334 var index = 0, 38335 result = length ? funcs[index].apply(this, args) : value; 38336 38337 while (++index < length) { 38338 result = funcs[index].call(this, result); 38339 } 38340 return result; 38341 }; 38342 }); 38343 } 38344 38345 /** 38346 * Creates a function that wraps `func` to invoke it with optional `this` 38347 * binding of `thisArg`, partial application, and currying. 38348 * 38349 * @private 38350 * @param {Function|string} func The function or method name to wrap. 38351 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 38352 * @param {*} [thisArg] The `this` binding of `func`. 38353 * @param {Array} [partials] The arguments to prepend to those provided to 38354 * the new function. 38355 * @param {Array} [holders] The `partials` placeholder indexes. 38356 * @param {Array} [partialsRight] The arguments to append to those provided 38357 * to the new function. 38358 * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. 38359 * @param {Array} [argPos] The argument positions of the new function. 38360 * @param {number} [ary] The arity cap of `func`. 38361 * @param {number} [arity] The arity of `func`. 38362 * @returns {Function} Returns the new wrapped function. 38363 */ 38364 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { 38365 var isAry = bitmask & WRAP_ARY_FLAG, 38366 isBind = bitmask & WRAP_BIND_FLAG, 38367 isBindKey = bitmask & WRAP_BIND_KEY_FLAG, 38368 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), 38369 isFlip = bitmask & WRAP_FLIP_FLAG, 38370 Ctor = isBindKey ? undefined : createCtor(func); 38371 38372 function wrapper() { 38373 var length = arguments.length, 38374 args = Array(length), 38375 index = length; 38376 38377 while (index--) { 38378 args[index] = arguments[index]; 38379 } 38380 if (isCurried) { 38381 var placeholder = getHolder(wrapper), 38382 holdersCount = countHolders(args, placeholder); 38383 } 38384 if (partials) { 38385 args = composeArgs(args, partials, holders, isCurried); 38386 } 38387 if (partialsRight) { 38388 args = composeArgsRight(args, partialsRight, holdersRight, isCurried); 38389 } 38390 length -= holdersCount; 38391 if (isCurried && length < arity) { 38392 var newHolders = replaceHolders(args, placeholder); 38393 return createRecurry( 38394 func, bitmask, createHybrid, wrapper.placeholder, thisArg, 38395 args, newHolders, argPos, ary, arity - length 38396 ); 38397 } 38398 var thisBinding = isBind ? thisArg : this, 38399 fn = isBindKey ? thisBinding[func] : func; 38400 38401 length = args.length; 38402 if (argPos) { 38403 args = reorder(args, argPos); 38404 } else if (isFlip && length > 1) { 38405 args.reverse(); 38406 } 38407 if (isAry && ary < length) { 38408 args.length = ary; 38409 } 38410 if (this && this !== root && this instanceof wrapper) { 38411 fn = Ctor || createCtor(fn); 38412 } 38413 return fn.apply(thisBinding, args); 38414 } 38415 return wrapper; 38416 } 38417 38418 /** 38419 * Creates a function like `_.invertBy`. 38420 * 38421 * @private 38422 * @param {Function} setter The function to set accumulator values. 38423 * @param {Function} toIteratee The function to resolve iteratees. 38424 * @returns {Function} Returns the new inverter function. 38425 */ 38426 function createInverter(setter, toIteratee) { 38427 return function(object, iteratee) { 38428 return baseInverter(object, setter, toIteratee(iteratee), {}); 38429 }; 38430 } 38431 38432 /** 38433 * Creates a function that performs a mathematical operation on two values. 38434 * 38435 * @private 38436 * @param {Function} operator The function to perform the operation. 38437 * @param {number} [defaultValue] The value used for `undefined` arguments. 38438 * @returns {Function} Returns the new mathematical operation function. 38439 */ 38440 function createMathOperation(operator, defaultValue) { 38441 return function(value, other) { 38442 var result; 38443 if (value === undefined && other === undefined) { 38444 return defaultValue; 38445 } 38446 if (value !== undefined) { 38447 result = value; 38448 } 38449 if (other !== undefined) { 38450 if (result === undefined) { 38451 return other; 38452 } 38453 if (typeof value == 'string' || typeof other == 'string') { 38454 value = baseToString(value); 38455 other = baseToString(other); 38456 } else { 38457 value = baseToNumber(value); 38458 other = baseToNumber(other); 38459 } 38460 result = operator(value, other); 38461 } 38462 return result; 38463 }; 38464 } 38465 38466 /** 38467 * Creates a function like `_.over`. 38468 * 38469 * @private 38470 * @param {Function} arrayFunc The function to iterate over iteratees. 38471 * @returns {Function} Returns the new over function. 38472 */ 38473 function createOver(arrayFunc) { 38474 return flatRest(function(iteratees) { 38475 iteratees = arrayMap(iteratees, baseUnary(getIteratee())); 38476 return baseRest(function(args) { 38477 var thisArg = this; 38478 return arrayFunc(iteratees, function(iteratee) { 38479 return apply(iteratee, thisArg, args); 38480 }); 38481 }); 38482 }); 38483 } 38484 38485 /** 38486 * Creates the padding for `string` based on `length`. The `chars` string 38487 * is truncated if the number of characters exceeds `length`. 38488 * 38489 * @private 38490 * @param {number} length The padding length. 38491 * @param {string} [chars=' '] The string used as padding. 38492 * @returns {string} Returns the padding for `string`. 38493 */ 38494 function createPadding(length, chars) { 38495 chars = chars === undefined ? ' ' : baseToString(chars); 38496 38497 var charsLength = chars.length; 38498 if (charsLength < 2) { 38499 return charsLength ? baseRepeat(chars, length) : chars; 38500 } 38501 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); 38502 return hasUnicode(chars) 38503 ? castSlice(stringToArray(result), 0, length).join('') 38504 : result.slice(0, length); 38505 } 38506 38507 /** 38508 * Creates a function that wraps `func` to invoke it with the `this` binding 38509 * of `thisArg` and `partials` prepended to the arguments it receives. 38510 * 38511 * @private 38512 * @param {Function} func The function to wrap. 38513 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 38514 * @param {*} thisArg The `this` binding of `func`. 38515 * @param {Array} partials The arguments to prepend to those provided to 38516 * the new function. 38517 * @returns {Function} Returns the new wrapped function. 38518 */ 38519 function createPartial(func, bitmask, thisArg, partials) { 38520 var isBind = bitmask & WRAP_BIND_FLAG, 38521 Ctor = createCtor(func); 38522 38523 function wrapper() { 38524 var argsIndex = -1, 38525 argsLength = arguments.length, 38526 leftIndex = -1, 38527 leftLength = partials.length, 38528 args = Array(leftLength + argsLength), 38529 fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; 38530 38531 while (++leftIndex < leftLength) { 38532 args[leftIndex] = partials[leftIndex]; 38533 } 38534 while (argsLength--) { 38535 args[leftIndex++] = arguments[++argsIndex]; 38536 } 38537 return apply(fn, isBind ? thisArg : this, args); 38538 } 38539 return wrapper; 38540 } 38541 38542 /** 38543 * Creates a `_.range` or `_.rangeRight` function. 38544 * 38545 * @private 38546 * @param {boolean} [fromRight] Specify iterating from right to left. 38547 * @returns {Function} Returns the new range function. 38548 */ 38549 function createRange(fromRight) { 38550 return function(start, end, step) { 38551 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { 38552 end = step = undefined; 38553 } 38554 // Ensure the sign of `-0` is preserved. 38555 start = toFinite(start); 38556 if (end === undefined) { 38557 end = start; 38558 start = 0; 38559 } else { 38560 end = toFinite(end); 38561 } 38562 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); 38563 return baseRange(start, end, step, fromRight); 38564 }; 38565 } 38566 38567 /** 38568 * Creates a function that performs a relational operation on two values. 38569 * 38570 * @private 38571 * @param {Function} operator The function to perform the operation. 38572 * @returns {Function} Returns the new relational operation function. 38573 */ 38574 function createRelationalOperation(operator) { 38575 return function(value, other) { 38576 if (!(typeof value == 'string' && typeof other == 'string')) { 38577 value = toNumber(value); 38578 other = toNumber(other); 38579 } 38580 return operator(value, other); 38581 }; 38582 } 38583 38584 /** 38585 * Creates a function that wraps `func` to continue currying. 38586 * 38587 * @private 38588 * @param {Function} func The function to wrap. 38589 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 38590 * @param {Function} wrapFunc The function to create the `func` wrapper. 38591 * @param {*} placeholder The placeholder value. 38592 * @param {*} [thisArg] The `this` binding of `func`. 38593 * @param {Array} [partials] The arguments to prepend to those provided to 38594 * the new function. 38595 * @param {Array} [holders] The `partials` placeholder indexes. 38596 * @param {Array} [argPos] The argument positions of the new function. 38597 * @param {number} [ary] The arity cap of `func`. 38598 * @param {number} [arity] The arity of `func`. 38599 * @returns {Function} Returns the new wrapped function. 38600 */ 38601 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { 38602 var isCurry = bitmask & WRAP_CURRY_FLAG, 38603 newHolders = isCurry ? holders : undefined, 38604 newHoldersRight = isCurry ? undefined : holders, 38605 newPartials = isCurry ? partials : undefined, 38606 newPartialsRight = isCurry ? undefined : partials; 38607 38608 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); 38609 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); 38610 38611 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { 38612 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); 38613 } 38614 var newData = [ 38615 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, 38616 newHoldersRight, argPos, ary, arity 38617 ]; 38618 38619 var result = wrapFunc.apply(undefined, newData); 38620 if (isLaziable(func)) { 38621 setData(result, newData); 38622 } 38623 result.placeholder = placeholder; 38624 return setWrapToString(result, func, bitmask); 38625 } 38626 38627 /** 38628 * Creates a function like `_.round`. 38629 * 38630 * @private 38631 * @param {string} methodName The name of the `Math` method to use when rounding. 38632 * @returns {Function} Returns the new round function. 38633 */ 38634 function createRound(methodName) { 38635 var func = Math[methodName]; 38636 return function(number, precision) { 38637 number = toNumber(number); 38638 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); 38639 if (precision && nativeIsFinite(number)) { 38640 // Shift with exponential notation to avoid floating-point issues. 38641 // See [MDN](https://mdn.io/round#Examples) for more details. 38642 var pair = (toString(number) + 'e').split('e'), 38643 value = func(pair[0] + 'e' + (+pair[1] + precision)); 38644 38645 pair = (toString(value) + 'e').split('e'); 38646 return +(pair[0] + 'e' + (+pair[1] - precision)); 38647 } 38648 return func(number); 38649 }; 38650 } 38651 38652 /** 38653 * Creates a set object of `values`. 38654 * 38655 * @private 38656 * @param {Array} values The values to add to the set. 38657 * @returns {Object} Returns the new set. 38658 */ 38659 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { 38660 return new Set(values); 38661 }; 38662 38663 /** 38664 * Creates a `_.toPairs` or `_.toPairsIn` function. 38665 * 38666 * @private 38667 * @param {Function} keysFunc The function to get the keys of a given object. 38668 * @returns {Function} Returns the new pairs function. 38669 */ 38670 function createToPairs(keysFunc) { 38671 return function(object) { 38672 var tag = getTag(object); 38673 if (tag == mapTag) { 38674 return mapToArray(object); 38675 } 38676 if (tag == setTag) { 38677 return setToPairs(object); 38678 } 38679 return baseToPairs(object, keysFunc(object)); 38680 }; 38681 } 38682 38683 /** 38684 * Creates a function that either curries or invokes `func` with optional 38685 * `this` binding and partially applied arguments. 38686 * 38687 * @private 38688 * @param {Function|string} func The function or method name to wrap. 38689 * @param {number} bitmask The bitmask flags. 38690 * 1 - `_.bind` 38691 * 2 - `_.bindKey` 38692 * 4 - `_.curry` or `_.curryRight` of a bound function 38693 * 8 - `_.curry` 38694 * 16 - `_.curryRight` 38695 * 32 - `_.partial` 38696 * 64 - `_.partialRight` 38697 * 128 - `_.rearg` 38698 * 256 - `_.ary` 38699 * 512 - `_.flip` 38700 * @param {*} [thisArg] The `this` binding of `func`. 38701 * @param {Array} [partials] The arguments to be partially applied. 38702 * @param {Array} [holders] The `partials` placeholder indexes. 38703 * @param {Array} [argPos] The argument positions of the new function. 38704 * @param {number} [ary] The arity cap of `func`. 38705 * @param {number} [arity] The arity of `func`. 38706 * @returns {Function} Returns the new wrapped function. 38707 */ 38708 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { 38709 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; 38710 if (!isBindKey && typeof func != 'function') { 38711 throw new TypeError(FUNC_ERROR_TEXT); 38712 } 38713 var length = partials ? partials.length : 0; 38714 if (!length) { 38715 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); 38716 partials = holders = undefined; 38717 } 38718 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); 38719 arity = arity === undefined ? arity : toInteger(arity); 38720 length -= holders ? holders.length : 0; 38721 38722 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { 38723 var partialsRight = partials, 38724 holdersRight = holders; 38725 38726 partials = holders = undefined; 38727 } 38728 var data = isBindKey ? undefined : getData(func); 38729 38730 var newData = [ 38731 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, 38732 argPos, ary, arity 38733 ]; 38734 38735 if (data) { 38736 mergeData(newData, data); 38737 } 38738 func = newData[0]; 38739 bitmask = newData[1]; 38740 thisArg = newData[2]; 38741 partials = newData[3]; 38742 holders = newData[4]; 38743 arity = newData[9] = newData[9] === undefined 38744 ? (isBindKey ? 0 : func.length) 38745 : nativeMax(newData[9] - length, 0); 38746 38747 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { 38748 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); 38749 } 38750 if (!bitmask || bitmask == WRAP_BIND_FLAG) { 38751 var result = createBind(func, bitmask, thisArg); 38752 } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { 38753 result = createCurry(func, bitmask, arity); 38754 } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { 38755 result = createPartial(func, bitmask, thisArg, partials); 38756 } else { 38757 result = createHybrid.apply(undefined, newData); 38758 } 38759 var setter = data ? baseSetData : setData; 38760 return setWrapToString(setter(result, newData), func, bitmask); 38761 } 38762 38763 /** 38764 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties 38765 * of source objects to the destination object for all destination properties 38766 * that resolve to `undefined`. 38767 * 38768 * @private 38769 * @param {*} objValue The destination value. 38770 * @param {*} srcValue The source value. 38771 * @param {string} key The key of the property to assign. 38772 * @param {Object} object The parent object of `objValue`. 38773 * @returns {*} Returns the value to assign. 38774 */ 38775 function customDefaultsAssignIn(objValue, srcValue, key, object) { 38776 if (objValue === undefined || 38777 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { 38778 return srcValue; 38779 } 38780 return objValue; 38781 } 38782 38783 /** 38784 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source 38785 * objects into destination objects that are passed thru. 38786 * 38787 * @private 38788 * @param {*} objValue The destination value. 38789 * @param {*} srcValue The source value. 38790 * @param {string} key The key of the property to merge. 38791 * @param {Object} object The parent object of `objValue`. 38792 * @param {Object} source The parent object of `srcValue`. 38793 * @param {Object} [stack] Tracks traversed source values and their merged 38794 * counterparts. 38795 * @returns {*} Returns the value to assign. 38796 */ 38797 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { 38798 if (isObject(objValue) && isObject(srcValue)) { 38799 // Recursively merge objects and arrays (susceptible to call stack limits). 38800 stack.set(srcValue, objValue); 38801 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); 38802 stack['delete'](srcValue); 38803 } 38804 return objValue; 38805 } 38806 38807 /** 38808 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain 38809 * objects. 38810 * 38811 * @private 38812 * @param {*} value The value to inspect. 38813 * @param {string} key The key of the property to inspect. 38814 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. 38815 */ 38816 function customOmitClone(value) { 38817 return isPlainObject(value) ? undefined : value; 38818 } 38819 38820 /** 38821 * A specialized version of `baseIsEqualDeep` for arrays with support for 38822 * partial deep comparisons. 38823 * 38824 * @private 38825 * @param {Array} array The array to compare. 38826 * @param {Array} other The other array to compare. 38827 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 38828 * @param {Function} customizer The function to customize comparisons. 38829 * @param {Function} equalFunc The function to determine equivalents of values. 38830 * @param {Object} stack Tracks traversed `array` and `other` objects. 38831 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. 38832 */ 38833 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { 38834 var isPartial = bitmask & COMPARE_PARTIAL_FLAG, 38835 arrLength = array.length, 38836 othLength = other.length; 38837 38838 if (arrLength != othLength && !(isPartial && othLength > arrLength)) { 38839 return false;
vendor: 1,304 bytes, lines 38840-38878
38840 } 38841 // Assume cyclic values are equal. 38842 var stacked = stack.get(array); 38843 if (stacked && stack.get(other)) { 38844 return stacked == other; 38845 } 38846 var index = -1, 38847 result = true, 38848 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; 38849 38850 stack.set(array, other); 38851 stack.set(other, array); 38852 38853 // Ignore non-index properties. 38854 while (++index < arrLength) { 38855 var arrValue = array[index], 38856 othValue = other[index]; 38857 38858 if (customizer) { 38859 var compared = isPartial 38860 ? customizer(othValue, arrValue, index, other, array, stack) 38861 : customizer(arrValue, othValue, index, array, other, stack); 38862 } 38863 if (compared !== undefined) { 38864 if (compared) { 38865 continue; 38866 } 38867 result = false; 38868 break; 38869 } 38870 // Recursively compare arrays (susceptible to call stack limits). 38871 if (seen) { 38872 if (!arraySome(other, function(othValue, othIndex) { 38873 if (!cacheHas(seen, othIndex) && 38874 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { 38875 return seen.push(othIndex); 38876 } 38877 })) { 38878 result = false;
vendor: 4,179 bytes, lines 38879-38990
38879 break; 38880 } 38881 } else if (!( 38882 arrValue === othValue || 38883 equalFunc(arrValue, othValue, bitmask, customizer, stack) 38884 )) { 38885 result = false; 38886 break; 38887 } 38888 } 38889 stack['delete'](array); 38890 stack['delete'](other); 38891 return result; 38892 } 38893 38894 /** 38895 * A specialized version of `baseIsEqualDeep` for comparing objects of 38896 * the same `toStringTag`. 38897 * 38898 * **Note:** This function only supports comparing values with tags of 38899 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. 38900 * 38901 * @private 38902 * @param {Object} object The object to compare. 38903 * @param {Object} other The other object to compare. 38904 * @param {string} tag The `toStringTag` of the objects to compare. 38905 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 38906 * @param {Function} customizer The function to customize comparisons. 38907 * @param {Function} equalFunc The function to determine equivalents of values. 38908 * @param {Object} stack Tracks traversed `object` and `other` objects. 38909 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 38910 */ 38911 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { 38912 switch (tag) { 38913 case dataViewTag: 38914 if ((object.byteLength != other.byteLength) || 38915 (object.byteOffset != other.byteOffset)) { 38916 return false; 38917 } 38918 object = object.buffer; 38919 other = other.buffer; 38920 38921 case arrayBufferTag: 38922 if ((object.byteLength != other.byteLength) || 38923 !equalFunc(new Uint8Array(object), new Uint8Array(other))) { 38924 return false; 38925 } 38926 return true; 38927 38928 case boolTag: 38929 case dateTag: 38930 case numberTag: 38931 // Coerce booleans to `1` or `0` and dates to milliseconds. 38932 // Invalid dates are coerced to `NaN`. 38933 return eq(+object, +other); 38934 38935 case errorTag: 38936 return object.name == other.name && object.message == other.message; 38937 38938 case regexpTag: 38939 case stringTag: 38940 // Coerce regexes to strings and treat strings, primitives and objects, 38941 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring 38942 // for more details. 38943 return object == (other + ''); 38944 38945 case mapTag: 38946 var convert = mapToArray; 38947 38948 case setTag: 38949 var isPartial = bitmask & COMPARE_PARTIAL_FLAG; 38950 convert || (convert = setToArray); 38951 38952 if (object.size != other.size && !isPartial) { 38953 return false; 38954 } 38955 // Assume cyclic values are equal. 38956 var stacked = stack.get(object); 38957 if (stacked) { 38958 return stacked == other; 38959 } 38960 bitmask |= COMPARE_UNORDERED_FLAG; 38961 38962 // Recursively compare objects (susceptible to call stack limits). 38963 stack.set(object, other); 38964 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); 38965 stack['delete'](object); 38966 return result; 38967 38968 case symbolTag: 38969 if (symbolValueOf) { 38970 return symbolValueOf.call(object) == symbolValueOf.call(other); 38971 } 38972 } 38973 return false; 38974 } 38975 38976 /** 38977 * A specialized version of `baseIsEqualDeep` for objects with support for 38978 * partial deep comparisons. 38979 * 38980 * @private 38981 * @param {Object} object The object to compare. 38982 * @param {Object} other The other object to compare. 38983 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. 38984 * @param {Function} customizer The function to customize comparisons. 38985 * @param {Function} equalFunc The function to determine equivalents of values. 38986 * @param {Object} stack Tracks traversed `object` and `other` objects. 38987 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. 38988 */ 38989 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { 38990 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
vendor: 1,367 bytes, lines 38991-39031
38991 objProps = getAllKeys(object), 38992 objLength = objProps.length, 38993 othProps = getAllKeys(other), 38994 othLength = othProps.length; 38995 38996 if (objLength != othLength && !isPartial) { 38997 return false; 38998 } 38999 var index = objLength; 39000 while (index--) { 39001 var key = objProps[index]; 39002 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { 39003 return false; 39004 } 39005 } 39006 // Assume cyclic values are equal. 39007 var stacked = stack.get(object); 39008 if (stacked && stack.get(other)) { 39009 return stacked == other; 39010 } 39011 var result = true; 39012 stack.set(object, other); 39013 stack.set(other, object); 39014 39015 var skipCtor = isPartial; 39016 while (++index < objLength) { 39017 key = objProps[index]; 39018 var objValue = object[key], 39019 othValue = other[key]; 39020 39021 if (customizer) { 39022 var compared = isPartial 39023 ? customizer(othValue, objValue, key, other, object, stack) 39024 : customizer(objValue, othValue, key, object, other, stack); 39025 } 39026 // Recursively compare objects (susceptible to call stack limits). 39027 if (!(compared === undefined 39028 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) 39029 : compared 39030 )) { 39031 result = false;
vendor: 8,175 bytes, lines 39032-39297
39032 break; 39033 } 39034 skipCtor || (skipCtor = key == 'constructor'); 39035 } 39036 if (result && !skipCtor) { 39037 var objCtor = object.constructor, 39038 othCtor = other.constructor; 39039 39040 // Non `Object` object instances with different constructors are not equal. 39041 if (objCtor != othCtor && 39042 ('constructor' in object && 'constructor' in other) && 39043 !(typeof objCtor == 'function' && objCtor instanceof objCtor && 39044 typeof othCtor == 'function' && othCtor instanceof othCtor)) { 39045 result = false; 39046 } 39047 } 39048 stack['delete'](object); 39049 stack['delete'](other); 39050 return result; 39051 } 39052 39053 /** 39054 * A specialized version of `baseRest` which flattens the rest array. 39055 * 39056 * @private 39057 * @param {Function} func The function to apply a rest parameter to. 39058 * @returns {Function} Returns the new function. 39059 */ 39060 function flatRest(func) { 39061 return setToString(overRest(func, undefined, flatten), func + ''); 39062 } 39063 39064 /** 39065 * Creates an array of own enumerable property names and symbols of `object`. 39066 * 39067 * @private 39068 * @param {Object} object The object to query. 39069 * @returns {Array} Returns the array of property names and symbols. 39070 */ 39071 function getAllKeys(object) { 39072 return baseGetAllKeys(object, keys, getSymbols); 39073 } 39074 39075 /** 39076 * Creates an array of own and inherited enumerable property names and 39077 * symbols of `object`. 39078 * 39079 * @private 39080 * @param {Object} object The object to query. 39081 * @returns {Array} Returns the array of property names and symbols. 39082 */ 39083 function getAllKeysIn(object) { 39084 return baseGetAllKeys(object, keysIn, getSymbolsIn); 39085 } 39086 39087 /** 39088 * Gets metadata for `func`. 39089 * 39090 * @private 39091 * @param {Function} func The function to query. 39092 * @returns {*} Returns the metadata for `func`. 39093 */ 39094 var getData = !metaMap ? noop : function(func) { 39095 return metaMap.get(func); 39096 }; 39097 39098 /** 39099 * Gets the name of `func`. 39100 * 39101 * @private 39102 * @param {Function} func The function to query. 39103 * @returns {string} Returns the function name. 39104 */ 39105 function getFuncName(func) { 39106 var result = (func.name + ''), 39107 array = realNames[result], 39108 length = hasOwnProperty.call(realNames, result) ? array.length : 0; 39109 39110 while (length--) { 39111 var data = array[length], 39112 otherFunc = data.func; 39113 if (otherFunc == null || otherFunc == func) { 39114 return data.name; 39115 } 39116 } 39117 return result; 39118 } 39119 39120 /** 39121 * Gets the argument placeholder value for `func`. 39122 * 39123 * @private 39124 * @param {Function} func The function to inspect. 39125 * @returns {*} Returns the placeholder value. 39126 */ 39127 function getHolder(func) { 39128 var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; 39129 return object.placeholder; 39130 } 39131 39132 /** 39133 * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, 39134 * this function returns the custom method, otherwise it returns `baseIteratee`. 39135 * If arguments are provided, the chosen function is invoked with them and 39136 * its result is returned. 39137 * 39138 * @private 39139 * @param {*} [value] The value to convert to an iteratee. 39140 * @param {number} [arity] The arity of the created iteratee. 39141 * @returns {Function} Returns the chosen function or its result. 39142 */ 39143 function getIteratee() { 39144 var result = lodash.iteratee || iteratee; 39145 result = result === iteratee ? baseIteratee : result; 39146 return arguments.length ? result(arguments[0], arguments[1]) : result; 39147 } 39148 39149 /** 39150 * Gets the data for `map`. 39151 * 39152 * @private 39153 * @param {Object} map The map to query. 39154 * @param {string} key The reference key. 39155 * @returns {*} Returns the map data. 39156 */ 39157 function getMapData(map, key) { 39158 var data = map.__data__; 39159 return isKeyable(key) 39160 ? data[typeof key == 'string' ? 'string' : 'hash'] 39161 : data.map; 39162 } 39163 39164 /** 39165 * Gets the property names, values, and compare flags of `object`. 39166 * 39167 * @private 39168 * @param {Object} object The object to query. 39169 * @returns {Array} Returns the match data of `object`. 39170 */ 39171 function getMatchData(object) { 39172 var result = keys(object), 39173 length = result.length; 39174 39175 while (length--) { 39176 var key = result[length], 39177 value = object[key]; 39178 39179 result[length] = [key, value, isStrictComparable(value)]; 39180 } 39181 return result; 39182 } 39183 39184 /** 39185 * Gets the native function at `key` of `object`. 39186 * 39187 * @private 39188 * @param {Object} object The object to query. 39189 * @param {string} key The key of the method to get. 39190 * @returns {*} Returns the function if it's native, else `undefined`. 39191 */ 39192 function getNative(object, key) { 39193 var value = getValue(object, key); 39194 return baseIsNative(value) ? value : undefined; 39195 } 39196 39197 /** 39198 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. 39199 * 39200 * @private 39201 * @param {*} value The value to query. 39202 * @returns {string} Returns the raw `toStringTag`. 39203 */ 39204 function getRawTag(value) { 39205 var isOwn = hasOwnProperty.call(value, symToStringTag), 39206 tag = value[symToStringTag]; 39207 39208 try { 39209 value[symToStringTag] = undefined; 39210 var unmasked = true; 39211 } catch (e) {} 39212 39213 var result = nativeObjectToString.call(value); 39214 if (unmasked) { 39215 if (isOwn) { 39216 value[symToStringTag] = tag; 39217 } else { 39218 delete value[symToStringTag]; 39219 } 39220 } 39221 return result; 39222 } 39223 39224 /** 39225 * Creates an array of the own enumerable symbols of `object`. 39226 * 39227 * @private 39228 * @param {Object} object The object to query. 39229 * @returns {Array} Returns the array of symbols. 39230 */ 39231 var getSymbols = !nativeGetSymbols ? stubArray : function(object) { 39232 if (object == null) { 39233 return []; 39234 } 39235 object = Object(object); 39236 return arrayFilter(nativeGetSymbols(object), function(symbol) { 39237 return propertyIsEnumerable.call(object, symbol); 39238 }); 39239 }; 39240 39241 /** 39242 * Creates an array of the own and inherited enumerable symbols of `object`. 39243 * 39244 * @private 39245 * @param {Object} object The object to query. 39246 * @returns {Array} Returns the array of symbols. 39247 */ 39248 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { 39249 var result = []; 39250 while (object) { 39251 arrayPush(result, getSymbols(object)); 39252 object = getPrototype(object); 39253 } 39254 return result; 39255 }; 39256 39257 /** 39258 * Gets the `toStringTag` of `value`. 39259 * 39260 * @private 39261 * @param {*} value The value to query. 39262 * @returns {string} Returns the `toStringTag`. 39263 */ 39264 var getTag = baseGetTag; 39265 39266 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. 39267 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || 39268 (Map && getTag(new Map) != mapTag) || 39269 (Promise && getTag(Promise.resolve()) != promiseTag) || 39270 (Set && getTag(new Set) != setTag) || 39271 (WeakMap && getTag(new WeakMap) != weakMapTag)) { 39272 getTag = function(value) { 39273 var result = baseGetTag(value), 39274 Ctor = result == objectTag ? value.constructor : undefined, 39275 ctorString = Ctor ? toSource(Ctor) : ''; 39276 39277 if (ctorString) { 39278 switch (ctorString) { 39279 case dataViewCtorString: return dataViewTag; 39280 case mapCtorString: return mapTag; 39281 case promiseCtorString: return promiseTag; 39282 case setCtorString: return setTag; 39283 case weakMapCtorString: return weakMapTag; 39284 } 39285 } 39286 return result; 39287 }; 39288 } 39289 39290 /** 39291 * Gets the view, applying any `transforms` to the `start` and `end` positions. 39292 * 39293 * @private 39294 * @param {number} start The start of the view. 39295 * @param {number} end The end of the view. 39296 * @param {Array} transforms The transformations to apply to the view. 39297 * @returns {Object}
vendor: 6,432 bytes, lines 39297-39502
39297 Returns an object containing the `start` and `end` 39298 * positions of the view. 39299 */ 39300 function getView(start, end, transforms) { 39301 var index = -1, 39302 length = transforms.length; 39303 39304 while (++index < length) { 39305 var data = transforms[index], 39306 size = data.size; 39307 39308 switch (data.type) { 39309 case 'drop': start += size; break; 39310 case 'dropRight': end -= size; break; 39311 case 'take': end = nativeMin(end, start + size); break; 39312 case 'takeRight': start = nativeMax(start, end - size); break; 39313 } 39314 } 39315 return { 'start': start, 'end': end }; 39316 } 39317 39318 /** 39319 * Extracts wrapper details from the `source` body comment. 39320 * 39321 * @private 39322 * @param {string} source The source to inspect. 39323 * @returns {Array} Returns the wrapper details. 39324 */ 39325 function getWrapDetails(source) { 39326 var match = source.match(reWrapDetails); 39327 return match ? match[1].split(reSplitDetails) : []; 39328 } 39329 39330 /** 39331 * Checks if `path` exists on `object`. 39332 * 39333 * @private 39334 * @param {Object} object The object to query. 39335 * @param {Array|string} path The path to check. 39336 * @param {Function} hasFunc The function to check properties. 39337 * @returns {boolean} Returns `true` if `path` exists, else `false`. 39338 */ 39339 function hasPath(object, path, hasFunc) { 39340 path = castPath(path, object); 39341 39342 var index = -1, 39343 length = path.length, 39344 result = false; 39345 39346 while (++index < length) { 39347 var key = toKey(path[index]); 39348 if (!(result = object != null && hasFunc(object, key))) { 39349 break; 39350 } 39351 object = object[key]; 39352 } 39353 if (result || ++index != length) { 39354 return result; 39355 } 39356 length = object == null ? 0 : object.length; 39357 return !!length && isLength(length) && isIndex(key, length) && 39358 (isArray(object) || isArguments(object)); 39359 } 39360 39361 /** 39362 * Initializes an array clone. 39363 * 39364 * @private 39365 * @param {Array} array The array to clone. 39366 * @returns {Array} Returns the initialized clone. 39367 */ 39368 function initCloneArray(array) { 39369 var length = array.length, 39370 result = new array.constructor(length); 39371 39372 // Add properties assigned by `RegExp#exec`. 39373 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { 39374 result.index = array.index; 39375 result.input = array.input; 39376 } 39377 return result; 39378 } 39379 39380 /** 39381 * Initializes an object clone. 39382 * 39383 * @private 39384 * @param {Object} object The object to clone. 39385 * @returns {Object} Returns the initialized clone. 39386 */ 39387 function initCloneObject(object) { 39388 return (typeof object.constructor == 'function' && !isPrototype(object)) 39389 ? baseCreate(getPrototype(object)) 39390 : {}; 39391 } 39392 39393 /** 39394 * Initializes an object clone based on its `toStringTag`. 39395 * 39396 * **Note:** This function only supports cloning values with tags of 39397 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. 39398 * 39399 * @private 39400 * @param {Object} object The object to clone. 39401 * @param {string} tag The `toStringTag` of the object to clone. 39402 * @param {boolean} [isDeep] Specify a deep clone. 39403 * @returns {Object} Returns the initialized clone. 39404 */ 39405 function initCloneByTag(object, tag, isDeep) { 39406 var Ctor = object.constructor; 39407 switch (tag) { 39408 case arrayBufferTag: 39409 return cloneArrayBuffer(object); 39410 39411 case boolTag: 39412 case dateTag: 39413 return new Ctor(+object); 39414 39415 case dataViewTag: 39416 return cloneDataView(object, isDeep); 39417 39418 case float32Tag: case float64Tag: 39419 case int8Tag: case int16Tag: case int32Tag: 39420 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: 39421 return cloneTypedArray(object, isDeep); 39422 39423 case mapTag: 39424 return new Ctor; 39425 39426 case numberTag: 39427 case stringTag: 39428 return new Ctor(object); 39429 39430 case regexpTag: 39431 return cloneRegExp(object); 39432 39433 case setTag: 39434 return new Ctor; 39435 39436 case symbolTag: 39437 return cloneSymbol(object); 39438 } 39439 } 39440 39441 /** 39442 * Inserts wrapper `details` in a comment at the top of the `source` body. 39443 * 39444 * @private 39445 * @param {string} source The source to modify. 39446 * @returns {Array} details The details to insert. 39447 * @returns {string} Returns the modified source. 39448 */ 39449 function insertWrapDetails(source, details) { 39450 var length = details.length; 39451 if (!length) { 39452 return source; 39453 } 39454 var lastIndex = length - 1; 39455 details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; 39456 details = details.join(length > 2 ? ', ' : ' '); 39457 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); 39458 } 39459 39460 /** 39461 * Checks if `value` is a flattenable `arguments` object or array. 39462 * 39463 * @private 39464 * @param {*} value The value to check. 39465 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. 39466 */ 39467 function isFlattenable(value) { 39468 return isArray(value) || isArguments(value) || 39469 !!(spreadableSymbol && value && value[spreadableSymbol]); 39470 } 39471 39472 /** 39473 * Checks if `value` is a valid array-like index. 39474 * 39475 * @private 39476 * @param {*} value The value to check. 39477 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. 39478 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. 39479 */ 39480 function isIndex(value, length) { 39481 var type = typeof value; 39482 length = length == null ? MAX_SAFE_INTEGER : length; 39483 39484 return !!length && 39485 (type == 'number' || 39486 (type != 'symbol' && reIsUint.test(value))) && 39487 (value > -1 && value % 1 == 0 && value < length); 39488 } 39489 39490 /** 39491 * Checks if the given arguments are from an iteratee call. 39492 * 39493 * @private 39494 * @param {*} value The potential iteratee value argument. 39495 * @param {*} index The potential iteratee index or key argument. 39496 * @param {*} object The potential iteratee object argument. 39497 * @returns {boolean} Returns `true` if the arguments are from an iteratee call, 39498 * else `false`. 39499 */ 39500 function isIterateeCall(value, index, object) { 39501 if (!isObject(object)) { 39502 return false;
vendor: 14,387 bytes, lines 39503-39949
39503 } 39504 var type = typeof index; 39505 if (type == 'number' 39506 ? (isArrayLike(object) && isIndex(index, object.length)) 39507 : (type == 'string' && index in object) 39508 ) { 39509 return eq(object[index], value); 39510 } 39511 return false; 39512 } 39513 39514 /** 39515 * Checks if `value` is a property name and not a property path. 39516 * 39517 * @private 39518 * @param {*} value The value to check. 39519 * @param {Object} [object] The object to query keys on. 39520 * @returns {boolean} Returns `true` if `value` is a property name, else `false`. 39521 */ 39522 function isKey(value, object) { 39523 if (isArray(value)) { 39524 return false; 39525 } 39526 var type = typeof value; 39527 if (type == 'number' || type == 'symbol' || type == 'boolean' || 39528 value == null || isSymbol(value)) { 39529 return true; 39530 } 39531 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || 39532 (object != null && value in Object(object)); 39533 } 39534 39535 /** 39536 * Checks if `value` is suitable for use as unique object key. 39537 * 39538 * @private 39539 * @param {*} value The value to check. 39540 * @returns {boolean} Returns `true` if `value` is suitable, else `false`. 39541 */ 39542 function isKeyable(value) { 39543 var type = typeof value; 39544 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') 39545 ? (value !== '__proto__') 39546 : (value === null); 39547 } 39548 39549 /** 39550 * Checks if `func` has a lazy counterpart. 39551 * 39552 * @private 39553 * @param {Function} func The function to check. 39554 * @returns {boolean} Returns `true` if `func` has a lazy counterpart, 39555 * else `false`. 39556 */ 39557 function isLaziable(func) { 39558 var funcName = getFuncName(func), 39559 other = lodash[funcName]; 39560 39561 if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { 39562 return false; 39563 } 39564 if (func === other) { 39565 return true; 39566 } 39567 var data = getData(other); 39568 return !!data && func === data[0]; 39569 } 39570 39571 /** 39572 * Checks if `func` has its source masked. 39573 * 39574 * @private 39575 * @param {Function} func The function to check. 39576 * @returns {boolean} Returns `true` if `func` is masked, else `false`. 39577 */ 39578 function isMasked(func) { 39579 return !!maskSrcKey && (maskSrcKey in func); 39580 } 39581 39582 /** 39583 * Checks if `func` is capable of being masked. 39584 * 39585 * @private 39586 * @param {*} value The value to check. 39587 * @returns {boolean} Returns `true` if `func` is maskable, else `false`. 39588 */ 39589 var isMaskable = coreJsData ? isFunction : stubFalse; 39590 39591 /** 39592 * Checks if `value` is likely a prototype object. 39593 * 39594 * @private 39595 * @param {*} value The value to check. 39596 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. 39597 */ 39598 function isPrototype(value) { 39599 var Ctor = value && value.constructor, 39600 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; 39601 39602 return value === proto; 39603 } 39604 39605 /** 39606 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. 39607 * 39608 * @private 39609 * @param {*} value The value to check. 39610 * @returns {boolean} Returns `true` if `value` if suitable for strict 39611 * equality comparisons, else `false`. 39612 */ 39613 function isStrictComparable(value) { 39614 return value === value && !isObject(value); 39615 } 39616 39617 /** 39618 * A specialized version of `matchesProperty` for source values suitable 39619 * for strict equality comparisons, i.e. `===`. 39620 * 39621 * @private 39622 * @param {string} key The key of the property to get. 39623 * @param {*} srcValue The value to match. 39624 * @returns {Function} Returns the new spec function. 39625 */ 39626 function matchesStrictComparable(key, srcValue) { 39627 return function(object) { 39628 if (object == null) { 39629 return false; 39630 } 39631 return object[key] === srcValue && 39632 (srcValue !== undefined || (key in Object(object))); 39633 }; 39634 } 39635 39636 /** 39637 * A specialized version of `_.memoize` which clears the memoized function's 39638 * cache when it exceeds `MAX_MEMOIZE_SIZE`. 39639 * 39640 * @private 39641 * @param {Function} func The function to have its output memoized. 39642 * @returns {Function} Returns the new memoized function. 39643 */ 39644 function memoizeCapped(func) { 39645 var result = memoize(func, function(key) { 39646 if (cache.size === MAX_MEMOIZE_SIZE) { 39647 cache.clear(); 39648 } 39649 return key; 39650 }); 39651 39652 var cache = result.cache; 39653 return result; 39654 } 39655 39656 /** 39657 * Merges the function metadata of `source` into `data`. 39658 * 39659 * Merging metadata reduces the number of wrappers used to invoke a function. 39660 * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` 39661 * may be applied regardless of execution order. Methods like `_.ary` and 39662 * `_.rearg` modify function arguments, making the order in which they are 39663 * executed important, preventing the merging of metadata. However, we make 39664 * an exception for a safe combined case where curried functions have `_.ary` 39665 * and or `_.rearg` applied. 39666 * 39667 * @private 39668 * @param {Array} data The destination metadata. 39669 * @param {Array} source The source metadata. 39670 * @returns {Array} Returns `data`. 39671 */ 39672 function mergeData(data, source) { 39673 var bitmask = data[1], 39674 srcBitmask = source[1], 39675 newBitmask = bitmask | srcBitmask, 39676 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); 39677 39678 var isCombo = 39679 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || 39680 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || 39681 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); 39682 39683 // Exit early if metadata can't be merged. 39684 if (!(isCommon || isCombo)) { 39685 return data; 39686 } 39687 // Use source `thisArg` if available. 39688 if (srcBitmask & WRAP_BIND_FLAG) { 39689 data[2] = source[2]; 39690 // Set when currying a bound function. 39691 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; 39692 } 39693 // Compose partial arguments. 39694 var value = source[3]; 39695 if (value) { 39696 var partials = data[3]; 39697 data[3] = partials ? composeArgs(partials, value, source[4]) : value; 39698 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; 39699 } 39700 // Compose partial right arguments. 39701 value = source[5]; 39702 if (value) { 39703 partials = data[5]; 39704 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; 39705 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; 39706 } 39707 // Use source `argPos` if available. 39708 value = source[7]; 39709 if (value) { 39710 data[7] = value; 39711 } 39712 // Use source `ary` if it's smaller. 39713 if (srcBitmask & WRAP_ARY_FLAG) { 39714 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); 39715 } 39716 // Use source `arity` if one is not provided. 39717 if (data[9] == null) { 39718 data[9] = source[9]; 39719 } 39720 // Use source `func` and merge bitmasks. 39721 data[0] = source[0]; 39722 data[1] = newBitmask; 39723 39724 return data; 39725 } 39726 39727 /** 39728 * This function is like 39729 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) 39730 * except that it includes inherited enumerable properties. 39731 * 39732 * @private 39733 * @param {Object} object The object to query. 39734 * @returns {Array} Returns the array of property names. 39735 */ 39736 function nativeKeysIn(object) { 39737 var result = []; 39738 if (object != null) { 39739 for (var key in Object(object)) { 39740 result.push(key); 39741 } 39742 } 39743 return result; 39744 } 39745 39746 /** 39747 * Converts `value` to a string using `Object.prototype.toString`. 39748 * 39749 * @private 39750 * @param {*} value The value to convert. 39751 * @returns {string} Returns the converted string. 39752 */ 39753 function objectToString(value) { 39754 return nativeObjectToString.call(value); 39755 } 39756 39757 /** 39758 * A specialized version of `baseRest` which transforms the rest array. 39759 * 39760 * @private 39761 * @param {Function} func The function to apply a rest parameter to. 39762 * @param {number} [start=func.length-1] The start position of the rest parameter. 39763 * @param {Function} transform The rest array transform. 39764 * @returns {Function} Returns the new function. 39765 */ 39766 function overRest(func, start, transform) { 39767 start = nativeMax(start === undefined ? (func.length - 1) : start, 0); 39768 return function() { 39769 var args = arguments, 39770 index = -1, 39771 length = nativeMax(args.length - start, 0), 39772 array = Array(length); 39773 39774 while (++index < length) { 39775 array[index] = args[start + index]; 39776 } 39777 index = -1; 39778 var otherArgs = Array(start + 1); 39779 while (++index < start) { 39780 otherArgs[index] = args[index]; 39781 } 39782 otherArgs[start] = transform(array); 39783 return apply(func, this, otherArgs); 39784 }; 39785 } 39786 39787 /** 39788 * Gets the parent value at `path` of `object`. 39789 * 39790 * @private 39791 * @param {Object} object The object to query. 39792 * @param {Array} path The path to get the parent value of. 39793 * @returns {*} Returns the parent value. 39794 */ 39795 function parent(object, path) { 39796 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); 39797 } 39798 39799 /** 39800 * Reorder `array` according to the specified indexes where the element at 39801 * the first index is assigned as the first element, the element at 39802 * the second index is assigned as the second element, and so on. 39803 * 39804 * @private 39805 * @param {Array} array The array to reorder. 39806 * @param {Array} indexes The arranged array indexes. 39807 * @returns {Array} Returns `array`. 39808 */ 39809 function reorder(array, indexes) { 39810 var arrLength = array.length, 39811 length = nativeMin(indexes.length, arrLength), 39812 oldArray = copyArray(array); 39813 39814 while (length--) { 39815 var index = indexes[length]; 39816 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; 39817 } 39818 return array; 39819 } 39820 39821 /** 39822 * Gets the value at `key`, unless `key` is "__proto__" or "constructor". 39823 * 39824 * @private 39825 * @param {Object} object The object to query. 39826 * @param {string} key The key of the property to get. 39827 * @returns {*} Returns the property value. 39828 */ 39829 function safeGet(object, key) { 39830 if (key === 'constructor' && typeof object[key] === 'function') { 39831 return; 39832 } 39833 39834 if (key == '__proto__') { 39835 return; 39836 } 39837 39838 return object[key]; 39839 } 39840 39841 /** 39842 * Sets metadata for `func`. 39843 * 39844 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short 39845 * period of time, it will trip its breaker and transition to an identity 39846 * function to avoid garbage collection pauses in V8. See 39847 * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) 39848 * for more details. 39849 * 39850 * @private 39851 * @param {Function} func The function to associate metadata with. 39852 * @param {*} data The metadata. 39853 * @returns {Function} Returns `func`. 39854 */ 39855 var setData = shortOut(baseSetData); 39856 39857 /** 39858 * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). 39859 * 39860 * @private 39861 * @param {Function} func The function to delay. 39862 * @param {number} wait The number of milliseconds to delay invocation. 39863 * @returns {number|Object} Returns the timer id or timeout object. 39864 */ 39865 var setTimeout = ctxSetTimeout || function(func, wait) { 39866 return root.setTimeout(func, wait); 39867 }; 39868 39869 /** 39870 * Sets the `toString` method of `func` to return `string`. 39871 * 39872 * @private 39873 * @param {Function} func The function to modify. 39874 * @param {Function} string The `toString` result. 39875 * @returns {Function} Returns `func`. 39876 */ 39877 var setToString = shortOut(baseSetToString); 39878 39879 /** 39880 * Sets the `toString` method of `wrapper` to mimic the source of `reference` 39881 * with wrapper details in a comment at the top of the source body. 39882 * 39883 * @private 39884 * @param {Function} wrapper The function to modify. 39885 * @param {Function} reference The reference function. 39886 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 39887 * @returns {Function} Returns `wrapper`. 39888 */ 39889 function setWrapToString(wrapper, reference, bitmask) { 39890 var source = (reference + ''); 39891 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); 39892 } 39893 39894 /** 39895 * Creates a function that'll short out and invoke `identity` instead 39896 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` 39897 * milliseconds. 39898 * 39899 * @private 39900 * @param {Function} func The function to restrict. 39901 * @returns {Function} Returns the new shortable function. 39902 */ 39903 function shortOut(func) { 39904 var count = 0, 39905 lastCalled = 0; 39906 39907 return function() { 39908 var stamp = nativeNow(), 39909 remaining = HOT_SPAN - (stamp - lastCalled); 39910 39911 lastCalled = stamp; 39912 if (remaining > 0) { 39913 if (++count >= HOT_COUNT) { 39914 return arguments[0]; 39915 } 39916 } else { 39917 count = 0; 39918 } 39919 return func.apply(undefined, arguments); 39920 }; 39921 } 39922 39923 /** 39924 * A specialized version of `_.shuffle` which mutates and sets the size of `array`. 39925 * 39926 * @private 39927 * @param {Array} array The array to shuffle. 39928 * @param {number} [size=array.length] The size of `array`. 39929 * @returns {Array} Returns `array`. 39930 */ 39931 function shuffleSelf(array, size) { 39932 var index = -1, 39933 length = array.length, 39934 lastIndex = length - 1; 39935 39936 size = size === undefined ? length : size; 39937 while (++index < size) { 39938 var rand = baseRandom(index, lastIndex), 39939 value = array[rand]; 39940 39941 array[rand] = array[index]; 39942 array[index] = value; 39943 } 39944 array.length = size; 39945 return array; 39946 } 39947 39948 /** 39949 * Converts `string` to a property path array.
vendor: 1,775 bytes, lines 39950-40010
39950 * 39951 * @private 39952 * @param {string} string The string to convert. 39953 * @returns {Array} Returns the property path array. 39954 */ 39955 var stringToPath = memoizeCapped(function(string) { 39956 var result = []; 39957 if (string.charCodeAt(0) === 46 /* . */) { 39958 result.push(''); 39959 } 39960 string.replace(rePropName, function(match, number, quote, subString) { 39961 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); 39962 }); 39963 return result; 39964 }); 39965 39966 /** 39967 * Converts `value` to a string key if it's not a string or symbol. 39968 * 39969 * @private 39970 * @param {*} value The value to inspect. 39971 * @returns {string|symbol} Returns the key. 39972 */ 39973 function toKey(value) { 39974 if (typeof value == 'string' || isSymbol(value)) { 39975 return value; 39976 } 39977 var result = (value + ''); 39978 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; 39979 } 39980 39981 /** 39982 * Converts `func` to its source code. 39983 * 39984 * @private 39985 * @param {Function} func The function to convert. 39986 * @returns {string} Returns the source code. 39987 */ 39988 function toSource(func) { 39989 if (func != null) { 39990 try { 39991 return funcToString.call(func); 39992 } catch (e) {} 39993 try { 39994 return (func + ''); 39995 } catch (e) {} 39996 } 39997 return ''; 39998 } 39999 40000 /** 40001 * Updates wrapper `details` based on `bitmask` flags. 40002 * 40003 * @private 40004 * @returns {Array} details The details to modify. 40005 * @param {number} bitmask The bitmask flags. See `createWrap` for more details. 40006 * @returns {Array} Returns `details`. 40007 */ 40008 function updateWrapDetails(details, bitmask) { 40009 arrayEach(wrapFlags, function(pair) { 40010 var value = '_.' + pair[0];
vendor: 69,323 bytes, lines 40011-42275
40011 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { 40012 details.push(value); 40013 } 40014 }); 40015 return details.sort(); 40016 } 40017 40018 /** 40019 * Creates a clone of `wrapper`. 40020 * 40021 * @private 40022 * @param {Object} wrapper The wrapper to clone. 40023 * @returns {Object} Returns the cloned wrapper. 40024 */ 40025 function wrapperClone(wrapper) { 40026 if (wrapper instanceof LazyWrapper) { 40027 return wrapper.clone(); 40028 } 40029 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); 40030 result.__actions__ = copyArray(wrapper.__actions__); 40031 result.__index__ = wrapper.__index__; 40032 result.__values__ = wrapper.__values__; 40033 return result; 40034 } 40035 40036 /*------------------------------------------------------------------------*/ 40037 40038 /** 40039 * Creates an array of elements split into groups the length of `size`. 40040 * If `array` can't be split evenly, the final chunk will be the remaining 40041 * elements. 40042 * 40043 * @static 40044 * @memberOf _ 40045 * @since 3.0.0 40046 * @category Array 40047 * @param {Array} array The array to process. 40048 * @param {number} [size=1] The length of each chunk 40049 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 40050 * @returns {Array} Returns the new array of chunks. 40051 * @example 40052 * 40053 * _.chunk(['a', 'b', 'c', 'd'], 2); 40054 * // => [['a', 'b'], ['c', 'd']] 40055 * 40056 * _.chunk(['a', 'b', 'c', 'd'], 3); 40057 * // => [['a', 'b', 'c'], ['d']] 40058 */ 40059 function chunk(array, size, guard) { 40060 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { 40061 size = 1; 40062 } else { 40063 size = nativeMax(toInteger(size), 0); 40064 } 40065 var length = array == null ? 0 : array.length; 40066 if (!length || size < 1) { 40067 return []; 40068 } 40069 var index = 0, 40070 resIndex = 0, 40071 result = Array(nativeCeil(length / size)); 40072 40073 while (index < length) { 40074 result[resIndex++] = baseSlice(array, index, (index += size)); 40075 } 40076 return result; 40077 } 40078 40079 /** 40080 * Creates an array with all falsey values removed. The values `false`, `null`, 40081 * `0`, `""`, `undefined`, and `NaN` are falsey. 40082 * 40083 * @static 40084 * @memberOf _ 40085 * @since 0.1.0 40086 * @category Array 40087 * @param {Array} array The array to compact. 40088 * @returns {Array} Returns the new array of filtered values. 40089 * @example 40090 * 40091 * _.compact([0, 1, false, 2, '', 3]); 40092 * // => [1, 2, 3] 40093 */ 40094 function compact(array) { 40095 var index = -1, 40096 length = array == null ? 0 : array.length, 40097 resIndex = 0, 40098 result = []; 40099 40100 while (++index < length) { 40101 var value = array[index]; 40102 if (value) { 40103 result[resIndex++] = value; 40104 } 40105 } 40106 return result; 40107 } 40108 40109 /** 40110 * Creates a new array concatenating `array` with any additional arrays 40111 * and/or values. 40112 * 40113 * @static 40114 * @memberOf _ 40115 * @since 4.0.0 40116 * @category Array 40117 * @param {Array} array The array to concatenate. 40118 * @param {...*} [values] The values to concatenate. 40119 * @returns {Array} Returns the new concatenated array. 40120 * @example 40121 * 40122 * var array = [1]; 40123 * var other = _.concat(array, 2, [3], [[4]]); 40124 * 40125 * console.log(other); 40126 * // => [1, 2, 3, [4]] 40127 * 40128 * console.log(array); 40129 * // => [1] 40130 */ 40131 function concat() { 40132 var length = arguments.length; 40133 if (!length) { 40134 return []; 40135 } 40136 var args = Array(length - 1), 40137 array = arguments[0], 40138 index = length; 40139 40140 while (index--) { 40141 args[index - 1] = arguments[index]; 40142 } 40143 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); 40144 } 40145 40146 /** 40147 * Creates an array of `array` values not included in the other given arrays 40148 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 40149 * for equality comparisons. The order and references of result values are 40150 * determined by the first array. 40151 * 40152 * **Note:** Unlike `_.pullAll`, this method returns a new array. 40153 * 40154 * @static 40155 * @memberOf _ 40156 * @since 0.1.0 40157 * @category Array 40158 * @param {Array} array The array to inspect. 40159 * @param {...Array} [values] The values to exclude. 40160 * @returns {Array} Returns the new array of filtered values. 40161 * @see _.without, _.xor 40162 * @example 40163 * 40164 * _.difference([2, 1], [2, 3]); 40165 * // => [1] 40166 */ 40167 var difference = baseRest(function(array, values) { 40168 return isArrayLikeObject(array) 40169 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) 40170 : []; 40171 }); 40172 40173 /** 40174 * This method is like `_.difference` except that it accepts `iteratee` which 40175 * is invoked for each element of `array` and `values` to generate the criterion 40176 * by which they're compared. The order and references of result values are 40177 * determined by the first array. The iteratee is invoked with one argument: 40178 * (value). 40179 * 40180 * **Note:** Unlike `_.pullAllBy`, this method returns a new array. 40181 * 40182 * @static 40183 * @memberOf _ 40184 * @since 4.0.0 40185 * @category Array 40186 * @param {Array} array The array to inspect. 40187 * @param {...Array} [values] The values to exclude. 40188 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 40189 * @returns {Array} Returns the new array of filtered values. 40190 * @example 40191 * 40192 * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); 40193 * // => [1.2] 40194 * 40195 * // The `_.property` iteratee shorthand. 40196 * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); 40197 * // => [{ 'x': 2 }] 40198 */ 40199 var differenceBy = baseRest(function(array, values) { 40200 var iteratee = last(values); 40201 if (isArrayLikeObject(iteratee)) { 40202 iteratee = undefined; 40203 } 40204 return isArrayLikeObject(array) 40205 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) 40206 : []; 40207 }); 40208 40209 /** 40210 * This method is like `_.difference` except that it accepts `comparator` 40211 * which is invoked to compare elements of `array` to `values`. The order and 40212 * references of result values are determined by the first array. The comparator 40213 * is invoked with two arguments: (arrVal, othVal). 40214 * 40215 * **Note:** Unlike `_.pullAllWith`, this method returns a new array. 40216 * 40217 * @static 40218 * @memberOf _ 40219 * @since 4.0.0 40220 * @category Array 40221 * @param {Array} array The array to inspect. 40222 * @param {...Array} [values] The values to exclude. 40223 * @param {Function} [comparator] The comparator invoked per element. 40224 * @returns {Array} Returns the new array of filtered values. 40225 * @example 40226 * 40227 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 40228 * 40229 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); 40230 * // => [{ 'x': 2, 'y': 1 }] 40231 */ 40232 var differenceWith = baseRest(function(array, values) { 40233 var comparator = last(values); 40234 if (isArrayLikeObject(comparator)) { 40235 comparator = undefined; 40236 } 40237 return isArrayLikeObject(array) 40238 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) 40239 : []; 40240 }); 40241 40242 /** 40243 * Creates a slice of `array` with `n` elements dropped from the beginning. 40244 * 40245 * @static 40246 * @memberOf _ 40247 * @since 0.5.0 40248 * @category Array 40249 * @param {Array} array The array to query. 40250 * @param {number} [n=1] The number of elements to drop. 40251 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 40252 * @returns {Array} Returns the slice of `array`. 40253 * @example 40254 * 40255 * _.drop([1, 2, 3]); 40256 * // => [2, 3] 40257 * 40258 * _.drop([1, 2, 3], 2); 40259 * // => [3] 40260 * 40261 * _.drop([1, 2, 3], 5); 40262 * // => [] 40263 * 40264 * _.drop([1, 2, 3], 0); 40265 * // => [1, 2, 3] 40266 */ 40267 function drop(array, n, guard) { 40268 var length = array == null ? 0 : array.length; 40269 if (!length) { 40270 return []; 40271 } 40272 n = (guard || n === undefined) ? 1 : toInteger(n); 40273 return baseSlice(array, n < 0 ? 0 : n, length); 40274 } 40275 40276 /** 40277 * Creates a slice of `array` with `n` elements dropped from the end. 40278 * 40279 * @static 40280 * @memberOf _ 40281 * @since 3.0.0 40282 * @category Array 40283 * @param {Array} array The array to query. 40284 * @param {number} [n=1] The number of elements to drop. 40285 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 40286 * @returns {Array} Returns the slice of `array`. 40287 * @example 40288 * 40289 * _.dropRight([1, 2, 3]); 40290 * // => [1, 2] 40291 * 40292 * _.dropRight([1, 2, 3], 2); 40293 * // => [1] 40294 * 40295 * _.dropRight([1, 2, 3], 5); 40296 * // => [] 40297 * 40298 * _.dropRight([1, 2, 3], 0); 40299 * // => [1, 2, 3] 40300 */ 40301 function dropRight(array, n, guard) { 40302 var length = array == null ? 0 : array.length; 40303 if (!length) { 40304 return []; 40305 } 40306 n = (guard || n === undefined) ? 1 : toInteger(n); 40307 n = length - n; 40308 return baseSlice(array, 0, n < 0 ? 0 : n); 40309 } 40310 40311 /** 40312 * Creates a slice of `array` excluding elements dropped from the end. 40313 * Elements are dropped until `predicate` returns falsey. The predicate is 40314 * invoked with three arguments: (value, index, array). 40315 * 40316 * @static 40317 * @memberOf _ 40318 * @since 3.0.0 40319 * @category Array 40320 * @param {Array} array The array to query. 40321 * @param {Function} [predicate=_.identity] The function invoked per iteration. 40322 * @returns {Array} Returns the slice of `array`. 40323 * @example 40324 * 40325 * var users = [ 40326 * { 'user': 'barney', 'active': true }, 40327 * { 'user': 'fred', 'active': false }, 40328 * { 'user': 'pebbles', 'active': false } 40329 * ]; 40330 * 40331 * _.dropRightWhile(users, function(o) { return !o.active; }); 40332 * // => objects for ['barney'] 40333 * 40334 * // The `_.matches` iteratee shorthand. 40335 * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); 40336 * // => objects for ['barney', 'fred'] 40337 * 40338 * // The `_.matchesProperty` iteratee shorthand. 40339 * _.dropRightWhile(users, ['active', false]); 40340 * // => objects for ['barney'] 40341 * 40342 * // The `_.property` iteratee shorthand. 40343 * _.dropRightWhile(users, 'active'); 40344 * // => objects for ['barney', 'fred', 'pebbles'] 40345 */ 40346 function dropRightWhile(array, predicate) { 40347 return (array && array.length) 40348 ? baseWhile(array, getIteratee(predicate, 3), true, true) 40349 : []; 40350 } 40351 40352 /** 40353 * Creates a slice of `array` excluding elements dropped from the beginning. 40354 * Elements are dropped until `predicate` returns falsey. The predicate is 40355 * invoked with three arguments: (value, index, array). 40356 * 40357 * @static 40358 * @memberOf _ 40359 * @since 3.0.0 40360 * @category Array 40361 * @param {Array} array The array to query. 40362 * @param {Function} [predicate=_.identity] The function invoked per iteration. 40363 * @returns {Array} Returns the slice of `array`. 40364 * @example 40365 * 40366 * var users = [ 40367 * { 'user': 'barney', 'active': false }, 40368 * { 'user': 'fred', 'active': false }, 40369 * { 'user': 'pebbles', 'active': true } 40370 * ]; 40371 * 40372 * _.dropWhile(users, function(o) { return !o.active; }); 40373 * // => objects for ['pebbles'] 40374 * 40375 * // The `_.matches` iteratee shorthand. 40376 * _.dropWhile(users, { 'user': 'barney', 'active': false }); 40377 * // => objects for ['fred', 'pebbles'] 40378 * 40379 * // The `_.matchesProperty` iteratee shorthand. 40380 * _.dropWhile(users, ['active', false]); 40381 * // => objects for ['pebbles'] 40382 * 40383 * // The `_.property` iteratee shorthand. 40384 * _.dropWhile(users, 'active'); 40385 * // => objects for ['barney', 'fred', 'pebbles'] 40386 */ 40387 function dropWhile(array, predicate) { 40388 return (array && array.length) 40389 ? baseWhile(array, getIteratee(predicate, 3), true) 40390 : []; 40391 } 40392 40393 /** 40394 * Fills elements of `array` with `value` from `start` up to, but not 40395 * including, `end`. 40396 * 40397 * **Note:** This method mutates `array`. 40398 * 40399 * @static 40400 * @memberOf _ 40401 * @since 3.2.0 40402 * @category Array 40403 * @param {Array} array The array to fill. 40404 * @param {*} value The value to fill `array` with. 40405 * @param {number} [start=0] The start position. 40406 * @param {number} [end=array.length] The end position. 40407 * @returns {Array} Returns `array`. 40408 * @example 40409 * 40410 * var array = [1, 2, 3]; 40411 * 40412 * _.fill(array, 'a'); 40413 * console.log(array); 40414 * // => ['a', 'a', 'a'] 40415 * 40416 * _.fill(Array(3), 2); 40417 * // => [2, 2, 2] 40418 * 40419 * _.fill([4, 6, 8, 10], '*', 1, 3); 40420 * // => [4, '*', '*', 10] 40421 */ 40422 function fill(array, value, start, end) { 40423 var length = array == null ? 0 : array.length; 40424 if (!length) { 40425 return []; 40426 } 40427 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { 40428 start = 0; 40429 end = length; 40430 } 40431 return baseFill(array, value, start, end); 40432 } 40433 40434 /** 40435 * This method is like `_.find` except that it returns the index of the first 40436 * element `predicate` returns truthy for instead of the element itself. 40437 * 40438 * @static 40439 * @memberOf _ 40440 * @since 1.1.0 40441 * @category Array 40442 * @param {Array} array The array to inspect. 40443 * @param {Function} [predicate=_.identity] The function invoked per iteration. 40444 * @param {number} [fromIndex=0] The index to search from. 40445 * @returns {number} Returns the index of the found element, else `-1`. 40446 * @example 40447 * 40448 * var users = [ 40449 * { 'user': 'barney', 'active': false }, 40450 * { 'user': 'fred', 'active': false }, 40451 * { 'user': 'pebbles', 'active': true } 40452 * ]; 40453 * 40454 * _.findIndex(users, function(o) { return o.user == 'barney'; }); 40455 * // => 0 40456 * 40457 * // The `_.matches` iteratee shorthand. 40458 * _.findIndex(users, { 'user': 'fred', 'active': false }); 40459 * // => 1 40460 * 40461 * // The `_.matchesProperty` iteratee shorthand. 40462 * _.findIndex(users, ['active', false]); 40463 * // => 0 40464 * 40465 * // The `_.property` iteratee shorthand. 40466 * _.findIndex(users, 'active'); 40467 * // => 2 40468 */ 40469 function findIndex(array, predicate, fromIndex) { 40470 var length = array == null ? 0 : array.length; 40471 if (!length) { 40472 return -1; 40473 } 40474 var index = fromIndex == null ? 0 : toInteger(fromIndex); 40475 if (index < 0) { 40476 index = nativeMax(length + index, 0); 40477 } 40478 return baseFindIndex(array, getIteratee(predicate, 3), index); 40479 } 40480 40481 /** 40482 * This method is like `_.findIndex` except that it iterates over elements 40483 * of `collection` from right to left. 40484 * 40485 * @static 40486 * @memberOf _ 40487 * @since 2.0.0 40488 * @category Array 40489 * @param {Array} array The array to inspect. 40490 * @param {Function} [predicate=_.identity] The function invoked per iteration. 40491 * @param {number} [fromIndex=array.length-1] The index to search from. 40492 * @returns {number} Returns the index of the found element, else `-1`. 40493 * @example 40494 * 40495 * var users = [ 40496 * { 'user': 'barney', 'active': true }, 40497 * { 'user': 'fred', 'active': false }, 40498 * { 'user': 'pebbles', 'active': false } 40499 * ]; 40500 * 40501 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); 40502 * // => 2 40503 * 40504 * // The `_.matches` iteratee shorthand. 40505 * _.findLastIndex(users, { 'user': 'barney', 'active': true }); 40506 * // => 0 40507 * 40508 * // The `_.matchesProperty` iteratee shorthand. 40509 * _.findLastIndex(users, ['active', false]); 40510 * // => 2 40511 * 40512 * // The `_.property` iteratee shorthand. 40513 * _.findLastIndex(users, 'active'); 40514 * // => 0 40515 */ 40516 function findLastIndex(array, predicate, fromIndex) { 40517 var length = array == null ? 0 : array.length; 40518 if (!length) { 40519 return -1; 40520 } 40521 var index = length - 1; 40522 if (fromIndex !== undefined) { 40523 index = toInteger(fromIndex); 40524 index = fromIndex < 0 40525 ? nativeMax(length + index, 0) 40526 : nativeMin(index, length - 1); 40527 } 40528 return baseFindIndex(array, getIteratee(predicate, 3), index, true); 40529 } 40530 40531 /** 40532 * Flattens `array` a single level deep. 40533 * 40534 * @static 40535 * @memberOf _ 40536 * @since 0.1.0 40537 * @category Array 40538 * @param {Array} array The array to flatten. 40539 * @returns {Array} Returns the new flattened array. 40540 * @example 40541 * 40542 * _.flatten([1, [2, [3, [4]], 5]]); 40543 * // => [1, 2, [3, [4]], 5] 40544 */ 40545 function flatten(array) { 40546 var length = array == null ? 0 : array.length; 40547 return length ? baseFlatten(array, 1) : []; 40548 } 40549 40550 /** 40551 * Recursively flattens `array`. 40552 * 40553 * @static 40554 * @memberOf _ 40555 * @since 3.0.0 40556 * @category Array 40557 * @param {Array} array The array to flatten. 40558 * @returns {Array} Returns the new flattened array. 40559 * @example 40560 * 40561 * _.flattenDeep([1, [2, [3, [4]], 5]]); 40562 * // => [1, 2, 3, 4, 5] 40563 */ 40564 function flattenDeep(array) { 40565 var length = array == null ? 0 : array.length; 40566 return length ? baseFlatten(array, INFINITY) : []; 40567 } 40568 40569 /** 40570 * Recursively flatten `array` up to `depth` times. 40571 * 40572 * @static 40573 * @memberOf _ 40574 * @since 4.4.0 40575 * @category Array 40576 * @param {Array} array The array to flatten. 40577 * @param {number} [depth=1] The maximum recursion depth. 40578 * @returns {Array} Returns the new flattened array. 40579 * @example 40580 * 40581 * var array = [1, [2, [3, [4]], 5]]; 40582 * 40583 * _.flattenDepth(array, 1); 40584 * // => [1, 2, [3, [4]], 5] 40585 * 40586 * _.flattenDepth(array, 2); 40587 * // => [1, 2, 3, [4], 5] 40588 */ 40589 function flattenDepth(array, depth) { 40590 var length = array == null ? 0 : array.length; 40591 if (!length) { 40592 return []; 40593 } 40594 depth = depth === undefined ? 1 : toInteger(depth); 40595 return baseFlatten(array, depth); 40596 } 40597 40598 /** 40599 * The inverse of `_.toPairs`; this method returns an object composed 40600 * from key-value `pairs`. 40601 * 40602 * @static 40603 * @memberOf _ 40604 * @since 4.0.0 40605 * @category Array 40606 * @param {Array} pairs The key-value pairs. 40607 * @returns {Object} Returns the new object. 40608 * @example 40609 * 40610 * _.fromPairs([['a', 1], ['b', 2]]); 40611 * // => { 'a': 1, 'b': 2 } 40612 */ 40613 function fromPairs(pairs) { 40614 var index = -1, 40615 length = pairs == null ? 0 : pairs.length, 40616 result = {}; 40617 40618 while (++index < length) { 40619 var pair = pairs[index]; 40620 result[pair[0]] = pair[1]; 40621 } 40622 return result; 40623 } 40624 40625 /** 40626 * Gets the first element of `array`. 40627 * 40628 * @static 40629 * @memberOf _ 40630 * @since 0.1.0 40631 * @alias first 40632 * @category Array 40633 * @param {Array} array The array to query. 40634 * @returns {*} Returns the first element of `array`. 40635 * @example 40636 * 40637 * _.head([1, 2, 3]); 40638 * // => 1 40639 * 40640 * _.head([]); 40641 * // => undefined 40642 */ 40643 function head(array) { 40644 return (array && array.length) ? array[0] : undefined; 40645 } 40646 40647 /** 40648 * Gets the index at which the first occurrence of `value` is found in `array` 40649 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 40650 * for equality comparisons. If `fromIndex` is negative, it's used as the 40651 * offset from the end of `array`. 40652 * 40653 * @static 40654 * @memberOf _ 40655 * @since 0.1.0 40656 * @category Array 40657 * @param {Array} array The array to inspect. 40658 * @param {*} value The value to search for. 40659 * @param {number} [fromIndex=0] The index to search from. 40660 * @returns {number} Returns the index of the matched value, else `-1`. 40661 * @example 40662 * 40663 * _.indexOf([1, 2, 1, 2], 2); 40664 * // => 1 40665 * 40666 * // Search from the `fromIndex`. 40667 * _.indexOf([1, 2, 1, 2], 2, 2); 40668 * // => 3 40669 */ 40670 function indexOf(array, value, fromIndex) { 40671 var length = array == null ? 0 : array.length; 40672 if (!length) { 40673 return -1; 40674 } 40675 var index = fromIndex == null ? 0 : toInteger(fromIndex); 40676 if (index < 0) { 40677 index = nativeMax(length + index, 0); 40678 } 40679 return baseIndexOf(array, value, index); 40680 } 40681 40682 /** 40683 * Gets all but the last element of `array`. 40684 * 40685 * @static 40686 * @memberOf _ 40687 * @since 0.1.0 40688 * @category Array 40689 * @param {Array} array The array to query. 40690 * @returns {Array} Returns the slice of `array`. 40691 * @example 40692 * 40693 * _.initial([1, 2, 3]); 40694 * // => [1, 2] 40695 */ 40696 function initial(array) { 40697 var length = array == null ? 0 : array.length; 40698 return length ? baseSlice(array, 0, -1) : []; 40699 } 40700 40701 /** 40702 * Creates an array of unique values that are included in all given arrays 40703 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 40704 * for equality comparisons. The order and references of result values are 40705 * determined by the first array. 40706 * 40707 * @static 40708 * @memberOf _ 40709 * @since 0.1.0 40710 * @category Array 40711 * @param {...Array} [arrays] The arrays to inspect. 40712 * @returns {Array} Returns the new array of intersecting values. 40713 * @example 40714 * 40715 * _.intersection([2, 1], [2, 3]); 40716 * // => [2] 40717 */ 40718 var intersection = baseRest(function(arrays) { 40719 var mapped = arrayMap(arrays, castArrayLikeObject); 40720 return (mapped.length && mapped[0] === arrays[0]) 40721 ? baseIntersection(mapped) 40722 : []; 40723 }); 40724 40725 /** 40726 * This method is like `_.intersection` except that it accepts `iteratee` 40727 * which is invoked for each element of each `arrays` to generate the criterion 40728 * by which they're compared. The order and references of result values are 40729 * determined by the first array. The iteratee is invoked with one argument: 40730 * (value). 40731 * 40732 * @static 40733 * @memberOf _ 40734 * @since 4.0.0 40735 * @category Array 40736 * @param {...Array} [arrays] The arrays to inspect. 40737 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 40738 * @returns {Array} Returns the new array of intersecting values. 40739 * @example 40740 * 40741 * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); 40742 * // => [2.1] 40743 * 40744 * // The `_.property` iteratee shorthand. 40745 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 40746 * // => [{ 'x': 1 }] 40747 */ 40748 var intersectionBy = baseRest(function(arrays) { 40749 var iteratee = last(arrays), 40750 mapped = arrayMap(arrays, castArrayLikeObject); 40751 40752 if (iteratee === last(mapped)) { 40753 iteratee = undefined; 40754 } else { 40755 mapped.pop(); 40756 } 40757 return (mapped.length && mapped[0] === arrays[0]) 40758 ? baseIntersection(mapped, getIteratee(iteratee, 2)) 40759 : []; 40760 }); 40761 40762 /** 40763 * This method is like `_.intersection` except that it accepts `comparator` 40764 * which is invoked to compare elements of `arrays`. The order and references 40765 * of result values are determined by the first array. The comparator is 40766 * invoked with two arguments: (arrVal, othVal). 40767 * 40768 * @static 40769 * @memberOf _ 40770 * @since 4.0.0 40771 * @category Array 40772 * @param {...Array} [arrays] The arrays to inspect. 40773 * @param {Function} [comparator] The comparator invoked per element. 40774 * @returns {Array} Returns the new array of intersecting values. 40775 * @example 40776 * 40777 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 40778 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 40779 * 40780 * _.intersectionWith(objects, others, _.isEqual); 40781 * // => [{ 'x': 1, 'y': 2 }] 40782 */ 40783 var intersectionWith = baseRest(function(arrays) { 40784 var comparator = last(arrays), 40785 mapped = arrayMap(arrays, castArrayLikeObject); 40786 40787 comparator = typeof comparator == 'function' ? comparator : undefined; 40788 if (comparator) { 40789 mapped.pop(); 40790 } 40791 return (mapped.length && mapped[0] === arrays[0]) 40792 ? baseIntersection(mapped, undefined, comparator) 40793 : []; 40794 }); 40795 40796 /** 40797 * Converts all elements in `array` into a string separated by `separator`. 40798 * 40799 * @static 40800 * @memberOf _ 40801 * @since 4.0.0 40802 * @category Array 40803 * @param {Array} array The array to convert. 40804 * @param {string} [separator=','] The element separator. 40805 * @returns {string} Returns the joined string. 40806 * @example 40807 * 40808 * _.join(['a', 'b', 'c'], '~'); 40809 * // => 'a~b~c' 40810 */ 40811 function join(array, separator) { 40812 return array == null ? '' : nativeJoin.call(array, separator); 40813 } 40814 40815 /** 40816 * Gets the last element of `array`. 40817 * 40818 * @static 40819 * @memberOf _ 40820 * @since 0.1.0 40821 * @category Array 40822 * @param {Array} array The array to query. 40823 * @returns {*} Returns the last element of `array`. 40824 * @example 40825 * 40826 * _.last([1, 2, 3]); 40827 * // => 3 40828 */ 40829 function last(array) { 40830 var length = array == null ? 0 : array.length; 40831 return length ? array[length - 1] : undefined; 40832 } 40833 40834 /** 40835 * This method is like `_.indexOf` except that it iterates over elements of 40836 * `array` from right to left. 40837 * 40838 * @static 40839 * @memberOf _ 40840 * @since 0.1.0 40841 * @category Array 40842 * @param {Array} array The array to inspect. 40843 * @param {*} value The value to search for. 40844 * @param {number} [fromIndex=array.length-1] The index to search from. 40845 * @returns {number} Returns the index of the matched value, else `-1`. 40846 * @example 40847 * 40848 * _.lastIndexOf([1, 2, 1, 2], 2); 40849 * // => 3 40850 * 40851 * // Search from the `fromIndex`. 40852 * _.lastIndexOf([1, 2, 1, 2], 2, 2); 40853 * // => 1 40854 */ 40855 function lastIndexOf(array, value, fromIndex) { 40856 var length = array == null ? 0 : array.length; 40857 if (!length) { 40858 return -1; 40859 } 40860 var index = length; 40861 if (fromIndex !== undefined) { 40862 index = toInteger(fromIndex); 40863 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); 40864 } 40865 return value === value 40866 ? strictLastIndexOf(array, value, index) 40867 : baseFindIndex(array, baseIsNaN, index, true); 40868 } 40869 40870 /** 40871 * Gets the element at index `n` of `array`. If `n` is negative, the nth 40872 * element from the end is returned. 40873 * 40874 * @static 40875 * @memberOf _ 40876 * @since 4.11.0 40877 * @category Array 40878 * @param {Array} array The array to query. 40879 * @param {number} [n=0] The index of the element to return. 40880 * @returns {*} Returns the nth element of `array`. 40881 * @example 40882 * 40883 * var array = ['a', 'b', 'c', 'd']; 40884 * 40885 * _.nth(array, 1); 40886 * // => 'b' 40887 * 40888 * _.nth(array, -2); 40889 * // => 'c'; 40890 */ 40891 function nth(array, n) { 40892 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; 40893 } 40894 40895 /** 40896 * Removes all given values from `array` using 40897 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 40898 * for equality comparisons. 40899 * 40900 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` 40901 * to remove elements from an array by predicate. 40902 * 40903 * @static 40904 * @memberOf _ 40905 * @since 2.0.0 40906 * @category Array 40907 * @param {Array} array The array to modify. 40908 * @param {...*} [values] The values to remove. 40909 * @returns {Array} Returns `array`. 40910 * @example 40911 * 40912 * var array = ['a', 'b', 'c', 'a', 'b', 'c']; 40913 * 40914 * _.pull(array, 'a', 'c'); 40915 * console.log(array); 40916 * // => ['b', 'b'] 40917 */ 40918 var pull = baseRest(pullAll); 40919 40920 /** 40921 * This method is like `_.pull` except that it accepts an array of values to remove. 40922 * 40923 * **Note:** Unlike `_.difference`, this method mutates `array`. 40924 * 40925 * @static 40926 * @memberOf _ 40927 * @since 4.0.0 40928 * @category Array 40929 * @param {Array} array The array to modify. 40930 * @param {Array} values The values to remove. 40931 * @returns {Array} Returns `array`. 40932 * @example 40933 * 40934 * var array = ['a', 'b', 'c', 'a', 'b', 'c']; 40935 * 40936 * _.pullAll(array, ['a', 'c']); 40937 * console.log(array); 40938 * // => ['b', 'b'] 40939 */ 40940 function pullAll(array, values) { 40941 return (array && array.length && values && values.length) 40942 ? basePullAll(array, values) 40943 : array; 40944 } 40945 40946 /** 40947 * This method is like `_.pullAll` except that it accepts `iteratee` which is 40948 * invoked for each element of `array` and `values` to generate the criterion 40949 * by which they're compared. The iteratee is invoked with one argument: (value). 40950 * 40951 * **Note:** Unlike `_.differenceBy`, this method mutates `array`. 40952 * 40953 * @static 40954 * @memberOf _ 40955 * @since 4.0.0 40956 * @category Array 40957 * @param {Array} array The array to modify. 40958 * @param {Array} values The values to remove. 40959 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 40960 * @returns {Array} Returns `array`. 40961 * @example 40962 * 40963 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; 40964 * 40965 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); 40966 * console.log(array); 40967 * // => [{ 'x': 2 }] 40968 */ 40969 function pullAllBy(array, values, iteratee) { 40970 return (array && array.length && values && values.length) 40971 ? basePullAll(array, values, getIteratee(iteratee, 2)) 40972 : array; 40973 } 40974 40975 /** 40976 * This method is like `_.pullAll` except that it accepts `comparator` which 40977 * is invoked to compare elements of `array` to `values`. The comparator is 40978 * invoked with two arguments: (arrVal, othVal). 40979 * 40980 * **Note:** Unlike `_.differenceWith`, this method mutates `array`. 40981 * 40982 * @static 40983 * @memberOf _ 40984 * @since 4.6.0 40985 * @category Array 40986 * @param {Array} array The array to modify. 40987 * @param {Array} values The values to remove. 40988 * @param {Function} [comparator] The comparator invoked per element. 40989 * @returns {Array} Returns `array`. 40990 * @example 40991 * 40992 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; 40993 * 40994 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); 40995 * console.log(array); 40996 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] 40997 */ 40998 function pullAllWith(array, values, comparator) { 40999 return (array && array.length && values && values.length) 41000 ? basePullAll(array, values, undefined, comparator) 41001 : array; 41002 } 41003 41004 /** 41005 * Removes elements from `array` corresponding to `indexes` and returns an 41006 * array of removed elements. 41007 * 41008 * **Note:** Unlike `_.at`, this method mutates `array`. 41009 * 41010 * @static 41011 * @memberOf _ 41012 * @since 3.0.0 41013 * @category Array 41014 * @param {Array} array The array to modify. 41015 * @param {...(number|number[])} [indexes] The indexes of elements to remove. 41016 * @returns {Array} Returns the new array of removed elements. 41017 * @example 41018 * 41019 * var array = ['a', 'b', 'c', 'd']; 41020 * var pulled = _.pullAt(array, [1, 3]); 41021 * 41022 * console.log(array); 41023 * // => ['a', 'c'] 41024 * 41025 * console.log(pulled); 41026 * // => ['b', 'd'] 41027 */ 41028 var pullAt = flatRest(function(array, indexes) { 41029 var length = array == null ? 0 : array.length, 41030 result = baseAt(array, indexes); 41031 41032 basePullAt(array, arrayMap(indexes, function(index) { 41033 return isIndex(index, length) ? +index : index; 41034 }).sort(compareAscending)); 41035 41036 return result; 41037 }); 41038 41039 /** 41040 * Removes all elements from `array` that `predicate` returns truthy for 41041 * and returns an array of the removed elements. The predicate is invoked 41042 * with three arguments: (value, index, array). 41043 * 41044 * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` 41045 * to pull elements from an array by value. 41046 * 41047 * @static 41048 * @memberOf _ 41049 * @since 2.0.0 41050 * @category Array 41051 * @param {Array} array The array to modify. 41052 * @param {Function} [predicate=_.identity] The function invoked per iteration. 41053 * @returns {Array} Returns the new array of removed elements. 41054 * @example 41055 * 41056 * var array = [1, 2, 3, 4]; 41057 * var evens = _.remove(array, function(n) { 41058 * return n % 2 == 0; 41059 * }); 41060 * 41061 * console.log(array); 41062 * // => [1, 3] 41063 * 41064 * console.log(evens); 41065 * // => [2, 4] 41066 */ 41067 function remove(array, predicate) { 41068 var result = []; 41069 if (!(array && array.length)) { 41070 return result; 41071 } 41072 var index = -1, 41073 indexes = [], 41074 length = array.length; 41075 41076 predicate = getIteratee(predicate, 3); 41077 while (++index < length) { 41078 var value = array[index]; 41079 if (predicate(value, index, array)) { 41080 result.push(value); 41081 indexes.push(index); 41082 } 41083 } 41084 basePullAt(array, indexes); 41085 return result; 41086 } 41087 41088 /** 41089 * Reverses `array` so that the first element becomes the last, the second 41090 * element becomes the second to last, and so on. 41091 * 41092 * **Note:** This method mutates `array` and is based on 41093 * [`Array#reverse`](https://mdn.io/Array/reverse). 41094 * 41095 * @static 41096 * @memberOf _ 41097 * @since 4.0.0 41098 * @category Array 41099 * @param {Array} array The array to modify. 41100 * @returns {Array} Returns `array`. 41101 * @example 41102 * 41103 * var array = [1, 2, 3]; 41104 * 41105 * _.reverse(array); 41106 * // => [3, 2, 1] 41107 * 41108 * console.log(array); 41109 * // => [3, 2, 1] 41110 */ 41111 function reverse(array) { 41112 return array == null ? array : nativeReverse.call(array); 41113 } 41114 41115 /** 41116 * Creates a slice of `array` from `start` up to, but not including, `end`. 41117 * 41118 * **Note:** This method is used instead of 41119 * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are 41120 * returned. 41121 * 41122 * @static 41123 * @memberOf _ 41124 * @since 3.0.0 41125 * @category Array 41126 * @param {Array} array The array to slice. 41127 * @param {number} [start=0] The start position. 41128 * @param {number} [end=array.length] The end position. 41129 * @returns {Array} Returns the slice of `array`. 41130 */ 41131 function slice(array, start, end) { 41132 var length = array == null ? 0 : array.length; 41133 if (!length) { 41134 return []; 41135 } 41136 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { 41137 start = 0; 41138 end = length; 41139 } 41140 else { 41141 start = start == null ? 0 : toInteger(start); 41142 end = end === undefined ? length : toInteger(end); 41143 } 41144 return baseSlice(array, start, end); 41145 } 41146 41147 /** 41148 * Uses a binary search to determine the lowest index at which `value` 41149 * should be inserted into `array` in order to maintain its sort order. 41150 * 41151 * @static 41152 * @memberOf _ 41153 * @since 0.1.0 41154 * @category Array 41155 * @param {Array} array The sorted array to inspect. 41156 * @param {*} value The value to evaluate. 41157 * @returns {number} Returns the index at which `value` should be inserted 41158 * into `array`. 41159 * @example 41160 * 41161 * _.sortedIndex([30, 50], 40); 41162 * // => 1 41163 */ 41164 function sortedIndex(array, value) { 41165 return baseSortedIndex(array, value); 41166 } 41167 41168 /** 41169 * This method is like `_.sortedIndex` except that it accepts `iteratee` 41170 * which is invoked for `value` and each element of `array` to compute their 41171 * sort ranking. The iteratee is invoked with one argument: (value). 41172 * 41173 * @static 41174 * @memberOf _ 41175 * @since 4.0.0 41176 * @category Array 41177 * @param {Array} array The sorted array to inspect. 41178 * @param {*} value The value to evaluate. 41179 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 41180 * @returns {number} Returns the index at which `value` should be inserted 41181 * into `array`. 41182 * @example 41183 * 41184 * var objects = [{ 'x': 4 }, { 'x': 5 }]; 41185 * 41186 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); 41187 * // => 0 41188 * 41189 * // The `_.property` iteratee shorthand. 41190 * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); 41191 * // => 0 41192 */ 41193 function sortedIndexBy(array, value, iteratee) { 41194 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); 41195 } 41196 41197 /** 41198 * This method is like `_.indexOf` except that it performs a binary 41199 * search on a sorted `array`. 41200 * 41201 * @static 41202 * @memberOf _ 41203 * @since 4.0.0 41204 * @category Array 41205 * @param {Array} array The array to inspect. 41206 * @param {*} value The value to search for. 41207 * @returns {number} Returns the index of the matched value, else `-1`. 41208 * @example 41209 * 41210 * _.sortedIndexOf([4, 5, 5, 5, 6], 5); 41211 * // => 1 41212 */ 41213 function sortedIndexOf(array, value) { 41214 var length = array == null ? 0 : array.length; 41215 if (length) { 41216 var index = baseSortedIndex(array, value); 41217 if (index < length && eq(array[index], value)) { 41218 return index; 41219 } 41220 } 41221 return -1; 41222 } 41223 41224 /** 41225 * This method is like `_.sortedIndex` except that it returns the highest 41226 * index at which `value` should be inserted into `array` in order to 41227 * maintain its sort order. 41228 * 41229 * @static 41230 * @memberOf _ 41231 * @since 3.0.0 41232 * @category Array 41233 * @param {Array} array The sorted array to inspect. 41234 * @param {*} value The value to evaluate. 41235 * @returns {number} Returns the index at which `value` should be inserted 41236 * into `array`. 41237 * @example 41238 * 41239 * _.sortedLastIndex([4, 5, 5, 5, 6], 5); 41240 * // => 4 41241 */ 41242 function sortedLastIndex(array, value) { 41243 return baseSortedIndex(array, value, true); 41244 } 41245 41246 /** 41247 * This method is like `_.sortedLastIndex` except that it accepts `iteratee` 41248 * which is invoked for `value` and each element of `array` to compute their 41249 * sort ranking. The iteratee is invoked with one argument: (value). 41250 * 41251 * @static 41252 * @memberOf _ 41253 * @since 4.0.0 41254 * @category Array 41255 * @param {Array} array The sorted array to inspect. 41256 * @param {*} value The value to evaluate. 41257 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 41258 * @returns {number} Returns the index at which `value` should be inserted 41259 * into `array`. 41260 * @example 41261 * 41262 * var objects = [{ 'x': 4 }, { 'x': 5 }]; 41263 * 41264 * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); 41265 * // => 1 41266 * 41267 * // The `_.property` iteratee shorthand. 41268 * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); 41269 * // => 1 41270 */ 41271 function sortedLastIndexBy(array, value, iteratee) { 41272 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); 41273 } 41274 41275 /** 41276 * This method is like `_.lastIndexOf` except that it performs a binary 41277 * search on a sorted `array`. 41278 * 41279 * @static 41280 * @memberOf _ 41281 * @since 4.0.0 41282 * @category Array 41283 * @param {Array} array The array to inspect. 41284 * @param {*} value The value to search for. 41285 * @returns {number} Returns the index of the matched value, else `-1`. 41286 * @example 41287 * 41288 * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); 41289 * // => 3 41290 */ 41291 function sortedLastIndexOf(array, value) { 41292 var length = array == null ? 0 : array.length; 41293 if (length) { 41294 var index = baseSortedIndex(array, value, true) - 1; 41295 if (eq(array[index], value)) { 41296 return index; 41297 } 41298 } 41299 return -1; 41300 } 41301 41302 /** 41303 * This method is like `_.uniq` except that it's designed and optimized 41304 * for sorted arrays. 41305 * 41306 * @static 41307 * @memberOf _ 41308 * @since 4.0.0 41309 * @category Array 41310 * @param {Array} array The array to inspect. 41311 * @returns {Array} Returns the new duplicate free array. 41312 * @example 41313 * 41314 * _.sortedUniq([1, 1, 2]); 41315 * // => [1, 2] 41316 */ 41317 function sortedUniq(array) { 41318 return (array && array.length) 41319 ? baseSortedUniq(array) 41320 : []; 41321 } 41322 41323 /** 41324 * This method is like `_.uniqBy` except that it's designed and optimized 41325 * for sorted arrays. 41326 * 41327 * @static 41328 * @memberOf _ 41329 * @since 4.0.0 41330 * @category Array 41331 * @param {Array} array The array to inspect. 41332 * @param {Function} [iteratee] The iteratee invoked per element. 41333 * @returns {Array} Returns the new duplicate free array. 41334 * @example 41335 * 41336 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); 41337 * // => [1.1, 2.3] 41338 */ 41339 function sortedUniqBy(array, iteratee) { 41340 return (array && array.length) 41341 ? baseSortedUniq(array, getIteratee(iteratee, 2)) 41342 : []; 41343 } 41344 41345 /** 41346 * Gets all but the first element of `array`. 41347 * 41348 * @static 41349 * @memberOf _ 41350 * @since 4.0.0 41351 * @category Array 41352 * @param {Array} array The array to query. 41353 * @returns {Array} Returns the slice of `array`. 41354 * @example 41355 * 41356 * _.tail([1, 2, 3]); 41357 * // => [2, 3] 41358 */ 41359 function tail(array) { 41360 var length = array == null ? 0 : array.length; 41361 return length ? baseSlice(array, 1, length) : []; 41362 } 41363 41364 /** 41365 * Creates a slice of `array` with `n` elements taken from the beginning. 41366 * 41367 * @static 41368 * @memberOf _ 41369 * @since 0.1.0 41370 * @category Array 41371 * @param {Array} array The array to query. 41372 * @param {number} [n=1] The number of elements to take. 41373 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 41374 * @returns {Array} Returns the slice of `array`. 41375 * @example 41376 * 41377 * _.take([1, 2, 3]); 41378 * // => [1] 41379 * 41380 * _.take([1, 2, 3], 2); 41381 * // => [1, 2] 41382 * 41383 * _.take([1, 2, 3], 5); 41384 * // => [1, 2, 3] 41385 * 41386 * _.take([1, 2, 3], 0); 41387 * // => [] 41388 */ 41389 function take(array, n, guard) { 41390 if (!(array && array.length)) { 41391 return []; 41392 } 41393 n = (guard || n === undefined) ? 1 : toInteger(n); 41394 return baseSlice(array, 0, n < 0 ? 0 : n); 41395 } 41396 41397 /** 41398 * Creates a slice of `array` with `n` elements taken from the end. 41399 * 41400 * @static 41401 * @memberOf _ 41402 * @since 3.0.0 41403 * @category Array 41404 * @param {Array} array The array to query. 41405 * @param {number} [n=1] The number of elements to take. 41406 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 41407 * @returns {Array} Returns the slice of `array`. 41408 * @example 41409 * 41410 * _.takeRight([1, 2, 3]); 41411 * // => [3] 41412 * 41413 * _.takeRight([1, 2, 3], 2); 41414 * // => [2, 3] 41415 * 41416 * _.takeRight([1, 2, 3], 5); 41417 * // => [1, 2, 3] 41418 * 41419 * _.takeRight([1, 2, 3], 0); 41420 * // => [] 41421 */ 41422 function takeRight(array, n, guard) { 41423 var length = array == null ? 0 : array.length; 41424 if (!length) { 41425 return []; 41426 } 41427 n = (guard || n === undefined) ? 1 : toInteger(n); 41428 n = length - n; 41429 return baseSlice(array, n < 0 ? 0 : n, length); 41430 } 41431 41432 /** 41433 * Creates a slice of `array` with elements taken from the end. Elements are 41434 * taken until `predicate` returns falsey. The predicate is invoked with 41435 * three arguments: (value, index, array). 41436 * 41437 * @static 41438 * @memberOf _ 41439 * @since 3.0.0 41440 * @category Array 41441 * @param {Array} array The array to query. 41442 * @param {Function} [predicate=_.identity] The function invoked per iteration. 41443 * @returns {Array} Returns the slice of `array`. 41444 * @example 41445 * 41446 * var users = [ 41447 * { 'user': 'barney', 'active': true }, 41448 * { 'user': 'fred', 'active': false }, 41449 * { 'user': 'pebbles', 'active': false } 41450 * ]; 41451 * 41452 * _.takeRightWhile(users, function(o) { return !o.active; }); 41453 * // => objects for ['fred', 'pebbles'] 41454 * 41455 * // The `_.matches` iteratee shorthand. 41456 * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); 41457 * // => objects for ['pebbles'] 41458 * 41459 * // The `_.matchesProperty` iteratee shorthand. 41460 * _.takeRightWhile(users, ['active', false]); 41461 * // => objects for ['fred', 'pebbles'] 41462 * 41463 * // The `_.property` iteratee shorthand. 41464 * _.takeRightWhile(users, 'active'); 41465 * // => [] 41466 */ 41467 function takeRightWhile(array, predicate) { 41468 return (array && array.length) 41469 ? baseWhile(array, getIteratee(predicate, 3), false, true) 41470 : []; 41471 } 41472 41473 /** 41474 * Creates a slice of `array` with elements taken from the beginning. Elements 41475 * are taken until `predicate` returns falsey. The predicate is invoked with 41476 * three arguments: (value, index, array). 41477 * 41478 * @static 41479 * @memberOf _ 41480 * @since 3.0.0 41481 * @category Array 41482 * @param {Array} array The array to query. 41483 * @param {Function} [predicate=_.identity] The function invoked per iteration. 41484 * @returns {Array} Returns the slice of `array`. 41485 * @example 41486 * 41487 * var users = [ 41488 * { 'user': 'barney', 'active': false }, 41489 * { 'user': 'fred', 'active': false }, 41490 * { 'user': 'pebbles', 'active': true } 41491 * ]; 41492 * 41493 * _.takeWhile(users, function(o) { return !o.active; }); 41494 * // => objects for ['barney', 'fred'] 41495 * 41496 * // The `_.matches` iteratee shorthand. 41497 * _.takeWhile(users, { 'user': 'barney', 'active': false }); 41498 * // => objects for ['barney'] 41499 * 41500 * // The `_.matchesProperty` iteratee shorthand. 41501 * _.takeWhile(users, ['active', false]); 41502 * // => objects for ['barney', 'fred'] 41503 * 41504 * // The `_.property` iteratee shorthand. 41505 * _.takeWhile(users, 'active'); 41506 * // => [] 41507 */ 41508 function takeWhile(array, predicate) { 41509 return (array && array.length) 41510 ? baseWhile(array, getIteratee(predicate, 3)) 41511 : []; 41512 } 41513 41514 /** 41515 * Creates an array of unique values, in order, from all given arrays using 41516 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 41517 * for equality comparisons. 41518 * 41519 * @static 41520 * @memberOf _ 41521 * @since 0.1.0 41522 * @category Array 41523 * @param {...Array} [arrays] The arrays to inspect. 41524 * @returns {Array} Returns the new array of combined values. 41525 * @example 41526 * 41527 * _.union([2], [1, 2]); 41528 * // => [2, 1] 41529 */ 41530 var union = baseRest(function(arrays) { 41531 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); 41532 }); 41533 41534 /** 41535 * This method is like `_.union` except that it accepts `iteratee` which is 41536 * invoked for each element of each `arrays` to generate the criterion by 41537 * which uniqueness is computed. Result values are chosen from the first 41538 * array in which the value occurs. The iteratee is invoked with one argument: 41539 * (value). 41540 * 41541 * @static 41542 * @memberOf _ 41543 * @since 4.0.0 41544 * @category Array 41545 * @param {...Array} [arrays] The arrays to inspect. 41546 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 41547 * @returns {Array} Returns the new array of combined values. 41548 * @example 41549 * 41550 * _.unionBy([2.1], [1.2, 2.3], Math.floor); 41551 * // => [2.1, 1.2] 41552 * 41553 * // The `_.property` iteratee shorthand. 41554 * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 41555 * // => [{ 'x': 1 }, { 'x': 2 }] 41556 */ 41557 var unionBy = baseRest(function(arrays) { 41558 var iteratee = last(arrays); 41559 if (isArrayLikeObject(iteratee)) { 41560 iteratee = undefined; 41561 } 41562 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); 41563 }); 41564 41565 /** 41566 * This method is like `_.union` except that it accepts `comparator` which 41567 * is invoked to compare elements of `arrays`. Result values are chosen from 41568 * the first array in which the value occurs. The comparator is invoked 41569 * with two arguments: (arrVal, othVal). 41570 * 41571 * @static 41572 * @memberOf _ 41573 * @since 4.0.0 41574 * @category Array 41575 * @param {...Array} [arrays] The arrays to inspect. 41576 * @param {Function} [comparator] The comparator invoked per element. 41577 * @returns {Array} Returns the new array of combined values. 41578 * @example 41579 * 41580 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 41581 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 41582 * 41583 * _.unionWith(objects, others, _.isEqual); 41584 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] 41585 */ 41586 var unionWith = baseRest(function(arrays) { 41587 var comparator = last(arrays); 41588 comparator = typeof comparator == 'function' ? comparator : undefined; 41589 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); 41590 }); 41591 41592 /** 41593 * Creates a duplicate-free version of an array, using 41594 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 41595 * for equality comparisons, in which only the first occurrence of each element 41596 * is kept. The order of result values is determined by the order they occur 41597 * in the array. 41598 * 41599 * @static 41600 * @memberOf _ 41601 * @since 0.1.0 41602 * @category Array 41603 * @param {Array} array The array to inspect. 41604 * @returns {Array} Returns the new duplicate free array. 41605 * @example 41606 * 41607 * _.uniq([2, 1, 2]); 41608 * // => [2, 1] 41609 */ 41610 function uniq(array) { 41611 return (array && array.length) ? baseUniq(array) : []; 41612 } 41613 41614 /** 41615 * This method is like `_.uniq` except that it accepts `iteratee` which is 41616 * invoked for each element in `array` to generate the criterion by which 41617 * uniqueness is computed. The order of result values is determined by the 41618 * order they occur in the array. The iteratee is invoked with one argument: 41619 * (value). 41620 * 41621 * @static 41622 * @memberOf _ 41623 * @since 4.0.0 41624 * @category Array 41625 * @param {Array} array The array to inspect. 41626 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 41627 * @returns {Array} Returns the new duplicate free array. 41628 * @example 41629 * 41630 * _.uniqBy([2.1, 1.2, 2.3], Math.floor); 41631 * // => [2.1, 1.2] 41632 * 41633 * // The `_.property` iteratee shorthand. 41634 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); 41635 * // => [{ 'x': 1 }, { 'x': 2 }] 41636 */ 41637 function uniqBy(array, iteratee) { 41638 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; 41639 } 41640 41641 /** 41642 * This method is like `_.uniq` except that it accepts `comparator` which 41643 * is invoked to compare elements of `array`. The order of result values is 41644 * determined by the order they occur in the array.The comparator is invoked 41645 * with two arguments: (arrVal, othVal). 41646 * 41647 * @static 41648 * @memberOf _ 41649 * @since 4.0.0 41650 * @category Array 41651 * @param {Array} array The array to inspect. 41652 * @param {Function} [comparator] The comparator invoked per element. 41653 * @returns {Array} Returns the new duplicate free array. 41654 * @example 41655 * 41656 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; 41657 * 41658 * _.uniqWith(objects, _.isEqual); 41659 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] 41660 */ 41661 function uniqWith(array, comparator) { 41662 comparator = typeof comparator == 'function' ? comparator : undefined; 41663 return (array && array.length) ? baseUniq(array, undefined, comparator) : []; 41664 } 41665 41666 /** 41667 * This method is like `_.zip` except that it accepts an array of grouped 41668 * elements and creates an array regrouping the elements to their pre-zip 41669 * configuration. 41670 * 41671 * @static 41672 * @memberOf _ 41673 * @since 1.2.0 41674 * @category Array 41675 * @param {Array} array The array of grouped elements to process. 41676 * @returns {Array} Returns the new array of regrouped elements. 41677 * @example 41678 * 41679 * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); 41680 * // => [['a', 1, true], ['b', 2, false]] 41681 * 41682 * _.unzip(zipped); 41683 * // => [['a', 'b'], [1, 2], [true, false]] 41684 */ 41685 function unzip(array) { 41686 if (!(array && array.length)) { 41687 return []; 41688 } 41689 var length = 0; 41690 array = arrayFilter(array, function(group) { 41691 if (isArrayLikeObject(group)) { 41692 length = nativeMax(group.length, length); 41693 return true; 41694 } 41695 }); 41696 return baseTimes(length, function(index) { 41697 return arrayMap(array, baseProperty(index)); 41698 }); 41699 } 41700 41701 /** 41702 * This method is like `_.unzip` except that it accepts `iteratee` to specify 41703 * how regrouped values should be combined. The iteratee is invoked with the 41704 * elements of each group: (...group). 41705 * 41706 * @static 41707 * @memberOf _ 41708 * @since 3.8.0 41709 * @category Array 41710 * @param {Array} array The array of grouped elements to process. 41711 * @param {Function} [iteratee=_.identity] The function to combine 41712 * regrouped values. 41713 * @returns {Array} Returns the new array of regrouped elements. 41714 * @example 41715 * 41716 * var zipped = _.zip([1, 2], [10, 20], [100, 200]); 41717 * // => [[1, 10, 100], [2, 20, 200]] 41718 * 41719 * _.unzipWith(zipped, _.add); 41720 * // => [3, 30, 300] 41721 */ 41722 function unzipWith(array, iteratee) { 41723 if (!(array && array.length)) { 41724 return []; 41725 } 41726 var result = unzip(array); 41727 if (iteratee == null) { 41728 return result; 41729 } 41730 return arrayMap(result, function(group) { 41731 return apply(iteratee, undefined, group); 41732 }); 41733 } 41734 41735 /** 41736 * Creates an array excluding all given values using 41737 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 41738 * for equality comparisons. 41739 * 41740 * **Note:** Unlike `_.pull`, this method returns a new array. 41741 * 41742 * @static 41743 * @memberOf _ 41744 * @since 0.1.0 41745 * @category Array 41746 * @param {Array} array The array to inspect. 41747 * @param {...*} [values] The values to exclude. 41748 * @returns {Array} Returns the new array of filtered values. 41749 * @see _.difference, _.xor 41750 * @example 41751 * 41752 * _.without([2, 1, 2, 3], 1, 2); 41753 * // => [3] 41754 */ 41755 var without = baseRest(function(array, values) { 41756 return isArrayLikeObject(array) 41757 ? baseDifference(array, values) 41758 : []; 41759 }); 41760 41761 /** 41762 * Creates an array of unique values that is the 41763 * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) 41764 * of the given arrays. The order of result values is determined by the order 41765 * they occur in the arrays. 41766 * 41767 * @static 41768 * @memberOf _ 41769 * @since 2.4.0 41770 * @category Array 41771 * @param {...Array} [arrays] The arrays to inspect. 41772 * @returns {Array} Returns the new array of filtered values. 41773 * @see _.difference, _.without 41774 * @example 41775 * 41776 * _.xor([2, 1], [2, 3]); 41777 * // => [1, 3] 41778 */ 41779 var xor = baseRest(function(arrays) { 41780 return baseXor(arrayFilter(arrays, isArrayLikeObject)); 41781 }); 41782 41783 /** 41784 * This method is like `_.xor` except that it accepts `iteratee` which is 41785 * invoked for each element of each `arrays` to generate the criterion by 41786 * which by which they're compared. The order of result values is determined 41787 * by the order they occur in the arrays. The iteratee is invoked with one 41788 * argument: (value). 41789 * 41790 * @static 41791 * @memberOf _ 41792 * @since 4.0.0 41793 * @category Array 41794 * @param {...Array} [arrays] The arrays to inspect. 41795 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 41796 * @returns {Array} Returns the new array of filtered values. 41797 * @example 41798 * 41799 * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); 41800 * // => [1.2, 3.4] 41801 * 41802 * // The `_.property` iteratee shorthand. 41803 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); 41804 * // => [{ 'x': 2 }] 41805 */ 41806 var xorBy = baseRest(function(arrays) { 41807 var iteratee = last(arrays); 41808 if (isArrayLikeObject(iteratee)) { 41809 iteratee = undefined; 41810 } 41811 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); 41812 }); 41813 41814 /** 41815 * This method is like `_.xor` except that it accepts `comparator` which is 41816 * invoked to compare elements of `arrays`. The order of result values is 41817 * determined by the order they occur in the arrays. The comparator is invoked 41818 * with two arguments: (arrVal, othVal). 41819 * 41820 * @static 41821 * @memberOf _ 41822 * @since 4.0.0 41823 * @category Array 41824 * @param {...Array} [arrays] The arrays to inspect. 41825 * @param {Function} [comparator] The comparator invoked per element. 41826 * @returns {Array} Returns the new array of filtered values. 41827 * @example 41828 * 41829 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; 41830 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; 41831 * 41832 * _.xorWith(objects, others, _.isEqual); 41833 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] 41834 */ 41835 var xorWith = baseRest(function(arrays) { 41836 var comparator = last(arrays); 41837 comparator = typeof comparator == 'function' ? comparator : undefined; 41838 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); 41839 }); 41840 41841 /** 41842 * Creates an array of grouped elements, the first of which contains the 41843 * first elements of the given arrays, the second of which contains the 41844 * second elements of the given arrays, and so on. 41845 * 41846 * @static 41847 * @memberOf _ 41848 * @since 0.1.0 41849 * @category Array 41850 * @param {...Array} [arrays] The arrays to process. 41851 * @returns {Array} Returns the new array of grouped elements. 41852 * @example 41853 * 41854 * _.zip(['a', 'b'], [1, 2], [true, false]); 41855 * // => [['a', 1, true], ['b', 2, false]] 41856 */ 41857 var zip = baseRest(unzip); 41858 41859 /** 41860 * This method is like `_.fromPairs` except that it accepts two arrays, 41861 * one of property identifiers and one of corresponding values. 41862 * 41863 * @static 41864 * @memberOf _ 41865 * @since 0.4.0 41866 * @category Array 41867 * @param {Array} [props=[]] The property identifiers. 41868 * @param {Array} [values=[]] The property values. 41869 * @returns {Object} Returns the new object. 41870 * @example 41871 * 41872 * _.zipObject(['a', 'b'], [1, 2]); 41873 * // => { 'a': 1, 'b': 2 } 41874 */ 41875 function zipObject(props, values) { 41876 return baseZipObject(props || [], values || [], assignValue); 41877 } 41878 41879 /** 41880 * This method is like `_.zipObject` except that it supports property paths. 41881 * 41882 * @static 41883 * @memberOf _ 41884 * @since 4.1.0 41885 * @category Array 41886 * @param {Array} [props=[]] The property identifiers. 41887 * @param {Array} [values=[]] The property values. 41888 * @returns {Object} Returns the new object. 41889 * @example 41890 * 41891 * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); 41892 * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } 41893 */ 41894 function zipObjectDeep(props, values) { 41895 return baseZipObject(props || [], values || [], baseSet); 41896 } 41897 41898 /** 41899 * This method is like `_.zip` except that it accepts `iteratee` to specify 41900 * how grouped values should be combined. The iteratee is invoked with the 41901 * elements of each group: (...group). 41902 * 41903 * @static 41904 * @memberOf _ 41905 * @since 3.8.0 41906 * @category Array 41907 * @param {...Array} [arrays] The arrays to process. 41908 * @param {Function} [iteratee=_.identity] The function to combine 41909 * grouped values. 41910 * @returns {Array} Returns the new array of grouped elements. 41911 * @example 41912 * 41913 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { 41914 * return a + b + c; 41915 * }); 41916 * // => [111, 222] 41917 */ 41918 var zipWith = baseRest(function(arrays) { 41919 var length = arrays.length, 41920 iteratee = length > 1 ? arrays[length - 1] : undefined; 41921 41922 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; 41923 return unzipWith(arrays, iteratee); 41924 }); 41925 41926 /*------------------------------------------------------------------------*/ 41927 41928 /** 41929 * Creates a `lodash` wrapper instance that wraps `value` with explicit method 41930 * chain sequences enabled. The result of such sequences must be unwrapped 41931 * with `_#value`. 41932 * 41933 * @static 41934 * @memberOf _ 41935 * @since 1.3.0 41936 * @category Seq 41937 * @param {*} value The value to wrap. 41938 * @returns {Object} Returns the new `lodash` wrapper instance. 41939 * @example 41940 * 41941 * var users = [ 41942 * { 'user': 'barney', 'age': 36 }, 41943 * { 'user': 'fred', 'age': 40 }, 41944 * { 'user': 'pebbles', 'age': 1 } 41945 * ]; 41946 * 41947 * var youngest = _ 41948 * .chain(users) 41949 * .sortBy('age') 41950 * .map(function(o) { 41951 * return o.user + ' is ' + o.age; 41952 * }) 41953 * .head() 41954 * .value(); 41955 * // => 'pebbles is 1' 41956 */ 41957 function chain(value) { 41958 var result = lodash(value); 41959 result.__chain__ = true; 41960 return result; 41961 } 41962 41963 /** 41964 * This method invokes `interceptor` and returns `value`. The interceptor 41965 * is invoked with one argument; (value). The purpose of this method is to 41966 * "tap into" a method chain sequence in order to modify intermediate results. 41967 * 41968 * @static 41969 * @memberOf _ 41970 * @since 0.1.0 41971 * @category Seq 41972 * @param {*} value The value to provide to `interceptor`. 41973 * @param {Function} interceptor The function to invoke. 41974 * @returns {*} Returns `value`. 41975 * @example 41976 * 41977 * _([1, 2, 3]) 41978 * .tap(function(array) { 41979 * // Mutate input array. 41980 * array.pop(); 41981 * }) 41982 * .reverse() 41983 * .value(); 41984 * // => [2, 1] 41985 */ 41986 function tap(value, interceptor) { 41987 interceptor(value); 41988 return value; 41989 } 41990 41991 /** 41992 * This method is like `_.tap` except that it returns the result of `interceptor`. 41993 * The purpose of this method is to "pass thru" values replacing intermediate 41994 * results in a method chain sequence. 41995 * 41996 * @static 41997 * @memberOf _ 41998 * @since 3.0.0 41999 * @category Seq 42000 * @param {*} value The value to provide to `interceptor`. 42001 * @param {Function} interceptor The function to invoke. 42002 * @returns {*} Returns the result of `interceptor`. 42003 * @example 42004 * 42005 * _(' abc ') 42006 * .chain() 42007 * .trim() 42008 * .thru(function(value) { 42009 * return [value]; 42010 * }) 42011 * .value(); 42012 * // => ['abc'] 42013 */ 42014 function thru(value, interceptor) { 42015 return interceptor(value); 42016 } 42017 42018 /** 42019 * This method is the wrapper version of `_.at`. 42020 * 42021 * @name at 42022 * @memberOf _ 42023 * @since 1.0.0 42024 * @category Seq 42025 * @param {...(string|string[])} [paths] The property paths to pick. 42026 * @returns {Object} Returns the new `lodash` wrapper instance. 42027 * @example 42028 * 42029 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; 42030 * 42031 * _(object).at(['a[0].b.c', 'a[1]']).value(); 42032 * // => [3, 4] 42033 */ 42034 var wrapperAt = flatRest(function(paths) { 42035 var length = paths.length, 42036 start = length ? paths[0] : 0, 42037 value = this.__wrapped__, 42038 interceptor = function(object) { return baseAt(object, paths); }; 42039 42040 if (length > 1 || this.__actions__.length || 42041 !(value instanceof LazyWrapper) || !isIndex(start)) { 42042 return this.thru(interceptor); 42043 } 42044 value = value.slice(start, +start + (length ? 1 : 0)); 42045 value.__actions__.push({ 42046 'func': thru, 42047 'args': [interceptor], 42048 'thisArg': undefined 42049 }); 42050 return new LodashWrapper(value, this.__chain__).thru(function(array) { 42051 if (length && !array.length) { 42052 array.push(undefined); 42053 } 42054 return array; 42055 }); 42056 }); 42057 42058 /** 42059 * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. 42060 * 42061 * @name chain 42062 * @memberOf _ 42063 * @since 0.1.0 42064 * @category Seq 42065 * @returns {Object} Returns the new `lodash` wrapper instance. 42066 * @example 42067 * 42068 * var users = [ 42069 * { 'user': 'barney', 'age': 36 }, 42070 * { 'user': 'fred', 'age': 40 } 42071 * ]; 42072 * 42073 * // A sequence without explicit chaining. 42074 * _(users).head(); 42075 * // => { 'user': 'barney', 'age': 36 } 42076 * 42077 * // A sequence with explicit chaining. 42078 * _(users) 42079 * .chain() 42080 * .head() 42081 * .pick('user') 42082 * .value(); 42083 * // => { 'user': 'barney' } 42084 */ 42085 function wrapperChain() { 42086 return chain(this); 42087 } 42088 42089 /** 42090 * Executes the chain sequence and returns the wrapped result. 42091 * 42092 * @name commit 42093 * @memberOf _ 42094 * @since 3.2.0 42095 * @category Seq 42096 * @returns {Object} Returns the new `lodash` wrapper instance. 42097 * @example 42098 * 42099 * var array = [1, 2]; 42100 * var wrapped = _(array).push(3); 42101 * 42102 * console.log(array); 42103 * // => [1, 2] 42104 * 42105 * wrapped = wrapped.commit(); 42106 * console.log(array); 42107 * // => [1, 2, 3] 42108 * 42109 * wrapped.last(); 42110 * // => 3 42111 * 42112 * console.log(array); 42113 * // => [1, 2, 3] 42114 */ 42115 function wrapperCommit() { 42116 return new LodashWrapper(this.value(), this.__chain__); 42117 } 42118 42119 /** 42120 * Gets the next value on a wrapped object following the 42121 * [iterator protocol](https://mdn.io/iteration_protocols#iterator). 42122 * 42123 * @name next 42124 * @memberOf _ 42125 * @since 4.0.0 42126 * @category Seq 42127 * @returns {Object} Returns the next iterator value. 42128 * @example 42129 * 42130 * var wrapped = _([1, 2]); 42131 * 42132 * wrapped.next(); 42133 * // => { 'done': false, 'value': 1 } 42134 * 42135 * wrapped.next(); 42136 * // => { 'done': false, 'value': 2 } 42137 * 42138 * wrapped.next(); 42139 * // => { 'done': true, 'value': undefined } 42140 */ 42141 function wrapperNext() { 42142 if (this.__values__ === undefined) { 42143 this.__values__ = toArray(this.value()); 42144 } 42145 var done = this.__index__ >= this.__values__.length, 42146 value = done ? undefined : this.__values__[this.__index__++]; 42147 42148 return { 'done': done, 'value': value }; 42149 } 42150 42151 /** 42152 * Enables the wrapper to be iterable. 42153 * 42154 * @name Symbol.iterator 42155 * @memberOf _ 42156 * @since 4.0.0 42157 * @category Seq 42158 * @returns {Object} Returns the wrapper object. 42159 * @example 42160 * 42161 * var wrapped = _([1, 2]); 42162 * 42163 * wrapped[Symbol.iterator]() === wrapped; 42164 * // => true 42165 * 42166 * Array.from(wrapped); 42167 * // => [1, 2] 42168 */ 42169 function wrapperToIterator() { 42170 return this; 42171 } 42172 42173 /** 42174 * Creates a clone of the chain sequence planting `value` as the wrapped value. 42175 * 42176 * @name plant 42177 * @memberOf _ 42178 * @since 3.2.0 42179 * @category Seq 42180 * @param {*} value The value to plant. 42181 * @returns {Object} Returns the new `lodash` wrapper instance. 42182 * @example 42183 * 42184 * function square(n) { 42185 * return n * n; 42186 * } 42187 * 42188 * var wrapped = _([1, 2]).map(square); 42189 * var other = wrapped.plant([3, 4]); 42190 * 42191 * other.value(); 42192 * // => [9, 16] 42193 * 42194 * wrapped.value(); 42195 * // => [1, 4] 42196 */ 42197 function wrapperPlant(value) { 42198 var result, 42199 parent = this; 42200 42201 while (parent instanceof baseLodash) { 42202 var clone = wrapperClone(parent); 42203 clone.__index__ = 0; 42204 clone.__values__ = undefined; 42205 if (result) { 42206 previous.__wrapped__ = clone; 42207 } else { 42208 result = clone; 42209 } 42210 var previous = clone; 42211 parent = parent.__wrapped__; 42212 } 42213 previous.__wrapped__ = value; 42214 return result; 42215 } 42216 42217 /** 42218 * This method is the wrapper version of `_.reverse`. 42219 * 42220 * **Note:** This method mutates the wrapped array. 42221 * 42222 * @name reverse 42223 * @memberOf _ 42224 * @since 0.1.0 42225 * @category Seq 42226 * @returns {Object} Returns the new `lodash` wrapper instance. 42227 * @example 42228 * 42229 * var array = [1, 2, 3]; 42230 * 42231 * _(array).reverse().value() 42232 * // => [3, 2, 1] 42233 * 42234 * console.log(array); 42235 * // => [3, 2, 1] 42236 */ 42237 function wrapperReverse() { 42238 var value = this.__wrapped__; 42239 if (value instanceof LazyWrapper) { 42240 var wrapped = value; 42241 if (this.__actions__.length) { 42242 wrapped = new LazyWrapper(this); 42243 } 42244 wrapped = wrapped.reverse(); 42245 wrapped.__actions__.push({ 42246 'func': thru, 42247 'args': [reverse], 42248 'thisArg': undefined 42249 }); 42250 return new LodashWrapper(wrapped, this.__chain__); 42251 } 42252 return this.thru(reverse); 42253 } 42254 42255 /** 42256 * Executes the chain sequence to resolve the unwrapped value. 42257 * 42258 * @name value 42259 * @memberOf _ 42260 * @since 0.1.0 42261 * @alias toJSON, valueOf 42262 * @category Seq 42263 * @returns {*} Returns the resolved unwrapped value. 42264 * @example 42265 * 42266 * _([1, 2, 3]).value(); 42267 * // => [1, 2, 3] 42268 */ 42269 function wrapperValue() { 42270 return baseWrapperValue(this.__wrapped__, this.__actions__); 42271 } 42272 42273 /*------------------------------------------------------------------------*/ 42274 42275 /**
vendor: 6,915 bytes, lines 42276-42466
42276 * Creates an object composed of keys generated from the results of running 42277 * each element of `collection` thru `iteratee`. The corresponding value of 42278 * each key is the number of times the key was returned by `iteratee`. The 42279 * iteratee is invoked with one argument: (value). 42280 * 42281 * @static 42282 * @memberOf _ 42283 * @since 0.5.0 42284 * @category Collection 42285 * @param {Array|Object} collection The collection to iterate over. 42286 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 42287 * @returns {Object} Returns the composed aggregate object. 42288 * @example 42289 * 42290 * _.countBy([6.1, 4.2, 6.3], Math.floor); 42291 * // => { '4': 1, '6': 2 } 42292 * 42293 * // The `_.property` iteratee shorthand. 42294 * _.countBy(['one', 'two', 'three'], 'length'); 42295 * // => { '3': 2, '5': 1 } 42296 */ 42297 var countBy = createAggregator(function(result, value, key) { 42298 if (hasOwnProperty.call(result, key)) { 42299 ++result[key]; 42300 } else { 42301 baseAssignValue(result, key, 1); 42302 } 42303 }); 42304 42305 /** 42306 * Checks if `predicate` returns truthy for **all** elements of `collection`. 42307 * Iteration is stopped once `predicate` returns falsey. The predicate is 42308 * invoked with three arguments: (value, index|key, collection). 42309 * 42310 * **Note:** This method returns `true` for 42311 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because 42312 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of 42313 * elements of empty collections. 42314 * 42315 * @static 42316 * @memberOf _ 42317 * @since 0.1.0 42318 * @category Collection 42319 * @param {Array|Object} collection The collection to iterate over. 42320 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42321 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 42322 * @returns {boolean} Returns `true` if all elements pass the predicate check, 42323 * else `false`. 42324 * @example 42325 * 42326 * _.every([true, 1, null, 'yes'], Boolean); 42327 * // => false 42328 * 42329 * var users = [ 42330 * { 'user': 'barney', 'age': 36, 'active': false }, 42331 * { 'user': 'fred', 'age': 40, 'active': false } 42332 * ]; 42333 * 42334 * // The `_.matches` iteratee shorthand. 42335 * _.every(users, { 'user': 'barney', 'active': false }); 42336 * // => false 42337 * 42338 * // The `_.matchesProperty` iteratee shorthand. 42339 * _.every(users, ['active', false]); 42340 * // => true 42341 * 42342 * // The `_.property` iteratee shorthand. 42343 * _.every(users, 'active'); 42344 * // => false 42345 */ 42346 function every(collection, predicate, guard) { 42347 var func = isArray(collection) ? arrayEvery : baseEvery; 42348 if (guard && isIterateeCall(collection, predicate, guard)) { 42349 predicate = undefined; 42350 } 42351 return func(collection, getIteratee(predicate, 3)); 42352 } 42353 42354 /** 42355 * Iterates over elements of `collection`, returning an array of all elements 42356 * `predicate` returns truthy for. The predicate is invoked with three 42357 * arguments: (value, index|key, collection). 42358 * 42359 * **Note:** Unlike `_.remove`, this method returns a new array. 42360 * 42361 * @static 42362 * @memberOf _ 42363 * @since 0.1.0 42364 * @category Collection 42365 * @param {Array|Object} collection The collection to iterate over. 42366 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42367 * @returns {Array} Returns the new filtered array. 42368 * @see _.reject 42369 * @example 42370 * 42371 * var users = [ 42372 * { 'user': 'barney', 'age': 36, 'active': true }, 42373 * { 'user': 'fred', 'age': 40, 'active': false } 42374 * ]; 42375 * 42376 * _.filter(users, function(o) { return !o.active; }); 42377 * // => objects for ['fred'] 42378 * 42379 * // The `_.matches` iteratee shorthand. 42380 * _.filter(users, { 'age': 36, 'active': true }); 42381 * // => objects for ['barney'] 42382 * 42383 * // The `_.matchesProperty` iteratee shorthand. 42384 * _.filter(users, ['active', false]); 42385 * // => objects for ['fred'] 42386 * 42387 * // The `_.property` iteratee shorthand. 42388 * _.filter(users, 'active'); 42389 * // => objects for ['barney'] 42390 */ 42391 function filter(collection, predicate) { 42392 var func = isArray(collection) ? arrayFilter : baseFilter; 42393 return func(collection, getIteratee(predicate, 3)); 42394 } 42395 42396 /** 42397 * Iterates over elements of `collection`, returning the first element 42398 * `predicate` returns truthy for. The predicate is invoked with three 42399 * arguments: (value, index|key, collection). 42400 * 42401 * @static 42402 * @memberOf _ 42403 * @since 0.1.0 42404 * @category Collection 42405 * @param {Array|Object} collection The collection to inspect. 42406 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42407 * @param {number} [fromIndex=0] The index to search from. 42408 * @returns {*} Returns the matched element, else `undefined`. 42409 * @example 42410 * 42411 * var users = [ 42412 * { 'user': 'barney', 'age': 36, 'active': true }, 42413 * { 'user': 'fred', 'age': 40, 'active': false }, 42414 * { 'user': 'pebbles', 'age': 1, 'active': true } 42415 * ]; 42416 * 42417 * _.find(users, function(o) { return o.age < 40; }); 42418 * // => object for 'barney' 42419 * 42420 * // The `_.matches` iteratee shorthand. 42421 * _.find(users, { 'age': 1, 'active': true }); 42422 * // => object for 'pebbles' 42423 * 42424 * // The `_.matchesProperty` iteratee shorthand. 42425 * _.find(users, ['active', false]); 42426 * // => object for 'fred' 42427 * 42428 * // The `_.property` iteratee shorthand. 42429 * _.find(users, 'active'); 42430 * // => object for 'barney' 42431 */ 42432 var find = createFind(findIndex); 42433 42434 /** 42435 * This method is like `_.find` except that it iterates over elements of 42436 * `collection` from right to left. 42437 * 42438 * @static 42439 * @memberOf _ 42440 * @since 2.0.0 42441 * @category Collection 42442 * @param {Array|Object} collection The collection to inspect. 42443 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42444 * @param {number} [fromIndex=collection.length-1] The index to search from. 42445 * @returns {*} Returns the matched element, else `undefined`. 42446 * @example 42447 * 42448 * _.findLast([1, 2, 3, 4], function(n) { 42449 * return n % 2 == 1; 42450 * }); 42451 * // => 3 42452 */ 42453 var findLast = createFind(findLastIndex); 42454 42455 /** 42456 * Creates a flattened array of values by running each element in `collection` 42457 * thru `iteratee` and flattening the mapped results. The iteratee is invoked 42458 * with three arguments: (value, index|key, collection). 42459 * 42460 * @static 42461 * @memberOf _ 42462 * @since 4.0.0 42463 * @category Collection 42464 * @param {Array|Object} collection The collection to iterate over. 42465 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42466 * @returns {Array} Returns the new flattened array.
vendor: 3,950 bytes, lines 42467-42590
42467 * @example 42468 * 42469 * function duplicate(n) { 42470 * return [n, n]; 42471 * } 42472 * 42473 * _.flatMap([1, 2], duplicate); 42474 * // => [1, 1, 2, 2] 42475 */ 42476 function flatMap(collection, iteratee) { 42477 return baseFlatten(map(collection, iteratee), 1); 42478 } 42479 42480 /** 42481 * This method is like `_.flatMap` except that it recursively flattens the 42482 * mapped results. 42483 * 42484 * @static 42485 * @memberOf _ 42486 * @since 4.7.0 42487 * @category Collection 42488 * @param {Array|Object} collection The collection to iterate over. 42489 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42490 * @returns {Array} Returns the new flattened array. 42491 * @example 42492 * 42493 * function duplicate(n) { 42494 * return [[[n, n]]]; 42495 * } 42496 * 42497 * _.flatMapDeep([1, 2], duplicate); 42498 * // => [1, 1, 2, 2] 42499 */ 42500 function flatMapDeep(collection, iteratee) { 42501 return baseFlatten(map(collection, iteratee), INFINITY); 42502 } 42503 42504 /** 42505 * This method is like `_.flatMap` except that it recursively flattens the 42506 * mapped results up to `depth` times. 42507 * 42508 * @static 42509 * @memberOf _ 42510 * @since 4.7.0 42511 * @category Collection 42512 * @param {Array|Object} collection The collection to iterate over. 42513 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42514 * @param {number} [depth=1] The maximum recursion depth. 42515 * @returns {Array} Returns the new flattened array. 42516 * @example 42517 * 42518 * function duplicate(n) { 42519 * return [[[n, n]]]; 42520 * } 42521 * 42522 * _.flatMapDepth([1, 2], duplicate, 2); 42523 * // => [[1, 1], [2, 2]] 42524 */ 42525 function flatMapDepth(collection, iteratee, depth) { 42526 depth = depth === undefined ? 1 : toInteger(depth); 42527 return baseFlatten(map(collection, iteratee), depth); 42528 } 42529 42530 /** 42531 * Iterates over elements of `collection` and invokes `iteratee` for each element. 42532 * The iteratee is invoked with three arguments: (value, index|key, collection). 42533 * Iteratee functions may exit iteration early by explicitly returning `false`. 42534 * 42535 * **Note:** As with other "Collections" methods, objects with a "length" 42536 * property are iterated like arrays. To avoid this behavior use `_.forIn` 42537 * or `_.forOwn` for object iteration. 42538 * 42539 * @static 42540 * @memberOf _ 42541 * @since 0.1.0 42542 * @alias each 42543 * @category Collection 42544 * @param {Array|Object} collection The collection to iterate over. 42545 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42546 * @returns {Array|Object} Returns `collection`. 42547 * @see _.forEachRight 42548 * @example 42549 * 42550 * _.forEach([1, 2], function(value) { 42551 * console.log(value); 42552 * }); 42553 * // => Logs `1` then `2`. 42554 * 42555 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { 42556 * console.log(key); 42557 * }); 42558 * // => Logs 'a' then 'b' (iteration order is not guaranteed). 42559 */ 42560 function forEach(collection, iteratee) { 42561 var func = isArray(collection) ? arrayEach : baseEach; 42562 return func(collection, getIteratee(iteratee, 3)); 42563 } 42564 42565 /** 42566 * This method is like `_.forEach` except that it iterates over elements of 42567 * `collection` from right to left. 42568 * 42569 * @static 42570 * @memberOf _ 42571 * @since 2.0.0 42572 * @alias eachRight 42573 * @category Collection 42574 * @param {Array|Object} collection The collection to iterate over. 42575 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42576 * @returns {Array|Object} Returns `collection`. 42577 * @see _.forEach 42578 * @example 42579 * 42580 * _.forEachRight([1, 2], function(value) { 42581 * console.log(value); 42582 * }); 42583 * // => Logs `2` then `1`. 42584 */ 42585 function forEachRight(collection, iteratee) { 42586 var func = isArray(collection) ? arrayEachRight : baseEachRight; 42587 return func(collection, getIteratee(iteratee, 3)); 42588 } 42589 42590 /**
vendor: 4,136 bytes, lines 42591-42698
42591 * Creates an object composed of keys generated from the results of running 42592 * each element of `collection` thru `iteratee`. The order of grouped values 42593 * is determined by the order they occur in `collection`. The corresponding 42594 * value of each key is an array of elements responsible for generating the 42595 * key. The iteratee is invoked with one argument: (value). 42596 * 42597 * @static 42598 * @memberOf _ 42599 * @since 0.1.0 42600 * @category Collection 42601 * @param {Array|Object} collection The collection to iterate over. 42602 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 42603 * @returns {Object} Returns the composed aggregate object. 42604 * @example 42605 * 42606 * _.groupBy([6.1, 4.2, 6.3], Math.floor); 42607 * // => { '4': [4.2], '6': [6.1, 6.3] } 42608 * 42609 * // The `_.property` iteratee shorthand. 42610 * _.groupBy(['one', 'two', 'three'], 'length'); 42611 * // => { '3': ['one', 'two'], '5': ['three'] } 42612 */ 42613 var groupBy = createAggregator(function(result, value, key) { 42614 if (hasOwnProperty.call(result, key)) { 42615 result[key].push(value); 42616 } else { 42617 baseAssignValue(result, key, [value]); 42618 } 42619 }); 42620 42621 /** 42622 * Checks if `value` is in `collection`. If `collection` is a string, it's 42623 * checked for a substring of `value`, otherwise 42624 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 42625 * is used for equality comparisons. If `fromIndex` is negative, it's used as 42626 * the offset from the end of `collection`. 42627 * 42628 * @static 42629 * @memberOf _ 42630 * @since 0.1.0 42631 * @category Collection 42632 * @param {Array|Object|string} collection The collection to inspect. 42633 * @param {*} value The value to search for. 42634 * @param {number} [fromIndex=0] The index to search from. 42635 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. 42636 * @returns {boolean} Returns `true` if `value` is found, else `false`. 42637 * @example 42638 * 42639 * _.includes([1, 2, 3], 1); 42640 * // => true 42641 * 42642 * _.includes([1, 2, 3], 1, 2); 42643 * // => false 42644 * 42645 * _.includes({ 'a': 1, 'b': 2 }, 1); 42646 * // => true 42647 * 42648 * _.includes('abcd', 'bc'); 42649 * // => true 42650 */ 42651 function includes(collection, value, fromIndex, guard) { 42652 collection = isArrayLike(collection) ? collection : values(collection); 42653 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; 42654 42655 var length = collection.length; 42656 if (fromIndex < 0) { 42657 fromIndex = nativeMax(length + fromIndex, 0); 42658 } 42659 return isString(collection) 42660 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) 42661 : (!!length && baseIndexOf(collection, value, fromIndex) > -1); 42662 } 42663 42664 /** 42665 * Invokes the method at `path` of each element in `collection`, returning 42666 * an array of the results of each invoked method. Any additional arguments 42667 * are provided to each invoked method. If `path` is a function, it's invoked 42668 * for, and `this` bound to, each element in `collection`. 42669 * 42670 * @static 42671 * @memberOf _ 42672 * @since 4.0.0 42673 * @category Collection 42674 * @param {Array|Object} collection The collection to iterate over. 42675 * @param {Array|Function|string} path The path of the method to invoke or 42676 * the function invoked per iteration. 42677 * @param {...*} [args] The arguments to invoke each method with. 42678 * @returns {Array} Returns the array of results. 42679 * @example 42680 * 42681 * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); 42682 * // => [[1, 5, 7], [1, 2, 3]] 42683 * 42684 * _.invokeMap([123, 456], String.prototype.split, ''); 42685 * // => [['1', '2', '3'], ['4', '5', '6']] 42686 */ 42687 var invokeMap = baseRest(function(collection, path, args) { 42688 var index = -1, 42689 isFunc = typeof path == 'function', 42690 result = isArrayLike(collection) ? Array(collection.length) : []; 42691 42692 baseEach(collection, function(value) { 42693 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); 42694 }); 42695 return result; 42696 }); 42697 42698 /**
vendor: 15,265 bytes, lines 42699-43133
42699 * Creates an object composed of keys generated from the results of running 42700 * each element of `collection` thru `iteratee`. The corresponding value of 42701 * each key is the last element responsible for generating the key. The 42702 * iteratee is invoked with one argument: (value). 42703 * 42704 * @static 42705 * @memberOf _ 42706 * @since 4.0.0 42707 * @category Collection 42708 * @param {Array|Object} collection The collection to iterate over. 42709 * @param {Function} [iteratee=_.identity] The iteratee to transform keys. 42710 * @returns {Object} Returns the composed aggregate object. 42711 * @example 42712 * 42713 * var array = [ 42714 * { 'dir': 'left', 'code': 97 }, 42715 * { 'dir': 'right', 'code': 100 } 42716 * ]; 42717 * 42718 * _.keyBy(array, function(o) { 42719 * return String.fromCharCode(o.code); 42720 * }); 42721 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } 42722 * 42723 * _.keyBy(array, 'dir'); 42724 * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } 42725 */ 42726 var keyBy = createAggregator(function(result, value, key) { 42727 baseAssignValue(result, key, value); 42728 }); 42729 42730 /** 42731 * Creates an array of values by running each element in `collection` thru 42732 * `iteratee`. The iteratee is invoked with three arguments: 42733 * (value, index|key, collection). 42734 * 42735 * Many lodash methods are guarded to work as iteratees for methods like 42736 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. 42737 * 42738 * The guarded methods are: 42739 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, 42740 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, 42741 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, 42742 * `template`, `trim`, `trimEnd`, `trimStart`, and `words` 42743 * 42744 * @static 42745 * @memberOf _ 42746 * @since 0.1.0 42747 * @category Collection 42748 * @param {Array|Object} collection The collection to iterate over. 42749 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42750 * @returns {Array} Returns the new mapped array. 42751 * @example 42752 * 42753 * function square(n) { 42754 * return n * n; 42755 * } 42756 * 42757 * _.map([4, 8], square); 42758 * // => [16, 64] 42759 * 42760 * _.map({ 'a': 4, 'b': 8 }, square); 42761 * // => [16, 64] (iteration order is not guaranteed) 42762 * 42763 * var users = [ 42764 * { 'user': 'barney' }, 42765 * { 'user': 'fred' } 42766 * ]; 42767 * 42768 * // The `_.property` iteratee shorthand. 42769 * _.map(users, 'user'); 42770 * // => ['barney', 'fred'] 42771 */ 42772 function map(collection, iteratee) { 42773 var func = isArray(collection) ? arrayMap : baseMap; 42774 return func(collection, getIteratee(iteratee, 3)); 42775 } 42776 42777 /** 42778 * This method is like `_.sortBy` except that it allows specifying the sort 42779 * orders of the iteratees to sort by. If `orders` is unspecified, all values 42780 * are sorted in ascending order. Otherwise, specify an order of "desc" for 42781 * descending or "asc" for ascending sort order of corresponding values. 42782 * 42783 * @static 42784 * @memberOf _ 42785 * @since 4.0.0 42786 * @category Collection 42787 * @param {Array|Object} collection The collection to iterate over. 42788 * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] 42789 * The iteratees to sort by. 42790 * @param {string[]} [orders] The sort orders of `iteratees`. 42791 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. 42792 * @returns {Array} Returns the new sorted array. 42793 * @example 42794 * 42795 * var users = [ 42796 * { 'user': 'fred', 'age': 48 }, 42797 * { 'user': 'barney', 'age': 34 }, 42798 * { 'user': 'fred', 'age': 40 }, 42799 * { 'user': 'barney', 'age': 36 } 42800 * ]; 42801 * 42802 * // Sort by `user` in ascending order and by `age` in descending order. 42803 * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); 42804 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] 42805 */ 42806 function orderBy(collection, iteratees, orders, guard) { 42807 if (collection == null) { 42808 return []; 42809 } 42810 if (!isArray(iteratees)) { 42811 iteratees = iteratees == null ? [] : [iteratees]; 42812 } 42813 orders = guard ? undefined : orders; 42814 if (!isArray(orders)) { 42815 orders = orders == null ? [] : [orders]; 42816 } 42817 return baseOrderBy(collection, iteratees, orders); 42818 } 42819 42820 /** 42821 * Creates an array of elements split into two groups, the first of which 42822 * contains elements `predicate` returns truthy for, the second of which 42823 * contains elements `predicate` returns falsey for. The predicate is 42824 * invoked with one argument: (value). 42825 * 42826 * @static 42827 * @memberOf _ 42828 * @since 3.0.0 42829 * @category Collection 42830 * @param {Array|Object} collection The collection to iterate over. 42831 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42832 * @returns {Array} Returns the array of grouped elements. 42833 * @example 42834 * 42835 * var users = [ 42836 * { 'user': 'barney', 'age': 36, 'active': false }, 42837 * { 'user': 'fred', 'age': 40, 'active': true }, 42838 * { 'user': 'pebbles', 'age': 1, 'active': false } 42839 * ]; 42840 * 42841 * _.partition(users, function(o) { return o.active; }); 42842 * // => objects for [['fred'], ['barney', 'pebbles']] 42843 * 42844 * // The `_.matches` iteratee shorthand. 42845 * _.partition(users, { 'age': 1, 'active': false }); 42846 * // => objects for [['pebbles'], ['barney', 'fred']] 42847 * 42848 * // The `_.matchesProperty` iteratee shorthand. 42849 * _.partition(users, ['active', false]); 42850 * // => objects for [['barney', 'pebbles'], ['fred']] 42851 * 42852 * // The `_.property` iteratee shorthand. 42853 * _.partition(users, 'active'); 42854 * // => objects for [['fred'], ['barney', 'pebbles']] 42855 */ 42856 var partition = createAggregator(function(result, value, key) { 42857 result[key ? 0 : 1].push(value); 42858 }, function() { return [[], []]; }); 42859 42860 /** 42861 * Reduces `collection` to a value which is the accumulated result of running 42862 * each element in `collection` thru `iteratee`, where each successive 42863 * invocation is supplied the return value of the previous. If `accumulator` 42864 * is not given, the first element of `collection` is used as the initial 42865 * value. The iteratee is invoked with four arguments: 42866 * (accumulator, value, index|key, collection). 42867 * 42868 * Many lodash methods are guarded to work as iteratees for methods like 42869 * `_.reduce`, `_.reduceRight`, and `_.transform`. 42870 * 42871 * The guarded methods are: 42872 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, 42873 * and `sortBy` 42874 * 42875 * @static 42876 * @memberOf _ 42877 * @since 0.1.0 42878 * @category Collection 42879 * @param {Array|Object} collection The collection to iterate over. 42880 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42881 * @param {*} [accumulator] The initial value. 42882 * @returns {*} Returns the accumulated value. 42883 * @see _.reduceRight 42884 * @example 42885 * 42886 * _.reduce([1, 2], function(sum, n) { 42887 * return sum + n; 42888 * }, 0); 42889 * // => 3 42890 * 42891 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { 42892 * (result[value] || (result[value] = [])).push(key); 42893 * return result; 42894 * }, {}); 42895 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) 42896 */ 42897 function reduce(collection, iteratee, accumulator) { 42898 var func = isArray(collection) ? arrayReduce : baseReduce, 42899 initAccum = arguments.length < 3; 42900 42901 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); 42902 } 42903 42904 /** 42905 * This method is like `_.reduce` except that it iterates over elements of 42906 * `collection` from right to left. 42907 * 42908 * @static 42909 * @memberOf _ 42910 * @since 0.1.0 42911 * @category Collection 42912 * @param {Array|Object} collection The collection to iterate over. 42913 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 42914 * @param {*} [accumulator] The initial value. 42915 * @returns {*} Returns the accumulated value. 42916 * @see _.reduce 42917 * @example 42918 * 42919 * var array = [[0, 1], [2, 3], [4, 5]]; 42920 * 42921 * _.reduceRight(array, function(flattened, other) { 42922 * return flattened.concat(other); 42923 * }, []); 42924 * // => [4, 5, 2, 3, 0, 1] 42925 */ 42926 function reduceRight(collection, iteratee, accumulator) { 42927 var func = isArray(collection) ? arrayReduceRight : baseReduce, 42928 initAccum = arguments.length < 3; 42929 42930 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); 42931 } 42932 42933 /** 42934 * The opposite of `_.filter`; this method returns the elements of `collection` 42935 * that `predicate` does **not** return truthy for. 42936 * 42937 * @static 42938 * @memberOf _ 42939 * @since 0.1.0 42940 * @category Collection 42941 * @param {Array|Object} collection The collection to iterate over. 42942 * @param {Function} [predicate=_.identity] The function invoked per iteration. 42943 * @returns {Array} Returns the new filtered array. 42944 * @see _.filter 42945 * @example 42946 * 42947 * var users = [ 42948 * { 'user': 'barney', 'age': 36, 'active': false }, 42949 * { 'user': 'fred', 'age': 40, 'active': true } 42950 * ]; 42951 * 42952 * _.reject(users, function(o) { return !o.active; }); 42953 * // => objects for ['fred'] 42954 * 42955 * // The `_.matches` iteratee shorthand. 42956 * _.reject(users, { 'age': 40, 'active': true }); 42957 * // => objects for ['barney'] 42958 * 42959 * // The `_.matchesProperty` iteratee shorthand. 42960 * _.reject(users, ['active', false]); 42961 * // => objects for ['fred'] 42962 * 42963 * // The `_.property` iteratee shorthand. 42964 * _.reject(users, 'active'); 42965 * // => objects for ['barney'] 42966 */ 42967 function reject(collection, predicate) { 42968 var func = isArray(collection) ? arrayFilter : baseFilter; 42969 return func(collection, negate(getIteratee(predicate, 3))); 42970 } 42971 42972 /** 42973 * Gets a random element from `collection`. 42974 * 42975 * @static 42976 * @memberOf _ 42977 * @since 2.0.0 42978 * @category Collection 42979 * @param {Array|Object} collection The collection to sample. 42980 * @returns {*} Returns the random element. 42981 * @example 42982 * 42983 * _.sample([1, 2, 3, 4]); 42984 * // => 2 42985 */ 42986 function sample(collection) { 42987 var func = isArray(collection) ? arraySample : baseSample; 42988 return func(collection); 42989 } 42990 42991 /** 42992 * Gets `n` random elements at unique keys from `collection` up to the 42993 * size of `collection`. 42994 * 42995 * @static 42996 * @memberOf _ 42997 * @since 4.0.0 42998 * @category Collection 42999 * @param {Array|Object} collection The collection to sample. 43000 * @param {number} [n=1] The number of elements to sample. 43001 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 43002 * @returns {Array} Returns the random elements. 43003 * @example 43004 * 43005 * _.sampleSize([1, 2, 3], 2); 43006 * // => [3, 1] 43007 * 43008 * _.sampleSize([1, 2, 3], 4); 43009 * // => [2, 3, 1] 43010 */ 43011 function sampleSize(collection, n, guard) { 43012 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { 43013 n = 1; 43014 } else { 43015 n = toInteger(n); 43016 } 43017 var func = isArray(collection) ? arraySampleSize : baseSampleSize; 43018 return func(collection, n); 43019 } 43020 43021 /** 43022 * Creates an array of shuffled values, using a version of the 43023 * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). 43024 * 43025 * @static 43026 * @memberOf _ 43027 * @since 0.1.0 43028 * @category Collection 43029 * @param {Array|Object} collection The collection to shuffle. 43030 * @returns {Array} Returns the new shuffled array. 43031 * @example 43032 * 43033 * _.shuffle([1, 2, 3, 4]); 43034 * // => [4, 1, 3, 2] 43035 */ 43036 function shuffle(collection) { 43037 var func = isArray(collection) ? arrayShuffle : baseShuffle; 43038 return func(collection); 43039 } 43040 43041 /** 43042 * Gets the size of `collection` by returning its length for array-like 43043 * values or the number of own enumerable string keyed properties for objects. 43044 * 43045 * @static 43046 * @memberOf _ 43047 * @since 0.1.0 43048 * @category Collection 43049 * @param {Array|Object|string} collection The collection to inspect. 43050 * @returns {number} Returns the collection size. 43051 * @example 43052 * 43053 * _.size([1, 2, 3]); 43054 * // => 3 43055 * 43056 * _.size({ 'a': 1, 'b': 2 }); 43057 * // => 2 43058 * 43059 * _.size('pebbles'); 43060 * // => 7 43061 */ 43062 function size(collection) { 43063 if (collection == null) { 43064 return 0; 43065 } 43066 if (isArrayLike(collection)) { 43067 return isString(collection) ? stringSize(collection) : collection.length; 43068 } 43069 var tag = getTag(collection); 43070 if (tag == mapTag || tag == setTag) { 43071 return collection.size; 43072 } 43073 return baseKeys(collection).length; 43074 } 43075 43076 /** 43077 * Checks if `predicate` returns truthy for **any** element of `collection`. 43078 * Iteration is stopped once `predicate` returns truthy. The predicate is 43079 * invoked with three arguments: (value, index|key, collection). 43080 * 43081 * @static 43082 * @memberOf _ 43083 * @since 0.1.0 43084 * @category Collection 43085 * @param {Array|Object} collection The collection to iterate over. 43086 * @param {Function} [predicate=_.identity] The function invoked per iteration. 43087 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 43088 * @returns {boolean} Returns `true` if any element passes the predicate check, 43089 * else `false`. 43090 * @example 43091 * 43092 * _.some([null, 0, 'yes', false], Boolean); 43093 * // => true 43094 * 43095 * var users = [ 43096 * { 'user': 'barney', 'active': true }, 43097 * { 'user': 'fred', 'active': false } 43098 * ]; 43099 * 43100 * // The `_.matches` iteratee shorthand. 43101 * _.some(users, { 'user': 'barney', 'active': false }); 43102 * // => false 43103 * 43104 * // The `_.matchesProperty` iteratee shorthand. 43105 * _.some(users, ['active', false]); 43106 * // => true 43107 * 43108 * // The `_.property` iteratee shorthand. 43109 * _.some(users, 'active'); 43110 * // => true 43111 */ 43112 function some(collection, predicate, guard) { 43113 var func = isArray(collection) ? arraySome : baseSome; 43114 if (guard && isIterateeCall(collection, predicate, guard)) { 43115 predicate = undefined; 43116 } 43117 return func(collection, getIteratee(predicate, 3)); 43118 } 43119 43120 /** 43121 * Creates an array of elements, sorted in ascending order by the results of 43122 * running each element in a collection thru each iteratee. This method 43123 * performs a stable sort, that is, it preserves the original sort order of 43124 * equal elements. The iteratees are invoked with one argument: (value). 43125 * 43126 * @static 43127 * @memberOf _ 43128 * @since 0.1.0 43129 * @category Collection 43130 * @param {Array|Object} collection The collection to iterate over. 43131 * @param {...(Function|Function[])} [iteratees=[_.identity]] 43132 * The iteratees to sort by. 43133 * @returns {Array} Returns the new sorted array.
vendor: 6,758 bytes, lines 43134-43336
43134 * @example 43135 * 43136 * var users = [ 43137 * { 'user': 'fred', 'age': 48 }, 43138 * { 'user': 'barney', 'age': 36 }, 43139 * { 'user': 'fred', 'age': 40 }, 43140 * { 'user': 'barney', 'age': 34 } 43141 * ]; 43142 * 43143 * _.sortBy(users, [function(o) { return o.user; }]); 43144 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] 43145 * 43146 * _.sortBy(users, ['user', 'age']); 43147 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] 43148 */ 43149 var sortBy = baseRest(function(collection, iteratees) { 43150 if (collection == null) { 43151 return []; 43152 } 43153 var length = iteratees.length; 43154 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { 43155 iteratees = []; 43156 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { 43157 iteratees = [iteratees[0]]; 43158 } 43159 return baseOrderBy(collection, baseFlatten(iteratees, 1), []); 43160 }); 43161 43162 /*------------------------------------------------------------------------*/ 43163 43164 /** 43165 * Gets the timestamp of the number of milliseconds that have elapsed since 43166 * the Unix epoch (1 January 1970 00:00:00 UTC). 43167 * 43168 * @static 43169 * @memberOf _ 43170 * @since 2.4.0 43171 * @category Date 43172 * @returns {number} Returns the timestamp. 43173 * @example 43174 * 43175 * _.defer(function(stamp) { 43176 * console.log(_.now() - stamp); 43177 * }, _.now()); 43178 * // => Logs the number of milliseconds it took for the deferred invocation. 43179 */ 43180 var now = ctxNow || function() { 43181 return root.Date.now(); 43182 }; 43183 43184 /*------------------------------------------------------------------------*/ 43185 43186 /** 43187 * The opposite of `_.before`; this method creates a function that invokes 43188 * `func` once it's called `n` or more times. 43189 * 43190 * @static 43191 * @memberOf _ 43192 * @since 0.1.0 43193 * @category Function 43194 * @param {number} n The number of calls before `func` is invoked. 43195 * @param {Function} func The function to restrict. 43196 * @returns {Function} Returns the new restricted function. 43197 * @example 43198 * 43199 * var saves = ['profile', 'settings']; 43200 * 43201 * var done = _.after(saves.length, function() { 43202 * console.log('done saving!'); 43203 * }); 43204 * 43205 * _.forEach(saves, function(type) { 43206 * asyncSave({ 'type': type, 'complete': done }); 43207 * }); 43208 * // => Logs 'done saving!' after the two async saves have completed. 43209 */ 43210 function after(n, func) { 43211 if (typeof func != 'function') { 43212 throw new TypeError(FUNC_ERROR_TEXT); 43213 } 43214 n = toInteger(n); 43215 return function() { 43216 if (--n < 1) { 43217 return func.apply(this, arguments); 43218 } 43219 }; 43220 } 43221 43222 /** 43223 * Creates a function that invokes `func`, with up to `n` arguments, 43224 * ignoring any additional arguments. 43225 * 43226 * @static 43227 * @memberOf _ 43228 * @since 3.0.0 43229 * @category Function 43230 * @param {Function} func The function to cap arguments for. 43231 * @param {number} [n=func.length] The arity cap. 43232 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 43233 * @returns {Function} Returns the new capped function. 43234 * @example 43235 * 43236 * _.map(['6', '8', '10'], _.ary(parseInt, 1)); 43237 * // => [6, 8, 10] 43238 */ 43239 function ary(func, n, guard) { 43240 n = guard ? undefined : n; 43241 n = (func && n == null) ? func.length : n; 43242 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); 43243 } 43244 43245 /** 43246 * Creates a function that invokes `func`, with the `this` binding and arguments 43247 * of the created function, while it's called less than `n` times. Subsequent 43248 * calls to the created function return the result of the last `func` invocation. 43249 * 43250 * @static 43251 * @memberOf _ 43252 * @since 3.0.0 43253 * @category Function 43254 * @param {number} n The number of calls at which `func` is no longer invoked. 43255 * @param {Function} func The function to restrict. 43256 * @returns {Function} Returns the new restricted function. 43257 * @example 43258 * 43259 * jQuery(element).on('click', _.before(5, addContactToList)); 43260 * // => Allows adding up to 4 contacts to the list. 43261 */ 43262 function before(n, func) { 43263 var result; 43264 if (typeof func != 'function') { 43265 throw new TypeError(FUNC_ERROR_TEXT); 43266 } 43267 n = toInteger(n); 43268 return function() { 43269 if (--n > 0) { 43270 result = func.apply(this, arguments); 43271 } 43272 if (n <= 1) { 43273 func = undefined; 43274 } 43275 return result; 43276 }; 43277 } 43278 43279 /** 43280 * Creates a function that invokes `func` with the `this` binding of `thisArg` 43281 * and `partials` prepended to the arguments it receives. 43282 * 43283 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, 43284 * may be used as a placeholder for partially applied arguments. 43285 * 43286 * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" 43287 * property of bound functions. 43288 * 43289 * @static 43290 * @memberOf _ 43291 * @since 0.1.0 43292 * @category Function 43293 * @param {Function} func The function to bind. 43294 * @param {*} thisArg The `this` binding of `func`. 43295 * @param {...*} [partials] The arguments to be partially applied. 43296 * @returns {Function} Returns the new bound function. 43297 * @example 43298 * 43299 * function greet(greeting, punctuation) { 43300 * return greeting + ' ' + this.user + punctuation; 43301 * } 43302 * 43303 * var object = { 'user': 'fred' }; 43304 * 43305 * var bound = _.bind(greet, object, 'hi'); 43306 * bound('!'); 43307 * // => 'hi fred!' 43308 * 43309 * // Bound with placeholders. 43310 * var bound = _.bind(greet, object, _, '!'); 43311 * bound('hi'); 43312 * // => 'hi fred!' 43313 */ 43314 var bind = baseRest(function(func, thisArg, partials) { 43315 var bitmask = WRAP_BIND_FLAG; 43316 if (partials.length) { 43317 var holders = replaceHolders(partials, getHolder(bind)); 43318 bitmask |= WRAP_PARTIAL_FLAG; 43319 } 43320 return createWrap(func, bitmask, thisArg, partials, holders); 43321 }); 43322 43323 /** 43324 * Creates a function that invokes the method at `object[key]` with `partials` 43325 * prepended to the arguments it receives. 43326 * 43327 * This method differs from `_.bind` by allowing bound functions to reference 43328 * methods that may be redefined or don't yet exist. See 43329 * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) 43330 * for more details. 43331 * 43332 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic 43333 * builds, may be used as a placeholder for partially applied arguments. 43334 * 43335 * @static 43336 * @memberOf _
vendor: 46,477 bytes, lines 43337-44813
43337 * @since 0.10.0 43338 * @category Function 43339 * @param {Object} object The object to invoke the method on. 43340 * @param {string} key The key of the method. 43341 * @param {...*} [partials] The arguments to be partially applied. 43342 * @returns {Function} Returns the new bound function. 43343 * @example 43344 * 43345 * var object = { 43346 * 'user': 'fred', 43347 * 'greet': function(greeting, punctuation) { 43348 * return greeting + ' ' + this.user + punctuation; 43349 * } 43350 * }; 43351 * 43352 * var bound = _.bindKey(object, 'greet', 'hi'); 43353 * bound('!'); 43354 * // => 'hi fred!' 43355 * 43356 * object.greet = function(greeting, punctuation) { 43357 * return greeting + 'ya ' + this.user + punctuation; 43358 * }; 43359 * 43360 * bound('!'); 43361 * // => 'hiya fred!' 43362 * 43363 * // Bound with placeholders. 43364 * var bound = _.bindKey(object, 'greet', _, '!'); 43365 * bound('hi'); 43366 * // => 'hiya fred!' 43367 */ 43368 var bindKey = baseRest(function(object, key, partials) { 43369 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; 43370 if (partials.length) { 43371 var holders = replaceHolders(partials, getHolder(bindKey)); 43372 bitmask |= WRAP_PARTIAL_FLAG; 43373 } 43374 return createWrap(key, bitmask, object, partials, holders); 43375 }); 43376 43377 /** 43378 * Creates a function that accepts arguments of `func` and either invokes 43379 * `func` returning its result, if at least `arity` number of arguments have 43380 * been provided, or returns a function that accepts the remaining `func` 43381 * arguments, and so on. The arity of `func` may be specified if `func.length` 43382 * is not sufficient. 43383 * 43384 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, 43385 * may be used as a placeholder for provided arguments. 43386 * 43387 * **Note:** This method doesn't set the "length" property of curried functions. 43388 * 43389 * @static 43390 * @memberOf _ 43391 * @since 2.0.0 43392 * @category Function 43393 * @param {Function} func The function to curry. 43394 * @param {number} [arity=func.length] The arity of `func`. 43395 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 43396 * @returns {Function} Returns the new curried function. 43397 * @example 43398 * 43399 * var abc = function(a, b, c) { 43400 * return [a, b, c]; 43401 * }; 43402 * 43403 * var curried = _.curry(abc); 43404 * 43405 * curried(1)(2)(3); 43406 * // => [1, 2, 3] 43407 * 43408 * curried(1, 2)(3); 43409 * // => [1, 2, 3] 43410 * 43411 * curried(1, 2, 3); 43412 * // => [1, 2, 3] 43413 * 43414 * // Curried with placeholders. 43415 * curried(1)(_, 3)(2); 43416 * // => [1, 2, 3] 43417 */ 43418 function curry(func, arity, guard) { 43419 arity = guard ? undefined : arity; 43420 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); 43421 result.placeholder = curry.placeholder; 43422 return result; 43423 } 43424 43425 /** 43426 * This method is like `_.curry` except that arguments are applied to `func` 43427 * in the manner of `_.partialRight` instead of `_.partial`. 43428 * 43429 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic 43430 * builds, may be used as a placeholder for provided arguments. 43431 * 43432 * **Note:** This method doesn't set the "length" property of curried functions. 43433 * 43434 * @static 43435 * @memberOf _ 43436 * @since 3.0.0 43437 * @category Function 43438 * @param {Function} func The function to curry. 43439 * @param {number} [arity=func.length] The arity of `func`. 43440 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 43441 * @returns {Function} Returns the new curried function. 43442 * @example 43443 * 43444 * var abc = function(a, b, c) { 43445 * return [a, b, c]; 43446 * }; 43447 * 43448 * var curried = _.curryRight(abc); 43449 * 43450 * curried(3)(2)(1); 43451 * // => [1, 2, 3] 43452 * 43453 * curried(2, 3)(1); 43454 * // => [1, 2, 3] 43455 * 43456 * curried(1, 2, 3); 43457 * // => [1, 2, 3] 43458 * 43459 * // Curried with placeholders. 43460 * curried(3)(1, _)(2); 43461 * // => [1, 2, 3] 43462 */ 43463 function curryRight(func, arity, guard) { 43464 arity = guard ? undefined : arity; 43465 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); 43466 result.placeholder = curryRight.placeholder; 43467 return result; 43468 } 43469 43470 /** 43471 * Creates a debounced function that delays invoking `func` until after `wait` 43472 * milliseconds have elapsed since the last time the debounced function was 43473 * invoked. The debounced function comes with a `cancel` method to cancel 43474 * delayed `func` invocations and a `flush` method to immediately invoke them. 43475 * Provide `options` to indicate whether `func` should be invoked on the 43476 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked 43477 * with the last arguments provided to the debounced function. Subsequent 43478 * calls to the debounced function return the result of the last `func` 43479 * invocation. 43480 * 43481 * **Note:** If `leading` and `trailing` options are `true`, `func` is 43482 * invoked on the trailing edge of the timeout only if the debounced function 43483 * is invoked more than once during the `wait` timeout. 43484 * 43485 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred 43486 * until to the next tick, similar to `setTimeout` with a timeout of `0`. 43487 * 43488 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) 43489 * for details over the differences between `_.debounce` and `_.throttle`. 43490 * 43491 * @static 43492 * @memberOf _ 43493 * @since 0.1.0 43494 * @category Function 43495 * @param {Function} func The function to debounce. 43496 * @param {number} [wait=0] The number of milliseconds to delay. 43497 * @param {Object} [options={}] The options object. 43498 * @param {boolean} [options.leading=false] 43499 * Specify invoking on the leading edge of the timeout. 43500 * @param {number} [options.maxWait] 43501 * The maximum time `func` is allowed to be delayed before it's invoked. 43502 * @param {boolean} [options.trailing=true] 43503 * Specify invoking on the trailing edge of the timeout. 43504 * @returns {Function} Returns the new debounced function. 43505 * @example 43506 * 43507 * // Avoid costly calculations while the window size is in flux. 43508 * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); 43509 * 43510 * // Invoke `sendMail` when clicked, debouncing subsequent calls. 43511 * jQuery(element).on('click', _.debounce(sendMail, 300, { 43512 * 'leading': true, 43513 * 'trailing': false 43514 * })); 43515 * 43516 * // Ensure `batchLog` is invoked once after 1 second of debounced calls. 43517 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); 43518 * var source = new EventSource('/stream'); 43519 * jQuery(source).on('message', debounced); 43520 * 43521 * // Cancel the trailing debounced invocation. 43522 * jQuery(window).on('popstate', debounced.cancel); 43523 */ 43524 function debounce(func, wait, options) { 43525 var lastArgs, 43526 lastThis, 43527 maxWait, 43528 result, 43529 timerId, 43530 lastCallTime, 43531 lastInvokeTime = 0, 43532 leading = false, 43533 maxing = false, 43534 trailing = true; 43535 43536 if (typeof func != 'function') { 43537 throw new TypeError(FUNC_ERROR_TEXT); 43538 } 43539 wait = toNumber(wait) || 0; 43540 if (isObject(options)) { 43541 leading = !!options.leading; 43542 maxing = 'maxWait' in options; 43543 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; 43544 trailing = 'trailing' in options ? !!options.trailing : trailing; 43545 } 43546 43547 function invokeFunc(time) { 43548 var args = lastArgs, 43549 thisArg = lastThis; 43550 43551 lastArgs = lastThis = undefined; 43552 lastInvokeTime = time; 43553 result = func.apply(thisArg, args); 43554 return result; 43555 } 43556 43557 function leadingEdge(time) { 43558 // Reset any `maxWait` timer. 43559 lastInvokeTime = time; 43560 // Start the timer for the trailing edge. 43561 timerId = setTimeout(timerExpired, wait); 43562 // Invoke the leading edge. 43563 return leading ? invokeFunc(time) : result; 43564 } 43565 43566 function remainingWait(time) { 43567 var timeSinceLastCall = time - lastCallTime, 43568 timeSinceLastInvoke = time - lastInvokeTime, 43569 timeWaiting = wait - timeSinceLastCall; 43570 43571 return maxing 43572 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) 43573 : timeWaiting; 43574 } 43575 43576 function shouldInvoke(time) { 43577 var timeSinceLastCall = time - lastCallTime, 43578 timeSinceLastInvoke = time - lastInvokeTime; 43579 43580 // Either this is the first call, activity has stopped and we're at the 43581 // trailing edge, the system time has gone backwards and we're treating 43582 // it as the trailing edge, or we've hit the `maxWait` limit. 43583 return (lastCallTime === undefined || (timeSinceLastCall >= wait) || 43584 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); 43585 } 43586 43587 function timerExpired() { 43588 var time = now(); 43589 if (shouldInvoke(time)) { 43590 return trailingEdge(time); 43591 } 43592 // Restart the timer. 43593 timerId = setTimeout(timerExpired, remainingWait(time)); 43594 } 43595 43596 function trailingEdge(time) { 43597 timerId = undefined; 43598 43599 // Only invoke if we have `lastArgs` which means `func` has been 43600 // debounced at least once. 43601 if (trailing && lastArgs) { 43602 return invokeFunc(time); 43603 } 43604 lastArgs = lastThis = undefined; 43605 return result; 43606 } 43607 43608 function cancel() { 43609 if (timerId !== undefined) { 43610 clearTimeout(timerId); 43611 } 43612 lastInvokeTime = 0; 43613 lastArgs = lastCallTime = lastThis = timerId = undefined; 43614 } 43615 43616 function flush() { 43617 return timerId === undefined ? result : trailingEdge(now()); 43618 } 43619 43620 function debounced() { 43621 var time = now(), 43622 isInvoking = shouldInvoke(time); 43623 43624 lastArgs = arguments; 43625 lastThis = this; 43626 lastCallTime = time; 43627 43628 if (isInvoking) { 43629 if (timerId === undefined) { 43630 return leadingEdge(lastCallTime); 43631 } 43632 if (maxing) { 43633 // Handle invocations in a tight loop. 43634 clearTimeout(timerId); 43635 timerId = setTimeout(timerExpired, wait); 43636 return invokeFunc(lastCallTime); 43637 } 43638 } 43639 if (timerId === undefined) { 43640 timerId = setTimeout(timerExpired, wait); 43641 } 43642 return result; 43643 } 43644 debounced.cancel = cancel; 43645 debounced.flush = flush; 43646 return debounced; 43647 } 43648 43649 /** 43650 * Defers invoking the `func` until the current call stack has cleared. Any 43651 * additional arguments are provided to `func` when it's invoked. 43652 * 43653 * @static 43654 * @memberOf _ 43655 * @since 0.1.0 43656 * @category Function 43657 * @param {Function} func The function to defer. 43658 * @param {...*} [args] The arguments to invoke `func` with. 43659 * @returns {number} Returns the timer id. 43660 * @example 43661 * 43662 * _.defer(function(text) { 43663 * console.log(text); 43664 * }, 'deferred'); 43665 * // => Logs 'deferred' after one millisecond. 43666 */ 43667 var defer = baseRest(function(func, args) { 43668 return baseDelay(func, 1, args); 43669 }); 43670 43671 /** 43672 * Invokes `func` after `wait` milliseconds. Any additional arguments are 43673 * provided to `func` when it's invoked. 43674 * 43675 * @static 43676 * @memberOf _ 43677 * @since 0.1.0 43678 * @category Function 43679 * @param {Function} func The function to delay. 43680 * @param {number} wait The number of milliseconds to delay invocation. 43681 * @param {...*} [args] The arguments to invoke `func` with. 43682 * @returns {number} Returns the timer id. 43683 * @example 43684 * 43685 * _.delay(function(text) { 43686 * console.log(text); 43687 * }, 1000, 'later'); 43688 * // => Logs 'later' after one second. 43689 */ 43690 var delay = baseRest(function(func, wait, args) { 43691 return baseDelay(func, toNumber(wait) || 0, args); 43692 }); 43693 43694 /** 43695 * Creates a function that invokes `func` with arguments reversed. 43696 * 43697 * @static 43698 * @memberOf _ 43699 * @since 4.0.0 43700 * @category Function 43701 * @param {Function} func The function to flip arguments for. 43702 * @returns {Function} Returns the new flipped function. 43703 * @example 43704 * 43705 * var flipped = _.flip(function() { 43706 * return _.toArray(arguments); 43707 * }); 43708 * 43709 * flipped('a', 'b', 'c', 'd'); 43710 * // => ['d', 'c', 'b', 'a'] 43711 */ 43712 function flip(func) { 43713 return createWrap(func, WRAP_FLIP_FLAG); 43714 } 43715 43716 /** 43717 * Creates a function that memoizes the result of `func`. If `resolver` is 43718 * provided, it determines the cache key for storing the result based on the 43719 * arguments provided to the memoized function. By default, the first argument 43720 * provided to the memoized function is used as the map cache key. The `func` 43721 * is invoked with the `this` binding of the memoized function. 43722 * 43723 * **Note:** The cache is exposed as the `cache` property on the memoized 43724 * function. Its creation may be customized by replacing the `_.memoize.Cache` 43725 * constructor with one whose instances implement the 43726 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) 43727 * method interface of `clear`, `delete`, `get`, `has`, and `set`. 43728 * 43729 * @static 43730 * @memberOf _ 43731 * @since 0.1.0 43732 * @category Function 43733 * @param {Function} func The function to have its output memoized. 43734 * @param {Function} [resolver] The function to resolve the cache key. 43735 * @returns {Function} Returns the new memoized function. 43736 * @example 43737 * 43738 * var object = { 'a': 1, 'b': 2 }; 43739 * var other = { 'c': 3, 'd': 4 }; 43740 * 43741 * var values = _.memoize(_.values); 43742 * values(object); 43743 * // => [1, 2] 43744 * 43745 * values(other); 43746 * // => [3, 4] 43747 * 43748 * object.a = 2; 43749 * values(object); 43750 * // => [1, 2] 43751 * 43752 * // Modify the result cache. 43753 * values.cache.set(object, ['a', 'b']); 43754 * values(object); 43755 * // => ['a', 'b'] 43756 * 43757 * // Replace `_.memoize.Cache`. 43758 * _.memoize.Cache = WeakMap; 43759 */ 43760 function memoize(func, resolver) { 43761 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { 43762 throw new TypeError(FUNC_ERROR_TEXT); 43763 } 43764 var memoized = function() { 43765 var args = arguments, 43766 key = resolver ? resolver.apply(this, args) : args[0], 43767 cache = memoized.cache; 43768 43769 if (cache.has(key)) { 43770 return cache.get(key); 43771 } 43772 var result = func.apply(this, args); 43773 memoized.cache = cache.set(key, result) || cache; 43774 return result; 43775 }; 43776 memoized.cache = new (memoize.Cache || MapCache); 43777 return memoized; 43778 } 43779 43780 // Expose `MapCache`. 43781 memoize.Cache = MapCache; 43782 43783 /** 43784 * Creates a function that negates the result of the predicate `func`. The 43785 * `func` predicate is invoked with the `this` binding and arguments of the 43786 * created function. 43787 * 43788 * @static 43789 * @memberOf _ 43790 * @since 3.0.0 43791 * @category Function 43792 * @param {Function} predicate The predicate to negate. 43793 * @returns {Function} Returns the new negated function. 43794 * @example 43795 * 43796 * function isEven(n) { 43797 * return n % 2 == 0; 43798 * } 43799 * 43800 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); 43801 * // => [1, 3, 5] 43802 */ 43803 function negate(predicate) { 43804 if (typeof predicate != 'function') { 43805 throw new TypeError(FUNC_ERROR_TEXT); 43806 } 43807 return function() { 43808 var args = arguments; 43809 switch (args.length) { 43810 case 0: return !predicate.call(this); 43811 case 1: return !predicate.call(this, args[0]); 43812 case 2: return !predicate.call(this, args[0], args[1]); 43813 case 3: return !predicate.call(this, args[0], args[1], args[2]); 43814 } 43815 return !predicate.apply(this, args); 43816 }; 43817 } 43818 43819 /** 43820 * Creates a function that is restricted to invoking `func` once. Repeat calls 43821 * to the function return the value of the first invocation. The `func` is 43822 * invoked with the `this` binding and arguments of the created function. 43823 * 43824 * @static 43825 * @memberOf _ 43826 * @since 0.1.0 43827 * @category Function 43828 * @param {Function} func The function to restrict. 43829 * @returns {Function} Returns the new restricted function. 43830 * @example 43831 * 43832 * var initialize = _.once(createApplication); 43833 * initialize(); 43834 * initialize(); 43835 * // => `createApplication` is invoked once 43836 */ 43837 function once(func) { 43838 return before(2, func); 43839 } 43840 43841 /** 43842 * Creates a function that invokes `func` with its arguments transformed. 43843 * 43844 * @static 43845 * @since 4.0.0 43846 * @memberOf _ 43847 * @category Function 43848 * @param {Function} func The function to wrap. 43849 * @param {...(Function|Function[])} [transforms=[_.identity]] 43850 * The argument transforms. 43851 * @returns {Function} Returns the new function. 43852 * @example 43853 * 43854 * function doubled(n) { 43855 * return n * 2; 43856 * } 43857 * 43858 * function square(n) { 43859 * return n * n; 43860 * } 43861 * 43862 * var func = _.overArgs(function(x, y) { 43863 * return [x, y]; 43864 * }, [square, doubled]); 43865 * 43866 * func(9, 3); 43867 * // => [81, 6] 43868 * 43869 * func(10, 5); 43870 * // => [100, 10] 43871 */ 43872 var overArgs = castRest(function(func, transforms) { 43873 transforms = (transforms.length == 1 && isArray(transforms[0])) 43874 ? arrayMap(transforms[0], baseUnary(getIteratee())) 43875 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); 43876 43877 var funcsLength = transforms.length; 43878 return baseRest(function(args) { 43879 var index = -1, 43880 length = nativeMin(args.length, funcsLength); 43881 43882 while (++index < length) { 43883 args[index] = transforms[index].call(this, args[index]); 43884 } 43885 return apply(func, this, args); 43886 }); 43887 }); 43888 43889 /** 43890 * Creates a function that invokes `func` with `partials` prepended to the 43891 * arguments it receives. This method is like `_.bind` except it does **not** 43892 * alter the `this` binding. 43893 * 43894 * The `_.partial.placeholder` value, which defaults to `_` in monolithic 43895 * builds, may be used as a placeholder for partially applied arguments. 43896 * 43897 * **Note:** This method doesn't set the "length" property of partially 43898 * applied functions. 43899 * 43900 * @static 43901 * @memberOf _ 43902 * @since 0.2.0 43903 * @category Function 43904 * @param {Function} func The function to partially apply arguments to. 43905 * @param {...*} [partials] The arguments to be partially applied. 43906 * @returns {Function} Returns the new partially applied function. 43907 * @example 43908 * 43909 * function greet(greeting, name) { 43910 * return greeting + ' ' + name; 43911 * } 43912 * 43913 * var sayHelloTo = _.partial(greet, 'hello'); 43914 * sayHelloTo('fred'); 43915 * // => 'hello fred' 43916 * 43917 * // Partially applied with placeholders. 43918 * var greetFred = _.partial(greet, _, 'fred'); 43919 * greetFred('hi'); 43920 * // => 'hi fred' 43921 */ 43922 var partial = baseRest(function(func, partials) { 43923 var holders = replaceHolders(partials, getHolder(partial)); 43924 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); 43925 }); 43926 43927 /** 43928 * This method is like `_.partial` except that partially applied arguments 43929 * are appended to the arguments it receives. 43930 * 43931 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic 43932 * builds, may be used as a placeholder for partially applied arguments. 43933 * 43934 * **Note:** This method doesn't set the "length" property of partially 43935 * applied functions. 43936 * 43937 * @static 43938 * @memberOf _ 43939 * @since 1.0.0 43940 * @category Function 43941 * @param {Function} func The function to partially apply arguments to. 43942 * @param {...*} [partials] The arguments to be partially applied. 43943 * @returns {Function} Returns the new partially applied function. 43944 * @example 43945 * 43946 * function greet(greeting, name) { 43947 * return greeting + ' ' + name; 43948 * } 43949 * 43950 * var greetFred = _.partialRight(greet, 'fred'); 43951 * greetFred('hi'); 43952 * // => 'hi fred' 43953 * 43954 * // Partially applied with placeholders. 43955 * var sayHelloTo = _.partialRight(greet, 'hello', _); 43956 * sayHelloTo('fred'); 43957 * // => 'hello fred' 43958 */ 43959 var partialRight = baseRest(function(func, partials) { 43960 var holders = replaceHolders(partials, getHolder(partialRight)); 43961 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); 43962 }); 43963 43964 /** 43965 * Creates a function that invokes `func` with arguments arranged according 43966 * to the specified `indexes` where the argument value at the first index is 43967 * provided as the first argument, the argument value at the second index is 43968 * provided as the second argument, and so on. 43969 * 43970 * @static 43971 * @memberOf _ 43972 * @since 3.0.0 43973 * @category Function 43974 * @param {Function} func The function to rearrange arguments for. 43975 * @param {...(number|number[])} indexes The arranged argument indexes. 43976 * @returns {Function} Returns the new function. 43977 * @example 43978 * 43979 * var rearged = _.rearg(function(a, b, c) { 43980 * return [a, b, c]; 43981 * }, [2, 0, 1]); 43982 * 43983 * rearged('b', 'c', 'a') 43984 * // => ['a', 'b', 'c'] 43985 */ 43986 var rearg = flatRest(function(func, indexes) { 43987 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); 43988 }); 43989 43990 /** 43991 * Creates a function that invokes `func` with the `this` binding of the 43992 * created function and arguments from `start` and beyond provided as 43993 * an array. 43994 * 43995 * **Note:** This method is based on the 43996 * [rest parameter](https://mdn.io/rest_parameters). 43997 * 43998 * @static 43999 * @memberOf _ 44000 * @since 4.0.0 44001 * @category Function 44002 * @param {Function} func The function to apply a rest parameter to. 44003 * @param {number} [start=func.length-1] The start position of the rest parameter. 44004 * @returns {Function} Returns the new function. 44005 * @example 44006 * 44007 * var say = _.rest(function(what, names) { 44008 * return what + ' ' + _.initial(names).join(', ') + 44009 * (_.size(names) > 1 ? ', & ' : '') + _.last(names); 44010 * }); 44011 * 44012 * say('hello', 'fred', 'barney', 'pebbles'); 44013 * // => 'hello fred, barney, & pebbles' 44014 */ 44015 function rest(func, start) { 44016 if (typeof func != 'function') { 44017 throw new TypeError(FUNC_ERROR_TEXT); 44018 } 44019 start = start === undefined ? start : toInteger(start); 44020 return baseRest(func, start); 44021 } 44022 44023 /** 44024 * Creates a function that invokes `func` with the `this` binding of the 44025 * create function and an array of arguments much like 44026 * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). 44027 * 44028 * **Note:** This method is based on the 44029 * [spread operator](https://mdn.io/spread_operator). 44030 * 44031 * @static 44032 * @memberOf _ 44033 * @since 3.2.0 44034 * @category Function 44035 * @param {Function} func The function to spread arguments over. 44036 * @param {number} [start=0] The start position of the spread. 44037 * @returns {Function} Returns the new function. 44038 * @example 44039 * 44040 * var say = _.spread(function(who, what) { 44041 * return who + ' says ' + what; 44042 * }); 44043 * 44044 * say(['fred', 'hello']); 44045 * // => 'fred says hello' 44046 * 44047 * var numbers = Promise.all([ 44048 * Promise.resolve(40), 44049 * Promise.resolve(36) 44050 * ]); 44051 * 44052 * numbers.then(_.spread(function(x, y) { 44053 * return x + y; 44054 * })); 44055 * // => a Promise of 76 44056 */ 44057 function spread(func, start) { 44058 if (typeof func != 'function') { 44059 throw new TypeError(FUNC_ERROR_TEXT); 44060 } 44061 start = start == null ? 0 : nativeMax(toInteger(start), 0); 44062 return baseRest(function(args) { 44063 var array = args[start], 44064 otherArgs = castSlice(args, 0, start); 44065 44066 if (array) { 44067 arrayPush(otherArgs, array); 44068 } 44069 return apply(func, this, otherArgs); 44070 }); 44071 } 44072 44073 /** 44074 * Creates a throttled function that only invokes `func` at most once per 44075 * every `wait` milliseconds. The throttled function comes with a `cancel` 44076 * method to cancel delayed `func` invocations and a `flush` method to 44077 * immediately invoke them. Provide `options` to indicate whether `func` 44078 * should be invoked on the leading and/or trailing edge of the `wait` 44079 * timeout. The `func` is invoked with the last arguments provided to the 44080 * throttled function. Subsequent calls to the throttled function return the 44081 * result of the last `func` invocation. 44082 * 44083 * **Note:** If `leading` and `trailing` options are `true`, `func` is 44084 * invoked on the trailing edge of the timeout only if the throttled function 44085 * is invoked more than once during the `wait` timeout. 44086 * 44087 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred 44088 * until to the next tick, similar to `setTimeout` with a timeout of `0`. 44089 * 44090 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) 44091 * for details over the differences between `_.throttle` and `_.debounce`. 44092 * 44093 * @static 44094 * @memberOf _ 44095 * @since 0.1.0 44096 * @category Function 44097 * @param {Function} func The function to throttle. 44098 * @param {number} [wait=0] The number of milliseconds to throttle invocations to. 44099 * @param {Object} [options={}] The options object. 44100 * @param {boolean} [options.leading=true] 44101 * Specify invoking on the leading edge of the timeout. 44102 * @param {boolean} [options.trailing=true] 44103 * Specify invoking on the trailing edge of the timeout. 44104 * @returns {Function} Returns the new throttled function. 44105 * @example 44106 * 44107 * // Avoid excessively updating the position while scrolling. 44108 * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); 44109 * 44110 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. 44111 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); 44112 * jQuery(element).on('click', throttled); 44113 * 44114 * // Cancel the trailing throttled invocation. 44115 * jQuery(window).on('popstate', throttled.cancel); 44116 */ 44117 function throttle(func, wait, options) { 44118 var leading = true, 44119 trailing = true; 44120 44121 if (typeof func != 'function') { 44122 throw new TypeError(FUNC_ERROR_TEXT); 44123 } 44124 if (isObject(options)) { 44125 leading = 'leading' in options ? !!options.leading : leading; 44126 trailing = 'trailing' in options ? !!options.trailing : trailing; 44127 } 44128 return debounce(func, wait, { 44129 'leading': leading, 44130 'maxWait': wait, 44131 'trailing': trailing 44132 }); 44133 } 44134 44135 /** 44136 * Creates a function that accepts up to one argument, ignoring any 44137 * additional arguments. 44138 * 44139 * @static 44140 * @memberOf _ 44141 * @since 4.0.0 44142 * @category Function 44143 * @param {Function} func The function to cap arguments for. 44144 * @returns {Function} Returns the new capped function. 44145 * @example 44146 * 44147 * _.map(['6', '8', '10'], _.unary(parseInt)); 44148 * // => [6, 8, 10] 44149 */ 44150 function unary(func) { 44151 return ary(func, 1); 44152 } 44153 44154 /** 44155 * Creates a function that provides `value` to `wrapper` as its first 44156 * argument. Any additional arguments provided to the function are appended 44157 * to those provided to the `wrapper`. The wrapper is invoked with the `this` 44158 * binding of the created function. 44159 * 44160 * @static 44161 * @memberOf _ 44162 * @since 0.1.0 44163 * @category Function 44164 * @param {*} value The value to wrap. 44165 * @param {Function} [wrapper=identity] The wrapper function. 44166 * @returns {Function} Returns the new function. 44167 * @example 44168 * 44169 * var p = _.wrap(_.escape, function(func, text) { 44170 * return '<p>' + func(text) + '</p>'; 44171 * }); 44172 * 44173 * p('fred, barney, & pebbles'); 44174 * // => '<p>fred, barney, & pebbles</p>' 44175 */ 44176 function wrap(value, wrapper) { 44177 return partial(castFunction(wrapper), value); 44178 } 44179 44180 /*------------------------------------------------------------------------*/ 44181 44182 /** 44183 * Casts `value` as an array if it's not one. 44184 * 44185 * @static 44186 * @memberOf _ 44187 * @since 4.4.0 44188 * @category Lang 44189 * @param {*} value The value to inspect. 44190 * @returns {Array} Returns the cast array. 44191 * @example 44192 * 44193 * _.castArray(1); 44194 * // => [1] 44195 * 44196 * _.castArray({ 'a': 1 }); 44197 * // => [{ 'a': 1 }] 44198 * 44199 * _.castArray('abc'); 44200 * // => ['abc'] 44201 * 44202 * _.castArray(null); 44203 * // => [null] 44204 * 44205 * _.castArray(undefined); 44206 * // => [undefined] 44207 * 44208 * _.castArray(); 44209 * // => [] 44210 * 44211 * var array = [1, 2, 3]; 44212 * console.log(_.castArray(array) === array); 44213 * // => true 44214 */ 44215 function castArray() { 44216 if (!arguments.length) { 44217 return []; 44218 } 44219 var value = arguments[0]; 44220 return isArray(value) ? value : [value]; 44221 } 44222 44223 /** 44224 * Creates a shallow clone of `value`. 44225 * 44226 * **Note:** This method is loosely based on the 44227 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) 44228 * and supports cloning arrays, array buffers, booleans, date objects, maps, 44229 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed 44230 * arrays. The own enumerable properties of `arguments` objects are cloned 44231 * as plain objects. An empty object is returned for uncloneable values such 44232 * as error objects, functions, DOM nodes, and WeakMaps. 44233 * 44234 * @static 44235 * @memberOf _ 44236 * @since 0.1.0 44237 * @category Lang 44238 * @param {*} value The value to clone. 44239 * @returns {*} Returns the cloned value. 44240 * @see _.cloneDeep 44241 * @example 44242 * 44243 * var objects = [{ 'a': 1 }, { 'b': 2 }]; 44244 * 44245 * var shallow = _.clone(objects); 44246 * console.log(shallow[0] === objects[0]); 44247 * // => true 44248 */ 44249 function clone(value) { 44250 return baseClone(value, CLONE_SYMBOLS_FLAG); 44251 } 44252 44253 /** 44254 * This method is like `_.clone` except that it accepts `customizer` which 44255 * is invoked to produce the cloned value. If `customizer` returns `undefined`, 44256 * cloning is handled by the method instead. The `customizer` is invoked with 44257 * up to four arguments; (value [, index|key, object, stack]). 44258 * 44259 * @static 44260 * @memberOf _ 44261 * @since 4.0.0 44262 * @category Lang 44263 * @param {*} value The value to clone. 44264 * @param {Function} [customizer] The function to customize cloning. 44265 * @returns {*} Returns the cloned value. 44266 * @see _.cloneDeepWith 44267 * @example 44268 * 44269 * function customizer(value) { 44270 * if (_.isElement(value)) { 44271 * return value.cloneNode(false); 44272 * } 44273 * } 44274 * 44275 * var el = _.cloneWith(document.body, customizer); 44276 * 44277 * console.log(el === document.body); 44278 * // => false 44279 * console.log(el.nodeName); 44280 * // => 'BODY' 44281 * console.log(el.childNodes.length); 44282 * // => 0 44283 */ 44284 function cloneWith(value, customizer) { 44285 customizer = typeof customizer == 'function' ? customizer : undefined; 44286 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); 44287 } 44288 44289 /** 44290 * This method is like `_.clone` except that it recursively clones `value`. 44291 * 44292 * @static 44293 * @memberOf _ 44294 * @since 1.0.0 44295 * @category Lang 44296 * @param {*} value The value to recursively clone. 44297 * @returns {*} Returns the deep cloned value. 44298 * @see _.clone 44299 * @example 44300 * 44301 * var objects = [{ 'a': 1 }, { 'b': 2 }]; 44302 * 44303 * var deep = _.cloneDeep(objects); 44304 * console.log(deep[0] === objects[0]); 44305 * // => false 44306 */ 44307 function cloneDeep(value) { 44308 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); 44309 } 44310 44311 /** 44312 * This method is like `_.cloneWith` except that it recursively clones `value`. 44313 * 44314 * @static 44315 * @memberOf _ 44316 * @since 4.0.0 44317 * @category Lang 44318 * @param {*} value The value to recursively clone. 44319 * @param {Function} [customizer] The function to customize cloning. 44320 * @returns {*} Returns the deep cloned value. 44321 * @see _.cloneWith 44322 * @example 44323 * 44324 * function customizer(value) { 44325 * if (_.isElement(value)) { 44326 * return value.cloneNode(true); 44327 * } 44328 * } 44329 * 44330 * var el = _.cloneDeepWith(document.body, customizer); 44331 * 44332 * console.log(el === document.body); 44333 * // => false 44334 * console.log(el.nodeName); 44335 * // => 'BODY' 44336 * console.log(el.childNodes.length); 44337 * // => 20 44338 */ 44339 function cloneDeepWith(value, customizer) { 44340 customizer = typeof customizer == 'function' ? customizer : undefined; 44341 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); 44342 } 44343 44344 /** 44345 * Checks if `object` conforms to `source` by invoking the predicate 44346 * properties of `source` with the corresponding property values of `object`. 44347 * 44348 * **Note:** This method is equivalent to `_.conforms` when `source` is 44349 * partially applied. 44350 * 44351 * @static 44352 * @memberOf _ 44353 * @since 4.14.0 44354 * @category Lang 44355 * @param {Object} object The object to inspect. 44356 * @param {Object} source The object of property predicates to conform to. 44357 * @returns {boolean} Returns `true` if `object` conforms, else `false`. 44358 * @example 44359 * 44360 * var object = { 'a': 1, 'b': 2 }; 44361 * 44362 * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); 44363 * // => true 44364 * 44365 * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); 44366 * // => false 44367 */ 44368 function conformsTo(object, source) { 44369 return source == null || baseConformsTo(object, source, keys(source)); 44370 } 44371 44372 /** 44373 * Performs a 44374 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) 44375 * comparison between two values to determine if they are equivalent. 44376 * 44377 * @static 44378 * @memberOf _ 44379 * @since 4.0.0 44380 * @category Lang 44381 * @param {*} value The value to compare. 44382 * @param {*} other The other value to compare. 44383 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 44384 * @example 44385 * 44386 * var object = { 'a': 1 }; 44387 * var other = { 'a': 1 }; 44388 * 44389 * _.eq(object, object); 44390 * // => true 44391 * 44392 * _.eq(object, other); 44393 * // => false 44394 * 44395 * _.eq('a', 'a'); 44396 * // => true 44397 * 44398 * _.eq('a', Object('a')); 44399 * // => false 44400 * 44401 * _.eq(NaN, NaN); 44402 * // => true 44403 */ 44404 function eq(value, other) { 44405 return value === other || (value !== value && other !== other); 44406 } 44407 44408 /** 44409 * Checks if `value` is greater than `other`. 44410 * 44411 * @static 44412 * @memberOf _ 44413 * @since 3.9.0 44414 * @category Lang 44415 * @param {*} value The value to compare. 44416 * @param {*} other The other value to compare. 44417 * @returns {boolean} Returns `true` if `value` is greater than `other`, 44418 * else `false`. 44419 * @see _.lt 44420 * @example 44421 * 44422 * _.gt(3, 1); 44423 * // => true 44424 * 44425 * _.gt(3, 3); 44426 * // => false 44427 * 44428 * _.gt(1, 3); 44429 * // => false 44430 */ 44431 var gt = createRelationalOperation(baseGt); 44432 44433 /** 44434 * Checks if `value` is greater than or equal to `other`. 44435 * 44436 * @static 44437 * @memberOf _ 44438 * @since 3.9.0 44439 * @category Lang 44440 * @param {*} value The value to compare. 44441 * @param {*} other The other value to compare. 44442 * @returns {boolean} Returns `true` if `value` is greater than or equal to 44443 * `other`, else `false`. 44444 * @see _.lte 44445 * @example 44446 * 44447 * _.gte(3, 1); 44448 * // => true 44449 * 44450 * _.gte(3, 3); 44451 * // => true 44452 * 44453 * _.gte(1, 3); 44454 * // => false 44455 */ 44456 var gte = createRelationalOperation(function(value, other) { 44457 return value >= other; 44458 }); 44459 44460 /** 44461 * Checks if `value` is likely an `arguments` object. 44462 * 44463 * @static 44464 * @memberOf _ 44465 * @since 0.1.0 44466 * @category Lang 44467 * @param {*} value The value to check. 44468 * @returns {boolean} Returns `true` if `value` is an `arguments` object, 44469 * else `false`. 44470 * @example 44471 * 44472 * _.isArguments(function() { return arguments; }()); 44473 * // => true 44474 * 44475 * _.isArguments([1, 2, 3]); 44476 * // => false 44477 */ 44478 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { 44479 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && 44480 !propertyIsEnumerable.call(value, 'callee'); 44481 }; 44482 44483 /** 44484 * Checks if `value` is classified as an `Array` object. 44485 * 44486 * @static 44487 * @memberOf _ 44488 * @since 0.1.0 44489 * @category Lang 44490 * @param {*} value The value to check. 44491 * @returns {boolean} Returns `true` if `value` is an array, else `false`. 44492 * @example 44493 * 44494 * _.isArray([1, 2, 3]); 44495 * // => true 44496 * 44497 * _.isArray(document.body.children); 44498 * // => false 44499 * 44500 * _.isArray('abc'); 44501 * // => false 44502 * 44503 * _.isArray(_.noop); 44504 * // => false 44505 */ 44506 var isArray = Array.isArray; 44507 44508 /** 44509 * Checks if `value` is classified as an `ArrayBuffer` object. 44510 * 44511 * @static 44512 * @memberOf _ 44513 * @since 4.3.0 44514 * @category Lang 44515 * @param {*} value The value to check. 44516 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. 44517 * @example 44518 * 44519 * _.isArrayBuffer(new ArrayBuffer(2)); 44520 * // => true 44521 * 44522 * _.isArrayBuffer(new Array(2)); 44523 * // => false 44524 */ 44525 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; 44526 44527 /** 44528 * Checks if `value` is array-like. A value is considered array-like if it's 44529 * not a function and has a `value.length` that's an integer greater than or 44530 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. 44531 * 44532 * @static 44533 * @memberOf _ 44534 * @since 4.0.0 44535 * @category Lang 44536 * @param {*} value The value to check. 44537 * @returns {boolean} Returns `true` if `value` is array-like, else `false`. 44538 * @example 44539 * 44540 * _.isArrayLike([1, 2, 3]); 44541 * // => true 44542 * 44543 * _.isArrayLike(document.body.children); 44544 * // => true 44545 * 44546 * _.isArrayLike('abc'); 44547 * // => true 44548 * 44549 * _.isArrayLike(_.noop); 44550 * // => false 44551 */ 44552 function isArrayLike(value) { 44553 return value != null && isLength(value.length) && !isFunction(value); 44554 } 44555 44556 /** 44557 * This method is like `_.isArrayLike` except that it also checks if `value` 44558 * is an object. 44559 * 44560 * @static 44561 * @memberOf _ 44562 * @since 4.0.0 44563 * @category Lang 44564 * @param {*} value The value to check. 44565 * @returns {boolean} Returns `true` if `value` is an array-like object, 44566 * else `false`. 44567 * @example 44568 * 44569 * _.isArrayLikeObject([1, 2, 3]); 44570 * // => true 44571 * 44572 * _.isArrayLikeObject(document.body.children); 44573 * // => true 44574 * 44575 * _.isArrayLikeObject('abc'); 44576 * // => false 44577 * 44578 * _.isArrayLikeObject(_.noop); 44579 * // => false 44580 */ 44581 function isArrayLikeObject(value) { 44582 return isObjectLike(value) && isArrayLike(value); 44583 } 44584 44585 /** 44586 * Checks if `value` is classified as a boolean primitive or object. 44587 * 44588 * @static 44589 * @memberOf _ 44590 * @since 0.1.0 44591 * @category Lang 44592 * @param {*} value The value to check. 44593 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. 44594 * @example 44595 * 44596 * _.isBoolean(false); 44597 * // => true 44598 * 44599 * _.isBoolean(null); 44600 * // => false 44601 */ 44602 function isBoolean(value) { 44603 return value === true || value === false || 44604 (isObjectLike(value) && baseGetTag(value) == boolTag); 44605 } 44606 44607 /** 44608 * Checks if `value` is a buffer. 44609 * 44610 * @static 44611 * @memberOf _ 44612 * @since 4.3.0 44613 * @category Lang 44614 * @param {*} value The value to check. 44615 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. 44616 * @example 44617 * 44618 * _.isBuffer(new Buffer(2)); 44619 * // => true 44620 * 44621 * _.isBuffer(new Uint8Array(2)); 44622 * // => false 44623 */ 44624 var isBuffer = nativeIsBuffer || stubFalse; 44625 44626 /** 44627 * Checks if `value` is classified as a `Date` object. 44628 * 44629 * @static 44630 * @memberOf _ 44631 * @since 0.1.0 44632 * @category Lang 44633 * @param {*} value The value to check. 44634 * @returns {boolean} Returns `true` if `value` is a date object, else `false`. 44635 * @example 44636 * 44637 * _.isDate(new Date); 44638 * // => true 44639 * 44640 * _.isDate('Mon April 23 2012'); 44641 * // => false 44642 */ 44643 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; 44644 44645 /** 44646 * Checks if `value` is likely a DOM element. 44647 * 44648 * @static 44649 * @memberOf _ 44650 * @since 0.1.0 44651 * @category Lang 44652 * @param {*} value The value to check. 44653 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. 44654 * @example 44655 * 44656 * _.isElement(document.body); 44657 * // => true 44658 * 44659 * _.isElement('<body>'); 44660 * // => false 44661 */ 44662 function isElement(value) { 44663 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); 44664 } 44665 44666 /** 44667 * Checks if `value` is an empty object, collection, map, or set. 44668 * 44669 * Objects are considered empty if they have no own enumerable string keyed 44670 * properties. 44671 * 44672 * Array-like values such as `arguments` objects, arrays, buffers, strings, or 44673 * jQuery-like collections are considered empty if they have a `length` of `0`. 44674 * Similarly, maps and sets are considered empty if they have a `size` of `0`. 44675 * 44676 * @static 44677 * @memberOf _ 44678 * @since 0.1.0 44679 * @category Lang 44680 * @param {*} value The value to check. 44681 * @returns {boolean} Returns `true` if `value` is empty, else `false`. 44682 * @example 44683 * 44684 * _.isEmpty(null); 44685 * // => true 44686 * 44687 * _.isEmpty(true); 44688 * // => true 44689 * 44690 * _.isEmpty(1); 44691 * // => true 44692 * 44693 * _.isEmpty([1, 2, 3]); 44694 * // => false 44695 * 44696 * _.isEmpty({ 'a': 1 }); 44697 * // => false 44698 */ 44699 function isEmpty(value) { 44700 if (value == null) { 44701 return true; 44702 } 44703 if (isArrayLike(value) && 44704 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || 44705 isBuffer(value) || isTypedArray(value) || isArguments(value))) { 44706 return !value.length; 44707 } 44708 var tag = getTag(value); 44709 if (tag == mapTag || tag == setTag) { 44710 return !value.size; 44711 } 44712 if (isPrototype(value)) { 44713 return !baseKeys(value).length; 44714 } 44715 for (var key in value) { 44716 if (hasOwnProperty.call(value, key)) { 44717 return false; 44718 } 44719 } 44720 return true; 44721 } 44722 44723 /** 44724 * Performs a deep comparison between two values to determine if they are 44725 * equivalent. 44726 * 44727 * **Note:** This method supports comparing arrays, array buffers, booleans, 44728 * date objects, error objects, maps, numbers, `Object` objects, regexes, 44729 * sets, strings, symbols, and typed arrays. `Object` objects are compared 44730 * by their own, not inherited, enumerable properties. Functions and DOM 44731 * nodes are compared by strict equality, i.e. `===`. 44732 * 44733 * @static 44734 * @memberOf _ 44735 * @since 0.1.0 44736 * @category Lang 44737 * @param {*} value The value to compare. 44738 * @param {*} other The other value to compare. 44739 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 44740 * @example 44741 * 44742 * var object = { 'a': 1 }; 44743 * var other = { 'a': 1 }; 44744 * 44745 * _.isEqual(object, other); 44746 * // => true 44747 * 44748 * object === other; 44749 * // => false 44750 */ 44751 function isEqual(value, other) { 44752 return baseIsEqual(value, other); 44753 } 44754 44755 /** 44756 * This method is like `_.isEqual` except that it accepts `customizer` which 44757 * is invoked to compare values. If `customizer` returns `undefined`, comparisons 44758 * are handled by the method instead. The `customizer` is invoked with up to 44759 * six arguments: (objValue, othValue [, index|key, object, other, stack]). 44760 * 44761 * @static 44762 * @memberOf _ 44763 * @since 4.0.0 44764 * @category Lang 44765 * @param {*} value The value to compare. 44766 * @param {*} other The other value to compare. 44767 * @param {Function} [customizer] The function to customize comparisons. 44768 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 44769 * @example 44770 * 44771 * function isGreeting(value) { 44772 * return /^h(?:i|ello)$/.test(value); 44773 * } 44774 * 44775 * function customizer(objValue, othValue) { 44776 * if (isGreeting(objValue) && isGreeting(othValue)) { 44777 * return true; 44778 * } 44779 * } 44780 * 44781 * var array = ['hello', 'goodbye']; 44782 * var other = ['hi', 'goodbye']; 44783 * 44784 * _.isEqualWith(array, other, customizer); 44785 * // => true 44786 */ 44787 function isEqualWith(value, other, customizer) { 44788 customizer = typeof customizer == 'function' ? customizer : undefined; 44789 var result = customizer ? customizer(value, other) : undefined; 44790 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; 44791 } 44792 44793 /** 44794 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, 44795 * `SyntaxError`, `TypeError`, or `URIError` object. 44796 * 44797 * @static 44798 * @memberOf _ 44799 * @since 3.0.0 44800 * @category Lang 44801 * @param {*} value The value to check. 44802 * @returns {boolean} Returns `true` if `value` is an error object, else `false`. 44803 * @example 44804 * 44805 * _.isError(new Error); 44806 * // => true 44807 * 44808 * _.isError(Error); 44809 * // => false 44810 */ 44811 function isError(value) { 44812 if (!isObjectLike(value)) { 44813 return false;
vendor: 6,607 bytes, lines 44814-45051
44814 } 44815 var tag = baseGetTag(value); 44816 return tag == errorTag || tag == domExcTag || 44817 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); 44818 } 44819 44820 /** 44821 * Checks if `value` is a finite primitive number. 44822 * 44823 * **Note:** This method is based on 44824 * [`Number.isFinite`](https://mdn.io/Number/isFinite). 44825 * 44826 * @static 44827 * @memberOf _ 44828 * @since 0.1.0 44829 * @category Lang 44830 * @param {*} value The value to check. 44831 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. 44832 * @example 44833 * 44834 * _.isFinite(3); 44835 * // => true 44836 * 44837 * _.isFinite(Number.MIN_VALUE); 44838 * // => true 44839 * 44840 * _.isFinite(Infinity); 44841 * // => false 44842 * 44843 * _.isFinite('3'); 44844 * // => false 44845 */ 44846 function isFinite(value) { 44847 return typeof value == 'number' && nativeIsFinite(value); 44848 } 44849 44850 /** 44851 * Checks if `value` is classified as a `Function` object. 44852 * 44853 * @static 44854 * @memberOf _ 44855 * @since 0.1.0 44856 * @category Lang 44857 * @param {*} value The value to check. 44858 * @returns {boolean} Returns `true` if `value` is a function, else `false`. 44859 * @example 44860 * 44861 * _.isFunction(_); 44862 * // => true 44863 * 44864 * _.isFunction(/abc/); 44865 * // => false 44866 */ 44867 function isFunction(value) { 44868 if (!isObject(value)) { 44869 return false; 44870 } 44871 // The use of `Object#toString` avoids issues with the `typeof` operator 44872 // in Safari 9 which returns 'object' for typed arrays and other constructors. 44873 var tag = baseGetTag(value); 44874 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; 44875 } 44876 44877 /** 44878 * Checks if `value` is an integer. 44879 * 44880 * **Note:** This method is based on 44881 * [`Number.isInteger`](https://mdn.io/Number/isInteger). 44882 * 44883 * @static 44884 * @memberOf _ 44885 * @since 4.0.0 44886 * @category Lang 44887 * @param {*} value The value to check. 44888 * @returns {boolean} Returns `true` if `value` is an integer, else `false`. 44889 * @example 44890 * 44891 * _.isInteger(3); 44892 * // => true 44893 * 44894 * _.isInteger(Number.MIN_VALUE); 44895 * // => false 44896 * 44897 * _.isInteger(Infinity); 44898 * // => false 44899 * 44900 * _.isInteger('3'); 44901 * // => false 44902 */ 44903 function isInteger(value) { 44904 return typeof value == 'number' && value == toInteger(value); 44905 } 44906 44907 /** 44908 * Checks if `value` is a valid array-like length. 44909 * 44910 * **Note:** This method is loosely based on 44911 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). 44912 * 44913 * @static 44914 * @memberOf _ 44915 * @since 4.0.0 44916 * @category Lang 44917 * @param {*} value The value to check. 44918 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. 44919 * @example 44920 * 44921 * _.isLength(3); 44922 * // => true 44923 * 44924 * _.isLength(Number.MIN_VALUE); 44925 * // => false 44926 * 44927 * _.isLength(Infinity); 44928 * // => false 44929 * 44930 * _.isLength('3'); 44931 * // => false 44932 */ 44933 function isLength(value) { 44934 return typeof value == 'number' && 44935 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; 44936 } 44937 44938 /** 44939 * Checks if `value` is the 44940 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) 44941 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) 44942 * 44943 * @static 44944 * @memberOf _ 44945 * @since 0.1.0 44946 * @category Lang 44947 * @param {*} value The value to check. 44948 * @returns {boolean} Returns `true` if `value` is an object, else `false`. 44949 * @example 44950 * 44951 * _.isObject({}); 44952 * // => true 44953 * 44954 * _.isObject([1, 2, 3]); 44955 * // => true 44956 * 44957 * _.isObject(_.noop); 44958 * // => true 44959 * 44960 * _.isObject(null); 44961 * // => false 44962 */ 44963 function isObject(value) { 44964 var type = typeof value; 44965 return value != null && (type == 'object' || type == 'function'); 44966 } 44967 44968 /** 44969 * Checks if `value` is object-like. A value is object-like if it's not `null` 44970 * and has a `typeof` result of "object". 44971 * 44972 * @static 44973 * @memberOf _ 44974 * @since 4.0.0 44975 * @category Lang 44976 * @param {*} value The value to check. 44977 * @returns {boolean} Returns `true` if `value` is object-like, else `false`. 44978 * @example 44979 * 44980 * _.isObjectLike({}); 44981 * // => true 44982 * 44983 * _.isObjectLike([1, 2, 3]); 44984 * // => true 44985 * 44986 * _.isObjectLike(_.noop); 44987 * // => false 44988 * 44989 * _.isObjectLike(null); 44990 * // => false 44991 */ 44992 function isObjectLike(value) { 44993 return value != null && typeof value == 'object'; 44994 } 44995 44996 /** 44997 * Checks if `value` is classified as a `Map` object. 44998 * 44999 * @static 45000 * @memberOf _ 45001 * @since 4.3.0 45002 * @category Lang 45003 * @param {*} value The value to check. 45004 * @returns {boolean} Returns `true` if `value` is a map, else `false`. 45005 * @example 45006 * 45007 * _.isMap(new Map); 45008 * // => true 45009 * 45010 * _.isMap(new WeakMap); 45011 * // => false 45012 */ 45013 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; 45014 45015 /** 45016 * Performs a partial deep comparison between `object` and `source` to 45017 * determine if `object` contains equivalent property values. 45018 * 45019 * **Note:** This method is equivalent to `_.matches` when `source` is 45020 * partially applied. 45021 * 45022 * Partial comparisons will match empty array and empty object `source` 45023 * values against any array or object value, respectively. See `_.isEqual` 45024 * for a list of supported value comparisons. 45025 * 45026 * @static 45027 * @memberOf _ 45028 * @since 3.0.0 45029 * @category Lang 45030 * @param {Object} object The object to inspect. 45031 * @param {Object} source The object of property values to match. 45032 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 45033 * @example 45034 * 45035 * var object = { 'a': 1, 'b': 2 }; 45036 * 45037 * _.isMatch(object, { 'b': 2 }); 45038 * // => true 45039 * 45040 * _.isMatch(object, { 'b': 1 }); 45041 * // => false 45042 */ 45043 function isMatch(object, source) { 45044 return object === source || baseIsMatch(object, source, getMatchData(source)); 45045 } 45046 45047 /** 45048 * This method is like `_.isMatch` except that it accepts `customizer` which 45049 * is invoked to compare values. If `customizer` returns `undefined`, comparisons 45050 * are handled by the method instead. The `customizer` is invoked with five 45051 * arguments: (objValue, srcValue, index|key, object, source).
vendor: 12,241 bytes, lines 45052-45517
45052 * 45053 * @static 45054 * @memberOf _ 45055 * @since 4.0.0 45056 * @category Lang 45057 * @param {Object} object The object to inspect. 45058 * @param {Object} source The object of property values to match. 45059 * @param {Function} [customizer] The function to customize comparisons. 45060 * @returns {boolean} Returns `true` if `object` is a match, else `false`. 45061 * @example 45062 * 45063 * function isGreeting(value) { 45064 * return /^h(?:i|ello)$/.test(value); 45065 * } 45066 * 45067 * function customizer(objValue, srcValue) { 45068 * if (isGreeting(objValue) && isGreeting(srcValue)) { 45069 * return true; 45070 * } 45071 * } 45072 * 45073 * var object = { 'greeting': 'hello' }; 45074 * var source = { 'greeting': 'hi' }; 45075 * 45076 * _.isMatchWith(object, source, customizer); 45077 * // => true 45078 */ 45079 function isMatchWith(object, source, customizer) { 45080 customizer = typeof customizer == 'function' ? customizer : undefined; 45081 return baseIsMatch(object, source, getMatchData(source), customizer); 45082 } 45083 45084 /** 45085 * Checks if `value` is `NaN`. 45086 * 45087 * **Note:** This method is based on 45088 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as 45089 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for 45090 * `undefined` and other non-number values. 45091 * 45092 * @static 45093 * @memberOf _ 45094 * @since 0.1.0 45095 * @category Lang 45096 * @param {*} value The value to check. 45097 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. 45098 * @example 45099 * 45100 * _.isNaN(NaN); 45101 * // => true 45102 * 45103 * _.isNaN(new Number(NaN)); 45104 * // => true 45105 * 45106 * isNaN(undefined); 45107 * // => true 45108 * 45109 * _.isNaN(undefined); 45110 * // => false 45111 */ 45112 function isNaN(value) { 45113 // An `NaN` primitive is the only value that is not equal to itself. 45114 // Perform the `toStringTag` check first to avoid errors with some 45115 // ActiveX objects in IE. 45116 return isNumber(value) && value != +value; 45117 } 45118 45119 /** 45120 * Checks if `value` is a pristine native function. 45121 * 45122 * **Note:** This method can't reliably detect native functions in the presence 45123 * of the core-js package because core-js circumvents this kind of detection. 45124 * Despite multiple requests, the core-js maintainer has made it clear: any 45125 * attempt to fix the detection will be obstructed. As a result, we're left 45126 * with little choice but to throw an error. Unfortunately, this also affects 45127 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), 45128 * which rely on core-js. 45129 * 45130 * @static 45131 * @memberOf _ 45132 * @since 3.0.0 45133 * @category Lang 45134 * @param {*} value The value to check. 45135 * @returns {boolean} Returns `true` if `value` is a native function, 45136 * else `false`. 45137 * @example 45138 * 45139 * _.isNative(Array.prototype.push); 45140 * // => true 45141 * 45142 * _.isNative(_); 45143 * // => false 45144 */ 45145 function isNative(value) { 45146 if (isMaskable(value)) { 45147 throw new Error(CORE_ERROR_TEXT); 45148 } 45149 return baseIsNative(value); 45150 } 45151 45152 /** 45153 * Checks if `value` is `null`. 45154 * 45155 * @static 45156 * @memberOf _ 45157 * @since 0.1.0 45158 * @category Lang 45159 * @param {*} value The value to check. 45160 * @returns {boolean} Returns `true` if `value` is `null`, else `false`. 45161 * @example 45162 * 45163 * _.isNull(null); 45164 * // => true 45165 * 45166 * _.isNull(void 0); 45167 * // => false 45168 */ 45169 function isNull(value) { 45170 return value === null; 45171 } 45172 45173 /** 45174 * Checks if `value` is `null` or `undefined`. 45175 * 45176 * @static 45177 * @memberOf _ 45178 * @since 4.0.0 45179 * @category Lang 45180 * @param {*} value The value to check. 45181 * @returns {boolean} Returns `true` if `value` is nullish, else `false`. 45182 * @example 45183 * 45184 * _.isNil(null); 45185 * // => true 45186 * 45187 * _.isNil(void 0); 45188 * // => true 45189 * 45190 * _.isNil(NaN); 45191 * // => false 45192 */ 45193 function isNil(value) { 45194 return value == null; 45195 } 45196 45197 /** 45198 * Checks if `value` is classified as a `Number` primitive or object. 45199 * 45200 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are 45201 * classified as numbers, use the `_.isFinite` method. 45202 * 45203 * @static 45204 * @memberOf _ 45205 * @since 0.1.0 45206 * @category Lang 45207 * @param {*} value The value to check. 45208 * @returns {boolean} Returns `true` if `value` is a number, else `false`. 45209 * @example 45210 * 45211 * _.isNumber(3); 45212 * // => true 45213 * 45214 * _.isNumber(Number.MIN_VALUE); 45215 * // => true 45216 * 45217 * _.isNumber(Infinity); 45218 * // => true 45219 * 45220 * _.isNumber('3'); 45221 * // => false 45222 */ 45223 function isNumber(value) { 45224 return typeof value == 'number' || 45225 (isObjectLike(value) && baseGetTag(value) == numberTag); 45226 } 45227 45228 /** 45229 * Checks if `value` is a plain object, that is, an object created by the 45230 * `Object` constructor or one with a `[[Prototype]]` of `null`. 45231 * 45232 * @static 45233 * @memberOf _ 45234 * @since 0.8.0 45235 * @category Lang 45236 * @param {*} value The value to check. 45237 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. 45238 * @example 45239 * 45240 * function Foo() { 45241 * this.a = 1; 45242 * } 45243 * 45244 * _.isPlainObject(new Foo); 45245 * // => false 45246 * 45247 * _.isPlainObject([1, 2, 3]); 45248 * // => false 45249 * 45250 * _.isPlainObject({ 'x': 0, 'y': 0 }); 45251 * // => true 45252 * 45253 * _.isPlainObject(Object.create(null)); 45254 * // => true 45255 */ 45256 function isPlainObject(value) { 45257 if (!isObjectLike(value) || baseGetTag(value) != objectTag) { 45258 return false; 45259 } 45260 var proto = getPrototype(value); 45261 if (proto === null) { 45262 return true; 45263 } 45264 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; 45265 return typeof Ctor == 'function' && Ctor instanceof Ctor && 45266 funcToString.call(Ctor) == objectCtorString; 45267 } 45268 45269 /** 45270 * Checks if `value` is classified as a `RegExp` object. 45271 * 45272 * @static 45273 * @memberOf _ 45274 * @since 0.1.0 45275 * @category Lang 45276 * @param {*} value The value to check. 45277 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. 45278 * @example 45279 * 45280 * _.isRegExp(/abc/); 45281 * // => true 45282 * 45283 * _.isRegExp('/abc/'); 45284 * // => false 45285 */ 45286 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; 45287 45288 /** 45289 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 45290 * double precision number which isn't the result of a rounded unsafe integer. 45291 * 45292 * **Note:** This method is based on 45293 * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). 45294 * 45295 * @static 45296 * @memberOf _ 45297 * @since 4.0.0 45298 * @category Lang 45299 * @param {*} value The value to check. 45300 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. 45301 * @example 45302 * 45303 * _.isSafeInteger(3); 45304 * // => true 45305 * 45306 * _.isSafeInteger(Number.MIN_VALUE); 45307 * // => false 45308 * 45309 * _.isSafeInteger(Infinity); 45310 * // => false 45311 * 45312 * _.isSafeInteger('3'); 45313 * // => false 45314 */ 45315 function isSafeInteger(value) { 45316 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; 45317 } 45318 45319 /** 45320 * Checks if `value` is classified as a `Set` object. 45321 * 45322 * @static 45323 * @memberOf _ 45324 * @since 4.3.0 45325 * @category Lang 45326 * @param {*} value The value to check. 45327 * @returns {boolean} Returns `true` if `value` is a set, else `false`. 45328 * @example 45329 * 45330 * _.isSet(new Set); 45331 * // => true 45332 * 45333 * _.isSet(new WeakSet); 45334 * // => false 45335 */ 45336 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; 45337 45338 /** 45339 * Checks if `value` is classified as a `String` primitive or object. 45340 * 45341 * @static 45342 * @since 0.1.0 45343 * @memberOf _ 45344 * @category Lang 45345 * @param {*} value The value to check. 45346 * @returns {boolean} Returns `true` if `value` is a string, else `false`. 45347 * @example 45348 * 45349 * _.isString('abc'); 45350 * // => true 45351 * 45352 * _.isString(1); 45353 * // => false 45354 */ 45355 function isString(value) { 45356 return typeof value == 'string' || 45357 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); 45358 } 45359 45360 /** 45361 * Checks if `value` is classified as a `Symbol` primitive or object. 45362 * 45363 * @static 45364 * @memberOf _ 45365 * @since 4.0.0 45366 * @category Lang 45367 * @param {*} value The value to check. 45368 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. 45369 * @example 45370 * 45371 * _.isSymbol(Symbol.iterator); 45372 * // => true 45373 * 45374 * _.isSymbol('abc'); 45375 * // => false 45376 */ 45377 function isSymbol(value) { 45378 return typeof value == 'symbol' || 45379 (isObjectLike(value) && baseGetTag(value) == symbolTag); 45380 } 45381 45382 /** 45383 * Checks if `value` is classified as a typed array. 45384 * 45385 * @static 45386 * @memberOf _ 45387 * @since 3.0.0 45388 * @category Lang 45389 * @param {*} value The value to check. 45390 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. 45391 * @example 45392 * 45393 * _.isTypedArray(new Uint8Array); 45394 * // => true 45395 * 45396 * _.isTypedArray([]); 45397 * // => false 45398 */ 45399 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; 45400 45401 /** 45402 * Checks if `value` is `undefined`. 45403 * 45404 * @static 45405 * @since 0.1.0 45406 * @memberOf _ 45407 * @category Lang 45408 * @param {*} value The value to check. 45409 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. 45410 * @example 45411 * 45412 * _.isUndefined(void 0); 45413 * // => true 45414 * 45415 * _.isUndefined(null); 45416 * // => false 45417 */ 45418 function isUndefined(value) { 45419 return value === undefined; 45420 } 45421 45422 /** 45423 * Checks if `value` is classified as a `WeakMap` object. 45424 * 45425 * @static 45426 * @memberOf _ 45427 * @since 4.3.0 45428 * @category Lang 45429 * @param {*} value The value to check. 45430 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. 45431 * @example 45432 * 45433 * _.isWeakMap(new WeakMap); 45434 * // => true 45435 * 45436 * _.isWeakMap(new Map); 45437 * // => false 45438 */ 45439 function isWeakMap(value) { 45440 return isObjectLike(value) && getTag(value) == weakMapTag; 45441 } 45442 45443 /** 45444 * Checks if `value` is classified as a `WeakSet` object. 45445 * 45446 * @static 45447 * @memberOf _ 45448 * @since 4.3.0 45449 * @category Lang 45450 * @param {*} value The value to check. 45451 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. 45452 * @example 45453 * 45454 * _.isWeakSet(new WeakSet); 45455 * // => true 45456 * 45457 * _.isWeakSet(new Set); 45458 * // => false 45459 */ 45460 function isWeakSet(value) { 45461 return isObjectLike(value) && baseGetTag(value) == weakSetTag; 45462 } 45463 45464 /** 45465 * Checks if `value` is less than `other`. 45466 * 45467 * @static 45468 * @memberOf _ 45469 * @since 3.9.0 45470 * @category Lang 45471 * @param {*} value The value to compare. 45472 * @param {*} other The other value to compare. 45473 * @returns {boolean} Returns `true` if `value` is less than `other`, 45474 * else `false`. 45475 * @see _.gt 45476 * @example 45477 * 45478 * _.lt(1, 3); 45479 * // => true 45480 * 45481 * _.lt(3, 3); 45482 * // => false 45483 * 45484 * _.lt(3, 1); 45485 * // => false 45486 */ 45487 var lt = createRelationalOperation(baseLt); 45488 45489 /** 45490 * Checks if `value` is less than or equal to `other`. 45491 * 45492 * @static 45493 * @memberOf _ 45494 * @since 3.9.0 45495 * @category Lang 45496 * @param {*} value The value to compare. 45497 * @param {*} other The other value to compare. 45498 * @returns {boolean} Returns `true` if `value` is less than or equal to 45499 * `other`, else `false`. 45500 * @see _.gte 45501 * @example 45502 * 45503 * _.lte(1, 3); 45504 * // => true 45505 * 45506 * _.lte(3, 3); 45507 * // => true 45508 * 45509 * _.lte(3, 1); 45510 * // => false 45511 */ 45512 var lte = createRelationalOperation(function(value, other) { 45513 return value <= other; 45514 }); 45515 45516 /** 45517 * Converts `value` to an array.
vendor: 4,495 bytes, lines 45518-45699
45518 * 45519 * @static 45520 * @since 0.1.0 45521 * @memberOf _ 45522 * @category Lang 45523 * @param {*} value The value to convert. 45524 * @returns {Array} Returns the converted array. 45525 * @example 45526 * 45527 * _.toArray({ 'a': 1, 'b': 2 }); 45528 * // => [1, 2] 45529 * 45530 * _.toArray('abc'); 45531 * // => ['a', 'b', 'c'] 45532 * 45533 * _.toArray(1); 45534 * // => [] 45535 * 45536 * _.toArray(null); 45537 * // => [] 45538 */ 45539 function toArray(value) { 45540 if (!value) { 45541 return []; 45542 } 45543 if (isArrayLike(value)) { 45544 return isString(value) ? stringToArray(value) : copyArray(value); 45545 } 45546 if (symIterator && value[symIterator]) { 45547 return iteratorToArray(value[symIterator]()); 45548 } 45549 var tag = getTag(value), 45550 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); 45551 45552 return func(value); 45553 } 45554 45555 /** 45556 * Converts `value` to a finite number. 45557 * 45558 * @static 45559 * @memberOf _ 45560 * @since 4.12.0 45561 * @category Lang 45562 * @param {*} value The value to convert. 45563 * @returns {number} Returns the converted number. 45564 * @example 45565 * 45566 * _.toFinite(3.2); 45567 * // => 3.2 45568 * 45569 * _.toFinite(Number.MIN_VALUE); 45570 * // => 5e-324 45571 * 45572 * _.toFinite(Infinity); 45573 * // => 1.7976931348623157e+308 45574 * 45575 * _.toFinite('3.2'); 45576 * // => 3.2 45577 */ 45578 function toFinite(value) { 45579 if (!value) { 45580 return value === 0 ? value : 0; 45581 } 45582 value = toNumber(value); 45583 if (value === INFINITY || value === -INFINITY) { 45584 var sign = (value < 0 ? -1 : 1); 45585 return sign * MAX_INTEGER; 45586 } 45587 return value === value ? value : 0; 45588 } 45589 45590 /** 45591 * Converts `value` to an integer. 45592 * 45593 * **Note:** This method is loosely based on 45594 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). 45595 * 45596 * @static 45597 * @memberOf _ 45598 * @since 4.0.0 45599 * @category Lang 45600 * @param {*} value The value to convert. 45601 * @returns {number} Returns the converted integer. 45602 * @example 45603 * 45604 * _.toInteger(3.2); 45605 * // => 3 45606 * 45607 * _.toInteger(Number.MIN_VALUE); 45608 * // => 0 45609 * 45610 * _.toInteger(Infinity); 45611 * // => 1.7976931348623157e+308 45612 * 45613 * _.toInteger('3.2'); 45614 * // => 3 45615 */ 45616 function toInteger(value) { 45617 var result = toFinite(value), 45618 remainder = result % 1; 45619 45620 return result === result ? (remainder ? result - remainder : result) : 0; 45621 } 45622 45623 /** 45624 * Converts `value` to an integer suitable for use as the length of an 45625 * array-like object. 45626 * 45627 * **Note:** This method is based on 45628 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). 45629 * 45630 * @static 45631 * @memberOf _ 45632 * @since 4.0.0 45633 * @category Lang 45634 * @param {*} value The value to convert. 45635 * @returns {number} Returns the converted integer. 45636 * @example 45637 * 45638 * _.toLength(3.2); 45639 * // => 3 45640 * 45641 * _.toLength(Number.MIN_VALUE); 45642 * // => 0 45643 * 45644 * _.toLength(Infinity); 45645 * // => 4294967295 45646 * 45647 * _.toLength('3.2'); 45648 * // => 3 45649 */ 45650 function toLength(value) { 45651 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; 45652 } 45653 45654 /** 45655 * Converts `value` to a number. 45656 * 45657 * @static 45658 * @memberOf _ 45659 * @since 4.0.0 45660 * @category Lang 45661 * @param {*} value The value to process. 45662 * @returns {number} Returns the number. 45663 * @example 45664 * 45665 * _.toNumber(3.2); 45666 * // => 3.2 45667 * 45668 * _.toNumber(Number.MIN_VALUE); 45669 * // => 5e-324 45670 * 45671 * _.toNumber(Infinity); 45672 * // => Infinity 45673 * 45674 * _.toNumber('3.2'); 45675 * // => 3.2 45676 */ 45677 function toNumber(value) { 45678 if (typeof value == 'number') { 45679 return value; 45680 } 45681 if (isSymbol(value)) { 45682 return NAN; 45683 } 45684 if (isObject(value)) { 45685 var other = typeof value.valueOf == 'function' ? value.valueOf() : value; 45686 value = isObject(other) ? (other + '') : other; 45687 } 45688 if (typeof value != 'string') { 45689 return value === 0 ? value : +value; 45690 } 45691 value = value.replace(reTrim, ''); 45692 var isBinary = reIsBinary.test(value); 45693 return (isBinary || reIsOctal.test(value)) 45694 ? freeParseInt(value.slice(2), isBinary ? 2 : 8) 45695 : (reIsBadHex.test(value) ? NAN : +value); 45696 } 45697 45698 /** 45699 * Converts `value` to a plain object flattening inherited enumerable str
vendor: 7,271 bytes, lines 45699-45947
45699ing 45700 * keyed properties of `value` to own properties of the plain object. 45701 * 45702 * @static 45703 * @memberOf _ 45704 * @since 3.0.0 45705 * @category Lang 45706 * @param {*} value The value to convert. 45707 * @returns {Object} Returns the converted plain object. 45708 * @example 45709 * 45710 * function Foo() { 45711 * this.b = 2; 45712 * } 45713 * 45714 * Foo.prototype.c = 3; 45715 * 45716 * _.assign({ 'a': 1 }, new Foo); 45717 * // => { 'a': 1, 'b': 2 } 45718 * 45719 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); 45720 * // => { 'a': 1, 'b': 2, 'c': 3 } 45721 */ 45722 function toPlainObject(value) { 45723 return copyObject(value, keysIn(value)); 45724 } 45725 45726 /** 45727 * Converts `value` to a safe integer. A safe integer can be compared and 45728 * represented correctly. 45729 * 45730 * @static 45731 * @memberOf _ 45732 * @since 4.0.0 45733 * @category Lang 45734 * @param {*} value The value to convert. 45735 * @returns {number} Returns the converted integer. 45736 * @example 45737 * 45738 * _.toSafeInteger(3.2); 45739 * // => 3 45740 * 45741 * _.toSafeInteger(Number.MIN_VALUE); 45742 * // => 0 45743 * 45744 * _.toSafeInteger(Infinity); 45745 * // => 9007199254740991 45746 * 45747 * _.toSafeInteger('3.2'); 45748 * // => 3 45749 */ 45750 function toSafeInteger(value) { 45751 return value 45752 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) 45753 : (value === 0 ? value : 0); 45754 } 45755 45756 /** 45757 * Converts `value` to a string. An empty string is returned for `null` 45758 * and `undefined` values. The sign of `-0` is preserved. 45759 * 45760 * @static 45761 * @memberOf _ 45762 * @since 4.0.0 45763 * @category Lang 45764 * @param {*} value The value to convert. 45765 * @returns {string} Returns the converted string. 45766 * @example 45767 * 45768 * _.toString(null); 45769 * // => '' 45770 * 45771 * _.toString(-0); 45772 * // => '-0' 45773 * 45774 * _.toString([1, 2, 3]); 45775 * // => '1,2,3' 45776 */ 45777 function toString(value) { 45778 return value == null ? '' : baseToString(value); 45779 } 45780 45781 /*------------------------------------------------------------------------*/ 45782 45783 /** 45784 * Assigns own enumerable string keyed properties of source objects to the 45785 * destination object. Source objects are applied from left to right. 45786 * Subsequent sources overwrite property assignments of previous sources. 45787 * 45788 * **Note:** This method mutates `object` and is loosely based on 45789 * [`Object.assign`](https://mdn.io/Object/assign). 45790 * 45791 * @static 45792 * @memberOf _ 45793 * @since 0.10.0 45794 * @category Object 45795 * @param {Object} object The destination object. 45796 * @param {...Object} [sources] The source objects. 45797 * @returns {Object} Returns `object`. 45798 * @see _.assignIn 45799 * @example 45800 * 45801 * function Foo() { 45802 * this.a = 1; 45803 * } 45804 * 45805 * function Bar() { 45806 * this.c = 3; 45807 * } 45808 * 45809 * Foo.prototype.b = 2; 45810 * Bar.prototype.d = 4; 45811 * 45812 * _.assign({ 'a': 0 }, new Foo, new Bar); 45813 * // => { 'a': 1, 'c': 3 } 45814 */ 45815 var assign = createAssigner(function(object, source) { 45816 if (isPrototype(source) || isArrayLike(source)) { 45817 copyObject(source, keys(source), object); 45818 return; 45819 } 45820 for (var key in source) { 45821 if (hasOwnProperty.call(source, key)) { 45822 assignValue(object, key, source[key]); 45823 } 45824 } 45825 }); 45826 45827 /** 45828 * This method is like `_.assign` except that it iterates over own and 45829 * inherited source properties. 45830 * 45831 * **Note:** This method mutates `object`. 45832 * 45833 * @static 45834 * @memberOf _ 45835 * @since 4.0.0 45836 * @alias extend 45837 * @category Object 45838 * @param {Object} object The destination object. 45839 * @param {...Object} [sources] The source objects. 45840 * @returns {Object} Returns `object`. 45841 * @see _.assign 45842 * @example 45843 * 45844 * function Foo() { 45845 * this.a = 1; 45846 * } 45847 * 45848 * function Bar() { 45849 * this.c = 3; 45850 * } 45851 * 45852 * Foo.prototype.b = 2; 45853 * Bar.prototype.d = 4; 45854 * 45855 * _.assignIn({ 'a': 0 }, new Foo, new Bar); 45856 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } 45857 */ 45858 var assignIn = createAssigner(function(object, source) { 45859 copyObject(source, keysIn(source), object); 45860 }); 45861 45862 /** 45863 * This method is like `_.assignIn` except that it accepts `customizer` 45864 * which is invoked to produce the assigned values. If `customizer` returns 45865 * `undefined`, assignment is handled by the method instead. The `customizer` 45866 * is invoked with five arguments: (objValue, srcValue, key, object, source). 45867 * 45868 * **Note:** This method mutates `object`. 45869 * 45870 * @static 45871 * @memberOf _ 45872 * @since 4.0.0 45873 * @alias extendWith 45874 * @category Object 45875 * @param {Object} object The destination object. 45876 * @param {...Object} sources The source objects. 45877 * @param {Function} [customizer] The function to customize assigned values. 45878 * @returns {Object} Returns `object`. 45879 * @see _.assignWith 45880 * @example 45881 * 45882 * function customizer(objValue, srcValue) { 45883 * return _.isUndefined(objValue) ? srcValue : objValue; 45884 * } 45885 * 45886 * var defaults = _.partialRight(_.assignInWith, customizer); 45887 * 45888 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 45889 * // => { 'a': 1, 'b': 2 } 45890 */ 45891 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { 45892 copyObject(source, keysIn(source), object, customizer); 45893 }); 45894 45895 /** 45896 * This method is like `_.assign` except that it accepts `customizer` 45897 * which is invoked to produce the assigned values. If `customizer` returns 45898 * `undefined`, assignment is handled by the method instead. The `customizer` 45899 * is invoked with five arguments: (objValue, srcValue, key, object, source). 45900 * 45901 * **Note:** This method mutates `object`. 45902 * 45903 * @static 45904 * @memberOf _ 45905 * @since 4.0.0 45906 * @category Object 45907 * @param {Object} object The destination object. 45908 * @param {...Object} sources The source objects. 45909 * @param {Function} [customizer] The function to customize assigned values. 45910 * @returns {Object} Returns `object`. 45911 * @see _.assignInWith 45912 * @example 45913 * 45914 * function customizer(objValue, srcValue) { 45915 * return _.isUndefined(objValue) ? srcValue : objValue; 45916 * } 45917 * 45918 * var defaults = _.partialRight(_.assignWith, customizer); 45919 * 45920 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 45921 * // => { 'a': 1, 'b': 2 } 45922 */ 45923 var assignWith = createAssigner(function(object, source, srcIndex, customizer) { 45924 copyObject(source, keys(source), object, customizer); 45925 }); 45926 45927 /** 45928 * Creates an array of values corresponding to `paths` of `object`. 45929 * 45930 * @static 45931 * @memberOf _ 45932 * @since 1.0.0 45933 * @category Object 45934 * @param {Object} object The object to iterate over. 45935 * @param {...(string|string[])} [paths] The property paths to pick. 45936 * @returns {Array} Returns the picked values. 45937 * @example 45938 * 45939 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; 45940 * 45941 * _.at(object, ['a[0].b.c', 'a[1]']); 45942 * // => [3, 4] 45943 */ 45944 var at = flatRest(baseAt); 45945 45946 /** 45947 * Creates an object that inherits from the `prototype` object. If a
vendor: 13,619 bytes, lines 45948-46412
45948 * `properties` object is given, its own enumerable string keyed properties 45949 * are assigned to the created object. 45950 * 45951 * @static 45952 * @memberOf _ 45953 * @since 2.3.0 45954 * @category Object 45955 * @param {Object} prototype The object to inherit from. 45956 * @param {Object} [properties] The properties to assign to the object. 45957 * @returns {Object} Returns the new object. 45958 * @example 45959 * 45960 * function Shape() { 45961 * this.x = 0; 45962 * this.y = 0; 45963 * } 45964 * 45965 * function Circle() { 45966 * Shape.call(this); 45967 * } 45968 * 45969 * Circle.prototype = _.create(Shape.prototype, { 45970 * 'constructor': Circle 45971 * }); 45972 * 45973 * var circle = new Circle; 45974 * circle instanceof Circle; 45975 * // => true 45976 * 45977 * circle instanceof Shape; 45978 * // => true 45979 */ 45980 function create(prototype, properties) { 45981 var result = baseCreate(prototype); 45982 return properties == null ? result : baseAssign(result, properties); 45983 } 45984 45985 /** 45986 * Assigns own and inherited enumerable string keyed properties of source 45987 * objects to the destination object for all destination properties that 45988 * resolve to `undefined`. Source objects are applied from left to right. 45989 * Once a property is set, additional values of the same property are ignored. 45990 * 45991 * **Note:** This method mutates `object`. 45992 * 45993 * @static 45994 * @since 0.1.0 45995 * @memberOf _ 45996 * @category Object 45997 * @param {Object} object The destination object. 45998 * @param {...Object} [sources] The source objects. 45999 * @returns {Object} Returns `object`. 46000 * @see _.defaultsDeep 46001 * @example 46002 * 46003 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); 46004 * // => { 'a': 1, 'b': 2 } 46005 */ 46006 var defaults = baseRest(function(object, sources) { 46007 object = Object(object); 46008 46009 var index = -1; 46010 var length = sources.length; 46011 var guard = length > 2 ? sources[2] : undefined; 46012 46013 if (guard && isIterateeCall(sources[0], sources[1], guard)) { 46014 length = 1; 46015 } 46016 46017 while (++index < length) { 46018 var source = sources[index]; 46019 var props = keysIn(source); 46020 var propsIndex = -1; 46021 var propsLength = props.length; 46022 46023 while (++propsIndex < propsLength) { 46024 var key = props[propsIndex]; 46025 var value = object[key]; 46026 46027 if (value === undefined || 46028 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { 46029 object[key] = source[key]; 46030 } 46031 } 46032 } 46033 46034 return object; 46035 }); 46036 46037 /** 46038 * This method is like `_.defaults` except that it recursively assigns 46039 * default properties. 46040 * 46041 * **Note:** This method mutates `object`. 46042 * 46043 * @static 46044 * @memberOf _ 46045 * @since 3.10.0 46046 * @category Object 46047 * @param {Object} object The destination object. 46048 * @param {...Object} [sources] The source objects. 46049 * @returns {Object} Returns `object`. 46050 * @see _.defaults 46051 * @example 46052 * 46053 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); 46054 * // => { 'a': { 'b': 2, 'c': 3 } } 46055 */ 46056 var defaultsDeep = baseRest(function(args) { 46057 args.push(undefined, customDefaultsMerge); 46058 return apply(mergeWith, undefined, args); 46059 }); 46060 46061 /** 46062 * This method is like `_.find` except that it returns the key of the first 46063 * element `predicate` returns truthy for instead of the element itself. 46064 * 46065 * @static 46066 * @memberOf _ 46067 * @since 1.1.0 46068 * @category Object 46069 * @param {Object} object The object to inspect. 46070 * @param {Function} [predicate=_.identity] The function invoked per iteration. 46071 * @returns {string|undefined} Returns the key of the matched element, 46072 * else `undefined`. 46073 * @example 46074 * 46075 * var users = { 46076 * 'barney': { 'age': 36, 'active': true }, 46077 * 'fred': { 'age': 40, 'active': false }, 46078 * 'pebbles': { 'age': 1, 'active': true } 46079 * }; 46080 * 46081 * _.findKey(users, function(o) { return o.age < 40; }); 46082 * // => 'barney' (iteration order is not guaranteed) 46083 * 46084 * // The `_.matches` iteratee shorthand. 46085 * _.findKey(users, { 'age': 1, 'active': true }); 46086 * // => 'pebbles' 46087 * 46088 * // The `_.matchesProperty` iteratee shorthand. 46089 * _.findKey(users, ['active', false]); 46090 * // => 'fred' 46091 * 46092 * // The `_.property` iteratee shorthand. 46093 * _.findKey(users, 'active'); 46094 * // => 'barney' 46095 */ 46096 function findKey(object, predicate) { 46097 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); 46098 } 46099 46100 /** 46101 * This method is like `_.findKey` except that it iterates over elements of 46102 * a collection in the opposite order. 46103 * 46104 * @static 46105 * @memberOf _ 46106 * @since 2.0.0 46107 * @category Object 46108 * @param {Object} object The object to inspect. 46109 * @param {Function} [predicate=_.identity] The function invoked per iteration. 46110 * @returns {string|undefined} Returns the key of the matched element, 46111 * else `undefined`. 46112 * @example 46113 * 46114 * var users = { 46115 * 'barney': { 'age': 36, 'active': true }, 46116 * 'fred': { 'age': 40, 'active': false }, 46117 * 'pebbles': { 'age': 1, 'active': true } 46118 * }; 46119 * 46120 * _.findLastKey(users, function(o) { return o.age < 40; }); 46121 * // => returns 'pebbles' assuming `_.findKey` returns 'barney' 46122 * 46123 * // The `_.matches` iteratee shorthand. 46124 * _.findLastKey(users, { 'age': 36, 'active': true }); 46125 * // => 'barney' 46126 * 46127 * // The `_.matchesProperty` iteratee shorthand. 46128 * _.findLastKey(users, ['active', false]); 46129 * // => 'fred' 46130 * 46131 * // The `_.property` iteratee shorthand. 46132 * _.findLastKey(users, 'active'); 46133 * // => 'pebbles' 46134 */ 46135 function findLastKey(object, predicate) { 46136 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); 46137 } 46138 46139 /** 46140 * Iterates over own and inherited enumerable string keyed properties of an 46141 * object and invokes `iteratee` for each property. The iteratee is invoked 46142 * with three arguments: (value, key, object). Iteratee functions may exit 46143 * iteration early by explicitly returning `false`. 46144 * 46145 * @static 46146 * @memberOf _ 46147 * @since 0.3.0 46148 * @category Object 46149 * @param {Object} object The object to iterate over. 46150 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46151 * @returns {Object} Returns `object`. 46152 * @see _.forInRight 46153 * @example 46154 * 46155 * function Foo() { 46156 * this.a = 1; 46157 * this.b = 2; 46158 * } 46159 * 46160 * Foo.prototype.c = 3; 46161 * 46162 * _.forIn(new Foo, function(value, key) { 46163 * console.log(key); 46164 * }); 46165 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). 46166 */ 46167 function forIn(object, iteratee) { 46168 return object == null 46169 ? object 46170 : baseFor(object, getIteratee(iteratee, 3), keysIn); 46171 } 46172 46173 /** 46174 * This method is like `_.forIn` except that it iterates over properties of 46175 * `object` in the opposite order. 46176 * 46177 * @static 46178 * @memberOf _ 46179 * @since 2.0.0 46180 * @category Object 46181 * @param {Object} object The object to iterate over. 46182 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46183 * @returns {Object} Returns `object`. 46184 * @see _.forIn 46185 * @example 46186 * 46187 * function Foo() { 46188 * this.a = 1; 46189 * this.b = 2; 46190 * } 46191 * 46192 * Foo.prototype.c = 3; 46193 * 46194 * _.forInRight(new Foo, function(value, key) { 46195 * console.log(key); 46196 * }); 46197 * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. 46198 */ 46199 function forInRight(object, iteratee) { 46200 return object == null 46201 ? object 46202 : baseForRight(object, getIteratee(iteratee, 3), keysIn); 46203 } 46204 46205 /** 46206 * Iterates over own enumerable string keyed properties of an object and 46207 * invokes `iteratee` for each property. The iteratee is invoked with three 46208 * arguments: (value, key, object). Iteratee functions may exit iteration 46209 * early by explicitly returning `false`. 46210 * 46211 * @static 46212 * @memberOf _ 46213 * @since 0.3.0 46214 * @category Object 46215 * @param {Object} object The object to iterate over. 46216 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46217 * @returns {Object} Returns `object`. 46218 * @see _.forOwnRight 46219 * @example 46220 * 46221 * function Foo() { 46222 * this.a = 1; 46223 * this.b = 2; 46224 * } 46225 * 46226 * Foo.prototype.c = 3; 46227 * 46228 * _.forOwn(new Foo, function(value, key) { 46229 * console.log(key); 46230 * }); 46231 * // => Logs 'a' then 'b' (iteration order is not guaranteed). 46232 */ 46233 function forOwn(object, iteratee) { 46234 return object && baseForOwn(object, getIteratee(iteratee, 3)); 46235 } 46236 46237 /** 46238 * This method is like `_.forOwn` except that it iterates over properties of 46239 * `object` in the opposite order. 46240 * 46241 * @static 46242 * @memberOf _ 46243 * @since 2.0.0 46244 * @category Object 46245 * @param {Object} object The object to iterate over. 46246 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46247 * @returns {Object} Returns `object`. 46248 * @see _.forOwn 46249 * @example 46250 * 46251 * function Foo() { 46252 * this.a = 1; 46253 * this.b = 2; 46254 * } 46255 * 46256 * Foo.prototype.c = 3; 46257 * 46258 * _.forOwnRight(new Foo, function(value, key) { 46259 * console.log(key); 46260 * }); 46261 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. 46262 */ 46263 function forOwnRight(object, iteratee) { 46264 return object && baseForOwnRight(object, getIteratee(iteratee, 3)); 46265 } 46266 46267 /** 46268 * Creates an array of function property names from own enumerable properties 46269 * of `object`. 46270 * 46271 * @static 46272 * @since 0.1.0 46273 * @memberOf _ 46274 * @category Object 46275 * @param {Object} object The object to inspect. 46276 * @returns {Array} Returns the function names. 46277 * @see _.functionsIn 46278 * @example 46279 * 46280 * function Foo() { 46281 * this.a = _.constant('a'); 46282 * this.b = _.constant('b'); 46283 * } 46284 * 46285 * Foo.prototype.c = _.constant('c'); 46286 * 46287 * _.functions(new Foo); 46288 * // => ['a', 'b'] 46289 */ 46290 function functions(object) { 46291 return object == null ? [] : baseFunctions(object, keys(object)); 46292 } 46293 46294 /** 46295 * Creates an array of function property names from own and inherited 46296 * enumerable properties of `object`. 46297 * 46298 * @static 46299 * @memberOf _ 46300 * @since 4.0.0 46301 * @category Object 46302 * @param {Object} object The object to inspect. 46303 * @returns {Array} Returns the function names. 46304 * @see _.functions 46305 * @example 46306 * 46307 * function Foo() { 46308 * this.a = _.constant('a'); 46309 * this.b = _.constant('b'); 46310 * } 46311 * 46312 * Foo.prototype.c = _.constant('c'); 46313 * 46314 * _.functionsIn(new Foo); 46315 * // => ['a', 'b', 'c'] 46316 */ 46317 function functionsIn(object) { 46318 return object == null ? [] : baseFunctions(object, keysIn(object)); 46319 } 46320 46321 /** 46322 * Gets the value at `path` of `object`. If the resolved value is 46323 * `undefined`, the `defaultValue` is returned in its place. 46324 * 46325 * @static 46326 * @memberOf _ 46327 * @since 3.7.0 46328 * @category Object 46329 * @param {Object} object The object to query. 46330 * @param {Array|string} path The path of the property to get. 46331 * @param {*} [defaultValue] The value returned for `undefined` resolved values. 46332 * @returns {*} Returns the resolved value. 46333 * @example 46334 * 46335 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 46336 * 46337 * _.get(object, 'a[0].b.c'); 46338 * // => 3 46339 * 46340 * _.get(object, ['a', '0', 'b', 'c']); 46341 * // => 3 46342 * 46343 * _.get(object, 'a.b.c', 'default'); 46344 * // => 'default' 46345 */ 46346 function get(object, path, defaultValue) { 46347 var result = object == null ? undefined : baseGet(object, path); 46348 return result === undefined ? defaultValue : result; 46349 } 46350 46351 /** 46352 * Checks if `path` is a direct property of `object`. 46353 * 46354 * @static 46355 * @since 0.1.0 46356 * @memberOf _ 46357 * @category Object 46358 * @param {Object} object The object to query. 46359 * @param {Array|string} path The path to check. 46360 * @returns {boolean} Returns `true` if `path` exists, else `false`. 46361 * @example 46362 * 46363 * var object = { 'a': { 'b': 2 } }; 46364 * var other = _.create({ 'a': _.create({ 'b': 2 }) }); 46365 * 46366 * _.has(object, 'a'); 46367 * // => true 46368 * 46369 * _.has(object, 'a.b'); 46370 * // => true 46371 * 46372 * _.has(object, ['a', 'b']); 46373 * // => true 46374 * 46375 * _.has(other, 'a'); 46376 * // => false 46377 */ 46378 function has(object, path) { 46379 return object != null && hasPath(object, path, baseHas); 46380 } 46381 46382 /** 46383 * Checks if `path` is a direct or inherited property of `object`. 46384 * 46385 * @static 46386 * @memberOf _ 46387 * @since 4.0.0 46388 * @category Object 46389 * @param {Object} object The object to query. 46390 * @param {Array|string} path The path to check. 46391 * @returns {boolean} Returns `true` if `path` exists, else `false`. 46392 * @example 46393 * 46394 * var object = _.create({ 'a': _.create({ 'b': 2 }) }); 46395 * 46396 * _.hasIn(object, 'a'); 46397 * // => true 46398 * 46399 * _.hasIn(object, 'a.b'); 46400 * // => true 46401 * 46402 * _.hasIn(object, ['a', 'b']); 46403 * // => true 46404 * 46405 * _.hasIn(object, 'b'); 46406 * // => false 46407 */ 46408 function hasIn(object, path) { 46409 return object != null && hasPath(object, path, baseHasIn); 46410 } 46411 46412 /**
vendor: 11,848 bytes, lines 46413-46783
46413 * Creates an object composed of the inverted keys and values of `object`. 46414 * If `object` contains duplicate values, subsequent values overwrite 46415 * property assignments of previous values. 46416 * 46417 * @static 46418 * @memberOf _ 46419 * @since 0.7.0 46420 * @category Object 46421 * @param {Object} object The object to invert. 46422 * @returns {Object} Returns the new inverted object. 46423 * @example 46424 * 46425 * var object = { 'a': 1, 'b': 2, 'c': 1 }; 46426 * 46427 * _.invert(object); 46428 * // => { '1': 'c', '2': 'b' } 46429 */ 46430 var invert = createInverter(function(result, value, key) { 46431 if (value != null && 46432 typeof value.toString != 'function') { 46433 value = nativeObjectToString.call(value); 46434 } 46435 46436 result[value] = key; 46437 }, constant(identity)); 46438 46439 /** 46440 * This method is like `_.invert` except that the inverted object is generated 46441 * from the results of running each element of `object` thru `iteratee`. The 46442 * corresponding inverted value of each inverted key is an array of keys 46443 * responsible for generating the inverted value. The iteratee is invoked 46444 * with one argument: (value). 46445 * 46446 * @static 46447 * @memberOf _ 46448 * @since 4.1.0 46449 * @category Object 46450 * @param {Object} object The object to invert. 46451 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 46452 * @returns {Object} Returns the new inverted object. 46453 * @example 46454 * 46455 * var object = { 'a': 1, 'b': 2, 'c': 1 }; 46456 * 46457 * _.invertBy(object); 46458 * // => { '1': ['a', 'c'], '2': ['b'] } 46459 * 46460 * _.invertBy(object, function(value) { 46461 * return 'group' + value; 46462 * }); 46463 * // => { 'group1': ['a', 'c'], 'group2': ['b'] } 46464 */ 46465 var invertBy = createInverter(function(result, value, key) { 46466 if (value != null && 46467 typeof value.toString != 'function') { 46468 value = nativeObjectToString.call(value); 46469 } 46470 46471 if (hasOwnProperty.call(result, value)) { 46472 result[value].push(key); 46473 } else { 46474 result[value] = [key]; 46475 } 46476 }, getIteratee); 46477 46478 /** 46479 * Invokes the method at `path` of `object`. 46480 * 46481 * @static 46482 * @memberOf _ 46483 * @since 4.0.0 46484 * @category Object 46485 * @param {Object} object The object to query. 46486 * @param {Array|string} path The path of the method to invoke. 46487 * @param {...*} [args] The arguments to invoke the method with. 46488 * @returns {*} Returns the result of the invoked method. 46489 * @example 46490 * 46491 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; 46492 * 46493 * _.invoke(object, 'a[0].b.c.slice', 1, 3); 46494 * // => [2, 3] 46495 */ 46496 var invoke = baseRest(baseInvoke); 46497 46498 /** 46499 * Creates an array of the own enumerable property names of `object`. 46500 * 46501 * **Note:** Non-object values are coerced to objects. See the 46502 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) 46503 * for more details. 46504 * 46505 * @static 46506 * @since 0.1.0 46507 * @memberOf _ 46508 * @category Object 46509 * @param {Object} object The object to query. 46510 * @returns {Array} Returns the array of property names. 46511 * @example 46512 * 46513 * function Foo() { 46514 * this.a = 1; 46515 * this.b = 2; 46516 * } 46517 * 46518 * Foo.prototype.c = 3; 46519 * 46520 * _.keys(new Foo); 46521 * // => ['a', 'b'] (iteration order is not guaranteed) 46522 * 46523 * _.keys('hi'); 46524 * // => ['0', '1'] 46525 */ 46526 function keys(object) { 46527 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); 46528 } 46529 46530 /** 46531 * Creates an array of the own and inherited enumerable property names of `object`. 46532 * 46533 * **Note:** Non-object values are coerced to objects. 46534 * 46535 * @static 46536 * @memberOf _ 46537 * @since 3.0.0 46538 * @category Object 46539 * @param {Object} object The object to query. 46540 * @returns {Array} Returns the array of property names. 46541 * @example 46542 * 46543 * function Foo() { 46544 * this.a = 1; 46545 * this.b = 2; 46546 * } 46547 * 46548 * Foo.prototype.c = 3; 46549 * 46550 * _.keysIn(new Foo); 46551 * // => ['a', 'b', 'c'] (iteration order is not guaranteed) 46552 */ 46553 function keysIn(object) { 46554 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); 46555 } 46556 46557 /** 46558 * The opposite of `_.mapValues`; this method creates an object with the 46559 * same values as `object` and keys generated by running each own enumerable 46560 * string keyed property of `object` thru `iteratee`. The iteratee is invoked 46561 * with three arguments: (value, key, object). 46562 * 46563 * @static 46564 * @memberOf _ 46565 * @since 3.8.0 46566 * @category Object 46567 * @param {Object} object The object to iterate over. 46568 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46569 * @returns {Object} Returns the new mapped object. 46570 * @see _.mapValues 46571 * @example 46572 * 46573 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { 46574 * return key + value; 46575 * }); 46576 * // => { 'a1': 1, 'b2': 2 } 46577 */ 46578 function mapKeys(object, iteratee) { 46579 var result = {}; 46580 iteratee = getIteratee(iteratee, 3); 46581 46582 baseForOwn(object, function(value, key, object) { 46583 baseAssignValue(result, iteratee(value, key, object), value); 46584 }); 46585 return result; 46586 } 46587 46588 /** 46589 * Creates an object with the same keys as `object` and values generated 46590 * by running each own enumerable string keyed property of `object` thru 46591 * `iteratee`. The iteratee is invoked with three arguments: 46592 * (value, key, object). 46593 * 46594 * @static 46595 * @memberOf _ 46596 * @since 2.4.0 46597 * @category Object 46598 * @param {Object} object The object to iterate over. 46599 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46600 * @returns {Object} Returns the new mapped object. 46601 * @see _.mapKeys 46602 * @example 46603 * 46604 * var users = { 46605 * 'fred': { 'user': 'fred', 'age': 40 }, 46606 * 'pebbles': { 'user': 'pebbles', 'age': 1 } 46607 * }; 46608 * 46609 * _.mapValues(users, function(o) { return o.age; }); 46610 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) 46611 * 46612 * // The `_.property` iteratee shorthand. 46613 * _.mapValues(users, 'age'); 46614 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) 46615 */ 46616 function mapValues(object, iteratee) { 46617 var result = {}; 46618 iteratee = getIteratee(iteratee, 3); 46619 46620 baseForOwn(object, function(value, key, object) { 46621 baseAssignValue(result, key, iteratee(value, key, object)); 46622 }); 46623 return result; 46624 } 46625 46626 /** 46627 * This method is like `_.assign` except that it recursively merges own and 46628 * inherited enumerable string keyed properties of source objects into the 46629 * destination object. Source properties that resolve to `undefined` are 46630 * skipped if a destination value exists. Array and plain object properties 46631 * are merged recursively. Other objects and value types are overridden by 46632 * assignment. Source objects are applied from left to right. Subsequent 46633 * sources overwrite property assignments of previous sources. 46634 * 46635 * **Note:** This method mutates `object`. 46636 * 46637 * @static 46638 * @memberOf _ 46639 * @since 0.5.0 46640 * @category Object 46641 * @param {Object} object The destination object. 46642 * @param {...Object} [sources] The source objects. 46643 * @returns {Object} Returns `object`. 46644 * @example 46645 * 46646 * var object = { 46647 * 'a': [{ 'b': 2 }, { 'd': 4 }] 46648 * }; 46649 * 46650 * var other = { 46651 * 'a': [{ 'c': 3 }, { 'e': 5 }] 46652 * }; 46653 * 46654 * _.merge(object, other); 46655 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } 46656 */ 46657 var merge = createAssigner(function(object, source, srcIndex) { 46658 baseMerge(object, source, srcIndex); 46659 }); 46660 46661 /** 46662 * This method is like `_.merge` except that it accepts `customizer` which 46663 * is invoked to produce the merged values of the destination and source 46664 * properties. If `customizer` returns `undefined`, merging is handled by the 46665 * method instead. The `customizer` is invoked with six arguments: 46666 * (objValue, srcValue, key, object, source, stack). 46667 * 46668 * **Note:** This method mutates `object`. 46669 * 46670 * @static 46671 * @memberOf _ 46672 * @since 4.0.0 46673 * @category Object 46674 * @param {Object} object The destination object. 46675 * @param {...Object} sources The source objects. 46676 * @param {Function} customizer The function to customize assigned values. 46677 * @returns {Object} Returns `object`. 46678 * @example 46679 * 46680 * function customizer(objValue, srcValue) { 46681 * if (_.isArray(objValue)) { 46682 * return objValue.concat(srcValue); 46683 * } 46684 * } 46685 * 46686 * var object = { 'a': [1], 'b': [2] }; 46687 * var other = { 'a': [3], 'b': [4] }; 46688 * 46689 * _.mergeWith(object, other, customizer); 46690 * // => { 'a': [1, 3], 'b': [2, 4] } 46691 */ 46692 var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { 46693 baseMerge(object, source, srcIndex, customizer); 46694 }); 46695 46696 /** 46697 * The opposite of `_.pick`; this method creates an object composed of the 46698 * own and inherited enumerable property paths of `object` that are not omitted. 46699 * 46700 * **Note:** This method is considerably slower than `_.pick`. 46701 * 46702 * @static 46703 * @since 0.1.0 46704 * @memberOf _ 46705 * @category Object 46706 * @param {Object} object The source object. 46707 * @param {...(string|string[])} [paths] The property paths to omit. 46708 * @returns {Object} Returns the new object. 46709 * @example 46710 * 46711 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 46712 * 46713 * _.omit(object, ['a', 'c']); 46714 * // => { 'b': '2' } 46715 */ 46716 var omit = flatRest(function(object, paths) { 46717 var result = {}; 46718 if (object == null) { 46719 return result; 46720 } 46721 var isDeep = false; 46722 paths = arrayMap(paths, function(path) { 46723 path = castPath(path, object); 46724 isDeep || (isDeep = path.length > 1); 46725 return path; 46726 }); 46727 copyObject(object, getAllKeysIn(object), result); 46728 if (isDeep) { 46729 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); 46730 } 46731 var length = paths.length; 46732 while (length--) { 46733 baseUnset(result, paths[length]); 46734 } 46735 return result; 46736 }); 46737 46738 /** 46739 * The opposite of `_.pickBy`; this method creates an object composed of 46740 * the own and inherited enumerable string keyed properties of `object` that 46741 * `predicate` doesn't return truthy for. The predicate is invoked with two 46742 * arguments: (value, key). 46743 * 46744 * @static 46745 * @memberOf _ 46746 * @since 4.0.0 46747 * @category Object 46748 * @param {Object} object The source object. 46749 * @param {Function} [predicate=_.identity] The function invoked per property. 46750 * @returns {Object} Returns the new object. 46751 * @example 46752 * 46753 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 46754 * 46755 * _.omitBy(object, _.isNumber); 46756 * // => { 'b': '2' } 46757 */ 46758 function omitBy(object, predicate) { 46759 return pickBy(object, negate(getIteratee(predicate))); 46760 } 46761 46762 /** 46763 * Creates an object composed of the picked `object` properties. 46764 * 46765 * @static 46766 * @since 0.1.0 46767 * @memberOf _ 46768 * @category Object 46769 * @param {Object} object The source object. 46770 * @param {...(string|string[])} [paths] The property paths to pick. 46771 * @returns {Object} Returns the new object. 46772 * @example 46773 * 46774 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 46775 * 46776 * _.pick(object, ['a', 'c']); 46777 * // => { 'a': 1, 'c': 3 } 46778 */ 46779 var pick = flatRest(function(object, paths) { 46780 return object == null ? {} : basePick(object, paths); 46781 }); 46782 46783 /**
vendor: 11,160 bytes, lines 46784-47122
46784 * Creates an object composed of the `object` properties `predicate` returns 46785 * truthy for. The predicate is invoked with two arguments: (value, key). 46786 * 46787 * @static 46788 * @memberOf _ 46789 * @since 4.0.0 46790 * @category Object 46791 * @param {Object} object The source object. 46792 * @param {Function} [predicate=_.identity] The function invoked per property. 46793 * @returns {Object} Returns the new object. 46794 * @example 46795 * 46796 * var object = { 'a': 1, 'b': '2', 'c': 3 }; 46797 * 46798 * _.pickBy(object, _.isNumber); 46799 * // => { 'a': 1, 'c': 3 } 46800 */ 46801 function pickBy(object, predicate) { 46802 if (object == null) { 46803 return {}; 46804 } 46805 var props = arrayMap(getAllKeysIn(object), function(prop) { 46806 return [prop]; 46807 }); 46808 predicate = getIteratee(predicate); 46809 return basePickBy(object, props, function(value, path) { 46810 return predicate(value, path[0]); 46811 }); 46812 } 46813 46814 /** 46815 * This method is like `_.get` except that if the resolved value is a 46816 * function it's invoked with the `this` binding of its parent object and 46817 * its result is returned. 46818 * 46819 * @static 46820 * @since 0.1.0 46821 * @memberOf _ 46822 * @category Object 46823 * @param {Object} object The object to query. 46824 * @param {Array|string} path The path of the property to resolve. 46825 * @param {*} [defaultValue] The value returned for `undefined` resolved values. 46826 * @returns {*} Returns the resolved value. 46827 * @example 46828 * 46829 * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; 46830 * 46831 * _.result(object, 'a[0].b.c1'); 46832 * // => 3 46833 * 46834 * _.result(object, 'a[0].b.c2'); 46835 * // => 4 46836 * 46837 * _.result(object, 'a[0].b.c3', 'default'); 46838 * // => 'default' 46839 * 46840 * _.result(object, 'a[0].b.c3', _.constant('default')); 46841 * // => 'default' 46842 */ 46843 function result(object, path, defaultValue) { 46844 path = castPath(path, object); 46845 46846 var index = -1, 46847 length = path.length; 46848 46849 // Ensure the loop is entered when path is empty. 46850 if (!length) { 46851 length = 1; 46852 object = undefined; 46853 } 46854 while (++index < length) { 46855 var value = object == null ? undefined : object[toKey(path[index])]; 46856 if (value === undefined) { 46857 index = length; 46858 value = defaultValue; 46859 } 46860 object = isFunction(value) ? value.call(object) : value; 46861 } 46862 return object; 46863 } 46864 46865 /** 46866 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, 46867 * it's created. Arrays are created for missing index properties while objects 46868 * are created for all other missing properties. Use `_.setWith` to customize 46869 * `path` creation. 46870 * 46871 * **Note:** This method mutates `object`. 46872 * 46873 * @static 46874 * @memberOf _ 46875 * @since 3.7.0 46876 * @category Object 46877 * @param {Object} object The object to modify. 46878 * @param {Array|string} path The path of the property to set. 46879 * @param {*} value The value to set. 46880 * @returns {Object} Returns `object`. 46881 * @example 46882 * 46883 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 46884 * 46885 * _.set(object, 'a[0].b.c', 4); 46886 * console.log(object.a[0].b.c); 46887 * // => 4 46888 * 46889 * _.set(object, ['x', '0', 'y', 'z'], 5); 46890 * console.log(object.x[0].y.z); 46891 * // => 5 46892 */ 46893 function set(object, path, value) { 46894 return object == null ? object : baseSet(object, path, value); 46895 } 46896 46897 /** 46898 * This method is like `_.set` except that it accepts `customizer` which is 46899 * invoked to produce the objects of `path`. If `customizer` returns `undefined` 46900 * path creation is handled by the method instead. The `customizer` is invoked 46901 * with three arguments: (nsValue, key, nsObject). 46902 * 46903 * **Note:** This method mutates `object`. 46904 * 46905 * @static 46906 * @memberOf _ 46907 * @since 4.0.0 46908 * @category Object 46909 * @param {Object} object The object to modify. 46910 * @param {Array|string} path The path of the property to set. 46911 * @param {*} value The value to set. 46912 * @param {Function} [customizer] The function to customize assigned values. 46913 * @returns {Object} Returns `object`. 46914 * @example 46915 * 46916 * var object = {}; 46917 * 46918 * _.setWith(object, '[0][1]', 'a', Object); 46919 * // => { '0': { '1': 'a' } } 46920 */ 46921 function setWith(object, path, value, customizer) { 46922 customizer = typeof customizer == 'function' ? customizer : undefined; 46923 return object == null ? object : baseSet(object, path, value, customizer); 46924 } 46925 46926 /** 46927 * Creates an array of own enumerable string keyed-value pairs for `object` 46928 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its 46929 * entries are returned. 46930 * 46931 * @static 46932 * @memberOf _ 46933 * @since 4.0.0 46934 * @alias entries 46935 * @category Object 46936 * @param {Object} object The object to query. 46937 * @returns {Array} Returns the key-value pairs. 46938 * @example 46939 * 46940 * function Foo() { 46941 * this.a = 1; 46942 * this.b = 2; 46943 * } 46944 * 46945 * Foo.prototype.c = 3; 46946 * 46947 * _.toPairs(new Foo); 46948 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) 46949 */ 46950 var toPairs = createToPairs(keys); 46951 46952 /** 46953 * Creates an array of own and inherited enumerable string keyed-value pairs 46954 * for `object` which can be consumed by `_.fromPairs`. If `object` is a map 46955 * or set, its entries are returned. 46956 * 46957 * @static 46958 * @memberOf _ 46959 * @since 4.0.0 46960 * @alias entriesIn 46961 * @category Object 46962 * @param {Object} object The object to query. 46963 * @returns {Array} Returns the key-value pairs. 46964 * @example 46965 * 46966 * function Foo() { 46967 * this.a = 1; 46968 * this.b = 2; 46969 * } 46970 * 46971 * Foo.prototype.c = 3; 46972 * 46973 * _.toPairsIn(new Foo); 46974 * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) 46975 */ 46976 var toPairsIn = createToPairs(keysIn); 46977 46978 /** 46979 * An alternative to `_.reduce`; this method transforms `object` to a new 46980 * `accumulator` object which is the result of running each of its own 46981 * enumerable string keyed properties thru `iteratee`, with each invocation 46982 * potentially mutating the `accumulator` object. If `accumulator` is not 46983 * provided, a new object with the same `[[Prototype]]` will be used. The 46984 * iteratee is invoked with four arguments: (accumulator, value, key, object). 46985 * Iteratee functions may exit iteration early by explicitly returning `false`. 46986 * 46987 * @static 46988 * @memberOf _ 46989 * @since 1.3.0 46990 * @category Object 46991 * @param {Object} object The object to iterate over. 46992 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 46993 * @param {*} [accumulator] The custom accumulator value. 46994 * @returns {*} Returns the accumulated value. 46995 * @example 46996 * 46997 * _.transform([2, 3, 4], function(result, n) { 46998 * result.push(n *= n); 46999 * return n % 2 == 0; 47000 * }, []); 47001 * // => [4, 9] 47002 * 47003 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { 47004 * (result[value] || (result[value] = [])).push(key); 47005 * }, {}); 47006 * // => { '1': ['a', 'c'], '2': ['b'] } 47007 */ 47008 function transform(object, iteratee, accumulator) { 47009 var isArr = isArray(object), 47010 isArrLike = isArr || isBuffer(object) || isTypedArray(object); 47011 47012 iteratee = getIteratee(iteratee, 4); 47013 if (accumulator == null) { 47014 var Ctor = object && object.constructor; 47015 if (isArrLike) { 47016 accumulator = isArr ? new Ctor : []; 47017 } 47018 else if (isObject(object)) { 47019 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; 47020 } 47021 else { 47022 accumulator = {}; 47023 } 47024 } 47025 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { 47026 return iteratee(accumulator, value, index, object); 47027 }); 47028 return accumulator; 47029 } 47030 47031 /** 47032 * Removes the property at `path` of `object`. 47033 * 47034 * **Note:** This method mutates `object`. 47035 * 47036 * @static 47037 * @memberOf _ 47038 * @since 4.0.0 47039 * @category Object 47040 * @param {Object} object The object to modify. 47041 * @param {Array|string} path The path of the property to unset. 47042 * @returns {boolean} Returns `true` if the property is deleted, else `false`. 47043 * @example 47044 * 47045 * var object = { 'a': [{ 'b': { 'c': 7 } }] }; 47046 * _.unset(object, 'a[0].b.c'); 47047 * // => true 47048 * 47049 * console.log(object); 47050 * // => { 'a': [{ 'b': {} }] }; 47051 * 47052 * _.unset(object, ['a', '0', 'b', 'c']); 47053 * // => true 47054 * 47055 * console.log(object); 47056 * // => { 'a': [{ 'b': {} }] }; 47057 */ 47058 function unset(object, path) { 47059 return object == null ? true : baseUnset(object, path); 47060 } 47061 47062 /** 47063 * This method is like `_.set` except that accepts `updater` to produce the 47064 * value to set. Use `_.updateWith` to customize `path` creation. The `updater` 47065 * is invoked with one argument: (value). 47066 * 47067 * **Note:** This method mutates `object`. 47068 * 47069 * @static 47070 * @memberOf _ 47071 * @since 4.6.0 47072 * @category Object 47073 * @param {Object} object The object to modify. 47074 * @param {Array|string} path The path of the property to set. 47075 * @param {Function} updater The function to produce the updated value. 47076 * @returns {Object} Returns `object`. 47077 * @example 47078 * 47079 * var object = { 'a': [{ 'b': { 'c': 3 } }] }; 47080 * 47081 * _.update(object, 'a[0].b.c', function(n) { return n * n; }); 47082 * console.log(object.a[0].b.c); 47083 * // => 9 47084 * 47085 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); 47086 * console.log(object.x[0].y.z); 47087 * // => 0 47088 */ 47089 function update(object, path, updater) { 47090 return object == null ? object : baseUpdate(object, path, castFunction(updater)); 47091 } 47092 47093 /** 47094 * This method is like `_.update` except that it accepts `customizer` which is 47095 * invoked to produce the objects of `path`. If `customizer` returns `undefined` 47096 * path creation is handled by the method instead. The `customizer` is invoked 47097 * with three arguments: (nsValue, key, nsObject). 47098 * 47099 * **Note:** This method mutates `object`. 47100 * 47101 * @static 47102 * @memberOf _ 47103 * @since 4.6.0 47104 * @category Object 47105 * @param {Object} object The object to modify. 47106 * @param {Array|string} path The path of the property to set. 47107 * @param {Function} updater The function to produce the updated value. 47108 * @param {Function} [customizer] The function to customize assigned values. 47109 * @returns {Object} Returns `object`. 47110 * @example 47111 * 47112 * var object = {}; 47113 * 47114 * _.updateWith(object, '[0][1]', _.constant('a'), Object); 47115 * // => { '0': { '1': 'a' } } 47116 */ 47117 function updateWith(object, path, updater, customizer) { 47118 customizer = typeof customizer == 'function' ? customizer : undefined; 47119 return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); 47120 } 47121 47122 /**
vendor: 1,263 bytes, lines 47123-47172
47123 * Creates an array of the own enumerable string keyed property values of `object`. 47124 * 47125 * **Note:** Non-object values are coerced to objects. 47126 * 47127 * @static 47128 * @since 0.1.0 47129 * @memberOf _ 47130 * @category Object 47131 * @param {Object} object The object to query. 47132 * @returns {Array} Returns the array of property values. 47133 * @example 47134 * 47135 * function Foo() { 47136 * this.a = 1; 47137 * this.b = 2; 47138 * } 47139 * 47140 * Foo.prototype.c = 3; 47141 * 47142 * _.values(new Foo); 47143 * // => [1, 2] (iteration order is not guaranteed) 47144 * 47145 * _.values('hi'); 47146 * // => ['h', 'i'] 47147 */ 47148 function values(object) { 47149 return object == null ? [] : baseValues(object, keys(object)); 47150 } 47151 47152 /** 47153 * Creates an array of the own and inherited enumerable string keyed property 47154 * values of `object`. 47155 * 47156 * **Note:** Non-object values are coerced to objects. 47157 * 47158 * @static 47159 * @memberOf _ 47160 * @since 3.0.0 47161 * @category Object 47162 * @param {Object} object The object to query. 47163 * @returns {Array} Returns the array of property values. 47164 * @example 47165 * 47166 * function Foo() { 47167 * this.a = 1; 47168 * this.b = 2; 47169 * } 47170 * 47171 * Foo.prototype.c = 3; 47172 *
vendor: 9,679 bytes, lines 47173-47493
47173 * _.valuesIn(new Foo); 47174 * // => [1, 2, 3] (iteration order is not guaranteed) 47175 */ 47176 function valuesIn(object) { 47177 return object == null ? [] : baseValues(object, keysIn(object)); 47178 } 47179 47180 /*------------------------------------------------------------------------*/ 47181 47182 /** 47183 * Clamps `number` within the inclusive `lower` and `upper` bounds. 47184 * 47185 * @static 47186 * @memberOf _ 47187 * @since 4.0.0 47188 * @category Number 47189 * @param {number} number The number to clamp. 47190 * @param {number} [lower] The lower bound. 47191 * @param {number} upper The upper bound. 47192 * @returns {number} Returns the clamped number. 47193 * @example 47194 * 47195 * _.clamp(-10, -5, 5); 47196 * // => -5 47197 * 47198 * _.clamp(10, -5, 5); 47199 * // => 5 47200 */ 47201 function clamp(number, lower, upper) { 47202 if (upper === undefined) { 47203 upper = lower; 47204 lower = undefined; 47205 } 47206 if (upper !== undefined) { 47207 upper = toNumber(upper); 47208 upper = upper === upper ? upper : 0; 47209 } 47210 if (lower !== undefined) { 47211 lower = toNumber(lower); 47212 lower = lower === lower ? lower : 0; 47213 } 47214 return baseClamp(toNumber(number), lower, upper); 47215 } 47216 47217 /** 47218 * Checks if `n` is between `start` and up to, but not including, `end`. If 47219 * `end` is not specified, it's set to `start` with `start` then set to `0`. 47220 * If `start` is greater than `end` the params are swapped to support 47221 * negative ranges. 47222 * 47223 * @static 47224 * @memberOf _ 47225 * @since 3.3.0 47226 * @category Number 47227 * @param {number} number The number to check. 47228 * @param {number} [start=0] The start of the range. 47229 * @param {number} end The end of the range. 47230 * @returns {boolean} Returns `true` if `number` is in the range, else `false`. 47231 * @see _.range, _.rangeRight 47232 * @example 47233 * 47234 * _.inRange(3, 2, 4); 47235 * // => true 47236 * 47237 * _.inRange(4, 8); 47238 * // => true 47239 * 47240 * _.inRange(4, 2); 47241 * // => false 47242 * 47243 * _.inRange(2, 2); 47244 * // => false 47245 * 47246 * _.inRange(1.2, 2); 47247 * // => true 47248 * 47249 * _.inRange(5.2, 4); 47250 * // => false 47251 * 47252 * _.inRange(-3, -2, -6); 47253 * // => true 47254 */ 47255 function inRange(number, start, end) { 47256 start = toFinite(start); 47257 if (end === undefined) { 47258 end = start; 47259 start = 0; 47260 } else { 47261 end = toFinite(end); 47262 } 47263 number = toNumber(number); 47264 return baseInRange(number, start, end); 47265 } 47266 47267 /** 47268 * Produces a random number between the inclusive `lower` and `upper` bounds. 47269 * If only one argument is provided a number between `0` and the given number 47270 * is returned. If `floating` is `true`, or either `lower` or `upper` are 47271 * floats, a floating-point number is returned instead of an integer. 47272 * 47273 * **Note:** JavaScript follows the IEEE-754 standard for resolving 47274 * floating-point values which can produce unexpected results. 47275 * 47276 * @static 47277 * @memberOf _ 47278 * @since 0.7.0 47279 * @category Number 47280 * @param {number} [lower=0] The lower bound. 47281 * @param {number} [upper=1] The upper bound. 47282 * @param {boolean} [floating] Specify returning a floating-point number. 47283 * @returns {number} Returns the random number. 47284 * @example 47285 * 47286 * _.random(0, 5); 47287 * // => an integer between 0 and 5 47288 * 47289 * _.random(5); 47290 * // => also an integer between 0 and 5 47291 * 47292 * _.random(5, true); 47293 * // => a floating-point number between 0 and 5 47294 * 47295 * _.random(1.2, 5.2); 47296 * // => a floating-point number between 1.2 and 5.2 47297 */ 47298 function random(lower, upper, floating) { 47299 if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { 47300 upper = floating = undefined; 47301 } 47302 if (floating === undefined) { 47303 if (typeof upper == 'boolean') { 47304 floating = upper; 47305 upper = undefined; 47306 } 47307 else if (typeof lower == 'boolean') { 47308 floating = lower; 47309 lower = undefined; 47310 } 47311 } 47312 if (lower === undefined && upper === undefined) { 47313 lower = 0; 47314 upper = 1; 47315 } 47316 else { 47317 lower = toFinite(lower); 47318 if (upper === undefined) { 47319 upper = lower; 47320 lower = 0; 47321 } else { 47322 upper = toFinite(upper); 47323 } 47324 } 47325 if (lower > upper) { 47326 var temp = lower; 47327 lower = upper; 47328 upper = temp; 47329 } 47330 if (floating || lower % 1 || upper % 1) { 47331 var rand = nativeRandom(); 47332 return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); 47333 } 47334 return baseRandom(lower, upper); 47335 } 47336 47337 /*------------------------------------------------------------------------*/ 47338 47339 /** 47340 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). 47341 * 47342 * @static 47343 * @memberOf _ 47344 * @since 3.0.0 47345 * @category String 47346 * @param {string} [string=''] The string to convert. 47347 * @returns {string} Returns the camel cased string. 47348 * @example 47349 * 47350 * _.camelCase('Foo Bar'); 47351 * // => 'fooBar' 47352 * 47353 * _.camelCase('--foo-bar--'); 47354 * // => 'fooBar' 47355 * 47356 * _.camelCase('__FOO_BAR__'); 47357 * // => 'fooBar' 47358 */ 47359 var camelCase = createCompounder(function(result, word, index) { 47360 word = word.toLowerCase(); 47361 return result + (index ? capitalize(word) : word); 47362 }); 47363 47364 /** 47365 * Converts the first character of `string` to upper case and the remaining 47366 * to lower case. 47367 * 47368 * @static 47369 * @memberOf _ 47370 * @since 3.0.0 47371 * @category String 47372 * @param {string} [string=''] The string to capitalize. 47373 * @returns {string} Returns the capitalized string. 47374 * @example 47375 * 47376 * _.capitalize('FRED'); 47377 * // => 'Fred' 47378 */ 47379 function capitalize(string) { 47380 return upperFirst(toString(string).toLowerCase()); 47381 } 47382 47383 /** 47384 * Deburrs `string` by converting 47385 * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) 47386 * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) 47387 * letters to basic Latin letters and removing 47388 * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). 47389 * 47390 * @static 47391 * @memberOf _ 47392 * @since 3.0.0 47393 * @category String 47394 * @param {string} [string=''] The string to deburr. 47395 * @returns {string} Returns the deburred string. 47396 * @example 47397 * 47398 * _.deburr('déjà vu'); 47399 * // => 'deja vu' 47400 */ 47401 function deburr(string) { 47402 string = toString(string); 47403 return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); 47404 } 47405 47406 /** 47407 * Checks if `string` ends with the given target string. 47408 * 47409 * @static 47410 * @memberOf _ 47411 * @since 3.0.0 47412 * @category String 47413 * @param {string} [string=''] The string to inspect. 47414 * @param {string} [target] The string to search for. 47415 * @param {number} [position=string.length] The position to search up to. 47416 * @returns {boolean} Returns `true` if `string` ends with `target`, 47417 * else `false`. 47418 * @example 47419 * 47420 * _.endsWith('abc', 'c'); 47421 * // => true 47422 * 47423 * _.endsWith('abc', 'b'); 47424 * // => false 47425 * 47426 * _.endsWith('abc', 'b', 2); 47427 * // => true 47428 */ 47429 function endsWith(string, target, position) { 47430 string = toString(string); 47431 target = baseToString(target); 47432 47433 var length = string.length; 47434 position = position === undefined 47435 ? length 47436 : baseClamp(toInteger(position), 0, length); 47437 47438 var end = position; 47439 position -= target.length; 47440 return position >= 0 && string.slice(position, end) == target; 47441 } 47442 47443 /** 47444 * Converts the characters "&", "<", ">", '"', and "'" in `string` to their 47445 * corresponding HTML entities. 47446 * 47447 * **Note:** No other characters are escaped. To escape additional 47448 * characters use a third-party library like [_he_](https://mths.be/he). 47449 * 47450 * Though the ">" character is escaped for symmetry, characters like 47451 * ">" and "/" don't need escaping in HTML and have no special meaning 47452 * unless they're part of a tag or unquoted attribute value. See 47453 * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) 47454 * (under "semi-related fun fact") for more details. 47455 * 47456 * When working with HTML you should always 47457 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce 47458 * XSS vectors. 47459 * 47460 * @static 47461 * @since 0.1.0 47462 * @memberOf _ 47463 * @category String 47464 * @param {string} [string=''] The string to escape. 47465 * @returns {string} Returns the escaped string. 47466 * @example 47467 * 47468 * _.escape('fred, barney, & pebbles'); 47469 * // => 'fred, barney, & pebbles' 47470 */ 47471 function escape(string) { 47472 string = toString(string); 47473 return (string && reHasUnescapedHtml.test(string)) 47474 ? string.replace(reUnescapedHtml, escapeHtmlChar) 47475 : string; 47476 } 47477 47478 /** 47479 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", 47480 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. 47481 * 47482 * @static 47483 * @memberOf _ 47484 * @since 3.0.0 47485 * @category String 47486 * @param {string} [string=''] The string to escape. 47487 * @returns {string} Returns the escaped string. 47488 * @example 47489 * 47490 * _.escapeRegExp('[lodash](https://lodash.com/)'); 47491 * // => '\[lodash\]\(https://lodash\.com/\)' 47492 */ 47493 function escapeRegExp(string) {
vendor: 4,658 bytes, lines 47494-47663
47494 string = toString(string); 47495 return (string && reHasRegExpChar.test(string)) 47496 ? string.replace(reRegExpChar, '\\$&') 47497 : string; 47498 } 47499 47500 /** 47501 * Converts `string` to 47502 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). 47503 * 47504 * @static 47505 * @memberOf _ 47506 * @since 3.0.0 47507 * @category String 47508 * @param {string} [string=''] The string to convert. 47509 * @returns {string} Returns the kebab cased string. 47510 * @example 47511 * 47512 * _.kebabCase('Foo Bar'); 47513 * // => 'foo-bar' 47514 * 47515 * _.kebabCase('fooBar'); 47516 * // => 'foo-bar' 47517 * 47518 * _.kebabCase('__FOO_BAR__'); 47519 * // => 'foo-bar' 47520 */ 47521 var kebabCase = createCompounder(function(result, word, index) { 47522 return result + (index ? '-' : '') + word.toLowerCase(); 47523 }); 47524 47525 /** 47526 * Converts `string`, as space separated words, to lower case. 47527 * 47528 * @static 47529 * @memberOf _ 47530 * @since 4.0.0 47531 * @category String 47532 * @param {string} [string=''] The string to convert. 47533 * @returns {string} Returns the lower cased string. 47534 * @example 47535 * 47536 * _.lowerCase('--Foo-Bar--'); 47537 * // => 'foo bar' 47538 * 47539 * _.lowerCase('fooBar'); 47540 * // => 'foo bar' 47541 * 47542 * _.lowerCase('__FOO_BAR__'); 47543 * // => 'foo bar' 47544 */ 47545 var lowerCase = createCompounder(function(result, word, index) { 47546 return result + (index ? ' ' : '') + word.toLowerCase(); 47547 }); 47548 47549 /** 47550 * Converts the first character of `string` to lower case. 47551 * 47552 * @static 47553 * @memberOf _ 47554 * @since 4.0.0 47555 * @category String 47556 * @param {string} [string=''] The string to convert. 47557 * @returns {string} Returns the converted string. 47558 * @example 47559 * 47560 * _.lowerFirst('Fred'); 47561 * // => 'fred' 47562 * 47563 * _.lowerFirst('FRED'); 47564 * // => 'fRED' 47565 */ 47566 var lowerFirst = createCaseFirst('toLowerCase'); 47567 47568 /** 47569 * Pads `string` on the left and right sides if it's shorter than `length`. 47570 * Padding characters are truncated if they can't be evenly divided by `length`. 47571 * 47572 * @static 47573 * @memberOf _ 47574 * @since 3.0.0 47575 * @category String 47576 * @param {string} [string=''] The string to pad. 47577 * @param {number} [length=0] The padding length. 47578 * @param {string} [chars=' '] The string used as padding. 47579 * @returns {string} Returns the padded string. 47580 * @example 47581 * 47582 * _.pad('abc', 8); 47583 * // => ' abc ' 47584 * 47585 * _.pad('abc', 8, '_-'); 47586 * // => '_-abc_-_' 47587 * 47588 * _.pad('abc', 3); 47589 * // => 'abc' 47590 */ 47591 function pad(string, length, chars) { 47592 string = toString(string); 47593 length = toInteger(length); 47594 47595 var strLength = length ? stringSize(string) : 0; 47596 if (!length || strLength >= length) { 47597 return string; 47598 } 47599 var mid = (length - strLength) / 2; 47600 return ( 47601 createPadding(nativeFloor(mid), chars) + 47602 string + 47603 createPadding(nativeCeil(mid), chars) 47604 ); 47605 } 47606 47607 /** 47608 * Pads `string` on the right side if it's shorter than `length`. Padding 47609 * characters are truncated if they exceed `length`. 47610 * 47611 * @static 47612 * @memberOf _ 47613 * @since 4.0.0 47614 * @category String 47615 * @param {string} [string=''] The string to pad. 47616 * @param {number} [length=0] The padding length. 47617 * @param {string} [chars=' '] The string used as padding. 47618 * @returns {string} Returns the padded string. 47619 * @example 47620 * 47621 * _.padEnd('abc', 6); 47622 * // => 'abc ' 47623 * 47624 * _.padEnd('abc', 6, '_-'); 47625 * // => 'abc_-_' 47626 * 47627 * _.padEnd('abc', 3); 47628 * // => 'abc' 47629 */ 47630 function padEnd(string, length, chars) { 47631 string = toString(string); 47632 length = toInteger(length); 47633 47634 var strLength = length ? stringSize(string) : 0; 47635 return (length && strLength < length) 47636 ? (string + createPadding(length - strLength, chars)) 47637 : string; 47638 } 47639 47640 /** 47641 * Pads `string` on the left side if it's shorter than `length`. Padding 47642 * characters are truncated if they exceed `length`. 47643 * 47644 * @static 47645 * @memberOf _ 47646 * @since 4.0.0 47647 * @category String 47648 * @param {string} [string=''] The string to pad. 47649 * @param {number} [length=0] The padding length. 47650 * @param {string} [chars=' '] The string used as padding. 47651 * @returns {string} Returns the padded string. 47652 * @example 47653 * 47654 * _.padStart('abc', 6); 47655 * // => ' abc' 47656 * 47657 * _.padStart('abc', 6, '_-'); 47658 * // => '_-_abc' 47659 * 47660 * _.padStart('abc', 3); 47661 * // => 'abc' 47662 */ 47663 function padStart(string, length, chars) {
vendor: 9,908 bytes, lines 47664-47956
47664 string = toString(string); 47665 length = toInteger(length); 47666 47667 var strLength = length ? stringSize(string) : 0; 47668 return (length && strLength < length) 47669 ? (createPadding(length - strLength, chars) + string) 47670 : string; 47671 } 47672 47673 /** 47674 * Converts `string` to an integer of the specified radix. If `radix` is 47675 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a 47676 * hexadecimal, in which case a `radix` of `16` is used. 47677 * 47678 * **Note:** This method aligns with the 47679 * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. 47680 * 47681 * @static 47682 * @memberOf _ 47683 * @since 1.1.0 47684 * @category String 47685 * @param {string} string The string to convert. 47686 * @param {number} [radix=10] The radix to interpret `value` by. 47687 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 47688 * @returns {number} Returns the converted integer. 47689 * @example 47690 * 47691 * _.parseInt('08'); 47692 * // => 8 47693 * 47694 * _.map(['6', '08', '10'], _.parseInt); 47695 * // => [6, 8, 10] 47696 */ 47697 function parseInt(string, radix, guard) { 47698 if (guard || radix == null) { 47699 radix = 0; 47700 } else if (radix) { 47701 radix = +radix; 47702 } 47703 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); 47704 } 47705 47706 /** 47707 * Repeats the given string `n` times. 47708 * 47709 * @static 47710 * @memberOf _ 47711 * @since 3.0.0 47712 * @category String 47713 * @param {string} [string=''] The string to repeat. 47714 * @param {number} [n=1] The number of times to repeat the string. 47715 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 47716 * @returns {string} Returns the repeated string. 47717 * @example 47718 * 47719 * _.repeat('*', 3); 47720 * // => '***' 47721 * 47722 * _.repeat('abc', 2); 47723 * // => 'abcabc' 47724 * 47725 * _.repeat('abc', 0); 47726 * // => '' 47727 */ 47728 function repeat(string, n, guard) { 47729 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { 47730 n = 1; 47731 } else { 47732 n = toInteger(n); 47733 } 47734 return baseRepeat(toString(string), n); 47735 } 47736 47737 /** 47738 * Replaces matches for `pattern` in `string` with `replacement`. 47739 * 47740 * **Note:** This method is based on 47741 * [`String#replace`](https://mdn.io/String/replace). 47742 * 47743 * @static 47744 * @memberOf _ 47745 * @since 4.0.0 47746 * @category String 47747 * @param {string} [string=''] The string to modify. 47748 * @param {RegExp|string} pattern The pattern to replace. 47749 * @param {Function|string} replacement The match replacement. 47750 * @returns {string} Returns the modified string. 47751 * @example 47752 * 47753 * _.replace('Hi Fred', 'Fred', 'Barney'); 47754 * // => 'Hi Barney' 47755 */ 47756 function replace() { 47757 var args = arguments, 47758 string = toString(args[0]); 47759 47760 return args.length < 3 ? string : string.replace(args[1], args[2]); 47761 } 47762 47763 /** 47764 * Converts `string` to 47765 * [snake case](https://en.wikipedia.org/wiki/Snake_case). 47766 * 47767 * @static 47768 * @memberOf _ 47769 * @since 3.0.0 47770 * @category String 47771 * @param {string} [string=''] The string to convert. 47772 * @returns {string} Returns the snake cased string. 47773 * @example 47774 * 47775 * _.snakeCase('Foo Bar'); 47776 * // => 'foo_bar' 47777 * 47778 * _.snakeCase('fooBar'); 47779 * // => 'foo_bar' 47780 * 47781 * _.snakeCase('--FOO-BAR--'); 47782 * // => 'foo_bar' 47783 */ 47784 var snakeCase = createCompounder(function(result, word, index) { 47785 return result + (index ? '_' : '') + word.toLowerCase(); 47786 }); 47787 47788 /** 47789 * Splits `string` by `separator`. 47790 * 47791 * **Note:** This method is based on 47792 * [`String#split`](https://mdn.io/String/split). 47793 * 47794 * @static 47795 * @memberOf _ 47796 * @since 4.0.0 47797 * @category String 47798 * @param {string} [string=''] The string to split. 47799 * @param {RegExp|string} separator The separator pattern to split by. 47800 * @param {number} [limit] The length to truncate results to. 47801 * @returns {Array} Returns the string segments. 47802 * @example 47803 * 47804 * _.split('a-b-c', '-', 2); 47805 * // => ['a', 'b'] 47806 */ 47807 function split(string, separator, limit) { 47808 if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { 47809 separator = limit = undefined; 47810 } 47811 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; 47812 if (!limit) { 47813 return []; 47814 } 47815 string = toString(string); 47816 if (string && ( 47817 typeof separator == 'string' || 47818 (separator != null && !isRegExp(separator)) 47819 )) { 47820 separator = baseToString(separator); 47821 if (!separator && hasUnicode(string)) { 47822 return castSlice(stringToArray(string), 0, limit); 47823 } 47824 } 47825 return string.split(separator, limit); 47826 } 47827 47828 /** 47829 * Converts `string` to 47830 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). 47831 * 47832 * @static 47833 * @memberOf _ 47834 * @since 3.1.0 47835 * @category String 47836 * @param {string} [string=''] The string to convert. 47837 * @returns {string} Returns the start cased string. 47838 * @example 47839 * 47840 * _.startCase('--foo-bar--'); 47841 * // => 'Foo Bar' 47842 * 47843 * _.startCase('fooBar'); 47844 * // => 'Foo Bar' 47845 * 47846 * _.startCase('__FOO_BAR__'); 47847 * // => 'FOO BAR' 47848 */ 47849 var startCase = createCompounder(function(result, word, index) { 47850 return result + (index ? ' ' : '') + upperFirst(word); 47851 }); 47852 47853 /** 47854 * Checks if `string` starts with the given target string. 47855 * 47856 * @static 47857 * @memberOf _ 47858 * @since 3.0.0 47859 * @category String 47860 * @param {string} [string=''] The string to inspect. 47861 * @param {string} [target] The string to search for. 47862 * @param {number} [position=0] The position to search from. 47863 * @returns {boolean} Returns `true` if `string` starts with `target`, 47864 * else `false`. 47865 * @example 47866 * 47867 * _.startsWith('abc', 'a'); 47868 * // => true 47869 * 47870 * _.startsWith('abc', 'b'); 47871 * // => false 47872 * 47873 * _.startsWith('abc', 'b', 1); 47874 * // => true 47875 */ 47876 function startsWith(string, target, position) { 47877 string = toString(string); 47878 position = position == null 47879 ? 0 47880 : baseClamp(toInteger(position), 0, string.length); 47881 47882 target = baseToString(target); 47883 return string.slice(position, position + target.length) == target; 47884 } 47885 47886 /** 47887 * Creates a compiled template function that can interpolate data properties 47888 * in "interpolate" delimiters, HTML-escape interpolated data properties in 47889 * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data 47890 * properties may be accessed as free variables in the template. If a setting 47891 * object is given, it takes precedence over `_.templateSettings` values. 47892 * 47893 * **Note:** In the development build `_.template` utilizes 47894 * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) 47895 * for easier debugging. 47896 * 47897 * For more information on precompiling templates see 47898 * [lodash's custom builds documentation](https://lodash.com/custom-builds). 47899 * 47900 * For more information on Chrome extension sandboxes see 47901 * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). 47902 * 47903 * @static 47904 * @since 0.1.0 47905 * @memberOf _ 47906 * @category String 47907 * @param {string} [string=''] The template string. 47908 * @param {Object} [options={}] The options object. 47909 * @param {RegExp} [options.escape=_.templateSettings.escape] 47910 * The HTML "escape" delimiter. 47911 * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] 47912 * The "evaluate" delimiter. 47913 * @param {Object} [options.imports=_.templateSettings.imports] 47914 * An object to import into the template as free variables. 47915 * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] 47916 * The "interpolate" delimiter. 47917 * @param {string} [options.sourceURL='lodash.templateSources[n]'] 47918 * The sourceURL of the compiled template. 47919 * @param {string} [options.variable='obj'] 47920 * The data object variable name. 47921 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 47922 * @returns {Function} Returns the compiled template function. 47923 * @example 47924 * 47925 * // Use the "interpolate" delimiter to create a compiled template. 47926 * var compiled = _.template('hello <%= user %>!'); 47927 * compiled({ 'user': 'fred' }); 47928 * // => 'hello fred!' 47929 * 47930 * // Use the HTML "escape" delimiter to escape data property values. 47931 * var compiled = _.template('<b><%- value %></b>'); 47932 * compiled({ 'value': '<script>' }); 47933 * // => '<b><script></b>' 47934 * 47935 * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. 47936 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); 47937 * compiled({ 'users': ['fred', 'barney'] }); 47938 * // => '<li>fred</li><li>barney</li>' 47939 * 47940 * // Use the internal `print` function in "evaluate" delimiters. 47941 * var compiled = _.template('<% print("hello " + user); %>!'); 47942 * compiled({ 'user': 'barney' }); 47943 * // => 'hello barney!' 47944 * 47945 * // Use the ES template literal delimiter as an "interpolate" delimiter. 47946 * // Disable support by replacing the "interpolate" delimiter. 47947 * var compiled = _.template('hello ${ user }!'); 47948 * compiled({ 'user': 'pebbles' }); 47949 * // => 'hello pebbles!' 47950 * 47951 * // Use backslashes to treat delimiters as plain text. 47952 * var compiled = _.template('<%= "\\<%- value %\\>" %>'); 47953 * compiled({ 'value': 'ignored' }); 47954 * // => '<%- value %>' 47955 * 47956 * // Use the `imports` option to import `jQuery` as `jq`.
vendor: 14,162 bytes, lines 47957-48369
47957 * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; 47958 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); 47959 * compiled({ 'users': ['fred', 'barney'] }); 47960 * // => '<li>fred</li><li>barney</li>' 47961 * 47962 * // Use the `sourceURL` option to specify a custom sourceURL for the template. 47963 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); 47964 * compiled(data); 47965 * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. 47966 * 47967 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. 47968 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); 47969 * compiled.source; 47970 * // => function(data) { 47971 * // var __t, __p = ''; 47972 * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; 47973 * // return __p; 47974 * // } 47975 * 47976 * // Use custom template delimiters. 47977 * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; 47978 * var compiled = _.template('hello {{ user }}!'); 47979 * compiled({ 'user': 'mustache' }); 47980 * // => 'hello mustache!' 47981 * 47982 * // Use the `source` property to inline compiled templates for meaningful 47983 * // line numbers in error messages and stack traces. 47984 * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ 47985 * var JST = {\ 47986 * "main": ' + _.template(mainText).source + '\ 47987 * };\ 47988 * '); 47989 */ 47990 function template(string, options, guard) { 47991 // Based on John Resig's `tmpl` implementation 47992 // (http://ejohn.org/blog/javascript-micro-templating/) 47993 // and Laura Doktorova's doT.js (https://github.com/olado/doT). 47994 var settings = lodash.templateSettings; 47995 47996 if (guard && isIterateeCall(string, options, guard)) { 47997 options = undefined; 47998 } 47999 string = toString(string); 48000 options = assignInWith({}, options, settings, customDefaultsAssignIn); 48001 48002 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), 48003 importsKeys = keys(imports), 48004 importsValues = baseValues(imports, importsKeys); 48005 48006 var isEscaping, 48007 isEvaluating, 48008 index = 0, 48009 interpolate = options.interpolate || reNoMatch, 48010 source = "__p += '"; 48011 48012 // Compile the regexp to match each delimiter. 48013 var reDelimiters = RegExp( 48014 (options.escape || reNoMatch).source + '|' + 48015 interpolate.source + '|' + 48016 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + 48017 (options.evaluate || reNoMatch).source + '|$' 48018 , 'g'); 48019 48020 // Use a sourceURL for easier debugging. 48021 // The sourceURL gets injected into the source that's eval-ed, so be careful 48022 // with lookup (in case of e.g. prototype pollution), and strip newlines if any. 48023 // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. 48024 var sourceURL = '//# sourceURL=' + 48025 (hasOwnProperty.call(options, 'sourceURL') 48026 ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') 48027 : ('lodash.templateSources[' + (++templateCounter) + ']') 48028 ) + '\n'; 48029 48030 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { 48031 interpolateValue || (interpolateValue = esTemplateValue); 48032 48033 // Escape characters that can't be included in string literals. 48034 source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); 48035 48036 // Replace delimiters with snippets. 48037 if (escapeValue) { 48038 isEscaping = true; 48039 source += "' +\n__e(" + escapeValue + ") +\n'"; 48040 } 48041 if (evaluateValue) { 48042 isEvaluating = true; 48043 source += "';\n" + evaluateValue + ";\n__p += '"; 48044 } 48045 if (interpolateValue) { 48046 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; 48047 } 48048 index = offset + match.length; 48049 48050 // The JS engine embedded in Adobe products needs `match` returned in 48051 // order to produce the correct `offset` value. 48052 return match; 48053 }); 48054 48055 source += "';\n"; 48056 48057 // If `variable` is not specified wrap a with-statement around the generated 48058 // code to add the data object to the top of the scope chain. 48059 // Like with sourceURL, we take care to not check the option's prototype, 48060 // as this configuration is a code injection vector. 48061 var variable = hasOwnProperty.call(options, 'variable') && options.variable; 48062 if (!variable) { 48063 source = 'with (obj) {\n' + source + '\n}\n'; 48064 } 48065 // Cleanup code by stripping empty strings. 48066 source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) 48067 .replace(reEmptyStringMiddle, '$1') 48068 .replace(reEmptyStringTrailing, '$1;'); 48069 48070 // Frame code as the function body. 48071 source = 'function(' + (variable || 'obj') + ') {\n' + 48072 (variable 48073 ? '' 48074 : 'obj || (obj = {});\n' 48075 ) + 48076 "var __t, __p = ''" + 48077 (isEscaping 48078 ? ', __e = _.escape' 48079 : '' 48080 ) + 48081 (isEvaluating 48082 ? ', __j = Array.prototype.join;\n' + 48083 "function print() { __p += __j.call(arguments, '') }\n" 48084 : ';\n' 48085 ) + 48086 source + 48087 'return __p\n}'; 48088 48089 var result = attempt(function() { 48090 return Function(importsKeys, sourceURL + 'return ' + source) 48091 .apply(undefined, importsValues); 48092 }); 48093 48094 // Provide the compiled function's source by its `toString` method or 48095 // the `source` property as a convenience for inlining compiled templates. 48096 result.source = source; 48097 if (isError(result)) { 48098 throw result; 48099 } 48100 return result; 48101 } 48102 48103 /** 48104 * Converts `string`, as a whole, to lower case just like 48105 * [String#toLowerCase](https://mdn.io/toLowerCase). 48106 * 48107 * @static 48108 * @memberOf _ 48109 * @since 4.0.0 48110 * @category String 48111 * @param {string} [string=''] The string to convert. 48112 * @returns {string} Returns the lower cased string. 48113 * @example 48114 * 48115 * _.toLower('--Foo-Bar--'); 48116 * // => '--foo-bar--' 48117 * 48118 * _.toLower('fooBar'); 48119 * // => 'foobar' 48120 * 48121 * _.toLower('__FOO_BAR__'); 48122 * // => '__foo_bar__' 48123 */ 48124 function toLower(value) { 48125 return toString(value).toLowerCase(); 48126 } 48127 48128 /** 48129 * Converts `string`, as a whole, to upper case just like 48130 * [String#toUpperCase](https://mdn.io/toUpperCase). 48131 * 48132 * @static 48133 * @memberOf _ 48134 * @since 4.0.0 48135 * @category String 48136 * @param {string} [string=''] The string to convert. 48137 * @returns {string} Returns the upper cased string. 48138 * @example 48139 * 48140 * _.toUpper('--foo-bar--'); 48141 * // => '--FOO-BAR--' 48142 * 48143 * _.toUpper('fooBar'); 48144 * // => 'FOOBAR' 48145 * 48146 * _.toUpper('__foo_bar__'); 48147 * // => '__FOO_BAR__' 48148 */ 48149 function toUpper(value) { 48150 return toString(value).toUpperCase(); 48151 } 48152 48153 /** 48154 * Removes leading and trailing whitespace or specified characters from `string`. 48155 * 48156 * @static 48157 * @memberOf _ 48158 * @since 3.0.0 48159 * @category String 48160 * @param {string} [string=''] The string to trim. 48161 * @param {string} [chars=whitespace] The characters to trim. 48162 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 48163 * @returns {string} Returns the trimmed string. 48164 * @example 48165 * 48166 * _.trim(' abc '); 48167 * // => 'abc' 48168 * 48169 * _.trim('-_-abc-_-', '_-'); 48170 * // => 'abc' 48171 * 48172 * _.map([' foo ', ' bar '], _.trim); 48173 * // => ['foo', 'bar'] 48174 */ 48175 function trim(string, chars, guard) { 48176 string = toString(string); 48177 if (string && (guard || chars === undefined)) { 48178 return string.replace(reTrim, ''); 48179 } 48180 if (!string || !(chars = baseToString(chars))) { 48181 return string; 48182 } 48183 var strSymbols = stringToArray(string), 48184 chrSymbols = stringToArray(chars), 48185 start = charsStartIndex(strSymbols, chrSymbols), 48186 end = charsEndIndex(strSymbols, chrSymbols) + 1; 48187 48188 return castSlice(strSymbols, start, end).join(''); 48189 } 48190 48191 /** 48192 * Removes trailing whitespace or specified characters from `string`. 48193 * 48194 * @static 48195 * @memberOf _ 48196 * @since 4.0.0 48197 * @category String 48198 * @param {string} [string=''] The string to trim. 48199 * @param {string} [chars=whitespace] The characters to trim. 48200 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 48201 * @returns {string} Returns the trimmed string. 48202 * @example 48203 * 48204 * _.trimEnd(' abc '); 48205 * // => ' abc' 48206 * 48207 * _.trimEnd('-_-abc-_-', '_-'); 48208 * // => '-_-abc' 48209 */ 48210 function trimEnd(string, chars, guard) { 48211 string = toString(string); 48212 if (string && (guard || chars === undefined)) { 48213 return string.replace(reTrimEnd, ''); 48214 } 48215 if (!string || !(chars = baseToString(chars))) { 48216 return string; 48217 } 48218 var strSymbols = stringToArray(string), 48219 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; 48220 48221 return castSlice(strSymbols, 0, end).join(''); 48222 } 48223 48224 /** 48225 * Removes leading whitespace or specified characters from `string`. 48226 * 48227 * @static 48228 * @memberOf _ 48229 * @since 4.0.0 48230 * @category String 48231 * @param {string} [string=''] The string to trim. 48232 * @param {string} [chars=whitespace] The characters to trim. 48233 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 48234 * @returns {string} Returns the trimmed string. 48235 * @example 48236 * 48237 * _.trimStart(' abc '); 48238 * // => 'abc ' 48239 * 48240 * _.trimStart('-_-abc-_-', '_-'); 48241 * // => 'abc-_-' 48242 */ 48243 function trimStart(string, chars, guard) { 48244 string = toString(string); 48245 if (string && (guard || chars === undefined)) { 48246 return string.replace(reTrimStart, ''); 48247 } 48248 if (!string || !(chars = baseToString(chars))) { 48249 return string; 48250 } 48251 var strSymbols = stringToArray(string), 48252 start = charsStartIndex(strSymbols, stringToArray(chars)); 48253 48254 return castSlice(strSymbols, start).join(''); 48255 } 48256 48257 /** 48258 * Truncates `string` if it's longer than the given maximum string length. 48259 * The last characters of the truncated string are replaced with the omission 48260 * string which defaults to "...". 48261 * 48262 * @static 48263 * @memberOf _ 48264 * @since 4.0.0 48265 * @category String 48266 * @param {string} [string=''] The string to truncate. 48267 * @param {Object} [options={}] The options object. 48268 * @param {number} [options.length=30] The maximum string length. 48269 * @param {string} [options.omission='...'] The string to indicate text is omitted. 48270 * @param {RegExp|string} [options.separator] The separator pattern to truncate to. 48271 * @returns {string} Returns the truncated string. 48272 * @example 48273 * 48274 * _.truncate('hi-diddly-ho there, neighborino'); 48275 * // => 'hi-diddly-ho there, neighbo...' 48276 * 48277 * _.truncate('hi-diddly-ho there, neighborino', { 48278 * 'length': 24, 48279 * 'separator': ' ' 48280 * }); 48281 * // => 'hi-diddly-ho there,...' 48282 * 48283 * _.truncate('hi-diddly-ho there, neighborino', { 48284 * 'length': 24, 48285 * 'separator': /,? +/ 48286 * }); 48287 * // => 'hi-diddly-ho there...' 48288 * 48289 * _.truncate('hi-diddly-ho there, neighborino', { 48290 * 'omission': ' [...]' 48291 * }); 48292 * // => 'hi-diddly-ho there, neig [...]' 48293 */ 48294 function truncate(string, options) { 48295 var length = DEFAULT_TRUNC_LENGTH, 48296 omission = DEFAULT_TRUNC_OMISSION; 48297 48298 if (isObject(options)) { 48299 var separator = 'separator' in options ? options.separator : separator; 48300 length = 'length' in options ? toInteger(options.length) : length; 48301 omission = 'omission' in options ? baseToString(options.omission) : omission; 48302 } 48303 string = toString(string); 48304 48305 var strLength = string.length; 48306 if (hasUnicode(string)) { 48307 var strSymbols = stringToArray(string); 48308 strLength = strSymbols.length; 48309 } 48310 if (length >= strLength) { 48311 return string; 48312 } 48313 var end = length - stringSize(omission); 48314 if (end < 1) { 48315 return omission; 48316 } 48317 var result = strSymbols 48318 ? castSlice(strSymbols, 0, end).join('') 48319 : string.slice(0, end); 48320 48321 if (separator === undefined) { 48322 return result + omission; 48323 } 48324 if (strSymbols) { 48325 end += (result.length - end); 48326 } 48327 if (isRegExp(separator)) { 48328 if (string.slice(end).search(separator)) { 48329 var match, 48330 substring = result; 48331 48332 if (!separator.global) { 48333 separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); 48334 } 48335 separator.lastIndex = 0; 48336 while ((match = separator.exec(substring))) { 48337 var newEnd = match.index; 48338 } 48339 result = result.slice(0, newEnd === undefined ? end : newEnd); 48340 } 48341 } else if (string.indexOf(baseToString(separator), end) != end) { 48342 var index = result.lastIndexOf(separator); 48343 if (index > -1) { 48344 result = result.slice(0, index); 48345 } 48346 } 48347 return result + omission; 48348 } 48349 48350 /** 48351 * The inverse of `_.escape`; this method converts the HTML entities 48352 * `&`, `<`, `>`, `"`, and `'` in `string` to 48353 * their corresponding characters. 48354 * 48355 * **Note:** No other HTML entities are unescaped. To unescape additional 48356 * HTML entities use a third-party library like [_he_](https://mths.be/he). 48357 * 48358 * @static 48359 * @memberOf _ 48360 * @since 0.6.0 48361 * @category String 48362 * @param {string} [string=''] The string to unescape. 48363 * @returns {string} Returns the unescaped string. 48364 * @example 48365 * 48366 * _.unescape('fred, barney, & pebbles'); 48367 * // => 'fred, barney, & pebbles' 48368 */ 48369 function unescape(string) {
vendor: 5,637 bytes, lines 48370-48557
48370 string = toString(string); 48371 return (string && reHasEscapedHtml.test(string)) 48372 ? string.replace(reEscapedHtml, unescapeHtmlChar) 48373 : string; 48374 } 48375 48376 /** 48377 * Converts `string`, as space separated words, to upper case. 48378 * 48379 * @static 48380 * @memberOf _ 48381 * @since 4.0.0 48382 * @category String 48383 * @param {string} [string=''] The string to convert. 48384 * @returns {string} Returns the upper cased string. 48385 * @example 48386 * 48387 * _.upperCase('--foo-bar'); 48388 * // => 'FOO BAR' 48389 * 48390 * _.upperCase('fooBar'); 48391 * // => 'FOO BAR' 48392 * 48393 * _.upperCase('__foo_bar__'); 48394 * // => 'FOO BAR' 48395 */ 48396 var upperCase = createCompounder(function(result, word, index) { 48397 return result + (index ? ' ' : '') + word.toUpperCase(); 48398 }); 48399 48400 /** 48401 * Converts the first character of `string` to upper case. 48402 * 48403 * @static 48404 * @memberOf _ 48405 * @since 4.0.0 48406 * @category String 48407 * @param {string} [string=''] The string to convert. 48408 * @returns {string} Returns the converted string. 48409 * @example 48410 * 48411 * _.upperFirst('fred'); 48412 * // => 'Fred' 48413 * 48414 * _.upperFirst('FRED'); 48415 * // => 'FRED' 48416 */ 48417 var upperFirst = createCaseFirst('toUpperCase'); 48418 48419 /** 48420 * Splits `string` into an array of its words. 48421 * 48422 * @static 48423 * @memberOf _ 48424 * @since 3.0.0 48425 * @category String 48426 * @param {string} [string=''] The string to inspect. 48427 * @param {RegExp|string} [pattern] The pattern to match words. 48428 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. 48429 * @returns {Array} Returns the words of `string`. 48430 * @example 48431 * 48432 * _.words('fred, barney, & pebbles'); 48433 * // => ['fred', 'barney', 'pebbles'] 48434 * 48435 * _.words('fred, barney, & pebbles', /[^, ]+/g); 48436 * // => ['fred', 'barney', '&', 'pebbles'] 48437 */ 48438 function words(string, pattern, guard) { 48439 string = toString(string); 48440 pattern = guard ? undefined : pattern; 48441 48442 if (pattern === undefined) { 48443 return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); 48444 } 48445 return string.match(pattern) || []; 48446 } 48447 48448 /*------------------------------------------------------------------------*/ 48449 48450 /** 48451 * Attempts to invoke `func`, returning either the result or the caught error 48452 * object. Any additional arguments are provided to `func` when it's invoked. 48453 * 48454 * @static 48455 * @memberOf _ 48456 * @since 3.0.0 48457 * @category Util 48458 * @param {Function} func The function to attempt. 48459 * @param {...*} [args] The arguments to invoke `func` with. 48460 * @returns {*} Returns the `func` result or error object. 48461 * @example 48462 * 48463 * // Avoid throwing errors for invalid selectors. 48464 * var elements = _.attempt(function(selector) { 48465 * return document.querySelectorAll(selector); 48466 * }, '>_>'); 48467 * 48468 * if (_.isError(elements)) { 48469 * elements = []; 48470 * } 48471 */ 48472 var attempt = baseRest(function(func, args) { 48473 try { 48474 return apply(func, undefined, args); 48475 } catch (e) { 48476 return isError(e) ? e : new Error(e); 48477 } 48478 }); 48479 48480 /** 48481 * Binds methods of an object to the object itself, overwriting the existing 48482 * method. 48483 * 48484 * **Note:** This method doesn't set the "length" property of bound functions. 48485 * 48486 * @static 48487 * @since 0.1.0 48488 * @memberOf _ 48489 * @category Util 48490 * @param {Object} object The object to bind and assign the bound methods to. 48491 * @param {...(string|string[])} methodNames The object method names to bind. 48492 * @returns {Object} Returns `object`. 48493 * @example 48494 * 48495 * var view = { 48496 * 'label': 'docs', 48497 * 'click': function() { 48498 * console.log('clicked ' + this.label); 48499 * } 48500 * }; 48501 * 48502 * _.bindAll(view, ['click']); 48503 * jQuery(element).on('click', view.click); 48504 * // => Logs 'clicked docs' when clicked. 48505 */ 48506 var bindAll = flatRest(function(object, methodNames) { 48507 arrayEach(methodNames, function(key) { 48508 key = toKey(key); 48509 baseAssignValue(object, key, bind(object[key], object)); 48510 }); 48511 return object; 48512 }); 48513 48514 /** 48515 * Creates a function that iterates over `pairs` and invokes the corresponding 48516 * function of the first predicate to return truthy. The predicate-function 48517 * pairs are invoked with the `this` binding and arguments of the created 48518 * function. 48519 * 48520 * @static 48521 * @memberOf _ 48522 * @since 4.0.0 48523 * @category Util 48524 * @param {Array} pairs The predicate-function pairs. 48525 * @returns {Function} Returns the new composite function. 48526 * @example 48527 * 48528 * var func = _.cond([ 48529 * [_.matches({ 'a': 1 }), _.constant('matches A')], 48530 * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], 48531 * [_.stubTrue, _.constant('no match')] 48532 * ]); 48533 * 48534 * func({ 'a': 1, 'b': 2 }); 48535 * // => 'matches A' 48536 * 48537 * func({ 'a': 0, 'b': 1 }); 48538 * // => 'matches B' 48539 * 48540 * func({ 'a': '1', 'b': '2' }); 48541 * // => 'no match' 48542 */ 48543 function cond(pairs) { 48544 var length = pairs == null ? 0 : pairs.length, 48545 toIteratee = getIteratee(); 48546 48547 pairs = !length ? [] : arrayMap(pairs, function(pair) { 48548 if (typeof pair[1] != 'function') { 48549 throw new TypeError(FUNC_ERROR_TEXT); 48550 } 48551 return [toIteratee(pair[0]), pair[1]]; 48552 }); 48553 48554 return baseRest(function(args) { 48555 var index = -1; 48556 while (++index < length) { 48557 var pair = pairs[index];
vendor: 19,681 bytes, lines 48558-49253
48558 if (apply(pair[0], this, args)) { 48559 return apply(pair[1], this, args); 48560 } 48561 } 48562 }); 48563 } 48564 48565 /** 48566 * Creates a function that invokes the predicate properties of `source` with 48567 * the corresponding property values of a given object, returning `true` if 48568 * all predicates return truthy, else `false`. 48569 * 48570 * **Note:** The created function is equivalent to `_.conformsTo` with 48571 * `source` partially applied. 48572 * 48573 * @static 48574 * @memberOf _ 48575 * @since 4.0.0 48576 * @category Util 48577 * @param {Object} source The object of property predicates to conform to. 48578 * @returns {Function} Returns the new spec function. 48579 * @example 48580 * 48581 * var objects = [ 48582 * { 'a': 2, 'b': 1 }, 48583 * { 'a': 1, 'b': 2 } 48584 * ]; 48585 * 48586 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); 48587 * // => [{ 'a': 1, 'b': 2 }] 48588 */ 48589 function conforms(source) { 48590 return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); 48591 } 48592 48593 /** 48594 * Creates a function that returns `value`. 48595 * 48596 * @static 48597 * @memberOf _ 48598 * @since 2.4.0 48599 * @category Util 48600 * @param {*} value The value to return from the new function. 48601 * @returns {Function} Returns the new constant function. 48602 * @example 48603 * 48604 * var objects = _.times(2, _.constant({ 'a': 1 })); 48605 * 48606 * console.log(objects); 48607 * // => [{ 'a': 1 }, { 'a': 1 }] 48608 * 48609 * console.log(objects[0] === objects[1]); 48610 * // => true 48611 */ 48612 function constant(value) { 48613 return function() { 48614 return value; 48615 }; 48616 } 48617 48618 /** 48619 * Checks `value` to determine whether a default value should be returned in 48620 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, 48621 * or `undefined`. 48622 * 48623 * @static 48624 * @memberOf _ 48625 * @since 4.14.0 48626 * @category Util 48627 * @param {*} value The value to check. 48628 * @param {*} defaultValue The default value. 48629 * @returns {*} Returns the resolved value. 48630 * @example 48631 * 48632 * _.defaultTo(1, 10); 48633 * // => 1 48634 * 48635 * _.defaultTo(undefined, 10); 48636 * // => 10 48637 */ 48638 function defaultTo(value, defaultValue) { 48639 return (value == null || value !== value) ? defaultValue : value; 48640 } 48641 48642 /** 48643 * Creates a function that returns the result of invoking the given functions 48644 * with the `this` binding of the created function, where each successive 48645 * invocation is supplied the return value of the previous. 48646 * 48647 * @static 48648 * @memberOf _ 48649 * @since 3.0.0 48650 * @category Util 48651 * @param {...(Function|Function[])} [funcs] The functions to invoke. 48652 * @returns {Function} Returns the new composite function. 48653 * @see _.flowRight 48654 * @example 48655 * 48656 * function square(n) { 48657 * return n * n; 48658 * } 48659 * 48660 * var addSquare = _.flow([_.add, square]); 48661 * addSquare(1, 2); 48662 * // => 9 48663 */ 48664 var flow = createFlow(); 48665 48666 /** 48667 * This method is like `_.flow` except that it creates a function that 48668 * invokes the given functions from right to left. 48669 * 48670 * @static 48671 * @since 3.0.0 48672 * @memberOf _ 48673 * @category Util 48674 * @param {...(Function|Function[])} [funcs] The functions to invoke. 48675 * @returns {Function} Returns the new composite function. 48676 * @see _.flow 48677 * @example 48678 * 48679 * function square(n) { 48680 * return n * n; 48681 * } 48682 * 48683 * var addSquare = _.flowRight([square, _.add]); 48684 * addSquare(1, 2); 48685 * // => 9 48686 */ 48687 var flowRight = createFlow(true); 48688 48689 /** 48690 * This method returns the first argument it receives. 48691 * 48692 * @static 48693 * @since 0.1.0 48694 * @memberOf _ 48695 * @category Util 48696 * @param {*} value Any value. 48697 * @returns {*} Returns `value`. 48698 * @example 48699 * 48700 * var object = { 'a': 1 }; 48701 * 48702 * console.log(_.identity(object) === object); 48703 * // => true 48704 */ 48705 function identity(value) { 48706 return value; 48707 } 48708 48709 /** 48710 * Creates a function that invokes `func` with the arguments of the created 48711 * function. If `func` is a property name, the created function returns the 48712 * property value for a given element. If `func` is an array or object, the 48713 * created function returns `true` for elements that contain the equivalent 48714 * source properties, otherwise it returns `false`. 48715 * 48716 * @static 48717 * @since 4.0.0 48718 * @memberOf _ 48719 * @category Util 48720 * @param {*} [func=_.identity] The value to convert to a callback. 48721 * @returns {Function} Returns the callback. 48722 * @example 48723 * 48724 * var users = [ 48725 * { 'user': 'barney', 'age': 36, 'active': true }, 48726 * { 'user': 'fred', 'age': 40, 'active': false } 48727 * ]; 48728 * 48729 * // The `_.matches` iteratee shorthand. 48730 * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); 48731 * // => [{ 'user': 'barney', 'age': 36, 'active': true }] 48732 * 48733 * // The `_.matchesProperty` iteratee shorthand. 48734 * _.filter(users, _.iteratee(['user', 'fred'])); 48735 * // => [{ 'user': 'fred', 'age': 40 }] 48736 * 48737 * // The `_.property` iteratee shorthand. 48738 * _.map(users, _.iteratee('user')); 48739 * // => ['barney', 'fred'] 48740 * 48741 * // Create custom iteratee shorthands. 48742 * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { 48743 * return !_.isRegExp(func) ? iteratee(func) : function(string) { 48744 * return func.test(string); 48745 * }; 48746 * }); 48747 * 48748 * _.filter(['abc', 'def'], /ef/); 48749 * // => ['def'] 48750 */ 48751 function iteratee(func) { 48752 return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); 48753 } 48754 48755 /** 48756 * Creates a function that performs a partial deep comparison between a given 48757 * object and `source`, returning `true` if the given object has equivalent 48758 * property values, else `false`. 48759 * 48760 * **Note:** The created function is equivalent to `_.isMatch` with `source` 48761 * partially applied. 48762 * 48763 * Partial comparisons will match empty array and empty object `source` 48764 * values against any array or object value, respectively. See `_.isEqual` 48765 * for a list of supported value comparisons. 48766 * 48767 * @static 48768 * @memberOf _ 48769 * @since 3.0.0 48770 * @category Util 48771 * @param {Object} source The object of property values to match. 48772 * @returns {Function} Returns the new spec function. 48773 * @example 48774 * 48775 * var objects = [ 48776 * { 'a': 1, 'b': 2, 'c': 3 }, 48777 * { 'a': 4, 'b': 5, 'c': 6 } 48778 * ]; 48779 * 48780 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); 48781 * // => [{ 'a': 4, 'b': 5, 'c': 6 }] 48782 */ 48783 function matches(source) { 48784 return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); 48785 } 48786 48787 /** 48788 * Creates a function that performs a partial deep comparison between the 48789 * value at `path` of a given object to `srcValue`, returning `true` if the 48790 * object value is equivalent, else `false`. 48791 * 48792 * **Note:** Partial comparisons will match empty array and empty object 48793 * `srcValue` values against any array or object value, respectively. See 48794 * `_.isEqual` for a list of supported value comparisons. 48795 * 48796 * @static 48797 * @memberOf _ 48798 * @since 3.2.0 48799 * @category Util 48800 * @param {Array|string} path The path of the property to get. 48801 * @param {*} srcValue The value to match. 48802 * @returns {Function} Returns the new spec function. 48803 * @example 48804 * 48805 * var objects = [ 48806 * { 'a': 1, 'b': 2, 'c': 3 }, 48807 * { 'a': 4, 'b': 5, 'c': 6 } 48808 * ]; 48809 * 48810 * _.find(objects, _.matchesProperty('a', 4)); 48811 * // => { 'a': 4, 'b': 5, 'c': 6 } 48812 */ 48813 function matchesProperty(path, srcValue) { 48814 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); 48815 } 48816 48817 /** 48818 * Creates a function that invokes the method at `path` of a given object. 48819 * Any additional arguments are provided to the invoked method. 48820 * 48821 * @static 48822 * @memberOf _ 48823 * @since 3.7.0 48824 * @category Util 48825 * @param {Array|string} path The path of the method to invoke. 48826 * @param {...*} [args] The arguments to invoke the method with. 48827 * @returns {Function} Returns the new invoker function. 48828 * @example 48829 * 48830 * var objects = [ 48831 * { 'a': { 'b': _.constant(2) } }, 48832 * { 'a': { 'b': _.constant(1) } } 48833 * ]; 48834 * 48835 * _.map(objects, _.method('a.b')); 48836 * // => [2, 1] 48837 * 48838 * _.map(objects, _.method(['a', 'b'])); 48839 * // => [2, 1] 48840 */ 48841 var method = baseRest(function(path, args) { 48842 return function(object) { 48843 return baseInvoke(object, path, args); 48844 }; 48845 }); 48846 48847 /** 48848 * The opposite of `_.method`; this method creates a function that invokes 48849 * the method at a given path of `object`. Any additional arguments are 48850 * provided to the invoked method. 48851 * 48852 * @static 48853 * @memberOf _ 48854 * @since 3.7.0 48855 * @category Util 48856 * @param {Object} object The object to query. 48857 * @param {...*} [args] The arguments to invoke the method with. 48858 * @returns {Function} Returns the new invoker function. 48859 * @example 48860 * 48861 * var array = _.times(3, _.constant), 48862 * object = { 'a': array, 'b': array, 'c': array }; 48863 * 48864 * _.map(['a[2]', 'c[0]'], _.methodOf(object)); 48865 * // => [2, 0] 48866 * 48867 * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); 48868 * // => [2, 0] 48869 */ 48870 var methodOf = baseRest(function(object, args) { 48871 return function(path) { 48872 return baseInvoke(object, path, args); 48873 }; 48874 }); 48875 48876 /** 48877 * Adds all own enumerable string keyed function properties of a source 48878 * object to the destination object. If `object` is a function, then methods 48879 * are added to its prototype as well. 48880 * 48881 * **Note:** Use `_.runInContext` to create a pristine `lodash` function to 48882 * avoid conflicts caused by modifying the original. 48883 * 48884 * @static 48885 * @since 0.1.0 48886 * @memberOf _ 48887 * @category Util 48888 * @param {Function|Object} [object=lodash] The destination object. 48889 * @param {Object} source The object of functions to add. 48890 * @param {Object} [options={}] The options object. 48891 * @param {boolean} [options.chain=true] Specify whether mixins are chainable. 48892 * @returns {Function|Object} Returns `object`. 48893 * @example 48894 * 48895 * function vowels(string) { 48896 * return _.filter(string, function(v) { 48897 * return /[aeiou]/i.test(v); 48898 * }); 48899 * } 48900 * 48901 * _.mixin({ 'vowels': vowels }); 48902 * _.vowels('fred'); 48903 * // => ['e'] 48904 * 48905 * _('fred').vowels().value(); 48906 * // => ['e'] 48907 * 48908 * _.mixin({ 'vowels': vowels }, { 'chain': false }); 48909 * _('fred').vowels(); 48910 * // => ['e'] 48911 */ 48912 function mixin(object, source, options) { 48913 var props = keys(source), 48914 methodNames = baseFunctions(source, props); 48915 48916 if (options == null && 48917 !(isObject(source) && (methodNames.length || !props.length))) { 48918 options = source; 48919 source = object; 48920 object = this; 48921 methodNames = baseFunctions(source, keys(source)); 48922 } 48923 var chain = !(isObject(options) && 'chain' in options) || !!options.chain, 48924 isFunc = isFunction(object); 48925 48926 arrayEach(methodNames, function(methodName) { 48927 var func = source[methodName]; 48928 object[methodName] = func; 48929 if (isFunc) { 48930 object.prototype[methodName] = function() { 48931 var chainAll = this.__chain__; 48932 if (chain || chainAll) { 48933 var result = object(this.__wrapped__), 48934 actions = result.__actions__ = copyArray(this.__actions__); 48935 48936 actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); 48937 result.__chain__ = chainAll; 48938 return result; 48939 } 48940 return func.apply(object, arrayPush([this.value()], arguments)); 48941 }; 48942 } 48943 }); 48944 48945 return object; 48946 } 48947 48948 /** 48949 * Reverts the `_` variable to its previous value and returns a reference to 48950 * the `lodash` function. 48951 * 48952 * @static 48953 * @since 0.1.0 48954 * @memberOf _ 48955 * @category Util 48956 * @returns {Function} Returns the `lodash` function. 48957 * @example 48958 * 48959 * var lodash = _.noConflict(); 48960 */ 48961 function noConflict() { 48962 if (root._ === this) { 48963 root._ = oldDash; 48964 } 48965 return this; 48966 } 48967 48968 /** 48969 * This method returns `undefined`. 48970 * 48971 * @static 48972 * @memberOf _ 48973 * @since 2.3.0 48974 * @category Util 48975 * @example 48976 * 48977 * _.times(2, _.noop); 48978 * // => [undefined, undefined] 48979 */ 48980 function noop() { 48981 // No operation performed. 48982 } 48983 48984 /** 48985 * Creates a function that gets the argument at index `n`. If `n` is negative, 48986 * the nth argument from the end is returned. 48987 * 48988 * @static 48989 * @memberOf _ 48990 * @since 4.0.0 48991 * @category Util 48992 * @param {number} [n=0] The index of the argument to return. 48993 * @returns {Function} Returns the new pass-thru function. 48994 * @example 48995 * 48996 * var func = _.nthArg(1); 48997 * func('a', 'b', 'c', 'd'); 48998 * // => 'b' 48999 * 49000 * var func = _.nthArg(-2); 49001 * func('a', 'b', 'c', 'd'); 49002 * // => 'c' 49003 */ 49004 function nthArg(n) { 49005 n = toInteger(n); 49006 return baseRest(function(args) { 49007 return baseNth(args, n); 49008 }); 49009 } 49010 49011 /** 49012 * Creates a function that invokes `iteratees` with the arguments it receives 49013 * and returns their results. 49014 * 49015 * @static 49016 * @memberOf _ 49017 * @since 4.0.0 49018 * @category Util 49019 * @param {...(Function|Function[])} [iteratees=[_.identity]] 49020 * The iteratees to invoke. 49021 * @returns {Function} Returns the new function. 49022 * @example 49023 * 49024 * var func = _.over([Math.max, Math.min]); 49025 * 49026 * func(1, 2, 3, 4); 49027 * // => [4, 1] 49028 */ 49029 var over = createOver(arrayMap); 49030 49031 /** 49032 * Creates a function that checks if **all** of the `predicates` return 49033 * truthy when invoked with the arguments it receives. 49034 * 49035 * @static 49036 * @memberOf _ 49037 * @since 4.0.0 49038 * @category Util 49039 * @param {...(Function|Function[])} [predicates=[_.identity]] 49040 * The predicates to check. 49041 * @returns {Function} Returns the new function. 49042 * @example 49043 * 49044 * var func = _.overEvery([Boolean, isFinite]); 49045 * 49046 * func('1'); 49047 * // => true 49048 * 49049 * func(null); 49050 * // => false 49051 * 49052 * func(NaN); 49053 * // => false 49054 */ 49055 var overEvery = createOver(arrayEvery); 49056 49057 /** 49058 * Creates a function that checks if **any** of the `predicates` return 49059 * truthy when invoked with the arguments it receives. 49060 * 49061 * @static 49062 * @memberOf _ 49063 * @since 4.0.0 49064 * @category Util 49065 * @param {...(Function|Function[])} [predicates=[_.identity]] 49066 * The predicates to check. 49067 * @returns {Function} Returns the new function. 49068 * @example 49069 * 49070 * var func = _.overSome([Boolean, isFinite]); 49071 * 49072 * func('1'); 49073 * // => true 49074 * 49075 * func(null); 49076 * // => true 49077 * 49078 * func(NaN); 49079 * // => false 49080 */ 49081 var overSome = createOver(arraySome); 49082 49083 /** 49084 * Creates a function that returns the value at `path` of a given object. 49085 * 49086 * @static 49087 * @memberOf _ 49088 * @since 2.4.0 49089 * @category Util 49090 * @param {Array|string} path The path of the property to get. 49091 * @returns {Function} Returns the new accessor function. 49092 * @example 49093 * 49094 * var objects = [ 49095 * { 'a': { 'b': 2 } }, 49096 * { 'a': { 'b': 1 } } 49097 * ]; 49098 * 49099 * _.map(objects, _.property('a.b')); 49100 * // => [2, 1] 49101 * 49102 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); 49103 * // => [1, 2] 49104 */ 49105 function property(path) { 49106 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); 49107 } 49108 49109 /** 49110 * The opposite of `_.property`; this method creates a function that returns 49111 * the value at a given path of `object`. 49112 * 49113 * @static 49114 * @memberOf _ 49115 * @since 3.0.0 49116 * @category Util 49117 * @param {Object} object The object to query. 49118 * @returns {Function} Returns the new accessor function. 49119 * @example 49120 * 49121 * var array = [0, 1, 2], 49122 * object = { 'a': array, 'b': array, 'c': array }; 49123 * 49124 * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); 49125 * // => [2, 0] 49126 * 49127 * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); 49128 * // => [2, 0] 49129 */ 49130 function propertyOf(object) { 49131 return function(path) { 49132 return object == null ? undefined : baseGet(object, path); 49133 }; 49134 } 49135 49136 /** 49137 * Creates an array of numbers (positive and/or negative) progressing from 49138 * `start` up to, but not including, `end`. A step of `-1` is used if a negative 49139 * `start` is specified without an `end` or `step`. If `end` is not specified, 49140 * it's set to `start` with `start` then set to `0`. 49141 * 49142 * **Note:** JavaScript follows the IEEE-754 standard for resolving 49143 * floating-point values which can produce unexpected results. 49144 * 49145 * @static 49146 * @since 0.1.0 49147 * @memberOf _ 49148 * @category Util 49149 * @param {number} [start=0] The start of the range. 49150 * @param {number} end The end of the range. 49151 * @param {number} [step=1] The value to increment or decrement by. 49152 * @returns {Array} Returns the range of numbers. 49153 * @see _.inRange, _.rangeRight 49154 * @example 49155 * 49156 * _.range(4); 49157 * // => [0, 1, 2, 3] 49158 * 49159 * _.range(-4); 49160 * // => [0, -1, -2, -3] 49161 * 49162 * _.range(1, 5); 49163 * // => [1, 2, 3, 4] 49164 * 49165 * _.range(0, 20, 5); 49166 * // => [0, 5, 10, 15] 49167 * 49168 * _.range(0, -4, -1); 49169 * // => [0, -1, -2, -3] 49170 * 49171 * _.range(1, 4, 0); 49172 * // => [1, 1, 1] 49173 * 49174 * _.range(0); 49175 * // => [] 49176 */ 49177 var range = createRange(); 49178 49179 /** 49180 * This method is like `_.range` except that it populates values in 49181 * descending order. 49182 * 49183 * @static 49184 * @memberOf _ 49185 * @since 4.0.0 49186 * @category Util 49187 * @param {number} [start=0] The start of the range. 49188 * @param {number} end The end of the range. 49189 * @param {number} [step=1] The value to increment or decrement by. 49190 * @returns {Array} Returns the range of numbers. 49191 * @see _.inRange, _.range 49192 * @example 49193 * 49194 * _.rangeRight(4); 49195 * // => [3, 2, 1, 0] 49196 * 49197 * _.rangeRight(-4); 49198 * // => [-3, -2, -1, 0] 49199 * 49200 * _.rangeRight(1, 5); 49201 * // => [4, 3, 2, 1] 49202 * 49203 * _.rangeRight(0, 20, 5); 49204 * // => [15, 10, 5, 0] 49205 * 49206 * _.rangeRight(0, -4, -1); 49207 * // => [-3, -2, -1, 0] 49208 * 49209 * _.rangeRight(1, 4, 0); 49210 * // => [1, 1, 1] 49211 * 49212 * _.rangeRight(0); 49213 * // => [] 49214 */ 49215 var rangeRight = createRange(true); 49216 49217 /** 49218 * This method returns a new empty array. 49219 * 49220 * @static 49221 * @memberOf _ 49222 * @since 4.13.0 49223 * @category Util 49224 * @returns {Array} Returns the new empty array. 49225 * @example 49226 * 49227 * var arrays = _.times(2, _.stubArray); 49228 * 49229 * console.log(arrays); 49230 * // => [[], []] 49231 * 49232 * console.log(arrays[0] === arrays[1]); 49233 * // => false 49234 */ 49235 function stubArray() { 49236 return []; 49237 } 49238 49239 /** 49240 * This method returns `false`. 49241 * 49242 * @static 49243 * @memberOf _ 49244 * @since 4.13.0 49245 * @category Util 49246 * @returns {boolean} Returns `false`. 49247 * @example 49248 * 49249 * _.times(2, _.stubFalse); 49250 * // => [false, false] 49251 */ 49252 function stubFalse() { 49253 return false;
vendor: 1,044 bytes, lines 49254-49307
49254 } 49255 49256 /** 49257 * This method returns a new empty object. 49258 * 49259 * @static 49260 * @memberOf _ 49261 * @since 4.13.0 49262 * @category Util 49263 * @returns {Object} Returns the new empty object. 49264 * @example 49265 * 49266 * var objects = _.times(2, _.stubObject); 49267 * 49268 * console.log(objects); 49269 * // => [{}, {}] 49270 * 49271 * console.log(objects[0] === objects[1]); 49272 * // => false 49273 */ 49274 function stubObject() { 49275 return {}; 49276 } 49277 49278 /** 49279 * This method returns an empty string. 49280 * 49281 * @static 49282 * @memberOf _ 49283 * @since 4.13.0 49284 * @category Util 49285 * @returns {string} Returns the empty string. 49286 * @example 49287 * 49288 * _.times(2, _.stubString); 49289 * // => ['', ''] 49290 */ 49291 function stubString() { 49292 return ''; 49293 } 49294 49295 /** 49296 * This method returns `true`. 49297 * 49298 * @static 49299 * @memberOf _ 49300 * @since 4.13.0 49301 * @category Util 49302 * @returns {boolean} Returns `true`. 49303 * @example 49304 * 49305 * _.times(2, _.stubTrue); 49306 * // => [true, true] 49307 */
vendor: 9,081 bytes, lines 49308-49651
49308 function stubTrue() { 49309 return true; 49310 } 49311 49312 /** 49313 * Invokes the iteratee `n` times, returning an array of the results of 49314 * each invocation. The iteratee is invoked with one argument; (index). 49315 * 49316 * @static 49317 * @since 0.1.0 49318 * @memberOf _ 49319 * @category Util 49320 * @param {number} n The number of times to invoke `iteratee`. 49321 * @param {Function} [iteratee=_.identity] The function invoked per iteration. 49322 * @returns {Array} Returns the array of results. 49323 * @example 49324 * 49325 * _.times(3, String); 49326 * // => ['0', '1', '2'] 49327 * 49328 * _.times(4, _.constant(0)); 49329 * // => [0, 0, 0, 0] 49330 */ 49331 function times(n, iteratee) { 49332 n = toInteger(n); 49333 if (n < 1 || n > MAX_SAFE_INTEGER) { 49334 return []; 49335 } 49336 var index = MAX_ARRAY_LENGTH, 49337 length = nativeMin(n, MAX_ARRAY_LENGTH); 49338 49339 iteratee = getIteratee(iteratee); 49340 n -= MAX_ARRAY_LENGTH; 49341 49342 var result = baseTimes(length, iteratee); 49343 while (++index < n) { 49344 iteratee(index); 49345 } 49346 return result; 49347 } 49348 49349 /** 49350 * Converts `value` to a property path array. 49351 * 49352 * @static 49353 * @memberOf _ 49354 * @since 4.0.0 49355 * @category Util 49356 * @param {*} value The value to convert. 49357 * @returns {Array} Returns the new property path array. 49358 * @example 49359 * 49360 * _.toPath('a.b.c'); 49361 * // => ['a', 'b', 'c'] 49362 * 49363 * _.toPath('a[0].b.c'); 49364 * // => ['a', '0', 'b', 'c'] 49365 */ 49366 function toPath(value) { 49367 if (isArray(value)) { 49368 return arrayMap(value, toKey); 49369 } 49370 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); 49371 } 49372 49373 /** 49374 * Generates a unique ID. If `prefix` is given, the ID is appended to it. 49375 * 49376 * @static 49377 * @since 0.1.0 49378 * @memberOf _ 49379 * @category Util 49380 * @param {string} [prefix=''] The value to prefix the ID with. 49381 * @returns {string} Returns the unique ID. 49382 * @example 49383 * 49384 * _.uniqueId('contact_'); 49385 * // => 'contact_104' 49386 * 49387 * _.uniqueId(); 49388 * // => '105' 49389 */ 49390 function uniqueId(prefix) { 49391 var id = ++idCounter; 49392 return toString(prefix) + id; 49393 } 49394 49395 /*------------------------------------------------------------------------*/ 49396 49397 /** 49398 * Adds two numbers. 49399 * 49400 * @static 49401 * @memberOf _ 49402 * @since 3.4.0 49403 * @category Math 49404 * @param {number} augend The first number in an addition. 49405 * @param {number} addend The second number in an addition. 49406 * @returns {number} Returns the total. 49407 * @example 49408 * 49409 * _.add(6, 4); 49410 * // => 10 49411 */ 49412 var add = createMathOperation(function(augend, addend) { 49413 return augend + addend; 49414 }, 0); 49415 49416 /** 49417 * Computes `number` rounded up to `precision`. 49418 * 49419 * @static 49420 * @memberOf _ 49421 * @since 3.10.0 49422 * @category Math 49423 * @param {number} number The number to round up. 49424 * @param {number} [precision=0] The precision to round up to. 49425 * @returns {number} Returns the rounded up number. 49426 * @example 49427 * 49428 * _.ceil(4.006); 49429 * // => 5 49430 * 49431 * _.ceil(6.004, 2); 49432 * // => 6.01 49433 * 49434 * _.ceil(6040, -2); 49435 * // => 6100 49436 */ 49437 var ceil = createRound('ceil'); 49438 49439 /** 49440 * Divide two numbers. 49441 * 49442 * @static 49443 * @memberOf _ 49444 * @since 4.7.0 49445 * @category Math 49446 * @param {number} dividend The first number in a division. 49447 * @param {number} divisor The second number in a division. 49448 * @returns {number} Returns the quotient. 49449 * @example 49450 * 49451 * _.divide(6, 4); 49452 * // => 1.5 49453 */ 49454 var divide = createMathOperation(function(dividend, divisor) { 49455 return dividend / divisor; 49456 }, 1); 49457 49458 /** 49459 * Computes `number` rounded down to `precision`. 49460 * 49461 * @static 49462 * @memberOf _ 49463 * @since 3.10.0 49464 * @category Math 49465 * @param {number} number The number to round down. 49466 * @param {number} [precision=0] The precision to round down to. 49467 * @returns {number} Returns the rounded down number. 49468 * @example 49469 * 49470 * _.floor(4.006); 49471 * // => 4 49472 * 49473 * _.floor(0.046, 2); 49474 * // => 0.04 49475 * 49476 * _.floor(4060, -2); 49477 * // => 4000 49478 */ 49479 var floor = createRound('floor'); 49480 49481 /** 49482 * Computes the maximum value of `array`. If `array` is empty or falsey, 49483 * `undefined` is returned. 49484 * 49485 * @static 49486 * @since 0.1.0 49487 * @memberOf _ 49488 * @category Math 49489 * @param {Array} array The array to iterate over. 49490 * @returns {*} Returns the maximum value. 49491 * @example 49492 * 49493 * _.max([4, 2, 8, 6]); 49494 * // => 8 49495 * 49496 * _.max([]); 49497 * // => undefined 49498 */ 49499 function max(array) { 49500 return (array && array.length) 49501 ? baseExtremum(array, identity, baseGt) 49502 : undefined; 49503 } 49504 49505 /** 49506 * This method is like `_.max` except that it accepts `iteratee` which is 49507 * invoked for each element in `array` to generate the criterion by which 49508 * the value is ranked. The iteratee is invoked with one argument: (value). 49509 * 49510 * @static 49511 * @memberOf _ 49512 * @since 4.0.0 49513 * @category Math 49514 * @param {Array} array The array to iterate over. 49515 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 49516 * @returns {*} Returns the maximum value. 49517 * @example 49518 * 49519 * var objects = [{ 'n': 1 }, { 'n': 2 }]; 49520 * 49521 * _.maxBy(objects, function(o) { return o.n; }); 49522 * // => { 'n': 2 } 49523 * 49524 * // The `_.property` iteratee shorthand. 49525 * _.maxBy(objects, 'n'); 49526 * // => { 'n': 2 } 49527 */ 49528 function maxBy(array, iteratee) { 49529 return (array && array.length) 49530 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) 49531 : undefined; 49532 } 49533 49534 /** 49535 * Computes the mean of the values in `array`. 49536 * 49537 * @static 49538 * @memberOf _ 49539 * @since 4.0.0 49540 * @category Math 49541 * @param {Array} array The array to iterate over. 49542 * @returns {number} Returns the mean. 49543 * @example 49544 * 49545 * _.mean([4, 2, 8, 6]); 49546 * // => 5 49547 */ 49548 function mean(array) { 49549 return baseMean(array, identity); 49550 } 49551 49552 /** 49553 * This method is like `_.mean` except that it accepts `iteratee` which is 49554 * invoked for each element in `array` to generate the value to be averaged. 49555 * The iteratee is invoked with one argument: (value). 49556 * 49557 * @static 49558 * @memberOf _ 49559 * @since 4.7.0 49560 * @category Math 49561 * @param {Array} array The array to iterate over. 49562 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 49563 * @returns {number} Returns the mean. 49564 * @example 49565 * 49566 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; 49567 * 49568 * _.meanBy(objects, function(o) { return o.n; }); 49569 * // => 5 49570 * 49571 * // The `_.property` iteratee shorthand. 49572 * _.meanBy(objects, 'n'); 49573 * // => 5 49574 */ 49575 function meanBy(array, iteratee) { 49576 return baseMean(array, getIteratee(iteratee, 2)); 49577 } 49578 49579 /** 49580 * Computes the minimum value of `array`. If `array` is empty or falsey, 49581 * `undefined` is returned. 49582 * 49583 * @static 49584 * @since 0.1.0 49585 * @memberOf _ 49586 * @category Math 49587 * @param {Array} array The array to iterate over. 49588 * @returns {*} Returns the minimum value. 49589 * @example 49590 * 49591 * _.min([4, 2, 8, 6]); 49592 * // => 2 49593 * 49594 * _.min([]); 49595 * // => undefined 49596 */ 49597 function min(array) { 49598 return (array && array.length) 49599 ? baseExtremum(array, identity, baseLt) 49600 : undefined; 49601 } 49602 49603 /** 49604 * This method is like `_.min` except that it accepts `iteratee` which is 49605 * invoked for each element in `array` to generate the criterion by which 49606 * the value is ranked. The iteratee is invoked with one argument: (value). 49607 * 49608 * @static 49609 * @memberOf _ 49610 * @since 4.0.0 49611 * @category Math 49612 * @param {Array} array The array to iterate over. 49613 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 49614 * @returns {*} Returns the minimum value. 49615 * @example 49616 * 49617 * var objects = [{ 'n': 1 }, { 'n': 2 }]; 49618 * 49619 * _.minBy(objects, function(o) { return o.n; }); 49620 * // => { 'n': 1 } 49621 * 49622 * // The `_.property` iteratee shorthand. 49623 * _.minBy(objects, 'n'); 49624 * // => { 'n': 1 } 49625 */ 49626 function minBy(array, iteratee) { 49627 return (array && array.length) 49628 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) 49629 : undefined; 49630 } 49631 49632 /** 49633 * Multiply two numbers. 49634 * 49635 * @static 49636 * @memberOf _ 49637 * @since 4.7.0 49638 * @category Math 49639 * @param {number} multiplier The first number in a multiplication. 49640 * @param {number} multiplicand The second number in a multiplication. 49641 * @returns {number} Returns the product. 49642 * @example 49643 * 49644 * _.multiply(6, 4); 49645 * // => 24 49646 */ 49647 var multiply = createMathOperation(function(multiplier, multiplicand) { 49648 return multiplier * multiplicand; 49649 }, 1); 49650 49651 /**
vendor: 13,137 bytes, lines 49652-50090
49652 * Computes `number` rounded to `precision`. 49653 * 49654 * @static 49655 * @memberOf _ 49656 * @since 3.10.0 49657 * @category Math 49658 * @param {number} number The number to round. 49659 * @param {number} [precision=0] The precision to round to. 49660 * @returns {number} Returns the rounded number. 49661 * @example 49662 * 49663 * _.round(4.006); 49664 * // => 4 49665 * 49666 * _.round(4.006, 2); 49667 * // => 4.01 49668 * 49669 * _.round(4060, -2); 49670 * // => 4100 49671 */ 49672 var round = createRound('round'); 49673 49674 /** 49675 * Subtract two numbers. 49676 * 49677 * @static 49678 * @memberOf _ 49679 * @since 4.0.0 49680 * @category Math 49681 * @param {number} minuend The first number in a subtraction. 49682 * @param {number} subtrahend The second number in a subtraction. 49683 * @returns {number} Returns the difference. 49684 * @example 49685 * 49686 * _.subtract(6, 4); 49687 * // => 2 49688 */ 49689 var subtract = createMathOperation(function(minuend, subtrahend) { 49690 return minuend - subtrahend; 49691 }, 0); 49692 49693 /** 49694 * Computes the sum of the values in `array`. 49695 * 49696 * @static 49697 * @memberOf _ 49698 * @since 3.4.0 49699 * @category Math 49700 * @param {Array} array The array to iterate over. 49701 * @returns {number} Returns the sum. 49702 * @example 49703 * 49704 * _.sum([4, 2, 8, 6]); 49705 * // => 20 49706 */ 49707 function sum(array) { 49708 return (array && array.length) 49709 ? baseSum(array, identity) 49710 : 0; 49711 } 49712 49713 /** 49714 * This method is like `_.sum` except that it accepts `iteratee` which is 49715 * invoked for each element in `array` to generate the value to be summed. 49716 * The iteratee is invoked with one argument: (value). 49717 * 49718 * @static 49719 * @memberOf _ 49720 * @since 4.0.0 49721 * @category Math 49722 * @param {Array} array The array to iterate over. 49723 * @param {Function} [iteratee=_.identity] The iteratee invoked per element. 49724 * @returns {number} Returns the sum. 49725 * @example 49726 * 49727 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; 49728 * 49729 * _.sumBy(objects, function(o) { return o.n; }); 49730 * // => 20 49731 * 49732 * // The `_.property` iteratee shorthand. 49733 * _.sumBy(objects, 'n'); 49734 * // => 20 49735 */ 49736 function sumBy(array, iteratee) { 49737 return (array && array.length) 49738 ? baseSum(array, getIteratee(iteratee, 2)) 49739 : 0; 49740 } 49741 49742 /*------------------------------------------------------------------------*/ 49743 49744 // Add methods that return wrapped values in chain sequences. 49745 lodash.after = after; 49746 lodash.ary = ary; 49747 lodash.assign = assign; 49748 lodash.assignIn = assignIn; 49749 lodash.assignInWith = assignInWith; 49750 lodash.assignWith = assignWith; 49751 lodash.at = at; 49752 lodash.before = before; 49753 lodash.bind = bind; 49754 lodash.bindAll = bindAll; 49755 lodash.bindKey = bindKey; 49756 lodash.castArray = castArray; 49757 lodash.chain = chain; 49758 lodash.chunk = chunk; 49759 lodash.compact = compact; 49760 lodash.concat = concat; 49761 lodash.cond = cond; 49762 lodash.conforms = conforms; 49763 lodash.constant = constant; 49764 lodash.countBy = countBy; 49765 lodash.create = create; 49766 lodash.curry = curry; 49767 lodash.curryRight = curryRight; 49768 lodash.debounce = debounce; 49769 lodash.defaults = defaults; 49770 lodash.defaultsDeep = defaultsDeep; 49771 lodash.defer = defer; 49772 lodash.delay = delay; 49773 lodash.difference = difference; 49774 lodash.differenceBy = differenceBy; 49775 lodash.differenceWith = differenceWith; 49776 lodash.drop = drop; 49777 lodash.dropRight = dropRight; 49778 lodash.dropRightWhile = dropRightWhile; 49779 lodash.dropWhile = dropWhile; 49780 lodash.fill = fill; 49781 lodash.filter = filter; 49782 lodash.flatMap = flatMap; 49783 lodash.flatMapDeep = flatMapDeep; 49784 lodash.flatMapDepth = flatMapDepth; 49785 lodash.flatten = flatten; 49786 lodash.flattenDeep = flattenDeep; 49787 lodash.flattenDepth = flattenDepth; 49788 lodash.flip = flip; 49789 lodash.flow = flow; 49790 lodash.flowRight = flowRight; 49791 lodash.fromPairs = fromPairs; 49792 lodash.functions = functions; 49793 lodash.functionsIn = functionsIn; 49794 lodash.groupBy = groupBy; 49795 lodash.initial = initial; 49796 lodash.intersection = intersection; 49797 lodash.intersectionBy = intersectionBy; 49798 lodash.intersectionWith = intersectionWith; 49799 lodash.invert = invert; 49800 lodash.invertBy = invertBy; 49801 lodash.invokeMap = invokeMap; 49802 lodash.iteratee = iteratee; 49803 lodash.keyBy = keyBy; 49804 lodash.keys = keys; 49805 lodash.keysIn = keysIn; 49806 lodash.map = map; 49807 lodash.mapKeys = mapKeys; 49808 lodash.mapValues = mapValues; 49809 lodash.matches = matches; 49810 lodash.matchesProperty = matchesProperty; 49811 lodash.memoize = memoize; 49812 lodash.merge = merge; 49813 lodash.mergeWith = mergeWith; 49814 lodash.method = method; 49815 lodash.methodOf = methodOf; 49816 lodash.mixin = mixin; 49817 lodash.negate = negate; 49818 lodash.nthArg = nthArg; 49819 lodash.omit = omit; 49820 lodash.omitBy = omitBy; 49821 lodash.once = once; 49822 lodash.orderBy = orderBy; 49823 lodash.over = over; 49824 lodash.overArgs = overArgs; 49825 lodash.overEvery = overEvery; 49826 lodash.overSome = overSome; 49827 lodash.partial = partial; 49828 lodash.partialRight = partialRight; 49829 lodash.partition = partition; 49830 lodash.pick = pick; 49831 lodash.pickBy = pickBy; 49832 lodash.property = property; 49833 lodash.propertyOf = propertyOf; 49834 lodash.pull = pull; 49835 lodash.pullAll = pullAll; 49836 lodash.pullAllBy = pullAllBy; 49837 lodash.pullAllWith = pullAllWith; 49838 lodash.pullAt = pullAt; 49839 lodash.range = range; 49840 lodash.rangeRight = rangeRight; 49841 lodash.rearg = rearg; 49842 lodash.reject = reject; 49843 lodash.remove = remove; 49844 lodash.rest = rest; 49845 lodash.reverse = reverse; 49846 lodash.sampleSize = sampleSize; 49847 lodash.set = set; 49848 lodash.setWith = setWith; 49849 lodash.shuffle = shuffle; 49850 lodash.slice = slice; 49851 lodash.sortBy = sortBy; 49852 lodash.sortedUniq = sortedUniq; 49853 lodash.sortedUniqBy = sortedUniqBy; 49854 lodash.split = split; 49855 lodash.spread = spread; 49856 lodash.tail = tail; 49857 lodash.take = take; 49858 lodash.takeRight = takeRight; 49859 lodash.takeRightWhile = takeRightWhile; 49860 lodash.takeWhile = takeWhile; 49861 lodash.tap = tap; 49862 lodash.throttle = throttle; 49863 lodash.thru = thru; 49864 lodash.toArray = toArray; 49865 lodash.toPairs = toPairs; 49866 lodash.toPairsIn = toPairsIn; 49867 lodash.toPath = toPath; 49868 lodash.toPlainObject = toPlainObject; 49869 lodash.transform = transform; 49870 lodash.unary = unary; 49871 lodash.union = union; 49872 lodash.unionBy = unionBy; 49873 lodash.unionWith = unionWith; 49874 lodash.uniq = uniq; 49875 lodash.uniqBy = uniqBy; 49876 lodash.uniqWith = uniqWith; 49877 lodash.unset = unset; 49878 lodash.unzip = unzip; 49879 lodash.unzipWith = unzipWith; 49880 lodash.update = update; 49881 lodash.updateWith = updateWith; 49882 lodash.values = values; 49883 lodash.valuesIn = valuesIn; 49884 lodash.without = without; 49885 lodash.words = words; 49886 lodash.wrap = wrap; 49887 lodash.xor = xor; 49888 lodash.xorBy = xorBy; 49889 lodash.xorWith = xorWith; 49890 lodash.zip = zip; 49891 lodash.zipObject = zipObject; 49892 lodash.zipObjectDeep = zipObjectDeep; 49893 lodash.zipWith = zipWith; 49894 49895 // Add aliases. 49896 lodash.entries = toPairs; 49897 lodash.entriesIn = toPairsIn; 49898 lodash.extend = assignIn; 49899 lodash.extendWith = assignInWith; 49900 49901 // Add methods to `lodash.prototype`. 49902 mixin(lodash, lodash); 49903 49904 /*------------------------------------------------------------------------*/ 49905 49906 // Add methods that return unwrapped values in chain sequences. 49907 lodash.add = add; 49908 lodash.attempt = attempt; 49909 lodash.camelCase = camelCase; 49910 lodash.capitalize = capitalize; 49911 lodash.ceil = ceil; 49912 lodash.clamp = clamp; 49913 lodash.clone = clone; 49914 lodash.cloneDeep = cloneDeep; 49915 lodash.cloneDeepWith = cloneDeepWith; 49916 lodash.cloneWith = cloneWith; 49917 lodash.conformsTo = conformsTo; 49918 lodash.deburr = deburr; 49919 lodash.defaultTo = defaultTo; 49920 lodash.divide = divide; 49921 lodash.endsWith = endsWith; 49922 lodash.eq = eq; 49923 lodash.escape = escape; 49924 lodash.escapeRegExp = escapeRegExp; 49925 lodash.every = every; 49926 lodash.find = find; 49927 lodash.findIndex = findIndex; 49928 lodash.findKey = findKey; 49929 lodash.findLast = findLast; 49930 lodash.findLastIndex = findLastIndex; 49931 lodash.findLastKey = findLastKey; 49932 lodash.floor = floor; 49933 lodash.forEach = forEach; 49934 lodash.forEachRight = forEachRight; 49935 lodash.forIn = forIn; 49936 lodash.forInRight = forInRight; 49937 lodash.forOwn = forOwn; 49938 lodash.forOwnRight = forOwnRight; 49939 lodash.get = get; 49940 lodash.gt = gt; 49941 lodash.gte = gte; 49942 lodash.has = has; 49943 lodash.hasIn = hasIn; 49944 lodash.head = head; 49945 lodash.identity = identity; 49946 lodash.includes = includes; 49947 lodash.indexOf = indexOf; 49948 lodash.inRange = inRange; 49949 lodash.invoke = invoke; 49950 lodash.isArguments = isArguments; 49951 lodash.isArray = isArray; 49952 lodash.isArrayBuffer = isArrayBuffer; 49953 lodash.isArrayLike = isArrayLike; 49954 lodash.isArrayLikeObject = isArrayLikeObject; 49955 lodash.isBoolean = isBoolean; 49956 lodash.isBuffer = isBuffer; 49957 lodash.isDate = isDate; 49958 lodash.isElement = isElement; 49959 lodash.isEmpty = isEmpty; 49960 lodash.isEqual = isEqual; 49961 lodash.isEqualWith = isEqualWith; 49962 lodash.isError = isError; 49963 lodash.isFinite = isFinite; 49964 lodash.isFunction = isFunction; 49965 lodash.isInteger = isInteger; 49966 lodash.isLength = isLength; 49967 lodash.isMap = isMap; 49968 lodash.isMatch = isMatch; 49969 lodash.isMatchWith = isMatchWith; 49970 lodash.isNaN = isNaN; 49971 lodash.isNative = isNative; 49972 lodash.isNil = isNil; 49973 lodash.isNull = isNull; 49974 lodash.isNumber = isNumber; 49975 lodash.isObject = isObject; 49976 lodash.isObjectLike = isObjectLike; 49977 lodash.isPlainObject = isPlainObject; 49978 lodash.isRegExp = isRegExp; 49979 lodash.isSafeInteger = isSafeInteger; 49980 lodash.isSet = isSet; 49981 lodash.isString = isString; 49982 lodash.isSymbol = isSymbol; 49983 lodash.isTypedArray = isTypedArray; 49984 lodash.isUndefined = isUndefined; 49985 lodash.isWeakMap = isWeakMap; 49986 lodash.isWeakSet = isWeakSet; 49987 lodash.join = join; 49988 lodash.kebabCase = kebabCase; 49989 lodash.last = last; 49990 lodash.lastIndexOf = lastIndexOf; 49991 lodash.lowerCase = lowerCase; 49992 lodash.lowerFirst = lowerFirst; 49993 lodash.lt = lt; 49994 lodash.lte = lte; 49995 lodash.max = max; 49996 lodash.maxBy = maxBy; 49997 lodash.mean = mean; 49998 lodash.meanBy = meanBy; 49999 lodash.min = min; 50000 lodash.minBy = minBy; 50001 lodash.stubArray = stubArray; 50002 lodash.stubFalse = stubFalse; 50003 lodash.stubObject = stubObject; 50004 lodash.stubString = stubString; 50005 lodash.stubTrue = stubTrue; 50006 lodash.multiply = multiply; 50007 lodash.nth = nth; 50008 lodash.noConflict = noConflict; 50009 lodash.noop = noop; 50010 lodash.now = now; 50011 lodash.pad = pad; 50012 lodash.padEnd = padEnd; 50013 lodash.padStart = padStart; 50014 lodash.parseInt = parseInt; 50015 lodash.random = random; 50016 lodash.reduce = reduce; 50017 lodash.reduceRight = reduceRight; 50018 lodash.repeat = repeat; 50019 lodash.replace = replace; 50020 lodash.result = result; 50021 lodash.round = round; 50022 lodash.runInContext = runInContext; 50023 lodash.sample = sample; 50024 lodash.size = size; 50025 lodash.snakeCase = snakeCase; 50026 lodash.some = some; 50027 lodash.sortedIndex = sortedIndex; 50028 lodash.sortedIndexBy = sortedIndexBy; 50029 lodash.sortedIndexOf = sortedIndexOf; 50030 lodash.sortedLastIndex = sortedLastIndex; 50031 lodash.sortedLastIndexBy = sortedLastIndexBy; 50032 lodash.sortedLastIndexOf = sortedLastIndexOf; 50033 lodash.startCase = startCase; 50034 lodash.startsWith = startsWith; 50035 lodash.subtract = subtract; 50036 lodash.sum = sum; 50037 lodash.sumBy = sumBy; 50038 lodash.template = template; 50039 lodash.times = times; 50040 lodash.toFinite = toFinite; 50041 lodash.toInteger = toInteger; 50042 lodash.toLength = toLength; 50043 lodash.toLower = toLower; 50044 lodash.toNumber = toNumber; 50045 lodash.toSafeInteger = toSafeInteger; 50046 lodash.toString = toString; 50047 lodash.toUpper = toUpper; 50048 lodash.trim = trim; 50049 lodash.trimEnd = trimEnd; 50050 lodash.trimStart = trimStart; 50051 lodash.truncate = truncate; 50052 lodash.unescape = unescape; 50053 lodash.uniqueId = uniqueId; 50054 lodash.upperCase = upperCase; 50055 lodash.upperFirst = upperFirst; 50056 50057 // Add aliases. 50058 lodash.each = forEach; 50059 lodash.eachRight = forEachRight; 50060 lodash.first = head; 50061 50062 mixin(lodash, (function() { 50063 var source = {}; 50064 baseForOwn(lodash, function(func, methodName) { 50065 if (!hasOwnProperty.call(lodash.prototype, methodName)) { 50066 source[methodName] = func; 50067 } 50068 }); 50069 return source; 50070 }()), { 'chain': false }); 50071 50072 /*------------------------------------------------------------------------*/ 50073 50074 /** 50075 * The semantic version number. 50076 * 50077 * @static 50078 * @memberOf _ 50079 * @type {string} 50080 */ 50081 lodash.VERSION = VERSION; 50082 50083 // Assign default placeholders. 50084 arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { 50085 lodash[methodName].placeholder = lodash; 50086 }); 50087 50088 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. 50089 arrayEach(['drop', 'take'], function(methodName, index) { 50090 LazyWrapper.prototype[methodName] = function(n) {
vendor: 7,434 bytes, lines 50091-50308
50091 n = n === undefined ? 1 : nativeMax(toInteger(n), 0); 50092 50093 var result = (this.__filtered__ && !index) 50094 ? new LazyWrapper(this) 50095 : this.clone(); 50096 50097 if (result.__filtered__) { 50098 result.__takeCount__ = nativeMin(n, result.__takeCount__); 50099 } else { 50100 result.__views__.push({ 50101 'size': nativeMin(n, MAX_ARRAY_LENGTH), 50102 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') 50103 }); 50104 } 50105 return result; 50106 }; 50107 50108 LazyWrapper.prototype[methodName + 'Right'] = function(n) { 50109 return this.reverse()[methodName](n).reverse(); 50110 }; 50111 }); 50112 50113 // Add `LazyWrapper` methods that accept an `iteratee` value. 50114 arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { 50115 var type = index + 1, 50116 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; 50117 50118 LazyWrapper.prototype[methodName] = function(iteratee) { 50119 var result = this.clone(); 50120 result.__iteratees__.push({ 50121 'iteratee': getIteratee(iteratee, 3), 50122 'type': type 50123 }); 50124 result.__filtered__ = result.__filtered__ || isFilter; 50125 return result; 50126 }; 50127 }); 50128 50129 // Add `LazyWrapper` methods for `_.head` and `_.last`. 50130 arrayEach(['head', 'last'], function(methodName, index) { 50131 var takeName = 'take' + (index ? 'Right' : ''); 50132 50133 LazyWrapper.prototype[methodName] = function() { 50134 return this[takeName](1).value()[0]; 50135 }; 50136 }); 50137 50138 // Add `LazyWrapper` methods for `_.initial` and `_.tail`. 50139 arrayEach(['initial', 'tail'], function(methodName, index) { 50140 var dropName = 'drop' + (index ? '' : 'Right'); 50141 50142 LazyWrapper.prototype[methodName] = function() { 50143 return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); 50144 }; 50145 }); 50146 50147 LazyWrapper.prototype.compact = function() { 50148 return this.filter(identity); 50149 }; 50150 50151 LazyWrapper.prototype.find = function(predicate) { 50152 return this.filter(predicate).head(); 50153 }; 50154 50155 LazyWrapper.prototype.findLast = function(predicate) { 50156 return this.reverse().find(predicate); 50157 }; 50158 50159 LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { 50160 if (typeof path == 'function') { 50161 return new LazyWrapper(this); 50162 } 50163 return this.map(function(value) { 50164 return baseInvoke(value, path, args); 50165 }); 50166 }); 50167 50168 LazyWrapper.prototype.reject = function(predicate) { 50169 return this.filter(negate(getIteratee(predicate))); 50170 }; 50171 50172 LazyWrapper.prototype.slice = function(start, end) { 50173 start = toInteger(start); 50174 50175 var result = this; 50176 if (result.__filtered__ && (start > 0 || end < 0)) { 50177 return new LazyWrapper(result); 50178 } 50179 if (start < 0) { 50180 result = result.takeRight(-start); 50181 } else if (start) { 50182 result = result.drop(start); 50183 } 50184 if (end !== undefined) { 50185 end = toInteger(end); 50186 result = end < 0 ? result.dropRight(-end) : result.take(end - start); 50187 } 50188 return result; 50189 }; 50190 50191 LazyWrapper.prototype.takeRightWhile = function(predicate) { 50192 return this.reverse().takeWhile(predicate).reverse(); 50193 }; 50194 50195 LazyWrapper.prototype.toArray = function() { 50196 return this.take(MAX_ARRAY_LENGTH); 50197 }; 50198 50199 // Add `LazyWrapper` methods to `lodash.prototype`. 50200 baseForOwn(LazyWrapper.prototype, function(func, methodName) { 50201 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), 50202 isTaker = /^(?:head|last)$/.test(methodName), 50203 lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], 50204 retUnwrapped = isTaker || /^find/.test(methodName); 50205 50206 if (!lodashFunc) { 50207 return; 50208 } 50209 lodash.prototype[methodName] = function() { 50210 var value = this.__wrapped__, 50211 args = isTaker ? [1] : arguments, 50212 isLazy = value instanceof LazyWrapper, 50213 iteratee = args[0], 50214 useLazy = isLazy || isArray(value); 50215 50216 var interceptor = function(value) { 50217 var result = lodashFunc.apply(lodash, arrayPush([value], args)); 50218 return (isTaker && chainAll) ? result[0] : result; 50219 }; 50220 50221 if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { 50222 // Avoid lazy use if the iteratee has a "length" value other than `1`. 50223 isLazy = useLazy = false; 50224 } 50225 var chainAll = this.__chain__, 50226 isHybrid = !!this.__actions__.length, 50227 isUnwrapped = retUnwrapped && !chainAll, 50228 onlyLazy = isLazy && !isHybrid; 50229 50230 if (!retUnwrapped && useLazy) { 50231 value = onlyLazy ? value : new LazyWrapper(this); 50232 var result = func.apply(value, args); 50233 result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); 50234 return new LodashWrapper(result, chainAll); 50235 } 50236 if (isUnwrapped && onlyLazy) { 50237 return func.apply(this, args); 50238 } 50239 result = this.thru(interceptor); 50240 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; 50241 }; 50242 }); 50243 50244 // Add `Array` methods to `lodash.prototype`. 50245 arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { 50246 var func = arrayProto[methodName], 50247 chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', 50248 retUnwrapped = /^(?:pop|shift)$/.test(methodName); 50249 50250 lodash.prototype[methodName] = function() { 50251 var args = arguments; 50252 if (retUnwrapped && !this.__chain__) { 50253 var value = this.value(); 50254 return func.apply(isArray(value) ? value : [], args); 50255 } 50256 return this[chainName](function(value) { 50257 return func.apply(isArray(value) ? value : [], args); 50258 }); 50259 }; 50260 }); 50261 50262 // Map minified method names to their real names. 50263 baseForOwn(LazyWrapper.prototype, function(func, methodName) { 50264 var lodashFunc = lodash[methodName]; 50265 if (lodashFunc) { 50266 var key = lodashFunc.name + ''; 50267 if (!hasOwnProperty.call(realNames, key)) { 50268 realNames[key] = []; 50269 } 50270 realNames[key].push({ 'name': methodName, 'func': lodashFunc }); 50271 } 50272 }); 50273 50274 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ 50275 'name': 'wrapper', 50276 'func': undefined 50277 }]; 50278 50279 // Add methods to `LazyWrapper`. 50280 LazyWrapper.prototype.clone = lazyClone; 50281 LazyWrapper.prototype.reverse = lazyReverse; 50282 LazyWrapper.prototype.value = lazyValue; 50283 50284 // Add chain sequence methods to the `lodash` wrapper. 50285 lodash.prototype.at = wrapperAt; 50286 lodash.prototype.chain = wrapperChain; 50287 lodash.prototype.commit = wrapperCommit; 50288 lodash.prototype.next = wrapperNext; 50289 lodash.prototype.plant = wrapperPlant; 50290 lodash.prototype.reverse = wrapperReverse; 50291 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; 50292 50293 // Add lazy aliases. 50294 lodash.prototype.first = lodash.prototype.head; 50295 50296 if (symIterator) { 50297 lodash.prototype[symIterator] = wrapperToIterator; 50298 } 50299 return lodash; 50300 }); 50301 50302 /*--------------------------------------------------------------------------*/ 50303 50304 // Export lodash. 50305 var _ = runInContext(); 50306 50307 // Some AMD build optimizers, like r.js, check for condition patterns like: 50308 if (t
50308ypeof define == 'function' && typeof define.amd == 'object' && define.amd) { 50309 // Expose Lodash on the global object to prevent errors when Lodash is 50310 // loaded by a script tag in the presence of an AMD loader. 50311 // See http://requirejs.org/docs/errors.html#mismatch for more details. 50312 // Use `_.noConflict` to remove Lodash from the global object. 50313 root._ = _; 50314 50315 // Define as an anonymous module so, through path mapping, it can be 50316 // referenced as the "underscore" module. 50317 define(function() { 50318 return _; 50319 }); 50320 } 50321 // Check for `exports` after `define` in case a build optimizer adds it. 50322 else if (freeModule) { 50323 // Export for Node.js. 50324 (freeModule.exports = _)._ = _; 50325 // Export for CommonJS support. 50326 freeExports._ = _; 50327 } 50328 else { 50329 // Export to the global object. 50330 root._ = _; 50331 } 50332}.call(this)); 50333 50334// usage: log('inside coolFunc', this, arguments); 50335// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 50336window.log = function f(){ log.history = log.history || []; log.history.push(arguments); if(this.console) { var args = arguments, newarr; args.callee = args.callee.caller; newarr = [].slice.call(args); if (typeof console.log === 'object') log.apply.call(console.log, console, newarr); else console.log.apply(console, newarr);}}; 50337 50338// make it safe to use console.log always 50339(function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());){a[d]=a[d]||b;}}) 50340(function(){try{console.log();return window.console;}catch(a){return (window.console={});}}()); 50341 50342/*! 50343 * Select2 4.0.3 50344 * https://select2.github.io 50345 * 50346 * Released under the MIT license 50347 * https://github.com/select2/select2/blob/master/LICENSE.md 50348 */ 50349(function (factory) { 50350 if (typeof define === 'function' && define.amd) { 50351 // AMD. Register as an anonymous module. 50352 define(['jquery'], factory); 50353 } else if (typeof exports === 'object') { 50354 // Node/CommonJS 50355 factory(require('jquery')); 50356 } else { 50357 // Browser globals 50358 factory(jQuery); 50359 } 50360}(function (jQuery) { 50361 // This is needed so we can catch the AMD loader configuration and use it 50362 // The inner file should be wrapped (by `banner.start.js`) in a function that 50363 // returns the AMD loader references. 50364 var S2 = 50365(function () { 50366 // Restore the Select2 AMD loader so it can be used 50367 // Needed mostly in the language files, where the loader is not inserted 50368 if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { 50369 var S2 = jQuery.fn.select2.amd; 50370 } 50371var S2;(function () { if (!S2 || !S2.requirejs) { 50372if (!S2) { S2 = {}; } else { require = S2; } 50373/** 50374 * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. 50375 * Available via the MIT or new BSD license. 50376 * see: http://github.com/jrburke/almond for details 50377 */ 50378//Going sloppy to avoid 'use strict' string cost, but strict practices should 50379//be followed. 50380/*jslint sloppy: true */ 50381/*global setTimeout: false */ 50382 50383var requirejs, require, define; 50384(function (undef) { 50385 var main, req, makeMap, handlers, 50386 defined = {}, 50387 waiting = {}, 50388 config = {}, 50389 defining = {}, 50390 hasOwn = Object.prototype.hasOwnProperty, 50391 aps = [].slice, 50392 jsSuffixRegExp = /\.js$/; 50393 50394 function hasProp(obj, prop) { 50395 return hasOwn.call(obj, prop); 50396 } 50397 50398 /** 50399 * Given a relative module name, like ./something, normalize it to 50400 * a real name that can be mapped to a path. 50401 * @param {String} name the relative name 50402 * @param {String} baseName a real name that the name arg is relative 50403 * to. 50404 * @returns {String} normalized name 50405 */ 50406 function normalize(name, baseName) { 50407 var nameParts, nameSegment, mapValue, foundMap, lastIndex, 50408 foundI, foundStarMap, starI, i, j, part, 50409 baseParts = baseName && baseName.split("/"), 50410 map = config.map, 50411 starMap = (map && map['*']) || {}; 50412 50413 //Adjust any relative paths. 50414 if (name && name.charAt(0) === ".") { 50415 //If have a base name, try to normalize against it, 50416 //otherwise, assume it is a top-level require that will 50417 //be relative to baseUrl in the end. 50418 if (baseName) { 50419 name = name.split('/'); 50420 lastIndex = name.length - 1; 50421 50422 // Node .js allowance: 50423 if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { 50424 name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); 50425 } 50426 50427 //Lop off the last part of baseParts, so that . matches the 50428 //"directory" and not name of the baseName's module. For instance, 50429 //baseName of "one/two/three", maps to "one/two/three.js", but we 50430 //want the directory, "one/two" for this normalization. 50431 name = baseParts.slice(0, baseParts.length - 1).concat(name); 50432 50433 //start trimDots 50434 for (i = 0; i < name.length; i += 1) { 50435 part = name[i]; 50436 if (part === ".") { 50437 name.splice(i, 1); 50438 i -= 1; 50439 } else if (part === "..") { 50440 if (i === 1 && (name[2] === '..' || name[0] === '..')) { 50441 //End of the line. Keep at least one non-dot 50442 //path segment at the front so it can be mapped 50443 //correctly to disk. Otherwise, there is likely 50444 //no path mapping for a path starting with '..'. 50445 //This can still fail, but catches the most reasonable 50446 //uses of .. 50447 break; 50448 } else if (i > 0) { 50449 name.splice(i - 1, 2); 50450 i -= 2; 50451 } 50452 } 50453 } 50454 //end trimDots 50455 50456 name = name.join("/"); 50457 } else if (name.indexOf('./') === 0) { 50458 // No baseName, so this is ID is resolved relative 50459 // to baseUrl, pull off the leading dot. 50460 name = name.substring(2); 50461 } 50462 } 50463 50464 //Apply map config if available. 50465 if ((baseParts || starMap) && map) {
vendor: 8,788 bytes, lines 50466-50717
50466 nameParts = name.split('/'); 50467 50468 for (i = nameParts.length; i > 0; i -= 1) { 50469 nameSegment = nameParts.slice(0, i).join("/"); 50470 50471 if (baseParts) { 50472 //Find the longest baseName segment match in the config. 50473 //So, do joins on the biggest to smallest lengths of baseParts. 50474 for (j = baseParts.length; j > 0; j -= 1) { 50475 mapValue = map[baseParts.slice(0, j).join('/')]; 50476 50477 //baseName segment has config, find if it has one for 50478 //this name. 50479 if (mapValue) { 50480 mapValue = mapValue[nameSegment]; 50481 if (mapValue) { 50482 //Match, update name to the new value. 50483 foundMap = mapValue; 50484 foundI = i; 50485 break; 50486 } 50487 } 50488 } 50489 } 50490 50491 if (foundMap) { 50492 break; 50493 } 50494 50495 //Check for a star map match, but just hold on to it, 50496 //if there is a shorter segment match later in a matching 50497 //config, then favor over this star map. 50498 if (!foundStarMap && starMap && starMap[nameSegment]) { 50499 foundStarMap = starMap[nameSegment]; 50500 starI = i; 50501 } 50502 } 50503 50504 if (!foundMap && foundStarMap) { 50505 foundMap = foundStarMap; 50506 foundI = starI; 50507 } 50508 50509 if (foundMap) { 50510 nameParts.splice(0, foundI, foundMap); 50511 name = nameParts.join('/'); 50512 } 50513 } 50514 50515 return name; 50516 } 50517 50518 function makeRequire(relName, forceSync) { 50519 return function () { 50520 //A version of a require function that passes a moduleName 50521 //value for items that may need to 50522 //look up paths relative to the moduleName 50523 var args = aps.call(arguments, 0); 50524 50525 //If first arg is not require('string'), and there is only 50526 //one arg, it is the array form without a callback. Insert 50527 //a null so that the following concat is correct. 50528 if (typeof args[0] !== 'string' && args.length === 1) { 50529 args.push(null); 50530 } 50531 return req.apply(undef, args.concat([relName, forceSync])); 50532 }; 50533 } 50534 50535 function makeNormalize(relName) { 50536 return function (name) { 50537 return normalize(name, relName); 50538 }; 50539 } 50540 50541 function makeLoad(depName) { 50542 return function (value) { 50543 defined[depName] = value; 50544 }; 50545 } 50546 50547 function callDep(name) { 50548 if (hasProp(waiting, name)) { 50549 var args = waiting[name]; 50550 delete waiting[name]; 50551 defining[name] = true; 50552 main.apply(undef, args); 50553 } 50554 50555 if (!hasProp(defined, name) && !hasProp(defining, name)) { 50556 throw new Error('No ' + name); 50557 } 50558 return defined[name]; 50559 } 50560 50561 //Turns a plugin!resource to [plugin, resource] 50562 //with the plugin being undefined if the name 50563 //did not have a plugin prefix. 50564 function splitPrefix(name) { 50565 var prefix, 50566 index = name ? name.indexOf('!') : -1; 50567 if (index > -1) { 50568 prefix = name.substring(0, index); 50569 name = name.substring(index + 1, name.length); 50570 } 50571 return [prefix, name]; 50572 } 50573 50574 /** 50575 * Makes a name map, normalizing the name, and using a plugin 50576 * for normalization if necessary. Grabs a ref to plugin 50577 * too, as an optimization. 50578 */ 50579 makeMap = function (name, relName) { 50580 var plugin, 50581 parts = splitPrefix(name), 50582 prefix = parts[0]; 50583 50584 name = parts[1]; 50585 50586 if (prefix) { 50587 prefix = normalize(prefix, relName); 50588 plugin = callDep(prefix); 50589 } 50590 50591 //Normalize according 50592 if (prefix) { 50593 if (plugin && plugin.normalize) { 50594 name = plugin.normalize(name, makeNormalize(relName)); 50595 } else { 50596 name = normalize(name, relName); 50597 } 50598 } else { 50599 name = normalize(name, relName); 50600 parts = splitPrefix(name); 50601 prefix = parts[0]; 50602 name = parts[1]; 50603 if (prefix) { 50604 plugin = callDep(prefix); 50605 } 50606 } 50607 50608 //Using ridiculous property names for space reasons 50609 return { 50610 f: prefix ? prefix + '!' + name : name, //fullName 50611 n: name, 50612 pr: prefix, 50613 p: plugin 50614 }; 50615 }; 50616 50617 function makeConfig(name) { 50618 return function () { 50619 return (config && config.config && config.config[name]) || {}; 50620 }; 50621 } 50622 50623 handlers = { 50624 require: function (name) { 50625 return makeRequire(name); 50626 }, 50627 exports: function (name) { 50628 var e = defined[name]; 50629 if (typeof e !== 'undefined') { 50630 return e; 50631 } else { 50632 return (defined[name] = {}); 50633 } 50634 }, 50635 module: function (name) { 50636 return { 50637 id: name, 50638 uri: '', 50639 exports: defined[name], 50640 config: makeConfig(name) 50641 }; 50642 } 50643 }; 50644 50645 main = function (name, deps, callback, relName) { 50646 var cjsModule, depName, ret, map, i, 50647 args = [], 50648 callbackType = typeof callback, 50649 usingExports; 50650 50651 //Use name if no relName 50652 relName = relName || name; 50653 50654 //Call the callback to define the module, if necessary. 50655 if (callbackType === 'undefined' || callbackType === 'function') { 50656 //Pull out the defined dependencies and pass the ordered 50657 //values to the callback. 50658 //Default to [require, exports, module] if no deps 50659 deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps; 50660 for (i = 0; i < deps.length; i += 1) { 50661 map = makeMap(deps[i], relName); 50662 depName = map.f; 50663 50664 //Fast path CommonJS standard dependencies. 50665 if (depName === "require") { 50666 args[i] = handlers.require(name); 50667 } else if (depName === "exports") { 50668 //CommonJS module spec 1.1 50669 args[i] = handlers.exports(name); 50670 usingExports = true; 50671 } else if (depName === "module") { 50672 //CommonJS module spec 1.1 50673 cjsModule = args[i] = handlers.module(name); 50674 } else if (hasProp(defined, depName) || 50675 hasProp(waiting, depName) || 50676 hasProp(defining, depName)) { 50677 args[i] = callDep(depName); 50678 } else if (map.p) { 50679 map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {}); 50680 args[i] = defined[depName]; 50681 } else { 50682 throw new Error(name + ' missing ' + depName); 50683 } 50684 } 50685 50686 ret = callback ? callback.apply(defined[name], args) : undefined; 50687 50688 if (name) { 50689 //If setting exports via "module" is in play, 50690 //favor that over return value and exports. After that, 50691 //favor a non-undefined return value over exports use. 50692 if (cjsModule && cjsModule.exports !== undef && 50693 cjsModule.exports !== defined[name]) { 50694 defined[name] = cjsModule.exports; 50695 } else if (ret !== undef || !usingExports) { 50696 //Use the return value from the function. 50697 defined[name] = ret; 50698 } 50699 } 50700 } else if (name) { 50701 //May just be an object definition for the module. Only 50702 //worry about defining if have a module name. 50703 defined[name] = callback; 50704 } 50705 }; 50706 50707 requirejs = require = req = function (deps, callback, relName, forceSync, alt) { 50708 if (typeof deps === "string") { 50709 if (handlers[deps]) { 50710 //callback in this case is really relName 50711 return handlers[deps](callback); 50712 } 50713 //Just return the module wanted. In this scenario, the 50714 //deps arg is the module name, and second arg (if passed) 50715 //is just the relName. 50716 //Normalize module name, if it contains . or .. 50717 return callDep(makeMap(deps, callback
vendor: 9,807 bytes, lines 50717-51098
50717).f); 50718 } else if (!deps.splice) { 50719 //deps is a config object, not an array. 50720 config = deps; 50721 if (config.deps) { 50722 req(config.deps, config.callback); 50723 } 50724 if (!callback) { 50725 return; 50726 } 50727 50728 if (callback.splice) { 50729 //callback is an array, which means it is a dependency list. 50730 //Adjust args if there are dependencies 50731 deps = callback; 50732 callback = relName; 50733 relName = null; 50734 } else { 50735 deps = undef; 50736 } 50737 } 50738 50739 //Support require(['a']) 50740 callback = callback || function () {}; 50741 50742 //If relName is a function, it is an errback handler, 50743 //so remove it. 50744 if (typeof relName === 'function') { 50745 relName = forceSync; 50746 forceSync = alt; 50747 } 50748 50749 //Simulate async callback; 50750 if (forceSync) { 50751 main(undef, deps, callback, relName); 50752 } else { 50753 //Using a non-zero value because of concern for what old browsers 50754 //do, and latest browsers "upgrade" to 4 if lower value is used: 50755 //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout: 50756 //If want a value immediately, use require('id') instead -- something 50757 //that works in almond on the global level, but not guaranteed and 50758 //unlikely to work in other AMD implementations. 50759 setTimeout(function () { 50760 main(undef, deps, callback, relName); 50761 }, 4); 50762 } 50763 50764 return req; 50765 }; 50766 50767 /** 50768 * Just drops the config on the floor, but returns req in case 50769 * the config return value is used. 50770 */ 50771 req.config = function (cfg) { 50772 return req(cfg); 50773 }; 50774 50775 /** 50776 * Expose module registry for debugging and tooling 50777 */ 50778 requirejs._defined = defined; 50779 50780 define = function (name, deps, callback) { 50781 if (typeof name !== 'string') { 50782 throw new Error('See almond README: incorrect module build, no module name'); 50783 } 50784 50785 //This module may not have dependencies 50786 if (!deps.splice) { 50787 //deps is not an array, so probably means 50788 //an object literal or factory function for 50789 //the value. Adjust args. 50790 callback = deps; 50791 deps = []; 50792 } 50793 50794 if (!hasProp(defined, name) && !hasProp(waiting, name)) { 50795 waiting[name] = [name, deps, callback]; 50796 } 50797 }; 50798 50799 define.amd = { 50800 jQuery: true 50801 }; 50802}()); 50803 50804S2.requirejs = requirejs;S2.require = require;S2.define = define; 50805} 50806}()); 50807S2.define("almond", function(){}); 50808 50809/* global jQuery:false, $:false */ 50810S2.define('jquery',[],function () { 50811 var _$ = jQuery || $; 50812 50813 if (_$ == null && console && console.error) { 50814 console.error( 50815 'Select2: An instance of jQuery or a jQuery-compatible library was not ' + 50816 'found. Make sure that you are including jQuery before Select2 on your ' + 50817 'web page.' 50818 ); 50819 } 50820 50821 return _$; 50822}); 50823 50824S2.define('select2/utils',[ 50825 'jquery' 50826], function ($) { 50827 var Utils = {}; 50828 50829 Utils.Extend = function (ChildClass, SuperClass) { 50830 var __hasProp = {}.hasOwnProperty; 50831 50832 function BaseConstructor () { 50833 this.constructor = ChildClass; 50834 } 50835 50836 for (var key in SuperClass) { 50837 if (__hasProp.call(SuperClass, key)) { 50838 ChildClass[key] = SuperClass[key]; 50839 } 50840 } 50841 50842 BaseConstructor.prototype = SuperClass.prototype; 50843 ChildClass.prototype = new BaseConstructor(); 50844 ChildClass.__super__ = SuperClass.prototype; 50845 50846 return ChildClass; 50847 }; 50848 50849 function getMethods (theClass) { 50850 var proto = theClass.prototype; 50851 50852 var methods = []; 50853 50854 for (var methodName in proto) { 50855 var m = proto[methodName]; 50856 50857 if (typeof m !== 'function') { 50858 continue; 50859 } 50860 50861 if (methodName === 'constructor') { 50862 continue; 50863 } 50864 50865 methods.push(methodName); 50866 } 50867 50868 return methods; 50869 } 50870 50871 Utils.Decorate = function (SuperClass, DecoratorClass) { 50872 var decoratedMethods = getMethods(DecoratorClass); 50873 var superMethods = getMethods(SuperClass); 50874 50875 function DecoratedClass () { 50876 var unshift = Array.prototype.unshift; 50877 50878 var argCount = DecoratorClass.prototype.constructor.length; 50879 50880 var calledConstructor = SuperClass.prototype.constructor; 50881 50882 if (argCount > 0) { 50883 unshift.call(arguments, SuperClass.prototype.constructor); 50884 50885 calledConstructor = DecoratorClass.prototype.constructor; 50886 } 50887 50888 calledConstructor.apply(this, arguments); 50889 } 50890 50891 DecoratorClass.displayName = SuperClass.displayName; 50892 50893 function ctr () { 50894 this.constructor = DecoratedClass; 50895 } 50896 50897 DecoratedClass.prototype = new ctr(); 50898 50899 for (var m = 0; m < superMethods.length; m++) { 50900 var superMethod = superMethods[m]; 50901 50902 DecoratedClass.prototype[superMethod] = 50903 SuperClass.prototype[superMethod]; 50904 } 50905 50906 var calledMethod = function (methodName) { 50907 // Stub out the original method if it's not decorating an actual method 50908 var originalMethod = function () {}; 50909 50910 if (methodName in DecoratedClass.prototype) { 50911 originalMethod = DecoratedClass.prototype[methodName]; 50912 } 50913 50914 var decoratedMethod = DecoratorClass.prototype[methodName]; 50915 50916 return function () { 50917 var unshift = Array.prototype.unshift; 50918 50919 unshift.call(arguments, originalMethod); 50920 50921 return decoratedMethod.apply(this, arguments); 50922 }; 50923 }; 50924 50925 for (var d = 0; d < decoratedMethods.length; d++) { 50926 var decoratedMethod = decoratedMethods[d]; 50927 50928 DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod); 50929 } 50930 50931 return DecoratedClass; 50932 }; 50933 50934 var Observable = function () { 50935 this.listeners = {}; 50936 }; 50937 50938 Observable.prototype.on = function (event, callback) { 50939 this.listeners = this.listeners || {}; 50940 50941 if (event in this.listeners) { 50942 this.listeners[event].push(callback); 50943 } else { 50944 this.listeners[event] = [callback]; 50945 } 50946 }; 50947 50948 Observable.prototype.trigger = function (event) { 50949 var slice = Array.prototype.slice; 50950 var params = slice.call(arguments, 1); 50951 50952 this.listeners = this.listeners || {}; 50953 50954 // Params should always come in as an array 50955 if (params == null) { 50956 params = []; 50957 } 50958 50959 // If there are no arguments to the event, use a temporary object 50960 if (params.length === 0) { 50961 params.push({}); 50962 } 50963 50964 // Set the `_type` of the first object to the event 50965 params[0]._type = event; 50966 50967 if (event in this.listeners) { 50968 this.invoke(this.listeners[event], slice.call(arguments, 1)); 50969 } 50970 50971 if ('*' in this.listeners) { 50972 this.invoke(this.listeners['*'], arguments); 50973 } 50974 }; 50975 50976 Observable.prototype.invoke = function (listeners, params) { 50977 for (var i = 0, len = listeners.length; i < len; i++) { 50978 listeners[i].apply(this, params); 50979 } 50980 }; 50981 50982 Utils.Observable = Observable; 50983 50984 Utils.generateChars = function (length) { 50985 var chars = ''; 50986 50987 for (var i = 0; i < length; i++) { 50988 var randomChar = Math.floor(Math.random() * 36); 50989 chars += randomChar.toString(36); 50990 } 50991 50992 return chars; 50993 }; 50994 50995 Utils.bind = function (func, context) { 50996 return function () { 50997 func.apply(context, arguments); 50998 }; 50999 }; 51000 51001 Utils._convertData = function (data) { 51002 for (var originalKey in data) { 51003 var keys = originalKey.split('-'); 51004 51005 var dataLevel = data; 51006 51007 if (keys.length === 1) { 51008 continue; 51009 } 51010 51011 for (var k = 0; k < keys.length; k++) { 51012 var key = keys[k]; 51013 51014 // Lowercase the first letter 51015 // By default, dash-separated becomes camelCase 51016 key = key.substring(0, 1).toLowerCase() + key.substring(1); 51017 51018 if (!(key in dataLevel)) { 51019 dataLevel[key] = {}; 51020 } 51021 51022 if (k == keys.length - 1) { 51023 dataLevel[key] = data[originalKey]; 51024 } 51025 51026 dataLevel = dataLevel[key]; 51027 } 51028 51029 delete data[originalKey]; 51030 } 51031 51032 return data; 51033 }; 51034 51035 Utils.hasScroll = function (index, el) { 51036 // Adapted from the function created by @ShadowScripter 51037 // and adapted by @BillBarry on the Stack Exchange Code Review website. 51038 // The original code can be found at 51039 // http://codereview.stackexchange.com/q/13338 51040 // and was designed to be used with the Sizzle selector engine. 51041 51042 var $el = $(el); 51043 var overflowX = el.style.overflowX; 51044 var overflowY = el.style.overflowY; 51045 51046 //Check both x and y declarations 51047 if (overflowX === overflowY && 51048 (overflowY === 'hidden' || overflowY === 'visible')) { 51049 return false; 51050 } 51051 51052 if (overflowX === 'scroll' || overflowY === 'scroll') { 51053 return true; 51054 } 51055 51056 return ($el.innerHeight() < el.scrollHeight || 51057 $el.innerWidth() < el.scrollWidth); 51058 }; 51059 51060 Utils.escapeMarkup = function (markup) { 51061 var replaceMap = { 51062 '\\': '\', 51063 '&': '&', 51064 '<': '<', 51065 '>': '>', 51066 '"': '"', 51067 '\'': ''', 51068 '/': '/' 51069 }; 51070 51071 // Do not try to escape the markup if it's not a string 51072 if (typeof markup !== 'string') { 51073 return markup; 51074 } 51075 51076 return String(markup).replace(/[&<>"'\/\\]/g, function (match) { 51077 return replaceMap[match]; 51078 }); 51079 }; 51080 51081 // Append an array of jQuery nodes to a given element. 51082 Utils.appendMany = function ($element, $nodes) { 51083 // jQuery 1.7.x does not support $.fn.append() with an array 51084 // Fall back to a jQuery object collection using $.fn.add() 51085 if ($.fn.jquery.substr(0, 3) === '1.7') { 51086 var $jqNodes = $(); 51087 51088 $.map($nodes, function (node) { 51089 $jqNodes = $jqNodes.add(node); 51090 }); 51091 51092 $nodes = $jqNodes; 51093 } 51094 51095 $element.append($nodes); 51096 }; 51097 51098
vendor: 28,897 bytes, lines 51098-52256
51098return Utils; 51099}); 51100 51101S2.define('select2/results',[ 51102 'jquery', 51103 './utils' 51104], function ($, Utils) { 51105 function Results ($element, options, dataAdapter) { 51106 this.$element = $element; 51107 this.data = dataAdapter; 51108 this.options = options; 51109 51110 Results.__super__.constructor.call(this); 51111 } 51112 51113 Utils.Extend(Results, Utils.Observable); 51114 51115 Results.prototype.render = function () { 51116 var $results = $( 51117 '<ul class="select2-results__options" role="tree"></ul>' 51118 ); 51119 51120 if (this.options.get('multiple')) { 51121 $results.attr('aria-multiselectable', 'true'); 51122 } 51123 51124 this.$results = $results; 51125 51126 return $results; 51127 }; 51128 51129 Results.prototype.clear = function () { 51130 this.$results.empty(); 51131 }; 51132 51133 Results.prototype.displayMessage = function (params) { 51134 var escapeMarkup = this.options.get('escapeMarkup'); 51135 51136 this.clear(); 51137 this.hideLoading(); 51138 51139 var $message = $( 51140 '<li role="treeitem" aria-live="assertive"' + 51141 ' class="select2-results__option"></li>' 51142 ); 51143 51144 var message = this.options.get('translations').get(params.message); 51145 51146 $message.append( 51147 escapeMarkup( 51148 message(params.args) 51149 ) 51150 ); 51151 51152 $message[0].className += ' select2-results__message'; 51153 51154 this.$results.append($message); 51155 }; 51156 51157 Results.prototype.hideMessages = function () { 51158 this.$results.find('.select2-results__message').remove(); 51159 }; 51160 51161 Results.prototype.append = function (data) { 51162 this.hideLoading(); 51163 51164 var $options = []; 51165 51166 if (data.results == null || data.results.length === 0) { 51167 if (this.$results.children().length === 0) { 51168 this.trigger('results:message', { 51169 message: 'noResults' 51170 }); 51171 } 51172 51173 return; 51174 } 51175 51176 data.results = this.sort(data.results); 51177 51178 for (var d = 0; d < data.results.length; d++) { 51179 var item = data.results[d]; 51180 51181 var $option = this.option(item); 51182 51183 $options.push($option); 51184 } 51185 51186 this.$results.append($options); 51187 }; 51188 51189 Results.prototype.position = function ($results, $dropdown) { 51190 var $resultsContainer = $dropdown.find('.select2-results'); 51191 $resultsContainer.append($results); 51192 }; 51193 51194 Results.prototype.sort = function (data) { 51195 var sorter = this.options.get('sorter'); 51196 51197 return sorter(data); 51198 }; 51199 51200 Results.prototype.highlightFirstItem = function () { 51201 var $options = this.$results 51202 .find('.select2-results__option[aria-selected]'); 51203 51204 var $selected = $options.filter('[aria-selected=true]'); 51205 51206 // Check if there are any selected options 51207 if ($selected.length > 0) { 51208 // If there are selected options, highlight the first 51209 $selected.first().trigger('mouseenter'); 51210 } else { 51211 // If there are no selected options, highlight the first option 51212 // in the dropdown 51213 $options.first().trigger('mouseenter'); 51214 } 51215 51216 this.ensureHighlightVisible(); 51217 }; 51218 51219 Results.prototype.setClasses = function () { 51220 var self = this; 51221 51222 this.data.current(function (selected) { 51223 var selectedIds = $.map(selected, function (s) { 51224 return s.id.toString(); 51225 }); 51226 51227 var $options = self.$results 51228 .find('.select2-results__option[aria-selected]'); 51229 51230 $options.each(function () { 51231 var $option = $(this); 51232 51233 var item = $.data(this, 'data'); 51234 51235 // id needs to be converted to a string when comparing 51236 var id = '' + item.id; 51237 51238 if ((item.element != null && item.element.selected) || 51239 (item.element == null && $.inArray(id, selectedIds) > -1)) { 51240 $option.attr('aria-selected', 'true'); 51241 } else { 51242 $option.attr('aria-selected', 'false'); 51243 } 51244 }); 51245 51246 }); 51247 }; 51248 51249 Results.prototype.showLoading = function (params) { 51250 this.hideLoading(); 51251 51252 var loadingMore = this.options.get('translations').get('searching'); 51253 51254 var loading = { 51255 disabled: true, 51256 loading: true, 51257 text: loadingMore(params) 51258 }; 51259 var $loading = this.option(loading); 51260 $loading.className += ' loading-results'; 51261 51262 this.$results.prepend($loading); 51263 }; 51264 51265 Results.prototype.hideLoading = function () { 51266 this.$results.find('.loading-results').remove(); 51267 }; 51268 51269 Results.prototype.option = function (data) { 51270 var option = document.createElement('li'); 51271 option.className = 'select2-results__option'; 51272 51273 var attrs = { 51274 'role': 'treeitem', 51275 'aria-selected': 'false' 51276 }; 51277 51278 if (data.disabled) { 51279 delete attrs['aria-selected']; 51280 attrs['aria-disabled'] = 'true'; 51281 } 51282 51283 if (data.id == null) { 51284 delete attrs['aria-selected']; 51285 } 51286 51287 if (data._resultId != null) { 51288 option.id = data._resultId; 51289 } 51290 51291 if (data.title) { 51292 option.title = data.title; 51293 } 51294 51295 if (data.children) { 51296 attrs.role = 'group'; 51297 attrs['aria-label'] = data.text; 51298 delete attrs['aria-selected']; 51299 } 51300 51301 for (var attr in attrs) { 51302 var val = attrs[attr]; 51303 51304 option.setAttribute(attr, val); 51305 } 51306 51307 if (data.children) { 51308 var $option = $(option); 51309 51310 var label = document.createElement('strong'); 51311 label.className = 'select2-results__group'; 51312 51313 var $label = $(label); 51314 this.template(data, label); 51315 51316 var $children = []; 51317 51318 for (var c = 0; c < data.children.length; c++) { 51319 var child = data.children[c]; 51320 51321 var $child = this.option(child); 51322 51323 $children.push($child); 51324 } 51325 51326 var $childrenContainer = $('<ul></ul>', { 51327 'class': 'select2-results__options select2-results__options--nested' 51328 }); 51329 51330 $childrenContainer.append($children); 51331 51332 $option.append(label); 51333 $option.append($childrenContainer); 51334 } else { 51335 this.template(data, option); 51336 } 51337 51338 $.data(option, 'data', data); 51339 51340 return option; 51341 }; 51342 51343 Results.prototype.bind = function (container, $container) { 51344 var self = this; 51345 51346 var id = container.id + '-results'; 51347 51348 this.$results.attr('id', id); 51349 51350 container.on('results:all', function (params) { 51351 self.clear(); 51352 self.append(params.data); 51353 51354 if (container.isOpen()) { 51355 self.setClasses(); 51356 self.highlightFirstItem(); 51357 } 51358 }); 51359 51360 container.on('results:append', function (params) { 51361 self.append(params.data); 51362 51363 if (container.isOpen()) { 51364 self.setClasses(); 51365 } 51366 }); 51367 51368 container.on('query', function (params) { 51369 self.hideMessages(); 51370 self.showLoading(params); 51371 }); 51372 51373 container.on('select', function () { 51374 if (!container.isOpen()) { 51375 return; 51376 } 51377 51378 self.setClasses(); 51379 self.highlightFirstItem(); 51380 }); 51381 51382 container.on('unselect', function () { 51383 if (!container.isOpen()) { 51384 return; 51385 } 51386 51387 self.setClasses(); 51388 self.highlightFirstItem(); 51389 }); 51390 51391 container.on('open', function () { 51392 // When the dropdown is open, aria-expended="true" 51393 self.$results.attr('aria-expanded', 'true'); 51394 self.$results.attr('aria-hidden', 'false'); 51395 51396 self.setClasses(); 51397 self.ensureHighlightVisible(); 51398 }); 51399 51400 container.on('close', function () { 51401 // When the dropdown is closed, aria-expended="false" 51402 self.$results.attr('aria-expanded', 'false'); 51403 self.$results.attr('aria-hidden', 'true'); 51404 self.$results.removeAttr('aria-activedescendant'); 51405 }); 51406 51407 container.on('results:toggle', function () { 51408 var $highlighted = self.getHighlightedResults(); 51409 51410 if ($highlighted.length === 0) { 51411 return; 51412 } 51413 51414 $highlighted.trigger('mouseup'); 51415 }); 51416 51417 container.on('results:select', function () { 51418 var $highlighted = self.getHighlightedResults(); 51419 51420 if ($highlighted.length === 0) { 51421 return; 51422 } 51423 51424 var data = $highlighted.data('data'); 51425 51426 if ($highlighted.attr('aria-selected') == 'true') { 51427 self.trigger('close', {}); 51428 } else { 51429 self.trigger('select', { 51430 data: data 51431 }); 51432 } 51433 }); 51434 51435 container.on('results:previous', function () { 51436 var $highlighted = self.getHighlightedResults(); 51437 51438 var $options = self.$results.find('[aria-selected]'); 51439 51440 var currentIndex = $options.index($highlighted); 51441 51442 // If we are already at te top, don't move further 51443 if (currentIndex === 0) { 51444 return; 51445 } 51446 51447 var nextIndex = currentIndex - 1; 51448 51449 // If none are highlighted, highlight the first 51450 if ($highlighted.length === 0) { 51451 nextIndex = 0; 51452 } 51453 51454 var $next = $options.eq(nextIndex); 51455 51456 $next.trigger('mouseenter'); 51457 51458 var currentOffset = self.$results.offset().top; 51459 var nextTop = $next.offset().top; 51460 var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset); 51461 51462 if (nextIndex === 0) { 51463 self.$results.scrollTop(0); 51464 } else if (nextTop - currentOffset < 0) { 51465 self.$results.scrollTop(nextOffset); 51466 } 51467 }); 51468 51469 container.on('results:next', function () { 51470 var $highlighted = self.getHighlightedResults(); 51471 51472 var $options = self.$results.find('[aria-selected]'); 51473 51474 var currentIndex = $options.index($highlighted); 51475 51476 var nextIndex = currentIndex + 1; 51477 51478 // If we are at the last option, stay there 51479 if (nextIndex >= $options.length) { 51480 return; 51481 } 51482 51483 var $next = $options.eq(nextIndex); 51484 51485 $next.trigger('mouseenter'); 51486 51487 var currentOffset = self.$results.offset().top + 51488 self.$results.outerHeight(false); 51489 var nextBottom = $next.offset().top + $next.outerHeight(false); 51490 var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset; 51491 51492 if (nextIndex === 0) { 51493 self.$results.scrollTop(0); 51494 } else if (nextBottom > currentOffset) { 51495 self.$results.scrollTop(nextOffset); 51496 } 51497 }); 51498 51499 container.on('results:focus', function (params) { 51500 params.element.addClass('select2-results__option--highlighted'); 51501 }); 51502 51503 container.on('results:message', function (params) { 51504 self.displayMessage(params); 51505 }); 51506 51507 if ($.fn.mousewheel) { 51508 this.$results.on('mousewheel', function (e) { 51509 var top = self.$results.scrollTop(); 51510 51511 var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; 51512 51513 var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; 51514 var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); 51515 51516 if (isAtTop) { 51517 self.$results.scrollTop(0); 51518 51519 e.preventDefault(); 51520 e.stopPropagation(); 51521 } else if (isAtBottom) { 51522 self.$results.scrollTop( 51523 self.$results.get(0).scrollHeight - self.$results.height() 51524 ); 51525 51526 e.preventDefault(); 51527 e.stopPropagation(); 51528 } 51529 }); 51530 } 51531 51532 this.$results.on('mouseup', '.select2-results__option[aria-selected]', 51533 function (evt) { 51534 var $this = $(this); 51535 51536 var data = $this.data('data'); 51537 51538 if ($this.attr('aria-selected') === 'true') { 51539 if (self.options.get('multiple')) { 51540 self.trigger('unselect', { 51541 originalEvent: evt, 51542 data: data 51543 }); 51544 } else { 51545 self.trigger('close', {}); 51546 } 51547 51548 return; 51549 } 51550 51551 self.trigger('select', { 51552 originalEvent: evt, 51553 data: data 51554 }); 51555 }); 51556 51557 this.$results.on('mouseenter', '.select2-results__option[aria-selected]', 51558 function (evt) { 51559 var data = $(this).data('data'); 51560 51561 self.getHighlightedResults() 51562 .removeClass('select2-results__option--highlighted'); 51563 51564 self.trigger('results:focus', { 51565 data: data, 51566 element: $(this) 51567 }); 51568 }); 51569 }; 51570 51571 Results.prototype.getHighlightedResults = function () { 51572 var $highlighted = this.$results 51573 .find('.select2-results__option--highlighted'); 51574 51575 return $highlighted; 51576 }; 51577 51578 Results.prototype.destroy = function () { 51579 this.$results.remove(); 51580 }; 51581 51582 Results.prototype.ensureHighlightVisible = function () { 51583 var $highlighted = this.getHighlightedResults(); 51584 51585 if ($highlighted.length === 0) { 51586 return; 51587 } 51588 51589 var $options = this.$results.find('[aria-selected]'); 51590 51591 var currentIndex = $options.index($highlighted); 51592 51593 var currentOffset = this.$results.offset().top; 51594 var nextTop = $highlighted.offset().top; 51595 var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset); 51596 51597 var offsetDelta = nextTop - currentOffset; 51598 nextOffset -= $highlighted.outerHeight(false) * 2; 51599 51600 if (currentIndex <= 2) { 51601 this.$results.scrollTop(0); 51602 } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) { 51603 this.$results.scrollTop(nextOffset); 51604 } 51605 }; 51606 51607 Results.prototype.template = function (result, container) { 51608 var template = this.options.get('templateResult'); 51609 var escapeMarkup = this.options.get('escapeMarkup'); 51610 51611 var content = template(result, container); 51612 51613 if (content == null) { 51614 container.style.display = 'none'; 51615 } else if (typeof content === 'string') { 51616 container.innerHTML = escapeMarkup(content); 51617 } else { 51618 $(container).append(content); 51619 } 51620 }; 51621 51622 return Results; 51623}); 51624 51625S2.define('select2/keys',[ 51626 51627], function () { 51628 var KEYS = { 51629 BACKSPACE: 8, 51630 TAB: 9, 51631 ENTER: 13, 51632 SHIFT: 16, 51633 CTRL: 17, 51634 ALT: 18, 51635 ESC: 27, 51636 SPACE: 32, 51637 PAGE_UP: 33, 51638 PAGE_DOWN: 34, 51639 END: 35, 51640 HOME: 36, 51641 LEFT: 37, 51642 UP: 38, 51643 RIGHT: 39, 51644 DOWN: 40, 51645 DELETE: 46 51646 }; 51647 51648 return KEYS; 51649}); 51650 51651S2.define('select2/selection/base',[ 51652 'jquery', 51653 '../utils', 51654 '../keys' 51655], function ($, Utils, KEYS) { 51656 function BaseSelection ($element, options) { 51657 this.$element = $element; 51658 this.options = options; 51659 51660 BaseSelection.__super__.constructor.call(this); 51661 } 51662 51663 Utils.Extend(BaseSelection, Utils.Observable); 51664 51665 BaseSelection.prototype.render = function () { 51666 var $selection = $( 51667 '<span class="select2-selection" role="combobox" ' + 51668 ' aria-haspopup="true" aria-expanded="false">' + 51669 '</span>' 51670 ); 51671 51672 this._tabindex = 0; 51673 51674 if (this.$element.data('old-tabindex') != null) { 51675 this._tabindex = this.$element.data('old-tabindex'); 51676 } else if (this.$element.attr('tabindex') != null) { 51677 this._tabindex = this.$element.attr('tabindex'); 51678 } 51679 51680 $selection.attr('title', this.$element.attr('title')); 51681 $selection.attr('tabindex', this._tabindex); 51682 51683 this.$selection = $selection; 51684 51685 return $selection; 51686 }; 51687 51688 BaseSelection.prototype.bind = function (container, $container) { 51689 var self = this; 51690 51691 var id = container.id + '-container'; 51692 var resultsId = container.id + '-results'; 51693 51694 this.container = container; 51695 51696 this.$selection.on('focus', function (evt) { 51697 self.trigger('focus', evt); 51698 }); 51699 51700 this.$selection.on('blur', function (evt) { 51701 self._handleBlur(evt); 51702 }); 51703 51704 this.$selection.on('keydown', function (evt) { 51705 self.trigger('keypress', evt); 51706 51707 if (evt.which === KEYS.SPACE) { 51708 evt.preventDefault(); 51709 } 51710 }); 51711 51712 container.on('results:focus', function (params) { 51713 self.$selection.attr('aria-activedescendant', params.data._resultId); 51714 }); 51715 51716 container.on('selection:update', function (params) { 51717 self.update(params.data); 51718 }); 51719 51720 container.on('open', function () { 51721 // When the dropdown is open, aria-expanded="true" 51722 self.$selection.attr('aria-expanded', 'true'); 51723 self.$selection.attr('aria-owns', resultsId); 51724 51725 self._attachCloseHandler(container); 51726 }); 51727 51728 container.on('close', function () { 51729 // When the dropdown is closed, aria-expanded="false" 51730 self.$selection.attr('aria-expanded', 'false'); 51731 self.$selection.removeAttr('aria-activedescendant'); 51732 self.$selection.removeAttr('aria-owns'); 51733 51734 self.$selection.focus(); 51735 51736 self._detachCloseHandler(container); 51737 }); 51738 51739 container.on('enable', function () { 51740 self.$selection.attr('tabindex', self._tabindex); 51741 }); 51742 51743 container.on('disable', function () { 51744 self.$selection.attr('tabindex', '-1'); 51745 }); 51746 }; 51747 51748 BaseSelection.prototype._handleBlur = function (evt) { 51749 var self = this; 51750 51751 // This needs to be delayed as the active element is the body when the tab 51752 // key is pressed, possibly along with others. 51753 window.setTimeout(function () { 51754 // Don't trigger `blur` if the focus is still in the selection 51755 if ( 51756 (document.activeElement == self.$selection[0]) || 51757 ($.contains(self.$selection[0], document.activeElement)) 51758 ) { 51759 return; 51760 } 51761 51762 self.trigger('blur', evt); 51763 }, 1); 51764 }; 51765 51766 BaseSelection.prototype._attachCloseHandler = function (container) { 51767 var self = this; 51768 51769 $(document.body).on('mousedown.select2.' + container.id, function (e) { 51770 var $target = $(e.target); 51771 51772 var $select = $target.closest('.select2'); 51773 51774 var $all = $('.select2.select2-container--open'); 51775 51776 $all.each(function () { 51777 var $this = $(this); 51778 51779 if (this == $select[0]) { 51780 return; 51781 } 51782 51783 var $element = $this.data('element'); 51784 51785 $element.select2('close'); 51786 }); 51787 }); 51788 }; 51789 51790 BaseSelection.prototype._detachCloseHandler = function (container) { 51791 $(document.body).off('mousedown.select2.' + container.id); 51792 }; 51793 51794 BaseSelection.prototype.position = function ($selection, $container) { 51795 var $selectionContainer = $container.find('.selection'); 51796 $selectionContainer.append($selection); 51797 }; 51798 51799 BaseSelection.prototype.destroy = function () { 51800 this._detachCloseHandler(this.container); 51801 }; 51802 51803 BaseSelection.prototype.update = function (data) { 51804 throw new Error('The `update` method must be defined in child classes.'); 51805 }; 51806 51807 return BaseSelection; 51808}); 51809 51810S2.define('select2/selection/single',[ 51811 'jquery', 51812 './base', 51813 '../utils', 51814 '../keys' 51815], function ($, BaseSelection, Utils, KEYS) { 51816 function SingleSelection () { 51817 SingleSelection.__super__.constructor.apply(this, arguments); 51818 } 51819 51820 Utils.Extend(SingleSelection, BaseSelection); 51821 51822 SingleSelection.prototype.render = function () { 51823 var $selection = SingleSelection.__super__.render.call(this); 51824 51825 $selection.addClass('select2-selection--single'); 51826 51827 $selection.html( 51828 '<span class="select2-selection__rendered"></span>' + 51829 '<span class="select2-selection__arrow" role="presentation">' + 51830 '<b role="presentation"></b>' + 51831 '</span>' 51832 ); 51833 51834 return $selection; 51835 }; 51836 51837 SingleSelection.prototype.bind = function (container, $container) { 51838 var self = this; 51839 51840 SingleSelection.__super__.bind.apply(this, arguments); 51841 51842 var id = container.id + '-container'; 51843 51844 this.$selection.find('.select2-selection__rendered').attr('id', id); 51845 this.$selection.attr('aria-labelledby', id); 51846 51847 this.$selection.on('mousedown', function (evt) { 51848 // Only respond to left clicks 51849 if (evt.which !== 1) { 51850 return; 51851 } 51852 51853 self.trigger('toggle', { 51854 originalEvent: evt 51855 }); 51856 }); 51857 51858 this.$selection.on('focus', function (evt) { 51859 // User focuses on the container 51860 }); 51861 51862 this.$selection.on('blur', function (evt) { 51863 // User exits the container 51864 }); 51865 51866 container.on('focus', function (evt) { 51867 if (!container.isOpen()) { 51868 self.$selection.focus(); 51869 } 51870 }); 51871 51872 container.on('selection:update', function (params) { 51873 self.update(params.data); 51874 }); 51875 }; 51876 51877 SingleSelection.prototype.clear = function () { 51878 this.$selection.find('.select2-selection__rendered').empty(); 51879 }; 51880 51881 SingleSelection.prototype.display = function (data, container) { 51882 var template = this.options.get('templateSelection'); 51883 var escapeMarkup = this.options.get('escapeMarkup'); 51884 51885 return escapeMarkup(template(data, container)); 51886 }; 51887 51888 SingleSelection.prototype.selectionContainer = function () { 51889 return $('<span></span>'); 51890 }; 51891 51892 SingleSelection.prototype.update = function (data) { 51893 if (data.length === 0) { 51894 this.clear(); 51895 return; 51896 } 51897 51898 var selection = data[0]; 51899 51900 var $rendered = this.$selection.find('.select2-selection__rendered'); 51901 var formatted = this.display(selection, $rendered); 51902 51903 $rendered.empty().append(formatted); 51904 $rendered.prop('title', selection.title || selection.text); 51905 }; 51906 51907 return SingleSelection; 51908}); 51909 51910S2.define('select2/selection/multiple',[ 51911 'jquery', 51912 './base', 51913 '../utils' 51914], function ($, BaseSelection, Utils) { 51915 function MultipleSelection ($element, options) { 51916 MultipleSelection.__super__.constructor.apply(this, arguments); 51917 } 51918 51919 Utils.Extend(MultipleSelection, BaseSelection); 51920 51921 MultipleSelection.prototype.render = function () { 51922 var $selection = MultipleSelection.__super__.render.call(this); 51923 51924 $selection.addClass('select2-selection--multiple'); 51925 51926 $selection.html( 51927 '<ul class="select2-selection__rendered"></ul>' 51928 ); 51929 51930 return $selection; 51931 }; 51932 51933 MultipleSelection.prototype.bind = function (container, $container) { 51934 var self = this; 51935 51936 MultipleSelection.__super__.bind.apply(this, arguments); 51937 51938 this.$selection.on('click', function (evt) { 51939 self.trigger('toggle', { 51940 originalEvent: evt 51941 }); 51942 }); 51943 51944 this.$selection.on( 51945 'click', 51946 '.select2-selection__choice__remove', 51947 function (evt) { 51948 // Ignore the event if it is disabled 51949 if (self.options.get('disabled')) { 51950 return; 51951 } 51952 51953 var $remove = $(this); 51954 var $selection = $remove.parent(); 51955 51956 var data = $selection.data('data'); 51957 51958 self.trigger('unselect', { 51959 originalEvent: evt, 51960 data: data 51961 }); 51962 } 51963 ); 51964 }; 51965 51966 MultipleSelection.prototype.clear = function () { 51967 this.$selection.find('.select2-selection__rendered').empty(); 51968 }; 51969 51970 MultipleSelection.prototype.display = function (data, container) { 51971 var template = this.options.get('templateSelection'); 51972 var escapeMarkup = this.options.get('escapeMarkup'); 51973 51974 return escapeMarkup(template(data, container)); 51975 }; 51976 51977 MultipleSelection.prototype.selectionContainer = function () { 51978 var $container = $( 51979 '<li class="select2-selection__choice">' + 51980 '<span class="select2-selection__choice__remove" role="presentation">' + 51981 '×' + 51982 '</span>' + 51983 '</li>' 51984 ); 51985 51986 return $container; 51987 }; 51988 51989 MultipleSelection.prototype.update = function (data) { 51990 this.clear(); 51991 51992 if (data.length === 0) { 51993 return; 51994 } 51995 51996 var $selections = []; 51997 51998 for (var d = 0; d < data.length; d++) { 51999 var selection = data[d]; 52000 52001 var $selection = this.selectionContainer(); 52002 var formatted = this.display(selection, $selection); 52003 52004 $selection.append(formatted); 52005 $selection.prop('title', selection.title || selection.text); 52006 52007 $selection.data('data', selection); 52008 52009 $selections.push($selection); 52010 } 52011 52012 var $rendered = this.$selection.find('.select2-selection__rendered'); 52013 52014 Utils.appendMany($rendered, $selections); 52015 }; 52016 52017 return MultipleSelection; 52018}); 52019 52020S2.define('select2/selection/placeholder',[ 52021 '../utils' 52022], function (Utils) { 52023 function Placeholder (decorated, $element, options) { 52024 this.placeholder = this.normalizePlaceholder(options.get('placeholder')); 52025 52026 decorated.call(this, $element, options); 52027 } 52028 52029 Placeholder.prototype.normalizePlaceholder = function (_, placeholder) { 52030 if (typeof placeholder === 'string') { 52031 placeholder = { 52032 id: '', 52033 text: placeholder 52034 }; 52035 } 52036 52037 return placeholder; 52038 }; 52039 52040 Placeholder.prototype.createPlaceholder = function (decorated, placeholder) { 52041 var $placeholder = this.selectionContainer(); 52042 52043 $placeholder.html(this.display(placeholder)); 52044 $placeholder.addClass('select2-selection__placeholder') 52045 .removeClass('select2-selection__choice'); 52046 52047 return $placeholder; 52048 }; 52049 52050 Placeholder.prototype.update = function (decorated, data) { 52051 var singlePlaceholder = ( 52052 data.length == 1 && data[0].id != this.placeholder.id 52053 ); 52054 var multipleSelections = data.length > 1; 52055 52056 if (multipleSelections || singlePlaceholder) { 52057 return decorated.call(this, data); 52058 } 52059 52060 this.clear(); 52061 52062 var $placeholder = this.createPlaceholder(this.placeholder); 52063 52064 this.$selection.find('.select2-selection__rendered').append($placeholder); 52065 }; 52066 52067 return Placeholder; 52068}); 52069 52070S2.define('select2/selection/allowClear',[ 52071 'jquery', 52072 '../keys' 52073], function ($, KEYS) { 52074 function AllowClear () { } 52075 52076 AllowClear.prototype.bind = function (decorated, container, $container) { 52077 var self = this; 52078 52079 decorated.call(this, container, $container); 52080 52081 if (this.placeholder == null) { 52082 if (this.options.get('debug') && window.console && console.error) { 52083 console.error( 52084 'Select2: The `allowClear` option should be used in combination ' + 52085 'with the `placeholder` option.' 52086 ); 52087 } 52088 } 52089 52090 this.$selection.on('mousedown', '.select2-selection__clear', 52091 function (evt) { 52092 self._handleClear(evt); 52093 }); 52094 52095 container.on('keypress', function (evt) { 52096 self._handleKeyboardClear(evt, container); 52097 }); 52098 }; 52099 52100 AllowClear.prototype._handleClear = function (_, evt) { 52101 // Ignore the event if it is disabled 52102 if (this.options.get('disabled')) { 52103 return; 52104 } 52105 52106 var $clear = this.$selection.find('.select2-selection__clear'); 52107 52108 // Ignore the event if nothing has been selected 52109 if ($clear.length === 0) { 52110 return; 52111 } 52112 52113 evt.stopPropagation(); 52114 52115 var data = $clear.data('data'); 52116 52117 for (var d = 0; d < data.length; d++) { 52118 var unselectData = { 52119 data: data[d] 52120 }; 52121 52122 // Trigger the `unselect` event, so people can prevent it from being 52123 // cleared. 52124 this.trigger('unselect', unselectData); 52125 52126 // If the event was prevented, don't clear it out. 52127 if (unselectData.prevented) { 52128 return; 52129 } 52130 } 52131 52132 this.$element.val(this.placeholder.id).trigger('change'); 52133 52134 this.trigger('toggle', {}); 52135 }; 52136 52137 AllowClear.prototype._handleKeyboardClear = function (_, evt, container) { 52138 if (container.isOpen()) { 52139 return; 52140 } 52141 52142 if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) { 52143 this._handleClear(evt); 52144 } 52145 }; 52146 52147 AllowClear.prototype.update = function (decorated, data) { 52148 decorated.call(this, data); 52149 52150 if (this.$selection.find('.select2-selection__placeholder').length > 0 || 52151 data.length === 0) { 52152 return; 52153 } 52154 52155 var $remove = $( 52156 '<span class="select2-selection__clear">' + 52157 '×' + 52158 '</span>' 52159 ); 52160 $remove.data('data', data); 52161 52162 this.$selection.find('.select2-selection__rendered').prepend($remove); 52163 }; 52164 52165 return AllowClear; 52166}); 52167 52168S2.define('select2/selection/search',[ 52169 'jquery', 52170 '../utils', 52171 '../keys' 52172], function ($, Utils, KEYS) { 52173 function Search (decorated, $element, options) { 52174 decorated.call(this, $element, options); 52175 } 52176 52177 Search.prototype.render = function (decorated) { 52178 var $search = $( 52179 '<li class="select2-search select2-search--inline">' + 52180 '<input class="select2-search__field" type="search" tabindex="-1"' + 52181 ' autocomplete="off" autocorrect="off" autocapitalize="off"' + 52182 ' spellcheck="false" role="textbox" aria-autocomplete="list" />' + 52183 '</li>' 52184 ); 52185 52186 this.$searchContainer = $search; 52187 this.$search = $search.find('input'); 52188 52189 var $rendered = decorated.call(this); 52190 52191 this._transferTabIndex(); 52192 52193 return $rendered; 52194 }; 52195 52196 Search.prototype.bind = function (decorated, container, $container) { 52197 var self = this; 52198 52199 decorated.call(this, container, $container); 52200 52201 container.on('open', function () { 52202 self.$search.trigger('focus'); 52203 }); 52204 52205 container.on('close', function () { 52206 self.$search.val(''); 52207 self.$search.removeAttr('aria-activedescendant'); 52208 self.$search.trigger('focus'); 52209 }); 52210 52211 container.on('enable', function () { 52212 self.$search.prop('disabled', false); 52213 52214 self._transferTabIndex(); 52215 }); 52216 52217 container.on('disable', function () { 52218 self.$search.prop('disabled', true); 52219 }); 52220 52221 container.on('focus', function (evt) { 52222 self.$search.trigger('focus'); 52223 }); 52224 52225 container.on('results:focus', function (params) { 52226 self.$search.attr('aria-activedescendant', params.id); 52227 }); 52228 52229 this.$selection.on('focusin', '.select2-search--inline', function (evt) { 52230 self.trigger('focus', evt); 52231 }); 52232 52233 this.$selection.on('focusout', '.select2-search--inline', function (evt) { 52234 self._handleBlur(evt); 52235 }); 52236 52237 this.$selection.on('keydown', '.select2-search--inline', function (evt) { 52238 evt.stopPropagation(); 52239 52240 self.trigger('keypress', evt); 52241 52242 self._keyUpPrevented = evt.isDefaultPrevented(); 52243 52244 var key = evt.which; 52245 52246 if (key === KEYS.BACKSPACE && self.$search.val() === '') { 52247 var $previousChoice = self.$searchContainer 52248 .prev('.select2-selection__choice'); 52249 52250 if ($previousChoice.length > 0) { 52251 var item = $previousChoice.data('data'); 52252 52253 self.searchRemoveChoice(item); 52254 52255 evt.preventDefault(); 52256 }
vendor: 22,668 bytes, lines 52256-53348
52256 52257 } 52258 }); 52259 52260 // Try to detect the IE version should the `documentMode` property that 52261 // is stored on the document. This is only implemented in IE and is 52262 // slightly cleaner than doing a user agent check. 52263 // This property is not available in Edge, but Edge also doesn't have 52264 // this bug. 52265 var msie = document.documentMode; 52266 var disableInputEvents = msie && msie <= 11; 52267 52268 // Workaround for browsers which do not support the `input` event 52269 // This will prevent double-triggering of events for browsers which support 52270 // both the `keyup` and `input` events. 52271 this.$selection.on( 52272 'input.searchcheck', 52273 '.select2-search--inline', 52274 function (evt) { 52275 // IE will trigger the `input` event when a placeholder is used on a 52276 // search box. To get around this issue, we are forced to ignore all 52277 // `input` events in IE and keep using `keyup`. 52278 if (disableInputEvents) { 52279 self.$selection.off('input.search input.searchcheck'); 52280 return; 52281 } 52282 52283 // Unbind the duplicated `keyup` event 52284 self.$selection.off('keyup.search'); 52285 } 52286 ); 52287 52288 this.$selection.on( 52289 'keyup.search input.search', 52290 '.select2-search--inline', 52291 function (evt) { 52292 // IE will trigger the `input` event when a placeholder is used on a 52293 // search box. To get around this issue, we are forced to ignore all 52294 // `input` events in IE and keep using `keyup`. 52295 if (disableInputEvents && evt.type === 'input') { 52296 self.$selection.off('input.search input.searchcheck'); 52297 return; 52298 } 52299 52300 var key = evt.which; 52301 52302 // We can freely ignore events from modifier keys 52303 if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) { 52304 return; 52305 } 52306 52307 // Tabbing will be handled during the `keydown` phase 52308 if (key == KEYS.TAB) { 52309 return; 52310 } 52311 52312 self.handleSearch(evt); 52313 } 52314 ); 52315 }; 52316 52317 /** 52318 * This method will transfer the tabindex attribute from the rendered 52319 * selection to the search box. This allows for the search box to be used as 52320 * the primary focus instead of the selection container. 52321 * 52322 * @private 52323 */ 52324 Search.prototype._transferTabIndex = function (decorated) { 52325 this.$search.attr('tabindex', this.$selection.attr('tabindex')); 52326 this.$selection.attr('tabindex', '-1'); 52327 }; 52328 52329 Search.prototype.createPlaceholder = function (decorated, placeholder) { 52330 this.$search.attr('placeholder', placeholder.text); 52331 }; 52332 52333 Search.prototype.update = function (decorated, data) { 52334 var searchHadFocus = this.$search[0] == document.activeElement; 52335 52336 this.$search.attr('placeholder', ''); 52337 52338 decorated.call(this, data); 52339 52340 this.$selection.find('.select2-selection__rendered') 52341 .append(this.$searchContainer); 52342 52343 this.resizeSearch(); 52344 if (searchHadFocus) { 52345 this.$search.focus(); 52346 } 52347 }; 52348 52349 Search.prototype.handleSearch = function () { 52350 this.resizeSearch(); 52351 52352 if (!this._keyUpPrevented) { 52353 var input = this.$search.val(); 52354 52355 this.trigger('query', { 52356 term: input 52357 }); 52358 } 52359 52360 this._keyUpPrevented = false; 52361 }; 52362 52363 Search.prototype.searchRemoveChoice = function (decorated, item) { 52364 this.trigger('unselect', { 52365 data: item 52366 }); 52367 52368 this.$search.val(item.text); 52369 this.handleSearch(); 52370 }; 52371 52372 Search.prototype.resizeSearch = function () { 52373 this.$search.css('width', '25px'); 52374 52375 var width = ''; 52376 52377 if (this.$search.attr('placeholder') !== '') { 52378 width = this.$selection.find('.select2-selection__rendered').innerWidth(); 52379 } else { 52380 var minimumWidth = this.$search.val().length + 1; 52381 52382 width = (minimumWidth * 0.75) + 'em'; 52383 } 52384 52385 this.$search.css('width', width); 52386 }; 52387 52388 return Search; 52389}); 52390 52391S2.define('select2/selection/eventRelay',[ 52392 'jquery' 52393], function ($) { 52394 function EventRelay () { } 52395 52396 EventRelay.prototype.bind = function (decorated, container, $container) { 52397 var self = this; 52398 var relayEvents = [ 52399 'open', 'opening', 52400 'close', 'closing', 52401 'select', 'selecting', 52402 'unselect', 'unselecting' 52403 ]; 52404 52405 var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting']; 52406 52407 decorated.call(this, container, $container); 52408 52409 container.on('*', function (name, params) { 52410 // Ignore events that should not be relayed 52411 if ($.inArray(name, relayEvents) === -1) { 52412 return; 52413 } 52414 52415 // The parameters should always be an object 52416 params = params || {}; 52417 52418 // Generate the jQuery event for the Select2 event 52419 var evt = $.Event('select2:' + name, { 52420 params: params 52421 }); 52422 52423 self.$element.trigger(evt); 52424 52425 // Only handle preventable events if it was one 52426 if ($.inArray(name, preventableEvents) === -1) { 52427 return; 52428 } 52429 52430 params.prevented = evt.isDefaultPrevented(); 52431 }); 52432 }; 52433 52434 return EventRelay; 52435}); 52436 52437S2.define('select2/translation',[ 52438 'jquery', 52439 'require' 52440], function ($, require) { 52441 function Translation (dict) { 52442 this.dict = dict || {}; 52443 } 52444 52445 Translation.prototype.all = function () { 52446 return this.dict; 52447 }; 52448 52449 Translation.prototype.get = function (key) { 52450 return this.dict[key]; 52451 }; 52452 52453 Translation.prototype.extend = function (translation) { 52454 this.dict = $.extend({}, translation.all(), this.dict); 52455 }; 52456 52457 // Static functions 52458 52459 Translation._cache = {}; 52460 52461 Translation.loadPath = function (path) { 52462 if (!(path in Translation._cache)) { 52463 var translations = require(path); 52464 52465 Translation._cache[path] = translations; 52466 } 52467 52468 return new Translation(Translation._cache[path]); 52469 }; 52470 52471 return Translation; 52472}); 52473 52474S2.define('select2/diacritics',[ 52475 52476], function () { 52477 var diacritics = { 52478 '\u24B6': 'A', 52479 '\uFF21': 'A', 52480 '\u00C0': 'A', 52481 '\u00C1': 'A', 52482 '\u00C2': 'A', 52483 '\u1EA6': 'A', 52484 '\u1EA4': 'A', 52485 '\u1EAA': 'A', 52486 '\u1EA8': 'A', 52487 '\u00C3': 'A', 52488 '\u0100': 'A', 52489 '\u0102': 'A', 52490 '\u1EB0': 'A', 52491 '\u1EAE': 'A', 52492 '\u1EB4': 'A', 52493 '\u1EB2': 'A', 52494 '\u0226': 'A', 52495 '\u01E0': 'A', 52496 '\u00C4': 'A', 52497 '\u01DE': 'A', 52498 '\u1EA2': 'A', 52499 '\u00C5': 'A', 52500 '\u01FA': 'A', 52501 '\u01CD': 'A', 52502 '\u0200': 'A', 52503 '\u0202': 'A', 52504 '\u1EA0': 'A', 52505 '\u1EAC': 'A', 52506 '\u1EB6': 'A', 52507 '\u1E00': 'A', 52508 '\u0104': 'A', 52509 '\u023A': 'A', 52510 '\u2C6F': 'A', 52511 '\uA732': 'AA', 52512 '\u00C6': 'AE', 52513 '\u01FC': 'AE', 52514 '\u01E2': 'AE', 52515 '\uA734': 'AO', 52516 '\uA736': 'AU', 52517 '\uA738': 'AV', 52518 '\uA73A': 'AV', 52519 '\uA73C': 'AY', 52520 '\u24B7': 'B', 52521 '\uFF22': 'B', 52522 '\u1E02': 'B', 52523 '\u1E04': 'B', 52524 '\u1E06': 'B', 52525 '\u0243': 'B', 52526 '\u0182': 'B', 52527 '\u0181': 'B', 52528 '\u24B8': 'C', 52529 '\uFF23': 'C', 52530 '\u0106': 'C', 52531 '\u0108': 'C', 52532 '\u010A': 'C', 52533 '\u010C': 'C', 52534 '\u00C7': 'C', 52535 '\u1E08': 'C', 52536 '\u0187': 'C', 52537 '\u023B': 'C', 52538 '\uA73E': 'C', 52539 '\u24B9': 'D', 52540 '\uFF24': 'D', 52541 '\u1E0A': 'D', 52542 '\u010E': 'D', 52543 '\u1E0C': 'D', 52544 '\u1E10': 'D', 52545 '\u1E12': 'D', 52546 '\u1E0E': 'D', 52547 '\u0110': 'D', 52548 '\u018B': 'D', 52549 '\u018A': 'D', 52550 '\u0189': 'D', 52551 '\uA779': 'D', 52552 '\u01F1': 'DZ', 52553 '\u01C4': 'DZ', 52554 '\u01F2': 'Dz', 52555 '\u01C5': 'Dz', 52556 '\u24BA': 'E', 52557 '\uFF25': 'E', 52558 '\u00C8': 'E', 52559 '\u00C9': 'E', 52560 '\u00CA': 'E', 52561 '\u1EC0': 'E', 52562 '\u1EBE': 'E', 52563 '\u1EC4': 'E', 52564 '\u1EC2': 'E', 52565 '\u1EBC': 'E', 52566 '\u0112': 'E', 52567 '\u1E14': 'E', 52568 '\u1E16': 'E', 52569 '\u0114': 'E', 52570 '\u0116': 'E', 52571 '\u00CB': 'E', 52572 '\u1EBA': 'E', 52573 '\u011A': 'E', 52574 '\u0204': 'E', 52575 '\u0206': 'E', 52576 '\u1EB8': 'E', 52577 '\u1EC6': 'E', 52578 '\u0228': 'E', 52579 '\u1E1C': 'E', 52580 '\u0118': 'E', 52581 '\u1E18': 'E', 52582 '\u1E1A': 'E', 52583 '\u0190': 'E', 52584 '\u018E': 'E', 52585 '\u24BB': 'F', 52586 '\uFF26': 'F', 52587 '\u1E1E': 'F', 52588 '\u0191': 'F', 52589 '\uA77B': 'F', 52590 '\u24BC': 'G', 52591 '\uFF27': 'G', 52592 '\u01F4': 'G', 52593 '\u011C': 'G', 52594 '\u1E20': 'G', 52595 '\u011E': 'G', 52596 '\u0120': 'G', 52597 '\u01E6': 'G', 52598 '\u0122': 'G', 52599 '\u01E4': 'G', 52600 '\u0193': 'G', 52601 '\uA7A0': 'G', 52602 '\uA77D': 'G', 52603 '\uA77E': 'G', 52604 '\u24BD': 'H', 52605 '\uFF28': 'H', 52606 '\u0124': 'H', 52607 '\u1E22': 'H', 52608 '\u1E26': 'H', 52609 '\u021E': 'H', 52610 '\u1E24': 'H', 52611 '\u1E28': 'H', 52612 '\u1E2A': 'H', 52613 '\u0126': 'H', 52614 '\u2C67': 'H', 52615 '\u2C75': 'H', 52616 '\uA78D': 'H', 52617 '\u24BE': 'I', 52618 '\uFF29': 'I', 52619 '\u00CC': 'I', 52620 '\u00CD': 'I', 52621 '\u00CE': 'I', 52622 '\u0128': 'I', 52623 '\u012A': 'I', 52624 '\u012C': 'I', 52625 '\u0130': 'I', 52626 '\u00CF': 'I', 52627 '\u1E2E': 'I', 52628 '\u1EC8': 'I', 52629 '\u01CF': 'I', 52630 '\u0208': 'I', 52631 '\u020A': 'I', 52632 '\u1ECA': 'I', 52633 '\u012E': 'I', 52634 '\u1E2C': 'I', 52635 '\u0197': 'I', 52636 '\u24BF': 'J', 52637 '\uFF2A': 'J', 52638 '\u0134': 'J', 52639 '\u0248': 'J', 52640 '\u24C0': 'K', 52641 '\uFF2B': 'K', 52642 '\u1E30': 'K', 52643 '\u01E8': 'K', 52644 '\u1E32': 'K', 52645 '\u0136': 'K', 52646 '\u1E34': 'K', 52647 '\u0198': 'K', 52648 '\u2C69': 'K', 52649 '\uA740': 'K', 52650 '\uA742': 'K', 52651 '\uA744': 'K', 52652 '\uA7A2': 'K', 52653 '\u24C1': 'L', 52654 '\uFF2C': 'L', 52655 '\u013F': 'L', 52656 '\u0139': 'L', 52657 '\u013D': 'L', 52658 '\u1E36': 'L', 52659 '\u1E38': 'L', 52660 '\u013B': 'L', 52661 '\u1E3C': 'L', 52662 '\u1E3A': 'L', 52663 '\u0141': 'L', 52664 '\u023D': 'L', 52665 '\u2C62': 'L', 52666 '\u2C60': 'L', 52667 '\uA748': 'L', 52668 '\uA746': 'L', 52669 '\uA780': 'L', 52670 '\u01C7': 'LJ', 52671 '\u01C8': 'Lj', 52672 '\u24C2': 'M', 52673 '\uFF2D': 'M', 52674 '\u1E3E': 'M', 52675 '\u1E40': 'M', 52676 '\u1E42': 'M', 52677 '\u2C6E': 'M', 52678 '\u019C': 'M', 52679 '\u24C3': 'N', 52680 '\uFF2E': 'N', 52681 '\u01F8': 'N', 52682 '\u0143': 'N', 52683 '\u00D1': 'N', 52684 '\u1E44': 'N', 52685 '\u0147': 'N', 52686 '\u1E46': 'N', 52687 '\u0145': 'N', 52688 '\u1E4A': 'N', 52689 '\u1E48': 'N', 52690 '\u0220': 'N', 52691 '\u019D': 'N', 52692 '\uA790': 'N', 52693 '\uA7A4': 'N', 52694 '\u01CA': 'NJ', 52695 '\u01CB': 'Nj', 52696 '\u24C4': 'O', 52697 '\uFF2F': 'O', 52698 '\u00D2': 'O', 52699 '\u00D3': 'O', 52700 '\u00D4': 'O', 52701 '\u1ED2': 'O', 52702 '\u1ED0': 'O', 52703 '\u1ED6': 'O', 52704 '\u1ED4': 'O', 52705 '\u00D5': 'O', 52706 '\u1E4C': 'O', 52707 '\u022C': 'O', 52708 '\u1E4E': 'O', 52709 '\u014C': 'O', 52710 '\u1E50': 'O', 52711 '\u1E52': 'O', 52712 '\u014E': 'O', 52713 '\u022E': 'O', 52714 '\u0230': 'O', 52715 '\u00D6': 'O', 52716 '\u022A': 'O', 52717 '\u1ECE': 'O', 52718 '\u0150': 'O', 52719 '\u01D1': 'O', 52720 '\u020C': 'O', 52721 '\u020E': 'O', 52722 '\u01A0': 'O', 52723 '\u1EDC': 'O', 52724 '\u1EDA': 'O', 52725 '\u1EE0': 'O', 52726 '\u1EDE': 'O', 52727 '\u1EE2': 'O', 52728 '\u1ECC': 'O', 52729 '\u1ED8': 'O', 52730 '\u01EA': 'O', 52731 '\u01EC': 'O', 52732 '\u00D8': 'O', 52733 '\u01FE': 'O', 52734 '\u0186': 'O', 52735 '\u019F': 'O', 52736 '\uA74A': 'O', 52737 '\uA74C': 'O', 52738 '\u01A2': 'OI', 52739 '\uA74E': 'OO', 52740 '\u0222': 'OU', 52741 '\u24C5': 'P', 52742 '\uFF30': 'P', 52743 '\u1E54': 'P', 52744 '\u1E56': 'P', 52745 '\u01A4': 'P', 52746 '\u2C63': 'P', 52747 '\uA750': 'P', 52748 '\uA752': 'P', 52749 '\uA754': 'P', 52750 '\u24C6': 'Q', 52751 '\uFF31': 'Q', 52752 '\uA756': 'Q', 52753 '\uA758': 'Q', 52754 '\u024A': 'Q', 52755 '\u24C7': 'R', 52756 '\uFF32': 'R', 52757 '\u0154': 'R', 52758 '\u1E58': 'R', 52759 '\u0158': 'R', 52760 '\u0210': 'R', 52761 '\u0212': 'R', 52762 '\u1E5A': 'R', 52763 '\u1E5C': 'R', 52764 '\u0156': 'R', 52765 '\u1E5E': 'R', 52766 '\u024C': 'R', 52767 '\u2C64': 'R', 52768 '\uA75A': 'R', 52769 '\uA7A6': 'R', 52770 '\uA782': 'R', 52771 '\u24C8': 'S', 52772 '\uFF33': 'S', 52773 '\u1E9E': 'S', 52774 '\u015A': 'S', 52775 '\u1E64': 'S', 52776 '\u015C': 'S', 52777 '\u1E60': 'S', 52778 '\u0160': 'S', 52779 '\u1E66': 'S', 52780 '\u1E62': 'S', 52781 '\u1E68': 'S', 52782 '\u0218': 'S', 52783 '\u015E': 'S', 52784 '\u2C7E': 'S', 52785 '\uA7A8': 'S', 52786 '\uA784': 'S', 52787 '\u24C9': 'T', 52788 '\uFF34': 'T', 52789 '\u1E6A': 'T', 52790 '\u0164': 'T', 52791 '\u1E6C': 'T', 52792 '\u021A': 'T', 52793 '\u0162': 'T', 52794 '\u1E70': 'T', 52795 '\u1E6E': 'T', 52796 '\u0166': 'T', 52797 '\u01AC': 'T', 52798 '\u01AE': 'T', 52799 '\u023E': 'T', 52800 '\uA786': 'T', 52801 '\uA728': 'TZ', 52802 '\u24CA': 'U', 52803 '\uFF35': 'U', 52804 '\u00D9': 'U', 52805 '\u00DA': 'U', 52806 '\u00DB': 'U', 52807 '\u0168': 'U', 52808 '\u1E78': 'U', 52809 '\u016A': 'U', 52810 '\u1E7A': 'U', 52811 '\u016C': 'U', 52812 '\u00DC': 'U', 52813 '\u01DB': 'U', 52814 '\u01D7': 'U', 52815 '\u01D5': 'U', 52816 '\u01D9': 'U', 52817 '\u1EE6': 'U', 52818 '\u016E': 'U', 52819 '\u0170': 'U', 52820 '\u01D3': 'U', 52821 '\u0214': 'U', 52822 '\u0216': 'U', 52823 '\u01AF': 'U', 52824 '\u1EEA': 'U', 52825 '\u1EE8': 'U', 52826 '\u1EEE': 'U', 52827 '\u1EEC': 'U', 52828 '\u1EF0': 'U', 52829 '\u1EE4': 'U', 52830 '\u1E72': 'U', 52831 '\u0172': 'U', 52832 '\u1E76': 'U', 52833 '\u1E74': 'U', 52834 '\u0244': 'U', 52835 '\u24CB': 'V', 52836 '\uFF36': 'V', 52837 '\u1E7C': 'V', 52838 '\u1E7E': 'V', 52839 '\u01B2': 'V', 52840 '\uA75E': 'V', 52841 '\u0245': 'V', 52842 '\uA760': 'VY', 52843 '\u24CC': 'W', 52844 '\uFF37': 'W', 52845 '\u1E80': 'W', 52846 '\u1E82': 'W', 52847 '\u0174': 'W', 52848 '\u1E86': 'W', 52849 '\u1E84': 'W', 52850 '\u1E88': 'W', 52851 '\u2C72': 'W', 52852 '\u24CD': 'X', 52853 '\uFF38': 'X', 52854 '\u1E8A': 'X', 52855 '\u1E8C': 'X', 52856 '\u24CE': 'Y', 52857 '\uFF39': 'Y', 52858 '\u1EF2': 'Y', 52859 '\u00DD': 'Y', 52860 '\u0176': 'Y', 52861 '\u1EF8': 'Y', 52862 '\u0232': 'Y', 52863 '\u1E8E': 'Y', 52864 '\u0178': 'Y', 52865 '\u1EF6': 'Y', 52866 '\u1EF4': 'Y', 52867 '\u01B3': 'Y', 52868 '\u024E': 'Y', 52869 '\u1EFE': 'Y', 52870 '\u24CF': 'Z', 52871 '\uFF3A': 'Z', 52872 '\u0179': 'Z', 52873 '\u1E90': 'Z', 52874 '\u017B': 'Z', 52875 '\u017D': 'Z', 52876 '\u1E92': 'Z', 52877 '\u1E94': 'Z', 52878 '\u01B5': 'Z', 52879 '\u0224': 'Z', 52880 '\u2C7F': 'Z', 52881 '\u2C6B': 'Z', 52882 '\uA762': 'Z', 52883 '\u24D0': 'a', 52884 '\uFF41': 'a', 52885 '\u1E9A': 'a', 52886 '\u00E0': 'a', 52887 '\u00E1': 'a', 52888 '\u00E2': 'a', 52889 '\u1EA7': 'a', 52890 '\u1EA5': 'a', 52891 '\u1EAB': 'a', 52892 '\u1EA9': 'a', 52893 '\u00E3': 'a', 52894 '\u0101': 'a', 52895 '\u0103': 'a', 52896 '\u1EB1': 'a', 52897 '\u1EAF': 'a', 52898 '\u1EB5': 'a', 52899 '\u1EB3': 'a', 52900 '\u0227': 'a', 52901 '\u01E1': 'a', 52902 '\u00E4': 'a', 52903 '\u01DF': 'a', 52904 '\u1EA3': 'a', 52905 '\u00E5': 'a', 52906 '\u01FB': 'a', 52907 '\u01CE': 'a', 52908 '\u0201': 'a', 52909 '\u0203': 'a', 52910 '\u1EA1': 'a', 52911 '\u1EAD': 'a', 52912 '\u1EB7': 'a', 52913 '\u1E01': 'a', 52914 '\u0105': 'a', 52915 '\u2C65': 'a', 52916 '\u0250': 'a', 52917 '\uA733': 'aa', 52918 '\u00E6': 'ae', 52919 '\u01FD': 'ae', 52920 '\u01E3': 'ae', 52921 '\uA735': 'ao', 52922 '\uA737': 'au', 52923 '\uA739': 'av', 52924 '\uA73B': 'av', 52925 '\uA73D': 'ay', 52926 '\u24D1': 'b', 52927 '\uFF42': 'b', 52928 '\u1E03': 'b', 52929 '\u1E05': 'b', 52930 '\u1E07': 'b', 52931 '\u0180': 'b', 52932 '\u0183': 'b', 52933 '\u0253': 'b', 52934 '\u24D2': 'c', 52935 '\uFF43': 'c', 52936 '\u0107': 'c', 52937 '\u0109': 'c', 52938 '\u010B': 'c', 52939 '\u010D': 'c', 52940 '\u00E7': 'c', 52941 '\u1E09': 'c', 52942 '\u0188': 'c', 52943 '\u023C': 'c', 52944 '\uA73F': 'c', 52945 '\u2184': 'c', 52946 '\u24D3': 'd', 52947 '\uFF44': 'd', 52948 '\u1E0B': 'd', 52949 '\u010F': 'd', 52950 '\u1E0D': 'd', 52951 '\u1E11': 'd', 52952 '\u1E13': 'd', 52953 '\u1E0F': 'd', 52954 '\u0111': 'd', 52955 '\u018C': 'd', 52956 '\u0256': 'd', 52957 '\u0257': 'd', 52958 '\uA77A': 'd', 52959 '\u01F3': 'dz', 52960 '\u01C6': 'dz', 52961 '\u24D4': 'e', 52962 '\uFF45': 'e', 52963 '\u00E8': 'e', 52964 '\u00E9': 'e', 52965 '\u00EA': 'e', 52966 '\u1EC1': 'e', 52967 '\u1EBF': 'e', 52968 '\u1EC5': 'e', 52969 '\u1EC3': 'e', 52970 '\u1EBD': 'e', 52971 '\u0113': 'e', 52972 '\u1E15': 'e', 52973 '\u1E17': 'e', 52974 '\u0115': 'e', 52975 '\u0117': 'e', 52976 '\u00EB': 'e', 52977 '\u1EBB': 'e', 52978 '\u011B': 'e', 52979 '\u0205': 'e', 52980 '\u0207': 'e', 52981 '\u1EB9': 'e', 52982 '\u1EC7': 'e', 52983 '\u0229': 'e', 52984 '\u1E1D': 'e', 52985 '\u0119': 'e', 52986 '\u1E19': 'e', 52987 '\u1E1B': 'e', 52988 '\u0247': 'e', 52989 '\u025B': 'e', 52990 '\u01DD': 'e', 52991 '\u24D5': 'f', 52992 '\uFF46': 'f', 52993 '\u1E1F': 'f', 52994 '\u0192': 'f', 52995 '\uA77C': 'f', 52996 '\u24D6': 'g', 52997 '\uFF47': 'g', 52998 '\u01F5': 'g', 52999 '\u011D': 'g', 53000 '\u1E21': 'g', 53001 '\u011F': 'g', 53002 '\u0121': 'g', 53003 '\u01E7': 'g', 53004 '\u0123': 'g', 53005 '\u01E5': 'g', 53006 '\u0260': 'g', 53007 '\uA7A1': 'g', 53008 '\u1D79': 'g', 53009 '\uA77F': 'g', 53010 '\u24D7': 'h', 53011 '\uFF48': 'h', 53012 '\u0125': 'h', 53013 '\u1E23': 'h', 53014 '\u1E27': 'h', 53015 '\u021F': 'h', 53016 '\u1E25': 'h', 53017 '\u1E29': 'h', 53018 '\u1E2B': 'h', 53019 '\u1E96': 'h', 53020 '\u0127': 'h', 53021 '\u2C68': 'h', 53022 '\u2C76': 'h', 53023 '\u0265': 'h', 53024 '\u0195': 'hv', 53025 '\u24D8': 'i', 53026 '\uFF49': 'i', 53027 '\u00EC': 'i', 53028 '\u00ED': 'i', 53029 '\u00EE': 'i', 53030 '\u0129': 'i', 53031 '\u012B': 'i', 53032 '\u012D': 'i', 53033 '\u00EF': 'i', 53034 '\u1E2F': 'i', 53035 '\u1EC9': 'i', 53036 '\u01D0': 'i', 53037 '\u0209': 'i', 53038 '\u020B': 'i', 53039 '\u1ECB': 'i', 53040 '\u012F': 'i', 53041 '\u1E2D': 'i', 53042 '\u0268': 'i', 53043 '\u0131': 'i', 53044 '\u24D9': 'j', 53045 '\uFF4A': 'j', 53046 '\u0135': 'j', 53047 '\u01F0': 'j', 53048 '\u0249': 'j', 53049 '\u24DA': 'k', 53050 '\uFF4B': 'k', 53051 '\u1E31': 'k', 53052 '\u01E9': 'k', 53053 '\u1E33': 'k', 53054 '\u0137': 'k', 53055 '\u1E35': 'k', 53056 '\u0199': 'k', 53057 '\u2C6A': 'k', 53058 '\uA741': 'k', 53059 '\uA743': 'k', 53060 '\uA745': 'k', 53061 '\uA7A3': 'k', 53062 '\u24DB': 'l', 53063 '\uFF4C': 'l', 53064 '\u0140': 'l', 53065 '\u013A': 'l', 53066 '\u013E': 'l', 53067 '\u1E37': 'l', 53068 '\u1E39': 'l', 53069 '\u013C': 'l', 53070 '\u1E3D': 'l', 53071 '\u1E3B': 'l', 53072 '\u017F': 'l', 53073 '\u0142': 'l', 53074 '\u019A': 'l', 53075 '\u026B': 'l', 53076 '\u2C61': 'l', 53077 '\uA749': 'l', 53078 '\uA781': 'l', 53079 '\uA747': 'l', 53080 '\u01C9': 'lj', 53081 '\u24DC': 'm', 53082 '\uFF4D': 'm', 53083 '\u1E3F': 'm', 53084 '\u1E41': 'm', 53085 '\u1E43': 'm', 53086 '\u0271': 'm', 53087 '\u026F': 'm', 53088 '\u24DD': 'n', 53089 '\uFF4E': 'n', 53090 '\u01F9': 'n', 53091 '\u0144': 'n', 53092 '\u00F1': 'n', 53093 '\u1E45': 'n', 53094 '\u0148': 'n', 53095 '\u1E47': 'n', 53096 '\u0146': 'n', 53097 '\u1E4B': 'n', 53098 '\u1E49': 'n', 53099 '\u019E': 'n', 53100 '\u0272': 'n', 53101 '\u0149': 'n', 53102 '\uA791': 'n', 53103 '\uA7A5': 'n', 53104 '\u01CC': 'nj', 53105 '\u24DE': 'o', 53106 '\uFF4F': 'o', 53107 '\u00F2': 'o', 53108 '\u00F3': 'o', 53109 '\u00F4': 'o', 53110 '\u1ED3': 'o', 53111 '\u1ED1': 'o', 53112 '\u1ED7': 'o', 53113 '\u1ED5': 'o', 53114 '\u00F5': 'o', 53115 '\u1E4D': 'o', 53116 '\u022D': 'o', 53117 '\u1E4F': 'o', 53118 '\u014D': 'o', 53119 '\u1E51': 'o', 53120 '\u1E53': 'o', 53121 '\u014F': 'o', 53122 '\u022F': 'o', 53123 '\u0231': 'o', 53124 '\u00F6': 'o', 53125 '\u022B': 'o', 53126 '\u1ECF': 'o', 53127 '\u0151': 'o', 53128 '\u01D2': 'o', 53129 '\u020D': 'o', 53130 '\u020F': 'o', 53131 '\u01A1': 'o', 53132 '\u1EDD': 'o', 53133 '\u1EDB': 'o', 53134 '\u1EE1': 'o', 53135 '\u1EDF': 'o', 53136 '\u1EE3': 'o', 53137 '\u1ECD': 'o', 53138 '\u1ED9': 'o', 53139 '\u01EB': 'o', 53140 '\u01ED': 'o', 53141 '\u00F8': 'o', 53142 '\u01FF': 'o', 53143 '\u0254': 'o', 53144 '\uA74B': 'o', 53145 '\uA74D': 'o', 53146 '\u0275': 'o', 53147 '\u01A3': 'oi', 53148 '\u0223': 'ou', 53149 '\uA74F': 'oo', 53150 '\u24DF': 'p', 53151 '\uFF50': 'p', 53152 '\u1E55': 'p', 53153 '\u1E57': 'p', 53154 '\u01A5': 'p', 53155 '\u1D7D': 'p', 53156 '\uA751': 'p', 53157 '\uA753': 'p', 53158 '\uA755': 'p', 53159 '\u24E0': 'q', 53160 '\uFF51': 'q', 53161 '\u024B': 'q', 53162 '\uA757': 'q', 53163 '\uA759': 'q', 53164 '\u24E1': 'r', 53165 '\uFF52': 'r', 53166 '\u0155': 'r', 53167 '\u1E59': 'r', 53168 '\u0159': 'r', 53169 '\u0211': 'r', 53170 '\u0213': 'r', 53171 '\u1E5B': 'r', 53172 '\u1E5D': 'r', 53173 '\u0157': 'r', 53174 '\u1E5F': 'r', 53175 '\u024D': 'r', 53176 '\u027D': 'r', 53177 '\uA75B': 'r', 53178 '\uA7A7': 'r', 53179 '\uA783': 'r', 53180 '\u24E2': 's', 53181 '\uFF53': 's', 53182 '\u00DF': 's', 53183 '\u015B': 's', 53184 '\u1E65': 's', 53185 '\u015D': 's', 53186 '\u1E61': 's', 53187 '\u0161': 's', 53188 '\u1E67': 's', 53189 '\u1E63': 's', 53190 '\u1E69': 's', 53191 '\u0219': 's', 53192 '\u015F': 's', 53193 '\u023F': 's', 53194 '\uA7A9': 's', 53195 '\uA785': 's', 53196 '\u1E9B': 's', 53197 '\u24E3': 't', 53198 '\uFF54': 't', 53199 '\u1E6B': 't', 53200 '\u1E97': 't', 53201 '\u0165': 't', 53202 '\u1E6D': 't', 53203 '\u021B': 't', 53204 '\u0163': 't', 53205 '\u1E71': 't', 53206 '\u1E6F': 't', 53207 '\u0167': 't', 53208 '\u01AD': 't', 53209 '\u0288': 't', 53210 '\u2C66': 't', 53211 '\uA787': 't', 53212 '\uA729': 'tz', 53213 '\u24E4': 'u', 53214 '\uFF55': 'u', 53215 '\u00F9': 'u', 53216 '\u00FA': 'u', 53217 '\u00FB': 'u', 53218 '\u0169': 'u', 53219 '\u1E79': 'u', 53220 '\u016B': 'u', 53221 '\u1E7B': 'u', 53222 '\u016D': 'u', 53223 '\u00FC': 'u', 53224 '\u01DC': 'u', 53225 '\u01D8': 'u', 53226 '\u01D6': 'u', 53227 '\u01DA': 'u', 53228 '\u1EE7': 'u', 53229 '\u016F': 'u', 53230 '\u0171': 'u', 53231 '\u01D4': 'u', 53232 '\u0215': 'u', 53233 '\u0217': 'u', 53234 '\u01B0': 'u', 53235 '\u1EEB': 'u', 53236 '\u1EE9': 'u', 53237 '\u1EEF': 'u', 53238 '\u1EED': 'u', 53239 '\u1EF1': 'u', 53240 '\u1EE5': 'u', 53241 '\u1E73': 'u', 53242 '\u0173': 'u', 53243 '\u1E77': 'u', 53244 '\u1E75': 'u', 53245 '\u0289': 'u', 53246 '\u24E5': 'v', 53247 '\uFF56': 'v', 53248 '\u1E7D': 'v', 53249 '\u1E7F': 'v', 53250 '\u028B': 'v', 53251 '\uA75F': 'v', 53252 '\u028C': 'v', 53253 '\uA761': 'vy', 53254 '\u24E6': 'w', 53255 '\uFF57': 'w', 53256 '\u1E81': 'w', 53257 '\u1E83': 'w', 53258 '\u0175': 'w', 53259 '\u1E87': 'w', 53260 '\u1E85': 'w', 53261 '\u1E98': 'w', 53262 '\u1E89': 'w', 53263 '\u2C73': 'w', 53264 '\u24E7': 'x', 53265 '\uFF58': 'x', 53266 '\u1E8B': 'x', 53267 '\u1E8D': 'x', 53268 '\u24E8': 'y', 53269 '\uFF59': 'y', 53270 '\u1EF3': 'y', 53271 '\u00FD': 'y', 53272 '\u0177': 'y', 53273 '\u1EF9': 'y', 53274 '\u0233': 'y', 53275 '\u1E8F': 'y', 53276 '\u00FF': 'y', 53277 '\u1EF7': 'y', 53278 '\u1E99': 'y', 53279 '\u1EF5': 'y', 53280 '\u01B4': 'y', 53281 '\u024F': 'y', 53282 '\u1EFF': 'y', 53283 '\u24E9': 'z', 53284 '\uFF5A': 'z', 53285 '\u017A': 'z', 53286 '\u1E91': 'z', 53287 '\u017C': 'z', 53288 '\u017E': 'z', 53289 '\u1E93': 'z', 53290 '\u1E95': 'z', 53291 '\u01B6': 'z', 53292 '\u0225': 'z', 53293 '\u0240': 'z', 53294 '\u2C6C': 'z', 53295 '\uA763': 'z', 53296 '\u0386': '\u0391', 53297 '\u0388': '\u0395', 53298 '\u0389': '\u0397', 53299 '\u038A': '\u0399', 53300 '\u03AA': '\u0399', 53301 '\u038C': '\u039F', 53302 '\u038E': '\u03A5', 53303 '\u03AB': '\u03A5', 53304 '\u038F': '\u03A9', 53305 '\u03AC': '\u03B1', 53306 '\u03AD': '\u03B5', 53307 '\u03AE': '\u03B7', 53308 '\u03AF': '\u03B9', 53309 '\u03CA': '\u03B9', 53310 '\u0390': '\u03B9', 53311 '\u03CC': '\u03BF', 53312 '\u03CD': '\u03C5', 53313 '\u03CB': '\u03C5', 53314 '\u03B0': '\u03C5', 53315 '\u03C9': '\u03C9', 53316 '\u03C2': '\u03C3' 53317 }; 53318 53319 return diacritics; 53320}); 53321 53322S2.define('select2/data/base',[ 53323 '../utils' 53324], function (Utils) { 53325 function BaseAdapter ($element, options) { 53326 BaseAdapter.__super__.constructor.call(this); 53327 } 53328 53329 Utils.Extend(BaseAdapter, Utils.Observable); 53330 53331 BaseAdapter.prototype.current = function (callback) { 53332 throw new Error('The `current` method must be defined in child classes.'); 53333 }; 53334 53335 BaseAdapter.prototype.query = function (params, callback) { 53336 throw new Error('The `query` method must be defined in child classes.'); 53337 }; 53338 53339 BaseAdapter.prototype.bind = function (container, $container) { 53340 // Can be implemented in subclasses 53341 }; 53342 53343 BaseAdapter.prototype.destroy = function () { 53344 // Can be implemented in subclasses 53345 }; 53346 53347 BaseAdapter.prototype.generateResultId = function (container, data) { 53348 var id =
vendor: 25,079 bytes, lines 53348-54442
53348container.id + '-result-'; 53349 53350 id += Utils.generateChars(4); 53351 53352 if (data.id != null) { 53353 id += '-' + data.id.toString(); 53354 } else { 53355 id += '-' + Utils.generateChars(4); 53356 } 53357 return id; 53358 }; 53359 53360 return BaseAdapter; 53361}); 53362 53363S2.define('select2/data/select',[ 53364 './base', 53365 '../utils', 53366 'jquery' 53367], function (BaseAdapter, Utils, $) { 53368 function SelectAdapter ($element, options) { 53369 this.$element = $element; 53370 this.options = options; 53371 53372 SelectAdapter.__super__.constructor.call(this); 53373 } 53374 53375 Utils.Extend(SelectAdapter, BaseAdapter); 53376 53377 SelectAdapter.prototype.current = function (callback) { 53378 var data = []; 53379 var self = this; 53380 53381 this.$element.find(':selected').each(function () { 53382 var $option = $(this); 53383 53384 var option = self.item($option); 53385 53386 data.push(option); 53387 }); 53388 53389 callback(data); 53390 }; 53391 53392 SelectAdapter.prototype.select = function (data) { 53393 var self = this; 53394 53395 data.selected = true; 53396 53397 // If data.element is a DOM node, use it instead 53398 if ($(data.element).is('option')) { 53399 data.element.selected = true; 53400 53401 this.$element.trigger('change'); 53402 53403 return; 53404 } 53405 53406 if (this.$element.prop('multiple')) { 53407 this.current(function (currentData) { 53408 var val = []; 53409 53410 data = [data]; 53411 data.push.apply(data, currentData); 53412 53413 for (var d = 0; d < data.length; d++) { 53414 var id = data[d].id; 53415 53416 if ($.inArray(id, val) === -1) { 53417 val.push(id); 53418 } 53419 } 53420 53421 self.$element.val(val); 53422 self.$element.trigger('change'); 53423 }); 53424 } else { 53425 var val = data.id; 53426 53427 this.$element.val(val); 53428 this.$element.trigger('change'); 53429 } 53430 }; 53431 53432 SelectAdapter.prototype.unselect = function (data) { 53433 var self = this; 53434 53435 if (!this.$element.prop('multiple')) { 53436 return; 53437 } 53438 53439 data.selected = false; 53440 53441 if ($(data.element).is('option')) { 53442 data.element.selected = false; 53443 53444 this.$element.trigger('change'); 53445 53446 return; 53447 } 53448 53449 this.current(function (currentData) { 53450 var val = []; 53451 53452 for (var d = 0; d < currentData.length; d++) { 53453 var id = currentData[d].id; 53454 53455 if (id !== data.id && $.inArray(id, val) === -1) { 53456 val.push(id); 53457 } 53458 } 53459 53460 self.$element.val(val); 53461 53462 self.$element.trigger('change'); 53463 }); 53464 }; 53465 53466 SelectAdapter.prototype.bind = function (container, $container) { 53467 var self = this; 53468 53469 this.container = container; 53470 53471 container.on('select', function (params) { 53472 self.select(params.data); 53473 }); 53474 53475 container.on('unselect', function (params) { 53476 self.unselect(params.data); 53477 }); 53478 }; 53479 53480 SelectAdapter.prototype.destroy = function () { 53481 // Remove anything added to child elements 53482 this.$element.find('*').each(function () { 53483 // Remove any custom data set by Select2 53484 $.removeData(this, 'data'); 53485 }); 53486 }; 53487 53488 SelectAdapter.prototype.query = function (params, callback) { 53489 var data = []; 53490 var self = this; 53491 53492 var $options = this.$element.children(); 53493 53494 $options.each(function () { 53495 var $option = $(this); 53496 53497 if (!$option.is('option') && !$option.is('optgroup')) { 53498 return; 53499 } 53500 53501 var option = self.item($option); 53502 53503 var matches = self.matches(params, option); 53504 53505 if (matches !== null) { 53506 data.push(matches); 53507 } 53508 }); 53509 53510 callback({ 53511 results: data 53512 }); 53513 }; 53514 53515 SelectAdapter.prototype.addOptions = function ($options) { 53516 Utils.appendMany(this.$element, $options); 53517 }; 53518 53519 SelectAdapter.prototype.option = function (data) { 53520 var option; 53521 53522 if (data.children) { 53523 option = document.createElement('optgroup'); 53524 option.label = data.text; 53525 } else { 53526 option = document.createElement('option'); 53527 53528 if (option.textContent !== undefined) { 53529 option.textContent = data.text; 53530 } else { 53531 option.innerText = data.text; 53532 } 53533 } 53534 53535 if (data.id) { 53536 option.value = data.id; 53537 } 53538 53539 if (data.disabled) { 53540 option.disabled = true; 53541 } 53542 53543 if (data.selected) { 53544 option.selected = true; 53545 } 53546 53547 if (data.title) { 53548 option.title = data.title; 53549 } 53550 53551 var $option = $(option); 53552 53553 var normalizedData = this._normalizeItem(data); 53554 normalizedData.element = option; 53555 53556 // Override the option's data with the combined data 53557 $.data(option, 'data', normalizedData); 53558 53559 return $option; 53560 }; 53561 53562 SelectAdapter.prototype.item = function ($option) { 53563 var data = {}; 53564 53565 data = $.data($option[0], 'data'); 53566 53567 if (data != null) { 53568 return data; 53569 } 53570 53571 if ($option.is('option')) { 53572 data = { 53573 id: $option.val(), 53574 text: $option.text(), 53575 disabled: $option.prop('disabled'), 53576 selected: $option.prop('selected'), 53577 title: $option.prop('title') 53578 }; 53579 } else if ($option.is('optgroup')) { 53580 data = { 53581 text: $option.prop('label'), 53582 children: [], 53583 title: $option.prop('title') 53584 }; 53585 53586 var $children = $option.children('option'); 53587 var children = []; 53588 53589 for (var c = 0; c < $children.length; c++) { 53590 var $child = $($children[c]); 53591 53592 var child = this.item($child); 53593 53594 children.push(child); 53595 } 53596 53597 data.children = children; 53598 } 53599 53600 data = this._normalizeItem(data); 53601 data.element = $option[0]; 53602 53603 $.data($option[0], 'data', data); 53604 53605 return data; 53606 }; 53607 53608 SelectAdapter.prototype._normalizeItem = function (item) { 53609 if (!$.isPlainObject(item)) { 53610 item = { 53611 id: item, 53612 text: item 53613 }; 53614 } 53615 53616 item = $.extend({}, { 53617 text: '' 53618 }, item); 53619 53620 var defaults = { 53621 selected: false, 53622 disabled: false 53623 }; 53624 53625 if (item.id != null) { 53626 item.id = item.id.toString(); 53627 } 53628 53629 if (item.text != null) { 53630 item.text = item.text.toString(); 53631 } 53632 53633 if (item._resultId == null && item.id && this.container != null) { 53634 item._resultId = this.generateResultId(this.container, item); 53635 } 53636 53637 return $.extend({}, defaults, item); 53638 }; 53639 53640 SelectAdapter.prototype.matches = function (params, data) { 53641 var matcher = this.options.get('matcher'); 53642 53643 return matcher(params, data); 53644 }; 53645 53646 return SelectAdapter; 53647}); 53648 53649S2.define('select2/data/array',[ 53650 './select', 53651 '../utils', 53652 'jquery' 53653], function (SelectAdapter, Utils, $) { 53654 function ArrayAdapter ($element, options) { 53655 var data = options.get('data') || []; 53656 53657 ArrayAdapter.__super__.constructor.call(this, $element, options); 53658 53659 this.addOptions(this.convertToOptions(data)); 53660 } 53661 53662 Utils.Extend(ArrayAdapter, SelectAdapter); 53663 53664 ArrayAdapter.prototype.select = function (data) { 53665 var $option = this.$element.find('option').filter(function (i, elm) { 53666 return elm.value == data.id.toString(); 53667 }); 53668 53669 if ($option.length === 0) { 53670 $option = this.option(data); 53671 53672 this.addOptions($option); 53673 } 53674 53675 ArrayAdapter.__super__.select.call(this, data); 53676 }; 53677 53678 ArrayAdapter.prototype.convertToOptions = function (data) { 53679 var self = this; 53680 53681 var $existing = this.$element.find('option'); 53682 var existingIds = $existing.map(function () { 53683 return self.item($(this)).id; 53684 }).get(); 53685 53686 var $options = []; 53687 53688 // Filter out all items except for the one passed in the argument 53689 function onlyItem (item) { 53690 return function () { 53691 return $(this).val() == item.id; 53692 }; 53693 } 53694 53695 for (var d = 0; d < data.length; d++) { 53696 var item = this._normalizeItem(data[d]); 53697 53698 // Skip items which were pre-loaded, only merge the data 53699 if ($.inArray(item.id, existingIds) >= 0) { 53700 var $existingOption = $existing.filter(onlyItem(item)); 53701 53702 var existingData = this.item($existingOption); 53703 var newData = $.extend(true, {}, item, existingData); 53704 53705 var $newOption = this.option(newData); 53706 53707 $existingOption.replaceWith($newOption); 53708 53709 continue; 53710 } 53711 53712 var $option = this.option(item); 53713 53714 if (item.children) { 53715 var $children = this.convertToOptions(item.children); 53716 53717 Utils.appendMany($option, $children); 53718 } 53719 53720 $options.push($option); 53721 } 53722 53723 return $options; 53724 }; 53725 53726 return ArrayAdapter; 53727}); 53728 53729S2.define('select2/data/ajax',[ 53730 './array', 53731 '../utils', 53732 'jquery' 53733], function (ArrayAdapter, Utils, $) { 53734 function AjaxAdapter ($element, options) { 53735 this.ajaxOptions = this._applyDefaults(options.get('ajax')); 53736 53737 if (this.ajaxOptions.processResults != null) { 53738 this.processResults = this.ajaxOptions.processResults; 53739 } 53740 53741 AjaxAdapter.__super__.constructor.call(this, $element, options); 53742 } 53743 53744 Utils.Extend(AjaxAdapter, ArrayAdapter); 53745 53746 AjaxAdapter.prototype._applyDefaults = function (options) { 53747 var defaults = { 53748 data: function (params) { 53749 return $.extend({}, params, { 53750 q: params.term 53751 }); 53752 }, 53753 transport: function (params, success, failure) { 53754 var $request = $.ajax(params); 53755 53756 $request.then(success); 53757 $request.fail(failure); 53758 53759 return $request; 53760 } 53761 }; 53762 53763 return $.extend({}, defaults, options, true); 53764 }; 53765 53766 AjaxAdapter.prototype.processResults = function (results) { 53767 return results; 53768 }; 53769 53770 AjaxAdapter.prototype.query = function (params, callback) { 53771 var matches = []; 53772 var self = this; 53773 53774 if (this._request != null) { 53775 // JSONP requests cannot always be aborted 53776 if ($.isFunction(this._request.abort)) { 53777 this._request.abort(); 53778 } 53779 53780 this._request = null; 53781 } 53782 53783 var options = $.extend({ 53784 type: 'GET' 53785 }, this.ajaxOptions); 53786 53787 if (typeof options.url === 'function') { 53788 options.url = options.url.call(this.$element, params); 53789 } 53790 53791 if (typeof options.data === 'function') { 53792 options.data = options.data.call(this.$element, params); 53793 } 53794 53795 function request () { 53796 var $request = options.transport(options, function (data) { 53797 var results = self.processResults(data, params); 53798 53799 if (self.options.get('debug') && window.console && console.error) { 53800 // Check to make sure that the response included a `results` key. 53801 if (!results || !results.results || !$.isArray(results.results)) { 53802 console.error( 53803 'Select2: The AJAX results did not return an array in the ' + 53804 '`results` key of the response.' 53805 ); 53806 } 53807 } 53808 53809 callback(results); 53810 }, function () { 53811 // Attempt to detect if a request was aborted 53812 // Only works if the transport exposes a status property 53813 if ($request.status && $request.status === '0') { 53814 return; 53815 } 53816 53817 self.trigger('results:message', { 53818 message: 'errorLoading' 53819 }); 53820 }); 53821 53822 self._request = $request; 53823 } 53824 53825 if (this.ajaxOptions.delay && params.term != null) { 53826 if (this._queryTimeout) { 53827 window.clearTimeout(this._queryTimeout); 53828 } 53829 53830 this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay); 53831 } else { 53832 request(); 53833 } 53834 }; 53835 53836 return AjaxAdapter; 53837}); 53838 53839S2.define('select2/data/tags',[ 53840 'jquery' 53841], function ($) { 53842 function Tags (decorated, $element, options) { 53843 var tags = options.get('tags'); 53844 53845 var createTag = options.get('createTag'); 53846 53847 if (createTag !== undefined) { 53848 this.createTag = createTag; 53849 } 53850 53851 var insertTag = options.get('insertTag'); 53852 53853 if (insertTag !== undefined) { 53854 this.insertTag = insertTag; 53855 } 53856 53857 decorated.call(this, $element, options); 53858 53859 if ($.isArray(tags)) { 53860 for (var t = 0; t < tags.length; t++) { 53861 var tag = tags[t]; 53862 var item = this._normalizeItem(tag); 53863 53864 var $option = this.option(item); 53865 53866 this.$element.append($option); 53867 } 53868 } 53869 } 53870 53871 Tags.prototype.query = function (decorated, params, callback) { 53872 var self = this; 53873 53874 this._removeOldTags(); 53875 53876 if (params.term == null || params.page != null) { 53877 decorated.call(this, params, callback); 53878 return; 53879 } 53880 53881 function wrapper (obj, child) { 53882 var data = obj.results; 53883 53884 for (var i = 0; i < data.length; i++) { 53885 var option = data[i]; 53886 53887 var checkChildren = ( 53888 option.children != null && 53889 !wrapper({ 53890 results: option.children 53891 }, true) 53892 ); 53893 53894 var checkText = option.text === params.term; 53895 53896 if (checkText || checkChildren) { 53897 if (child) { 53898 return false; 53899 } 53900 53901 obj.data = data; 53902 callback(obj); 53903 53904 return; 53905 } 53906 } 53907 53908 if (child) { 53909 return true; 53910 } 53911 53912 var tag = self.createTag(params); 53913 53914 if (tag != null) { 53915 var $option = self.option(tag); 53916 $option.attr('data-select2-tag', true); 53917 53918 self.addOptions([$option]); 53919 53920 self.insertTag(data, tag); 53921 } 53922 53923 obj.results = data; 53924 53925 callback(obj); 53926 } 53927 53928 decorated.call(this, params, wrapper); 53929 }; 53930 53931 Tags.prototype.createTag = function (decorated, params) { 53932 var term = $.trim(params.term); 53933 53934 if (term === '') { 53935 return null; 53936 } 53937 53938 return { 53939 id: term, 53940 text: term 53941 }; 53942 }; 53943 53944 Tags.prototype.insertTag = function (_, data, tag) { 53945 data.unshift(tag); 53946 }; 53947 53948 Tags.prototype._removeOldTags = function (_) { 53949 var tag = this._lastTag; 53950 53951 var $options = this.$element.find('option[data-select2-tag]'); 53952 53953 $options.each(function () { 53954 if (this.selected) { 53955 return; 53956 } 53957 53958 $(this).remove(); 53959 }); 53960 }; 53961 53962 return Tags; 53963}); 53964 53965S2.define('select2/data/tokenizer',[ 53966 'jquery' 53967], function ($) { 53968 function Tokenizer (decorated, $element, options) { 53969 var tokenizer = options.get('tokenizer'); 53970 53971 if (tokenizer !== undefined) { 53972 this.tokenizer = tokenizer; 53973 } 53974 53975 decorated.call(this, $element, options); 53976 } 53977 53978 Tokenizer.prototype.bind = function (decorated, container, $container) { 53979 decorated.call(this, container, $container); 53980 53981 this.$search = container.dropdown.$search || container.selection.$search || 53982 $container.find('.select2-search__field'); 53983 }; 53984 53985 Tokenizer.prototype.query = function (decorated, params, callback) { 53986 var self = this; 53987 53988 function createAndSelect (data) { 53989 // Normalize the data object so we can use it for checks 53990 var item = self._normalizeItem(data); 53991 53992 // Check if the data object already exists as a tag 53993 // Select it if it doesn't 53994 var $existingOptions = self.$element.find('option').filter(function () { 53995 return $(this).val() === item.id; 53996 }); 53997 53998 // If an existing option wasn't found for it, create the option 53999 if (!$existingOptions.length) { 54000 var $option = self.option(item); 54001 $option.attr('data-select2-tag', true); 54002 54003 self._removeOldTags(); 54004 self.addOptions([$option]); 54005 } 54006 54007 // Select the item, now that we know there is an option for it 54008 select(item); 54009 } 54010 54011 function select (data) { 54012 self.trigger('select', { 54013 data: data 54014 }); 54015 } 54016 54017 params.term = params.term || ''; 54018 54019 var tokenData = this.tokenizer(params, this.options, createAndSelect); 54020 54021 if (tokenData.term !== params.term) { 54022 // Replace the search term if we have the search box 54023 if (this.$search.length) { 54024 this.$search.val(tokenData.term); 54025 this.$search.focus(); 54026 } 54027 54028 params.term = tokenData.term; 54029 } 54030 54031 decorated.call(this, params, callback); 54032 }; 54033 54034 Tokenizer.prototype.tokenizer = function (_, params, options, callback) { 54035 var separators = options.get('tokenSeparators') || []; 54036 var term = params.term; 54037 var i = 0; 54038 54039 var createTag = this.createTag || function (params) { 54040 return { 54041 id: params.term, 54042 text: params.term 54043 }; 54044 }; 54045 54046 while (i < term.length) { 54047 var termChar = term[i]; 54048 54049 if ($.inArray(termChar, separators) === -1) { 54050 i++; 54051 54052 continue; 54053 } 54054 54055 var part = term.substr(0, i); 54056 var partParams = $.extend({}, params, { 54057 term: part 54058 }); 54059 54060 var data = createTag(partParams); 54061 54062 if (data == null) { 54063 i++; 54064 continue; 54065 } 54066 54067 callback(data); 54068 54069 // Reset the term to not include the tokenized portion 54070 term = term.substr(i + 1) || ''; 54071 i = 0; 54072 } 54073 54074 return { 54075 term: term 54076 }; 54077 }; 54078 54079 return Tokenizer; 54080}); 54081 54082S2.define('select2/data/minimumInputLength',[ 54083 54084], function () { 54085 function MinimumInputLength (decorated, $e, options) { 54086 this.minimumInputLength = options.get('minimumInputLength'); 54087 54088 decorated.call(this, $e, options); 54089 } 54090 54091 MinimumInputLength.prototype.query = function (decorated, params, callback) { 54092 params.term = params.term || ''; 54093 54094 if (params.term.length < this.minimumInputLength) { 54095 this.trigger('results:message', { 54096 message: 'inputTooShort', 54097 args: { 54098 minimum: this.minimumInputLength, 54099 input: params.term, 54100 params: params 54101 } 54102 }); 54103 54104 return; 54105 } 54106 54107 decorated.call(this, params, callback); 54108 }; 54109 54110 return MinimumInputLength; 54111}); 54112 54113S2.define('select2/data/maximumInputLength',[ 54114 54115], function () { 54116 function MaximumInputLength (decorated, $e, options) { 54117 this.maximumInputLength = options.get('maximumInputLength'); 54118 54119 decorated.call(this, $e, options); 54120 } 54121 54122 MaximumInputLength.prototype.query = function (decorated, params, callback) { 54123 params.term = params.term || ''; 54124 54125 if (this.maximumInputLength > 0 && 54126 params.term.length > this.maximumInputLength) { 54127 this.trigger('results:message', { 54128 message: 'inputTooLong', 54129 args: { 54130 maximum: this.maximumInputLength, 54131 input: params.term, 54132 params: params 54133 } 54134 }); 54135 54136 return; 54137 } 54138 54139 decorated.call(this, params, callback); 54140 }; 54141 54142 return MaximumInputLength; 54143}); 54144 54145S2.define('select2/data/maximumSelectionLength',[ 54146 54147], function (){ 54148 function MaximumSelectionLength (decorated, $e, options) { 54149 this.maximumSelectionLength = options.get('maximumSelectionLength'); 54150 54151 decorated.call(this, $e, options); 54152 } 54153 54154 MaximumSelectionLength.prototype.query = 54155 function (decorated, params, callback) { 54156 var self = this; 54157 54158 this.current(function (currentData) { 54159 var count = currentData != null ? currentData.length : 0; 54160 if (self.maximumSelectionLength > 0 && 54161 count >= self.maximumSelectionLength) { 54162 self.trigger('results:message', { 54163 message: 'maximumSelected', 54164 args: { 54165 maximum: self.maximumSelectionLength 54166 } 54167 }); 54168 return; 54169 } 54170 decorated.call(self, params, callback); 54171 }); 54172 }; 54173 54174 return MaximumSelectionLength; 54175}); 54176 54177S2.define('select2/dropdown',[ 54178 'jquery', 54179 './utils' 54180], function ($, Utils) { 54181 function Dropdown ($element, options) { 54182 this.$element = $element; 54183 this.options = options; 54184 54185 Dropdown.__super__.constructor.call(this); 54186 } 54187 54188 Utils.Extend(Dropdown, Utils.Observable); 54189 54190 Dropdown.prototype.render = function () { 54191 var $dropdown = $( 54192 '<span class="select2-dropdown">' + 54193 '<span class="select2-results"></span>' + 54194 '</span>' 54195 ); 54196 54197 $dropdown.attr('dir', this.options.get('dir')); 54198 54199 this.$dropdown = $dropdown; 54200 54201 return $dropdown; 54202 }; 54203 54204 Dropdown.prototype.bind = function () { 54205 // Should be implemented in subclasses 54206 }; 54207 54208 Dropdown.prototype.position = function ($dropdown, $container) { 54209 // Should be implmented in subclasses 54210 }; 54211 54212 Dropdown.prototype.destroy = function () { 54213 // Remove the dropdown from the DOM 54214 this.$dropdown.remove(); 54215 }; 54216 54217 return Dropdown; 54218}); 54219 54220S2.define('select2/dropdown/search',[ 54221 'jquery', 54222 '../utils' 54223], function ($, Utils) { 54224 function Search () { } 54225 54226 Search.prototype.render = function (decorated) { 54227 var $rendered = decorated.call(this); 54228 54229 var $search = $( 54230 '<span class="select2-search select2-search--dropdown">' + 54231 '<input class="select2-search__field" type="search" tabindex="-1"' + 54232 ' autocomplete="off" autocorrect="off" autocapitalize="off"' + 54233 ' spellcheck="false" role="textbox" />' + 54234 '</span>' 54235 ); 54236 54237 this.$searchContainer = $search; 54238 this.$search = $search.find('input'); 54239 54240 $rendered.prepend($search); 54241 54242 return $rendered; 54243 }; 54244 54245 Search.prototype.bind = function (decorated, container, $container) { 54246 var self = this; 54247 54248 decorated.call(this, container, $container); 54249 54250 this.$search.on('keydown', function (evt) { 54251 self.trigger('keypress', evt); 54252 54253 self._keyUpPrevented = evt.isDefaultPrevented(); 54254 }); 54255 54256 // Workaround for browsers which do not support the `input` event 54257 // This will prevent double-triggering of events for browsers which support 54258 // both the `keyup` and `input` events. 54259 this.$search.on('input', function (evt) { 54260 // Unbind the duplicated `keyup` event 54261 $(this).off('keyup'); 54262 }); 54263 54264 this.$search.on('keyup input', function (evt) { 54265 self.handleSearch(evt); 54266 }); 54267 54268 container.on('open', function () { 54269 self.$search.attr('tabindex', 0); 54270 54271 self.$search.focus(); 54272 54273 window.setTimeout(function () { 54274 self.$search.focus(); 54275 }, 0); 54276 }); 54277 54278 container.on('close', function () { 54279 self.$search.attr('tabindex', -1); 54280 54281 self.$search.val(''); 54282 }); 54283 54284 container.on('focus', function () { 54285 if (container.isOpen()) { 54286 self.$search.focus(); 54287 } 54288 }); 54289 54290 container.on('results:all', function (params) { 54291 if (params.query.term == null || params.query.term === '') { 54292 var showSearch = self.showSearch(params); 54293 54294 if (showSearch) { 54295 self.$searchContainer.removeClass('select2-search--hide'); 54296 } else { 54297 self.$searchContainer.addClass('select2-search--hide'); 54298 } 54299 } 54300 }); 54301 }; 54302 54303 Search.prototype.handleSearch = function (evt) { 54304 if (!this._keyUpPrevented) { 54305 var input = this.$search.val(); 54306 54307 this.trigger('query', { 54308 term: input 54309 }); 54310 } 54311 54312 this._keyUpPrevented = false; 54313 }; 54314 54315 Search.prototype.showSearch = function (_, params) { 54316 return true; 54317 }; 54318 54319 return Search; 54320}); 54321 54322S2.define('select2/dropdown/hidePlaceholder',[ 54323 54324], function () { 54325 function HidePlaceholder (decorated, $element, options, dataAdapter) { 54326 this.placeholder = this.normalizePlaceholder(options.get('placeholder')); 54327 54328 decorated.call(this, $element, options, dataAdapter); 54329 } 54330 54331 HidePlaceholder.prototype.append = function (decorated, data) { 54332 data.results = this.removePlaceholder(data.results); 54333 54334 decorated.call(this, data); 54335 }; 54336 54337 HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) { 54338 if (typeof placeholder === 'string') { 54339 placeholder = { 54340 id: '', 54341 text: placeholder 54342 }; 54343 } 54344 54345 return placeholder; 54346 }; 54347 54348 HidePlaceholder.prototype.removePlaceholder = function (_, data) { 54349 var modifiedData = data.slice(0); 54350 54351 for (var d = data.length - 1; d >= 0; d--) { 54352 var item = data[d]; 54353 54354 if (this.placeholder.id === item.id) { 54355 modifiedData.splice(d, 1); 54356 } 54357 } 54358 54359 return modifiedData; 54360 }; 54361 54362 return HidePlaceholder; 54363}); 54364 54365S2.define('select2/dropdown/infiniteScroll',[ 54366 'jquery' 54367], function ($) { 54368 function InfiniteScroll (decorated, $element, options, dataAdapter) { 54369 this.lastParams = {}; 54370 54371 decorated.call(this, $element, options, dataAdapter); 54372 54373 this.$loadingMore = this.createLoadingMore(); 54374 this.loading = false; 54375 } 54376 54377 InfiniteScroll.prototype.append = function (decorated, data) { 54378 this.$loadingMore.remove(); 54379 this.loading = false; 54380 54381 decorated.call(this, data); 54382 54383 if (this.showLoadingMore(data)) { 54384 this.$results.append(this.$loadingMore); 54385 } 54386 }; 54387 54388 InfiniteScroll.prototype.bind = function (decorated, container, $container) { 54389 var self = this; 54390 54391 decorated.call(this, container, $container); 54392 54393 container.on('query', function (params) { 54394 self.lastParams = params; 54395 self.loading = true; 54396 }); 54397 54398 container.on('query:append', function (params) { 54399 self.lastParams = params; 54400 self.loading = true; 54401 }); 54402 54403 this.$results.on('scroll', function () { 54404 var isLoadMoreVisible = $.contains( 54405 document.documentElement, 54406 self.$loadingMore[0] 54407 ); 54408 54409 if (self.loading || !isLoadMoreVisible) { 54410 return; 54411 } 54412 54413 var currentOffset = self.$results.offset().top + 54414 self.$results.outerHeight(false); 54415 var loadingMoreOffset = self.$loadingMore.offset().top + 54416 self.$loadingMore.outerHeight(false); 54417 54418 if (currentOffset + 50 >= loadingMoreOffset) { 54419 self.loadMore(); 54420 } 54421 }); 54422 }; 54423 54424 InfiniteScroll.prototype.loadMore = function () { 54425 this.loading = true; 54426 54427 var params = $.extend({}, {page: 1}, this.lastParams); 54428 54429 params.page++; 54430 54431 this.trigger('query:append', params); 54432 }; 54433 54434 InfiniteScroll.prototype.showLoadingMore = function (_, data) { 54435 return data.pagination && data.pagination.more; 54436 }; 54437 54438 InfiniteScroll.prototype.createLoadingMore = function () { 54439 var $option = $( 54440 '<li ' + 54441 'class="select2-results__option select2-results__option--load-more"' + 54442 'role="treeitem
vendor: 32,229 bytes, lines 54442-55688
54442" aria-disabled="true"></li>' 54443 ); 54444 54445 var message = this.options.get('translations').get('loadingMore'); 54446 54447 $option.html(message(this.lastParams)); 54448 54449 return $option; 54450 }; 54451 54452 return InfiniteScroll; 54453}); 54454 54455S2.define('select2/dropdown/attachBody',[ 54456 'jquery', 54457 '../utils' 54458], function ($, Utils) { 54459 function AttachBody (decorated, $element, options) { 54460 this.$dropdownParent = options.get('dropdownParent') || $(document.body); 54461 54462 decorated.call(this, $element, options); 54463 } 54464 54465 AttachBody.prototype.bind = function (decorated, container, $container) { 54466 var self = this; 54467 54468 var setupResultsEvents = false; 54469 54470 decorated.call(this, container, $container); 54471 54472 container.on('open', function () { 54473 self._showDropdown(); 54474 self._attachPositioningHandler(container); 54475 54476 if (!setupResultsEvents) { 54477 setupResultsEvents = true; 54478 54479 container.on('results:all', function () { 54480 self._positionDropdown(); 54481 self._resizeDropdown(); 54482 }); 54483 54484 container.on('results:append', function () { 54485 self._positionDropdown(); 54486 self._resizeDropdown(); 54487 }); 54488 } 54489 }); 54490 54491 container.on('close', function () { 54492 self._hideDropdown(); 54493 self._detachPositioningHandler(container); 54494 }); 54495 54496 this.$dropdownContainer.on('mousedown', function (evt) { 54497 evt.stopPropagation(); 54498 }); 54499 }; 54500 54501 AttachBody.prototype.destroy = function (decorated) { 54502 decorated.call(this); 54503 54504 this.$dropdownContainer.remove(); 54505 }; 54506 54507 AttachBody.prototype.position = function (decorated, $dropdown, $container) { 54508 // Clone all of the container classes 54509 $dropdown.attr('class', $container.attr('class')); 54510 54511 $dropdown.removeClass('select2'); 54512 $dropdown.addClass('select2-container--open'); 54513 54514 $dropdown.css({ 54515 position: 'absolute', 54516 top: -999999 54517 }); 54518 54519 this.$container = $container; 54520 }; 54521 54522 AttachBody.prototype.render = function (decorated) { 54523 var $container = $('<span></span>'); 54524 54525 var $dropdown = decorated.call(this); 54526 $container.append($dropdown); 54527 54528 this.$dropdownContainer = $container; 54529 54530 return $container; 54531 }; 54532 54533 AttachBody.prototype._hideDropdown = function (decorated) { 54534 this.$dropdownContainer.detach(); 54535 }; 54536 54537 AttachBody.prototype._attachPositioningHandler = 54538 function (decorated, container) { 54539 var self = this; 54540 54541 var scrollEvent = 'scroll.select2.' + container.id; 54542 var resizeEvent = 'resize.select2.' + container.id; 54543 var orientationEvent = 'orientationchange.select2.' + container.id; 54544 54545 var $watchers = this.$container.parents().filter(Utils.hasScroll); 54546 $watchers.each(function () { 54547 $(this).data('select2-scroll-position', { 54548 x: $(this).scrollLeft(), 54549 y: $(this).scrollTop() 54550 }); 54551 }); 54552 54553 $watchers.on(scrollEvent, function (ev) { 54554 var position = $(this).data('select2-scroll-position'); 54555 $(this).scrollTop(position.y); 54556 }); 54557 54558 $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, 54559 function (e) { 54560 self._positionDropdown(); 54561 self._resizeDropdown(); 54562 }); 54563 }; 54564 54565 AttachBody.prototype._detachPositioningHandler = 54566 function (decorated, container) { 54567 var scrollEvent = 'scroll.select2.' + container.id; 54568 var resizeEvent = 'resize.select2.' + container.id; 54569 var orientationEvent = 'orientationchange.select2.' + container.id; 54570 54571 var $watchers = this.$container.parents().filter(Utils.hasScroll); 54572 $watchers.off(scrollEvent); 54573 54574 $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent); 54575 }; 54576 54577 AttachBody.prototype._positionDropdown = function () { 54578 var $window = $(window); 54579 54580 var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above'); 54581 var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below'); 54582 54583 var newDirection = null; 54584 54585 var offset = this.$container.offset(); 54586 54587 offset.bottom = offset.top + this.$container.outerHeight(false); 54588 54589 var container = { 54590 height: this.$container.outerHeight(false) 54591 }; 54592 54593 container.top = offset.top; 54594 container.bottom = offset.top + container.height; 54595 54596 var dropdown = { 54597 height: this.$dropdown.outerHeight(false) 54598 }; 54599 54600 var viewport = { 54601 top: $window.scrollTop(), 54602 bottom: $window.scrollTop() + $window.height() 54603 }; 54604 54605 var enoughRoomAbove = viewport.top < (offset.top - dropdown.height); 54606 var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height); 54607 54608 var css = { 54609 left: offset.left, 54610 top: container.bottom 54611 }; 54612 54613 // Determine what the parent element is to use for calciulating the offset 54614 var $offsetParent = this.$dropdownParent; 54615 54616 // For statically positoned elements, we need to get the element 54617 // that is determining the offset 54618 if ($offsetParent.css('position') === 'static') { 54619 $offsetParent = $offsetParent.offsetParent(); 54620 } 54621 54622 var parentOffset = $offsetParent.offset(); 54623 54624 css.top -= parentOffset.top; 54625 css.left -= parentOffset.left; 54626 54627 if (!isCurrentlyAbove && !isCurrentlyBelow) { 54628 newDirection = 'below'; 54629 } 54630 54631 if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) { 54632 newDirection = 'above'; 54633 } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) { 54634 newDirection = 'below'; 54635 } 54636 54637 if (newDirection == 'above' || 54638 (isCurrentlyAbove && newDirection !== 'below')) { 54639 css.top = container.top - parentOffset.top - dropdown.height; 54640 } 54641 54642 if (newDirection != null) { 54643 this.$dropdown 54644 .removeClass('select2-dropdown--below select2-dropdown--above') 54645 .addClass('select2-dropdown--' + newDirection); 54646 this.$container 54647 .removeClass('select2-container--below select2-container--above') 54648 .addClass('select2-container--' + newDirection); 54649 } 54650 54651 this.$dropdownContainer.css(css); 54652 }; 54653 54654 AttachBody.prototype._resizeDropdown = function () { 54655 var css = { 54656 width: this.$container.outerWidth(false) + 'px' 54657 }; 54658 54659 if (this.options.get('dropdownAutoWidth')) { 54660 css.minWidth = css.width; 54661 css.position = 'relative'; 54662 css.width = 'auto'; 54663 } 54664 54665 this.$dropdown.css(css); 54666 }; 54667 54668 AttachBody.prototype._showDropdown = function (decorated) { 54669 this.$dropdownContainer.appendTo(this.$dropdownParent); 54670 54671 this._positionDropdown(); 54672 this._resizeDropdown(); 54673 }; 54674 54675 return AttachBody; 54676}); 54677 54678S2.define('select2/dropdown/minimumResultsForSearch',[ 54679 54680], function () { 54681 function countResults (data) { 54682 var count = 0; 54683 54684 for (var d = 0; d < data.length; d++) { 54685 var item = data[d]; 54686 54687 if (item.children) { 54688 count += countResults(item.children); 54689 } else { 54690 count++; 54691 } 54692 } 54693 54694 return count; 54695 } 54696 54697 function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { 54698 this.minimumResultsForSearch = options.get('minimumResultsForSearch'); 54699 54700 if (this.minimumResultsForSearch < 0) { 54701 this.minimumResultsForSearch = Infinity; 54702 } 54703 54704 decorated.call(this, $element, options, dataAdapter); 54705 } 54706 54707 MinimumResultsForSearch.prototype.showSearch = function (decorated, params) { 54708 if (countResults(params.data.results) < this.minimumResultsForSearch) { 54709 return false; 54710 } 54711 54712 return decorated.call(this, params); 54713 }; 54714 54715 return MinimumResultsForSearch; 54716}); 54717 54718S2.define('select2/dropdown/selectOnClose',[ 54719 54720], function () { 54721 function SelectOnClose () { } 54722 54723 SelectOnClose.prototype.bind = function (decorated, container, $container) { 54724 var self = this; 54725 54726 decorated.call(this, container, $container); 54727 54728 container.on('close', function (params) { 54729 self._handleSelectOnClose(params); 54730 }); 54731 }; 54732 54733 SelectOnClose.prototype._handleSelectOnClose = function (_, params) { 54734 if (params && params.originalSelect2Event != null) { 54735 var event = params.originalSelect2Event; 54736 54737 // Don't select an item if the close event was triggered from a select or 54738 // unselect event 54739 if (event._type === 'select' || event._type === 'unselect') { 54740 return; 54741 } 54742 } 54743 54744 var $highlightedResults = this.getHighlightedResults(); 54745 54746 // Only select highlighted results 54747 if ($highlightedResults.length < 1) { 54748 return; 54749 } 54750 54751 var data = $highlightedResults.data('data'); 54752 54753 // Don't re-select already selected resulte 54754 if ( 54755 (data.element != null && data.element.selected) || 54756 (data.element == null && data.selected) 54757 ) { 54758 return; 54759 } 54760 54761 this.trigger('select', { 54762 data: data 54763 }); 54764 }; 54765 54766 return SelectOnClose; 54767}); 54768 54769S2.define('select2/dropdown/closeOnSelect',[ 54770 54771], function () { 54772 function CloseOnSelect () { } 54773 54774 CloseOnSelect.prototype.bind = function (decorated, container, $container) { 54775 var self = this; 54776 54777 decorated.call(this, container, $container); 54778 54779 container.on('select', function (evt) { 54780 self._selectTriggered(evt); 54781 }); 54782 54783 container.on('unselect', function (evt) { 54784 self._selectTriggered(evt); 54785 }); 54786 }; 54787 54788 CloseOnSelect.prototype._selectTriggered = function (_, evt) { 54789 var originalEvent = evt.originalEvent; 54790 54791 // Don't close if the control key is being held 54792 if (originalEvent && originalEvent.ctrlKey) { 54793 return; 54794 } 54795 54796 this.trigger('close', { 54797 originalEvent: originalEvent, 54798 originalSelect2Event: evt 54799 }); 54800 }; 54801 54802 return CloseOnSelect; 54803}); 54804 54805S2.define('select2/i18n/en',[],function () { 54806 // English 54807 return { 54808 errorLoading: function () { 54809 return 'The results could not be loaded.'; 54810 }, 54811 inputTooLong: function (args) { 54812 var overChars = args.input.length - args.maximum; 54813 54814 var message = 'Please delete ' + overChars + ' character'; 54815 54816 if (overChars != 1) { 54817 message += 's'; 54818 } 54819 54820 return message; 54821 }, 54822 inputTooShort: function (args) { 54823 var remainingChars = args.minimum - args.input.length; 54824 54825 var message = 'Please enter ' + remainingChars + ' or more characters'; 54826 54827 return message; 54828 }, 54829 loadingMore: function () { 54830 return 'Loading more resultsâ¦'; 54831 }, 54832 maximumSelected: function (args) { 54833 var message = 'You can only select ' + args.maximum + ' item'; 54834 54835 if (args.maximum != 1) { 54836 message += 's'; 54837 } 54838 54839 return message; 54840 }, 54841 noResults: function () { 54842 return 'No results found'; 54843 }, 54844 searching: function () { 54845 return 'Searchingâ¦'; 54846 } 54847 }; 54848}); 54849 54850S2.define('select2/defaults',[ 54851 'jquery', 54852 'require', 54853 54854 './results', 54855 54856 './selection/single', 54857 './selection/multiple', 54858 './selection/placeholder', 54859 './selection/allowClear', 54860 './selection/search', 54861 './selection/eventRelay', 54862 54863 './utils', 54864 './translation', 54865 './diacritics', 54866 54867 './data/select', 54868 './data/array', 54869 './data/ajax', 54870 './data/tags', 54871 './data/tokenizer', 54872 './data/minimumInputLength', 54873 './data/maximumInputLength', 54874 './data/maximumSelectionLength', 54875 54876 './dropdown', 54877 './dropdown/search', 54878 './dropdown/hidePlaceholder', 54879 './dropdown/infiniteScroll', 54880 './dropdown/attachBody', 54881 './dropdown/minimumResultsForSearch', 54882 './dropdown/selectOnClose', 54883 './dropdown/closeOnSelect', 54884 54885 './i18n/en' 54886], function ($, require, 54887 54888 ResultsList, 54889 54890 SingleSelection, MultipleSelection, Placeholder, AllowClear, 54891 SelectionSearch, EventRelay, 54892 54893 Utils, Translation, DIACRITICS, 54894 54895 SelectData, ArrayData, AjaxData, Tags, Tokenizer, 54896 MinimumInputLength, MaximumInputLength, MaximumSelectionLength, 54897 54898 Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, 54899 AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, 54900 54901 EnglishTranslation) { 54902 function Defaults () { 54903 this.reset(); 54904 } 54905 54906 Defaults.prototype.apply = function (options) { 54907 options = $.extend(true, {}, this.defaults, options); 54908 54909 if (options.dataAdapter == null) { 54910 if (options.ajax != null) { 54911 options.dataAdapter = AjaxData; 54912 } else if (options.data != null) { 54913 options.dataAdapter = ArrayData; 54914 } else { 54915 options.dataAdapter = SelectData; 54916 } 54917 54918 if (options.minimumInputLength > 0) { 54919 options.dataAdapter = Utils.Decorate( 54920 options.dataAdapter, 54921 MinimumInputLength 54922 ); 54923 } 54924 54925 if (options.maximumInputLength > 0) { 54926 options.dataAdapter = Utils.Decorate( 54927 options.dataAdapter, 54928 MaximumInputLength 54929 ); 54930 } 54931 54932 if (options.maximumSelectionLength > 0) { 54933 options.dataAdapter = Utils.Decorate( 54934 options.dataAdapter, 54935 MaximumSelectionLength 54936 ); 54937 } 54938 54939 if (options.tags) { 54940 options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags); 54941 } 54942 54943 if (options.tokenSeparators != null || options.tokenizer != null) { 54944 options.dataAdapter = Utils.Decorate( 54945 options.dataAdapter, 54946 Tokenizer 54947 ); 54948 } 54949 54950 if (options.query != null) { 54951 var Query = require(options.amdBase + 'compat/query'); 54952 54953 options.dataAdapter = Utils.Decorate( 54954 options.dataAdapter, 54955 Query 54956 ); 54957 } 54958 54959 if (options.initSelection != null) { 54960 var InitSelection = require(options.amdBase + 'compat/initSelection'); 54961 54962 options.dataAdapter = Utils.Decorate( 54963 options.dataAdapter, 54964 InitSelection 54965 ); 54966 } 54967 } 54968 54969 if (options.resultsAdapter == null) { 54970 options.resultsAdapter = ResultsList; 54971 54972 if (options.ajax != null) { 54973 options.resultsAdapter = Utils.Decorate( 54974 options.resultsAdapter, 54975 InfiniteScroll 54976 ); 54977 } 54978 54979 if (options.placeholder != null) { 54980 options.resultsAdapter = Utils.Decorate( 54981 options.resultsAdapter, 54982 HidePlaceholder 54983 ); 54984 } 54985 54986 if (options.selectOnClose) { 54987 options.resultsAdapter = Utils.Decorate( 54988 options.resultsAdapter, 54989 SelectOnClose 54990 ); 54991 } 54992 } 54993 54994 if (options.dropdownAdapter == null) { 54995 if (options.multiple) { 54996 options.dropdownAdapter = Dropdown; 54997 } else { 54998 var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch); 54999 55000 options.dropdownAdapter = SearchableDropdown; 55001 } 55002 55003 if (options.minimumResultsForSearch !== 0) { 55004 options.dropdownAdapter = Utils.Decorate( 55005 options.dropdownAdapter, 55006 MinimumResultsForSearch 55007 ); 55008 } 55009 55010 if (options.closeOnSelect) { 55011 options.dropdownAdapter = Utils.Decorate( 55012 options.dropdownAdapter, 55013 CloseOnSelect 55014 ); 55015 } 55016 55017 if ( 55018 options.dropdownCssClass != null || 55019 options.dropdownCss != null || 55020 options.adaptDropdownCssClass != null 55021 ) { 55022 var DropdownCSS = require(options.amdBase + 'compat/dropdownCss'); 55023 55024 options.dropdownAdapter = Utils.Decorate( 55025 options.dropdownAdapter, 55026 DropdownCSS 55027 ); 55028 } 55029 55030 options.dropdownAdapter = Utils.Decorate( 55031 options.dropdownAdapter, 55032 AttachBody 55033 ); 55034 } 55035 55036 if (options.selectionAdapter == null) { 55037 if (options.multiple) { 55038 options.selectionAdapter = MultipleSelection; 55039 } else { 55040 options.selectionAdapter = SingleSelection; 55041 } 55042 55043 // Add the placeholder mixin if a placeholder was specified 55044 if (options.placeholder != null) { 55045 options.selectionAdapter = Utils.Decorate( 55046 options.selectionAdapter, 55047 Placeholder 55048 ); 55049 } 55050 55051 if (options.allowClear) { 55052 options.selectionAdapter = Utils.Decorate( 55053 options.selectionAdapter, 55054 AllowClear 55055 ); 55056 } 55057 55058 if (options.multiple) { 55059 options.selectionAdapter = Utils.Decorate( 55060 options.selectionAdapter, 55061 SelectionSearch 55062 ); 55063 } 55064 55065 if ( 55066 options.containerCssClass != null || 55067 options.containerCss != null || 55068 options.adaptContainerCssClass != null 55069 ) { 55070 var ContainerCSS = require(options.amdBase + 'compat/containerCss'); 55071 55072 options.selectionAdapter = Utils.Decorate( 55073 options.selectionAdapter, 55074 ContainerCSS 55075 ); 55076 } 55077 55078 options.selectionAdapter = Utils.Decorate( 55079 options.selectionAdapter, 55080 EventRelay 55081 ); 55082 } 55083 55084 if (typeof options.language === 'string') { 55085 // Check if the language is specified with a region 55086 if (options.language.indexOf('-') > 0) { 55087 // Extract the region information if it is included 55088 var languageParts = options.language.split('-'); 55089 var baseLanguage = languageParts[0]; 55090 55091 options.language = [options.language, baseLanguage]; 55092 } else { 55093 options.language = [options.language]; 55094 } 55095 } 55096 55097 if ($.isArray(options.language)) { 55098 var languages = new Translation(); 55099 options.language.push('en'); 55100 55101 var languageNames = options.language; 55102 55103 for (var l = 0; l < languageNames.length; l++) { 55104 var name = languageNames[l]; 55105 var language = {}; 55106 55107 try { 55108 // Try to load it with the original name 55109 language = Translation.loadPath(name); 55110 } catch (e) { 55111 try { 55112 // If we couldn't load it, check if it wasn't the full path 55113 name = this.defaults.amdLanguageBase + name; 55114 language = Translation.loadPath(name); 55115 } catch (ex) { 55116 // The translation could not be loaded at all. Sometimes this is 55117 // because of a configuration problem, other times this can be 55118 // because of how Select2 helps load all possible translation files. 55119 if (options.debug && window.console && console.warn) { 55120 console.warn( 55121 'Select2: The language file for "' + name + '" could not be ' + 55122 'automatically loaded. A fallback will be used instead.' 55123 ); 55124 } 55125 55126 continue; 55127 } 55128 } 55129 55130 languages.extend(language); 55131 } 55132 55133 options.translations = languages; 55134 } else { 55135 var baseTranslation = Translation.loadPath( 55136 this.defaults.amdLanguageBase + 'en' 55137 ); 55138 var customTranslation = new Translation(options.language); 55139 55140 customTranslation.extend(baseTranslation); 55141 55142 options.translations = customTranslation; 55143 } 55144 55145 return options; 55146 }; 55147 55148 Defaults.prototype.reset = function () { 55149 function stripDiacritics (text) { 55150 // Used 'uni range + named function' from http://jsperf.com/diacritics/18 55151 function match(a) { 55152 return DIACRITICS[a] || a; 55153 } 55154 55155 return text.replace(/[^\u0000-\u007E]/g, match); 55156 } 55157 55158 function matcher (params, data) { 55159 // Always return the object if there is nothing to compare 55160 if ($.trim(params.term) === '') { 55161 return data; 55162 } 55163 55164 // Do a recursive check for options with children 55165 if (data.children && data.children.length > 0) { 55166 // Clone the data object if there are children 55167 // This is required as we modify the object to remove any non-matches 55168 var match = $.extend(true, {}, data); 55169 55170 // Check each child of the option 55171 for (var c = data.children.length - 1; c >= 0; c--) { 55172 var child = data.children[c]; 55173 55174 var matches = matcher(params, child); 55175 55176 // If there wasn't a match, remove the object in the array 55177 if (matches == null) { 55178 match.children.splice(c, 1); 55179 } 55180 } 55181 55182 // If any children matched, return the new object 55183 if (match.children.length > 0) { 55184 return match; 55185 } 55186 55187 // If there were no matching children, check just the plain object 55188 return matcher(params, match); 55189 } 55190 55191 var original = stripDiacritics(data.text).toUpperCase(); 55192 var term = stripDiacritics(params.term).toUpperCase(); 55193 55194 // Check if the text contains the term 55195 if (original.indexOf(term) > -1) { 55196 return data; 55197 } 55198 55199 // If it doesn't contain the term, don't return anything 55200 return null; 55201 } 55202 55203 this.defaults = { 55204 amdBase: './', 55205 amdLanguageBase: './i18n/', 55206 closeOnSelect: true, 55207 debug: false, 55208 dropdownAutoWidth: false, 55209 escapeMarkup: Utils.escapeMarkup, 55210 language: EnglishTranslation, 55211 matcher: matcher, 55212 minimumInputLength: 0, 55213 maximumInputLength: 0, 55214 maximumSelectionLength: 0, 55215 minimumResultsForSearch: 0, 55216 selectOnClose: false, 55217 sorter: function (data) { 55218 return data; 55219 }, 55220 templateResult: function (result) { 55221 return result.text; 55222 }, 55223 templateSelection: function (selection) { 55224 return selection.text; 55225 }, 55226 theme: 'default', 55227 width: 'resolve' 55228 }; 55229 }; 55230 55231 Defaults.prototype.set = function (key, value) { 55232 var camelKey = $.camelCase(key); 55233 55234 var data = {}; 55235 data[camelKey] = value; 55236 55237 var convertedData = Utils._convertData(data); 55238 55239 $.extend(this.defaults, convertedData); 55240 }; 55241 55242 var defaults = new Defaults(); 55243 55244 return defaults; 55245}); 55246 55247S2.define('select2/options',[ 55248 'require', 55249 'jquery', 55250 './defaults', 55251 './utils' 55252], function (require, $, Defaults, Utils) { 55253 function Options (options, $element) { 55254 this.options = options; 55255 55256 if ($element != null) { 55257 this.fromElement($element); 55258 } 55259 55260 this.options = Defaults.apply(this.options); 55261 55262 if ($element && $element.is('input')) { 55263 var InputCompat = require(this.get('amdBase') + 'compat/inputData'); 55264 55265 this.options.dataAdapter = Utils.Decorate( 55266 this.options.dataAdapter, 55267 InputCompat 55268 ); 55269 } 55270 } 55271 55272 Options.prototype.fromElement = function ($e) { 55273 var excludedData = ['select2']; 55274 55275 if (this.options.multiple == null) { 55276 this.options.multiple = $e.prop('multiple'); 55277 } 55278 55279 if (this.options.disabled == null) { 55280 this.options.disabled = $e.prop('disabled'); 55281 } 55282 55283 if (this.options.language == null) { 55284 if ($e.prop('lang')) { 55285 this.options.language = $e.prop('lang').toLowerCase(); 55286 } else if ($e.closest('[lang]').prop('lang')) { 55287 this.options.language = $e.closest('[lang]').prop('lang'); 55288 } 55289 } 55290 55291 if (this.options.dir == null) { 55292 if ($e.prop('dir')) { 55293 this.options.dir = $e.prop('dir'); 55294 } else if ($e.closest('[dir]').prop('dir')) { 55295 this.options.dir = $e.closest('[dir]').prop('dir'); 55296 } else { 55297 this.options.dir = 'ltr'; 55298 } 55299 } 55300 55301 $e.prop('disabled', this.options.disabled); 55302 $e.prop('multiple', this.options.multiple); 55303 55304 if ($e.data('select2Tags')) { 55305 if (this.options.debug && window.console && console.warn) { 55306 console.warn( 55307 'Select2: The `data-select2-tags` attribute has been changed to ' + 55308 'use the `data-data` and `data-tags="true"` attributes and will be ' + 55309 'removed in future versions of Select2.' 55310 ); 55311 } 55312 55313 $e.data('data', $e.data('select2Tags')); 55314 $e.data('tags', true); 55315 } 55316 55317 if ($e.data('ajaxUrl')) { 55318 if (this.options.debug && window.console && console.warn) { 55319 console.warn( 55320 'Select2: The `data-ajax-url` attribute has been changed to ' + 55321 '`data-ajax--url` and support for the old attribute will be removed' + 55322 ' in future versions of Select2.' 55323 ); 55324 } 55325 55326 $e.attr('ajax--url', $e.data('ajaxUrl')); 55327 $e.data('ajax--url', $e.data('ajaxUrl')); 55328 } 55329 55330 var dataset = {}; 55331 55332 // Prefer the element's `dataset` attribute if it exists 55333 // jQuery 1.x does not correctly handle data attributes with multiple dashes 55334 if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { 55335 dataset = $.extend(true, {}, $e[0].dataset, $e.data()); 55336 } else { 55337 dataset = $e.data(); 55338 } 55339 55340 var data = $.extend(true, {}, dataset); 55341 55342 data = Utils._convertData(data); 55343 55344 for (var key in data) { 55345 if ($.inArray(key, excludedData) > -1) { 55346 continue; 55347 } 55348 55349 if ($.isPlainObject(this.options[key])) { 55350 $.extend(this.options[key], data[key]); 55351 } else { 55352 this.options[key] = data[key]; 55353 } 55354 } 55355 55356 return this; 55357 }; 55358 55359 Options.prototype.get = function (key) { 55360 return this.options[key]; 55361 }; 55362 55363 Options.prototype.set = function (key, val) { 55364 this.options[key] = val; 55365 }; 55366 55367 return Options; 55368}); 55369 55370S2.define('select2/core',[ 55371 'jquery', 55372 './options', 55373 './utils', 55374 './keys' 55375], function ($, Options, Utils, KEYS) { 55376 var Select2 = function ($element, options) { 55377 if ($element.data('select2') != null) { 55378 $element.data('select2').destroy(); 55379 } 55380 55381 this.$element = $element; 55382 55383 this.id = this._generateId($element); 55384 55385 options = options || {}; 55386 55387 this.options = new Options(options, $element); 55388 55389 Select2.__super__.constructor.call(this); 55390 55391 // Set up the tabindex 55392 55393 var tabindex = $element.attr('tabindex') || 0; 55394 $element.data('old-tabindex', tabindex); 55395 $element.attr('tabindex', '-1'); 55396 55397 // Set up containers and adapters 55398 55399 var DataAdapter = this.options.get('dataAdapter'); 55400 this.dataAdapter = new DataAdapter($element, this.options); 55401 55402 var $container = this.render(); 55403 55404 this._placeContainer($container); 55405 55406 var SelectionAdapter = this.options.get('selectionAdapter'); 55407 this.selection = new SelectionAdapter($element, this.options); 55408 this.$selection = this.selection.render(); 55409 55410 this.selection.position(this.$selection, $container); 55411 55412 var DropdownAdapter = this.options.get('dropdownAdapter'); 55413 this.dropdown = new DropdownAdapter($element, this.options); 55414 this.$dropdown = this.dropdown.render(); 55415 55416 this.dropdown.position(this.$dropdown, $container); 55417 55418 var ResultsAdapter = this.options.get('resultsAdapter'); 55419 this.results = new ResultsAdapter($element, this.options, this.dataAdapter); 55420 this.$results = this.results.render(); 55421 55422 this.results.position(this.$results, this.$dropdown); 55423 55424 // Bind events 55425 55426 var self = this; 55427 55428 // Bind the container to all of the adapters 55429 this._bindAdapters(); 55430 55431 // Register any DOM event handlers 55432 this._registerDomEvents(); 55433 55434 // Register any internal event handlers 55435 this._registerDataEvents(); 55436 this._registerSelectionEvents(); 55437 this._registerDropdownEvents(); 55438 this._registerResultsEvents(); 55439 this._registerEvents(); 55440 55441 // Set the initial state 55442 this.dataAdapter.current(function (initialData) { 55443 self.trigger('selection:update', { 55444 data: initialData 55445 }); 55446 }); 55447 55448 // Hide the original select 55449 $element.addClass('select2-hidden-accessible'); 55450 $element.attr('aria-hidden', 'true'); 55451 55452 // Synchronize any monitored attributes 55453 this._syncAttributes(); 55454 55455 $element.data('select2', this); 55456 }; 55457 55458 Utils.Extend(Select2, Utils.Observable); 55459 55460 Select2.prototype._generateId = function ($element) { 55461 var id = ''; 55462 55463 if ($element.attr('id') != null) { 55464 id = $element.attr('id'); 55465 } else if ($element.attr('name') != null) { 55466 id = $element.attr('name') + '-' + Utils.generateChars(2); 55467 } else { 55468 id = Utils.generateChars(4); 55469 } 55470 55471 id = id.replace(/(:|\.|\[|\]|,)/g, ''); 55472 id = 'select2-' + id; 55473 55474 return id; 55475 }; 55476 55477 Select2.prototype._placeContainer = function ($container) { 55478 $container.insertAfter(this.$element); 55479 55480 var width = this._resolveWidth(this.$element, this.options.get('width')); 55481 55482 if (width != null) { 55483 $container.css('width', width); 55484 } 55485 }; 55486 55487 Select2.prototype._resolveWidth = function ($element, method) { 55488 var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; 55489 55490 if (method == 'resolve') { 55491 var styleWidth = this._resolveWidth($element, 'style'); 55492 55493 if (styleWidth != null) { 55494 return styleWidth; 55495 } 55496 55497 return this._resolveWidth($element, 'element'); 55498 } 55499 55500 if (method == 'element') { 55501 var elementWidth = $element.outerWidth(false); 55502 55503 if (elementWidth <= 0) { 55504 return 'auto'; 55505 } 55506 55507 return elementWidth + 'px'; 55508 } 55509 55510 if (method == 'style') { 55511 var style = $element.attr('style'); 55512 55513 if (typeof(style) !== 'string') { 55514 return null; 55515 } 55516 55517 var attrs = style.split(';'); 55518 55519 for (var i = 0, l = attrs.length; i < l; i = i + 1) { 55520 var attr = attrs[i].replace(/\s/g, ''); 55521 var matches = attr.match(WIDTH); 55522 55523 if (matches !== null && matches.length >= 1) { 55524 return matches[1]; 55525 } 55526 } 55527 55528 return null; 55529 } 55530 55531 return method; 55532 }; 55533 55534 Select2.prototype._bindAdapters = function () { 55535 this.dataAdapter.bind(this, this.$container); 55536 this.selection.bind(this, this.$container); 55537 55538 this.dropdown.bind(this, this.$container); 55539 this.results.bind(this, this.$container); 55540 }; 55541 55542 Select2.prototype._registerDomEvents = function () { 55543 var self = this; 55544 55545 this.$element.on('change.select2', function () { 55546 self.dataAdapter.current(function (data) { 55547 self.trigger('selection:update', { 55548 data: data 55549 }); 55550 }); 55551 }); 55552 55553 this.$element.on('focus.select2', function (evt) { 55554 self.trigger('focus', evt); 55555 }); 55556 55557 this._syncA = Utils.bind(this._syncAttributes, this); 55558 this._syncS = Utils.bind(this._syncSubtree, this); 55559 55560 if (this.$element[0].attachEvent) { 55561 this.$element[0].attachEvent('onpropertychange', this._syncA); 55562 } 55563 55564 var observer = window.MutationObserver || 55565 window.WebKitMutationObserver || 55566 window.MozMutationObserver 55567 ; 55568 55569 if (observer != null) { 55570 this._observer = new observer(function (mutations) { 55571 $.each(mutations, self._syncA); 55572 $.each(mutations, self._syncS); 55573 }); 55574 this._observer.observe(this.$element[0], { 55575 attributes: true, 55576 childList: true, 55577 subtree: false 55578 }); 55579 } else if (this.$element[0].addEventListener) { 55580 this.$element[0].addEventListener( 55581 'DOMAttrModified', 55582 self._syncA, 55583 false 55584 ); 55585 this.$element[0].addEventListener( 55586 'DOMNodeInserted', 55587 self._syncS, 55588 false 55589 ); 55590 this.$element[0].addEventListener( 55591 'DOMNodeRemoved', 55592 self._syncS, 55593 false 55594 ); 55595 } 55596 }; 55597 55598 Select2.prototype._registerDataEvents = function () { 55599 var self = this; 55600 55601 this.dataAdapter.on('*', function (name, params) { 55602 self.trigger(name, params); 55603 }); 55604 }; 55605 55606 Select2.prototype._registerSelectionEvents = function () { 55607 var self = this; 55608 var nonRelayEvents = ['toggle', 'focus']; 55609 55610 this.selection.on('toggle', function () { 55611 self.toggleDropdown(); 55612 }); 55613 55614 this.selection.on('focus', function (params) { 55615 self.focus(params); 55616 }); 55617 55618 this.selection.on('*', function (name, params) { 55619 if ($.inArray(name, nonRelayEvents) !== -1) { 55620 return; 55621 } 55622 55623 self.trigger(name, params); 55624 }); 55625 }; 55626 55627 Select2.prototype._registerDropdownEvents = function () { 55628 var self = this; 55629 55630 this.dropdown.on('*', function (name, params) { 55631 self.trigger(name, params); 55632 }); 55633 }; 55634 55635 Select2.prototype._registerResultsEvents = function () { 55636 var self = this; 55637 55638 this.results.on('*', function (name, params) { 55639 self.trigger(name, params); 55640 }); 55641 }; 55642 55643 Select2.prototype._registerEvents = function () { 55644 var self = this; 55645 55646 this.on('open', function () { 55647 self.$container.addClass('select2-container--open'); 55648 }); 55649 55650 this.on('close', function () { 55651 self.$container.removeClass('select2-container--open'); 55652 }); 55653 55654 this.on('enable', function () { 55655 self.$container.removeClass('select2-container--disabled'); 55656 }); 55657 55658 this.on('disable', function () { 55659 self.$container.addClass('select2-container--disabled'); 55660 }); 55661 55662 this.on('blur', function () { 55663 self.$container.removeClass('select2-container--focus'); 55664 }); 55665 55666 this.on('query', function (params) { 55667 if (!self.isOpen()) { 55668 self.trigger('open', {}); 55669 } 55670 55671 this.dataAdapter.query(params, function (data) { 55672 self.trigger('results:all', { 55673 data: data, 55674 query: params 55675 }); 55676 }); 55677 }); 55678 55679 this.on('query:append', function (params) { 55680 this.dataAdapter.query(params, function (data) { 55681 self.trigger('results:append', { 55682 data: data, 55683 query: params 55684 }); 55685 }); 55686 }); 55687 55688 this.on('
vendor: 943 bytes, lines 55688-55722
55688keypress', function (evt) { 55689 var key = evt.which; 55690 55691 if (self.isOpen()) { 55692 if (key === KEYS.ESC || key === KEYS.TAB || 55693 (key === KEYS.UP && evt.altKey)) { 55694 self.close(); 55695 55696 evt.preventDefault(); 55697 } else if (key === KEYS.ENTER) { 55698 self.trigger('results:select', {}); 55699 55700 evt.preventDefault(); 55701 } else if ((key === KEYS.SPACE && evt.ctrlKey)) { 55702 self.trigger('results:toggle', {}); 55703 55704 evt.preventDefault(); 55705 } else if (key === KEYS.UP) { 55706 self.trigger('results:previous', {}); 55707 55708 evt.preventDefault(); 55709 } else if (key === KEYS.DOWN) { 55710 self.trigger('results:next', {}); 55711 55712 evt.preventDefault(); 55713 } 55714 } else { 55715 if (key === KEYS.ENTER || key === KEYS.SPACE || 55716 (key === KEYS.DOWN && evt.altKey)) { 55717 self.open(); 55718 55719 evt.preventDefault(); 55720 } 55721 } 55722 });
vendor: 26,715 bytes, lines 55722-56708
55722 55723 }; 55724 55725 Select2.prototype._syncAttributes = function () { 55726 this.options.set('disabled', this.$element.prop('disabled')); 55727 55728 if (this.options.get('disabled')) { 55729 if (this.isOpen()) { 55730 this.close(); 55731 } 55732 55733 this.trigger('disable', {}); 55734 } else { 55735 this.trigger('enable', {}); 55736 } 55737 }; 55738 55739 Select2.prototype._syncSubtree = function (evt, mutations) { 55740 var changed = false; 55741 var self = this; 55742 55743 // Ignore any mutation events raised for elements that aren't options or 55744 // optgroups. This handles the case when the select element is destroyed 55745 if ( 55746 evt && evt.target && ( 55747 evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' 55748 ) 55749 ) { 55750 return; 55751 } 55752 55753 if (!mutations) { 55754 // If mutation events aren't supported, then we can only assume that the 55755 // change affected the selections 55756 changed = true; 55757 } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { 55758 for (var n = 0; n < mutations.addedNodes.length; n++) { 55759 var node = mutations.addedNodes[n]; 55760 55761 if (node.selected) { 55762 changed = true; 55763 } 55764 } 55765 } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { 55766 changed = true; 55767 } 55768 55769 // Only re-pull the data if we think there is a change 55770 if (changed) { 55771 this.dataAdapter.current(function (currentData) { 55772 self.trigger('selection:update', { 55773 data: currentData 55774 }); 55775 }); 55776 } 55777 }; 55778 55779 /** 55780 * Override the trigger method to automatically trigger pre-events when 55781 * there are events that can be prevented. 55782 */ 55783 Select2.prototype.trigger = function (name, args) { 55784 var actualTrigger = Select2.__super__.trigger; 55785 var preTriggerMap = { 55786 'open': 'opening', 55787 'close': 'closing', 55788 'select': 'selecting', 55789 'unselect': 'unselecting' 55790 }; 55791 55792 if (args === undefined) { 55793 args = {}; 55794 } 55795 55796 if (name in preTriggerMap) { 55797 var preTriggerName = preTriggerMap[name]; 55798 var preTriggerArgs = { 55799 prevented: false, 55800 name: name, 55801 args: args 55802 }; 55803 55804 actualTrigger.call(this, preTriggerName, preTriggerArgs); 55805 55806 if (preTriggerArgs.prevented) { 55807 args.prevented = true; 55808 55809 return; 55810 } 55811 } 55812 55813 actualTrigger.call(this, name, args); 55814 }; 55815 55816 Select2.prototype.toggleDropdown = function () { 55817 if (this.options.get('disabled')) { 55818 return; 55819 } 55820 55821 if (this.isOpen()) { 55822 this.close(); 55823 } else { 55824 this.open(); 55825 } 55826 }; 55827 55828 Select2.prototype.open = function () { 55829 if (this.isOpen()) { 55830 return; 55831 } 55832 55833 this.trigger('query', {}); 55834 }; 55835 55836 Select2.prototype.close = function () { 55837 if (!this.isOpen()) { 55838 return; 55839 } 55840 55841 this.trigger('close', {}); 55842 }; 55843 55844 Select2.prototype.isOpen = function () { 55845 return this.$container.hasClass('select2-container--open'); 55846 }; 55847 55848 Select2.prototype.hasFocus = function () { 55849 return this.$container.hasClass('select2-container--focus'); 55850 }; 55851 55852 Select2.prototype.focus = function (data) { 55853 // No need to re-trigger focus events if we are already focused 55854 if (this.hasFocus()) { 55855 return; 55856 } 55857 55858 this.$container.addClass('select2-container--focus'); 55859 this.trigger('focus', {}); 55860 }; 55861 55862 Select2.prototype.enable = function (args) { 55863 if (this.options.get('debug') && window.console && console.warn) { 55864 console.warn( 55865 'Select2: The `select2("enable")` method has been deprecated and will' + 55866 ' be removed in later Select2 versions. Use $element.prop("disabled")' + 55867 ' instead.' 55868 ); 55869 } 55870 55871 if (args == null || args.length === 0) { 55872 args = [true]; 55873 } 55874 55875 var disabled = !args[0]; 55876 55877 this.$element.prop('disabled', disabled); 55878 }; 55879 55880 Select2.prototype.data = function () { 55881 if (this.options.get('debug') && 55882 arguments.length > 0 && window.console && console.warn) { 55883 console.warn( 55884 'Select2: Data can no longer be set using `select2("data")`. You ' + 55885 'should consider setting the value instead using `$element.val()`.' 55886 ); 55887 } 55888 55889 var data = []; 55890 55891 this.dataAdapter.current(function (currentData) { 55892 data = currentData; 55893 }); 55894 55895 return data; 55896 }; 55897 55898 Select2.prototype.val = function (args) { 55899 if (this.options.get('debug') && window.console && console.warn) { 55900 console.warn( 55901 'Select2: The `select2("val")` method has been deprecated and will be' + 55902 ' removed in later Select2 versions. Use $element.val() instead.' 55903 ); 55904 } 55905 55906 if (args == null || args.length === 0) { 55907 return this.$element.val(); 55908 } 55909 55910 var newVal = args[0]; 55911 55912 if ($.isArray(newVal)) { 55913 newVal = $.map(newVal, function (obj) { 55914 return obj.toString(); 55915 }); 55916 } 55917 55918 this.$element.val(newVal).trigger('change'); 55919 }; 55920 55921 Select2.prototype.destroy = function () { 55922 this.$container.remove(); 55923 55924 if (this.$element[0].detachEvent) { 55925 this.$element[0].detachEvent('onpropertychange', this._syncA); 55926 } 55927 55928 if (this._observer != null) { 55929 this._observer.disconnect(); 55930 this._observer = null; 55931 } else if (this.$element[0].removeEventListener) { 55932 this.$element[0] 55933 .removeEventListener('DOMAttrModified', this._syncA, false); 55934 this.$element[0] 55935 .removeEventListener('DOMNodeInserted', this._syncS, false); 55936 this.$element[0] 55937 .removeEventListener('DOMNodeRemoved', this._syncS, false); 55938 } 55939 55940 this._syncA = null; 55941 this._syncS = null; 55942 55943 this.$element.off('.select2'); 55944 this.$element.attr('tabindex', this.$element.data('old-tabindex')); 55945 55946 this.$element.removeClass('select2-hidden-accessible'); 55947 this.$element.attr('aria-hidden', 'false'); 55948 this.$element.removeData('select2'); 55949 55950 this.dataAdapter.destroy(); 55951 this.selection.destroy(); 55952 this.dropdown.destroy(); 55953 this.results.destroy(); 55954 55955 this.dataAdapter = null; 55956 this.selection = null; 55957 this.dropdown = null; 55958 this.results = null; 55959 }; 55960 55961 Select2.prototype.render = function () { 55962 var $container = $( 55963 '<span class="select2 select2-container">' + 55964 '<span class="selection"></span>' + 55965 '<span class="dropdown-wrapper" aria-hidden="true"></span>' + 55966 '</span>' 55967 ); 55968 55969 $container.attr('dir', this.options.get('dir')); 55970 55971 this.$container = $container; 55972 55973 this.$container.addClass('select2-container--' + this.options.get('theme')); 55974 55975 $container.data('element', this.$element); 55976 55977 return $container; 55978 }; 55979 55980 return Select2; 55981}); 55982 55983S2.define('select2/compat/utils',[ 55984 'jquery' 55985], function ($) { 55986 function syncCssClasses ($dest, $src, adapter) { 55987 var classes, replacements = [], adapted; 55988 55989 classes = $.trim($dest.attr('class')); 55990 55991 if (classes) { 55992 classes = '' + classes; // for IE which returns object 55993 55994 $(classes.split(/\s+/)).each(function () { 55995 // Save all Select2 classes 55996 if (this.indexOf('select2-') === 0) { 55997 replacements.push(this); 55998 } 55999 }); 56000 } 56001 56002 classes = $.trim($src.attr('class')); 56003 56004 if (classes) { 56005 classes = '' + classes; // for IE which returns object 56006 56007 $(classes.split(/\s+/)).each(function () { 56008 // Only adapt non-Select2 classes 56009 if (this.indexOf('select2-') !== 0) { 56010 adapted = adapter(this); 56011 56012 if (adapted != null) { 56013 replacements.push(adapted); 56014 } 56015 } 56016 }); 56017 } 56018 56019 $dest.attr('class', replacements.join(' ')); 56020 } 56021 56022 return { 56023 syncCssClasses: syncCssClasses 56024 }; 56025}); 56026 56027S2.define('select2/compat/containerCss',[ 56028 'jquery', 56029 './utils' 56030], function ($, CompatUtils) { 56031 // No-op CSS adapter that discards all classes by default 56032 function _containerAdapter (clazz) { 56033 return null; 56034 } 56035 56036 function ContainerCSS () { } 56037 56038 ContainerCSS.prototype.render = function (decorated) { 56039 var $container = decorated.call(this); 56040 56041 var containerCssClass = this.options.get('containerCssClass') || ''; 56042 56043 if ($.isFunction(containerCssClass)) { 56044 containerCssClass = containerCssClass(this.$element); 56045 } 56046 56047 var containerCssAdapter = this.options.get('adaptContainerCssClass'); 56048 containerCssAdapter = containerCssAdapter || _containerAdapter; 56049 56050 if (containerCssClass.indexOf(':all:') !== -1) { 56051 containerCssClass = containerCssClass.replace(':all:', ''); 56052 56053 var _cssAdapter = containerCssAdapter; 56054 56055 containerCssAdapter = function (clazz) { 56056 var adapted = _cssAdapter(clazz); 56057 56058 if (adapted != null) { 56059 // Append the old one along with the adapted one 56060 return adapted + ' ' + clazz; 56061 } 56062 56063 return clazz; 56064 }; 56065 } 56066 56067 var containerCss = this.options.get('containerCss') || {}; 56068 56069 if ($.isFunction(containerCss)) { 56070 containerCss = containerCss(this.$element); 56071 } 56072 56073 CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter); 56074 56075 $container.css(containerCss); 56076 $container.addClass(containerCssClass); 56077 56078 return $container; 56079 }; 56080 56081 return ContainerCSS; 56082}); 56083 56084S2.define('select2/compat/dropdownCss',[ 56085 'jquery', 56086 './utils' 56087], function ($, CompatUtils) { 56088 // No-op CSS adapter that discards all classes by default 56089 function _dropdownAdapter (clazz) { 56090 return null; 56091 } 56092 56093 function DropdownCSS () { } 56094 56095 DropdownCSS.prototype.render = function (decorated) { 56096 var $dropdown = decorated.call(this); 56097 56098 var dropdownCssClass = this.options.get('dropdownCssClass') || ''; 56099 56100 if ($.isFunction(dropdownCssClass)) { 56101 dropdownCssClass = dropdownCssClass(this.$element); 56102 } 56103 56104 var dropdownCssAdapter = this.options.get('adaptDropdownCssClass'); 56105 dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter; 56106 56107 if (dropdownCssClass.indexOf(':all:') !== -1) { 56108 dropdownCssClass = dropdownCssClass.replace(':all:', ''); 56109 56110 var _cssAdapter = dropdownCssAdapter; 56111 56112 dropdownCssAdapter = function (clazz) { 56113 var adapted = _cssAdapter(clazz); 56114 56115 if (adapted != null) { 56116 // Append the old one along with the adapted one 56117 return adapted + ' ' + clazz; 56118 } 56119 56120 return clazz; 56121 }; 56122 } 56123 56124 var dropdownCss = this.options.get('dropdownCss') || {}; 56125 56126 if ($.isFunction(dropdownCss)) { 56127 dropdownCss = dropdownCss(this.$element); 56128 } 56129 56130 CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter); 56131 56132 $dropdown.css(dropdownCss); 56133 $dropdown.addClass(dropdownCssClass); 56134 56135 return $dropdown; 56136 }; 56137 56138 return DropdownCSS; 56139}); 56140 56141S2.define('select2/compat/initSelection',[ 56142 'jquery' 56143], function ($) { 56144 function InitSelection (decorated, $element, options) { 56145 if (options.get('debug') && window.console && console.warn) { 56146 console.warn( 56147 'Select2: The `initSelection` option has been deprecated in favor' + 56148 ' of a custom data adapter that overrides the `current` method. ' + 56149 'This method is now called multiple times instead of a single ' + 56150 'time when the instance is initialized. Support will be removed ' + 56151 'for the `initSelection` option in future versions of Select2' 56152 ); 56153 } 56154 56155 this.initSelection = options.get('initSelection'); 56156 this._isInitialized = false; 56157 56158 decorated.call(this, $element, options); 56159 } 56160 56161 InitSelection.prototype.current = function (decorated, callback) { 56162 var self = this; 56163 56164 if (this._isInitialized) { 56165 decorated.call(this, callback); 56166 56167 return; 56168 } 56169 56170 this.initSelection.call(null, this.$element, function (data) { 56171 self._isInitialized = true; 56172 56173 if (!$.isArray(data)) { 56174 data = [data]; 56175 } 56176 56177 callback(data); 56178 }); 56179 }; 56180 56181 return InitSelection; 56182}); 56183 56184S2.define('select2/compat/inputData',[ 56185 'jquery' 56186], function ($) { 56187 function InputData (decorated, $element, options) { 56188 this._currentData = []; 56189 this._valueSeparator = options.get('valueSeparator') || ','; 56190 56191 if ($element.prop('type') === 'hidden') { 56192 if (options.get('debug') && console && console.warn) { 56193 console.warn( 56194 'Select2: Using a hidden input with Select2 is no longer ' + 56195 'supported and may stop working in the future. It is recommended ' + 56196 'to use a `<select>` element instead.' 56197 ); 56198 } 56199 } 56200 56201 decorated.call(this, $element, options); 56202 } 56203 56204 InputData.prototype.current = function (_, callback) { 56205 function getSelected (data, selectedIds) { 56206 var selected = []; 56207 56208 if (data.selected || $.inArray(data.id, selectedIds) !== -1) { 56209 data.selected = true; 56210 selected.push(data); 56211 } else { 56212 data.selected = false; 56213 } 56214 56215 if (data.children) { 56216 selected.push.apply(selected, getSelected(data.children, selectedIds)); 56217 } 56218 56219 return selected; 56220 } 56221 56222 var selected = []; 56223 56224 for (var d = 0; d < this._currentData.length; d++) { 56225 var data = this._currentData[d]; 56226 56227 selected.push.apply( 56228 selected, 56229 getSelected( 56230 data, 56231 this.$element.val().split( 56232 this._valueSeparator 56233 ) 56234 ) 56235 ); 56236 } 56237 56238 callback(selected); 56239 }; 56240 56241 InputData.prototype.select = function (_, data) { 56242 if (!this.options.get('multiple')) { 56243 this.current(function (allData) { 56244 $.map(allData, function (data) { 56245 data.selected = false; 56246 }); 56247 }); 56248 56249 this.$element.val(data.id); 56250 this.$element.trigger('change'); 56251 } else { 56252 var value = this.$element.val(); 56253 value += this._valueSeparator + data.id; 56254 56255 this.$element.val(value); 56256 this.$element.trigger('change'); 56257 } 56258 }; 56259 56260 InputData.prototype.unselect = function (_, data) { 56261 var self = this; 56262 56263 data.selected = false; 56264 56265 this.current(function (allData) { 56266 var values = []; 56267 56268 for (var d = 0; d < allData.length; d++) { 56269 var item = allData[d]; 56270 56271 if (data.id == item.id) { 56272 continue; 56273 } 56274 56275 values.push(item.id); 56276 } 56277 56278 self.$element.val(values.join(self._valueSeparator)); 56279 self.$element.trigger('change'); 56280 }); 56281 }; 56282 56283 InputData.prototype.query = function (_, params, callback) { 56284 var results = []; 56285 56286 for (var d = 0; d < this._currentData.length; d++) { 56287 var data = this._currentData[d]; 56288 56289 var matches = this.matches(params, data); 56290 56291 if (matches !== null) { 56292 results.push(matches); 56293 } 56294 } 56295 56296 callback({ 56297 results: results 56298 }); 56299 }; 56300 56301 InputData.prototype.addOptions = function (_, $options) { 56302 var options = $.map($options, function ($option) { 56303 return $.data($option[0], 'data'); 56304 }); 56305 56306 this._currentData.push.apply(this._currentData, options); 56307 }; 56308 56309 return InputData; 56310}); 56311 56312S2.define('select2/compat/matcher',[ 56313 'jquery' 56314], function ($) { 56315 function oldMatcher (matcher) { 56316 function wrappedMatcher (params, data) { 56317 var match = $.extend(true, {}, data); 56318 56319 if (params.term == null || $.trim(params.term) === '') { 56320 return match; 56321 } 56322 56323 if (data.children) { 56324 for (var c = data.children.length - 1; c >= 0; c--) { 56325 var child = data.children[c]; 56326 56327 // Check if the child object matches 56328 // The old matcher returned a boolean true or false 56329 var doesMatch = matcher(params.term, child.text, child); 56330 56331 // If the child didn't match, pop it off 56332 if (!doesMatch) { 56333 match.children.splice(c, 1); 56334 } 56335 } 56336 56337 if (match.children.length > 0) { 56338 return match; 56339 } 56340 } 56341 56342 if (matcher(params.term, data.text, data)) { 56343 return match; 56344 } 56345 56346 return null; 56347 } 56348 56349 return wrappedMatcher; 56350 } 56351 56352 return oldMatcher; 56353}); 56354 56355S2.define('select2/compat/query',[ 56356 56357], function () { 56358 function Query (decorated, $element, options) { 56359 if (options.get('debug') && window.console && console.warn) { 56360 console.warn( 56361 'Select2: The `query` option has been deprecated in favor of a ' + 56362 'custom data adapter that overrides the `query` method. Support ' + 56363 'will be removed for the `query` option in future versions of ' + 56364 'Select2.' 56365 ); 56366 } 56367 56368 decorated.call(this, $element, options); 56369 } 56370 56371 Query.prototype.query = function (_, params, callback) { 56372 params.callback = callback; 56373 56374 var query = this.options.get('query'); 56375 56376 query.call(null, params); 56377 }; 56378 56379 return Query; 56380}); 56381 56382S2.define('select2/dropdown/attachContainer',[ 56383 56384], function () { 56385 function AttachContainer (decorated, $element, options) { 56386 decorated.call(this, $element, options); 56387 } 56388 56389 AttachContainer.prototype.position = 56390 function (decorated, $dropdown, $container) { 56391 var $dropdownContainer = $container.find('.dropdown-wrapper'); 56392 $dropdownContainer.append($dropdown); 56393 56394 $dropdown.addClass('select2-dropdown--below'); 56395 $container.addClass('select2-container--below'); 56396 }; 56397 56398 return AttachContainer; 56399}); 56400 56401S2.define('select2/dropdown/stopPropagation',[ 56402 56403], function () { 56404 function StopPropagation () { } 56405 56406 StopPropagation.prototype.bind = function (decorated, container, $container) { 56407 decorated.call(this, container, $container); 56408 56409 var stoppedEvents = [ 56410 'blur', 56411 'change', 56412 'click', 56413 'dblclick', 56414 'focus', 56415 'focusin', 56416 'focusout', 56417 'input', 56418 'keydown', 56419 'keyup', 56420 'keypress', 56421 'mousedown', 56422 'mouseenter', 56423 'mouseleave', 56424 'mousemove', 56425 'mouseover', 56426 'mouseup', 56427 'search', 56428 'touchend', 56429 'touchstart' 56430 ]; 56431 56432 this.$dropdown.on(stoppedEvents.join(' '), function (evt) { 56433 evt.stopPropagation(); 56434 }); 56435 }; 56436 56437 return StopPropagation; 56438}); 56439 56440S2.define('select2/selection/stopPropagation',[ 56441 56442], function () { 56443 function StopPropagation () { } 56444 56445 StopPropagation.prototype.bind = function (decorated, container, $container) { 56446 decorated.call(this, container, $container); 56447 56448 var stoppedEvents = [ 56449 'blur', 56450 'change', 56451 'click', 56452 'dblclick', 56453 'focus', 56454 'focusin', 56455 'focusout', 56456 'input', 56457 'keydown', 56458 'keyup', 56459 'keypress', 56460 'mousedown', 56461 'mouseenter', 56462 'mouseleave', 56463 'mousemove', 56464 'mouseover', 56465 'mouseup', 56466 'search', 56467 'touchend', 56468 'touchstart' 56469 ]; 56470 56471 this.$selection.on(stoppedEvents.join(' '), function (evt) { 56472 evt.stopPropagation(); 56473 }); 56474 }; 56475 56476 return StopPropagation; 56477}); 56478 56479/*! 56480 * jQuery Mousewheel 3.1.13 56481 * 56482 * Copyright jQuery Foundation and other contributors 56483 * Released under the MIT license 56484 * http://jquery.org/license 56485 */ 56486 56487(function (factory) { 56488 if ( typeof S2.define === 'function' && S2.define.amd ) { 56489 // AMD. Register as an anonymous module. 56490 S2.define('jquery-mousewheel',['jquery'], factory); 56491 } else if (typeof exports === 'object') { 56492 // Node/CommonJS style for Browserify 56493 module.exports = factory; 56494 } else { 56495 // Browser globals 56496 factory(jQuery); 56497 } 56498}(function ($) { 56499 56500 var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], 56501 toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? 56502 ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], 56503 slice = Array.prototype.slice, 56504 nullLowestDeltaTimeout, lowestDelta; 56505 56506 if ( $.event.fixHooks ) { 56507 for ( var i = toFix.length; i; ) { 56508 $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; 56509 } 56510 } 56511 56512 var special = $.event.special.mousewheel = { 56513 version: '3.1.12', 56514 56515 setup: function() { 56516 if ( this.addEventListener ) { 56517 for ( var i = toBind.length; i; ) { 56518 this.addEventListener( toBind[--i], handler, false ); 56519 } 56520 } else { 56521 this.onmousewheel = handler; 56522 } 56523 // Store the line height and page height for this particular element 56524 $.data(this, 'mousewheel-line-height', special.getLineHeight(this)); 56525 $.data(this, 'mousewheel-page-height', special.getPageHeight(this)); 56526 }, 56527 56528 teardown: function() { 56529 if ( this.removeEventListener ) { 56530 for ( var i = toBind.length; i; ) { 56531 this.removeEventListener( toBind[--i], handler, false ); 56532 } 56533 } else { 56534 this.onmousewheel = null; 56535 } 56536 // Clean up the data we added to the element 56537 $.removeData(this, 'mousewheel-line-height'); 56538 $.removeData(this, 'mousewheel-page-height'); 56539 }, 56540 56541 getLineHeight: function(elem) { 56542 var $elem = $(elem), 56543 $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent'](); 56544 if (!$parent.length) { 56545 $parent = $('body'); 56546 } 56547 return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16; 56548 }, 56549 56550 getPageHeight: function(elem) { 56551 return $(elem).height(); 56552 }, 56553 56554 settings: { 56555 adjustOldDeltas: true, // see shouldAdjustOldDeltas() below 56556 normalizeOffset: true // calls getBoundingClientRect for each event 56557 } 56558 }; 56559 56560 $.fn.extend({ 56561 mousewheel: function(fn) { 56562 return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); 56563 }, 56564 56565 unmousewheel: function(fn) { 56566 return this.unbind('mousewheel', fn); 56567 } 56568 }); 56569 56570 56571 function handler(event) { 56572 var orgEvent = event || window.event, 56573 args = slice.call(arguments, 1), 56574 delta = 0, 56575 deltaX = 0, 56576 deltaY = 0, 56577 absDelta = 0, 56578 offsetX = 0, 56579 offsetY = 0; 56580 event = $.event.fix(orgEvent); 56581 event.type = 'mousewheel'; 56582 56583 // Old school scrollwheel delta 56584 if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } 56585 if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } 56586 if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } 56587 if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } 56588 56589 // Firefox < 17 horizontal scrolling related to DOMMouseScroll event 56590 if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { 56591 deltaX = deltaY * -1; 56592 deltaY = 0; 56593 } 56594 56595 // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy 56596 delta = deltaY === 0 ? deltaX : deltaY; 56597 56598 // New school wheel delta (wheel event) 56599 if ( 'deltaY' in orgEvent ) { 56600 deltaY = orgEvent.deltaY * -1; 56601 delta = deltaY; 56602 } 56603 if ( 'deltaX' in orgEvent ) { 56604 deltaX = orgEvent.deltaX; 56605 if ( deltaY === 0 ) { delta = deltaX * -1; } 56606 } 56607 56608 // No change actually happened, no reason to go any further 56609 if ( deltaY === 0 && deltaX === 0 ) { return; } 56610 56611 // Need to convert lines and pages to pixels if we aren't already in pixels 56612 // There are three delta modes: 56613 // * deltaMode 0 is by pixels, nothing to do 56614 // * deltaMode 1 is by lines 56615 // * deltaMode 2 is by pages 56616 if ( orgEvent.deltaMode === 1 ) { 56617 var lineHeight = $.data(this, 'mousewheel-line-height'); 56618 delta *= lineHeight; 56619 deltaY *= lineHeight; 56620 deltaX *= lineHeight; 56621 } else if ( orgEvent.deltaMode === 2 ) { 56622 var pageHeight = $.data(this, 'mousewheel-page-height'); 56623 delta *= pageHeight; 56624 deltaY *= pageHeight; 56625 deltaX *= pageHeight; 56626 } 56627 56628 // Store lowest absolute delta to normalize the delta values 56629 absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); 56630 56631 if ( !lowestDelta || absDelta < lowestDelta ) { 56632 lowestDelta = absDelta; 56633 56634 // Adjust older deltas if necessary 56635 if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { 56636 lowestDelta /= 40; 56637 } 56638 } 56639 56640 // Adjust older deltas if necessary 56641 if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { 56642 // Divide all the things by 40! 56643 delta /= 40; 56644 deltaX /= 40; 56645 deltaY /= 40; 56646 } 56647 56648 // Get a whole, normalized value for the deltas 56649 delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); 56650 deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); 56651 deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); 56652 56653 // Normalise offsetX and offsetY properties 56654 if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { 56655 var boundingRect = this.getBoundingClientRect(); 56656 offsetX = event.clientX - boundingRect.left; 56657 offsetY = event.clientY - boundingRect.top; 56658 } 56659 56660 // Add information to the event object 56661 event.deltaX = deltaX; 56662 event.deltaY = deltaY; 56663 event.deltaFactor = lowestDelta; 56664 event.offsetX = offsetX; 56665 event.offsetY = offsetY; 56666 // Go ahead and set deltaMode to 0 since we converted to pixels 56667 // Although this is a little odd since we overwrite the deltaX/Y 56668 // properties with normalized deltas. 56669 event.deltaMode = 0; 56670 56671 // Add event and delta to the front of the arguments 56672 args.unshift(event, delta, deltaX, deltaY); 56673 56674 // Clearout lowestDelta after sometime to better 56675 // handle multiple device types that give different 56676 // a different lowestDelta 56677 // Ex: trackpad = 3 and mouse wheel = 120 56678 if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } 56679 nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); 56680 56681 return ($.event.dispatch || $.event.handle).apply(this, args); 56682 } 56683 56684 function nullLowestDelta() { 56685 lowestDelta = null; 56686 } 56687 56688 function shouldAdjustOldDeltas(orgEvent, absDelta) { 56689 // If this is an older event and the delta is divisable by 120, 56690 // then we are assuming that the browser is treating this as an 56691 // older mouse wheel event and that we should divide the deltas 56692 // by 40 to try and get a more usable deltaFactor. 56693 // Side note, this actually impacts the reported scroll distance 56694 // in older browsers and can cause scrolling to be slower than native. 56695 // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. 56696 return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; 56697 } 56698 56699})); 56700 56701S2.define('jquery.select2',[ 56702 'jquery', 56703 'jquery-mousewheel', 56704 56705 './select2/core', 56706 './select2/defaults' 56707], function ($, _, Select2, Defaults) { 56708 if ($.fn.select
567082 == null) { 56709 // All methods that should return the element 56710 var thisMethods = ['open', 'close', 'destroy']; 56711 56712 $.fn.select2 = function (options) { 56713 options = options || {}; 56714 56715 if (typeof options === 'object') { 56716 this.each(function () { 56717 var instanceOptions = $.extend(true, {}, options); 56718 56719 var instance = new Select2($(this), instanceOptions); 56720 }); 56721 56722 return this; 56723 } else if (typeof options === 'string') { 56724 var ret; 56725 var args = Array.prototype.slice.call(arguments, 1); 56726 56727 this.each(function () { 56728 var instance = $(this).data('select2'); 56729 56730 if (instance == null && window.console && console.error) { 56731 console.error( 56732 'The select2(\'' + options + '\') method was called on an ' + 56733 'element that is not using Select2.' 56734 ); 56735 } 56736 56737 ret = instance[options].apply(instance, args); 56738 }); 56739 56740 // Check if we should be returning `this` 56741 if ($.inArray(options, thisMethods) > -1) { 56742 return this; 56743 } 56744 56745 return ret; 56746 } else { 56747 throw new Error('Invalid arguments for Select2: ' + options); 56748 } 56749 }; 56750 } 56751 56752 if ($.fn.select2.defaults == null) { 56753 $.fn.select2.defaults = Defaults; 56754 } 56755 56756 return Select2; 56757}); 56758 56759 // Return the AMD loader configuration so it can be used outside of this file 56760 return { 56761 define: S2.define, 56762 require: S2.require 56763 }; 56764}()); 56765 56766 // Autoload the jQuery bindings 56767 // We know that all of the modules exist above this, so we're safe 56768 var select2 = S2.require('jquery.select2'); 56769 56770 // Hold the AMD module references on the jQuery function that was just loaded 56771 // This allows Select2 to use the internal loader outside of this file, such 56772 // as in the language files. 56773 jQuery.fn.select2.amd = S2; 56774 56775 // Return the Select2 instance for anyone who is importing it. 56776 return select2; 56777})); 56778 56779if (!window['YT']) {var YT = {loading: 0,loaded: 0};}if (!window['YTConfig']) {var YTConfig = {'host': 'http://www.youtube.com'};}if (!YT.loading) {YT.loading = 1;(function(){var l = [];YT.ready = function(f) {if (YT.loaded) {f();} else {l.push(f);}};window.onYTReady = function() {YT.loaded = 1;for (var i = 0; i < l.length; i++) {try {l[i]();} catch (e) {}}};YT.setConfig = function(c) {for (var k in c) {if (c.hasOwnProperty(k)) {YTConfig[k] = c[k];}}};var a = document.createElement('script');a.type = 'text/javascript';a.id = 'www-widgetapi-script';a.src = 'https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl6bXtp3/www-widgetapi.js';a.async = true;var b = document.getElementsByTagName('script')[0];b.parentNode.insertBefore(a, b);})();} 56780//# sourceMappingURL=vendor.js.map
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.