1(function e(t, n, r) { 2 function s(o, u) { 3 if (!n[o]) { 4 if (!t[o]) { 5 var a = typeof require == "function" && require; 6 if (!u && a) return a(o, !0); 7 if (i) return i(o, !0); 8 var f = new Error("Cannot find module '" + o + "'"); 9 throw f.code = "MODULE_NOT_FOUND", f 10 } 11 var l = n[o] = { 12 exports: {} 13 }; 14 t[o][0].call(l.exports, function(e) { 15 var n = t[o][1][e]; 16 return s(n ? n : e) 17 }, l, l.exports, e, t, n, r) 18 } 19 return n[o].exports 20 } 21 var i = typeof require == "function" && require; 22 for (var o = 0; o < r.length; o++) s(r[o]); 23 return s 24})({ 25 1: [function(require, module, exports) { 26 ! function(i, t) { 27 "function" == typeof define && define.amd ? define([], t) : "object" == typeof module && module.exports ? module.exports = t(jQuery) : i.returnExports = t() 28 }(this, function(i) { 29 "use strict"; 30 31 function t(t) { 32 this.anchorPosition = 0, this._visible = !1, this._animating = !1, this.triggerEl = i(t), this.wrapperEl = i(this.triggerEl.attr("href")), this.anchorEl = i(this.triggerEl.data("anchor")), this.wrapperEl.children().wrapAll('<div class="expandablebox-container"><div class="expandablebox-container-content"></div></div>'), this.containerEl = this.wrapperEl.find(".expandablebox-container"), this.containerEl.append('<div class="expandablebox-container-arrow"><span class="expandablebox-container-arrow-border"></span><span class="expandablebox-container-arrow-body"></span></div>'), this.arrowEl = this.wrapperEl.find(".expandablebox-container-arrow"), this.contentEl = this.wrapperEl.find(".expandablebox-container-content"), this.triggerEl.on("click", i.proxy(this._triggerClickHandler, this)), this._showBeginHandler = i.proxy(this._showBegin, this), this._showCompleteHandler = i.proxy(this._showComplete, this), this._hideBeginHandler = i.proxy(this._hideBegin, this), this._hideCompleteHandler = i.proxy(this._hideComplete, this), this._documentClickHandler = i.proxy(this._documentClick, this) 33 } 34 return i(document).ready(function() { 35 for (var e = i('[data-switch="expand"]').toArray(), n = e.length; n--;) new t(e[n]) 36 }), t.prototype = { 37 _triggerClickHandler: function(i) { 38 i.preventDefault(), this.isAnimating() || this.isVisible() || this.show() 39 }, 40 _documentClick: function(t) { 41 var e = t.target; 42 0 === i(e).closest(".expandablebox-container").length && (this.wrapperEl.find("input").blur(), this.wrapperEl.find("form").trigger("reset.validation"), this.hide()) 43 }, 44 _showBegin: function() { 45 var i = this.anchorEl.position().top + this.anchorEl.outerHeight(!0); 46 i !== this.anchorPosition && (this.anchorPosition = i, this.wrapperEl.css("top", this.anchorPosition + "px")), this._animating = !0, this.wrapperEl.show(); 47 var t = this.triggerEl.offset().left + this.triggerEl.width() / 2 - this.containerEl.offset().left - 12; 48 this.arrowEl.css("left", t + "px") 49 }, 50 _showComplete: function() { 51 this._animating = !1, this._visible = !0, i(document).on("click touchstart", this._documentClickHandler) 52 }, 53 _hideBegin: function() { 54 this._animating = !0, i(document).off("click touchstart", this._documentClickHandler) 55 }, 56 _hideComplete: function() { 57 this._visible = !1, this._animating = !1 58 }, 59 isAnimating: function() { 60 return this._animating 61 }, 62 isVisible: function() { 63 return this._visible 64 }, 65 show: function() { 66 this.wrapperEl.velocity({ 67 p: "transition.slideDownBigIn", 68 o: { 69 duration: 400, 70 display: "block", 71 begin: this._showBeginHandler, 72 complete: this._showCompleteHandler 73 } 74 }) 75 }, 76 hide: function() { 77 this.wrapperEl.velocity({
78 p: "transition.slideUpBigOut", 79 o: { 80 duration: 300, 81 display: "none", 82 begin: this._hideBeginHandler, 83 complete: this._hideCompleteHandler 84 } 85 }) 86 } 87 }, t 88 }); 89 90 }, {}], 91 2: [function(require, module, exports) { 92 var expandablebox = require("./expandablebox.js"), 93 Panel = require("./panel.js"); 94 require("./validator.js"), require("./tocgenie.js"), 95 function(e) { 96 e("video").bind("contextmenu", function(e) { 97 return !1 98 }), e(".nav-item-hassub").click(function() { 99 var t = e(this).next(".subnav-menu"); 100 if (t.length) return t.is(".open") ? t.removeClass("open") : (e(".subnav-menu.open").removeClass("open"), t.addClass("open")), !1 101 }), e(function() { 102 new Panel({ 103 element: e(".panel"), 104 trigger: e(".panel-trigger") 105 }), e(".slider").bxSlider({auto: true, pause: 5000, speed: 1000}) 106 }), e(function() { 107 var t = null, 108 n = function() { 109 e(".embed_fb").each(function() { 110 var t = e(this).attr("src"); 111 t = t.replace(/width=[0-9]*/, "width=" + e(this).width()), e(this).attr("src", t) 112 }) 113 }; 114 e(window).resize(function() { 115 clearTimeout(t), t = setTimeout(n, 100) 116 }), n() 117 }); 118 var t = function(e) { 119 "function" == typeof jQuery && e instanceof jQuery && (e = e[0]); 120 var t = e.getBoundingClientRect(); 121 return t.top >= 0 && t.left >= 0 && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) && t.right <= (window.innerWidth || document.documentElement.clientWidth) 122 }, 123 n = function(e, t, n) { 124 var a = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), 125 o = -1 !== e.indexOf("?") ? "&" : "?"; 126 return e.match(a) ? e.replace(a, "$1" + t + "=" + n + "$2") : e + o + t + "=" + n 127 }; 128 e(".jumbo-videobtn").click(function() { 129 var t = e(this).parents(".jumbo").find(".jumbo-video"), 130 n = t.find("iframe"); 131 if (n.length) { 132 var a = n.attr("src"); 133 a && (a.indexOf("?"), a += "&", a += "autoplay=1", n.attr("src", a)) 134 } 135 return t.show(), e(window).trigger("resize"), t.find("video").length && t.find("video").get(0).play(), !1 136 }), e(function() { 137 e("[data-seemore]").each(function() { 138 var a = !1, 139 o = e(this), 140 r = o.find("[data-columns]").length > 0, 141 i = e("[data-seemore-next]", o); 142 e(window).bind("scroll", function() { 143 if (!a && i.length && t(i)) { 144 var s = i.attr("href"); 145 if (s) { 146 a = !0; 147 var c = e("<div></div>"); 148 c.load(s + " [data-seemore]", function(t, s, d) { 149 if (window.history && window.history.replaceState && window.history.replaceState(null, "", n(window.location.href, "opage", i.attr("data-page"))), "error" == s) { 150 e("#error").html("Sorry but there was an error: " + d.status + " " + d.statusText) 151 } else r ? (salvattore.appendElements(o.find("[data-columns]").get(0), e("[data-seemore] [data-columns]", c).children()), i.replaceWith(e("[data-seemore-next]", c))) : (o.append(e("[data-seemore]", c).children()), i.replaceWith(e("[data-seemore-next]", c))), i = e("[data-seemore-next]", o); 152 a = !1 153 }) 154 } 155 } 156 }), e(window).trigger("scroll") 157 }) 158 }), 159 /* e(function(){e("body").on("click","a",function(){var t=e(this).attr("href");if(t.startsWith("#")){t=t.substr(1);var n=e('[id="'+t.replace(/'/g,"\\'")+'"]');if(n.length)return e("html, body").animate({scrollTop:n.offset().top-e("#wpadminbar").outerHeight()-e("#main-nav").outerHeight()-20},500),window.location.hash=t,!1}})}), */ 160 e(window).scroll(function() { 161 e(this).scrollTop() > 50 ? e("#back-to-top").fadeIn() : e("#back-to-top").fadeOut() 162 }), e("#complaint_form").each(function() { 163 var t = e(this), 164 n = function() { 165 e("[name=comportementale]", t).is(":checked") && e("[name=comportementale]", t).is(":visible") ? t.addClass("plainte-comportementale") : t.removeClass("plainte-comportementale") 166 }; 167 e("[name=comportementale]", t).change(function() { 168 n() 169 }), e(".cb_comportementale", t).change(function() { 170 e(".cb_comportementale:checked", t).length ? e(e("[name=comportementale]", t).parents(".form-group").get(0)).show() : e(e("[name=comportementale]", t).parents(".form-group").get(0)).hide(), n() 171 }), e("[data-showhide]", t).change(function() { 172 e(this).is(":checked") ? e(e("#" + e(this).attr("data-showhide"), t).parents(".form-group").get(0)).show() : e(e("#" + e(this).attr("data-showhide"), t).parents(".form-group").get(0)).hide() 173 }), e("[data-hideshow]", t).change(function() { 174 e(this).is(":checked") ? e(e("#" + e(this).attr("data-hideshow"), t).parents(".form-group").get(0)).hide() : e(e("#" + e(this).attr("data-hideshow"), t).parents(".form-group").get(0)).show() 175 }) 176 }) 177 }(jQuery); 178 }, {
179 "./expandablebox.js": 1, 180 "./panel.js": 3, 181 "./tocgenie.js": 6, 182 "./validator.js": 7 183 }], 184 3: [function(require, module, exports) { 185 ! function(i, e) { 186 "function" == typeof define && define.amd ? define([], e) : "object" == typeof module && module.exports ? module.exports = e(jQuery) : i.returnExports = e() 187 }(this, function(i) { 188 "use strict"; 189 190 function e(e) { 191 this.isAnimating = !1, this.triggerEl = i(e.trigger), this.panelEl = i(e.element), this.panelEl.wrap('<div style="display:none;position:fixed;z-index:9999"></div>'), this.panelWrapperEl = this.panelEl.parent(), this.panelEl.before('<div class="panel-overlay"></div>'), this.panelOverlayEl = this.panelWrapperEl.find(".panel-overlay"), this.sequences = { 192 show: [{ 193 e: this.panelOverlayEl, 194 p: "transition.fadeIn", 195 o: { 196 duration: 100, 197 display: "block", 198 begin: i.proxy(s, this), 199 complete: i.proxy(o, this) 200 } 201 }, { 202 e: this.panelEl, 203 p: "transition.slideLeftBigIn", 204 o: { 205 duration: 400, 206 display: "block" 207 } 208 }], 209 hide: [{ 210 e: this.panelEl, 211 p: "transition.slideLeftBigOut", 212 o: { 213 duration: 200, 214 display: "none" 215 } 216 }, { 217 e: this.panelOverlayEl, 218 p: "transition.fadeOut", 219 o: { 220 duration: 100, 221 display: "none", 222 begin: i.proxy(l, this), 223 complete: i.proxy(a, this) 224 } 225 }] 226 }, this.init() 227 } 228 229 function n(i) { 230 i.preventDefault(), this.show() 231 } 232 233 function t(i) { 234 i.preventDefault(), this.hide() 235 } 236 237 function s() { 238 this.isAnimating || (this.isAnimating = !0, this.panelWrapperEl.show()) 239 } 240 241 function o() { 242 this.isAnimating = !1 243 } 244 245 function l() { 246 this.isAnimating = !0 247 } 248 249 function a() { 250 this.panelWrapperEl.hide(), this.isAnimating = !1 251 } 252 return e.prototype = { 253 init: function(e) { 254 this.triggerEl.on("click", i.proxy(n, this)), this.panelOverlayEl.on("click", i.proxy(t, this)) 255 }, 256 show: function() { 257 i.Velocity.RunSequence(this.sequences.show) 258 }, 259 hide: function() { 260 i.Velocity.RunSequence(this.sequences.hide) 261 } 262 }, e 263 }); 264 265 }, {}], 266 4: [function(require, module, exports) { 267 var Handlebars = require("handlebars/runtime"), 268 template = Handlebars.template, 269 templates = Handlebars.templates = Handlebars.templates || {}; 270 templates.toc_inline = template({ 271 1: function(a, e, l, n, t) { 272 var r, s = null != e ? e : {}, 273 i = l.helperMissing, 274 p = a.escapeExpression; 275 return ' <a href="#' + p((r = null != (r = l.id || (null != e ? e.id : e)) ? r : i, "function" == typeof r ? r.call(s, { 276 name: "id", 277 hash: {}, 278 data: t 279 }) : r)) + '" class="btn btn-primary inline-pill" role="button"><span class="ico-arrowdown">' + p((r = null != (r = l.title || (null != e ? e.title : e)) ? r : i, "function" == typeof r ? r.call(s, { 280 name: "title", 281 hash: {}, 282 data: t 283 }) : r)) + "</span></a>\n" 284 }, 285 compiler: [7, ">= 4.0.0"], 286 main: function(a, e, l, n, t) { 287 var r; 288 return null != (r = l.each.call(null != e ? e : {}, null != e ? e.contents : e, { 289 name: "each", 290 hash: {},
291 fn: a.program(1, t, 0), 292 inverse: a.noop, 293 data: t 294 })) ? r : "" 295 }, 296 useData: !0 297 }); 298 }, { 299 "handlebars/runtime": 26 300 }], 301 5: [function(require, module, exports) { 302 var Handlebars = require("handlebars/runtime"), 303 template = Handlebars.template, 304 templates = Handlebars.templates = Handlebars.templates || {}; 305 templates.toc_list = template({ 306 1: function(e, a, l, n, t) { 307 var r, i = null != a ? a : {}, 308 s = l.helperMissing, 309 u = e.escapeExpression; 310 return ' <li><a href="#' + u((r = null != (r = l.id || (null != a ? a.id : a)) ? r : s, "function" == typeof r ? r.call(i, { 311 name: "id", 312 hash: {}, 313 data: t 314 }) : r)) + '">' + u((r = null != (r = l.title || (null != a ? a.title : a)) ? r : s, "function" == typeof r ? r.call(i, { 315 name: "title", 316 hash: {}, 317 data: t 318 }) : r)) + "</a></li>\n" 319 }, 320 compiler: [7, ">= 4.0.0"], 321 main: function(e, a, l, n, t) { 322 var r; 323 return "<ul>\n" + (null != (r = l.each.call(null != a ? a : {}, null != a ? a.contents : a, {
324 name: "each", 325 hash: {}, 326 fn: e.program(1, t, 0), 327 inverse: e.noop, 328 data: t 329 })) ? r : "") + "</ul>\n" 330 }, 331 useData: !0 332 }); 333 334 }, { 335 "handlebars/runtime": 26 336 }], 337 6: [function(require, module, exports) { 338 Handlebars = require("handlebars/runtime"), require("./toc_inline"), require("./toc_list"), 339 function(t, e) { 340 "function" == typeof define && define.amd ? define([], e) : "object" == typeof module && module.exports ? module.exports = e(jQuery) : t.returnExports = e() 341 }(this, function(t) { 342 "use strict"; 343 344 function e(t, e) { 345 this.init(t, e) 346 } 347 return t(function() { 348 for (var n = t("[data-toc-for]").toArray(), i = n.length; i--;) new e(n[i], i) 349 }), e.prototype = { 350 init: function(e, n) { 351 this.element = t(e); 352 var i = this.element.data("toc-style"); 353 i = void 0 === i ? "list" : i; 354 var o = this.element.data("anchor-selector"); 355 o = void 0 === o ? "h1" : o; 356 var r = this.element.data("toc-for"), 357 a = !1; 358 a = "next" == r ? this.element.nextAll().find(o).addBack(o) : t(r).find(o); 359 var s = { 360 contents: [] 361 }; 362 a.each(function(e, i) { 363 var o = t(i), 364 r = "toc_" + n + "_" + e; 365 s.contents.push({ 366 title: o.text(), 367 id: r 368 }), o.attr("id", r) 369 }); 370 var l = Handlebars.templates["toc_" + i](s); 371 this.element.html(l) 372 } 373 }, e 374 }); 375 376 }, { 377 "./toc_inline": 4, 378 "./toc_list": 5, 379 "handlebars/runtime": 26 380 }], 381 7: [function(require, module, exports) { 382 ! function(e, r) { 383 "function" == typeof define && define.amd ? define([], r) : "object" == typeof module && module.exports ? module.exports = r(jQuery) : e.returnExports = r() 384 }(this, function(e) { 385 "use strict"; 386 e(function() { 387 e('input[type="file"]').on("change", function(r) { 388 var t = e(this), 389 o = t.attr("name"), 390 n = t.closest(".file").next('[data-for-file="' + o + '"]'), 391 a = e(this).val(), 392 i = a.lastIndexOf("\\") + 1; 393 n.html(a.substring(i)) 394 }); 395 var r = [{ 396 modules: "date", 397 form: ".validate_form", 398 borderColorOnError: "", 399 errorMessageClass: "text-danger", 400 errorElementClass: "form-control-danger", 401 inputParentClassOnError: "has-danger", 402 onSuccess: function(e) { 403 return !e.is(".form-ajax") || (e.trigger("isvalid"), !1) 404 } 405 }]; 406 e.each(r, function(r, t) { 407 e.validate(t) 408 }), e(window).trigger("validatorsLoaded", [e(".validate_form"), r]) 409 }) 410 }); 411 }, {}], 412 8: [function(require, module, exports) { 413 'use strict'; 414 415 exports.__esModule = true; 416 // istanbul ignore next 417 418 function _interopRequireDefault(obj) { 419 return obj && obj.__esModule ? obj : { 420 'default': obj 421 }; 422 } 423 424 // istanbul ignore next 425 426 function _interopRequireWildcard(obj) { 427 if (obj && obj.__esModule) { 428 return obj; 429 } else { 430 var newObj = {}; 431 if (obj != null) { 432 for (var key in obj) { 433 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 434 } 435 } 436 newObj['default'] = obj; 437 return newObj; 438 } 439 } 440 441 var _handlebarsBase = require('./handlebars/base'); 442 443 var base = _interopRequireWildcard(_handlebarsBase); 444 445 // Each of these augment the Handlebars object. No need to setup here. 446 // (This is done to easily share code between commonjs and browse envs) 447 448 var _handlebarsSafeString = require('./handlebars/safe-string'); 449 450 var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); 451 452 var _handlebarsException = require('./handlebars/exception'); 453 454 var _handlebarsException2 = _interopRequireDefault(_handlebarsException); 455 456 var _handlebarsUtils = require('./handlebars/utils'); 457 458 var Utils = _interopRequireWildcard(_handlebarsUtils); 459 460 var _handlebarsRuntime = require('./handlebars/runtime'); 461 462 var runtime = _interopRequireWildcard(_handlebarsRuntime); 463 464 var _handlebarsNoConflict = require('./handlebars/no-conflict'); 465 466 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 467 468 // For compatibility and usage outside of module systems, make the Handlebars object a namespace 469 function create() { 470 var hb = new base.HandlebarsEnvironment(); 471 472 Utils.extend(hb, base); 473 hb.SafeString = _handlebarsSafeString2['default']; 474 hb.Exception = _handlebarsException2['default']; 475 hb.Utils = Utils; 476 hb.escapeExpression = Utils.escapeExpression; 477 478 hb.VM = runtime; 479 hb.template = function(spec) { 480 return runtime.template(spec, hb); 481 }; 482 483 return hb; 484 } 485 486 var inst = create(); 487 inst.create = create; 488 489 _handlebarsNoConflict2['default'](inst); 490 491 inst['default'] = inst; 492 493 exports['default'] = inst; 494 module.exports = exports['default']; 495 496 497 }, {
498 "./handlebars/base": 9, 499 "./handlebars/exception": 12, 500 "./handlebars/no-conflict": 22, 501 "./handlebars/runtime": 23, 502 "./handlebars/safe-string": 24, 503 "./handlebars/utils": 25 504 }], 505 9: [function(require, module, exports) { 506 'use strict'; 507 508 exports.__esModule = true; 509 exports.HandlebarsEnvironment = HandlebarsEnvironment; 510 // istanbul ignore next 511 512 function _interopRequireDefault(obj) { 513 return obj && obj.__esModule ? obj : { 514 'default': obj 515 }; 516 } 517 518 var _utils = require('./utils'); 519 520 var _exception = require('./exception'); 521 522 var _exception2 = _interopRequireDefault(_exception); 523 524 var _helpers = require('./helpers'); 525 526 var _decorators = require('./decorators'); 527 528 var _logger = require('./logger'); 529 530 var _logger2 = _interopRequireDefault(_logger); 531 532 var VERSION = '4.0.11'; 533 exports.VERSION = VERSION; 534 var COMPILER_REVISION = 7; 535 536 exports.COMPILER_REVISION = COMPILER_REVISION; 537 var REVISION_CHANGES = { 538 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 539 2: '== 1.0.0-rc.3', 540 3: '== 1.0.0-rc.4', 541 4: '== 1.x.x', 542 5: '== 2.0.0-alpha.x', 543 6: '>= 2.0.0-beta.1', 544 7: '>= 4.0.0' 545 }; 546 547 exports.REVISION_CHANGES = REVISION_CHANGES; 548 var objectType = '[object Object]'; 549 550 function HandlebarsEnvironment(helpers, partials, decorators) { 551 this.helpers = helpers || {}; 552 this.partials = partials || {}; 553 this.decorators = decorators || {}; 554 555 _helpers.registerDefaultHelpers(this); 556 _decorators.registerDefaultDecorators(this); 557 } 558 559 HandlebarsEnvironment.prototype = { 560 constructor: HandlebarsEnvironment, 561 562 logger: _logger2['default'], 563 log: _logger2['default'].log, 564 565 registerHelper: function registerHelper(name, fn) { 566 if (_utils.toString.call(name) === objectType) { 567 if (fn) { 568 throw new _exception2['default']('Arg not supported with multiple helpers'); 569 } 570 _utils.extend(this.helpers, name); 571 } else { 572 this.helpers[name] = fn; 573 } 574 }, 575 unregisterHelper: function unregisterHelper(name) { 576 delete this.helpers[name]; 577 }, 578 579 registerPartial: function registerPartial(name, partial) { 580 if (_utils.toString.call(name) === objectType) { 581 _utils.extend(this.partials, name); 582 } else { 583 if (typeof partial === 'undefined') { 584 throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); 585 } 586 this.partials[name] = partial; 587 } 588 }, 589 unregisterPartial: function unregisterPartial(name) { 590 delete this.partials[name]; 591 }, 592 593 registerDecorator: function registerDecorator(name, fn) { 594 if (_utils.toString.call(name) === objectType) { 595 if (fn) { 596 throw new _exception2['default']('Arg not supported with multiple decorators'); 597 } 598 _utils.extend(this.decorators, name); 599 } else { 600 this.decorators[name] = fn; 601 } 602 }, 603 unregisterDecorator: function unregisterDecorator(name) { 604 delete this.decorators[name]; 605 } 606 }; 607 608 var log = _logger2['default'].log; 609 610 exports.log = log; 611 exports.createFrame = _utils.createFrame; 612 exports.logger = _logger2['default']; 613 614 615 }, { 616 "./decorators": 10, 617 "./exception": 12, 618 "./helpers": 13, 619 "./logger": 21, 620 "./utils": 25 621 }],
622 10: [function(require, module, exports) { 623 'use strict'; 624 625 exports.__esModule = true; 626 exports.registerDefaultDecorators = registerDefaultDecorators; 627 // istanbul ignore next 628 629 function _interopRequireDefault(obj) { 630 return obj && obj.__esModule ? obj : { 631 'default': obj 632 }; 633 } 634 635 var _decoratorsInline = require('./decorators/inline'); 636 637 var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); 638 639 function registerDefaultDecorators(instance) { 640 _decoratorsInline2['default'](instance); 641 } 642 643 644 }, { 645 "./decorators/inline": 11 646 }], 647 11: [function(require, module, exports) { 648 'use strict'; 649 650 exports.__esModule = true; 651 652 var _utils = require('../utils'); 653 654 exports['default'] = function(instance) { 655 instance.registerDecorator('inline', function(fn, props, container, options) { 656 var ret = fn; 657 if (!props.partials) { 658 props.partials = {}; 659 ret = function(context, options) { 660 // Create a new partials stack frame prior to exec. 661 var original = container.partials; 662 container.partials = _utils.extend({}, original, props.partials); 663 var ret = fn(context, options); 664 container.partials = original; 665 return ret; 666 }; 667 } 668 669 props.partials[options.args[0]] = options.fn; 670 671 return ret; 672 }); 673 }; 674 675 module.exports = exports['default']; 676 677 678 }, { 679 "../utils": 25 680 }], 681 12: [function(require, module, exports) { 682 'use strict'; 683 684 exports.__esModule = true; 685 686 var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; 687 688 function Exception(message, node) { 689 var loc = node && node.loc, 690 line = undefined, 691 column = undefined; 692 if (loc) { 693 line = loc.start.line; 694 column = loc.start.column; 695 696 message += ' - ' + line + ':' + column; 697 } 698 699 var tmp = Error.prototype.constructor.call(this, message); 700 701 // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. 702 for (var idx = 0; idx < errorProps.length; idx++) { 703 this[errorProps[idx]] = tmp[errorProps[idx]]; 704 } 705 706 /* istanbul ignore else */ 707 if (Error.captureStackTrace) { 708 Error.captureStackTrace(this, Exception); 709 } 710 711 try { 712 if (loc) { 713 this.lineNumber = line; 714 715 // Work around issue under safari where we can't directly set the column value 716 /* istanbul ignore next */ 717 if (Object.defineProperty) { 718 Object.defineProperty(this, 'column', { 719 value: column, 720 enumerable: true 721 }); 722 } else { 723 this.column = column; 724 } 725 } 726 } catch (nop) { 727 /* Ignore if the browser is very particular */ 728 } 729 } 730 731 Exception.prototype = new Error(); 732 733 exports['default'] = Exception; 734 module.exports = exports['default']; 735 736 737 }, {}], 738 13: [function(require, module, exports) { 739 'use strict'; 740 741 exports.__esModule = true; 742 exports.registerDefaultHelpers = registerDefaultHelpers; 743 // istanbul ignore next 744 745 function _interopRequireDefault(obj) { 746 return obj && obj.__esModule ? obj : { 747 'default': obj 748 }; 749 } 750 751 var _helpersBlockHelperMissing = require('./helpers/block-helper-missing'); 752 753 var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); 754 755 var _helpersEach = require('./helpers/each'); 756 757 var _helpersEach2 = _interopRequireDefault(_helpersEach); 758 759 var _helpersHelperMissing = require('./helpers/helper-missing'); 760 761 var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); 762 763 var _helpersIf = require('./helpers/if'); 764 765 var _helpersIf2 = _interopRequireDefault(_helpersIf); 766 767 var _helpersLog = require('./helpers/log'); 768 769 var _helpersLog2 = _interopRequireDefault(_helpersLog); 770 771 var _helpersLookup = require('./helpers/lookup'); 772 773 var _helpersLookup2 = _interopRequireDefault(_helpersLookup); 774 775 var _helpersWith = require('./helpers/with'); 776 777 var _helpersWith2 = _interopRequireDefault(_helpersWith); 778 779 function registerDefaultHelpers(instance) { 780 _helpersBlockHelperMissing2['default'](instance); 781 _helpersEach2['default'](instance); 782 _helpersHelperMissing2['default'](instance); 783 _helpersIf2['default'](instance); 784 _helpersLog2['default'](instance); 785 _helpersLookup2['default'](instance); 786 _helpersWith2['default'](instance); 787 } 788 789 790 }, {
791 "./helpers/block-helper-missing": 14, 792 "./helpers/each": 15, 793 "./helpers/helper-missing": 16, 794 "./helpers/if": 17, 795 "./helpers/log": 18, 796 "./helpers/lookup": 19, 797 "./helpers/with": 20 798 }], 799 14: [function(require, module, exports) { 800 'use strict'; 801 802 exports.__esModule = true; 803 804 var _utils = require('../utils'); 805 806 exports['default'] = function(instance) { 807 instance.registerHelper('blockHelperMissing', function(context, options) { 808 var inverse = options.inverse, 809 fn = options.fn; 810 811 if (context === true) { 812 return fn(this); 813 } else if (context === false || context == null) { 814 return inverse(this); 815 } else if (_utils.isArray(context)) { 816 if (context.length > 0) { 817 if (options.ids) { 818 options.ids = [options.name]; 819 } 820 821 return instance.helpers.each(context, options); 822 } else { 823 return inverse(this); 824 } 825 } else { 826 if (options.data && options.ids) { 827 var data = _utils.createFrame(options.data); 828 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); 829 options = { 830 data: data 831 }; 832 } 833 834 return fn(context, options); 835 } 836 }); 837 }; 838 839 module.exports = exports['default']; 840 841 842 }, { 843 "../utils": 25 844 }], 845 15: [function(require, module, exports) { 846 'use strict'; 847 848 exports.__esModule = true; 849 // istanbul ignore next 850 851 function _interopRequireDefault(obj) { 852 return obj && obj.__esModule ? obj : { 853 'default': obj 854 }; 855 } 856 857 var _utils = require('../utils'); 858 859 var _exception = require('../exception'); 860 861 var _exception2 = _interopRequireDefault(_exception); 862 863 exports['default'] = function(instance) { 864 instance.registerHelper('each', function(context, options) { 865 if (!options) { 866 throw new _exception2['default']('Must pass iterator to #each'); 867 } 868 869 var fn = options.fn, 870 inverse = options.inverse, 871 i = 0, 872 ret = '', 873 data = undefined, 874 contextPath = undefined; 875 876 if (options.data && options.ids) { 877 contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; 878 } 879 880 if (_utils.isFunction(context)) { 881 context = context.call(this); 882 } 883 884 if (options.data) { 885 data = _utils.createFrame(options.data); 886 } 887 888 function execIteration(field, index, last) { 889 if (data) { 890 data.key = field; 891 data.index = index; 892 data.first = index === 0; 893 data.last = !!last; 894 895 if (contextPath) { 896 data.contextPath = contextPath + field; 897 } 898 } 899 900 ret = ret + fn(context[field], { 901 data: data, 902 blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) 903 }); 904 } 905 906 if (context && typeof context === 'object') { 907 if (_utils.isArray(context)) { 908 for (var j = context.length; i < j; i++) { 909 if (i in context) { 910 execIteration(i, i, i === context.length - 1); 911 } 912 } 913 } else { 914 var priorKey = undefined; 915 916 for (var key in context) { 917 if (context.hasOwnProperty(key)) { 918 // We're running the iterations one step out of sync so we can detect 919 // the last iteration without have to scan the object twice and create 920 // an itermediate keys array.
921 if (priorKey !== undefined) { 922 execIteration(priorKey, i - 1); 923 } 924 priorKey = key; 925 i++; 926 } 927 } 928 if (priorKey !== undefined) { 929 execIteration(priorKey, i - 1, true); 930 } 931 } 932 } 933 934 if (i === 0) { 935 ret = inverse(this); 936 } 937 938 return ret; 939 }); 940 }; 941 942 module.exports = exports['default']; 943 944 945 }, { 946 "../exception": 12, 947 "../utils": 25 948 }], 949 16: [function(require, module, exports) { 950 'use strict'; 951 952 exports.__esModule = true; 953 // istanbul ignore next 954 955 function _interopRequireDefault(obj) { 956 return obj && obj.__esModule ? obj : { 957 'default': obj 958 }; 959 } 960 961 var _exception = require('../exception'); 962 963 var _exception2 = _interopRequireDefault(_exception); 964 965 exports['default'] = function(instance) { 966 instance.registerHelper('helperMissing', function() /* [args, ]options */ { 967 if (arguments.length === 1) { 968 // A missing field in a {{foo}} construct. 969 return undefined; 970 } else { 971 // Someone is actually trying to call something, blow up. 972 throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 973 } 974 }); 975 }; 976 977 module.exports = exports['default']; 978 979 980 }, { 981 "../exception": 12 982 }], 983 17: [function(require, module, exports) { 984 'use strict'; 985 986 exports.__esModule = true; 987 988 var _utils = require('../utils'); 989 990 exports['default'] = function(instance) { 991 instance.registerHelper('if', function(conditional, options) { 992 if (_utils.isFunction(conditional)) { 993 conditional = conditional.call(this); 994 } 995 996 // Default behavior is to render the positive path if the value is truthy and not empty. 997 // The `includeZero` option may be set to treat the condtional as purely not empty based on the 998 // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. 999 if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { 1000 return options.inverse(this); 1001 } else { 1002 return options.fn(this); 1003 } 1004 }); 1005 1006 instance.registerHelper('unless', function(conditional, options) { 1007 return instance.helpers['if'].call(this, conditional, { 1008 fn: options.inverse, 1009 inverse: options.fn, 1010 hash: options.hash 1011 }); 1012 }); 1013 }; 1014 1015 module.exports = exports['default']; 1016 1017 1018 }, { 1019 "../utils": 25 1020 }], 1021 18: [function(require, module, exports) { 1022 'use strict'; 1023 1024 exports.__esModule = true; 1025 1026 exports['default'] = function(instance) { 1027 instance.registerHelper('log', function() /* message, options */ { 1028 var args = [undefined], 1029 options = arguments[arguments.length - 1]; 1030 for (var i = 0; i < arguments.length - 1; i++) { 1031 args.push(arguments[i]); 1032 } 1033 1034 var level = 1; 1035 if (options.hash.level != null) { 1036 level = options.hash.level; 1037 } else if (options.data && options.data.level != null) { 1038 level = options.data.level; 1039 } 1040 args[0] = level; 1041 1042 instance.log.apply(instance, args); 1043 }); 1044 }; 1045 1046 module.exports = exports['default']; 1047 1048 1049 }, {}],
1050 19: [function(require, module, exports) { 1051 'use strict'; 1052 1053 exports.__esModule = true; 1054 1055 exports['default'] = function(instance) { 1056 instance.registerHelper('lookup', function(obj, field) { 1057 return obj && obj[field]; 1058 }); 1059 }; 1060 1061 module.exports = exports['default']; 1062 1063 1064 }, {}], 1065 20: [function(require, module, exports) { 1066 'use strict'; 1067 1068 exports.__esModule = true; 1069 1070 var _utils = require('../utils'); 1071 1072 exports['default'] = function(instance) { 1073 instance.registerHelper('with', function(context, options) { 1074 if (_utils.isFunction(context)) { 1075 context = context.call(this); 1076 } 1077 1078 var fn = options.fn; 1079 1080 if (!_utils.isEmpty(context)) { 1081 var data = options.data; 1082 if (options.data && options.ids) { 1083 data = _utils.createFrame(options.data); 1084 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); 1085 } 1086 1087 return fn(context, { 1088 data: data, 1089 blockParams: _utils.blockParams([context], [data && data.contextPath]) 1090 }); 1091 } else { 1092 return options.inverse(this); 1093 } 1094 }); 1095 }; 1096 1097 module.exports = exports['default']; 1098 1099 1100 }, { 1101 "../utils": 25 1102 }], 1103 21: [function(require, module, exports) { 1104 'use strict'; 1105 1106 exports.__esModule = true; 1107 1108 var _utils = require('./utils'); 1109 1110 var logger = { 1111 methodMap: ['debug', 'info', 'warn', 'error'], 1112 level: 'info', 1113 1114 // Maps a given level value to the `methodMap` indexes above. 1115 lookupLevel: function lookupLevel(level) { 1116 if (typeof level === 'string') { 1117 var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); 1118 if (levelMap >= 0) { 1119 level = levelMap; 1120 } else { 1121 level = parseInt(level, 10); 1122 } 1123 } 1124 1125 return level; 1126 }, 1127 1128 // Can be overridden in the host environment 1129 log: function log(level) { 1130 level = logger.lookupLevel(level); 1131 1132 if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { 1133 var method = logger.methodMap[level]; 1134 if (!console[method]) { 1135 // eslint-disable-line no-console 1136 method = 'log'; 1137 } 1138 1139 for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 1140 message[_key - 1] = arguments[_key]; 1141 } 1142 1143 console[method].apply(console, message); // eslint-disable-line no-console 1144 } 1145 } 1146 }; 1147 1148 exports['default'] = logger; 1149 module.exports = exports['default']; 1150 1151 1152 }, { 1153 "./utils": 25 1154 }], 1155 22: [function(require, module, exports) { 1156 (function(global) { 1157 /* global window */ 1158 'use strict'; 1159 1160 exports.__esModule = true; 1161 1162 exports['default'] = function(Handlebars) { 1163 /* istanbul ignore next */ 1164 var root = typeof global !== 'undefined' ? global : window, 1165 $Handlebars = root.Handlebars; 1166 /* istanbul ignore next */ 1167 Handlebars.noConflict = function() { 1168 if (root.Handlebars === Handlebars) { 1169 root.Handlebars = $Handlebars; 1170 } 1171 return Handlebars; 1172 }; 1173 }; 1174 1175 module.exports = exports['default']; 1176 1177 1178 }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 1179 }, {}],
vendor: 4,707 bytes, lines 1180-1290
1180 23: [function(require, module, exports) { 1181 'use strict'; 1182 1183 exports.__esModule = true; 1184 exports.checkRevision = checkRevision; 1185 exports.template = template; 1186 exports.wrapProgram = wrapProgram; 1187 exports.resolvePartial = resolvePartial; 1188 exports.invokePartial = invokePartial; 1189 exports.noop = noop; 1190 // istanbul ignore next 1191 1192 function _interopRequireDefault(obj) { 1193 return obj && obj.__esModule ? obj : { 1194 'default': obj 1195 }; 1196 } 1197 1198 // istanbul ignore next 1199 1200 function _interopRequireWildcard(obj) { 1201 if (obj && obj.__esModule) { 1202 return obj; 1203 } else { 1204 var newObj = {}; 1205 if (obj != null) { 1206 for (var key in obj) { 1207 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 1208 } 1209 } 1210 newObj['default'] = obj; 1211 return newObj; 1212 } 1213 } 1214 1215 var _utils = require('./utils'); 1216 1217 var Utils = _interopRequireWildcard(_utils); 1218 1219 var _exception = require('./exception'); 1220 1221 var _exception2 = _interopRequireDefault(_exception); 1222 1223 var _base = require('./base'); 1224 1225 function checkRevision(compilerInfo) { 1226 var compilerRevision = compilerInfo && compilerInfo[0] || 1, 1227 currentRevision = _base.COMPILER_REVISION; 1228 1229 if (compilerRevision !== currentRevision) { 1230 if (compilerRevision < currentRevision) { 1231 var runtimeVersions = _base.REVISION_CHANGES[currentRevision], 1232 compilerVersions = _base.REVISION_CHANGES[compilerRevision]; 1233 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 + ').'); 1234 } else { 1235 // Use the embedded version info since the runtime doesn't know about this revision yet 1236 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] + ').'); 1237 } 1238 } 1239 } 1240 1241 function template(templateSpec, env) { 1242 /* istanbul ignore next */ 1243 if (!env) { 1244 throw new _exception2['default']('No environment passed to template'); 1245 } 1246 if (!templateSpec || !templateSpec.main) { 1247 throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); 1248 } 1249 1250 templateSpec.main.decorator = templateSpec.main_d; 1251 1252 // Note: Using env.VM references rather than local var references throughout this section to allow 1253 // for external users to override these as psuedo-supported APIs. 1254 env.VM.checkRevision(templateSpec.compiler); 1255 1256 function invokePartialWrapper(partial, context, options) { 1257 if (options.hash) { 1258 context = Utils.extend({}, context, options.hash); 1259 if (options.ids) { 1260 options.ids[0] = true; 1261 } 1262 } 1263 1264 partial = env.VM.resolvePartial.call(this, partial, context, options); 1265 var result = env.VM.invokePartial.call(this, partial, context, options); 1266 1267 if (result == null && env.compile) { 1268 options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); 1269 result = options.partials[options.name](context, options); 1270 } 1271 if (result != null) { 1272 if (options.indent) { 1273 var lines = result.split('\n'); 1274 for (var i = 0, l = lines.length; i < l; i++) { 1275 if (!lines[i] && i + 1 === l) { 1276 break; 1277 } 1278 1279 lines[i] = options.indent + lines[i]; 1280 } 1281 result = lines.join('\n'); 1282 } 1283 return result; 1284 } else { 1285 throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); 1286 } 1287 } 1288 1289 // Just add water 1290 var container = {
vendor: 9,120 bytes, lines 1291-1506
1291 strict: function strict(obj, name) { 1292 if (!(name in obj)) { 1293 throw new _exception2['default']('"' + name + '" not defined in ' + obj); 1294 } 1295 return obj[name]; 1296 }, 1297 lookup: function lookup(depths, name) { 1298 var len = depths.length; 1299 for (var i = 0; i < len; i++) { 1300 if (depths[i] && depths[i][name] != null) { 1301 return depths[i][name]; 1302 } 1303 } 1304 }, 1305 lambda: function lambda(current, context) { 1306 return typeof current === 'function' ? current.call(context) : current; 1307 }, 1308 1309 escapeExpression: Utils.escapeExpression, 1310 invokePartial: invokePartialWrapper, 1311 1312 fn: function fn(i) { 1313 var ret = templateSpec[i]; 1314 ret.decorator = templateSpec[i + '_d']; 1315 return ret; 1316 }, 1317 1318 programs: [], 1319 program: function program(i, data, declaredBlockParams, blockParams, depths) { 1320 var programWrapper = this.programs[i], 1321 fn = this.fn(i); 1322 if (data || depths || blockParams || declaredBlockParams) { 1323 programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); 1324 } else if (!programWrapper) { 1325 programWrapper = this.programs[i] = wrapProgram(this, i, fn); 1326 } 1327 return programWrapper; 1328 }, 1329 1330 data: function data(value, depth) { 1331 while (value && depth--) { 1332 value = value._parent; 1333 } 1334 return value; 1335 }, 1336 merge: function merge(param, common) { 1337 var obj = param || common; 1338 1339 if (param && common && param !== common) { 1340 obj = Utils.extend({}, common, param); 1341 } 1342 1343 return obj; 1344 }, 1345 // An empty object to use as replacement for null-contexts 1346 nullContext: Object.seal({}), 1347 1348 noop: env.VM.noop, 1349 compilerInfo: templateSpec.compiler 1350 }; 1351 1352 function ret(context) { 1353 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1354 1355 var data = options.data; 1356 1357 ret._setup(options); 1358 if (!options.partial && templateSpec.useData) { 1359 data = initData(context, data); 1360 } 1361 var depths = undefined, 1362 blockParams = templateSpec.useBlockParams ? [] : undefined; 1363 if (templateSpec.useDepths) { 1364 if (options.depths) { 1365 depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; 1366 } else { 1367 depths = [context]; 1368 } 1369 } 1370 1371 function main(context /*, options*/ ) { 1372 return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); 1373 } 1374 main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); 1375 return main(context, options); 1376 } 1377 ret.isTop = true; 1378 1379 ret._setup = function(options) { 1380 if (!options.partial) { 1381 container.helpers = container.merge(options.helpers, env.helpers); 1382 1383 if (templateSpec.usePartial) { 1384 container.partials = container.merge(options.partials, env.partials); 1385 } 1386 if (templateSpec.usePartial || templateSpec.useDecorators) { 1387 container.decorators = container.merge(options.decorators, env.decorators); 1388 } 1389 } else { 1390 container.helpers = options.helpers; 1391 container.partials = options.partials; 1392 container.decorators = options.decorators; 1393 } 1394 }; 1395 1396 ret._child = function(i, data, blockParams, depths) { 1397 if (templateSpec.useBlockParams && !blockParams) { 1398 throw new _exception2['default']('must pass block params'); 1399 } 1400 if (templateSpec.useDepths && !depths) { 1401 throw new _exception2['default']('must pass parent depths'); 1402 } 1403 1404 return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); 1405 }; 1406 return ret; 1407 } 1408 1409 function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { 1410 function prog(context) { 1411 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1412 1413 var currentDepths = depths; 1414 if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { 1415 currentDepths = [context].concat(depths); 1416 } 1417 1418 return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); 1419 } 1420 1421 prog = executeDecorators(fn, prog, container, depths, data, blockParams); 1422 1423 prog.program = i; 1424 prog.depth = depths ? depths.length : 0; 1425 prog.blockParams = declaredBlockParams || 0; 1426 return prog; 1427 } 1428 1429 function resolvePartial(partial, context, options) { 1430 if (!partial) { 1431 if (options.name === '@partial-block') { 1432 partial = options.data['partial-block']; 1433 } else { 1434 partial = options.partials[options.name]; 1435 } 1436 } else if (!partial.call && !options.name) { 1437 // This is a dynamic partial that returned a string 1438 options.name = partial; 1439 partial = options.partials[partial]; 1440 } 1441 return partial; 1442 } 1443 1444 function invokePartial(partial, context, options) { 1445 // Use the current closure context to save the partial-block if this partial 1446 var currentPartialBlock = options.data && options.data['partial-block']; 1447 options.partial = true; 1448 if (options.ids) { 1449 options.data.contextPath = options.ids[0] || options.data.contextPath; 1450 } 1451 1452 var partialBlock = undefined; 1453 if (options.fn && options.fn !== noop) { 1454 (function() { 1455 options.data = _base.createFrame(options.data); 1456 // Wrapper function to get access to currentPartialBlock from the closure 1457 var fn = options.fn; 1458 partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { 1459 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1460 1461 // Restore the partial-block from the closure for the execution of the block 1462 // i.e. the part inside the block of the partial call. 1463 options.data = _base.createFrame(options.data); 1464 options.data['partial-block'] = currentPartialBlock; 1465 return fn(context, options); 1466 }; 1467 if (fn.partials) { 1468 options.partials = Utils.extend({}, options.partials, fn.partials); 1469 } 1470 })(); 1471 } 1472 1473 if (partial === undefined && partialBlock) { 1474 partial = partialBlock; 1475 } 1476 1477 if (partial === undefined) { 1478 throw new _exception2['default']('The partial ' + options.name + ' could not be found'); 1479 } else if (partial instanceof Function) { 1480 return partial(context, options); 1481 } 1482 } 1483 1484 function noop() { 1485 return ''; 1486 } 1487 1488 function initData(context, data) { 1489 if (!data || !('root' in data)) { 1490 data = data ? _base.createFrame(data) : {}; 1491 data.root = context; 1492 } 1493 return data; 1494 } 1495 1496 function executeDecorators(fn, prog, container, depths, data, blockParams) { 1497 if (fn.decorator) { 1498 var props = {}; 1499 prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); 1500 Utils.extend(prog, props); 1501 } 1502 return prog; 1503 } 1504 1505 1506 }, {
vendor: 4,170 bytes, lines 1507-1636
1507 "./base": 9, 1508 "./exception": 12, 1509 "./utils": 25 1510 }], 1511 24: [function(require, module, exports) { 1512 // Build out our basic SafeString type 1513 'use strict'; 1514 1515 exports.__esModule = true; 1516 1517 function SafeString(string) { 1518 this.string = string; 1519 } 1520 1521 SafeString.prototype.toString = SafeString.prototype.toHTML = function() { 1522 return '' + this.string; 1523 }; 1524 1525 exports['default'] = SafeString; 1526 module.exports = exports['default']; 1527 1528 1529 }, {}], 1530 25: [function(require, module, exports) { 1531 'use strict'; 1532 1533 exports.__esModule = true; 1534 exports.extend = extend; 1535 exports.indexOf = indexOf; 1536 exports.escapeExpression = escapeExpression; 1537 exports.isEmpty = isEmpty; 1538 exports.createFrame = createFrame; 1539 exports.blockParams = blockParams; 1540 exports.appendContextPath = appendContextPath; 1541 var escape = { 1542 '&': '&', 1543 '<': '<', 1544 '>': '>', 1545 '"': '"', 1546 "'": ''', 1547 '`': '`', 1548 '=': '=' 1549 }; 1550 1551 var badChars = /[&<>"'`=]/g, 1552 possible = /[&<>"'`=]/; 1553 1554 function escapeChar(chr) { 1555 return escape[chr]; 1556 } 1557 1558 function extend(obj /* , ...source */ ) { 1559 for (var i = 1; i < arguments.length; i++) { 1560 for (var key in arguments[i]) { 1561 if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { 1562 obj[key] = arguments[i][key]; 1563 } 1564 } 1565 } 1566 1567 return obj; 1568 } 1569 1570 var toString = Object.prototype.toString; 1571 1572 exports.toString = toString; 1573 // Sourced from lodash 1574 // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt 1575 /* eslint-disable func-style */ 1576 var isFunction = function isFunction(value) { 1577 return typeof value === 'function'; 1578 }; 1579 // fallback for older versions of Chrome and Safari 1580 /* istanbul ignore next */ 1581 if (isFunction(/x/)) { 1582 exports.isFunction = isFunction = function(value) { 1583 return typeof value === 'function' && toString.call(value) === '[object Function]'; 1584 }; 1585 } 1586 exports.isFunction = isFunction; 1587 1588 /* eslint-enable func-style */ 1589 1590 /* istanbul ignore next */ 1591 var isArray = Array.isArray || function(value) { 1592 return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; 1593 }; 1594 1595 exports.isArray = isArray; 1596 // Older IE versions do not directly support indexOf so we must implement our own, sadly. 1597 1598 function indexOf(array, value) { 1599 for (var i = 0, len = array.length; i < len; i++) { 1600 if (array[i] === value) { 1601 return i; 1602 } 1603 } 1604 return -1; 1605 } 1606 1607 function escapeExpression(string) { 1608 if (typeof string !== 'string') { 1609 // don't escape SafeStrings, since they're already safe 1610 if (string && string.toHTML) { 1611 return string.toHTML(); 1612 } else if (string == null) { 1613 return ''; 1614 } else if (!string) { 1615 return string + ''; 1616 } 1617 1618 // Force a string conversion as this will be done by the append regardless and 1619 // the regex test will do this transparently behind the scenes, causing issues if 1620 // an object's to string has escaped characters in it. 1621 string = '' + string; 1622 } 1623 1624 if (!possible.test(string)) { 1625 return string; 1626 } 1627 return string.replace(badChars, escapeChar); 1628 } 1629 1630 function isEmpty(value) { 1631 if (!value && value !== 0) { 1632 return true; 1633 } else if (isArray(value) && value.length === 0) { 1634 return true; 1635 } else { 1636 return false;
1637 } 1638 } 1639 1640 function createFrame(object) { 1641 var frame = extend({}, object); 1642 frame._parent = object; 1643 return frame; 1644 } 1645 1646 function blockParams(params, ids) { 1647 params.path = ids; 1648 return params; 1649 } 1650 1651 function appendContextPath(contextPath, id) { 1652 return (contextPath ? contextPath + '.' : '') + id; 1653 } 1654 1655 1656 }, {}], 1657 26: [function(require, module, exports) { 1658 // Create a simple path alias to allow browserify to resolve 1659 // the runtime on a supported path. 1660 module.exports = require('./dist/cjs/handlebars.runtime')['default']; 1661 1662 }, { 1663 "./dist/cjs/handlebars.runtime": 8 1664 }] 1665}, {}, [2]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.