1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563 |
- /**!
- @license
- handlebars v4.7.8
- Copyright (C) 2011-2019 by Yehuda Katz
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["Handlebars"] = factory();
- else
- root["Handlebars"] = factory();
- })(this, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId])
- /******/ return installedModules[moduleId].exports;
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ exports: {},
- /******/ id: moduleId,
- /******/ loaded: false
- /******/ };
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/ // Flag the module as loaded
- /******/ module.loaded = true;
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(0);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireWildcard = __webpack_require__(1)['default'];
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- var _handlebarsBase = __webpack_require__(3);
- var base = _interopRequireWildcard(_handlebarsBase);
- // Each of these augment the Handlebars object. No need to setup here.
- // (This is done to easily share code between commonjs and browse envs)
- var _handlebarsSafeString = __webpack_require__(76);
- var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
- var _handlebarsException = __webpack_require__(5);
- var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
- var _handlebarsUtils = __webpack_require__(4);
- var Utils = _interopRequireWildcard(_handlebarsUtils);
- var _handlebarsRuntime = __webpack_require__(77);
- var runtime = _interopRequireWildcard(_handlebarsRuntime);
- var _handlebarsNoConflict = __webpack_require__(82);
- var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
- // For compatibility and usage outside of module systems, make the Handlebars object a namespace
- function create() {
- var hb = new base.HandlebarsEnvironment();
- Utils.extend(hb, base);
- hb.SafeString = _handlebarsSafeString2['default'];
- hb.Exception = _handlebarsException2['default'];
- hb.Utils = Utils;
- hb.escapeExpression = Utils.escapeExpression;
- hb.VM = runtime;
- hb.template = function (spec) {
- return runtime.template(spec, hb);
- };
- return hb;
- }
- var inst = create();
- inst.create = create;
- _handlebarsNoConflict2['default'](inst);
- inst['default'] = inst;
- exports['default'] = inst;
- module.exports = exports['default'];
- /***/ }),
- /* 1 */
- /***/ (function(module, exports) {
- "use strict";
- exports["default"] = function (obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
- }
- }
- newObj["default"] = obj;
- return newObj;
- }
- };
- exports.__esModule = true;
- /***/ }),
- /* 2 */
- /***/ (function(module, exports) {
- "use strict";
- exports["default"] = function (obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- };
- exports.__esModule = true;
- /***/ }),
- /* 3 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- exports.HandlebarsEnvironment = HandlebarsEnvironment;
- var _utils = __webpack_require__(4);
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- var _helpers = __webpack_require__(9);
- var _decorators = __webpack_require__(69);
- var _logger = __webpack_require__(71);
- var _logger2 = _interopRequireDefault(_logger);
- var _internalProtoAccess = __webpack_require__(72);
- var VERSION = '4.7.8';
- exports.VERSION = VERSION;
- var COMPILER_REVISION = 8;
- exports.COMPILER_REVISION = COMPILER_REVISION;
- var LAST_COMPATIBLE_COMPILER_REVISION = 7;
- exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
- var REVISION_CHANGES = {
- 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
- 2: '== 1.0.0-rc.3',
- 3: '== 1.0.0-rc.4',
- 4: '== 1.x.x',
- 5: '== 2.0.0-alpha.x',
- 6: '>= 2.0.0-beta.1',
- 7: '>= 4.0.0 <4.3.0',
- 8: '>= 4.3.0'
- };
- exports.REVISION_CHANGES = REVISION_CHANGES;
- var objectType = '[object Object]';
- function HandlebarsEnvironment(helpers, partials, decorators) {
- this.helpers = helpers || {};
- this.partials = partials || {};
- this.decorators = decorators || {};
- _helpers.registerDefaultHelpers(this);
- _decorators.registerDefaultDecorators(this);
- }
- HandlebarsEnvironment.prototype = {
- constructor: HandlebarsEnvironment,
- logger: _logger2['default'],
- log: _logger2['default'].log,
- registerHelper: function registerHelper(name, fn) {
- if (_utils.toString.call(name) === objectType) {
- if (fn) {
- throw new _exception2['default']('Arg not supported with multiple helpers');
- }
- _utils.extend(this.helpers, name);
- } else {
- this.helpers[name] = fn;
- }
- },
- unregisterHelper: function unregisterHelper(name) {
- delete this.helpers[name];
- },
- registerPartial: function registerPartial(name, partial) {
- if (_utils.toString.call(name) === objectType) {
- _utils.extend(this.partials, name);
- } else {
- if (typeof partial === 'undefined') {
- throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
- }
- this.partials[name] = partial;
- }
- },
- unregisterPartial: function unregisterPartial(name) {
- delete this.partials[name];
- },
- registerDecorator: function registerDecorator(name, fn) {
- if (_utils.toString.call(name) === objectType) {
- if (fn) {
- throw new _exception2['default']('Arg not supported with multiple decorators');
- }
- _utils.extend(this.decorators, name);
- } else {
- this.decorators[name] = fn;
- }
- },
- unregisterDecorator: function unregisterDecorator(name) {
- delete this.decorators[name];
- },
- /**
- * Reset the memory of illegal property accesses that have already been logged.
- * @deprecated should only be used in handlebars test-cases
- */
- resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
- _internalProtoAccess.resetLoggedProperties();
- }
- };
- var log = _logger2['default'].log;
- exports.log = log;
- exports.createFrame = _utils.createFrame;
- exports.logger = _logger2['default'];
- /***/ }),
- /* 4 */
- /***/ (function(module, exports) {
- 'use strict';
- exports.__esModule = true;
- exports.extend = extend;
- exports.indexOf = indexOf;
- exports.escapeExpression = escapeExpression;
- exports.isEmpty = isEmpty;
- exports.createFrame = createFrame;
- exports.blockParams = blockParams;
- exports.appendContextPath = appendContextPath;
- var escape = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`',
- '=': '='
- };
- var badChars = /[&<>"'`=]/g,
- possible = /[&<>"'`=]/;
- function escapeChar(chr) {
- return escape[chr];
- }
- function extend(obj /* , ...source */) {
- for (var i = 1; i < arguments.length; i++) {
- for (var key in arguments[i]) {
- if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
- obj[key] = arguments[i][key];
- }
- }
- }
- return obj;
- }
- var toString = Object.prototype.toString;
- exports.toString = toString;
- // Sourced from lodash
- // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
- /* eslint-disable func-style */
- var isFunction = function isFunction(value) {
- return typeof value === 'function';
- };
- // fallback for older versions of Chrome and Safari
- /* istanbul ignore next */
- if (isFunction(/x/)) {
- exports.isFunction = isFunction = function (value) {
- return typeof value === 'function' && toString.call(value) === '[object Function]';
- };
- }
- exports.isFunction = isFunction;
- /* eslint-enable func-style */
- /* istanbul ignore next */
- var isArray = Array.isArray || function (value) {
- return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
- };
- exports.isArray = isArray;
- // Older IE versions do not directly support indexOf so we must implement our own, sadly.
- function indexOf(array, value) {
- for (var i = 0, len = array.length; i < len; i++) {
- if (array[i] === value) {
- return i;
- }
- }
- return -1;
- }
- function escapeExpression(string) {
- if (typeof string !== 'string') {
- // don't escape SafeStrings, since they're already safe
- if (string && string.toHTML) {
- return string.toHTML();
- } else if (string == null) {
- return '';
- } else if (!string) {
- return string + '';
- }
- // Force a string conversion as this will be done by the append regardless and
- // the regex test will do this transparently behind the scenes, causing issues if
- // an object's to string has escaped characters in it.
- string = '' + string;
- }
- if (!possible.test(string)) {
- return string;
- }
- return string.replace(badChars, escapeChar);
- }
- function isEmpty(value) {
- if (!value && value !== 0) {
- return true;
- } else if (isArray(value) && value.length === 0) {
- return true;
- } else {
- return false;
- }
- }
- function createFrame(object) {
- var frame = extend({}, object);
- frame._parent = object;
- return frame;
- }
- function blockParams(params, ids) {
- params.path = ids;
- return params;
- }
- function appendContextPath(contextPath, id) {
- return (contextPath ? contextPath + '.' : '') + id;
- }
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _Object$defineProperty = __webpack_require__(6)['default'];
- exports.__esModule = true;
- var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
- function Exception(message, node) {
- var loc = node && node.loc,
- line = undefined,
- endLineNumber = undefined,
- column = undefined,
- endColumn = undefined;
- if (loc) {
- line = loc.start.line;
- endLineNumber = loc.end.line;
- column = loc.start.column;
- endColumn = loc.end.column;
- message += ' - ' + line + ':' + column;
- }
- var tmp = Error.prototype.constructor.call(this, message);
- // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
- for (var idx = 0; idx < errorProps.length; idx++) {
- this[errorProps[idx]] = tmp[errorProps[idx]];
- }
- /* istanbul ignore else */
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, Exception);
- }
- try {
- if (loc) {
- this.lineNumber = line;
- this.endLineNumber = endLineNumber;
- // Work around issue under safari where we can't directly set the column value
- /* istanbul ignore next */
- if (_Object$defineProperty) {
- Object.defineProperty(this, 'column', {
- value: column,
- enumerable: true
- });
- Object.defineProperty(this, 'endColumn', {
- value: endColumn,
- enumerable: true
- });
- } else {
- this.column = column;
- this.endColumn = endColumn;
- }
- }
- } catch (nop) {
- /* Ignore if the browser is very particular */
- }
- }
- Exception.prototype = new Error();
- exports['default'] = Exception;
- module.exports = exports['default'];
- /***/ }),
- /* 6 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(7), __esModule: true };
- /***/ }),
- /* 7 */
- /***/ (function(module, exports, __webpack_require__) {
- var $ = __webpack_require__(8);
- module.exports = function defineProperty(it, key, desc){
- return $.setDesc(it, key, desc);
- };
- /***/ }),
- /* 8 */
- /***/ (function(module, exports) {
- var $Object = Object;
- module.exports = {
- create: $Object.create,
- getProto: $Object.getPrototypeOf,
- isEnum: {}.propertyIsEnumerable,
- getDesc: $Object.getOwnPropertyDescriptor,
- setDesc: $Object.defineProperty,
- setDescs: $Object.defineProperties,
- getKeys: $Object.keys,
- getNames: $Object.getOwnPropertyNames,
- getSymbols: $Object.getOwnPropertySymbols,
- each: [].forEach
- };
- /***/ }),
- /* 9 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- exports.registerDefaultHelpers = registerDefaultHelpers;
- exports.moveHelperToHooks = moveHelperToHooks;
- var _helpersBlockHelperMissing = __webpack_require__(10);
- var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
- var _helpersEach = __webpack_require__(11);
- var _helpersEach2 = _interopRequireDefault(_helpersEach);
- var _helpersHelperMissing = __webpack_require__(64);
- var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
- var _helpersIf = __webpack_require__(65);
- var _helpersIf2 = _interopRequireDefault(_helpersIf);
- var _helpersLog = __webpack_require__(66);
- var _helpersLog2 = _interopRequireDefault(_helpersLog);
- var _helpersLookup = __webpack_require__(67);
- var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
- var _helpersWith = __webpack_require__(68);
- var _helpersWith2 = _interopRequireDefault(_helpersWith);
- function registerDefaultHelpers(instance) {
- _helpersBlockHelperMissing2['default'](instance);
- _helpersEach2['default'](instance);
- _helpersHelperMissing2['default'](instance);
- _helpersIf2['default'](instance);
- _helpersLog2['default'](instance);
- _helpersLookup2['default'](instance);
- _helpersWith2['default'](instance);
- }
- function moveHelperToHooks(instance, helperName, keepHelper) {
- if (instance.helpers[helperName]) {
- instance.hooks[helperName] = instance.helpers[helperName];
- if (!keepHelper) {
- delete instance.helpers[helperName];
- }
- }
- }
- /***/ }),
- /* 10 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- exports['default'] = function (instance) {
- instance.registerHelper('blockHelperMissing', function (context, options) {
- var inverse = options.inverse,
- fn = options.fn;
- if (context === true) {
- return fn(this);
- } else if (context === false || context == null) {
- return inverse(this);
- } else if (_utils.isArray(context)) {
- if (context.length > 0) {
- if (options.ids) {
- options.ids = [options.name];
- }
- return instance.helpers.each(context, options);
- } else {
- return inverse(this);
- }
- } else {
- if (options.data && options.ids) {
- var data = _utils.createFrame(options.data);
- data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
- options = { data: data };
- }
- return fn(context, options);
- }
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 11 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _Symbol = __webpack_require__(12)['default'];
- var _Symbol$iterator = __webpack_require__(42)['default'];
- var _getIterator = __webpack_require__(54)['default'];
- var _Object$keys = __webpack_require__(59)['default'];
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- exports['default'] = function (instance) {
- instance.registerHelper('each', function (context, options) {
- if (!options) {
- throw new _exception2['default']('Must pass iterator to #each');
- }
- var fn = options.fn,
- inverse = options.inverse,
- i = 0,
- ret = '',
- data = undefined,
- contextPath = undefined;
- if (options.data && options.ids) {
- contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
- }
- if (_utils.isFunction(context)) {
- context = context.call(this);
- }
- if (options.data) {
- data = _utils.createFrame(options.data);
- }
- function execIteration(field, index, last) {
- if (data) {
- data.key = field;
- data.index = index;
- data.first = index === 0;
- data.last = !!last;
- if (contextPath) {
- data.contextPath = contextPath + field;
- }
- }
- ret = ret + fn(context[field], {
- data: data,
- blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
- });
- }
- if (context && typeof context === 'object') {
- if (_utils.isArray(context)) {
- for (var j = context.length; i < j; i++) {
- if (i in context) {
- execIteration(i, i, i === context.length - 1);
- }
- }
- } else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) {
- var newContext = [];
- var iterator = _getIterator(context);
- for (var it = iterator.next(); !it.done; it = iterator.next()) {
- newContext.push(it.value);
- }
- context = newContext;
- for (var j = context.length; i < j; i++) {
- execIteration(i, i, i === context.length - 1);
- }
- } else {
- (function () {
- var priorKey = undefined;
- _Object$keys(context).forEach(function (key) {
- // We're running the iterations one step out of sync so we can detect
- // the last iteration without have to scan the object twice and create
- // an itermediate keys array.
- if (priorKey !== undefined) {
- execIteration(priorKey, i - 1);
- }
- priorKey = key;
- i++;
- });
- if (priorKey !== undefined) {
- execIteration(priorKey, i - 1, true);
- }
- })();
- }
- }
- if (i === 0) {
- ret = inverse(this);
- }
- return ret;
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 12 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(13), __esModule: true };
- /***/ }),
- /* 13 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(14);
- __webpack_require__(41);
- module.exports = __webpack_require__(20).Symbol;
- /***/ }),
- /* 14 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- // ECMAScript 6 symbols shim
- var $ = __webpack_require__(8)
- , global = __webpack_require__(15)
- , has = __webpack_require__(16)
- , DESCRIPTORS = __webpack_require__(17)
- , $export = __webpack_require__(19)
- , redefine = __webpack_require__(23)
- , $fails = __webpack_require__(18)
- , shared = __webpack_require__(26)
- , setToStringTag = __webpack_require__(27)
- , uid = __webpack_require__(29)
- , wks = __webpack_require__(28)
- , keyOf = __webpack_require__(30)
- , $names = __webpack_require__(35)
- , enumKeys = __webpack_require__(36)
- , isArray = __webpack_require__(37)
- , anObject = __webpack_require__(38)
- , toIObject = __webpack_require__(31)
- , createDesc = __webpack_require__(25)
- , getDesc = $.getDesc
- , setDesc = $.setDesc
- , _create = $.create
- , getNames = $names.get
- , $Symbol = global.Symbol
- , $JSON = global.JSON
- , _stringify = $JSON && $JSON.stringify
- , setter = false
- , HIDDEN = wks('_hidden')
- , isEnum = $.isEnum
- , SymbolRegistry = shared('symbol-registry')
- , AllSymbols = shared('symbols')
- , useNative = typeof $Symbol == 'function'
- , ObjectProto = Object.prototype;
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
- return _create(setDesc({}, 'a', {
- get: function(){ return setDesc(this, 'a', {value: 7}).a; }
- })).a != 7;
- }) ? function(it, key, D){
- var protoDesc = getDesc(ObjectProto, key);
- if(protoDesc)delete ObjectProto[key];
- setDesc(it, key, D);
- if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
- } : setDesc;
- var wrap = function(tag){
- var sym = AllSymbols[tag] = _create($Symbol.prototype);
- sym._k = tag;
- DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
- configurable: true,
- set: function(value){
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- }
- });
- return sym;
- };
- var isSymbol = function(it){
- return typeof it == 'symbol';
- };
- var $defineProperty = function defineProperty(it, key, D){
- if(D && has(AllSymbols, key)){
- if(!D.enumerable){
- if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
- D = _create(D, {enumerable: createDesc(0, false)});
- } return setSymbolDesc(it, key, D);
- } return setDesc(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P){
- anObject(it);
- var keys = enumKeys(P = toIObject(P))
- , i = 0
- , l = keys.length
- , key;
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P){
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
- var E = isEnum.call(this, key);
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
- ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
- var D = getDesc(it = toIObject(it), key);
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
- var names = getNames(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
- return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
- var names = getNames(toIObject(it))
- , result = []
- , i = 0
- , key;
- while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
- return result;
- };
- var $stringify = function stringify(it){
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
- var args = [it]
- , i = 1
- , $$ = arguments
- , replacer, $replacer;
- while($$.length > i)args.push($$[i++]);
- replacer = args[1];
- if(typeof replacer == 'function')$replacer = replacer;
- if($replacer || !isArray(replacer))replacer = function(key, value){
- if($replacer)value = $replacer.call(this, key, value);
- if(!isSymbol(value))return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- };
- var buggyJSON = $fails(function(){
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
- });
- // 19.4.1.1 Symbol([description])
- if(!useNative){
- $Symbol = function Symbol(){
- if(isSymbol(this))throw TypeError('Symbol is not a constructor');
- return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
- };
- redefine($Symbol.prototype, 'toString', function toString(){
- return this._k;
- });
- isSymbol = function(it){
- return it instanceof $Symbol;
- };
- $.create = $create;
- $.isEnum = $propertyIsEnumerable;
- $.getDesc = $getOwnPropertyDescriptor;
- $.setDesc = $defineProperty;
- $.setDescs = $defineProperties;
- $.getNames = $names.get = $getOwnPropertyNames;
- $.getSymbols = $getOwnPropertySymbols;
- if(DESCRIPTORS && !__webpack_require__(40)){
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
- }
- var symbolStatics = {
- // 19.4.2.1 Symbol.for(key)
- 'for': function(key){
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key){
- return keyOf(SymbolRegistry, key);
- },
- useSetter: function(){ setter = true; },
- useSimple: function(){ setter = false; }
- };
- // 19.4.2.2 Symbol.hasInstance
- // 19.4.2.3 Symbol.isConcatSpreadable
- // 19.4.2.4 Symbol.iterator
- // 19.4.2.6 Symbol.match
- // 19.4.2.8 Symbol.replace
- // 19.4.2.9 Symbol.search
- // 19.4.2.10 Symbol.species
- // 19.4.2.11 Symbol.split
- // 19.4.2.12 Symbol.toPrimitive
- // 19.4.2.13 Symbol.toStringTag
- // 19.4.2.14 Symbol.unscopables
- $.each.call((
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
- 'species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), function(it){
- var sym = wks(it);
- symbolStatics[it] = useNative ? sym : wrap(sym);
- });
- setter = true;
- $export($export.G + $export.W, {Symbol: $Symbol});
- $export($export.S, 'Symbol', symbolStatics);
- $export($export.S + $export.F * !useNative, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
- });
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
- /***/ }),
- /* 15 */
- /***/ (function(module, exports) {
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
- /***/ }),
- /* 16 */
- /***/ (function(module, exports) {
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
- };
- /***/ }),
- /* 17 */
- /***/ (function(module, exports, __webpack_require__) {
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(18)(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
- });
- /***/ }),
- /* 18 */
- /***/ (function(module, exports) {
- module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
- };
- /***/ }),
- /* 19 */
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(15)
- , core = __webpack_require__(20)
- , ctx = __webpack_require__(21)
- , PROTOTYPE = 'prototype';
- var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , IS_WRAP = type & $export.W
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
- , key, own, out;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && key in target;
- if(own && key in exports)continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function(C){
- var F = function(param){
- return this instanceof C ? new C(param) : C(param);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
- }
- };
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- module.exports = $export;
- /***/ }),
- /* 20 */
- /***/ (function(module, exports) {
- var core = module.exports = {version: '1.2.6'};
- if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
- /***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
- // optional / simple context binding
- var aFunction = __webpack_require__(22);
- module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
- };
- /***/ }),
- /* 22 */
- /***/ (function(module, exports) {
- module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
- };
- /***/ }),
- /* 23 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(24);
- /***/ }),
- /* 24 */
- /***/ (function(module, exports, __webpack_require__) {
- var $ = __webpack_require__(8)
- , createDesc = __webpack_require__(25);
- module.exports = __webpack_require__(17) ? function(object, key, value){
- return $.setDesc(object, key, createDesc(1, value));
- } : function(object, key, value){
- object[key] = value;
- return object;
- };
- /***/ }),
- /* 25 */
- /***/ (function(module, exports) {
- module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
- };
- /***/ }),
- /* 26 */
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(15)
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
- module.exports = function(key){
- return store[key] || (store[key] = {});
- };
- /***/ }),
- /* 27 */
- /***/ (function(module, exports, __webpack_require__) {
- var def = __webpack_require__(8).setDesc
- , has = __webpack_require__(16)
- , TAG = __webpack_require__(28)('toStringTag');
- module.exports = function(it, tag, stat){
- if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
- };
- /***/ }),
- /* 28 */
- /***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__(26)('wks')
- , uid = __webpack_require__(29)
- , Symbol = __webpack_require__(15).Symbol;
- module.exports = function(name){
- return store[name] || (store[name] =
- Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
- };
- /***/ }),
- /* 29 */
- /***/ (function(module, exports) {
- var id = 0
- , px = Math.random();
- module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
- /***/ }),
- /* 30 */
- /***/ (function(module, exports, __webpack_require__) {
- var $ = __webpack_require__(8)
- , toIObject = __webpack_require__(31);
- module.exports = function(object, el){
- var O = toIObject(object)
- , keys = $.getKeys(O)
- , length = keys.length
- , index = 0
- , key;
- while(length > index)if(O[key = keys[index++]] === el)return key;
- };
- /***/ }),
- /* 31 */
- /***/ (function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(32)
- , defined = __webpack_require__(34);
- module.exports = function(it){
- return IObject(defined(it));
- };
- /***/ }),
- /* 32 */
- /***/ (function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(33);
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
- /***/ }),
- /* 33 */
- /***/ (function(module, exports) {
- var toString = {}.toString;
- module.exports = function(it){
- return toString.call(it).slice(8, -1);
- };
- /***/ }),
- /* 34 */
- /***/ (function(module, exports) {
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
- };
- /***/ }),
- /* 35 */
- /***/ (function(module, exports, __webpack_require__) {
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(31)
- , getNames = __webpack_require__(8).getNames
- , toString = {}.toString;
- var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
- var getWindowNames = function(it){
- try {
- return getNames(it);
- } catch(e){
- return windowNames.slice();
- }
- };
- module.exports.get = function getOwnPropertyNames(it){
- if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
- return getNames(toIObject(it));
- };
- /***/ }),
- /* 36 */
- /***/ (function(module, exports, __webpack_require__) {
- // all enumerable object keys, includes symbols
- var $ = __webpack_require__(8);
- module.exports = function(it){
- var keys = $.getKeys(it)
- , getSymbols = $.getSymbols;
- if(getSymbols){
- var symbols = getSymbols(it)
- , isEnum = $.isEnum
- , i = 0
- , key;
- while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
- }
- return keys;
- };
- /***/ }),
- /* 37 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.2.2 IsArray(argument)
- var cof = __webpack_require__(33);
- module.exports = Array.isArray || function(arg){
- return cof(arg) == 'Array';
- };
- /***/ }),
- /* 38 */
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(39);
- module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
- };
- /***/ }),
- /* 39 */
- /***/ (function(module, exports) {
- module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
- /***/ }),
- /* 40 */
- /***/ (function(module, exports) {
- module.exports = true;
- /***/ }),
- /* 41 */
- /***/ (function(module, exports) {
-
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(43), __esModule: true };
- /***/ }),
- /* 43 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(44);
- __webpack_require__(50);
- module.exports = __webpack_require__(28)('iterator');
- /***/ }),
- /* 44 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var $at = __webpack_require__(45)(true);
- // 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(47)(String, 'String', function(iterated){
- this._t = String(iterated); // target
- this._i = 0; // next index
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , index = this._i
- , point;
- if(index >= O.length)return {value: undefined, done: true};
- point = $at(O, index);
- this._i += point.length;
- return {value: point, done: false};
- });
- /***/ }),
- /* 45 */
- /***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(46)
- , defined = __webpack_require__(34);
- // true -> String#at
- // false -> String#codePointAt
- module.exports = function(TO_STRING){
- return function(that, pos){
- var s = String(defined(that))
- , i = toInteger(pos)
- , l = s.length
- , a, b;
- if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
- };
- /***/ }),
- /* 46 */
- /***/ (function(module, exports) {
- // 7.1.4 ToInteger
- var ceil = Math.ceil
- , floor = Math.floor;
- module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
- /***/ }),
- /* 47 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var LIBRARY = __webpack_require__(40)
- , $export = __webpack_require__(19)
- , redefine = __webpack_require__(23)
- , hide = __webpack_require__(24)
- , has = __webpack_require__(16)
- , Iterators = __webpack_require__(48)
- , $iterCreate = __webpack_require__(49)
- , setToStringTag = __webpack_require__(27)
- , getProto = __webpack_require__(8).getProto
- , ITERATOR = __webpack_require__(28)('iterator')
- , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
- , FF_ITERATOR = '@@iterator'
- , KEYS = 'keys'
- , VALUES = 'values';
- var returnThis = function(){ return this; };
- module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
- $iterCreate(Constructor, NAME, next);
- var getMethod = function(kind){
- if(!BUGGY && kind in proto)return proto[kind];
- switch(kind){
- case KEYS: return function keys(){ return new Constructor(this, kind); };
- case VALUES: return function values(){ return new Constructor(this, kind); };
- } return function entries(){ return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator'
- , DEF_VALUES = DEFAULT == VALUES
- , VALUES_BUG = false
- , proto = Base.prototype
- , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
- , $default = $native || getMethod(DEFAULT)
- , methods, key;
- // Fix native
- if($native){
- var IteratorPrototype = getProto($default.call(new Base));
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // FF fix
- if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
- // fix Array#{values, @@iterator}.name in V8 / FF
- if(DEF_VALUES && $native.name !== VALUES){
- VALUES_BUG = true;
- $default = function values(){ return $native.call(this); };
- }
- }
- // Define iterator
- if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if(DEFAULT){
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: !DEF_VALUES ? $default : getMethod('entries')
- };
- if(FORCED)for(key in methods){
- if(!(key in proto))redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
- };
- /***/ }),
- /* 48 */
- /***/ (function(module, exports) {
- module.exports = {};
- /***/ }),
- /* 49 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var $ = __webpack_require__(8)
- , descriptor = __webpack_require__(25)
- , setToStringTag = __webpack_require__(27)
- , IteratorPrototype = {};
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(24)(IteratorPrototype, __webpack_require__(28)('iterator'), function(){ return this; });
- module.exports = function(Constructor, NAME, next){
- Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
- setToStringTag(Constructor, NAME + ' Iterator');
- };
- /***/ }),
- /* 50 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(51);
- var Iterators = __webpack_require__(48);
- Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
- /***/ }),
- /* 51 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var addToUnscopables = __webpack_require__(52)
- , step = __webpack_require__(53)
- , Iterators = __webpack_require__(48)
- , toIObject = __webpack_require__(31);
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(47)(Array, 'Array', function(iterated, kind){
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function(){
- var O = this._t
- , kind = this._k
- , index = this._i++;
- if(!O || index >= O.length){
- this._t = undefined;
- return step(1);
- }
- if(kind == 'keys' )return step(0, index);
- if(kind == 'values')return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
- /***/ }),
- /* 52 */
- /***/ (function(module, exports) {
- module.exports = function(){ /* empty */ };
- /***/ }),
- /* 53 */
- /***/ (function(module, exports) {
- module.exports = function(done, value){
- return {value: value, done: !!done};
- };
- /***/ }),
- /* 54 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(55), __esModule: true };
- /***/ }),
- /* 55 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(50);
- __webpack_require__(44);
- module.exports = __webpack_require__(56);
- /***/ }),
- /* 56 */
- /***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(38)
- , get = __webpack_require__(57);
- module.exports = __webpack_require__(20).getIterator = function(it){
- var iterFn = get(it);
- if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
- return anObject(iterFn.call(it));
- };
- /***/ }),
- /* 57 */
- /***/ (function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(58)
- , ITERATOR = __webpack_require__(28)('iterator')
- , Iterators = __webpack_require__(48);
- module.exports = __webpack_require__(20).getIteratorMethod = function(it){
- if(it != undefined)return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
- };
- /***/ }),
- /* 58 */
- /***/ (function(module, exports, __webpack_require__) {
- // getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(33)
- , TAG = __webpack_require__(28)('toStringTag')
- // ES3 wrong here
- , ARG = cof(function(){ return arguments; }()) == 'Arguments';
- module.exports = function(it){
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = (O = Object(it))[TAG]) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
- };
- /***/ }),
- /* 59 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(60), __esModule: true };
- /***/ }),
- /* 60 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(61);
- module.exports = __webpack_require__(20).Object.keys;
- /***/ }),
- /* 61 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(62);
- __webpack_require__(63)('keys', function($keys){
- return function keys(it){
- return $keys(toObject(it));
- };
- });
- /***/ }),
- /* 62 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(34);
- module.exports = function(it){
- return Object(defined(it));
- };
- /***/ }),
- /* 63 */
- /***/ (function(module, exports, __webpack_require__) {
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(19)
- , core = __webpack_require__(20)
- , fails = __webpack_require__(18);
- module.exports = function(KEY, exec){
- var fn = (core.Object || {})[KEY] || Object[KEY]
- , exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
- };
- /***/ }),
- /* 64 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- exports['default'] = function (instance) {
- instance.registerHelper('helperMissing', function () /* [args, ]options */{
- if (arguments.length === 1) {
- // A missing field in a {{foo}} construct.
- return undefined;
- } else {
- // Someone is actually trying to call something, blow up.
- throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
- }
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 65 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- exports['default'] = function (instance) {
- instance.registerHelper('if', function (conditional, options) {
- if (arguments.length != 2) {
- throw new _exception2['default']('#if requires exactly one argument');
- }
- if (_utils.isFunction(conditional)) {
- conditional = conditional.call(this);
- }
- // Default behavior is to render the positive path if the value is truthy and not empty.
- // The `includeZero` option may be set to treat the condtional as purely not empty based on the
- // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
- if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
- return options.inverse(this);
- } else {
- return options.fn(this);
- }
- });
- instance.registerHelper('unless', function (conditional, options) {
- if (arguments.length != 2) {
- throw new _exception2['default']('#unless requires exactly one argument');
- }
- return instance.helpers['if'].call(this, conditional, {
- fn: options.inverse,
- inverse: options.fn,
- hash: options.hash
- });
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 66 */
- /***/ (function(module, exports) {
- 'use strict';
- exports.__esModule = true;
- exports['default'] = function (instance) {
- instance.registerHelper('log', function () /* message, options */{
- var args = [undefined],
- options = arguments[arguments.length - 1];
- for (var i = 0; i < arguments.length - 1; i++) {
- args.push(arguments[i]);
- }
- var level = 1;
- if (options.hash.level != null) {
- level = options.hash.level;
- } else if (options.data && options.data.level != null) {
- level = options.data.level;
- }
- args[0] = level;
- instance.log.apply(instance, args);
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 67 */
- /***/ (function(module, exports) {
- 'use strict';
- exports.__esModule = true;
- exports['default'] = function (instance) {
- instance.registerHelper('lookup', function (obj, field, options) {
- if (!obj) {
- // Note for 5.0: Change to "obj == null" in 5.0
- return obj;
- }
- return options.lookupProperty(obj, field);
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 68 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- exports['default'] = function (instance) {
- instance.registerHelper('with', function (context, options) {
- if (arguments.length != 2) {
- throw new _exception2['default']('#with requires exactly one argument');
- }
- if (_utils.isFunction(context)) {
- context = context.call(this);
- }
- var fn = options.fn;
- if (!_utils.isEmpty(context)) {
- var data = options.data;
- if (options.data && options.ids) {
- data = _utils.createFrame(options.data);
- data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
- }
- return fn(context, {
- data: data,
- blockParams: _utils.blockParams([context], [data && data.contextPath])
- });
- } else {
- return options.inverse(this);
- }
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 69 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- exports.registerDefaultDecorators = registerDefaultDecorators;
- var _decoratorsInline = __webpack_require__(70);
- var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
- function registerDefaultDecorators(instance) {
- _decoratorsInline2['default'](instance);
- }
- /***/ }),
- /* 70 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- exports['default'] = function (instance) {
- instance.registerDecorator('inline', function (fn, props, container, options) {
- var ret = fn;
- if (!props.partials) {
- props.partials = {};
- ret = function (context, options) {
- // Create a new partials stack frame prior to exec.
- var original = container.partials;
- container.partials = _utils.extend({}, original, props.partials);
- var ret = fn(context, options);
- container.partials = original;
- return ret;
- };
- }
- props.partials[options.args[0]] = options.fn;
- return ret;
- });
- };
- module.exports = exports['default'];
- /***/ }),
- /* 71 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- exports.__esModule = true;
- var _utils = __webpack_require__(4);
- var logger = {
- methodMap: ['debug', 'info', 'warn', 'error'],
- level: 'info',
- // Maps a given level value to the `methodMap` indexes above.
- lookupLevel: function lookupLevel(level) {
- if (typeof level === 'string') {
- var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
- if (levelMap >= 0) {
- level = levelMap;
- } else {
- level = parseInt(level, 10);
- }
- }
- return level;
- },
- // Can be overridden in the host environment
- log: function log(level) {
- level = logger.lookupLevel(level);
- if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
- var method = logger.methodMap[level];
- // eslint-disable-next-line no-console
- if (!console[method]) {
- method = 'log';
- }
- for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- message[_key - 1] = arguments[_key];
- }
- console[method].apply(console, message); // eslint-disable-line no-console
- }
- }
- };
- exports['default'] = logger;
- module.exports = exports['default'];
- /***/ }),
- /* 72 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _Object$create = __webpack_require__(73)['default'];
- var _Object$keys = __webpack_require__(59)['default'];
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- exports.createProtoAccessControl = createProtoAccessControl;
- exports.resultIsAllowed = resultIsAllowed;
- exports.resetLoggedProperties = resetLoggedProperties;
- var _createNewLookupObject = __webpack_require__(75);
- var _logger = __webpack_require__(71);
- var _logger2 = _interopRequireDefault(_logger);
- var loggedProperties = _Object$create(null);
- function createProtoAccessControl(runtimeOptions) {
- var defaultMethodWhiteList = _Object$create(null);
- defaultMethodWhiteList['constructor'] = false;
- defaultMethodWhiteList['__defineGetter__'] = false;
- defaultMethodWhiteList['__defineSetter__'] = false;
- defaultMethodWhiteList['__lookupGetter__'] = false;
- var defaultPropertyWhiteList = _Object$create(null);
- // eslint-disable-next-line no-proto
- defaultPropertyWhiteList['__proto__'] = false;
- return {
- properties: {
- whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
- defaultValue: runtimeOptions.allowProtoPropertiesByDefault
- },
- methods: {
- whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
- defaultValue: runtimeOptions.allowProtoMethodsByDefault
- }
- };
- }
- function resultIsAllowed(result, protoAccessControl, propertyName) {
- if (typeof result === 'function') {
- return checkWhiteList(protoAccessControl.methods, propertyName);
- } else {
- return checkWhiteList(protoAccessControl.properties, propertyName);
- }
- }
- function checkWhiteList(protoAccessControlForType, propertyName) {
- if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
- return protoAccessControlForType.whitelist[propertyName] === true;
- }
- if (protoAccessControlForType.defaultValue !== undefined) {
- return protoAccessControlForType.defaultValue;
- }
- logUnexpecedPropertyAccessOnce(propertyName);
- return false;
- }
- function logUnexpecedPropertyAccessOnce(propertyName) {
- if (loggedProperties[propertyName] !== true) {
- loggedProperties[propertyName] = true;
- _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');
- }
- }
- function resetLoggedProperties() {
- _Object$keys(loggedProperties).forEach(function (propertyName) {
- delete loggedProperties[propertyName];
- });
- }
- /***/ }),
- /* 73 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(74), __esModule: true };
- /***/ }),
- /* 74 */
- /***/ (function(module, exports, __webpack_require__) {
- var $ = __webpack_require__(8);
- module.exports = function create(P, D){
- return $.create(P, D);
- };
- /***/ }),
- /* 75 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _Object$create = __webpack_require__(73)['default'];
- exports.__esModule = true;
- exports.createNewLookupObject = createNewLookupObject;
- var _utils = __webpack_require__(4);
- /**
- * Create a new object with "null"-prototype to avoid truthy results on prototype properties.
- * The resulting object can be used with "object[property]" to check if a property exists
- * @param {...object} sources a varargs parameter of source objects that will be merged
- * @returns {object}
- */
- function createNewLookupObject() {
- for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
- sources[_key] = arguments[_key];
- }
- return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
- }
- /***/ }),
- /* 76 */
- /***/ (function(module, exports) {
- // Build out our basic SafeString type
- 'use strict';
- exports.__esModule = true;
- function SafeString(string) {
- this.string = string;
- }
- SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
- return '' + this.string;
- };
- exports['default'] = SafeString;
- module.exports = exports['default'];
- /***/ }),
- /* 77 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var _Object$seal = __webpack_require__(78)['default'];
- var _Object$keys = __webpack_require__(59)['default'];
- var _interopRequireWildcard = __webpack_require__(1)['default'];
- var _interopRequireDefault = __webpack_require__(2)['default'];
- exports.__esModule = true;
- exports.checkRevision = checkRevision;
- exports.template = template;
- exports.wrapProgram = wrapProgram;
- exports.resolvePartial = resolvePartial;
- exports.invokePartial = invokePartial;
- exports.noop = noop;
- var _utils = __webpack_require__(4);
- var Utils = _interopRequireWildcard(_utils);
- var _exception = __webpack_require__(5);
- var _exception2 = _interopRequireDefault(_exception);
- var _base = __webpack_require__(3);
- var _helpers = __webpack_require__(9);
- var _internalWrapHelper = __webpack_require__(81);
- var _internalProtoAccess = __webpack_require__(72);
- function checkRevision(compilerInfo) {
- var compilerRevision = compilerInfo && compilerInfo[0] || 1,
- currentRevision = _base.COMPILER_REVISION;
- if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
- return;
- }
- if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
- var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
- compilerVersions = _base.REVISION_CHANGES[compilerRevision];
- 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 + ').');
- } else {
- // Use the embedded version info since the runtime doesn't know about this revision yet
- 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] + ').');
- }
- }
- function template(templateSpec, env) {
- /* istanbul ignore next */
- if (!env) {
- throw new _exception2['default']('No environment passed to template');
- }
- if (!templateSpec || !templateSpec.main) {
- throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
- }
- templateSpec.main.decorator = templateSpec.main_d;
- // Note: Using env.VM references rather than local var references throughout this section to allow
- // for external users to override these as pseudo-supported APIs.
- env.VM.checkRevision(templateSpec.compiler);
- // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
- var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
- function invokePartialWrapper(partial, context, options) {
- if (options.hash) {
- context = Utils.extend({}, context, options.hash);
- if (options.ids) {
- options.ids[0] = true;
- }
- }
- partial = env.VM.resolvePartial.call(this, partial, context, options);
- var extendedOptions = Utils.extend({}, options, {
- hooks: this.hooks,
- protoAccessControl: this.protoAccessControl
- });
- var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
- if (result == null && env.compile) {
- options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
- result = options.partials[options.name](context, extendedOptions);
- }
- if (result != null) {
- if (options.indent) {
- var lines = result.split('\n');
- for (var i = 0, l = lines.length; i < l; i++) {
- if (!lines[i] && i + 1 === l) {
- break;
- }
- lines[i] = options.indent + lines[i];
- }
- result = lines.join('\n');
- }
- return result;
- } else {
- throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
- }
- }
- // Just add water
- var container = {
- strict: function strict(obj, name, loc) {
- if (!obj || !(name in obj)) {
- throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
- loc: loc
- });
- }
- return container.lookupProperty(obj, name);
- },
- lookupProperty: function lookupProperty(parent, propertyName) {
- var result = parent[propertyName];
- if (result == null) {
- return result;
- }
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
- return result;
- }
- if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
- return result;
- }
- return undefined;
- },
- lookup: function lookup(depths, name) {
- var len = depths.length;
- for (var i = 0; i < len; i++) {
- var result = depths[i] && container.lookupProperty(depths[i], name);
- if (result != null) {
- return depths[i][name];
- }
- }
- },
- lambda: function lambda(current, context) {
- return typeof current === 'function' ? current.call(context) : current;
- },
- escapeExpression: Utils.escapeExpression,
- invokePartial: invokePartialWrapper,
- fn: function fn(i) {
- var ret = templateSpec[i];
- ret.decorator = templateSpec[i + '_d'];
- return ret;
- },
- programs: [],
- program: function program(i, data, declaredBlockParams, blockParams, depths) {
- var programWrapper = this.programs[i],
- fn = this.fn(i);
- if (data || depths || blockParams || declaredBlockParams) {
- programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
- } else if (!programWrapper) {
- programWrapper = this.programs[i] = wrapProgram(this, i, fn);
- }
- return programWrapper;
- },
- data: function data(value, depth) {
- while (value && depth--) {
- value = value._parent;
- }
- return value;
- },
- mergeIfNeeded: function mergeIfNeeded(param, common) {
- var obj = param || common;
- if (param && common && param !== common) {
- obj = Utils.extend({}, common, param);
- }
- return obj;
- },
- // An empty object to use as replacement for null-contexts
- nullContext: _Object$seal({}),
- noop: env.VM.noop,
- compilerInfo: templateSpec.compiler
- };
- function ret(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var data = options.data;
- ret._setup(options);
- if (!options.partial && templateSpec.useData) {
- data = initData(context, data);
- }
- var depths = undefined,
- blockParams = templateSpec.useBlockParams ? [] : undefined;
- if (templateSpec.useDepths) {
- if (options.depths) {
- depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
- } else {
- depths = [context];
- }
- }
- function main(context /*, options*/) {
- return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
- }
- main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
- return main(context, options);
- }
- ret.isTop = true;
- ret._setup = function (options) {
- if (!options.partial) {
- var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
- wrapHelpersToPassLookupProperty(mergedHelpers, container);
- container.helpers = mergedHelpers;
- if (templateSpec.usePartial) {
- // Use mergeIfNeeded here to prevent compiling global partials multiple times
- container.partials = container.mergeIfNeeded(options.partials, env.partials);
- }
- if (templateSpec.usePartial || templateSpec.useDecorators) {
- container.decorators = Utils.extend({}, env.decorators, options.decorators);
- }
- container.hooks = {};
- container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
- var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
- _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
- _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
- } else {
- container.protoAccessControl = options.protoAccessControl; // internal option
- container.helpers = options.helpers;
- container.partials = options.partials;
- container.decorators = options.decorators;
- container.hooks = options.hooks;
- }
- };
- ret._child = function (i, data, blockParams, depths) {
- if (templateSpec.useBlockParams && !blockParams) {
- throw new _exception2['default']('must pass block params');
- }
- if (templateSpec.useDepths && !depths) {
- throw new _exception2['default']('must pass parent depths');
- }
- return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
- };
- return ret;
- }
- function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
- function prog(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var currentDepths = depths;
- if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
- currentDepths = [context].concat(depths);
- }
- return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
- }
- prog = executeDecorators(fn, prog, container, depths, data, blockParams);
- prog.program = i;
- prog.depth = depths ? depths.length : 0;
- prog.blockParams = declaredBlockParams || 0;
- return prog;
- }
- /**
- * This is currently part of the official API, therefore implementation details should not be changed.
- */
- function resolvePartial(partial, context, options) {
- if (!partial) {
- if (options.name === '@partial-block') {
- partial = options.data['partial-block'];
- } else {
- partial = options.partials[options.name];
- }
- } else if (!partial.call && !options.name) {
- // This is a dynamic partial that returned a string
- options.name = partial;
- partial = options.partials[partial];
- }
- return partial;
- }
- function invokePartial(partial, context, options) {
- // Use the current closure context to save the partial-block if this partial
- var currentPartialBlock = options.data && options.data['partial-block'];
- options.partial = true;
- if (options.ids) {
- options.data.contextPath = options.ids[0] || options.data.contextPath;
- }
- var partialBlock = undefined;
- if (options.fn && options.fn !== noop) {
- (function () {
- options.data = _base.createFrame(options.data);
- // Wrapper function to get access to currentPartialBlock from the closure
- var fn = options.fn;
- partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- // Restore the partial-block from the closure for the execution of the block
- // i.e. the part inside the block of the partial call.
- options.data = _base.createFrame(options.data);
- options.data['partial-block'] = currentPartialBlock;
- return fn(context, options);
- };
- if (fn.partials) {
- options.partials = Utils.extend({}, options.partials, fn.partials);
- }
- })();
- }
- if (partial === undefined && partialBlock) {
- partial = partialBlock;
- }
- if (partial === undefined) {
- throw new _exception2['default']('The partial ' + options.name + ' could not be found');
- } else if (partial instanceof Function) {
- return partial(context, options);
- }
- }
- function noop() {
- return '';
- }
- function initData(context, data) {
- if (!data || !('root' in data)) {
- data = data ? _base.createFrame(data) : {};
- data.root = context;
- }
- return data;
- }
- function executeDecorators(fn, prog, container, depths, data, blockParams) {
- if (fn.decorator) {
- var props = {};
- prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
- Utils.extend(prog, props);
- }
- return prog;
- }
- function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
- _Object$keys(mergedHelpers).forEach(function (helperName) {
- var helper = mergedHelpers[helperName];
- mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
- });
- }
- function passLookupPropertyOption(helper, container) {
- var lookupProperty = container.lookupProperty;
- return _internalWrapHelper.wrapHelper(helper, function (options) {
- return Utils.extend({ lookupProperty: lookupProperty }, options);
- });
- }
- /***/ }),
- /* 78 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(79), __esModule: true };
- /***/ }),
- /* 79 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(80);
- module.exports = __webpack_require__(20).Object.seal;
- /***/ }),
- /* 80 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.17 Object.seal(O)
- var isObject = __webpack_require__(39);
- __webpack_require__(63)('seal', function($seal){
- return function seal(it){
- return $seal && isObject(it) ? $seal(it) : it;
- };
- });
- /***/ }),
- /* 81 */
- /***/ (function(module, exports) {
- 'use strict';
- exports.__esModule = true;
- exports.wrapHelper = wrapHelper;
- function wrapHelper(helper, transformOptionsFn) {
- if (typeof helper !== 'function') {
- // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
- // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
- return helper;
- }
- var wrapper = function wrapper() /* dynamic arguments */{
- var options = arguments[arguments.length - 1];
- arguments[arguments.length - 1] = transformOptionsFn(options);
- return helper.apply(this, arguments);
- };
- return wrapper;
- }
- /***/ }),
- /* 82 */
- /***/ (function(module, exports) {
- /* global globalThis */
- 'use strict';
- exports.__esModule = true;
- exports['default'] = function (Handlebars) {
- /* istanbul ignore next */
- // https://mathiasbynens.be/notes/globalthis
- (function () {
- if (typeof globalThis === 'object') return;
- Object.prototype.__defineGetter__('__magic__', function () {
- return this;
- });
- __magic__.globalThis = __magic__; // eslint-disable-line no-undef
- delete Object.prototype.__magic__;
- })();
- var $Handlebars = globalThis.Handlebars;
- /* istanbul ignore next */
- Handlebars.noConflict = function () {
- if (globalThis.Handlebars === Handlebars) {
- globalThis.Handlebars = $Handlebars;
- }
- return Handlebars;
- };
- };
- module.exports = exports['default'];
- /***/ })
- /******/ ])
- });
- ;
|