vendor: 22,969 bytes, lines 1-829
1/**! 2 3 @license 4 handlebars v4.7.10 5 6Copyright (C) 2011-2019 by Yehuda Katz 7 8Permission is hereby granted, free of charge, to any person obtaining a copy 9of this software and associated documentation files (the "Software"), to deal 10in the Software without restriction, including without limitation the rights 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12copies of the Software, and to permit persons to whom the Software is 13furnished to do so, subject to the following conditions: 14 15The above copyright notice and this permission notice shall be included in 16all copies or substantial portions of the Software. 17 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24THE SOFTWARE. 25 26*/ 27(function webpackUniversalModuleDefinition(root, factory) { 28 if(typeof exports === 'object' && typeof module === 'object') 29 module.exports = factory(); 30 else if(typeof define === 'function' && define.amd) 31 define([], factory); 32 else if(typeof exports === 'object') 33 exports["Handlebars"] = factory(); 34 else 35 root["Handlebars"] = factory(); 36})(this, function() { 37return /******/ (function(modules) { // webpackBootstrap 38/******/ // The module cache 39/******/ var installedModules = {}; 40 41/******/ // The require function 42/******/ function __webpack_require__(moduleId) { 43 44/******/ // Check if module is in cache 45/******/ if(installedModules[moduleId]) 46/******/ return installedModules[moduleId].exports; 47 48/******/ // Create a new module (and put it into the cache) 49/******/ var module = installedModules[moduleId] = { 50/******/ exports: {}, 51/******/ id: moduleId, 52/******/ loaded: false 53/******/ }; 54 55/******/ // Execute the module function 56/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 57 58/******/ // Flag the module as loaded 59/******/ module.loaded = true; 60 61/******/ // Return the exports of the module 62/******/ return module.exports; 63/******/ } 64 65 66/******/ // expose the modules object (__webpack_modules__) 67/******/ __webpack_require__.m = modules; 68 69/******/ // expose the module cache 70/******/ __webpack_require__.c = installedModules; 71 72/******/ // __webpack_public_path__ 73/******/ __webpack_require__.p = ""; 74 75/******/ // Load entry module and return exports 76/******/ return __webpack_require__(0); 77/******/ }) 78/************************************************************************/ 79/******/ ([ 80/* 0 */ 81/***/ (function(module, exports, __webpack_require__) { 82 83 'use strict'; 84 85 var _interopRequireDefault = __webpack_require__(1)['default']; 86 87 exports.__esModule = true; 88 89 var _handlebarsRuntime = __webpack_require__(2); 90 91 var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); 92 93 // Compiler imports 94 95 var _handlebarsCompilerAst = __webpack_require__(83); 96 97 var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); 98 99 var _handlebarsCompilerBase = __webpack_require__(84); 100 101 var _handlebarsCompilerCompiler = __webpack_require__(90); 102 103 var _handlebarsCompilerJavascriptCompiler = __webpack_require__(91); 104 105 var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); 106 107 var _handlebarsCompilerVisitor = __webpack_require__(87); 108 109 var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); 110 111 var _handlebarsNoConflict = __webpack_require__(82); 112 113 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 114 115 var _create = _handlebarsRuntime2['default'].create; 116 function create() { 117 var hb = _create(); 118 119 hb.compile = function (input, options) { 120 return _handlebarsCompilerCompiler.compile(input, options, hb); 121 }; 122 hb.precompile = function (input, options) { 123 return _handlebarsCompilerCompiler.precompile(input, options, hb); 124 }; 125 126 hb.AST = _handlebarsCompilerAst2['default']; 127 hb.Compiler = _handlebarsCompilerCompiler.Compiler; 128 hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; 129 hb.Parser = _handlebarsCompilerBase.parser; 130 hb.parse = _handlebarsCompilerBase.parse; 131 hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; 132 133 return hb; 134 } 135 136 var inst = create(); 137 inst.create = create; 138 139 _handlebarsNoConflict2['default'](inst); 140 141 inst.Visitor = _handlebarsCompilerVisitor2['default']; 142 143 inst['default'] = inst; 144 145 exports['default'] = inst; 146 module.exports = exports['default']; 147 148/***/ }), 149/* 1 */ 150/***/ (function(module, exports) { 151 152 "use strict"; 153 154 exports["default"] = function (obj) { 155 return obj && obj.__esModule ? obj : { 156 "default": obj 157 }; 158 }; 159 160 exports.__esModule = true; 161 162/***/ }), 163/* 2 */ 164/***/ (function(module, exports, __webpack_require__) { 165 166 'use strict'; 167 168 var _interopRequireWildcard = __webpack_require__(3)['default']; 169 170 var _interopRequireDefault = __webpack_require__(1)['default']; 171 172 exports.__esModule = true; 173 174 var _handlebarsBase = __webpack_require__(4); 175 176 var base = _interopRequireWildcard(_handlebarsBase); 177 178 // Each of these augment the Handlebars object. No need to setup here. 179 // (This is done to easily share code between commonjs and browse envs) 180 181 var _handlebarsSafeString = __webpack_require__(76); 182 183 var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); 184 185 var _handlebarsException = __webpack_require__(6); 186 187 var _handlebarsException2 = _interopRequireDefault(_handlebarsException); 188 189 var _handlebarsUtils = __webpack_require__(5); 190 191 var Utils = _interopRequireWildcard(_handlebarsUtils); 192 193 var _handlebarsRuntime = __webpack_require__(77); 194 195 var runtime = _interopRequireWildcard(_handlebarsRuntime); 196 197 var _handlebarsNoConflict = __webpack_require__(82); 198 199 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 200 201 // For compatibility and usage outside of module systems, make the Handlebars object a namespace 202 function create() { 203 var hb = new base.HandlebarsEnvironment(); 204 205 Utils.extend(hb, base); 206 hb.SafeString = _handlebarsSafeString2['default']; 207 hb.Exception = _handlebarsException2['default']; 208 hb.Utils = Utils; 209 hb.escapeExpression = Utils.escapeExpression; 210 211 hb.VM = runtime; 212 hb.template = function (spec) { 213 return runtime.template(spec, hb); 214 }; 215 216 return hb; 217 } 218 219 var inst = create(); 220 inst.create = create; 221 222 _handlebarsNoConflict2['default'](inst); 223 224 inst['default'] = inst; 225 226 exports['default'] = inst; 227 module.exports = exports['default']; 228 229/***/ }), 230/* 3 */ 231/***/ (function(module, exports) { 232 233 "use strict"; 234 235 exports["default"] = function (obj) { 236 if (obj && obj.__esModule) { 237 return obj; 238 } else { 239 var newObj = {}; 240 241 if (obj != null) { 242 for (var key in obj) { 243 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 244 } 245 } 246 247 newObj["default"] = obj; 248 return newObj; 249 } 250 }; 251 252 exports.__esModule = true; 253 254/***/ }), 255/* 4 */ 256/***/ (function(module, exports, __webpack_require__) { 257 258 'use strict'; 259 260 var _interopRequireDefault = __webpack_require__(1)['default']; 261 262 exports.__esModule = true; 263 exports.HandlebarsEnvironment = HandlebarsEnvironment; 264 265 var _utils = __webpack_require__(5); 266 267 var _exception = __webpack_require__(6); 268 269 var _exception2 = _interopRequireDefault(_exception); 270 271 var _helpers = __webpack_require__(10); 272 273 var _decorators = __webpack_require__(70); 274 275 var _logger = __webpack_require__(72); 276 277 var _logger2 = _interopRequireDefault(_logger); 278 279 var _internalProtoAccess = __webpack_require__(73); 280 281 var VERSION = '4.7.10'; 282 exports.VERSION = VERSION; 283 var COMPILER_REVISION = 8; 284 exports.COMPILER_REVISION = COMPILER_REVISION; 285 var LAST_COMPATIBLE_COMPILER_REVISION = 7; 286 287 exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; 288 var REVISION_CHANGES = { 289 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 290 2: '== 1.0.0-rc.3', 291 3: '== 1.0.0-rc.4', 292 4: '== 1.x.x', 293 5: '== 2.0.0-alpha.x', 294 6: '>= 2.0.0-beta.1', 295 7: '>= 4.0.0 <4.3.0', 296 8: '>= 4.3.0' 297 }; 298 299 exports.REVISION_CHANGES = REVISION_CHANGES; 300 var objectType = '[object Object]'; 301 302 function HandlebarsEnvironment(helpers, partials, decorators) { 303 this.helpers = helpers || {}; 304 this.partials = partials || {}; 305 this.decorators = decorators || {}; 306 307 _helpers.registerDefaultHelpers(this); 308 _decorators.registerDefaultDecorators(this); 309 } 310 311 HandlebarsEnvironment.prototype = { 312 constructor: HandlebarsEnvironment, 313 314 logger: _logger2['default'], 315 log: _logger2['default'].log, 316 317 registerHelper: function registerHelper(name, fn) { 318 if (_utils.toString.call(name) === objectType) { 319 if (fn) { 320 throw new _exception2['default']('Arg not supported with multiple helpers'); 321 } 322 _utils.extend(this.helpers, name); 323 } else { 324 this.helpers[name] = fn; 325 } 326 }, 327 unregisterHelper: function unregisterHelper(name) { 328 delete this.helpers[name]; 329 }, 330 331 registerPartial: function registerPartial(name, partial) { 332 if (_utils.toString.call(name) === objectType) { 333 _utils.extend(this.partials, name); 334 } else { 335 if (typeof partial === 'undefined') { 336 throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); 337 } 338 this.partials[name] = partial; 339 } 340 }, 341 unregisterPartial: function unregisterPartial(name) { 342 delete this.partials[name]; 343 }, 344 345 registerDecorator: function registerDecorator(name, fn) { 346 if (_utils.toString.call(name) === objectType) { 347 if (fn) { 348 throw new _exception2['default']('Arg not supported with multiple decorators'); 349 } 350 _utils.extend(this.decorators, name); 351 } else { 352 this.decorators[name] = fn; 353 } 354 }, 355 unregisterDecorator: function unregisterDecorator(name) { 356 delete this.decorators[name]; 357 }, 358 /** 359 * Reset the memory of illegal property accesses that have already been logged. 360 * @deprecated should only be used in handlebars test-cases 361 */ 362 resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { 363 _internalProtoAccess.resetLoggedProperties(); 364 } 365 }; 366 367 var log = _logger2['default'].log; 368 369 exports.log = log; 370 exports.createFrame = _utils.createFrame; 371 exports.logger = _logger2['default']; 372 373/***/ }), 374/* 5 */ 375/***/ (function(module, exports) { 376 377 'use strict'; 378 379 exports.__esModule = true; 380 exports.extend = extend; 381 exports.indexOf = indexOf; 382 exports.escapeExpression = escapeExpression; 383 exports.isEmpty = isEmpty; 384 exports.createFrame = createFrame; 385 exports.blockParams = blockParams; 386 exports.appendContextPath = appendContextPath; 387 var escape = { 388 '&': '&', 389 '<': '<', 390 '>': '>', 391 '"': '"', 392 "'": ''', 393 '`': '`', 394 '=': '=' 395 }; 396 397 var badChars = /[&<>"'`=]/g, 398 possible = /[&<>"'`=]/; 399 400 function escapeChar(chr) { 401 return escape[chr]; 402 } 403 404 function extend(obj /* , ...source */) { 405 for (var i = 1; i < arguments.length; i++) { 406 for (var key in arguments[i]) { 407 if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { 408 obj[key] = arguments[i][key]; 409 } 410 } 411 } 412 413 return obj; 414 } 415 416 var toString = Object.prototype.toString; 417 418 exports.toString = toString; 419 // Sourced from lodash 420 // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt 421 /* eslint-disable func-style */ 422 var isFunction = function isFunction(value) { 423 return typeof value === 'function'; 424 }; 425 // fallback for older versions of Chrome and Safari 426 /* istanbul ignore next */ 427 if (isFunction(/x/)) { 428 exports.isFunction = isFunction = function (value) { 429 return typeof value === 'function' && toString.call(value) === '[object Function]'; 430 }; 431 } 432 exports.isFunction = isFunction; 433 434 /* eslint-enable func-style */ 435 436 /* istanbul ignore next */ 437 var isArray = Array.isArray || function (value) { 438 return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; 439 }; 440 441 exports.isArray = isArray; 442 // Older IE versions do not directly support indexOf so we must implement our own, sadly. 443 444 function indexOf(array, value) { 445 for (var i = 0, len = array.length; i < len; i++) { 446 if (array[i] === value) { 447 return i; 448 } 449 } 450 return -1; 451 } 452 453 function escapeExpression(string) { 454 if (typeof string !== 'string') { 455 // don't escape SafeStrings, since they're already safe. Other values with a 456 // "toHTML" key, e.g. from JSON context data, are escaped like any object. 457 if (string && typeof string.toHTML === 'function') { 458 return string.toHTML(); 459 } else if (string == null) { 460 return ''; 461 } else if (!string) { 462 return string + ''; 463 } 464 465 // Force a string conversion as this will be done by the append regardless and 466 // the regex test will do this transparently behind the scenes, causing issues if 467 // an object's to string has escaped characters in it. 468 string = '' + string; 469 } 470 471 if (!possible.test(string)) { 472 return string; 473 } 474 return string.replace(badChars, escapeChar); 475 } 476 477 function isEmpty(value) { 478 if (!value && value !== 0) { 479 return true; 480 } else if (isArray(value) && value.length === 0) { 481 return true; 482 } else { 483 return false; 484 } 485 } 486 487 function createFrame(object) { 488 var frame = extend({}, object); 489 frame._parent = object; 490 return frame; 491 } 492 493 function blockParams(params, ids) { 494 params.path = ids; 495 return params; 496 } 497 498 function appendContextPath(contextPath, id) { 499 return (contextPath ? contextPath + '.' : '') + id; 500 } 501 502/***/ }), 503/* 6 */ 504/***/ (function(module, exports, __webpack_require__) { 505 506 'use strict'; 507 508 var _Object$defineProperty = __webpack_require__(7)['default']; 509 510 exports.__esModule = true; 511 var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; 512 513 function Exception(message, node) { 514 var loc = node && node.loc, 515 line = undefined, 516 endLineNumber = undefined, 517 column = undefined, 518 endColumn = undefined; 519 520 // Hand-built ASTs may carry a partial loc; never let the location 521 // bookkeeping mask the actual error message. 522 if (loc && loc.start) { 523 line = loc.start.line; 524 column = loc.start.column; 525 if (loc.end) { 526 endLineNumber = loc.end.line; 527 endColumn = loc.end.column; 528 } 529 530 message += ' - ' + line + ':' + column; 531 } 532 533 var tmp = Error.prototype.constructor.call(this, message); 534 535 // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. 536 for (var idx = 0; idx < errorProps.length; idx++) { 537 this[errorProps[idx]] = tmp[errorProps[idx]]; 538 } 539 540 /* istanbul ignore else */ 541 if (Error.captureStackTrace) { 542 Error.captureStackTrace(this, Exception); 543 } 544 545 try { 546 if (loc) { 547 this.lineNumber = line; 548 this.endLineNumber = endLineNumber; 549 550 // Work around issue under safari where we can't directly set the column value 551 /* istanbul ignore next */ 552 if (_Object$defineProperty) { 553 Object.defineProperty(this, 'column', { 554 value: column, 555 enumerable: true 556 }); 557 Object.defineProperty(this, 'endColumn', { 558 value: endColumn, 559 enumerable: true 560 }); 561 } else { 562 this.column = column; 563 this.endColumn = endColumn; 564 } 565 } 566 } catch (nop) { 567 /* Ignore if the browser is very particular */ 568 } 569 } 570 571 Exception.prototype = new Error(); 572 573 exports['default'] = Exception; 574 module.exports = exports['default']; 575 576/***/ }), 577/* 7 */ 578/***/ (function(module, exports, __webpack_require__) { 579 580 module.exports = { "default": __webpack_require__(8), __esModule: true }; 581 582/***/ }), 583/* 8 */ 584/***/ (function(module, exports, __webpack_require__) { 585 586 var $ = __webpack_require__(9); 587 module.exports = function defineProperty(it, key, desc){ 588 return $.setDesc(it, key, desc); 589 }; 590 591/***/ }), 592/* 9 */ 593/***/ (function(module, exports) { 594 595 var $Object = Object; 596 module.exports = { 597 create: $Object.create, 598 getProto: $Object.getPrototypeOf, 599 isEnum: {}.propertyIsEnumerable, 600 getDesc: $Object.getOwnPropertyDescriptor, 601 setDesc: $Object.defineProperty, 602 setDescs: $Object.defineProperties, 603 getKeys: $Object.keys, 604 getNames: $Object.getOwnPropertyNames, 605 getSymbols: $Object.getOwnPropertySymbols, 606 each: [].forEach 607 }; 608 609/***/ }), 610/* 10 */ 611/***/ (function(module, exports, __webpack_require__) { 612 613 'use strict'; 614 615 var _interopRequireDefault = __webpack_require__(1)['default']; 616 617 exports.__esModule = true; 618 exports.registerDefaultHelpers = registerDefaultHelpers; 619 exports.moveHelperToHooks = moveHelperToHooks; 620 621 var _helpersBlockHelperMissing = __webpack_require__(11); 622 623 var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); 624 625 var _helpersEach = __webpack_require__(12); 626 627 var _helpersEach2 = _interopRequireDefault(_helpersEach); 628 629 var _helpersHelperMissing = __webpack_require__(65); 630 631 var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); 632 633 var _helpersIf = __webpack_require__(66); 634 635 var _helpersIf2 = _interopRequireDefault(_helpersIf); 636 637 var _helpersLog = __webpack_require__(67); 638 639 var _helpersLog2 = _interopRequireDefault(_helpersLog); 640 641 var _helpersLookup = __webpack_require__(68); 642 643 var _helpersLookup2 = _interopRequireDefault(_helpersLookup); 644 645 var _helpersWith = __webpack_require__(69); 646 647 var _helpersWith2 = _interopRequireDefault(_helpersWith); 648 649 function registerDefaultHelpers(instance) { 650 _helpersBlockHelperMissing2['default'](instance); 651 _helpersEach2['default'](instance); 652 _helpersHelperMissing2['default'](instance); 653 _helpersIf2['default'](instance); 654 _helpersLog2['default'](instance); 655 _helpersLookup2['default'](instance); 656 _helpersWith2['default'](instance); 657 } 658 659 function moveHelperToHooks(instance, helperName, keepHelper) { 660 if (instance.helpers[helperName]) { 661 instance.hooks[helperName] = instance.helpers[helperName]; 662 if (!keepHelper) { 663 // Using delete is slow 664 instance.helpers[helperName] = undefined; 665 } 666 } 667 } 668 669/***/ }), 670/* 11 */ 671/***/ (function(module, exports, __webpack_require__) { 672 673 'use strict'; 674 675 exports.__esModule = true; 676 677 var _utils = __webpack_require__(5); 678 679 exports['default'] = function (instance) { 680 instance.registerHelper('blockHelperMissing', function (context, options) { 681 var inverse = options.inverse, 682 fn = options.fn; 683 684 if (context === true) { 685 return fn(this); 686 } else if (context === false || context == null) { 687 return inverse(this); 688 } else if (_utils.isArray(context)) { 689 if (context.length > 0) { 690 if (options.ids) { 691 options.ids = [options.name]; 692 } 693 694 return instance.helpers.each(context, options); 695 } else { 696 return inverse(this); 697 } 698 } else { 699 if (options.data && options.ids) { 700 var data = _utils.createFrame(options.data); 701 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); 702 options = { data: data }; 703 } 704 705 return fn(context, options); 706 } 707 }); 708 }; 709 710 module.exports = exports['default']; 711 712/***/ }), 713/* 12 */ 714/***/ (function(module, exports, __webpack_require__) { 715 716 'use strict'; 717 718 var _Symbol = __webpack_require__(13)['default']; 719 720 var _Symbol$iterator = __webpack_require__(43)['default']; 721 722 var _getIterator = __webpack_require__(55)['default']; 723 724 var _Object$keys = __webpack_require__(60)['default']; 725 726 var _interopRequireDefault = __webpack_require__(1)['default']; 727 728 exports.__esModule = true; 729 730 var _utils = __webpack_require__(5); 731 732 var _exception = __webpack_require__(6); 733 734 var _exception2 = _interopRequireDefault(_exception); 735 736 /** 737 * Close an unfinished iterator after the block body threw, like for...of does, 738 * so that generators can run their cleanup code. 739 * 740 * Errors thrown while closing, including by a `return` getter, are ignored: 741 * the block's error is the cause and is the one the caller must see. 742 * 743 * @param {Iterator} iterator the iterator that was being consumed 744 */ 745 function closeIterator(iterator) { 746 try { 747 var _close = iterator['return']; 748 if (_utils.isFunction(_close)) { 749 _close.call(iterator); 750 } 751 } catch (closeError) { 752 // NOP 753 } 754 } 755 756 exports['default'] = function (instance) { 757 instance.registerHelper('each', function (context, options) { 758 if (!options) { 759 throw new _exception2['default']('Must pass iterator to #each'); 760 } 761 762 var fn = options.fn, 763 inverse = options.inverse, 764 i = 0, 765 ret = '', 766 data = undefined, 767 contextPath = undefined; 768 769 if (options.data && options.ids) { 770 contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; 771 } 772 773 if (_utils.isFunction(context)) { 774 context = context.call(this); 775 } 776 777 if (options.data) { 778 data = _utils.createFrame(options.data); 779 } 780 781 function execIteration(field, index, last, value) { 782 if (data) { 783 data.key = field; 784 data.index = index; 785 data.first = index === 0; 786 data.last = !!last; 787 788 if (contextPath) { 789 data.contextPath = contextPath + field; 790 } 791 } 792 793 ret = ret + fn(value, { 794 data: data, 795 blockParams: _utils.blockParams([value, field], [contextPath + field, null]) 796 }); 797 } 798 799 if (context && typeof context === 'object') { 800 if (_utils.isArray(context)) { 801 for (var j = context.length; i < j; i++) { 802 if (i in context) { 803 execIteration(i, i, i === context.length - 1, context[i]); 804 } 805 } 806 } else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) { 807 var iterator = _getIterator(context); 808 var current = iterator.next(); 809 while (!current.done) { 810 var next = iterator.next(); 811 try { 812 execIteration(i, i, next.done, current.value); 813 } catch (e) { 814 if (!next.done) { 815 closeIterator(iterator); 816 } 817 throw e; 818 } 819 current = next; 820 i++; 821 } 822 } else { 823 (function () { 824 var priorKey = undefined; 825 826 _Object$keys(context).forEach(function (key) { 827 // We're running the iterations one step out of sync so we can detect 828 // the last iteration without have to scan the object twice and create 829 // an itermediate keys array.
830 if (priorKey !== undefined) { 831 execIteration(priorKey, i - 1, false, context[priorKey]); 832 } 833 priorKey = key; 834 i++; 835 }); 836 if (priorKey !== undefined) { 837 execIteration(priorKey, i - 1, true, context[priorKey]
vendor: 35,275 bytes, lines 837-2074
837); 838 } 839 })(); 840 } 841 } 842 843 if (i === 0) { 844 ret = inverse(this); 845 } 846 847 return ret; 848 }); 849 }; 850 851 module.exports = exports['default']; 852 853/***/ }), 854/* 13 */ 855/***/ (function(module, exports, __webpack_require__) { 856 857 module.exports = { "default": __webpack_require__(14), __esModule: true }; 858 859/***/ }), 860/* 14 */ 861/***/ (function(module, exports, __webpack_require__) { 862 863 __webpack_require__(15); 864 __webpack_require__(42); 865 module.exports = __webpack_require__(21).Symbol; 866 867/***/ }), 868/* 15 */ 869/***/ (function(module, exports, __webpack_require__) { 870 871 'use strict'; 872 // ECMAScript 6 symbols shim 873 var $ = __webpack_require__(9) 874 , global = __webpack_require__(16) 875 , has = __webpack_require__(17) 876 , DESCRIPTORS = __webpack_require__(18) 877 , $export = __webpack_require__(20) 878 , redefine = __webpack_require__(24) 879 , $fails = __webpack_require__(19) 880 , shared = __webpack_require__(27) 881 , setToStringTag = __webpack_require__(28) 882 , uid = __webpack_require__(30) 883 , wks = __webpack_require__(29) 884 , keyOf = __webpack_require__(31) 885 , $names = __webpack_require__(36) 886 , enumKeys = __webpack_require__(37) 887 , isArray = __webpack_require__(38) 888 , anObject = __webpack_require__(39) 889 , toIObject = __webpack_require__(32) 890 , createDesc = __webpack_require__(26) 891 , getDesc = $.getDesc 892 , setDesc = $.setDesc 893 , _create = $.create 894 , getNames = $names.get 895 , $Symbol = global.Symbol 896 , $JSON = global.JSON 897 , _stringify = $JSON && $JSON.stringify 898 , setter = false 899 , HIDDEN = wks('_hidden') 900 , isEnum = $.isEnum 901 , SymbolRegistry = shared('symbol-registry') 902 , AllSymbols = shared('symbols') 903 , useNative = typeof $Symbol == 'function' 904 , ObjectProto = Object.prototype; 905 906 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 907 var setSymbolDesc = DESCRIPTORS && $fails(function(){ 908 return _create(setDesc({}, 'a', { 909 get: function(){ return setDesc(this, 'a', {value: 7}).a; } 910 })).a != 7; 911 }) ? function(it, key, D){ 912 var protoDesc = getDesc(ObjectProto, key); 913 if(protoDesc)delete ObjectProto[key]; 914 setDesc(it, key, D); 915 if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); 916 } : setDesc; 917 918 var wrap = function(tag){ 919 var sym = AllSymbols[tag] = _create($Symbol.prototype); 920 sym._k = tag; 921 DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { 922 configurable: true, 923 set: function(value){ 924 if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; 925 setSymbolDesc(this, tag, createDesc(1, value)); 926 } 927 }); 928 return sym; 929 }; 930 931 var isSymbol = function(it){ 932 return typeof it == 'symbol'; 933 }; 934 935 var $defineProperty = function defineProperty(it, key, D){ 936 if(D && has(AllSymbols, key)){ 937 if(!D.enumerable){ 938 if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); 939 it[HIDDEN][key] = true; 940 } else { 941 if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; 942 D = _create(D, {enumerable: createDesc(0, false)}); 943 } return setSymbolDesc(it, key, D); 944 } return setDesc(it, key, D); 945 }; 946 var $defineProperties = function defineProperties(it, P){ 947 anObject(it); 948 var keys = enumKeys(P = toIObject(P)) 949 , i = 0 950 , l = keys.length 951 , key; 952 while(l > i)$defineProperty(it, key = keys[i++], P[key]); 953 return it; 954 }; 955 var $create = function create(it, P){ 956 return P === undefined ? _create(it) : $defineProperties(_create(it), P); 957 }; 958 var $propertyIsEnumerable = function propertyIsEnumerable(key){ 959 var E = isEnum.call(this, key); 960 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] 961 ? E : true; 962 }; 963 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ 964 var D = getDesc(it = toIObject(it), key); 965 if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; 966 return D; 967 }; 968 var $getOwnPropertyNames = function getOwnPropertyNames(it){ 969 var names = getNames(toIObject(it)) 970 , result = [] 971 , i = 0 972 , key; 973 while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); 974 return result; 975 }; 976 var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ 977 var names = getNames(toIObject(it)) 978 , result = [] 979 , i = 0 980 , key; 981 while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); 982 return result; 983 }; 984 var $stringify = function stringify(it){ 985 if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined 986 var args = [it] 987 , i = 1 988 , $$ = arguments 989 , replacer, $replacer; 990 while($$.length > i)args.push($$[i++]); 991 replacer = args[1]; 992 if(typeof replacer == 'function')$replacer = replacer; 993 if($replacer || !isArray(replacer))replacer = function(key, value){ 994 if($replacer)value = $replacer.call(this, key, value); 995 if(!isSymbol(value))return value; 996 }; 997 args[1] = replacer; 998 return _stringify.apply($JSON, args); 999 }; 1000 var buggyJSON = $fails(function(){ 1001 var S = $Symbol(); 1002 // MS Edge converts symbol values to JSON as {} 1003 // WebKit converts symbol values to JSON as null 1004 // V8 throws on boxed symbols 1005 return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; 1006 }); 1007 1008 // 19.4.1.1 Symbol([description]) 1009 if(!useNative){ 1010 $Symbol = function Symbol(){ 1011 if(isSymbol(this))throw TypeError('Symbol is not a constructor'); 1012 return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); 1013 }; 1014 redefine($Symbol.prototype, 'toString', function toString(){ 1015 return this._k; 1016 }); 1017 1018 isSymbol = function(it){ 1019 return it instanceof $Symbol; 1020 }; 1021 1022 $.create = $create; 1023 $.isEnum = $propertyIsEnumerable; 1024 $.getDesc = $getOwnPropertyDescriptor; 1025 $.setDesc = $defineProperty; 1026 $.setDescs = $defineProperties; 1027 $.getNames = $names.get = $getOwnPropertyNames; 1028 $.getSymbols = $getOwnPropertySymbols; 1029 1030 if(DESCRIPTORS && !__webpack_require__(41)){ 1031 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); 1032 } 1033 } 1034 1035 var symbolStatics = { 1036 // 19.4.2.1 Symbol.for(key) 1037 'for': function(key){ 1038 return has(SymbolRegistry, key += '') 1039 ? SymbolRegistry[key] 1040 : SymbolRegistry[key] = $Symbol(key); 1041 }, 1042 // 19.4.2.5 Symbol.keyFor(sym) 1043 keyFor: function keyFor(key){ 1044 return keyOf(SymbolRegistry, key); 1045 }, 1046 useSetter: function(){ setter = true; }, 1047 useSimple: function(){ setter = false; } 1048 }; 1049 // 19.4.2.2 Symbol.hasInstance 1050 // 19.4.2.3 Symbol.isConcatSpreadable 1051 // 19.4.2.4 Symbol.iterator 1052 // 19.4.2.6 Symbol.match 1053 // 19.4.2.8 Symbol.replace 1054 // 19.4.2.9 Symbol.search 1055 // 19.4.2.10 Symbol.species 1056 // 19.4.2.11 Symbol.split 1057 // 19.4.2.12 Symbol.toPrimitive 1058 // 19.4.2.13 Symbol.toStringTag 1059 // 19.4.2.14 Symbol.unscopables 1060 $.each.call(( 1061 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + 1062 'species,split,toPrimitive,toStringTag,unscopables' 1063 ).split(','), function(it){ 1064 var sym = wks(it); 1065 symbolStatics[it] = useNative ? sym : wrap(sym); 1066 }); 1067 1068 setter = true; 1069 1070 $export($export.G + $export.W, {Symbol: $Symbol}); 1071 1072 $export($export.S, 'Symbol', symbolStatics); 1073 1074 $export($export.S + $export.F * !useNative, 'Object', { 1075 // 19.1.2.2 Object.create(O [, Properties]) 1076 create: $create, 1077 // 19.1.2.4 Object.defineProperty(O, P, Attributes) 1078 defineProperty: $defineProperty, 1079 // 19.1.2.3 Object.defineProperties(O, Properties) 1080 defineProperties: $defineProperties, 1081 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) 1082 getOwnPropertyDescriptor: $getOwnPropertyDescriptor, 1083 // 19.1.2.7 Object.getOwnPropertyNames(O) 1084 getOwnPropertyNames: $getOwnPropertyNames, 1085 // 19.1.2.8 Object.getOwnPropertySymbols(O) 1086 getOwnPropertySymbols: $getOwnPropertySymbols 1087 }); 1088 1089 // 24.3.2 JSON.stringify(value [, replacer [, space]]) 1090 $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); 1091 1092 // 19.4.3.5 Symbol.prototype[@@toStringTag] 1093 setToStringTag($Symbol, 'Symbol'); 1094 // 20.2.1.9 Math[@@toStringTag] 1095 setToStringTag(Math, 'Math', true); 1096 // 24.3.3 JSON[@@toStringTag] 1097 setToStringTag(global.JSON, 'JSON', true); 1098 1099/***/ }), 1100/* 16 */ 1101/***/ (function(module, exports) { 1102 1103 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 1104 var global = module.exports = typeof window != 'undefined' && window.Math == Math 1105 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); 1106 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef 1107 1108/***/ }), 1109/* 17 */ 1110/***/ (function(module, exports) { 1111 1112 var hasOwnProperty = {}.hasOwnProperty; 1113 module.exports = function(it, key){ 1114 return hasOwnProperty.call(it, key); 1115 }; 1116 1117/***/ }), 1118/* 18 */ 1119/***/ (function(module, exports, __webpack_require__) { 1120 1121 // Thank's IE8 for his funny defineProperty 1122 module.exports = !__webpack_require__(19)(function(){ 1123 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; 1124 }); 1125 1126/***/ }), 1127/* 19 */ 1128/***/ (function(module, exports) { 1129 1130 module.exports = function(exec){ 1131 try { 1132 return !!exec(); 1133 } catch(e){ 1134 return true; 1135 } 1136 }; 1137 1138/***/ }), 1139/* 20 */ 1140/***/ (function(module, exports, __webpack_require__) { 1141 1142 var global = __webpack_require__(16) 1143 , core = __webpack_require__(21) 1144 , ctx = __webpack_require__(22) 1145 , PROTOTYPE = 'prototype'; 1146 1147 var $export = function(type, name, source){ 1148 var IS_FORCED = type & $export.F 1149 , IS_GLOBAL = type & $export.G 1150 , IS_STATIC = type & $export.S 1151 , IS_PROTO = type & $export.P 1152 , IS_BIND = type & $export.B 1153 , IS_WRAP = type & $export.W 1154 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) 1155 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] 1156 , key, own, out; 1157 if(IS_GLOBAL)source = name; 1158 for(key in source){ 1159 // contains in native 1160 own = !IS_FORCED && target && key in target; 1161 if(own && key in exports)continue; 1162 // export native or passed 1163 out = own ? target[key] : source[key]; 1164 // prevent global pollution for namespaces 1165 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] 1166 // bind timers to global for call from export context 1167 : IS_BIND && own ? ctx(out, global) 1168 // wrap global constructors for prevent change them in library 1169 : IS_WRAP && target[key] == out ? (function(C){ 1170 var F = function(param){ 1171 return this instanceof C ? new C(param) : C(param); 1172 }; 1173 F[PROTOTYPE] = C[PROTOTYPE]; 1174 return F; 1175 // make static versions for prototype methods 1176 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 1177 if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; 1178 } 1179 }; 1180 // type bitmap 1181 $export.F = 1; // forced 1182 $export.G = 2; // global 1183 $export.S = 4; // static 1184 $export.P = 8; // proto 1185 $export.B = 16; // bind 1186 $export.W = 32; // wrap 1187 module.exports = $export; 1188 1189/***/ }), 1190/* 21 */ 1191/***/ (function(module, exports) { 1192 1193 var core = module.exports = {version: '1.2.6'}; 1194 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef 1195 1196/***/ }), 1197/* 22 */ 1198/***/ (function(module, exports, __webpack_require__) { 1199 1200 // optional / simple context binding 1201 var aFunction = __webpack_require__(23); 1202 module.exports = function(fn, that, length){ 1203 aFunction(fn); 1204 if(that === undefined)return fn; 1205 switch(length){ 1206 case 1: return function(a){ 1207 return fn.call(that, a); 1208 }; 1209 case 2: return function(a, b){ 1210 return fn.call(that, a, b); 1211 }; 1212 case 3: return function(a, b, c){ 1213 return fn.call(that, a, b, c); 1214 }; 1215 } 1216 return function(/* ...args */){ 1217 return fn.apply(that, arguments); 1218 }; 1219 }; 1220 1221/***/ }), 1222/* 23 */ 1223/***/ (function(module, exports) { 1224 1225 module.exports = function(it){ 1226 if(typeof it != 'function')throw TypeError(it + ' is not a function!'); 1227 return it; 1228 }; 1229 1230/***/ }), 1231/* 24 */ 1232/***/ (function(module, exports, __webpack_require__) { 1233 1234 module.exports = __webpack_require__(25); 1235 1236/***/ }), 1237/* 25 */ 1238/***/ (function(module, exports, __webpack_require__) { 1239 1240 var $ = __webpack_require__(9) 1241 , createDesc = __webpack_require__(26); 1242 module.exports = __webpack_require__(18) ? function(object, key, value){ 1243 return $.setDesc(object, key, createDesc(1, value)); 1244 } : function(object, key, value){ 1245 object[key] = value; 1246 return object; 1247 }; 1248 1249/***/ }), 1250/* 26 */ 1251/***/ (function(module, exports) { 1252 1253 module.exports = function(bitmap, value){ 1254 return { 1255 enumerable : !(bitmap & 1), 1256 configurable: !(bitmap & 2), 1257 writable : !(bitmap & 4), 1258 value : value 1259 }; 1260 }; 1261 1262/***/ }), 1263/* 27 */ 1264/***/ (function(module, exports, __webpack_require__) { 1265 1266 var global = __webpack_require__(16) 1267 , SHARED = '__core-js_shared__' 1268 , store = global[SHARED] || (global[SHARED] = {}); 1269 module.exports = function(key){ 1270 return store[key] || (store[key] = {}); 1271 }; 1272 1273/***/ }), 1274/* 28 */ 1275/***/ (function(module, exports, __webpack_require__) { 1276 1277 var def = __webpack_require__(9).setDesc 1278 , has = __webpack_require__(17) 1279 , TAG = __webpack_require__(29)('toStringTag'); 1280 1281 module.exports = function(it, tag, stat){ 1282 if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); 1283 }; 1284 1285/***/ }), 1286/* 29 */ 1287/***/ (function(module, exports, __webpack_require__) { 1288 1289 var store = __webpack_require__(27)('wks') 1290 , uid = __webpack_require__(30) 1291 , Symbol = __webpack_require__(16).Symbol; 1292 module.exports = function(name){ 1293 return store[name] || (store[name] = 1294 Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); 1295 }; 1296 1297/***/ }), 1298/* 30 */ 1299/***/ (function(module, exports) { 1300 1301 var id = 0 1302 , px = Math.random(); 1303 module.exports = function(key){ 1304 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 1305 }; 1306 1307/***/ }), 1308/* 31 */ 1309/***/ (function(module, exports, __webpack_require__) { 1310 1311 var $ = __webpack_require__(9) 1312 , toIObject = __webpack_require__(32); 1313 module.exports = function(object, el){ 1314 var O = toIObject(object) 1315 , keys = $.getKeys(O) 1316 , length = keys.length 1317 , index = 0 1318 , key; 1319 while(length > index)if(O[key = keys[index++]] === el)return key; 1320 }; 1321 1322/***/ }), 1323/* 32 */ 1324/***/ (function(module, exports, __webpack_require__) { 1325 1326 // to indexed object, toObject with fallback for non-array-like ES3 strings 1327 var IObject = __webpack_require__(33) 1328 , defined = __webpack_require__(35); 1329 module.exports = function(it){ 1330 return IObject(defined(it)); 1331 }; 1332 1333/***/ }), 1334/* 33 */ 1335/***/ (function(module, exports, __webpack_require__) { 1336 1337 // fallback for non-array-like ES3 and non-enumerable old V8 strings 1338 var cof = __webpack_require__(34); 1339 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ 1340 return cof(it) == 'String' ? it.split('') : Object(it); 1341 }; 1342 1343/***/ }), 1344/* 34 */ 1345/***/ (function(module, exports) { 1346 1347 var toString = {}.toString; 1348 1349 module.exports = function(it){ 1350 return toString.call(it).slice(8, -1); 1351 }; 1352 1353/***/ }), 1354/* 35 */ 1355/***/ (function(module, exports) { 1356 1357 // 7.2.1 RequireObjectCoercible(argument) 1358 module.exports = function(it){ 1359 if(it == undefined)throw TypeError("Can't call method on " + it); 1360 return it; 1361 }; 1362 1363/***/ }), 1364/* 36 */ 1365/***/ (function(module, exports, __webpack_require__) { 1366 1367 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 1368 var toIObject = __webpack_require__(32) 1369 , getNames = __webpack_require__(9).getNames 1370 , toString = {}.toString; 1371 1372 var windowNames = typeof window == 'object' && Object.getOwnPropertyNames 1373 ? Object.getOwnPropertyNames(window) : []; 1374 1375 var getWindowNames = function(it){ 1376 try { 1377 return getNames(it); 1378 } catch(e){ 1379 return windowNames.slice(); 1380 } 1381 }; 1382 1383 module.exports.get = function getOwnPropertyNames(it){ 1384 if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); 1385 return getNames(toIObject(it)); 1386 }; 1387 1388/***/ }), 1389/* 37 */ 1390/***/ (function(module, exports, __webpack_require__) { 1391 1392 // all enumerable object keys, includes symbols 1393 var $ = __webpack_require__(9); 1394 module.exports = function(it){ 1395 var keys = $.getKeys(it) 1396 , getSymbols = $.getSymbols; 1397 if(getSymbols){ 1398 var symbols = getSymbols(it) 1399 , isEnum = $.isEnum 1400 , i = 0 1401 , key; 1402 while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); 1403 } 1404 return keys; 1405 }; 1406 1407/***/ }), 1408/* 38 */ 1409/***/ (function(module, exports, __webpack_require__) { 1410 1411 // 7.2.2 IsArray(argument) 1412 var cof = __webpack_require__(34); 1413 module.exports = Array.isArray || function(arg){ 1414 return cof(arg) == 'Array'; 1415 }; 1416 1417/***/ }), 1418/* 39 */ 1419/***/ (function(module, exports, __webpack_require__) { 1420 1421 var isObject = __webpack_require__(40); 1422 module.exports = function(it){ 1423 if(!isObject(it))throw TypeError(it + ' is not an object!'); 1424 return it; 1425 }; 1426 1427/***/ }), 1428/* 40 */ 1429/***/ (function(module, exports) { 1430 1431 module.exports = function(it){ 1432 return typeof it === 'object' ? it !== null : typeof it === 'function'; 1433 }; 1434 1435/***/ }), 1436/* 41 */ 1437/***/ (function(module, exports) { 1438 1439 module.exports = true; 1440 1441/***/ }), 1442/* 42 */ 1443/***/ (function(module, exports) { 1444 1445 1446 1447/***/ }), 1448/* 43 */ 1449/***/ (function(module, exports, __webpack_require__) { 1450 1451 module.exports = { "default": __webpack_require__(44), __esModule: true }; 1452 1453/***/ }), 1454/* 44 */ 1455/***/ (function(module, exports, __webpack_require__) { 1456 1457 __webpack_require__(45); 1458 __webpack_require__(51); 1459 module.exports = __webpack_require__(29)('iterator'); 1460 1461/***/ }), 1462/* 45 */ 1463/***/ (function(module, exports, __webpack_require__) { 1464 1465 'use strict'; 1466 var $at = __webpack_require__(46)(true); 1467 1468 // 21.1.3.27 String.prototype[@@iterator]() 1469 __webpack_require__(48)(String, 'String', function(iterated){ 1470 this._t = String(iterated); // target 1471 this._i = 0; // next index 1472 // 21.1.5.2.1 %StringIteratorPrototype%.next() 1473 }, function(){ 1474 var O = this._t 1475 , index = this._i 1476 , point; 1477 if(index >= O.length)return {value: undefined, done: true}; 1478 point = $at(O, index); 1479 this._i += point.length; 1480 return {value: point, done: false}; 1481 }); 1482 1483/***/ }), 1484/* 46 */ 1485/***/ (function(module, exports, __webpack_require__) { 1486 1487 var toInteger = __webpack_require__(47) 1488 , defined = __webpack_require__(35); 1489 // true -> String#at 1490 // false -> String#codePointAt 1491 module.exports = function(TO_STRING){ 1492 return function(that, pos){ 1493 var s = String(defined(that)) 1494 , i = toInteger(pos) 1495 , l = s.length 1496 , a, b; 1497 if(i < 0 || i >= l)return TO_STRING ? '' : undefined; 1498 a = s.charCodeAt(i); 1499 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff 1500 ? TO_STRING ? s.charAt(i) : a 1501 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; 1502 }; 1503 }; 1504 1505/***/ }), 1506/* 47 */ 1507/***/ (function(module, exports) { 1508 1509 // 7.1.4 ToInteger 1510 var ceil = Math.ceil 1511 , floor = Math.floor; 1512 module.exports = function(it){ 1513 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 1514 }; 1515 1516/***/ }), 1517/* 48 */ 1518/***/ (function(module, exports, __webpack_require__) { 1519 1520 'use strict'; 1521 var LIBRARY = __webpack_require__(41) 1522 , $export = __webpack_require__(20) 1523 , redefine = __webpack_require__(24) 1524 , hide = __webpack_require__(25) 1525 , has = __webpack_require__(17) 1526 , Iterators = __webpack_require__(49) 1527 , $iterCreate = __webpack_require__(50) 1528 , setToStringTag = __webpack_require__(28) 1529 , getProto = __webpack_require__(9).getProto 1530 , ITERATOR = __webpack_require__(29)('iterator') 1531 , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` 1532 , FF_ITERATOR = '@@iterator' 1533 , KEYS = 'keys' 1534 , VALUES = 'values'; 1535 1536 var returnThis = function(){ return this; }; 1537 1538 module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ 1539 $iterCreate(Constructor, NAME, next); 1540 var getMethod = function(kind){ 1541 if(!BUGGY && kind in proto)return proto[kind]; 1542 switch(kind){ 1543 case KEYS: return function keys(){ return new Constructor(this, kind); }; 1544 case VALUES: return function values(){ return new Constructor(this, kind); }; 1545 } return function entries(){ return new Constructor(this, kind); }; 1546 }; 1547 var TAG = NAME + ' Iterator' 1548 , DEF_VALUES = DEFAULT == VALUES 1549 , VALUES_BUG = false 1550 , proto = Base.prototype 1551 , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] 1552 , $default = $native || getMethod(DEFAULT) 1553 , methods, key; 1554 // Fix native 1555 if($native){ 1556 var IteratorPrototype = getProto($default.call(new Base)); 1557 // Set @@toStringTag to native iterators 1558 setToStringTag(IteratorPrototype, TAG, true); 1559 // FF fix 1560 if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); 1561 // fix Array#{values, @@iterator}.name in V8 / FF 1562 if(DEF_VALUES && $native.name !== VALUES){ 1563 VALUES_BUG = true; 1564 $default = function values(){ return $native.call(this); }; 1565 } 1566 } 1567 // Define iterator 1568 if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ 1569 hide(proto, ITERATOR, $default); 1570 } 1571 // Plug for library 1572 Iterators[NAME] = $default; 1573 Iterators[TAG] = returnThis; 1574 if(DEFAULT){ 1575 methods = { 1576 values: DEF_VALUES ? $default : getMethod(VALUES), 1577 keys: IS_SET ? $default : getMethod(KEYS), 1578 entries: !DEF_VALUES ? $default : getMethod('entries') 1579 }; 1580 if(FORCED)for(key in methods){ 1581 if(!(key in proto))redefine(proto, key, methods[key]); 1582 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 1583 } 1584 return methods; 1585 }; 1586 1587/***/ }), 1588/* 49 */ 1589/***/ (function(module, exports) { 1590 1591 module.exports = {}; 1592 1593/***/ }), 1594/* 50 */ 1595/***/ (function(module, exports, __webpack_require__) { 1596 1597 'use strict'; 1598 var $ = __webpack_require__(9) 1599 , descriptor = __webpack_require__(26) 1600 , setToStringTag = __webpack_require__(28) 1601 , IteratorPrototype = {}; 1602 1603 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 1604 __webpack_require__(25)(IteratorPrototype, __webpack_require__(29)('iterator'), function(){ return this; }); 1605 1606 module.exports = function(Constructor, NAME, next){ 1607 Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); 1608 setToStringTag(Constructor, NAME + ' Iterator'); 1609 }; 1610 1611/***/ }), 1612/* 51 */ 1613/***/ (function(module, exports, __webpack_require__) { 1614 1615 __webpack_require__(52); 1616 var Iterators = __webpack_require__(49); 1617 Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; 1618 1619/***/ }), 1620/* 52 */ 1621/***/ (function(module, exports, __webpack_require__) { 1622 1623 'use strict'; 1624 var addToUnscopables = __webpack_require__(53) 1625 , step = __webpack_require__(54) 1626 , Iterators = __webpack_require__(49) 1627 , toIObject = __webpack_require__(32); 1628 1629 // 22.1.3.4 Array.prototype.entries() 1630 // 22.1.3.13 Array.prototype.keys() 1631 // 22.1.3.29 Array.prototype.values() 1632 // 22.1.3.30 Array.prototype[@@iterator]() 1633 module.exports = __webpack_require__(48)(Array, 'Array', function(iterated, kind){ 1634 this._t = toIObject(iterated); // target 1635 this._i = 0; // next index 1636 this._k = kind; // kind 1637 // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 1638 }, function(){ 1639 var O = this._t 1640 , kind = this._k 1641 , index = this._i++; 1642 if(!O || index >= O.length){ 1643 this._t = undefined; 1644 return step(1); 1645 } 1646 if(kind == 'keys' )return step(0, index); 1647 if(kind == 'values')return step(0, O[index]); 1648 return step(0, [index, O[index]]); 1649 }, 'values'); 1650 1651 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 1652 Iterators.Arguments = Iterators.Array; 1653 1654 addToUnscopables('keys'); 1655 addToUnscopables('values'); 1656 addToUnscopables('entries'); 1657 1658/***/ }), 1659/* 53 */ 1660/***/ (function(module, exports) { 1661 1662 module.exports = function(){ /* empty */ }; 1663 1664/***/ }), 1665/* 54 */ 1666/***/ (function(module, exports) { 1667 1668 module.exports = function(done, value){ 1669 return {value: value, done: !!done}; 1670 }; 1671 1672/***/ }), 1673/* 55 */ 1674/***/ (function(module, exports, __webpack_require__) { 1675 1676 module.exports = { "default": __webpack_require__(56), __esModule: true }; 1677 1678/***/ }), 1679/* 56 */ 1680/***/ (function(module, exports, __webpack_require__) { 1681 1682 __webpack_require__(51); 1683 __webpack_require__(45); 1684 module.exports = __webpack_require__(57); 1685 1686/***/ }), 1687/* 57 */ 1688/***/ (function(module, exports, __webpack_require__) { 1689 1690 var anObject = __webpack_require__(39) 1691 , get = __webpack_require__(58); 1692 module.exports = __webpack_require__(21).getIterator = function(it){ 1693 var iterFn = get(it); 1694 if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); 1695 return anObject(iterFn.call(it)); 1696 }; 1697 1698/***/ }), 1699/* 58 */ 1700/***/ (function(module, exports, __webpack_require__) { 1701 1702 var classof = __webpack_require__(59) 1703 , ITERATOR = __webpack_require__(29)('iterator') 1704 , Iterators = __webpack_require__(49); 1705 module.exports = __webpack_require__(21).getIteratorMethod = function(it){ 1706 if(it != undefined)return it[ITERATOR] 1707 || it['@@iterator'] 1708 || Iterators[classof(it)]; 1709 }; 1710 1711/***/ }), 1712/* 59 */ 1713/***/ (function(module, exports, __webpack_require__) { 1714 1715 // getting tag from 19.1.3.6 Object.prototype.toString() 1716 var cof = __webpack_require__(34) 1717 , TAG = __webpack_require__(29)('toStringTag') 1718 // ES3 wrong here 1719 , ARG = cof(function(){ return arguments; }()) == 'Arguments'; 1720 1721 module.exports = function(it){ 1722 var O, T, B; 1723 return it === undefined ? 'Undefined' : it === null ? 'Null' 1724 // @@toStringTag case 1725 : typeof (T = (O = Object(it))[TAG]) == 'string' ? T 1726 // builtinTag case 1727 : ARG ? cof(O) 1728 // ES3 arguments fallback 1729 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; 1730 }; 1731 1732/***/ }), 1733/* 60 */ 1734/***/ (function(module, exports, __webpack_require__) { 1735 1736 module.exports = { "default": __webpack_require__(61), __esModule: true }; 1737 1738/***/ }), 1739/* 61 */ 1740/***/ (function(module, exports, __webpack_require__) { 1741 1742 __webpack_require__(62); 1743 module.exports = __webpack_require__(21).Object.keys; 1744 1745/***/ }), 1746/* 62 */ 1747/***/ (function(module, exports, __webpack_require__) { 1748 1749 // 19.1.2.14 Object.keys(O) 1750 var toObject = __webpack_require__(63); 1751 1752 __webpack_require__(64)('keys', function($keys){ 1753 return function keys(it){ 1754 return $keys(toObject(it)); 1755 }; 1756 }); 1757 1758/***/ }), 1759/* 63 */ 1760/***/ (function(module, exports, __webpack_require__) { 1761 1762 // 7.1.13 ToObject(argument) 1763 var defined = __webpack_require__(35); 1764 module.exports = function(it){ 1765 return Object(defined(it)); 1766 }; 1767 1768/***/ }), 1769/* 64 */ 1770/***/ (function(module, exports, __webpack_require__) { 1771 1772 // most Object methods by ES6 should accept primitives 1773 var $export = __webpack_require__(20) 1774 , core = __webpack_require__(21) 1775 , fails = __webpack_require__(19); 1776 module.exports = function(KEY, exec){ 1777 var fn = (core.Object || {})[KEY] || Object[KEY] 1778 , exp = {}; 1779 exp[KEY] = exec(fn); 1780 $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); 1781 }; 1782 1783/***/ }), 1784/* 65 */ 1785/***/ (function(module, exports, __webpack_require__) { 1786 1787 'use strict'; 1788 1789 var _interopRequireDefault = __webpack_require__(1)['default']; 1790 1791 exports.__esModule = true; 1792 1793 var _exception = __webpack_require__(6); 1794 1795 var _exception2 = _interopRequireDefault(_exception); 1796 1797 exports['default'] = function (instance) { 1798 instance.registerHelper('helperMissing', function () /* [args, ]options */{ 1799 if (arguments.length === 1) { 1800 // A missing field in a {{foo}} construct. 1801 return undefined; 1802 } else { 1803 // Someone is actually trying to call something, blow up. 1804 throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 1805 } 1806 }); 1807 }; 1808 1809 module.exports = exports['default']; 1810 1811/***/ }), 1812/* 66 */ 1813/***/ (function(module, exports, __webpack_require__) { 1814 1815 'use strict'; 1816 1817 var _interopRequireDefault = __webpack_require__(1)['default']; 1818 1819 exports.__esModule = true; 1820 1821 var _utils = __webpack_require__(5); 1822 1823 var _exception = __webpack_require__(6); 1824 1825 var _exception2 = _interopRequireDefault(_exception); 1826 1827 exports['default'] = function (instance) { 1828 instance.registerHelper('if', function (conditional, options) { 1829 if (arguments.length != 2) { 1830 throw new _exception2['default']('#if requires exactly one argument'); 1831 } 1832 if (_utils.isFunction(conditional)) { 1833 conditional = conditional.call(this); 1834 } 1835 1836 // Default behavior is to render the positive path if the value is truthy and not empty. 1837 // The `includeZero` option may be set to treat the condtional as purely not empty based on the 1838 // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. 1839 if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { 1840 return options.inverse(this); 1841 } else { 1842 return options.fn(this); 1843 } 1844 }); 1845 1846 instance.registerHelper('unless', function (conditional, options) { 1847 if (arguments.length != 2) { 1848 throw new _exception2['default']('#unless requires exactly one argument'); 1849 } 1850 return instance.helpers['if'].call(this, conditional, { 1851 fn: options.inverse, 1852 inverse: options.fn, 1853 hash: options.hash 1854 }); 1855 }); 1856 }; 1857 1858 module.exports = exports['default']; 1859 1860/***/ }), 1861/* 67 */ 1862/***/ (function(module, exports) { 1863 1864 'use strict'; 1865 1866 exports.__esModule = true; 1867 1868 exports['default'] = function (instance) { 1869 instance.registerHelper('log', function () /* message, options */{ 1870 var args = [undefined], 1871 options = arguments[arguments.length - 1]; 1872 for (var i = 0; i < arguments.length - 1; i++) { 1873 args.push(arguments[i]); 1874 } 1875 1876 var level = 1; 1877 if (options.hash.level != null) { 1878 level = options.hash.level; 1879 } else if (options.data && options.data.level != null) { 1880 level = options.data.level; 1881 } 1882 args[0] = level; 1883 1884 instance.log.apply(instance, args); 1885 }); 1886 }; 1887 1888 module.exports = exports['default']; 1889 1890/***/ }), 1891/* 68 */ 1892/***/ (function(module, exports) { 1893 1894 'use strict'; 1895 1896 exports.__esModule = true; 1897 1898 exports['default'] = function (instance) { 1899 instance.registerHelper('lookup', function (obj, field, options) { 1900 if (!obj) { 1901 // Note for 5.0: Change to "obj == null" in 5.0 1902 return obj; 1903 } 1904 return options.lookupProperty(obj, field); 1905 }); 1906 }; 1907 1908 module.exports = exports['default']; 1909 1910/***/ }), 1911/* 69 */ 1912/***/ (function(module, exports, __webpack_require__) { 1913 1914 'use strict'; 1915 1916 var _interopRequireDefault = __webpack_require__(1)['default']; 1917 1918 exports.__esModule = true; 1919 1920 var _utils = __webpack_require__(5); 1921 1922 var _exception = __webpack_require__(6); 1923 1924 var _exception2 = _interopRequireDefault(_exception); 1925 1926 exports['default'] = function (instance) { 1927 instance.registerHelper('with', function (context, options) { 1928 if (arguments.length != 2) { 1929 throw new _exception2['default']('#with requires exactly one argument'); 1930 } 1931 if (_utils.isFunction(context)) { 1932 context = context.call(this); 1933 } 1934 1935 var fn = options.fn; 1936 1937 if (!_utils.isEmpty(context)) { 1938 var data = options.data; 1939 if (options.data && options.ids) { 1940 data = _utils.createFrame(options.data); 1941 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); 1942 } 1943 1944 return fn(context, { 1945 data: data, 1946 blockParams: _utils.blockParams([context], [data && data.contextPath]) 1947 }); 1948 } else { 1949 return options.inverse(this); 1950 } 1951 }); 1952 }; 1953 1954 module.exports = exports['default']; 1955 1956/***/ }), 1957/* 70 */ 1958/***/ (function(module, exports, __webpack_require__) { 1959 1960 'use strict'; 1961 1962 var _interopRequireDefault = __webpack_require__(1)['default']; 1963 1964 exports.__esModule = true; 1965 exports.registerDefaultDecorators = registerDefaultDecorators; 1966 1967 var _decoratorsInline = __webpack_require__(71); 1968 1969 var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); 1970 1971 function registerDefaultDecorators(instance) { 1972 _decoratorsInline2['default'](instance); 1973 } 1974 1975/***/ }), 1976/* 71 */ 1977/***/ (function(module, exports, __webpack_require__) { 1978 1979 'use strict'; 1980 1981 exports.__esModule = true; 1982 1983 var _utils = __webpack_require__(5); 1984 1985 exports['default'] = function (instance) { 1986 instance.registerDecorator('inline', function (fn, props, container, options) { 1987 var ret = fn; 1988 if (!props.partials) { 1989 props.partials = {}; 1990 ret = function (context, options) { 1991 // Create a new partials stack frame prior to exec. 1992 var original = container.partials; 1993 container.partials = _utils.extend({}, original, props.partials); 1994 var ret = fn(context, options); 1995 container.partials = original; 1996 return ret; 1997 }; 1998 } 1999 2000 props.partials[options.args[0]] = options.fn; 2001 2002 return ret; 2003 }); 2004 }; 2005 2006 module.exports = exports['default']; 2007 2008/***/ }), 2009/* 72 */ 2010/***/ (function(module, exports, __webpack_require__) { 2011 2012 'use strict'; 2013 2014 exports.__esModule = true; 2015 2016 var _utils = __webpack_require__(5); 2017 2018 var logger = { 2019 methodMap: ['debug', 'info', 'warn', 'error'], 2020 level: 'info', 2021 2022 // Maps a given level value to the `methodMap` indexes above. 2023 lookupLevel: function lookupLevel(level) { 2024 if (typeof level === 'string') { 2025 var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); 2026 if (levelMap >= 0) { 2027 level = levelMap; 2028 } else { 2029 level = parseInt(level, 10); 2030 } 2031 } 2032 2033 return level; 2034 }, 2035 2036 // Can be overridden in the host environment 2037 log: function log(level) { 2038 level = logger.lookupLevel(level); 2039 2040 if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { 2041 var method = logger.methodMap[level]; 2042 // eslint-disable-next-line no-console 2043 if (!console[method]) { 2044 method = 'log'; 2045 } 2046 2047 for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 2048 message[_key - 1] = arguments[_key]; 2049 } 2050 2051 console[method].apply(console, message); // eslint-disable-line no-console 2052 } 2053 } 2054 }; 2055 2056 exports['default'] = logger; 2057 module.exports = exports['default']; 2058 2059/***/ }), 2060/* 73 */ 2061/***/ (function(module, exports, __webpack_require__) { 2062 2063 'use strict'; 2064 2065 var _Object$create = __webpack_require__(74)['default']; 2066 2067 var _Object$keys = __webpack_require__(60)['default']; 2068 2069 var _interopRequireDefault = __webpack_require__(1)['default']; 2070 2071 exports.__esModule = true; 2072 exports.createProtoAccessControl = createProtoAccessControl; 2073 exports.resultIsAllowed = resultIsAllowed; 2074 exports.
2074isPrototypeConstructor = isPrototypeConstructor; 2075 exports.resetLoggedProperties = resetLoggedProperties; 2076 2077 var _utils = __webpack_require__(5); 2078 2079 var _logger = __webpack_require__(72); 2080 2081 var _logger2 = _interopRequireDefault(_logger); 2082 2083 var loggedProperties = _Object$create(null); 2084 2085 function createProtoAccessControl(runtimeOptions) { 2086 // Create an object with "null"-prototype to avoid truthy results on 2087 // prototype properties. 2088 var propertyWhiteList = _Object$create(null); 2089 // eslint-disable-next-line no-proto 2090 propertyWhiteList['__proto__'] = false;
vendor: 12,971 bytes, lines 2091-2448
2091 _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties); 2092 2093 var methodWhiteList = _Object$create(null); 2094 methodWhiteList['constructor'] = false; 2095 methodWhiteList['__defineGetter__'] = false; 2096 methodWhiteList['__defineSetter__'] = false; 2097 methodWhiteList['__lookupGetter__'] = false; 2098 methodWhiteList['__lookupSetter__'] = false; 2099 _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods); 2100 2101 return { 2102 properties: { 2103 whitelist: propertyWhiteList, 2104 defaultValue: runtimeOptions.allowProtoPropertiesByDefault 2105 }, 2106 methods: { 2107 whitelist: methodWhiteList, 2108 defaultValue: runtimeOptions.allowProtoMethodsByDefault 2109 } 2110 }; 2111 } 2112 2113 function resultIsAllowed(result, protoAccessControl, propertyName) { 2114 if (typeof result === 'function') { 2115 return checkWhiteList(protoAccessControl.methods, propertyName); 2116 } else { 2117 return checkWhiteList(protoAccessControl.properties, propertyName); 2118 } 2119 } 2120 2121 /** 2122 * Detect a prototype object's own "constructor" back-reference, e.g. 2123 * `Function.prototype.constructor === Function`. Because "constructor" is an 2124 * "own" property of such objects, it would otherwise bypass the prototype-access 2125 * checks and expose dangerous constructors (allowing arbitrary code execution). 2126 * 2127 * Only functions can be constructors, so other values are never treated as one 2128 * and their `prototype` is never read. 2129 * 2130 * @param {*} parent the object the property is being read from 2131 * @param {string} propertyName the property being looked up 2132 * @param {*} result the already-resolved value of `parent[propertyName]` 2133 * @returns {boolean} true if the lookup resolves `parent`'s own constructor 2134 */ 2135 2136 function isPrototypeConstructor(parent, propertyName, result) { 2137 return propertyName === 'constructor' && typeof result === 'function' && parent === result.prototype; 2138 } 2139 2140 function checkWhiteList(protoAccessControlForType, propertyName) { 2141 if (protoAccessControlForType.whitelist[propertyName] !== undefined) { 2142 return protoAccessControlForType.whitelist[propertyName] === true; 2143 } 2144 if (protoAccessControlForType.defaultValue !== undefined) { 2145 return protoAccessControlForType.defaultValue; 2146 } 2147 logUnexpecedPropertyAccessOnce(propertyName); 2148 return false; 2149 } 2150 2151 function logUnexpecedPropertyAccessOnce(propertyName) { 2152 if (loggedProperties[propertyName] !== true) { 2153 loggedProperties[propertyName] = true; 2154 _logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); 2155 } 2156 } 2157 2158 function resetLoggedProperties() { 2159 _Object$keys(loggedProperties).forEach(function (propertyName) { 2160 delete loggedProperties[propertyName]; 2161 }); 2162 } 2163 2164/***/ }), 2165/* 74 */ 2166/***/ (function(module, exports, __webpack_require__) { 2167 2168 module.exports = { "default": __webpack_require__(75), __esModule: true }; 2169 2170/***/ }), 2171/* 75 */ 2172/***/ (function(module, exports, __webpack_require__) { 2173 2174 var $ = __webpack_require__(9); 2175 module.exports = function create(P, D){ 2176 return $.create(P, D); 2177 }; 2178 2179/***/ }), 2180/* 76 */ 2181/***/ (function(module, exports) { 2182 2183 // Build out our basic SafeString type 2184 'use strict'; 2185 2186 exports.__esModule = true; 2187 function SafeString(string) { 2188 this.string = string; 2189 } 2190 2191 SafeString.prototype.toString = SafeString.prototype.toHTML = function () { 2192 return '' + this.string; 2193 }; 2194 2195 exports['default'] = SafeString; 2196 module.exports = exports['default']; 2197 2198/***/ }), 2199/* 77 */ 2200/***/ (function(module, exports, __webpack_require__) { 2201 2202 'use strict'; 2203 2204 var _Object$seal = __webpack_require__(78)['default']; 2205 2206 var _Object$keys = __webpack_require__(60)['default']; 2207 2208 var _interopRequireWildcard = __webpack_require__(3)['default']; 2209 2210 var _interopRequireDefault = __webpack_require__(1)['default']; 2211 2212 exports.__esModule = true; 2213 exports.checkRevision = checkRevision; 2214 exports.template = template; 2215 exports.wrapProgram = wrapProgram; 2216 exports.resolvePartial = resolvePartial; 2217 exports.invokePartial = invokePartial; 2218 exports.noop = noop; 2219 2220 var _utils = __webpack_require__(5); 2221 2222 var Utils = _interopRequireWildcard(_utils); 2223 2224 var _exception = __webpack_require__(6); 2225 2226 var _exception2 = _interopRequireDefault(_exception); 2227 2228 var _base = __webpack_require__(4); 2229 2230 var _helpers = __webpack_require__(10); 2231 2232 var _internalWrapHelper = __webpack_require__(81); 2233 2234 var _internalProtoAccess = __webpack_require__(73); 2235 2236 function checkRevision(compilerInfo) { 2237 var compilerRevision = compilerInfo && compilerInfo[0] || 1, 2238 currentRevision = _base.COMPILER_REVISION; 2239 2240 if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { 2241 return; 2242 } 2243 2244 if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { 2245 var runtimeVersions = _base.REVISION_CHANGES[currentRevision], 2246 compilerVersions = _base.REVISION_CHANGES[compilerRevision]; 2247 throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); 2248 } else { 2249 // Use the embedded version info since the runtime doesn't know about this revision yet 2250 throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); 2251 } 2252 } 2253 2254 function template(templateSpec, env) { 2255 /* istanbul ignore next */ 2256 if (!env) { 2257 throw new _exception2['default']('No environment passed to template'); 2258 } 2259 if (!templateSpec || !templateSpec.main) { 2260 throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); 2261 } 2262 2263 templateSpec.main.decorator = templateSpec.main_d; 2264 2265 // Note: Using env.VM references rather than local var references throughout this section to allow 2266 // for external users to override these as pseudo-supported APIs. 2267 env.VM.checkRevision(templateSpec.compiler); 2268 2269 // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) 2270 var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; 2271 2272 function invokePartialWrapper(partial, context, options) { 2273 if (options.hash) { 2274 context = Utils.extend({}, context, options.hash); 2275 if (options.ids) { 2276 options.ids[0] = true; 2277 } 2278 } 2279 partial = env.VM.resolvePartial.call(this, partial, context, options); 2280 2281 options.hooks = this.hooks; 2282 options.protoAccessControl = this.protoAccessControl; 2283 2284 var result = env.VM.invokePartial.call(this, partial, context, options); 2285 2286 // An empty result normally means the partial is template source that still 2287 // has to be compiled. A function partial has already been invoked, so an 2288 // empty result from it is a bug in that partial. 2289 if (result == null && Utils.isFunction(partial)) { 2290 throw new _exception2['default']('The partial ' + options.name + ' returned no output: partials must return a string'); 2291 } 2292 2293 if (result == null && env.compile) { 2294 // Only template source registered as a partial may be compiled here. 2295 // Anything else (e.g. an AST-shaped object) must not become code. 2296 if (typeof partial !== 'string') { 2297 throw new _exception2['default']('The partial ' + options.name + ' could not be compiled: partials must be strings or functions returning strings'); 2298 } 2299 options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); 2300 result = options.partials[options.name](context, options); 2301 } 2302 if (result != null) { 2303 if (options.indent) { 2304 var lines = result.split('\n'); 2305 for (var i = 0, l = lines.length; i < l; i++) { 2306 if (!lines[i] && i + 1 === l) { 2307 break; 2308 } 2309 2310 lines[i] = options.indent + lines[i]; 2311 } 2312 result = lines.join('\n'); 2313 } 2314 return result; 2315 } else { 2316 throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); 2317 } 2318 } 2319 2320 // Just add water 2321 var container = { 2322 strict: function strict(obj, name, loc) { 2323 if (!obj || !(name in obj)) { 2324 throw new _exception2['default']('"' + name + '" not defined in ' + obj, { 2325 loc: loc 2326 }); 2327 } 2328 return container.lookupProperty(obj, name); 2329 }, 2330 lookupProperty: function lookupProperty(parent, propertyName) { 2331 var result = parent[propertyName]; 2332 if (result == null) { 2333 return result; 2334 } 2335 // Own properties are trusted context data and returned as-is, except for 2336 // a prototype's own "constructor" back-reference (e.g. 2337 // Function.prototype.constructor === Function): that must still pass the 2338 // prototype-access deny list, otherwise the Function constructor becomes 2339 // reachable and arbitrary code can be executed. 2340 if (Object.prototype.hasOwnProperty.call(parent, propertyName) && !_internalProtoAccess.isPrototypeConstructor(parent, propertyName, result)) { 2341 return result; 2342 } 2343 2344 if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { 2345 return result; 2346 } 2347 return undefined; 2348 }, 2349 lookup: function lookup(depths, name) { 2350 var len = depths.length; 2351 for (var i = 0; i < len; i++) { 2352 var result = depths[i] && container.lookupProperty(depths[i], name); 2353 if (result != null) { 2354 return result; 2355 } 2356 } 2357 }, 2358 lambda: function lambda(current, context) { 2359 return typeof current === 'function' ? current.call(context) : current; 2360 }, 2361 2362 escapeExpression: Utils.escapeExpression, 2363 invokePartial: invokePartialWrapper, 2364 2365 fn: function fn(i) { 2366 var ret = templateSpec[i]; 2367 ret.decorator = templateSpec[i + '_d']; 2368 return ret; 2369 }, 2370 2371 programs: [], 2372 program: function program(i, data, declaredBlockParams, blockParams, depths) { 2373 var programWrapper = this.programs[i], 2374 fn = this.fn(i); 2375 if (data || depths || blockParams || declaredBlockParams) { 2376 programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); 2377 } else if (!programWrapper) { 2378 programWrapper = this.programs[i] = wrapProgram(this, i, fn); 2379 } 2380 return programWrapper; 2381 }, 2382 2383 data: function data(value, depth) { 2384 while (value && depth--) { 2385 value = value._parent; 2386 } 2387 return value; 2388 }, 2389 mergeIfNeeded: function mergeIfNeeded(param, common) { 2390 var obj = param || common; 2391 2392 if (param && common && param !== common) { 2393 obj = Utils.extend({}, common, param); 2394 } 2395 2396 return obj; 2397 }, 2398 // An empty object to use as replacement for null-contexts 2399 nullContext: _Object$seal({}), 2400 2401 noop: env.VM.noop, 2402 compilerInfo: templateSpec.compiler 2403 }; 2404 2405 function ret(context) { 2406 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2407 2408 var data = options.data; 2409 2410 ret._setup(options); 2411 if (!options.partial && templateSpec.useData) { 2412 data = initData(context, data); 2413 } 2414 var depths = undefined, 2415 blockParams = templateSpec.useBlockParams ? [] : undefined; 2416 if (templateSpec.useDepths) { 2417 if (options.depths) { 2418 depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; 2419 } else { 2420 depths = [context]; 2421 } 2422 } 2423 2424 function main(context /*, options*/) { 2425 return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); 2426 } 2427 2428 main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); 2429 return main(context, options); 2430 } 2431 2432 ret.isTop = true; 2433 2434 ret._setup = function (options) { 2435 if (!options.partial) { 2436 var mergedHelpers = {}; 2437 addHelpers(mergedHelpers, env.helpers, container); 2438 addHelpers(mergedHelpers, options.helpers, container); 2439 container.helpers = mergedHelpers; 2440 2441 if (templateSpec.usePartial) { 2442 // Use mergeIfNeeded here to prevent compiling global partials multiple times 2443 container.partials = container.mergeIfNeeded(options.partials, env.partials); 2444 } 2445 if (templateSpec.usePartial || templateSpec.useDecorators) { 2446 container.decorators = Utils.extend({}, env.decorators, options.decorators); 2447 } 2448
vendor: 5,033 bytes, lines 2449-2587
2449 container.hooks = {}; 2450 container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); 2451 2452 var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; 2453 _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); 2454 _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); 2455 } else { 2456 container.protoAccessControl = options.protoAccessControl; // internal option 2457 container.helpers = options.helpers; 2458 container.partials = options.partials; 2459 container.decorators = options.decorators; 2460 container.hooks = options.hooks; 2461 } 2462 }; 2463 2464 ret._child = function (i, data, blockParams, depths) { 2465 if (templateSpec.useBlockParams && !blockParams) { 2466 throw new _exception2['default']('must pass block params'); 2467 } 2468 if (templateSpec.useDepths && !depths) { 2469 throw new _exception2['default']('must pass parent depths'); 2470 } 2471 2472 return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); 2473 }; 2474 return ret; 2475 } 2476 2477 function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { 2478 function prog(context) { 2479 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2480 2481 var currentDepths = depths; 2482 if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { 2483 currentDepths = [context].concat(depths); 2484 } 2485 2486 return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); 2487 } 2488 2489 prog = executeDecorators(fn, prog, container, depths, data, blockParams); 2490 2491 prog.program = i; 2492 prog.depth = depths ? depths.length : 0; 2493 prog.blockParams = declaredBlockParams || 0; 2494 return prog; 2495 } 2496 2497 /** 2498 * This is currently part of the official API, therefore implementation details should not be changed. 2499 */ 2500 2501 function resolvePartial(partial, context, options) { 2502 if (!partial) { 2503 if (options.name === '@partial-block') { 2504 partial = lookupOwnProperty(options.data, 'partial-block'); 2505 } else { 2506 partial = lookupOwnProperty(options.partials, options.name); 2507 } 2508 } else if (typeof partial !== 'function' && !options.name) { 2509 // This is a dynamic partial that returned a name rather than a compiled 2510 // partial. Only functions are accepted as partials here; any other value 2511 // (including an object with a "call" property) is treated as a name, so 2512 // that context data can never be compiled as a template. 2513 options.name = partial; 2514 partial = lookupOwnProperty(options.partials, partial); 2515 } 2516 return partial; 2517 } 2518 2519 function invokePartial(partial, context, options) { 2520 // Use the current closure context to save the partial-block if this partial 2521 var currentPartialBlock = lookupOwnProperty(options.data, 'partial-block'); 2522 options.partial = true; 2523 if (options.ids) { 2524 options.data.contextPath = options.ids[0] || options.data.contextPath; 2525 } 2526 2527 var partialBlock = undefined; 2528 if (options.fn && options.fn !== noop) { 2529 (function () { 2530 options.data = _base.createFrame(options.data); 2531 // Wrapper function to get access to currentPartialBlock from the closure 2532 var fn = options.fn; 2533 partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { 2534 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2535 2536 // Restore the partial-block from the closure for the execution of the block 2537 // i.e. the part inside the block of the partial call. 2538 options.data = _base.createFrame(options.data); 2539 options.data['partial-block'] = currentPartialBlock; 2540 return fn(context, options); 2541 }; 2542 if (fn.partials) { 2543 options.partials = Utils.extend({}, options.partials, fn.partials); 2544 } 2545 })(); 2546 } 2547 2548 if (partial === undefined && partialBlock) { 2549 partial = partialBlock; 2550 } 2551 2552 if (partial === undefined) { 2553 throw new _exception2['default']('The partial ' + options.name + ' could not be found'); 2554 } else if (partial instanceof Function) { 2555 return partial(context, options); 2556 } 2557 } 2558 2559 function noop() { 2560 return ''; 2561 } 2562 2563 function lookupOwnProperty(obj, name) { 2564 if (obj && Object.prototype.hasOwnProperty.call(obj, name)) { 2565 return obj[name]; 2566 } 2567 } 2568 2569 function initData(context, data) { 2570 if (!data || !('root' in data)) { 2571 data = data ? _base.createFrame(data) : {}; 2572 data.root = context; 2573 } 2574 return data; 2575 } 2576 2577 function executeDecorators(fn, prog, container, depths, data, blockParams) { 2578 if (fn.decorator) { 2579 var props = {}; 2580 prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); 2581 Utils.extend(prog, props); 2582 } 2583 return prog; 2584 } 2585 2586 function addHelpers(mergedHelpers, helpers, container) { 2587 if (!helpers) return;
vendor: 9,809 bytes, lines 2588-2824
2588 _Object$keys(helpers).forEach(function (helperName) { 2589 var helper = helpers[helperName]; 2590 mergedHelpers[helperName] = passLookupPropertyOption(helper, container); 2591 }); 2592 } 2593 2594 function passLookupPropertyOption(helper, container) { 2595 var lookupProperty = container.lookupProperty; 2596 return _internalWrapHelper.wrapHelper(helper, function (options) { 2597 options.lookupProperty = lookupProperty; 2598 return options; 2599 }); 2600 } 2601 2602/***/ }), 2603/* 78 */ 2604/***/ (function(module, exports, __webpack_require__) { 2605 2606 module.exports = { "default": __webpack_require__(79), __esModule: true }; 2607 2608/***/ }), 2609/* 79 */ 2610/***/ (function(module, exports, __webpack_require__) { 2611 2612 __webpack_require__(80); 2613 module.exports = __webpack_require__(21).Object.seal; 2614 2615/***/ }), 2616/* 80 */ 2617/***/ (function(module, exports, __webpack_require__) { 2618 2619 // 19.1.2.17 Object.seal(O) 2620 var isObject = __webpack_require__(40); 2621 2622 __webpack_require__(64)('seal', function($seal){ 2623 return function seal(it){ 2624 return $seal && isObject(it) ? $seal(it) : it; 2625 }; 2626 }); 2627 2628/***/ }), 2629/* 81 */ 2630/***/ (function(module, exports) { 2631 2632 'use strict'; 2633 2634 exports.__esModule = true; 2635 exports.wrapHelper = wrapHelper; 2636 2637 function wrapHelper(helper, transformOptionsFn) { 2638 if (typeof helper !== 'function') { 2639 // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 2640 // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. 2641 return helper; 2642 } 2643 var wrapper = function wrapper() /* dynamic arguments */{ 2644 var options = arguments[arguments.length - 1]; 2645 arguments[arguments.length - 1] = transformOptionsFn(options); 2646 return helper.apply(this, arguments); 2647 }; 2648 return wrapper; 2649 } 2650 2651/***/ }), 2652/* 82 */ 2653/***/ (function(module, exports) { 2654 2655 /* global globalThis */ 2656 'use strict'; 2657 2658 exports.__esModule = true; 2659 2660 exports['default'] = function (Handlebars) { 2661 /* istanbul ignore next */ 2662 // https://mathiasbynens.be/notes/globalthis 2663 (function () { 2664 if (typeof globalThis === 'object') return; 2665 Object.prototype.__defineGetter__('__magic__', function () { 2666 return this; 2667 }); 2668 __magic__.globalThis = __magic__; // eslint-disable-line no-undef 2669 delete Object.prototype.__magic__; 2670 })(); 2671 2672 var $Handlebars = globalThis.Handlebars; 2673 2674 /* istanbul ignore next */ 2675 Handlebars.noConflict = function () { 2676 if (globalThis.Handlebars === Handlebars) { 2677 globalThis.Handlebars = $Handlebars; 2678 } 2679 return Handlebars; 2680 }; 2681 }; 2682 2683 module.exports = exports['default']; 2684 2685/***/ }), 2686/* 83 */ 2687/***/ (function(module, exports) { 2688 2689 'use strict'; 2690 2691 exports.__esModule = true; 2692 var AST = { 2693 // Public API used to evaluate derived attributes regarding AST nodes 2694 helpers: { 2695 // a mustache is definitely a helper if: 2696 // * it is an eligible helper, and 2697 // * it has at least one parameter or hash segment 2698 helperExpression: function helperExpression(node) { 2699 return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); 2700 }, 2701 2702 scopedId: function scopedId(path) { 2703 return (/^\.|this\b/.test(path.original) 2704 ); 2705 }, 2706 2707 // an ID is simple if it only has one part, and that part is not 2708 // `..` or `this`. 2709 simpleId: function simpleId(path) { 2710 return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; 2711 } 2712 } 2713 }; 2714 2715 // Must be exported as an object rather than the root of the module as the jison lexer 2716 // must modify the object to operate properly. 2717 exports['default'] = AST; 2718 module.exports = exports['default']; 2719 2720/***/ }), 2721/* 84 */ 2722/***/ (function(module, exports, __webpack_require__) { 2723 2724 'use strict'; 2725 2726 var _interopRequireDefault = __webpack_require__(1)['default']; 2727 2728 var _interopRequireWildcard = __webpack_require__(3)['default']; 2729 2730 exports.__esModule = true; 2731 exports.parseWithoutProcessing = parseWithoutProcessing; 2732 exports.parse = parse; 2733 2734 var _parser = __webpack_require__(85); 2735 2736 var _parser2 = _interopRequireDefault(_parser); 2737 2738 var _whitespaceControl = __webpack_require__(86); 2739 2740 var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); 2741 2742 var _helpers = __webpack_require__(89); 2743 2744 var Helpers = _interopRequireWildcard(_helpers); 2745 2746 var _utils = __webpack_require__(5); 2747 2748 exports.parser = _parser2['default']; 2749 2750 var yy = {}; 2751 _utils.extend(yy, Helpers); 2752 2753 function parseWithoutProcessing(input, options) { 2754 // Just return if an already-compiled AST was passed in. 2755 if (input.type === 'Program') { 2756 return input; 2757 } 2758 2759 _parser2['default'].yy = yy; 2760 2761 // Altering the shared object here, but this is ok as parser is a sync operation 2762 yy.locInfo = function (locInfo) { 2763 return new yy.SourceLocation(options && options.srcName, locInfo); 2764 }; 2765 2766 var ast = _parser2['default'].parse(input); 2767 2768 return ast; 2769 } 2770 2771 function parse(input, options) { 2772 var ast = parseWithoutProcessing(input, options); 2773 var strip = new _whitespaceControl2['default'](options); 2774 2775 return strip.accept(ast); 2776 } 2777 2778/***/ }), 2779/* 85 */ 2780/***/ (function(module, exports) { 2781 2782 // File ignored in coverage tests via setting in .istanbul.yml 2783 /* Jison generated parser */ 2784 "use strict"; 2785 2786 exports.__esModule = true; 2787 var handlebars = (function () { 2788 var parser = { trace: function trace() {}, 2789 yy: {}, 2790 symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, 2791 terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, 2792 productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], 2793 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { 2794 2795 var $0 = $$.length - 1; 2796 switch (yystate) { 2797 case 1: 2798 return $$[$0 - 1]; 2799 break; 2800 case 2: 2801 this.$ = yy.prepareProgram($$[$0]); 2802 break; 2803 case 3: 2804 this.$ = $$[$0]; 2805 break; 2806 case 4: 2807 this.$ = $$[$0]; 2808 break; 2809 case 5: 2810 this.$ = $$[$0]; 2811 break; 2812 case 6: 2813 this.$ = $$[$0]; 2814 break; 2815 case 7: 2816 this.$ = $$[$0]; 2817 break; 2818 case 8: 2819 this.$ = $$[$0]; 2820 break; 2821 case 9: 2822 this.$ = { 2823 type: 'CommentStatement', 2824 value: yy.stripComment($$[$0]),
vendor: 8,910 bytes, lines 2825-3045
2825 strip: yy.stripFlags($$[$0], $$[$0]), 2826 loc: yy.locInfo(this._$) 2827 }; 2828 2829 break; 2830 case 10: 2831 this.$ = { 2832 type: 'ContentStatement', 2833 original: $$[$0], 2834 value: $$[$0], 2835 loc: yy.locInfo(this._$) 2836 }; 2837 2838 break; 2839 case 11: 2840 this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); 2841 break; 2842 case 12: 2843 this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; 2844 break; 2845 case 13: 2846 this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); 2847 break; 2848 case 14: 2849 this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); 2850 break; 2851 case 15: 2852 this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2853 break; 2854 case 16: 2855 this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2856 break; 2857 case 17: 2858 this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2859 break; 2860 case 18: 2861 this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; 2862 break; 2863 case 19: 2864 var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), 2865 program = yy.prepareProgram([inverse], $$[$0 - 1].loc); 2866 program.chained = true; 2867 2868 this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; 2869 2870 break; 2871 case 20: 2872 this.$ = $$[$0]; 2873 break; 2874 case 21: 2875 this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; 2876 break; 2877 case 22: 2878 this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); 2879 break; 2880 case 23: 2881 this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); 2882 break; 2883 case 24: 2884 this.$ = { 2885 type: 'PartialStatement', 2886 name: $$[$0 - 3], 2887 params: $$[$0 - 2], 2888 hash: $$[$0 - 1], 2889 indent: '', 2890 strip: yy.stripFlags($$[$0 - 4], $$[$0]), 2891 loc: yy.locInfo(this._$) 2892 }; 2893 2894 break; 2895 case 25: 2896 this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); 2897 break; 2898 case 26: 2899 this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; 2900 break; 2901 case 27: 2902 this.$ = $$[$0]; 2903 break; 2904 case 28: 2905 this.$ = $$[$0]; 2906 break; 2907 case 29: 2908 this.$ = { 2909 type: 'SubExpression', 2910 path: $$[$0 - 3], 2911 params: $$[$0 - 2], 2912 hash: $$[$0 - 1], 2913 loc: yy.locInfo(this._$) 2914 }; 2915 2916 break; 2917 case 30: 2918 this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; 2919 break; 2920 case 31: 2921 this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; 2922 break; 2923 case 32: 2924 this.$ = yy.id($$[$0 - 1]); 2925 break; 2926 case 33: 2927 this.$ = $$[$0]; 2928 break; 2929 case 34: 2930 this.$ = $$[$0]; 2931 break; 2932 case 35: 2933 this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; 2934 break; 2935 case 36: 2936 this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; 2937 break; 2938 case 37: 2939 this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; 2940 break; 2941 case 38: 2942 this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; 2943 break; 2944 case 39: 2945 this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; 2946 break; 2947 case 40: 2948 this.$ = $$[$0]; 2949 break; 2950 case 41: 2951 this.$ = $$[$0]; 2952 break; 2953 case 42: 2954 this.$ = yy.preparePath(true, $$[$0], this._$); 2955 break; 2956 case 43: 2957 this.$ = yy.preparePath(false, $$[$0], this._$); 2958 break; 2959 case 44: 2960 $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; 2961 break; 2962 case 45: 2963 this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; 2964 break; 2965 case 46: 2966 this.$ = []; 2967 break; 2968 case 47: 2969 $$[$0 - 1].push($$[$0]); 2970 break; 2971 case 48: 2972 this.$ = []; 2973 break; 2974 case 49: 2975 $$[$0 - 1].push($$[$0]); 2976 break; 2977 case 50: 2978 this.$ = []; 2979 break; 2980 case 51: 2981 $$[$0 - 1].push($$[$0]); 2982 break; 2983 case 58: 2984 this.$ = []; 2985 break; 2986 case 59: 2987 $$[$0 - 1].push($$[$0]); 2988 break; 2989 case 64: 2990 this.$ = []; 2991 break; 2992 case 65: 2993 $$[$0 - 1].push($$[$0]); 2994 break; 2995 case 70: 2996 this.$ = []; 2997 break; 2998 case 71: 2999 $$[$0 - 1].push($$[$0]); 3000 break; 3001 case 78: 3002 this.$ = []; 3003 break; 3004 case 79: 3005 $$[$0 - 1].push($$[$0]); 3006 break; 3007 case 82: 3008 this.$ = []; 3009 break; 3010 case 83: 3011 $$[$0 - 1].push($$[$0]); 3012 break; 3013 case 86: 3014 this.$ = []; 3015 break; 3016 case 87: 3017 $$[$0 - 1].push($$[$0]); 3018 break; 3019 case 90: 3020 this.$ = []; 3021 break; 3022 case 91: 3023 $$[$0 - 1].push($$[$0]); 3024 break; 3025 case 94: 3026 this.$ = []; 3027 break; 3028 case 95: 3029 $$[$0 - 1].push($$[$0]); 3030 break; 3031 case 98: 3032 this.$ = [$$[$0]]; 3033 break; 3034 case 99: 3035 $$[$0 - 1].push($$[$0]); 3036 break; 3037 case 100: 3038 this.$ = [$$[$0]]; 3039 break; 3040 case 101: 3041 $$[$0 - 1].push($$[$0]); 3042 break; 3043 } 3044 }, 3045
vendor: 11,456 bytes, line 3045
3045 table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }
vendor: 24,486 bytes, lines 3045-3520
3045, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], 3046 defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, 3047 parseError: function parseError(str, hash) { 3048 throw new Error(str); 3049 }, 3050 parse: function parse(input) { 3051 var self = this, 3052 stack = [0], 3053 vstack = [null], 3054 lstack = [], 3055 table = this.table, 3056 yytext = "", 3057 yylineno = 0, 3058 yyleng = 0, 3059 recovering = 0, 3060 TERROR = 2, 3061 EOF = 1; 3062 this.lexer.setInput(input); 3063 this.lexer.yy = this.yy; 3064 this.yy.lexer = this.lexer; 3065 this.yy.parser = this; 3066 if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; 3067 var yyloc = this.lexer.yylloc; 3068 lstack.push(yyloc); 3069 var ranges = this.lexer.options && this.lexer.options.ranges; 3070 if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; 3071 function popStack(n) { 3072 stack.length = stack.length - 2 * n; 3073 vstack.length = vstack.length - n; 3074 lstack.length = lstack.length - n; 3075 } 3076 function lex() { 3077 var token; 3078 token = self.lexer.lex() || 1; 3079 if (typeof token !== "number") { 3080 token = self.symbols_[token] || token; 3081 } 3082 return token; 3083 } 3084 var symbol, 3085 preErrorSymbol, 3086 state, 3087 action, 3088 a, 3089 r, 3090 yyval = {}, 3091 p, 3092 len, 3093 newState, 3094 expected; 3095 while (true) { 3096 state = stack[stack.length - 1]; 3097 if (this.defaultActions[state]) { 3098 action = this.defaultActions[state]; 3099 } else { 3100 if (symbol === null || typeof symbol == "undefined") { 3101 symbol = lex(); 3102 } 3103 action = table[state] && table[state][symbol]; 3104 } 3105 if (typeof action === "undefined" || !action.length || !action[0]) { 3106 var errStr = ""; 3107 if (!recovering) { 3108 expected = []; 3109 for (p in table[state]) if (this.terminals_[p] && p > 2) { 3110 expected.push("'" + this.terminals_[p] + "'"); 3111 } 3112 if (this.lexer.showPosition) { 3113 errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; 3114 } else { 3115 errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); 3116 } 3117 this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); 3118 } 3119 } 3120 if (action[0] instanceof Array && action.length > 1) { 3121 throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); 3122 } 3123 switch (action[0]) { 3124 case 1: 3125 stack.push(symbol); 3126 vstack.push(this.lexer.yytext); 3127 lstack.push(this.lexer.yylloc); 3128 stack.push(action[1]); 3129 symbol = null; 3130 if (!preErrorSymbol) { 3131 yyleng = this.lexer.yyleng; 3132 yytext = this.lexer.yytext; 3133 yylineno = this.lexer.yylineno; 3134 yyloc = this.lexer.yylloc; 3135 if (recovering > 0) recovering--; 3136 } else { 3137 symbol = preErrorSymbol; 3138 preErrorSymbol = null; 3139 } 3140 break; 3141 case 2: 3142 len = this.productions_[action[1]][1]; 3143 yyval.$ = vstack[vstack.length - len]; 3144 yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; 3145 if (ranges) { 3146 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; 3147 } 3148 r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); 3149 if (typeof r !== "undefined") { 3150 return r; 3151 } 3152 if (len) { 3153 stack = stack.slice(0, -1 * len * 2); 3154 vstack = vstack.slice(0, -1 * len); 3155 lstack = lstack.slice(0, -1 * len); 3156 } 3157 stack.push(this.productions_[action[1]][0]); 3158 vstack.push(yyval.$); 3159 lstack.push(yyval._$); 3160 newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; 3161 stack.push(newState); 3162 break; 3163 case 3: 3164 return true; 3165 } 3166 } 3167 return true; 3168 } 3169 }; 3170 /* Jison generated lexer */ 3171 var lexer = (function () { 3172 var lexer = { EOF: 1, 3173 parseError: function parseError(str, hash) { 3174 if (this.yy.parser) { 3175 this.yy.parser.parseError(str, hash); 3176 } else { 3177 throw new Error(str); 3178 } 3179 }, 3180 setInput: function setInput(input) { 3181 this._input = input; 3182 this._more = this._less = this.done = false; 3183 this.yylineno = this.yyleng = 0; 3184 this.yytext = this.matched = this.match = ''; 3185 this.conditionStack = ['INITIAL']; 3186 this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; 3187 if (this.options.ranges) this.yylloc.range = [0, 0]; 3188 this.offset = 0; 3189 return this; 3190 }, 3191 input: function input() { 3192 var ch = this._input[0]; 3193 this.yytext += ch; 3194 this.yyleng++; 3195 this.offset++; 3196 this.match += ch; 3197 this.matched += ch; 3198 var lines = ch.match(/(?:\r\n?|\n).*/g); 3199 if (lines) { 3200 this.yylineno++; 3201 this.yylloc.last_line++; 3202 } else { 3203 this.yylloc.last_column++; 3204 } 3205 if (this.options.ranges) this.yylloc.range[1]++; 3206 3207 this._input = this._input.slice(1); 3208 return ch; 3209 }, 3210 unput: function unput(ch) { 3211 var len = ch.length; 3212 var lines = ch.split(/(?:\r\n?|\n)/g); 3213 3214 this._input = ch + this._input; 3215 this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); 3216 //this.yyleng -= len; 3217 this.offset -= len; 3218 var oldLines = this.match.split(/(?:\r\n?|\n)/g); 3219 this.match = this.match.substr(0, this.match.length - 1); 3220 this.matched = this.matched.substr(0, this.matched.length - 1); 3221 3222 if (lines.length - 1) this.yylineno -= lines.length - 1; 3223 var r = this.yylloc.range; 3224 3225 this.yylloc = { first_line: this.yylloc.first_line, 3226 last_line: this.yylineno + 1, 3227 first_column: this.yylloc.first_column, 3228 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len 3229 }; 3230 3231 if (this.options.ranges) { 3232 this.yylloc.range = [r[0], r[0] + this.yyleng - len]; 3233 } 3234 return this; 3235 }, 3236 more: function more() { 3237 this._more = true; 3238 return this; 3239 }, 3240 less: function less(n) { 3241 this.unput(this.match.slice(n)); 3242 }, 3243 pastInput: function pastInput() { 3244 var past = this.matched.substr(0, this.matched.length - this.match.length); 3245 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); 3246 }, 3247 upcomingInput: function upcomingInput() { 3248 var next = this.match; 3249 if (next.length < 20) { 3250 next += this._input.substr(0, 20 - next.length); 3251 } 3252 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); 3253 }, 3254 showPosition: function showPosition() { 3255 var pre = this.pastInput(); 3256 var c = new Array(pre.length + 1).join("-"); 3257 return pre + this.upcomingInput() + "\n" + c + "^"; 3258 }, 3259 next: function next() { 3260 if (this.done) { 3261 return this.EOF; 3262 } 3263 if (!this._input) this.done = true; 3264 3265 var token, match, tempMatch, index, col, lines; 3266 if (!this._more) { 3267 this.yytext = ''; 3268 this.match = ''; 3269 } 3270 var rules = this._currentRules(); 3271 for (var i = 0; i < rules.length; i++) { 3272 tempMatch = this._input.match(this.rules[rules[i]]); 3273 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { 3274 match = tempMatch; 3275 index = i; 3276 if (!this.options.flex) break; 3277 } 3278 } 3279 if (match) { 3280 lines = match[0].match(/(?:\r\n?|\n).*/g); 3281 if (lines) this.yylineno += lines.length; 3282 this.yylloc = { first_line: this.yylloc.last_line, 3283 last_line: this.yylineno + 1, 3284 first_column: this.yylloc.last_column, 3285 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; 3286 this.yytext += match[0]; 3287 this.match += match[0]; 3288 this.matches = match; 3289 this.yyleng = this.yytext.length; 3290 if (this.options.ranges) { 3291 this.yylloc.range = [this.offset, this.offset += this.yyleng]; 3292 } 3293 this._more = false; 3294 this._input = this._input.slice(match[0].length); 3295 this.matched += match[0]; 3296 token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); 3297 if (this.done && this._input) this.done = false; 3298 if (token) return token;else return; 3299 } 3300 if (this._input === "") { 3301 return this.EOF; 3302 } else { 3303 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); 3304 } 3305 }, 3306 lex: function lex() { 3307 var r = this.next(); 3308 if (typeof r !== 'undefined') { 3309 return r; 3310 } else { 3311 return this.lex(); 3312 } 3313 }, 3314 begin: function begin(condition) { 3315 this.conditionStack.push(condition); 3316 }, 3317 popState: function popState() { 3318 return this.conditionStack.pop(); 3319 }, 3320 _currentRules: function _currentRules() { 3321 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; 3322 }, 3323 topState: function topState() { 3324 return this.conditionStack[this.conditionStack.length - 2]; 3325 }, 3326 pushState: function begin(condition) { 3327 this.begin(condition); 3328 } }; 3329 lexer.options = {}; 3330 lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { 3331 3332 function strip(start, end) { 3333 return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); 3334 } 3335 3336 var YYSTATE = YY_START; 3337 switch ($avoiding_name_collisions) { 3338 case 0: 3339 if (yy_.yytext.slice(-2) === "\\\\") { 3340 strip(0, 1); 3341 this.begin("mu"); 3342 } else if (yy_.yytext.slice(-1) === "\\") { 3343 strip(0, 1); 3344 this.begin("emu"); 3345 } else { 3346 this.begin("mu"); 3347 } 3348 if (yy_.yytext) return 15; 3349 3350 break; 3351 case 1: 3352 return 15; 3353 break; 3354 case 2: 3355 this.popState(); 3356 return 15; 3357 3358 break; 3359 case 3: 3360 this.begin('raw');return 15; 3361 break; 3362 case 4: 3363 this.popState(); 3364 // Should be using `this.topState()` below, but it currently 3365 // returns the second top instead of the first top. Opened an 3366 // issue about it at https://github.com/zaach/jison/issues/291 3367 if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { 3368 return 15; 3369 } else { 3370 strip(5, 9); 3371 return 'END_RAW_BLOCK'; 3372 } 3373 3374 break; 3375 case 5: 3376 return 15; 3377 break; 3378 case 6: 3379 this.popState(); 3380 return 14; 3381 3382 break; 3383 case 7: 3384 return 65; 3385 break; 3386 case 8: 3387 return 68; 3388 break; 3389 case 9: 3390 return 19; 3391 break; 3392 case 10: 3393 this.popState(); 3394 this.begin('raw'); 3395 return 23; 3396 3397 break; 3398 case 11: 3399 return 55; 3400 break; 3401 case 12: 3402 return 60; 3403 break; 3404 case 13: 3405 return 29; 3406 break; 3407 case 14: 3408 return 47; 3409 break; 3410 case 15: 3411 this.popState();return 44; 3412 break; 3413 case 16: 3414 this.popState();return 44; 3415 break; 3416 case 17: 3417 return 34; 3418 break; 3419 case 18: 3420 return 39; 3421 break; 3422 case 19: 3423 return 51; 3424 break; 3425 case 20: 3426 return 48; 3427 break; 3428 case 21: 3429 this.unput(yy_.yytext); 3430 this.popState(); 3431 this.begin('com'); 3432 3433 break; 3434 case 22: 3435 this.popState(); 3436 return 14; 3437 3438 break; 3439 case 23: 3440 return 48; 3441 break; 3442 case 24: 3443 return 73; 3444 break; 3445 case 25: 3446 return 72; 3447 break; 3448 case 26: 3449 return 72; 3450 break; 3451 case 27: 3452 return 87; 3453 break; 3454 case 28: 3455 // ignore whitespace 3456 break; 3457 case 29: 3458 this.popState();return 54; 3459 break; 3460 case 30: 3461 this.popState();return 33; 3462 break; 3463 case 31: 3464 yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; 3465 break; 3466 case 32: 3467 yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; 3468 break; 3469 case 33: 3470 return 85; 3471 break; 3472 case 34: 3473 return 82; 3474 break; 3475 case 35: 3476 return 82; 3477 break; 3478 case 36: 3479 return 83; 3480 break; 3481 case 37: 3482 return 84; 3483 break; 3484 case 38: 3485 return 81; 3486 break; 3487 case 39: 3488 return 75; 3489 break; 3490 case 40: 3491 return 77; 3492 break; 3493 case 41: 3494 return 72; 3495 break; 3496 case 42: 3497 yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; 3498 break; 3499 case 43: 3500 return 'INVALID'; 3501 break; 3502 case 44: 3503 return 5; 3504 break; 3505 } 3506 }; 3507 lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; 3508 lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; 3509 return lexer; 3510 })(); 3511 parser.lexer = lexer; 3512 function Parser() { 3513 this.yy = {}; 3514 }Parser.prototype = parser;parser.Parser = Parser; 3515 return new Parser(); 3516 })();exports["default"] = handlebars; 3517 module.exports = exports["default"]; 3518 3519/***/ }), 3520/*
vendor: 12,816 bytes, lines 3520-3929
352086 */ 3521/***/ (function(module, exports, __webpack_require__) { 3522 3523 'use strict'; 3524 3525 var _interopRequireDefault = __webpack_require__(1)['default']; 3526 3527 exports.__esModule = true; 3528 3529 var _visitor = __webpack_require__(87); 3530 3531 var _visitor2 = _interopRequireDefault(_visitor); 3532 3533 function WhitespaceControl() { 3534 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; 3535 3536 this.options = options; 3537 } 3538 WhitespaceControl.prototype = new _visitor2['default'](); 3539 3540 WhitespaceControl.prototype.Program = function (program) { 3541 var doStandalone = !this.options.ignoreStandalone; 3542 3543 var isRoot = !this.isRootSeen; 3544 this.isRootSeen = true; 3545 3546 var body = program.body; 3547 for (var i = 0, l = body.length; i < l; i++) { 3548 var current = body[i], 3549 strip = this.accept(current); 3550 3551 if (!strip) { 3552 continue; 3553 } 3554 3555 var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), 3556 _isNextWhitespace = isNextWhitespace(body, i, isRoot), 3557 openStandalone = strip.openStandalone && _isPrevWhitespace, 3558 closeStandalone = strip.closeStandalone && _isNextWhitespace, 3559 inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; 3560 3561 if (strip.close) { 3562 omitRight(body, i, true); 3563 } 3564 if (strip.open) { 3565 omitLeft(body, i, true); 3566 } 3567 3568 if (doStandalone && inlineStandalone) { 3569 omitRight(body, i); 3570 3571 if (omitLeft(body, i)) { 3572 // If we are on a standalone node, save the indent info for partials 3573 if (current.type === 'PartialStatement') { 3574 // Pull out the whitespace from the final line 3575 current.indent = /(?:^|[^ \t])([ \t]+)$/.exec(body[i - 1].original)[1]; 3576 } 3577 } 3578 } 3579 if (doStandalone && openStandalone) { 3580 omitRight((current.program || current.inverse).body); 3581 3582 // Strip out the previous content node if it's whitespace only 3583 omitLeft(body, i); 3584 } 3585 if (doStandalone && closeStandalone) { 3586 // Always strip the next node 3587 omitRight(body, i); 3588 3589 omitLeft((current.inverse || current.program).body); 3590 } 3591 } 3592 3593 return program; 3594 }; 3595 3596 WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { 3597 this.accept(block.program); 3598 this.accept(block.inverse); 3599 3600 // Find the inverse program that is involed with whitespace stripping. 3601 var program = block.program || block.inverse, 3602 inverse = block.program && block.inverse, 3603 firstInverse = inverse, 3604 lastInverse = inverse; 3605 3606 if (inverse && inverse.chained) { 3607 firstInverse = inverse.body[0].program; 3608 3609 // Walk the inverse chain to find the last inverse that is actually in the chain. 3610 while (lastInverse.chained) { 3611 lastInverse = lastInverse.body[lastInverse.body.length - 1].program; 3612 } 3613 } 3614 3615 var strip = { 3616 open: block.openStrip.open, 3617 close: block.closeStrip.close, 3618 3619 // Determine the standalone candiacy. Basically flag our content as being possibly standalone 3620 // so our parent can determine if we actually are standalone 3621 openStandalone: isNextWhitespace(program.body), 3622 closeStandalone: isPrevWhitespace((firstInverse || program).body) 3623 }; 3624 3625 if (block.openStrip.close) { 3626 omitRight(program.body, null, true); 3627 } 3628 3629 if (inverse) { 3630 var inverseStrip = block.inverseStrip; 3631 3632 if (inverseStrip.open) { 3633 omitLeft(program.body, null, true); 3634 } 3635 3636 if (inverseStrip.close) { 3637 omitRight(firstInverse.body, null, true); 3638 } 3639 if (block.closeStrip.open) { 3640 omitLeft(lastInverse.body, null, true); 3641 } 3642 3643 // Find standalone else statments 3644 if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { 3645 omitLeft(program.body); 3646 omitRight(firstInverse.body); 3647 } 3648 } else if (block.closeStrip.open) { 3649 omitLeft(program.body, null, true); 3650 } 3651 3652 return strip; 3653 }; 3654 3655 WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { 3656 return mustache.strip; 3657 }; 3658 3659 WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { 3660 /* istanbul ignore next */ 3661 var strip = node.strip || {}; 3662 return { 3663 inlineStandalone: true, 3664 open: strip.open, 3665 close: strip.close 3666 }; 3667 }; 3668 3669 function isPrevWhitespace(body, i, isRoot) { 3670 if (i === undefined) { 3671 i = body.length; 3672 } 3673 3674 // Nodes that end with newlines are considered whitespace (but are special 3675 // cased for strip operations) 3676 var prev = body[i - 1], 3677 sibling = body[i - 2]; 3678 if (!prev) { 3679 return isRoot; 3680 } 3681 3682 if (prev.type === 'ContentStatement') { 3683 // Matches when the trailing whitespace contains a newline (or, for the 3684 // root's first node, is the whole string). See omitLeft for the anchoring. 3685 return (sibling || !isRoot ? /(?:^|\S)[^\S\n]*\n\s*$/ : /^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(prev.original); 3686 } 3687 } 3688 function isNextWhitespace(body, i, isRoot) { 3689 if (i === undefined) { 3690 i = -1; 3691 } 3692 3693 var next = body[i + 1], 3694 sibling = body[i + 2]; 3695 if (!next) { 3696 return isRoot; 3697 } 3698 3699 if (next.type === 'ContentStatement') { 3700 return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); 3701 } 3702 } 3703 3704 // Marks the node to the right of the position as omitted. 3705 // I.e. {{foo}}' ' will mark the ' ' node as omitted. 3706 // 3707 // If i is undefined, then the first child will be marked as such. 3708 // 3709 // If mulitple is truthy then all whitespace will be stripped out until non-whitespace 3710 // content is met. 3711 function omitRight(body, i, multiple) { 3712 var current = body[i == null ? 0 : i + 1]; 3713 if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { 3714 return; 3715 } 3716 3717 var original = current.value; 3718 current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); 3719 current.rightStripped = current.value !== original; 3720 } 3721 3722 // Marks the node to the left of the position as omitted. 3723 // I.e. ' '{{foo}} will mark the ' ' node as omitted. 3724 // 3725 // If i is undefined then the last child will be marked as such. 3726 // 3727 // If mulitple is truthy then all whitespace will be stripped out until non-whitespace 3728 // content is met. 3729 function omitLeft(body, i, multiple) { 3730 var current = body[i == null ? body.length - 1 : i - 1]; 3731 if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { 3732 return; 3733 } 3734 3735 // We omit the last node if it's whitespace only and not preceded by a non-content node. 3736 var original = current.value; 3737 // The match must start after a non-whitespace character (or at the start): 3738 // a plain /\s+$/ is retried at every position of a whitespace run, which 3739 // takes quadratic time on long runs. 3740 current.value = current.value.replace(multiple ? /(^|\S)\s+$/ : /(^|[^ \t])[ \t]+$/, '$1'); 3741 current.leftStripped = current.value !== original; 3742 return current.leftStripped; 3743 } 3744 3745 exports['default'] = WhitespaceControl; 3746 module.exports = exports['default']; 3747 3748/***/ }), 3749/* 87 */ 3750/***/ (function(module, exports, __webpack_require__) { 3751 3752 'use strict'; 3753 3754 var _interopRequireDefault = __webpack_require__(1)['default']; 3755 3756 exports.__esModule = true; 3757 3758 var _exception = __webpack_require__(6); 3759 3760 var _exception2 = _interopRequireDefault(_exception); 3761 3762 var _utils = __webpack_require__(5); 3763 3764 var _nodeTypes = __webpack_require__(88); 3765 3766 function Visitor() { 3767 this.parents = []; 3768 } 3769 3770 /** 3771 * Whether a visitor may dispatch on a node type. 3772 * 3773 * A type is dispatchable if the parser produces it, or if the visitor 3774 * (typically a subclass) defines a handler for it that is not a method of 3775 * Visitor itself. `in` is used for the latter so that accept, acceptKey and 3776 * everything inherited from Object.prototype (constructor, __proto__, ...) 3777 * can never be reached through a crafted `type`. 3778 * 3779 * Subclasses that visit untrusted ASTs, such as WhitespaceControl, must 3780 * therefore define nothing but node handlers as function properties. 3781 * 3782 * @param {Visitor} visitor the visitor that would handle the node 3783 * @param {*} type the untrusted `type` of the node 3784 * @returns {boolean} true if the visitor may call its `type` method 3785 */ 3786 function isDispatchable(visitor, type) { 3787 return _utils.indexOf(_nodeTypes.NODE_TYPES, type) !== -1 || !(type in Visitor.prototype) && typeof visitor[type] === 'function'; 3788 } 3789 3790 Visitor.prototype = { 3791 constructor: Visitor, 3792 mutating: false, 3793 3794 // Visits a given value. If mutating, will replace the value if necessary. 3795 acceptKey: function acceptKey(node, name) { 3796 var value = this.accept(node[name]); 3797 if (this.mutating) { 3798 if (value && !isDispatchable(this, value.type)) { 3799 throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); 3800 } 3801 node[name] = value; 3802 } 3803 }, 3804 3805 // Performs an accept operation with added sanity check to ensure 3806 // required keys are not removed. 3807 acceptRequired: function acceptRequired(node, name) { 3808 this.acceptKey(node, name); 3809 3810 if (!node[name]) { 3811 throw new _exception2['default'](node.type + ' requires ' + name); 3812 } 3813 }, 3814 3815 // Traverses a given array. If mutating, empty respnses will be removed 3816 // for child elements. 3817 acceptArray: function acceptArray(array) { 3818 for (var i = 0, l = array.length; i < l; i++) { 3819 this.acceptKey(array, i); 3820 3821 if (!array[i]) { 3822 array.splice(i, 1); 3823 i--; 3824 l--; 3825 } 3826 } 3827 }, 3828 3829 accept: function accept(object) { 3830 if (!object) { 3831 return; 3832 } 3833 3834 // Dispatching on an unknown type could call an arbitrary method of the 3835 // visitor (e.g. `accept` itself) with an untrusted AST node. 3836 if (!isDispatchable(this, object.type) || !this[object.type]) { 3837 throw new _exception2['default']('Unknown type: ' + object.type, object); 3838 } 3839 3840 if (this.current) { 3841 this.parents.unshift(this.current); 3842 } 3843 this.current = object; 3844 3845 var ret = this[object.type](object); 3846 3847 this.current = this.parents.shift(); 3848 3849 if (!this.mutating || ret) { 3850 return ret; 3851 } else if (ret !== false) { 3852 return object; 3853 } 3854 }, 3855 3856 Program: function Program(program) { 3857 this.acceptArray(program.body); 3858 }, 3859 3860 MustacheStatement: visitSubExpression, 3861 Decorator: visitSubExpression, 3862 3863 BlockStatement: visitBlock, 3864 DecoratorBlock: visitBlock, 3865 3866 PartialStatement: visitPartial, 3867 PartialBlockStatement: function PartialBlockStatement(partial) { 3868 visitPartial.call(this, partial); 3869 3870 this.acceptKey(partial, 'program'); 3871 }, 3872 3873 ContentStatement: function ContentStatement() /* content */{}, 3874 CommentStatement: function CommentStatement() /* comment */{}, 3875 3876 SubExpression: visitSubExpression, 3877 3878 PathExpression: function PathExpression() /* path */{}, 3879 3880 StringLiteral: function StringLiteral() /* string */{}, 3881 NumberLiteral: function NumberLiteral() /* number */{}, 3882 BooleanLiteral: function BooleanLiteral() /* bool */{}, 3883 UndefinedLiteral: function UndefinedLiteral() /* literal */{}, 3884 NullLiteral: function NullLiteral() /* literal */{}, 3885 3886 Hash: function Hash(hash) { 3887 this.acceptArray(hash.pairs); 3888 }, 3889 HashPair: function HashPair(pair) { 3890 this.acceptRequired(pair, 'value'); 3891 } 3892 }; 3893 3894 function visitSubExpression(mustache) { 3895 this.acceptRequired(mustache, 'path'); 3896 this.acceptArray(mustache.params); 3897 this.acceptKey(mustache, 'hash'); 3898 } 3899 function visitBlock(block) { 3900 visitSubExpression.call(this, block); 3901 3902 this.acceptKey(block, 'program'); 3903 this.acceptKey(block, 'inverse'); 3904 } 3905 function visitPartial(partial) { 3906 this.acceptRequired(partial, 'name'); 3907 this.acceptArray(partial.params); 3908 this.acceptKey(partial, 'hash'); 3909 } 3910 3911 exports['default'] = Visitor; 3912 module.exports = exports['default']; 3913 3914/***/ }), 3915/* 88 */ 3916/***/ (function(module, exports) { 3917 3918 // AST node types produced by the parser. Visitor#accept and Compiler#accept 3919 // dispatch on the untrusted `node.type`, so they must never call any other 3920 // method of the visiting object. The Compiler only accepts these types; a 3921 // Visitor also accepts types for which a subclass defines its own handler. 3922 'use strict'; 3923 3924 exports.__esModule = true; 3925 var NODE_TYPES = ['Program', 'BlockStatement', 'DecoratorBlock', 'PartialStatement', 'PartialBlockStatement', 'Decorator', 'MustacheStatement', 'ContentStatement', 'CommentStatement', 'SubExpression', 'PathExpression', 'StringLiteral', 'NumberLiteral', 'BooleanLiteral', 'UndefinedLiteral', 'NullLiteral', 'Hash', 'HashPair']; 3926 exports.NODE_TYPES = NODE_TYPES; 3927 3928/***/ }), 3929/* 89
vendor: 5,593 bytes, lines 3929-4160
3929 */ 3930/***/ (function(module, exports, __webpack_require__) { 3931 3932 'use strict'; 3933 3934 var _interopRequireDefault = __webpack_require__(1)['default']; 3935 3936 exports.__esModule = true; 3937 exports.SourceLocation = SourceLocation; 3938 exports.id = id; 3939 exports.stripFlags = stripFlags; 3940 exports.stripComment = stripComment; 3941 exports.preparePath = preparePath; 3942 exports.prepareMustache = prepareMustache; 3943 exports.prepareRawBlock = prepareRawBlock; 3944 exports.prepareBlock = prepareBlock; 3945 exports.prepareProgram = prepareProgram; 3946 exports.preparePartialBlock = preparePartialBlock; 3947 3948 var _exception = __webpack_require__(6); 3949 3950 var _exception2 = _interopRequireDefault(_exception); 3951 3952 function validateClose(open, close) { 3953 close = close.path ? close.path.original : close; 3954 3955 if (open.path.original !== close) { 3956 var errorNode = { loc: open.path.loc }; 3957 3958 throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); 3959 } 3960 } 3961 3962 function SourceLocation(source, locInfo) { 3963 this.source = source; 3964 this.start = { 3965 line: locInfo.first_line, 3966 column: locInfo.first_column 3967 }; 3968 this.end = { 3969 line: locInfo.last_line, 3970 column: locInfo.last_column 3971 }; 3972 } 3973 3974 function id(token) { 3975 if (/^\[.*\]$/.test(token)) { 3976 return token.substring(1, token.length - 1); 3977 } else { 3978 return token; 3979 } 3980 } 3981 3982 function stripFlags(open, close) { 3983 return { 3984 open: open.charAt(2) === '~', 3985 close: close.charAt(close.length - 3) === '~' 3986 }; 3987 } 3988 3989 function stripComment(comment) { 3990 return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); 3991 } 3992 3993 function preparePath(data, parts, loc) { 3994 loc = this.locInfo(loc); 3995 3996 var original = data ? '@' : '', 3997 dig = [], 3998 depth = 0; 3999 4000 for (var i = 0, l = parts.length; i < l; i++) { 4001 var part = parts[i].part, 4002 4003 // If we have [] syntax then we do not treat path references as operators, 4004 // i.e. foo.[this] resolves to approximately context.foo['this'] 4005 isLiteral = parts[i].original !== part; 4006 original += (parts[i].separator || '') + part; 4007 4008 if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { 4009 if (dig.length > 0) { 4010 throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); 4011 } else if (part === '..') { 4012 depth++; 4013 } 4014 } else { 4015 dig.push(part); 4016 } 4017 } 4018 4019 return { 4020 type: 'PathExpression', 4021 data: data, 4022 depth: depth, 4023 parts: dig, 4024 original: original, 4025 loc: loc 4026 }; 4027 } 4028 4029 function prepareMustache(path, params, hash, open, strip, locInfo) { 4030 // Must use charAt to support IE pre-10 4031 var escapeFlag = open.charAt(3) || open.charAt(2), 4032 escaped = escapeFlag !== '{' && escapeFlag !== '&'; 4033 4034 var decorator = /\*/.test(open); 4035 return { 4036 type: decorator ? 'Decorator' : 'MustacheStatement', 4037 path: path, 4038 params: params, 4039 hash: hash, 4040 escaped: escaped, 4041 strip: strip, 4042 loc: this.locInfo(locInfo) 4043 }; 4044 } 4045 4046 function prepareRawBlock(openRawBlock, contents, close, locInfo) { 4047 validateClose(openRawBlock, close); 4048 4049 locInfo = this.locInfo(locInfo); 4050 var program = { 4051 type: 'Program', 4052 body: contents, 4053 strip: {}, 4054 loc: locInfo 4055 }; 4056 4057 return { 4058 type: 'BlockStatement', 4059 path: openRawBlock.path, 4060 params: openRawBlock.params, 4061 hash: openRawBlock.hash, 4062 program: program, 4063 openStrip: {}, 4064 inverseStrip: {}, 4065 closeStrip: {}, 4066 loc: locInfo 4067 }; 4068 } 4069 4070 function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { 4071 if (close && close.path) { 4072 validateClose(openBlock, close); 4073 } 4074 4075 var decorator = /\*/.test(openBlock.open); 4076 4077 program.blockParams = openBlock.blockParams; 4078 4079 var inverse = undefined, 4080 inverseStrip = undefined; 4081 4082 if (inverseAndProgram) { 4083 if (decorator) { 4084 throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); 4085 } 4086 4087 if (inverseAndProgram.chain) { 4088 inverseAndProgram.program.body[0].closeStrip = close.strip; 4089 } 4090 4091 inverseStrip = inverseAndProgram.strip; 4092 inverse = inverseAndProgram.program; 4093 } 4094 4095 if (inverted) { 4096 inverted = inverse; 4097 inverse = program; 4098 program = inverted; 4099 } 4100 4101 return { 4102 type: decorator ? 'DecoratorBlock' : 'BlockStatement', 4103 path: openBlock.path, 4104 params: openBlock.params, 4105 hash: openBlock.hash, 4106 program: program, 4107 inverse: inverse, 4108 openStrip: openBlock.strip, 4109 inverseStrip: inverseStrip, 4110 closeStrip: close && close.strip, 4111 loc: this.locInfo(locInfo) 4112 }; 4113 } 4114 4115 function prepareProgram(statements, loc) { 4116 if (!loc && statements.length) { 4117 var firstLoc = statements[0].loc, 4118 lastLoc = statements[statements.length - 1].loc; 4119 4120 /* istanbul ignore else */ 4121 if (firstLoc && lastLoc) { 4122 loc = { 4123 source: firstLoc.source, 4124 start: { 4125 line: firstLoc.start.line, 4126 column: firstLoc.start.column 4127 }, 4128 end: { 4129 line: lastLoc.end.line, 4130 column: lastLoc.end.column 4131 } 4132 }; 4133 } 4134 } 4135 4136 return { 4137 type: 'Program', 4138 body: statements, 4139 strip: {}, 4140 loc: loc 4141 }; 4142 } 4143 4144 function preparePartialBlock(open, program, close, locInfo) { 4145 validateClose(open, close); 4146 4147 return { 4148 type: 'PartialBlockStatement', 4149 name: open.path, 4150 params: open.params, 4151 hash: open.hash, 4152 program: program, 4153 openStrip: open.strip, 4154 closeStrip: close && close.strip, 4155 loc: this.locInfo(locInfo) 4156 }; 4157 } 4158 4159/***/ }), 4160/*
vendor: 3,678 bytes, lines 4160-4295
416090 */ 4161/***/ (function(module, exports, __webpack_require__) { 4162 4163 /* eslint-disable new-cap */ 4164 4165 'use strict'; 4166 4167 var _Object$create = __webpack_require__(74)['default']; 4168 4169 var _interopRequireDefault = __webpack_require__(1)['default']; 4170 4171 exports.__esModule = true; 4172 exports.Compiler = Compiler; 4173 exports.precompile = precompile; 4174 exports.compile = compile; 4175 4176 var _exception = __webpack_require__(6); 4177 4178 var _exception2 = _interopRequireDefault(_exception); 4179 4180 var _utils = __webpack_require__(5); 4181 4182 var _ast = __webpack_require__(83); 4183 4184 var _ast2 = _interopRequireDefault(_ast); 4185 4186 var _nodeTypes = __webpack_require__(88); 4187 4188 var slice = [].slice; 4189 4190 function Compiler() {} 4191 4192 // the foundHelper register will disambiguate helper lookup from finding a 4193 // function in a context. This is necessary for mustache compatibility, which 4194 // requires that context functions in blocks are evaluated by blockHelperMissing, 4195 // and then proceed as if the resulting value was provided to blockHelperMissing. 4196 4197 Compiler.prototype = { 4198 compiler: Compiler, 4199 4200 equals: function equals(other) { 4201 var len = this.opcodes.length; 4202 if (other.opcodes.length !== len) { 4203 return false; 4204 } 4205 4206 for (var i = 0; i < len; i++) { 4207 var opcode = this.opcodes[i], 4208 otherOpcode = other.opcodes[i]; 4209 if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { 4210 return false; 4211 } 4212 } 4213 4214 // We know that length is the same between the two arrays because they are directly tied 4215 // to the opcode behavior above. 4216 len = this.children.length; 4217 for (var i = 0; i < len; i++) { 4218 if (!this.children[i].equals(other.children[i])) { 4219 return false; 4220 } 4221 } 4222 4223 return true; 4224 }, 4225 4226 guid: 0, 4227 4228 compile: function compile(program, options) { 4229 this.sourceNode = []; 4230 this.opcodes = []; 4231 this.children = []; 4232 this.options = options; 4233 this.stringParams = options.stringParams; 4234 this.trackIds = options.trackIds; 4235 4236 options.blockParams = options.blockParams || []; 4237 4238 options.knownHelpers = _utils.extend(_Object$create(null), { 4239 helperMissing: true, 4240 blockHelperMissing: true, 4241 each: true, 4242 'if': true, 4243 unless: true, 4244 'with': true, 4245 log: true, 4246 lookup: true 4247 }, options.knownHelpers); 4248 4249 return this.accept(program); 4250 }, 4251 4252 compileProgram: function compileProgram(program) { 4253 var childCompiler = new this.compiler(), 4254 // eslint-disable-line new-cap 4255 result = childCompiler.compile(program, this.options), 4256 guid = this.guid++; 4257 4258 this.usePartial = this.usePartial || result.usePartial; 4259 4260 this.children[guid] = result; 4261 this.useDepths = this.useDepths || result.useDepths; 4262 4263 return guid; 4264 }, 4265 4266 accept: function accept(node) { 4267 // Dispatching on an unknown type could call an arbitrary Compiler method. 4268 if (_utils.indexOf(_nodeTypes.NODE_TYPES, node.type) === -1 || !this[node.type]) { 4269 throw new _exception2['default']('Unknown type: ' + node.type, node); 4270 } 4271 4272 this.sourceNode.unshift(node); 4273 var ret = this[node.type](node); 4274 this.sourceNode.shift(); 4275 return ret; 4276 }, 4277 4278 Program: function Program(program) { 4279 validateBlockParams(program); 4280 this.options.blockParams.unshift(program.blockParams); 4281 4282 var body = program.body, 4283 bodyLength = body.length; 4284 for (var i = 0; i < bodyLength; i++) { 4285 this.accept(body[i]); 4286 } 4287 4288 this.options.blockParams.shift(); 4289 4290 this.isSimple = bodyLength === 1; 4291 this.blockParams = program.blockParams ? program.blockParams.length : 0; 4292 4293 return this; 4294 }, 4295
vendor: 4,190 bytes, lines 4296-4432
4296 BlockStatement: function BlockStatement(block) { 4297 transformLiteralToPath(block); 4298 4299 var program = block.program, 4300 inverse = block.inverse; 4301 4302 program = program && this.compileProgram(program); 4303 inverse = inverse && this.compileProgram(inverse); 4304 4305 var type = this.classifySexpr(block); 4306 4307 if (type === 'helper') { 4308 this.helperSexpr(block, program, inverse); 4309 } else if (type === 'simple') { 4310 this.simpleSexpr(block); 4311 4312 // now that the simple mustache is resolved, we need to 4313 // evaluate it by executing `blockHelperMissing` 4314 this.opcode('pushProgram', program); 4315 this.opcode('pushProgram', inverse); 4316 this.opcode('emptyHash'); 4317 this.opcode('blockValue', block.path.original); 4318 } else { 4319 this.ambiguousSexpr(block, program, inverse); 4320 4321 // now that the simple mustache is resolved, we need to 4322 // evaluate it by executing `blockHelperMissing` 4323 this.opcode('pushProgram', program); 4324 this.opcode('pushProgram', inverse); 4325 this.opcode('emptyHash'); 4326 this.opcode('ambiguousBlockValue'); 4327 } 4328 4329 this.opcode('append'); 4330 }, 4331 4332 DecoratorBlock: function DecoratorBlock(decorator) { 4333 var program = decorator.program && this.compileProgram(decorator.program); 4334 var params = this.setupFullMustacheParams(decorator, program, undefined), 4335 path = decorator.path; 4336 4337 this.useDecorators = true; 4338 this.opcode('registerDecorator', params.length, path.original); 4339 }, 4340 4341 PartialStatement: function PartialStatement(partial) { 4342 this.usePartial = true; 4343 4344 var program = partial.program; 4345 if (program) { 4346 program = this.compileProgram(partial.program); 4347 } 4348 4349 var params = partial.params; 4350 if (params.length > 1) { 4351 throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); 4352 } else if (!params.length) { 4353 if (this.options.explicitPartialContext) { 4354 this.opcode('pushLiteral', 'undefined'); 4355 } else { 4356 params.push({ type: 'PathExpression', parts: [], depth: 0 }); 4357 } 4358 } 4359 4360 var partialName = partial.name.original, 4361 isDynamic = partial.name.type === 'SubExpression'; 4362 if (isDynamic) { 4363 this.accept(partial.name); 4364 } 4365 4366 this.setupFullMustacheParams(partial, program, undefined, true); 4367 4368 var indent = partial.indent || ''; 4369 if (this.options.preventIndent && indent) { 4370 this.opcode('appendContent', indent); 4371 indent = ''; 4372 } 4373 4374 this.opcode('invokePartial', isDynamic, partialName, indent); 4375 this.opcode('append'); 4376 }, 4377 PartialBlockStatement: function PartialBlockStatement(partialBlock) { 4378 this.PartialStatement(partialBlock); 4379 }, 4380 4381 MustacheStatement: function MustacheStatement(mustache) { 4382 this.SubExpression(mustache); 4383 4384 if (mustache.escaped && !this.options.noEscape) { 4385 this.opcode('appendEscaped'); 4386 } else { 4387 this.opcode('append'); 4388 } 4389 }, 4390 Decorator: function Decorator(decorator) { 4391 this.DecoratorBlock(decorator); 4392 }, 4393 4394 ContentStatement: function ContentStatement(content) { 4395 if (content.value != null && typeof content.value !== 'string') { 4396 throw invalidAst(content, 'value must be a string'); 4397 } 4398 if (content.value) { 4399 this.opcode('appendContent', content.value); 4400 } 4401 }, 4402 4403 CommentStatement: function CommentStatement() {}, 4404 4405 SubExpression: function SubExpression(sexpr) { 4406 transformLiteralToPath(sexpr); 4407 var type = this.classifySexpr(sexpr); 4408 4409 if (type === 'simple') { 4410 this.simpleSexpr(sexpr); 4411 } else if (type === 'helper') { 4412 this.helperSexpr(sexpr); 4413 } else { 4414 this.ambiguousSexpr(sexpr); 4415 } 4416 }, 4417 ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { 4418 var path = sexpr.path, 4419 name = path.parts[0], 4420 isBlock = program != null || inverse != null; 4421 4422 this.opcode('getContext', validateDepth(path)); 4423 4424 this.opcode('pushProgram', program); 4425 this.opcode('pushProgram', inverse); 4426 4427 path.strict = true; 4428 this.accept(path); 4429 4430 this.opcode('invokeAmbiguous', name, isBlock); 4431 }, 4432
vendor: 4,498 bytes, lines 4433-4575
4433 simpleSexpr: function simpleSexpr(sexpr) { 4434 var path = sexpr.path; 4435 path.strict = true; 4436 this.accept(path); 4437 this.opcode('resolvePossibleLambda'); 4438 }, 4439 4440 helperSexpr: function helperSexpr(sexpr, program, inverse) { 4441 var params = this.setupFullMustacheParams(sexpr, program, inverse), 4442 path = sexpr.path, 4443 name = path.parts[0]; 4444 4445 if (this.options.knownHelpers[name]) { 4446 this.opcode('invokeKnownHelper', params.length, name); 4447 } else if (this.options.knownHelpersOnly) { 4448 throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); 4449 } else { 4450 path.strict = true; 4451 path.falsy = true; 4452 4453 this.accept(path); 4454 this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); 4455 } 4456 }, 4457 4458 PathExpression: function PathExpression(path) { 4459 // Validate AST values at the compiler boundary: javascript-compiler.js 4460 // trusts all opcode arguments to be safe. 4461 var depth = validateDepth(path); 4462 var parts = validateParts(path); 4463 4464 this.addDepth(depth); 4465 this.opcode('getContext', depth); 4466 4467 var name = parts[0], 4468 scoped = _ast2['default'].helpers.scopedId(path), 4469 blockParamId = !depth && !scoped && this.blockParamIndex(name); 4470 4471 if (blockParamId) { 4472 this.opcode('lookupBlockParam', blockParamId, parts); 4473 } else if (!name) { 4474 // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` 4475 this.opcode('pushContext'); 4476 } else if (path.data) { 4477 this.options.data = true; 4478 this.opcode('lookupData', depth, parts, path.strict); 4479 } else { 4480 this.opcode('lookupOnContext', parts, path.falsy, path.strict, scoped); 4481 } 4482 }, 4483 4484 StringLiteral: function StringLiteral(string) { 4485 validateLiteral(string); 4486 this.opcode('pushString', string.value); 4487 }, 4488 4489 NumberLiteral: function NumberLiteral(number) { 4490 validateLiteral(number); 4491 this.opcode('pushLiteral', number.value); 4492 }, 4493 4494 BooleanLiteral: function BooleanLiteral(bool) { 4495 validateLiteral(bool); 4496 this.opcode('pushLiteral', bool.value); 4497 }, 4498 4499 UndefinedLiteral: function UndefinedLiteral() { 4500 this.opcode('pushLiteral', 'undefined'); 4501 }, 4502 4503 NullLiteral: function NullLiteral() { 4504 this.opcode('pushLiteral', 'null'); 4505 }, 4506 4507 Hash: function Hash(hash) { 4508 var pairs = hash.pairs, 4509 i = 0, 4510 l = undefined; 4511 4512 if (!_utils.isArray(pairs)) { 4513 throw invalidAst(hash, 'pairs must be an array'); 4514 } 4515 l = pairs.length; 4516 for (var j = 0; j < l; j++) { 4517 if (!pairs[j] || typeof pairs[j].key !== 'string') { 4518 throw invalidAst(hash, 'pair keys must be strings'); 4519 } 4520 } 4521 4522 this.opcode('pushHash'); 4523 4524 for (; i < l; i++) { 4525 this.pushParam(pairs[i].value); 4526 } 4527 while (i--) { 4528 this.opcode('assignToHash', pairs[i].key); 4529 } 4530 this.opcode('popHash'); 4531 }, 4532 4533 // HELPERS 4534 opcode: function opcode(name) { 4535 this.opcodes.push({ 4536 opcode: name, 4537 args: slice.call(arguments, 1), 4538 loc: this.sourceNode[0].loc 4539 }); 4540 }, 4541 4542 addDepth: function addDepth(depth) { 4543 if (!depth) { 4544 return; 4545 } 4546 4547 this.useDepths = true; 4548 }, 4549 4550 classifySexpr: function classifySexpr(sexpr) { 4551 // The first part is used as a helper name below, e.g. for known helpers, 4552 // before the PathExpression handler gets to validate the parts. 4553 validateParts(sexpr.path); 4554 var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); 4555 4556 var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); 4557 4558 // a mustache is an eligible helper if: 4559 // * its id is simple (a single part, not `this` or `..`) 4560 var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); 4561 4562 // if a mustache is an eligible helper but not a definite 4563 // helper, it is ambiguous, and will be resolved in a later 4564 // pass or at runtime. 4565 var isEligible = !isBlockParam && (isHelper || isSimple); 4566 4567 // if ambiguous, we can possibly resolve the ambiguity now 4568 // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. 4569 if (isEligible && !isHelper) { 4570 var _name = sexpr.path.parts[0], 4571 options = this.options; 4572 if (options.knownHelpers[_name]) { 4573 isHelper = true; 4574 } else if (options.knownHelpersOnly) { 4575 isEligible = false;
vendor: 5,356 bytes, lines 4576-4744
4576 } 4577 } 4578 4579 if (isHelper) { 4580 return 'helper'; 4581 } else if (isEligible) { 4582 return 'ambiguous'; 4583 } else { 4584 return 'simple'; 4585 } 4586 }, 4587 4588 pushParams: function pushParams(params) { 4589 for (var i = 0, l = params.length; i < l; i++) { 4590 this.pushParam(params[i]); 4591 } 4592 }, 4593 4594 pushParam: function pushParam(val) { 4595 // Literal params are not visited by their node handlers in stringParams 4596 // mode, so their values must be validated here as well. 4597 validateLiteral(val); 4598 var value = val.value != null ? val.value : val.original || ''; 4599 var depth = validateDepth(val); 4600 4601 if (this.stringParams) { 4602 // pushStringParam emits non-string values as raw JavaScript literals. 4603 // Literal values are validated above, but `original` is not, so 4604 // anything that is not a number or boolean is stringified. 4605 if (typeof value !== 'number' && typeof value !== 'boolean') { 4606 value = String(value); 4607 } 4608 if (value.replace) { 4609 value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); 4610 } 4611 if (depth) { 4612 this.addDepth(depth); 4613 } 4614 this.opcode('getContext', depth); 4615 this.opcode('pushStringParam', value, val.type); 4616 4617 if (val.type === 'SubExpression') { 4618 // SubExpressions get evaluated and passed in 4619 // in string params mode. 4620 this.accept(val); 4621 } 4622 } else { 4623 if (this.trackIds) { 4624 var blockParamIndex = undefined; 4625 if (val.parts && !_ast2['default'].helpers.scopedId(val) && !depth) { 4626 // The parts are read here before the PathExpression handler, 4627 // invoked by accept() below, gets to validate them. 4628 blockParamIndex = this.blockParamIndex(validateParts(val)[0]); 4629 } 4630 if (blockParamIndex) { 4631 var blockParamChild = val.parts.slice(1).join('.'); 4632 this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); 4633 } else { 4634 value = val.original || value; 4635 if (value.replace) { 4636 value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); 4637 } 4638 4639 this.opcode('pushId', val.type, value); 4640 } 4641 } 4642 this.accept(val); 4643 } 4644 }, 4645 4646 setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { 4647 var params = sexpr.params; 4648 this.pushParams(params); 4649 4650 this.opcode('pushProgram', program); 4651 this.opcode('pushProgram', inverse); 4652 4653 if (sexpr.hash) { 4654 this.accept(sexpr.hash); 4655 } else { 4656 this.opcode('emptyHash', omitEmpty); 4657 } 4658 4659 return params; 4660 }, 4661 4662 blockParamIndex: function blockParamIndex(name) { 4663 for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { 4664 var blockParams = this.options.blockParams[depth], 4665 param = blockParams && _utils.indexOf(blockParams, name); 4666 if (blockParams && param >= 0) { 4667 return [depth, param]; 4668 } 4669 } 4670 } 4671 }; 4672 4673 function precompile(input, options, env) { 4674 if (input == null || typeof input !== 'string' && input.type !== 'Program') { 4675 throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); 4676 } 4677 4678 options = options || {}; 4679 if (!('data' in options)) { 4680 options.data = true; 4681 } 4682 if (options.compat) { 4683 options.useDepths = true; 4684 } 4685 4686 var ast = env.parse(input, options), 4687 environment = new env.Compiler().compile(ast, options); 4688 return new env.JavaScriptCompiler().compile(environment, options); 4689 } 4690 4691 function compile(input, options, env) { 4692 if (options === undefined) options = {}; 4693 4694 if (input == null || typeof input !== 'string' && input.type !== 'Program') { 4695 throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); 4696 } 4697 4698 options = _utils.extend({}, options); 4699 if (!('data' in options)) { 4700 options.data = true; 4701 } 4702 if (options.compat) { 4703 options.useDepths = true; 4704 } 4705 4706 var compiled = undefined; 4707 4708 function compileInput() { 4709 var ast = env.parse(input, options), 4710 environment = new env.Compiler().compile(ast, options), 4711 templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); 4712 return env.template(templateSpec); 4713 } 4714 4715 // Template is only compiled on first use and cached after that point. 4716 function ret(context, execOptions) { 4717 if (!compiled) { 4718 compiled = compileInput(); 4719 } 4720 return compiled.call(this, context, execOptions); 4721 } 4722 ret._setup = function (setupOptions) { 4723 if (!compiled) { 4724 compiled = compileInput(); 4725 } 4726 return compiled._setup(setupOptions); 4727 }; 4728 ret._child = function (i, data, blockParams, depths) { 4729 if (!compiled) { 4730 compiled = compileInput(); 4731 } 4732 return compiled._child(i, data, blockParams, depths); 4733 }; 4734 return ret; 4735 } 4736 4737 /** 4738 * Create the exception thrown for an AST node that fails validation. 4739 * 4740 * @param {Object} node the offending AST node; its `type` is included in the 4741 * message and its `loc`, if present, in the error location 4742 * @param {string} message what is wrong with the node 4743 * @returns {Exception} the exception to throw 4744 */
4745 function invalidAst(node, message) { 4746 return new _exception2['default']('Invalid AST: ' + node.type + ' ' + message, node); 4747 } 4748 4749 /** 4750 * Validate the `depth` of a path or param node. 4751 * 4752 * A missing depth is treated as 0, because ASTs built by hand or by other 4753 * tools commonly omit it. Any depth that is present must be a non-negative 4754 * integer, since it is written into the generated code. 4755 * 4756 * @param {Object} node the AST node whose `depth` is validated 4757 * @returns {number} the validated depth, or 0 if the node has none 4758 * @throws {Exception} if the depth is present but not a non-negative integer 4759 */ 4760 function validateDepth(node) { 4761 var depth = node.depth; 4762 if (depth == null) { 4763 return 0; 4764 } 4765 if (typeof depth !== 'number' || !isFinite(depth) || Math.floor(depth) !== depth || depth < 0) { 4766 throw invalidAst(node, 'depth must be a non-negative integer'); 4767 } 4768 return depth; 4769 } 4770 4771 /** 4772 * Validate the `value` of a StringLiteral, NumberLiteral or BooleanLiteral. 4773 * 4774 * Literal values are written into the generated code, so they must have 4775 * exactly the type their node promises. Nodes of any other type pass through 4776 * unchanged. 4777 * 4778 * Numbers need not be finite: the parser produces Infinity for very long 4779 * number literals, and Infinity and NaN are emitted as the read-only globals 4780 * of the same name. 4781 * 4782 * @param {Object} node the AST node to validate 4783 * @throws {Exception} if the value does not match the literal type 4784 */ 4785 function validateLiteral(node) { 4786 var value = node.value; 4787 if (node.type === 'StringLiteral' && typeof value !== 'string') { 4788 throw invalidAst(node, 'value must be a string'); 4789 } else if (node.type === 'NumberLiteral' && typeof value !== 'number') { 4790 throw invalidAst(node, 'value must be a number'); 4791 } else if (node.type === 'BooleanLiteral' && typeof value !== 'boolean') { 4792 throw invalidAst(node, 'value must be a boolean'); 4793 } 4794 } 4795 4796 /** 4797 * Validate that a node property is an array containing only strings. 4798 * 4799 * @param {Object} node the AST node the property belongs to, for the error 4800 * @param {*} value the property value to validate 4801 * @param {string} name the property name, used in the error message 4802 * @returns {string[]} the validated array 4803 * @throws {Exception} if the value is not an array or contains non-strings 4804 */ 4805 function validateStringArray(node, value, name) { 4806 if (!_utils.isArray(value)) { 4807 throw invalidAst(node, name + ' must be an array'); 4808 } 4809 for (var i = 0; i < value.length; i++) { 4810 if (typeof value[i] !== 'string') { 4811 throw invalidAst(node, name + ' must only contain strings'); 4812 } 4813 } 4814 return value; 4815 } 4816 4817 /** 4818 * Validate the `parts` of a PathExpression node. 4819 * 4820 * @param {Object} path the PathExpression node 4821 * @returns {string[]} the validated parts 4822 * @throws {Exception} if `parts` is not an array of strings 4823 */ 4824 function validateParts(path) { 4825 return validateStringArray(path, path.parts, 'parts'); 4826 } 4827 4828 /** 4829 * Validate the optional `blockParams` of a Program node. Its length is 4830 * written into the generated code, so it must be an array of strings when 4831 * present. 4832 * 4833 * @param {Object} program the Program node 4834 * @throws {Exception} if `blockParams` is present and not an array of strings 4835 */ 4836 function validateBlockParams(program) { 4837 if (program.blockParams != null) { 4838 validateStringArray(program, program.blockParams, 'blockParams'); 4839 } 4840 } 4841 4842 function argEquals(a, b) { 4843 if (a === b) { 4844 return true; 4845 } 4846 4847 if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { 4848 for (var i = 0; i < a.length; i++) { 4849 if (!argEquals(a[i], b[i])) { 4850 return false; 4851 } 4852 } 4853 return true; 4854 } 4855 } 4856 4857 function transformLiteralToPath(sexpr) { 4858 if (!sexpr.path.parts) { 4859 var literal = sexpr.path; 4860 // Casting to string here to make false and 0 literal values play nicely with the rest 4861 // of the system. 4862 sexpr.path = { 4863 type: 'PathExpression', 4864 data: false, 4865 depth: 0, 4866 parts: [literal.original + ''], 4867 original: literal.original + '', 4868 loc: literal.loc 4869 }; 4870 } 4871 } 4872 4873/***/ }), 4874/* 91 */ 4875/***/ (function(module, exports, __webpack_require__) { 4876 4877 'use strict'; 4878 4879 var _Object$keys = __webpack_require__(60)['default']; 4880 4881 var _interopRequireDefault = __webpack_require__(1)['default']; 4882 4883 exports.__esModule = true; 4884 4885 var _base = __webpack_require__(4); 4886 4887 var _exception = __webpack_require__(6); 4888 4889 var _exception2 = _interopRequireDefault(_exception); 4890 4891 var _utils = __webpack_require__(5); 4892 4893 var _codeGen = __webpack_require__(92); 4894 4895 var _codeGen2 = _interopRequireDefault(_codeGen); 4896 4897 function Literal(value) { 4898 this.value = value; 4899 } 4900 4901 function JavaScriptCompiler() {} 4902 4903 JavaScriptCompiler.prototype = { 4904 // PUBLIC API: You can override these methods in a subclass to provide 4905 // alternative compiled forms for name lookup and buffering semantics 4906 nameLookup: function nameLookup(parent, name /*, type */) { 4907 return this.internalNameLookup(parent, name); 4908 }, 4909 depthedLookup: function depthedLookup(name) { 4910 return [this.aliasable('container.lookup'), '(depths, ', this.quotedString(name), ')']; 4911 }, 4912 4913 compilerInfo: function compilerInfo() { 4914 var revision = _base.COMPILER_REVISION, 4915 versions = _base.REVISION_CHANGES[revision]; 4916 return [revision, versions]; 4917 }, 4918 4919 appendToBuffer: function appendToBuffer(source, location, explicit) { 4920 // Force a source as this simplifies the merge logic. 4921 if (!_utils.isArray(source)) { 4922 source = [source]; 4923 } 4924 source = this.source.wrap(source, location); 4925 4926 if (this.environment.isSimple) { 4927 return ['return ', source, ';']; 4928 } else if (explicit) { 4929 // This is a case where the buffer operation occurs as a child of another 4930 // construct, generally braces. We have to explicitly output these buffer 4931 // operations to ensure that the emitted code goes in the correct location. 4932 return ['buffer += ', source, ';']; 4933 } else { 4934 source.appendToBuffer = true; 4935 return source; 4936 } 4937 }, 4938 4939 initializeBuffer: function initializeBuffer() { 4940 return this.quotedString(''); 4941 }, 4942 // END PUBLIC API 4943 internalNameLookup: function internalNameLookup(parent, name) { 4944 this.lookupPropertyFunctionIsUsed = true; 4945 return ['lookupProperty(', parent, ',', this.quotedString
vendor: 21,830 bytes, lines 4945-5620
4945(name), ')']; 4946 }, 4947 4948 lookupPropertyFunctionIsUsed: false, 4949 4950 compile: function compile(environment, options, context, asObject) { 4951 this.environment = environment; 4952 this.options = options; 4953 this.stringParams = this.options.stringParams; 4954 this.trackIds = this.options.trackIds; 4955 this.precompile = !asObject; 4956 4957 this.name = this.environment.name; 4958 this.isChild = !!context; 4959 this.context = context || { 4960 decorators: [], 4961 programs: [], 4962 environments: [] 4963 }; 4964 4965 this.preamble(); 4966 4967 this.stackSlot = 0; 4968 this.stackVars = []; 4969 this.aliases = {}; 4970 this.registers = { list: [] }; 4971 this.hashes = []; 4972 this.compileStack = []; 4973 this.inlineStack = []; 4974 this.blockParams = []; 4975 4976 this.compileChildren(environment, options); 4977 4978 this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; 4979 this.useBlockParams = this.useBlockParams || environment.useBlockParams; 4980 4981 var opcodes = environment.opcodes, 4982 opcode = undefined, 4983 firstLoc = undefined, 4984 i = undefined, 4985 l = undefined; 4986 4987 for (i = 0, l = opcodes.length; i < l; i++) { 4988 opcode = opcodes[i]; 4989 4990 this.source.currentLocation = opcode.loc; 4991 firstLoc = firstLoc || opcode.loc; 4992 this[opcode.opcode].apply(this, opcode.args); 4993 } 4994 4995 // Flush any trailing content that might be pending. 4996 this.source.currentLocation = firstLoc; 4997 this.pushSource(''); 4998 4999 /* istanbul ignore next */ 5000 if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { 5001 throw new _exception2['default']('Compile completed with content left on stack'); 5002 } 5003 5004 if (!this.decorators.isEmpty()) { 5005 this.useDecorators = true; 5006 5007 this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); 5008 this.decorators.push('return fn;'); 5009 5010 if (asObject) { 5011 this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); 5012 } else { 5013 this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); 5014 this.decorators.push('}\n'); 5015 this.decorators = this.decorators.merge(); 5016 } 5017 } else { 5018 this.decorators = undefined; 5019 } 5020 5021 var fn = this.createFunctionContext(asObject); 5022 if (!this.isChild) { 5023 var ret = { 5024 compiler: this.compilerInfo(), 5025 main: fn 5026 }; 5027 5028 if (this.decorators) { 5029 ret.main_d = this.decorators; // eslint-disable-line camelcase 5030 ret.useDecorators = true; 5031 } 5032 5033 var _context = this.context; 5034 var programs = _context.programs; 5035 var decorators = _context.decorators; 5036 5037 for (i = 0, l = programs.length; i < l; i++) { 5038 ret[i] = programs[i]; 5039 if (decorators[i]) { 5040 ret[i + '_d'] = decorators[i]; 5041 ret.useDecorators = true; 5042 } 5043 } 5044 5045 if (this.environment.usePartial) { 5046 ret.usePartial = true; 5047 } 5048 if (this.options.data) { 5049 ret.useData = true; 5050 } 5051 if (this.useDepths) { 5052 ret.useDepths = true; 5053 } 5054 if (this.useBlockParams) { 5055 ret.useBlockParams = true; 5056 } 5057 if (this.options.compat) { 5058 ret.compat = true; 5059 } 5060 5061 if (!asObject) { 5062 ret.compiler = JSON.stringify(ret.compiler); 5063 5064 this.source.currentLocation = { start: { line: 1, column: 0 } }; 5065 ret = this.objectLiteral(ret); 5066 5067 if (options.srcName) { 5068 ret = ret.toStringWithSourceMap({ file: options.destName }); 5069 ret.map = ret.map && ret.map.toString(); 5070 } else { 5071 ret = ret.toString(); 5072 } 5073 } else { 5074 ret.compilerOptions = this.options; 5075 } 5076 5077 return ret; 5078 } else { 5079 return fn; 5080 } 5081 }, 5082 5083 preamble: function preamble() { 5084 // track the last context pushed into place to allow skipping the 5085 // getContext opcode when it would be a noop 5086 this.lastContext = 0; 5087 this.source = new _codeGen2['default'](this.options.srcName); 5088 this.decorators = new _codeGen2['default'](this.options.srcName); 5089 }, 5090 5091 createFunctionContext: function createFunctionContext(asObject) { 5092 // istanbul ignore next 5093 5094 var _this = this; 5095 5096 var varDeclarations = ''; 5097 5098 var locals = this.stackVars.concat(this.registers.list); 5099 if (locals.length > 0) { 5100 varDeclarations += ', ' + locals.join(', '); 5101 } 5102 5103 // Generate minimizer alias mappings 5104 // 5105 // When using true SourceNodes, this will update all references to the given alias 5106 // as the source nodes are reused in situ. For the non-source node compilation mode, 5107 // aliases will not be used, but this case is already being run on the client and 5108 // we aren't concern about minimizing the template size. 5109 var aliasCount = 0; 5110 _Object$keys(this.aliases).forEach(function (alias) { 5111 var node = _this.aliases[alias]; 5112 if (node.children && node.referenceCount > 1) { 5113 varDeclarations += ', alias' + ++aliasCount + '=' + alias; 5114 node.children[0] = 'alias' + aliasCount; 5115 } 5116 }); 5117 5118 if (this.lookupPropertyFunctionIsUsed) { 5119 varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); 5120 } 5121 5122 var params = ['container', 'depth0', 'helpers', 'partials', 'data']; 5123 5124 if (this.useBlockParams || this.useDepths) { 5125 params.push('blockParams'); 5126 } 5127 if (this.useDepths) { 5128 params.push('depths'); 5129 } 5130 5131 // Perform a second pass over the output to merge content when possible 5132 var source = this.mergeSource(varDeclarations); 5133 5134 if (asObject) { 5135 params.push(source); 5136 5137 return Function.apply(this, params); 5138 } else { 5139 return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); 5140 } 5141 }, 5142 mergeSource: function mergeSource(varDeclarations) { 5143 var isSimple = this.environment.isSimple, 5144 appendOnly = !this.forceBuffer, 5145 appendFirst = undefined, 5146 sourceSeen = undefined, 5147 bufferStart = undefined, 5148 bufferEnd = undefined; 5149 this.source.each(function (line) { 5150 if (line.appendToBuffer) { 5151 if (bufferStart) { 5152 line.prepend(' + '); 5153 } else { 5154 bufferStart = line; 5155 } 5156 bufferEnd = line; 5157 } else { 5158 if (bufferStart) { 5159 if (!sourceSeen) { 5160 appendFirst = true; 5161 } else { 5162 bufferStart.prepend('buffer += '); 5163 } 5164 bufferEnd.add(';'); 5165 bufferStart = bufferEnd = undefined; 5166 } 5167 5168 sourceSeen = true; 5169 if (!isSimple) { 5170 appendOnly = false; 5171 } 5172 } 5173 }); 5174 5175 if (appendOnly) { 5176 if (bufferStart) { 5177 bufferStart.prepend('return '); 5178 bufferEnd.add(';'); 5179 } else if (!sourceSeen) { 5180 this.source.push('return "";'); 5181 } 5182 } else { 5183 varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); 5184 5185 if (bufferStart) { 5186 bufferStart.prepend('return buffer + '); 5187 bufferEnd.add(';'); 5188 } else { 5189 this.source.push('return buffer;'); 5190 } 5191 } 5192 5193 if (varDeclarations) { 5194 this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); 5195 } 5196 5197 return this.source.merge(); 5198 }, 5199 5200 lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { 5201 return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); 5202 }, 5203 5204 // [blockValue] 5205 // 5206 // On stack, before: hash, inverse, program, value 5207 // On stack, after: return value of blockHelperMissing 5208 // 5209 // The purpose of this opcode is to take a block of the form 5210 // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and 5211 // replace it on the stack with the result of properly 5212 // invoking blockHelperMissing. 5213 blockValue: function blockValue(name) { 5214 var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), 5215 params = [this.contextName(0)]; 5216 this.setupHelperArgs(name, 0, params); 5217 5218 var blockName = this.popStack(); 5219 params.splice(1, 0, blockName); 5220 5221 this.push(this.source.functionCall(blockHelperMissing, 'call', params)); 5222 }, 5223 5224 // [ambiguousBlockValue] 5225 // 5226 // On stack, before: hash, inverse, program, value 5227 // Compiler value, before: lastHelper=value of last found helper, if any 5228 // On stack, after, if no lastHelper: same as [blockValue] 5229 // On stack, after, if lastHelper: value 5230 ambiguousBlockValue: function ambiguousBlockValue() { 5231 // We're being a bit cheeky and reusing the options value from the prior exec 5232 var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), 5233 params = [this.contextName(0)]; 5234 this.setupHelperArgs('', 0, params, true); 5235 5236 this.flushInline(); 5237 5238 var current = this.topStack(); 5239 params.splice(1, 0, current); 5240 5241 this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); 5242 }, 5243 5244 // [appendContent] 5245 // 5246 // On stack, before: ... 5247 // On stack, after: ... 5248 // 5249 // Appends the string value of `content` to the current buffer 5250 appendContent: function appendContent(content) { 5251 if (this.pendingContent) { 5252 content = this.pendingContent + content; 5253 } else { 5254 this.pendingLocation = this.source.currentLocation; 5255 } 5256 5257 this.pendingContent = content; 5258 }, 5259 5260 // [append] 5261 // 5262 // On stack, before: value, ... 5263 // On stack, after: ... 5264 // 5265 // Coerces `value` to a String and appends it to the current buffer. 5266 // 5267 // If `value` is truthy, or 0, it is coerced into a string and appended 5268 // Otherwise, the empty string is appended 5269 append: function append() { 5270 if (this.isInline()) { 5271 this.replaceStack(function (current) { 5272 return [' != null ? ', current, ' : ""']; 5273 }); 5274 5275 this.pushSource(this.appendToBuffer(this.popStack())); 5276 } else { 5277 var local = this.popStack(); 5278 this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); 5279 if (this.environment.isSimple) { 5280 this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); 5281 } 5282 } 5283 }, 5284 5285 // [appendEscaped] 5286 // 5287 // On stack, before: value, ... 5288 // On stack, after: ... 5289 // 5290 // Escape `value` and append it to the buffer 5291 appendEscaped: function appendEscaped() { 5292 this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); 5293 }, 5294 5295 // [getContext] 5296 // 5297 // On stack, before: ... 5298 // On stack, after: ... 5299 // Compiler value, after: lastContext=depth 5300 // 5301 // Set the value of the `lastContext` compiler value to the depth 5302 getContext: function getContext(depth) { 5303 this.lastContext = depth; 5304 }, 5305 5306 // [pushContext] 5307 // 5308 // On stack, before: ... 5309 // On stack, after: currentContext, ... 5310 // 5311 // Pushes the value of the current context onto the stack. 5312 pushContext: function pushContext() { 5313 this.pushStackLiteral(this.contextName(this.lastContext)); 5314 }, 5315 5316 // [lookupOnContext] 5317 // 5318 // On stack, before: ... 5319 // On stack, after: currentContext[name], ... 5320 // 5321 // Looks up the value of `name` on the current context and pushes 5322 // it onto the stack. 5323 lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { 5324 var i = 0; 5325 5326 if (!scoped && this.options.compat && !this.lastContext) { 5327 // The depthed query is expected to handle the undefined logic for the root level that 5328 // is implemented below, so we evaluate that directly in compat mode 5329 this.push(this.depthedLookup(parts[i++])); 5330 } else { 5331 this.pushContext(); 5332 } 5333 5334 this.resolvePath('context', parts, i, falsy, strict); 5335 }, 5336 5337 // [lookupBlockParam] 5338 // 5339 // On stack, before: ... 5340 // On stack, after: blockParam[name], ... 5341 // 5342 // Looks up the value of `parts` on the given block param and pushes 5343 // it onto the stack. 5344 lookupBlockParam: function lookupBlockParam(blockParamId, parts) { 5345 this.useBlockParams = true; 5346 5347 this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); 5348 this.resolvePath('context', parts, 1); 5349 }, 5350 5351 // [lookupData] 5352 // 5353 // On stack, before: ... 5354 // On stack, after: data, ... 5355 // 5356 // Push the data lookup operator 5357 lookupData: function lookupData(depth, parts, strict) { 5358 if (!depth) { 5359 this.pushStackLiteral('data'); 5360 } else { 5361 this.pushStackLiteral('container.data(data, ' + depth + ')'); 5362 } 5363 5364 this.resolvePath('data', parts, 0, true, strict); 5365 }, 5366 5367 resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) { 5368 // istanbul ignore next 5369 5370 var _this2 = this; 5371 5372 if (this.options.strict || this.options.assumeObjects) { 5373 this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type)); 5374 return; 5375 } 5376 5377 var len = parts.length; 5378 5379 var _loop = function (i) { 5380 /* eslint-disable no-loop-func */ 5381 _this2.replaceStack(function (current) { 5382 var lookup = _this2.nameLookup(current, parts[i], type); 5383 // We want to ensure that zero and false are handled properly if the context (falsy flag) 5384 // needs to have the special handling for these values. 5385 if (!falsy) { 5386 return [' != null ? ', lookup, ' : ', current]; 5387 } else { 5388 // Otherwise we can use generic falsy handling 5389 return [' && ', lookup]; 5390 } 5391 }); 5392 /* eslint-enable no-loop-func */ 5393 }; 5394 5395 for (var i = startPartIndex; i < len; i++) { 5396 _loop(i); 5397 } 5398 }, 5399 5400 // [resolvePossibleLambda] 5401 // 5402 // On stack, before: value, ... 5403 // On stack, after: resolved value, ... 5404 // 5405 // If the `value` is a lambda, replace it on the stack by 5406 // the return value of the lambda 5407 resolvePossibleLambda: function resolvePossibleLambda() { 5408 this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); 5409 }, 5410 5411 // [pushStringParam] 5412 // 5413 // On stack, before: ... 5414 // On stack, after: string, currentContext, ... 5415 // 5416 // This opcode is designed for use in string mode, which 5417 // provides the string value of a parameter along with its 5418 // depth rather than resolving it immediately. 5419 pushStringParam: function pushStringParam(string, type) { 5420 this.pushContext(); 5421 this.pushString(type); 5422 5423 // If it's a subexpression, the string result 5424 // will be pushed after this opcode. 5425 if (type !== 'SubExpression') { 5426 if (typeof string === 'string') { 5427 this.pushString(string); 5428 } else { 5429 this.pushStackLiteral(string); 5430 } 5431 } 5432 }, 5433 5434 emptyHash: function emptyHash(omitEmpty) { 5435 if (this.trackIds) { 5436 this.push('{}'); // hashIds 5437 } 5438 if (this.stringParams) { 5439 this.push('{}'); // hashContexts 5440 this.push('{}'); // hashTypes 5441 } 5442 this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); 5443 }, 5444 pushHash: function pushHash() { 5445 if (this.hash) { 5446 this.hashes.push(this.hash); 5447 } 5448 this.hash = { values: {}, types: [], contexts: [], ids: [] }; 5449 }, 5450 popHash: function popHash() { 5451 var hash = this.hash; 5452 this.hash = this.hashes.pop(); 5453 5454 if (this.trackIds) { 5455 this.push(this.objectLiteral(hash.ids)); 5456 } 5457 if (this.stringParams) { 5458 this.push(this.objectLiteral(hash.contexts)); 5459 this.push(this.objectLiteral(hash.types)); 5460 } 5461 5462 this.push(this.objectLiteral(hash.values)); 5463 }, 5464 5465 // [pushString] 5466 // 5467 // On stack, before: ... 5468 // On stack, after: quotedString(string), ... 5469 // 5470 // Push a quoted version of `string` onto the stack 5471 pushString: function pushString(string) { 5472 this.pushStackLiteral(this.quotedString(string)); 5473 }, 5474 5475 // [pushLiteral] 5476 // 5477 // On stack, before: ... 5478 // On stack, after: value, ... 5479 // 5480 // Pushes a value onto the stack. This operation prevents 5481 // the compiler from creating a temporary variable to hold 5482 // it. 5483 pushLiteral: function pushLiteral(value) { 5484 this.pushStackLiteral(value); 5485 }, 5486 5487 // [pushProgram] 5488 // 5489 // On stack, before: ... 5490 // On stack, after: program(guid), ... 5491 // 5492 // Push a program expression onto the stack. This takes 5493 // a compile-time guid and converts it into a runtime-accessible 5494 // expression. 5495 pushProgram: function pushProgram(guid) { 5496 if (guid != null) { 5497 this.pushStackLiteral(this.programExpression(guid)); 5498 } else { 5499 this.pushStackLiteral(null); 5500 } 5501 }, 5502 5503 // [registerDecorator] 5504 // 5505 // On stack, before: hash, program, params..., ... 5506 // On stack, after: ... 5507 // 5508 // Pops off the decorator's parameters, invokes the decorator, 5509 // and inserts the decorator into the decorators list. 5510 registerDecorator: function registerDecorator(paramSize, name) { 5511 var foundDecorator = this.nameLookup('decorators', name, 'decorator'), 5512 options = this.setupHelperArgs(name, paramSize); 5513 5514 // Store the resolved decorator in a variable and verify it is a function before 5515 // calling it. Without this, unregistered decorators can cause an unhandled TypeError 5516 // (calling undefined), which crashes the process — enabling Denial of Service. 5517 this.decorators.push(['var decorator = ', foundDecorator, ';']); 5518 this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), '); }']); 5519 this.decorators.push(['fn = ', this.decorators.functionCall('decorator', '', ['fn', 'props', 'container', options]), ' || fn;']); 5520 }, 5521 5522 // [invokeHelper] 5523 // 5524 // On stack, before: hash, inverse, program, params..., ... 5525 // On stack, after: result of helper invocation 5526 // 5527 // Pops off the helper's parameters, invokes the helper, 5528 // and pushes the helper's return value onto the stack. 5529 // 5530 // If the helper is not found, `helperMissing` is called. 5531 invokeHelper: function invokeHelper(paramSize, name, isSimple) { 5532 var nonHelper = this.popStack(), 5533 helper = this.setupHelper(paramSize, name); 5534 5535 var possibleFunctionCalls = []; 5536 5537 if (isSimple) { 5538 // direct call to helper 5539 possibleFunctionCalls.push(helper.name); 5540 } 5541 // call a function from the input object 5542 possibleFunctionCalls.push(nonHelper); 5543 if (!this.options.strict) { 5544 possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); 5545 } 5546 5547 var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; 5548 var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); 5549 this.push(functionCall); 5550 }, 5551 5552 itemsSeparatedBy: function itemsSeparatedBy(items, separator) { 5553 var result = []; 5554 result.push(items[0]); 5555 for (var i = 1; i < items.length; i++) { 5556 result.push(separator, items[i]); 5557 } 5558 return result; 5559 }, 5560 // [invokeKnownHelper] 5561 // 5562 // On stack, before: hash, inverse, program, params..., ... 5563 // On stack, after: result of helper invocation 5564 // 5565 // This operation is used when the helper is known to exist, 5566 // so a `helperMissing` fallback is not required. 5567 invokeKnownHelper: function invokeKnownHelper(paramSize, name) { 5568 var helper = this.setupHelper(paramSize, name); 5569 this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); 5570 }, 5571 5572 // [invokeAmbiguous] 5573 // 5574 // On stack, before: hash, inverse, program, params..., ... 5575 // On stack, after: result of disambiguation 5576 // 5577 // This operation is used when an expression like `{{foo}}` 5578 // is provided, but we don't know at compile-time whether it 5579 // is a helper or a path. 5580 // 5581 // This operation emits more code than the other options, 5582 // and can be avoided by passing the `knownHelpers` and 5583 // `knownHelpersOnly` flags at compile-time. 5584 invokeAmbiguous: function invokeAmbiguous(name, helperCall) { 5585 this.useRegister('helper'); 5586 5587 var nonHelper = this.popStack(); 5588 5589 this.emptyHash(); 5590 var helper = this.setupHelper(0, name, helperCall); 5591 5592 var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); 5593 5594 var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; 5595 if (!this.options.strict) { 5596 lookup[0] = '(helper = '; 5597 lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); 5598 } 5599 5600 this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); 5601 }, 5602 5603 // [invokePartial] 5604 // 5605 // On stack, before: context, ... 5606 // On stack after: result of partial invocation 5607 // 5608 // This operation pops off a context, invokes a partial with that context, 5609 // and pushes the result of the invocation back. 5610 invokePartial: function invokePartial(isDynamic, name, indent) { 5611 var params = [], 5612 options = this.setupParams(name, 1, params); 5613 5614 if (isDynamic) { 5615 name = this.popStack(); 5616 delete options.name; 5617 } 5618 5619 if (indent) { 5620 options.indent =
vendor: 2,310 bytes, lines 5620-5703
5620this.quotedString(indent); 5621 } 5622 options.helpers = 'helpers'; 5623 options.partials = 'partials'; 5624 options.decorators = 'container.decorators'; 5625 5626 if (!isDynamic) { 5627 params.unshift(this.nameLookup('partials', name, 'partial')); 5628 } else { 5629 params.unshift(name); 5630 } 5631 5632 if (this.options.compat) { 5633 options.depths = 'depths'; 5634 } 5635 options = this.objectLiteral(options); 5636 params.push(options); 5637 5638 this.push(this.source.functionCall('container.invokePartial', '', params)); 5639 }, 5640 5641 // [assignToHash] 5642 // 5643 // On stack, before: value, ..., hash, ... 5644 // On stack, after: ..., hash, ... 5645 // 5646 // Pops a value off the stack and assigns it to the current hash 5647 assignToHash: function assignToHash(key) { 5648 var value = this.popStack(), 5649 context = undefined, 5650 type = undefined, 5651 id = undefined; 5652 5653 if (this.trackIds) { 5654 id = this.popStack(); 5655 } 5656 if (this.stringParams) { 5657 type = this.popStack(); 5658 context = this.popStack(); 5659 } 5660 5661 var hash = this.hash; 5662 if (context) { 5663 hash.contexts[key] = context; 5664 } 5665 if (type) { 5666 hash.types[key] = type; 5667 } 5668 if (id) { 5669 hash.ids[key] = id; 5670 } 5671 hash.values[key] = value; 5672 }, 5673 5674 pushId: function pushId(type, name, child) { 5675 if (type === 'BlockParam') { 5676 this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + this.quotedString('.' + child) : '')); 5677 } else if (type === 'PathExpression') { 5678 this.pushString(name); 5679 } else if (type === 'SubExpression') { 5680 this.pushStackLiteral('true'); 5681 } else { 5682 this.pushStackLiteral('null'); 5683 } 5684 }, 5685 5686 // HELPERS 5687 5688 compiler: JavaScriptCompiler, 5689 5690 compileChildren: function compileChildren(environment, options) { 5691 var children = environment.children, 5692 child = undefined, 5693 compiler = undefined; 5694 5695 for (var i = 0, l = children.length; i < l; i++) { 5696 child = children[i]; 5697 compiler = new this.compiler(); // eslint-disable-line new-cap 5698 5699 var existing = this.matchExistingProgram(child); 5700 5701 if (existing == null) { 5702 // Placeholder to prevent name conflicts for nested children 5703 var index = this.context.programs.push('') - 1
vendor: 8,190 bytes, lines 5703-5991
5703; 5704 child.index = index; 5705 child.name = 'program' + index; 5706 this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); 5707 this.context.decorators[index] = compiler.decorators; 5708 this.context.environments[index] = child; 5709 5710 this.useDepths = this.useDepths || compiler.useDepths; 5711 this.useBlockParams = this.useBlockParams || compiler.useBlockParams; 5712 child.useDepths = this.useDepths; 5713 child.useBlockParams = this.useBlockParams; 5714 } else { 5715 child.index = existing.index; 5716 child.name = 'program' + existing.index; 5717 5718 this.useDepths = this.useDepths || existing.useDepths; 5719 this.useBlockParams = this.useBlockParams || existing.useBlockParams; 5720 } 5721 } 5722 }, 5723 matchExistingProgram: function matchExistingProgram(child) { 5724 for (var i = 0, len = this.context.environments.length; i < len; i++) { 5725 var environment = this.context.environments[i]; 5726 if (environment && environment.equals(child)) { 5727 return environment; 5728 } 5729 } 5730 }, 5731 5732 programExpression: function programExpression(guid) { 5733 var child = this.environment.children[guid], 5734 programParams = [child.index, 'data', child.blockParams]; 5735 5736 if (this.useBlockParams || this.useDepths) { 5737 programParams.push('blockParams'); 5738 } 5739 if (this.useDepths) { 5740 programParams.push('depths'); 5741 } 5742 5743 return 'container.program(' + programParams.join(', ') + ')'; 5744 }, 5745 5746 useRegister: function useRegister(name) { 5747 if (!this.registers[name]) { 5748 this.registers[name] = true; 5749 this.registers.list.push(name); 5750 } 5751 }, 5752 5753 push: function push(expr) { 5754 if (!(expr instanceof Literal)) { 5755 expr = this.source.wrap(expr); 5756 } 5757 5758 this.inlineStack.push(expr); 5759 return expr; 5760 }, 5761 5762 pushStackLiteral: function pushStackLiteral(item) { 5763 this.push(new Literal(item)); 5764 }, 5765 5766 pushSource: function pushSource(source) { 5767 if (this.pendingContent) { 5768 this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); 5769 this.pendingContent = undefined; 5770 } 5771 5772 if (source) { 5773 this.source.push(source); 5774 } 5775 }, 5776 5777 replaceStack: function replaceStack(callback) { 5778 var prefix = ['('], 5779 stack = undefined, 5780 createdStack = undefined, 5781 usedLiteral = undefined; 5782 5783 /* istanbul ignore next */ 5784 if (!this.isInline()) { 5785 throw new _exception2['default']('replaceStack on non-inline'); 5786 } 5787 5788 // We want to merge the inline statement into the replacement statement via ',' 5789 var top = this.popStack(true); 5790 5791 if (top instanceof Literal) { 5792 // Literals do not need to be inlined 5793 stack = [top.value]; 5794 prefix = ['(', stack]; 5795 usedLiteral = true; 5796 } else { 5797 // Get or create the current stack name for use by the inline 5798 createdStack = true; 5799 var _name = this.incrStack(); 5800 5801 prefix = ['((', this.push(_name), ' = ', top, ')']; 5802 stack = this.topStack(); 5803 } 5804 5805 var item = callback.call(this, stack); 5806 5807 if (!usedLiteral) { 5808 this.popStack(); 5809 } 5810 if (createdStack) { 5811 this.stackSlot--; 5812 } 5813 this.push(prefix.concat(item, ')')); 5814 }, 5815 5816 incrStack: function incrStack() { 5817 this.stackSlot++; 5818 if (this.stackSlot > this.stackVars.length) { 5819 this.stackVars.push('stack' + this.stackSlot); 5820 } 5821 return this.topStackName(); 5822 }, 5823 topStackName: function topStackName() { 5824 return 'stack' + this.stackSlot; 5825 }, 5826 flushInline: function flushInline() { 5827 var inlineStack = this.inlineStack; 5828 this.inlineStack = []; 5829 for (var i = 0, len = inlineStack.length; i < len; i++) { 5830 var entry = inlineStack[i]; 5831 /* istanbul ignore if */ 5832 if (entry instanceof Literal) { 5833 this.compileStack.push(entry); 5834 } else { 5835 var stack = this.incrStack(); 5836 this.pushSource([stack, ' = ', entry, ';']); 5837 this.compileStack.push(stack); 5838 } 5839 } 5840 }, 5841 isInline: function isInline() { 5842 return this.inlineStack.length; 5843 }, 5844 5845 popStack: function popStack(wrapped) { 5846 var inline = this.isInline(), 5847 item = (inline ? this.inlineStack : this.compileStack).pop(); 5848 5849 if (!wrapped && item instanceof Literal) { 5850 return item.value; 5851 } else { 5852 if (!inline) { 5853 /* istanbul ignore next */ 5854 if (!this.stackSlot) { 5855 throw new _exception2['default']('Invalid stack pop'); 5856 } 5857 this.stackSlot--; 5858 } 5859 return item; 5860 } 5861 }, 5862 5863 topStack: function topStack() { 5864 var stack = this.isInline() ? this.inlineStack : this.compileStack, 5865 item = stack[stack.length - 1]; 5866 5867 /* istanbul ignore if */ 5868 if (item instanceof Literal) { 5869 return item.value; 5870 } else { 5871 return item; 5872 } 5873 }, 5874 5875 contextName: function contextName(context) { 5876 if (this.useDepths && context) { 5877 return 'depths[' + context + ']'; 5878 } else { 5879 return 'depth' + context; 5880 } 5881 }, 5882 5883 quotedString: function quotedString(str) { 5884 return this.source.quotedString(str); 5885 }, 5886 5887 objectLiteral: function objectLiteral(obj) { 5888 return this.source.objectLiteral(obj); 5889 }, 5890 5891 aliasable: function aliasable(name) { 5892 var ret = this.aliases[name]; 5893 if (ret) { 5894 ret.referenceCount++; 5895 return ret; 5896 } 5897 5898 ret = this.aliases[name] = this.source.wrap(name); 5899 ret.aliasable = true; 5900 ret.referenceCount = 1; 5901 5902 return ret; 5903 }, 5904 5905 setupHelper: function setupHelper(paramSize, name, blockHelper) { 5906 var params = [], 5907 paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); 5908 var foundHelper = this.nameLookup('helpers', name, 'helper'), 5909 callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); 5910 5911 return { 5912 params: params, 5913 paramsInit: paramsInit, 5914 name: foundHelper, 5915 callParams: [callContext].concat(params) 5916 }; 5917 }, 5918 5919 setupParams: function setupParams(helper, paramSize, params) { 5920 var options = {}, 5921 contexts = [], 5922 types = [], 5923 ids = [], 5924 objectArgs = !params, 5925 param = undefined; 5926 5927 if (objectArgs) { 5928 params = []; 5929 } 5930 5931 options.name = this.quotedString(helper); 5932 options.hash = this.popStack(); 5933 5934 if (this.trackIds) { 5935 options.hashIds = this.popStack(); 5936 } 5937 if (this.stringParams) { 5938 options.hashTypes = this.popStack(); 5939 options.hashContexts = this.popStack(); 5940 } 5941 5942 var inverse = this.popStack(), 5943 program = this.popStack(); 5944 5945 // Avoid setting fn and inverse if neither are set. This allows 5946 // helpers to do a check for `if (options.fn)` 5947 if (program || inverse) { 5948 options.fn = program || 'container.noop'; 5949 options.inverse = inverse || 'container.noop'; 5950 } 5951 5952 // The parameters go on to the stack in order (making sure that they are evaluated in order) 5953 // so we need to pop them off the stack in reverse order 5954 var i = paramSize; 5955 while (i--) { 5956 param = this.popStack(); 5957 params[i] = param; 5958 5959 if (this.trackIds) { 5960 ids[i] = this.popStack(); 5961 } 5962 if (this.stringParams) { 5963 types[i] = this.popStack(); 5964 contexts[i] = this.popStack(); 5965 } 5966 } 5967 5968 if (objectArgs) { 5969 options.args = this.source.generateArray(params); 5970 } 5971 5972 if (this.trackIds) { 5973 options.ids = this.source.generateArray(ids); 5974 } 5975 if (this.stringParams) { 5976 options.types = this.source.generateArray(types); 5977 options.contexts = this.source.generateArray(contexts); 5978 } 5979 5980 if (this.options.data) { 5981 options.data = 'data'; 5982 } 5983 if (this.useBlockParams) { 5984 options.blockParams = 'blockParams'; 5985 } 5986 return options; 5987 }, 5988 5989 setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { 5990 var options = this.setupParams(helper, paramSize, params); 5991 options.loc =
vendor: 1,107 bytes, lines 5991-6018
5991locationLiteral(this); 5992 options = this.objectLiteral(options); 5993 if (useRegister) { 5994 this.useRegister('options'); 5995 params.push('options'); 5996 return ['options=', options]; 5997 } else if (params) { 5998 params.push(options); 5999 return ''; 6000 } else { 6001 return options; 6002 } 6003 } 6004 }; 6005 6006 (function () { 6007 var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); 6008 6009 var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; 6010 6011 for (var i = 0, l = reservedWords.length; i < l; i++) { 6012 compilerWords[reservedWords[i]] = true; 6013 } 6014 })(); 6015 6016 /** 6017 * @deprecated May be removed in the next major version 6018 */
vendor: 8,095 bytes, lines 6019-6297
6019 JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { 6020 return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); 6021 }; 6022 6023 /** 6024 * The compiler's current source location as a JavaScript literal. 6025 * 6026 * Hand-built ASTs may omit `loc`; emitting the literal `undefined` then 6027 * keeps the generated code valid and drops the key from object literals. 6028 * The location's `source` is the `srcName` option, so it is escaped like 6029 * every other string in the generated code. 6030 * 6031 * @param {JavaScriptCompiler} compiler the compiler whose location is emitted 6032 * @returns {string} a JSON object literal, or the string "undefined" 6033 */ 6034 function locationLiteral(compiler) { 6035 var loc = compiler.source.currentLocation; 6036 return loc ? _codeGen.safeJsonLiteral(loc) : 'undefined'; 6037 } 6038 6039 function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) { 6040 var stack = compiler.popStack(), 6041 len = parts.length; 6042 if (requireTerminal) { 6043 len--; 6044 } 6045 6046 for (var i = startPartIndex; i < len; i++) { 6047 stack = compiler.nameLookup(stack, parts[i], type); 6048 } 6049 6050 if (requireTerminal) { 6051 return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[len]), ', ', locationLiteral(compiler), ' )']; 6052 } else { 6053 return stack; 6054 } 6055 } 6056 6057 exports['default'] = JavaScriptCompiler; 6058 module.exports = exports['default']; 6059 6060/***/ }), 6061/* 92 */ 6062/***/ (function(module, exports, __webpack_require__) { 6063 6064 /* global define, require */ 6065 'use strict'; 6066 6067 var _Object$keys = __webpack_require__(60)['default']; 6068 6069 exports.__esModule = true; 6070 exports.safeJsonLiteral = safeJsonLiteral; 6071 6072 var _utils = __webpack_require__(5); 6073 6074 // Matches any character that quotedString may have to escape: quotes, 6075 // backslashes, control characters, line separators, surrogates and "<". Most 6076 // strings, e.g. lookup names, contain none of them and can skip the escaping. 6077 // eslint-disable-next-line no-control-regex 6078 var NEEDS_ESCAPING = /[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/; 6079 6080 // Per HTML "Restrictions for contents of script elements": "<!--", "<script" 6081 // and "</script" can end or change the parsing of an enclosing <script> 6082 // element. 6083 var SCRIPT_DELIMITERS = /<(?=!--|\/?script)/gi; 6084 6085 /** 6086 * Escape the "<" of every sequence that could end or change the parsing of 6087 * an enclosing <script> element. 6088 * 6089 * Only pass JavaScript or JSON code in which "<" can only occur inside string 6090 * literals, where "\u003C" has the same value. 6091 * 6092 * @param {string} code the code to escape 6093 * @returns {string} the escaped code 6094 */ 6095 function escapeScriptDelimiters(code) { 6096 return code.replace(SCRIPT_DELIMITERS, '\\u003C'); 6097 } 6098 6099 /** 6100 * Escape a UTF-16 surrogate code unit as a "\uXXXX" escape sequence. 6101 * 6102 * @param {string} surrogate a single surrogate code unit 6103 * @returns {string} the escape sequence 6104 */ 6105 function escapeSurrogate(surrogate) { 6106 return '\\u' + surrogate.charCodeAt(0).toString(16); 6107 } 6108 6109 /** 6110 * Convert a value to a JSON literal that is safe to write into generated 6111 * code: valid in ES5, where line and paragraph separators end string literals, 6112 * encodable as UTF-8 on every engine, and safe inside an enclosing <script> 6113 * element. 6114 * 6115 * @param {*} value the value to convert 6116 * @returns {string} the JavaScript literal 6117 */ 6118 6119 function safeJsonLiteral(value) { 6120 return escapeScriptDelimiters(JSON.stringify(value).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029') 6121 // Engines before ES2019 leave lone surrogates unescaped, and those cannot 6122 // be encoded as UTF-8. Escaping paired ones as well keeps the value. 6123 .replace(/[\ud800-\udfff]/g, escapeSurrogate)); 6124 } 6125 6126 var SourceNode = undefined; 6127 6128 try { 6129 /* istanbul ignore next */ 6130 if (false) { 6131 // We don't support this in AMD environments. For these environments, we assume that 6132 // they are running on the browser and thus have no need for the source-map library. 6133 var SourceMap = require('source-map'); 6134 SourceNode = SourceMap.SourceNode; 6135 } 6136 } catch (err) {} 6137 /* NOP */ 6138 6139 /* istanbul ignore if: tested but not covered in istanbul due to dist build */ 6140 if (!SourceNode) { 6141 SourceNode = function (line, column, srcFile, chunks) { 6142 this.src = ''; 6143 if (chunks) { 6144 this.add(chunks); 6145 } 6146 }; 6147 /* istanbul ignore next */ 6148 SourceNode.prototype = { 6149 add: function add(chunks) { 6150 if (_utils.isArray(chunks)) { 6151 chunks = chunks.join(''); 6152 } 6153 this.src += chunks; 6154 }, 6155 prepend: function prepend(chunks) { 6156 if (_utils.isArray(chunks)) { 6157 chunks = chunks.join(''); 6158 } 6159 this.src = chunks + this.src; 6160 }, 6161 toStringWithSourceMap: function toStringWithSourceMap() { 6162 return { code: this.toString() }; 6163 }, 6164 toString: function toString() { 6165 return this.src; 6166 } 6167 }; 6168 } 6169 6170 function castChunk(chunk, codeGen, loc) { 6171 if (_utils.isArray(chunk)) { 6172 var ret = []; 6173 6174 for (var i = 0, len = chunk.length; i < len; i++) { 6175 ret.push(codeGen.wrap(chunk[i], loc)); 6176 } 6177 return ret; 6178 } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { 6179 // Handle primitives that the SourceNode will throw up on 6180 return chunk + ''; 6181 } 6182 return chunk; 6183 } 6184 6185 function CodeGen(srcFile) { 6186 this.srcFile = srcFile; 6187 this.source = []; 6188 } 6189 6190 CodeGen.prototype = { 6191 isEmpty: function isEmpty() { 6192 return !this.source.length; 6193 }, 6194 prepend: function prepend(source, loc) { 6195 this.source.unshift(this.wrap(source, loc)); 6196 }, 6197 push: function push(source, loc) { 6198 this.source.push(this.wrap(source, loc)); 6199 }, 6200 6201 merge: function merge() { 6202 var source = this.empty(); 6203 this.each(function (line) { 6204 source.add([' ', line, '\n']); 6205 }); 6206 return source; 6207 }, 6208 6209 each: function each(iter) { 6210 for (var i = 0, len = this.source.length; i < len; i++) { 6211 iter(this.source[i]); 6212 } 6213 }, 6214 6215 empty: function empty() { 6216 var loc = this.currentLocation || { start: {} }; 6217 return new SourceNode(loc.start.line, loc.start.column, this.srcFile); 6218 }, 6219 wrap: function wrap(chunk) { 6220 var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; 6221 6222 if (chunk instanceof SourceNode) { 6223 return chunk; 6224 } 6225 6226 chunk = castChunk(chunk, this, loc); 6227 6228 return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); 6229 }, 6230 6231 functionCall: function functionCall(fn, type, params) { 6232 params = this.generateList(params); 6233 return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); 6234 }, 6235 6236 quotedString: function quotedString(str) { 6237 str = str + ''; 6238 // Fast path: quotedString runs for every lookup name and content string, 6239 // and the chain of replacements below is much slower than a single test. 6240 if (!NEEDS_ESCAPING.test(str)) { 6241 return '"' + str + '"'; 6242 } 6243 6244 // JSON.stringify escapes quotes, backslashes and control characters; 6245 // safeJsonLiteral adds line separators, surrogates and script delimiters. 6246 return safeJsonLiteral(str); 6247 }, 6248 6249 objectLiteral: function objectLiteral(obj) { 6250 // istanbul ignore next 6251 6252 var _this = this; 6253 6254 var pairs = []; 6255 6256 _Object$keys(obj).forEach(function (key) { 6257 var value = castChunk(obj[key], _this); 6258 if (value !== 'undefined') { 6259 pairs.push([_this.quotedString(key), ':', value]); 6260 } 6261 }); 6262 6263 var ret = this.generateList(pairs); 6264 ret.prepend('{'); 6265 ret.add('}'); 6266 return ret; 6267 }, 6268 6269 generateList: function generateList(entries) { 6270 var ret = this.empty(); 6271 6272 for (var i = 0, len = entries.length; i < len; i++) { 6273 if (i) { 6274 ret.add(','); 6275 } 6276 6277 ret.add(castChunk(entries[i], this)); 6278 } 6279 6280 return ret; 6281 }, 6282 6283 generateArray: function generateArray(entries) { 6284 var ret = this.generateList(entries); 6285 ret.prepend('['); 6286 ret.add(']'); 6287 6288 return ret; 6289 } 6290 }; 6291 6292 exports['default'] = CodeGen; 6293 6294/***/ }) 6295/******/ ]) 6296}); 6297;
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.