Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/handleba...
File: handlebars.js
[1000] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[1001] Fix | Delete
[1002] Fix | Delete
exports['default'] = function (instance) {
[1003] Fix | Delete
instance.registerHelper('helperMissing', function () /* [args, ]options */{
[1004] Fix | Delete
if (arguments.length === 1) {
[1005] Fix | Delete
// A missing field in a {{foo}} construct.
[1006] Fix | Delete
return undefined;
[1007] Fix | Delete
} else {
[1008] Fix | Delete
// Someone is actually trying to call something, blow up.
[1009] Fix | Delete
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
[1010] Fix | Delete
}
[1011] Fix | Delete
});
[1012] Fix | Delete
};
[1013] Fix | Delete
[1014] Fix | Delete
module.exports = exports['default'];
[1015] Fix | Delete
[1016] Fix | Delete
/***/ }),
[1017] Fix | Delete
/* 26 */
[1018] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1019] Fix | Delete
[1020] Fix | Delete
'use strict';
[1021] Fix | Delete
[1022] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[1023] Fix | Delete
[1024] Fix | Delete
exports.__esModule = true;
[1025] Fix | Delete
[1026] Fix | Delete
var _utils = __webpack_require__(5);
[1027] Fix | Delete
[1028] Fix | Delete
var _exception = __webpack_require__(6);
[1029] Fix | Delete
[1030] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[1031] Fix | Delete
[1032] Fix | Delete
exports['default'] = function (instance) {
[1033] Fix | Delete
instance.registerHelper('if', function (conditional, options) {
[1034] Fix | Delete
if (arguments.length != 2) {
[1035] Fix | Delete
throw new _exception2['default']('#if requires exactly one argument');
[1036] Fix | Delete
}
[1037] Fix | Delete
if (_utils.isFunction(conditional)) {
[1038] Fix | Delete
conditional = conditional.call(this);
[1039] Fix | Delete
}
[1040] Fix | Delete
[1041] Fix | Delete
// Default behavior is to render the positive path if the value is truthy and not empty.
[1042] Fix | Delete
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
[1043] Fix | Delete
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
[1044] Fix | Delete
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
[1045] Fix | Delete
return options.inverse(this);
[1046] Fix | Delete
} else {
[1047] Fix | Delete
return options.fn(this);
[1048] Fix | Delete
}
[1049] Fix | Delete
});
[1050] Fix | Delete
[1051] Fix | Delete
instance.registerHelper('unless', function (conditional, options) {
[1052] Fix | Delete
if (arguments.length != 2) {
[1053] Fix | Delete
throw new _exception2['default']('#unless requires exactly one argument');
[1054] Fix | Delete
}
[1055] Fix | Delete
return instance.helpers['if'].call(this, conditional, {
[1056] Fix | Delete
fn: options.inverse,
[1057] Fix | Delete
inverse: options.fn,
[1058] Fix | Delete
hash: options.hash
[1059] Fix | Delete
});
[1060] Fix | Delete
});
[1061] Fix | Delete
};
[1062] Fix | Delete
[1063] Fix | Delete
module.exports = exports['default'];
[1064] Fix | Delete
[1065] Fix | Delete
/***/ }),
[1066] Fix | Delete
/* 27 */
[1067] Fix | Delete
/***/ (function(module, exports) {
[1068] Fix | Delete
[1069] Fix | Delete
'use strict';
[1070] Fix | Delete
[1071] Fix | Delete
exports.__esModule = true;
[1072] Fix | Delete
[1073] Fix | Delete
exports['default'] = function (instance) {
[1074] Fix | Delete
instance.registerHelper('log', function () /* message, options */{
[1075] Fix | Delete
var args = [undefined],
[1076] Fix | Delete
options = arguments[arguments.length - 1];
[1077] Fix | Delete
for (var i = 0; i < arguments.length - 1; i++) {
[1078] Fix | Delete
args.push(arguments[i]);
[1079] Fix | Delete
}
[1080] Fix | Delete
[1081] Fix | Delete
var level = 1;
[1082] Fix | Delete
if (options.hash.level != null) {
[1083] Fix | Delete
level = options.hash.level;
[1084] Fix | Delete
} else if (options.data && options.data.level != null) {
[1085] Fix | Delete
level = options.data.level;
[1086] Fix | Delete
}
[1087] Fix | Delete
args[0] = level;
[1088] Fix | Delete
[1089] Fix | Delete
instance.log.apply(instance, args);
[1090] Fix | Delete
});
[1091] Fix | Delete
};
[1092] Fix | Delete
[1093] Fix | Delete
module.exports = exports['default'];
[1094] Fix | Delete
[1095] Fix | Delete
/***/ }),
[1096] Fix | Delete
/* 28 */
[1097] Fix | Delete
/***/ (function(module, exports) {
[1098] Fix | Delete
[1099] Fix | Delete
'use strict';
[1100] Fix | Delete
[1101] Fix | Delete
exports.__esModule = true;
[1102] Fix | Delete
[1103] Fix | Delete
exports['default'] = function (instance) {
[1104] Fix | Delete
instance.registerHelper('lookup', function (obj, field, options) {
[1105] Fix | Delete
if (!obj) {
[1106] Fix | Delete
// Note for 5.0: Change to "obj == null" in 5.0
[1107] Fix | Delete
return obj;
[1108] Fix | Delete
}
[1109] Fix | Delete
return options.lookupProperty(obj, field);
[1110] Fix | Delete
});
[1111] Fix | Delete
};
[1112] Fix | Delete
[1113] Fix | Delete
module.exports = exports['default'];
[1114] Fix | Delete
[1115] Fix | Delete
/***/ }),
[1116] Fix | Delete
/* 29 */
[1117] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1118] Fix | Delete
[1119] Fix | Delete
'use strict';
[1120] Fix | Delete
[1121] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[1122] Fix | Delete
[1123] Fix | Delete
exports.__esModule = true;
[1124] Fix | Delete
[1125] Fix | Delete
var _utils = __webpack_require__(5);
[1126] Fix | Delete
[1127] Fix | Delete
var _exception = __webpack_require__(6);
[1128] Fix | Delete
[1129] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[1130] Fix | Delete
[1131] Fix | Delete
exports['default'] = function (instance) {
[1132] Fix | Delete
instance.registerHelper('with', function (context, options) {
[1133] Fix | Delete
if (arguments.length != 2) {
[1134] Fix | Delete
throw new _exception2['default']('#with requires exactly one argument');
[1135] Fix | Delete
}
[1136] Fix | Delete
if (_utils.isFunction(context)) {
[1137] Fix | Delete
context = context.call(this);
[1138] Fix | Delete
}
[1139] Fix | Delete
[1140] Fix | Delete
var fn = options.fn;
[1141] Fix | Delete
[1142] Fix | Delete
if (!_utils.isEmpty(context)) {
[1143] Fix | Delete
var data = options.data;
[1144] Fix | Delete
if (options.data && options.ids) {
[1145] Fix | Delete
data = _utils.createFrame(options.data);
[1146] Fix | Delete
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
[1147] Fix | Delete
}
[1148] Fix | Delete
[1149] Fix | Delete
return fn(context, {
[1150] Fix | Delete
data: data,
[1151] Fix | Delete
blockParams: _utils.blockParams([context], [data && data.contextPath])
[1152] Fix | Delete
});
[1153] Fix | Delete
} else {
[1154] Fix | Delete
return options.inverse(this);
[1155] Fix | Delete
}
[1156] Fix | Delete
});
[1157] Fix | Delete
};
[1158] Fix | Delete
[1159] Fix | Delete
module.exports = exports['default'];
[1160] Fix | Delete
[1161] Fix | Delete
/***/ }),
[1162] Fix | Delete
/* 30 */
[1163] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1164] Fix | Delete
[1165] Fix | Delete
'use strict';
[1166] Fix | Delete
[1167] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[1168] Fix | Delete
[1169] Fix | Delete
exports.__esModule = true;
[1170] Fix | Delete
exports.registerDefaultDecorators = registerDefaultDecorators;
[1171] Fix | Delete
[1172] Fix | Delete
var _decoratorsInline = __webpack_require__(31);
[1173] Fix | Delete
[1174] Fix | Delete
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
[1175] Fix | Delete
[1176] Fix | Delete
function registerDefaultDecorators(instance) {
[1177] Fix | Delete
_decoratorsInline2['default'](instance);
[1178] Fix | Delete
}
[1179] Fix | Delete
[1180] Fix | Delete
/***/ }),
[1181] Fix | Delete
/* 31 */
[1182] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1183] Fix | Delete
[1184] Fix | Delete
'use strict';
[1185] Fix | Delete
[1186] Fix | Delete
exports.__esModule = true;
[1187] Fix | Delete
[1188] Fix | Delete
var _utils = __webpack_require__(5);
[1189] Fix | Delete
[1190] Fix | Delete
exports['default'] = function (instance) {
[1191] Fix | Delete
instance.registerDecorator('inline', function (fn, props, container, options) {
[1192] Fix | Delete
var ret = fn;
[1193] Fix | Delete
if (!props.partials) {
[1194] Fix | Delete
props.partials = {};
[1195] Fix | Delete
ret = function (context, options) {
[1196] Fix | Delete
// Create a new partials stack frame prior to exec.
[1197] Fix | Delete
var original = container.partials;
[1198] Fix | Delete
container.partials = _utils.extend({}, original, props.partials);
[1199] Fix | Delete
var ret = fn(context, options);
[1200] Fix | Delete
container.partials = original;
[1201] Fix | Delete
return ret;
[1202] Fix | Delete
};
[1203] Fix | Delete
}
[1204] Fix | Delete
[1205] Fix | Delete
props.partials[options.args[0]] = options.fn;
[1206] Fix | Delete
[1207] Fix | Delete
return ret;
[1208] Fix | Delete
});
[1209] Fix | Delete
};
[1210] Fix | Delete
[1211] Fix | Delete
module.exports = exports['default'];
[1212] Fix | Delete
[1213] Fix | Delete
/***/ }),
[1214] Fix | Delete
/* 32 */
[1215] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1216] Fix | Delete
[1217] Fix | Delete
'use strict';
[1218] Fix | Delete
[1219] Fix | Delete
exports.__esModule = true;
[1220] Fix | Delete
[1221] Fix | Delete
var _utils = __webpack_require__(5);
[1222] Fix | Delete
[1223] Fix | Delete
var logger = {
[1224] Fix | Delete
methodMap: ['debug', 'info', 'warn', 'error'],
[1225] Fix | Delete
level: 'info',
[1226] Fix | Delete
[1227] Fix | Delete
// Maps a given level value to the `methodMap` indexes above.
[1228] Fix | Delete
lookupLevel: function lookupLevel(level) {
[1229] Fix | Delete
if (typeof level === 'string') {
[1230] Fix | Delete
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
[1231] Fix | Delete
if (levelMap >= 0) {
[1232] Fix | Delete
level = levelMap;
[1233] Fix | Delete
} else {
[1234] Fix | Delete
level = parseInt(level, 10);
[1235] Fix | Delete
}
[1236] Fix | Delete
}
[1237] Fix | Delete
[1238] Fix | Delete
return level;
[1239] Fix | Delete
},
[1240] Fix | Delete
[1241] Fix | Delete
// Can be overridden in the host environment
[1242] Fix | Delete
log: function log(level) {
[1243] Fix | Delete
level = logger.lookupLevel(level);
[1244] Fix | Delete
[1245] Fix | Delete
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
[1246] Fix | Delete
var method = logger.methodMap[level];
[1247] Fix | Delete
// eslint-disable-next-line no-console
[1248] Fix | Delete
if (!console[method]) {
[1249] Fix | Delete
method = 'log';
[1250] Fix | Delete
}
[1251] Fix | Delete
[1252] Fix | Delete
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
[1253] Fix | Delete
message[_key - 1] = arguments[_key];
[1254] Fix | Delete
}
[1255] Fix | Delete
[1256] Fix | Delete
console[method].apply(console, message); // eslint-disable-line no-console
[1257] Fix | Delete
}
[1258] Fix | Delete
}
[1259] Fix | Delete
};
[1260] Fix | Delete
[1261] Fix | Delete
exports['default'] = logger;
[1262] Fix | Delete
module.exports = exports['default'];
[1263] Fix | Delete
[1264] Fix | Delete
/***/ }),
[1265] Fix | Delete
/* 33 */
[1266] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1267] Fix | Delete
[1268] Fix | Delete
'use strict';
[1269] Fix | Delete
[1270] Fix | Delete
var _Object$create = __webpack_require__(34)['default'];
[1271] Fix | Delete
[1272] Fix | Delete
var _Object$keys = __webpack_require__(13)['default'];
[1273] Fix | Delete
[1274] Fix | Delete
var _interopRequireWildcard = __webpack_require__(3)['default'];
[1275] Fix | Delete
[1276] Fix | Delete
exports.__esModule = true;
[1277] Fix | Delete
exports.createProtoAccessControl = createProtoAccessControl;
[1278] Fix | Delete
exports.resultIsAllowed = resultIsAllowed;
[1279] Fix | Delete
exports.resetLoggedProperties = resetLoggedProperties;
[1280] Fix | Delete
[1281] Fix | Delete
var _createNewLookupObject = __webpack_require__(36);
[1282] Fix | Delete
[1283] Fix | Delete
var _logger = __webpack_require__(32);
[1284] Fix | Delete
[1285] Fix | Delete
var logger = _interopRequireWildcard(_logger);
[1286] Fix | Delete
[1287] Fix | Delete
var loggedProperties = _Object$create(null);
[1288] Fix | Delete
[1289] Fix | Delete
function createProtoAccessControl(runtimeOptions) {
[1290] Fix | Delete
var defaultMethodWhiteList = _Object$create(null);
[1291] Fix | Delete
defaultMethodWhiteList['constructor'] = false;
[1292] Fix | Delete
defaultMethodWhiteList['__defineGetter__'] = false;
[1293] Fix | Delete
defaultMethodWhiteList['__defineSetter__'] = false;
[1294] Fix | Delete
defaultMethodWhiteList['__lookupGetter__'] = false;
[1295] Fix | Delete
[1296] Fix | Delete
var defaultPropertyWhiteList = _Object$create(null);
[1297] Fix | Delete
// eslint-disable-next-line no-proto
[1298] Fix | Delete
defaultPropertyWhiteList['__proto__'] = false;
[1299] Fix | Delete
[1300] Fix | Delete
return {
[1301] Fix | Delete
properties: {
[1302] Fix | Delete
whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
[1303] Fix | Delete
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
[1304] Fix | Delete
},
[1305] Fix | Delete
methods: {
[1306] Fix | Delete
whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
[1307] Fix | Delete
defaultValue: runtimeOptions.allowProtoMethodsByDefault
[1308] Fix | Delete
}
[1309] Fix | Delete
};
[1310] Fix | Delete
}
[1311] Fix | Delete
[1312] Fix | Delete
function resultIsAllowed(result, protoAccessControl, propertyName) {
[1313] Fix | Delete
if (typeof result === 'function') {
[1314] Fix | Delete
return checkWhiteList(protoAccessControl.methods, propertyName);
[1315] Fix | Delete
} else {
[1316] Fix | Delete
return checkWhiteList(protoAccessControl.properties, propertyName);
[1317] Fix | Delete
}
[1318] Fix | Delete
}
[1319] Fix | Delete
[1320] Fix | Delete
function checkWhiteList(protoAccessControlForType, propertyName) {
[1321] Fix | Delete
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
[1322] Fix | Delete
return protoAccessControlForType.whitelist[propertyName] === true;
[1323] Fix | Delete
}
[1324] Fix | Delete
if (protoAccessControlForType.defaultValue !== undefined) {
[1325] Fix | Delete
return protoAccessControlForType.defaultValue;
[1326] Fix | Delete
}
[1327] Fix | Delete
logUnexpecedPropertyAccessOnce(propertyName);
[1328] Fix | Delete
return false;
[1329] Fix | Delete
}
[1330] Fix | Delete
[1331] Fix | Delete
function logUnexpecedPropertyAccessOnce(propertyName) {
[1332] Fix | Delete
if (loggedProperties[propertyName] !== true) {
[1333] Fix | Delete
loggedProperties[propertyName] = true;
[1334] Fix | Delete
logger.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');
[1335] Fix | Delete
}
[1336] Fix | Delete
}
[1337] Fix | Delete
[1338] Fix | Delete
function resetLoggedProperties() {
[1339] Fix | Delete
_Object$keys(loggedProperties).forEach(function (propertyName) {
[1340] Fix | Delete
delete loggedProperties[propertyName];
[1341] Fix | Delete
});
[1342] Fix | Delete
}
[1343] Fix | Delete
[1344] Fix | Delete
/***/ }),
[1345] Fix | Delete
/* 34 */
[1346] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1347] Fix | Delete
[1348] Fix | Delete
module.exports = { "default": __webpack_require__(35), __esModule: true };
[1349] Fix | Delete
[1350] Fix | Delete
/***/ }),
[1351] Fix | Delete
/* 35 */
[1352] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1353] Fix | Delete
[1354] Fix | Delete
var $ = __webpack_require__(9);
[1355] Fix | Delete
module.exports = function create(P, D){
[1356] Fix | Delete
return $.create(P, D);
[1357] Fix | Delete
};
[1358] Fix | Delete
[1359] Fix | Delete
/***/ }),
[1360] Fix | Delete
/* 36 */
[1361] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1362] Fix | Delete
[1363] Fix | Delete
'use strict';
[1364] Fix | Delete
[1365] Fix | Delete
var _Object$create = __webpack_require__(34)['default'];
[1366] Fix | Delete
[1367] Fix | Delete
exports.__esModule = true;
[1368] Fix | Delete
exports.createNewLookupObject = createNewLookupObject;
[1369] Fix | Delete
[1370] Fix | Delete
var _utils = __webpack_require__(5);
[1371] Fix | Delete
[1372] Fix | Delete
/**
[1373] Fix | Delete
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
[1374] Fix | Delete
* The resulting object can be used with "object[property]" to check if a property exists
[1375] Fix | Delete
* @param {...object} sources a varargs parameter of source objects that will be merged
[1376] Fix | Delete
* @returns {object}
[1377] Fix | Delete
*/
[1378] Fix | Delete
[1379] Fix | Delete
function createNewLookupObject() {
[1380] Fix | Delete
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
[1381] Fix | Delete
sources[_key] = arguments[_key];
[1382] Fix | Delete
}
[1383] Fix | Delete
[1384] Fix | Delete
return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
[1385] Fix | Delete
}
[1386] Fix | Delete
[1387] Fix | Delete
/***/ }),
[1388] Fix | Delete
/* 37 */
[1389] Fix | Delete
/***/ (function(module, exports) {
[1390] Fix | Delete
[1391] Fix | Delete
// Build out our basic SafeString type
[1392] Fix | Delete
'use strict';
[1393] Fix | Delete
[1394] Fix | Delete
exports.__esModule = true;
[1395] Fix | Delete
function SafeString(string) {
[1396] Fix | Delete
this.string = string;
[1397] Fix | Delete
}
[1398] Fix | Delete
[1399] Fix | Delete
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
[1400] Fix | Delete
return '' + this.string;
[1401] Fix | Delete
};
[1402] Fix | Delete
[1403] Fix | Delete
exports['default'] = SafeString;
[1404] Fix | Delete
module.exports = exports['default'];
[1405] Fix | Delete
[1406] Fix | Delete
/***/ }),
[1407] Fix | Delete
/* 38 */
[1408] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[1409] Fix | Delete
[1410] Fix | Delete
'use strict';
[1411] Fix | Delete
[1412] Fix | Delete
var _Object$seal = __webpack_require__(39)['default'];
[1413] Fix | Delete
[1414] Fix | Delete
var _Object$keys = __webpack_require__(13)['default'];
[1415] Fix | Delete
[1416] Fix | Delete
var _interopRequireWildcard = __webpack_require__(3)['default'];
[1417] Fix | Delete
[1418] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[1419] Fix | Delete
[1420] Fix | Delete
exports.__esModule = true;
[1421] Fix | Delete
exports.checkRevision = checkRevision;
[1422] Fix | Delete
exports.template = template;
[1423] Fix | Delete
exports.wrapProgram = wrapProgram;
[1424] Fix | Delete
exports.resolvePartial = resolvePartial;
[1425] Fix | Delete
exports.invokePartial = invokePartial;
[1426] Fix | Delete
exports.noop = noop;
[1427] Fix | Delete
[1428] Fix | Delete
var _utils = __webpack_require__(5);
[1429] Fix | Delete
[1430] Fix | Delete
var Utils = _interopRequireWildcard(_utils);
[1431] Fix | Delete
[1432] Fix | Delete
var _exception = __webpack_require__(6);
[1433] Fix | Delete
[1434] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[1435] Fix | Delete
[1436] Fix | Delete
var _base = __webpack_require__(4);
[1437] Fix | Delete
[1438] Fix | Delete
var _helpers = __webpack_require__(10);
[1439] Fix | Delete
[1440] Fix | Delete
var _internalWrapHelper = __webpack_require__(43);
[1441] Fix | Delete
[1442] Fix | Delete
var _internalProtoAccess = __webpack_require__(33);
[1443] Fix | Delete
[1444] Fix | Delete
function checkRevision(compilerInfo) {
[1445] Fix | Delete
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
[1446] Fix | Delete
currentRevision = _base.COMPILER_REVISION;
[1447] Fix | Delete
[1448] Fix | Delete
if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
[1449] Fix | Delete
return;
[1450] Fix | Delete
}
[1451] Fix | Delete
[1452] Fix | Delete
if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
[1453] Fix | Delete
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
[1454] Fix | Delete
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
[1455] Fix | Delete
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 + ').');
[1456] Fix | Delete
} else {
[1457] Fix | Delete
// Use the embedded version info since the runtime doesn't know about this revision yet
[1458] Fix | Delete
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] + ').');
[1459] Fix | Delete
}
[1460] Fix | Delete
}
[1461] Fix | Delete
[1462] Fix | Delete
function template(templateSpec, env) {
[1463] Fix | Delete
/* istanbul ignore next */
[1464] Fix | Delete
if (!env) {
[1465] Fix | Delete
throw new _exception2['default']('No environment passed to template');
[1466] Fix | Delete
}
[1467] Fix | Delete
if (!templateSpec || !templateSpec.main) {
[1468] Fix | Delete
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
[1469] Fix | Delete
}
[1470] Fix | Delete
[1471] Fix | Delete
templateSpec.main.decorator = templateSpec.main_d;
[1472] Fix | Delete
[1473] Fix | Delete
// Note: Using env.VM references rather than local var references throughout this section to allow
[1474] Fix | Delete
// for external users to override these as pseudo-supported APIs.
[1475] Fix | Delete
env.VM.checkRevision(templateSpec.compiler);
[1476] Fix | Delete
[1477] Fix | Delete
// backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
[1478] Fix | Delete
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
[1479] Fix | Delete
[1480] Fix | Delete
function invokePartialWrapper(partial, context, options) {
[1481] Fix | Delete
if (options.hash) {
[1482] Fix | Delete
context = Utils.extend({}, context, options.hash);
[1483] Fix | Delete
if (options.ids) {
[1484] Fix | Delete
options.ids[0] = true;
[1485] Fix | Delete
}
[1486] Fix | Delete
}
[1487] Fix | Delete
partial = env.VM.resolvePartial.call(this, partial, context, options);
[1488] Fix | Delete
[1489] Fix | Delete
var extendedOptions = Utils.extend({}, options, {
[1490] Fix | Delete
hooks: this.hooks,
[1491] Fix | Delete
protoAccessControl: this.protoAccessControl
[1492] Fix | Delete
});
[1493] Fix | Delete
[1494] Fix | Delete
var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
[1495] Fix | Delete
[1496] Fix | Delete
if (result == null && env.compile) {
[1497] Fix | Delete
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
[1498] Fix | Delete
result = options.partials[options.name](context, extendedOptions);
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function