Version Description
- 2017-12-12 =
- Premium: you can now segment your subscribers by email events;
- Fixed: default newsletter templates will not be duplicated when user switches profile language to one that's different from the system's.
Download this release
Release Info
| Developer | wysija |
| Plugin | |
| Version | 3.2.5 |
| Comparing to | |
| See all releases | |
Code changes from version 3.2.3 to 3.2.5
- assets/js/{admin.c7653647.js → admin.39fd28da.js} +1017 -875
- assets/js/{admin_vendor.0305005e.js → admin_vendor.7914137d.js} +170 -138
- assets/js/{form_editor.2762fbc0.js → form_editor.cc7529b3.js} +98 -100
- assets/js/{mailpoet.0ecf7a2c.js → mailpoet.a5fa72ae.js} +38 -44
- assets/js/manifest.json +8 -8
- assets/js/{mp2migrator.e755af46.js → mp2migrator.81060f18.js} +0 -2
- assets/js/{newsletter_editor.c4722da5.js → newsletter_editor.e7b87b92.js} +243 -263
- assets/js/{public.8173fe64.js → public.3d1d91ad.js} +34 -38
- assets/js/{vendor.17b09b6c.js → vendor.3c206dd6.js} +3933 -3195
- lang/index.php +0 -3
- lang/mailpoet-ca.mo +0 -0
- lang/mailpoet-da_DK.mo +0 -0
- lang/mailpoet-de_DE.mo +0 -0
- lang/mailpoet-en_GB.mo +0 -0
- lang/mailpoet-es_ES.mo +0 -0
- lang/mailpoet-fa_IR.mo +0 -0
- lang/mailpoet-fr_CA.mo +0 -0
- lang/mailpoet-fr_FR.mo +0 -0
- lang/mailpoet-it_IT.mo +0 -0
- lang/mailpoet-ja.mo +0 -0
- lang/mailpoet-nl_NL.mo +0 -0
- lang/mailpoet-pl_PL.mo +0 -0
- lang/mailpoet-pt_BR.mo +0 -0
- lang/mailpoet-pt_PT.mo +0 -0
- lang/mailpoet-ru_RU.mo +0 -0
- lang/mailpoet-sq.mo +0 -0
- lang/mailpoet-sv_SE.mo +0 -0
- lang/mailpoet-tr_TR.mo +0 -0
- lang/mailpoet.pot +116 -59
- lib/Config/Localizer.php +11 -0
- lib/Config/Menu.php +22 -1
- lib/Config/Populator.php +2 -0
- lib/Config/Shortcodes.php +7 -3
- lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php +5 -4
- lib/Mailer/MailerLog.php +4 -1
- lib/Router/Endpoints/Subscription.php +7 -3
- lib/Router/Router.php +1 -1
- lib/Services/Bridge.php +11 -0
- lib/Subscription/Pages.php +32 -25
- lib/Util/Polyfills.php +6 -0
- mailpoet.php +3 -3
- readme.txt +12 -3
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
- vendor/composer/installed.json +8 -8
- vendor/symfony/translation/Catalogue/AbstractOperation.php +0 -14
- vendor/symfony/translation/DataCollector/TranslationDataCollector.php +0 -6
- vendor/symfony/translation/DataCollectorTranslator.php +0 -3
- vendor/symfony/translation/Dumper/CsvFileDumper.php +2 -2
- vendor/symfony/translation/Extractor/AbstractFileExtractor.php +2 -2
- vendor/symfony/translation/Extractor/ExtractorInterface.php +1 -1
- vendor/symfony/translation/Loader/CsvFileLoader.php +3 -3
- vendor/symfony/translation/Loader/IcuResFileLoader.php +3 -3
- vendor/symfony/translation/Loader/MoFileLoader.php +0 -6
- vendor/symfony/translation/Loader/PoFileLoader.php +0 -3
- vendor/symfony/translation/LoggingTranslator.php +0 -3
- vendor/symfony/translation/MessageCatalogueInterface.php +0 -6
- vendor/symfony/translation/PluralizationRules.php +0 -1
- vendor/symfony/translation/Translator.php +0 -5
- vendor/symfony/translation/Writer/TranslationWriter.php +0 -5
- views/help.html +11 -1
- views/newsletter/editor.html +2 -2
- views/newsletters.html +1 -0
- views/update.html +3 -3
assets/js/{admin.c7653647.js → admin.39fd28da.js}
RENAMED
|
@@ -1,188 +1,23 @@
|
|
| 1 |
webpackJsonp([0],{
|
| 2 |
|
| 3 |
-
/***/
|
| 4 |
-
/***/ function(module, exports
|
| 5 |
-
|
| 6 |
-
/*
|
| 7 |
-
Module dependencies
|
| 8 |
-
*/
|
| 9 |
-
var ElementType = __webpack_require__(495);
|
| 10 |
-
var entities = __webpack_require__(496);
|
| 11 |
-
|
| 12 |
-
/*
|
| 13 |
-
Boolean Attributes
|
| 14 |
-
*/
|
| 15 |
-
var booleanAttributes = {
|
| 16 |
-
__proto__: null,
|
| 17 |
-
allowfullscreen: true,
|
| 18 |
-
async: true,
|
| 19 |
-
autofocus: true,
|
| 20 |
-
autoplay: true,
|
| 21 |
-
checked: true,
|
| 22 |
-
controls: true,
|
| 23 |
-
default: true,
|
| 24 |
-
defer: true,
|
| 25 |
-
disabled: true,
|
| 26 |
-
hidden: true,
|
| 27 |
-
ismap: true,
|
| 28 |
-
loop: true,
|
| 29 |
-
multiple: true,
|
| 30 |
-
muted: true,
|
| 31 |
-
open: true,
|
| 32 |
-
readonly: true,
|
| 33 |
-
required: true,
|
| 34 |
-
reversed: true,
|
| 35 |
-
scoped: true,
|
| 36 |
-
seamless: true,
|
| 37 |
-
selected: true,
|
| 38 |
-
typemustmatch: true
|
| 39 |
-
};
|
| 40 |
-
|
| 41 |
-
var unencodedElements = {
|
| 42 |
-
__proto__: null,
|
| 43 |
-
style: true,
|
| 44 |
-
script: true,
|
| 45 |
-
xmp: true,
|
| 46 |
-
iframe: true,
|
| 47 |
-
noembed: true,
|
| 48 |
-
noframes: true,
|
| 49 |
-
plaintext: true,
|
| 50 |
-
noscript: true
|
| 51 |
-
};
|
| 52 |
-
|
| 53 |
-
/*
|
| 54 |
-
Format attributes
|
| 55 |
-
*/
|
| 56 |
-
function formatAttrs(attributes, opts) {
|
| 57 |
-
if (!attributes) return;
|
| 58 |
-
|
| 59 |
-
var output = '',
|
| 60 |
-
value;
|
| 61 |
-
|
| 62 |
-
// Loop through the attributes
|
| 63 |
-
for (var key in attributes) {
|
| 64 |
-
value = attributes[key];
|
| 65 |
-
if (output) {
|
| 66 |
-
output += ' ';
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
if (!value && booleanAttributes[key]) {
|
| 70 |
-
output += key;
|
| 71 |
-
} else {
|
| 72 |
-
output += key + '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
|
| 73 |
-
}
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
return output;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
/*
|
| 80 |
-
Self-enclosing tags (stolen from node-htmlparser)
|
| 81 |
-
*/
|
| 82 |
-
var singleTag = {
|
| 83 |
-
__proto__: null,
|
| 84 |
-
area: true,
|
| 85 |
-
base: true,
|
| 86 |
-
basefont: true,
|
| 87 |
-
br: true,
|
| 88 |
-
col: true,
|
| 89 |
-
command: true,
|
| 90 |
-
embed: true,
|
| 91 |
-
frame: true,
|
| 92 |
-
hr: true,
|
| 93 |
-
img: true,
|
| 94 |
-
input: true,
|
| 95 |
-
isindex: true,
|
| 96 |
-
keygen: true,
|
| 97 |
-
link: true,
|
| 98 |
-
meta: true,
|
| 99 |
-
param: true,
|
| 100 |
-
source: true,
|
| 101 |
-
track: true,
|
| 102 |
-
wbr: true,
|
| 103 |
-
};
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
var render = module.exports = function(dom, opts) {
|
| 107 |
-
if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
|
| 108 |
-
opts = opts || {};
|
| 109 |
-
|
| 110 |
-
var output = '';
|
| 111 |
-
|
| 112 |
-
for(var i = 0; i < dom.length; i++){
|
| 113 |
-
var elem = dom[i];
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
output += renderCdata(elem);
|
| 125 |
-
else
|
| 126 |
-
output += renderText(elem, opts);
|
| 127 |
-
}
|
| 128 |
|
| 129 |
-
|
|
|
|
|
|
|
| 130 |
};
|
| 131 |
|
| 132 |
-
function renderTag(elem, opts) {
|
| 133 |
-
// Handle SVG
|
| 134 |
-
if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
|
| 135 |
-
|
| 136 |
-
var tag = '<' + elem.name,
|
| 137 |
-
attribs = formatAttrs(elem.attribs, opts);
|
| 138 |
-
|
| 139 |
-
if (attribs) {
|
| 140 |
-
tag += ' ' + attribs;
|
| 141 |
-
}
|
| 142 |
-
|
| 143 |
-
if (
|
| 144 |
-
opts.xmlMode
|
| 145 |
-
&& (!elem.children || elem.children.length === 0)
|
| 146 |
-
) {
|
| 147 |
-
tag += '/>';
|
| 148 |
-
} else {
|
| 149 |
-
tag += '>';
|
| 150 |
-
if (elem.children) {
|
| 151 |
-
tag += render(elem.children, opts);
|
| 152 |
-
}
|
| 153 |
-
|
| 154 |
-
if (!singleTag[elem.name] || opts.xmlMode) {
|
| 155 |
-
tag += '</' + elem.name + '>';
|
| 156 |
-
}
|
| 157 |
-
}
|
| 158 |
-
|
| 159 |
-
return tag;
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
function renderDirective(elem) {
|
| 163 |
-
return '<' + elem.data + '>';
|
| 164 |
-
}
|
| 165 |
-
|
| 166 |
-
function renderText(elem, opts) {
|
| 167 |
-
var data = elem.data || '';
|
| 168 |
-
|
| 169 |
-
// if entities weren't decoded, no need to encode them back
|
| 170 |
-
if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
|
| 171 |
-
data = entities.encodeXML(data);
|
| 172 |
-
}
|
| 173 |
-
|
| 174 |
-
return data;
|
| 175 |
-
}
|
| 176 |
-
|
| 177 |
-
function renderCdata(elem) {
|
| 178 |
-
return '<![CDATA[' + elem.children[0].data + ']]>';
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
function renderComment(elem) {
|
| 182 |
-
return '<!--' + elem.data + '-->';
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
|
| 186 |
/***/ },
|
| 187 |
|
| 188 |
/***/ 0:
|
|
@@ -194,9 +29,9 @@ webpackJsonp([0],{
|
|
| 194 |
__webpack_require__(541);
|
| 195 |
__webpack_require__(543);
|
| 196 |
__webpack_require__(546);
|
| 197 |
-
__webpack_require__(550);
|
| 198 |
__webpack_require__(551);
|
| 199 |
-
|
|
|
|
| 200 |
|
| 201 |
|
| 202 |
/***/ },
|
|
@@ -257,7 +92,7 @@ webpackJsonp([0],{
|
|
| 257 |
|
| 258 |
var messages = {
|
| 259 |
onTrash: function onTrash(response) {
|
| 260 |
-
var count =
|
| 261 |
var message = null;
|
| 262 |
|
| 263 |
if (count === 1) {
|
|
@@ -268,7 +103,7 @@ webpackJsonp([0],{
|
|
| 268 |
_mailpoet2['default'].Notice.success(message);
|
| 269 |
},
|
| 270 |
onDelete: function onDelete(response) {
|
| 271 |
-
var count =
|
| 272 |
var message = null;
|
| 273 |
|
| 274 |
if (count === 1) {
|
|
@@ -279,7 +114,7 @@ webpackJsonp([0],{
|
|
| 279 |
_mailpoet2['default'].Notice.success(message);
|
| 280 |
},
|
| 281 |
onRestore: function onRestore(response) {
|
| 282 |
-
var count =
|
| 283 |
var message = null;
|
| 284 |
|
| 285 |
if (count === 1) {
|
|
@@ -315,7 +150,7 @@ webpackJsonp([0],{
|
|
| 315 |
}
|
| 316 |
};
|
| 317 |
|
| 318 |
-
var
|
| 319 |
name: 'moveToList',
|
| 320 |
label: _mailpoet2['default'].I18n.t('moveToList'),
|
| 321 |
onSelect: function onSelect() {
|
|
@@ -332,11 +167,11 @@ webpackJsonp([0],{
|
|
| 332 |
},
|
| 333 |
getData: function getData() {
|
| 334 |
return {
|
| 335 |
-
segment_id:
|
| 336 |
};
|
| 337 |
},
|
| 338 |
onSuccess: function onSuccess(response) {
|
| 339 |
-
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersMovedToList').replace('%$1d', (
|
| 340 |
}
|
| 341 |
}, {
|
| 342 |
name: 'addToList',
|
|
@@ -355,11 +190,11 @@ webpackJsonp([0],{
|
|
| 355 |
},
|
| 356 |
getData: function getData() {
|
| 357 |
return {
|
| 358 |
-
segment_id:
|
| 359 |
};
|
| 360 |
},
|
| 361 |
onSuccess: function onSuccess(response) {
|
| 362 |
-
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersAddedToList').replace('%$1d', (
|
| 363 |
}
|
| 364 |
}, {
|
| 365 |
name: 'removeFromList',
|
|
@@ -378,23 +213,23 @@ webpackJsonp([0],{
|
|
| 378 |
},
|
| 379 |
getData: function getData() {
|
| 380 |
return {
|
| 381 |
-
segment_id:
|
| 382 |
};
|
| 383 |
},
|
| 384 |
onSuccess: function onSuccess(response) {
|
| 385 |
-
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersRemovedFromList').replace('%$1d', (
|
| 386 |
}
|
| 387 |
}, {
|
| 388 |
name: 'removeFromAllLists',
|
| 389 |
label: _mailpoet2['default'].I18n.t('removeFromAllLists'),
|
| 390 |
onSuccess: function onSuccess(response) {
|
| 391 |
-
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersRemovedFromAllLists').replace('%$1d', (
|
| 392 |
}
|
| 393 |
}, {
|
| 394 |
name: 'sendConfirmationEmail',
|
| 395 |
label: _mailpoet2['default'].I18n.t('resendConfirmationEmail'),
|
| 396 |
onSuccess: function onSuccess(response) {
|
| 397 |
-
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleConfirmationEmailsSent').replace('%$1d', (
|
| 398 |
}
|
| 399 |
}, {
|
| 400 |
name: 'trash',
|
|
@@ -402,7 +237,7 @@ webpackJsonp([0],{
|
|
| 402 |
onSuccess: messages.onTrash
|
| 403 |
}];
|
| 404 |
|
| 405 |
-
var
|
| 406 |
name: 'edit',
|
| 407 |
label: _mailpoet2['default'].I18n.t('edit'),
|
| 408 |
link: function link(subscriber) {
|
|
@@ -415,17 +250,17 @@ webpackJsonp([0],{
|
|
| 415 |
}, {
|
| 416 |
name: 'trash',
|
| 417 |
display: function display(subscriber) {
|
| 418 |
-
return
|
| 419 |
}
|
| 420 |
}];
|
| 421 |
|
| 422 |
var SubscriberList = _react2['default'].createClass({
|
| 423 |
displayName: 'SubscriberList',
|
| 424 |
|
| 425 |
-
getSegmentFromId: function getSegmentFromId(
|
| 426 |
var result = false;
|
| 427 |
-
window.mailpoet_segments.
|
| 428 |
-
if (segment.id ===
|
| 429 |
result = segment;
|
| 430 |
}
|
| 431 |
});
|
|
@@ -434,7 +269,7 @@ webpackJsonp([0],{
|
|
| 434 |
renderItem: function renderItem(subscriber, actions) {
|
| 435 |
var _this = this;
|
| 436 |
|
| 437 |
-
var
|
| 438 |
|
| 439 |
var status = '';
|
| 440 |
|
|
@@ -454,6 +289,10 @@ webpackJsonp([0],{
|
|
| 454 |
case 'bounced':
|
| 455 |
status = _mailpoet2['default'].I18n.t('bounced');
|
| 456 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 457 |
}
|
| 458 |
|
| 459 |
var segments = false;
|
|
@@ -461,20 +300,20 @@ webpackJsonp([0],{
|
|
| 461 |
// Subscriptions
|
| 462 |
if (subscriber.subscriptions.length > 0) {
|
| 463 |
(function () {
|
| 464 |
-
var
|
| 465 |
|
| 466 |
-
subscriber.subscriptions.
|
| 467 |
var segment = _this.getSegmentFromId(subscription.segment_id);
|
| 468 |
if (segment === false) return;
|
| 469 |
if (subscription.status === 'subscribed') {
|
| 470 |
-
|
| 471 |
}
|
| 472 |
});
|
| 473 |
|
| 474 |
segments = _react2['default'].createElement(
|
| 475 |
'span',
|
| 476 |
null,
|
| 477 |
-
|
| 478 |
);
|
| 479 |
})();
|
| 480 |
}
|
|
@@ -484,7 +323,7 @@ webpackJsonp([0],{
|
|
| 484 |
null,
|
| 485 |
_react2['default'].createElement(
|
| 486 |
'td',
|
| 487 |
-
{ className:
|
| 488 |
_react2['default'].createElement(
|
| 489 |
'strong',
|
| 490 |
null,
|
|
@@ -578,8 +417,8 @@ webpackJsonp([0],{
|
|
| 578 |
endpoint: 'subscribers',
|
| 579 |
onRenderItem: this.renderItem,
|
| 580 |
columns: columns,
|
| 581 |
-
bulk_actions:
|
| 582 |
-
item_actions:
|
| 583 |
messages: messages,
|
| 584 |
sort_by: 'created_at',
|
| 585 |
sort_order: 'desc'
|
|
@@ -614,21 +453,21 @@ webpackJsonp([0],{
|
|
| 614 |
label: MailPoet.I18n.t('email'),
|
| 615 |
type: 'text',
|
| 616 |
disabled: function disabled(subscriber) {
|
| 617 |
-
return
|
| 618 |
}
|
| 619 |
}, {
|
| 620 |
name: 'first_name',
|
| 621 |
label: MailPoet.I18n.t('firstname'),
|
| 622 |
type: 'text',
|
| 623 |
disabled: function disabled(subscriber) {
|
| 624 |
-
return
|
| 625 |
}
|
| 626 |
}, {
|
| 627 |
name: 'last_name',
|
| 628 |
label: MailPoet.I18n.t('lastname'),
|
| 629 |
type: 'text',
|
| 630 |
disabled: function disabled(subscriber) {
|
| 631 |
-
return
|
| 632 |
}
|
| 633 |
}, {
|
| 634 |
name: 'status',
|
|
@@ -641,7 +480,7 @@ webpackJsonp([0],{
|
|
| 641 |
bounced: MailPoet.I18n.t('bounced')
|
| 642 |
},
|
| 643 |
filter: function filter(subscriber, value) {
|
| 644 |
-
if (
|
| 645 |
return false;
|
| 646 |
}
|
| 647 |
return true;
|
|
@@ -659,14 +498,14 @@ webpackJsonp([0],{
|
|
| 659 |
return null;
|
| 660 |
}
|
| 661 |
|
| 662 |
-
return subscriber.subscriptions.
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
});
|
| 667 |
},
|
| 668 |
filter: function filter(segment) {
|
| 669 |
-
return
|
| 670 |
},
|
| 671 |
getLabel: function getLabel(segment) {
|
| 672 |
return segment.name + ' (' + segment.subscribers + ')';
|
|
@@ -675,13 +514,13 @@ webpackJsonp([0],{
|
|
| 675 |
var label = '';
|
| 676 |
|
| 677 |
if (subscriber.subscriptions !== undefined) {
|
| 678 |
-
subscriber.subscriptions.
|
| 679 |
if (segment.id === subscription.segment_id) {
|
| 680 |
label = segment.name;
|
| 681 |
|
| 682 |
if (subscription.status === 'unsubscribed') {
|
| 683 |
-
var
|
| 684 |
-
label += ' (%$1s)'.replace('%$1s', MailPoet.I18n.t('unsubscribedOn').replace('%$1s',
|
| 685 |
}
|
| 686 |
}
|
| 687 |
});
|
|
@@ -690,23 +529,23 @@ webpackJsonp([0],{
|
|
| 690 |
}
|
| 691 |
}];
|
| 692 |
|
| 693 |
-
var
|
| 694 |
-
|
| 695 |
var field = {
|
| 696 |
-
name: 'cf_' +
|
| 697 |
-
label:
|
| 698 |
-
type:
|
| 699 |
};
|
| 700 |
-
if (
|
| 701 |
-
field.params =
|
| 702 |
}
|
| 703 |
|
| 704 |
-
if (
|
| 705 |
-
field.values =
|
| 706 |
}
|
| 707 |
|
| 708 |
// add placeholders for selects (date, select)
|
| 709 |
-
switch (
|
| 710 |
case 'date':
|
| 711 |
field.year_placeholder = MailPoet.I18n.t('year');
|
| 712 |
field.month_placeholder = MailPoet.I18n.t('month');
|
|
@@ -716,6 +555,10 @@ webpackJsonp([0],{
|
|
| 716 |
case 'select':
|
| 717 |
field.placeholder = '-';
|
| 718 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 719 |
}
|
| 720 |
|
| 721 |
fields.push(field);
|
|
@@ -734,7 +577,7 @@ webpackJsonp([0],{
|
|
| 734 |
};
|
| 735 |
|
| 736 |
var beforeFormContent = function beforeFormContent(subscriber) {
|
| 737 |
-
if (
|
| 738 |
return React.createElement(
|
| 739 |
'p',
|
| 740 |
{ className: 'description' },
|
|
@@ -750,6 +593,7 @@ webpackJsonp([0],{
|
|
| 750 |
})
|
| 751 |
);
|
| 752 |
}
|
|
|
|
| 753 |
};
|
| 754 |
|
| 755 |
var afterFormContent = function afterFormContent() {
|
|
@@ -874,10 +718,10 @@ webpackJsonp([0],{
|
|
| 874 |
var container = document.getElementById('newsletters_container');
|
| 875 |
|
| 876 |
if (container) {
|
| 877 |
-
var
|
| 878 |
-
|
| 879 |
|
| 880 |
-
var
|
| 881 |
_reactRouter.Router,
|
| 882 |
{ history: history },
|
| 883 |
_react2['default'].createElement(
|
|
@@ -894,13 +738,13 @@ webpackJsonp([0],{
|
|
| 894 |
_react2['default'].createElement(_reactRouter.Route, { path: 'new/notification', component: _newslettersTypesNotificationNotificationJsx2['default'] }),
|
| 895 |
_react2['default'].createElement(_reactRouter.Route, { name: 'template', path: 'template/:id', component: _newslettersTemplatesJsx2['default'] }),
|
| 896 |
_react2['default'].createElement(_reactRouter.Route, { path: 'send/:id', component: _newslettersSendJsx2['default'] }),
|
| 897 |
-
|
| 898 |
return _react2['default'].createElement(_reactRouter.Route, { key: rt.path, path: rt.path, component: rt.component });
|
| 899 |
})
|
| 900 |
)
|
| 901 |
), container);
|
| 902 |
|
| 903 |
-
window.mailpoet_listing =
|
| 904 |
}
|
| 905 |
/* Listings */ /* Newsletter: type selection */ /* New newsletter: types */ /* Template selection */ /* Sending options */ /* Extra routes */
|
| 906 |
|
|
@@ -1136,6 +980,7 @@ webpackJsonp([0],{
|
|
| 1136 |
};
|
| 1137 |
|
| 1138 |
reader.readAsText(file);
|
|
|
|
| 1139 |
},
|
| 1140 |
render: function render() {
|
| 1141 |
return _react2['default'].createElement(
|
|
@@ -8765,16 +8610,201 @@ webpackJsonp([0],{
|
|
| 8765 |
|
| 8766 |
/***/ },
|
| 8767 |
|
| 8768 |
-
/***/
|
| 8769 |
/***/ function(module, exports, __webpack_require__) {
|
| 8770 |
|
| 8771 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8772 |
|
| 8773 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8774 |
|
| 8775 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8776 |
|
| 8777 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8778 |
|
| 8779 |
var _reactDom = __webpack_require__(34);
|
| 8780 |
|
|
@@ -8821,26 +8851,6 @@ webpackJsonp([0],{
|
|
| 8821 |
|
| 8822 |
/***/ },
|
| 8823 |
|
| 8824 |
-
/***/ 495:
|
| 8825 |
-
/***/ function(module, exports) {
|
| 8826 |
-
|
| 8827 |
-
//Types of elements found in the DOM
|
| 8828 |
-
module.exports = {
|
| 8829 |
-
Text: "text", //Text
|
| 8830 |
-
Directive: "directive", //<? ... ?>
|
| 8831 |
-
Comment: "comment", //<!-- ... -->
|
| 8832 |
-
Script: "script", //<script> tags
|
| 8833 |
-
Style: "style", //<style> tags
|
| 8834 |
-
Tag: "tag", //Any tag
|
| 8835 |
-
CDATA: "cdata", //<![CDATA[ ... ]]>
|
| 8836 |
-
|
| 8837 |
-
isTag: function(elem){
|
| 8838 |
-
return elem.type === "tag" || elem.type === "script" || elem.type === "style";
|
| 8839 |
-
}
|
| 8840 |
-
};
|
| 8841 |
-
|
| 8842 |
-
/***/ },
|
| 8843 |
-
|
| 8844 |
/***/ 496:
|
| 8845 |
/***/ function(module, exports, __webpack_require__) {
|
| 8846 |
|
|
@@ -10466,10 +10476,10 @@ webpackJsonp([0],{
|
|
| 10466 |
return true;
|
| 10467 |
},
|
| 10468 |
render: function render() {
|
| 10469 |
-
var isPaused = this.state.item.status
|
| 10470 |
var fields = this.state.fields.map(function (field) {
|
| 10471 |
var newField = field;
|
| 10472 |
-
if (field.name
|
| 10473 |
newField.disabled = isPaused;
|
| 10474 |
}
|
| 10475 |
return newField;
|
|
@@ -10574,10 +10584,10 @@ webpackJsonp([0],{
|
|
| 10574 |
getLabel: function getLabel(segment) {
|
| 10575 |
return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
|
| 10576 |
},
|
| 10577 |
-
transformChangedValue: function transformChangedValue(
|
| 10578 |
-
var
|
| 10579 |
-
return _.map(
|
| 10580 |
-
return _.find(
|
| 10581 |
return segment.id === id;
|
| 10582 |
});
|
| 10583 |
});
|
|
@@ -10946,7 +10956,7 @@ webpackJsonp([0],{
|
|
| 10946 |
},
|
| 10947 |
propagateChange: function propagateChange() {
|
| 10948 |
if (this.props.onChange) {
|
| 10949 |
-
|
| 10950 |
target: {
|
| 10951 |
name: this.props.name || '',
|
| 10952 |
value: this.getDateTime()
|
|
@@ -11083,10 +11093,10 @@ webpackJsonp([0],{
|
|
| 11083 |
getLabel: function getLabel(segment) {
|
| 11084 |
return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
|
| 11085 |
},
|
| 11086 |
-
transformChangedValue: function transformChangedValue(
|
| 11087 |
-
var
|
| 11088 |
-
return _.map(
|
| 11089 |
-
return _.find(
|
| 11090 |
return segment.id === id;
|
| 11091 |
});
|
| 11092 |
});
|
|
@@ -11420,11 +11430,11 @@ webpackJsonp([0],{
|
|
| 11420 |
|
| 11421 |
var _newslettersListingsMixinsJsx = __webpack_require__(530);
|
| 11422 |
|
| 11423 |
-
var
|
| 11424 |
|
| 11425 |
var messages = {
|
| 11426 |
onTrash: function onTrash(response) {
|
| 11427 |
-
var count =
|
| 11428 |
var message = null;
|
| 11429 |
|
| 11430 |
if (count === 1) {
|
|
@@ -11435,7 +11445,7 @@ webpackJsonp([0],{
|
|
| 11435 |
_mailpoet2['default'].Notice.success(message);
|
| 11436 |
},
|
| 11437 |
onDelete: function onDelete(response) {
|
| 11438 |
-
var count =
|
| 11439 |
var message = null;
|
| 11440 |
|
| 11441 |
if (count === 1) {
|
|
@@ -11446,7 +11456,7 @@ webpackJsonp([0],{
|
|
| 11446 |
_mailpoet2['default'].Notice.success(message);
|
| 11447 |
},
|
| 11448 |
onRestore: function onRestore(response) {
|
| 11449 |
-
var count =
|
| 11450 |
var message = null;
|
| 11451 |
|
| 11452 |
if (count === 1) {
|
|
@@ -11471,14 +11481,14 @@ webpackJsonp([0],{
|
|
| 11471 |
}, {
|
| 11472 |
name: 'statistics',
|
| 11473 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 11474 |
-
display:
|
| 11475 |
}, {
|
| 11476 |
name: 'sent_at',
|
| 11477 |
label: _mailpoet2['default'].I18n.t('sentOn'),
|
| 11478 |
sortable: true
|
| 11479 |
}];
|
| 11480 |
|
| 11481 |
-
var
|
| 11482 |
name: 'trash',
|
| 11483 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 11484 |
onSuccess: messages.onTrash
|
|
@@ -11488,7 +11498,7 @@ webpackJsonp([0],{
|
|
| 11488 |
var redirectToEditing = function redirectToEditing() {
|
| 11489 |
window.location.href = '?page=mailpoet-newsletter-editor&id=' + newsletter.id;
|
| 11490 |
};
|
| 11491 |
-
if (!newsletter.queue || newsletter.status
|
| 11492 |
redirectToEditing();
|
| 11493 |
} else {
|
| 11494 |
(0, _reactConfirmAlert.confirmAlert)({
|
|
@@ -11501,7 +11511,7 @@ webpackJsonp([0],{
|
|
| 11501 |
}
|
| 11502 |
};
|
| 11503 |
|
| 11504 |
-
var
|
| 11505 |
name: 'view',
|
| 11506 |
link: function link(newsletter) {
|
| 11507 |
return _react2['default'].createElement(
|
|
@@ -11541,7 +11551,7 @@ webpackJsonp([0],{
|
|
| 11541 |
}];
|
| 11542 |
|
| 11543 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_standard_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 11544 |
-
|
| 11545 |
|
| 11546 |
var NewsletterListStandard = _react2['default'].createClass({
|
| 11547 |
displayName: 'NewsletterListStandard',
|
|
@@ -11587,7 +11597,7 @@ webpackJsonp([0],{
|
|
| 11587 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('lists') },
|
| 11588 |
segments
|
| 11589 |
),
|
| 11590 |
-
|
| 11591 |
'td',
|
| 11592 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 11593 |
this.renderStatistics(newsletter, undefined, meta.current_time)
|
|
@@ -11632,8 +11642,8 @@ webpackJsonp([0],{
|
|
| 11632 |
base_url: 'standard',
|
| 11633 |
onRenderItem: this.renderItem,
|
| 11634 |
columns: columns,
|
| 11635 |
-
bulk_actions:
|
| 11636 |
-
item_actions:
|
| 11637 |
messages: messages,
|
| 11638 |
auto_refresh: true,
|
| 11639 |
sort_by: 'sent_at',
|
|
@@ -11810,14 +11820,14 @@ webpackJsonp([0],{
|
|
| 11810 |
}
|
| 11811 |
});
|
| 11812 |
},
|
| 11813 |
-
renderQueueStatus: function renderQueueStatus(newsletter,
|
| 11814 |
if (!newsletter.queue) {
|
| 11815 |
return _react2['default'].createElement(
|
| 11816 |
'span',
|
| 11817 |
null,
|
| 11818 |
_mailpoet2['default'].I18n.t('notSentYet')
|
| 11819 |
);
|
| 11820 |
-
} else if (
|
| 11821 |
return _react2['default'].createElement(
|
| 11822 |
'span',
|
| 11823 |
null,
|
|
@@ -11879,12 +11889,12 @@ webpackJsonp([0],{
|
|
| 11879 |
);
|
| 11880 |
}
|
| 11881 |
|
| 11882 |
-
var
|
| 11883 |
|
| 11884 |
if (isNaN(percentage)) {
|
| 11885 |
percentage = _mailpoet2['default'].I18n.t('noSubscribers');
|
| 11886 |
} else {
|
| 11887 |
-
|
| 11888 |
percentage += '%';
|
| 11889 |
}
|
| 11890 |
|
|
@@ -11896,7 +11906,7 @@ webpackJsonp([0],{
|
|
| 11896 |
{ className: progressClasses },
|
| 11897 |
_react2['default'].createElement('span', {
|
| 11898 |
className: 'mailpoet_progress_bar',
|
| 11899 |
-
style: { width:
|
| 11900 |
}),
|
| 11901 |
_react2['default'].createElement(
|
| 11902 |
'span',
|
|
@@ -11918,8 +11928,8 @@ webpackJsonp([0],{
|
|
| 11918 |
};
|
| 11919 |
|
| 11920 |
var StatisticsMixin = {
|
| 11921 |
-
renderStatistics: function renderStatistics(newsletter,
|
| 11922 |
-
var sent =
|
| 11923 |
if (sent === undefined) {
|
| 11924 |
// condition for standard and post notification listings
|
| 11925 |
sent = newsletter.statistics && newsletter.queue && newsletter.queue.status !== 'scheduled';
|
|
@@ -11937,50 +11947,50 @@ webpackJsonp([0],{
|
|
| 11937 |
params = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_listing_stats_before', params, newsletter);
|
| 11938 |
|
| 11939 |
// welcome emails provide explicit total_sent value
|
| 11940 |
-
var
|
| 11941 |
|
| 11942 |
-
var
|
| 11943 |
-
var
|
| 11944 |
-
var
|
| 11945 |
|
| 11946 |
-
if (
|
| 11947 |
-
|
| 11948 |
-
|
| 11949 |
-
|
| 11950 |
}
|
| 11951 |
|
| 11952 |
// format to 1 decimal place
|
| 11953 |
-
var
|
| 11954 |
-
var
|
| 11955 |
-
var
|
| 11956 |
-
|
| 11957 |
-
var
|
| 11958 |
-
var
|
| 11959 |
-
var
|
| 11960 |
-
var
|
| 11961 |
-
var
|
| 11962 |
-
if (
|
| 11963 |
// standard emails and post notifications:
|
| 11964 |
// display green box for newsletters that were just sent
|
| 11965 |
-
|
| 11966 |
-
|
| 11967 |
-
|
| 11968 |
-
|
| 11969 |
-
|
| 11970 |
} else {
|
| 11971 |
// welcome emails: no green box and KB link
|
| 11972 |
-
|
| 11973 |
-
|
| 11974 |
}
|
| 11975 |
|
| 11976 |
var improveStatsKBLink = 'http://beta.docs.mailpoet.com/article/191-how-to-improve-my-open-and-click-rates';
|
| 11977 |
|
| 11978 |
// thresholds to display badges
|
| 11979 |
-
var
|
| 11980 |
-
var
|
| 11981 |
|
| 11982 |
var content = undefined;
|
| 11983 |
-
if (
|
| 11984 |
// display stats with badges
|
| 11985 |
content = _react2['default'].createElement(
|
| 11986 |
'div',
|
|
@@ -11991,12 +12001,12 @@ webpackJsonp([0],{
|
|
| 11991 |
_react2['default'].createElement(
|
| 11992 |
'span',
|
| 11993 |
null,
|
| 11994 |
-
|
| 11995 |
'% '
|
| 11996 |
),
|
| 11997 |
_react2['default'].createElement(_newslettersBadgesStatsJsx2['default'], {
|
| 11998 |
stat: 'opened',
|
| 11999 |
-
rate:
|
| 12000 |
tooltipId: 'opened-' + newsletter.id
|
| 12001 |
})
|
| 12002 |
),
|
|
@@ -12006,12 +12016,12 @@ webpackJsonp([0],{
|
|
| 12006 |
_react2['default'].createElement(
|
| 12007 |
'span',
|
| 12008 |
null,
|
| 12009 |
-
|
| 12010 |
'% '
|
| 12011 |
),
|
| 12012 |
_react2['default'].createElement(_newslettersBadgesStatsJsx2['default'], {
|
| 12013 |
stat: 'clicked',
|
| 12014 |
-
rate:
|
| 12015 |
tooltipId: 'clicked-' + newsletter.id
|
| 12016 |
})
|
| 12017 |
),
|
|
@@ -12021,7 +12031,7 @@ webpackJsonp([0],{
|
|
| 12021 |
_react2['default'].createElement(
|
| 12022 |
'span',
|
| 12023 |
{ className: 'mailpoet_stat_hidden' },
|
| 12024 |
-
|
| 12025 |
'%'
|
| 12026 |
)
|
| 12027 |
)
|
|
@@ -12034,36 +12044,36 @@ webpackJsonp([0],{
|
|
| 12034 |
_react2['default'].createElement(
|
| 12035 |
'span',
|
| 12036 |
{ className: 'mailpoet_stats_text' },
|
| 12037 |
-
|
| 12038 |
'%,',
|
| 12039 |
' ',
|
| 12040 |
-
|
| 12041 |
'%',
|
| 12042 |
_react2['default'].createElement(
|
| 12043 |
'span',
|
| 12044 |
{ className: 'mailpoet_stat_hidden' },
|
| 12045 |
', ',
|
| 12046 |
-
|
| 12047 |
'%'
|
| 12048 |
)
|
| 12049 |
),
|
| 12050 |
-
|
| 12051 |
'div',
|
| 12052 |
{ className: 'mailpoet_badge mailpoet_badge_green' },
|
| 12053 |
-
_mailpoet2['default'].I18n.t('checkBackInHours').replace('%$1d',
|
| 12054 |
)
|
| 12055 |
);
|
| 12056 |
}
|
| 12057 |
|
| 12058 |
// thresholds to display bad open rate help
|
| 12059 |
-
var
|
| 12060 |
-
var
|
| 12061 |
-
var
|
| 12062 |
|
| 12063 |
-
var
|
| 12064 |
-
if (
|
| 12065 |
// help link for bad open rate
|
| 12066 |
-
|
| 12067 |
'div',
|
| 12068 |
null,
|
| 12069 |
_react2['default'].createElement(
|
|
@@ -12078,7 +12088,7 @@ webpackJsonp([0],{
|
|
| 12078 |
);
|
| 12079 |
}
|
| 12080 |
|
| 12081 |
-
if (
|
| 12082 |
// wrap content in a link
|
| 12083 |
if (params.externalLink) {
|
| 12084 |
return _react2['default'].createElement(
|
|
@@ -12093,7 +12103,7 @@ webpackJsonp([0],{
|
|
| 12093 |
},
|
| 12094 |
content
|
| 12095 |
),
|
| 12096 |
-
|
| 12097 |
);
|
| 12098 |
}
|
| 12099 |
return _react2['default'].createElement(
|
|
@@ -12108,7 +12118,7 @@ webpackJsonp([0],{
|
|
| 12108 |
},
|
| 12109 |
content
|
| 12110 |
),
|
| 12111 |
-
|
| 12112 |
);
|
| 12113 |
}
|
| 12114 |
|
|
@@ -12116,7 +12126,7 @@ webpackJsonp([0],{
|
|
| 12116 |
'div',
|
| 12117 |
null,
|
| 12118 |
content,
|
| 12119 |
-
|
| 12120 |
);
|
| 12121 |
},
|
| 12122 |
addStatsCTAAction: function addStatsCTAAction(actions) {
|
|
@@ -12134,8 +12144,8 @@ webpackJsonp([0],{
|
|
| 12134 |
},
|
| 12135 |
display: function display(newsletter) {
|
| 12136 |
// welcome emails provide explicit total_sent value
|
| 12137 |
-
var
|
| 12138 |
-
return
|
| 12139 |
}
|
| 12140 |
});
|
| 12141 |
return actions;
|
|
@@ -12163,8 +12173,8 @@ webpackJsonp([0],{
|
|
| 12163 |
}
|
| 12164 |
},
|
| 12165 |
getMailerError: function getMailerError(state) {
|
| 12166 |
-
var
|
| 12167 |
-
var
|
| 12168 |
return _react2['default'].createElement(
|
| 12169 |
'a',
|
| 12170 |
{ href: '?page=mailpoet-settings#mta', key: 'check-sending' },
|
|
@@ -12172,9 +12182,12 @@ webpackJsonp([0],{
|
|
| 12172 |
);
|
| 12173 |
});
|
| 12174 |
if (state.meta.mta_log.error.operation === 'send') {
|
| 12175 |
-
|
| 12176 |
} else {
|
| 12177 |
-
|
|
|
|
|
|
|
|
|
|
| 12178 |
}
|
| 12179 |
return _react2['default'].createElement(
|
| 12180 |
'div',
|
|
@@ -12182,12 +12195,12 @@ webpackJsonp([0],{
|
|
| 12182 |
_react2['default'].createElement(
|
| 12183 |
'p',
|
| 12184 |
null,
|
| 12185 |
-
|
| 12186 |
),
|
| 12187 |
_react2['default'].createElement(
|
| 12188 |
'p',
|
| 12189 |
null,
|
| 12190 |
-
|
| 12191 |
),
|
| 12192 |
_react2['default'].createElement(
|
| 12193 |
'p',
|
|
@@ -12267,13 +12280,13 @@ webpackJsonp([0],{
|
|
| 12267 |
|
| 12268 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 12269 |
|
| 12270 |
-
var
|
| 12271 |
-
var
|
| 12272 |
-
var
|
| 12273 |
|
| 12274 |
var messages = {
|
| 12275 |
onTrash: function onTrash(response) {
|
| 12276 |
-
var count =
|
| 12277 |
var message = null;
|
| 12278 |
|
| 12279 |
if (count === 1) {
|
|
@@ -12284,7 +12297,7 @@ webpackJsonp([0],{
|
|
| 12284 |
_mailpoet2['default'].Notice.success(message);
|
| 12285 |
},
|
| 12286 |
onDelete: function onDelete(response) {
|
| 12287 |
-
var count =
|
| 12288 |
var message = null;
|
| 12289 |
|
| 12290 |
if (count === 1) {
|
|
@@ -12295,7 +12308,7 @@ webpackJsonp([0],{
|
|
| 12295 |
_mailpoet2['default'].Notice.success(message);
|
| 12296 |
},
|
| 12297 |
onRestore: function onRestore(response) {
|
| 12298 |
-
var count =
|
| 12299 |
var message = null;
|
| 12300 |
|
| 12301 |
if (count === 1) {
|
|
@@ -12321,20 +12334,20 @@ webpackJsonp([0],{
|
|
| 12321 |
}, {
|
| 12322 |
name: 'statistics',
|
| 12323 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 12324 |
-
display:
|
| 12325 |
}, {
|
| 12326 |
name: 'updated_at',
|
| 12327 |
label: _mailpoet2['default'].I18n.t('lastModifiedOn'),
|
| 12328 |
sortable: true
|
| 12329 |
}];
|
| 12330 |
|
| 12331 |
-
var
|
| 12332 |
name: 'trash',
|
| 12333 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 12334 |
onSuccess: messages.onTrash
|
| 12335 |
}];
|
| 12336 |
|
| 12337 |
-
var
|
| 12338 |
name: 'view',
|
| 12339 |
link: function link(newsletter) {
|
| 12340 |
return _react2['default'].createElement(
|
|
@@ -12357,7 +12370,7 @@ webpackJsonp([0],{
|
|
| 12357 |
}];
|
| 12358 |
|
| 12359 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_welcome_notification_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 12360 |
-
|
| 12361 |
|
| 12362 |
var NewsletterListWelcome = _react2['default'].createClass({
|
| 12363 |
displayName: 'NewsletterListWelcome',
|
|
@@ -12375,7 +12388,7 @@ webpackJsonp([0],{
|
|
| 12375 |
endpoint: 'newsletters',
|
| 12376 |
action: 'setStatus',
|
| 12377 |
data: {
|
| 12378 |
-
id:
|
| 12379 |
status: e.target.value
|
| 12380 |
}
|
| 12381 |
}).done(function (response) {
|
|
@@ -12392,7 +12405,7 @@ webpackJsonp([0],{
|
|
| 12392 |
});
|
| 12393 |
},
|
| 12394 |
renderStatus: function renderStatus(newsletter) {
|
| 12395 |
-
var
|
| 12396 |
|
| 12397 |
return _react2['default'].createElement(
|
| 12398 |
'div',
|
|
@@ -12422,7 +12435,7 @@ webpackJsonp([0],{
|
|
| 12422 |
_react2['default'].createElement(
|
| 12423 |
'p',
|
| 12424 |
null,
|
| 12425 |
-
|
| 12426 |
)
|
| 12427 |
);
|
| 12428 |
},
|
|
@@ -12438,14 +12451,14 @@ webpackJsonp([0],{
|
|
| 12438 |
if (newsletter.options.role === 'mailpoet_all') {
|
| 12439 |
sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventWPUserAnyRole');
|
| 12440 |
} else {
|
| 12441 |
-
sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventWPUserWithRole').replace('%$1s',
|
| 12442 |
}
|
| 12443 |
break;
|
| 12444 |
|
| 12445 |
-
|
| 12446 |
// get segment
|
| 12447 |
-
segment = _underscore2['default'].find(
|
| 12448 |
-
return
|
| 12449 |
});
|
| 12450 |
|
| 12451 |
if (segment === undefined) {
|
|
@@ -12475,6 +12488,10 @@ webpackJsonp([0],{
|
|
| 12475 |
case 'weeks':
|
| 12476 |
sendingDelay = _mailpoet2['default'].I18n.t('sendingDelayWeeks').replace('%$1d', newsletter.options.afterTimeNumber);
|
| 12477 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12478 |
}
|
| 12479 |
sendingEvent += ' [' + sendingDelay + ']';
|
| 12480 |
}
|
|
@@ -12521,7 +12538,7 @@ webpackJsonp([0],{
|
|
| 12521 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('settings') },
|
| 12522 |
this.renderSettings(newsletter)
|
| 12523 |
),
|
| 12524 |
-
|
| 12525 |
'td',
|
| 12526 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 12527 |
this.renderStatistics(newsletter, newsletter.total_sent > 0 && newsletter.statistics)
|
|
@@ -12562,8 +12579,8 @@ webpackJsonp([0],{
|
|
| 12562 |
base_url: 'welcome',
|
| 12563 |
onRenderItem: this.renderItem,
|
| 12564 |
columns: columns,
|
| 12565 |
-
bulk_actions:
|
| 12566 |
-
item_actions:
|
| 12567 |
messages: messages,
|
| 12568 |
auto_refresh: true,
|
| 12569 |
sort_by: 'updated_at',
|
|
@@ -12613,7 +12630,7 @@ webpackJsonp([0],{
|
|
| 12613 |
|
| 12614 |
var messages = {
|
| 12615 |
onTrash: function onTrash(response) {
|
| 12616 |
-
var count =
|
| 12617 |
var message = null;
|
| 12618 |
|
| 12619 |
if (count === 1) {
|
|
@@ -12624,7 +12641,7 @@ webpackJsonp([0],{
|
|
| 12624 |
_mailpoet2['default'].Notice.success(message);
|
| 12625 |
},
|
| 12626 |
onDelete: function onDelete(response) {
|
| 12627 |
-
var count =
|
| 12628 |
var message = null;
|
| 12629 |
|
| 12630 |
if (count === 1) {
|
|
@@ -12635,7 +12652,7 @@ webpackJsonp([0],{
|
|
| 12635 |
_mailpoet2['default'].Notice.success(message);
|
| 12636 |
},
|
| 12637 |
onRestore: function onRestore(response) {
|
| 12638 |
-
var count =
|
| 12639 |
var message = null;
|
| 12640 |
|
| 12641 |
if (count === 1) {
|
|
@@ -12668,13 +12685,13 @@ webpackJsonp([0],{
|
|
| 12668 |
sortable: true
|
| 12669 |
}];
|
| 12670 |
|
| 12671 |
-
var
|
| 12672 |
name: 'trash',
|
| 12673 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 12674 |
onSuccess: messages.onTrash
|
| 12675 |
}];
|
| 12676 |
|
| 12677 |
-
var
|
| 12678 |
name: 'view',
|
| 12679 |
link: function link(newsletter) {
|
| 12680 |
return _react2['default'].createElement(
|
|
@@ -12734,7 +12751,7 @@ webpackJsonp([0],{
|
|
| 12734 |
endpoint: 'newsletters',
|
| 12735 |
action: 'setStatus',
|
| 12736 |
data: {
|
| 12737 |
-
id:
|
| 12738 |
status: e.target.value
|
| 12739 |
}
|
| 12740 |
}).done(function (response) {
|
|
@@ -12809,6 +12826,10 @@ webpackJsonp([0],{
|
|
| 12809 |
case 'immediately':
|
| 12810 |
sendingFrequency = _mailpoet2['default'].I18n.t('sendImmediately');
|
| 12811 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12812 |
}
|
| 12813 |
|
| 12814 |
return _react2['default'].createElement(
|
|
@@ -12820,7 +12841,7 @@ webpackJsonp([0],{
|
|
| 12820 |
);
|
| 12821 |
},
|
| 12822 |
renderHistoryLink: function renderHistoryLink(newsletter) {
|
| 12823 |
-
var childrenCount =
|
| 12824 |
if (childrenCount === 0) {
|
| 12825 |
return _mailpoet2['default'].I18n.t('notSentYet');
|
| 12826 |
}
|
|
@@ -12906,8 +12927,8 @@ webpackJsonp([0],{
|
|
| 12906 |
base_url: 'notification',
|
| 12907 |
onRenderItem: this.renderItem,
|
| 12908 |
columns: columns,
|
| 12909 |
-
bulk_actions:
|
| 12910 |
-
item_actions:
|
| 12911 |
messages: messages,
|
| 12912 |
auto_refresh: true,
|
| 12913 |
sort_by: 'updated_at',
|
|
@@ -12957,7 +12978,7 @@ webpackJsonp([0],{
|
|
| 12957 |
|
| 12958 |
var _newslettersListingsMixinsJsx = __webpack_require__(530);
|
| 12959 |
|
| 12960 |
-
var
|
| 12961 |
|
| 12962 |
var columns = [{
|
| 12963 |
name: 'subject',
|
|
@@ -12971,13 +12992,13 @@ webpackJsonp([0],{
|
|
| 12971 |
}, {
|
| 12972 |
name: 'statistics',
|
| 12973 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 12974 |
-
display:
|
| 12975 |
}, {
|
| 12976 |
name: 'sent_at',
|
| 12977 |
label: _mailpoet2['default'].I18n.t('sentOn')
|
| 12978 |
}];
|
| 12979 |
|
| 12980 |
-
var
|
| 12981 |
name: 'view',
|
| 12982 |
link: function link(newsletter) {
|
| 12983 |
return _react2['default'].createElement(
|
|
@@ -12989,7 +13010,7 @@ webpackJsonp([0],{
|
|
| 12989 |
}];
|
| 12990 |
|
| 12991 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_notification_history_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 12992 |
-
|
| 12993 |
|
| 12994 |
var NewsletterListNotificationHistory = _react2['default'].createClass({
|
| 12995 |
displayName: 'NewsletterListNotificationHistory',
|
|
@@ -13032,7 +13053,7 @@ webpackJsonp([0],{
|
|
| 13032 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('lists') },
|
| 13033 |
segments
|
| 13034 |
),
|
| 13035 |
-
|
| 13036 |
'td',
|
| 13037 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 13038 |
this.renderStatistics(newsletter, undefined, meta.current_time)
|
|
@@ -13077,7 +13098,7 @@ webpackJsonp([0],{
|
|
| 13077 |
base_url: 'notification/history/:parent_id',
|
| 13078 |
onRenderItem: this.renderItem,
|
| 13079 |
columns: columns,
|
| 13080 |
-
item_actions:
|
| 13081 |
auto_refresh: true,
|
| 13082 |
sort_by: 'sent_at',
|
| 13083 |
sort_order: 'desc',
|
|
@@ -13199,7 +13220,7 @@ webpackJsonp([0],{
|
|
| 13199 |
|
| 13200 |
var messages = {
|
| 13201 |
onTrash: function onTrash(response) {
|
| 13202 |
-
var count =
|
| 13203 |
var message = null;
|
| 13204 |
|
| 13205 |
if (count === 1) {
|
|
@@ -13210,7 +13231,7 @@ webpackJsonp([0],{
|
|
| 13210 |
_mailpoet2['default'].Notice.success(message);
|
| 13211 |
},
|
| 13212 |
onDelete: function onDelete(response) {
|
| 13213 |
-
var count =
|
| 13214 |
var message = null;
|
| 13215 |
|
| 13216 |
if (count === 1) {
|
|
@@ -13221,7 +13242,7 @@ webpackJsonp([0],{
|
|
| 13221 |
_mailpoet2['default'].Notice.success(message);
|
| 13222 |
},
|
| 13223 |
onRestore: function onRestore(response) {
|
| 13224 |
-
var count =
|
| 13225 |
var message = null;
|
| 13226 |
|
| 13227 |
if (count === 1) {
|
|
@@ -13233,13 +13254,13 @@ webpackJsonp([0],{
|
|
| 13233 |
}
|
| 13234 |
};
|
| 13235 |
|
| 13236 |
-
var
|
| 13237 |
name: 'trash',
|
| 13238 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 13239 |
onSuccess: messages.onTrash
|
| 13240 |
}];
|
| 13241 |
|
| 13242 |
-
var
|
| 13243 |
name: 'edit',
|
| 13244 |
link: function link(item) {
|
| 13245 |
return _react2['default'].createElement(
|
|
@@ -13336,22 +13357,22 @@ webpackJsonp([0],{
|
|
| 13336 |
renderItem: function renderItem(segment, actions) {
|
| 13337 |
var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
|
| 13338 |
|
| 13339 |
-
var subscribed =
|
| 13340 |
-
var unconfirmed =
|
| 13341 |
-
var unsubscribed =
|
| 13342 |
-
var bounced =
|
| 13343 |
|
| 13344 |
-
var
|
| 13345 |
|
| 13346 |
if (segment.type === 'wp_users') {
|
| 13347 |
// the WP users segment is not editable so just display its name
|
| 13348 |
-
|
| 13349 |
'span',
|
| 13350 |
{ className: 'row-title' },
|
| 13351 |
segment.name
|
| 13352 |
);
|
| 13353 |
} else {
|
| 13354 |
-
|
| 13355 |
_reactRouter.Link,
|
| 13356 |
{
|
| 13357 |
className: 'row-title',
|
|
@@ -13370,7 +13391,7 @@ webpackJsonp([0],{
|
|
| 13370 |
_react2['default'].createElement(
|
| 13371 |
'strong',
|
| 13372 |
null,
|
| 13373 |
-
|
| 13374 |
),
|
| 13375 |
actions
|
| 13376 |
),
|
|
@@ -13454,8 +13475,8 @@ webpackJsonp([0],{
|
|
| 13454 |
endpoint: 'segments',
|
| 13455 |
onRenderItem: this.renderItem,
|
| 13456 |
columns: columns,
|
| 13457 |
-
bulk_actions:
|
| 13458 |
-
item_actions:
|
| 13459 |
sort_by: 'name',
|
| 13460 |
sort_order: 'asc'
|
| 13461 |
})
|
|
@@ -13636,7 +13657,7 @@ webpackJsonp([0],{
|
|
| 13636 |
|
| 13637 |
var messages = {
|
| 13638 |
onTrash: function onTrash(response) {
|
| 13639 |
-
var count =
|
| 13640 |
var message = null;
|
| 13641 |
|
| 13642 |
if (count === 1) {
|
|
@@ -13647,7 +13668,7 @@ webpackJsonp([0],{
|
|
| 13647 |
_mailpoet2['default'].Notice.success(message);
|
| 13648 |
},
|
| 13649 |
onDelete: function onDelete(response) {
|
| 13650 |
-
var count =
|
| 13651 |
var message = null;
|
| 13652 |
|
| 13653 |
if (count === 1) {
|
|
@@ -13658,7 +13679,7 @@ webpackJsonp([0],{
|
|
| 13658 |
_mailpoet2['default'].Notice.success(message);
|
| 13659 |
},
|
| 13660 |
onRestore: function onRestore(response) {
|
| 13661 |
-
var count =
|
| 13662 |
var message = null;
|
| 13663 |
|
| 13664 |
if (count === 1) {
|
|
@@ -13670,13 +13691,13 @@ webpackJsonp([0],{
|
|
| 13670 |
}
|
| 13671 |
};
|
| 13672 |
|
| 13673 |
-
var
|
| 13674 |
name: 'trash',
|
| 13675 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 13676 |
onSuccess: messages.onTrash
|
| 13677 |
}];
|
| 13678 |
|
| 13679 |
-
var
|
| 13680 |
name: 'edit',
|
| 13681 |
label: _mailpoet2['default'].I18n.t('edit'),
|
| 13682 |
link: function link(item) {
|
|
@@ -13731,7 +13752,7 @@ webpackJsonp([0],{
|
|
| 13731 |
});
|
| 13732 |
},
|
| 13733 |
renderItem: function renderItem(form, actions) {
|
| 13734 |
-
var
|
| 13735 |
|
| 13736 |
var segments = window.mailpoet_segments.filter(function (segment) {
|
| 13737 |
return _jquery2['default'].inArray(segment.id, form.segments) !== -1;
|
|
@@ -13748,7 +13769,7 @@ webpackJsonp([0],{
|
|
| 13748 |
null,
|
| 13749 |
_react2['default'].createElement(
|
| 13750 |
'td',
|
| 13751 |
-
{ className:
|
| 13752 |
_react2['default'].createElement(
|
| 13753 |
'strong',
|
| 13754 |
null,
|
|
@@ -13812,8 +13833,8 @@ webpackJsonp([0],{
|
|
| 13812 |
endpoint: 'forms',
|
| 13813 |
onRenderItem: this.renderItem,
|
| 13814 |
columns: columns,
|
| 13815 |
-
bulk_actions:
|
| 13816 |
-
item_actions:
|
| 13817 |
})
|
| 13818 |
);
|
| 13819 |
}
|
|
@@ -15871,14 +15892,18 @@ webpackJsonp([0],{
|
|
| 15871 |
|
| 15872 |
var _history = __webpack_require__(244);
|
| 15873 |
|
| 15874 |
-
var
|
| 15875 |
|
| 15876 |
-
var
|
| 15877 |
|
| 15878 |
var _helpSystem_infoJsx = __webpack_require__(549);
|
| 15879 |
|
| 15880 |
var _helpSystem_infoJsx2 = _interopRequireDefault(_helpSystem_infoJsx);
|
| 15881 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15882 |
var history = (0, _reactRouter.useRouterHistory)(_history.createHashHistory)({ queryKey: false });
|
| 15883 |
|
| 15884 |
var App = _react2['default'].createClass({
|
|
@@ -15898,9 +15923,10 @@ webpackJsonp([0],{
|
|
| 15898 |
_react2['default'].createElement(
|
| 15899 |
_reactRouter.Route,
|
| 15900 |
{ path: '/', component: App },
|
| 15901 |
-
_react2['default'].createElement(_reactRouter.IndexRedirect, { to: '
|
| 15902 |
-
_react2['default'].createElement(_reactRouter.Route, { path: '
|
| 15903 |
-
_react2['default'].createElement(_reactRouter.Route, { path: 'systemInfo(/)**', params: { tab: 'systemInfo' }, component: _helpSystem_infoJsx2['default'] })
|
|
|
|
| 15904 |
)
|
| 15905 |
), container);
|
| 15906 |
}
|
|
@@ -15915,113 +15941,110 @@ webpackJsonp([0],{
|
|
| 15915 |
|
| 15916 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 15917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15918 |
var _react = __webpack_require__(2);
|
| 15919 |
|
| 15920 |
var _react2 = _interopRequireDefault(_react);
|
| 15921 |
|
| 15922 |
-
var
|
| 15923 |
|
| 15924 |
-
var
|
| 15925 |
|
| 15926 |
var _tabsJsx = __webpack_require__(548);
|
| 15927 |
|
| 15928 |
var _tabsJsx2 = _interopRequireDefault(_tabsJsx);
|
| 15929 |
|
| 15930 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15931 |
return _react2['default'].createElement(
|
| 15932 |
'div',
|
| 15933 |
-
|
| 15934 |
-
_react2['default'].createElement(_tabsJsx2['default'], { tab: 'knowledgeBase' }),
|
| 15935 |
_react2['default'].createElement(
|
| 15936 |
'p',
|
| 15937 |
null,
|
| 15938 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15939 |
),
|
| 15940 |
_react2['default'].createElement(
|
| 15941 |
-
'
|
| 15942 |
null,
|
| 15943 |
_react2['default'].createElement(
|
| 15944 |
-
'
|
| 15945 |
-
|
| 15946 |
-
|
| 15947 |
-
|
| 15948 |
-
|
| 15949 |
-
|
| 15950 |
-
|
| 15951 |
-
|
| 15952 |
-
|
| 15953 |
-
|
| 15954 |
-
|
| 15955 |
-
|
| 15956 |
-
|
| 15957 |
-
|
| 15958 |
-
|
| 15959 |
-
|
| 15960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15961 |
_react2['default'].createElement(
|
| 15962 |
-
'
|
| 15963 |
null,
|
| 15964 |
-
|
| 15965 |
-
'a',
|
| 15966 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/156-migration-questions' },
|
| 15967 |
-
'Migration Questions'
|
| 15968 |
-
)
|
| 15969 |
-
),
|
| 15970 |
-
_react2['default'].createElement(
|
| 15971 |
-
'li',
|
| 15972 |
-
null,
|
| 15973 |
-
_react2['default'].createElement(
|
| 15974 |
-
'a',
|
| 15975 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/149-sending-methods' },
|
| 15976 |
-
'Sending Methods'
|
| 15977 |
-
)
|
| 15978 |
-
),
|
| 15979 |
-
_react2['default'].createElement(
|
| 15980 |
-
'li',
|
| 15981 |
-
null,
|
| 15982 |
-
_react2['default'].createElement(
|
| 15983 |
-
'a',
|
| 15984 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/139-subscription-forms' },
|
| 15985 |
-
'Subscription Forms'
|
| 15986 |
-
)
|
| 15987 |
-
),
|
| 15988 |
-
_react2['default'].createElement(
|
| 15989 |
-
'li',
|
| 15990 |
-
null,
|
| 15991 |
-
_react2['default'].createElement(
|
| 15992 |
-
'a',
|
| 15993 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/114-getting-started' },
|
| 15994 |
-
'Getting Started'
|
| 15995 |
-
)
|
| 15996 |
-
),
|
| 15997 |
-
_react2['default'].createElement(
|
| 15998 |
-
'li',
|
| 15999 |
-
null,
|
| 16000 |
-
_react2['default'].createElement(
|
| 16001 |
-
'a',
|
| 16002 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/123-newsletter-designer' },
|
| 16003 |
-
'Newsletter Designer'
|
| 16004 |
-
)
|
| 16005 |
-
),
|
| 16006 |
-
_react2['default'].createElement(
|
| 16007 |
-
'li',
|
| 16008 |
-
null,
|
| 16009 |
-
_react2['default'].createElement(
|
| 16010 |
-
'a',
|
| 16011 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/121-subscribers-and-lists' },
|
| 16012 |
-
'Subscribers and Lists'
|
| 16013 |
-
)
|
| 16014 |
)
|
| 16015 |
),
|
| 16016 |
-
|
| 16017 |
-
|
| 16018 |
-
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/', className: 'button button-primary' },
|
| 16019 |
-
_mailpoet2['default'].I18n.t('knowledgeBaseButton')
|
| 16020 |
-
)
|
| 16021 |
);
|
| 16022 |
}
|
| 16023 |
-
|
| 16024 |
-
module.exports = KnowledgeBase;
|
| 16025 |
|
| 16026 |
/***/ },
|
| 16027 |
|
|
@@ -16047,13 +16070,17 @@ webpackJsonp([0],{
|
|
| 16047 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 16048 |
|
| 16049 |
var tabs = [{
|
| 16050 |
-
name: '
|
| 16051 |
-
label: _mailpoet2['default'].I18n.t('
|
| 16052 |
-
link: '/
|
| 16053 |
}, {
|
| 16054 |
name: 'systemInfo',
|
| 16055 |
label: _mailpoet2['default'].I18n.t('tabSystemInfoTitle'),
|
| 16056 |
link: '/systemInfo'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16057 |
}];
|
| 16058 |
|
| 16059 |
function Tabs(props) {
|
|
@@ -16079,7 +16106,7 @@ webpackJsonp([0],{
|
|
| 16079 |
}
|
| 16080 |
|
| 16081 |
Tabs.propTypes = { tab: _react2['default'].PropTypes.string };
|
| 16082 |
-
Tabs.defaultProps = { tab: '
|
| 16083 |
|
| 16084 |
module.exports = Tabs;
|
| 16085 |
|
|
@@ -16135,30 +16162,147 @@ webpackJsonp([0],{
|
|
| 16135 |
);
|
| 16136 |
}
|
| 16137 |
|
| 16138 |
-
function
|
| 16139 |
-
var
|
| 16140 |
return _react2['default'].createElement(
|
| 16141 |
'div',
|
| 16142 |
null,
|
| 16143 |
_react2['default'].createElement(_tabsJsx2['default'], { tab: 'systemInfo' }),
|
| 16144 |
_react2['default'].createElement(
|
| 16145 |
'div',
|
| 16146 |
-
{ className: 'mailpoet_notice notice inline
|
| 16147 |
_react2['default'].createElement(
|
| 16148 |
'p',
|
| 16149 |
null,
|
| 16150 |
_mailpoet2['default'].I18n.t('systemInfoIntro')
|
| 16151 |
)
|
| 16152 |
),
|
| 16153 |
-
printData(
|
| 16154 |
);
|
| 16155 |
}
|
| 16156 |
|
| 16157 |
-
module.exports =
|
| 16158 |
|
| 16159 |
/***/ },
|
| 16160 |
|
| 16161 |
/***/ 550:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16162 |
/***/ function(module, exports, __webpack_require__) {
|
| 16163 |
|
| 16164 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -16206,7 +16350,7 @@ webpackJsonp([0],{
|
|
| 16206 |
|
| 16207 |
/***/ },
|
| 16208 |
|
| 16209 |
-
/***/
|
| 16210 |
/***/ function(module, exports, __webpack_require__) {
|
| 16211 |
|
| 16212 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -16214,9 +16358,9 @@ webpackJsonp([0],{
|
|
| 16214 |
__webpack_require__(280),
|
| 16215 |
__webpack_require__(275),
|
| 16216 |
__webpack_require__(276),
|
| 16217 |
-
__webpack_require__(552),
|
| 16218 |
__webpack_require__(553),
|
| 16219 |
__webpack_require__(554),
|
|
|
|
| 16220 |
__webpack_require__(301)
|
| 16221 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 16222 |
Backbone,
|
|
@@ -16308,8 +16452,8 @@ webpackJsonp([0],{
|
|
| 16308 |
|
| 16309 |
// define method change behavior
|
| 16310 |
methodSelectionElement.change(function () {
|
| 16311 |
-
var
|
| 16312 |
-
var
|
| 16313 |
MailPoet.Notice.hide();
|
| 16314 |
// hide all methods
|
| 16315 |
currentStepE.find('.inside')
|
|
@@ -16317,7 +16461,7 @@ webpackJsonp([0],{
|
|
| 16317 |
.hide();
|
| 16318 |
// show selected method
|
| 16319 |
currentStepE.find('.inside')
|
| 16320 |
-
.children('div[id^="method_"]:eq(' +
|
| 16321 |
.show()
|
| 16322 |
.find('table')
|
| 16323 |
.show();
|
|
@@ -16326,6 +16470,196 @@ webpackJsonp([0],{
|
|
| 16326 |
// start step 1
|
| 16327 |
showCurrentStep();
|
| 16328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16329 |
/*
|
| 16330 |
* Paste
|
| 16331 |
*/
|
|
@@ -16470,196 +16804,6 @@ webpackJsonp([0],{
|
|
| 16470 |
}
|
| 16471 |
});
|
| 16472 |
});
|
| 16473 |
-
|
| 16474 |
-
function displayMailChimpLists(data) {
|
| 16475 |
-
var listSelectElement = mailChimpListsContainerElement.find('select');
|
| 16476 |
-
if (listSelectElement.data('select2')) {
|
| 16477 |
-
listSelectElement.select2('data', data);
|
| 16478 |
-
listSelectElement.trigger('change');
|
| 16479 |
-
}
|
| 16480 |
-
else {
|
| 16481 |
-
listSelectElement
|
| 16482 |
-
.select2({
|
| 16483 |
-
data: data,
|
| 16484 |
-
width: '20em',
|
| 16485 |
-
templateResult: function (item) {
|
| 16486 |
-
return item.name;
|
| 16487 |
-
},
|
| 16488 |
-
templateSelection: function (item) {
|
| 16489 |
-
return item.name;
|
| 16490 |
-
}
|
| 16491 |
-
})
|
| 16492 |
-
.change(function () {
|
| 16493 |
-
if (jQuery(this).val() !== null) {
|
| 16494 |
-
toggleNextStepButton(mailChimpProcessButtonElement, 'on');
|
| 16495 |
-
}
|
| 16496 |
-
else {
|
| 16497 |
-
toggleNextStepButton(mailChimpProcessButtonElement, 'off');
|
| 16498 |
-
}
|
| 16499 |
-
})
|
| 16500 |
-
.trigger('change');
|
| 16501 |
-
}
|
| 16502 |
-
mailChimpListsContainerElement.show();
|
| 16503 |
-
}
|
| 16504 |
-
|
| 16505 |
-
function toggleNextStepButton(element, condition) {
|
| 16506 |
-
var disabled = 'button-disabled';
|
| 16507 |
-
if (condition === 'on') {
|
| 16508 |
-
element.closest('table a').removeClass(disabled);
|
| 16509 |
-
return;
|
| 16510 |
-
}
|
| 16511 |
-
element.closest('table a').addClass(disabled);
|
| 16512 |
-
}
|
| 16513 |
-
|
| 16514 |
-
function parseCSV(isFile) {
|
| 16515 |
-
var processedSubscribers = [];
|
| 16516 |
-
var parsedEmails = [];
|
| 16517 |
-
var duplicateEmails = [];
|
| 16518 |
-
var invalidEmails = [];
|
| 16519 |
-
var emailColumnPosition = null;
|
| 16520 |
-
var columnCount = null;
|
| 16521 |
-
var isHeaderFound = false;
|
| 16522 |
-
var advancedOptionHeader = true;
|
| 16523 |
-
var advancedOptionDelimiter = '';
|
| 16524 |
-
var advancedOptionNewline = '';
|
| 16525 |
-
var advancedOptionComments = false;
|
| 16526 |
-
// trim spaces, commas, periods,
|
| 16527 |
-
// single/double quotes and convert to lowercase
|
| 16528 |
-
var detectAndCleanupEmail = function (emailString) {
|
| 16529 |
-
var test;
|
| 16530 |
-
// decode HTML entities
|
| 16531 |
-
var email = jQuery('<div />').html(emailString).text();
|
| 16532 |
-
email = email
|
| 16533 |
-
.toLowerCase()
|
| 16534 |
-
// left/right trim spaces, punctuation (e.g., " 'email@email.com'; ")
|
| 16535 |
-
// right trim non-printable characters (e.g., "email@email.com�")
|
| 16536 |
-
.replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g, '')
|
| 16537 |
-
// remove spaces (e.g., "email @ email . com")
|
| 16538 |
-
// remove urlencoded characters
|
| 16539 |
-
.replace(/\s+|%\d+|,+/g, '');
|
| 16540 |
-
// detect e-mails that will be otherwise rejected by email regex
|
| 16541 |
-
test = /<(.*?)>/.exec(email);
|
| 16542 |
-
if (test) {
|
| 16543 |
-
// is the email inside angle brackets (e.g., 'some@email.com <some@email.com>')?
|
| 16544 |
-
email = test[1].trim();
|
| 16545 |
-
}
|
| 16546 |
-
test = /mailto:(?:\s+)?(.*)/.exec(email);
|
| 16547 |
-
if (test) {
|
| 16548 |
-
// is the email in 'mailto:email' format?
|
| 16549 |
-
email = test[1].trim();
|
| 16550 |
-
}
|
| 16551 |
-
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
|
| 16552 |
-
if (!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.\-@]+$/.test(email)) {
|
| 16553 |
-
return false;
|
| 16554 |
-
}
|
| 16555 |
-
return email;
|
| 16556 |
-
};
|
| 16557 |
-
|
| 16558 |
-
return {
|
| 16559 |
-
skipEmptyLines: true,
|
| 16560 |
-
delimiter: advancedOptionDelimiter,
|
| 16561 |
-
newline: advancedOptionNewline,
|
| 16562 |
-
comments: advancedOptionComments,
|
| 16563 |
-
error: function () {
|
| 16564 |
-
MailPoet.Notice.hide();
|
| 16565 |
-
MailPoet.Notice.error(MailPoet.I18n.t('dataProcessingError'));
|
| 16566 |
-
},
|
| 16567 |
-
complete: function (CSV) {
|
| 16568 |
-
var email;
|
| 16569 |
-
var emailAddress;
|
| 16570 |
-
var column;
|
| 16571 |
-
var rowCount;
|
| 16572 |
-
var rowData;
|
| 16573 |
-
var rowColumnCount;
|
| 16574 |
-
var errorNotice;
|
| 16575 |
-
for (rowCount in CSV.data) {
|
| 16576 |
-
rowData = CSV.data[rowCount].map(function (el) {
|
| 16577 |
-
return el.trim();
|
| 16578 |
-
});
|
| 16579 |
-
rowColumnCount = rowData.length;
|
| 16580 |
-
// set the number of row elements based on the first non-empty row
|
| 16581 |
-
if (columnCount === null) {
|
| 16582 |
-
columnCount = rowColumnCount;
|
| 16583 |
-
}
|
| 16584 |
-
// Process the row with the following assumptions:
|
| 16585 |
-
// 1. Each row should contain the same number of elements
|
| 16586 |
-
// 2. There should be at least 1 valid (as per HTML5 e-mail regex)
|
| 16587 |
-
// e-mail address on each row EXCEPT when the header option is set to true
|
| 16588 |
-
// 3. Duplicate addresses are skipped
|
| 16589 |
-
if (rowColumnCount === columnCount) {
|
| 16590 |
-
// determine position of email address inside an array; this is
|
| 16591 |
-
// done once and then email regex is run just on that element for each row
|
| 16592 |
-
if (emailColumnPosition === null) {
|
| 16593 |
-
for (column in rowData) {
|
| 16594 |
-
emailAddress = detectAndCleanupEmail(rowData[column]);
|
| 16595 |
-
if (emailColumnPosition === null
|
| 16596 |
-
&& window.emailRegex.test(emailAddress)) {
|
| 16597 |
-
emailColumnPosition = column;
|
| 16598 |
-
parsedEmails[emailAddress] = true; // add current e-mail to an object index
|
| 16599 |
-
rowData[column] = emailAddress;
|
| 16600 |
-
processedSubscribers[emailAddress] = rowData;
|
| 16601 |
-
}
|
| 16602 |
-
}
|
| 16603 |
-
if (emailColumnPosition === null
|
| 16604 |
-
&& advancedOptionHeader
|
| 16605 |
-
&& parseInt(rowCount) === 0) {
|
| 16606 |
-
isHeaderFound = true;
|
| 16607 |
-
processedSubscribers[0] = rowData;
|
| 16608 |
-
}
|
| 16609 |
-
}
|
| 16610 |
-
else if (rowData[emailColumnPosition] !== '') {
|
| 16611 |
-
email = detectAndCleanupEmail(rowData[emailColumnPosition]);
|
| 16612 |
-
if (_.has(parsedEmails, email)) {
|
| 16613 |
-
duplicateEmails.push(email);
|
| 16614 |
-
}
|
| 16615 |
-
else if (!window.emailRegex.test(email)) {
|
| 16616 |
-
invalidEmails.push(rowData[emailColumnPosition]);
|
| 16617 |
-
}
|
| 16618 |
-
// if we haven't yet processed this e-mail and it passed
|
| 16619 |
-
// the regex test, then process the row
|
| 16620 |
-
else {
|
| 16621 |
-
parsedEmails[email] = true;
|
| 16622 |
-
rowData[emailColumnPosition] = email;
|
| 16623 |
-
processedSubscribers[email] = rowData;
|
| 16624 |
-
}
|
| 16625 |
-
}
|
| 16626 |
-
}
|
| 16627 |
-
}
|
| 16628 |
-
// reindex array to avoid non-numeric indices
|
| 16629 |
-
processedSubscribers = _.values(processedSubscribers);
|
| 16630 |
-
// if the header options is set, there should be at least
|
| 16631 |
-
// 2 data rows, otherwise at least 1 data row
|
| 16632 |
-
if (processedSubscribers &&
|
| 16633 |
-
(isHeaderFound && processedSubscribers.length >= 2) ||
|
| 16634 |
-
(!isHeaderFound && processedSubscribers.length >= 1)
|
| 16635 |
-
) {
|
| 16636 |
-
// since we assume that the header line is always present, we need
|
| 16637 |
-
// to detect the header by checking if it contains a valid e-mail address
|
| 16638 |
-
window.importData.step1 = {
|
| 16639 |
-
header: (!window.emailRegex.test(
|
| 16640 |
-
processedSubscribers[0][emailColumnPosition])
|
| 16641 |
-
) ? processedSubscribers.shift() : null,
|
| 16642 |
-
subscribers: processedSubscribers,
|
| 16643 |
-
subscribersCount: processedSubscribers.length,
|
| 16644 |
-
duplicate: duplicateEmails,
|
| 16645 |
-
invalid: invalidEmails
|
| 16646 |
-
};
|
| 16647 |
-
MailPoet.trackEvent('Subscribers import started', {
|
| 16648 |
-
source: isFile ? 'file upload' : 'pasted data',
|
| 16649 |
-
'MailPoet Free version': window.mailpoet_version
|
| 16650 |
-
});
|
| 16651 |
-
router.navigate('step2', { trigger: true });
|
| 16652 |
-
}
|
| 16653 |
-
else {
|
| 16654 |
-
MailPoet.Modal.loading(false);
|
| 16655 |
-
errorNotice = MailPoet.I18n.t('noValidRecords');
|
| 16656 |
-
errorNotice = errorNotice.replace('[link]', MailPoet.I18n.t('csvKBLink'));
|
| 16657 |
-
errorNotice = errorNotice.replace('[/link]', '</a>');
|
| 16658 |
-
MailPoet.Notice.error(errorNotice);
|
| 16659 |
-
}
|
| 16660 |
-
}
|
| 16661 |
-
};
|
| 16662 |
-
}
|
| 16663 |
});
|
| 16664 |
|
| 16665 |
router.on('route:step2', function () {
|
|
@@ -16674,7 +16818,7 @@ webpackJsonp([0],{
|
|
| 16674 |
var filler;
|
| 16675 |
var fillerArray;
|
| 16676 |
var fillerPosition;
|
| 16677 |
-
var
|
| 16678 |
var duplicates;
|
| 16679 |
var email;
|
| 16680 |
if (typeof (window.importData.step1) === 'undefined') {
|
|
@@ -16701,6 +16845,15 @@ webpackJsonp([0],{
|
|
| 16701 |
|
| 16702 |
showCurrentStep();
|
| 16703 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16704 |
// hide previous statistics/import results
|
| 16705 |
jQuery('#subscribers_data_parse_results:visible').html('');
|
| 16706 |
jQuery('#subscribers_data_import_results:visible').hide();
|
|
@@ -16710,8 +16863,8 @@ webpackJsonp([0],{
|
|
| 16710 |
// count repeating e-mails inside duplicate array and present them in
|
| 16711 |
// 'email (xN)' format
|
| 16712 |
duplicates = {};
|
| 16713 |
-
subscribers.duplicate.forEach(function (
|
| 16714 |
-
duplicates[
|
| 16715 |
});
|
| 16716 |
subscribers.duplicate = [];
|
| 16717 |
for (email in duplicates) {
|
|
@@ -16723,7 +16876,7 @@ webpackJsonp([0],{
|
|
| 16723 |
}
|
| 16724 |
}
|
| 16725 |
|
| 16726 |
-
|
| 16727 |
notice: MailPoet.I18n.t('importNoticeSkipped').replace(
|
| 16728 |
'%1$s',
|
| 16729 |
'<strong>' + (subscribers.invalid.length + subscribers.duplicate.length) + '</strong>'
|
|
@@ -16740,7 +16893,7 @@ webpackJsonp([0],{
|
|
| 16740 |
: null
|
| 16741 |
};
|
| 16742 |
jQuery('#subscribers_data_parse_results').html(
|
| 16743 |
-
subscribersDataParseResultsTemplate(
|
| 16744 |
);
|
| 16745 |
}
|
| 16746 |
|
|
@@ -16828,22 +16981,22 @@ webpackJsonp([0],{
|
|
| 16828 |
description: segmentDescription
|
| 16829 |
}
|
| 16830 |
}).done(function (response) {
|
| 16831 |
-
var
|
| 16832 |
window.mailpoetSegments.push({
|
| 16833 |
id: response.data.id,
|
| 16834 |
name: response.data.name,
|
| 16835 |
subscriberCount: 0
|
| 16836 |
});
|
| 16837 |
|
| 16838 |
-
|
| 16839 |
-
if (
|
| 16840 |
-
|
| 16841 |
} else {
|
| 16842 |
-
|
| 16843 |
}
|
| 16844 |
|
| 16845 |
enableSegmentSelection(window.mailpoetSegments);
|
| 16846 |
-
segmentSelectElement.val(
|
| 16847 |
jQuery('.mailpoet_segments:hidden').show();
|
| 16848 |
jQuery('.mailpoet_no_segments:visible').hide();
|
| 16849 |
MailPoet.Modal.close();
|
|
@@ -16871,7 +17024,7 @@ webpackJsonp([0],{
|
|
| 16871 |
// autodetect column types
|
| 16872 |
Handlebars.registerHelper(
|
| 16873 |
'show_and_match_columns',
|
| 16874 |
-
function (
|
| 16875 |
var displayedColumns = [];
|
| 16876 |
var displayedColumnsIds = [];
|
| 16877 |
var i;
|
|
@@ -16880,14 +17033,14 @@ webpackJsonp([0],{
|
|
| 16880 |
var headerName;
|
| 16881 |
var headerNameMatch;
|
| 16882 |
// go through all elements of the first row in subscribers data
|
| 16883 |
-
for (i in
|
| 16884 |
-
columnData =
|
| 16885 |
columnId = 'ignore'; // set default column type
|
| 16886 |
// if the column is not undefined and has a valid e-mail, set type as email
|
| 16887 |
if (columnData % 1 !== 0 && window.emailRegex.test(columnData)) {
|
| 16888 |
columnId = 'email';
|
| 16889 |
-
} else if (
|
| 16890 |
-
headerName =
|
| 16891 |
headerNameMatch = window.mailpoetColumns.map(function (el) {
|
| 16892 |
return el.name;
|
| 16893 |
}).indexOf(headerName);
|
|
@@ -16938,9 +17091,8 @@ webpackJsonp([0],{
|
|
| 16938 |
// if we're on the last line, show the total count of subscribers data
|
| 16939 |
else if (index === (subscribers.subscribers.length - 1)) {
|
| 16940 |
return subscribers.subscribersCount.toLocaleString();
|
| 16941 |
-
} else {
|
| 16942 |
-
return index + 1;
|
| 16943 |
}
|
|
|
|
| 16944 |
});
|
| 16945 |
|
| 16946 |
// reduce subscribers object if the total length is greater than the
|
|
@@ -16952,127 +17104,14 @@ webpackJsonp([0],{
|
|
| 16952 |
);
|
| 16953 |
}
|
| 16954 |
|
| 16955 |
-
// render template
|
| 16956 |
-
jQuery('#subscribers_data > table').html(subscribersDataTemplate(subscribers));
|
| 16957 |
-
|
| 16958 |
-
// filter displayed data
|
| 16959 |
-
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 16960 |
-
.select2({
|
| 16961 |
-
data: window.mailpoetColumnsSelect2,
|
| 16962 |
-
width: '15em',
|
| 16963 |
-
templateResult: function (item) {
|
| 16964 |
-
return item.name;
|
| 16965 |
-
},
|
| 16966 |
-
templateSelection: function (item) {
|
| 16967 |
-
return item.name;
|
| 16968 |
-
}
|
| 16969 |
-
})
|
| 16970 |
-
.on('select2:selecting', function (selectEvent) {
|
| 16971 |
-
var selectElement = this;
|
| 16972 |
-
var selectedOptionId = selectEvent.params.args.data.id;
|
| 16973 |
-
// CREATE CUSTOM FIELD
|
| 16974 |
-
if (selectedOptionId === 'create') {
|
| 16975 |
-
selectEvent.preventDefault();
|
| 16976 |
-
jQuery(selectElement).select2('close');
|
| 16977 |
-
MailPoet.Modal.popup({
|
| 16978 |
-
title: MailPoet.I18n.t('addNewField'),
|
| 16979 |
-
template: jQuery('#form_template_field_form').html()
|
| 16980 |
-
});
|
| 16981 |
-
jQuery('#form_field_new').parsley().on('form:submit', function () {
|
| 16982 |
-
// get data
|
| 16983 |
-
var data = jQuery(this.$element).mailpoetSerializeObject();
|
| 16984 |
-
|
| 16985 |
-
// save custom field
|
| 16986 |
-
MailPoet.Ajax.post({
|
| 16987 |
-
api_version: window.mailpoet_api_version,
|
| 16988 |
-
endpoint: 'customFields',
|
| 16989 |
-
action: 'save',
|
| 16990 |
-
data: data
|
| 16991 |
-
}).done(function (response) {
|
| 16992 |
-
var new_column_data = {
|
| 16993 |
-
id: response.data.id,
|
| 16994 |
-
name: response.data.name,
|
| 16995 |
-
type: response.data.type,
|
| 16996 |
-
params: response.data.params,
|
| 16997 |
-
custom: true
|
| 16998 |
-
};
|
| 16999 |
-
// if this is the first custom column, create an "optgroup"
|
| 17000 |
-
if (window.mailpoetColumnsSelect2.length === 2) {
|
| 17001 |
-
window.mailpoetColumnsSelect2.push({
|
| 17002 |
-
name: MailPoet.I18n.t('userColumns'),
|
| 17003 |
-
children: []
|
| 17004 |
-
});
|
| 17005 |
-
}
|
| 17006 |
-
window.mailpoetColumnsSelect2[2].children.push(new_column_data);
|
| 17007 |
-
window.mailpoetColumns.push(new_column_data);
|
| 17008 |
-
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 17009 |
-
.each(function () {
|
| 17010 |
-
jQuery(this)
|
| 17011 |
-
.html('')
|
| 17012 |
-
.select2('destroy')
|
| 17013 |
-
.select2({
|
| 17014 |
-
data: window.mailpoetColumnsSelect2,
|
| 17015 |
-
width: '15em',
|
| 17016 |
-
templateResult: function (item) {
|
| 17017 |
-
return item.name;
|
| 17018 |
-
},
|
| 17019 |
-
templateSelection: function (item) {
|
| 17020 |
-
return item.name;
|
| 17021 |
-
}
|
| 17022 |
-
});
|
| 17023 |
-
});
|
| 17024 |
-
jQuery(selectElement).data('column-id', new_column_data.id);
|
| 17025 |
-
jQuery(selectElement).data('validation-rule', false);
|
| 17026 |
-
filterSubscribers();
|
| 17027 |
-
// close popup
|
| 17028 |
-
MailPoet.Modal.close();
|
| 17029 |
-
}).fail(function (response) {
|
| 17030 |
-
if (response.errors.length > 0) {
|
| 17031 |
-
MailPoet.Notice.error(
|
| 17032 |
-
response.errors.map(function (error) { return error.message; }),
|
| 17033 |
-
{ positionAfter: '#field_name' }
|
| 17034 |
-
);
|
| 17035 |
-
}
|
| 17036 |
-
});
|
| 17037 |
-
return false;
|
| 17038 |
-
});
|
| 17039 |
-
}
|
| 17040 |
-
// CHANGE COLUMN
|
| 17041 |
-
else {
|
| 17042 |
-
// check for duplicate values in all select options
|
| 17043 |
-
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 17044 |
-
.each(function () {
|
| 17045 |
-
var element = this;
|
| 17046 |
-
var elementId = jQuery(element).val();
|
| 17047 |
-
// if another column has the same value and it's not an 'ignore', prompt user
|
| 17048 |
-
if (elementId === selectedOptionId
|
| 17049 |
-
&& elementId !== 'ignore') {
|
| 17050 |
-
if (confirm(MailPoet.I18n.t('selectedValueAlreadyMatched') + ' ' + MailPoet.I18n.t('confirmCorrespondingColumn'))) {
|
| 17051 |
-
jQuery(element).data('column-id', 'ignore');
|
| 17052 |
-
}
|
| 17053 |
-
else {
|
| 17054 |
-
selectEvent.preventDefault();
|
| 17055 |
-
jQuery(selectElement).select2('close');
|
| 17056 |
-
}
|
| 17057 |
-
}
|
| 17058 |
-
});
|
| 17059 |
-
}
|
| 17060 |
-
})
|
| 17061 |
-
.on('select2:select', function (selectEvent) {
|
| 17062 |
-
var selectElement = this;
|
| 17063 |
-
var selectedOptionId = selectEvent.params.data.id;
|
| 17064 |
-
jQuery(selectElement).data('column-id', selectedOptionId);
|
| 17065 |
-
filterSubscribers();
|
| 17066 |
-
});
|
| 17067 |
-
|
| 17068 |
// filter subscribers' data to detect dates, emails, etc.
|
| 17069 |
function filterSubscribers() {
|
| 17070 |
var subscribersClone = jQuery.extend(true, {}, subscribers);
|
| 17071 |
var preventNextStep = false;
|
| 17072 |
var displayedColumns;
|
| 17073 |
jQuery(
|
| 17074 |
-
|
| 17075 |
-
|
| 17076 |
displayedColumns = jQuery.map(
|
| 17077 |
jQuery('.mailpoet_subscribers_column_data_match'), function (element, elementIndex) {
|
| 17078 |
var columnId = jQuery(element).data('column-id');
|
|
@@ -17186,25 +17225,129 @@ webpackJsonp([0],{
|
|
| 17186 |
});
|
| 17187 |
// refresh table with susbcribers' data
|
| 17188 |
jQuery('#subscribers_data > table > tbody')
|
| 17189 |
-
|
| 17190 |
|
| 17191 |
if (preventNextStep) {
|
| 17192 |
toggleNextStepButton('off');
|
| 17193 |
}
|
| 17194 |
else if (!jQuery('.mailpoet_notice.error:visible').length
|
| 17195 |
-
|
| 17196 |
toggleNextStepButton('on');
|
| 17197 |
}
|
| 17198 |
}
|
| 17199 |
|
| 17200 |
-
|
| 17201 |
-
|
| 17202 |
-
|
| 17203 |
-
|
| 17204 |
-
|
| 17205 |
-
|
| 17206 |
-
|
| 17207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17208 |
|
| 17209 |
previousStepButton.off().on('click', function () {
|
| 17210 |
router.navigate('step1', { trigger: true });
|
|
@@ -17216,22 +17359,21 @@ webpackJsonp([0],{
|
|
| 17216 |
var batchNumber = 0;
|
| 17217 |
var batchSize = 2000;
|
| 17218 |
var timestamp = Date.now() / 1000;
|
| 17219 |
-
var
|
| 17220 |
-
var importResults = {
|
| 17221 |
created: 0,
|
| 17222 |
updated: 0,
|
| 17223 |
errors: [],
|
| 17224 |
segments: []
|
| 17225 |
};
|
| 17226 |
-
var
|
| 17227 |
var splitSubscribers;
|
| 17228 |
|
| 17229 |
if (jQuery(this).hasClass('button-disabled')) {
|
| 17230 |
return;
|
| 17231 |
}
|
| 17232 |
MailPoet.Modal.loading(true);
|
| 17233 |
-
splitSubscribers = function (
|
| 17234 |
-
return
|
| 17235 |
if (index % size === 0) {
|
| 17236 |
res.push([]);
|
| 17237 |
}
|
|
@@ -17239,7 +17381,7 @@ webpackJsonp([0],{
|
|
| 17239 |
return res;
|
| 17240 |
}, []);
|
| 17241 |
};
|
| 17242 |
-
|
| 17243 |
|
| 17244 |
_.each(jQuery('select.mailpoet_subscribers_column_data_match'),
|
| 17245 |
function (column, columnIndex) {
|
|
@@ -17251,26 +17393,26 @@ webpackJsonp([0],{
|
|
| 17251 |
columns[columnId] = { index: columnIndex, validation_rule: validationRule };
|
| 17252 |
});
|
| 17253 |
|
| 17254 |
-
_.each(
|
| 17255 |
-
queue.add(function (
|
| 17256 |
-
|
| 17257 |
MailPoet.Ajax.post({
|
| 17258 |
api_version: window.mailpoet_api_version,
|
| 17259 |
endpoint: 'ImportExport',
|
| 17260 |
action: 'processImport',
|
| 17261 |
data: JSON.stringify({
|
| 17262 |
columns: columns,
|
| 17263 |
-
subscribers:
|
| 17264 |
timestamp: timestamp,
|
| 17265 |
segments: segmentSelectElement.val(),
|
| 17266 |
updateSubscribers: (jQuery(':radio[name="subscriber_update_option"]:checked').val() === 'yes')
|
| 17267 |
})
|
| 17268 |
}).done(function (response) {
|
| 17269 |
-
|
| 17270 |
-
|
| 17271 |
-
|
| 17272 |
-
|
| 17273 |
-
|
| 17274 |
}).fail(function (response) {
|
| 17275 |
MailPoet.Modal.loading(false);
|
| 17276 |
if (response.errors.length > 0) {
|
|
@@ -17288,17 +17430,17 @@ webpackJsonp([0],{
|
|
| 17288 |
|
| 17289 |
queue.onComplete(function () {
|
| 17290 |
MailPoet.Modal.loading(false);
|
| 17291 |
-
if (
|
| 17292 |
-
MailPoet.Notice.error(_.flatten(
|
| 17293 |
);
|
| 17294 |
}
|
| 17295 |
else {
|
| 17296 |
-
window.mailpoetSegments =
|
| 17297 |
-
|
| 17298 |
function (data) {
|
| 17299 |
return data.name;
|
| 17300 |
});
|
| 17301 |
-
window.importData.step2 =
|
| 17302 |
enableSegmentSelection(window.mailpoetSegments);
|
| 17303 |
router.navigate('step3', { trigger: true });
|
| 17304 |
}
|
|
@@ -17381,7 +17523,7 @@ webpackJsonp([0],{
|
|
| 17381 |
|
| 17382 |
/***/ },
|
| 17383 |
|
| 17384 |
-
/***/
|
| 17385 |
/***/ function(module, exports) {
|
| 17386 |
|
| 17387 |
/*!
|
|
@@ -17393,7 +17535,7 @@ webpackJsonp([0],{
|
|
| 17393 |
|
| 17394 |
/***/ },
|
| 17395 |
|
| 17396 |
-
/***/
|
| 17397 |
/***/ function(module, exports) {
|
| 17398 |
|
| 17399 |
/*
|
|
@@ -17479,14 +17621,14 @@ webpackJsonp([0],{
|
|
| 17479 |
|
| 17480 |
/***/ },
|
| 17481 |
|
| 17482 |
-
/***/
|
| 17483 |
/***/ function(module, exports, __webpack_require__) {
|
| 17484 |
|
| 17485 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 17486 |
__webpack_require__(280),
|
| 17487 |
__webpack_require__(275),
|
| 17488 |
__webpack_require__(276),
|
| 17489 |
-
__webpack_require__(
|
| 17490 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 17491 |
_,
|
| 17492 |
jQuery,
|
|
@@ -17503,15 +17645,25 @@ webpackJsonp([0],{
|
|
| 17503 |
var groupBySegmentOptionElement;
|
| 17504 |
var nextStepButton;
|
| 17505 |
var renderSegmentsAndFields;
|
| 17506 |
-
var
|
| 17507 |
if (!window.exportData.segments) {
|
| 17508 |
return;
|
| 17509 |
}
|
| 17510 |
-
|
| 17511 |
Handlebars.compile(jQuery('#mailpoet_subscribers_export_template').html());
|
| 17512 |
|
| 17513 |
// render template
|
| 17514 |
-
jQuery('#mailpoet_subscribers_export > div.inside').html(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17515 |
|
| 17516 |
// define reusable variables
|
| 17517 |
segmentsContainerElement = jQuery('#export_lists');
|
|
@@ -17610,16 +17762,6 @@ webpackJsonp([0],{
|
|
| 17610 |
segmentsContainerElement.val(selectedSegments).trigger('change');
|
| 17611 |
});
|
| 17612 |
|
| 17613 |
-
function toggleNextStepButton(condition) {
|
| 17614 |
-
var disabled = 'button-disabled';
|
| 17615 |
-
if (condition === 'on') {
|
| 17616 |
-
nextStepButton.removeClass(disabled);
|
| 17617 |
-
}
|
| 17618 |
-
else {
|
| 17619 |
-
nextStepButton.addClass(disabled);
|
| 17620 |
-
}
|
| 17621 |
-
}
|
| 17622 |
-
|
| 17623 |
nextStepButton.click(function () {
|
| 17624 |
var exportFormat;
|
| 17625 |
if (jQuery(this).hasClass('button-disabled')) {
|
| 1 |
webpackJsonp([0],{
|
| 2 |
|
| 3 |
+
/***/ 495:
|
| 4 |
+
/***/ function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
//Types of elements found in the DOM
|
| 7 |
+
module.exports = {
|
| 8 |
+
Text: "text", //Text
|
| 9 |
+
Directive: "directive", //<? ... ?>
|
| 10 |
+
Comment: "comment", //<!-- ... -->
|
| 11 |
+
Script: "script", //<script> tags
|
| 12 |
+
Style: "style", //<style> tags
|
| 13 |
+
Tag: "tag", //Any tag
|
| 14 |
+
CDATA: "cdata", //<![CDATA[ ... ]]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
isTag: function(elem){
|
| 17 |
+
return elem.type === "tag" || elem.type === "script" || elem.type === "style";
|
| 18 |
+
}
|
| 19 |
};
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
/***/ },
|
| 22 |
|
| 23 |
/***/ 0:
|
| 29 |
__webpack_require__(541);
|
| 30 |
__webpack_require__(543);
|
| 31 |
__webpack_require__(546);
|
|
|
|
| 32 |
__webpack_require__(551);
|
| 33 |
+
__webpack_require__(552);
|
| 34 |
+
module.exports = __webpack_require__(556);
|
| 35 |
|
| 36 |
|
| 37 |
/***/ },
|
| 92 |
|
| 93 |
var messages = {
|
| 94 |
onTrash: function onTrash(response) {
|
| 95 |
+
var count = Number(response.meta.count);
|
| 96 |
var message = null;
|
| 97 |
|
| 98 |
if (count === 1) {
|
| 103 |
_mailpoet2['default'].Notice.success(message);
|
| 104 |
},
|
| 105 |
onDelete: function onDelete(response) {
|
| 106 |
+
var count = Number(response.meta.count);
|
| 107 |
var message = null;
|
| 108 |
|
| 109 |
if (count === 1) {
|
| 114 |
_mailpoet2['default'].Notice.success(message);
|
| 115 |
},
|
| 116 |
onRestore: function onRestore(response) {
|
| 117 |
+
var count = Number(response.meta.count);
|
| 118 |
var message = null;
|
| 119 |
|
| 120 |
if (count === 1) {
|
| 150 |
}
|
| 151 |
};
|
| 152 |
|
| 153 |
+
var bulkActions = [{
|
| 154 |
name: 'moveToList',
|
| 155 |
label: _mailpoet2['default'].I18n.t('moveToList'),
|
| 156 |
onSelect: function onSelect() {
|
| 167 |
},
|
| 168 |
getData: function getData() {
|
| 169 |
return {
|
| 170 |
+
segment_id: Number((0, _jquery2['default'])('#move_to_segment').val())
|
| 171 |
};
|
| 172 |
},
|
| 173 |
onSuccess: function onSuccess(response) {
|
| 174 |
+
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersMovedToList').replace('%$1d', Number(response.meta.count).toLocaleString()).replace('%$2s', response.meta.segment));
|
| 175 |
}
|
| 176 |
}, {
|
| 177 |
name: 'addToList',
|
| 190 |
},
|
| 191 |
getData: function getData() {
|
| 192 |
return {
|
| 193 |
+
segment_id: Number((0, _jquery2['default'])('#add_to_segment').val())
|
| 194 |
};
|
| 195 |
},
|
| 196 |
onSuccess: function onSuccess(response) {
|
| 197 |
+
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersAddedToList').replace('%$1d', Number(response.meta.count).toLocaleString()).replace('%$2s', response.meta.segment));
|
| 198 |
}
|
| 199 |
}, {
|
| 200 |
name: 'removeFromList',
|
| 213 |
},
|
| 214 |
getData: function getData() {
|
| 215 |
return {
|
| 216 |
+
segment_id: Number((0, _jquery2['default'])('#remove_from_segment').val())
|
| 217 |
};
|
| 218 |
},
|
| 219 |
onSuccess: function onSuccess(response) {
|
| 220 |
+
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersRemovedFromList').replace('%$1d', Number(response.meta.count).toLocaleString()).replace('%$2s', response.meta.segment));
|
| 221 |
}
|
| 222 |
}, {
|
| 223 |
name: 'removeFromAllLists',
|
| 224 |
label: _mailpoet2['default'].I18n.t('removeFromAllLists'),
|
| 225 |
onSuccess: function onSuccess(response) {
|
| 226 |
+
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleSubscribersRemovedFromAllLists').replace('%$1d', Number(response.meta.count).toLocaleString()));
|
| 227 |
}
|
| 228 |
}, {
|
| 229 |
name: 'sendConfirmationEmail',
|
| 230 |
label: _mailpoet2['default'].I18n.t('resendConfirmationEmail'),
|
| 231 |
onSuccess: function onSuccess(response) {
|
| 232 |
+
_mailpoet2['default'].Notice.success(_mailpoet2['default'].I18n.t('multipleConfirmationEmailsSent').replace('%$1d', Number(response.meta.count).toLocaleString()));
|
| 233 |
}
|
| 234 |
}, {
|
| 235 |
name: 'trash',
|
| 237 |
onSuccess: messages.onTrash
|
| 238 |
}];
|
| 239 |
|
| 240 |
+
var itemActions = [{
|
| 241 |
name: 'edit',
|
| 242 |
label: _mailpoet2['default'].I18n.t('edit'),
|
| 243 |
link: function link(subscriber) {
|
| 250 |
}, {
|
| 251 |
name: 'trash',
|
| 252 |
display: function display(subscriber) {
|
| 253 |
+
return Number(subscriber.wp_user_id) === 0;
|
| 254 |
}
|
| 255 |
}];
|
| 256 |
|
| 257 |
var SubscriberList = _react2['default'].createClass({
|
| 258 |
displayName: 'SubscriberList',
|
| 259 |
|
| 260 |
+
getSegmentFromId: function getSegmentFromId(segmentId) {
|
| 261 |
var result = false;
|
| 262 |
+
window.mailpoet_segments.forEach(function (segment) {
|
| 263 |
+
if (segment.id === segmentId) {
|
| 264 |
result = segment;
|
| 265 |
}
|
| 266 |
});
|
| 269 |
renderItem: function renderItem(subscriber, actions) {
|
| 270 |
var _this = this;
|
| 271 |
|
| 272 |
+
var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions', 'column-username');
|
| 273 |
|
| 274 |
var status = '';
|
| 275 |
|
| 289 |
case 'bounced':
|
| 290 |
status = _mailpoet2['default'].I18n.t('bounced');
|
| 291 |
break;
|
| 292 |
+
|
| 293 |
+
default:
|
| 294 |
+
status = 'Invalid';
|
| 295 |
+
break;
|
| 296 |
}
|
| 297 |
|
| 298 |
var segments = false;
|
| 300 |
// Subscriptions
|
| 301 |
if (subscriber.subscriptions.length > 0) {
|
| 302 |
(function () {
|
| 303 |
+
var subscribedSegments = [];
|
| 304 |
|
| 305 |
+
subscriber.subscriptions.forEach(function (subscription) {
|
| 306 |
var segment = _this.getSegmentFromId(subscription.segment_id);
|
| 307 |
if (segment === false) return;
|
| 308 |
if (subscription.status === 'subscribed') {
|
| 309 |
+
subscribedSegments.push(segment.name);
|
| 310 |
}
|
| 311 |
});
|
| 312 |
|
| 313 |
segments = _react2['default'].createElement(
|
| 314 |
'span',
|
| 315 |
null,
|
| 316 |
+
subscribedSegments.join(', ')
|
| 317 |
);
|
| 318 |
})();
|
| 319 |
}
|
| 323 |
null,
|
| 324 |
_react2['default'].createElement(
|
| 325 |
'td',
|
| 326 |
+
{ className: rowClasses },
|
| 327 |
_react2['default'].createElement(
|
| 328 |
'strong',
|
| 329 |
null,
|
| 417 |
endpoint: 'subscribers',
|
| 418 |
onRenderItem: this.renderItem,
|
| 419 |
columns: columns,
|
| 420 |
+
bulk_actions: bulkActions,
|
| 421 |
+
item_actions: itemActions,
|
| 422 |
messages: messages,
|
| 423 |
sort_by: 'created_at',
|
| 424 |
sort_order: 'desc'
|
| 453 |
label: MailPoet.I18n.t('email'),
|
| 454 |
type: 'text',
|
| 455 |
disabled: function disabled(subscriber) {
|
| 456 |
+
return Number(subscriber.wp_user_id > 0);
|
| 457 |
}
|
| 458 |
}, {
|
| 459 |
name: 'first_name',
|
| 460 |
label: MailPoet.I18n.t('firstname'),
|
| 461 |
type: 'text',
|
| 462 |
disabled: function disabled(subscriber) {
|
| 463 |
+
return Number(subscriber.wp_user_id > 0);
|
| 464 |
}
|
| 465 |
}, {
|
| 466 |
name: 'last_name',
|
| 467 |
label: MailPoet.I18n.t('lastname'),
|
| 468 |
type: 'text',
|
| 469 |
disabled: function disabled(subscriber) {
|
| 470 |
+
return Number(subscriber.wp_user_id > 0);
|
| 471 |
}
|
| 472 |
}, {
|
| 473 |
name: 'status',
|
| 480 |
bounced: MailPoet.I18n.t('bounced')
|
| 481 |
},
|
| 482 |
filter: function filter(subscriber, value) {
|
| 483 |
+
if (Number(subscriber.wp_user_id) > 0 && value === 'unconfirmed') {
|
| 484 |
return false;
|
| 485 |
}
|
| 486 |
return true;
|
| 498 |
return null;
|
| 499 |
}
|
| 500 |
|
| 501 |
+
return subscriber.subscriptions.filter(function (subscription) {
|
| 502 |
+
return subscription.status === 'subscribed';
|
| 503 |
+
}).map(function (subscription) {
|
| 504 |
+
return subscription.segment_id;
|
| 505 |
});
|
| 506 |
},
|
| 507 |
filter: function filter(segment) {
|
| 508 |
+
return !segment.deleted_at && segment.type === 'default';
|
| 509 |
},
|
| 510 |
getLabel: function getLabel(segment) {
|
| 511 |
return segment.name + ' (' + segment.subscribers + ')';
|
| 514 |
var label = '';
|
| 515 |
|
| 516 |
if (subscriber.subscriptions !== undefined) {
|
| 517 |
+
subscriber.subscriptions.forEach(function (subscription) {
|
| 518 |
if (segment.id === subscription.segment_id) {
|
| 519 |
label = segment.name;
|
| 520 |
|
| 521 |
if (subscription.status === 'unsubscribed') {
|
| 522 |
+
var unsubscribedAt = MailPoet.Date.format(subscription.updated_at);
|
| 523 |
+
label += ' (%$1s)'.replace('%$1s', MailPoet.I18n.t('unsubscribedOn').replace('%$1s', unsubscribedAt));
|
| 524 |
}
|
| 525 |
}
|
| 526 |
});
|
| 529 |
}
|
| 530 |
}];
|
| 531 |
|
| 532 |
+
var customFields = window.mailpoet_custom_fields || [];
|
| 533 |
+
customFields.forEach(function (customField) {
|
| 534 |
var field = {
|
| 535 |
+
name: 'cf_' + customField.id,
|
| 536 |
+
label: customField.name,
|
| 537 |
+
type: customField.type
|
| 538 |
};
|
| 539 |
+
if (customField.params) {
|
| 540 |
+
field.params = customField.params;
|
| 541 |
}
|
| 542 |
|
| 543 |
+
if (customField.params.values) {
|
| 544 |
+
field.values = customField.params.values;
|
| 545 |
}
|
| 546 |
|
| 547 |
// add placeholders for selects (date, select)
|
| 548 |
+
switch (customField.type) {
|
| 549 |
case 'date':
|
| 550 |
field.year_placeholder = MailPoet.I18n.t('year');
|
| 551 |
field.month_placeholder = MailPoet.I18n.t('month');
|
| 555 |
case 'select':
|
| 556 |
field.placeholder = '-';
|
| 557 |
break;
|
| 558 |
+
|
| 559 |
+
default:
|
| 560 |
+
field.placeholder = '';
|
| 561 |
+
break;
|
| 562 |
}
|
| 563 |
|
| 564 |
fields.push(field);
|
| 577 |
};
|
| 578 |
|
| 579 |
var beforeFormContent = function beforeFormContent(subscriber) {
|
| 580 |
+
if (Number(subscriber.wp_user_id) > 0) {
|
| 581 |
return React.createElement(
|
| 582 |
'p',
|
| 583 |
{ className: 'description' },
|
| 593 |
})
|
| 594 |
);
|
| 595 |
}
|
| 596 |
+
return undefined;
|
| 597 |
};
|
| 598 |
|
| 599 |
var afterFormContent = function afterFormContent() {
|
| 718 |
var container = document.getElementById('newsletters_container');
|
| 719 |
|
| 720 |
if (container) {
|
| 721 |
+
var extraRoutes = [];
|
| 722 |
+
extraRoutes = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_before_router', extraRoutes);
|
| 723 |
|
| 724 |
+
var mailpoetListing = _reactDom2['default'].render(_react2['default'].createElement(
|
| 725 |
_reactRouter.Router,
|
| 726 |
{ history: history },
|
| 727 |
_react2['default'].createElement(
|
| 738 |
_react2['default'].createElement(_reactRouter.Route, { path: 'new/notification', component: _newslettersTypesNotificationNotificationJsx2['default'] }),
|
| 739 |
_react2['default'].createElement(_reactRouter.Route, { name: 'template', path: 'template/:id', component: _newslettersTemplatesJsx2['default'] }),
|
| 740 |
_react2['default'].createElement(_reactRouter.Route, { path: 'send/:id', component: _newslettersSendJsx2['default'] }),
|
| 741 |
+
extraRoutes.map(function (rt) {
|
| 742 |
return _react2['default'].createElement(_reactRouter.Route, { key: rt.path, path: rt.path, component: rt.component });
|
| 743 |
})
|
| 744 |
)
|
| 745 |
), container);
|
| 746 |
|
| 747 |
+
window.mailpoet_listing = mailpoetListing;
|
| 748 |
}
|
| 749 |
/* Listings */ /* Newsletter: type selection */ /* New newsletter: types */ /* Template selection */ /* Sending options */ /* Extra routes */
|
| 750 |
|
| 980 |
};
|
| 981 |
|
| 982 |
reader.readAsText(file);
|
| 983 |
+
return true;
|
| 984 |
},
|
| 985 |
render: function render() {
|
| 986 |
return _react2['default'].createElement(
|
| 8610 |
|
| 8611 |
/***/ },
|
| 8612 |
|
| 8613 |
+
/***/ 494:
|
| 8614 |
/***/ function(module, exports, __webpack_require__) {
|
| 8615 |
|
| 8616 |
+
/*
|
| 8617 |
+
Module dependencies
|
| 8618 |
+
*/
|
| 8619 |
+
var ElementType = __webpack_require__(495);
|
| 8620 |
+
var entities = __webpack_require__(496);
|
| 8621 |
|
| 8622 |
+
/*
|
| 8623 |
+
Boolean Attributes
|
| 8624 |
+
*/
|
| 8625 |
+
var booleanAttributes = {
|
| 8626 |
+
__proto__: null,
|
| 8627 |
+
allowfullscreen: true,
|
| 8628 |
+
async: true,
|
| 8629 |
+
autofocus: true,
|
| 8630 |
+
autoplay: true,
|
| 8631 |
+
checked: true,
|
| 8632 |
+
controls: true,
|
| 8633 |
+
default: true,
|
| 8634 |
+
defer: true,
|
| 8635 |
+
disabled: true,
|
| 8636 |
+
hidden: true,
|
| 8637 |
+
ismap: true,
|
| 8638 |
+
loop: true,
|
| 8639 |
+
multiple: true,
|
| 8640 |
+
muted: true,
|
| 8641 |
+
open: true,
|
| 8642 |
+
readonly: true,
|
| 8643 |
+
required: true,
|
| 8644 |
+
reversed: true,
|
| 8645 |
+
scoped: true,
|
| 8646 |
+
seamless: true,
|
| 8647 |
+
selected: true,
|
| 8648 |
+
typemustmatch: true
|
| 8649 |
+
};
|
| 8650 |
|
| 8651 |
+
var unencodedElements = {
|
| 8652 |
+
__proto__: null,
|
| 8653 |
+
style: true,
|
| 8654 |
+
script: true,
|
| 8655 |
+
xmp: true,
|
| 8656 |
+
iframe: true,
|
| 8657 |
+
noembed: true,
|
| 8658 |
+
noframes: true,
|
| 8659 |
+
plaintext: true,
|
| 8660 |
+
noscript: true
|
| 8661 |
+
};
|
| 8662 |
|
| 8663 |
+
/*
|
| 8664 |
+
Format attributes
|
| 8665 |
+
*/
|
| 8666 |
+
function formatAttrs(attributes, opts) {
|
| 8667 |
+
if (!attributes) return;
|
| 8668 |
+
|
| 8669 |
+
var output = '',
|
| 8670 |
+
value;
|
| 8671 |
+
|
| 8672 |
+
// Loop through the attributes
|
| 8673 |
+
for (var key in attributes) {
|
| 8674 |
+
value = attributes[key];
|
| 8675 |
+
if (output) {
|
| 8676 |
+
output += ' ';
|
| 8677 |
+
}
|
| 8678 |
+
|
| 8679 |
+
if (!value && booleanAttributes[key]) {
|
| 8680 |
+
output += key;
|
| 8681 |
+
} else {
|
| 8682 |
+
output += key + '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
|
| 8683 |
+
}
|
| 8684 |
+
}
|
| 8685 |
+
|
| 8686 |
+
return output;
|
| 8687 |
+
}
|
| 8688 |
+
|
| 8689 |
+
/*
|
| 8690 |
+
Self-enclosing tags (stolen from node-htmlparser)
|
| 8691 |
+
*/
|
| 8692 |
+
var singleTag = {
|
| 8693 |
+
__proto__: null,
|
| 8694 |
+
area: true,
|
| 8695 |
+
base: true,
|
| 8696 |
+
basefont: true,
|
| 8697 |
+
br: true,
|
| 8698 |
+
col: true,
|
| 8699 |
+
command: true,
|
| 8700 |
+
embed: true,
|
| 8701 |
+
frame: true,
|
| 8702 |
+
hr: true,
|
| 8703 |
+
img: true,
|
| 8704 |
+
input: true,
|
| 8705 |
+
isindex: true,
|
| 8706 |
+
keygen: true,
|
| 8707 |
+
link: true,
|
| 8708 |
+
meta: true,
|
| 8709 |
+
param: true,
|
| 8710 |
+
source: true,
|
| 8711 |
+
track: true,
|
| 8712 |
+
wbr: true,
|
| 8713 |
+
};
|
| 8714 |
+
|
| 8715 |
+
|
| 8716 |
+
var render = module.exports = function(dom, opts) {
|
| 8717 |
+
if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
|
| 8718 |
+
opts = opts || {};
|
| 8719 |
+
|
| 8720 |
+
var output = '';
|
| 8721 |
+
|
| 8722 |
+
for(var i = 0; i < dom.length; i++){
|
| 8723 |
+
var elem = dom[i];
|
| 8724 |
+
|
| 8725 |
+
if (elem.type === 'root')
|
| 8726 |
+
output += render(elem.children, opts);
|
| 8727 |
+
else if (ElementType.isTag(elem))
|
| 8728 |
+
output += renderTag(elem, opts);
|
| 8729 |
+
else if (elem.type === ElementType.Directive)
|
| 8730 |
+
output += renderDirective(elem);
|
| 8731 |
+
else if (elem.type === ElementType.Comment)
|
| 8732 |
+
output += renderComment(elem);
|
| 8733 |
+
else if (elem.type === ElementType.CDATA)
|
| 8734 |
+
output += renderCdata(elem);
|
| 8735 |
+
else
|
| 8736 |
+
output += renderText(elem, opts);
|
| 8737 |
+
}
|
| 8738 |
+
|
| 8739 |
+
return output;
|
| 8740 |
+
};
|
| 8741 |
+
|
| 8742 |
+
function renderTag(elem, opts) {
|
| 8743 |
+
// Handle SVG
|
| 8744 |
+
if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
|
| 8745 |
+
|
| 8746 |
+
var tag = '<' + elem.name,
|
| 8747 |
+
attribs = formatAttrs(elem.attribs, opts);
|
| 8748 |
+
|
| 8749 |
+
if (attribs) {
|
| 8750 |
+
tag += ' ' + attribs;
|
| 8751 |
+
}
|
| 8752 |
+
|
| 8753 |
+
if (
|
| 8754 |
+
opts.xmlMode
|
| 8755 |
+
&& (!elem.children || elem.children.length === 0)
|
| 8756 |
+
) {
|
| 8757 |
+
tag += '/>';
|
| 8758 |
+
} else {
|
| 8759 |
+
tag += '>';
|
| 8760 |
+
if (elem.children) {
|
| 8761 |
+
tag += render(elem.children, opts);
|
| 8762 |
+
}
|
| 8763 |
+
|
| 8764 |
+
if (!singleTag[elem.name] || opts.xmlMode) {
|
| 8765 |
+
tag += '</' + elem.name + '>';
|
| 8766 |
+
}
|
| 8767 |
+
}
|
| 8768 |
+
|
| 8769 |
+
return tag;
|
| 8770 |
+
}
|
| 8771 |
+
|
| 8772 |
+
function renderDirective(elem) {
|
| 8773 |
+
return '<' + elem.data + '>';
|
| 8774 |
+
}
|
| 8775 |
+
|
| 8776 |
+
function renderText(elem, opts) {
|
| 8777 |
+
var data = elem.data || '';
|
| 8778 |
+
|
| 8779 |
+
// if entities weren't decoded, no need to encode them back
|
| 8780 |
+
if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
|
| 8781 |
+
data = entities.encodeXML(data);
|
| 8782 |
+
}
|
| 8783 |
+
|
| 8784 |
+
return data;
|
| 8785 |
+
}
|
| 8786 |
+
|
| 8787 |
+
function renderCdata(elem) {
|
| 8788 |
+
return '<![CDATA[' + elem.children[0].data + ']]>';
|
| 8789 |
+
}
|
| 8790 |
+
|
| 8791 |
+
function renderComment(elem) {
|
| 8792 |
+
return '<!--' + elem.data + '-->';
|
| 8793 |
+
}
|
| 8794 |
+
|
| 8795 |
+
|
| 8796 |
+
/***/ },
|
| 8797 |
+
|
| 8798 |
+
/***/ 1:
|
| 8799 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 8800 |
+
|
| 8801 |
+
'use strict';
|
| 8802 |
+
|
| 8803 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 8804 |
+
|
| 8805 |
+
var _react = __webpack_require__(2);
|
| 8806 |
+
|
| 8807 |
+
var _react2 = _interopRequireDefault(_react);
|
| 8808 |
|
| 8809 |
var _reactDom = __webpack_require__(34);
|
| 8810 |
|
| 8851 |
|
| 8852 |
/***/ },
|
| 8853 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8854 |
/***/ 496:
|
| 8855 |
/***/ function(module, exports, __webpack_require__) {
|
| 8856 |
|
| 10476 |
return true;
|
| 10477 |
},
|
| 10478 |
render: function render() {
|
| 10479 |
+
var isPaused = this.state.item.status === 'sending' && this.state.item.queue && this.state.item.queue.status === 'paused';
|
| 10480 |
var fields = this.state.fields.map(function (field) {
|
| 10481 |
var newField = field;
|
| 10482 |
+
if (field.name === 'segments' || field.name === 'options') {
|
| 10483 |
newField.disabled = isPaused;
|
| 10484 |
}
|
| 10485 |
return newField;
|
| 10584 |
getLabel: function getLabel(segment) {
|
| 10585 |
return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
|
| 10586 |
},
|
| 10587 |
+
transformChangedValue: function transformChangedValue(segmentIds) {
|
| 10588 |
+
var allSegments = this.state.items;
|
| 10589 |
+
return _.map(segmentIds, function (id) {
|
| 10590 |
+
return _.find(allSegments, function (segment) {
|
| 10591 |
return segment.id === id;
|
| 10592 |
});
|
| 10593 |
});
|
| 10956 |
},
|
| 10957 |
propagateChange: function propagateChange() {
|
| 10958 |
if (this.props.onChange) {
|
| 10959 |
+
this.props.onChange({
|
| 10960 |
target: {
|
| 10961 |
name: this.props.name || '',
|
| 10962 |
value: this.getDateTime()
|
| 11093 |
getLabel: function getLabel(segment) {
|
| 11094 |
return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
|
| 11095 |
},
|
| 11096 |
+
transformChangedValue: function transformChangedValue(segmentIds) {
|
| 11097 |
+
var allSegments = this.state.items;
|
| 11098 |
+
return _.map(segmentIds, function (id) {
|
| 11099 |
+
return _.find(allSegments, function (segment) {
|
| 11100 |
return segment.id === id;
|
| 11101 |
});
|
| 11102 |
});
|
| 11430 |
|
| 11431 |
var _newslettersListingsMixinsJsx = __webpack_require__(530);
|
| 11432 |
|
| 11433 |
+
var mailpoetTrackingEnabled = !!window.mailpoetTrackingEnabled;
|
| 11434 |
|
| 11435 |
var messages = {
|
| 11436 |
onTrash: function onTrash(response) {
|
| 11437 |
+
var count = Number(response.meta.count);
|
| 11438 |
var message = null;
|
| 11439 |
|
| 11440 |
if (count === 1) {
|
| 11445 |
_mailpoet2['default'].Notice.success(message);
|
| 11446 |
},
|
| 11447 |
onDelete: function onDelete(response) {
|
| 11448 |
+
var count = Number(response.meta.count);
|
| 11449 |
var message = null;
|
| 11450 |
|
| 11451 |
if (count === 1) {
|
| 11456 |
_mailpoet2['default'].Notice.success(message);
|
| 11457 |
},
|
| 11458 |
onRestore: function onRestore(response) {
|
| 11459 |
+
var count = Number(response.meta.count);
|
| 11460 |
var message = null;
|
| 11461 |
|
| 11462 |
if (count === 1) {
|
| 11481 |
}, {
|
| 11482 |
name: 'statistics',
|
| 11483 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 11484 |
+
display: mailpoetTrackingEnabled
|
| 11485 |
}, {
|
| 11486 |
name: 'sent_at',
|
| 11487 |
label: _mailpoet2['default'].I18n.t('sentOn'),
|
| 11488 |
sortable: true
|
| 11489 |
}];
|
| 11490 |
|
| 11491 |
+
var bulkActions = [{
|
| 11492 |
name: 'trash',
|
| 11493 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 11494 |
onSuccess: messages.onTrash
|
| 11498 |
var redirectToEditing = function redirectToEditing() {
|
| 11499 |
window.location.href = '?page=mailpoet-newsletter-editor&id=' + newsletter.id;
|
| 11500 |
};
|
| 11501 |
+
if (!newsletter.queue || newsletter.status !== 'sending' || newsletter.queue.status !== null) {
|
| 11502 |
redirectToEditing();
|
| 11503 |
} else {
|
| 11504 |
(0, _reactConfirmAlert.confirmAlert)({
|
| 11511 |
}
|
| 11512 |
};
|
| 11513 |
|
| 11514 |
+
var newsletterActions = [{
|
| 11515 |
name: 'view',
|
| 11516 |
link: function link(newsletter) {
|
| 11517 |
return _react2['default'].createElement(
|
| 11551 |
}];
|
| 11552 |
|
| 11553 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_standard_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 11554 |
+
newsletterActions = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_listings_standard_actions', newsletterActions);
|
| 11555 |
|
| 11556 |
var NewsletterListStandard = _react2['default'].createClass({
|
| 11557 |
displayName: 'NewsletterListStandard',
|
| 11597 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('lists') },
|
| 11598 |
segments
|
| 11599 |
),
|
| 11600 |
+
mailpoetTrackingEnabled === true ? _react2['default'].createElement(
|
| 11601 |
'td',
|
| 11602 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 11603 |
this.renderStatistics(newsletter, undefined, meta.current_time)
|
| 11642 |
base_url: 'standard',
|
| 11643 |
onRenderItem: this.renderItem,
|
| 11644 |
columns: columns,
|
| 11645 |
+
bulk_actions: bulkActions,
|
| 11646 |
+
item_actions: newsletterActions,
|
| 11647 |
messages: messages,
|
| 11648 |
auto_refresh: true,
|
| 11649 |
sort_by: 'sent_at',
|
| 11820 |
}
|
| 11821 |
});
|
| 11822 |
},
|
| 11823 |
+
renderQueueStatus: function renderQueueStatus(newsletter, mailerLog) {
|
| 11824 |
if (!newsletter.queue) {
|
| 11825 |
return _react2['default'].createElement(
|
| 11826 |
'span',
|
| 11827 |
null,
|
| 11828 |
_mailpoet2['default'].I18n.t('notSentYet')
|
| 11829 |
);
|
| 11830 |
+
} else if (mailerLog.status === 'paused' && newsletter.queue.status !== 'completed') {
|
| 11831 |
return _react2['default'].createElement(
|
| 11832 |
'span',
|
| 11833 |
null,
|
| 11889 |
);
|
| 11890 |
}
|
| 11891 |
|
| 11892 |
+
var progressBarWidth = 0;
|
| 11893 |
|
| 11894 |
if (isNaN(percentage)) {
|
| 11895 |
percentage = _mailpoet2['default'].I18n.t('noSubscribers');
|
| 11896 |
} else {
|
| 11897 |
+
progressBarWidth = percentage;
|
| 11898 |
percentage += '%';
|
| 11899 |
}
|
| 11900 |
|
| 11906 |
{ className: progressClasses },
|
| 11907 |
_react2['default'].createElement('span', {
|
| 11908 |
className: 'mailpoet_progress_bar',
|
| 11909 |
+
style: { width: progressBarWidth + '%' }
|
| 11910 |
}),
|
| 11911 |
_react2['default'].createElement(
|
| 11912 |
'span',
|
| 11928 |
};
|
| 11929 |
|
| 11930 |
var StatisticsMixin = {
|
| 11931 |
+
renderStatistics: function renderStatistics(newsletter, isSent, currentTime) {
|
| 11932 |
+
var sent = isSent;
|
| 11933 |
if (sent === undefined) {
|
| 11934 |
// condition for standard and post notification listings
|
| 11935 |
sent = newsletter.statistics && newsletter.queue && newsletter.queue.status !== 'scheduled';
|
| 11947 |
params = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_listing_stats_before', params, newsletter);
|
| 11948 |
|
| 11949 |
// welcome emails provide explicit total_sent value
|
| 11950 |
+
var totalSent = Number(newsletter.total_sent || newsletter.queue.count_processed);
|
| 11951 |
|
| 11952 |
+
var percentageClicked = 0;
|
| 11953 |
+
var percentageOpened = 0;
|
| 11954 |
+
var percentageUnsubscribed = 0;
|
| 11955 |
|
| 11956 |
+
if (totalSent > 0) {
|
| 11957 |
+
percentageClicked = newsletter.statistics.clicked * 100 / totalSent;
|
| 11958 |
+
percentageOpened = newsletter.statistics.opened * 100 / totalSent;
|
| 11959 |
+
percentageUnsubscribed = newsletter.statistics.unsubscribed * 100 / totalSent;
|
| 11960 |
}
|
| 11961 |
|
| 11962 |
// format to 1 decimal place
|
| 11963 |
+
var percentageClickedDisplay = _mailpoet2['default'].Num.toLocaleFixed(percentageClicked, 1);
|
| 11964 |
+
var percentageOpenedDisplay = _mailpoet2['default'].Num.toLocaleFixed(percentageOpened, 1);
|
| 11965 |
+
var percentageUnsubscribedDisplay = _mailpoet2['default'].Num.toLocaleFixed(percentageUnsubscribed, 1);
|
| 11966 |
+
|
| 11967 |
+
var showStatsTimeout = undefined;
|
| 11968 |
+
var newsletterDate = undefined;
|
| 11969 |
+
var sentHoursAgo = undefined;
|
| 11970 |
+
var tooEarlyForStats = undefined;
|
| 11971 |
+
var showKbLink = undefined;
|
| 11972 |
+
if (currentTime !== undefined) {
|
| 11973 |
// standard emails and post notifications:
|
| 11974 |
// display green box for newsletters that were just sent
|
| 11975 |
+
showStatsTimeout = 6; // in hours
|
| 11976 |
+
newsletterDate = newsletter.queue.scheduled_at || newsletter.queue.created_at;
|
| 11977 |
+
sentHoursAgo = (0, _moment2['default'])(currentTime).diff((0, _moment2['default'])(newsletterDate), 'hours');
|
| 11978 |
+
tooEarlyForStats = sentHoursAgo < showStatsTimeout;
|
| 11979 |
+
showKbLink = true;
|
| 11980 |
} else {
|
| 11981 |
// welcome emails: no green box and KB link
|
| 11982 |
+
tooEarlyForStats = false;
|
| 11983 |
+
showKbLink = false;
|
| 11984 |
}
|
| 11985 |
|
| 11986 |
var improveStatsKBLink = 'http://beta.docs.mailpoet.com/article/191-how-to-improve-my-open-and-click-rates';
|
| 11987 |
|
| 11988 |
// thresholds to display badges
|
| 11989 |
+
var minNewslettersSent = 20;
|
| 11990 |
+
var minNewsletterOpens = 5;
|
| 11991 |
|
| 11992 |
var content = undefined;
|
| 11993 |
+
if (totalSent >= minNewslettersSent && newsletter.statistics.opened >= minNewsletterOpens && !tooEarlyForStats) {
|
| 11994 |
// display stats with badges
|
| 11995 |
content = _react2['default'].createElement(
|
| 11996 |
'div',
|
| 12001 |
_react2['default'].createElement(
|
| 12002 |
'span',
|
| 12003 |
null,
|
| 12004 |
+
percentageOpenedDisplay,
|
| 12005 |
'% '
|
| 12006 |
),
|
| 12007 |
_react2['default'].createElement(_newslettersBadgesStatsJsx2['default'], {
|
| 12008 |
stat: 'opened',
|
| 12009 |
+
rate: percentageOpened,
|
| 12010 |
tooltipId: 'opened-' + newsletter.id
|
| 12011 |
})
|
| 12012 |
),
|
| 12016 |
_react2['default'].createElement(
|
| 12017 |
'span',
|
| 12018 |
null,
|
| 12019 |
+
percentageClickedDisplay,
|
| 12020 |
'% '
|
| 12021 |
),
|
| 12022 |
_react2['default'].createElement(_newslettersBadgesStatsJsx2['default'], {
|
| 12023 |
stat: 'clicked',
|
| 12024 |
+
rate: percentageClicked,
|
| 12025 |
tooltipId: 'clicked-' + newsletter.id
|
| 12026 |
})
|
| 12027 |
),
|
| 12031 |
_react2['default'].createElement(
|
| 12032 |
'span',
|
| 12033 |
{ className: 'mailpoet_stat_hidden' },
|
| 12034 |
+
percentageUnsubscribedDisplay,
|
| 12035 |
'%'
|
| 12036 |
)
|
| 12037 |
)
|
| 12044 |
_react2['default'].createElement(
|
| 12045 |
'span',
|
| 12046 |
{ className: 'mailpoet_stats_text' },
|
| 12047 |
+
percentageOpenedDisplay,
|
| 12048 |
'%,',
|
| 12049 |
' ',
|
| 12050 |
+
percentageClickedDisplay,
|
| 12051 |
'%',
|
| 12052 |
_react2['default'].createElement(
|
| 12053 |
'span',
|
| 12054 |
{ className: 'mailpoet_stat_hidden' },
|
| 12055 |
', ',
|
| 12056 |
+
percentageUnsubscribedDisplay,
|
| 12057 |
'%'
|
| 12058 |
)
|
| 12059 |
),
|
| 12060 |
+
tooEarlyForStats && _react2['default'].createElement(
|
| 12061 |
'div',
|
| 12062 |
{ className: 'mailpoet_badge mailpoet_badge_green' },
|
| 12063 |
+
_mailpoet2['default'].I18n.t('checkBackInHours').replace('%$1d', showStatsTimeout - sentHoursAgo)
|
| 12064 |
)
|
| 12065 |
);
|
| 12066 |
}
|
| 12067 |
|
| 12068 |
// thresholds to display bad open rate help
|
| 12069 |
+
var maxPercentageOpened = 5;
|
| 12070 |
+
var minSentHoursAgo = 24;
|
| 12071 |
+
var minTotalSent = 10;
|
| 12072 |
|
| 12073 |
+
var afterContent = undefined;
|
| 12074 |
+
if (showKbLink && percentageOpened < maxPercentageOpened && sentHoursAgo >= minSentHoursAgo && totalSent >= minTotalSent) {
|
| 12075 |
// help link for bad open rate
|
| 12076 |
+
afterContent = _react2['default'].createElement(
|
| 12077 |
'div',
|
| 12078 |
null,
|
| 12079 |
_react2['default'].createElement(
|
| 12088 |
);
|
| 12089 |
}
|
| 12090 |
|
| 12091 |
+
if (totalSent > 0 && params.link) {
|
| 12092 |
// wrap content in a link
|
| 12093 |
if (params.externalLink) {
|
| 12094 |
return _react2['default'].createElement(
|
| 12103 |
},
|
| 12104 |
content
|
| 12105 |
),
|
| 12106 |
+
afterContent
|
| 12107 |
);
|
| 12108 |
}
|
| 12109 |
return _react2['default'].createElement(
|
| 12118 |
},
|
| 12119 |
content
|
| 12120 |
),
|
| 12121 |
+
afterContent
|
| 12122 |
);
|
| 12123 |
}
|
| 12124 |
|
| 12126 |
'div',
|
| 12127 |
null,
|
| 12128 |
content,
|
| 12129 |
+
afterContent
|
| 12130 |
);
|
| 12131 |
},
|
| 12132 |
addStatsCTAAction: function addStatsCTAAction(actions) {
|
| 12144 |
},
|
| 12145 |
display: function display(newsletter) {
|
| 12146 |
// welcome emails provide explicit total_sent value
|
| 12147 |
+
var countProcessed = newsletter.queue && newsletter.queue.count_processed;
|
| 12148 |
+
return Number(newsletter.total_sent || countProcessed) > 0;
|
| 12149 |
}
|
| 12150 |
});
|
| 12151 |
return actions;
|
| 12173 |
}
|
| 12174 |
},
|
| 12175 |
getMailerError: function getMailerError(state) {
|
| 12176 |
+
var mailerErrorNotice = undefined;
|
| 12177 |
+
var mailerCheckSettingsNotice = (0, _reactStringReplace2['default'])(_mailpoet2['default'].I18n.t('mailerCheckSettingsNotice'), /\[link\](.*?)\[\/link\]/g, function (match) {
|
| 12178 |
return _react2['default'].createElement(
|
| 12179 |
'a',
|
| 12180 |
{ href: '?page=mailpoet-settings#mta', key: 'check-sending' },
|
| 12182 |
);
|
| 12183 |
});
|
| 12184 |
if (state.meta.mta_log.error.operation === 'send') {
|
| 12185 |
+
mailerErrorNotice = _mailpoet2['default'].I18n.t('mailerSendErrorNotice').replace('%$1s', state.meta.mta_method).replace('%$2s', state.meta.mta_log.error.error_message);
|
| 12186 |
} else {
|
| 12187 |
+
mailerErrorNotice = _mailpoet2['default'].I18n.t('mailerConnectionErrorNotice').replace('%$1s', state.meta.mta_log.error.error_message);
|
| 12188 |
+
}
|
| 12189 |
+
if (state.meta.mta_log.error.error_code) {
|
| 12190 |
+
mailerErrorNotice += ' ' + _mailpoet2['default'].I18n.t('mailerErrorCode').replace('%$1s', state.meta.mta_log.error.error_code);
|
| 12191 |
}
|
| 12192 |
return _react2['default'].createElement(
|
| 12193 |
'div',
|
| 12195 |
_react2['default'].createElement(
|
| 12196 |
'p',
|
| 12197 |
null,
|
| 12198 |
+
mailerErrorNotice
|
| 12199 |
),
|
| 12200 |
_react2['default'].createElement(
|
| 12201 |
'p',
|
| 12202 |
null,
|
| 12203 |
+
mailerCheckSettingsNotice
|
| 12204 |
),
|
| 12205 |
_react2['default'].createElement(
|
| 12206 |
'p',
|
| 12280 |
|
| 12281 |
var _wpJsHooks2 = _interopRequireDefault(_wpJsHooks);
|
| 12282 |
|
| 12283 |
+
var mailpoetRoles = window.mailpoetRoles || {};
|
| 12284 |
+
var mailpoetSegments = window.mailpoetSegments || {};
|
| 12285 |
+
var mailpoetTrackingEnabled = !!window.mailpoetTrackingEnabled;
|
| 12286 |
|
| 12287 |
var messages = {
|
| 12288 |
onTrash: function onTrash(response) {
|
| 12289 |
+
var count = Number(response.meta.count);
|
| 12290 |
var message = null;
|
| 12291 |
|
| 12292 |
if (count === 1) {
|
| 12297 |
_mailpoet2['default'].Notice.success(message);
|
| 12298 |
},
|
| 12299 |
onDelete: function onDelete(response) {
|
| 12300 |
+
var count = Number(response.meta.count);
|
| 12301 |
var message = null;
|
| 12302 |
|
| 12303 |
if (count === 1) {
|
| 12308 |
_mailpoet2['default'].Notice.success(message);
|
| 12309 |
},
|
| 12310 |
onRestore: function onRestore(response) {
|
| 12311 |
+
var count = Number(response.meta.count);
|
| 12312 |
var message = null;
|
| 12313 |
|
| 12314 |
if (count === 1) {
|
| 12334 |
}, {
|
| 12335 |
name: 'statistics',
|
| 12336 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 12337 |
+
display: mailpoetTrackingEnabled
|
| 12338 |
}, {
|
| 12339 |
name: 'updated_at',
|
| 12340 |
label: _mailpoet2['default'].I18n.t('lastModifiedOn'),
|
| 12341 |
sortable: true
|
| 12342 |
}];
|
| 12343 |
|
| 12344 |
+
var bulkActions = [{
|
| 12345 |
name: 'trash',
|
| 12346 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 12347 |
onSuccess: messages.onTrash
|
| 12348 |
}];
|
| 12349 |
|
| 12350 |
+
var newsletterActions = [{
|
| 12351 |
name: 'view',
|
| 12352 |
link: function link(newsletter) {
|
| 12353 |
return _react2['default'].createElement(
|
| 12370 |
}];
|
| 12371 |
|
| 12372 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_welcome_notification_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 12373 |
+
newsletterActions = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_listings_welcome_notification_actions', newsletterActions);
|
| 12374 |
|
| 12375 |
var NewsletterListWelcome = _react2['default'].createClass({
|
| 12376 |
displayName: 'NewsletterListWelcome',
|
| 12388 |
endpoint: 'newsletters',
|
| 12389 |
action: 'setStatus',
|
| 12390 |
data: {
|
| 12391 |
+
id: Number(e.target.getAttribute('data-id')),
|
| 12392 |
status: e.target.value
|
| 12393 |
}
|
| 12394 |
}).done(function (response) {
|
| 12405 |
});
|
| 12406 |
},
|
| 12407 |
renderStatus: function renderStatus(newsletter) {
|
| 12408 |
+
var totalSent = _mailpoet2['default'].I18n.t('sentToXSubscribers').replace('%$1d', newsletter.total_sent.toLocaleString());
|
| 12409 |
|
| 12410 |
return _react2['default'].createElement(
|
| 12411 |
'div',
|
| 12435 |
_react2['default'].createElement(
|
| 12436 |
'p',
|
| 12437 |
null,
|
| 12438 |
+
totalSent
|
| 12439 |
)
|
| 12440 |
);
|
| 12441 |
},
|
| 12451 |
if (newsletter.options.role === 'mailpoet_all') {
|
| 12452 |
sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventWPUserAnyRole');
|
| 12453 |
} else {
|
| 12454 |
+
sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventWPUserWithRole').replace('%$1s', mailpoetRoles[newsletter.options.role]);
|
| 12455 |
}
|
| 12456 |
break;
|
| 12457 |
|
| 12458 |
+
default:
|
| 12459 |
// get segment
|
| 12460 |
+
segment = _underscore2['default'].find(mailpoetSegments, function (seg) {
|
| 12461 |
+
return Number(seg.id) === Number(newsletter.options.segment);
|
| 12462 |
});
|
| 12463 |
|
| 12464 |
if (segment === undefined) {
|
| 12488 |
case 'weeks':
|
| 12489 |
sendingDelay = _mailpoet2['default'].I18n.t('sendingDelayWeeks').replace('%$1d', newsletter.options.afterTimeNumber);
|
| 12490 |
break;
|
| 12491 |
+
|
| 12492 |
+
default:
|
| 12493 |
+
sendingDelay = 'Invalid sending delay';
|
| 12494 |
+
break;
|
| 12495 |
}
|
| 12496 |
sendingEvent += ' [' + sendingDelay + ']';
|
| 12497 |
}
|
| 12538 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('settings') },
|
| 12539 |
this.renderSettings(newsletter)
|
| 12540 |
),
|
| 12541 |
+
mailpoetTrackingEnabled === true ? _react2['default'].createElement(
|
| 12542 |
'td',
|
| 12543 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 12544 |
this.renderStatistics(newsletter, newsletter.total_sent > 0 && newsletter.statistics)
|
| 12579 |
base_url: 'welcome',
|
| 12580 |
onRenderItem: this.renderItem,
|
| 12581 |
columns: columns,
|
| 12582 |
+
bulk_actions: bulkActions,
|
| 12583 |
+
item_actions: newsletterActions,
|
| 12584 |
messages: messages,
|
| 12585 |
auto_refresh: true,
|
| 12586 |
sort_by: 'updated_at',
|
| 12630 |
|
| 12631 |
var messages = {
|
| 12632 |
onTrash: function onTrash(response) {
|
| 12633 |
+
var count = Number(response.meta.count);
|
| 12634 |
var message = null;
|
| 12635 |
|
| 12636 |
if (count === 1) {
|
| 12641 |
_mailpoet2['default'].Notice.success(message);
|
| 12642 |
},
|
| 12643 |
onDelete: function onDelete(response) {
|
| 12644 |
+
var count = Number(response.meta.count);
|
| 12645 |
var message = null;
|
| 12646 |
|
| 12647 |
if (count === 1) {
|
| 12652 |
_mailpoet2['default'].Notice.success(message);
|
| 12653 |
},
|
| 12654 |
onRestore: function onRestore(response) {
|
| 12655 |
+
var count = Number(response.meta.count);
|
| 12656 |
var message = null;
|
| 12657 |
|
| 12658 |
if (count === 1) {
|
| 12685 |
sortable: true
|
| 12686 |
}];
|
| 12687 |
|
| 12688 |
+
var bulkActions = [{
|
| 12689 |
name: 'trash',
|
| 12690 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 12691 |
onSuccess: messages.onTrash
|
| 12692 |
}];
|
| 12693 |
|
| 12694 |
+
var newsletterActions = [{
|
| 12695 |
name: 'view',
|
| 12696 |
link: function link(newsletter) {
|
| 12697 |
return _react2['default'].createElement(
|
| 12751 |
endpoint: 'newsletters',
|
| 12752 |
action: 'setStatus',
|
| 12753 |
data: {
|
| 12754 |
+
id: Number(e.target.getAttribute('data-id')),
|
| 12755 |
status: e.target.value
|
| 12756 |
}
|
| 12757 |
}).done(function (response) {
|
| 12826 |
case 'immediately':
|
| 12827 |
sendingFrequency = _mailpoet2['default'].I18n.t('sendImmediately');
|
| 12828 |
break;
|
| 12829 |
+
|
| 12830 |
+
default:
|
| 12831 |
+
sendingFrequency = 'Invalid sending frequency';
|
| 12832 |
+
break;
|
| 12833 |
}
|
| 12834 |
|
| 12835 |
return _react2['default'].createElement(
|
| 12841 |
);
|
| 12842 |
},
|
| 12843 |
renderHistoryLink: function renderHistoryLink(newsletter) {
|
| 12844 |
+
var childrenCount = Number(newsletter.children_count);
|
| 12845 |
if (childrenCount === 0) {
|
| 12846 |
return _mailpoet2['default'].I18n.t('notSentYet');
|
| 12847 |
}
|
| 12927 |
base_url: 'notification',
|
| 12928 |
onRenderItem: this.renderItem,
|
| 12929 |
columns: columns,
|
| 12930 |
+
bulk_actions: bulkActions,
|
| 12931 |
+
item_actions: newsletterActions,
|
| 12932 |
messages: messages,
|
| 12933 |
auto_refresh: true,
|
| 12934 |
sort_by: 'updated_at',
|
| 12978 |
|
| 12979 |
var _newslettersListingsMixinsJsx = __webpack_require__(530);
|
| 12980 |
|
| 12981 |
+
var mailpoetTrackingEnabled = !!window.mailpoetTrackingEnabled;
|
| 12982 |
|
| 12983 |
var columns = [{
|
| 12984 |
name: 'subject',
|
| 12992 |
}, {
|
| 12993 |
name: 'statistics',
|
| 12994 |
label: _mailpoet2['default'].I18n.t('statistics'),
|
| 12995 |
+
display: mailpoetTrackingEnabled
|
| 12996 |
}, {
|
| 12997 |
name: 'sent_at',
|
| 12998 |
label: _mailpoet2['default'].I18n.t('sentOn')
|
| 12999 |
}];
|
| 13000 |
|
| 13001 |
+
var newsletterActions = [{
|
| 13002 |
name: 'view',
|
| 13003 |
link: function link(newsletter) {
|
| 13004 |
return _react2['default'].createElement(
|
| 13010 |
}];
|
| 13011 |
|
| 13012 |
_wpJsHooks2['default'].addFilter('mailpoet_newsletters_listings_notification_history_actions', _newslettersListingsMixinsJsx.StatisticsMixin.addStatsCTAAction);
|
| 13013 |
+
newsletterActions = _wpJsHooks2['default'].applyFilters('mailpoet_newsletters_listings_notification_history_actions', newsletterActions);
|
| 13014 |
|
| 13015 |
var NewsletterListNotificationHistory = _react2['default'].createClass({
|
| 13016 |
displayName: 'NewsletterListNotificationHistory',
|
| 13053 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('lists') },
|
| 13054 |
segments
|
| 13055 |
),
|
| 13056 |
+
mailpoetTrackingEnabled === true ? _react2['default'].createElement(
|
| 13057 |
'td',
|
| 13058 |
{ className: 'column', 'data-colname': _mailpoet2['default'].I18n.t('statistics') },
|
| 13059 |
this.renderStatistics(newsletter, undefined, meta.current_time)
|
| 13098 |
base_url: 'notification/history/:parent_id',
|
| 13099 |
onRenderItem: this.renderItem,
|
| 13100 |
columns: columns,
|
| 13101 |
+
item_actions: newsletterActions,
|
| 13102 |
auto_refresh: true,
|
| 13103 |
sort_by: 'sent_at',
|
| 13104 |
sort_order: 'desc',
|
| 13220 |
|
| 13221 |
var messages = {
|
| 13222 |
onTrash: function onTrash(response) {
|
| 13223 |
+
var count = Number(response.meta.count);
|
| 13224 |
var message = null;
|
| 13225 |
|
| 13226 |
if (count === 1) {
|
| 13231 |
_mailpoet2['default'].Notice.success(message);
|
| 13232 |
},
|
| 13233 |
onDelete: function onDelete(response) {
|
| 13234 |
+
var count = Number(response.meta.count);
|
| 13235 |
var message = null;
|
| 13236 |
|
| 13237 |
if (count === 1) {
|
| 13242 |
_mailpoet2['default'].Notice.success(message);
|
| 13243 |
},
|
| 13244 |
onRestore: function onRestore(response) {
|
| 13245 |
+
var count = Number(response.meta.count);
|
| 13246 |
var message = null;
|
| 13247 |
|
| 13248 |
if (count === 1) {
|
| 13254 |
}
|
| 13255 |
};
|
| 13256 |
|
| 13257 |
+
var bulkActions = [{
|
| 13258 |
name: 'trash',
|
| 13259 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 13260 |
onSuccess: messages.onTrash
|
| 13261 |
}];
|
| 13262 |
|
| 13263 |
+
var itemActions = [{
|
| 13264 |
name: 'edit',
|
| 13265 |
link: function link(item) {
|
| 13266 |
return _react2['default'].createElement(
|
| 13357 |
renderItem: function renderItem(segment, actions) {
|
| 13358 |
var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
|
| 13359 |
|
| 13360 |
+
var subscribed = Number(segment.subscribers_count.subscribed || 0);
|
| 13361 |
+
var unconfirmed = Number(segment.subscribers_count.unconfirmed || 0);
|
| 13362 |
+
var unsubscribed = Number(segment.subscribers_count.unsubscribed || 0);
|
| 13363 |
+
var bounced = Number(segment.subscribers_count.bounced || 0);
|
| 13364 |
|
| 13365 |
+
var segmentName = undefined;
|
| 13366 |
|
| 13367 |
if (segment.type === 'wp_users') {
|
| 13368 |
// the WP users segment is not editable so just display its name
|
| 13369 |
+
segmentName = _react2['default'].createElement(
|
| 13370 |
'span',
|
| 13371 |
{ className: 'row-title' },
|
| 13372 |
segment.name
|
| 13373 |
);
|
| 13374 |
} else {
|
| 13375 |
+
segmentName = _react2['default'].createElement(
|
| 13376 |
_reactRouter.Link,
|
| 13377 |
{
|
| 13378 |
className: 'row-title',
|
| 13391 |
_react2['default'].createElement(
|
| 13392 |
'strong',
|
| 13393 |
null,
|
| 13394 |
+
segmentName
|
| 13395 |
),
|
| 13396 |
actions
|
| 13397 |
),
|
| 13475 |
endpoint: 'segments',
|
| 13476 |
onRenderItem: this.renderItem,
|
| 13477 |
columns: columns,
|
| 13478 |
+
bulk_actions: bulkActions,
|
| 13479 |
+
item_actions: itemActions,
|
| 13480 |
sort_by: 'name',
|
| 13481 |
sort_order: 'asc'
|
| 13482 |
})
|
| 13657 |
|
| 13658 |
var messages = {
|
| 13659 |
onTrash: function onTrash(response) {
|
| 13660 |
+
var count = Number(response.meta.count);
|
| 13661 |
var message = null;
|
| 13662 |
|
| 13663 |
if (count === 1) {
|
| 13668 |
_mailpoet2['default'].Notice.success(message);
|
| 13669 |
},
|
| 13670 |
onDelete: function onDelete(response) {
|
| 13671 |
+
var count = Number(response.meta.count);
|
| 13672 |
var message = null;
|
| 13673 |
|
| 13674 |
if (count === 1) {
|
| 13679 |
_mailpoet2['default'].Notice.success(message);
|
| 13680 |
},
|
| 13681 |
onRestore: function onRestore(response) {
|
| 13682 |
+
var count = Number(response.meta.count);
|
| 13683 |
var message = null;
|
| 13684 |
|
| 13685 |
if (count === 1) {
|
| 13691 |
}
|
| 13692 |
};
|
| 13693 |
|
| 13694 |
+
var bulkActions = [{
|
| 13695 |
name: 'trash',
|
| 13696 |
label: _mailpoet2['default'].I18n.t('moveToTrash'),
|
| 13697 |
onSuccess: messages.onTrash
|
| 13698 |
}];
|
| 13699 |
|
| 13700 |
+
var itemActions = [{
|
| 13701 |
name: 'edit',
|
| 13702 |
label: _mailpoet2['default'].I18n.t('edit'),
|
| 13703 |
link: function link(item) {
|
| 13752 |
});
|
| 13753 |
},
|
| 13754 |
renderItem: function renderItem(form, actions) {
|
| 13755 |
+
var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
|
| 13756 |
|
| 13757 |
var segments = window.mailpoet_segments.filter(function (segment) {
|
| 13758 |
return _jquery2['default'].inArray(segment.id, form.segments) !== -1;
|
| 13769 |
null,
|
| 13770 |
_react2['default'].createElement(
|
| 13771 |
'td',
|
| 13772 |
+
{ className: rowClasses },
|
| 13773 |
_react2['default'].createElement(
|
| 13774 |
'strong',
|
| 13775 |
null,
|
| 13833 |
endpoint: 'forms',
|
| 13834 |
onRenderItem: this.renderItem,
|
| 13835 |
columns: columns,
|
| 13836 |
+
bulk_actions: bulkActions,
|
| 13837 |
+
item_actions: itemActions
|
| 13838 |
})
|
| 13839 |
);
|
| 13840 |
}
|
| 15892 |
|
| 15893 |
var _history = __webpack_require__(244);
|
| 15894 |
|
| 15895 |
+
var _helpSystem_statusJsx = __webpack_require__(547);
|
| 15896 |
|
| 15897 |
+
var _helpSystem_statusJsx2 = _interopRequireDefault(_helpSystem_statusJsx);
|
| 15898 |
|
| 15899 |
var _helpSystem_infoJsx = __webpack_require__(549);
|
| 15900 |
|
| 15901 |
var _helpSystem_infoJsx2 = _interopRequireDefault(_helpSystem_infoJsx);
|
| 15902 |
|
| 15903 |
+
var _helpKnowledge_baseJsx = __webpack_require__(550);
|
| 15904 |
+
|
| 15905 |
+
var _helpKnowledge_baseJsx2 = _interopRequireDefault(_helpKnowledge_baseJsx);
|
| 15906 |
+
|
| 15907 |
var history = (0, _reactRouter.useRouterHistory)(_history.createHashHistory)({ queryKey: false });
|
| 15908 |
|
| 15909 |
var App = _react2['default'].createClass({
|
| 15923 |
_react2['default'].createElement(
|
| 15924 |
_reactRouter.Route,
|
| 15925 |
{ path: '/', component: App },
|
| 15926 |
+
_react2['default'].createElement(_reactRouter.IndexRedirect, { to: 'systemStatus' }),
|
| 15927 |
+
_react2['default'].createElement(_reactRouter.Route, { path: 'systemStatus(/)**', params: { tab: 'systemStatus' }, component: _helpSystem_statusJsx2['default'] }),
|
| 15928 |
+
_react2['default'].createElement(_reactRouter.Route, { path: 'systemInfo(/)**', params: { tab: 'systemInfo' }, component: _helpSystem_infoJsx2['default'] }),
|
| 15929 |
+
_react2['default'].createElement(_reactRouter.Route, { path: 'knowledgeBase(/)**', params: { tab: 'knowledgeBase' }, component: _helpKnowledge_baseJsx2['default'] })
|
| 15930 |
)
|
| 15931 |
), container);
|
| 15932 |
}
|
| 15941 |
|
| 15942 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 15943 |
|
| 15944 |
+
var _mailpoet = __webpack_require__(276);
|
| 15945 |
+
|
| 15946 |
+
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 15947 |
+
|
| 15948 |
var _react = __webpack_require__(2);
|
| 15949 |
|
| 15950 |
var _react2 = _interopRequireDefault(_react);
|
| 15951 |
|
| 15952 |
+
var _reactStringReplace = __webpack_require__(422);
|
| 15953 |
|
| 15954 |
+
var _reactStringReplace2 = _interopRequireDefault(_reactStringReplace);
|
| 15955 |
|
| 15956 |
var _tabsJsx = __webpack_require__(548);
|
| 15957 |
|
| 15958 |
var _tabsJsx2 = _interopRequireDefault(_tabsJsx);
|
| 15959 |
|
| 15960 |
+
function renderStatusMessage(status, error, link) {
|
| 15961 |
+
var noticeType = status ? 'success' : 'error';
|
| 15962 |
+
var noticeMessage = status ? _mailpoet2['default'].I18n.t('systemStatusConnectionSuccessful') : _mailpoet2['default'].I18n.t('systemStatusConnectionUnsuccessful') + ' ' + error;
|
| 15963 |
+
|
| 15964 |
+
if (link) {
|
| 15965 |
+
noticeMessage = (0, _reactStringReplace2['default'])(noticeMessage, /\[link\](.*?)\[\/link\]/g, function (match) {
|
| 15966 |
+
return _react2['default'].createElement(
|
| 15967 |
+
'a',
|
| 15968 |
+
{ href: '' + link, key: 'kb-link' },
|
| 15969 |
+
match
|
| 15970 |
+
);
|
| 15971 |
+
});
|
| 15972 |
+
}
|
| 15973 |
+
|
| 15974 |
return _react2['default'].createElement(
|
| 15975 |
'div',
|
| 15976 |
+
{ className: 'mailpoet_notice notice inline notice-' + noticeType, style: { marginTop: '1em' } },
|
|
|
|
| 15977 |
_react2['default'].createElement(
|
| 15978 |
'p',
|
| 15979 |
null,
|
| 15980 |
+
noticeMessage
|
| 15981 |
+
)
|
| 15982 |
+
);
|
| 15983 |
+
}
|
| 15984 |
+
|
| 15985 |
+
function renderCronSection(data) {
|
| 15986 |
+
var status = data.cron.isReachable;
|
| 15987 |
+
var url = data.cron.url;
|
| 15988 |
+
|
| 15989 |
+
return _react2['default'].createElement(
|
| 15990 |
+
'div',
|
| 15991 |
+
null,
|
| 15992 |
+
_react2['default'].createElement(
|
| 15993 |
+
'h2',
|
| 15994 |
+
null,
|
| 15995 |
+
_mailpoet2['default'].I18n.t('systemStatusCronTitle')
|
| 15996 |
),
|
| 15997 |
_react2['default'].createElement(
|
| 15998 |
+
'p',
|
| 15999 |
null,
|
| 16000 |
_react2['default'].createElement(
|
| 16001 |
+
'a',
|
| 16002 |
+
{ href: url, target: '_blank' },
|
| 16003 |
+
url
|
| 16004 |
+
)
|
| 16005 |
+
),
|
| 16006 |
+
renderStatusMessage(status, _mailpoet2['default'].I18n.t('systemStatusCronConnectionUnsuccessfulInfo'), '//beta.docs.mailpoet.com/article/231-sending-does-not-work')
|
| 16007 |
+
);
|
| 16008 |
+
}
|
| 16009 |
+
|
| 16010 |
+
function renderMSSSection(data) {
|
| 16011 |
+
if (!data.mss.enabled) return undefined;
|
| 16012 |
+
|
| 16013 |
+
var status = data.mss.enabled.isReachable;
|
| 16014 |
+
|
| 16015 |
+
return _react2['default'].createElement(
|
| 16016 |
+
'div',
|
| 16017 |
+
null,
|
| 16018 |
+
_react2['default'].createElement(
|
| 16019 |
+
'h2',
|
| 16020 |
+
null,
|
| 16021 |
+
_mailpoet2['default'].I18n.t('systemStatusMSSTitle')
|
| 16022 |
+
),
|
| 16023 |
+
renderStatusMessage(status, _mailpoet2['default'].I18n.t('systemStatusMSSConnectionUnsuccessfulInfo'), false)
|
| 16024 |
+
);
|
| 16025 |
+
}
|
| 16026 |
+
|
| 16027 |
+
function SystemStatus() {
|
| 16028 |
+
var systemStatusData = window.systemStatusData;
|
| 16029 |
+
|
| 16030 |
+
return _react2['default'].createElement(
|
| 16031 |
+
'div',
|
| 16032 |
+
null,
|
| 16033 |
+
_react2['default'].createElement(_tabsJsx2['default'], { tab: 'systemStatus' }),
|
| 16034 |
+
_react2['default'].createElement(
|
| 16035 |
+
'div',
|
| 16036 |
+
{ className: 'mailpoet_notice notice inline', style: { marginTop: '1em' } },
|
| 16037 |
_react2['default'].createElement(
|
| 16038 |
+
'p',
|
| 16039 |
null,
|
| 16040 |
+
systemStatusData.mss.enabled ? _mailpoet2['default'].I18n.t('systemStatusIntroCronMSS') : _mailpoet2['default'].I18n.t('systemStatusIntroCron')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16041 |
)
|
| 16042 |
),
|
| 16043 |
+
renderCronSection(systemStatusData),
|
| 16044 |
+
renderMSSSection(systemStatusData)
|
|
|
|
|
|
|
|
|
|
| 16045 |
);
|
| 16046 |
}
|
| 16047 |
+
module.exports = SystemStatus;
|
|
|
|
| 16048 |
|
| 16049 |
/***/ },
|
| 16050 |
|
| 16070 |
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 16071 |
|
| 16072 |
var tabs = [{
|
| 16073 |
+
name: 'systemStatus',
|
| 16074 |
+
label: _mailpoet2['default'].I18n.t('tabSystemStatusTitle'),
|
| 16075 |
+
link: '/systemStatus'
|
| 16076 |
}, {
|
| 16077 |
name: 'systemInfo',
|
| 16078 |
label: _mailpoet2['default'].I18n.t('tabSystemInfoTitle'),
|
| 16079 |
link: '/systemInfo'
|
| 16080 |
+
}, {
|
| 16081 |
+
name: 'knowledgeBase',
|
| 16082 |
+
label: _mailpoet2['default'].I18n.t('tabKnowledgeBaseTitle'),
|
| 16083 |
+
link: '/knowledgeBase'
|
| 16084 |
}];
|
| 16085 |
|
| 16086 |
function Tabs(props) {
|
| 16106 |
}
|
| 16107 |
|
| 16108 |
Tabs.propTypes = { tab: _react2['default'].PropTypes.string };
|
| 16109 |
+
Tabs.defaultProps = { tab: 'systemStatus' };
|
| 16110 |
|
| 16111 |
module.exports = Tabs;
|
| 16112 |
|
| 16162 |
);
|
| 16163 |
}
|
| 16164 |
|
| 16165 |
+
function SystemInfo() {
|
| 16166 |
+
var systemInfoData = window.systemInfoData;
|
| 16167 |
return _react2['default'].createElement(
|
| 16168 |
'div',
|
| 16169 |
null,
|
| 16170 |
_react2['default'].createElement(_tabsJsx2['default'], { tab: 'systemInfo' }),
|
| 16171 |
_react2['default'].createElement(
|
| 16172 |
'div',
|
| 16173 |
+
{ className: 'mailpoet_notice notice inline', style: { marginTop: '1em' } },
|
| 16174 |
_react2['default'].createElement(
|
| 16175 |
'p',
|
| 16176 |
null,
|
| 16177 |
_mailpoet2['default'].I18n.t('systemInfoIntro')
|
| 16178 |
)
|
| 16179 |
),
|
| 16180 |
+
printData(systemInfoData)
|
| 16181 |
);
|
| 16182 |
}
|
| 16183 |
|
| 16184 |
+
module.exports = SystemInfo;
|
| 16185 |
|
| 16186 |
/***/ },
|
| 16187 |
|
| 16188 |
/***/ 550:
|
| 16189 |
+
/***/ function(module, exports, __webpack_require__) {
|
| 16190 |
+
|
| 16191 |
+
'use strict';
|
| 16192 |
+
|
| 16193 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 16194 |
+
|
| 16195 |
+
var _react = __webpack_require__(2);
|
| 16196 |
+
|
| 16197 |
+
var _react2 = _interopRequireDefault(_react);
|
| 16198 |
+
|
| 16199 |
+
var _mailpoet = __webpack_require__(276);
|
| 16200 |
+
|
| 16201 |
+
var _mailpoet2 = _interopRequireDefault(_mailpoet);
|
| 16202 |
+
|
| 16203 |
+
var _tabsJsx = __webpack_require__(548);
|
| 16204 |
+
|
| 16205 |
+
var _tabsJsx2 = _interopRequireDefault(_tabsJsx);
|
| 16206 |
+
|
| 16207 |
+
function KnowledgeBase() {
|
| 16208 |
+
return _react2['default'].createElement(
|
| 16209 |
+
'div',
|
| 16210 |
+
null,
|
| 16211 |
+
_react2['default'].createElement(_tabsJsx2['default'], { tab: 'knowledgeBase' }),
|
| 16212 |
+
_react2['default'].createElement(
|
| 16213 |
+
'p',
|
| 16214 |
+
null,
|
| 16215 |
+
_mailpoet2['default'].I18n.t('knowledgeBaseIntro')
|
| 16216 |
+
),
|
| 16217 |
+
_react2['default'].createElement(
|
| 16218 |
+
'ul',
|
| 16219 |
+
null,
|
| 16220 |
+
_react2['default'].createElement(
|
| 16221 |
+
'li',
|
| 16222 |
+
null,
|
| 16223 |
+
_react2['default'].createElement(
|
| 16224 |
+
'a',
|
| 16225 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/116-common-problems' },
|
| 16226 |
+
'Common Problems'
|
| 16227 |
+
)
|
| 16228 |
+
),
|
| 16229 |
+
_react2['default'].createElement(
|
| 16230 |
+
'li',
|
| 16231 |
+
null,
|
| 16232 |
+
_react2['default'].createElement(
|
| 16233 |
+
'a',
|
| 16234 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/165-newsletters' },
|
| 16235 |
+
'Newsletters'
|
| 16236 |
+
)
|
| 16237 |
+
),
|
| 16238 |
+
_react2['default'].createElement(
|
| 16239 |
+
'li',
|
| 16240 |
+
null,
|
| 16241 |
+
_react2['default'].createElement(
|
| 16242 |
+
'a',
|
| 16243 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/156-migration-questions' },
|
| 16244 |
+
'Migration Questions'
|
| 16245 |
+
)
|
| 16246 |
+
),
|
| 16247 |
+
_react2['default'].createElement(
|
| 16248 |
+
'li',
|
| 16249 |
+
null,
|
| 16250 |
+
_react2['default'].createElement(
|
| 16251 |
+
'a',
|
| 16252 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/149-sending-methods' },
|
| 16253 |
+
'Sending Methods'
|
| 16254 |
+
)
|
| 16255 |
+
),
|
| 16256 |
+
_react2['default'].createElement(
|
| 16257 |
+
'li',
|
| 16258 |
+
null,
|
| 16259 |
+
_react2['default'].createElement(
|
| 16260 |
+
'a',
|
| 16261 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/139-subscription-forms' },
|
| 16262 |
+
'Subscription Forms'
|
| 16263 |
+
)
|
| 16264 |
+
),
|
| 16265 |
+
_react2['default'].createElement(
|
| 16266 |
+
'li',
|
| 16267 |
+
null,
|
| 16268 |
+
_react2['default'].createElement(
|
| 16269 |
+
'a',
|
| 16270 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/114-getting-started' },
|
| 16271 |
+
'Getting Started'
|
| 16272 |
+
)
|
| 16273 |
+
),
|
| 16274 |
+
_react2['default'].createElement(
|
| 16275 |
+
'li',
|
| 16276 |
+
null,
|
| 16277 |
+
_react2['default'].createElement(
|
| 16278 |
+
'a',
|
| 16279 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/123-newsletter-designer' },
|
| 16280 |
+
'Newsletter Designer'
|
| 16281 |
+
)
|
| 16282 |
+
),
|
| 16283 |
+
_react2['default'].createElement(
|
| 16284 |
+
'li',
|
| 16285 |
+
null,
|
| 16286 |
+
_react2['default'].createElement(
|
| 16287 |
+
'a',
|
| 16288 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/category/121-subscribers-and-lists' },
|
| 16289 |
+
'Subscribers and Lists'
|
| 16290 |
+
)
|
| 16291 |
+
)
|
| 16292 |
+
),
|
| 16293 |
+
_react2['default'].createElement(
|
| 16294 |
+
'a',
|
| 16295 |
+
{ target: '_blank', href: 'http://beta.docs.mailpoet.com/', className: 'button button-primary' },
|
| 16296 |
+
_mailpoet2['default'].I18n.t('knowledgeBaseButton')
|
| 16297 |
+
)
|
| 16298 |
+
);
|
| 16299 |
+
}
|
| 16300 |
+
|
| 16301 |
+
module.exports = KnowledgeBase;
|
| 16302 |
+
|
| 16303 |
+
/***/ },
|
| 16304 |
+
|
| 16305 |
+
/***/ 551:
|
| 16306 |
/***/ function(module, exports, __webpack_require__) {
|
| 16307 |
|
| 16308 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 16350 |
|
| 16351 |
/***/ },
|
| 16352 |
|
| 16353 |
+
/***/ 552:
|
| 16354 |
/***/ function(module, exports, __webpack_require__) {
|
| 16355 |
|
| 16356 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 16358 |
__webpack_require__(280),
|
| 16359 |
__webpack_require__(275),
|
| 16360 |
__webpack_require__(276),
|
|
|
|
| 16361 |
__webpack_require__(553),
|
| 16362 |
__webpack_require__(554),
|
| 16363 |
+
__webpack_require__(555),
|
| 16364 |
__webpack_require__(301)
|
| 16365 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 16366 |
Backbone,
|
| 16452 |
|
| 16453 |
// define method change behavior
|
| 16454 |
methodSelectionElement.change(function () {
|
| 16455 |
+
var availableMethods = jQuery(':radio[name="select_method"]');
|
| 16456 |
+
var selectedMethod = availableMethods.index(availableMethods.filter(':checked'));
|
| 16457 |
MailPoet.Notice.hide();
|
| 16458 |
// hide all methods
|
| 16459 |
currentStepE.find('.inside')
|
| 16461 |
.hide();
|
| 16462 |
// show selected method
|
| 16463 |
currentStepE.find('.inside')
|
| 16464 |
+
.children('div[id^="method_"]:eq(' + selectedMethod + ')')
|
| 16465 |
.show()
|
| 16466 |
.find('table')
|
| 16467 |
.show();
|
| 16470 |
// start step 1
|
| 16471 |
showCurrentStep();
|
| 16472 |
|
| 16473 |
+
function toggleNextStepButton(element, condition) {
|
| 16474 |
+
var disabled = 'button-disabled';
|
| 16475 |
+
if (condition === 'on') {
|
| 16476 |
+
element.closest('table a').removeClass(disabled);
|
| 16477 |
+
return;
|
| 16478 |
+
}
|
| 16479 |
+
element.closest('table a').addClass(disabled);
|
| 16480 |
+
}
|
| 16481 |
+
|
| 16482 |
+
function parseCSV(isFile) {
|
| 16483 |
+
var processedSubscribers = [];
|
| 16484 |
+
var parsedEmails = [];
|
| 16485 |
+
var duplicateEmails = [];
|
| 16486 |
+
var invalidEmails = [];
|
| 16487 |
+
var emailColumnPosition = null;
|
| 16488 |
+
var columnCount = null;
|
| 16489 |
+
var isHeaderFound = false;
|
| 16490 |
+
var advancedOptionHeader = true;
|
| 16491 |
+
var advancedOptionDelimiter = '';
|
| 16492 |
+
var advancedOptionNewline = '';
|
| 16493 |
+
var advancedOptionComments = false;
|
| 16494 |
+
// trim spaces, commas, periods,
|
| 16495 |
+
// single/double quotes and convert to lowercase
|
| 16496 |
+
var detectAndCleanupEmail = function (emailString) {
|
| 16497 |
+
var test;
|
| 16498 |
+
// decode HTML entities
|
| 16499 |
+
var email = jQuery('<div />').html(emailString).text();
|
| 16500 |
+
email = email
|
| 16501 |
+
.toLowerCase()
|
| 16502 |
+
// left/right trim spaces, punctuation (e.g., " 'email@email.com'; ")
|
| 16503 |
+
// right trim non-printable characters (e.g., "email@email.com�")
|
| 16504 |
+
.replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g, '')
|
| 16505 |
+
// remove spaces (e.g., "email @ email . com")
|
| 16506 |
+
// remove urlencoded characters
|
| 16507 |
+
.replace(/\s+|%\d+|,+/g, '');
|
| 16508 |
+
// detect e-mails that will be otherwise rejected by email regex
|
| 16509 |
+
test = /<(.*?)>/.exec(email);
|
| 16510 |
+
if (test) {
|
| 16511 |
+
// is the email inside angle brackets (e.g., 'some@email.com <some@email.com>')?
|
| 16512 |
+
email = test[1].trim();
|
| 16513 |
+
}
|
| 16514 |
+
test = /mailto:(?:\s+)?(.*)/.exec(email);
|
| 16515 |
+
if (test) {
|
| 16516 |
+
// is the email in 'mailto:email' format?
|
| 16517 |
+
email = test[1].trim();
|
| 16518 |
+
}
|
| 16519 |
+
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
|
| 16520 |
+
if (!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.\-@]+$/.test(email)) {
|
| 16521 |
+
return false;
|
| 16522 |
+
}
|
| 16523 |
+
return email;
|
| 16524 |
+
};
|
| 16525 |
+
|
| 16526 |
+
return {
|
| 16527 |
+
skipEmptyLines: true,
|
| 16528 |
+
delimiter: advancedOptionDelimiter,
|
| 16529 |
+
newline: advancedOptionNewline,
|
| 16530 |
+
comments: advancedOptionComments,
|
| 16531 |
+
error: function () {
|
| 16532 |
+
MailPoet.Notice.hide();
|
| 16533 |
+
MailPoet.Notice.error(MailPoet.I18n.t('dataProcessingError'));
|
| 16534 |
+
},
|
| 16535 |
+
complete: function (CSV) {
|
| 16536 |
+
var email;
|
| 16537 |
+
var emailAddress;
|
| 16538 |
+
var column;
|
| 16539 |
+
var rowCount;
|
| 16540 |
+
var rowData;
|
| 16541 |
+
var rowColumnCount;
|
| 16542 |
+
var errorNotice;
|
| 16543 |
+
for (rowCount in CSV.data) {
|
| 16544 |
+
rowData = CSV.data[rowCount].map(function (el) {
|
| 16545 |
+
return el.trim();
|
| 16546 |
+
});
|
| 16547 |
+
rowColumnCount = rowData.length;
|
| 16548 |
+
// set the number of row elements based on the first non-empty row
|
| 16549 |
+
if (columnCount === null) {
|
| 16550 |
+
columnCount = rowColumnCount;
|
| 16551 |
+
}
|
| 16552 |
+
// Process the row with the following assumptions:
|
| 16553 |
+
// 1. Each row should contain the same number of elements
|
| 16554 |
+
// 2. There should be at least 1 valid (as per HTML5 e-mail regex)
|
| 16555 |
+
// e-mail address on each row EXCEPT when the header option is set to true
|
| 16556 |
+
// 3. Duplicate addresses are skipped
|
| 16557 |
+
if (rowColumnCount === columnCount) {
|
| 16558 |
+
// determine position of email address inside an array; this is
|
| 16559 |
+
// done once and then email regex is run just on that element for each row
|
| 16560 |
+
if (emailColumnPosition === null) {
|
| 16561 |
+
for (column in rowData) {
|
| 16562 |
+
emailAddress = detectAndCleanupEmail(rowData[column]);
|
| 16563 |
+
if (emailColumnPosition === null
|
| 16564 |
+
&& window.emailRegex.test(emailAddress)) {
|
| 16565 |
+
emailColumnPosition = column;
|
| 16566 |
+
parsedEmails[emailAddress] = true; // add current e-mail to an object index
|
| 16567 |
+
rowData[column] = emailAddress;
|
| 16568 |
+
processedSubscribers[emailAddress] = rowData;
|
| 16569 |
+
}
|
| 16570 |
+
}
|
| 16571 |
+
if (emailColumnPosition === null
|
| 16572 |
+
&& advancedOptionHeader
|
| 16573 |
+
&& parseInt(rowCount) === 0) {
|
| 16574 |
+
isHeaderFound = true;
|
| 16575 |
+
processedSubscribers[0] = rowData;
|
| 16576 |
+
}
|
| 16577 |
+
}
|
| 16578 |
+
else if (rowData[emailColumnPosition] !== '') {
|
| 16579 |
+
email = detectAndCleanupEmail(rowData[emailColumnPosition]);
|
| 16580 |
+
if (_.has(parsedEmails, email)) {
|
| 16581 |
+
duplicateEmails.push(email);
|
| 16582 |
+
}
|
| 16583 |
+
else if (!window.emailRegex.test(email)) {
|
| 16584 |
+
invalidEmails.push(rowData[emailColumnPosition]);
|
| 16585 |
+
}
|
| 16586 |
+
// if we haven't yet processed this e-mail and it passed
|
| 16587 |
+
// the regex test, then process the row
|
| 16588 |
+
else {
|
| 16589 |
+
parsedEmails[email] = true;
|
| 16590 |
+
rowData[emailColumnPosition] = email;
|
| 16591 |
+
processedSubscribers[email] = rowData;
|
| 16592 |
+
}
|
| 16593 |
+
}
|
| 16594 |
+
}
|
| 16595 |
+
}
|
| 16596 |
+
// reindex array to avoid non-numeric indices
|
| 16597 |
+
processedSubscribers = _.values(processedSubscribers);
|
| 16598 |
+
// if the header options is set, there should be at least
|
| 16599 |
+
// 2 data rows, otherwise at least 1 data row
|
| 16600 |
+
if (processedSubscribers &&
|
| 16601 |
+
(isHeaderFound && processedSubscribers.length >= 2) ||
|
| 16602 |
+
(!isHeaderFound && processedSubscribers.length >= 1)
|
| 16603 |
+
) {
|
| 16604 |
+
// since we assume that the header line is always present, we need
|
| 16605 |
+
// to detect the header by checking if it contains a valid e-mail address
|
| 16606 |
+
window.importData.step1 = {
|
| 16607 |
+
header: (!window.emailRegex.test(
|
| 16608 |
+
processedSubscribers[0][emailColumnPosition])
|
| 16609 |
+
) ? processedSubscribers.shift() : null,
|
| 16610 |
+
subscribers: processedSubscribers,
|
| 16611 |
+
subscribersCount: processedSubscribers.length,
|
| 16612 |
+
duplicate: duplicateEmails,
|
| 16613 |
+
invalid: invalidEmails
|
| 16614 |
+
};
|
| 16615 |
+
MailPoet.trackEvent('Subscribers import started', {
|
| 16616 |
+
source: isFile ? 'file upload' : 'pasted data',
|
| 16617 |
+
'MailPoet Free version': window.mailpoet_version
|
| 16618 |
+
});
|
| 16619 |
+
router.navigate('step2', { trigger: true });
|
| 16620 |
+
}
|
| 16621 |
+
else {
|
| 16622 |
+
MailPoet.Modal.loading(false);
|
| 16623 |
+
errorNotice = MailPoet.I18n.t('noValidRecords');
|
| 16624 |
+
errorNotice = errorNotice.replace('[link]', MailPoet.I18n.t('csvKBLink'));
|
| 16625 |
+
errorNotice = errorNotice.replace('[/link]', '</a>');
|
| 16626 |
+
MailPoet.Notice.error(errorNotice);
|
| 16627 |
+
}
|
| 16628 |
+
}
|
| 16629 |
+
};
|
| 16630 |
+
}
|
| 16631 |
+
|
| 16632 |
+
function displayMailChimpLists(data) {
|
| 16633 |
+
var listSelectElement = mailChimpListsContainerElement.find('select');
|
| 16634 |
+
if (listSelectElement.data('select2')) {
|
| 16635 |
+
listSelectElement.select2('data', data);
|
| 16636 |
+
listSelectElement.trigger('change');
|
| 16637 |
+
}
|
| 16638 |
+
else {
|
| 16639 |
+
listSelectElement
|
| 16640 |
+
.select2({
|
| 16641 |
+
data: data,
|
| 16642 |
+
width: '20em',
|
| 16643 |
+
templateResult: function (item) {
|
| 16644 |
+
return item.name;
|
| 16645 |
+
},
|
| 16646 |
+
templateSelection: function (item) {
|
| 16647 |
+
return item.name;
|
| 16648 |
+
}
|
| 16649 |
+
})
|
| 16650 |
+
.change(function () {
|
| 16651 |
+
if (jQuery(this).val() !== null) {
|
| 16652 |
+
toggleNextStepButton(mailChimpProcessButtonElement, 'on');
|
| 16653 |
+
}
|
| 16654 |
+
else {
|
| 16655 |
+
toggleNextStepButton(mailChimpProcessButtonElement, 'off');
|
| 16656 |
+
}
|
| 16657 |
+
})
|
| 16658 |
+
.trigger('change');
|
| 16659 |
+
}
|
| 16660 |
+
mailChimpListsContainerElement.show();
|
| 16661 |
+
}
|
| 16662 |
+
|
| 16663 |
/*
|
| 16664 |
* Paste
|
| 16665 |
*/
|
| 16804 |
}
|
| 16805 |
});
|
| 16806 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16807 |
});
|
| 16808 |
|
| 16809 |
router.on('route:step2', function () {
|
| 16818 |
var filler;
|
| 16819 |
var fillerArray;
|
| 16820 |
var fillerPosition;
|
| 16821 |
+
var importResults;
|
| 16822 |
var duplicates;
|
| 16823 |
var email;
|
| 16824 |
if (typeof (window.importData.step1) === 'undefined') {
|
| 16845 |
|
| 16846 |
showCurrentStep();
|
| 16847 |
|
| 16848 |
+
function toggleNextStepButton(condition) {
|
| 16849 |
+
var disabled = 'button-disabled';
|
| 16850 |
+
if (condition === 'on') {
|
| 16851 |
+
nextStepButton.removeClass(disabled);
|
| 16852 |
+
return;
|
| 16853 |
+
}
|
| 16854 |
+
nextStepButton.addClass(disabled);
|
| 16855 |
+
}
|
| 16856 |
+
|
| 16857 |
// hide previous statistics/import results
|
| 16858 |
jQuery('#subscribers_data_parse_results:visible').html('');
|
| 16859 |
jQuery('#subscribers_data_import_results:visible').hide();
|
| 16863 |
// count repeating e-mails inside duplicate array and present them in
|
| 16864 |
// 'email (xN)' format
|
| 16865 |
duplicates = {};
|
| 16866 |
+
subscribers.duplicate.forEach(function (subscriberEmail) {
|
| 16867 |
+
duplicates[subscriberEmail] = (duplicates[subscriberEmail] || 0) + 1;
|
| 16868 |
});
|
| 16869 |
subscribers.duplicate = [];
|
| 16870 |
for (email in duplicates) {
|
| 16876 |
}
|
| 16877 |
}
|
| 16878 |
|
| 16879 |
+
importResults = {
|
| 16880 |
notice: MailPoet.I18n.t('importNoticeSkipped').replace(
|
| 16881 |
'%1$s',
|
| 16882 |
'<strong>' + (subscribers.invalid.length + subscribers.duplicate.length) + '</strong>'
|
| 16893 |
: null
|
| 16894 |
};
|
| 16895 |
jQuery('#subscribers_data_parse_results').html(
|
| 16896 |
+
subscribersDataParseResultsTemplate(importResults)
|
| 16897 |
);
|
| 16898 |
}
|
| 16899 |
|
| 16981 |
description: segmentDescription
|
| 16982 |
}
|
| 16983 |
}).done(function (response) {
|
| 16984 |
+
var selectedValues;
|
| 16985 |
window.mailpoetSegments.push({
|
| 16986 |
id: response.data.id,
|
| 16987 |
name: response.data.name,
|
| 16988 |
subscriberCount: 0
|
| 16989 |
});
|
| 16990 |
|
| 16991 |
+
selectedValues = segmentSelectElement.val();
|
| 16992 |
+
if (selectedValues === null) {
|
| 16993 |
+
selectedValues = [response.data.id];
|
| 16994 |
} else {
|
| 16995 |
+
selectedValues.push(response.data.id);
|
| 16996 |
}
|
| 16997 |
|
| 16998 |
enableSegmentSelection(window.mailpoetSegments);
|
| 16999 |
+
segmentSelectElement.val(selectedValues).trigger('change');
|
| 17000 |
jQuery('.mailpoet_segments:hidden').show();
|
| 17001 |
jQuery('.mailpoet_no_segments:visible').hide();
|
| 17002 |
MailPoet.Modal.close();
|
| 17024 |
// autodetect column types
|
| 17025 |
Handlebars.registerHelper(
|
| 17026 |
'show_and_match_columns',
|
| 17027 |
+
function (helperSubscribers, options) {
|
| 17028 |
var displayedColumns = [];
|
| 17029 |
var displayedColumnsIds = [];
|
| 17030 |
var i;
|
| 17033 |
var headerName;
|
| 17034 |
var headerNameMatch;
|
| 17035 |
// go through all elements of the first row in subscribers data
|
| 17036 |
+
for (i in helperSubscribers.subscribers[0]) {
|
| 17037 |
+
columnData = helperSubscribers.subscribers[0][i];
|
| 17038 |
columnId = 'ignore'; // set default column type
|
| 17039 |
// if the column is not undefined and has a valid e-mail, set type as email
|
| 17040 |
if (columnData % 1 !== 0 && window.emailRegex.test(columnData)) {
|
| 17041 |
columnId = 'email';
|
| 17042 |
+
} else if (helperSubscribers.header) {
|
| 17043 |
+
headerName = helperSubscribers.header[i];
|
| 17044 |
headerNameMatch = window.mailpoetColumns.map(function (el) {
|
| 17045 |
return el.name;
|
| 17046 |
}).indexOf(headerName);
|
| 17091 |
// if we're on the last line, show the total count of subscribers data
|
| 17092 |
else if (index === (subscribers.subscribers.length - 1)) {
|
| 17093 |
return subscribers.subscribersCount.toLocaleString();
|
|
|
|
|
|
|
| 17094 |
}
|
| 17095 |
+
return index + 1;
|
| 17096 |
});
|
| 17097 |
|
| 17098 |
// reduce subscribers object if the total length is greater than the
|
| 17104 |
);
|
| 17105 |
}
|
| 17106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17107 |
// filter subscribers' data to detect dates, emails, etc.
|
| 17108 |
function filterSubscribers() {
|
| 17109 |
var subscribersClone = jQuery.extend(true, {}, subscribers);
|
| 17110 |
var preventNextStep = false;
|
| 17111 |
var displayedColumns;
|
| 17112 |
jQuery(
|
| 17113 |
+
'[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]')
|
| 17114 |
+
.remove();
|
| 17115 |
displayedColumns = jQuery.map(
|
| 17116 |
jQuery('.mailpoet_subscribers_column_data_match'), function (element, elementIndex) {
|
| 17117 |
var columnId = jQuery(element).data('column-id');
|
| 17225 |
});
|
| 17226 |
// refresh table with susbcribers' data
|
| 17227 |
jQuery('#subscribers_data > table > tbody')
|
| 17228 |
+
.html(subscribersDataTemplatePartial(subscribersClone));
|
| 17229 |
|
| 17230 |
if (preventNextStep) {
|
| 17231 |
toggleNextStepButton('off');
|
| 17232 |
}
|
| 17233 |
else if (!jQuery('.mailpoet_notice.error:visible').length
|
| 17234 |
+
&& segmentSelectElement.val()) {
|
| 17235 |
toggleNextStepButton('on');
|
| 17236 |
}
|
| 17237 |
}
|
| 17238 |
|
| 17239 |
+
// render template
|
| 17240 |
+
jQuery('#subscribers_data > table').html(subscribersDataTemplate(subscribers));
|
| 17241 |
+
|
| 17242 |
+
// filter displayed data
|
| 17243 |
+
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 17244 |
+
.select2({
|
| 17245 |
+
data: window.mailpoetColumnsSelect2,
|
| 17246 |
+
width: '15em',
|
| 17247 |
+
templateResult: function (item) {
|
| 17248 |
+
return item.name;
|
| 17249 |
+
},
|
| 17250 |
+
templateSelection: function (item) {
|
| 17251 |
+
return item.name;
|
| 17252 |
+
}
|
| 17253 |
+
})
|
| 17254 |
+
.on('select2:selecting', function (selectEvent) {
|
| 17255 |
+
var selectElement = this;
|
| 17256 |
+
var selectedOptionId = selectEvent.params.args.data.id;
|
| 17257 |
+
// CREATE CUSTOM FIELD
|
| 17258 |
+
if (selectedOptionId === 'create') {
|
| 17259 |
+
selectEvent.preventDefault();
|
| 17260 |
+
jQuery(selectElement).select2('close');
|
| 17261 |
+
MailPoet.Modal.popup({
|
| 17262 |
+
title: MailPoet.I18n.t('addNewField'),
|
| 17263 |
+
template: jQuery('#form_template_field_form').html()
|
| 17264 |
+
});
|
| 17265 |
+
jQuery('#form_field_new').parsley().on('form:submit', function () {
|
| 17266 |
+
// get data
|
| 17267 |
+
var data = jQuery(this.$element).mailpoetSerializeObject();
|
| 17268 |
+
|
| 17269 |
+
// save custom field
|
| 17270 |
+
MailPoet.Ajax.post({
|
| 17271 |
+
api_version: window.mailpoet_api_version,
|
| 17272 |
+
endpoint: 'customFields',
|
| 17273 |
+
action: 'save',
|
| 17274 |
+
data: data
|
| 17275 |
+
}).done(function (response) {
|
| 17276 |
+
var newColumnData = {
|
| 17277 |
+
id: response.data.id,
|
| 17278 |
+
name: response.data.name,
|
| 17279 |
+
type: response.data.type,
|
| 17280 |
+
params: response.data.params,
|
| 17281 |
+
custom: true
|
| 17282 |
+
};
|
| 17283 |
+
// if this is the first custom column, create an "optgroup"
|
| 17284 |
+
if (window.mailpoetColumnsSelect2.length === 2) {
|
| 17285 |
+
window.mailpoetColumnsSelect2.push({
|
| 17286 |
+
name: MailPoet.I18n.t('userColumns'),
|
| 17287 |
+
children: []
|
| 17288 |
+
});
|
| 17289 |
+
}
|
| 17290 |
+
window.mailpoetColumnsSelect2[2].children.push(newColumnData);
|
| 17291 |
+
window.mailpoetColumns.push(newColumnData);
|
| 17292 |
+
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 17293 |
+
.each(function () {
|
| 17294 |
+
jQuery(this)
|
| 17295 |
+
.html('')
|
| 17296 |
+
.select2('destroy')
|
| 17297 |
+
.select2({
|
| 17298 |
+
data: window.mailpoetColumnsSelect2,
|
| 17299 |
+
width: '15em',
|
| 17300 |
+
templateResult: function (item) {
|
| 17301 |
+
return item.name;
|
| 17302 |
+
},
|
| 17303 |
+
templateSelection: function (item) {
|
| 17304 |
+
return item.name;
|
| 17305 |
+
}
|
| 17306 |
+
});
|
| 17307 |
+
});
|
| 17308 |
+
jQuery(selectElement).data('column-id', newColumnData.id);
|
| 17309 |
+
jQuery(selectElement).data('validation-rule', false);
|
| 17310 |
+
filterSubscribers();
|
| 17311 |
+
// close popup
|
| 17312 |
+
MailPoet.Modal.close();
|
| 17313 |
+
}).fail(function (response) {
|
| 17314 |
+
if (response.errors.length > 0) {
|
| 17315 |
+
MailPoet.Notice.error(
|
| 17316 |
+
response.errors.map(function (error) { return error.message; }),
|
| 17317 |
+
{ positionAfter: '#field_name' }
|
| 17318 |
+
);
|
| 17319 |
+
}
|
| 17320 |
+
});
|
| 17321 |
+
return false;
|
| 17322 |
+
});
|
| 17323 |
+
}
|
| 17324 |
+
// CHANGE COLUMN
|
| 17325 |
+
else {
|
| 17326 |
+
// check for duplicate values in all select options
|
| 17327 |
+
jQuery('select.mailpoet_subscribers_column_data_match')
|
| 17328 |
+
.each(function () {
|
| 17329 |
+
var element = this;
|
| 17330 |
+
var elementId = jQuery(element).val();
|
| 17331 |
+
// if another column has the same value and it's not an 'ignore', prompt user
|
| 17332 |
+
if (elementId === selectedOptionId
|
| 17333 |
+
&& elementId !== 'ignore') {
|
| 17334 |
+
if (confirm(MailPoet.I18n.t('selectedValueAlreadyMatched') + ' ' + MailPoet.I18n.t('confirmCorrespondingColumn'))) {
|
| 17335 |
+
jQuery(element).data('column-id', 'ignore');
|
| 17336 |
+
}
|
| 17337 |
+
else {
|
| 17338 |
+
selectEvent.preventDefault();
|
| 17339 |
+
jQuery(selectElement).select2('close');
|
| 17340 |
+
}
|
| 17341 |
+
}
|
| 17342 |
+
});
|
| 17343 |
+
}
|
| 17344 |
+
})
|
| 17345 |
+
.on('select2:select', function (selectEvent) {
|
| 17346 |
+
var selectElement = this;
|
| 17347 |
+
var selectedOptionId = selectEvent.params.data.id;
|
| 17348 |
+
jQuery(selectElement).data('column-id', selectedOptionId);
|
| 17349 |
+
filterSubscribers();
|
| 17350 |
+
});
|
| 17351 |
|
| 17352 |
previousStepButton.off().on('click', function () {
|
| 17353 |
router.navigate('step1', { trigger: true });
|
| 17359 |
var batchNumber = 0;
|
| 17360 |
var batchSize = 2000;
|
| 17361 |
var timestamp = Date.now() / 1000;
|
| 17362 |
+
var clickImportResults = {
|
|
|
|
| 17363 |
created: 0,
|
| 17364 |
updated: 0,
|
| 17365 |
errors: [],
|
| 17366 |
segments: []
|
| 17367 |
};
|
| 17368 |
+
var clickSubscribers;
|
| 17369 |
var splitSubscribers;
|
| 17370 |
|
| 17371 |
if (jQuery(this).hasClass('button-disabled')) {
|
| 17372 |
return;
|
| 17373 |
}
|
| 17374 |
MailPoet.Modal.loading(true);
|
| 17375 |
+
splitSubscribers = function (localSubscribers, size) {
|
| 17376 |
+
return localSubscribers.reduce(function (res, item, index) {
|
| 17377 |
if (index % size === 0) {
|
| 17378 |
res.push([]);
|
| 17379 |
}
|
| 17381 |
return res;
|
| 17382 |
}, []);
|
| 17383 |
};
|
| 17384 |
+
clickSubscribers = splitSubscribers(window.importData.step1.subscribers, batchSize);
|
| 17385 |
|
| 17386 |
_.each(jQuery('select.mailpoet_subscribers_column_data_match'),
|
| 17387 |
function (column, columnIndex) {
|
| 17393 |
columns[columnId] = { index: columnIndex, validation_rule: validationRule };
|
| 17394 |
});
|
| 17395 |
|
| 17396 |
+
_.each(clickSubscribers, function () {
|
| 17397 |
+
queue.add(function (addQueue) {
|
| 17398 |
+
addQueue.pause();
|
| 17399 |
MailPoet.Ajax.post({
|
| 17400 |
api_version: window.mailpoet_api_version,
|
| 17401 |
endpoint: 'ImportExport',
|
| 17402 |
action: 'processImport',
|
| 17403 |
data: JSON.stringify({
|
| 17404 |
columns: columns,
|
| 17405 |
+
subscribers: clickSubscribers[batchNumber],
|
| 17406 |
timestamp: timestamp,
|
| 17407 |
segments: segmentSelectElement.val(),
|
| 17408 |
updateSubscribers: (jQuery(':radio[name="subscriber_update_option"]:checked').val() === 'yes')
|
| 17409 |
})
|
| 17410 |
}).done(function (response) {
|
| 17411 |
+
clickImportResults.created += response.data.created;
|
| 17412 |
+
clickImportResults.updated += response.data.updated;
|
| 17413 |
+
clickImportResults.segments = response.data.segments;
|
| 17414 |
+
clickImportResults.added_to_segment_with_welcome_notification = response.data.added_to_segment_with_welcome_notification;
|
| 17415 |
+
addQueue.run();
|
| 17416 |
}).fail(function (response) {
|
| 17417 |
MailPoet.Modal.loading(false);
|
| 17418 |
if (response.errors.length > 0) {
|
| 17430 |
|
| 17431 |
queue.onComplete(function () {
|
| 17432 |
MailPoet.Modal.loading(false);
|
| 17433 |
+
if (clickImportResults.errors.length > 0 && !clickImportResults.updated && !clickImportResults.created) {
|
| 17434 |
+
MailPoet.Notice.error(_.flatten(clickImportResults.errors)
|
| 17435 |
);
|
| 17436 |
}
|
| 17437 |
else {
|
| 17438 |
+
window.mailpoetSegments = clickImportResults.segments;
|
| 17439 |
+
clickImportResults.segments = _.map(segmentSelectElement.select2('data'),
|
| 17440 |
function (data) {
|
| 17441 |
return data.name;
|
| 17442 |
});
|
| 17443 |
+
window.importData.step2 = clickImportResults;
|
| 17444 |
enableSegmentSelection(window.mailpoetSegments);
|
| 17445 |
router.navigate('step3', { trigger: true });
|
| 17446 |
}
|
| 17523 |
|
| 17524 |
/***/ },
|
| 17525 |
|
| 17526 |
+
/***/ 554:
|
| 17527 |
/***/ function(module, exports) {
|
| 17528 |
|
| 17529 |
/*!
|
| 17535 |
|
| 17536 |
/***/ },
|
| 17537 |
|
| 17538 |
+
/***/ 555:
|
| 17539 |
/***/ function(module, exports) {
|
| 17540 |
|
| 17541 |
/*
|
| 17621 |
|
| 17622 |
/***/ },
|
| 17623 |
|
| 17624 |
+
/***/ 556:
|
| 17625 |
/***/ function(module, exports, __webpack_require__) {
|
| 17626 |
|
| 17627 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 17628 |
__webpack_require__(280),
|
| 17629 |
__webpack_require__(275),
|
| 17630 |
__webpack_require__(276),
|
| 17631 |
+
__webpack_require__(553)
|
| 17632 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 17633 |
_,
|
| 17634 |
jQuery,
|
| 17645 |
var groupBySegmentOptionElement;
|
| 17646 |
var nextStepButton;
|
| 17647 |
var renderSegmentsAndFields;
|
| 17648 |
+
var subscribersExportTemplate;
|
| 17649 |
if (!window.exportData.segments) {
|
| 17650 |
return;
|
| 17651 |
}
|
| 17652 |
+
subscribersExportTemplate =
|
| 17653 |
Handlebars.compile(jQuery('#mailpoet_subscribers_export_template').html());
|
| 17654 |
|
| 17655 |
// render template
|
| 17656 |
+
jQuery('#mailpoet_subscribers_export > div.inside').html(subscribersExportTemplate(window.exportData));
|
| 17657 |
+
|
| 17658 |
+
function toggleNextStepButton(condition) {
|
| 17659 |
+
var disabled = 'button-disabled';
|
| 17660 |
+
if (condition === 'on') {
|
| 17661 |
+
nextStepButton.removeClass(disabled);
|
| 17662 |
+
}
|
| 17663 |
+
else {
|
| 17664 |
+
nextStepButton.addClass(disabled);
|
| 17665 |
+
}
|
| 17666 |
+
}
|
| 17667 |
|
| 17668 |
// define reusable variables
|
| 17669 |
segmentsContainerElement = jQuery('#export_lists');
|
| 17762 |
segmentsContainerElement.val(selectedSegments).trigger('change');
|
| 17763 |
});
|
| 17764 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17765 |
nextStepButton.click(function () {
|
| 17766 |
var exportFormat;
|
| 17767 |
if (jQuery(this).hasClass('button-disabled')) {
|
assets/js/{admin_vendor.0305005e.js → admin_vendor.7914137d.js}
RENAMED
|
@@ -30794,26 +30794,22 @@ webpackJsonp([1],[
|
|
| 30794 |
);
|
| 30795 |
}
|
| 30796 |
|
| 30797 |
-
var
|
| 30798 |
-
var
|
| 30799 |
|
| 30800 |
-
if (
|
| 30801 |
(function () {
|
| 30802 |
-
var
|
| 30803 |
-
|
| 30804 |
-
|
| 30805 |
-
|
| 30806 |
-
|
| 30807 |
-
}
|
| 30808 |
-
}
|
| 30809 |
-
|
| 30810 |
-
var custom_action = null;
|
| 30811 |
|
| 30812 |
if (action.name === 'trash') {
|
| 30813 |
-
|
| 30814 |
'span',
|
| 30815 |
{ key: 'action-' + index, className: 'trash' },
|
| 30816 |
-
!
|
| 30817 |
_react2['default'].createElement(
|
| 30818 |
'a',
|
| 30819 |
{
|
|
@@ -30823,28 +30819,28 @@ webpackJsonp([1],[
|
|
| 30823 |
)
|
| 30824 |
);
|
| 30825 |
} else if (action.refresh) {
|
| 30826 |
-
|
| 30827 |
'span',
|
| 30828 |
{
|
| 30829 |
onClick: _this.props.onRefreshItems,
|
| 30830 |
key: 'action-' + index, className: action.name },
|
| 30831 |
-
!
|
| 30832 |
action.link(_this.props.item)
|
| 30833 |
);
|
| 30834 |
} else if (action.link) {
|
| 30835 |
-
|
| 30836 |
'span',
|
| 30837 |
{
|
| 30838 |
key: 'action-' + index, className: action.name },
|
| 30839 |
-
!
|
| 30840 |
action.link(_this.props.item)
|
| 30841 |
);
|
| 30842 |
} else {
|
| 30843 |
-
|
| 30844 |
'span',
|
| 30845 |
{
|
| 30846 |
key: 'action-' + index, className: action.name },
|
| 30847 |
-
!
|
| 30848 |
_react2['default'].createElement(
|
| 30849 |
'a',
|
| 30850 |
{ href: 'javascript:;', onClick: action.onClick !== undefined ? action.onClick.bind(null, _this.props.item, _this.props.onRefreshItems) : false },
|
|
@@ -30853,15 +30849,15 @@ webpackJsonp([1],[
|
|
| 30853 |
);
|
| 30854 |
}
|
| 30855 |
|
| 30856 |
-
if (
|
| 30857 |
-
|
| 30858 |
}
|
| 30859 |
|
| 30860 |
-
return
|
| 30861 |
});
|
| 30862 |
})();
|
| 30863 |
} else {
|
| 30864 |
-
|
| 30865 |
'span',
|
| 30866 |
{ className: 'edit' },
|
| 30867 |
_react2['default'].createElement(
|
|
@@ -30927,7 +30923,7 @@ webpackJsonp([1],[
|
|
| 30927 |
_react2['default'].createElement(
|
| 30928 |
'div',
|
| 30929 |
{ className: 'row-actions' },
|
| 30930 |
-
|
| 30931 |
),
|
| 30932 |
_react2['default'].createElement(
|
| 30933 |
'button',
|
|
@@ -30943,11 +30939,11 @@ webpackJsonp([1],[
|
|
| 30943 |
);
|
| 30944 |
}
|
| 30945 |
|
| 30946 |
-
var
|
| 30947 |
|
| 30948 |
return _react2['default'].createElement(
|
| 30949 |
'tr',
|
| 30950 |
-
{ className:
|
| 30951 |
checkbox,
|
| 30952 |
this.props.onRenderItem(this.props.item, actions)
|
| 30953 |
);
|
|
@@ -30984,7 +30980,7 @@ webpackJsonp([1],[
|
|
| 30984 |
)
|
| 30985 |
);
|
| 30986 |
}
|
| 30987 |
-
var
|
| 30988 |
});
|
| 30989 |
|
| 30990 |
return _react2['default'].createElement(
|
|
@@ -30992,7 +30988,7 @@ webpackJsonp([1],[
|
|
| 30992 |
null,
|
| 30993 |
_react2['default'].createElement(
|
| 30994 |
'tr',
|
| 30995 |
-
{ className:
|
| 30996 |
_react2['default'].createElement(
|
| 30997 |
'td',
|
| 30998 |
{ colSpan: this.props.columns.length + (this.props.is_selectable ? 1 : 0) },
|
|
@@ -31067,7 +31063,7 @@ webpackJsonp([1],[
|
|
| 31067 |
var state = this.getInitialState();
|
| 31068 |
// check for url params
|
| 31069 |
if (params.splat) {
|
| 31070 |
-
params.splat.split('/').
|
| 31071 |
var _getParam = _this3.getParam(param);
|
| 31072 |
|
| 31073 |
var _getParam2 = _slicedToArray(_getParam, 2);
|
|
@@ -31078,7 +31074,7 @@ webpackJsonp([1],[
|
|
| 31078 |
var filters = {};
|
| 31079 |
switch (key) {
|
| 31080 |
case 'filter':
|
| 31081 |
-
value.split('&').
|
| 31082 |
var _pair$split = pair.split('=');
|
| 31083 |
|
| 31084 |
var _pair$split2 = _slicedToArray(_pair$split, 2);
|
|
@@ -31099,7 +31095,7 @@ webpackJsonp([1],[
|
|
| 31099 |
|
| 31100 |
// limit per page
|
| 31101 |
if (this.props.limit !== undefined) {
|
| 31102 |
-
state.limit = Math.abs(
|
| 31103 |
}
|
| 31104 |
|
| 31105 |
// sort by
|
|
@@ -31140,12 +31136,17 @@ webpackJsonp([1],[
|
|
| 31140 |
} else if (value === Boolean(value)) {
|
| 31141 |
value = value.toString();
|
| 31142 |
}
|
| 31143 |
-
|
| 31144 |
-
|
| 31145 |
-
|
| 31146 |
-
}
|
| 31147 |
-
}).filter(function (
|
| 31148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31149 |
}).join('/');
|
| 31150 |
|
| 31151 |
// set url
|
|
@@ -31157,22 +31158,22 @@ webpackJsonp([1],[
|
|
| 31157 |
}
|
| 31158 |
},
|
| 31159 |
getUrlWithParams: function getUrlWithParams(params) {
|
| 31160 |
-
var
|
| 31161 |
|
| 31162 |
-
if (
|
| 31163 |
-
|
| 31164 |
-
return '/' +
|
| 31165 |
}
|
| 31166 |
return '/' + params;
|
| 31167 |
},
|
| 31168 |
-
setBaseUrlParams: function setBaseUrlParams(
|
| 31169 |
var _this5 = this;
|
| 31170 |
|
| 31171 |
-
var ret =
|
| 31172 |
if (ret.indexOf(':') !== -1) {
|
| 31173 |
(function () {
|
| 31174 |
var params = _this5.getParams();
|
| 31175 |
-
Object.keys(params).
|
| 31176 |
if (ret.indexOf(':' + key) !== -1) {
|
| 31177 |
ret = ret.replace(':' + key, params[key]);
|
| 31178 |
}
|
|
@@ -31346,10 +31347,10 @@ webpackJsonp([1],[
|
|
| 31346 |
}), { scroll: true });
|
| 31347 |
});
|
| 31348 |
},
|
| 31349 |
-
handleBulkAction: function handleBulkAction(
|
| 31350 |
var _this12 = this;
|
| 31351 |
|
| 31352 |
-
if (this.state.selection === false && this.state.selected_ids.length === 0 &&
|
| 31353 |
return false;
|
| 31354 |
}
|
| 31355 |
|
|
@@ -31364,8 +31365,8 @@ webpackJsonp([1],[
|
|
| 31364 |
group: this.state.group,
|
| 31365 |
search: this.state.search
|
| 31366 |
};
|
| 31367 |
-
if (
|
| 31368 |
-
data.listing.selection =
|
| 31369 |
}
|
| 31370 |
|
| 31371 |
return _mailpoet2['default'].Ajax.post({
|
|
@@ -31395,47 +31396,47 @@ webpackJsonp([1],[
|
|
| 31395 |
_this13.setParams();
|
| 31396 |
});
|
| 31397 |
},
|
| 31398 |
-
handleSort: function handleSort(
|
| 31399 |
var _this14 = this;
|
| 31400 |
|
| 31401 |
-
var
|
| 31402 |
|
| 31403 |
this.setState({
|
| 31404 |
-
sort_by:
|
| 31405 |
-
sort_order:
|
| 31406 |
}, function () {
|
| 31407 |
_this14.setParams();
|
| 31408 |
});
|
| 31409 |
},
|
| 31410 |
-
handleSelectItem: function handleSelectItem(id,
|
| 31411 |
-
var
|
| 31412 |
var selection = false;
|
| 31413 |
|
| 31414 |
-
if (
|
| 31415 |
-
|
| 31416 |
// check whether all items on the page are selected
|
| 31417 |
if ((0, _jquery2['default'])('tbody .check-column :checkbox:not(:checked)').length === 0) {
|
| 31418 |
selection = 'page';
|
| 31419 |
}
|
| 31420 |
} else {
|
| 31421 |
-
|
| 31422 |
}
|
| 31423 |
|
| 31424 |
this.setState({
|
| 31425 |
selection: selection,
|
| 31426 |
-
selected_ids:
|
| 31427 |
});
|
| 31428 |
},
|
| 31429 |
-
handleSelectItems: function handleSelectItems(
|
| 31430 |
-
if (
|
| 31431 |
this.clearSelection();
|
| 31432 |
} else {
|
| 31433 |
-
var
|
| 31434 |
-
return
|
| 31435 |
});
|
| 31436 |
|
| 31437 |
this.setState({
|
| 31438 |
-
selected_ids:
|
| 31439 |
selection: 'page'
|
| 31440 |
});
|
| 31441 |
}
|
|
@@ -31501,8 +31502,8 @@ webpackJsonp([1],[
|
|
| 31501 |
},
|
| 31502 |
render: function render() {
|
| 31503 |
var items = this.state.items;
|
| 31504 |
-
var
|
| 31505 |
-
var
|
| 31506 |
|
| 31507 |
// columns
|
| 31508 |
var columns = this.props.columns || [];
|
|
@@ -31511,10 +31512,10 @@ webpackJsonp([1],[
|
|
| 31511 |
});
|
| 31512 |
|
| 31513 |
// bulk actions
|
| 31514 |
-
var
|
| 31515 |
|
| 31516 |
-
if (this.state.group === 'trash' &&
|
| 31517 |
-
|
| 31518 |
name: 'restore',
|
| 31519 |
label: _mailpoet2['default'].I18n.t('restore'),
|
| 31520 |
onSuccess: this.props.messages.onRestore
|
|
@@ -31526,9 +31527,9 @@ webpackJsonp([1],[
|
|
| 31526 |
}
|
| 31527 |
|
| 31528 |
// item actions
|
| 31529 |
-
var
|
| 31530 |
|
| 31531 |
-
var
|
| 31532 |
|
| 31533 |
// search
|
| 31534 |
var search = _react2['default'].createElement(_listingSearchJsx2['default'], {
|
|
@@ -31565,7 +31566,7 @@ webpackJsonp([1],[
|
|
| 31565 |
{ className: 'tablenav top clearfix' },
|
| 31566 |
_react2['default'].createElement(_listingBulk_actionsJsx2['default'], {
|
| 31567 |
count: this.state.count,
|
| 31568 |
-
bulk_actions:
|
| 31569 |
selection: this.state.selection,
|
| 31570 |
selected_ids: this.state.selected_ids,
|
| 31571 |
onBulkAction: this.handleBulkAction }),
|
|
@@ -31585,7 +31586,7 @@ webpackJsonp([1],[
|
|
| 31585 |
),
|
| 31586 |
_react2['default'].createElement(
|
| 31587 |
'table',
|
| 31588 |
-
{ className:
|
| 31589 |
_react2['default'].createElement(
|
| 31590 |
'thead',
|
| 31591 |
null,
|
|
@@ -31593,10 +31594,10 @@ webpackJsonp([1],[
|
|
| 31593 |
onSort: this.handleSort,
|
| 31594 |
onSelectItems: this.handleSelectItems,
|
| 31595 |
selection: this.state.selection,
|
| 31596 |
-
sort_by:
|
| 31597 |
-
sort_order:
|
| 31598 |
columns: columns,
|
| 31599 |
-
is_selectable:
|
| 31600 |
),
|
| 31601 |
_react2['default'].createElement(ListingItems, {
|
| 31602 |
onRenderItem: this.handleRenderItem,
|
|
@@ -31605,7 +31606,7 @@ webpackJsonp([1],[
|
|
| 31605 |
onTrashItem: this.handleTrashItem,
|
| 31606 |
onRefreshItems: this.handleRefreshItems,
|
| 31607 |
columns: columns,
|
| 31608 |
-
is_selectable:
|
| 31609 |
onSelectItem: this.handleSelectItem,
|
| 31610 |
onSelectAll: this.handleSelectAll,
|
| 31611 |
selection: this.state.selection,
|
|
@@ -31614,7 +31615,7 @@ webpackJsonp([1],[
|
|
| 31614 |
group: this.state.group,
|
| 31615 |
count: this.state.count,
|
| 31616 |
limit: this.state.limit,
|
| 31617 |
-
item_actions:
|
| 31618 |
messages: messages,
|
| 31619 |
items: items }),
|
| 31620 |
_react2['default'].createElement(
|
|
@@ -31624,10 +31625,10 @@ webpackJsonp([1],[
|
|
| 31624 |
onSort: this.handleSort,
|
| 31625 |
onSelectItems: this.handleSelectItems,
|
| 31626 |
selection: this.state.selection,
|
| 31627 |
-
sort_by:
|
| 31628 |
-
sort_order:
|
| 31629 |
columns: columns,
|
| 31630 |
-
is_selectable:
|
| 31631 |
)
|
| 31632 |
),
|
| 31633 |
_react2['default'].createElement(
|
|
@@ -31635,7 +31636,7 @@ webpackJsonp([1],[
|
|
| 31635 |
{ className: 'tablenav bottom' },
|
| 31636 |
_react2['default'].createElement(_listingBulk_actionsJsx2['default'], {
|
| 31637 |
count: this.state.count,
|
| 31638 |
-
bulk_actions:
|
| 31639 |
selection: this.state.selection,
|
| 31640 |
selected_ids: this.state.selected_ids,
|
| 31641 |
onBulkAction: this.handleBulkAction }),
|
|
@@ -33254,7 +33255,7 @@ webpackJsonp([1],[
|
|
| 33254 |
return;
|
| 33255 |
}
|
| 33256 |
|
| 33257 |
-
var
|
| 33258 |
|
| 33259 |
var data = action.getData !== undefined ? action.getData() : {};
|
| 33260 |
|
|
@@ -33266,7 +33267,7 @@ webpackJsonp([1],[
|
|
| 33266 |
}
|
| 33267 |
|
| 33268 |
if (data.action) {
|
| 33269 |
-
var promise = this.props.onBulkAction(
|
| 33270 |
if (promise !== false) {
|
| 33271 |
promise.then(onSuccess);
|
| 33272 |
}
|
|
@@ -33278,10 +33279,10 @@ webpackJsonp([1],[
|
|
| 33278 |
});
|
| 33279 |
},
|
| 33280 |
getSelectedAction: function getSelectedAction() {
|
| 33281 |
-
var
|
| 33282 |
-
if (
|
| 33283 |
var action = this.props.bulk_actions.filter(function (act) {
|
| 33284 |
-
return act.name ===
|
| 33285 |
});
|
| 33286 |
|
| 33287 |
if (action.length > 0) {
|
|
@@ -33416,9 +33417,9 @@ webpackJsonp([1],[
|
|
| 33416 |
displayName: 'ListingColumn',
|
| 33417 |
|
| 33418 |
handleSort: function handleSort() {
|
| 33419 |
-
var
|
| 33420 |
-
var
|
| 33421 |
-
this.props.onSort(
|
| 33422 |
},
|
| 33423 |
render: function render() {
|
| 33424 |
var classes = (0, _classnames2['default'])('manage-column', { 'column-primary': this.props.column.is_primary }, { sortable: this.props.column.sortable }, this.props.column.sorted, { sorted: this.props.sort_by === this.props.column.name });
|
|
@@ -33490,7 +33491,7 @@ webpackJsonp([1],[
|
|
| 33490 |
this.setPage(this.constrainPage(parseInt(this.props.page, 10) + 1));
|
| 33491 |
},
|
| 33492 |
constrainPage: function constrainPage(page) {
|
| 33493 |
-
return Math.min(Math.max(1, Math.abs(
|
| 33494 |
},
|
| 33495 |
handleSetManualPage: function handleSetManualPage(e) {
|
| 33496 |
if (e.which === 13) {
|
|
@@ -33663,7 +33664,7 @@ webpackJsonp([1],[
|
|
| 33663 |
var classes = classNames('tablenav-pages', { 'one-page': this.props.count <= this.props.limit });
|
| 33664 |
|
| 33665 |
var numberOfItemsLabel = undefined;
|
| 33666 |
-
if (this.props.count
|
| 33667 |
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsSingular');
|
| 33668 |
} else {
|
| 33669 |
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsMultiple').replace('%$1d', this.props.count.toLocaleString());
|
|
@@ -33805,7 +33806,7 @@ webpackJsonp([1],[
|
|
| 33805 |
var _this = this;
|
| 33806 |
|
| 33807 |
var filters = {};
|
| 33808 |
-
this.getAvailableFilters().
|
| 33809 |
filters[_this.refs['filter-' + i].name] = _this.refs['filter-' + i].value;
|
| 33810 |
});
|
| 33811 |
if (this.props.onBeforeSelectFilter) {
|
|
@@ -33825,16 +33826,16 @@ webpackJsonp([1],[
|
|
| 33825 |
componentDidUpdate: function componentDidUpdate() {
|
| 33826 |
var _this2 = this;
|
| 33827 |
|
| 33828 |
-
var
|
| 33829 |
-
this.getAvailableFilters().
|
| 33830 |
-
if (
|
| 33831 |
-
jQuery(_this2.refs['filter-' + i]).val(
|
| 33832 |
}
|
| 33833 |
});
|
| 33834 |
},
|
| 33835 |
render: function render() {
|
| 33836 |
var filters = this.props.filters;
|
| 33837 |
-
var
|
| 33838 |
return React.createElement(
|
| 33839 |
'select',
|
| 33840 |
{
|
|
@@ -33857,7 +33858,7 @@ webpackJsonp([1],[
|
|
| 33857 |
|
| 33858 |
var button = undefined;
|
| 33859 |
|
| 33860 |
-
if (
|
| 33861 |
button = React.createElement('input', {
|
| 33862 |
id: 'post-query-submit',
|
| 33863 |
onClick: this.handleFilterAction,
|
|
@@ -33866,9 +33867,9 @@ webpackJsonp([1],[
|
|
| 33866 |
className: 'button' });
|
| 33867 |
}
|
| 33868 |
|
| 33869 |
-
var
|
| 33870 |
if (this.props.group === 'trash') {
|
| 33871 |
-
|
| 33872 |
onClick: this.handleEmptyTrash,
|
| 33873 |
type: 'submit',
|
| 33874 |
value: MailPoet.I18n.t('emptyTrash'),
|
|
@@ -33879,9 +33880,9 @@ webpackJsonp([1],[
|
|
| 33879 |
return React.createElement(
|
| 33880 |
'div',
|
| 33881 |
{ className: 'alignleft actions actions' },
|
| 33882 |
-
|
| 33883 |
button,
|
| 33884 |
-
|
| 33885 |
);
|
| 33886 |
}
|
| 33887 |
});
|
|
@@ -33917,7 +33918,7 @@ webpackJsonp([1],[
|
|
| 33917 |
return this.state.select2 === true;
|
| 33918 |
},
|
| 33919 |
componentDidMount: function componentDidMount() {
|
| 33920 |
-
if (this.allowMultipleValues()) {
|
| 33921 |
this.setupSelect2();
|
| 33922 |
}
|
| 33923 |
},
|
|
@@ -33927,7 +33928,7 @@ webpackJsonp([1],[
|
|
| 33927 |
}
|
| 33928 |
},
|
| 33929 |
componentWillUnmount: function componentWillUnmount() {
|
| 33930 |
-
if (this.allowMultipleValues()) {
|
| 33931 |
this.destroySelect2();
|
| 33932 |
}
|
| 33933 |
},
|
|
@@ -33985,9 +33986,14 @@ webpackJsonp([1],[
|
|
| 33985 |
return null;
|
| 33986 |
},
|
| 33987 |
loadCachedItems: function loadCachedItems() {
|
|
|
|
| 33988 |
if (typeof window['mailpoet_' + this.props.field.endpoint] !== 'undefined') {
|
| 33989 |
-
|
|
|
|
|
|
|
|
|
|
| 33990 |
|
|
|
|
| 33991 |
if (this.props.field.filter !== undefined) {
|
| 33992 |
items = items.filter(this.props.field.filter);
|
| 33993 |
}
|
|
@@ -34041,6 +34047,14 @@ webpackJsonp([1],[
|
|
| 34041 |
}
|
| 34042 |
return value;
|
| 34043 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34044 |
render: function render() {
|
| 34045 |
var _this = this;
|
| 34046 |
|
|
@@ -34070,6 +34084,7 @@ webpackJsonp([1],[
|
|
| 34070 |
multiple: this.props.field.multiple,
|
| 34071 |
defaultValue: this.getSelectedValues()
|
| 34072 |
}, this.props.field.validation),
|
|
|
|
| 34073 |
options
|
| 34074 |
);
|
| 34075 |
}
|
|
@@ -39893,8 +39908,6 @@ webpackJsonp([1],[
|
|
| 39893 |
if (props.item === undefined) {
|
| 39894 |
this.refs.form.reset();
|
| 39895 |
}
|
| 39896 |
-
} else {
|
| 39897 |
-
this.loadItem(props.params.id);
|
| 39898 |
}
|
| 39899 |
},
|
| 39900 |
loadItem: function loadItem(id) {
|
|
@@ -39914,6 +39927,9 @@ webpackJsonp([1],[
|
|
| 39914 |
loading: false,
|
| 39915 |
item: response.data
|
| 39916 |
});
|
|
|
|
|
|
|
|
|
|
| 39917 |
}).fail(function () {
|
| 39918 |
_this.setState({
|
| 39919 |
loading: false,
|
|
@@ -39939,9 +39955,9 @@ webpackJsonp([1],[
|
|
| 39939 |
|
| 39940 |
// only get values from displayed fields
|
| 39941 |
var item = {};
|
| 39942 |
-
this.props.fields.
|
| 39943 |
if (field.fields !== undefined) {
|
| 39944 |
-
field.fields.
|
| 39945 |
item[subfield.name] = _this2.state.item[subfield.name];
|
| 39946 |
});
|
| 39947 |
} else {
|
|
@@ -40140,6 +40156,10 @@ webpackJsonp([1],[
|
|
| 40140 |
case 'reactComponent':
|
| 40141 |
field = React.createElement(data.field.component, data);
|
| 40142 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40143 |
}
|
| 40144 |
|
| 40145 |
if (inline === true) {
|
|
@@ -40186,7 +40206,7 @@ webpackJsonp([1],[
|
|
| 40186 |
|
| 40187 |
return React.createElement(
|
| 40188 |
'tr',
|
| 40189 |
-
|
| 40190 |
React.createElement(
|
| 40191 |
'th',
|
| 40192 |
{ scope: 'row' },
|
|
@@ -40267,7 +40287,7 @@ webpackJsonp([1],[
|
|
| 40267 |
type: "text",
|
| 40268 |
className: "regular-text",
|
| 40269 |
name: this.props.field.name,
|
| 40270 |
-
id:
|
| 40271 |
value: this.props.item[this.props.field.name],
|
| 40272 |
placeholder: this.props.field.placeholder,
|
| 40273 |
defaultValue: this.props.field.defaultValue,
|
|
@@ -40340,11 +40360,10 @@ webpackJsonp([1],[
|
|
| 40340 |
keys = Object.keys(this.props.field.values);
|
| 40341 |
}
|
| 40342 |
|
| 40343 |
-
var options = keys.
|
| 40344 |
-
if (filter
|
| 40345 |
-
|
| 40346 |
-
|
| 40347 |
-
|
| 40348 |
return _react2['default'].createElement(
|
| 40349 |
'option',
|
| 40350 |
{
|
|
@@ -40374,11 +40393,11 @@ webpackJsonp([1],[
|
|
| 40374 |
/* 298 */
|
| 40375 |
/***/ function(module, exports, __webpack_require__) {
|
| 40376 |
|
| 40377 |
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
| 40378 |
|
| 40379 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React) {
|
| 40380 |
var FormFieldRadio = React.createClass({
|
| 40381 |
-
displayName:
|
| 40382 |
|
| 40383 |
render: function render() {
|
| 40384 |
var _this = this;
|
|
@@ -40387,17 +40406,17 @@ webpackJsonp([1],[
|
|
| 40387 |
return false;
|
| 40388 |
}
|
| 40389 |
|
| 40390 |
-
var
|
| 40391 |
var options = Object.keys(this.props.field.values).map(function (value, index) {
|
| 40392 |
return React.createElement(
|
| 40393 |
-
|
| 40394 |
-
{ key:
|
| 40395 |
React.createElement(
|
| 40396 |
-
|
| 40397 |
null,
|
| 40398 |
-
React.createElement(
|
| 40399 |
-
type:
|
| 40400 |
-
checked:
|
| 40401 |
value: value,
|
| 40402 |
onChange: _this.props.onValueChange,
|
| 40403 |
name: _this.props.field.name }),
|
|
@@ -40407,7 +40426,7 @@ webpackJsonp([1],[
|
|
| 40407 |
});
|
| 40408 |
|
| 40409 |
return React.createElement(
|
| 40410 |
-
|
| 40411 |
null,
|
| 40412 |
options
|
| 40413 |
);
|
|
@@ -40440,7 +40459,7 @@ webpackJsonp([1],[
|
|
| 40440 |
|
| 40441 |
// isChecked will be true only if the value is "1"
|
| 40442 |
// it will be false in case value is "0" or empty
|
| 40443 |
-
var isChecked = !!
|
| 40444 |
var options = Object.keys(this.props.field.values).map(function (value, index) {
|
| 40445 |
return React.createElement(
|
| 40446 |
'p',
|
|
@@ -40710,6 +40729,11 @@ webpackJsonp([1],[
|
|
| 40710 |
year: this.state.year
|
| 40711 |
};
|
| 40712 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40713 |
}
|
| 40714 |
|
| 40715 |
return value;
|
|
@@ -40728,7 +40752,7 @@ webpackJsonp([1],[
|
|
| 40728 |
field = matches[1];
|
| 40729 |
property = matches[2];
|
| 40730 |
|
| 40731 |
-
var value =
|
| 40732 |
|
| 40733 |
this.setState(_defineProperty({}, '' + property, value), function () {
|
| 40734 |
_this.props.onValueChange({
|
|
@@ -40782,6 +40806,13 @@ webpackJsonp([1],[
|
|
| 40782 |
day: _this2.state.day,
|
| 40783 |
placeholder: _this2.props.field.day_placeholder
|
| 40784 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40785 |
}
|
| 40786 |
});
|
| 40787 |
|
|
@@ -40804,7 +40835,7 @@ webpackJsonp([1],[
|
|
| 40804 |
/***/ function(module, exports, __webpack_require__) {
|
| 40805 |
|
| 40806 |
var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js
|
| 40807 |
-
//! version : 2.19.
|
| 40808 |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
| 40809 |
//! license : MIT
|
| 40810 |
//! momentjs.com
|
|
@@ -41464,7 +41495,7 @@ webpackJsonp([1],[
|
|
| 41464 |
|
| 41465 |
// any word (or two) characters or numbers including two/three word month in arabic.
|
| 41466 |
// includes scottish gaelic two word and hyphenated months
|
| 41467 |
-
var matchWord = /[0-9]
|
| 41468 |
|
| 41469 |
|
| 41470 |
var regexes = {};
|
|
@@ -42834,7 +42865,7 @@ webpackJsonp([1],[
|
|
| 42834 |
// note: all values past the year are optional and will default to the lowest possible value.
|
| 42835 |
// [year, month, day , hour, minute, second, millisecond]
|
| 42836 |
function configFromArray (config) {
|
| 42837 |
-
var i, date, input = [], currentDate, yearToUse;
|
| 42838 |
|
| 42839 |
if (config._d) {
|
| 42840 |
return;
|
|
@@ -42884,6 +42915,8 @@ webpackJsonp([1],[
|
|
| 42884 |
}
|
| 42885 |
|
| 42886 |
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
|
|
|
|
|
|
|
| 42887 |
// Apply timezone offset from input. The actual utcOffset can be changed
|
| 42888 |
// with parseZone.
|
| 42889 |
if (config._tzm != null) {
|
|
@@ -42895,7 +42928,7 @@ webpackJsonp([1],[
|
|
| 42895 |
}
|
| 42896 |
|
| 42897 |
// check for mismatching day of week
|
| 42898 |
-
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !==
|
| 42899 |
getParsingFlags(config).weekdayMismatch = true;
|
| 42900 |
}
|
| 42901 |
}
|
|
@@ -44471,7 +44504,7 @@ webpackJsonp([1],[
|
|
| 44471 |
|
| 44472 |
addParseToken(['D', 'DD'], DATE);
|
| 44473 |
addParseToken('Do', function (input, array) {
|
| 44474 |
-
array[DATE] = toInt(input.match(match1to2)[0]
|
| 44475 |
});
|
| 44476 |
|
| 44477 |
// MOMENTS
|
|
@@ -45283,7 +45316,7 @@ webpackJsonp([1],[
|
|
| 45283 |
// Side effect imports
|
| 45284 |
|
| 45285 |
|
| 45286 |
-
hooks.version = '2.19.
|
| 45287 |
|
| 45288 |
setHookCallback(createLocal);
|
| 45289 |
|
|
@@ -48814,7 +48847,7 @@ webpackJsonp([1],[
|
|
| 48814 |
/***/ function(module, exports, __webpack_require__) {
|
| 48815 |
|
| 48816 |
//! moment.js locale configuration
|
| 48817 |
-
//! locale : Spanish(United
|
| 48818 |
//! author : bustta : https://github.com/bustta
|
| 48819 |
|
| 48820 |
;(function (global, factory) {
|
|
@@ -50491,8 +50524,7 @@ webpackJsonp([1],[
|
|
| 50491 |
|
| 50492 |
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
|
| 50493 |
function translate(number, withoutSuffix, key, isFuture) {
|
| 50494 |
-
var num = number
|
| 50495 |
-
suffix;
|
| 50496 |
switch (key) {
|
| 50497 |
case 's':
|
| 50498 |
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
|
| 30794 |
);
|
| 30795 |
}
|
| 30796 |
|
| 30797 |
+
var customActions = this.props.item_actions;
|
| 30798 |
+
var itemActions = false;
|
| 30799 |
|
| 30800 |
+
if (customActions.length > 0) {
|
| 30801 |
(function () {
|
| 30802 |
+
var isFirst = true;
|
| 30803 |
+
itemActions = customActions.filter(function (action) {
|
| 30804 |
+
return action.display === undefined || action.display(_this.props.item);
|
| 30805 |
+
}).map(function (action, index) {
|
| 30806 |
+
var customAction = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30807 |
|
| 30808 |
if (action.name === 'trash') {
|
| 30809 |
+
customAction = _react2['default'].createElement(
|
| 30810 |
'span',
|
| 30811 |
{ key: 'action-' + index, className: 'trash' },
|
| 30812 |
+
!isFirst ? ' | ' : '',
|
| 30813 |
_react2['default'].createElement(
|
| 30814 |
'a',
|
| 30815 |
{
|
| 30819 |
)
|
| 30820 |
);
|
| 30821 |
} else if (action.refresh) {
|
| 30822 |
+
customAction = _react2['default'].createElement(
|
| 30823 |
'span',
|
| 30824 |
{
|
| 30825 |
onClick: _this.props.onRefreshItems,
|
| 30826 |
key: 'action-' + index, className: action.name },
|
| 30827 |
+
!isFirst ? ' | ' : '',
|
| 30828 |
action.link(_this.props.item)
|
| 30829 |
);
|
| 30830 |
} else if (action.link) {
|
| 30831 |
+
customAction = _react2['default'].createElement(
|
| 30832 |
'span',
|
| 30833 |
{
|
| 30834 |
key: 'action-' + index, className: action.name },
|
| 30835 |
+
!isFirst ? ' | ' : '',
|
| 30836 |
action.link(_this.props.item)
|
| 30837 |
);
|
| 30838 |
} else {
|
| 30839 |
+
customAction = _react2['default'].createElement(
|
| 30840 |
'span',
|
| 30841 |
{
|
| 30842 |
key: 'action-' + index, className: action.name },
|
| 30843 |
+
!isFirst ? ' | ' : '',
|
| 30844 |
_react2['default'].createElement(
|
| 30845 |
'a',
|
| 30846 |
{ href: 'javascript:;', onClick: action.onClick !== undefined ? action.onClick.bind(null, _this.props.item, _this.props.onRefreshItems) : false },
|
| 30849 |
);
|
| 30850 |
}
|
| 30851 |
|
| 30852 |
+
if (customAction !== null && isFirst === true) {
|
| 30853 |
+
isFirst = false;
|
| 30854 |
}
|
| 30855 |
|
| 30856 |
+
return customAction;
|
| 30857 |
});
|
| 30858 |
})();
|
| 30859 |
} else {
|
| 30860 |
+
itemActions = _react2['default'].createElement(
|
| 30861 |
'span',
|
| 30862 |
{ className: 'edit' },
|
| 30863 |
_react2['default'].createElement(
|
| 30923 |
_react2['default'].createElement(
|
| 30924 |
'div',
|
| 30925 |
{ className: 'row-actions' },
|
| 30926 |
+
itemActions
|
| 30927 |
),
|
| 30928 |
_react2['default'].createElement(
|
| 30929 |
'button',
|
| 30939 |
);
|
| 30940 |
}
|
| 30941 |
|
| 30942 |
+
var rowClasses = (0, _classnames2['default'])({ 'is-expanded': this.state.expanded });
|
| 30943 |
|
| 30944 |
return _react2['default'].createElement(
|
| 30945 |
'tr',
|
| 30946 |
+
{ className: rowClasses, 'data-automation-id': 'listing_item_' + this.props.item.id },
|
| 30947 |
checkbox,
|
| 30948 |
this.props.onRenderItem(this.props.item, actions)
|
| 30949 |
);
|
| 30980 |
)
|
| 30981 |
);
|
| 30982 |
}
|
| 30983 |
+
var selectAllClasses = (0, _classnames2['default'])('mailpoet_select_all', { mailpoet_hidden: this.props.selection === false || this.props.count <= this.props.limit
|
| 30984 |
});
|
| 30985 |
|
| 30986 |
return _react2['default'].createElement(
|
| 30988 |
null,
|
| 30989 |
_react2['default'].createElement(
|
| 30990 |
'tr',
|
| 30991 |
+
{ className: selectAllClasses },
|
| 30992 |
_react2['default'].createElement(
|
| 30993 |
'td',
|
| 30994 |
{ colSpan: this.props.columns.length + (this.props.is_selectable ? 1 : 0) },
|
| 31063 |
var state = this.getInitialState();
|
| 31064 |
// check for url params
|
| 31065 |
if (params.splat) {
|
| 31066 |
+
params.splat.split('/').forEach(function (param) {
|
| 31067 |
var _getParam = _this3.getParam(param);
|
| 31068 |
|
| 31069 |
var _getParam2 = _slicedToArray(_getParam, 2);
|
| 31074 |
var filters = {};
|
| 31075 |
switch (key) {
|
| 31076 |
case 'filter':
|
| 31077 |
+
value.split('&').forEach(function (pair) {
|
| 31078 |
var _pair$split = pair.split('=');
|
| 31079 |
|
| 31080 |
var _pair$split2 = _slicedToArray(_pair$split, 2);
|
| 31095 |
|
| 31096 |
// limit per page
|
| 31097 |
if (this.props.limit !== undefined) {
|
| 31098 |
+
state.limit = Math.abs(Number(this.props.limit));
|
| 31099 |
}
|
| 31100 |
|
| 31101 |
// sort by
|
| 31136 |
} else if (value === Boolean(value)) {
|
| 31137 |
value = value.toString();
|
| 31138 |
}
|
| 31139 |
+
return {
|
| 31140 |
+
key: key,
|
| 31141 |
+
value: value
|
| 31142 |
+
};
|
| 31143 |
+
}).filter(function (_ref) {
|
| 31144 |
+
var value = _ref.value;
|
| 31145 |
+
return value !== '' && value !== null;
|
| 31146 |
+
}).map(function (_ref2) {
|
| 31147 |
+
var key = _ref2.key;
|
| 31148 |
+
var value = _ref2.value;
|
| 31149 |
+
return key + '[' + value + ']';
|
| 31150 |
}).join('/');
|
| 31151 |
|
| 31152 |
// set url
|
| 31158 |
}
|
| 31159 |
},
|
| 31160 |
getUrlWithParams: function getUrlWithParams(params) {
|
| 31161 |
+
var baseUrl = this.props.base_url !== undefined ? this.props.base_url : null;
|
| 31162 |
|
| 31163 |
+
if (baseUrl !== null) {
|
| 31164 |
+
baseUrl = this.setBaseUrlParams(baseUrl);
|
| 31165 |
+
return '/' + baseUrl + '/' + params;
|
| 31166 |
}
|
| 31167 |
return '/' + params;
|
| 31168 |
},
|
| 31169 |
+
setBaseUrlParams: function setBaseUrlParams(baseUrl) {
|
| 31170 |
var _this5 = this;
|
| 31171 |
|
| 31172 |
+
var ret = baseUrl;
|
| 31173 |
if (ret.indexOf(':') !== -1) {
|
| 31174 |
(function () {
|
| 31175 |
var params = _this5.getParams();
|
| 31176 |
+
Object.keys(params).forEach(function (key) {
|
| 31177 |
if (ret.indexOf(':' + key) !== -1) {
|
| 31178 |
ret = ret.replace(':' + key, params[key]);
|
| 31179 |
}
|
| 31347 |
}), { scroll: true });
|
| 31348 |
});
|
| 31349 |
},
|
| 31350 |
+
handleBulkAction: function handleBulkAction(selectedIds, params) {
|
| 31351 |
var _this12 = this;
|
| 31352 |
|
| 31353 |
+
if (this.state.selection === false && this.state.selected_ids.length === 0 && selectedIds !== 'all') {
|
| 31354 |
return false;
|
| 31355 |
}
|
| 31356 |
|
| 31365 |
group: this.state.group,
|
| 31366 |
search: this.state.search
|
| 31367 |
};
|
| 31368 |
+
if (selectedIds !== 'all') {
|
| 31369 |
+
data.listing.selection = selectedIds;
|
| 31370 |
}
|
| 31371 |
|
| 31372 |
return _mailpoet2['default'].Ajax.post({
|
| 31396 |
_this13.setParams();
|
| 31397 |
});
|
| 31398 |
},
|
| 31399 |
+
handleSort: function handleSort(sortBy) {
|
| 31400 |
var _this14 = this;
|
| 31401 |
|
| 31402 |
+
var sortOrder = arguments.length <= 1 || arguments[1] === undefined ? 'asc' : arguments[1];
|
| 31403 |
|
| 31404 |
this.setState({
|
| 31405 |
+
sort_by: sortBy,
|
| 31406 |
+
sort_order: sortOrder === 'asc' ? 'asc' : 'desc'
|
| 31407 |
}, function () {
|
| 31408 |
_this14.setParams();
|
| 31409 |
});
|
| 31410 |
},
|
| 31411 |
+
handleSelectItem: function handleSelectItem(id, isChecked) {
|
| 31412 |
+
var selectedIds = this.state.selected_ids;
|
| 31413 |
var selection = false;
|
| 31414 |
|
| 31415 |
+
if (isChecked) {
|
| 31416 |
+
selectedIds = _jquery2['default'].merge(selectedIds, [id]);
|
| 31417 |
// check whether all items on the page are selected
|
| 31418 |
if ((0, _jquery2['default'])('tbody .check-column :checkbox:not(:checked)').length === 0) {
|
| 31419 |
selection = 'page';
|
| 31420 |
}
|
| 31421 |
} else {
|
| 31422 |
+
selectedIds.splice(selectedIds.indexOf(id), 1);
|
| 31423 |
}
|
| 31424 |
|
| 31425 |
this.setState({
|
| 31426 |
selection: selection,
|
| 31427 |
+
selected_ids: selectedIds
|
| 31428 |
});
|
| 31429 |
},
|
| 31430 |
+
handleSelectItems: function handleSelectItems(isChecked) {
|
| 31431 |
+
if (isChecked === false) {
|
| 31432 |
this.clearSelection();
|
| 31433 |
} else {
|
| 31434 |
+
var selectedIds = this.state.items.map(function (item) {
|
| 31435 |
+
return Number(item.id);
|
| 31436 |
});
|
| 31437 |
|
| 31438 |
this.setState({
|
| 31439 |
+
selected_ids: selectedIds,
|
| 31440 |
selection: 'page'
|
| 31441 |
});
|
| 31442 |
}
|
| 31502 |
},
|
| 31503 |
render: function render() {
|
| 31504 |
var items = this.state.items;
|
| 31505 |
+
var sortBy = this.state.sort_by;
|
| 31506 |
+
var sortOrder = this.state.sort_order;
|
| 31507 |
|
| 31508 |
// columns
|
| 31509 |
var columns = this.props.columns || [];
|
| 31512 |
});
|
| 31513 |
|
| 31514 |
// bulk actions
|
| 31515 |
+
var bulkActions = this.props.bulk_actions || [];
|
| 31516 |
|
| 31517 |
+
if (this.state.group === 'trash' && bulkActions.length > 0) {
|
| 31518 |
+
bulkActions = [{
|
| 31519 |
name: 'restore',
|
| 31520 |
label: _mailpoet2['default'].I18n.t('restore'),
|
| 31521 |
onSuccess: this.props.messages.onRestore
|
| 31527 |
}
|
| 31528 |
|
| 31529 |
// item actions
|
| 31530 |
+
var itemActions = this.props.item_actions || [];
|
| 31531 |
|
| 31532 |
+
var tableClasses = (0, _classnames2['default'])('mailpoet_listing_table', 'wp-list-table', 'widefat', 'fixed', 'striped', { mailpoet_listing_loading: this.state.loading });
|
| 31533 |
|
| 31534 |
// search
|
| 31535 |
var search = _react2['default'].createElement(_listingSearchJsx2['default'], {
|
| 31566 |
{ className: 'tablenav top clearfix' },
|
| 31567 |
_react2['default'].createElement(_listingBulk_actionsJsx2['default'], {
|
| 31568 |
count: this.state.count,
|
| 31569 |
+
bulk_actions: bulkActions,
|
| 31570 |
selection: this.state.selection,
|
| 31571 |
selected_ids: this.state.selected_ids,
|
| 31572 |
onBulkAction: this.handleBulkAction }),
|
| 31586 |
),
|
| 31587 |
_react2['default'].createElement(
|
| 31588 |
'table',
|
| 31589 |
+
{ className: tableClasses },
|
| 31590 |
_react2['default'].createElement(
|
| 31591 |
'thead',
|
| 31592 |
null,
|
| 31594 |
onSort: this.handleSort,
|
| 31595 |
onSelectItems: this.handleSelectItems,
|
| 31596 |
selection: this.state.selection,
|
| 31597 |
+
sort_by: sortBy,
|
| 31598 |
+
sort_order: sortOrder,
|
| 31599 |
columns: columns,
|
| 31600 |
+
is_selectable: bulkActions.length > 0 })
|
| 31601 |
),
|
| 31602 |
_react2['default'].createElement(ListingItems, {
|
| 31603 |
onRenderItem: this.handleRenderItem,
|
| 31606 |
onTrashItem: this.handleTrashItem,
|
| 31607 |
onRefreshItems: this.handleRefreshItems,
|
| 31608 |
columns: columns,
|
| 31609 |
+
is_selectable: bulkActions.length > 0,
|
| 31610 |
onSelectItem: this.handleSelectItem,
|
| 31611 |
onSelectAll: this.handleSelectAll,
|
| 31612 |
selection: this.state.selection,
|
| 31615 |
group: this.state.group,
|
| 31616 |
count: this.state.count,
|
| 31617 |
limit: this.state.limit,
|
| 31618 |
+
item_actions: itemActions,
|
| 31619 |
messages: messages,
|
| 31620 |
items: items }),
|
| 31621 |
_react2['default'].createElement(
|
| 31625 |
onSort: this.handleSort,
|
| 31626 |
onSelectItems: this.handleSelectItems,
|
| 31627 |
selection: this.state.selection,
|
| 31628 |
+
sort_by: sortBy,
|
| 31629 |
+
sort_order: sortOrder,
|
| 31630 |
columns: columns,
|
| 31631 |
+
is_selectable: bulkActions.length > 0 })
|
| 31632 |
)
|
| 31633 |
),
|
| 31634 |
_react2['default'].createElement(
|
| 31636 |
{ className: 'tablenav bottom' },
|
| 31637 |
_react2['default'].createElement(_listingBulk_actionsJsx2['default'], {
|
| 31638 |
count: this.state.count,
|
| 31639 |
+
bulk_actions: bulkActions,
|
| 31640 |
selection: this.state.selection,
|
| 31641 |
selected_ids: this.state.selected_ids,
|
| 31642 |
onBulkAction: this.handleBulkAction }),
|
| 33255 |
return;
|
| 33256 |
}
|
| 33257 |
|
| 33258 |
+
var selectedIds = this.props.selection !== 'all' ? this.props.selected_ids : [];
|
| 33259 |
|
| 33260 |
var data = action.getData !== undefined ? action.getData() : {};
|
| 33261 |
|
| 33267 |
}
|
| 33268 |
|
| 33269 |
if (data.action) {
|
| 33270 |
+
var promise = this.props.onBulkAction(selectedIds, data);
|
| 33271 |
if (promise !== false) {
|
| 33272 |
promise.then(onSuccess);
|
| 33273 |
}
|
| 33279 |
});
|
| 33280 |
},
|
| 33281 |
getSelectedAction: function getSelectedAction() {
|
| 33282 |
+
var selectedAction = this.refs.action.value;
|
| 33283 |
+
if (selectedAction.length > 0) {
|
| 33284 |
var action = this.props.bulk_actions.filter(function (act) {
|
| 33285 |
+
return act.name === selectedAction;
|
| 33286 |
});
|
| 33287 |
|
| 33288 |
if (action.length > 0) {
|
| 33417 |
displayName: 'ListingColumn',
|
| 33418 |
|
| 33419 |
handleSort: function handleSort() {
|
| 33420 |
+
var sortBy = this.props.column.name;
|
| 33421 |
+
var sortOrder = this.props.column.sorted === 'asc' ? 'desc' : 'asc';
|
| 33422 |
+
this.props.onSort(sortBy, sortOrder);
|
| 33423 |
},
|
| 33424 |
render: function render() {
|
| 33425 |
var classes = (0, _classnames2['default'])('manage-column', { 'column-primary': this.props.column.is_primary }, { sortable: this.props.column.sortable }, this.props.column.sorted, { sorted: this.props.sort_by === this.props.column.name });
|
| 33491 |
this.setPage(this.constrainPage(parseInt(this.props.page, 10) + 1));
|
| 33492 |
},
|
| 33493 |
constrainPage: function constrainPage(page) {
|
| 33494 |
+
return Math.min(Math.max(1, Math.abs(Number(page))), this.getLastPage());
|
| 33495 |
},
|
| 33496 |
handleSetManualPage: function handleSetManualPage(e) {
|
| 33497 |
if (e.which === 13) {
|
| 33664 |
var classes = classNames('tablenav-pages', { 'one-page': this.props.count <= this.props.limit });
|
| 33665 |
|
| 33666 |
var numberOfItemsLabel = undefined;
|
| 33667 |
+
if (Number(this.props.count) === 1) {
|
| 33668 |
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsSingular');
|
| 33669 |
} else {
|
| 33670 |
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsMultiple').replace('%$1d', this.props.count.toLocaleString());
|
| 33806 |
var _this = this;
|
| 33807 |
|
| 33808 |
var filters = {};
|
| 33809 |
+
this.getAvailableFilters().forEach(function (filter, i) {
|
| 33810 |
filters[_this.refs['filter-' + i].name] = _this.refs['filter-' + i].value;
|
| 33811 |
});
|
| 33812 |
if (this.props.onBeforeSelectFilter) {
|
| 33826 |
componentDidUpdate: function componentDidUpdate() {
|
| 33827 |
var _this2 = this;
|
| 33828 |
|
| 33829 |
+
var selectedFilters = this.props.filter;
|
| 33830 |
+
this.getAvailableFilters().forEach(function (filter, i) {
|
| 33831 |
+
if (selectedFilters[filter] !== undefined && selectedFilters[filter]) {
|
| 33832 |
+
jQuery(_this2.refs['filter-' + i]).val(selectedFilters[filter]).trigger('change');
|
| 33833 |
}
|
| 33834 |
});
|
| 33835 |
},
|
| 33836 |
render: function render() {
|
| 33837 |
var filters = this.props.filters;
|
| 33838 |
+
var availableFilters = this.getAvailableFilters().map(function (filter, i) {
|
| 33839 |
return React.createElement(
|
| 33840 |
'select',
|
| 33841 |
{
|
| 33858 |
|
| 33859 |
var button = undefined;
|
| 33860 |
|
| 33861 |
+
if (availableFilters.length > 0) {
|
| 33862 |
button = React.createElement('input', {
|
| 33863 |
id: 'post-query-submit',
|
| 33864 |
onClick: this.handleFilterAction,
|
| 33867 |
className: 'button' });
|
| 33868 |
}
|
| 33869 |
|
| 33870 |
+
var emptyTrash = undefined;
|
| 33871 |
if (this.props.group === 'trash') {
|
| 33872 |
+
emptyTrash = React.createElement('input', {
|
| 33873 |
onClick: this.handleEmptyTrash,
|
| 33874 |
type: 'submit',
|
| 33875 |
value: MailPoet.I18n.t('emptyTrash'),
|
| 33880 |
return React.createElement(
|
| 33881 |
'div',
|
| 33882 |
{ className: 'alignleft actions actions' },
|
| 33883 |
+
availableFilters,
|
| 33884 |
button,
|
| 33885 |
+
emptyTrash
|
| 33886 |
);
|
| 33887 |
}
|
| 33888 |
});
|
| 33918 |
return this.state.select2 === true;
|
| 33919 |
},
|
| 33920 |
componentDidMount: function componentDidMount() {
|
| 33921 |
+
if (this.allowMultipleValues() || this.props.field.forceSelect2) {
|
| 33922 |
this.setupSelect2();
|
| 33923 |
}
|
| 33924 |
},
|
| 33928 |
}
|
| 33929 |
},
|
| 33930 |
componentWillUnmount: function componentWillUnmount() {
|
| 33931 |
+
if (this.allowMultipleValues() || this.props.field.forceSelect2) {
|
| 33932 |
this.destroySelect2();
|
| 33933 |
}
|
| 33934 |
},
|
| 33986 |
return null;
|
| 33987 |
},
|
| 33988 |
loadCachedItems: function loadCachedItems() {
|
| 33989 |
+
var items = undefined;
|
| 33990 |
if (typeof window['mailpoet_' + this.props.field.endpoint] !== 'undefined') {
|
| 33991 |
+
items = window['mailpoet_' + this.props.field.endpoint];
|
| 33992 |
+
} else if (this.props.field.values !== undefined) {
|
| 33993 |
+
items = this.props.field.values;
|
| 33994 |
+
}
|
| 33995 |
|
| 33996 |
+
if (Array.isArray(items)) {
|
| 33997 |
if (this.props.field.filter !== undefined) {
|
| 33998 |
items = items.filter(this.props.field.filter);
|
| 33999 |
}
|
| 34047 |
}
|
| 34048 |
return value;
|
| 34049 |
},
|
| 34050 |
+
insertEmptyOption: function insertEmptyOption() {
|
| 34051 |
+
// https://select2.org/placeholders
|
| 34052 |
+
// For single selects only, in order for the placeholder value to appear,
|
| 34053 |
+
// we must have a blank <option> as the first option in the <select> control.
|
| 34054 |
+
if (this.allowMultipleValues()) return undefined;
|
| 34055 |
+
if (this.props.field.placeholder) return React.createElement('option', null);
|
| 34056 |
+
return undefined;
|
| 34057 |
+
},
|
| 34058 |
render: function render() {
|
| 34059 |
var _this = this;
|
| 34060 |
|
| 34084 |
multiple: this.props.field.multiple,
|
| 34085 |
defaultValue: this.getSelectedValues()
|
| 34086 |
}, this.props.field.validation),
|
| 34087 |
+
this.insertEmptyOption(),
|
| 34088 |
options
|
| 34089 |
);
|
| 34090 |
}
|
| 39908 |
if (props.item === undefined) {
|
| 39909 |
this.refs.form.reset();
|
| 39910 |
}
|
|
|
|
|
|
|
| 39911 |
}
|
| 39912 |
},
|
| 39913 |
loadItem: function loadItem(id) {
|
| 39927 |
loading: false,
|
| 39928 |
item: response.data
|
| 39929 |
});
|
| 39930 |
+
if (typeof _this.props.onItemLoad === 'function') {
|
| 39931 |
+
_this.props.onItemLoad(response.data);
|
| 39932 |
+
}
|
| 39933 |
}).fail(function () {
|
| 39934 |
_this.setState({
|
| 39935 |
loading: false,
|
| 39955 |
|
| 39956 |
// only get values from displayed fields
|
| 39957 |
var item = {};
|
| 39958 |
+
this.props.fields.forEach(function (field) {
|
| 39959 |
if (field.fields !== undefined) {
|
| 39960 |
+
field.fields.forEach(function (subfield) {
|
| 39961 |
item[subfield.name] = _this2.state.item[subfield.name];
|
| 39962 |
});
|
| 39963 |
} else {
|
| 40156 |
case 'reactComponent':
|
| 40157 |
field = React.createElement(data.field.component, data);
|
| 40158 |
break;
|
| 40159 |
+
|
| 40160 |
+
default:
|
| 40161 |
+
field = 'invalid';
|
| 40162 |
+
break;
|
| 40163 |
}
|
| 40164 |
|
| 40165 |
if (inline === true) {
|
| 40206 |
|
| 40207 |
return React.createElement(
|
| 40208 |
'tr',
|
| 40209 |
+
{ className: 'form-field-row-' + this.props.field.name },
|
| 40210 |
React.createElement(
|
| 40211 |
'th',
|
| 40212 |
{ scope: 'row' },
|
| 40287 |
type: "text",
|
| 40288 |
className: "regular-text",
|
| 40289 |
name: this.props.field.name,
|
| 40290 |
+
id: "field_" + this.props.field.name,
|
| 40291 |
value: this.props.item[this.props.field.name],
|
| 40292 |
placeholder: this.props.field.placeholder,
|
| 40293 |
defaultValue: this.props.field.defaultValue,
|
| 40360 |
keys = Object.keys(this.props.field.values);
|
| 40361 |
}
|
| 40362 |
|
| 40363 |
+
var options = keys.filter(function (value) {
|
| 40364 |
+
if (filter === false) return true;
|
| 40365 |
+
return filter(_this.props.item, value);
|
| 40366 |
+
}).map(function (value, index) {
|
|
|
|
| 40367 |
return _react2['default'].createElement(
|
| 40368 |
'option',
|
| 40369 |
{
|
| 40393 |
/* 298 */
|
| 40394 |
/***/ function(module, exports, __webpack_require__) {
|
| 40395 |
|
| 40396 |
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict";
|
| 40397 |
|
| 40398 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(2)], __WEBPACK_AMD_DEFINE_RESULT__ = function (React) {
|
| 40399 |
var FormFieldRadio = React.createClass({
|
| 40400 |
+
displayName: "FormFieldRadio",
|
| 40401 |
|
| 40402 |
render: function render() {
|
| 40403 |
var _this = this;
|
| 40406 |
return false;
|
| 40407 |
}
|
| 40408 |
|
| 40409 |
+
var selectedValue = this.props.item[this.props.field.name];
|
| 40410 |
var options = Object.keys(this.props.field.values).map(function (value, index) {
|
| 40411 |
return React.createElement(
|
| 40412 |
+
"p",
|
| 40413 |
+
{ key: "radio-" + index },
|
| 40414 |
React.createElement(
|
| 40415 |
+
"label",
|
| 40416 |
null,
|
| 40417 |
+
React.createElement("input", {
|
| 40418 |
+
type: "radio",
|
| 40419 |
+
checked: selectedValue === value,
|
| 40420 |
value: value,
|
| 40421 |
onChange: _this.props.onValueChange,
|
| 40422 |
name: _this.props.field.name }),
|
| 40426 |
});
|
| 40427 |
|
| 40428 |
return React.createElement(
|
| 40429 |
+
"div",
|
| 40430 |
null,
|
| 40431 |
options
|
| 40432 |
);
|
| 40459 |
|
| 40460 |
// isChecked will be true only if the value is "1"
|
| 40461 |
// it will be false in case value is "0" or empty
|
| 40462 |
+
var isChecked = !!Number(this.props.item[this.props.field.name]);
|
| 40463 |
var options = Object.keys(this.props.field.values).map(function (value, index) {
|
| 40464 |
return React.createElement(
|
| 40465 |
'p',
|
| 40729 |
year: this.state.year
|
| 40730 |
};
|
| 40731 |
break;
|
| 40732 |
+
default:
|
| 40733 |
+
value = {
|
| 40734 |
+
value: 'invalid type'
|
| 40735 |
+
};
|
| 40736 |
+
break;
|
| 40737 |
}
|
| 40738 |
|
| 40739 |
return value;
|
| 40752 |
field = matches[1];
|
| 40753 |
property = matches[2];
|
| 40754 |
|
| 40755 |
+
var value = Number(e.target.value);
|
| 40756 |
|
| 40757 |
this.setState(_defineProperty({}, '' + property, value), function () {
|
| 40758 |
_this.props.onValueChange({
|
| 40806 |
day: _this2.state.day,
|
| 40807 |
placeholder: _this2.props.field.day_placeholder
|
| 40808 |
});
|
| 40809 |
+
|
| 40810 |
+
default:
|
| 40811 |
+
return React.createElement(
|
| 40812 |
+
'div',
|
| 40813 |
+
null,
|
| 40814 |
+
'Invalid date type'
|
| 40815 |
+
);
|
| 40816 |
}
|
| 40817 |
});
|
| 40818 |
|
| 40835 |
/***/ function(module, exports, __webpack_require__) {
|
| 40836 |
|
| 40837 |
var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js
|
| 40838 |
+
//! version : 2.19.4
|
| 40839 |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
| 40840 |
//! license : MIT
|
| 40841 |
//! momentjs.com
|
| 41495 |
|
| 41496 |
// any word (or two) characters or numbers including two/three word month in arabic.
|
| 41497 |
// includes scottish gaelic two word and hyphenated months
|
| 41498 |
+
var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
|
| 41499 |
|
| 41500 |
|
| 41501 |
var regexes = {};
|
| 42865 |
// note: all values past the year are optional and will default to the lowest possible value.
|
| 42866 |
// [year, month, day , hour, minute, second, millisecond]
|
| 42867 |
function configFromArray (config) {
|
| 42868 |
+
var i, date, input = [], currentDate, expectedWeekday, yearToUse;
|
| 42869 |
|
| 42870 |
if (config._d) {
|
| 42871 |
return;
|
| 42915 |
}
|
| 42916 |
|
| 42917 |
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
|
| 42918 |
+
expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
|
| 42919 |
+
|
| 42920 |
// Apply timezone offset from input. The actual utcOffset can be changed
|
| 42921 |
// with parseZone.
|
| 42922 |
if (config._tzm != null) {
|
| 42928 |
}
|
| 42929 |
|
| 42930 |
// check for mismatching day of week
|
| 42931 |
+
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
|
| 42932 |
getParsingFlags(config).weekdayMismatch = true;
|
| 42933 |
}
|
| 42934 |
}
|
| 44504 |
|
| 44505 |
addParseToken(['D', 'DD'], DATE);
|
| 44506 |
addParseToken('Do', function (input, array) {
|
| 44507 |
+
array[DATE] = toInt(input.match(match1to2)[0]);
|
| 44508 |
});
|
| 44509 |
|
| 44510 |
// MOMENTS
|
| 45316 |
// Side effect imports
|
| 45317 |
|
| 45318 |
|
| 45319 |
+
hooks.version = '2.19.4';
|
| 45320 |
|
| 45321 |
setHookCallback(createLocal);
|
| 45322 |
|
| 48847 |
/***/ function(module, exports, __webpack_require__) {
|
| 48848 |
|
| 48849 |
//! moment.js locale configuration
|
| 48850 |
+
//! locale : Spanish (United States) [es-us]
|
| 48851 |
//! author : bustta : https://github.com/bustta
|
| 48852 |
|
| 48853 |
;(function (global, factory) {
|
| 50524 |
|
| 50525 |
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
|
| 50526 |
function translate(number, withoutSuffix, key, isFuture) {
|
| 50527 |
+
var num = number;
|
|
|
|
| 50528 |
switch (key) {
|
| 50529 |
case 's':
|
| 50530 |
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
|
assets/js/{form_editor.2762fbc0.js → form_editor.cc7529b3.js}
RENAMED
|
@@ -3,22 +3,22 @@ webpackJsonp([2],{
|
|
| 3 |
/***/ 0:
|
| 4 |
/***/ function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
-
__webpack_require__(
|
| 7 |
-
__webpack_require__(
|
| 8 |
-
module.exports = __webpack_require__(
|
| 9 |
|
| 10 |
|
| 11 |
/***/ },
|
| 12 |
|
| 13 |
-
/***/
|
| 14 |
/***/ function(module, exports, __webpack_require__) {
|
| 15 |
|
| 16 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(
|
| 17 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 18 |
|
| 19 |
/***/ },
|
| 20 |
|
| 21 |
-
/***/
|
| 22 |
/***/ function(module, exports) {
|
| 23 |
|
| 24 |
/*
|
|
@@ -34,6 +34,27 @@ webpackJsonp([2],{
|
|
| 34 |
var WysijaHistory;
|
| 35 |
var WysijaForm;
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
Event.cacheDelegated = {};
|
| 38 |
Object.extend(document, (function () {
|
| 39 |
var cache = Event.cacheDelegated;
|
|
@@ -89,18 +110,18 @@ webpackJsonp([2],{
|
|
| 89 |
var wrapper;
|
| 90 |
switch (length) {
|
| 91 |
case 2:
|
| 92 |
-
getWrappersForSelector(selector, eventName).each(function (
|
| 93 |
-
document.stopDelegating(selector, eventName,
|
| 94 |
});
|
| 95 |
break;
|
| 96 |
case 1:
|
| 97 |
-
Object.keys(getCacheForSelector(selector)).each(function (
|
| 98 |
-
document.stopDelegating(selector,
|
| 99 |
});
|
| 100 |
break;
|
| 101 |
case 0:
|
| 102 |
-
Object.keys(cache).each(function (
|
| 103 |
-
document.stopDelegating(
|
| 104 |
});
|
| 105 |
break;
|
| 106 |
default:
|
|
@@ -119,6 +140,12 @@ webpackJsonp([2],{
|
|
| 119 |
return name.underscore().split('_').join(':');
|
| 120 |
}
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
function getHandlers(klass) {
|
| 123 |
var proto = klass.prototype;
|
| 124 |
var namespace = proto.namespace;
|
|
@@ -129,12 +156,6 @@ webpackJsonp([2],{
|
|
| 129 |
});
|
| 130 |
}
|
| 131 |
|
| 132 |
-
function getWrapper(handler, klass) {
|
| 133 |
-
return function (event) {
|
| 134 |
-
return handler.call(new klass(this), event, event.memo);
|
| 135 |
-
};
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
function onDomLoad(selector, klass) {
|
| 139 |
window.$$(selector).each(function (element) {
|
| 140 |
new klass(element).onDomLoaded();
|
|
@@ -180,8 +201,8 @@ webpackJsonp([2],{
|
|
| 180 |
var drop;
|
| 181 |
var affected = [];
|
| 182 |
if (!this.drops.length) return;
|
| 183 |
-
this.drops.each(function (
|
| 184 |
-
if (window.Droppables.isAffected(point, element,
|
| 185 |
});
|
| 186 |
if (affected.length > 0) drop = window.Droppables.findDeepestChild(affected);
|
| 187 |
if (this.last_active && this.last_active !== drop) this.deactivate(this.last_active, element);
|
|
@@ -308,8 +329,8 @@ webpackJsonp([2],{
|
|
| 308 |
return str.replace(/&/g, '&').replace(/>/g, '>').replace(/</g, '<').replace(/"/g, '"');
|
| 309 |
// ": fix for FileMerge because the previous line fucks up its syntax coloring
|
| 310 |
},
|
| 311 |
-
loading: function (
|
| 312 |
-
if (
|
| 313 |
window.$(WysijaForm.options.editor).addClassName('loading');
|
| 314 |
window.$(WysijaForm.options.toolbar).addClassName('loading');
|
| 315 |
} else {
|
|
@@ -324,7 +345,7 @@ webpackJsonp([2],{
|
|
| 324 |
});
|
| 325 |
},
|
| 326 |
load: function (data) {
|
| 327 |
-
var
|
| 328 |
if (data === undefined) return;
|
| 329 |
|
| 330 |
// load body
|
|
@@ -335,8 +356,8 @@ webpackJsonp([2],{
|
|
| 335 |
});
|
| 336 |
|
| 337 |
// load settings
|
| 338 |
-
|
| 339 |
-
|
| 340 |
// skip lists
|
| 341 |
if (setting.name === 'segments') {
|
| 342 |
return true;
|
|
@@ -353,6 +374,7 @@ webpackJsonp([2],{
|
|
| 353 |
setting.setValue(data.settings[setting.name]);
|
| 354 |
}
|
| 355 |
}
|
|
|
|
| 356 |
});
|
| 357 |
}
|
| 358 |
},
|
|
@@ -366,17 +388,17 @@ webpackJsonp([2],{
|
|
| 366 |
};
|
| 367 |
// body
|
| 368 |
WysijaForm.getBlocks().each(function (b) {
|
| 369 |
-
var
|
| 370 |
|
| 371 |
-
if (
|
| 372 |
// set block position
|
| 373 |
-
|
| 374 |
|
| 375 |
// increment position
|
| 376 |
position++;
|
| 377 |
|
| 378 |
// add block data to body
|
| 379 |
-
data['body'].push(
|
| 380 |
}
|
| 381 |
});
|
| 382 |
|
|
@@ -459,10 +481,10 @@ webpackJsonp([2],{
|
|
| 459 |
return (window.$$('#' + WysijaForm.options.editor + ' [wysija_id="segments"]').length > 0);
|
| 460 |
},
|
| 461 |
isSegmentSelectionValid: function () {
|
| 462 |
-
var
|
| 463 |
var block;
|
| 464 |
-
if (
|
| 465 |
-
block = WysijaForm.get(
|
| 466 |
return (
|
| 467 |
(block.params.values !== undefined)
|
| 468 |
&&
|
|
@@ -473,8 +495,8 @@ webpackJsonp([2],{
|
|
| 473 |
},
|
| 474 |
setBlockPositions: function (event, target) {
|
| 475 |
var index = 1;
|
| 476 |
-
var
|
| 477 |
-
var
|
| 478 |
// release dragging lock
|
| 479 |
WysijaForm.locks.dragging = false;
|
| 480 |
|
|
@@ -490,19 +512,19 @@ webpackJsonp([2],{
|
|
| 490 |
|
| 491 |
if (target !== undefined) {
|
| 492 |
// get placeholders (previous placeholder matches the placeholder linked to the next block)
|
| 493 |
-
|
| 494 |
-
|
| 495 |
|
| 496 |
-
if (
|
| 497 |
// put block placeholder before the current block
|
| 498 |
target.element.insert({
|
| 499 |
-
before:
|
| 500 |
});
|
| 501 |
|
| 502 |
// if the next block is a wysija_block, insert previous placeholder
|
| 503 |
-
if (target.element.next() !== undefined && target.element.next().hasClassName('mailpoet_form_block') &&
|
| 504 |
target.element.insert({
|
| 505 |
-
after:
|
| 506 |
});
|
| 507 |
}
|
| 508 |
}
|
|
@@ -522,11 +544,11 @@ webpackJsonp([2],{
|
|
| 522 |
// get parent dimensions and position
|
| 523 |
var parentDim = element.up('.mailpoet_form_block').getDimensions();
|
| 524 |
var parentPos = element.up('.mailpoet_form_block').cumulativeOffset();
|
| 525 |
-
var
|
| 526 |
var buttonMargin = 5;
|
| 527 |
var relativeTop = buttonMargin;
|
| 528 |
|
| 529 |
-
if (
|
| 530 |
// always center
|
| 531 |
relativeTop = parseInt((parentDim.height / 2) - (element.getHeight() / 2), 10);
|
| 532 |
}
|
|
@@ -547,7 +569,6 @@ webpackJsonp([2],{
|
|
| 547 |
if (WysijaForm.toolbar.left === null) WysijaForm.toolbar.left = parseInt(window.$(WysijaForm.options.container).positionedOffset().left);
|
| 548 |
}
|
| 549 |
if (WysijaForm.toolbar.x === null) WysijaForm.toolbar.x = parseInt(WysijaForm.toolbar.left + window.$(WysijaForm.options.container).getDimensions().width + 15);
|
| 550 |
-
|
| 551 |
},
|
| 552 |
setToolbarPosition: function () {
|
| 553 |
var position;
|
|
@@ -605,10 +626,8 @@ webpackJsonp([2],{
|
|
| 605 |
},
|
| 606 |
hideControls: function () {
|
| 607 |
try {
|
| 608 |
-
|
| 609 |
-
} catch (e) {
|
| 610 |
-
return;
|
| 611 |
-
}
|
| 612 |
},
|
| 613 |
hideTools: function () {
|
| 614 |
window.$$('.wysija_tools').invoke('hide');
|
|
@@ -680,6 +699,7 @@ webpackJsonp([2],{
|
|
| 680 |
// this is a url, so do not encode the protocol
|
| 681 |
return encodeURI(str).replace(/[!'()*]/g, escape);
|
| 682 |
}
|
|
|
|
| 683 |
},
|
| 684 |
updateBlock: function (field) {
|
| 685 |
var hasUpdated = false;
|
|
@@ -801,29 +821,28 @@ webpackJsonp([2],{
|
|
| 801 |
}
|
| 802 |
},
|
| 803 |
makeBlockDroppable: function () {
|
| 804 |
-
var
|
| 805 |
if (this.isBlockDroppableEnabled() === false) {
|
| 806 |
-
|
| 807 |
-
window.Droppables.add(
|
| 808 |
-
|
| 809 |
}
|
| 810 |
},
|
| 811 |
removeBlockDroppable: function () {
|
| 812 |
-
var
|
| 813 |
if (this.isBlockDroppableEnabled()) {
|
| 814 |
-
|
| 815 |
-
window.Droppables.remove(
|
| 816 |
-
|
| 817 |
}
|
| 818 |
},
|
| 819 |
isBlockDroppableEnabled: function () {
|
| 820 |
// if the block_placeholder does not exist, create it
|
| 821 |
-
var
|
| 822 |
-
if (
|
| 823 |
return this.createBlockDroppable().hasClassName('enabled');
|
| 824 |
-
} else {
|
| 825 |
-
return block_placeholder.hasClassName('enabled');
|
| 826 |
}
|
|
|
|
| 827 |
},
|
| 828 |
createBlockDroppable: function () {
|
| 829 |
info('block -> createBlockDroppable');
|
|
@@ -835,9 +854,8 @@ webpackJsonp([2],{
|
|
| 835 |
getBlockDroppable: function () {
|
| 836 |
if (this.element.previous() === undefined || this.element.previous().hasClassName('block_placeholder') === false) {
|
| 837 |
return null;
|
| 838 |
-
} else {
|
| 839 |
-
return this.element.previous();
|
| 840 |
}
|
|
|
|
| 841 |
},
|
| 842 |
getControls: function () {
|
| 843 |
return this.element.down('.wysija_controls');
|
|
@@ -942,25 +960,25 @@ webpackJsonp([2],{
|
|
| 942 |
WysijaForm.Block.create = function (createBlock, target) {
|
| 943 |
var block = createBlock;
|
| 944 |
var body;
|
| 945 |
-
var
|
| 946 |
var template;
|
| 947 |
var output;
|
| 948 |
-
var
|
| 949 |
if (window.$('form_template_' + block.type) === null) {
|
| 950 |
return false;
|
| 951 |
}
|
| 952 |
|
| 953 |
body = window.$(WysijaForm.options.body);
|
| 954 |
-
|
| 955 |
template = window.Handlebars.compile(window.$('form_template_' + block.type).innerHTML);
|
| 956 |
output = '';
|
| 957 |
|
| 958 |
if (block.type === 'segment') {
|
| 959 |
if (block.params.values === undefined) {
|
| 960 |
-
|
| 961 |
-
if (
|
| 962 |
block.params.values = window.mailpoet_segments.filter(function (segment) {
|
| 963 |
-
return (
|
| 964 |
});
|
| 965 |
}
|
| 966 |
}
|
|
@@ -968,7 +986,7 @@ webpackJsonp([2],{
|
|
| 968 |
|
| 969 |
// set block template (depending on the block type)
|
| 970 |
block.template = template(block);
|
| 971 |
-
output =
|
| 972 |
|
| 973 |
// check if the new block is unique and if there's already an instance
|
| 974 |
// of it in the history. If so, remove its former instance from the history
|
|
@@ -996,6 +1014,7 @@ webpackJsonp([2],{
|
|
| 996 |
|
| 997 |
// position settings
|
| 998 |
WysijaForm.setSettingsPosition();
|
|
|
|
| 999 |
};
|
| 1000 |
|
| 1001 |
document.observe('wjfe:item:drop', function (event) {
|
|
@@ -1034,11 +1053,11 @@ webpackJsonp([2],{
|
|
| 1034 |
return data;
|
| 1035 |
},
|
| 1036 |
setData: function (data) {
|
| 1037 |
-
var
|
| 1038 |
-
var params = window.$H(
|
| 1039 |
|
| 1040 |
// update type if it changed
|
| 1041 |
-
if (data.type !== undefined && data.type !==
|
| 1042 |
this.element.writeAttribute('wysija_type', data.type);
|
| 1043 |
}
|
| 1044 |
|
|
@@ -1061,19 +1080,19 @@ webpackJsonp([2],{
|
|
| 1061 |
},
|
| 1062 |
redraw: function (data) {
|
| 1063 |
var options;
|
| 1064 |
-
var
|
| 1065 |
var template;
|
| 1066 |
var params;
|
| 1067 |
// set parameters
|
| 1068 |
this.setData(data);
|
| 1069 |
options = this.getData();
|
| 1070 |
// redraw block
|
| 1071 |
-
|
| 1072 |
template = window.Handlebars.compile(window.$('form_template_' + options.type).innerHTML);
|
| 1073 |
params = window.$H(options).merge({
|
| 1074 |
template: template(options)
|
| 1075 |
}).toObject();
|
| 1076 |
-
this.element.replace(
|
| 1077 |
|
| 1078 |
WysijaForm.init();
|
| 1079 |
},
|
|
@@ -1096,41 +1115,20 @@ webpackJsonp([2],{
|
|
| 1096 |
/* When dom is loaded, initialize WysijaForm */
|
| 1097 |
document.observe('dom:loaded', WysijaForm.init);
|
| 1098 |
|
| 1099 |
-
/* LOGGING */
|
| 1100 |
-
function info(value) {
|
| 1101 |
-
if (WysijaForm.options.debug === false) return;
|
| 1102 |
-
|
| 1103 |
-
if (!(window.console && console.log)) {
|
| 1104 |
-
(function () {
|
| 1105 |
-
var noop = function () {};
|
| 1106 |
-
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
|
| 1107 |
-
var length = methods.length;
|
| 1108 |
-
var console = {};
|
| 1109 |
-
window.console = {};
|
| 1110 |
-
while (length--) {
|
| 1111 |
-
console[methods[length]] = noop;
|
| 1112 |
-
}
|
| 1113 |
-
}());
|
| 1114 |
-
}
|
| 1115 |
-
try {
|
| 1116 |
-
console.log('[DEBUG] ' + value);
|
| 1117 |
-
} catch (e) {}
|
| 1118 |
-
}
|
| 1119 |
-
|
| 1120 |
module.exports = WysijaForm;
|
| 1121 |
|
| 1122 |
|
| 1123 |
/***/ },
|
| 1124 |
|
| 1125 |
-
/***/
|
| 1126 |
/***/ function(module, exports, __webpack_require__) {
|
| 1127 |
|
| 1128 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(
|
| 1129 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 1130 |
|
| 1131 |
/***/ },
|
| 1132 |
|
| 1133 |
-
/***/
|
| 1134 |
/***/ function(module, exports, __webpack_require__) {
|
| 1135 |
|
| 1136 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -10802,7 +10800,7 @@ webpackJsonp([2],{
|
|
| 10802 |
|
| 10803 |
/***/ },
|
| 10804 |
|
| 10805 |
-
/***/
|
| 10806 |
/***/ function(module, exports, __webpack_require__) {
|
| 10807 |
|
| 10808 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
@@ -10810,7 +10808,7 @@ webpackJsonp([2],{
|
|
| 10810 |
|
| 10811 |
(function(mod) {
|
| 10812 |
if (true) // CommonJS
|
| 10813 |
-
mod(__webpack_require__(
|
| 10814 |
else if (typeof define == "function" && define.amd) // AMD
|
| 10815 |
define(["../../lib/codemirror"], mod);
|
| 10816 |
else // Plain browser env
|
| 3 |
/***/ 0:
|
| 4 |
/***/ function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
+
__webpack_require__(557);
|
| 7 |
+
__webpack_require__(559);
|
| 8 |
+
module.exports = __webpack_require__(561);
|
| 9 |
|
| 10 |
|
| 11 |
/***/ },
|
| 12 |
|
| 13 |
+
/***/ 557:
|
| 14 |
/***/ function(module, exports, __webpack_require__) {
|
| 15 |
|
| 16 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["WysijaForm"] = __webpack_require__(558);
|
| 17 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 18 |
|
| 19 |
/***/ },
|
| 20 |
|
| 21 |
+
/***/ 558:
|
| 22 |
/***/ function(module, exports) {
|
| 23 |
|
| 24 |
/*
|
| 34 |
var WysijaHistory;
|
| 35 |
var WysijaForm;
|
| 36 |
|
| 37 |
+
/* LOGGING */
|
| 38 |
+
function info(value) {
|
| 39 |
+
if (WysijaForm.options.debug === false) return;
|
| 40 |
+
|
| 41 |
+
if (!(window.console && console.log)) {
|
| 42 |
+
(function () {
|
| 43 |
+
var noop = function () {};
|
| 44 |
+
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
|
| 45 |
+
var length = methods.length;
|
| 46 |
+
var console = {};
|
| 47 |
+
window.console = {};
|
| 48 |
+
while (length--) {
|
| 49 |
+
console[methods[length]] = noop;
|
| 50 |
+
}
|
| 51 |
+
}());
|
| 52 |
+
}
|
| 53 |
+
try {
|
| 54 |
+
console.log('[DEBUG] ' + value);
|
| 55 |
+
} catch (e) {}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
Event.cacheDelegated = {};
|
| 59 |
Object.extend(document, (function () {
|
| 60 |
var cache = Event.cacheDelegated;
|
| 110 |
var wrapper;
|
| 111 |
switch (length) {
|
| 112 |
case 2:
|
| 113 |
+
getWrappersForSelector(selector, eventName).each(function (selectorWrapper) {
|
| 114 |
+
document.stopDelegating(selector, eventName, selectorWrapper.handler);
|
| 115 |
});
|
| 116 |
break;
|
| 117 |
case 1:
|
| 118 |
+
Object.keys(getCacheForSelector(selector)).each(function (event) {
|
| 119 |
+
document.stopDelegating(selector, event);
|
| 120 |
});
|
| 121 |
break;
|
| 122 |
case 0:
|
| 123 |
+
Object.keys(cache).each(function (cacheSelector) {
|
| 124 |
+
document.stopDelegating(cacheSelector);
|
| 125 |
});
|
| 126 |
break;
|
| 127 |
default:
|
| 140 |
return name.underscore().split('_').join(':');
|
| 141 |
}
|
| 142 |
|
| 143 |
+
function getWrapper(handler, klass) {
|
| 144 |
+
return function (event) {
|
| 145 |
+
return handler.call(new klass(this), event, event.memo);
|
| 146 |
+
};
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
function getHandlers(klass) {
|
| 150 |
var proto = klass.prototype;
|
| 151 |
var namespace = proto.namespace;
|
| 156 |
});
|
| 157 |
}
|
| 158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
function onDomLoad(selector, klass) {
|
| 160 |
window.$$(selector).each(function (element) {
|
| 161 |
new klass(element).onDomLoaded();
|
| 201 |
var drop;
|
| 202 |
var affected = [];
|
| 203 |
if (!this.drops.length) return;
|
| 204 |
+
this.drops.each(function (dropsDrop) {
|
| 205 |
+
if (window.Droppables.isAffected(point, element, dropsDrop)) affected.push(dropsDrop);
|
| 206 |
});
|
| 207 |
if (affected.length > 0) drop = window.Droppables.findDeepestChild(affected);
|
| 208 |
if (this.last_active && this.last_active !== drop) this.deactivate(this.last_active, element);
|
| 329 |
return str.replace(/&/g, '&').replace(/>/g, '>').replace(/</g, '<').replace(/"/g, '"');
|
| 330 |
// ": fix for FileMerge because the previous line fucks up its syntax coloring
|
| 331 |
},
|
| 332 |
+
loading: function (isLoading) {
|
| 333 |
+
if (isLoading) {
|
| 334 |
window.$(WysijaForm.options.editor).addClassName('loading');
|
| 335 |
window.$(WysijaForm.options.toolbar).addClassName('loading');
|
| 336 |
} else {
|
| 345 |
});
|
| 346 |
},
|
| 347 |
load: function (data) {
|
| 348 |
+
var settingsElements;
|
| 349 |
if (data === undefined) return;
|
| 350 |
|
| 351 |
// load body
|
| 356 |
});
|
| 357 |
|
| 358 |
// load settings
|
| 359 |
+
settingsElements = window.$('mailpoet_form_settings').getElements();
|
| 360 |
+
settingsElements.each(function (setting) {
|
| 361 |
// skip lists
|
| 362 |
if (setting.name === 'segments') {
|
| 363 |
return true;
|
| 374 |
setting.setValue(data.settings[setting.name]);
|
| 375 |
}
|
| 376 |
}
|
| 377 |
+
return true;
|
| 378 |
});
|
| 379 |
}
|
| 380 |
},
|
| 388 |
};
|
| 389 |
// body
|
| 390 |
WysijaForm.getBlocks().each(function (b) {
|
| 391 |
+
var blockData = (typeof (b.block['save']) === 'function') ? b.block.save() : null;
|
| 392 |
|
| 393 |
+
if (blockData !== null) {
|
| 394 |
// set block position
|
| 395 |
+
blockData['position'] = position;
|
| 396 |
|
| 397 |
// increment position
|
| 398 |
position++;
|
| 399 |
|
| 400 |
// add block data to body
|
| 401 |
+
data['body'].push(blockData);
|
| 402 |
}
|
| 403 |
});
|
| 404 |
|
| 481 |
return (window.$$('#' + WysijaForm.options.editor + ' [wysija_id="segments"]').length > 0);
|
| 482 |
},
|
| 483 |
isSegmentSelectionValid: function () {
|
| 484 |
+
var segmentSelection = window.$$('#' + WysijaForm.options.editor + ' [wysija_id="segments"]')[0];
|
| 485 |
var block;
|
| 486 |
+
if (segmentSelection !== undefined) {
|
| 487 |
+
block = WysijaForm.get(segmentSelection).block.getData();
|
| 488 |
return (
|
| 489 |
(block.params.values !== undefined)
|
| 490 |
&&
|
| 495 |
},
|
| 496 |
setBlockPositions: function (event, target) {
|
| 497 |
var index = 1;
|
| 498 |
+
var blockPlaceholder;
|
| 499 |
+
var previousPlaceholder;
|
| 500 |
// release dragging lock
|
| 501 |
WysijaForm.locks.dragging = false;
|
| 502 |
|
| 512 |
|
| 513 |
if (target !== undefined) {
|
| 514 |
// get placeholders (previous placeholder matches the placeholder linked to the next block)
|
| 515 |
+
blockPlaceholder = window.$(target.element.readAttribute('wysija_placeholder'));
|
| 516 |
+
previousPlaceholder = target.element.previous('.block_placeholder');
|
| 517 |
|
| 518 |
+
if (blockPlaceholder !== null) {
|
| 519 |
// put block placeholder before the current block
|
| 520 |
target.element.insert({
|
| 521 |
+
before: blockPlaceholder
|
| 522 |
});
|
| 523 |
|
| 524 |
// if the next block is a wysija_block, insert previous placeholder
|
| 525 |
+
if (target.element.next() !== undefined && target.element.next().hasClassName('mailpoet_form_block') && previousPlaceholder !== undefined) {
|
| 526 |
target.element.insert({
|
| 527 |
+
after: previousPlaceholder
|
| 528 |
});
|
| 529 |
}
|
| 530 |
}
|
| 544 |
// get parent dimensions and position
|
| 545 |
var parentDim = element.up('.mailpoet_form_block').getDimensions();
|
| 546 |
var parentPos = element.up('.mailpoet_form_block').cumulativeOffset();
|
| 547 |
+
var isVisible = (parentPos.top <= (WysijaForm.scroll.top + viewportHeight));
|
| 548 |
var buttonMargin = 5;
|
| 549 |
var relativeTop = buttonMargin;
|
| 550 |
|
| 551 |
+
if (isVisible) {
|
| 552 |
// always center
|
| 553 |
relativeTop = parseInt((parentDim.height / 2) - (element.getHeight() / 2), 10);
|
| 554 |
}
|
| 569 |
if (WysijaForm.toolbar.left === null) WysijaForm.toolbar.left = parseInt(window.$(WysijaForm.options.container).positionedOffset().left);
|
| 570 |
}
|
| 571 |
if (WysijaForm.toolbar.x === null) WysijaForm.toolbar.x = parseInt(WysijaForm.toolbar.left + window.$(WysijaForm.options.container).getDimensions().width + 15);
|
|
|
|
| 572 |
},
|
| 573 |
setToolbarPosition: function () {
|
| 574 |
var position;
|
| 626 |
},
|
| 627 |
hideControls: function () {
|
| 628 |
try {
|
| 629 |
+
WysijaForm.getBlocks().invoke('hideControls');
|
| 630 |
+
} catch (e) {}
|
|
|
|
|
|
|
| 631 |
},
|
| 632 |
hideTools: function () {
|
| 633 |
window.$$('.wysija_tools').invoke('hide');
|
| 699 |
// this is a url, so do not encode the protocol
|
| 700 |
return encodeURI(str).replace(/[!'()*]/g, escape);
|
| 701 |
}
|
| 702 |
+
return str;
|
| 703 |
},
|
| 704 |
updateBlock: function (field) {
|
| 705 |
var hasUpdated = false;
|
| 821 |
}
|
| 822 |
},
|
| 823 |
makeBlockDroppable: function () {
|
| 824 |
+
var blockPlaceholder;
|
| 825 |
if (this.isBlockDroppableEnabled() === false) {
|
| 826 |
+
blockPlaceholder = this.getBlockDroppable();
|
| 827 |
+
window.Droppables.add(blockPlaceholder.identify(), WysijaForm.blockDropOptions);
|
| 828 |
+
blockPlaceholder.addClassName('enabled');
|
| 829 |
}
|
| 830 |
},
|
| 831 |
removeBlockDroppable: function () {
|
| 832 |
+
var blockPlaceholder;
|
| 833 |
if (this.isBlockDroppableEnabled()) {
|
| 834 |
+
blockPlaceholder = this.getBlockDroppable();
|
| 835 |
+
window.Droppables.remove(blockPlaceholder.identify());
|
| 836 |
+
blockPlaceholder.removeClassName('enabled');
|
| 837 |
}
|
| 838 |
},
|
| 839 |
isBlockDroppableEnabled: function () {
|
| 840 |
// if the block_placeholder does not exist, create it
|
| 841 |
+
var blockPlaceholder = this.getBlockDroppable();
|
| 842 |
+
if (blockPlaceholder === null) {
|
| 843 |
return this.createBlockDroppable().hasClassName('enabled');
|
|
|
|
|
|
|
| 844 |
}
|
| 845 |
+
return blockPlaceholder.hasClassName('enabled');
|
| 846 |
},
|
| 847 |
createBlockDroppable: function () {
|
| 848 |
info('block -> createBlockDroppable');
|
| 854 |
getBlockDroppable: function () {
|
| 855 |
if (this.element.previous() === undefined || this.element.previous().hasClassName('block_placeholder') === false) {
|
| 856 |
return null;
|
|
|
|
|
|
|
| 857 |
}
|
| 858 |
+
return this.element.previous();
|
| 859 |
},
|
| 860 |
getControls: function () {
|
| 861 |
return this.element.down('.wysija_controls');
|
| 960 |
WysijaForm.Block.create = function (createBlock, target) {
|
| 961 |
var block = createBlock;
|
| 962 |
var body;
|
| 963 |
+
var blockTemplate;
|
| 964 |
var template;
|
| 965 |
var output;
|
| 966 |
+
var settingsSegments;
|
| 967 |
if (window.$('form_template_' + block.type) === null) {
|
| 968 |
return false;
|
| 969 |
}
|
| 970 |
|
| 971 |
body = window.$(WysijaForm.options.body);
|
| 972 |
+
blockTemplate = window.Handlebars.compile(window.$('form_template_block').innerHTML);
|
| 973 |
template = window.Handlebars.compile(window.$('form_template_' + block.type).innerHTML);
|
| 974 |
output = '';
|
| 975 |
|
| 976 |
if (block.type === 'segment') {
|
| 977 |
if (block.params.values === undefined) {
|
| 978 |
+
settingsSegments = window.jQuery('#mailpoet_form_segments').val();
|
| 979 |
+
if (settingsSegments !== null && settingsSegments.length > 0) {
|
| 980 |
block.params.values = window.mailpoet_segments.filter(function (segment) {
|
| 981 |
+
return (settingsSegments.indexOf(segment.id) !== -1);
|
| 982 |
});
|
| 983 |
}
|
| 984 |
}
|
| 986 |
|
| 987 |
// set block template (depending on the block type)
|
| 988 |
block.template = template(block);
|
| 989 |
+
output = blockTemplate(block);
|
| 990 |
|
| 991 |
// check if the new block is unique and if there's already an instance
|
| 992 |
// of it in the history. If so, remove its former instance from the history
|
| 1014 |
|
| 1015 |
// position settings
|
| 1016 |
WysijaForm.setSettingsPosition();
|
| 1017 |
+
return true;
|
| 1018 |
};
|
| 1019 |
|
| 1020 |
document.observe('wjfe:item:drop', function (event) {
|
| 1053 |
return data;
|
| 1054 |
},
|
| 1055 |
setData: function (data) {
|
| 1056 |
+
var currentData = this.getData();
|
| 1057 |
+
var params = window.$H(currentData.params).merge(data.params).toObject();
|
| 1058 |
|
| 1059 |
// update type if it changed
|
| 1060 |
+
if (data.type !== undefined && data.type !== currentData.type) {
|
| 1061 |
this.element.writeAttribute('wysija_type', data.type);
|
| 1062 |
}
|
| 1063 |
|
| 1080 |
},
|
| 1081 |
redraw: function (data) {
|
| 1082 |
var options;
|
| 1083 |
+
var blockTemplate;
|
| 1084 |
var template;
|
| 1085 |
var params;
|
| 1086 |
// set parameters
|
| 1087 |
this.setData(data);
|
| 1088 |
options = this.getData();
|
| 1089 |
// redraw block
|
| 1090 |
+
blockTemplate = window.Handlebars.compile(window.$('form_template_block').innerHTML);
|
| 1091 |
template = window.Handlebars.compile(window.$('form_template_' + options.type).innerHTML);
|
| 1092 |
params = window.$H(options).merge({
|
| 1093 |
template: template(options)
|
| 1094 |
}).toObject();
|
| 1095 |
+
this.element.replace(blockTemplate(params));
|
| 1096 |
|
| 1097 |
WysijaForm.init();
|
| 1098 |
},
|
| 1115 |
/* When dom is loaded, initialize WysijaForm */
|
| 1116 |
document.observe('dom:loaded', WysijaForm.init);
|
| 1117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1118 |
module.exports = WysijaForm;
|
| 1119 |
|
| 1120 |
|
| 1121 |
/***/ },
|
| 1122 |
|
| 1123 |
+
/***/ 559:
|
| 1124 |
/***/ function(module, exports, __webpack_require__) {
|
| 1125 |
|
| 1126 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["CodeMirror"] = __webpack_require__(560);
|
| 1127 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 1128 |
|
| 1129 |
/***/ },
|
| 1130 |
|
| 1131 |
+
/***/ 560:
|
| 1132 |
/***/ function(module, exports, __webpack_require__) {
|
| 1133 |
|
| 1134 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
| 10800 |
|
| 10801 |
/***/ },
|
| 10802 |
|
| 10803 |
+
/***/ 561:
|
| 10804 |
/***/ function(module, exports, __webpack_require__) {
|
| 10805 |
|
| 10806 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
| 10808 |
|
| 10809 |
(function(mod) {
|
| 10810 |
if (true) // CommonJS
|
| 10811 |
+
mod(__webpack_require__(559));
|
| 10812 |
else if (typeof define == "function" && define.amd) // AMD
|
| 10813 |
define(["../../lib/codemirror"], mod);
|
| 10814 |
else // Plain browser env
|
assets/js/{mailpoet.0ecf7a2c.js → mailpoet.a5fa72ae.js}
RENAMED
|
@@ -3,7 +3,6 @@ webpackJsonp([3],[
|
|
| 3 |
/***/ function(module, exports, __webpack_require__) {
|
| 4 |
|
| 5 |
__webpack_require__(276);
|
| 6 |
-
__webpack_require__(561);
|
| 7 |
__webpack_require__(562);
|
| 8 |
__webpack_require__(563);
|
| 9 |
__webpack_require__(564);
|
|
@@ -12,8 +11,9 @@ webpackJsonp([3],[
|
|
| 12 |
__webpack_require__(567);
|
| 13 |
__webpack_require__(568);
|
| 14 |
__webpack_require__(569);
|
|
|
|
| 15 |
__webpack_require__(436);
|
| 16 |
-
module.exports = __webpack_require__(
|
| 17 |
|
| 18 |
|
| 19 |
/***/ },
|
|
@@ -23905,7 +23905,7 @@ webpackJsonp([3],[
|
|
| 23905 |
/***/ function(module, exports, __webpack_require__) {
|
| 23906 |
|
| 23907 |
var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js
|
| 23908 |
-
//! version : 2.19.
|
| 23909 |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
| 23910 |
//! license : MIT
|
| 23911 |
//! momentjs.com
|
|
@@ -24565,7 +24565,7 @@ webpackJsonp([3],[
|
|
| 24565 |
|
| 24566 |
// any word (or two) characters or numbers including two/three word month in arabic.
|
| 24567 |
// includes scottish gaelic two word and hyphenated months
|
| 24568 |
-
var matchWord = /[0-9]
|
| 24569 |
|
| 24570 |
|
| 24571 |
var regexes = {};
|
|
@@ -25935,7 +25935,7 @@ webpackJsonp([3],[
|
|
| 25935 |
// note: all values past the year are optional and will default to the lowest possible value.
|
| 25936 |
// [year, month, day , hour, minute, second, millisecond]
|
| 25937 |
function configFromArray (config) {
|
| 25938 |
-
var i, date, input = [], currentDate, yearToUse;
|
| 25939 |
|
| 25940 |
if (config._d) {
|
| 25941 |
return;
|
|
@@ -25985,6 +25985,8 @@ webpackJsonp([3],[
|
|
| 25985 |
}
|
| 25986 |
|
| 25987 |
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
|
|
|
|
|
|
|
| 25988 |
// Apply timezone offset from input. The actual utcOffset can be changed
|
| 25989 |
// with parseZone.
|
| 25990 |
if (config._tzm != null) {
|
|
@@ -25996,7 +25998,7 @@ webpackJsonp([3],[
|
|
| 25996 |
}
|
| 25997 |
|
| 25998 |
// check for mismatching day of week
|
| 25999 |
-
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !==
|
| 26000 |
getParsingFlags(config).weekdayMismatch = true;
|
| 26001 |
}
|
| 26002 |
}
|
|
@@ -27572,7 +27574,7 @@ webpackJsonp([3],[
|
|
| 27572 |
|
| 27573 |
addParseToken(['D', 'DD'], DATE);
|
| 27574 |
addParseToken('Do', function (input, array) {
|
| 27575 |
-
array[DATE] = toInt(input.match(match1to2)[0]
|
| 27576 |
});
|
| 27577 |
|
| 27578 |
// MOMENTS
|
|
@@ -28384,7 +28386,7 @@ webpackJsonp([3],[
|
|
| 28384 |
// Side effect imports
|
| 28385 |
|
| 28386 |
|
| 28387 |
-
hooks.version = '2.19.
|
| 28388 |
|
| 28389 |
setHookCallback(createLocal);
|
| 28390 |
|
|
@@ -31915,7 +31917,7 @@ webpackJsonp([3],[
|
|
| 31915 |
/***/ function(module, exports, __webpack_require__) {
|
| 31916 |
|
| 31917 |
//! moment.js locale configuration
|
| 31918 |
-
//! locale : Spanish(United
|
| 31919 |
//! author : bustta : https://github.com/bustta
|
| 31920 |
|
| 31921 |
;(function (global, factory) {
|
|
@@ -33592,8 +33594,7 @@ webpackJsonp([3],[
|
|
| 33592 |
|
| 33593 |
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
|
| 33594 |
function translate(number, withoutSuffix, key, isFuture) {
|
| 33595 |
-
var num = number
|
| 33596 |
-
suffix;
|
| 33597 |
switch (key) {
|
| 33598 |
case 's':
|
| 33599 |
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
|
|
@@ -50260,7 +50261,8 @@ webpackJsonp([3],[
|
|
| 50260 |
/* 558 */,
|
| 50261 |
/* 559 */,
|
| 50262 |
/* 560 */,
|
| 50263 |
-
/* 561
|
|
|
|
| 50264 |
/***/ function(module, exports, __webpack_require__) {
|
| 50265 |
|
| 50266 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function requestFailed(errorMessage, xhr) {
|
|
@@ -50353,7 +50355,7 @@ webpackJsonp([3],[
|
|
| 50353 |
|
| 50354 |
|
| 50355 |
/***/ },
|
| 50356 |
-
/*
|
| 50357 |
/***/ function(module, exports, __webpack_require__) {
|
| 50358 |
|
| 50359 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -50434,7 +50436,7 @@ webpackJsonp([3],[
|
|
| 50434 |
var escapeToken;
|
| 50435 |
var index;
|
| 50436 |
var token;
|
| 50437 |
-
var
|
| 50438 |
date: {
|
| 50439 |
d: 'DD',
|
| 50440 |
D: 'ddd',
|
|
@@ -50503,7 +50505,7 @@ webpackJsonp([3],[
|
|
| 50503 |
|
| 50504 |
if (!format || format.length <= 0) return format;
|
| 50505 |
|
| 50506 |
-
replacements =
|
| 50507 |
convertedFormat = [];
|
| 50508 |
escapeToken = false;
|
| 50509 |
|
|
@@ -50532,7 +50534,7 @@ webpackJsonp([3],[
|
|
| 50532 |
|
| 50533 |
|
| 50534 |
/***/ },
|
| 50535 |
-
/*
|
| 50536 |
/***/ function(module, exports, __webpack_require__) {
|
| 50537 |
|
| 50538 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -50557,12 +50559,11 @@ webpackJsonp([3],[
|
|
| 50557 |
return translations;
|
| 50558 |
}
|
| 50559 |
};
|
| 50560 |
-
|
| 50561 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 50562 |
|
| 50563 |
|
| 50564 |
/***/ },
|
| 50565 |
-
/*
|
| 50566 |
/***/ function(module, exports, __webpack_require__) {
|
| 50567 |
|
| 50568 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
|
@@ -50677,9 +50678,8 @@ webpackJsonp([3],[
|
|
| 50677 |
compileTemplate: function (template) {
|
| 50678 |
if (this.renderer === 'html') {
|
| 50679 |
return function () { return template; };
|
| 50680 |
-
} else {
|
| 50681 |
-
return window.Handlebars.compile(template);
|
| 50682 |
}
|
|
|
|
| 50683 |
},
|
| 50684 |
init: function (options) {
|
| 50685 |
var modal;
|
|
@@ -50781,6 +50781,7 @@ webpackJsonp([3],[
|
|
| 50781 |
jQuery(document).on('keyup.mailpoet_modal', function (e) {
|
| 50782 |
if (this.opened === false) { return false; }
|
| 50783 |
if (e.keyCode === 27) { this.cancel(); }
|
|
|
|
| 50784 |
}.bind(this));
|
| 50785 |
|
| 50786 |
// make sure the popup is repositioned when the window is resized
|
|
@@ -51206,7 +51207,7 @@ webpackJsonp([3],[
|
|
| 51206 |
|
| 51207 |
|
| 51208 |
/***/ },
|
| 51209 |
-
/*
|
| 51210 |
/***/ function(module, exports, __webpack_require__) {
|
| 51211 |
|
| 51212 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
|
@@ -51326,9 +51327,8 @@ webpackJsonp([3],[
|
|
| 51326 |
formatMessage: function (message) {
|
| 51327 |
if (Array.isArray(message)) {
|
| 51328 |
return message.join('<br />');
|
| 51329 |
-
} else {
|
| 51330 |
-
return message;
|
| 51331 |
}
|
|
|
|
| 51332 |
},
|
| 51333 |
show: function (options) {
|
| 51334 |
// initialize
|
|
@@ -51430,7 +51430,7 @@ webpackJsonp([3],[
|
|
| 51430 |
|
| 51431 |
|
| 51432 |
/***/ },
|
| 51433 |
-
/*
|
| 51434 |
/***/ function(module, exports, __webpack_require__) {
|
| 51435 |
|
| 51436 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -51452,12 +51452,11 @@ webpackJsonp([3],[
|
|
| 51452 |
);
|
| 51453 |
}
|
| 51454 |
};
|
| 51455 |
-
|
| 51456 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 51457 |
|
| 51458 |
|
| 51459 |
/***/ },
|
| 51460 |
-
/*
|
| 51461 |
/***/ function(module, exports, __webpack_require__) {
|
| 51462 |
|
| 51463 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
|
@@ -51485,7 +51484,7 @@ webpackJsonp([3],[
|
|
| 51485 |
*/
|
| 51486 |
$.fn.mailpoetSerializeObject = function (coerce) {
|
| 51487 |
var obj = {};
|
| 51488 |
-
var
|
| 51489 |
|
| 51490 |
// Iterate over all name=value pairs.
|
| 51491 |
$.each(this.serializeArray(), function (j, v) {
|
|
@@ -51497,33 +51496,33 @@ webpackJsonp([3],[
|
|
| 51497 |
// If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
|
| 51498 |
// into its component parts.
|
| 51499 |
var keys = key.split('][');
|
| 51500 |
-
var
|
| 51501 |
|
| 51502 |
// If the first keys part contains [ and the last ends with ], then []
|
| 51503 |
// are correctly balanced.
|
| 51504 |
-
if (/\[/.test(keys[0]) && /\]$/.test(keys[
|
| 51505 |
// Remove the trailing ] from the last keys part.
|
| 51506 |
-
keys[
|
| 51507 |
|
| 51508 |
// Split first keys part into two parts on the [ and add them back onto
|
| 51509 |
// the beginning of the keys array.
|
| 51510 |
keys = keys.shift().split('[').concat(keys);
|
| 51511 |
|
| 51512 |
-
|
| 51513 |
} else {
|
| 51514 |
// Basic 'foo' style key.
|
| 51515 |
-
|
| 51516 |
}
|
| 51517 |
|
| 51518 |
// Coerce values.
|
| 51519 |
if (coerce) {
|
| 51520 |
val = val && !isNaN(val) ? +val // number
|
| 51521 |
: val === 'undefined' ? undefined // undefined
|
| 51522 |
-
:
|
| 51523 |
: val; // string
|
| 51524 |
}
|
| 51525 |
|
| 51526 |
-
if (
|
| 51527 |
// Complex key, build deep object structure based on a few rules:
|
| 51528 |
// * The 'cur' pointer starts at the object top-level.
|
| 51529 |
// * [] = array push (n is set to array length), [n] = array if n is
|
|
@@ -51533,14 +51532,13 @@ webpackJsonp([3],[
|
|
| 51533 |
// object or array based on the type of the next keys part.
|
| 51534 |
// * Move the 'cur' pointer to the next level.
|
| 51535 |
// * Rinse & repeat.
|
| 51536 |
-
for (; i <=
|
| 51537 |
key = keys[i] === '' ? cur.length : keys[i];
|
| 51538 |
-
cur[key] = i <
|
| 51539 |
? cur[key] || (keys[i + 1] && isNaN(keys[i + 1]) ? {} : [])
|
| 51540 |
: val;
|
| 51541 |
cur = cur[key];
|
| 51542 |
}
|
| 51543 |
-
|
| 51544 |
} else {
|
| 51545 |
// Simple key, even simpler rules, since only scalars and shallow
|
| 51546 |
// arrays are allowed.
|
|
@@ -51548,12 +51546,10 @@ webpackJsonp([3],[
|
|
| 51548 |
if ($.isArray(obj[key])) {
|
| 51549 |
// val is already an array, so push on the next value.
|
| 51550 |
obj[key].push(val);
|
| 51551 |
-
|
| 51552 |
} else if (obj[key] !== undefined) {
|
| 51553 |
// val isn't an array, but since a second value has been specified,
|
| 51554 |
// convert val into an array.
|
| 51555 |
obj[key] = [obj[key], val];
|
| 51556 |
-
|
| 51557 |
} else {
|
| 51558 |
// val is a scalar.
|
| 51559 |
obj[key] = val;
|
|
@@ -51569,7 +51565,7 @@ webpackJsonp([3],[
|
|
| 51569 |
|
| 51570 |
|
| 51571 |
/***/ },
|
| 51572 |
-
/*
|
| 51573 |
/***/ function(module, exports, __webpack_require__) {
|
| 51574 |
|
| 51575 |
/* WEBPACK VAR INJECTION */(function(global) {/*!
|
|
@@ -54068,7 +54064,7 @@ webpackJsonp([3],[
|
|
| 54068 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 54069 |
|
| 54070 |
/***/ },
|
| 54071 |
-
/*
|
| 54072 |
/***/ function(module, exports, __webpack_require__) {
|
| 54073 |
|
| 54074 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -54144,7 +54140,7 @@ webpackJsonp([3],[
|
|
| 54144 |
|
| 54145 |
|
| 54146 |
/***/ },
|
| 54147 |
-
/*
|
| 54148 |
/***/ function(module, exports, __webpack_require__) {
|
| 54149 |
|
| 54150 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(2), __webpack_require__(34), __webpack_require__(436)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, React, ReactDOM, TooltipComponent) {
|
|
@@ -54154,7 +54150,6 @@ webpackJsonp([3],[
|
|
| 54154 |
|
| 54155 |
MailPoet.helpTooltip = {
|
| 54156 |
show: function (domContainerNode, opts) {
|
| 54157 |
-
|
| 54158 |
ReactDOM.render(React.createElement(
|
| 54159 |
TooltipComponent, {
|
| 54160 |
tooltip: opts.tooltip,
|
|
@@ -54164,7 +54159,6 @@ webpackJsonp([3],[
|
|
| 54164 |
), domContainerNode);
|
| 54165 |
}
|
| 54166 |
};
|
| 54167 |
-
|
| 54168 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 54169 |
|
| 54170 |
|
| 3 |
/***/ function(module, exports, __webpack_require__) {
|
| 4 |
|
| 5 |
__webpack_require__(276);
|
|
|
|
| 6 |
__webpack_require__(562);
|
| 7 |
__webpack_require__(563);
|
| 8 |
__webpack_require__(564);
|
| 11 |
__webpack_require__(567);
|
| 12 |
__webpack_require__(568);
|
| 13 |
__webpack_require__(569);
|
| 14 |
+
__webpack_require__(570);
|
| 15 |
__webpack_require__(436);
|
| 16 |
+
module.exports = __webpack_require__(571);
|
| 17 |
|
| 18 |
|
| 19 |
/***/ },
|
| 23905 |
/***/ function(module, exports, __webpack_require__) {
|
| 23906 |
|
| 23907 |
var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js
|
| 23908 |
+
//! version : 2.19.4
|
| 23909 |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
| 23910 |
//! license : MIT
|
| 23911 |
//! momentjs.com
|
| 24565 |
|
| 24566 |
// any word (or two) characters or numbers including two/three word month in arabic.
|
| 24567 |
// includes scottish gaelic two word and hyphenated months
|
| 24568 |
+
var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
|
| 24569 |
|
| 24570 |
|
| 24571 |
var regexes = {};
|
| 25935 |
// note: all values past the year are optional and will default to the lowest possible value.
|
| 25936 |
// [year, month, day , hour, minute, second, millisecond]
|
| 25937 |
function configFromArray (config) {
|
| 25938 |
+
var i, date, input = [], currentDate, expectedWeekday, yearToUse;
|
| 25939 |
|
| 25940 |
if (config._d) {
|
| 25941 |
return;
|
| 25985 |
}
|
| 25986 |
|
| 25987 |
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
|
| 25988 |
+
expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
|
| 25989 |
+
|
| 25990 |
// Apply timezone offset from input. The actual utcOffset can be changed
|
| 25991 |
// with parseZone.
|
| 25992 |
if (config._tzm != null) {
|
| 25998 |
}
|
| 25999 |
|
| 26000 |
// check for mismatching day of week
|
| 26001 |
+
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
|
| 26002 |
getParsingFlags(config).weekdayMismatch = true;
|
| 26003 |
}
|
| 26004 |
}
|
| 27574 |
|
| 27575 |
addParseToken(['D', 'DD'], DATE);
|
| 27576 |
addParseToken('Do', function (input, array) {
|
| 27577 |
+
array[DATE] = toInt(input.match(match1to2)[0]);
|
| 27578 |
});
|
| 27579 |
|
| 27580 |
// MOMENTS
|
| 28386 |
// Side effect imports
|
| 28387 |
|
| 28388 |
|
| 28389 |
+
hooks.version = '2.19.4';
|
| 28390 |
|
| 28391 |
setHookCallback(createLocal);
|
| 28392 |
|
| 31917 |
/***/ function(module, exports, __webpack_require__) {
|
| 31918 |
|
| 31919 |
//! moment.js locale configuration
|
| 31920 |
+
//! locale : Spanish (United States) [es-us]
|
| 31921 |
//! author : bustta : https://github.com/bustta
|
| 31922 |
|
| 31923 |
;(function (global, factory) {
|
| 33594 |
|
| 33595 |
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
|
| 33596 |
function translate(number, withoutSuffix, key, isFuture) {
|
| 33597 |
+
var num = number;
|
|
|
|
| 33598 |
switch (key) {
|
| 33599 |
case 's':
|
| 33600 |
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
|
| 50261 |
/* 558 */,
|
| 50262 |
/* 559 */,
|
| 50263 |
/* 560 */,
|
| 50264 |
+
/* 561 */,
|
| 50265 |
+
/* 562 */
|
| 50266 |
/***/ function(module, exports, __webpack_require__) {
|
| 50267 |
|
| 50268 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function requestFailed(errorMessage, xhr) {
|
| 50355 |
|
| 50356 |
|
| 50357 |
/***/ },
|
| 50358 |
+
/* 563 */
|
| 50359 |
/***/ function(module, exports, __webpack_require__) {
|
| 50360 |
|
| 50361 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 50436 |
var escapeToken;
|
| 50437 |
var index;
|
| 50438 |
var token;
|
| 50439 |
+
var formatMappings = {
|
| 50440 |
date: {
|
| 50441 |
d: 'DD',
|
| 50442 |
D: 'ddd',
|
| 50505 |
|
| 50506 |
if (!format || format.length <= 0) return format;
|
| 50507 |
|
| 50508 |
+
replacements = formatMappings['date'];
|
| 50509 |
convertedFormat = [];
|
| 50510 |
escapeToken = false;
|
| 50511 |
|
| 50534 |
|
| 50535 |
|
| 50536 |
/***/ },
|
| 50537 |
+
/* 564 */
|
| 50538 |
/***/ function(module, exports, __webpack_require__) {
|
| 50539 |
|
| 50540 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 50559 |
return translations;
|
| 50560 |
}
|
| 50561 |
};
|
|
|
|
| 50562 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 50563 |
|
| 50564 |
|
| 50565 |
/***/ },
|
| 50566 |
+
/* 565 */
|
| 50567 |
/***/ function(module, exports, __webpack_require__) {
|
| 50568 |
|
| 50569 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
| 50678 |
compileTemplate: function (template) {
|
| 50679 |
if (this.renderer === 'html') {
|
| 50680 |
return function () { return template; };
|
|
|
|
|
|
|
| 50681 |
}
|
| 50682 |
+
return window.Handlebars.compile(template);
|
| 50683 |
},
|
| 50684 |
init: function (options) {
|
| 50685 |
var modal;
|
| 50781 |
jQuery(document).on('keyup.mailpoet_modal', function (e) {
|
| 50782 |
if (this.opened === false) { return false; }
|
| 50783 |
if (e.keyCode === 27) { this.cancel(); }
|
| 50784 |
+
return true;
|
| 50785 |
}.bind(this));
|
| 50786 |
|
| 50787 |
// make sure the popup is repositioned when the window is resized
|
| 51207 |
|
| 51208 |
|
| 51209 |
/***/ },
|
| 51210 |
+
/* 566 */
|
| 51211 |
/***/ function(module, exports, __webpack_require__) {
|
| 51212 |
|
| 51213 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
| 51327 |
formatMessage: function (message) {
|
| 51328 |
if (Array.isArray(message)) {
|
| 51329 |
return message.join('<br />');
|
|
|
|
|
|
|
| 51330 |
}
|
| 51331 |
+
return message;
|
| 51332 |
},
|
| 51333 |
show: function (options) {
|
| 51334 |
// initialize
|
| 51430 |
|
| 51431 |
|
| 51432 |
/***/ },
|
| 51433 |
+
/* 567 */
|
| 51434 |
/***/ function(module, exports, __webpack_require__) {
|
| 51435 |
|
| 51436 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 51452 |
);
|
| 51453 |
}
|
| 51454 |
};
|
|
|
|
| 51455 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 51456 |
|
| 51457 |
|
| 51458 |
/***/ },
|
| 51459 |
+
/* 568 */
|
| 51460 |
/***/ function(module, exports, __webpack_require__) {
|
| 51461 |
|
| 51462 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 51484 |
*/
|
| 51485 |
$.fn.mailpoetSerializeObject = function (coerce) {
|
| 51486 |
var obj = {};
|
| 51487 |
+
var coerceTypes = { true: !0, false: !1, null: null };
|
| 51488 |
|
| 51489 |
// Iterate over all name=value pairs.
|
| 51490 |
$.each(this.serializeArray(), function (j, v) {
|
| 51496 |
// If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
|
| 51497 |
// into its component parts.
|
| 51498 |
var keys = key.split('][');
|
| 51499 |
+
var keysLast = keys.length - 1;
|
| 51500 |
|
| 51501 |
// If the first keys part contains [ and the last ends with ], then []
|
| 51502 |
// are correctly balanced.
|
| 51503 |
+
if (/\[/.test(keys[0]) && /\]$/.test(keys[keysLast])) {
|
| 51504 |
// Remove the trailing ] from the last keys part.
|
| 51505 |
+
keys[keysLast] = keys[keysLast].replace(/\]$/, '');
|
| 51506 |
|
| 51507 |
// Split first keys part into two parts on the [ and add them back onto
|
| 51508 |
// the beginning of the keys array.
|
| 51509 |
keys = keys.shift().split('[').concat(keys);
|
| 51510 |
|
| 51511 |
+
keysLast = keys.length - 1;
|
| 51512 |
} else {
|
| 51513 |
// Basic 'foo' style key.
|
| 51514 |
+
keysLast = 0;
|
| 51515 |
}
|
| 51516 |
|
| 51517 |
// Coerce values.
|
| 51518 |
if (coerce) {
|
| 51519 |
val = val && !isNaN(val) ? +val // number
|
| 51520 |
: val === 'undefined' ? undefined // undefined
|
| 51521 |
+
: coerceTypes[val] !== undefined ? coerceTypes[val] // true, false, null
|
| 51522 |
: val; // string
|
| 51523 |
}
|
| 51524 |
|
| 51525 |
+
if (keysLast) {
|
| 51526 |
// Complex key, build deep object structure based on a few rules:
|
| 51527 |
// * The 'cur' pointer starts at the object top-level.
|
| 51528 |
// * [] = array push (n is set to array length), [n] = array if n is
|
| 51532 |
// object or array based on the type of the next keys part.
|
| 51533 |
// * Move the 'cur' pointer to the next level.
|
| 51534 |
// * Rinse & repeat.
|
| 51535 |
+
for (; i <= keysLast; i++) {
|
| 51536 |
key = keys[i] === '' ? cur.length : keys[i];
|
| 51537 |
+
cur[key] = i < keysLast
|
| 51538 |
? cur[key] || (keys[i + 1] && isNaN(keys[i + 1]) ? {} : [])
|
| 51539 |
: val;
|
| 51540 |
cur = cur[key];
|
| 51541 |
}
|
|
|
|
| 51542 |
} else {
|
| 51543 |
// Simple key, even simpler rules, since only scalars and shallow
|
| 51544 |
// arrays are allowed.
|
| 51546 |
if ($.isArray(obj[key])) {
|
| 51547 |
// val is already an array, so push on the next value.
|
| 51548 |
obj[key].push(val);
|
|
|
|
| 51549 |
} else if (obj[key] !== undefined) {
|
| 51550 |
// val isn't an array, but since a second value has been specified,
|
| 51551 |
// convert val into an array.
|
| 51552 |
obj[key] = [obj[key], val];
|
|
|
|
| 51553 |
} else {
|
| 51554 |
// val is a scalar.
|
| 51555 |
obj[key] = val;
|
| 51565 |
|
| 51566 |
|
| 51567 |
/***/ },
|
| 51568 |
+
/* 569 */
|
| 51569 |
/***/ function(module, exports, __webpack_require__) {
|
| 51570 |
|
| 51571 |
/* WEBPACK VAR INJECTION */(function(global) {/*!
|
| 54064 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 54065 |
|
| 54066 |
/***/ },
|
| 54067 |
+
/* 570 */
|
| 54068 |
/***/ function(module, exports, __webpack_require__) {
|
| 54069 |
|
| 54070 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
| 54140 |
|
| 54141 |
|
| 54142 |
/***/ },
|
| 54143 |
+
/* 571 */
|
| 54144 |
/***/ function(module, exports, __webpack_require__) {
|
| 54145 |
|
| 54146 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(2), __webpack_require__(34), __webpack_require__(436)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, React, ReactDOM, TooltipComponent) {
|
| 54150 |
|
| 54151 |
MailPoet.helpTooltip = {
|
| 54152 |
show: function (domContainerNode, opts) {
|
|
|
|
| 54153 |
ReactDOM.render(React.createElement(
|
| 54154 |
TooltipComponent, {
|
| 54155 |
tooltip: opts.tooltip,
|
| 54159 |
), domContainerNode);
|
| 54160 |
}
|
| 54161 |
};
|
|
|
|
| 54162 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 54163 |
|
| 54164 |
|
assets/js/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"mp2migrator.js": "mp2migrator.
|
| 3 |
-
"public.js": "public.
|
| 4 |
-
"admin.js": "admin.
|
| 5 |
-
"admin_vendor.js": "admin_vendor.
|
| 6 |
-
"form_editor.js": "form_editor.
|
| 7 |
-
"mailpoet.js": "mailpoet.
|
| 8 |
-
"newsletter_editor.js": "newsletter_editor.
|
| 9 |
-
"vendor.js": "vendor.
|
| 10 |
}
|
| 1 |
{
|
| 2 |
+
"mp2migrator.js": "mp2migrator.81060f18.js",
|
| 3 |
+
"public.js": "public.3d1d91ad.js",
|
| 4 |
+
"admin.js": "admin.39fd28da.js",
|
| 5 |
+
"admin_vendor.js": "admin_vendor.7914137d.js",
|
| 6 |
+
"form_editor.js": "form_editor.cc7529b3.js",
|
| 7 |
+
"mailpoet.js": "mailpoet.a5fa72ae.js",
|
| 8 |
+
"newsletter_editor.js": "newsletter_editor.e7b87b92.js",
|
| 9 |
+
"vendor.js": "vendor.3c206dd6.js"
|
| 10 |
}
|
assets/js/{mp2migrator.e755af46.js → mp2migrator.81060f18.js}
RENAMED
|
@@ -94,7 +94,6 @@
|
|
| 94 |
jQuery('#upgrade-completed').show();
|
| 95 |
}
|
| 96 |
jQuery('#logger').append(row + '<br />\n');
|
| 97 |
-
|
| 98 |
});
|
| 99 |
jQuery('#logger').append('<span class="error_msg">' + MailPoet.MP2Migrator.fatal_error + '</span>' + '<br />\n');
|
| 100 |
}).always(function () {
|
|
@@ -259,7 +258,6 @@
|
|
| 259 |
// Update the display
|
| 260 |
MailPoet.MP2Migrator.updateDisplay();
|
| 261 |
});
|
| 262 |
-
|
| 263 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 264 |
|
| 265 |
|
| 94 |
jQuery('#upgrade-completed').show();
|
| 95 |
}
|
| 96 |
jQuery('#logger').append(row + '<br />\n');
|
|
|
|
| 97 |
});
|
| 98 |
jQuery('#logger').append('<span class="error_msg">' + MailPoet.MP2Migrator.fatal_error + '</span>' + '<br />\n');
|
| 99 |
}).always(function () {
|
| 258 |
// Update the display
|
| 259 |
MailPoet.MP2Migrator.updateDisplay();
|
| 260 |
});
|
|
|
|
| 261 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 262 |
|
| 263 |
|
assets/js/{newsletter_editor.c4722da5.js → newsletter_editor.e7b87b92.js}
RENAMED
|
@@ -1,15 +1,14 @@
|
|
| 1 |
webpackJsonp([4],{
|
| 2 |
|
| 3 |
-
/***/
|
| 4 |
/***/ function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 7 |
-
__webpack_require__(
|
| 8 |
__webpack_require__(280),
|
| 9 |
__webpack_require__(276),
|
| 10 |
-
__webpack_require__(
|
| 11 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, _, MailPoet) {
|
| 12 |
-
|
| 13 |
var Module = {};
|
| 14 |
|
| 15 |
Module._query = function (args) {
|
|
@@ -119,26 +118,25 @@ webpackJsonp([4],{
|
|
| 119 |
|
| 120 |
__webpack_require__(280);
|
| 121 |
__webpack_require__(544);
|
| 122 |
-
__webpack_require__(571);
|
| 123 |
-
__webpack_require__(573);
|
| 124 |
-
__webpack_require__(574);
|
| 125 |
__webpack_require__(572);
|
| 126 |
-
__webpack_require__(
|
| 127 |
__webpack_require__(575);
|
|
|
|
|
|
|
| 128 |
__webpack_require__(576);
|
| 129 |
__webpack_require__(577);
|
| 130 |
__webpack_require__(578);
|
| 131 |
-
__webpack_require__(
|
| 132 |
__webpack_require__(582);
|
| 133 |
__webpack_require__(583);
|
| 134 |
__webpack_require__(584);
|
| 135 |
__webpack_require__(585);
|
| 136 |
__webpack_require__(586);
|
| 137 |
-
__webpack_require__(
|
| 138 |
__webpack_require__(589);
|
| 139 |
__webpack_require__(590);
|
| 140 |
-
__webpack_require__(
|
| 141 |
-
__webpack_require__(
|
| 142 |
__webpack_require__(594);
|
| 143 |
__webpack_require__(595);
|
| 144 |
__webpack_require__(596);
|
|
@@ -159,7 +157,8 @@ webpackJsonp([4],{
|
|
| 159 |
__webpack_require__(611);
|
| 160 |
__webpack_require__(612);
|
| 161 |
__webpack_require__(613);
|
| 162 |
-
|
|
|
|
| 163 |
|
| 164 |
|
| 165 |
/***/ },
|
|
@@ -9432,7 +9431,7 @@ webpackJsonp([4],{
|
|
| 9432 |
|
| 9433 |
/***/ },
|
| 9434 |
|
| 9435 |
-
/***/
|
| 9436 |
/***/ function(module, exports, __webpack_require__) {
|
| 9437 |
|
| 9438 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function requestFailed(errorMessage, xhr) {
|
|
@@ -9526,7 +9525,7 @@ webpackJsonp([4],{
|
|
| 9526 |
|
| 9527 |
/***/ },
|
| 9528 |
|
| 9529 |
-
/***/
|
| 9530 |
/***/ function(module, exports, __webpack_require__) {
|
| 9531 |
|
| 9532 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
|
@@ -9641,9 +9640,8 @@ webpackJsonp([4],{
|
|
| 9641 |
compileTemplate: function (template) {
|
| 9642 |
if (this.renderer === 'html') {
|
| 9643 |
return function () { return template; };
|
| 9644 |
-
} else {
|
| 9645 |
-
return window.Handlebars.compile(template);
|
| 9646 |
}
|
|
|
|
| 9647 |
},
|
| 9648 |
init: function (options) {
|
| 9649 |
var modal;
|
|
@@ -9745,6 +9743,7 @@ webpackJsonp([4],{
|
|
| 9745 |
jQuery(document).on('keyup.mailpoet_modal', function (e) {
|
| 9746 |
if (this.opened === false) { return false; }
|
| 9747 |
if (e.keyCode === 27) { this.cancel(); }
|
|
|
|
| 9748 |
}.bind(this));
|
| 9749 |
|
| 9750 |
// make sure the popup is repositioned when the window is resized
|
|
@@ -10171,7 +10170,7 @@ webpackJsonp([4],{
|
|
| 10171 |
|
| 10172 |
/***/ },
|
| 10173 |
|
| 10174 |
-
/***/
|
| 10175 |
/***/ function(module, exports, __webpack_require__) {
|
| 10176 |
|
| 10177 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
|
@@ -10291,9 +10290,8 @@ webpackJsonp([4],{
|
|
| 10291 |
formatMessage: function (message) {
|
| 10292 |
if (Array.isArray(message)) {
|
| 10293 |
return message.join('<br />');
|
| 10294 |
-
} else {
|
| 10295 |
-
return message;
|
| 10296 |
}
|
|
|
|
| 10297 |
},
|
| 10298 |
show: function (options) {
|
| 10299 |
// initialize
|
|
@@ -10396,7 +10394,7 @@ webpackJsonp([4],{
|
|
| 10396 |
|
| 10397 |
/***/ },
|
| 10398 |
|
| 10399 |
-
/***/
|
| 10400 |
/***/ function(module, exports, __webpack_require__) {
|
| 10401 |
|
| 10402 |
// MarionetteJS (Backbone.Marionette)
|
|
@@ -10410,7 +10408,7 @@ webpackJsonp([4],{
|
|
| 10410 |
|
| 10411 |
|
| 10412 |
(function (global, factory) {
|
| 10413 |
-
true ? module.exports = factory(__webpack_require__(544), __webpack_require__(280), __webpack_require__(
|
| 10414 |
typeof define === 'function' && define.amd ? define(['backbone', 'underscore', 'backbone.radio'], factory) :
|
| 10415 |
(global.Marionette = global['Mn'] = factory(global.Backbone,global._,global.Backbone.Radio));
|
| 10416 |
}(this, (function (Backbone,_,Radio) { 'use strict';
|
|
@@ -13891,7 +13889,7 @@ webpackJsonp([4],{
|
|
| 13891 |
|
| 13892 |
/***/ },
|
| 13893 |
|
| 13894 |
-
/***/
|
| 13895 |
/***/ function(module, exports, __webpack_require__) {
|
| 13896 |
|
| 13897 |
// Backbone.Radio v2.0.0
|
|
@@ -14247,7 +14245,7 @@ webpackJsonp([4],{
|
|
| 14247 |
|
| 14248 |
/***/ },
|
| 14249 |
|
| 14250 |
-
/***/
|
| 14251 |
/***/ function(module, exports) {
|
| 14252 |
|
| 14253 |
Backbone.SuperModel = (function(_, Backbone){
|
|
@@ -14670,7 +14668,7 @@ webpackJsonp([4],{
|
|
| 14670 |
|
| 14671 |
/***/ },
|
| 14672 |
|
| 14673 |
-
/***/
|
| 14674 |
/***/ function(module, exports, __webpack_require__) {
|
| 14675 |
|
| 14676 |
/**
|
|
@@ -20654,7 +20652,7 @@ webpackJsonp([4],{
|
|
| 20654 |
|
| 20655 |
/***/ },
|
| 20656 |
|
| 20657 |
-
/***/
|
| 20658 |
/***/ function(module, exports, __webpack_require__) {
|
| 20659 |
|
| 20660 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Spectrum Colorpicker v1.8.0
|
|
@@ -22984,7 +22982,7 @@ webpackJsonp([4],{
|
|
| 22984 |
|
| 22985 |
/***/ },
|
| 22986 |
|
| 22987 |
-
/***/
|
| 22988 |
/***/ function(module, exports) {
|
| 22989 |
|
| 22990 |
// Generated by CoffeeScript 1.9.2
|
|
@@ -23255,7 +23253,7 @@ webpackJsonp([4],{
|
|
| 23255 |
|
| 23256 |
/***/ },
|
| 23257 |
|
| 23258 |
-
/***/
|
| 23259 |
/***/ function(module, exports) {
|
| 23260 |
|
| 23261 |
/* Blob.js
|
|
@@ -23476,7 +23474,7 @@ webpackJsonp([4],{
|
|
| 23476 |
|
| 23477 |
/***/ },
|
| 23478 |
|
| 23479 |
-
/***/
|
| 23480 |
/***/ function(module, exports, __webpack_require__) {
|
| 23481 |
|
| 23482 |
var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
|
|
@@ -23662,7 +23660,7 @@ webpackJsonp([4],{
|
|
| 23662 |
|
| 23663 |
if (typeof module !== "undefined" && module.exports) {
|
| 23664 |
module.exports.saveAs = saveAs;
|
| 23665 |
-
} else if (("function" !== "undefined" && __webpack_require__(
|
| 23666 |
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
|
| 23667 |
return saveAs;
|
| 23668 |
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -23671,7 +23669,7 @@ webpackJsonp([4],{
|
|
| 23671 |
|
| 23672 |
/***/ },
|
| 23673 |
|
| 23674 |
-
/***/
|
| 23675 |
/***/ function(module, exports) {
|
| 23676 |
|
| 23677 |
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
|
@@ -23679,7 +23677,7 @@ webpackJsonp([4],{
|
|
| 23679 |
|
| 23680 |
/***/ },
|
| 23681 |
|
| 23682 |
-
/***/
|
| 23683 |
/***/ function(module, exports) {
|
| 23684 |
|
| 23685 |
/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
|
|
@@ -23688,7 +23686,7 @@ webpackJsonp([4],{
|
|
| 23688 |
|
| 23689 |
/***/ },
|
| 23690 |
|
| 23691 |
-
/***/
|
| 23692 |
/***/ function(module, exports, __webpack_require__) {
|
| 23693 |
|
| 23694 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
|
|
@@ -27584,7 +27582,7 @@ webpackJsonp([4],{
|
|
| 27584 |
|
| 27585 |
/***/ },
|
| 27586 |
|
| 27587 |
-
/***/
|
| 27588 |
/***/ function(module, exports, __webpack_require__) {
|
| 27589 |
|
| 27590 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -27596,12 +27594,12 @@ webpackJsonp([4],{
|
|
| 27596 |
*/
|
| 27597 |
|
| 27598 |
(function (root, factory) {
|
| 27599 |
-
var Marionette = __webpack_require__(
|
| 27600 |
-
var Radio = __webpack_require__(
|
| 27601 |
var _ = __webpack_require__(280);
|
| 27602 |
if (true) {
|
| 27603 |
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
| 27604 |
-
return factory(
|
| 27605 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 27606 |
}
|
| 27607 |
else if (typeof exports !== 'undefined') {
|
|
@@ -27623,13 +27621,13 @@ webpackJsonp([4],{
|
|
| 27623 |
|
| 27624 |
/***/ },
|
| 27625 |
|
| 27626 |
-
/***/
|
| 27627 |
/***/ function(module, exports, __webpack_require__) {
|
| 27628 |
|
| 27629 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27630 |
__webpack_require__(544),
|
| 27631 |
-
__webpack_require__(
|
| 27632 |
-
__webpack_require__(
|
| 27633 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Backbone, Marionette, BackboneRadio) {
|
| 27634 |
var Radio = BackboneRadio;
|
| 27635 |
|
|
@@ -27664,20 +27662,18 @@ webpackJsonp([4],{
|
|
| 27664 |
window.EditorApplication = app;
|
| 27665 |
|
| 27666 |
return app;
|
| 27667 |
-
|
| 27668 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 27669 |
|
| 27670 |
|
| 27671 |
/***/ },
|
| 27672 |
|
| 27673 |
-
/***/
|
| 27674 |
/***/ function(module, exports, __webpack_require__) {
|
| 27675 |
|
| 27676 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27677 |
-
__webpack_require__(
|
| 27678 |
-
__webpack_require__(
|
| 27679 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, SuperModel) {
|
| 27680 |
-
|
| 27681 |
var Module = {};
|
| 27682 |
|
| 27683 |
Module.ConfigModel = SuperModel.extend({
|
|
@@ -27699,8 +27695,8 @@ webpackJsonp([4],{
|
|
| 27699 |
return Module._config;
|
| 27700 |
};
|
| 27701 |
|
| 27702 |
-
App.on('before:start', function (
|
| 27703 |
-
var Application =
|
| 27704 |
// Expose config methods globally
|
| 27705 |
Application.getConfig = Module.getConfig;
|
| 27706 |
Application.setConfig = Module.setConfig;
|
|
@@ -27714,16 +27710,15 @@ webpackJsonp([4],{
|
|
| 27714 |
|
| 27715 |
/***/ },
|
| 27716 |
|
| 27717 |
-
/***/
|
| 27718 |
/***/ function(module, exports, __webpack_require__) {
|
| 27719 |
|
| 27720 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27721 |
-
__webpack_require__(
|
| 27722 |
-
__webpack_require__(
|
| 27723 |
-
__webpack_require__(
|
| 27724 |
__webpack_require__(280)
|
| 27725 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Marionette, SuperModel, _) {
|
| 27726 |
-
|
| 27727 |
'use strict';
|
| 27728 |
|
| 27729 |
var Module = {};
|
|
@@ -27788,8 +27783,8 @@ webpackJsonp([4],{
|
|
| 27788 |
return App.getConfig().get('availableStyles');
|
| 27789 |
};
|
| 27790 |
|
| 27791 |
-
App.on('before:start', function (
|
| 27792 |
-
var Application =
|
| 27793 |
var body;
|
| 27794 |
var globalStyles;
|
| 27795 |
// Expose style methods to global application
|
|
@@ -27802,9 +27797,9 @@ webpackJsonp([4],{
|
|
| 27802 |
this.setGlobalStyles(globalStyles);
|
| 27803 |
});
|
| 27804 |
|
| 27805 |
-
App.on('start', function (
|
| 27806 |
-
var stylesView = new Module.StylesView({ model:
|
| 27807 |
-
|
| 27808 |
});
|
| 27809 |
|
| 27810 |
return Module;
|
|
@@ -27813,16 +27808,16 @@ webpackJsonp([4],{
|
|
| 27813 |
|
| 27814 |
/***/ },
|
| 27815 |
|
| 27816 |
-
/***/
|
| 27817 |
/***/ function(module, exports, __webpack_require__) {
|
| 27818 |
|
| 27819 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27820 |
-
__webpack_require__(
|
| 27821 |
-
__webpack_require__(
|
| 27822 |
__webpack_require__(276),
|
| 27823 |
__webpack_require__(544),
|
| 27824 |
-
__webpack_require__(
|
| 27825 |
-
__webpack_require__(
|
| 27826 |
__webpack_require__(280),
|
| 27827 |
__webpack_require__(275)
|
| 27828 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
|
@@ -27835,7 +27830,6 @@ webpackJsonp([4],{
|
|
| 27835 |
_,
|
| 27836 |
jQuery
|
| 27837 |
) {
|
| 27838 |
-
|
| 27839 |
'use strict';
|
| 27840 |
|
| 27841 |
var Module = {};
|
|
@@ -27929,12 +27923,12 @@ webpackJsonp([4],{
|
|
| 27929 |
// position of the sidebar would be scrollable and not fixed
|
| 27930 |
// partially out of visible screen
|
| 27931 |
this.$el.parent().each(function () {
|
| 27932 |
-
var
|
| 27933 |
var self = jQuery(this);
|
| 27934 |
|
| 27935 |
if (self.css('position') === 'fixed') {
|
| 27936 |
-
|
| 27937 |
-
self.css('left',
|
| 27938 |
} else {
|
| 27939 |
self.css('left', '');
|
| 27940 |
}
|
|
@@ -28157,6 +28151,7 @@ webpackJsonp([4],{
|
|
| 28157 |
}
|
| 28158 |
});
|
| 28159 |
});
|
|
|
|
| 28160 |
}
|
| 28161 |
});
|
| 28162 |
|
|
@@ -28178,18 +28173,18 @@ webpackJsonp([4],{
|
|
| 28178 |
}
|
| 28179 |
});
|
| 28180 |
|
| 28181 |
-
App.on('before:start', function (
|
| 28182 |
-
var Application =
|
| 28183 |
Application.registerWidget = Module.registerWidget;
|
| 28184 |
Application.getWidgets = Module.getWidgets;
|
| 28185 |
Application.registerLayoutWidget = Module.registerLayoutWidget;
|
| 28186 |
Application.getLayoutWidgets = Module.getLayoutWidgets;
|
| 28187 |
});
|
| 28188 |
|
| 28189 |
-
App.on('start', function (
|
| 28190 |
var sidebarView = new SidebarView();
|
| 28191 |
|
| 28192 |
-
|
| 28193 |
|
| 28194 |
MailPoet.helpTooltip.show(document.getElementById('tooltip-send-preview'), {
|
| 28195 |
tooltipId: 'tooltip-editor-send-preview',
|
|
@@ -28215,12 +28210,12 @@ webpackJsonp([4],{
|
|
| 28215 |
|
| 28216 |
/***/ },
|
| 28217 |
|
| 28218 |
-
/***/
|
| 28219 |
/***/ function(module, exports, __webpack_require__) {
|
| 28220 |
|
| 28221 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28222 |
-
__webpack_require__(
|
| 28223 |
-
__webpack_require__(
|
| 28224 |
__webpack_require__(280),
|
| 28225 |
__webpack_require__(276)
|
| 28226 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, SuperModel, _, MailPoet) {
|
|
@@ -28253,16 +28248,14 @@ webpackJsonp([4],{
|
|
| 28253 |
Module.getBlockTypeModel = function (type) {
|
| 28254 |
if (type in Module._blockTypes) {
|
| 28255 |
return Module._blockTypes[type].blockModel;
|
| 28256 |
-
} else {
|
| 28257 |
-
throw 'Block type not supported: ' + type;
|
| 28258 |
}
|
|
|
|
| 28259 |
};
|
| 28260 |
Module.getBlockTypeView = function (type) {
|
| 28261 |
if (type in Module._blockTypes) {
|
| 28262 |
return Module._blockTypes[type].blockView;
|
| 28263 |
-
} else {
|
| 28264 |
-
throw 'Block type not supported: ' + type;
|
| 28265 |
}
|
|
|
|
| 28266 |
};
|
| 28267 |
|
| 28268 |
Module.getBody = function () {
|
|
@@ -28288,21 +28281,21 @@ webpackJsonp([4],{
|
|
| 28288 |
};
|
| 28289 |
|
| 28290 |
App.on('before:start', function (Application, options) {
|
| 28291 |
-
var
|
| 28292 |
// Expose block methods globally
|
| 28293 |
-
|
| 28294 |
-
|
| 28295 |
-
|
| 28296 |
-
|
| 28297 |
-
|
| 28298 |
-
|
| 28299 |
-
|
| 28300 |
|
| 28301 |
Module.newsletter = new Module.NewsletterModel(_.omit(_.clone(options.newsletter), ['body']));
|
| 28302 |
});
|
| 28303 |
|
| 28304 |
App.on('start', function (Application, options) {
|
| 28305 |
-
var
|
| 28306 |
var body = options.newsletter.body;
|
| 28307 |
var content = (_.has(body, 'content')) ? body.content : {};
|
| 28308 |
|
|
@@ -28313,13 +28306,13 @@ webpackJsonp([4],{
|
|
| 28313 |
);
|
| 28314 |
}
|
| 28315 |
|
| 28316 |
-
|
| 28317 |
-
|
| 28318 |
-
model:
|
| 28319 |
renderOptions: { depth: 0 }
|
| 28320 |
});
|
| 28321 |
|
| 28322 |
-
|
| 28323 |
});
|
| 28324 |
|
| 28325 |
|
|
@@ -28329,18 +28322,17 @@ webpackJsonp([4],{
|
|
| 28329 |
|
| 28330 |
/***/ },
|
| 28331 |
|
| 28332 |
-
/***/
|
| 28333 |
/***/ function(module, exports, __webpack_require__) {
|
| 28334 |
|
| 28335 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28336 |
-
__webpack_require__(
|
| 28337 |
__webpack_require__(544),
|
| 28338 |
-
__webpack_require__(
|
| 28339 |
__webpack_require__(280),
|
| 28340 |
__webpack_require__(275),
|
| 28341 |
__webpack_require__(276)
|
| 28342 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Backbone, Marionette, _, jQuery, MailPoet) {
|
| 28343 |
-
|
| 28344 |
'use strict';
|
| 28345 |
|
| 28346 |
var Module = {};
|
|
@@ -28363,8 +28355,8 @@ webpackJsonp([4],{
|
|
| 28363 |
}
|
| 28364 |
});
|
| 28365 |
|
| 28366 |
-
App.on('start', function (
|
| 28367 |
-
|
| 28368 |
MailPoet.helpTooltip.show(document.getElementById('tooltip-designer-subject-line'), {
|
| 28369 |
tooltipId: 'tooltip-designer-subject-line-ti',
|
| 28370 |
tooltip: MailPoet.I18n.t('helpTooltipDesignerSubjectLine'),
|
|
@@ -28382,20 +28374,20 @@ webpackJsonp([4],{
|
|
| 28382 |
|
| 28383 |
/***/ },
|
| 28384 |
|
| 28385 |
-
/***/
|
| 28386 |
/***/ function(module, exports, __webpack_require__) {
|
| 28387 |
|
| 28388 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28389 |
-
__webpack_require__(
|
| 28390 |
-
__webpack_require__(
|
| 28391 |
__webpack_require__(276),
|
| 28392 |
-
__webpack_require__(
|
| 28393 |
__webpack_require__(544),
|
| 28394 |
-
__webpack_require__(
|
| 28395 |
__webpack_require__(275),
|
| 28396 |
-
__webpack_require__(577),
|
| 28397 |
__webpack_require__(578),
|
| 28398 |
-
__webpack_require__(
|
|
|
|
| 28399 |
__webpack_require__(280),
|
| 28400 |
__webpack_require__(275)
|
| 28401 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
|
@@ -28412,7 +28404,6 @@ webpackJsonp([4],{
|
|
| 28412 |
_,
|
| 28413 |
$
|
| 28414 |
) {
|
| 28415 |
-
|
| 28416 |
'use strict';
|
| 28417 |
|
| 28418 |
var Module = {};
|
|
@@ -28420,7 +28411,6 @@ webpackJsonp([4],{
|
|
| 28420 |
|
| 28421 |
// Save editor contents to server
|
| 28422 |
Module.save = function () {
|
| 28423 |
-
|
| 28424 |
var json = App.toJSON();
|
| 28425 |
|
| 28426 |
// Stringify to enable transmission of primitive non-string value types
|
|
@@ -28622,7 +28612,6 @@ webpackJsonp([4],{
|
|
| 28622 |
});
|
| 28623 |
this.hideOptionContents();
|
| 28624 |
}
|
| 28625 |
-
|
| 28626 |
},
|
| 28627 |
toggleExportTemplate: function () {
|
| 28628 |
this.$('.mailpoet_export_template_container').toggleClass('mailpoet_hidden');
|
|
@@ -28737,10 +28726,11 @@ webpackJsonp([4],{
|
|
| 28737 |
|
| 28738 |
return message;
|
| 28739 |
}
|
|
|
|
| 28740 |
};
|
| 28741 |
|
| 28742 |
-
App.on('before:start', function (
|
| 28743 |
-
var Application =
|
| 28744 |
Application.save = Module.save;
|
| 28745 |
Application.getChannel().on('autoSave', Module.autoSave);
|
| 28746 |
|
|
@@ -28749,9 +28739,9 @@ webpackJsonp([4],{
|
|
| 28749 |
Application.getChannel().reply('save', Application.save);
|
| 28750 |
});
|
| 28751 |
|
| 28752 |
-
App.on('start', function (
|
| 28753 |
var saveView = new Module.SaveView();
|
| 28754 |
-
|
| 28755 |
});
|
| 28756 |
|
| 28757 |
return Module;
|
|
@@ -28760,15 +28750,15 @@ webpackJsonp([4],{
|
|
| 28760 |
|
| 28761 |
/***/ },
|
| 28762 |
|
| 28763 |
-
/***/
|
| 28764 |
/***/ function(module, exports, __webpack_require__) {
|
| 28765 |
|
| 28766 |
-
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(
|
| 28767 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 28768 |
|
| 28769 |
/***/ },
|
| 28770 |
|
| 28771 |
-
/***/
|
| 28772 |
/***/ function(module, exports, __webpack_require__) {
|
| 28773 |
|
| 28774 |
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
|
@@ -33309,7 +33299,7 @@ webpackJsonp([4],{
|
|
| 33309 |
|
| 33310 |
/***/ },
|
| 33311 |
|
| 33312 |
-
/***/
|
| 33313 |
/***/ function(module, exports, __webpack_require__) {
|
| 33314 |
|
| 33315 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -33319,7 +33309,7 @@ webpackJsonp([4],{
|
|
| 33319 |
* For more check: http://marionettejs.com/docs/marionette.behaviors.html#behaviorslookup
|
| 33320 |
*/
|
| 33321 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33322 |
-
__webpack_require__(
|
| 33323 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (BackboneMarionette) {
|
| 33324 |
var Marionette = BackboneMarionette;
|
| 33325 |
var BehaviorsLookup = {};
|
|
@@ -33335,7 +33325,7 @@ webpackJsonp([4],{
|
|
| 33335 |
|
| 33336 |
/***/ },
|
| 33337 |
|
| 33338 |
-
/***/
|
| 33339 |
/***/ function(module, exports, __webpack_require__) {
|
| 33340 |
|
| 33341 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -33344,10 +33334,10 @@ webpackJsonp([4],{
|
|
| 33344 |
* Adds a color picker integration with the view
|
| 33345 |
*/
|
| 33346 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33347 |
-
__webpack_require__(
|
| 33348 |
-
__webpack_require__(
|
| 33349 |
__webpack_require__(276),
|
| 33350 |
-
__webpack_require__(
|
| 33351 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup, MailPoet) {
|
| 33352 |
var BL = BehaviorsLookup;
|
| 33353 |
|
|
@@ -33389,7 +33379,7 @@ webpackJsonp([4],{
|
|
| 33389 |
|
| 33390 |
/***/ },
|
| 33391 |
|
| 33392 |
-
/***/
|
| 33393 |
/***/ function(module, exports, __webpack_require__) {
|
| 33394 |
|
| 33395 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
@@ -33401,11 +33391,11 @@ webpackJsonp([4],{
|
|
| 33401 |
* accept droppables
|
| 33402 |
*/
|
| 33403 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33404 |
-
__webpack_require__(
|
| 33405 |
__webpack_require__(280),
|
| 33406 |
__webpack_require__(275),
|
| 33407 |
-
__webpack_require__(
|
| 33408 |
-
__webpack_require__(
|
| 33409 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, jQuery, BL, interact) {
|
| 33410 |
var BehaviorsLookup = BL;
|
| 33411 |
|
|
@@ -33675,7 +33665,7 @@ webpackJsonp([4],{
|
|
| 33675 |
// 2. Remove visual markings of drop position visualization
|
| 33676 |
this.view.$('.mailpoet_drop_marker').remove();
|
| 33677 |
},
|
| 33678 |
-
getDropPosition: function (eventX, eventY,
|
| 33679 |
var SPECIAL_AREA_INSERTION_WIDTH = 0.00; // Disable special insertion. Default: 0.3
|
| 33680 |
|
| 33681 |
var element = this.view.$el;
|
|
@@ -33701,7 +33691,7 @@ webpackJsonp([4],{
|
|
| 33701 |
var position;
|
| 33702 |
var indexAndPosition;
|
| 33703 |
|
| 33704 |
-
var unsafe = !!
|
| 33705 |
|
| 33706 |
if (this.getCollection().length === 0) {
|
| 33707 |
return {
|
|
@@ -33752,7 +33742,7 @@ webpackJsonp([4],{
|
|
| 33752 |
|
| 33753 |
if (orientation === 'horizontal' && insertionType === 'special') {
|
| 33754 |
// Disable special insertion for horizontal containers
|
| 33755 |
-
return;
|
| 33756 |
}
|
| 33757 |
|
| 33758 |
return {
|
|
@@ -33792,13 +33782,12 @@ webpackJsonp([4],{
|
|
| 33792 |
index: index,
|
| 33793 |
position: 'before'
|
| 33794 |
};
|
| 33795 |
-
} else {
|
| 33796 |
-
// Second half of the element
|
| 33797 |
-
return {
|
| 33798 |
-
index: index,
|
| 33799 |
-
position: 'after'
|
| 33800 |
-
};
|
| 33801 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33802 |
},
|
| 33803 |
_computeSpecialIndex: function (eventX, eventY) {
|
| 33804 |
return this._computeCellIndex(eventX, eventY);
|
|
@@ -33855,7 +33844,7 @@ webpackJsonp([4],{
|
|
| 33855 |
|
| 33856 |
/***/ },
|
| 33857 |
|
| 33858 |
-
/***/
|
| 33859 |
/***/ function(module, exports, __webpack_require__) {
|
| 33860 |
|
| 33861 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -33865,11 +33854,11 @@ webpackJsonp([4],{
|
|
| 33865 |
* Part of the drag&drop behavior.
|
| 33866 |
*/
|
| 33867 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33868 |
-
__webpack_require__(
|
| 33869 |
__webpack_require__(280),
|
| 33870 |
__webpack_require__(275),
|
| 33871 |
-
__webpack_require__(
|
| 33872 |
-
__webpack_require__(
|
| 33873 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, jQuery, BehaviorsLookup, interact) {
|
| 33874 |
var BL = BehaviorsLookup;
|
| 33875 |
|
|
@@ -33944,7 +33933,6 @@ webpackJsonp([4],{
|
|
| 33944 |
that.view.$el.addClass('mailpoet_hidden');
|
| 33945 |
}
|
| 33946 |
}
|
| 33947 |
-
|
| 33948 |
},
|
| 33949 |
// call this function on every dragmove event
|
| 33950 |
onmove: function (event) {
|
|
@@ -34010,7 +33998,7 @@ webpackJsonp([4],{
|
|
| 34010 |
|
| 34011 |
/***/ },
|
| 34012 |
|
| 34013 |
-
/***/
|
| 34014 |
/***/ function(module, exports, __webpack_require__) {
|
| 34015 |
|
| 34016 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34019,8 +34007,8 @@ webpackJsonp([4],{
|
|
| 34019 |
* Highlights a container block when hovering over its tools
|
| 34020 |
*/
|
| 34021 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34022 |
-
__webpack_require__(
|
| 34023 |
-
__webpack_require__(
|
| 34024 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup) {
|
| 34025 |
var BL = BehaviorsLookup;
|
| 34026 |
|
|
@@ -34043,7 +34031,7 @@ webpackJsonp([4],{
|
|
| 34043 |
|
| 34044 |
/***/ },
|
| 34045 |
|
| 34046 |
-
/***/
|
| 34047 |
/***/ function(module, exports, __webpack_require__) {
|
| 34048 |
|
| 34049 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34052,8 +34040,8 @@ webpackJsonp([4],{
|
|
| 34052 |
* Highlights a block that is being edited
|
| 34053 |
*/
|
| 34054 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34055 |
-
__webpack_require__(
|
| 34056 |
-
__webpack_require__(
|
| 34057 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup) {
|
| 34058 |
var BL = BehaviorsLookup;
|
| 34059 |
|
|
@@ -34076,7 +34064,7 @@ webpackJsonp([4],{
|
|
| 34076 |
|
| 34077 |
/***/ },
|
| 34078 |
|
| 34079 |
-
/***/
|
| 34080 |
/***/ function(module, exports, __webpack_require__) {
|
| 34081 |
|
| 34082 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34085,9 +34073,9 @@ webpackJsonp([4],{
|
|
| 34085 |
* Allows resizing elements within a block
|
| 34086 |
*/
|
| 34087 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34088 |
-
__webpack_require__(
|
| 34089 |
-
__webpack_require__(
|
| 34090 |
-
__webpack_require__(
|
| 34091 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup, interact) {
|
| 34092 |
var BL = BehaviorsLookup;
|
| 34093 |
|
|
@@ -34157,7 +34145,7 @@ webpackJsonp([4],{
|
|
| 34157 |
|
| 34158 |
/***/ },
|
| 34159 |
|
| 34160 |
-
/***/
|
| 34161 |
/***/ function(module, exports, __webpack_require__) {
|
| 34162 |
|
| 34163 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34166,9 +34154,9 @@ webpackJsonp([4],{
|
|
| 34166 |
* Allows sorting elements within a collection
|
| 34167 |
*/
|
| 34168 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34169 |
-
__webpack_require__(
|
| 34170 |
__webpack_require__(280),
|
| 34171 |
-
__webpack_require__(
|
| 34172 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, BehaviorsLookup) {
|
| 34173 |
var BL = BehaviorsLookup;
|
| 34174 |
|
|
@@ -34205,7 +34193,7 @@ webpackJsonp([4],{
|
|
| 34205 |
|
| 34206 |
/***/ },
|
| 34207 |
|
| 34208 |
-
/***/
|
| 34209 |
/***/ function(module, exports, __webpack_require__) {
|
| 34210 |
|
| 34211 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34214,9 +34202,9 @@ webpackJsonp([4],{
|
|
| 34214 |
* Opens up settings of a BlockView if contents are clicked upon
|
| 34215 |
*/
|
| 34216 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34217 |
-
__webpack_require__(
|
| 34218 |
__webpack_require__(275),
|
| 34219 |
-
__webpack_require__(
|
| 34220 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, jQuery, BehaviorsLookup) {
|
| 34221 |
var BL = BehaviorsLookup;
|
| 34222 |
|
|
@@ -34244,7 +34232,7 @@ webpackJsonp([4],{
|
|
| 34244 |
|
| 34245 |
/***/ },
|
| 34246 |
|
| 34247 |
-
/***/
|
| 34248 |
/***/ function(module, exports, __webpack_require__) {
|
| 34249 |
|
| 34250 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34253,9 +34241,9 @@ webpackJsonp([4],{
|
|
| 34253 |
* Adds TinyMCE text editing capabilities to a view
|
| 34254 |
*/
|
| 34255 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34256 |
-
__webpack_require__(
|
| 34257 |
__webpack_require__(280),
|
| 34258 |
-
__webpack_require__(
|
| 34259 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, BehaviorsLookup) {
|
| 34260 |
var BL = BehaviorsLookup;
|
| 34261 |
|
|
@@ -34337,7 +34325,7 @@ webpackJsonp([4],{
|
|
| 34337 |
|
| 34338 |
/***/ },
|
| 34339 |
|
| 34340 |
-
/***/
|
| 34341 |
/***/ function(module, exports, __webpack_require__) {
|
| 34342 |
|
| 34343 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34347,15 +34335,14 @@ webpackJsonp([4],{
|
|
| 34347 |
* BlockToolsView, BlockSettingsView and BlockWidgetView are optional.
|
| 34348 |
*/
|
| 34349 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34350 |
-
__webpack_require__(
|
| 34351 |
-
__webpack_require__(
|
| 34352 |
-
__webpack_require__(
|
| 34353 |
__webpack_require__(280),
|
| 34354 |
__webpack_require__(275),
|
| 34355 |
__webpack_require__(276),
|
| 34356 |
-
__webpack_require__(
|
| 34357 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Marionette, SuperModel, _, jQuery, MailPoet) {
|
| 34358 |
-
|
| 34359 |
'use strict';
|
| 34360 |
|
| 34361 |
var Module = {};
|
|
@@ -34421,6 +34408,7 @@ webpackJsonp([4],{
|
|
| 34421 |
WidgetView.destroy();
|
| 34422 |
return node;
|
| 34423 |
}
|
|
|
|
| 34424 |
}
|
| 34425 |
},
|
| 34426 |
HighlightEditingBehavior: {}
|
|
@@ -34653,7 +34641,7 @@ webpackJsonp([4],{
|
|
| 34653 |
|
| 34654 |
/***/ },
|
| 34655 |
|
| 34656 |
-
/***/
|
| 34657 |
/***/ function(module, exports, __webpack_require__) {
|
| 34658 |
|
| 34659 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -34663,13 +34651,12 @@ webpackJsonp([4],{
|
|
| 34663 |
*/
|
| 34664 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34665 |
__webpack_require__(544),
|
| 34666 |
-
__webpack_require__(
|
| 34667 |
__webpack_require__(280),
|
| 34668 |
__webpack_require__(275),
|
| 34669 |
-
__webpack_require__(
|
| 34670 |
-
__webpack_require__(
|
| 34671 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Backbone, Marionette, _, jQuery, App, BaseBlock) {
|
| 34672 |
-
|
| 34673 |
'use strict';
|
| 34674 |
|
| 34675 |
var Module = {};
|
|
@@ -34712,6 +34699,7 @@ webpackJsonp([4],{
|
|
| 34712 |
if (invalidBlock) {
|
| 34713 |
return invalidBlock.validationError;
|
| 34714 |
}
|
|
|
|
| 34715 |
},
|
| 34716 |
parse: function (response) {
|
| 34717 |
// If container has any blocks - add them to a collection
|
|
@@ -34790,6 +34778,7 @@ webpackJsonp([4],{
|
|
| 34790 |
WidgetView.destroy();
|
| 34791 |
return node;
|
| 34792 |
}
|
|
|
|
| 34793 |
},
|
| 34794 |
testAttachToInstance: function (model, view) {
|
| 34795 |
// Attach Draggable only to layout containers and disable it
|
|
@@ -34807,7 +34796,6 @@ webpackJsonp([4],{
|
|
| 34807 |
if (this.model.get('blocks').length === 2) return Module.TwoColumnContainerWidgetView;
|
| 34808 |
}
|
| 34809 |
return Module.OneColumnContainerWidgetView;
|
| 34810 |
-
|
| 34811 |
},
|
| 34812 |
initialize: function (options) {
|
| 34813 |
base.BlockView.prototype.initialize.apply(this, arguments);
|
|
@@ -34852,13 +34840,6 @@ webpackJsonp([4],{
|
|
| 34852 |
var $toggleButton = this.$('> .mailpoet_tools .mailpoet_newsletter_layer_selector');
|
| 34853 |
var $overlay = jQuery('.mailpoet_layer_overlay');
|
| 34854 |
var $container = this.$('> .mailpoet_container');
|
| 34855 |
-
var enableContainerLayer = function () {
|
| 34856 |
-
that.$el.addClass('mailpoet_container_layer_active');
|
| 34857 |
-
$toggleButton.addClass('mailpoet_container_layer_active');
|
| 34858 |
-
$container.addClass('mailpoet_layer_highlight');
|
| 34859 |
-
$overlay.click(disableContainerLayer);
|
| 34860 |
-
$overlay.show();
|
| 34861 |
-
};
|
| 34862 |
var disableContainerLayer = function () {
|
| 34863 |
that.$el.removeClass('mailpoet_container_layer_active');
|
| 34864 |
$toggleButton.removeClass('mailpoet_container_layer_active');
|
|
@@ -34866,6 +34847,13 @@ webpackJsonp([4],{
|
|
| 34866 |
$overlay.hide();
|
| 34867 |
$overlay.off('click');
|
| 34868 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34869 |
if ($toggleButton.hasClass('mailpoet_container_layer_active')) {
|
| 34870 |
disableContainerLayer();
|
| 34871 |
} else {
|
|
@@ -34994,25 +34982,25 @@ webpackJsonp([4],{
|
|
| 34994 |
}
|
| 34995 |
});
|
| 34996 |
|
| 34997 |
-
App.on('before:start', function (
|
| 34998 |
-
|
| 34999 |
blockModel: Module.ContainerBlockModel,
|
| 35000 |
blockView: Module.ContainerBlockView
|
| 35001 |
});
|
| 35002 |
|
| 35003 |
-
|
| 35004 |
name: 'oneColumnLayout',
|
| 35005 |
priority: 100,
|
| 35006 |
widgetView: Module.OneColumnContainerWidgetView
|
| 35007 |
});
|
| 35008 |
|
| 35009 |
-
|
| 35010 |
name: 'twoColumnLayout',
|
| 35011 |
priority: 100,
|
| 35012 |
widgetView: Module.TwoColumnContainerWidgetView
|
| 35013 |
});
|
| 35014 |
|
| 35015 |
-
|
| 35016 |
name: 'threeColumnLayout',
|
| 35017 |
priority: 100,
|
| 35018 |
widgetView: Module.ThreeColumnContainerWidgetView
|
|
@@ -35025,20 +35013,19 @@ webpackJsonp([4],{
|
|
| 35025 |
|
| 35026 |
/***/ },
|
| 35027 |
|
| 35028 |
-
/***/
|
| 35029 |
/***/ function(module, exports, __webpack_require__) {
|
| 35030 |
|
| 35031 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35032 |
* Button content block
|
| 35033 |
*/
|
| 35034 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35035 |
-
__webpack_require__(
|
| 35036 |
-
__webpack_require__(
|
| 35037 |
__webpack_require__(276),
|
| 35038 |
__webpack_require__(280),
|
| 35039 |
__webpack_require__(275)
|
| 35040 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, MailPoet, _, jQuery) {
|
| 35041 |
-
|
| 35042 |
'use strict';
|
| 35043 |
|
| 35044 |
var Module = {};
|
|
@@ -35162,13 +35149,13 @@ webpackJsonp([4],{
|
|
| 35162 |
}
|
| 35163 |
});
|
| 35164 |
|
| 35165 |
-
App.on('before:start', function (
|
| 35166 |
-
|
| 35167 |
blockModel: Module.ButtonBlockModel,
|
| 35168 |
blockView: Module.ButtonBlockView
|
| 35169 |
});
|
| 35170 |
|
| 35171 |
-
|
| 35172 |
name: 'button',
|
| 35173 |
widgetView: Module.ButtonWidgetView,
|
| 35174 |
priority: 92
|
|
@@ -35181,20 +35168,19 @@ webpackJsonp([4],{
|
|
| 35181 |
|
| 35182 |
/***/ },
|
| 35183 |
|
| 35184 |
-
/***/
|
| 35185 |
/***/ function(module, exports, __webpack_require__) {
|
| 35186 |
|
| 35187 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35188 |
* Image content block
|
| 35189 |
*/
|
| 35190 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35191 |
-
__webpack_require__(
|
| 35192 |
-
__webpack_require__(
|
| 35193 |
__webpack_require__(280),
|
| 35194 |
__webpack_require__(276),
|
| 35195 |
__webpack_require__(275)
|
| 35196 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet, jQuery) {
|
| 35197 |
-
|
| 35198 |
'use strict';
|
| 35199 |
|
| 35200 |
var Module = {};
|
|
@@ -35599,13 +35585,13 @@ webpackJsonp([4],{
|
|
| 35599 |
});
|
| 35600 |
Module.ImageWidgetView = ImageWidgetView;
|
| 35601 |
|
| 35602 |
-
App.on('before:start', function (
|
| 35603 |
-
|
| 35604 |
blockModel: Module.ImageBlockModel,
|
| 35605 |
blockView: Module.ImageBlockView
|
| 35606 |
});
|
| 35607 |
|
| 35608 |
-
|
| 35609 |
name: 'image',
|
| 35610 |
widgetView: Module.ImageWidgetView,
|
| 35611 |
priority: 91
|
|
@@ -35618,19 +35604,18 @@ webpackJsonp([4],{
|
|
| 35618 |
|
| 35619 |
/***/ },
|
| 35620 |
|
| 35621 |
-
/***/
|
| 35622 |
/***/ function(module, exports, __webpack_require__) {
|
| 35623 |
|
| 35624 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35625 |
* Divider content block
|
| 35626 |
*/
|
| 35627 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35628 |
-
__webpack_require__(
|
| 35629 |
-
__webpack_require__(
|
| 35630 |
__webpack_require__(280),
|
| 35631 |
__webpack_require__(275)
|
| 35632 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, jQuery) {
|
| 35633 |
-
|
| 35634 |
'use strict';
|
| 35635 |
|
| 35636 |
var Module = {};
|
|
@@ -35761,13 +35746,13 @@ webpackJsonp([4],{
|
|
| 35761 |
}
|
| 35762 |
}
|
| 35763 |
});
|
| 35764 |
-
App.on('before:start', function (
|
| 35765 |
-
|
| 35766 |
blockModel: Module.DividerBlockModel,
|
| 35767 |
blockView: Module.DividerBlockView
|
| 35768 |
});
|
| 35769 |
|
| 35770 |
-
|
| 35771 |
name: 'divider',
|
| 35772 |
widgetView: Module.DividerWidgetView,
|
| 35773 |
priority: 93
|
|
@@ -35780,19 +35765,18 @@ webpackJsonp([4],{
|
|
| 35780 |
|
| 35781 |
/***/ },
|
| 35782 |
|
| 35783 |
-
/***/
|
| 35784 |
/***/ function(module, exports, __webpack_require__) {
|
| 35785 |
|
| 35786 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35787 |
* Text content block
|
| 35788 |
*/
|
| 35789 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35790 |
-
__webpack_require__(
|
| 35791 |
-
__webpack_require__(
|
| 35792 |
__webpack_require__(280),
|
| 35793 |
__webpack_require__(276)
|
| 35794 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
| 35795 |
-
|
| 35796 |
'use strict';
|
| 35797 |
|
| 35798 |
var Module = {};
|
|
@@ -35879,13 +35863,13 @@ webpackJsonp([4],{
|
|
| 35879 |
}
|
| 35880 |
});
|
| 35881 |
|
| 35882 |
-
App.on('before:start', function (
|
| 35883 |
-
|
| 35884 |
blockModel: Module.TextBlockModel,
|
| 35885 |
blockView: Module.TextBlockView
|
| 35886 |
});
|
| 35887 |
|
| 35888 |
-
|
| 35889 |
name: 'text',
|
| 35890 |
widgetView: Module.TextWidgetView,
|
| 35891 |
priority: 90
|
|
@@ -35899,18 +35883,17 @@ webpackJsonp([4],{
|
|
| 35899 |
|
| 35900 |
/***/ },
|
| 35901 |
|
| 35902 |
-
/***/
|
| 35903 |
/***/ function(module, exports, __webpack_require__) {
|
| 35904 |
|
| 35905 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35906 |
* Spacer content block
|
| 35907 |
*/
|
| 35908 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35909 |
-
__webpack_require__(
|
| 35910 |
-
__webpack_require__(
|
| 35911 |
__webpack_require__(280)
|
| 35912 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _) {
|
| 35913 |
-
|
| 35914 |
'use strict';
|
| 35915 |
|
| 35916 |
var Module = {};
|
|
@@ -35991,13 +35974,13 @@ webpackJsonp([4],{
|
|
| 35991 |
}
|
| 35992 |
});
|
| 35993 |
|
| 35994 |
-
App.on('before:start', function (
|
| 35995 |
-
|
| 35996 |
blockModel: Module.SpacerBlockModel,
|
| 35997 |
blockView: Module.SpacerBlockView
|
| 35998 |
});
|
| 35999 |
|
| 36000 |
-
|
| 36001 |
name: 'spacer',
|
| 36002 |
widgetView: Module.SpacerWidgetView,
|
| 36003 |
priority: 94
|
|
@@ -36010,19 +35993,18 @@ webpackJsonp([4],{
|
|
| 36010 |
|
| 36011 |
/***/ },
|
| 36012 |
|
| 36013 |
-
/***/
|
| 36014 |
/***/ function(module, exports, __webpack_require__) {
|
| 36015 |
|
| 36016 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36017 |
* Footer content block
|
| 36018 |
*/
|
| 36019 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36020 |
-
__webpack_require__(
|
| 36021 |
-
__webpack_require__(
|
| 36022 |
__webpack_require__(280),
|
| 36023 |
__webpack_require__(276)
|
| 36024 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
| 36025 |
-
|
| 36026 |
'use strict';
|
| 36027 |
|
| 36028 |
var Module = {};
|
|
@@ -36125,13 +36107,13 @@ webpackJsonp([4],{
|
|
| 36125 |
}
|
| 36126 |
});
|
| 36127 |
|
| 36128 |
-
App.on('before:start', function (
|
| 36129 |
-
|
| 36130 |
blockModel: Module.FooterBlockModel,
|
| 36131 |
blockView: Module.FooterBlockView
|
| 36132 |
});
|
| 36133 |
|
| 36134 |
-
|
| 36135 |
name: 'footer',
|
| 36136 |
widgetView: Module.FooterWidgetView,
|
| 36137 |
priority: 99
|
|
@@ -36144,19 +36126,18 @@ webpackJsonp([4],{
|
|
| 36144 |
|
| 36145 |
/***/ },
|
| 36146 |
|
| 36147 |
-
/***/
|
| 36148 |
/***/ function(module, exports, __webpack_require__) {
|
| 36149 |
|
| 36150 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36151 |
* Header content block
|
| 36152 |
*/
|
| 36153 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36154 |
-
__webpack_require__(
|
| 36155 |
-
__webpack_require__(
|
| 36156 |
__webpack_require__(280),
|
| 36157 |
__webpack_require__(276)
|
| 36158 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
| 36159 |
-
|
| 36160 |
'use strict';
|
| 36161 |
|
| 36162 |
var Module = {};
|
|
@@ -36259,13 +36240,13 @@ webpackJsonp([4],{
|
|
| 36259 |
}
|
| 36260 |
});
|
| 36261 |
|
| 36262 |
-
App.on('before:start', function (
|
| 36263 |
-
|
| 36264 |
blockModel: Module.HeaderBlockModel,
|
| 36265 |
blockView: Module.HeaderBlockView
|
| 36266 |
});
|
| 36267 |
|
| 36268 |
-
|
| 36269 |
name: 'header',
|
| 36270 |
widgetView: Module.HeaderWidgetView,
|
| 36271 |
priority: 98
|
|
@@ -36278,7 +36259,7 @@ webpackJsonp([4],{
|
|
| 36278 |
|
| 36279 |
/***/ },
|
| 36280 |
|
| 36281 |
-
/***/
|
| 36282 |
/***/ function(module, exports, __webpack_require__) {
|
| 36283 |
|
| 36284 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -36290,13 +36271,13 @@ webpackJsonp([4],{
|
|
| 36290 |
* block settings view.
|
| 36291 |
*/
|
| 36292 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36293 |
-
__webpack_require__(
|
| 36294 |
-
__webpack_require__(
|
| 36295 |
-
__webpack_require__(
|
| 36296 |
-
__webpack_require__(
|
| 36297 |
-
__webpack_require__(
|
| 36298 |
__webpack_require__(276),
|
| 36299 |
-
__webpack_require__(
|
| 36300 |
__webpack_require__(280),
|
| 36301 |
__webpack_require__(275)
|
| 36302 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
|
@@ -36310,7 +36291,6 @@ webpackJsonp([4],{
|
|
| 36310 |
_,
|
| 36311 |
jQuery
|
| 36312 |
) {
|
| 36313 |
-
|
| 36314 |
'use strict';
|
| 36315 |
|
| 36316 |
var Module = {};
|
|
@@ -36663,21 +36643,21 @@ webpackJsonp([4],{
|
|
| 36663 |
}
|
| 36664 |
});
|
| 36665 |
|
| 36666 |
-
App.on('before:start', function (
|
| 36667 |
-
|
| 36668 |
blockModel: Module.AutomatedLatestContentBlockModel,
|
| 36669 |
blockView: Module.AutomatedLatestContentBlockView
|
| 36670 |
});
|
| 36671 |
|
| 36672 |
-
|
| 36673 |
name: 'automatedLatestContent',
|
| 36674 |
widgetView: Module.AutomatedLatestContentWidgetView,
|
| 36675 |
priority: 97
|
| 36676 |
});
|
| 36677 |
});
|
| 36678 |
|
| 36679 |
-
App.on('start', function (
|
| 36680 |
-
var Application =
|
| 36681 |
Application._ALCSupervisor = new Module.ALCSupervisor();
|
| 36682 |
Application._ALCSupervisor.refresh();
|
| 36683 |
});
|
|
@@ -36688,7 +36668,7 @@ webpackJsonp([4],{
|
|
| 36688 |
|
| 36689 |
/***/ },
|
| 36690 |
|
| 36691 |
-
/***/
|
| 36692 |
/***/ function(module, exports, __webpack_require__) {
|
| 36693 |
|
| 36694 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
@@ -36705,16 +36685,16 @@ webpackJsonp([4],{
|
|
| 36705 |
*/
|
| 36706 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36707 |
__webpack_require__(544),
|
| 36708 |
-
__webpack_require__(571),
|
| 36709 |
__webpack_require__(572),
|
|
|
|
| 36710 |
__webpack_require__(280),
|
| 36711 |
__webpack_require__(275),
|
| 36712 |
__webpack_require__(276),
|
| 36713 |
-
__webpack_require__(
|
| 36714 |
-
__webpack_require__(
|
| 36715 |
-
__webpack_require__(
|
| 36716 |
-
__webpack_require__(
|
| 36717 |
-
__webpack_require__(
|
| 36718 |
__webpack_require__(289)
|
| 36719 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 36720 |
Backbone,
|
|
@@ -36729,7 +36709,6 @@ webpackJsonp([4],{
|
|
| 36729 |
ButtonBlock,
|
| 36730 |
DividerBlock
|
| 36731 |
) {
|
| 36732 |
-
|
| 36733 |
'use strict';
|
| 36734 |
|
| 36735 |
var Module = {};
|
|
@@ -36836,6 +36815,7 @@ webpackJsonp([4],{
|
|
| 36836 |
}).always(function () {
|
| 36837 |
that.trigger('morePostsLoaded');
|
| 36838 |
});
|
|
|
|
| 36839 |
},
|
| 36840 |
_refreshTransformedPosts: function () {
|
| 36841 |
var that = this;
|
|
@@ -37275,13 +37255,13 @@ webpackJsonp([4],{
|
|
| 37275 |
}
|
| 37276 |
});
|
| 37277 |
|
| 37278 |
-
App.on('before:start', function (
|
| 37279 |
-
|
| 37280 |
blockModel: Module.PostsBlockModel,
|
| 37281 |
blockView: Module.PostsBlockView
|
| 37282 |
});
|
| 37283 |
|
| 37284 |
-
|
| 37285 |
name: 'posts',
|
| 37286 |
widgetView: Module.PostsWidgetView,
|
| 37287 |
priority: 96
|
|
@@ -37294,22 +37274,21 @@ webpackJsonp([4],{
|
|
| 37294 |
|
| 37295 |
/***/ },
|
| 37296 |
|
| 37297 |
-
/***/
|
| 37298 |
/***/ function(module, exports, __webpack_require__) {
|
| 37299 |
|
| 37300 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 37301 |
* Social icons content block
|
| 37302 |
*/
|
| 37303 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 37304 |
-
__webpack_require__(
|
| 37305 |
-
__webpack_require__(
|
| 37306 |
__webpack_require__(544),
|
| 37307 |
-
__webpack_require__(
|
| 37308 |
-
__webpack_require__(
|
| 37309 |
__webpack_require__(280),
|
| 37310 |
__webpack_require__(275)
|
| 37311 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, Backbone, Marionette, SuperModel, _, jQuery) {
|
| 37312 |
-
|
| 37313 |
'use strict';
|
| 37314 |
|
| 37315 |
var Module = {};
|
|
@@ -37494,6 +37473,7 @@ webpackJsonp([4],{
|
|
| 37494 |
} else {
|
| 37495 |
return this.changeField('link', event);
|
| 37496 |
}
|
|
|
|
| 37497 |
},
|
| 37498 |
changeField: function (field, event) {
|
| 37499 |
this.model.set(field, jQuery(event.target).val());
|
|
@@ -37597,13 +37577,13 @@ webpackJsonp([4],{
|
|
| 37597 |
}
|
| 37598 |
});
|
| 37599 |
|
| 37600 |
-
App.on('before:start', function (
|
| 37601 |
-
|
| 37602 |
blockModel: Module.SocialBlockModel,
|
| 37603 |
blockView: Module.SocialBlockView
|
| 37604 |
});
|
| 37605 |
|
| 37606 |
-
|
| 37607 |
name: 'social',
|
| 37608 |
widgetView: Module.SocialWidgetView,
|
| 37609 |
priority: 95
|
| 1 |
webpackJsonp([4],{
|
| 2 |
|
| 3 |
+
/***/ 588:
|
| 4 |
/***/ function(module, exports, __webpack_require__) {
|
| 5 |
|
| 6 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 7 |
+
__webpack_require__(584),
|
| 8 |
__webpack_require__(280),
|
| 9 |
__webpack_require__(276),
|
| 10 |
+
__webpack_require__(562)
|
| 11 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, _, MailPoet) {
|
|
|
|
| 12 |
var Module = {};
|
| 13 |
|
| 14 |
Module._query = function (args) {
|
| 118 |
|
| 119 |
__webpack_require__(280);
|
| 120 |
__webpack_require__(544);
|
|
|
|
|
|
|
|
|
|
| 121 |
__webpack_require__(572);
|
| 122 |
+
__webpack_require__(574);
|
| 123 |
__webpack_require__(575);
|
| 124 |
+
__webpack_require__(573);
|
| 125 |
+
__webpack_require__(289);
|
| 126 |
__webpack_require__(576);
|
| 127 |
__webpack_require__(577);
|
| 128 |
__webpack_require__(578);
|
| 129 |
+
__webpack_require__(579);
|
| 130 |
__webpack_require__(582);
|
| 131 |
__webpack_require__(583);
|
| 132 |
__webpack_require__(584);
|
| 133 |
__webpack_require__(585);
|
| 134 |
__webpack_require__(586);
|
| 135 |
+
__webpack_require__(587);
|
| 136 |
__webpack_require__(589);
|
| 137 |
__webpack_require__(590);
|
| 138 |
+
__webpack_require__(591);
|
| 139 |
+
__webpack_require__(588);
|
| 140 |
__webpack_require__(594);
|
| 141 |
__webpack_require__(595);
|
| 142 |
__webpack_require__(596);
|
| 157 |
__webpack_require__(611);
|
| 158 |
__webpack_require__(612);
|
| 159 |
__webpack_require__(613);
|
| 160 |
+
__webpack_require__(614);
|
| 161 |
+
module.exports = __webpack_require__(615);
|
| 162 |
|
| 163 |
|
| 164 |
/***/ },
|
| 9431 |
|
| 9432 |
/***/ },
|
| 9433 |
|
| 9434 |
+
/***/ 562:
|
| 9435 |
/***/ function(module, exports, __webpack_require__) {
|
| 9436 |
|
| 9437 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function requestFailed(errorMessage, xhr) {
|
| 9525 |
|
| 9526 |
/***/ },
|
| 9527 |
|
| 9528 |
+
/***/ 565:
|
| 9529 |
/***/ function(module, exports, __webpack_require__) {
|
| 9530 |
|
| 9531 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
| 9640 |
compileTemplate: function (template) {
|
| 9641 |
if (this.renderer === 'html') {
|
| 9642 |
return function () { return template; };
|
|
|
|
|
|
|
| 9643 |
}
|
| 9644 |
+
return window.Handlebars.compile(template);
|
| 9645 |
},
|
| 9646 |
init: function (options) {
|
| 9647 |
var modal;
|
| 9743 |
jQuery(document).on('keyup.mailpoet_modal', function (e) {
|
| 9744 |
if (this.opened === false) { return false; }
|
| 9745 |
if (e.keyCode === 27) { this.cancel(); }
|
| 9746 |
+
return true;
|
| 9747 |
}.bind(this));
|
| 9748 |
|
| 9749 |
// make sure the popup is repositioned when the window is resized
|
| 10170 |
|
| 10171 |
/***/ },
|
| 10172 |
|
| 10173 |
+
/***/ 566:
|
| 10174 |
/***/ function(module, exports, __webpack_require__) {
|
| 10175 |
|
| 10176 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(276), __webpack_require__(275)], __WEBPACK_AMD_DEFINE_RESULT__ = function (mp, jQuery) {
|
| 10290 |
formatMessage: function (message) {
|
| 10291 |
if (Array.isArray(message)) {
|
| 10292 |
return message.join('<br />');
|
|
|
|
|
|
|
| 10293 |
}
|
| 10294 |
+
return message;
|
| 10295 |
},
|
| 10296 |
show: function (options) {
|
| 10297 |
// initialize
|
| 10394 |
|
| 10395 |
/***/ },
|
| 10396 |
|
| 10397 |
+
/***/ 572:
|
| 10398 |
/***/ function(module, exports, __webpack_require__) {
|
| 10399 |
|
| 10400 |
// MarionetteJS (Backbone.Marionette)
|
| 10408 |
|
| 10409 |
|
| 10410 |
(function (global, factory) {
|
| 10411 |
+
true ? module.exports = factory(__webpack_require__(544), __webpack_require__(280), __webpack_require__(573)) :
|
| 10412 |
typeof define === 'function' && define.amd ? define(['backbone', 'underscore', 'backbone.radio'], factory) :
|
| 10413 |
(global.Marionette = global['Mn'] = factory(global.Backbone,global._,global.Backbone.Radio));
|
| 10414 |
}(this, (function (Backbone,_,Radio) { 'use strict';
|
| 13889 |
|
| 13890 |
/***/ },
|
| 13891 |
|
| 13892 |
+
/***/ 573:
|
| 13893 |
/***/ function(module, exports, __webpack_require__) {
|
| 13894 |
|
| 13895 |
// Backbone.Radio v2.0.0
|
| 14245 |
|
| 14246 |
/***/ },
|
| 14247 |
|
| 14248 |
+
/***/ 574:
|
| 14249 |
/***/ function(module, exports) {
|
| 14250 |
|
| 14251 |
Backbone.SuperModel = (function(_, Backbone){
|
| 14668 |
|
| 14669 |
/***/ },
|
| 14670 |
|
| 14671 |
+
/***/ 575:
|
| 14672 |
/***/ function(module, exports, __webpack_require__) {
|
| 14673 |
|
| 14674 |
/**
|
| 20652 |
|
| 20653 |
/***/ },
|
| 20654 |
|
| 20655 |
+
/***/ 576:
|
| 20656 |
/***/ function(module, exports, __webpack_require__) {
|
| 20657 |
|
| 20658 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Spectrum Colorpicker v1.8.0
|
| 22982 |
|
| 22983 |
/***/ },
|
| 22984 |
|
| 22985 |
+
/***/ 577:
|
| 22986 |
/***/ function(module, exports) {
|
| 22987 |
|
| 22988 |
// Generated by CoffeeScript 1.9.2
|
| 23253 |
|
| 23254 |
/***/ },
|
| 23255 |
|
| 23256 |
+
/***/ 578:
|
| 23257 |
/***/ function(module, exports) {
|
| 23258 |
|
| 23259 |
/* Blob.js
|
| 23474 |
|
| 23475 |
/***/ },
|
| 23476 |
|
| 23477 |
+
/***/ 579:
|
| 23478 |
/***/ function(module, exports, __webpack_require__) {
|
| 23479 |
|
| 23480 |
var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
|
| 23660 |
|
| 23661 |
if (typeof module !== "undefined" && module.exports) {
|
| 23662 |
module.exports.saveAs = saveAs;
|
| 23663 |
+
} else if (("function" !== "undefined" && __webpack_require__(580) !== null) && (__webpack_require__(581) !== null)) {
|
| 23664 |
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
|
| 23665 |
return saveAs;
|
| 23666 |
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 23669 |
|
| 23670 |
/***/ },
|
| 23671 |
|
| 23672 |
+
/***/ 580:
|
| 23673 |
/***/ function(module, exports) {
|
| 23674 |
|
| 23675 |
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
| 23677 |
|
| 23678 |
/***/ },
|
| 23679 |
|
| 23680 |
+
/***/ 581:
|
| 23681 |
/***/ function(module, exports) {
|
| 23682 |
|
| 23683 |
/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
|
| 23686 |
|
| 23687 |
/***/ },
|
| 23688 |
|
| 23689 |
+
/***/ 582:
|
| 23690 |
/***/ function(module, exports, __webpack_require__) {
|
| 23691 |
|
| 23692 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
|
| 27582 |
|
| 27583 |
/***/ },
|
| 27584 |
|
| 27585 |
+
/***/ 583:
|
| 27586 |
/***/ function(module, exports, __webpack_require__) {
|
| 27587 |
|
| 27588 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 27594 |
*/
|
| 27595 |
|
| 27596 |
(function (root, factory) {
|
| 27597 |
+
var Marionette = __webpack_require__(572);
|
| 27598 |
+
var Radio = __webpack_require__(573);
|
| 27599 |
var _ = __webpack_require__(280);
|
| 27600 |
if (true) {
|
| 27601 |
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(572), __webpack_require__(573), __webpack_require__(280)], __WEBPACK_AMD_DEFINE_RESULT__ = function (BackboneMarionette, BackboneRadio, underscore) {
|
| 27602 |
+
return factory(BackboneMarionette, BackboneRadio, underscore);
|
| 27603 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 27604 |
}
|
| 27605 |
else if (typeof exports !== 'undefined') {
|
| 27621 |
|
| 27622 |
/***/ },
|
| 27623 |
|
| 27624 |
+
/***/ 584:
|
| 27625 |
/***/ function(module, exports, __webpack_require__) {
|
| 27626 |
|
| 27627 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27628 |
__webpack_require__(544),
|
| 27629 |
+
__webpack_require__(572),
|
| 27630 |
+
__webpack_require__(573)
|
| 27631 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Backbone, Marionette, BackboneRadio) {
|
| 27632 |
var Radio = BackboneRadio;
|
| 27633 |
|
| 27662 |
window.EditorApplication = app;
|
| 27663 |
|
| 27664 |
return app;
|
|
|
|
| 27665 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 27666 |
|
| 27667 |
|
| 27668 |
/***/ },
|
| 27669 |
|
| 27670 |
+
/***/ 585:
|
| 27671 |
/***/ function(module, exports, __webpack_require__) {
|
| 27672 |
|
| 27673 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27674 |
+
__webpack_require__(584),
|
| 27675 |
+
__webpack_require__(574)
|
| 27676 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, SuperModel) {
|
|
|
|
| 27677 |
var Module = {};
|
| 27678 |
|
| 27679 |
Module.ConfigModel = SuperModel.extend({
|
| 27695 |
return Module._config;
|
| 27696 |
};
|
| 27697 |
|
| 27698 |
+
App.on('before:start', function (BeforeStartApp, options) {
|
| 27699 |
+
var Application = BeforeStartApp;
|
| 27700 |
// Expose config methods globally
|
| 27701 |
Application.getConfig = Module.getConfig;
|
| 27702 |
Application.setConfig = Module.setConfig;
|
| 27710 |
|
| 27711 |
/***/ },
|
| 27712 |
|
| 27713 |
+
/***/ 586:
|
| 27714 |
/***/ function(module, exports, __webpack_require__) {
|
| 27715 |
|
| 27716 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27717 |
+
__webpack_require__(584),
|
| 27718 |
+
__webpack_require__(572),
|
| 27719 |
+
__webpack_require__(574),
|
| 27720 |
__webpack_require__(280)
|
| 27721 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Marionette, SuperModel, _) {
|
|
|
|
| 27722 |
'use strict';
|
| 27723 |
|
| 27724 |
var Module = {};
|
| 27783 |
return App.getConfig().get('availableStyles');
|
| 27784 |
};
|
| 27785 |
|
| 27786 |
+
App.on('before:start', function (BeforeStartApp, options) {
|
| 27787 |
+
var Application = BeforeStartApp;
|
| 27788 |
var body;
|
| 27789 |
var globalStyles;
|
| 27790 |
// Expose style methods to global application
|
| 27797 |
this.setGlobalStyles(globalStyles);
|
| 27798 |
});
|
| 27799 |
|
| 27800 |
+
App.on('start', function (StartApp) {
|
| 27801 |
+
var stylesView = new Module.StylesView({ model: StartApp.getGlobalStyles() });
|
| 27802 |
+
StartApp._appView.showChildView('stylesRegion', stylesView);
|
| 27803 |
});
|
| 27804 |
|
| 27805 |
return Module;
|
| 27808 |
|
| 27809 |
/***/ },
|
| 27810 |
|
| 27811 |
+
/***/ 587:
|
| 27812 |
/***/ function(module, exports, __webpack_require__) {
|
| 27813 |
|
| 27814 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 27815 |
+
__webpack_require__(584),
|
| 27816 |
+
__webpack_require__(588),
|
| 27817 |
__webpack_require__(276),
|
| 27818 |
__webpack_require__(544),
|
| 27819 |
+
__webpack_require__(572),
|
| 27820 |
+
__webpack_require__(574),
|
| 27821 |
__webpack_require__(280),
|
| 27822 |
__webpack_require__(275)
|
| 27823 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 27830 |
_,
|
| 27831 |
jQuery
|
| 27832 |
) {
|
|
|
|
| 27833 |
'use strict';
|
| 27834 |
|
| 27835 |
var Module = {};
|
| 27923 |
// position of the sidebar would be scrollable and not fixed
|
| 27924 |
// partially out of visible screen
|
| 27925 |
this.$el.parent().each(function () {
|
| 27926 |
+
var calculatedLeft;
|
| 27927 |
var self = jQuery(this);
|
| 27928 |
|
| 27929 |
if (self.css('position') === 'fixed') {
|
| 27930 |
+
calculatedLeft = self.parent().offset().left - jQuery(window).scrollLeft();
|
| 27931 |
+
self.css('left', calculatedLeft + 'px');
|
| 27932 |
} else {
|
| 27933 |
self.css('left', '');
|
| 27934 |
}
|
| 28151 |
}
|
| 28152 |
});
|
| 28153 |
});
|
| 28154 |
+
return undefined;
|
| 28155 |
}
|
| 28156 |
});
|
| 28157 |
|
| 28173 |
}
|
| 28174 |
});
|
| 28175 |
|
| 28176 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 28177 |
+
var Application = BeforeStartApp;
|
| 28178 |
Application.registerWidget = Module.registerWidget;
|
| 28179 |
Application.getWidgets = Module.getWidgets;
|
| 28180 |
Application.registerLayoutWidget = Module.registerLayoutWidget;
|
| 28181 |
Application.getLayoutWidgets = Module.getLayoutWidgets;
|
| 28182 |
});
|
| 28183 |
|
| 28184 |
+
App.on('start', function (StartApp) {
|
| 28185 |
var sidebarView = new SidebarView();
|
| 28186 |
|
| 28187 |
+
StartApp._appView.showChildView('sidebarRegion', sidebarView);
|
| 28188 |
|
| 28189 |
MailPoet.helpTooltip.show(document.getElementById('tooltip-send-preview'), {
|
| 28190 |
tooltipId: 'tooltip-editor-send-preview',
|
| 28210 |
|
| 28211 |
/***/ },
|
| 28212 |
|
| 28213 |
+
/***/ 589:
|
| 28214 |
/***/ function(module, exports, __webpack_require__) {
|
| 28215 |
|
| 28216 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28217 |
+
__webpack_require__(584),
|
| 28218 |
+
__webpack_require__(574),
|
| 28219 |
__webpack_require__(280),
|
| 28220 |
__webpack_require__(276)
|
| 28221 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, SuperModel, _, MailPoet) {
|
| 28248 |
Module.getBlockTypeModel = function (type) {
|
| 28249 |
if (type in Module._blockTypes) {
|
| 28250 |
return Module._blockTypes[type].blockModel;
|
|
|
|
|
|
|
| 28251 |
}
|
| 28252 |
+
throw 'Block type not supported: ' + type;
|
| 28253 |
};
|
| 28254 |
Module.getBlockTypeView = function (type) {
|
| 28255 |
if (type in Module._blockTypes) {
|
| 28256 |
return Module._blockTypes[type].blockView;
|
|
|
|
|
|
|
| 28257 |
}
|
| 28258 |
+
throw 'Block type not supported: ' + type;
|
| 28259 |
};
|
| 28260 |
|
| 28261 |
Module.getBody = function () {
|
| 28281 |
};
|
| 28282 |
|
| 28283 |
App.on('before:start', function (Application, options) {
|
| 28284 |
+
var BeforeStartApp = Application;
|
| 28285 |
// Expose block methods globally
|
| 28286 |
+
BeforeStartApp.registerBlockType = Module.registerBlockType;
|
| 28287 |
+
BeforeStartApp.getBlockTypeModel = Module.getBlockTypeModel;
|
| 28288 |
+
BeforeStartApp.getBlockTypeView = Module.getBlockTypeView;
|
| 28289 |
+
BeforeStartApp.toJSON = Module.toJSON;
|
| 28290 |
+
BeforeStartApp.getBody = Module.getBody;
|
| 28291 |
+
BeforeStartApp.getNewsletter = Module.getNewsletter;
|
| 28292 |
+
BeforeStartApp.findModels = Module.findModels;
|
| 28293 |
|
| 28294 |
Module.newsletter = new Module.NewsletterModel(_.omit(_.clone(options.newsletter), ['body']));
|
| 28295 |
});
|
| 28296 |
|
| 28297 |
App.on('start', function (Application, options) {
|
| 28298 |
+
var StartApp = Application;
|
| 28299 |
var body = options.newsletter.body;
|
| 28300 |
var content = (_.has(body, 'content')) ? body.content : {};
|
| 28301 |
|
| 28306 |
);
|
| 28307 |
}
|
| 28308 |
|
| 28309 |
+
StartApp._contentContainer = new (StartApp.getBlockTypeModel('container'))(content, { parse: true });
|
| 28310 |
+
StartApp._contentContainerView = new (StartApp.getBlockTypeView('container'))({
|
| 28311 |
+
model: StartApp._contentContainer,
|
| 28312 |
renderOptions: { depth: 0 }
|
| 28313 |
});
|
| 28314 |
|
| 28315 |
+
StartApp._appView.showChildView('contentRegion', StartApp._contentContainerView);
|
| 28316 |
});
|
| 28317 |
|
| 28318 |
|
| 28322 |
|
| 28323 |
/***/ },
|
| 28324 |
|
| 28325 |
+
/***/ 590:
|
| 28326 |
/***/ function(module, exports, __webpack_require__) {
|
| 28327 |
|
| 28328 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28329 |
+
__webpack_require__(584),
|
| 28330 |
__webpack_require__(544),
|
| 28331 |
+
__webpack_require__(572),
|
| 28332 |
__webpack_require__(280),
|
| 28333 |
__webpack_require__(275),
|
| 28334 |
__webpack_require__(276)
|
| 28335 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Backbone, Marionette, _, jQuery, MailPoet) {
|
|
|
|
| 28336 |
'use strict';
|
| 28337 |
|
| 28338 |
var Module = {};
|
| 28355 |
}
|
| 28356 |
});
|
| 28357 |
|
| 28358 |
+
App.on('start', function (StartApp) {
|
| 28359 |
+
StartApp._appView.showChildView('headingRegion', new Module.HeadingView({ model: StartApp.getNewsletter() }));
|
| 28360 |
MailPoet.helpTooltip.show(document.getElementById('tooltip-designer-subject-line'), {
|
| 28361 |
tooltipId: 'tooltip-designer-subject-line-ti',
|
| 28362 |
tooltip: MailPoet.I18n.t('helpTooltipDesignerSubjectLine'),
|
| 28374 |
|
| 28375 |
/***/ },
|
| 28376 |
|
| 28377 |
+
/***/ 591:
|
| 28378 |
/***/ function(module, exports, __webpack_require__) {
|
| 28379 |
|
| 28380 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 28381 |
+
__webpack_require__(584),
|
| 28382 |
+
__webpack_require__(588),
|
| 28383 |
__webpack_require__(276),
|
| 28384 |
+
__webpack_require__(566),
|
| 28385 |
__webpack_require__(544),
|
| 28386 |
+
__webpack_require__(572),
|
| 28387 |
__webpack_require__(275),
|
|
|
|
| 28388 |
__webpack_require__(578),
|
| 28389 |
+
__webpack_require__(579),
|
| 28390 |
+
__webpack_require__(592),
|
| 28391 |
__webpack_require__(280),
|
| 28392 |
__webpack_require__(275)
|
| 28393 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 28404 |
_,
|
| 28405 |
$
|
| 28406 |
) {
|
|
|
|
| 28407 |
'use strict';
|
| 28408 |
|
| 28409 |
var Module = {};
|
| 28411 |
|
| 28412 |
// Save editor contents to server
|
| 28413 |
Module.save = function () {
|
|
|
|
| 28414 |
var json = App.toJSON();
|
| 28415 |
|
| 28416 |
// Stringify to enable transmission of primitive non-string value types
|
| 28612 |
});
|
| 28613 |
this.hideOptionContents();
|
| 28614 |
}
|
|
|
|
| 28615 |
},
|
| 28616 |
toggleExportTemplate: function () {
|
| 28617 |
this.$('.mailpoet_export_template_container').toggleClass('mailpoet_hidden');
|
| 28726 |
|
| 28727 |
return message;
|
| 28728 |
}
|
| 28729 |
+
return undefined;
|
| 28730 |
};
|
| 28731 |
|
| 28732 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 28733 |
+
var Application = BeforeStartApp;
|
| 28734 |
Application.save = Module.save;
|
| 28735 |
Application.getChannel().on('autoSave', Module.autoSave);
|
| 28736 |
|
| 28739 |
Application.getChannel().reply('save', Application.save);
|
| 28740 |
});
|
| 28741 |
|
| 28742 |
+
App.on('start', function (BeforeStartApp) {
|
| 28743 |
var saveView = new Module.SaveView();
|
| 28744 |
+
BeforeStartApp._appView.showChildView('bottomRegion', saveView);
|
| 28745 |
});
|
| 28746 |
|
| 28747 |
return Module;
|
| 28750 |
|
| 28751 |
/***/ },
|
| 28752 |
|
| 28753 |
+
/***/ 592:
|
| 28754 |
/***/ function(module, exports, __webpack_require__) {
|
| 28755 |
|
| 28756 |
+
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["html2canvas"] = __webpack_require__(593);
|
| 28757 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 28758 |
|
| 28759 |
/***/ },
|
| 28760 |
|
| 28761 |
+
/***/ 593:
|
| 28762 |
/***/ function(module, exports, __webpack_require__) {
|
| 28763 |
|
| 28764 |
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
| 33299 |
|
| 33300 |
/***/ },
|
| 33301 |
|
| 33302 |
+
/***/ 594:
|
| 33303 |
/***/ function(module, exports, __webpack_require__) {
|
| 33304 |
|
| 33305 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 33309 |
* For more check: http://marionettejs.com/docs/marionette.behaviors.html#behaviorslookup
|
| 33310 |
*/
|
| 33311 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33312 |
+
__webpack_require__(572)
|
| 33313 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (BackboneMarionette) {
|
| 33314 |
var Marionette = BackboneMarionette;
|
| 33315 |
var BehaviorsLookup = {};
|
| 33325 |
|
| 33326 |
/***/ },
|
| 33327 |
|
| 33328 |
+
/***/ 595:
|
| 33329 |
/***/ function(module, exports, __webpack_require__) {
|
| 33330 |
|
| 33331 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 33334 |
* Adds a color picker integration with the view
|
| 33335 |
*/
|
| 33336 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33337 |
+
__webpack_require__(572),
|
| 33338 |
+
__webpack_require__(594),
|
| 33339 |
__webpack_require__(276),
|
| 33340 |
+
__webpack_require__(576)
|
| 33341 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup, MailPoet) {
|
| 33342 |
var BL = BehaviorsLookup;
|
| 33343 |
|
| 33379 |
|
| 33380 |
/***/ },
|
| 33381 |
|
| 33382 |
+
/***/ 596:
|
| 33383 |
/***/ function(module, exports, __webpack_require__) {
|
| 33384 |
|
| 33385 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
| 33391 |
* accept droppables
|
| 33392 |
*/
|
| 33393 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33394 |
+
__webpack_require__(572),
|
| 33395 |
__webpack_require__(280),
|
| 33396 |
__webpack_require__(275),
|
| 33397 |
+
__webpack_require__(594),
|
| 33398 |
+
__webpack_require__(575)
|
| 33399 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, jQuery, BL, interact) {
|
| 33400 |
var BehaviorsLookup = BL;
|
| 33401 |
|
| 33665 |
// 2. Remove visual markings of drop position visualization
|
| 33666 |
this.view.$('.mailpoet_drop_marker').remove();
|
| 33667 |
},
|
| 33668 |
+
getDropPosition: function (eventX, eventY, isUnsafe) {
|
| 33669 |
var SPECIAL_AREA_INSERTION_WIDTH = 0.00; // Disable special insertion. Default: 0.3
|
| 33670 |
|
| 33671 |
var element = this.view.$el;
|
| 33691 |
var position;
|
| 33692 |
var indexAndPosition;
|
| 33693 |
|
| 33694 |
+
var unsafe = !!isUnsafe;
|
| 33695 |
|
| 33696 |
if (this.getCollection().length === 0) {
|
| 33697 |
return {
|
| 33742 |
|
| 33743 |
if (orientation === 'horizontal' && insertionType === 'special') {
|
| 33744 |
// Disable special insertion for horizontal containers
|
| 33745 |
+
return undefined;
|
| 33746 |
}
|
| 33747 |
|
| 33748 |
return {
|
| 33782 |
index: index,
|
| 33783 |
position: 'before'
|
| 33784 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33785 |
}
|
| 33786 |
+
// Second half of the element
|
| 33787 |
+
return {
|
| 33788 |
+
index: index,
|
| 33789 |
+
position: 'after'
|
| 33790 |
+
};
|
| 33791 |
},
|
| 33792 |
_computeSpecialIndex: function (eventX, eventY) {
|
| 33793 |
return this._computeCellIndex(eventX, eventY);
|
| 33844 |
|
| 33845 |
/***/ },
|
| 33846 |
|
| 33847 |
+
/***/ 597:
|
| 33848 |
/***/ function(module, exports, __webpack_require__) {
|
| 33849 |
|
| 33850 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 33854 |
* Part of the drag&drop behavior.
|
| 33855 |
*/
|
| 33856 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 33857 |
+
__webpack_require__(572),
|
| 33858 |
__webpack_require__(280),
|
| 33859 |
__webpack_require__(275),
|
| 33860 |
+
__webpack_require__(594),
|
| 33861 |
+
__webpack_require__(575)
|
| 33862 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, jQuery, BehaviorsLookup, interact) {
|
| 33863 |
var BL = BehaviorsLookup;
|
| 33864 |
|
| 33933 |
that.view.$el.addClass('mailpoet_hidden');
|
| 33934 |
}
|
| 33935 |
}
|
|
|
|
| 33936 |
},
|
| 33937 |
// call this function on every dragmove event
|
| 33938 |
onmove: function (event) {
|
| 33998 |
|
| 33999 |
/***/ },
|
| 34000 |
|
| 34001 |
+
/***/ 598:
|
| 34002 |
/***/ function(module, exports, __webpack_require__) {
|
| 34003 |
|
| 34004 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34007 |
* Highlights a container block when hovering over its tools
|
| 34008 |
*/
|
| 34009 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34010 |
+
__webpack_require__(572),
|
| 34011 |
+
__webpack_require__(594)
|
| 34012 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup) {
|
| 34013 |
var BL = BehaviorsLookup;
|
| 34014 |
|
| 34031 |
|
| 34032 |
/***/ },
|
| 34033 |
|
| 34034 |
+
/***/ 599:
|
| 34035 |
/***/ function(module, exports, __webpack_require__) {
|
| 34036 |
|
| 34037 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34040 |
* Highlights a block that is being edited
|
| 34041 |
*/
|
| 34042 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34043 |
+
__webpack_require__(572),
|
| 34044 |
+
__webpack_require__(594)
|
| 34045 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup) {
|
| 34046 |
var BL = BehaviorsLookup;
|
| 34047 |
|
| 34064 |
|
| 34065 |
/***/ },
|
| 34066 |
|
| 34067 |
+
/***/ 600:
|
| 34068 |
/***/ function(module, exports, __webpack_require__) {
|
| 34069 |
|
| 34070 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34073 |
* Allows resizing elements within a block
|
| 34074 |
*/
|
| 34075 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34076 |
+
__webpack_require__(572),
|
| 34077 |
+
__webpack_require__(594),
|
| 34078 |
+
__webpack_require__(575)
|
| 34079 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, BehaviorsLookup, interact) {
|
| 34080 |
var BL = BehaviorsLookup;
|
| 34081 |
|
| 34145 |
|
| 34146 |
/***/ },
|
| 34147 |
|
| 34148 |
+
/***/ 601:
|
| 34149 |
/***/ function(module, exports, __webpack_require__) {
|
| 34150 |
|
| 34151 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34154 |
* Allows sorting elements within a collection
|
| 34155 |
*/
|
| 34156 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34157 |
+
__webpack_require__(572),
|
| 34158 |
__webpack_require__(280),
|
| 34159 |
+
__webpack_require__(594)
|
| 34160 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, BehaviorsLookup) {
|
| 34161 |
var BL = BehaviorsLookup;
|
| 34162 |
|
| 34193 |
|
| 34194 |
/***/ },
|
| 34195 |
|
| 34196 |
+
/***/ 602:
|
| 34197 |
/***/ function(module, exports, __webpack_require__) {
|
| 34198 |
|
| 34199 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34202 |
* Opens up settings of a BlockView if contents are clicked upon
|
| 34203 |
*/
|
| 34204 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34205 |
+
__webpack_require__(572),
|
| 34206 |
__webpack_require__(275),
|
| 34207 |
+
__webpack_require__(594)
|
| 34208 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, jQuery, BehaviorsLookup) {
|
| 34209 |
var BL = BehaviorsLookup;
|
| 34210 |
|
| 34232 |
|
| 34233 |
/***/ },
|
| 34234 |
|
| 34235 |
+
/***/ 603:
|
| 34236 |
/***/ function(module, exports, __webpack_require__) {
|
| 34237 |
|
| 34238 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34241 |
* Adds TinyMCE text editing capabilities to a view
|
| 34242 |
*/
|
| 34243 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34244 |
+
__webpack_require__(572),
|
| 34245 |
__webpack_require__(280),
|
| 34246 |
+
__webpack_require__(594)
|
| 34247 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Marionette, _, BehaviorsLookup) {
|
| 34248 |
var BL = BehaviorsLookup;
|
| 34249 |
|
| 34325 |
|
| 34326 |
/***/ },
|
| 34327 |
|
| 34328 |
+
/***/ 604:
|
| 34329 |
/***/ function(module, exports, __webpack_require__) {
|
| 34330 |
|
| 34331 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34335 |
* BlockToolsView, BlockSettingsView and BlockWidgetView are optional.
|
| 34336 |
*/
|
| 34337 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34338 |
+
__webpack_require__(584),
|
| 34339 |
+
__webpack_require__(572),
|
| 34340 |
+
__webpack_require__(574),
|
| 34341 |
__webpack_require__(280),
|
| 34342 |
__webpack_require__(275),
|
| 34343 |
__webpack_require__(276),
|
| 34344 |
+
__webpack_require__(565)
|
| 34345 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, Marionette, SuperModel, _, jQuery, MailPoet) {
|
|
|
|
| 34346 |
'use strict';
|
| 34347 |
|
| 34348 |
var Module = {};
|
| 34408 |
WidgetView.destroy();
|
| 34409 |
return node;
|
| 34410 |
}
|
| 34411 |
+
return undefined;
|
| 34412 |
}
|
| 34413 |
},
|
| 34414 |
HighlightEditingBehavior: {}
|
| 34641 |
|
| 34642 |
/***/ },
|
| 34643 |
|
| 34644 |
+
/***/ 605:
|
| 34645 |
/***/ function(module, exports, __webpack_require__) {
|
| 34646 |
|
| 34647 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 34651 |
*/
|
| 34652 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 34653 |
__webpack_require__(544),
|
| 34654 |
+
__webpack_require__(572),
|
| 34655 |
__webpack_require__(280),
|
| 34656 |
__webpack_require__(275),
|
| 34657 |
+
__webpack_require__(584),
|
| 34658 |
+
__webpack_require__(604)
|
| 34659 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (Backbone, Marionette, _, jQuery, App, BaseBlock) {
|
|
|
|
| 34660 |
'use strict';
|
| 34661 |
|
| 34662 |
var Module = {};
|
| 34699 |
if (invalidBlock) {
|
| 34700 |
return invalidBlock.validationError;
|
| 34701 |
}
|
| 34702 |
+
return undefined;
|
| 34703 |
},
|
| 34704 |
parse: function (response) {
|
| 34705 |
// If container has any blocks - add them to a collection
|
| 34778 |
WidgetView.destroy();
|
| 34779 |
return node;
|
| 34780 |
}
|
| 34781 |
+
return undefined;
|
| 34782 |
},
|
| 34783 |
testAttachToInstance: function (model, view) {
|
| 34784 |
// Attach Draggable only to layout containers and disable it
|
| 34796 |
if (this.model.get('blocks').length === 2) return Module.TwoColumnContainerWidgetView;
|
| 34797 |
}
|
| 34798 |
return Module.OneColumnContainerWidgetView;
|
|
|
|
| 34799 |
},
|
| 34800 |
initialize: function (options) {
|
| 34801 |
base.BlockView.prototype.initialize.apply(this, arguments);
|
| 34840 |
var $toggleButton = this.$('> .mailpoet_tools .mailpoet_newsletter_layer_selector');
|
| 34841 |
var $overlay = jQuery('.mailpoet_layer_overlay');
|
| 34842 |
var $container = this.$('> .mailpoet_container');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34843 |
var disableContainerLayer = function () {
|
| 34844 |
that.$el.removeClass('mailpoet_container_layer_active');
|
| 34845 |
$toggleButton.removeClass('mailpoet_container_layer_active');
|
| 34847 |
$overlay.hide();
|
| 34848 |
$overlay.off('click');
|
| 34849 |
};
|
| 34850 |
+
var enableContainerLayer = function () {
|
| 34851 |
+
that.$el.addClass('mailpoet_container_layer_active');
|
| 34852 |
+
$toggleButton.addClass('mailpoet_container_layer_active');
|
| 34853 |
+
$container.addClass('mailpoet_layer_highlight');
|
| 34854 |
+
$overlay.click(disableContainerLayer);
|
| 34855 |
+
$overlay.show();
|
| 34856 |
+
};
|
| 34857 |
if ($toggleButton.hasClass('mailpoet_container_layer_active')) {
|
| 34858 |
disableContainerLayer();
|
| 34859 |
} else {
|
| 34982 |
}
|
| 34983 |
});
|
| 34984 |
|
| 34985 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 34986 |
+
BeforeStartApp.registerBlockType('container', {
|
| 34987 |
blockModel: Module.ContainerBlockModel,
|
| 34988 |
blockView: Module.ContainerBlockView
|
| 34989 |
});
|
| 34990 |
|
| 34991 |
+
BeforeStartApp.registerLayoutWidget({
|
| 34992 |
name: 'oneColumnLayout',
|
| 34993 |
priority: 100,
|
| 34994 |
widgetView: Module.OneColumnContainerWidgetView
|
| 34995 |
});
|
| 34996 |
|
| 34997 |
+
BeforeStartApp.registerLayoutWidget({
|
| 34998 |
name: 'twoColumnLayout',
|
| 34999 |
priority: 100,
|
| 35000 |
widgetView: Module.TwoColumnContainerWidgetView
|
| 35001 |
});
|
| 35002 |
|
| 35003 |
+
BeforeStartApp.registerLayoutWidget({
|
| 35004 |
name: 'threeColumnLayout',
|
| 35005 |
priority: 100,
|
| 35006 |
widgetView: Module.ThreeColumnContainerWidgetView
|
| 35013 |
|
| 35014 |
/***/ },
|
| 35015 |
|
| 35016 |
+
/***/ 606:
|
| 35017 |
/***/ function(module, exports, __webpack_require__) {
|
| 35018 |
|
| 35019 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35020 |
* Button content block
|
| 35021 |
*/
|
| 35022 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35023 |
+
__webpack_require__(584),
|
| 35024 |
+
__webpack_require__(604),
|
| 35025 |
__webpack_require__(276),
|
| 35026 |
__webpack_require__(280),
|
| 35027 |
__webpack_require__(275)
|
| 35028 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, MailPoet, _, jQuery) {
|
|
|
|
| 35029 |
'use strict';
|
| 35030 |
|
| 35031 |
var Module = {};
|
| 35149 |
}
|
| 35150 |
});
|
| 35151 |
|
| 35152 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 35153 |
+
BeforeStartApp.registerBlockType('button', {
|
| 35154 |
blockModel: Module.ButtonBlockModel,
|
| 35155 |
blockView: Module.ButtonBlockView
|
| 35156 |
});
|
| 35157 |
|
| 35158 |
+
BeforeStartApp.registerWidget({
|
| 35159 |
name: 'button',
|
| 35160 |
widgetView: Module.ButtonWidgetView,
|
| 35161 |
priority: 92
|
| 35168 |
|
| 35169 |
/***/ },
|
| 35170 |
|
| 35171 |
+
/***/ 607:
|
| 35172 |
/***/ function(module, exports, __webpack_require__) {
|
| 35173 |
|
| 35174 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35175 |
* Image content block
|
| 35176 |
*/
|
| 35177 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35178 |
+
__webpack_require__(584),
|
| 35179 |
+
__webpack_require__(604),
|
| 35180 |
__webpack_require__(280),
|
| 35181 |
__webpack_require__(276),
|
| 35182 |
__webpack_require__(275)
|
| 35183 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet, jQuery) {
|
|
|
|
| 35184 |
'use strict';
|
| 35185 |
|
| 35186 |
var Module = {};
|
| 35585 |
});
|
| 35586 |
Module.ImageWidgetView = ImageWidgetView;
|
| 35587 |
|
| 35588 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 35589 |
+
BeforeStartApp.registerBlockType('image', {
|
| 35590 |
blockModel: Module.ImageBlockModel,
|
| 35591 |
blockView: Module.ImageBlockView
|
| 35592 |
});
|
| 35593 |
|
| 35594 |
+
BeforeStartApp.registerWidget({
|
| 35595 |
name: 'image',
|
| 35596 |
widgetView: Module.ImageWidgetView,
|
| 35597 |
priority: 91
|
| 35604 |
|
| 35605 |
/***/ },
|
| 35606 |
|
| 35607 |
+
/***/ 608:
|
| 35608 |
/***/ function(module, exports, __webpack_require__) {
|
| 35609 |
|
| 35610 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35611 |
* Divider content block
|
| 35612 |
*/
|
| 35613 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35614 |
+
__webpack_require__(584),
|
| 35615 |
+
__webpack_require__(604),
|
| 35616 |
__webpack_require__(280),
|
| 35617 |
__webpack_require__(275)
|
| 35618 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, jQuery) {
|
|
|
|
| 35619 |
'use strict';
|
| 35620 |
|
| 35621 |
var Module = {};
|
| 35746 |
}
|
| 35747 |
}
|
| 35748 |
});
|
| 35749 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 35750 |
+
BeforeStartApp.registerBlockType('divider', {
|
| 35751 |
blockModel: Module.DividerBlockModel,
|
| 35752 |
blockView: Module.DividerBlockView
|
| 35753 |
});
|
| 35754 |
|
| 35755 |
+
BeforeStartApp.registerWidget({
|
| 35756 |
name: 'divider',
|
| 35757 |
widgetView: Module.DividerWidgetView,
|
| 35758 |
priority: 93
|
| 35765 |
|
| 35766 |
/***/ },
|
| 35767 |
|
| 35768 |
+
/***/ 609:
|
| 35769 |
/***/ function(module, exports, __webpack_require__) {
|
| 35770 |
|
| 35771 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35772 |
* Text content block
|
| 35773 |
*/
|
| 35774 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35775 |
+
__webpack_require__(584),
|
| 35776 |
+
__webpack_require__(604),
|
| 35777 |
__webpack_require__(280),
|
| 35778 |
__webpack_require__(276)
|
| 35779 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
|
|
|
| 35780 |
'use strict';
|
| 35781 |
|
| 35782 |
var Module = {};
|
| 35863 |
}
|
| 35864 |
});
|
| 35865 |
|
| 35866 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 35867 |
+
BeforeStartApp.registerBlockType('text', {
|
| 35868 |
blockModel: Module.TextBlockModel,
|
| 35869 |
blockView: Module.TextBlockView
|
| 35870 |
});
|
| 35871 |
|
| 35872 |
+
BeforeStartApp.registerWidget({
|
| 35873 |
name: 'text',
|
| 35874 |
widgetView: Module.TextWidgetView,
|
| 35875 |
priority: 90
|
| 35883 |
|
| 35884 |
/***/ },
|
| 35885 |
|
| 35886 |
+
/***/ 610:
|
| 35887 |
/***/ function(module, exports, __webpack_require__) {
|
| 35888 |
|
| 35889 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 35890 |
* Spacer content block
|
| 35891 |
*/
|
| 35892 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 35893 |
+
__webpack_require__(584),
|
| 35894 |
+
__webpack_require__(604),
|
| 35895 |
__webpack_require__(280)
|
| 35896 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _) {
|
|
|
|
| 35897 |
'use strict';
|
| 35898 |
|
| 35899 |
var Module = {};
|
| 35974 |
}
|
| 35975 |
});
|
| 35976 |
|
| 35977 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 35978 |
+
BeforeStartApp.registerBlockType('spacer', {
|
| 35979 |
blockModel: Module.SpacerBlockModel,
|
| 35980 |
blockView: Module.SpacerBlockView
|
| 35981 |
});
|
| 35982 |
|
| 35983 |
+
BeforeStartApp.registerWidget({
|
| 35984 |
name: 'spacer',
|
| 35985 |
widgetView: Module.SpacerWidgetView,
|
| 35986 |
priority: 94
|
| 35993 |
|
| 35994 |
/***/ },
|
| 35995 |
|
| 35996 |
+
/***/ 611:
|
| 35997 |
/***/ function(module, exports, __webpack_require__) {
|
| 35998 |
|
| 35999 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36000 |
* Footer content block
|
| 36001 |
*/
|
| 36002 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36003 |
+
__webpack_require__(584),
|
| 36004 |
+
__webpack_require__(604),
|
| 36005 |
__webpack_require__(280),
|
| 36006 |
__webpack_require__(276)
|
| 36007 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
|
|
|
| 36008 |
'use strict';
|
| 36009 |
|
| 36010 |
var Module = {};
|
| 36107 |
}
|
| 36108 |
});
|
| 36109 |
|
| 36110 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 36111 |
+
BeforeStartApp.registerBlockType('footer', {
|
| 36112 |
blockModel: Module.FooterBlockModel,
|
| 36113 |
blockView: Module.FooterBlockView
|
| 36114 |
});
|
| 36115 |
|
| 36116 |
+
BeforeStartApp.registerWidget({
|
| 36117 |
name: 'footer',
|
| 36118 |
widgetView: Module.FooterWidgetView,
|
| 36119 |
priority: 99
|
| 36126 |
|
| 36127 |
/***/ },
|
| 36128 |
|
| 36129 |
+
/***/ 612:
|
| 36130 |
/***/ function(module, exports, __webpack_require__) {
|
| 36131 |
|
| 36132 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36133 |
* Header content block
|
| 36134 |
*/
|
| 36135 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36136 |
+
__webpack_require__(584),
|
| 36137 |
+
__webpack_require__(604),
|
| 36138 |
__webpack_require__(280),
|
| 36139 |
__webpack_require__(276)
|
| 36140 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, _, MailPoet) {
|
|
|
|
| 36141 |
'use strict';
|
| 36142 |
|
| 36143 |
var Module = {};
|
| 36240 |
}
|
| 36241 |
});
|
| 36242 |
|
| 36243 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 36244 |
+
BeforeStartApp.registerBlockType('header', {
|
| 36245 |
blockModel: Module.HeaderBlockModel,
|
| 36246 |
blockView: Module.HeaderBlockView
|
| 36247 |
});
|
| 36248 |
|
| 36249 |
+
BeforeStartApp.registerWidget({
|
| 36250 |
name: 'header',
|
| 36251 |
widgetView: Module.HeaderWidgetView,
|
| 36252 |
priority: 98
|
| 36259 |
|
| 36260 |
/***/ },
|
| 36261 |
|
| 36262 |
+
/***/ 613:
|
| 36263 |
/***/ function(module, exports, __webpack_require__) {
|
| 36264 |
|
| 36265 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36271 |
* block settings view.
|
| 36272 |
*/
|
| 36273 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36274 |
+
__webpack_require__(584),
|
| 36275 |
+
__webpack_require__(604),
|
| 36276 |
+
__webpack_require__(606),
|
| 36277 |
+
__webpack_require__(608),
|
| 36278 |
+
__webpack_require__(588),
|
| 36279 |
__webpack_require__(276),
|
| 36280 |
+
__webpack_require__(574),
|
| 36281 |
__webpack_require__(280),
|
| 36282 |
__webpack_require__(275)
|
| 36283 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 36291 |
_,
|
| 36292 |
jQuery
|
| 36293 |
) {
|
|
|
|
| 36294 |
'use strict';
|
| 36295 |
|
| 36296 |
var Module = {};
|
| 36643 |
}
|
| 36644 |
});
|
| 36645 |
|
| 36646 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 36647 |
+
BeforeStartApp.registerBlockType('automatedLatestContent', {
|
| 36648 |
blockModel: Module.AutomatedLatestContentBlockModel,
|
| 36649 |
blockView: Module.AutomatedLatestContentBlockView
|
| 36650 |
});
|
| 36651 |
|
| 36652 |
+
BeforeStartApp.registerWidget({
|
| 36653 |
name: 'automatedLatestContent',
|
| 36654 |
widgetView: Module.AutomatedLatestContentWidgetView,
|
| 36655 |
priority: 97
|
| 36656 |
});
|
| 36657 |
});
|
| 36658 |
|
| 36659 |
+
App.on('start', function (StartApp) {
|
| 36660 |
+
var Application = StartApp;
|
| 36661 |
Application._ALCSupervisor = new Module.ALCSupervisor();
|
| 36662 |
Application._ALCSupervisor.refresh();
|
| 36663 |
});
|
| 36668 |
|
| 36669 |
/***/ },
|
| 36670 |
|
| 36671 |
+
/***/ 614:
|
| 36672 |
/***/ function(module, exports, __webpack_require__) {
|
| 36673 |
|
| 36674 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 36685 |
*/
|
| 36686 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 36687 |
__webpack_require__(544),
|
|
|
|
| 36688 |
__webpack_require__(572),
|
| 36689 |
+
__webpack_require__(573),
|
| 36690 |
__webpack_require__(280),
|
| 36691 |
__webpack_require__(275),
|
| 36692 |
__webpack_require__(276),
|
| 36693 |
+
__webpack_require__(584),
|
| 36694 |
+
__webpack_require__(588),
|
| 36695 |
+
__webpack_require__(604),
|
| 36696 |
+
__webpack_require__(606),
|
| 36697 |
+
__webpack_require__(608),
|
| 36698 |
__webpack_require__(289)
|
| 36699 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (
|
| 36700 |
Backbone,
|
| 36709 |
ButtonBlock,
|
| 36710 |
DividerBlock
|
| 36711 |
) {
|
|
|
|
| 36712 |
'use strict';
|
| 36713 |
|
| 36714 |
var Module = {};
|
| 36815 |
}).always(function () {
|
| 36816 |
that.trigger('morePostsLoaded');
|
| 36817 |
});
|
| 36818 |
+
return true;
|
| 36819 |
},
|
| 36820 |
_refreshTransformedPosts: function () {
|
| 36821 |
var that = this;
|
| 37255 |
}
|
| 37256 |
});
|
| 37257 |
|
| 37258 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 37259 |
+
BeforeStartApp.registerBlockType('posts', {
|
| 37260 |
blockModel: Module.PostsBlockModel,
|
| 37261 |
blockView: Module.PostsBlockView
|
| 37262 |
});
|
| 37263 |
|
| 37264 |
+
BeforeStartApp.registerWidget({
|
| 37265 |
name: 'posts',
|
| 37266 |
widgetView: Module.PostsWidgetView,
|
| 37267 |
priority: 96
|
| 37274 |
|
| 37275 |
/***/ },
|
| 37276 |
|
| 37277 |
+
/***/ 615:
|
| 37278 |
/***/ function(module, exports, __webpack_require__) {
|
| 37279 |
|
| 37280 |
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
| 37281 |
* Social icons content block
|
| 37282 |
*/
|
| 37283 |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
|
| 37284 |
+
__webpack_require__(584),
|
| 37285 |
+
__webpack_require__(604),
|
| 37286 |
__webpack_require__(544),
|
| 37287 |
+
__webpack_require__(572),
|
| 37288 |
+
__webpack_require__(574),
|
| 37289 |
__webpack_require__(280),
|
| 37290 |
__webpack_require__(275)
|
| 37291 |
], __WEBPACK_AMD_DEFINE_RESULT__ = function (App, BaseBlock, Backbone, Marionette, SuperModel, _, jQuery) {
|
|
|
|
| 37292 |
'use strict';
|
| 37293 |
|
| 37294 |
var Module = {};
|
| 37473 |
} else {
|
| 37474 |
return this.changeField('link', event);
|
| 37475 |
}
|
| 37476 |
+
return undefined;
|
| 37477 |
},
|
| 37478 |
changeField: function (field, event) {
|
| 37479 |
this.model.set(field, jQuery(event.target).val());
|
| 37577 |
}
|
| 37578 |
});
|
| 37579 |
|
| 37580 |
+
App.on('before:start', function (BeforeStartApp) {
|
| 37581 |
+
BeforeStartApp.registerBlockType('social', {
|
| 37582 |
blockModel: Module.SocialBlockModel,
|
| 37583 |
blockView: Module.SocialBlockView
|
| 37584 |
});
|
| 37585 |
|
| 37586 |
+
BeforeStartApp.registerWidget({
|
| 37587 |
name: 'social',
|
| 37588 |
widgetView: Module.SocialWidgetView,
|
| 37589 |
priority: 95
|
assets/js/{public.8173fe64.js → public.3d1d91ad.js}
RENAMED
|
@@ -93,7 +93,6 @@
|
|
| 93 |
return translations;
|
| 94 |
}
|
| 95 |
};
|
| 96 |
-
|
| 97 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 98 |
|
| 99 |
|
|
@@ -1818,7 +1817,7 @@
|
|
| 1818 |
*/
|
| 1819 |
$.fn.mailpoetSerializeObject = function (coerce) {
|
| 1820 |
var obj = {};
|
| 1821 |
-
var
|
| 1822 |
|
| 1823 |
// Iterate over all name=value pairs.
|
| 1824 |
$.each(this.serializeArray(), function (j, v) {
|
|
@@ -1830,33 +1829,33 @@
|
|
| 1830 |
// If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
|
| 1831 |
// into its component parts.
|
| 1832 |
var keys = key.split('][');
|
| 1833 |
-
var
|
| 1834 |
|
| 1835 |
// If the first keys part contains [ and the last ends with ], then []
|
| 1836 |
// are correctly balanced.
|
| 1837 |
-
if (/\[/.test(keys[0]) && /\]$/.test(keys[
|
| 1838 |
// Remove the trailing ] from the last keys part.
|
| 1839 |
-
keys[
|
| 1840 |
|
| 1841 |
// Split first keys part into two parts on the [ and add them back onto
|
| 1842 |
// the beginning of the keys array.
|
| 1843 |
keys = keys.shift().split('[').concat(keys);
|
| 1844 |
|
| 1845 |
-
|
| 1846 |
} else {
|
| 1847 |
// Basic 'foo' style key.
|
| 1848 |
-
|
| 1849 |
}
|
| 1850 |
|
| 1851 |
// Coerce values.
|
| 1852 |
if (coerce) {
|
| 1853 |
val = val && !isNaN(val) ? +val // number
|
| 1854 |
: val === 'undefined' ? undefined // undefined
|
| 1855 |
-
:
|
| 1856 |
: val; // string
|
| 1857 |
}
|
| 1858 |
|
| 1859 |
-
if (
|
| 1860 |
// Complex key, build deep object structure based on a few rules:
|
| 1861 |
// * The 'cur' pointer starts at the object top-level.
|
| 1862 |
// * [] = array push (n is set to array length), [n] = array if n is
|
|
@@ -1866,14 +1865,13 @@
|
|
| 1866 |
// object or array based on the type of the next keys part.
|
| 1867 |
// * Move the 'cur' pointer to the next level.
|
| 1868 |
// * Rinse & repeat.
|
| 1869 |
-
for (; i <=
|
| 1870 |
key = keys[i] === '' ? cur.length : keys[i];
|
| 1871 |
-
cur[key] = i <
|
| 1872 |
? cur[key] || (keys[i + 1] && isNaN(keys[i + 1]) ? {} : [])
|
| 1873 |
: val;
|
| 1874 |
cur = cur[key];
|
| 1875 |
}
|
| 1876 |
-
|
| 1877 |
} else {
|
| 1878 |
// Simple key, even simpler rules, since only scalars and shallow
|
| 1879 |
// arrays are allowed.
|
|
@@ -1881,12 +1879,10 @@
|
|
| 1881 |
if ($.isArray(obj[key])) {
|
| 1882 |
// val is already an array, so push on the next value.
|
| 1883 |
obj[key].push(val);
|
| 1884 |
-
|
| 1885 |
} else if (obj[key] !== undefined) {
|
| 1886 |
// val isn't an array, but since a second value has been specified,
|
| 1887 |
// convert val into an array.
|
| 1888 |
obj[key] = [obj[key], val];
|
| 1889 |
-
|
| 1890 |
} else {
|
| 1891 |
// val is a scalar.
|
| 1892 |
obj[key] = val;
|
|
@@ -1936,54 +1932,54 @@
|
|
| 1936 |
});
|
| 1937 |
|
| 1938 |
form.parsley().on('form:submit', function (parsley) {
|
| 1939 |
-
var
|
| 1940 |
// check if we're on the same domain
|
| 1941 |
if (isSameDomain(window.MailPoetForm.ajax_url) === false) {
|
| 1942 |
// non ajax post request
|
| 1943 |
return true;
|
| 1944 |
-
}
|
| 1945 |
// ajax request
|
| 1946 |
-
|
| 1947 |
-
|
| 1948 |
-
|
| 1949 |
-
|
| 1950 |
-
|
| 1951 |
-
|
| 1952 |
-
|
| 1953 |
-
|
| 1954 |
-
|
| 1955 |
response.errors.map(function (error) {
|
| 1956 |
return error.message;
|
| 1957 |
}).join('<br />')
|
| 1958 |
).show();
|
| 1959 |
-
|
| 1960 |
// successfully subscribed
|
| 1961 |
-
|
| 1962 |
response.meta !== undefined
|
| 1963 |
&& response.meta.redirect_url !== undefined
|
| 1964 |
) {
|
| 1965 |
// go to page
|
| 1966 |
-
|
| 1967 |
-
|
| 1968 |
// display success message
|
| 1969 |
-
|
| 1970 |
-
|
| 1971 |
|
| 1972 |
// reset form
|
| 1973 |
-
|
| 1974 |
// reset validation
|
| 1975 |
-
|
| 1976 |
|
| 1977 |
// resize iframe
|
| 1978 |
-
|
| 1979 |
window.frameElement !== null
|
| 1980 |
&& MailPoet !== undefined
|
| 1981 |
&& MailPoet['Iframe']
|
| 1982 |
) {
|
| 1983 |
-
|
| 1984 |
-
|
| 1985 |
-
|
| 1986 |
-
|
| 1987 |
return false;
|
| 1988 |
});
|
| 1989 |
});
|
| 93 |
return translations;
|
| 94 |
}
|
| 95 |
};
|
|
|
|
| 96 |
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
| 97 |
|
| 98 |
|
| 1817 |
*/
|
| 1818 |
$.fn.mailpoetSerializeObject = function (coerce) {
|
| 1819 |
var obj = {};
|
| 1820 |
+
var coerceTypes = { true: !0, false: !1, null: null };
|
| 1821 |
|
| 1822 |
// Iterate over all name=value pairs.
|
| 1823 |
$.each(this.serializeArray(), function (j, v) {
|
| 1829 |
// If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
|
| 1830 |
// into its component parts.
|
| 1831 |
var keys = key.split('][');
|
| 1832 |
+
var keysLast = keys.length - 1;
|
| 1833 |
|
| 1834 |
// If the first keys part contains [ and the last ends with ], then []
|
| 1835 |
// are correctly balanced.
|
| 1836 |
+
if (/\[/.test(keys[0]) && /\]$/.test(keys[keysLast])) {
|
| 1837 |
// Remove the trailing ] from the last keys part.
|
| 1838 |
+
keys[keysLast] = keys[keysLast].replace(/\]$/, '');
|
| 1839 |
|
| 1840 |
// Split first keys part into two parts on the [ and add them back onto
|
| 1841 |
// the beginning of the keys array.
|
| 1842 |
keys = keys.shift().split('[').concat(keys);
|
| 1843 |
|
| 1844 |
+
keysLast = keys.length - 1;
|
| 1845 |
} else {
|
| 1846 |
// Basic 'foo' style key.
|
| 1847 |
+
keysLast = 0;
|
| 1848 |
}
|
| 1849 |
|
| 1850 |
// Coerce values.
|
| 1851 |
if (coerce) {
|
| 1852 |
val = val && !isNaN(val) ? +val // number
|
| 1853 |
: val === 'undefined' ? undefined // undefined
|
| 1854 |
+
: coerceTypes[val] !== undefined ? coerceTypes[val] // true, false, null
|
| 1855 |
: val; // string
|
| 1856 |
}
|
| 1857 |
|
| 1858 |
+
if (keysLast) {
|
| 1859 |
// Complex key, build deep object structure based on a few rules:
|
| 1860 |
// * The 'cur' pointer starts at the object top-level.
|
| 1861 |
// * [] = array push (n is set to array length), [n] = array if n is
|
| 1865 |
// object or array based on the type of the next keys part.
|
| 1866 |
// * Move the 'cur' pointer to the next level.
|
| 1867 |
// * Rinse & repeat.
|
| 1868 |
+
for (; i <= keysLast; i++) {
|
| 1869 |
key = keys[i] === '' ? cur.length : keys[i];
|
| 1870 |
+
cur[key] = i < keysLast
|
| 1871 |
? cur[key] || (keys[i + 1] && isNaN(keys[i + 1]) ? {} : [])
|
| 1872 |
: val;
|
| 1873 |
cur = cur[key];
|
| 1874 |
}
|
|
|
|
| 1875 |
} else {
|
| 1876 |
// Simple key, even simpler rules, since only scalars and shallow
|
| 1877 |
// arrays are allowed.
|
| 1879 |
if ($.isArray(obj[key])) {
|
| 1880 |
// val is already an array, so push on the next value.
|
| 1881 |
obj[key].push(val);
|
|
|
|
| 1882 |
} else if (obj[key] !== undefined) {
|
| 1883 |
// val isn't an array, but since a second value has been specified,
|
| 1884 |
// convert val into an array.
|
| 1885 |
obj[key] = [obj[key], val];
|
|
|
|
| 1886 |
} else {
|
| 1887 |
// val is a scalar.
|
| 1888 |
obj[key] = val;
|
| 1932 |
});
|
| 1933 |
|
| 1934 |
form.parsley().on('form:submit', function (parsley) {
|
| 1935 |
+
var formData = form.mailpoetSerializeObject() || {};
|
| 1936 |
// check if we're on the same domain
|
| 1937 |
if (isSameDomain(window.MailPoetForm.ajax_url) === false) {
|
| 1938 |
// non ajax post request
|
| 1939 |
return true;
|
| 1940 |
+
}
|
| 1941 |
// ajax request
|
| 1942 |
+
MailPoet.Ajax.post({
|
| 1943 |
+
url: window.MailPoetForm.ajax_url,
|
| 1944 |
+
token: formData.token,
|
| 1945 |
+
api_version: formData.api_version,
|
| 1946 |
+
endpoint: 'subscribers',
|
| 1947 |
+
action: 'subscribe',
|
| 1948 |
+
data: formData.data
|
| 1949 |
+
}).fail(function (response) {
|
| 1950 |
+
form.find('.mailpoet_validate_error').html(
|
| 1951 |
response.errors.map(function (error) {
|
| 1952 |
return error.message;
|
| 1953 |
}).join('<br />')
|
| 1954 |
).show();
|
| 1955 |
+
}).done(function (response) {
|
| 1956 |
// successfully subscribed
|
| 1957 |
+
if (
|
| 1958 |
response.meta !== undefined
|
| 1959 |
&& response.meta.redirect_url !== undefined
|
| 1960 |
) {
|
| 1961 |
// go to page
|
| 1962 |
+
window.location.href = response.meta.redirect_url;
|
| 1963 |
+
} else {
|
| 1964 |
// display success message
|
| 1965 |
+
form.find('.mailpoet_validate_success').show();
|
| 1966 |
+
}
|
| 1967 |
|
| 1968 |
// reset form
|
| 1969 |
+
form.trigger('reset');
|
| 1970 |
// reset validation
|
| 1971 |
+
parsley.reset();
|
| 1972 |
|
| 1973 |
// resize iframe
|
| 1974 |
+
if (
|
| 1975 |
window.frameElement !== null
|
| 1976 |
&& MailPoet !== undefined
|
| 1977 |
&& MailPoet['Iframe']
|
| 1978 |
) {
|
| 1979 |
+
MailPoet.Iframe.autoSize(window.frameElement);
|
| 1980 |
+
}
|
| 1981 |
+
});
|
| 1982 |
+
|
| 1983 |
return false;
|
| 1984 |
});
|
| 1985 |
});
|
assets/js/{vendor.17b09b6c.js → vendor.3c206dd6.js}
RENAMED
|
@@ -76,7 +76,7 @@
|
|
| 76 |
/******/ script.charset = 'utf-8';
|
| 77 |
/******/ script.async = true;
|
| 78 |
|
| 79 |
-
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"
|
| 80 |
/******/ head.appendChild(script);
|
| 81 |
/******/ }
|
| 82 |
/******/ };
|
|
@@ -99,17 +99,17 @@
|
|
| 99 |
/***/ 0:
|
| 100 |
/***/ function(module, exports, __webpack_require__) {
|
| 101 |
|
| 102 |
-
__webpack_require__(
|
| 103 |
-
__webpack_require__(
|
| 104 |
module.exports = __webpack_require__(429);
|
| 105 |
|
| 106 |
|
| 107 |
/***/ },
|
| 108 |
|
| 109 |
-
/***/
|
| 110 |
/***/ function(module, exports, __webpack_require__) {
|
| 111 |
|
| 112 |
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
| 113 |
// Handlebars helpers
|
| 114 |
Handlebars.registerHelper('concat', function () {
|
| 115 |
var size = (arguments.length - 1);
|
|
@@ -128,7 +128,7 @@
|
|
| 128 |
var f;
|
| 129 |
if (window.moment) {
|
| 130 |
if (timestamp === undefined || isNaN(timestamp) || timestamp <= 0) {
|
| 131 |
-
return;
|
| 132 |
}
|
| 133 |
|
| 134 |
// set date format
|
|
@@ -136,12 +136,10 @@
|
|
| 136 |
// check if we passed a timestamp
|
| 137 |
if (parseInt(timestamp, 10) == timestamp) {
|
| 138 |
return window.moment.unix(timestamp).format(f);
|
| 139 |
-
} else {
|
| 140 |
-
return window.moment.utc(timestamp).format(f);
|
| 141 |
}
|
| 142 |
-
|
| 143 |
-
return timestamp;
|
| 144 |
}
|
|
|
|
| 145 |
});
|
| 146 |
|
| 147 |
Handlebars.registerHelper('cycle', function (value, block) {
|
|
@@ -198,9 +196,8 @@
|
|
| 198 |
var mailtoMatchingRegex = /^mailto\:/i;
|
| 199 |
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
|
| 200 |
return value.replace(mailtoMatchingRegex, '');
|
| 201 |
-
} else {
|
| 202 |
-
return value;
|
| 203 |
}
|
|
|
|
| 204 |
});
|
| 205 |
Handlebars.registerHelper('lookup', function (obj, field) {
|
| 206 |
return obj && obj[field];
|
|
@@ -245,9 +242,8 @@
|
|
| 245 |
}
|
| 246 |
if (sanitized.length > limit) {
|
| 247 |
return sanitized.substr(0, limit - strAppend.length) + strAppend;
|
| 248 |
-
} else {
|
| 249 |
-
return sanitized;
|
| 250 |
}
|
|
|
|
| 251 |
});
|
| 252 |
|
| 253 |
Handlebars.registerHelper('getNumber', function (string) {
|
|
@@ -542,14 +538,15 @@
|
|
| 542 |
|
| 543 |
/***/ },
|
| 544 |
|
| 545 |
-
/***/
|
| 546 |
/***/ function(module, exports, __webpack_require__) {
|
| 547 |
|
| 548 |
-
|
| 549 |
|
| 550 |
-
|
|
|
|
| 551 |
|
| 552 |
-
Copyright (C) 2011-
|
| 553 |
|
| 554 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 555 |
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -569,13 +566,12 @@
|
|
| 569 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 570 |
THE SOFTWARE.
|
| 571 |
|
| 572 |
-
@license
|
| 573 |
*/
|
| 574 |
(function webpackUniversalModuleDefinition(root, factory) {
|
| 575 |
if(true)
|
| 576 |
module.exports = factory();
|
| 577 |
else if(typeof define === 'function' && define.amd)
|
| 578 |
-
define(factory);
|
| 579 |
else if(typeof exports === 'object')
|
| 580 |
exports["Handlebars"] = factory();
|
| 581 |
else
|
|
@@ -625,56 +621,56 @@
|
|
| 625 |
/************************************************************************/
|
| 626 |
/******/ ([
|
| 627 |
/* 0 */
|
| 628 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 629 |
|
| 630 |
'use strict';
|
| 631 |
|
| 632 |
-
var
|
| 633 |
|
| 634 |
exports.__esModule = true;
|
| 635 |
|
| 636 |
-
var
|
| 637 |
|
| 638 |
-
var
|
| 639 |
|
| 640 |
// Compiler imports
|
| 641 |
|
| 642 |
-
var
|
| 643 |
|
| 644 |
-
var
|
| 645 |
|
| 646 |
-
var
|
| 647 |
|
| 648 |
-
var
|
| 649 |
|
| 650 |
-
var
|
| 651 |
|
| 652 |
-
var
|
| 653 |
|
| 654 |
-
var
|
| 655 |
|
| 656 |
-
var
|
| 657 |
|
| 658 |
-
var
|
| 659 |
|
| 660 |
-
var
|
| 661 |
|
| 662 |
-
var _create =
|
| 663 |
function create() {
|
| 664 |
var hb = _create();
|
| 665 |
|
| 666 |
hb.compile = function (input, options) {
|
| 667 |
-
return
|
| 668 |
};
|
| 669 |
hb.precompile = function (input, options) {
|
| 670 |
-
return
|
| 671 |
};
|
| 672 |
|
| 673 |
-
hb.AST =
|
| 674 |
-
hb.Compiler =
|
| 675 |
-
hb.JavaScriptCompiler =
|
| 676 |
-
hb.Parser =
|
| 677 |
-
hb.parse =
|
| 678 |
|
| 679 |
return hb;
|
| 680 |
}
|
|
@@ -682,59 +678,75 @@
|
|
| 682 |
var inst = create();
|
| 683 |
inst.create = create;
|
| 684 |
|
| 685 |
-
|
| 686 |
|
| 687 |
-
inst.Visitor =
|
| 688 |
|
| 689 |
inst['default'] = inst;
|
| 690 |
|
| 691 |
exports['default'] = inst;
|
| 692 |
module.exports = exports['default'];
|
| 693 |
|
| 694 |
-
/***/ },
|
| 695 |
/* 1 */
|
| 696 |
-
/***/ function(module, exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 697 |
|
| 698 |
'use strict';
|
| 699 |
|
| 700 |
-
var _interopRequireWildcard = __webpack_require__(
|
|
|
|
|
|
|
| 701 |
|
| 702 |
exports.__esModule = true;
|
| 703 |
|
| 704 |
-
var
|
| 705 |
|
| 706 |
-
var base = _interopRequireWildcard(
|
| 707 |
|
| 708 |
// Each of these augment the Handlebars object. No need to setup here.
|
| 709 |
// (This is done to easily share code between commonjs and browse envs)
|
| 710 |
|
| 711 |
-
var
|
| 712 |
|
| 713 |
-
var
|
| 714 |
|
| 715 |
-
var
|
| 716 |
|
| 717 |
-
var
|
| 718 |
|
| 719 |
-
var
|
| 720 |
|
| 721 |
-
var Utils = _interopRequireWildcard(
|
| 722 |
|
| 723 |
-
var
|
| 724 |
|
| 725 |
-
var runtime = _interopRequireWildcard(
|
| 726 |
|
| 727 |
-
var
|
| 728 |
|
| 729 |
-
var
|
| 730 |
|
| 731 |
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
| 732 |
function create() {
|
| 733 |
var hb = new base.HandlebarsEnvironment();
|
| 734 |
|
| 735 |
Utils.extend(hb, base);
|
| 736 |
-
hb.SafeString =
|
| 737 |
-
hb.Exception =
|
| 738 |
hb.Utils = Utils;
|
| 739 |
hb.escapeExpression = Utils.escapeExpression;
|
| 740 |
|
|
@@ -749,3737 +761,4462 @@
|
|
| 749 |
var inst = create();
|
| 750 |
inst.create = create;
|
| 751 |
|
| 752 |
-
|
| 753 |
|
| 754 |
inst['default'] = inst;
|
| 755 |
|
| 756 |
exports['default'] = inst;
|
| 757 |
module.exports = exports['default'];
|
| 758 |
|
| 759 |
-
/***/ },
|
| 760 |
-
/*
|
| 761 |
-
/***/ function(module, exports
|
| 762 |
|
| 763 |
-
|
| 764 |
|
| 765 |
-
exports
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
this.body = statements;
|
| 771 |
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
|
|
|
|
|
|
| 775 |
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
|
|
|
| 779 |
|
| 780 |
-
|
| 781 |
-
this.params = params || [];
|
| 782 |
-
this.hash = hash;
|
| 783 |
-
this.escaped = escaped;
|
| 784 |
|
| 785 |
-
|
| 786 |
-
|
|
|
|
| 787 |
|
| 788 |
-
|
| 789 |
-
this.loc = locInfo;
|
| 790 |
-
this.type = 'BlockStatement';
|
| 791 |
|
| 792 |
-
|
| 793 |
-
this.params = params || [];
|
| 794 |
-
this.hash = hash;
|
| 795 |
-
this.program = program;
|
| 796 |
-
this.inverse = inverse;
|
| 797 |
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
this.closeStrip = closeStrip;
|
| 801 |
-
},
|
| 802 |
|
| 803 |
-
|
| 804 |
-
this.loc = locInfo;
|
| 805 |
-
this.type = 'PartialStatement';
|
| 806 |
|
| 807 |
-
|
| 808 |
-
this.params = params || [];
|
| 809 |
-
this.hash = hash;
|
| 810 |
|
| 811 |
-
|
| 812 |
-
this.strip = strip;
|
| 813 |
-
},
|
| 814 |
|
| 815 |
-
|
| 816 |
-
this.loc = locInfo;
|
| 817 |
-
this.type = 'ContentStatement';
|
| 818 |
-
this.original = this.value = string;
|
| 819 |
-
},
|
| 820 |
|
| 821 |
-
|
| 822 |
-
this.loc = locInfo;
|
| 823 |
-
this.type = 'CommentStatement';
|
| 824 |
-
this.value = comment;
|
| 825 |
|
| 826 |
-
|
| 827 |
-
},
|
| 828 |
|
| 829 |
-
|
| 830 |
-
this.loc = locInfo;
|
| 831 |
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
this.hash = hash;
|
| 836 |
-
},
|
| 837 |
|
| 838 |
-
|
| 839 |
-
|
| 840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 841 |
|
| 842 |
-
|
| 843 |
-
|
| 844 |
-
this.parts = parts;
|
| 845 |
-
this.depth = depth;
|
| 846 |
-
},
|
| 847 |
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
},
|
| 853 |
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
this.original = this.value = Number(number);
|
| 858 |
-
},
|
| 859 |
|
| 860 |
-
|
| 861 |
-
|
| 862 |
-
this.type = 'BooleanLiteral';
|
| 863 |
-
this.original = this.value = bool === 'true';
|
| 864 |
-
},
|
| 865 |
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
this.type = 'UndefinedLiteral';
|
| 869 |
-
this.original = this.value = undefined;
|
| 870 |
-
},
|
| 871 |
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 876 |
},
|
| 877 |
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 882 |
},
|
| 883 |
-
|
| 884 |
-
this.
|
| 885 |
-
this.type = 'HashPair';
|
| 886 |
-
this.key = key;
|
| 887 |
-
this.value = value;
|
| 888 |
},
|
| 889 |
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
scopedId: function scopedId(path) {
|
| 900 |
-
return /^\.|this\b/.test(path.original);
|
| 901 |
-
},
|
| 902 |
-
|
| 903 |
-
// an ID is simple if it only has one part, and that part is not
|
| 904 |
-
// `..` or `this`.
|
| 905 |
-
simpleId: function simpleId(path) {
|
| 906 |
-
return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
| 907 |
}
|
|
|
|
|
|
|
|
|
|
| 908 |
}
|
| 909 |
};
|
| 910 |
|
| 911 |
-
|
| 912 |
-
// must modify the object to operate properly.
|
| 913 |
-
exports['default'] = AST;
|
| 914 |
-
module.exports = exports['default'];
|
| 915 |
|
| 916 |
-
|
| 917 |
-
|
| 918 |
-
|
| 919 |
|
| 920 |
-
|
|
|
|
|
|
|
| 921 |
|
| 922 |
-
|
| 923 |
|
| 924 |
exports.__esModule = true;
|
| 925 |
-
exports.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 926 |
|
| 927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 928 |
|
| 929 |
-
|
|
|
|
| 930 |
|
| 931 |
-
var
|
| 932 |
|
| 933 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 934 |
|
| 935 |
-
|
| 936 |
|
| 937 |
-
|
|
|
|
|
|
|
|
|
|
| 938 |
|
| 939 |
-
|
|
|
|
| 940 |
|
| 941 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 942 |
|
| 943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 944 |
|
| 945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 946 |
|
| 947 |
-
|
| 948 |
-
|
|
|
|
|
|
|
|
|
|
| 949 |
|
| 950 |
-
function
|
| 951 |
-
|
| 952 |
-
|
| 953 |
-
|
|
|
|
|
|
|
|
|
|
| 954 |
}
|
|
|
|
| 955 |
|
| 956 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 957 |
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
|
| 963 |
-
|
| 964 |
-
return
|
| 965 |
}
|
| 966 |
|
| 967 |
-
/***/ },
|
| 968 |
-
/*
|
| 969 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 970 |
|
| 971 |
'use strict';
|
| 972 |
|
| 973 |
-
var
|
| 974 |
|
| 975 |
exports.__esModule = true;
|
| 976 |
-
exports.Compiler = Compiler;
|
| 977 |
-
exports.precompile = precompile;
|
| 978 |
-
exports.compile = compile;
|
| 979 |
|
| 980 |
-
var
|
| 981 |
|
| 982 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 983 |
|
| 984 |
-
|
|
|
|
| 985 |
|
| 986 |
-
|
| 987 |
|
| 988 |
-
|
|
|
|
|
|
|
|
|
|
| 989 |
|
| 990 |
-
|
|
|
|
|
|
|
|
|
|
| 991 |
|
| 992 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 993 |
|
| 994 |
-
|
| 995 |
-
// function in a context. This is necessary for mustache compatibility, which
|
| 996 |
-
// requires that context functions in blocks are evaluated by blockHelperMissing,
|
| 997 |
-
// and then proceed as if the resulting value was provided to blockHelperMissing.
|
| 998 |
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
|
| 1002 |
-
|
| 1003 |
-
|
| 1004 |
-
|
| 1005 |
-
return false;
|
| 1006 |
-
}
|
| 1007 |
|
| 1008 |
-
|
| 1009 |
-
var opcode = this.opcodes[i],
|
| 1010 |
-
otherOpcode = other.opcodes[i];
|
| 1011 |
-
if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
|
| 1012 |
-
return false;
|
| 1013 |
-
}
|
| 1014 |
-
}
|
| 1015 |
-
|
| 1016 |
-
// We know that length is the same between the two arrays because they are directly tied
|
| 1017 |
-
// to the opcode behavior above.
|
| 1018 |
-
len = this.children.length;
|
| 1019 |
-
for (var i = 0; i < len; i++) {
|
| 1020 |
-
if (!this.children[i].equals(other.children[i])) {
|
| 1021 |
-
return false;
|
| 1022 |
-
}
|
| 1023 |
-
}
|
| 1024 |
-
|
| 1025 |
-
return true;
|
| 1026 |
-
},
|
| 1027 |
-
|
| 1028 |
-
guid: 0,
|
| 1029 |
-
|
| 1030 |
-
compile: function compile(program, options) {
|
| 1031 |
-
this.sourceNode = [];
|
| 1032 |
-
this.opcodes = [];
|
| 1033 |
-
this.children = [];
|
| 1034 |
-
this.options = options;
|
| 1035 |
-
this.stringParams = options.stringParams;
|
| 1036 |
-
this.trackIds = options.trackIds;
|
| 1037 |
|
| 1038 |
-
|
|
|
|
|
|
|
| 1039 |
|
| 1040 |
-
|
| 1041 |
-
|
| 1042 |
-
|
| 1043 |
-
|
| 1044 |
-
blockHelperMissing: true,
|
| 1045 |
-
each: true,
|
| 1046 |
-
'if': true,
|
| 1047 |
-
unless: true,
|
| 1048 |
-
'with': true,
|
| 1049 |
-
log: true,
|
| 1050 |
-
lookup: true
|
| 1051 |
-
};
|
| 1052 |
-
if (knownHelpers) {
|
| 1053 |
-
for (var _name in knownHelpers) {
|
| 1054 |
-
if (_name in knownHelpers) {
|
| 1055 |
-
options.knownHelpers[_name] = knownHelpers[_name];
|
| 1056 |
-
}
|
| 1057 |
-
}
|
| 1058 |
-
}
|
| 1059 |
|
| 1060 |
-
|
| 1061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1062 |
|
| 1063 |
-
|
| 1064 |
-
|
| 1065 |
-
|
| 1066 |
-
result = childCompiler.compile(program, this.options),
|
| 1067 |
-
guid = this.guid++;
|
| 1068 |
|
| 1069 |
-
|
| 1070 |
|
| 1071 |
-
|
| 1072 |
-
this.useDepths = this.useDepths || result.useDepths;
|
| 1073 |
|
| 1074 |
-
|
| 1075 |
-
|
| 1076 |
|
| 1077 |
-
|
| 1078 |
-
this.sourceNode.unshift(node);
|
| 1079 |
-
var ret = this[node.type](node);
|
| 1080 |
-
this.sourceNode.shift();
|
| 1081 |
-
return ret;
|
| 1082 |
-
},
|
| 1083 |
|
| 1084 |
-
|
| 1085 |
-
this.options.blockParams.unshift(program.blockParams);
|
| 1086 |
|
| 1087 |
-
|
| 1088 |
-
bodyLength = body.length;
|
| 1089 |
-
for (var i = 0; i < bodyLength; i++) {
|
| 1090 |
-
this.accept(body[i]);
|
| 1091 |
-
}
|
| 1092 |
|
| 1093 |
-
|
| 1094 |
|
| 1095 |
-
|
| 1096 |
-
this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
| 1097 |
|
| 1098 |
-
|
| 1099 |
-
},
|
| 1100 |
|
| 1101 |
-
|
| 1102 |
-
transformLiteralToPath(block);
|
| 1103 |
|
| 1104 |
-
|
| 1105 |
-
inverse = block.inverse;
|
| 1106 |
|
| 1107 |
-
|
| 1108 |
-
inverse = inverse && this.compileProgram(inverse);
|
| 1109 |
|
| 1110 |
-
|
| 1111 |
|
| 1112 |
-
|
| 1113 |
-
this.helperSexpr(block, program, inverse);
|
| 1114 |
-
} else if (type === 'simple') {
|
| 1115 |
-
this.simpleSexpr(block);
|
| 1116 |
|
| 1117 |
-
|
| 1118 |
-
// evaluate it by executing `blockHelperMissing`
|
| 1119 |
-
this.opcode('pushProgram', program);
|
| 1120 |
-
this.opcode('pushProgram', inverse);
|
| 1121 |
-
this.opcode('emptyHash');
|
| 1122 |
-
this.opcode('blockValue', block.path.original);
|
| 1123 |
-
} else {
|
| 1124 |
-
this.ambiguousSexpr(block, program, inverse);
|
| 1125 |
|
| 1126 |
-
|
| 1127 |
-
// evaluate it by executing `blockHelperMissing`
|
| 1128 |
-
this.opcode('pushProgram', program);
|
| 1129 |
-
this.opcode('pushProgram', inverse);
|
| 1130 |
-
this.opcode('emptyHash');
|
| 1131 |
-
this.opcode('ambiguousBlockValue');
|
| 1132 |
-
}
|
| 1133 |
|
| 1134 |
-
|
| 1135 |
-
},
|
| 1136 |
|
| 1137 |
-
|
| 1138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1139 |
|
| 1140 |
-
|
| 1141 |
-
|
| 1142 |
-
|
| 1143 |
-
} else if (!params.length) {
|
| 1144 |
-
params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
| 1145 |
-
}
|
| 1146 |
|
| 1147 |
-
|
| 1148 |
-
isDynamic = partial.name.type === 'SubExpression';
|
| 1149 |
-
if (isDynamic) {
|
| 1150 |
-
this.accept(partial.name);
|
| 1151 |
-
}
|
| 1152 |
|
| 1153 |
-
|
| 1154 |
|
| 1155 |
-
|
| 1156 |
-
if (this.options.preventIndent && indent) {
|
| 1157 |
-
this.opcode('appendContent', indent);
|
| 1158 |
-
indent = '';
|
| 1159 |
-
}
|
| 1160 |
|
| 1161 |
-
|
| 1162 |
-
|
| 1163 |
-
|
|
|
|
| 1164 |
|
| 1165 |
-
|
| 1166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1167 |
|
| 1168 |
-
|
| 1169 |
-
|
|
|
|
|
|
|
| 1170 |
} else {
|
| 1171 |
-
|
| 1172 |
-
|
| 1173 |
-
|
|
|
|
|
|
|
| 1174 |
|
| 1175 |
-
|
| 1176 |
-
if (content.value) {
|
| 1177 |
-
this.opcode('appendContent', content.value);
|
| 1178 |
}
|
| 1179 |
-
}
|
| 1180 |
-
|
| 1181 |
-
CommentStatement: function CommentStatement() {},
|
| 1182 |
-
|
| 1183 |
-
SubExpression: function SubExpression(sexpr) {
|
| 1184 |
-
transformLiteralToPath(sexpr);
|
| 1185 |
-
var type = this.classifySexpr(sexpr);
|
| 1186 |
|
| 1187 |
-
|
| 1188 |
-
this.simpleSexpr(sexpr);
|
| 1189 |
-
} else if (type === 'helper') {
|
| 1190 |
-
this.helperSexpr(sexpr);
|
| 1191 |
-
} else {
|
| 1192 |
-
this.ambiguousSexpr(sexpr);
|
| 1193 |
-
}
|
| 1194 |
-
},
|
| 1195 |
-
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
| 1196 |
-
var path = sexpr.path,
|
| 1197 |
-
name = path.parts[0],
|
| 1198 |
-
isBlock = program != null || inverse != null;
|
| 1199 |
|
| 1200 |
-
|
|
|
|
|
|
|
| 1201 |
|
| 1202 |
-
|
| 1203 |
-
this.opcode('pushProgram', inverse);
|
| 1204 |
|
| 1205 |
-
|
| 1206 |
|
| 1207 |
-
|
| 1208 |
-
},
|
| 1209 |
|
| 1210 |
-
|
| 1211 |
-
this.accept(sexpr.path);
|
| 1212 |
-
this.opcode('resolvePossibleLambda');
|
| 1213 |
-
},
|
| 1214 |
|
| 1215 |
-
|
| 1216 |
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
| 1217 |
-
path = sexpr.path,
|
| 1218 |
-
name = path.parts[0];
|
| 1219 |
|
| 1220 |
-
|
| 1221 |
-
this.opcode('invokeKnownHelper', params.length, name);
|
| 1222 |
-
} else if (this.options.knownHelpersOnly) {
|
| 1223 |
-
throw new _Exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
|
| 1224 |
-
} else {
|
| 1225 |
-
path.falsy = true;
|
| 1226 |
|
| 1227 |
-
|
| 1228 |
-
|
|
|
|
|
|
|
| 1229 |
}
|
| 1230 |
-
},
|
| 1231 |
|
| 1232 |
-
|
| 1233 |
-
|
| 1234 |
-
|
|
|
|
|
|
|
|
|
|
| 1235 |
|
| 1236 |
-
|
| 1237 |
-
|
| 1238 |
-
|
| 1239 |
|
| 1240 |
-
if (
|
| 1241 |
-
|
| 1242 |
-
} else if (!name) {
|
| 1243 |
-
// Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
|
| 1244 |
-
this.opcode('pushContext');
|
| 1245 |
-
} else if (path.data) {
|
| 1246 |
-
this.options.data = true;
|
| 1247 |
-
this.opcode('lookupData', path.depth, path.parts);
|
| 1248 |
-
} else {
|
| 1249 |
-
this.opcode('lookupOnContext', path.parts, path.falsy, scoped);
|
| 1250 |
}
|
| 1251 |
-
},
|
| 1252 |
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
-
|
| 1256 |
|
| 1257 |
-
|
| 1258 |
-
|
| 1259 |
-
|
|
|
|
|
|
|
|
|
|
| 1260 |
|
| 1261 |
-
|
| 1262 |
-
|
| 1263 |
-
|
|
|
|
| 1264 |
|
| 1265 |
-
|
| 1266 |
-
|
| 1267 |
-
|
|
|
|
|
|
|
| 1268 |
|
| 1269 |
-
|
| 1270 |
-
|
| 1271 |
-
|
| 1272 |
-
|
| 1273 |
-
|
| 1274 |
-
|
| 1275 |
-
|
| 1276 |
-
|
| 1277 |
-
|
| 1278 |
-
this.opcode('pushHash');
|
| 1279 |
|
| 1280 |
-
|
| 1281 |
-
|
| 1282 |
-
|
| 1283 |
-
|
| 1284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1285 |
}
|
| 1286 |
-
this.opcode('popHash');
|
| 1287 |
-
},
|
| 1288 |
-
|
| 1289 |
-
// HELPERS
|
| 1290 |
-
opcode: function opcode(name) {
|
| 1291 |
-
this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
|
| 1292 |
-
},
|
| 1293 |
|
| 1294 |
-
|
| 1295 |
-
|
| 1296 |
-
return;
|
| 1297 |
}
|
| 1298 |
|
| 1299 |
-
|
| 1300 |
-
}
|
|
|
|
| 1301 |
|
| 1302 |
-
|
| 1303 |
-
var isSimple = _AST2['default'].helpers.simpleId(sexpr.path);
|
| 1304 |
|
| 1305 |
-
|
|
|
|
|
|
|
| 1306 |
|
| 1307 |
-
|
| 1308 |
-
// * its id is simple (a single part, not `this` or `..`)
|
| 1309 |
-
var isHelper = !isBlockParam && _AST2['default'].helpers.helperExpression(sexpr);
|
| 1310 |
|
| 1311 |
-
|
| 1312 |
-
// helper, it is ambiguous, and will be resolved in a later
|
| 1313 |
-
// pass or at runtime.
|
| 1314 |
-
var isEligible = !isBlockParam && (isHelper || isSimple);
|
| 1315 |
|
| 1316 |
-
|
| 1317 |
-
// An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
|
| 1318 |
-
if (isEligible && !isHelper) {
|
| 1319 |
-
var _name2 = sexpr.path.parts[0],
|
| 1320 |
-
options = this.options;
|
| 1321 |
|
| 1322 |
-
|
| 1323 |
-
isHelper = true;
|
| 1324 |
-
} else if (options.knownHelpersOnly) {
|
| 1325 |
-
isEligible = false;
|
| 1326 |
-
}
|
| 1327 |
-
}
|
| 1328 |
|
| 1329 |
-
|
| 1330 |
-
|
| 1331 |
-
|
| 1332 |
-
|
|
|
|
|
|
|
|
|
|
| 1333 |
} else {
|
| 1334 |
-
|
|
|
|
| 1335 |
}
|
| 1336 |
-
}
|
|
|
|
| 1337 |
|
| 1338 |
-
|
| 1339 |
-
for (var i = 0, l = params.length; i < l; i++) {
|
| 1340 |
-
this.pushParam(params[i]);
|
| 1341 |
-
}
|
| 1342 |
-
},
|
| 1343 |
|
| 1344 |
-
|
| 1345 |
-
|
|
|
|
| 1346 |
|
| 1347 |
-
|
| 1348 |
-
if (value.replace) {
|
| 1349 |
-
value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
| 1350 |
-
}
|
| 1351 |
|
| 1352 |
-
|
| 1353 |
-
this.addDepth(val.depth);
|
| 1354 |
-
}
|
| 1355 |
-
this.opcode('getContext', val.depth || 0);
|
| 1356 |
-
this.opcode('pushStringParam', value, val.type);
|
| 1357 |
|
| 1358 |
-
|
| 1359 |
-
// SubExpressions get evaluated and passed in
|
| 1360 |
-
// in string params mode.
|
| 1361 |
-
this.accept(val);
|
| 1362 |
-
}
|
| 1363 |
-
} else {
|
| 1364 |
-
if (this.trackIds) {
|
| 1365 |
-
var blockParamIndex = undefined;
|
| 1366 |
-
if (val.parts && !_AST2['default'].helpers.scopedId(val) && !val.depth) {
|
| 1367 |
-
blockParamIndex = this.blockParamIndex(val.parts[0]);
|
| 1368 |
-
}
|
| 1369 |
-
if (blockParamIndex) {
|
| 1370 |
-
var blockParamChild = val.parts.slice(1).join('.');
|
| 1371 |
-
this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
| 1372 |
-
} else {
|
| 1373 |
-
value = val.original || value;
|
| 1374 |
-
if (value.replace) {
|
| 1375 |
-
value = value.replace(/^\.\//g, '').replace(/^\.$/g, '');
|
| 1376 |
-
}
|
| 1377 |
|
| 1378 |
-
|
| 1379 |
-
|
| 1380 |
-
|
| 1381 |
-
|
| 1382 |
}
|
| 1383 |
-
},
|
| 1384 |
-
|
| 1385 |
-
setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
|
| 1386 |
-
var params = sexpr.params;
|
| 1387 |
-
this.pushParams(params);
|
| 1388 |
-
|
| 1389 |
-
this.opcode('pushProgram', program);
|
| 1390 |
-
this.opcode('pushProgram', inverse);
|
| 1391 |
|
| 1392 |
-
if
|
| 1393 |
-
|
|
|
|
|
|
|
|
|
|
| 1394 |
} else {
|
| 1395 |
-
|
| 1396 |
}
|
|
|
|
| 1397 |
|
| 1398 |
-
|
| 1399 |
-
|
| 1400 |
-
|
| 1401 |
-
blockParamIndex: function blockParamIndex(name) {
|
| 1402 |
-
for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
|
| 1403 |
-
var blockParams = this.options.blockParams[depth],
|
| 1404 |
-
param = blockParams && _isArray$indexOf.indexOf(blockParams, name);
|
| 1405 |
-
if (blockParams && param >= 0) {
|
| 1406 |
-
return [depth, param];
|
| 1407 |
-
}
|
| 1408 |
-
}
|
| 1409 |
-
}
|
| 1410 |
};
|
| 1411 |
|
| 1412 |
-
|
| 1413 |
-
if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
| 1414 |
-
throw new _Exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
|
| 1415 |
-
}
|
| 1416 |
|
| 1417 |
-
|
| 1418 |
-
|
| 1419 |
-
|
| 1420 |
-
}
|
| 1421 |
-
if (options.compat) {
|
| 1422 |
-
options.useDepths = true;
|
| 1423 |
-
}
|
| 1424 |
|
| 1425 |
-
|
| 1426 |
-
environment = new env.Compiler().compile(ast, options);
|
| 1427 |
-
return new env.JavaScriptCompiler().compile(environment, options);
|
| 1428 |
-
}
|
| 1429 |
|
| 1430 |
-
|
| 1431 |
-
var options = arguments[1] === undefined ? {} : arguments[1];
|
| 1432 |
|
| 1433 |
-
|
| 1434 |
-
|
| 1435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1436 |
|
| 1437 |
-
|
| 1438 |
-
options.
|
| 1439 |
-
|
| 1440 |
-
|
| 1441 |
-
|
| 1442 |
-
|
|
|
|
| 1443 |
|
| 1444 |
-
|
|
|
|
|
|
|
| 1445 |
|
| 1446 |
-
|
| 1447 |
-
var ast = env.parse(input, options),
|
| 1448 |
-
environment = new env.Compiler().compile(ast, options),
|
| 1449 |
-
templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
| 1450 |
-
return env.template(templateSpec);
|
| 1451 |
-
}
|
| 1452 |
|
| 1453 |
-
|
| 1454 |
-
|
| 1455 |
-
|
| 1456 |
-
compiled = compileInput();
|
| 1457 |
-
}
|
| 1458 |
-
return compiled.call(this, context, execOptions);
|
| 1459 |
-
}
|
| 1460 |
-
ret._setup = function (setupOptions) {
|
| 1461 |
-
if (!compiled) {
|
| 1462 |
-
compiled = compileInput();
|
| 1463 |
-
}
|
| 1464 |
-
return compiled._setup(setupOptions);
|
| 1465 |
-
};
|
| 1466 |
-
ret._child = function (i, data, blockParams, depths) {
|
| 1467 |
-
if (!compiled) {
|
| 1468 |
-
compiled = compileInput();
|
| 1469 |
-
}
|
| 1470 |
-
return compiled._child(i, data, blockParams, depths);
|
| 1471 |
-
};
|
| 1472 |
-
return ret;
|
| 1473 |
-
}
|
| 1474 |
|
| 1475 |
-
|
| 1476 |
-
if (a === b) {
|
| 1477 |
-
return true;
|
| 1478 |
-
}
|
| 1479 |
|
| 1480 |
-
|
| 1481 |
-
for (var i = 0; i < a.length; i++) {
|
| 1482 |
-
if (!argEquals(a[i], b[i])) {
|
| 1483 |
-
return false;
|
| 1484 |
-
}
|
| 1485 |
-
}
|
| 1486 |
-
return true;
|
| 1487 |
-
}
|
| 1488 |
-
}
|
| 1489 |
|
| 1490 |
-
function
|
| 1491 |
-
|
| 1492 |
-
|
| 1493 |
-
|
| 1494 |
-
|
| 1495 |
-
sexpr.path = new _AST2['default'].PathExpression(false, 0, [literal.original + ''], literal.original + '', literal.loc);
|
| 1496 |
-
}
|
| 1497 |
-
}
|
| 1498 |
|
| 1499 |
-
|
| 1500 |
-
/* 5 */
|
| 1501 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 1502 |
|
| 1503 |
-
|
|
|
|
|
|
|
| 1504 |
|
| 1505 |
-
|
| 1506 |
|
| 1507 |
exports.__esModule = true;
|
| 1508 |
|
| 1509 |
-
var
|
| 1510 |
|
| 1511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1512 |
|
| 1513 |
-
|
| 1514 |
|
| 1515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1516 |
|
| 1517 |
-
|
| 1518 |
-
|
| 1519 |
-
|
| 1520 |
-
|
| 1521 |
-
function Literal(value) {
|
| 1522 |
-
this.value = value;
|
| 1523 |
-
}
|
| 1524 |
-
|
| 1525 |
-
function JavaScriptCompiler() {}
|
| 1526 |
-
|
| 1527 |
-
JavaScriptCompiler.prototype = {
|
| 1528 |
-
// PUBLIC API: You can override these methods in a subclass to provide
|
| 1529 |
-
// alternative compiled forms for name lookup and buffering semantics
|
| 1530 |
-
nameLookup: function nameLookup(parent, name /* , type*/) {
|
| 1531 |
-
if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
| 1532 |
-
return [parent, '.', name];
|
| 1533 |
} else {
|
| 1534 |
-
return
|
| 1535 |
}
|
| 1536 |
-
}
|
| 1537 |
-
|
| 1538 |
-
return [this.aliasable('this.lookup'), '(depths, "', name, '")'];
|
| 1539 |
-
},
|
| 1540 |
-
|
| 1541 |
-
compilerInfo: function compilerInfo() {
|
| 1542 |
-
var revision = _COMPILER_REVISION$REVISION_CHANGES.COMPILER_REVISION,
|
| 1543 |
-
versions = _COMPILER_REVISION$REVISION_CHANGES.REVISION_CHANGES[revision];
|
| 1544 |
-
return [revision, versions];
|
| 1545 |
-
},
|
| 1546 |
|
| 1547 |
-
|
| 1548 |
-
// Force a source as this simplifies the merge logic.
|
| 1549 |
-
if (!_isArray.isArray(source)) {
|
| 1550 |
-
source = [source];
|
| 1551 |
-
}
|
| 1552 |
-
source = this.source.wrap(source, location);
|
| 1553 |
|
| 1554 |
-
|
| 1555 |
-
|
| 1556 |
-
|
| 1557 |
-
// This is a case where the buffer operation occurs as a child of another
|
| 1558 |
-
// construct, generally braces. We have to explicitly output these buffer
|
| 1559 |
-
// operations to ensure that the emitted code goes in the correct location.
|
| 1560 |
-
return ['buffer += ', source, ';'];
|
| 1561 |
-
} else {
|
| 1562 |
-
source.appendToBuffer = true;
|
| 1563 |
-
return source;
|
| 1564 |
-
}
|
| 1565 |
-
},
|
| 1566 |
|
| 1567 |
-
|
| 1568 |
-
return this.quotedString('');
|
| 1569 |
-
},
|
| 1570 |
-
// END PUBLIC API
|
| 1571 |
|
| 1572 |
-
|
| 1573 |
-
this.environment = environment;
|
| 1574 |
-
this.options = options;
|
| 1575 |
-
this.stringParams = this.options.stringParams;
|
| 1576 |
-
this.trackIds = this.options.trackIds;
|
| 1577 |
-
this.precompile = !asObject;
|
| 1578 |
|
| 1579 |
-
|
| 1580 |
-
|
| 1581 |
-
this.context = context || {
|
| 1582 |
-
programs: [],
|
| 1583 |
-
environments: []
|
| 1584 |
-
};
|
| 1585 |
|
| 1586 |
-
|
| 1587 |
|
| 1588 |
-
|
| 1589 |
-
this.stackVars = [];
|
| 1590 |
-
this.aliases = {};
|
| 1591 |
-
this.registers = { list: [] };
|
| 1592 |
-
this.hashes = [];
|
| 1593 |
-
this.compileStack = [];
|
| 1594 |
-
this.inlineStack = [];
|
| 1595 |
-
this.blockParams = [];
|
| 1596 |
|
| 1597 |
-
|
|
|
|
|
|
|
| 1598 |
|
| 1599 |
-
|
| 1600 |
-
|
|
|
|
| 1601 |
|
| 1602 |
-
|
| 1603 |
-
opcode = undefined,
|
| 1604 |
-
firstLoc = undefined,
|
| 1605 |
-
i = undefined,
|
| 1606 |
-
l = undefined;
|
| 1607 |
|
| 1608 |
-
|
| 1609 |
-
opcode = opcodes[i];
|
| 1610 |
|
| 1611 |
-
|
| 1612 |
-
|
| 1613 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1614 |
}
|
| 1615 |
|
| 1616 |
-
|
| 1617 |
-
this.source.currentLocation = firstLoc;
|
| 1618 |
-
this.pushSource('');
|
| 1619 |
|
| 1620 |
-
|
| 1621 |
-
|
| 1622 |
-
|
| 1623 |
-
}
|
| 1624 |
|
| 1625 |
-
|
| 1626 |
-
if (!this.isChild) {
|
| 1627 |
-
var ret = {
|
| 1628 |
-
compiler: this.compilerInfo(),
|
| 1629 |
-
main: fn
|
| 1630 |
-
};
|
| 1631 |
-
var programs = this.context.programs;
|
| 1632 |
-
for (i = 0, l = programs.length; i < l; i++) {
|
| 1633 |
-
if (programs[i]) {
|
| 1634 |
-
ret[i] = programs[i];
|
| 1635 |
-
}
|
| 1636 |
-
}
|
| 1637 |
|
| 1638 |
-
|
| 1639 |
-
|
| 1640 |
-
|
| 1641 |
-
if (this.options.data) {
|
| 1642 |
-
ret.useData = true;
|
| 1643 |
-
}
|
| 1644 |
-
if (this.useDepths) {
|
| 1645 |
-
ret.useDepths = true;
|
| 1646 |
-
}
|
| 1647 |
-
if (this.useBlockParams) {
|
| 1648 |
-
ret.useBlockParams = true;
|
| 1649 |
-
}
|
| 1650 |
-
if (this.options.compat) {
|
| 1651 |
-
ret.compat = true;
|
| 1652 |
-
}
|
| 1653 |
|
| 1654 |
-
|
| 1655 |
-
ret.compiler = JSON.stringify(ret.compiler);
|
| 1656 |
|
| 1657 |
-
|
| 1658 |
-
ret = this.objectLiteral(ret);
|
| 1659 |
|
| 1660 |
-
|
| 1661 |
-
|
| 1662 |
-
|
| 1663 |
-
|
| 1664 |
-
|
| 1665 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1666 |
} else {
|
| 1667 |
-
|
| 1668 |
}
|
| 1669 |
-
|
| 1670 |
-
return ret;
|
| 1671 |
-
} else {
|
| 1672 |
-
return fn;
|
| 1673 |
}
|
| 1674 |
-
},
|
| 1675 |
|
| 1676 |
-
|
| 1677 |
-
// track the last context pushed into place to allow skipping the
|
| 1678 |
-
// getContext opcode when it would be a noop
|
| 1679 |
-
this.lastContext = 0;
|
| 1680 |
-
this.source = new _CodeGen2['default'](this.options.srcName);
|
| 1681 |
},
|
| 1682 |
|
| 1683 |
-
|
| 1684 |
-
|
| 1685 |
-
|
| 1686 |
-
var locals = this.stackVars.concat(this.registers.list);
|
| 1687 |
-
if (locals.length > 0) {
|
| 1688 |
-
varDeclarations += ', ' + locals.join(', ');
|
| 1689 |
-
}
|
| 1690 |
|
| 1691 |
-
|
| 1692 |
-
|
| 1693 |
-
|
| 1694 |
-
|
| 1695 |
-
|
| 1696 |
-
|
| 1697 |
-
var aliasCount = 0;
|
| 1698 |
-
for (var alias in this.aliases) {
|
| 1699 |
-
// eslint-disable-line guard-for-in
|
| 1700 |
-
var node = this.aliases[alias];
|
| 1701 |
|
| 1702 |
-
|
| 1703 |
-
|
| 1704 |
-
node.children[0] = 'alias' + aliasCount;
|
| 1705 |
}
|
|
|
|
|
|
|
| 1706 |
}
|
|
|
|
|
|
|
| 1707 |
|
| 1708 |
-
|
|
|
|
| 1709 |
|
| 1710 |
-
|
| 1711 |
-
|
| 1712 |
-
|
| 1713 |
-
if (this.useDepths) {
|
| 1714 |
-
params.push('depths');
|
| 1715 |
-
}
|
| 1716 |
|
| 1717 |
-
|
| 1718 |
-
|
| 1719 |
|
| 1720 |
-
|
| 1721 |
-
|
|
|
|
|
|
|
| 1722 |
|
| 1723 |
-
|
| 1724 |
-
|
| 1725 |
-
|
| 1726 |
-
}
|
| 1727 |
-
},
|
| 1728 |
-
mergeSource: function mergeSource(varDeclarations) {
|
| 1729 |
-
var isSimple = this.environment.isSimple,
|
| 1730 |
-
appendOnly = !this.forceBuffer,
|
| 1731 |
-
appendFirst = undefined,
|
| 1732 |
-
sourceSeen = undefined,
|
| 1733 |
-
bufferStart = undefined,
|
| 1734 |
-
bufferEnd = undefined;
|
| 1735 |
-
this.source.each(function (line) {
|
| 1736 |
-
if (line.appendToBuffer) {
|
| 1737 |
-
if (bufferStart) {
|
| 1738 |
-
line.prepend(' + ');
|
| 1739 |
-
} else {
|
| 1740 |
-
bufferStart = line;
|
| 1741 |
-
}
|
| 1742 |
-
bufferEnd = line;
|
| 1743 |
-
} else {
|
| 1744 |
-
if (bufferStart) {
|
| 1745 |
-
if (!sourceSeen) {
|
| 1746 |
-
appendFirst = true;
|
| 1747 |
-
} else {
|
| 1748 |
-
bufferStart.prepend('buffer += ');
|
| 1749 |
-
}
|
| 1750 |
-
bufferEnd.add(';');
|
| 1751 |
-
bufferStart = bufferEnd = undefined;
|
| 1752 |
-
}
|
| 1753 |
|
| 1754 |
-
|
| 1755 |
-
|
| 1756 |
-
appendOnly = false;
|
| 1757 |
-
}
|
| 1758 |
-
}
|
| 1759 |
-
});
|
| 1760 |
|
| 1761 |
-
|
| 1762 |
-
|
| 1763 |
-
|
| 1764 |
-
bufferEnd.add(';');
|
| 1765 |
-
} else if (!sourceSeen) {
|
| 1766 |
-
this.source.push('return "";');
|
| 1767 |
-
}
|
| 1768 |
-
} else {
|
| 1769 |
-
varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
| 1770 |
|
| 1771 |
-
|
| 1772 |
-
bufferStart.prepend('return buffer + ');
|
| 1773 |
-
bufferEnd.add(';');
|
| 1774 |
-
} else {
|
| 1775 |
-
this.source.push('return buffer;');
|
| 1776 |
-
}
|
| 1777 |
-
}
|
| 1778 |
|
| 1779 |
-
|
| 1780 |
-
this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
|
| 1781 |
-
}
|
| 1782 |
|
| 1783 |
-
|
| 1784 |
-
},
|
| 1785 |
|
| 1786 |
-
|
| 1787 |
-
//
|
| 1788 |
-
// On stack, before: hash, inverse, program, value
|
| 1789 |
-
// On stack, after: return value of blockHelperMissing
|
| 1790 |
-
//
|
| 1791 |
-
// The purpose of this opcode is to take a block of the form
|
| 1792 |
-
// `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
|
| 1793 |
-
// replace it on the stack with the result of properly
|
| 1794 |
-
// invoking blockHelperMissing.
|
| 1795 |
-
blockValue: function blockValue(name) {
|
| 1796 |
-
var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
| 1797 |
-
params = [this.contextName(0)];
|
| 1798 |
-
this.setupHelperArgs(name, 0, params);
|
| 1799 |
|
| 1800 |
-
|
| 1801 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1802 |
|
| 1803 |
-
|
| 1804 |
-
},
|
| 1805 |
|
| 1806 |
-
|
| 1807 |
-
//
|
| 1808 |
-
// On stack, before: hash, inverse, program, value
|
| 1809 |
-
// Compiler value, before: lastHelper=value of last found helper, if any
|
| 1810 |
-
// On stack, after, if no lastHelper: same as [blockValue]
|
| 1811 |
-
// On stack, after, if lastHelper: value
|
| 1812 |
-
ambiguousBlockValue: function ambiguousBlockValue() {
|
| 1813 |
-
// We're being a bit cheeky and reusing the options value from the prior exec
|
| 1814 |
-
var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
| 1815 |
-
params = [this.contextName(0)];
|
| 1816 |
-
this.setupHelperArgs('', 0, params, true);
|
| 1817 |
|
| 1818 |
-
|
| 1819 |
|
| 1820 |
-
|
| 1821 |
-
params.splice(1, 0, current);
|
| 1822 |
|
| 1823 |
-
|
| 1824 |
-
},
|
| 1825 |
|
| 1826 |
-
|
| 1827 |
-
|
| 1828 |
-
|
| 1829 |
-
|
| 1830 |
-
|
| 1831 |
-
|
| 1832 |
-
|
| 1833 |
-
|
| 1834 |
-
|
| 1835 |
} else {
|
| 1836 |
-
this
|
|
|
|
| 1837 |
}
|
|
|
|
|
|
|
| 1838 |
|
| 1839 |
-
|
| 1840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1841 |
|
| 1842 |
-
|
| 1843 |
-
//
|
| 1844 |
-
// On stack, before: value, ...
|
| 1845 |
-
// On stack, after: ...
|
| 1846 |
-
//
|
| 1847 |
-
// Coerces `value` to a String and appends it to the current buffer.
|
| 1848 |
-
//
|
| 1849 |
-
// If `value` is truthy, or 0, it is coerced into a string and appended
|
| 1850 |
-
// Otherwise, the empty string is appended
|
| 1851 |
-
append: function append() {
|
| 1852 |
-
if (this.isInline()) {
|
| 1853 |
-
this.replaceStack(function (current) {
|
| 1854 |
-
return [' != null ? ', current, ' : ""'];
|
| 1855 |
-
});
|
| 1856 |
|
| 1857 |
-
|
| 1858 |
-
|
| 1859 |
-
|
| 1860 |
-
|
| 1861 |
-
|
| 1862 |
-
|
|
|
|
|
|
|
|
|
|
| 1863 |
}
|
| 1864 |
}
|
| 1865 |
-
},
|
| 1866 |
-
|
| 1867 |
-
// [appendEscaped]
|
| 1868 |
-
//
|
| 1869 |
-
// On stack, before: value, ...
|
| 1870 |
-
// On stack, after: ...
|
| 1871 |
-
//
|
| 1872 |
-
// Escape `value` and append it to the buffer
|
| 1873 |
-
appendEscaped: function appendEscaped() {
|
| 1874 |
-
this.pushSource(this.appendToBuffer([this.aliasable('this.escapeExpression'), '(', this.popStack(), ')']));
|
| 1875 |
-
},
|
| 1876 |
-
|
| 1877 |
-
// [getContext]
|
| 1878 |
-
//
|
| 1879 |
-
// On stack, before: ...
|
| 1880 |
-
// On stack, after: ...
|
| 1881 |
-
// Compiler value, after: lastContext=depth
|
| 1882 |
-
//
|
| 1883 |
-
// Set the value of the `lastContext` compiler value to the depth
|
| 1884 |
-
getContext: function getContext(depth) {
|
| 1885 |
-
this.lastContext = depth;
|
| 1886 |
-
},
|
| 1887 |
|
| 1888 |
-
|
| 1889 |
-
|
| 1890 |
-
// On stack, before: ...
|
| 1891 |
-
// On stack, after: currentContext, ...
|
| 1892 |
-
//
|
| 1893 |
-
// Pushes the value of the current context onto the stack.
|
| 1894 |
-
pushContext: function pushContext() {
|
| 1895 |
-
this.pushStackLiteral(this.contextName(this.lastContext));
|
| 1896 |
-
},
|
| 1897 |
|
| 1898 |
-
|
| 1899 |
-
|
| 1900 |
-
|
| 1901 |
-
|
| 1902 |
-
|
| 1903 |
-
|
| 1904 |
-
|
| 1905 |
-
|
| 1906 |
-
|
|
|
|
|
|
|
| 1907 |
|
| 1908 |
-
|
| 1909 |
-
|
| 1910 |
-
|
| 1911 |
-
|
|
|
|
| 1912 |
} else {
|
| 1913 |
-
|
| 1914 |
}
|
|
|
|
| 1915 |
|
| 1916 |
-
|
| 1917 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1918 |
|
| 1919 |
-
|
| 1920 |
-
|
| 1921 |
-
// On stack, before: ...
|
| 1922 |
-
// On stack, after: blockParam[name], ...
|
| 1923 |
-
//
|
| 1924 |
-
// Looks up the value of `parts` on the given block param and pushes
|
| 1925 |
-
// it onto the stack.
|
| 1926 |
-
lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
|
| 1927 |
-
this.useBlockParams = true;
|
| 1928 |
|
| 1929 |
-
|
| 1930 |
-
|
| 1931 |
-
|
|
|
|
|
|
|
| 1932 |
|
| 1933 |
-
|
| 1934 |
-
|
| 1935 |
-
|
| 1936 |
-
|
| 1937 |
-
|
| 1938 |
-
|
| 1939 |
-
|
| 1940 |
-
|
| 1941 |
-
|
| 1942 |
-
|
| 1943 |
-
|
| 1944 |
-
}
|
| 1945 |
|
| 1946 |
-
|
| 1947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1948 |
|
| 1949 |
-
|
| 1950 |
-
|
|
|
|
| 1951 |
|
| 1952 |
-
|
| 1953 |
-
|
| 1954 |
-
|
| 1955 |
-
}
|
| 1956 |
|
| 1957 |
-
|
| 1958 |
-
|
| 1959 |
-
|
| 1960 |
-
this.replaceStack(function (current) {
|
| 1961 |
-
var lookup = _this.nameLookup(current, parts[i], type);
|
| 1962 |
-
// We want to ensure that zero and false are handled properly if the context (falsy flag)
|
| 1963 |
-
// needs to have the special handling for these values.
|
| 1964 |
-
if (!falsy) {
|
| 1965 |
-
return [' != null ? ', lookup, ' : ', current];
|
| 1966 |
-
} else {
|
| 1967 |
-
// Otherwise we can use generic falsy handling
|
| 1968 |
-
return [' && ', lookup];
|
| 1969 |
-
}
|
| 1970 |
-
});
|
| 1971 |
-
/*eslint-enable no-loop-func */
|
| 1972 |
-
}
|
| 1973 |
-
},
|
| 1974 |
|
| 1975 |
-
|
| 1976 |
-
|
| 1977 |
-
// On stack, before: value, ...
|
| 1978 |
-
// On stack, after: resolved value, ...
|
| 1979 |
-
//
|
| 1980 |
-
// If the `value` is a lambda, replace it on the stack by
|
| 1981 |
-
// the return value of the lambda
|
| 1982 |
-
resolvePossibleLambda: function resolvePossibleLambda() {
|
| 1983 |
-
this.push([this.aliasable('this.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
|
| 1984 |
-
},
|
| 1985 |
|
| 1986 |
-
|
| 1987 |
-
//
|
| 1988 |
-
// On stack, before: ...
|
| 1989 |
-
// On stack, after: string, currentContext, ...
|
| 1990 |
-
//
|
| 1991 |
-
// This opcode is designed for use in string mode, which
|
| 1992 |
-
// provides the string value of a parameter along with its
|
| 1993 |
-
// depth rather than resolving it immediately.
|
| 1994 |
-
pushStringParam: function pushStringParam(string, type) {
|
| 1995 |
-
this.pushContext();
|
| 1996 |
-
this.pushString(type);
|
| 1997 |
|
| 1998 |
-
|
| 1999 |
-
|
| 2000 |
-
|
| 2001 |
-
|
| 2002 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2003 |
} else {
|
| 2004 |
-
|
| 2005 |
}
|
| 2006 |
}
|
| 2007 |
-
},
|
| 2008 |
|
| 2009 |
-
|
| 2010 |
-
|
| 2011 |
-
this.push('{}'); // hashIds
|
| 2012 |
-
}
|
| 2013 |
-
if (this.stringParams) {
|
| 2014 |
-
this.push('{}'); // hashContexts
|
| 2015 |
-
this.push('{}'); // hashTypes
|
| 2016 |
}
|
| 2017 |
-
|
| 2018 |
-
|
| 2019 |
-
|
| 2020 |
-
|
| 2021 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2022 |
}
|
| 2023 |
-
|
| 2024 |
-
},
|
| 2025 |
-
popHash: function popHash() {
|
| 2026 |
-
var hash = this.hash;
|
| 2027 |
-
this.hash = this.hashes.pop();
|
| 2028 |
|
| 2029 |
-
|
| 2030 |
-
|
|
|
|
| 2031 |
}
|
| 2032 |
-
if (
|
| 2033 |
-
|
| 2034 |
-
this.push(this.objectLiteral(hash.types));
|
| 2035 |
}
|
| 2036 |
|
| 2037 |
-
|
| 2038 |
-
}
|
| 2039 |
-
|
| 2040 |
-
|
| 2041 |
-
//
|
| 2042 |
-
// On stack, before: ...
|
| 2043 |
-
// On stack, after: quotedString(string), ...
|
| 2044 |
-
//
|
| 2045 |
-
// Push a quoted version of `string` onto the stack
|
| 2046 |
-
pushString: function pushString(string) {
|
| 2047 |
-
this.pushStackLiteral(this.quotedString(string));
|
| 2048 |
-
},
|
| 2049 |
|
| 2050 |
-
|
| 2051 |
-
|
| 2052 |
-
|
| 2053 |
-
// On stack, after: value, ...
|
| 2054 |
-
//
|
| 2055 |
-
// Pushes a value onto the stack. This operation prevents
|
| 2056 |
-
// the compiler from creating a temporary variable to hold
|
| 2057 |
-
// it.
|
| 2058 |
-
pushLiteral: function pushLiteral(value) {
|
| 2059 |
-
this.pushStackLiteral(value);
|
| 2060 |
-
},
|
| 2061 |
|
| 2062 |
-
|
| 2063 |
-
|
| 2064 |
-
|
| 2065 |
-
// On stack, after: program(guid), ...
|
| 2066 |
-
//
|
| 2067 |
-
// Push a program expression onto the stack. This takes
|
| 2068 |
-
// a compile-time guid and converts it into a runtime-accessible
|
| 2069 |
-
// expression.
|
| 2070 |
-
pushProgram: function pushProgram(guid) {
|
| 2071 |
-
if (guid != null) {
|
| 2072 |
-
this.pushStackLiteral(this.programExpression(guid));
|
| 2073 |
-
} else {
|
| 2074 |
-
this.pushStackLiteral(null);
|
| 2075 |
}
|
| 2076 |
-
},
|
| 2077 |
|
| 2078 |
-
|
| 2079 |
-
|
| 2080 |
-
// On stack, before: hash, inverse, program, params..., ...
|
| 2081 |
-
// On stack, after: result of helper invocation
|
| 2082 |
-
//
|
| 2083 |
-
// Pops off the helper's parameters, invokes the helper,
|
| 2084 |
-
// and pushes the helper's return value onto the stack.
|
| 2085 |
-
//
|
| 2086 |
-
// If the helper is not found, `helperMissing` is called.
|
| 2087 |
-
invokeHelper: function invokeHelper(paramSize, name, isSimple) {
|
| 2088 |
-
var nonHelper = this.popStack(),
|
| 2089 |
-
helper = this.setupHelper(paramSize, name),
|
| 2090 |
-
simple = isSimple ? [helper.name, ' || '] : '';
|
| 2091 |
|
| 2092 |
-
|
| 2093 |
-
|
| 2094 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2095 |
}
|
| 2096 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2097 |
|
| 2098 |
-
|
| 2099 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2100 |
|
| 2101 |
-
|
| 2102 |
-
|
| 2103 |
-
|
| 2104 |
-
|
| 2105 |
-
|
| 2106 |
-
|
| 2107 |
-
|
| 2108 |
-
|
| 2109 |
-
|
| 2110 |
-
|
| 2111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2112 |
|
| 2113 |
-
|
| 2114 |
-
|
| 2115 |
-
|
| 2116 |
-
// On stack, after: result of disambiguation
|
| 2117 |
-
//
|
| 2118 |
-
// This operation is used when an expression like `{{foo}}`
|
| 2119 |
-
// is provided, but we don't know at compile-time whether it
|
| 2120 |
-
// is a helper or a path.
|
| 2121 |
-
//
|
| 2122 |
-
// This operation emits more code than the other options,
|
| 2123 |
-
// and can be avoided by passing the `knownHelpers` and
|
| 2124 |
-
// `knownHelpersOnly` flags at compile-time.
|
| 2125 |
-
invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
|
| 2126 |
-
this.useRegister('helper');
|
| 2127 |
|
| 2128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2129 |
|
| 2130 |
-
|
| 2131 |
-
|
|
|
|
| 2132 |
|
| 2133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2134 |
|
| 2135 |
-
|
| 2136 |
-
|
| 2137 |
-
|
| 2138 |
-
|
| 2139 |
-
|
|
|
|
|
|
|
|
|
|
| 2140 |
|
| 2141 |
-
|
| 2142 |
-
|
|
|
|
| 2143 |
|
| 2144 |
-
|
| 2145 |
-
//
|
| 2146 |
-
// On stack, before: context, ...
|
| 2147 |
-
// On stack after: result of partial invocation
|
| 2148 |
-
//
|
| 2149 |
-
// This operation pops off a context, invokes a partial with that context,
|
| 2150 |
-
// and pushes the result of the invocation back.
|
| 2151 |
-
invokePartial: function invokePartial(isDynamic, name, indent) {
|
| 2152 |
-
var params = [],
|
| 2153 |
-
options = this.setupParams(name, 1, params, false);
|
| 2154 |
|
| 2155 |
-
|
| 2156 |
-
|
| 2157 |
-
|
| 2158 |
-
}
|
| 2159 |
|
| 2160 |
-
|
| 2161 |
-
|
| 2162 |
-
}
|
| 2163 |
-
options.helpers = 'helpers';
|
| 2164 |
-
options.partials = 'partials';
|
| 2165 |
|
| 2166 |
-
|
| 2167 |
-
|
| 2168 |
-
|
| 2169 |
-
params.unshift(name);
|
| 2170 |
-
}
|
| 2171 |
|
| 2172 |
-
|
| 2173 |
-
|
| 2174 |
-
}
|
| 2175 |
-
options = this.objectLiteral(options);
|
| 2176 |
-
params.push(options);
|
| 2177 |
|
| 2178 |
-
|
| 2179 |
-
|
|
|
|
|
|
|
|
|
|
| 2180 |
|
| 2181 |
-
|
| 2182 |
-
|
| 2183 |
-
|
| 2184 |
-
// On stack, after: ..., hash, ...
|
| 2185 |
-
//
|
| 2186 |
-
// Pops a value off the stack and assigns it to the current hash
|
| 2187 |
-
assignToHash: function assignToHash(key) {
|
| 2188 |
-
var value = this.popStack(),
|
| 2189 |
-
context = undefined,
|
| 2190 |
-
type = undefined,
|
| 2191 |
-
id = undefined;
|
| 2192 |
|
| 2193 |
-
|
| 2194 |
-
|
| 2195 |
-
|
| 2196 |
-
if (this.stringParams) {
|
| 2197 |
-
type = this.popStack();
|
| 2198 |
-
context = this.popStack();
|
| 2199 |
-
}
|
| 2200 |
|
| 2201 |
-
|
| 2202 |
-
|
| 2203 |
-
|
| 2204 |
-
|
| 2205 |
-
|
| 2206 |
-
|
| 2207 |
-
|
| 2208 |
-
|
| 2209 |
-
|
| 2210 |
-
|
| 2211 |
-
|
| 2212 |
-
|
|
|
|
|
|
|
| 2213 |
|
| 2214 |
-
|
| 2215 |
-
|
| 2216 |
-
|
| 2217 |
-
|
| 2218 |
-
|
| 2219 |
-
|
| 2220 |
-
|
| 2221 |
-
|
| 2222 |
-
|
| 2223 |
-
|
| 2224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2225 |
|
| 2226 |
-
|
|
|
|
|
|
|
| 2227 |
|
| 2228 |
-
|
|
|
|
|
|
|
|
|
|
| 2229 |
|
| 2230 |
-
|
| 2231 |
-
|
| 2232 |
-
|
| 2233 |
-
compiler = undefined;
|
| 2234 |
|
| 2235 |
-
|
| 2236 |
-
|
| 2237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2238 |
|
| 2239 |
-
|
|
|
|
|
|
|
| 2240 |
|
| 2241 |
-
|
| 2242 |
-
|
| 2243 |
-
index = this.context.programs.length;
|
| 2244 |
-
child.index = index;
|
| 2245 |
-
child.name = 'program' + index;
|
| 2246 |
-
this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
| 2247 |
-
this.context.environments[index] = child;
|
| 2248 |
|
| 2249 |
-
|
| 2250 |
-
this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
| 2251 |
-
} else {
|
| 2252 |
-
child.index = index;
|
| 2253 |
-
child.name = 'program' + index;
|
| 2254 |
|
| 2255 |
-
|
| 2256 |
-
|
| 2257 |
-
|
| 2258 |
-
|
| 2259 |
-
|
| 2260 |
-
|
| 2261 |
-
|
| 2262 |
-
|
| 2263 |
-
if (environment && environment.equals(child)) {
|
| 2264 |
-
return i;
|
| 2265 |
-
}
|
| 2266 |
}
|
| 2267 |
-
|
|
|
|
|
|
|
| 2268 |
|
| 2269 |
-
|
| 2270 |
-
|
| 2271 |
-
programParams = [child.index, 'data', child.blockParams];
|
| 2272 |
|
| 2273 |
-
|
| 2274 |
-
|
| 2275 |
-
|
| 2276 |
-
if (this.useDepths) {
|
| 2277 |
-
programParams.push('depths');
|
| 2278 |
-
}
|
| 2279 |
|
| 2280 |
-
|
| 2281 |
-
},
|
| 2282 |
|
| 2283 |
-
|
| 2284 |
-
|
| 2285 |
-
|
| 2286 |
-
|
| 2287 |
-
|
| 2288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2289 |
|
| 2290 |
-
|
| 2291 |
-
|
| 2292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2293 |
}
|
|
|
|
|
|
|
| 2294 |
|
| 2295 |
-
|
| 2296 |
-
|
| 2297 |
-
|
|
|
|
| 2298 |
|
| 2299 |
-
|
| 2300 |
-
|
| 2301 |
-
|
| 2302 |
|
| 2303 |
-
|
| 2304 |
-
if (this.pendingContent) {
|
| 2305 |
-
this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
|
| 2306 |
-
this.pendingContent = undefined;
|
| 2307 |
-
}
|
| 2308 |
|
| 2309 |
-
|
| 2310 |
-
this.source.push(source);
|
| 2311 |
-
}
|
| 2312 |
-
},
|
| 2313 |
|
| 2314 |
-
|
| 2315 |
-
var prefix = ['('],
|
| 2316 |
-
stack = undefined,
|
| 2317 |
-
createdStack = undefined,
|
| 2318 |
-
usedLiteral = undefined;
|
| 2319 |
|
| 2320 |
-
|
| 2321 |
-
|
| 2322 |
-
throw new _Exception2['default']('replaceStack on non-inline');
|
| 2323 |
-
}
|
| 2324 |
|
| 2325 |
-
|
| 2326 |
-
var top = this.popStack(true);
|
| 2327 |
|
| 2328 |
-
|
| 2329 |
-
// Literals do not need to be inlined
|
| 2330 |
-
stack = [top.value];
|
| 2331 |
-
prefix = ['(', stack];
|
| 2332 |
-
usedLiteral = true;
|
| 2333 |
-
} else {
|
| 2334 |
-
// Get or create the current stack name for use by the inline
|
| 2335 |
-
createdStack = true;
|
| 2336 |
-
var _name = this.incrStack();
|
| 2337 |
|
| 2338 |
-
|
| 2339 |
-
stack = this.topStack();
|
| 2340 |
-
}
|
| 2341 |
|
| 2342 |
-
|
| 2343 |
|
| 2344 |
-
|
| 2345 |
-
this.popStack();
|
| 2346 |
-
}
|
| 2347 |
-
if (createdStack) {
|
| 2348 |
-
this.stackSlot--;
|
| 2349 |
-
}
|
| 2350 |
-
this.push(prefix.concat(item, ')'));
|
| 2351 |
-
},
|
| 2352 |
|
| 2353 |
-
|
| 2354 |
-
this.stackSlot++;
|
| 2355 |
-
if (this.stackSlot > this.stackVars.length) {
|
| 2356 |
-
this.stackVars.push('stack' + this.stackSlot);
|
| 2357 |
-
}
|
| 2358 |
-
return this.topStackName();
|
| 2359 |
-
},
|
| 2360 |
-
topStackName: function topStackName() {
|
| 2361 |
-
return 'stack' + this.stackSlot;
|
| 2362 |
-
},
|
| 2363 |
-
flushInline: function flushInline() {
|
| 2364 |
-
var inlineStack = this.inlineStack;
|
| 2365 |
-
this.inlineStack = [];
|
| 2366 |
-
for (var i = 0, len = inlineStack.length; i < len; i++) {
|
| 2367 |
-
var entry = inlineStack[i];
|
| 2368 |
-
/* istanbul ignore if */
|
| 2369 |
-
if (entry instanceof Literal) {
|
| 2370 |
-
this.compileStack.push(entry);
|
| 2371 |
-
} else {
|
| 2372 |
-
var stack = this.incrStack();
|
| 2373 |
-
this.pushSource([stack, ' = ', entry, ';']);
|
| 2374 |
-
this.compileStack.push(stack);
|
| 2375 |
-
}
|
| 2376 |
-
}
|
| 2377 |
-
},
|
| 2378 |
-
isInline: function isInline() {
|
| 2379 |
-
return this.inlineStack.length;
|
| 2380 |
-
},
|
| 2381 |
|
| 2382 |
-
|
| 2383 |
-
var inline = this.isInline(),
|
| 2384 |
-
item = (inline ? this.inlineStack : this.compileStack).pop();
|
| 2385 |
|
| 2386 |
-
|
| 2387 |
-
return item.value;
|
| 2388 |
-
} else {
|
| 2389 |
-
if (!inline) {
|
| 2390 |
-
/* istanbul ignore next */
|
| 2391 |
-
if (!this.stackSlot) {
|
| 2392 |
-
throw new _Exception2['default']('Invalid stack pop');
|
| 2393 |
-
}
|
| 2394 |
-
this.stackSlot--;
|
| 2395 |
-
}
|
| 2396 |
-
return item;
|
| 2397 |
-
}
|
| 2398 |
-
},
|
| 2399 |
|
| 2400 |
-
|
| 2401 |
-
|
| 2402 |
-
item = stack[stack.length - 1];
|
| 2403 |
|
| 2404 |
-
|
| 2405 |
-
|
| 2406 |
-
|
| 2407 |
-
|
| 2408 |
-
|
| 2409 |
-
}
|
| 2410 |
-
},
|
| 2411 |
|
| 2412 |
-
|
| 2413 |
-
if (this.useDepths && context) {
|
| 2414 |
-
return 'depths[' + context + ']';
|
| 2415 |
-
} else {
|
| 2416 |
-
return 'depth' + context;
|
| 2417 |
-
}
|
| 2418 |
-
},
|
| 2419 |
|
| 2420 |
-
|
| 2421 |
-
|
| 2422 |
-
|
|
|
|
| 2423 |
|
| 2424 |
-
|
| 2425 |
-
|
| 2426 |
-
|
| 2427 |
|
| 2428 |
-
|
| 2429 |
-
|
| 2430 |
-
|
| 2431 |
-
ret.referenceCount++;
|
| 2432 |
-
return ret;
|
| 2433 |
-
}
|
| 2434 |
|
| 2435 |
-
|
| 2436 |
-
|
| 2437 |
-
|
| 2438 |
-
|
| 2439 |
-
return ret;
|
| 2440 |
-
},
|
| 2441 |
-
|
| 2442 |
-
setupHelper: function setupHelper(paramSize, name, blockHelper) {
|
| 2443 |
-
var params = [],
|
| 2444 |
-
paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
| 2445 |
-
var foundHelper = this.nameLookup('helpers', name, 'helper');
|
| 2446 |
-
|
| 2447 |
-
return {
|
| 2448 |
-
params: params,
|
| 2449 |
-
paramsInit: paramsInit,
|
| 2450 |
-
name: foundHelper,
|
| 2451 |
-
callParams: [this.contextName(0)].concat(params)
|
| 2452 |
-
};
|
| 2453 |
-
},
|
| 2454 |
-
|
| 2455 |
-
setupParams: function setupParams(helper, paramSize, params) {
|
| 2456 |
-
var options = {},
|
| 2457 |
-
contexts = [],
|
| 2458 |
-
types = [],
|
| 2459 |
-
ids = [],
|
| 2460 |
-
param = undefined;
|
| 2461 |
-
|
| 2462 |
-
options.name = this.quotedString(helper);
|
| 2463 |
-
options.hash = this.popStack();
|
| 2464 |
-
|
| 2465 |
-
if (this.trackIds) {
|
| 2466 |
-
options.hashIds = this.popStack();
|
| 2467 |
-
}
|
| 2468 |
-
if (this.stringParams) {
|
| 2469 |
-
options.hashTypes = this.popStack();
|
| 2470 |
-
options.hashContexts = this.popStack();
|
| 2471 |
-
}
|
| 2472 |
-
|
| 2473 |
-
var inverse = this.popStack(),
|
| 2474 |
-
program = this.popStack();
|
| 2475 |
-
|
| 2476 |
-
// Avoid setting fn and inverse if neither are set. This allows
|
| 2477 |
-
// helpers to do a check for `if (options.fn)`
|
| 2478 |
-
if (program || inverse) {
|
| 2479 |
-
options.fn = program || 'this.noop';
|
| 2480 |
-
options.inverse = inverse || 'this.noop';
|
| 2481 |
-
}
|
| 2482 |
-
|
| 2483 |
-
// The parameters go on to the stack in order (making sure that they are evaluated in order)
|
| 2484 |
-
// so we need to pop them off the stack in reverse order
|
| 2485 |
-
var i = paramSize;
|
| 2486 |
-
while (i--) {
|
| 2487 |
-
param = this.popStack();
|
| 2488 |
-
params[i] = param;
|
| 2489 |
-
|
| 2490 |
-
if (this.trackIds) {
|
| 2491 |
-
ids[i] = this.popStack();
|
| 2492 |
-
}
|
| 2493 |
-
if (this.stringParams) {
|
| 2494 |
-
types[i] = this.popStack();
|
| 2495 |
-
contexts[i] = this.popStack();
|
| 2496 |
-
}
|
| 2497 |
-
}
|
| 2498 |
-
|
| 2499 |
-
if (this.trackIds) {
|
| 2500 |
-
options.ids = this.source.generateArray(ids);
|
| 2501 |
-
}
|
| 2502 |
-
if (this.stringParams) {
|
| 2503 |
-
options.types = this.source.generateArray(types);
|
| 2504 |
-
options.contexts = this.source.generateArray(contexts);
|
| 2505 |
-
}
|
| 2506 |
-
|
| 2507 |
-
if (this.options.data) {
|
| 2508 |
-
options.data = 'data';
|
| 2509 |
-
}
|
| 2510 |
-
if (this.useBlockParams) {
|
| 2511 |
-
options.blockParams = 'blockParams';
|
| 2512 |
-
}
|
| 2513 |
-
return options;
|
| 2514 |
-
},
|
| 2515 |
-
|
| 2516 |
-
setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
| 2517 |
-
var options = this.setupParams(helper, paramSize, params, true);
|
| 2518 |
-
options = this.objectLiteral(options);
|
| 2519 |
-
if (useRegister) {
|
| 2520 |
-
this.useRegister('options');
|
| 2521 |
-
params.push('options');
|
| 2522 |
-
return ['options=', options];
|
| 2523 |
-
} else {
|
| 2524 |
-
params.push(options);
|
| 2525 |
-
return '';
|
| 2526 |
-
}
|
| 2527 |
-
}
|
| 2528 |
-
};
|
| 2529 |
-
|
| 2530 |
-
(function () {
|
| 2531 |
-
var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
|
| 2532 |
-
|
| 2533 |
-
var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
| 2534 |
-
|
| 2535 |
-
for (var i = 0, l = reservedWords.length; i < l; i++) {
|
| 2536 |
-
compilerWords[reservedWords[i]] = true;
|
| 2537 |
-
}
|
| 2538 |
-
})();
|
| 2539 |
-
|
| 2540 |
-
JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
|
| 2541 |
-
return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
| 2542 |
-
};
|
| 2543 |
-
|
| 2544 |
-
function strictLookup(requireTerminal, compiler, parts, type) {
|
| 2545 |
-
var stack = compiler.popStack(),
|
| 2546 |
-
i = 0,
|
| 2547 |
-
len = parts.length;
|
| 2548 |
-
if (requireTerminal) {
|
| 2549 |
-
len--;
|
| 2550 |
-
}
|
| 2551 |
-
|
| 2552 |
-
for (; i < len; i++) {
|
| 2553 |
-
stack = compiler.nameLookup(stack, parts[i], type);
|
| 2554 |
-
}
|
| 2555 |
-
|
| 2556 |
-
if (requireTerminal) {
|
| 2557 |
-
return [compiler.aliasable('this.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
|
| 2558 |
-
} else {
|
| 2559 |
-
return stack;
|
| 2560 |
-
}
|
| 2561 |
-
}
|
| 2562 |
-
|
| 2563 |
-
exports['default'] = JavaScriptCompiler;
|
| 2564 |
-
module.exports = exports['default'];
|
| 2565 |
-
|
| 2566 |
-
/***/ },
|
| 2567 |
-
/* 6 */
|
| 2568 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 2569 |
-
|
| 2570 |
-
'use strict';
|
| 2571 |
-
|
| 2572 |
-
var _interopRequireWildcard = __webpack_require__(8)['default'];
|
| 2573 |
|
| 2574 |
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2575 |
|
| 2576 |
-
|
| 2577 |
-
|
| 2578 |
-
|
| 2579 |
-
|
| 2580 |
-
|
| 2581 |
-
|
| 2582 |
-
|
| 2583 |
-
|
| 2584 |
-
|
| 2585 |
-
|
| 2586 |
-
|
| 2587 |
-
|
| 2588 |
-
|
| 2589 |
-
|
| 2590 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2591 |
|
| 2592 |
-
|
| 2593 |
-
|
| 2594 |
-
|
| 2595 |
-
|
| 2596 |
-
|
| 2597 |
-
|
| 2598 |
-
|
| 2599 |
-
|
| 2600 |
-
node[name] = value;
|
| 2601 |
-
}
|
| 2602 |
-
},
|
| 2603 |
|
| 2604 |
-
|
| 2605 |
-
|
| 2606 |
-
|
| 2607 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2608 |
|
| 2609 |
-
|
| 2610 |
-
throw new _Exception2['default'](node.type + ' requires ' + name);
|
| 2611 |
-
}
|
| 2612 |
-
},
|
| 2613 |
|
| 2614 |
-
|
| 2615 |
-
|
| 2616 |
-
|
| 2617 |
-
|
| 2618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2619 |
|
| 2620 |
-
|
| 2621 |
-
|
| 2622 |
-
|
| 2623 |
-
|
| 2624 |
-
|
| 2625 |
-
|
| 2626 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2627 |
|
| 2628 |
-
|
| 2629 |
-
|
| 2630 |
-
|
| 2631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2632 |
|
| 2633 |
-
|
| 2634 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2635 |
}
|
| 2636 |
-
this.current = object;
|
| 2637 |
|
| 2638 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2639 |
|
| 2640 |
-
|
|
|
|
| 2641 |
|
| 2642 |
-
|
| 2643 |
-
|
| 2644 |
-
|
| 2645 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2646 |
}
|
|
|
|
|
|
|
| 2647 |
},
|
| 2648 |
|
| 2649 |
-
|
| 2650 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2651 |
},
|
| 2652 |
|
| 2653 |
-
|
| 2654 |
-
|
| 2655 |
-
this.
|
| 2656 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2657 |
},
|
| 2658 |
|
| 2659 |
-
|
| 2660 |
-
this.
|
| 2661 |
-
|
| 2662 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2663 |
|
| 2664 |
-
this
|
| 2665 |
-
this.acceptKey(block, 'inverse');
|
| 2666 |
},
|
| 2667 |
|
| 2668 |
-
|
| 2669 |
-
|
| 2670 |
-
|
| 2671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2672 |
},
|
| 2673 |
|
| 2674 |
-
|
| 2675 |
-
|
|
|
|
|
|
|
| 2676 |
|
| 2677 |
-
|
| 2678 |
-
this.
|
| 2679 |
-
this.acceptArray(sexpr.params);
|
| 2680 |
-
this.acceptKey(sexpr, 'hash');
|
| 2681 |
},
|
| 2682 |
|
| 2683 |
-
|
|
|
|
| 2684 |
|
| 2685 |
-
|
| 2686 |
-
|
| 2687 |
-
|
| 2688 |
-
|
| 2689 |
-
NullLiteral: function NullLiteral() {},
|
| 2690 |
|
| 2691 |
-
|
| 2692 |
-
|
| 2693 |
-
|
| 2694 |
-
|
| 2695 |
-
|
| 2696 |
-
|
| 2697 |
-
|
|
|
|
|
|
|
|
|
|
| 2698 |
|
| 2699 |
-
|
| 2700 |
-
|
| 2701 |
-
|
|
|
|
|
|
|
| 2702 |
|
| 2703 |
-
|
| 2704 |
-
/* 7 */
|
| 2705 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 2706 |
|
| 2707 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2708 |
|
| 2709 |
-
|
| 2710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2711 |
|
| 2712 |
-
|
| 2713 |
-
|
| 2714 |
-
|
| 2715 |
-
|
| 2716 |
-
|
| 2717 |
-
|
| 2718 |
-
|
| 2719 |
-
root.Handlebars = $Handlebars;
|
| 2720 |
}
|
| 2721 |
-
}
|
| 2722 |
-
|
|
|
|
|
|
|
| 2723 |
|
| 2724 |
-
|
| 2725 |
-
|
|
|
|
|
|
|
|
|
|
| 2726 |
|
| 2727 |
-
|
| 2728 |
-
/* 8 */
|
| 2729 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 2730 |
|
| 2731 |
-
|
|
|
|
|
|
|
| 2732 |
|
| 2733 |
-
|
| 2734 |
-
|
| 2735 |
-
|
| 2736 |
-
|
| 2737 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2738 |
|
| 2739 |
-
|
| 2740 |
|
| 2741 |
-
|
| 2742 |
-
|
| 2743 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 2744 |
|
| 2745 |
-
|
|
|
|
| 2746 |
|
| 2747 |
-
|
|
|
|
| 2748 |
|
| 2749 |
-
|
| 2750 |
-
|
| 2751 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2752 |
|
| 2753 |
-
|
|
|
|
|
|
|
|
|
|
| 2754 |
|
| 2755 |
-
|
|
|
|
|
|
|
| 2756 |
|
| 2757 |
-
|
|
|
|
|
|
|
| 2758 |
|
| 2759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2760 |
|
| 2761 |
-
|
| 2762 |
-
|
| 2763 |
-
|
| 2764 |
|
| 2765 |
-
|
| 2766 |
-
|
| 2767 |
-
|
| 2768 |
-
2: '== 1.0.0-rc.3',
|
| 2769 |
-
3: '== 1.0.0-rc.4',
|
| 2770 |
-
4: '== 1.x.x',
|
| 2771 |
-
5: '== 2.0.0-alpha.x',
|
| 2772 |
-
6: '>= 2.0.0-beta.1'
|
| 2773 |
-
};
|
| 2774 |
|
| 2775 |
-
|
| 2776 |
-
|
| 2777 |
-
|
| 2778 |
-
toString = Utils.toString,
|
| 2779 |
-
objectType = '[object Object]';
|
| 2780 |
|
| 2781 |
-
|
| 2782 |
-
|
| 2783 |
-
|
| 2784 |
|
| 2785 |
-
|
| 2786 |
-
|
|
|
|
| 2787 |
|
| 2788 |
-
|
| 2789 |
-
|
|
|
|
|
|
|
| 2790 |
|
| 2791 |
-
|
| 2792 |
-
log: log,
|
| 2793 |
|
| 2794 |
-
|
| 2795 |
-
|
| 2796 |
-
if (fn) {
|
| 2797 |
-
throw new _Exception2['default']('Arg not supported with multiple helpers');
|
| 2798 |
-
}
|
| 2799 |
-
Utils.extend(this.helpers, name);
|
| 2800 |
-
} else {
|
| 2801 |
-
this.helpers[name] = fn;
|
| 2802 |
}
|
| 2803 |
-
|
| 2804 |
-
|
| 2805 |
-
|
|
|
|
| 2806 |
},
|
| 2807 |
|
| 2808 |
-
|
| 2809 |
-
|
| 2810 |
-
|
| 2811 |
-
} else {
|
| 2812 |
-
if (typeof partial === 'undefined') {
|
| 2813 |
-
throw new _Exception2['default']('Attempting to register a partial as undefined');
|
| 2814 |
-
}
|
| 2815 |
-
this.partials[name] = partial;
|
| 2816 |
-
}
|
| 2817 |
},
|
| 2818 |
-
unregisterPartial: function unregisterPartial(name) {
|
| 2819 |
-
delete this.partials[name];
|
| 2820 |
-
}
|
| 2821 |
-
};
|
| 2822 |
|
| 2823 |
-
|
| 2824 |
-
|
| 2825 |
-
|
| 2826 |
-
// A missing field in a {{foo}} constuct.
|
| 2827 |
-
return undefined;
|
| 2828 |
-
} else {
|
| 2829 |
-
// Someone is actually trying to call something, blow up.
|
| 2830 |
-
throw new _Exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
| 2831 |
}
|
| 2832 |
-
});
|
| 2833 |
|
| 2834 |
-
|
| 2835 |
-
|
| 2836 |
-
fn = options.fn;
|
| 2837 |
|
| 2838 |
-
|
| 2839 |
-
|
| 2840 |
-
} else if (context === false || context == null) {
|
| 2841 |
-
return inverse(this);
|
| 2842 |
-
} else if (isArray(context)) {
|
| 2843 |
-
if (context.length > 0) {
|
| 2844 |
-
if (options.ids) {
|
| 2845 |
-
options.ids = [options.name];
|
| 2846 |
-
}
|
| 2847 |
|
| 2848 |
-
|
| 2849 |
-
} else {
|
| 2850 |
-
return inverse(this);
|
| 2851 |
-
}
|
| 2852 |
-
} else {
|
| 2853 |
-
if (options.data && options.ids) {
|
| 2854 |
-
var data = createFrame(options.data);
|
| 2855 |
-
data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name);
|
| 2856 |
-
options = { data: data };
|
| 2857 |
-
}
|
| 2858 |
|
| 2859 |
-
|
| 2860 |
-
|
| 2861 |
-
|
| 2862 |
|
| 2863 |
-
|
| 2864 |
-
|
| 2865 |
-
|
| 2866 |
-
|
| 2867 |
|
| 2868 |
-
|
| 2869 |
-
|
| 2870 |
-
|
| 2871 |
-
|
| 2872 |
-
|
| 2873 |
-
contextPath = undefined;
|
| 2874 |
|
| 2875 |
-
|
| 2876 |
-
|
|
|
|
|
|
|
|
|
|
| 2877 |
}
|
| 2878 |
|
| 2879 |
-
if (
|
| 2880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2881 |
}
|
|
|
|
| 2882 |
|
| 2883 |
-
|
| 2884 |
-
|
|
|
|
| 2885 |
}
|
|
|
|
| 2886 |
|
| 2887 |
-
|
| 2888 |
-
|
| 2889 |
-
data.key = field;
|
| 2890 |
-
data.index = index;
|
| 2891 |
-
data.first = index === 0;
|
| 2892 |
-
data.last = !!last;
|
| 2893 |
|
| 2894 |
-
|
| 2895 |
-
|
| 2896 |
-
|
| 2897 |
}
|
| 2898 |
|
| 2899 |
-
|
| 2900 |
-
|
| 2901 |
-
|
| 2902 |
-
|
| 2903 |
-
|
| 2904 |
|
| 2905 |
-
|
| 2906 |
-
|
| 2907 |
-
|
| 2908 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2909 |
}
|
| 2910 |
-
|
| 2911 |
-
|
| 2912 |
-
|
| 2913 |
-
|
| 2914 |
-
|
| 2915 |
-
|
| 2916 |
-
|
| 2917 |
-
// an itermediate keys array.
|
| 2918 |
-
if (priorKey) {
|
| 2919 |
-
execIteration(priorKey, i - 1);
|
| 2920 |
-
}
|
| 2921 |
-
priorKey = key;
|
| 2922 |
-
i++;
|
| 2923 |
}
|
| 2924 |
-
|
| 2925 |
-
|
| 2926 |
-
execIteration(priorKey, i - 1, true);
|
| 2927 |
}
|
| 2928 |
}
|
|
|
|
| 2929 |
}
|
|
|
|
| 2930 |
|
| 2931 |
-
|
| 2932 |
-
|
| 2933 |
-
|
| 2934 |
-
|
| 2935 |
-
return ret;
|
| 2936 |
-
});
|
| 2937 |
|
| 2938 |
-
|
| 2939 |
-
|
| 2940 |
-
conditional = conditional.call(this);
|
| 2941 |
-
}
|
| 2942 |
|
| 2943 |
-
|
| 2944 |
-
|
| 2945 |
-
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
| 2946 |
-
if (!options.hash.includeZero && !conditional || Utils.isEmpty(conditional)) {
|
| 2947 |
-
return options.inverse(this);
|
| 2948 |
} else {
|
| 2949 |
-
|
| 2950 |
-
}
|
| 2951 |
-
});
|
| 2952 |
-
|
| 2953 |
-
instance.registerHelper('unless', function (conditional, options) {
|
| 2954 |
-
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
| 2955 |
-
});
|
| 2956 |
-
|
| 2957 |
-
instance.registerHelper('with', function (context, options) {
|
| 2958 |
-
if (isFunction(context)) {
|
| 2959 |
-
context = context.call(this);
|
| 2960 |
}
|
| 2961 |
|
| 2962 |
-
|
|
|
|
| 2963 |
|
| 2964 |
-
|
| 2965 |
-
|
| 2966 |
-
|
| 2967 |
-
|
| 2968 |
-
|
|
|
|
| 2969 |
}
|
| 2970 |
-
|
| 2971 |
-
return fn(context, options);
|
| 2972 |
-
} else {
|
| 2973 |
-
return options.inverse(this);
|
| 2974 |
}
|
| 2975 |
-
}
|
|
|
|
| 2976 |
|
| 2977 |
-
|
| 2978 |
-
|
| 2979 |
-
|
| 2980 |
-
}
|
| 2981 |
|
| 2982 |
-
|
| 2983 |
-
|
| 2984 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2985 |
}
|
| 2986 |
|
| 2987 |
-
|
| 2988 |
-
|
| 2989 |
|
| 2990 |
-
|
| 2991 |
-
|
| 2992 |
-
|
| 2993 |
-
WARN: 2,
|
| 2994 |
-
ERROR: 3,
|
| 2995 |
-
level: 1,
|
| 2996 |
|
| 2997 |
-
|
| 2998 |
-
|
| 2999 |
-
|
| 3000 |
-
|
| 3001 |
-
|
| 3002 |
-
|
| 3003 |
}
|
| 3004 |
-
};
|
| 3005 |
|
| 3006 |
-
|
| 3007 |
-
var log = logger.log;
|
| 3008 |
|
| 3009 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3010 |
|
| 3011 |
-
|
| 3012 |
-
|
| 3013 |
-
|
| 3014 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3015 |
}
|
| 3016 |
|
| 3017 |
-
|
| 3018 |
-
|
| 3019 |
-
|
| 3020 |
-
|
| 3021 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 3022 |
-
|
| 3023 |
-
'use strict';
|
| 3024 |
|
| 3025 |
-
|
| 3026 |
-
|
| 3027 |
-
|
| 3028 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3029 |
}
|
| 3030 |
|
| 3031 |
-
|
| 3032 |
-
|
| 3033 |
-
|
| 3034 |
-
|
| 3035 |
-
|
| 3036 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3037 |
|
| 3038 |
-
/***/ },
|
| 3039 |
-
/*
|
| 3040 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 3041 |
|
| 3042 |
'use strict';
|
| 3043 |
|
|
|
|
|
|
|
| 3044 |
exports.__esModule = true;
|
| 3045 |
|
| 3046 |
-
var
|
| 3047 |
|
| 3048 |
-
|
| 3049 |
-
var loc = node && node.loc,
|
| 3050 |
-
line = undefined,
|
| 3051 |
-
column = undefined;
|
| 3052 |
-
if (loc) {
|
| 3053 |
-
line = loc.start.line;
|
| 3054 |
-
column = loc.start.column;
|
| 3055 |
|
| 3056 |
-
|
| 3057 |
-
}
|
| 3058 |
|
| 3059 |
-
|
| 3060 |
|
| 3061 |
-
|
| 3062 |
-
for (var idx = 0; idx < errorProps.length; idx++) {
|
| 3063 |
-
this[errorProps[idx]] = tmp[errorProps[idx]];
|
| 3064 |
-
}
|
| 3065 |
|
| 3066 |
-
|
| 3067 |
-
Error.captureStackTrace(this, Exception);
|
| 3068 |
-
}
|
| 3069 |
|
| 3070 |
-
|
| 3071 |
-
|
| 3072 |
-
this.column = column;
|
| 3073 |
-
}
|
| 3074 |
}
|
| 3075 |
|
| 3076 |
-
|
| 3077 |
-
|
| 3078 |
-
exports['default'] = Exception;
|
| 3079 |
-
module.exports = exports['default'];
|
| 3080 |
-
|
| 3081 |
-
/***/ },
|
| 3082 |
-
/* 12 */
|
| 3083 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 3084 |
-
|
| 3085 |
-
'use strict';
|
| 3086 |
-
|
| 3087 |
-
exports.__esModule = true;
|
| 3088 |
-
exports.extend = extend;
|
| 3089 |
-
|
| 3090 |
-
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
| 3091 |
-
exports.indexOf = indexOf;
|
| 3092 |
-
exports.escapeExpression = escapeExpression;
|
| 3093 |
-
exports.isEmpty = isEmpty;
|
| 3094 |
-
exports.blockParams = blockParams;
|
| 3095 |
-
exports.appendContextPath = appendContextPath;
|
| 3096 |
-
var escape = {
|
| 3097 |
-
'&': '&',
|
| 3098 |
-
'<': '<',
|
| 3099 |
-
'>': '>',
|
| 3100 |
-
'"': '"',
|
| 3101 |
-
'\'': ''',
|
| 3102 |
-
'`': '`'
|
| 3103 |
-
};
|
| 3104 |
|
| 3105 |
-
|
| 3106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3107 |
|
| 3108 |
-
|
| 3109 |
-
|
| 3110 |
-
|
|
|
|
|
|
|
| 3111 |
|
| 3112 |
-
|
| 3113 |
-
|
| 3114 |
-
|
| 3115 |
-
|
| 3116 |
-
obj[key] = arguments[i][key];
|
| 3117 |
-
}
|
| 3118 |
}
|
| 3119 |
-
|
| 3120 |
|
| 3121 |
-
|
| 3122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3123 |
|
| 3124 |
-
|
|
|
|
|
|
|
|
|
|
| 3125 |
|
| 3126 |
-
|
| 3127 |
-
|
| 3128 |
-
|
| 3129 |
-
|
| 3130 |
-
|
| 3131 |
-
|
| 3132 |
-
};
|
| 3133 |
-
// fallback for older versions of Chrome and Safari
|
| 3134 |
-
/* istanbul ignore next */
|
| 3135 |
-
if (isFunction(/x/)) {
|
| 3136 |
-
exports.isFunction = isFunction = function (value) {
|
| 3137 |
-
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
| 3138 |
-
};
|
| 3139 |
-
}
|
| 3140 |
-
var isFunction;
|
| 3141 |
-
exports.isFunction = isFunction;
|
| 3142 |
-
/*eslint-enable func-style, no-var */
|
| 3143 |
|
| 3144 |
-
|
| 3145 |
-
|
| 3146 |
-
|
| 3147 |
-
|
|
|
|
|
|
|
|
|
|
| 3148 |
|
| 3149 |
-
|
| 3150 |
-
for (var i = 0, len = array.length; i < len; i++) {
|
| 3151 |
-
if (array[i] === value) {
|
| 3152 |
-
return i;
|
| 3153 |
-
}
|
| 3154 |
-
}
|
| 3155 |
-
return -1;
|
| 3156 |
-
}
|
| 3157 |
|
| 3158 |
-
|
| 3159 |
-
|
| 3160 |
-
|
| 3161 |
-
|
| 3162 |
-
|
| 3163 |
-
|
| 3164 |
-
|
| 3165 |
-
|
| 3166 |
-
return string + '';
|
| 3167 |
-
}
|
| 3168 |
|
| 3169 |
-
|
| 3170 |
-
// the regex test will do this transparently behind the scenes, causing issues if
|
| 3171 |
-
// an object's to string has escaped characters in it.
|
| 3172 |
-
string = '' + string;
|
| 3173 |
-
}
|
| 3174 |
|
| 3175 |
-
|
| 3176 |
-
|
| 3177 |
-
}
|
| 3178 |
-
return string.replace(badChars, escapeChar);
|
| 3179 |
-
}
|
| 3180 |
|
| 3181 |
-
|
| 3182 |
-
|
| 3183 |
-
|
| 3184 |
-
|
| 3185 |
-
|
| 3186 |
-
} else {
|
| 3187 |
-
return false;
|
| 3188 |
-
}
|
| 3189 |
-
}
|
| 3190 |
|
| 3191 |
-
|
| 3192 |
-
|
| 3193 |
-
return params;
|
| 3194 |
-
}
|
| 3195 |
|
| 3196 |
-
|
| 3197 |
-
|
| 3198 |
-
|
|
|
|
| 3199 |
|
| 3200 |
-
|
| 3201 |
-
|
| 3202 |
-
|
| 3203 |
|
| 3204 |
-
|
|
|
|
|
|
|
|
|
|
| 3205 |
|
| 3206 |
-
|
|
|
|
| 3207 |
|
| 3208 |
-
|
| 3209 |
-
|
| 3210 |
|
| 3211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3212 |
|
| 3213 |
-
|
| 3214 |
-
|
| 3215 |
-
|
| 3216 |
-
|
| 3217 |
-
|
|
|
|
| 3218 |
|
| 3219 |
-
|
|
|
|
|
|
|
|
|
|
| 3220 |
|
| 3221 |
-
|
|
|
|
|
|
|
| 3222 |
|
| 3223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3224 |
|
| 3225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3226 |
|
| 3227 |
-
|
|
|
|
| 3228 |
|
| 3229 |
-
|
| 3230 |
-
|
| 3231 |
-
currentRevision = _COMPILER_REVISION$REVISION_CHANGES$createFrame.COMPILER_REVISION;
|
| 3232 |
|
| 3233 |
-
|
| 3234 |
-
|
| 3235 |
-
|
| 3236 |
-
|
| 3237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3238 |
} else {
|
| 3239 |
-
|
| 3240 |
-
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] + ').');
|
| 3241 |
}
|
| 3242 |
-
}
|
| 3243 |
-
}
|
| 3244 |
|
| 3245 |
-
|
| 3246 |
-
|
| 3247 |
-
|
| 3248 |
-
|
| 3249 |
-
|
| 3250 |
-
|
| 3251 |
-
|
| 3252 |
-
}
|
| 3253 |
|
| 3254 |
-
|
| 3255 |
-
|
| 3256 |
-
env.VM.checkRevision(templateSpec.compiler);
|
| 3257 |
|
| 3258 |
-
|
| 3259 |
-
if (
|
| 3260 |
-
|
| 3261 |
}
|
| 3262 |
|
| 3263 |
-
|
| 3264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3265 |
|
| 3266 |
-
|
| 3267 |
-
|
| 3268 |
-
|
|
|
|
| 3269 |
}
|
| 3270 |
-
if (result != null) {
|
| 3271 |
-
if (options.indent) {
|
| 3272 |
-
var lines = result.split('\n');
|
| 3273 |
-
for (var i = 0, l = lines.length; i < l; i++) {
|
| 3274 |
-
if (!lines[i] && i + 1 === l) {
|
| 3275 |
-
break;
|
| 3276 |
-
}
|
| 3277 |
|
| 3278 |
-
|
| 3279 |
-
|
| 3280 |
-
|
| 3281 |
-
|
| 3282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3283 |
} else {
|
| 3284 |
-
|
| 3285 |
}
|
| 3286 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3287 |
|
| 3288 |
-
|
| 3289 |
-
|
| 3290 |
-
|
| 3291 |
-
if (!(name in obj)) {
|
| 3292 |
-
throw new _Exception2['default']('"' + name + '" not defined in ' + obj);
|
| 3293 |
-
}
|
| 3294 |
-
return obj[name];
|
| 3295 |
-
},
|
| 3296 |
-
lookup: function lookup(depths, name) {
|
| 3297 |
-
var len = depths.length;
|
| 3298 |
-
for (var i = 0; i < len; i++) {
|
| 3299 |
-
if (depths[i] && depths[i][name] != null) {
|
| 3300 |
-
return depths[i][name];
|
| 3301 |
}
|
| 3302 |
}
|
| 3303 |
-
}
|
| 3304 |
-
lambda: function lambda(current, context) {
|
| 3305 |
-
return typeof current === 'function' ? current.call(context) : current;
|
| 3306 |
-
},
|
| 3307 |
-
|
| 3308 |
-
escapeExpression: Utils.escapeExpression,
|
| 3309 |
-
invokePartial: invokePartialWrapper,
|
| 3310 |
-
|
| 3311 |
-
fn: function fn(i) {
|
| 3312 |
-
return templateSpec[i];
|
| 3313 |
-
},
|
| 3314 |
|
| 3315 |
-
|
| 3316 |
-
|
| 3317 |
-
|
| 3318 |
-
|
| 3319 |
-
if (
|
| 3320 |
-
|
| 3321 |
-
} else if (!programWrapper) {
|
| 3322 |
-
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
| 3323 |
}
|
| 3324 |
-
|
| 3325 |
-
|
| 3326 |
|
| 3327 |
-
|
| 3328 |
-
|
| 3329 |
-
|
|
|
|
|
|
|
| 3330 |
}
|
| 3331 |
-
|
| 3332 |
-
|
| 3333 |
-
|
| 3334 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3335 |
|
| 3336 |
-
|
| 3337 |
-
|
| 3338 |
-
}
|
| 3339 |
|
| 3340 |
-
|
| 3341 |
-
|
| 3342 |
|
| 3343 |
-
|
| 3344 |
-
|
| 3345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3346 |
|
| 3347 |
-
|
| 3348 |
-
var options = arguments[1] === undefined ? {} : arguments[1];
|
| 3349 |
|
| 3350 |
-
var
|
|
|
|
| 3351 |
|
| 3352 |
-
|
| 3353 |
-
|
| 3354 |
-
|
| 3355 |
-
|
| 3356 |
-
|
| 3357 |
-
|
| 3358 |
-
|
| 3359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3360 |
}
|
| 3361 |
|
| 3362 |
-
|
| 3363 |
-
}
|
| 3364 |
-
ret.isTop = true;
|
| 3365 |
|
| 3366 |
-
|
| 3367 |
-
|
| 3368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3369 |
|
| 3370 |
-
|
| 3371 |
-
container.partials = container.merge(options.partials, env.partials);
|
| 3372 |
-
}
|
| 3373 |
} else {
|
| 3374 |
-
|
| 3375 |
-
|
| 3376 |
-
|
| 3377 |
-
|
| 3378 |
-
|
| 3379 |
-
ret._child = function (i, data, blockParams, depths) {
|
| 3380 |
-
if (templateSpec.useBlockParams && !blockParams) {
|
| 3381 |
-
throw new _Exception2['default']('must pass block params');
|
| 3382 |
-
}
|
| 3383 |
-
if (templateSpec.useDepths && !depths) {
|
| 3384 |
-
throw new _Exception2['default']('must pass parent depths');
|
| 3385 |
}
|
|
|
|
| 3386 |
|
| 3387 |
-
|
| 3388 |
-
|
| 3389 |
-
|
| 3390 |
-
|
| 3391 |
-
|
| 3392 |
-
|
| 3393 |
-
function
|
| 3394 |
-
|
|
|
|
| 3395 |
|
| 3396 |
-
|
| 3397 |
-
|
| 3398 |
-
|
| 3399 |
-
|
| 3400 |
-
|
| 3401 |
-
|
| 3402 |
-
|
|
|
|
|
|
|
|
|
|
| 3403 |
|
| 3404 |
-
|
| 3405 |
-
|
| 3406 |
-
|
| 3407 |
-
|
| 3408 |
-
|
| 3409 |
-
|
| 3410 |
-
|
| 3411 |
-
|
| 3412 |
-
|
| 3413 |
-
}
|
| 3414 |
|
| 3415 |
-
|
| 3416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3417 |
|
| 3418 |
-
|
| 3419 |
-
|
| 3420 |
-
|
| 3421 |
-
|
| 3422 |
-
|
| 3423 |
-
|
|
|
|
| 3424 |
|
| 3425 |
-
|
| 3426 |
-
|
| 3427 |
-
}
|
| 3428 |
|
| 3429 |
-
|
| 3430 |
-
|
| 3431 |
-
|
| 3432 |
-
|
| 3433 |
-
|
| 3434 |
-
|
| 3435 |
-
|
|
|
|
|
|
|
| 3436 |
|
| 3437 |
-
|
| 3438 |
-
|
| 3439 |
-
|
| 3440 |
|
| 3441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3442 |
|
| 3443 |
-
|
| 3444 |
-
|
| 3445 |
-
/* Jison generated parser */
|
| 3446 |
-
var handlebars = (function () {
|
| 3447 |
-
var parser = { trace: function trace() {},
|
| 3448 |
-
yy: {},
|
| 3449 |
-
symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, content: 12, COMMENT: 13, CONTENT: 14, openRawBlock: 15, END_RAW_BLOCK: 16, OPEN_RAW_BLOCK: 17, helperName: 18, openRawBlock_repetition0: 19, openRawBlock_option0: 20, CLOSE_RAW_BLOCK: 21, openBlock: 22, block_option0: 23, closeBlock: 24, openInverse: 25, block_option1: 26, OPEN_BLOCK: 27, openBlock_repetition0: 28, openBlock_option0: 29, openBlock_option1: 30, CLOSE: 31, OPEN_INVERSE: 32, openInverse_repetition0: 33, openInverse_option0: 34, openInverse_option1: 35, openInverseChain: 36, OPEN_INVERSE_CHAIN: 37, openInverseChain_repetition0: 38, openInverseChain_option0: 39, openInverseChain_option1: 40, inverseAndProgram: 41, INVERSE: 42, inverseChain: 43, inverseChain_option0: 44, OPEN_ENDBLOCK: 45, OPEN: 46, mustache_repetition0: 47, mustache_option0: 48, OPEN_UNESCAPED: 49, mustache_repetition1: 50, mustache_option1: 51, CLOSE_UNESCAPED: 52, OPEN_PARTIAL: 53, partialName: 54, partial_repetition0: 55, partial_option0: 56, param: 57, sexpr: 58, OPEN_SEXPR: 59, sexpr_repetition0: 60, sexpr_option0: 61, CLOSE_SEXPR: 62, hash: 63, hash_repetition_plus0: 64, hashSegment: 65, ID: 66, EQUALS: 67, blockParams: 68, OPEN_BLOCK_PARAMS: 69, blockParams_repetition_plus0: 70, CLOSE_BLOCK_PARAMS: 71, path: 72, dataName: 73, STRING: 74, NUMBER: 75, BOOLEAN: 76, UNDEFINED: 77, NULL: 78, DATA: 79, pathSegments: 80, SEP: 81, $accept: 0, $end: 1 },
|
| 3450 |
-
terminals_: { 2: "error", 5: "EOF", 13: "COMMENT", 14: "CONTENT", 16: "END_RAW_BLOCK", 17: "OPEN_RAW_BLOCK", 21: "CLOSE_RAW_BLOCK", 27: "OPEN_BLOCK", 31: "CLOSE", 32: "OPEN_INVERSE", 37: "OPEN_INVERSE_CHAIN", 42: "INVERSE", 45: "OPEN_ENDBLOCK", 46: "OPEN", 49: "OPEN_UNESCAPED", 52: "CLOSE_UNESCAPED", 53: "OPEN_PARTIAL", 59: "OPEN_SEXPR", 62: "CLOSE_SEXPR", 66: "ID", 67: "EQUALS", 69: "OPEN_BLOCK_PARAMS", 71: "CLOSE_BLOCK_PARAMS", 74: "STRING", 75: "NUMBER", 76: "BOOLEAN", 77: "UNDEFINED", 78: "NULL", 79: "DATA", 81: "SEP" },
|
| 3451 |
-
productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [12, 1], [10, 3], [15, 5], [9, 4], [9, 4], [22, 6], [25, 6], [36, 6], [41, 2], [43, 3], [43, 1], [24, 3], [8, 5], [8, 5], [11, 5], [57, 1], [57, 1], [58, 5], [63, 1], [65, 3], [68, 3], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [54, 1], [54, 1], [73, 2], [72, 1], [80, 3], [80, 1], [6, 0], [6, 2], [19, 0], [19, 2], [20, 0], [20, 1], [23, 0], [23, 1], [26, 0], [26, 1], [28, 0], [28, 2], [29, 0], [29, 1], [30, 0], [30, 1], [33, 0], [33, 2], [34, 0], [34, 1], [35, 0], [35, 1], [38, 0], [38, 2], [39, 0], [39, 1], [40, 0], [40, 1], [44, 0], [44, 1], [47, 0], [47, 2], [48, 0], [48, 1], [50, 0], [50, 2], [51, 0], [51, 1], [55, 0], [55, 2], [56, 0], [56, 1], [60, 0], [60, 2], [61, 0], [61, 1], [64, 1], [64, 2], [70, 1], [70, 2]],
|
| 3452 |
-
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
| 3453 |
|
| 3454 |
-
|
| 3455 |
-
|
| 3456 |
-
case 1:
|
| 3457 |
-
return $$[$0 - 1];
|
| 3458 |
-
break;
|
| 3459 |
-
case 2:
|
| 3460 |
-
this.$ = new yy.Program($$[$0], null, {}, yy.locInfo(this._$));
|
| 3461 |
-
break;
|
| 3462 |
-
case 3:
|
| 3463 |
-
this.$ = $$[$0];
|
| 3464 |
-
break;
|
| 3465 |
-
case 4:
|
| 3466 |
-
this.$ = $$[$0];
|
| 3467 |
-
break;
|
| 3468 |
-
case 5:
|
| 3469 |
-
this.$ = $$[$0];
|
| 3470 |
-
break;
|
| 3471 |
-
case 6:
|
| 3472 |
-
this.$ = $$[$0];
|
| 3473 |
-
break;
|
| 3474 |
-
case 7:
|
| 3475 |
-
this.$ = $$[$0];
|
| 3476 |
-
break;
|
| 3477 |
-
case 8:
|
| 3478 |
-
this.$ = new yy.CommentStatement(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), yy.locInfo(this._$));
|
| 3479 |
-
break;
|
| 3480 |
-
case 9:
|
| 3481 |
-
this.$ = new yy.ContentStatement($$[$0], yy.locInfo(this._$));
|
| 3482 |
-
break;
|
| 3483 |
-
case 10:
|
| 3484 |
-
this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
| 3485 |
-
break;
|
| 3486 |
-
case 11:
|
| 3487 |
-
this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
|
| 3488 |
-
break;
|
| 3489 |
-
case 12:
|
| 3490 |
-
this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
|
| 3491 |
-
break;
|
| 3492 |
-
case 13:
|
| 3493 |
-
this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
|
| 3494 |
-
break;
|
| 3495 |
-
case 14:
|
| 3496 |
-
this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 3497 |
-
break;
|
| 3498 |
-
case 15:
|
| 3499 |
-
this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 3500 |
-
break;
|
| 3501 |
-
case 16:
|
| 3502 |
-
this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 3503 |
-
break;
|
| 3504 |
-
case 17:
|
| 3505 |
-
this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
|
| 3506 |
-
break;
|
| 3507 |
-
case 18:
|
| 3508 |
-
var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
|
| 3509 |
-
program = new yy.Program([inverse], null, {}, yy.locInfo(this._$));
|
| 3510 |
-
program.chained = true;
|
| 3511 |
|
| 3512 |
-
|
| 3513 |
|
| 3514 |
-
|
| 3515 |
-
|
| 3516 |
-
|
| 3517 |
-
|
| 3518 |
-
|
| 3519 |
-
|
| 3520 |
-
|
| 3521 |
-
|
| 3522 |
-
|
| 3523 |
-
|
| 3524 |
-
|
| 3525 |
-
|
| 3526 |
-
|
| 3527 |
-
|
| 3528 |
-
|
| 3529 |
-
|
| 3530 |
-
|
| 3531 |
-
this.$ = $$[$0];
|
| 3532 |
-
break;
|
| 3533 |
-
case 25:
|
| 3534 |
-
this.$ = $$[$0];
|
| 3535 |
-
break;
|
| 3536 |
-
case 26:
|
| 3537 |
-
this.$ = new yy.SubExpression($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.locInfo(this._$));
|
| 3538 |
-
break;
|
| 3539 |
-
case 27:
|
| 3540 |
-
this.$ = new yy.Hash($$[$0], yy.locInfo(this._$));
|
| 3541 |
-
break;
|
| 3542 |
-
case 28:
|
| 3543 |
-
this.$ = new yy.HashPair(yy.id($$[$0 - 2]), $$[$0], yy.locInfo(this._$));
|
| 3544 |
-
break;
|
| 3545 |
-
case 29:
|
| 3546 |
-
this.$ = yy.id($$[$0 - 1]);
|
| 3547 |
-
break;
|
| 3548 |
-
case 30:
|
| 3549 |
-
this.$ = $$[$0];
|
| 3550 |
-
break;
|
| 3551 |
-
case 31:
|
| 3552 |
-
this.$ = $$[$0];
|
| 3553 |
-
break;
|
| 3554 |
-
case 32:
|
| 3555 |
-
this.$ = new yy.StringLiteral($$[$0], yy.locInfo(this._$));
|
| 3556 |
-
break;
|
| 3557 |
-
case 33:
|
| 3558 |
-
this.$ = new yy.NumberLiteral($$[$0], yy.locInfo(this._$));
|
| 3559 |
-
break;
|
| 3560 |
-
case 34:
|
| 3561 |
-
this.$ = new yy.BooleanLiteral($$[$0], yy.locInfo(this._$));
|
| 3562 |
-
break;
|
| 3563 |
-
case 35:
|
| 3564 |
-
this.$ = new yy.UndefinedLiteral(yy.locInfo(this._$));
|
| 3565 |
-
break;
|
| 3566 |
-
case 36:
|
| 3567 |
-
this.$ = new yy.NullLiteral(yy.locInfo(this._$));
|
| 3568 |
-
break;
|
| 3569 |
-
case 37:
|
| 3570 |
-
this.$ = $$[$0];
|
| 3571 |
-
break;
|
| 3572 |
-
case 38:
|
| 3573 |
-
this.$ = $$[$0];
|
| 3574 |
-
break;
|
| 3575 |
-
case 39:
|
| 3576 |
-
this.$ = yy.preparePath(true, $$[$0], this._$);
|
| 3577 |
-
break;
|
| 3578 |
-
case 40:
|
| 3579 |
-
this.$ = yy.preparePath(false, $$[$0], this._$);
|
| 3580 |
-
break;
|
| 3581 |
-
case 41:
|
| 3582 |
-
$$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
|
| 3583 |
-
break;
|
| 3584 |
-
case 42:
|
| 3585 |
-
this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
|
| 3586 |
-
break;
|
| 3587 |
-
case 43:
|
| 3588 |
-
this.$ = [];
|
| 3589 |
-
break;
|
| 3590 |
-
case 44:
|
| 3591 |
-
$$[$0 - 1].push($$[$0]);
|
| 3592 |
-
break;
|
| 3593 |
-
case 45:
|
| 3594 |
-
this.$ = [];
|
| 3595 |
-
break;
|
| 3596 |
-
case 46:
|
| 3597 |
-
$$[$0 - 1].push($$[$0]);
|
| 3598 |
-
break;
|
| 3599 |
-
case 53:
|
| 3600 |
-
this.$ = [];
|
| 3601 |
-
break;
|
| 3602 |
-
case 54:
|
| 3603 |
-
$$[$0 - 1].push($$[$0]);
|
| 3604 |
-
break;
|
| 3605 |
-
case 59:
|
| 3606 |
-
this.$ = [];
|
| 3607 |
-
break;
|
| 3608 |
-
case 60:
|
| 3609 |
-
$$[$0 - 1].push($$[$0]);
|
| 3610 |
-
break;
|
| 3611 |
-
case 65:
|
| 3612 |
-
this.$ = [];
|
| 3613 |
-
break;
|
| 3614 |
-
case 66:
|
| 3615 |
-
$$[$0 - 1].push($$[$0]);
|
| 3616 |
-
break;
|
| 3617 |
-
case 73:
|
| 3618 |
-
this.$ = [];
|
| 3619 |
-
break;
|
| 3620 |
-
case 74:
|
| 3621 |
-
$$[$0 - 1].push($$[$0]);
|
| 3622 |
-
break;
|
| 3623 |
-
case 77:
|
| 3624 |
-
this.$ = [];
|
| 3625 |
-
break;
|
| 3626 |
-
case 78:
|
| 3627 |
-
$$[$0 - 1].push($$[$0]);
|
| 3628 |
-
break;
|
| 3629 |
-
case 81:
|
| 3630 |
-
this.$ = [];
|
| 3631 |
-
break;
|
| 3632 |
-
case 82:
|
| 3633 |
-
$$[$0 - 1].push($$[$0]);
|
| 3634 |
-
break;
|
| 3635 |
-
case 85:
|
| 3636 |
-
this.$ = [];
|
| 3637 |
-
break;
|
| 3638 |
-
case 86:
|
| 3639 |
-
$$[$0 - 1].push($$[$0]);
|
| 3640 |
-
break;
|
| 3641 |
-
case 89:
|
| 3642 |
-
this.$ = [$$[$0]];
|
| 3643 |
-
break;
|
| 3644 |
-
case 90:
|
| 3645 |
-
$$[$0 - 1].push($$[$0]);
|
| 3646 |
-
break;
|
| 3647 |
-
case 91:
|
| 3648 |
-
this.$ = [$$[$0]];
|
| 3649 |
-
break;
|
| 3650 |
-
case 92:
|
| 3651 |
-
$$[$0 - 1].push($$[$0]);
|
| 3652 |
-
break;
|
| 3653 |
-
}
|
| 3654 |
-
},
|
| 3655 |
-
table: [{ 3: 1, 4: 2, 5: [2, 43], 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: [1, 11], 14: [1, 18], 15: 16, 17: [1, 21], 22: 14, 25: 15, 27: [1, 19], 32: [1, 20], 37: [2, 2], 42: [2, 2], 45: [2, 2], 46: [1, 12], 49: [1, 13], 53: [1, 17] }, { 1: [2, 1] }, { 5: [2, 44], 13: [2, 44], 14: [2, 44], 17: [2, 44], 27: [2, 44], 32: [2, 44], 37: [2, 44], 42: [2, 44], 45: [2, 44], 46: [2, 44], 49: [2, 44], 53: [2, 44] }, { 5: [2, 3], 13: [2, 3], 14: [2, 3], 17: [2, 3], 27: [2, 3], 32: [2, 3], 37: [2, 3], 42: [2, 3], 45: [2, 3], 46: [2, 3], 49: [2, 3], 53: [2, 3] }, { 5: [2, 4], 13: [2, 4], 14: [2, 4], 17: [2, 4], 27: [2, 4], 32: [2, 4], 37: [2, 4], 42: [2, 4], 45: [2, 4], 46: [2, 4], 49: [2, 4], 53: [2, 4] }, { 5: [2, 5], 13: [2, 5], 14: [2, 5], 17: [2, 5], 27: [2, 5], 32: [2, 5], 37: [2, 5], 42: [2, 5], 45: [2, 5], 46: [2, 5], 49: [2, 5], 53: [2, 5] }, { 5: [2, 6], 13: [2, 6], 14: [2, 6], 17: [2, 6], 27: [2, 6], 32: [2, 6], 37: [2, 6], 42: [2, 6], 45: [2, 6], 46: [2, 6], 49: [2, 6], 53: [2, 6] }, { 5: [2, 7], 13: [2, 7], 14: [2, 7], 17: [2, 7], 27: [2, 7], 32: [2, 7], 37: [2, 7], 42: [2, 7], 45: [2, 7], 46: [2, 7], 49: [2, 7], 53: [2, 7] }, { 5: [2, 8], 13: [2, 8], 14: [2, 8], 17: [2, 8], 27: [2, 8], 32: [2, 8], 37: [2, 8], 42: [2, 8], 45: [2, 8], 46: [2, 8], 49: [2, 8], 53: [2, 8] }, { 18: 22, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 33, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 34, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 4: 35, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 12: 36, 14: [1, 18] }, { 18: 38, 54: 37, 58: 39, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 9], 13: [2, 9], 14: [2, 9], 16: [2, 9], 17: [2, 9], 27: [2, 9], 32: [2, 9], 37: [2, 9], 42: [2, 9], 45: [2, 9], 46: [2, 9], 49: [2, 9], 53: [2, 9] }, { 18: 41, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 42, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 43, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [2, 73], 47: 44, 59: [2, 73], 66: [2, 73], 74: [2, 73], 75: [2, 73], 76: [2, 73], 77: [2, 73], 78: [2, 73], 79: [2, 73] }, { 21: [2, 30], 31: [2, 30], 52: [2, 30], 59: [2, 30], 62: [2, 30], 66: [2, 30], 69: [2, 30], 74: [2, 30], 75: [2, 30], 76: [2, 30], 77: [2, 30], 78: [2, 30], 79: [2, 30] }, { 21: [2, 31], 31: [2, 31], 52: [2, 31], 59: [2, 31], 62: [2, 31], 66: [2, 31], 69: [2, 31], 74: [2, 31], 75: [2, 31], 76: [2, 31], 77: [2, 31], 78: [2, 31], 79: [2, 31] }, { 21: [2, 32], 31: [2, 32], 52: [2, 32], 59: [2, 32], 62: [2, 32], 66: [2, 32], 69: [2, 32], 74: [2, 32], 75: [2, 32], 76: [2, 32], 77: [2, 32], 78: [2, 32], 79: [2, 32] }, { 21: [2, 33], 31: [2, 33], 52: [2, 33], 59: [2, 33], 62: [2, 33], 66: [2, 33], 69: [2, 33], 74: [2, 33], 75: [2, 33], 76: [2, 33], 77: [2, 33], 78: [2, 33], 79: [2, 33] }, { 21: [2, 34], 31: [2, 34], 52: [2, 34], 59: [2, 34], 62: [2, 34], 66: [2, 34], 69: [2, 34], 74: [2, 34], 75: [2, 34], 76: [2, 34], 77: [2, 34], 78: [2, 34], 79: [2, 34] }, { 21: [2, 35], 31: [2, 35], 52: [2, 35], 59: [2, 35], 62: [2, 35], 66: [2, 35], 69: [2, 35], 74: [2, 35], 75: [2, 35], 76: [2, 35], 77: [2, 35], 78: [2, 35], 79: [2, 35] }, { 21: [2, 36], 31: [2, 36], 52: [2, 36], 59: [2, 36], 62: [2, 36], 66: [2, 36], 69: [2, 36], 74: [2, 36], 75: [2, 36], 76: [2, 36], 77: [2, 36], 78: [2, 36], 79: [2, 36] }, { 21: [2, 40], 31: [2, 40], 52: [2, 40], 59: [2, 40], 62: [2, 40], 66: [2, 40], 69: [2, 40], 74: [2, 40], 75: [2, 40], 76: [2, 40], 77: [2, 40], 78: [2, 40], 79: [2, 40], 81: [1, 45] }, { 66: [1, 32], 80: 46 }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 50: 47, 52: [2, 77], 59: [2, 77], 66: [2, 77], 74: [2, 77], 75: [2, 77], 76: [2, 77], 77: [2, 77], 78: [2, 77], 79: [2, 77] }, { 23: 48, 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 49, 45: [2, 49] }, { 26: 54, 41: 55, 42: [1, 53], 45: [2, 51] }, { 16: [1, 56] }, { 31: [2, 81], 55: 57, 59: [2, 81], 66: [2, 81], 74: [2, 81], 75: [2, 81], 76: [2, 81], 77: [2, 81], 78: [2, 81], 79: [2, 81] }, { 31: [2, 37], 59: [2, 37], 66: [2, 37], 74: [2, 37], 75: [2, 37], 76: [2, 37], 77: [2, 37], 78: [2, 37], 79: [2, 37] }, { 31: [2, 38], 59: [2, 38], 66: [2, 38], 74: [2, 38], 75: [2, 38], 76: [2, 38], 77: [2, 38], 78: [2, 38], 79: [2, 38] }, { 18: 58, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 28: 59, 31: [2, 53], 59: [2, 53], 66: [2, 53], 69: [2, 53], 74: [2, 53], 75: [2, 53], 76: [2, 53], 77: [2, 53], 78: [2, 53], 79: [2, 53] }, { 31: [2, 59], 33: 60, 59: [2, 59], 66: [2, 59], 69: [2, 59], 74: [2, 59], 75: [2, 59], 76: [2, 59], 77: [2, 59], 78: [2, 59], 79: [2, 59] }, { 19: 61, 21: [2, 45], 59: [2, 45], 66: [2, 45], 74: [2, 45], 75: [2, 45], 76: [2, 45], 77: [2, 45], 78: [2, 45], 79: [2, 45] }, { 18: 65, 31: [2, 75], 48: 62, 57: 63, 58: 66, 59: [1, 40], 63: 64, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 66: [1, 70] }, { 21: [2, 39], 31: [2, 39], 52: [2, 39], 59: [2, 39], 62: [2, 39], 66: [2, 39], 69: [2, 39], 74: [2, 39], 75: [2, 39], 76: [2, 39], 77: [2, 39], 78: [2, 39], 79: [2, 39], 81: [1, 45] }, { 18: 65, 51: 71, 52: [2, 79], 57: 72, 58: 66, 59: [1, 40], 63: 73, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 24: 74, 45: [1, 75] }, { 45: [2, 50] }, { 4: 76, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 45: [2, 19] }, { 18: 77, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 78, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 24: 79, 45: [1, 75] }, { 45: [2, 52] }, { 5: [2, 10], 13: [2, 10], 14: [2, 10], 17: [2, 10], 27: [2, 10], 32: [2, 10], 37: [2, 10], 42: [2, 10], 45: [2, 10], 46: [2, 10], 49: [2, 10], 53: [2, 10] }, { 18: 65, 31: [2, 83], 56: 80, 57: 81, 58: 66, 59: [1, 40], 63: 82, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 59: [2, 85], 60: 83, 62: [2, 85], 66: [2, 85], 74: [2, 85], 75: [2, 85], 76: [2, 85], 77: [2, 85], 78: [2, 85], 79: [2, 85] }, { 18: 65, 29: 84, 31: [2, 55], 57: 85, 58: 66, 59: [1, 40], 63: 86, 64: 67, 65: 68, 66: [1, 69], 69: [2, 55], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 31: [2, 61], 34: 87, 57: 88, 58: 66, 59: [1, 40], 63: 89, 64: 67, 65: 68, 66: [1, 69], 69: [2, 61], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 20: 90, 21: [2, 47], 57: 91, 58: 66, 59: [1, 40], 63: 92, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [1, 93] }, { 31: [2, 74], 59: [2, 74], 66: [2, 74], 74: [2, 74], 75: [2, 74], 76: [2, 74], 77: [2, 74], 78: [2, 74], 79: [2, 74] }, { 31: [2, 76] }, { 21: [2, 24], 31: [2, 24], 52: [2, 24], 59: [2, 24], 62: [2, 24], 66: [2, 24], 69: [2, 24], 74: [2, 24], 75: [2, 24], 76: [2, 24], 77: [2, 24], 78: [2, 24], 79: [2, 24] }, { 21: [2, 25], 31: [2, 25], 52: [2, 25], 59: [2, 25], 62: [2, 25], 66: [2, 25], 69: [2, 25], 74: [2, 25], 75: [2, 25], 76: [2, 25], 77: [2, 25], 78: [2, 25], 79: [2, 25] }, { 21: [2, 27], 31: [2, 27], 52: [2, 27], 62: [2, 27], 65: 94, 66: [1, 95], 69: [2, 27] }, { 21: [2, 89], 31: [2, 89], 52: [2, 89], 62: [2, 89], 66: [2, 89], 69: [2, 89] }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 67: [1, 96], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 21: [2, 41], 31: [2, 41], 52: [2, 41], 59: [2, 41], 62: [2, 41], 66: [2, 41], 69: [2, 41], 74: [2, 41], 75: [2, 41], 76: [2, 41], 77: [2, 41], 78: [2, 41], 79: [2, 41], 81: [2, 41] }, { 52: [1, 97] }, { 52: [2, 78], 59: [2, 78], 66: [2, 78], 74: [2, 78], 75: [2, 78], 76: [2, 78], 77: [2, 78], 78: [2, 78], 79: [2, 78] }, { 52: [2, 80] }, { 5: [2, 12], 13: [2, 12], 14: [2, 12], 17: [2, 12], 27: [2, 12], 32: [2, 12], 37: [2, 12], 42: [2, 12], 45: [2, 12], 46: [2, 12], 49: [2, 12], 53: [2, 12] }, { 18: 98, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 100, 44: 99, 45: [2, 71] }, { 31: [2, 65], 38: 101, 59: [2, 65], 66: [2, 65], 69: [2, 65], 74: [2, 65], 75: [2, 65], 76: [2, 65], 77: [2, 65], 78: [2, 65], 79: [2, 65] }, { 45: [2, 17] }, { 5: [2, 13], 13: [2, 13], 14: [2, 13], 17: [2, 13], 27: [2, 13], 32: [2, 13], 37: [2, 13], 42: [2, 13], 45: [2, 13], 46: [2, 13], 49: [2, 13], 53: [2, 13] }, { 31: [1, 102] }, { 31: [2, 82], 59: [2, 82], 66: [2, 82], 74: [2, 82], 75: [2, 82], 76: [2, 82], 77: [2, 82], 78: [2, 82], 79: [2, 82] }, { 31: [2, 84] }, { 18: 65, 57: 104, 58: 66, 59: [1, 40], 61: 103, 62: [2, 87], 63: 105, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 30: 106, 31: [2, 57], 68: 107, 69: [1, 108] }, { 31: [2, 54], 59: [2, 54], 66: [2, 54], 69: [2, 54], 74: [2, 54], 75: [2, 54], 76: [2, 54], 77: [2, 54], 78: [2, 54], 79: [2, 54] }, { 31: [2, 56], 69: [2, 56] }, { 31: [2, 63], 35: 109, 68: 110, 69: [1, 108] }, { 31: [2, 60], 59: [2, 60], 66: [2, 60], 69: [2, 60], 74: [2, 60], 75: [2, 60], 76: [2, 60], 77: [2, 60], 78: [2, 60], 79: [2, 60] }, { 31: [2, 62], 69: [2, 62] }, { 21: [1, 111] }, { 21: [2, 46], 59: [2, 46], 66: [2, 46], 74: [2, 46], 75: [2, 46], 76: [2, 46], 77: [2, 46], 78: [2, 46], 79: [2, 46] }, { 21: [2, 48] }, { 5: [2, 21], 13: [2, 21], 14: [2, 21], 17: [2, 21], 27: [2, 21], 32: [2, 21], 37: [2, 21], 42: [2, 21], 45: [2, 21], 46: [2, 21], 49: [2, 21], 53: [2, 21] }, { 21: [2, 90], 31: [2, 90], 52: [2, 90], 62: [2, 90], 66: [2, 90], 69: [2, 90] }, { 67: [1, 96] }, { 18: 65, 57: 112, 58: 66, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 22], 13: [2, 22], 14: [2, 22], 17: [2, 22], 27: [2, 22], 32: [2, 22], 37: [2, 22], 42: [2, 22], 45: [2, 22], 46: [2, 22], 49: [2, 22], 53: [2, 22] }, { 31: [1, 113] }, { 45: [2, 18] }, { 45: [2, 72] }, { 18: 65, 31: [2, 67], 39: 114, 57: 115, 58: 66, 59: [1, 40], 63: 116, 64: 67, 65: 68, 66: [1, 69], 69: [2, 67], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 23], 13: [2, 23], 14: [2, 23], 17: [2, 23], 27: [2, 23], 32: [2, 23], 37: [2, 23], 42: [2, 23], 45: [2, 23], 46: [2, 23], 49: [2, 23], 53: [2, 23] }, { 62: [1, 117] }, { 59: [2, 86], 62: [2, 86], 66: [2, 86], 74: [2, 86], 75: [2, 86], 76: [2, 86], 77: [2, 86], 78: [2, 86], 79: [2, 86] }, { 62: [2, 88] }, { 31: [1, 118] }, { 31: [2, 58] }, { 66: [1, 120], 70: 119 }, { 31: [1, 121] }, { 31: [2, 64] }, { 14: [2, 11] }, { 21: [2, 28], 31: [2, 28], 52: [2, 28], 62: [2, 28], 66: [2, 28], 69: [2, 28] }, { 5: [2, 20], 13: [2, 20], 14: [2, 20], 17: [2, 20], 27: [2, 20], 32: [2, 20], 37: [2, 20], 42: [2, 20], 45: [2, 20], 46: [2, 20], 49: [2, 20], 53: [2, 20] }, { 31: [2, 69], 40: 122, 68: 123, 69: [1, 108] }, { 31: [2, 66], 59: [2, 66], 66: [2, 66], 69: [2, 66], 74: [2, 66], 75: [2, 66], 76: [2, 66], 77: [2, 66], 78: [2, 66], 79: [2, 66] }, { 31: [2, 68], 69: [2, 68] }, { 21: [2, 26], 31: [2, 26], 52: [2, 26], 59: [2, 26], 62: [2, 26], 66: [2, 26], 69: [2, 26], 74: [2, 26], 75: [2, 26], 76: [2, 26], 77: [2, 26], 78: [2, 26], 79: [2, 26] }, { 13: [2, 14], 14: [2, 14], 17: [2, 14], 27: [2, 14], 32: [2, 14], 37: [2, 14], 42: [2, 14], 45: [2, 14], 46: [2, 14], 49: [2, 14], 53: [2, 14] }, { 66: [1, 125], 71: [1, 124] }, { 66: [2, 91], 71: [2, 91] }, { 13: [2, 15], 14: [2, 15], 17: [2, 15], 27: [2, 15], 32: [2, 15], 42: [2, 15], 45: [2, 15], 46: [2, 15], 49: [2, 15], 53: [2, 15] }, { 31: [1, 126] }, { 31: [2, 70] }, { 31: [2, 29] }, { 66: [2, 92], 71: [2, 92] }, { 13: [2, 16], 14: [2, 16], 17: [2, 16], 27: [2, 16], 32: [2, 16], 37: [2, 16], 42: [2, 16], 45: [2, 16], 46: [2, 16], 49: [2, 16], 53: [2, 16] }],
|
| 3656 |
-
defaultActions: { 4: [2, 1], 49: [2, 50], 51: [2, 19], 55: [2, 52], 64: [2, 76], 73: [2, 80], 78: [2, 17], 82: [2, 84], 92: [2, 48], 99: [2, 18], 100: [2, 72], 105: [2, 88], 107: [2, 58], 110: [2, 64], 111: [2, 11], 123: [2, 70], 124: [2, 29] },
|
| 3657 |
-
parseError: function parseError(str, hash) {
|
| 3658 |
-
throw new Error(str);
|
| 3659 |
-
},
|
| 3660 |
-
parse: function parse(input) {
|
| 3661 |
-
var self = this,
|
| 3662 |
-
stack = [0],
|
| 3663 |
-
vstack = [null],
|
| 3664 |
-
lstack = [],
|
| 3665 |
-
table = this.table,
|
| 3666 |
-
yytext = "",
|
| 3667 |
-
yylineno = 0,
|
| 3668 |
-
yyleng = 0,
|
| 3669 |
-
recovering = 0,
|
| 3670 |
-
TERROR = 2,
|
| 3671 |
-
EOF = 1;
|
| 3672 |
-
this.lexer.setInput(input);
|
| 3673 |
-
this.lexer.yy = this.yy;
|
| 3674 |
-
this.yy.lexer = this.lexer;
|
| 3675 |
-
this.yy.parser = this;
|
| 3676 |
-
if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
|
| 3677 |
-
var yyloc = this.lexer.yylloc;
|
| 3678 |
-
lstack.push(yyloc);
|
| 3679 |
-
var ranges = this.lexer.options && this.lexer.options.ranges;
|
| 3680 |
-
if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
|
| 3681 |
-
function popStack(n) {
|
| 3682 |
-
stack.length = stack.length - 2 * n;
|
| 3683 |
-
vstack.length = vstack.length - n;
|
| 3684 |
-
lstack.length = lstack.length - n;
|
| 3685 |
-
}
|
| 3686 |
-
function lex() {
|
| 3687 |
-
var token;
|
| 3688 |
-
token = self.lexer.lex() || 1;
|
| 3689 |
-
if (typeof token !== "number") {
|
| 3690 |
-
token = self.symbols_[token] || token;
|
| 3691 |
-
}
|
| 3692 |
-
return token;
|
| 3693 |
-
}
|
| 3694 |
-
var symbol,
|
| 3695 |
-
preErrorSymbol,
|
| 3696 |
-
state,
|
| 3697 |
-
action,
|
| 3698 |
-
a,
|
| 3699 |
-
r,
|
| 3700 |
-
yyval = {},
|
| 3701 |
-
p,
|
| 3702 |
-
len,
|
| 3703 |
-
newState,
|
| 3704 |
-
expected;
|
| 3705 |
-
while (true) {
|
| 3706 |
-
state = stack[stack.length - 1];
|
| 3707 |
-
if (this.defaultActions[state]) {
|
| 3708 |
-
action = this.defaultActions[state];
|
| 3709 |
-
} else {
|
| 3710 |
-
if (symbol === null || typeof symbol == "undefined") {
|
| 3711 |
-
symbol = lex();
|
| 3712 |
-
}
|
| 3713 |
-
action = table[state] && table[state][symbol];
|
| 3714 |
-
}
|
| 3715 |
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
| 3716 |
-
var errStr = "";
|
| 3717 |
-
if (!recovering) {
|
| 3718 |
-
expected = [];
|
| 3719 |
-
for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
| 3720 |
-
expected.push("'" + this.terminals_[p] + "'");
|
| 3721 |
-
}
|
| 3722 |
-
if (this.lexer.showPosition) {
|
| 3723 |
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
| 3724 |
-
} else {
|
| 3725 |
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
| 3726 |
-
}
|
| 3727 |
-
this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
|
| 3728 |
-
}
|
| 3729 |
-
}
|
| 3730 |
-
if (action[0] instanceof Array && action.length > 1) {
|
| 3731 |
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
| 3732 |
-
}
|
| 3733 |
-
switch (action[0]) {
|
| 3734 |
-
case 1:
|
| 3735 |
-
stack.push(symbol);
|
| 3736 |
-
vstack.push(this.lexer.yytext);
|
| 3737 |
-
lstack.push(this.lexer.yylloc);
|
| 3738 |
-
stack.push(action[1]);
|
| 3739 |
-
symbol = null;
|
| 3740 |
-
if (!preErrorSymbol) {
|
| 3741 |
-
yyleng = this.lexer.yyleng;
|
| 3742 |
-
yytext = this.lexer.yytext;
|
| 3743 |
-
yylineno = this.lexer.yylineno;
|
| 3744 |
-
yyloc = this.lexer.yylloc;
|
| 3745 |
-
if (recovering > 0) recovering--;
|
| 3746 |
-
} else {
|
| 3747 |
-
symbol = preErrorSymbol;
|
| 3748 |
-
preErrorSymbol = null;
|
| 3749 |
-
}
|
| 3750 |
-
break;
|
| 3751 |
-
case 2:
|
| 3752 |
-
len = this.productions_[action[1]][1];
|
| 3753 |
-
yyval.$ = vstack[vstack.length - len];
|
| 3754 |
-
yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
|
| 3755 |
-
if (ranges) {
|
| 3756 |
-
yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
| 3757 |
-
}
|
| 3758 |
-
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
| 3759 |
-
if (typeof r !== "undefined") {
|
| 3760 |
-
return r;
|
| 3761 |
-
}
|
| 3762 |
-
if (len) {
|
| 3763 |
-
stack = stack.slice(0, -1 * len * 2);
|
| 3764 |
-
vstack = vstack.slice(0, -1 * len);
|
| 3765 |
-
lstack = lstack.slice(0, -1 * len);
|
| 3766 |
-
}
|
| 3767 |
-
stack.push(this.productions_[action[1]][0]);
|
| 3768 |
-
vstack.push(yyval.$);
|
| 3769 |
-
lstack.push(yyval._$);
|
| 3770 |
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
| 3771 |
-
stack.push(newState);
|
| 3772 |
-
break;
|
| 3773 |
-
case 3:
|
| 3774 |
-
return true;
|
| 3775 |
-
}
|
| 3776 |
-
}
|
| 3777 |
-
return true;
|
| 3778 |
}
|
| 3779 |
-
|
| 3780 |
-
|
| 3781 |
-
|
| 3782 |
-
|
| 3783 |
-
parseError: function parseError(str, hash) {
|
| 3784 |
-
if (this.yy.parser) {
|
| 3785 |
-
this.yy.parser.parseError(str, hash);
|
| 3786 |
-
} else {
|
| 3787 |
-
throw new Error(str);
|
| 3788 |
-
}
|
| 3789 |
-
},
|
| 3790 |
-
setInput: function setInput(input) {
|
| 3791 |
-
this._input = input;
|
| 3792 |
-
this._more = this._less = this.done = false;
|
| 3793 |
-
this.yylineno = this.yyleng = 0;
|
| 3794 |
-
this.yytext = this.matched = this.match = "";
|
| 3795 |
-
this.conditionStack = ["INITIAL"];
|
| 3796 |
-
this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
|
| 3797 |
-
if (this.options.ranges) this.yylloc.range = [0, 0];
|
| 3798 |
-
this.offset = 0;
|
| 3799 |
-
return this;
|
| 3800 |
-
},
|
| 3801 |
-
input: function input() {
|
| 3802 |
-
var ch = this._input[0];
|
| 3803 |
-
this.yytext += ch;
|
| 3804 |
-
this.yyleng++;
|
| 3805 |
-
this.offset++;
|
| 3806 |
-
this.match += ch;
|
| 3807 |
-
this.matched += ch;
|
| 3808 |
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
| 3809 |
-
if (lines) {
|
| 3810 |
-
this.yylineno++;
|
| 3811 |
-
this.yylloc.last_line++;
|
| 3812 |
-
} else {
|
| 3813 |
-
this.yylloc.last_column++;
|
| 3814 |
-
}
|
| 3815 |
-
if (this.options.ranges) this.yylloc.range[1]++;
|
| 3816 |
|
| 3817 |
-
|
| 3818 |
-
|
| 3819 |
-
|
| 3820 |
-
|
| 3821 |
-
|
| 3822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3823 |
|
| 3824 |
-
|
| 3825 |
-
|
| 3826 |
-
|
| 3827 |
-
|
| 3828 |
-
|
| 3829 |
-
|
| 3830 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3831 |
|
| 3832 |
-
|
| 3833 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3834 |
|
| 3835 |
-
|
| 3836 |
-
|
| 3837 |
-
|
| 3838 |
-
|
| 3839 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3840 |
|
| 3841 |
-
|
| 3842 |
-
|
| 3843 |
-
|
| 3844 |
-
|
| 3845 |
-
|
| 3846 |
-
|
| 3847 |
-
|
| 3848 |
-
|
| 3849 |
-
|
| 3850 |
-
|
| 3851 |
-
|
| 3852 |
-
|
| 3853 |
-
|
| 3854 |
-
|
| 3855 |
-
|
| 3856 |
-
|
| 3857 |
-
|
| 3858 |
-
|
| 3859 |
-
|
| 3860 |
-
|
| 3861 |
-
|
| 3862 |
-
|
| 3863 |
-
|
| 3864 |
-
|
| 3865 |
-
|
| 3866 |
-
|
| 3867 |
-
|
| 3868 |
-
|
| 3869 |
-
|
| 3870 |
-
|
| 3871 |
-
|
| 3872 |
-
|
| 3873 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3874 |
|
| 3875 |
-
|
| 3876 |
-
|
| 3877 |
-
this.yytext = "";
|
| 3878 |
-
this.match = "";
|
| 3879 |
-
}
|
| 3880 |
-
var rules = this._currentRules();
|
| 3881 |
-
for (var i = 0; i < rules.length; i++) {
|
| 3882 |
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
| 3883 |
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
| 3884 |
-
match = tempMatch;
|
| 3885 |
-
index = i;
|
| 3886 |
-
if (!this.options.flex) break;
|
| 3887 |
-
}
|
| 3888 |
-
}
|
| 3889 |
-
if (match) {
|
| 3890 |
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
| 3891 |
-
if (lines) this.yylineno += lines.length;
|
| 3892 |
-
this.yylloc = { first_line: this.yylloc.last_line,
|
| 3893 |
-
last_line: this.yylineno + 1,
|
| 3894 |
-
first_column: this.yylloc.last_column,
|
| 3895 |
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
|
| 3896 |
-
this.yytext += match[0];
|
| 3897 |
-
this.match += match[0];
|
| 3898 |
-
this.matches = match;
|
| 3899 |
-
this.yyleng = this.yytext.length;
|
| 3900 |
-
if (this.options.ranges) {
|
| 3901 |
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
| 3902 |
-
}
|
| 3903 |
-
this._more = false;
|
| 3904 |
-
this._input = this._input.slice(match[0].length);
|
| 3905 |
-
this.matched += match[0];
|
| 3906 |
-
token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
|
| 3907 |
-
if (this.done && this._input) this.done = false;
|
| 3908 |
-
if (token) {
|
| 3909 |
-
return token;
|
| 3910 |
-
} else {
|
| 3911 |
-
return;
|
| 3912 |
-
}
|
| 3913 |
-
}
|
| 3914 |
-
if (this._input === "") {
|
| 3915 |
-
return this.EOF;
|
| 3916 |
-
} else {
|
| 3917 |
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
| 3918 |
-
}
|
| 3919 |
-
},
|
| 3920 |
-
lex: function lex() {
|
| 3921 |
-
var r = this.next();
|
| 3922 |
-
if (typeof r !== "undefined") {
|
| 3923 |
-
return r;
|
| 3924 |
-
} else {
|
| 3925 |
-
return this.lex();
|
| 3926 |
-
}
|
| 3927 |
-
},
|
| 3928 |
-
begin: function begin(condition) {
|
| 3929 |
-
this.conditionStack.push(condition);
|
| 3930 |
-
},
|
| 3931 |
-
popState: function popState() {
|
| 3932 |
-
return this.conditionStack.pop();
|
| 3933 |
-
},
|
| 3934 |
-
_currentRules: function _currentRules() {
|
| 3935 |
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
| 3936 |
-
},
|
| 3937 |
-
topState: function topState() {
|
| 3938 |
-
return this.conditionStack[this.conditionStack.length - 2];
|
| 3939 |
-
},
|
| 3940 |
-
pushState: function begin(condition) {
|
| 3941 |
-
this.begin(condition);
|
| 3942 |
-
} };
|
| 3943 |
-
lexer.options = {};
|
| 3944 |
-
lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
| 3945 |
|
| 3946 |
-
|
| 3947 |
-
|
| 3948 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3949 |
|
| 3950 |
-
|
| 3951 |
-
|
| 3952 |
-
|
| 3953 |
-
|
| 3954 |
-
strip(0, 1);
|
| 3955 |
-
this.begin("mu");
|
| 3956 |
-
} else if (yy_.yytext.slice(-1) === "\\") {
|
| 3957 |
-
strip(0, 1);
|
| 3958 |
-
this.begin("emu");
|
| 3959 |
-
} else {
|
| 3960 |
-
this.begin("mu");
|
| 3961 |
-
}
|
| 3962 |
-
if (yy_.yytext) {
|
| 3963 |
-
return 14;
|
| 3964 |
-
}break;
|
| 3965 |
-
case 1:
|
| 3966 |
-
return 14;
|
| 3967 |
-
break;
|
| 3968 |
-
case 2:
|
| 3969 |
-
this.popState();
|
| 3970 |
-
return 14;
|
| 3971 |
|
| 3972 |
-
|
| 3973 |
-
|
| 3974 |
-
|
| 3975 |
-
|
| 3976 |
-
|
|
|
|
| 3977 |
|
| 3978 |
-
|
| 3979 |
-
|
| 3980 |
-
|
| 3981 |
-
|
| 3982 |
-
|
| 3983 |
-
this.popState();
|
| 3984 |
-
return 13;
|
| 3985 |
|
| 3986 |
-
|
| 3987 |
-
|
| 3988 |
-
|
| 3989 |
-
|
| 3990 |
-
|
| 3991 |
-
return 62;
|
| 3992 |
-
break;
|
| 3993 |
-
case 8:
|
| 3994 |
-
return 17;
|
| 3995 |
-
break;
|
| 3996 |
-
case 9:
|
| 3997 |
-
this.popState();
|
| 3998 |
-
this.begin("raw");
|
| 3999 |
-
return 21;
|
| 4000 |
|
| 4001 |
-
|
| 4002 |
-
|
| 4003 |
-
return 53;
|
| 4004 |
-
break;
|
| 4005 |
-
case 11:
|
| 4006 |
-
return 27;
|
| 4007 |
-
break;
|
| 4008 |
-
case 12:
|
| 4009 |
-
return 45;
|
| 4010 |
-
break;
|
| 4011 |
-
case 13:
|
| 4012 |
-
this.popState();return 42;
|
| 4013 |
-
break;
|
| 4014 |
-
case 14:
|
| 4015 |
-
this.popState();return 42;
|
| 4016 |
-
break;
|
| 4017 |
-
case 15:
|
| 4018 |
-
return 32;
|
| 4019 |
-
break;
|
| 4020 |
-
case 16:
|
| 4021 |
-
return 37;
|
| 4022 |
-
break;
|
| 4023 |
-
case 17:
|
| 4024 |
-
return 49;
|
| 4025 |
-
break;
|
| 4026 |
-
case 18:
|
| 4027 |
-
return 46;
|
| 4028 |
-
break;
|
| 4029 |
-
case 19:
|
| 4030 |
-
this.unput(yy_.yytext);
|
| 4031 |
-
this.popState();
|
| 4032 |
-
this.begin("com");
|
| 4033 |
|
| 4034 |
-
|
| 4035 |
-
|
| 4036 |
-
|
| 4037 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4038 |
|
| 4039 |
-
|
| 4040 |
-
|
| 4041 |
-
|
| 4042 |
-
|
| 4043 |
-
|
| 4044 |
-
|
| 4045 |
-
|
| 4046 |
-
case 23:
|
| 4047 |
-
return 66;
|
| 4048 |
-
break;
|
| 4049 |
-
case 24:
|
| 4050 |
-
return 66;
|
| 4051 |
-
break;
|
| 4052 |
-
case 25:
|
| 4053 |
-
return 81;
|
| 4054 |
-
break;
|
| 4055 |
-
case 26:
|
| 4056 |
-
// ignore whitespace
|
| 4057 |
-
break;
|
| 4058 |
-
case 27:
|
| 4059 |
-
this.popState();return 52;
|
| 4060 |
-
break;
|
| 4061 |
-
case 28:
|
| 4062 |
-
this.popState();return 31;
|
| 4063 |
-
break;
|
| 4064 |
-
case 29:
|
| 4065 |
-
yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");return 74;
|
| 4066 |
-
break;
|
| 4067 |
-
case 30:
|
| 4068 |
-
yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 74;
|
| 4069 |
-
break;
|
| 4070 |
-
case 31:
|
| 4071 |
-
return 79;
|
| 4072 |
-
break;
|
| 4073 |
-
case 32:
|
| 4074 |
-
return 76;
|
| 4075 |
-
break;
|
| 4076 |
-
case 33:
|
| 4077 |
-
return 76;
|
| 4078 |
-
break;
|
| 4079 |
-
case 34:
|
| 4080 |
-
return 77;
|
| 4081 |
-
break;
|
| 4082 |
-
case 35:
|
| 4083 |
-
return 78;
|
| 4084 |
-
break;
|
| 4085 |
-
case 36:
|
| 4086 |
-
return 75;
|
| 4087 |
-
break;
|
| 4088 |
-
case 37:
|
| 4089 |
-
return 69;
|
| 4090 |
-
break;
|
| 4091 |
-
case 38:
|
| 4092 |
-
return 71;
|
| 4093 |
-
break;
|
| 4094 |
-
case 39:
|
| 4095 |
-
return 66;
|
| 4096 |
-
break;
|
| 4097 |
-
case 40:
|
| 4098 |
-
return 66;
|
| 4099 |
-
break;
|
| 4100 |
-
case 41:
|
| 4101 |
-
return "INVALID";
|
| 4102 |
-
break;
|
| 4103 |
-
case 42:
|
| 4104 |
-
return 5;
|
| 4105 |
-
break;
|
| 4106 |
-
}
|
| 4107 |
-
};
|
| 4108 |
-
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/];
|
| 4109 |
-
lexer.conditions = { mu: { rules: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [5], inclusive: false }, raw: { rules: [3, 4], inclusive: false }, INITIAL: { rules: [0, 1, 42], inclusive: true } };
|
| 4110 |
-
return lexer;
|
| 4111 |
-
})();
|
| 4112 |
-
parser.lexer = lexer;
|
| 4113 |
-
function Parser() {
|
| 4114 |
-
this.yy = {};
|
| 4115 |
-
}Parser.prototype = parser;parser.Parser = Parser;
|
| 4116 |
-
return new Parser();
|
| 4117 |
-
})();exports["default"] = handlebars;
|
| 4118 |
-
module.exports = exports["default"];
|
| 4119 |
|
| 4120 |
-
|
| 4121 |
-
|
| 4122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4123 |
|
| 4124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4125 |
|
| 4126 |
-
|
| 4127 |
|
| 4128 |
-
|
| 4129 |
|
| 4130 |
-
|
|
|
|
|
|
|
|
|
|
| 4131 |
|
| 4132 |
-
|
|
|
|
|
|
|
| 4133 |
|
| 4134 |
-
|
| 4135 |
-
WhitespaceControl.prototype = new _Visitor2['default']();
|
| 4136 |
|
| 4137 |
-
|
| 4138 |
-
|
| 4139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4140 |
|
| 4141 |
-
|
| 4142 |
-
|
| 4143 |
-
|
| 4144 |
-
|
|
|
|
|
|
|
|
|
|
| 4145 |
|
| 4146 |
-
|
| 4147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4148 |
}
|
|
|
|
| 4149 |
|
| 4150 |
-
|
| 4151 |
-
|
| 4152 |
-
|
| 4153 |
-
closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
| 4154 |
-
inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
| 4155 |
|
| 4156 |
-
if (
|
| 4157 |
-
|
| 4158 |
}
|
| 4159 |
-
if (
|
| 4160 |
-
|
| 4161 |
}
|
| 4162 |
|
| 4163 |
-
|
| 4164 |
-
|
| 4165 |
-
|
| 4166 |
-
if (omitLeft(body, i)) {
|
| 4167 |
-
// If we are on a standalone node, save the indent info for partials
|
| 4168 |
-
if (current.type === 'PartialStatement') {
|
| 4169 |
-
// Pull out the whitespace from the final line
|
| 4170 |
-
current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
| 4171 |
-
}
|
| 4172 |
-
}
|
| 4173 |
-
}
|
| 4174 |
-
if (openStandalone) {
|
| 4175 |
-
omitRight((current.program || current.inverse).body);
|
| 4176 |
|
| 4177 |
-
|
| 4178 |
-
|
|
|
|
|
|
|
| 4179 |
}
|
| 4180 |
-
|
| 4181 |
-
// Always strip the next node
|
| 4182 |
-
omitRight(body, i);
|
| 4183 |
|
| 4184 |
-
|
|
|
|
|
|
|
| 4185 |
}
|
| 4186 |
-
}
|
| 4187 |
|
| 4188 |
-
|
| 4189 |
-
|
| 4190 |
-
|
| 4191 |
-
this.accept(block.program);
|
| 4192 |
-
this.accept(block.inverse);
|
| 4193 |
|
| 4194 |
-
|
| 4195 |
-
|
| 4196 |
-
|
| 4197 |
-
firstInverse = inverse,
|
| 4198 |
-
lastInverse = inverse;
|
| 4199 |
|
| 4200 |
-
|
| 4201 |
-
|
|
|
|
|
|
|
|
|
|
| 4202 |
|
| 4203 |
-
|
| 4204 |
-
|
| 4205 |
-
lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
| 4206 |
}
|
| 4207 |
-
}
|
| 4208 |
|
| 4209 |
-
|
| 4210 |
-
|
| 4211 |
-
|
|
|
|
|
|
|
| 4212 |
|
| 4213 |
-
|
| 4214 |
-
|
| 4215 |
-
|
| 4216 |
-
|
| 4217 |
-
};
|
| 4218 |
|
| 4219 |
-
|
| 4220 |
-
|
| 4221 |
-
}
|
| 4222 |
|
| 4223 |
-
|
| 4224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4225 |
|
| 4226 |
-
|
| 4227 |
-
|
| 4228 |
}
|
| 4229 |
|
| 4230 |
-
|
| 4231 |
-
|
|
|
|
|
|
|
| 4232 |
}
|
| 4233 |
-
if (
|
| 4234 |
-
|
| 4235 |
}
|
|
|
|
|
|
|
| 4236 |
|
| 4237 |
-
|
| 4238 |
-
|
| 4239 |
-
|
| 4240 |
-
|
| 4241 |
}
|
| 4242 |
-
|
| 4243 |
-
|
| 4244 |
-
|
| 4245 |
-
|
| 4246 |
-
|
| 4247 |
-
|
| 4248 |
-
|
| 4249 |
-
|
| 4250 |
-
|
| 4251 |
-
|
| 4252 |
-
|
| 4253 |
-
|
| 4254 |
-
|
| 4255 |
-
|
| 4256 |
-
|
| 4257 |
-
|
| 4258 |
-
|
| 4259 |
-
|
| 4260 |
-
|
| 4261 |
-
|
| 4262 |
-
|
| 4263 |
-
|
| 4264 |
-
|
| 4265 |
-
i = body.length;
|
| 4266 |
-
}
|
| 4267 |
-
|
| 4268 |
-
// Nodes that end with newlines are considered whitespace (but are special
|
| 4269 |
-
// cased for strip operations)
|
| 4270 |
-
var prev = body[i - 1],
|
| 4271 |
-
sibling = body[i - 2];
|
| 4272 |
-
if (!prev) {
|
| 4273 |
-
return isRoot;
|
| 4274 |
-
}
|
| 4275 |
-
|
| 4276 |
-
if (prev.type === 'ContentStatement') {
|
| 4277 |
-
return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
|
| 4278 |
-
}
|
| 4279 |
-
}
|
| 4280 |
-
function isNextWhitespace(body, i, isRoot) {
|
| 4281 |
-
if (i === undefined) {
|
| 4282 |
-
i = -1;
|
| 4283 |
-
}
|
| 4284 |
-
|
| 4285 |
-
var next = body[i + 1],
|
| 4286 |
-
sibling = body[i + 2];
|
| 4287 |
-
if (!next) {
|
| 4288 |
-
return isRoot;
|
| 4289 |
-
}
|
| 4290 |
-
|
| 4291 |
-
if (next.type === 'ContentStatement') {
|
| 4292 |
-
return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
|
| 4293 |
-
}
|
| 4294 |
-
}
|
| 4295 |
|
| 4296 |
-
|
| 4297 |
-
|
| 4298 |
-
|
| 4299 |
-
// If i is undefined, then the first child will be marked as such.
|
| 4300 |
-
//
|
| 4301 |
-
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 4302 |
-
// content is met.
|
| 4303 |
-
function omitRight(body, i, multiple) {
|
| 4304 |
-
var current = body[i == null ? 0 : i + 1];
|
| 4305 |
-
if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
|
| 4306 |
-
return;
|
| 4307 |
-
}
|
| 4308 |
|
| 4309 |
-
|
| 4310 |
-
|
| 4311 |
-
|
| 4312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4313 |
|
| 4314 |
-
|
| 4315 |
-
|
| 4316 |
-
|
| 4317 |
-
// If i is undefined then the last child will be marked as such.
|
| 4318 |
-
//
|
| 4319 |
-
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 4320 |
-
// content is met.
|
| 4321 |
-
function omitLeft(body, i, multiple) {
|
| 4322 |
-
var current = body[i == null ? body.length - 1 : i - 1];
|
| 4323 |
-
if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
|
| 4324 |
-
return;
|
| 4325 |
-
}
|
| 4326 |
|
| 4327 |
-
|
| 4328 |
-
|
| 4329 |
-
|
| 4330 |
-
|
| 4331 |
-
|
| 4332 |
-
|
|
|
|
| 4333 |
|
| 4334 |
-
|
| 4335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4336 |
|
| 4337 |
-
|
| 4338 |
-
|
| 4339 |
-
|
| 4340 |
|
| 4341 |
-
|
|
|
|
|
|
|
| 4342 |
|
| 4343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4344 |
|
| 4345 |
-
|
| 4346 |
-
|
| 4347 |
-
|
| 4348 |
-
exports.stripFlags = stripFlags;
|
| 4349 |
-
exports.stripComment = stripComment;
|
| 4350 |
-
exports.preparePath = preparePath;
|
| 4351 |
-
exports.prepareMustache = prepareMustache;
|
| 4352 |
-
exports.prepareRawBlock = prepareRawBlock;
|
| 4353 |
-
exports.prepareBlock = prepareBlock;
|
| 4354 |
|
| 4355 |
-
|
|
|
|
| 4356 |
|
| 4357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4358 |
|
| 4359 |
-
|
| 4360 |
-
|
| 4361 |
-
|
| 4362 |
-
|
| 4363 |
-
|
| 4364 |
-
|
| 4365 |
-
|
| 4366 |
-
line: locInfo.last_line,
|
| 4367 |
-
column: locInfo.last_column
|
| 4368 |
-
};
|
| 4369 |
-
}
|
| 4370 |
|
| 4371 |
-
|
| 4372 |
-
|
| 4373 |
-
|
| 4374 |
-
|
| 4375 |
-
|
| 4376 |
-
|
| 4377 |
-
|
| 4378 |
|
| 4379 |
-
|
| 4380 |
-
|
| 4381 |
-
|
| 4382 |
-
close: close.charAt(close.length - 3) === '~'
|
| 4383 |
-
};
|
| 4384 |
-
}
|
| 4385 |
|
| 4386 |
-
|
| 4387 |
-
|
| 4388 |
-
}
|
| 4389 |
|
| 4390 |
-
|
| 4391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4392 |
|
| 4393 |
-
|
| 4394 |
-
|
| 4395 |
-
depth = 0,
|
| 4396 |
-
depthString = '';
|
| 4397 |
|
| 4398 |
-
|
| 4399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4400 |
|
| 4401 |
-
//
|
| 4402 |
-
//
|
| 4403 |
-
|
| 4404 |
-
|
|
|
|
|
|
|
| 4405 |
|
| 4406 |
-
|
| 4407 |
-
|
| 4408 |
-
|
| 4409 |
-
|
| 4410 |
-
|
| 4411 |
-
|
| 4412 |
}
|
| 4413 |
-
} else {
|
| 4414 |
-
dig.push(part);
|
| 4415 |
}
|
| 4416 |
-
}
|
| 4417 |
-
|
| 4418 |
-
return new this.PathExpression(data, depth, dig, original, locInfo);
|
| 4419 |
-
}
|
| 4420 |
|
| 4421 |
-
|
| 4422 |
-
|
| 4423 |
-
|
| 4424 |
-
escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
| 4425 |
|
| 4426 |
-
|
| 4427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4428 |
|
| 4429 |
-
|
| 4430 |
-
|
| 4431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4432 |
|
| 4433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4434 |
}
|
|
|
|
| 4435 |
|
| 4436 |
-
|
| 4437 |
-
var
|
| 4438 |
-
|
| 4439 |
-
return new this.BlockStatement(openRawBlock.path, openRawBlock.params, openRawBlock.hash, program, undefined, {}, {}, {}, locInfo);
|
| 4440 |
-
}
|
| 4441 |
|
| 4442 |
-
|
| 4443 |
-
// When we are chaining inverse calls, we will not have a close path
|
| 4444 |
-
if (close && close.path && openBlock.path.original !== close.path.original) {
|
| 4445 |
-
var errorNode = { loc: openBlock.path.loc };
|
| 4446 |
|
| 4447 |
-
|
|
|
|
| 4448 |
}
|
|
|
|
| 4449 |
|
| 4450 |
-
|
| 4451 |
-
|
| 4452 |
-
|
| 4453 |
-
inverseStrip = undefined;
|
| 4454 |
-
|
| 4455 |
-
if (inverseAndProgram) {
|
| 4456 |
-
if (inverseAndProgram.chain) {
|
| 4457 |
-
inverseAndProgram.program.body[0].closeStrip = close.strip;
|
| 4458 |
-
}
|
| 4459 |
|
| 4460 |
-
|
| 4461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4462 |
}
|
| 4463 |
|
| 4464 |
-
|
| 4465 |
-
|
| 4466 |
-
inverse = program;
|
| 4467 |
-
program = inverted;
|
| 4468 |
}
|
| 4469 |
|
| 4470 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4471 |
}
|
| 4472 |
|
| 4473 |
-
|
| 4474 |
-
|
| 4475 |
-
/***/ function(module, exports, __webpack_require__) {
|
| 4476 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4477 |
'use strict';
|
| 4478 |
|
| 4479 |
exports.__esModule = true;
|
| 4480 |
-
/*global define */
|
| 4481 |
|
| 4482 |
-
var
|
| 4483 |
|
| 4484 |
var SourceNode = undefined;
|
| 4485 |
|
|
@@ -4492,6 +5229,7 @@
|
|
| 4492 |
SourceNode = SourceMap.SourceNode;
|
| 4493 |
}
|
| 4494 |
} catch (err) {}
|
|
|
|
| 4495 |
|
| 4496 |
/* istanbul ignore if: tested but not covered in istanbul due to dist build */
|
| 4497 |
if (!SourceNode) {
|
|
@@ -4504,13 +5242,13 @@
|
|
| 4504 |
/* istanbul ignore next */
|
| 4505 |
SourceNode.prototype = {
|
| 4506 |
add: function add(chunks) {
|
| 4507 |
-
if (
|
| 4508 |
chunks = chunks.join('');
|
| 4509 |
}
|
| 4510 |
this.src += chunks;
|
| 4511 |
},
|
| 4512 |
prepend: function prepend(chunks) {
|
| 4513 |
-
if (
|
| 4514 |
chunks = chunks.join('');
|
| 4515 |
}
|
| 4516 |
this.src = chunks + this.src;
|
|
@@ -4525,7 +5263,7 @@
|
|
| 4525 |
}
|
| 4526 |
|
| 4527 |
function castChunk(chunk, codeGen, loc) {
|
| 4528 |
-
if (
|
| 4529 |
var ret = [];
|
| 4530 |
|
| 4531 |
for (var i = 0, len = chunk.length; i < len; i++) {
|
|
@@ -4545,6 +5283,9 @@
|
|
| 4545 |
}
|
| 4546 |
|
| 4547 |
CodeGen.prototype = {
|
|
|
|
|
|
|
|
|
|
| 4548 |
prepend: function prepend(source, loc) {
|
| 4549 |
this.source.unshift(this.wrap(source, loc));
|
| 4550 |
},
|
|
@@ -4567,12 +5308,11 @@
|
|
| 4567 |
},
|
| 4568 |
|
| 4569 |
empty: function empty() {
|
| 4570 |
-
var loc =
|
| 4571 |
-
|
| 4572 |
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
| 4573 |
},
|
| 4574 |
wrap: function wrap(chunk) {
|
| 4575 |
-
var loc = arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
|
| 4576 |
|
| 4577 |
if (chunk instanceof SourceNode) {
|
| 4578 |
return chunk;
|
|
@@ -4611,22 +5351,22 @@
|
|
| 4611 |
return ret;
|
| 4612 |
},
|
| 4613 |
|
| 4614 |
-
generateList: function generateList(entries
|
| 4615 |
-
var ret = this.empty(
|
| 4616 |
|
| 4617 |
for (var i = 0, len = entries.length; i < len; i++) {
|
| 4618 |
if (i) {
|
| 4619 |
ret.add(',');
|
| 4620 |
}
|
| 4621 |
|
| 4622 |
-
ret.add(castChunk(entries[i], this
|
| 4623 |
}
|
| 4624 |
|
| 4625 |
return ret;
|
| 4626 |
},
|
| 4627 |
|
| 4628 |
-
generateArray: function generateArray(entries
|
| 4629 |
-
var ret = this.generateList(entries
|
| 4630 |
ret.prepend('[');
|
| 4631 |
ret.add(']');
|
| 4632 |
|
|
@@ -4637,9 +5377,7 @@
|
|
| 4637 |
exports['default'] = CodeGen;
|
| 4638 |
module.exports = exports['default'];
|
| 4639 |
|
| 4640 |
-
|
| 4641 |
-
|
| 4642 |
-
/***/ }
|
| 4643 |
/******/ ])
|
| 4644 |
});
|
| 4645 |
;
|
| 76 |
/******/ script.charset = 'utf-8';
|
| 77 |
/******/ script.async = true;
|
| 78 |
|
| 79 |
+
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"39fd28da","1":"7914137d","2":"cc7529b3","3":"a5fa72ae","4":"e7b87b92"}[chunkId] + ".chunk.js";
|
| 80 |
/******/ head.appendChild(script);
|
| 81 |
/******/ }
|
| 82 |
/******/ };
|
| 99 |
/***/ 0:
|
| 100 |
/***/ function(module, exports, __webpack_require__) {
|
| 101 |
|
| 102 |
+
__webpack_require__(553);
|
| 103 |
+
__webpack_require__(616);
|
| 104 |
module.exports = __webpack_require__(429);
|
| 105 |
|
| 106 |
|
| 107 |
/***/ },
|
| 108 |
|
| 109 |
+
/***/ 616:
|
| 110 |
/***/ function(module, exports, __webpack_require__) {
|
| 111 |
|
| 112 |
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(553)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Handlebars) {
|
| 113 |
// Handlebars helpers
|
| 114 |
Handlebars.registerHelper('concat', function () {
|
| 115 |
var size = (arguments.length - 1);
|
| 128 |
var f;
|
| 129 |
if (window.moment) {
|
| 130 |
if (timestamp === undefined || isNaN(timestamp) || timestamp <= 0) {
|
| 131 |
+
return undefined;
|
| 132 |
}
|
| 133 |
|
| 134 |
// set date format
|
| 136 |
// check if we passed a timestamp
|
| 137 |
if (parseInt(timestamp, 10) == timestamp) {
|
| 138 |
return window.moment.unix(timestamp).format(f);
|
|
|
|
|
|
|
| 139 |
}
|
| 140 |
+
return window.moment.utc(timestamp).format(f);
|
|
|
|
| 141 |
}
|
| 142 |
+
return timestamp;
|
| 143 |
});
|
| 144 |
|
| 145 |
Handlebars.registerHelper('cycle', function (value, block) {
|
| 196 |
var mailtoMatchingRegex = /^mailto\:/i;
|
| 197 |
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
|
| 198 |
return value.replace(mailtoMatchingRegex, '');
|
|
|
|
|
|
|
| 199 |
}
|
| 200 |
+
return value;
|
| 201 |
});
|
| 202 |
Handlebars.registerHelper('lookup', function (obj, field) {
|
| 203 |
return obj && obj[field];
|
| 242 |
}
|
| 243 |
if (sanitized.length > limit) {
|
| 244 |
return sanitized.substr(0, limit - strAppend.length) + strAppend;
|
|
|
|
|
|
|
| 245 |
}
|
| 246 |
+
return sanitized;
|
| 247 |
});
|
| 248 |
|
| 249 |
Handlebars.registerHelper('getNumber', function (string) {
|
| 538 |
|
| 539 |
/***/ },
|
| 540 |
|
| 541 |
+
/***/ 553:
|
| 542 |
/***/ function(module, exports, __webpack_require__) {
|
| 543 |
|
| 544 |
+
/**!
|
| 545 |
|
| 546 |
+
@license
|
| 547 |
+
handlebars v4.0.11
|
| 548 |
|
| 549 |
+
Copyright (C) 2011-2017 by Yehuda Katz
|
| 550 |
|
| 551 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 552 |
of this software and associated documentation files (the "Software"), to deal
|
| 566 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 567 |
THE SOFTWARE.
|
| 568 |
|
|
|
|
| 569 |
*/
|
| 570 |
(function webpackUniversalModuleDefinition(root, factory) {
|
| 571 |
if(true)
|
| 572 |
module.exports = factory();
|
| 573 |
else if(typeof define === 'function' && define.amd)
|
| 574 |
+
define([], factory);
|
| 575 |
else if(typeof exports === 'object')
|
| 576 |
exports["Handlebars"] = factory();
|
| 577 |
else
|
| 621 |
/************************************************************************/
|
| 622 |
/******/ ([
|
| 623 |
/* 0 */
|
| 624 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 625 |
|
| 626 |
'use strict';
|
| 627 |
|
| 628 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 629 |
|
| 630 |
exports.__esModule = true;
|
| 631 |
|
| 632 |
+
var _handlebarsRuntime = __webpack_require__(2);
|
| 633 |
|
| 634 |
+
var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
|
| 635 |
|
| 636 |
// Compiler imports
|
| 637 |
|
| 638 |
+
var _handlebarsCompilerAst = __webpack_require__(35);
|
| 639 |
|
| 640 |
+
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
| 641 |
|
| 642 |
+
var _handlebarsCompilerBase = __webpack_require__(36);
|
| 643 |
|
| 644 |
+
var _handlebarsCompilerCompiler = __webpack_require__(41);
|
| 645 |
|
| 646 |
+
var _handlebarsCompilerJavascriptCompiler = __webpack_require__(42);
|
| 647 |
|
| 648 |
+
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
| 649 |
|
| 650 |
+
var _handlebarsCompilerVisitor = __webpack_require__(39);
|
| 651 |
|
| 652 |
+
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
| 653 |
|
| 654 |
+
var _handlebarsNoConflict = __webpack_require__(34);
|
| 655 |
|
| 656 |
+
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
| 657 |
|
| 658 |
+
var _create = _handlebarsRuntime2['default'].create;
|
| 659 |
function create() {
|
| 660 |
var hb = _create();
|
| 661 |
|
| 662 |
hb.compile = function (input, options) {
|
| 663 |
+
return _handlebarsCompilerCompiler.compile(input, options, hb);
|
| 664 |
};
|
| 665 |
hb.precompile = function (input, options) {
|
| 666 |
+
return _handlebarsCompilerCompiler.precompile(input, options, hb);
|
| 667 |
};
|
| 668 |
|
| 669 |
+
hb.AST = _handlebarsCompilerAst2['default'];
|
| 670 |
+
hb.Compiler = _handlebarsCompilerCompiler.Compiler;
|
| 671 |
+
hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
|
| 672 |
+
hb.Parser = _handlebarsCompilerBase.parser;
|
| 673 |
+
hb.parse = _handlebarsCompilerBase.parse;
|
| 674 |
|
| 675 |
return hb;
|
| 676 |
}
|
| 678 |
var inst = create();
|
| 679 |
inst.create = create;
|
| 680 |
|
| 681 |
+
_handlebarsNoConflict2['default'](inst);
|
| 682 |
|
| 683 |
+
inst.Visitor = _handlebarsCompilerVisitor2['default'];
|
| 684 |
|
| 685 |
inst['default'] = inst;
|
| 686 |
|
| 687 |
exports['default'] = inst;
|
| 688 |
module.exports = exports['default'];
|
| 689 |
|
| 690 |
+
/***/ }),
|
| 691 |
/* 1 */
|
| 692 |
+
/***/ (function(module, exports) {
|
| 693 |
+
|
| 694 |
+
"use strict";
|
| 695 |
+
|
| 696 |
+
exports["default"] = function (obj) {
|
| 697 |
+
return obj && obj.__esModule ? obj : {
|
| 698 |
+
"default": obj
|
| 699 |
+
};
|
| 700 |
+
};
|
| 701 |
+
|
| 702 |
+
exports.__esModule = true;
|
| 703 |
+
|
| 704 |
+
/***/ }),
|
| 705 |
+
/* 2 */
|
| 706 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 707 |
|
| 708 |
'use strict';
|
| 709 |
|
| 710 |
+
var _interopRequireWildcard = __webpack_require__(3)['default'];
|
| 711 |
+
|
| 712 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 713 |
|
| 714 |
exports.__esModule = true;
|
| 715 |
|
| 716 |
+
var _handlebarsBase = __webpack_require__(4);
|
| 717 |
|
| 718 |
+
var base = _interopRequireWildcard(_handlebarsBase);
|
| 719 |
|
| 720 |
// Each of these augment the Handlebars object. No need to setup here.
|
| 721 |
// (This is done to easily share code between commonjs and browse envs)
|
| 722 |
|
| 723 |
+
var _handlebarsSafeString = __webpack_require__(21);
|
| 724 |
|
| 725 |
+
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
| 726 |
|
| 727 |
+
var _handlebarsException = __webpack_require__(6);
|
| 728 |
|
| 729 |
+
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
| 730 |
|
| 731 |
+
var _handlebarsUtils = __webpack_require__(5);
|
| 732 |
|
| 733 |
+
var Utils = _interopRequireWildcard(_handlebarsUtils);
|
| 734 |
|
| 735 |
+
var _handlebarsRuntime = __webpack_require__(22);
|
| 736 |
|
| 737 |
+
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
| 738 |
|
| 739 |
+
var _handlebarsNoConflict = __webpack_require__(34);
|
| 740 |
|
| 741 |
+
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
| 742 |
|
| 743 |
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
| 744 |
function create() {
|
| 745 |
var hb = new base.HandlebarsEnvironment();
|
| 746 |
|
| 747 |
Utils.extend(hb, base);
|
| 748 |
+
hb.SafeString = _handlebarsSafeString2['default'];
|
| 749 |
+
hb.Exception = _handlebarsException2['default'];
|
| 750 |
hb.Utils = Utils;
|
| 751 |
hb.escapeExpression = Utils.escapeExpression;
|
| 752 |
|
| 761 |
var inst = create();
|
| 762 |
inst.create = create;
|
| 763 |
|
| 764 |
+
_handlebarsNoConflict2['default'](inst);
|
| 765 |
|
| 766 |
inst['default'] = inst;
|
| 767 |
|
| 768 |
exports['default'] = inst;
|
| 769 |
module.exports = exports['default'];
|
| 770 |
|
| 771 |
+
/***/ }),
|
| 772 |
+
/* 3 */
|
| 773 |
+
/***/ (function(module, exports) {
|
| 774 |
|
| 775 |
+
"use strict";
|
| 776 |
|
| 777 |
+
exports["default"] = function (obj) {
|
| 778 |
+
if (obj && obj.__esModule) {
|
| 779 |
+
return obj;
|
| 780 |
+
} else {
|
| 781 |
+
var newObj = {};
|
|
|
|
| 782 |
|
| 783 |
+
if (obj != null) {
|
| 784 |
+
for (var key in obj) {
|
| 785 |
+
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
| 786 |
+
}
|
| 787 |
+
}
|
| 788 |
|
| 789 |
+
newObj["default"] = obj;
|
| 790 |
+
return newObj;
|
| 791 |
+
}
|
| 792 |
+
};
|
| 793 |
|
| 794 |
+
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
| 795 |
|
| 796 |
+
/***/ }),
|
| 797 |
+
/* 4 */
|
| 798 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 799 |
|
| 800 |
+
'use strict';
|
|
|
|
|
|
|
| 801 |
|
| 802 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 803 |
|
| 804 |
+
exports.__esModule = true;
|
| 805 |
+
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
|
|
|
|
|
|
| 806 |
|
| 807 |
+
var _utils = __webpack_require__(5);
|
|
|
|
|
|
|
| 808 |
|
| 809 |
+
var _exception = __webpack_require__(6);
|
|
|
|
|
|
|
| 810 |
|
| 811 |
+
var _exception2 = _interopRequireDefault(_exception);
|
|
|
|
|
|
|
| 812 |
|
| 813 |
+
var _helpers = __webpack_require__(10);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 814 |
|
| 815 |
+
var _decorators = __webpack_require__(18);
|
|
|
|
|
|
|
|
|
|
| 816 |
|
| 817 |
+
var _logger = __webpack_require__(20);
|
|
|
|
| 818 |
|
| 819 |
+
var _logger2 = _interopRequireDefault(_logger);
|
|
|
|
| 820 |
|
| 821 |
+
var VERSION = '4.0.11';
|
| 822 |
+
exports.VERSION = VERSION;
|
| 823 |
+
var COMPILER_REVISION = 7;
|
|
|
|
|
|
|
| 824 |
|
| 825 |
+
exports.COMPILER_REVISION = COMPILER_REVISION;
|
| 826 |
+
var REVISION_CHANGES = {
|
| 827 |
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
| 828 |
+
2: '== 1.0.0-rc.3',
|
| 829 |
+
3: '== 1.0.0-rc.4',
|
| 830 |
+
4: '== 1.x.x',
|
| 831 |
+
5: '== 2.0.0-alpha.x',
|
| 832 |
+
6: '>= 2.0.0-beta.1',
|
| 833 |
+
7: '>= 4.0.0'
|
| 834 |
+
};
|
| 835 |
|
| 836 |
+
exports.REVISION_CHANGES = REVISION_CHANGES;
|
| 837 |
+
var objectType = '[object Object]';
|
|
|
|
|
|
|
|
|
|
| 838 |
|
| 839 |
+
function HandlebarsEnvironment(helpers, partials, decorators) {
|
| 840 |
+
this.helpers = helpers || {};
|
| 841 |
+
this.partials = partials || {};
|
| 842 |
+
this.decorators = decorators || {};
|
|
|
|
| 843 |
|
| 844 |
+
_helpers.registerDefaultHelpers(this);
|
| 845 |
+
_decorators.registerDefaultDecorators(this);
|
| 846 |
+
}
|
|
|
|
|
|
|
| 847 |
|
| 848 |
+
HandlebarsEnvironment.prototype = {
|
| 849 |
+
constructor: HandlebarsEnvironment,
|
|
|
|
|
|
|
|
|
|
| 850 |
|
| 851 |
+
logger: _logger2['default'],
|
| 852 |
+
log: _logger2['default'].log,
|
|
|
|
|
|
|
|
|
|
| 853 |
|
| 854 |
+
registerHelper: function registerHelper(name, fn) {
|
| 855 |
+
if (_utils.toString.call(name) === objectType) {
|
| 856 |
+
if (fn) {
|
| 857 |
+
throw new _exception2['default']('Arg not supported with multiple helpers');
|
| 858 |
+
}
|
| 859 |
+
_utils.extend(this.helpers, name);
|
| 860 |
+
} else {
|
| 861 |
+
this.helpers[name] = fn;
|
| 862 |
+
}
|
| 863 |
+
},
|
| 864 |
+
unregisterHelper: function unregisterHelper(name) {
|
| 865 |
+
delete this.helpers[name];
|
| 866 |
},
|
| 867 |
|
| 868 |
+
registerPartial: function registerPartial(name, partial) {
|
| 869 |
+
if (_utils.toString.call(name) === objectType) {
|
| 870 |
+
_utils.extend(this.partials, name);
|
| 871 |
+
} else {
|
| 872 |
+
if (typeof partial === 'undefined') {
|
| 873 |
+
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
|
| 874 |
+
}
|
| 875 |
+
this.partials[name] = partial;
|
| 876 |
+
}
|
| 877 |
},
|
| 878 |
+
unregisterPartial: function unregisterPartial(name) {
|
| 879 |
+
delete this.partials[name];
|
|
|
|
|
|
|
|
|
|
| 880 |
},
|
| 881 |
|
| 882 |
+
registerDecorator: function registerDecorator(name, fn) {
|
| 883 |
+
if (_utils.toString.call(name) === objectType) {
|
| 884 |
+
if (fn) {
|
| 885 |
+
throw new _exception2['default']('Arg not supported with multiple decorators');
|
| 886 |
+
}
|
| 887 |
+
_utils.extend(this.decorators, name);
|
| 888 |
+
} else {
|
| 889 |
+
this.decorators[name] = fn;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 890 |
}
|
| 891 |
+
},
|
| 892 |
+
unregisterDecorator: function unregisterDecorator(name) {
|
| 893 |
+
delete this.decorators[name];
|
| 894 |
}
|
| 895 |
};
|
| 896 |
|
| 897 |
+
var log = _logger2['default'].log;
|
|
|
|
|
|
|
|
|
|
| 898 |
|
| 899 |
+
exports.log = log;
|
| 900 |
+
exports.createFrame = _utils.createFrame;
|
| 901 |
+
exports.logger = _logger2['default'];
|
| 902 |
|
| 903 |
+
/***/ }),
|
| 904 |
+
/* 5 */
|
| 905 |
+
/***/ (function(module, exports) {
|
| 906 |
|
| 907 |
+
'use strict';
|
| 908 |
|
| 909 |
exports.__esModule = true;
|
| 910 |
+
exports.extend = extend;
|
| 911 |
+
exports.indexOf = indexOf;
|
| 912 |
+
exports.escapeExpression = escapeExpression;
|
| 913 |
+
exports.isEmpty = isEmpty;
|
| 914 |
+
exports.createFrame = createFrame;
|
| 915 |
+
exports.blockParams = blockParams;
|
| 916 |
+
exports.appendContextPath = appendContextPath;
|
| 917 |
+
var escape = {
|
| 918 |
+
'&': '&',
|
| 919 |
+
'<': '<',
|
| 920 |
+
'>': '>',
|
| 921 |
+
'"': '"',
|
| 922 |
+
"'": ''',
|
| 923 |
+
'`': '`',
|
| 924 |
+
'=': '='
|
| 925 |
+
};
|
| 926 |
+
|
| 927 |
+
var badChars = /[&<>"'`=]/g,
|
| 928 |
+
possible = /[&<>"'`=]/;
|
| 929 |
+
|
| 930 |
+
function escapeChar(chr) {
|
| 931 |
+
return escape[chr];
|
| 932 |
+
}
|
| 933 |
|
| 934 |
+
function extend(obj /* , ...source */) {
|
| 935 |
+
for (var i = 1; i < arguments.length; i++) {
|
| 936 |
+
for (var key in arguments[i]) {
|
| 937 |
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
| 938 |
+
obj[key] = arguments[i][key];
|
| 939 |
+
}
|
| 940 |
+
}
|
| 941 |
+
}
|
| 942 |
|
| 943 |
+
return obj;
|
| 944 |
+
}
|
| 945 |
|
| 946 |
+
var toString = Object.prototype.toString;
|
| 947 |
|
| 948 |
+
exports.toString = toString;
|
| 949 |
+
// Sourced from lodash
|
| 950 |
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
| 951 |
+
/* eslint-disable func-style */
|
| 952 |
+
var isFunction = function isFunction(value) {
|
| 953 |
+
return typeof value === 'function';
|
| 954 |
+
};
|
| 955 |
+
// fallback for older versions of Chrome and Safari
|
| 956 |
+
/* istanbul ignore next */
|
| 957 |
+
if (isFunction(/x/)) {
|
| 958 |
+
exports.isFunction = isFunction = function (value) {
|
| 959 |
+
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
| 960 |
+
};
|
| 961 |
+
}
|
| 962 |
+
exports.isFunction = isFunction;
|
| 963 |
|
| 964 |
+
/* eslint-enable func-style */
|
| 965 |
|
| 966 |
+
/* istanbul ignore next */
|
| 967 |
+
var isArray = Array.isArray || function (value) {
|
| 968 |
+
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
| 969 |
+
};
|
| 970 |
|
| 971 |
+
exports.isArray = isArray;
|
| 972 |
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
| 973 |
|
| 974 |
+
function indexOf(array, value) {
|
| 975 |
+
for (var i = 0, len = array.length; i < len; i++) {
|
| 976 |
+
if (array[i] === value) {
|
| 977 |
+
return i;
|
| 978 |
+
}
|
| 979 |
+
}
|
| 980 |
+
return -1;
|
| 981 |
+
}
|
| 982 |
|
| 983 |
+
function escapeExpression(string) {
|
| 984 |
+
if (typeof string !== 'string') {
|
| 985 |
+
// don't escape SafeStrings, since they're already safe
|
| 986 |
+
if (string && string.toHTML) {
|
| 987 |
+
return string.toHTML();
|
| 988 |
+
} else if (string == null) {
|
| 989 |
+
return '';
|
| 990 |
+
} else if (!string) {
|
| 991 |
+
return string + '';
|
| 992 |
+
}
|
| 993 |
|
| 994 |
+
// Force a string conversion as this will be done by the append regardless and
|
| 995 |
+
// the regex test will do this transparently behind the scenes, causing issues if
|
| 996 |
+
// an object's to string has escaped characters in it.
|
| 997 |
+
string = '' + string;
|
| 998 |
+
}
|
| 999 |
|
| 1000 |
+
if (!possible.test(string)) {
|
| 1001 |
+
return string;
|
| 1002 |
+
}
|
| 1003 |
+
return string.replace(badChars, escapeChar);
|
| 1004 |
+
}
|
| 1005 |
|
| 1006 |
+
function isEmpty(value) {
|
| 1007 |
+
if (!value && value !== 0) {
|
| 1008 |
+
return true;
|
| 1009 |
+
} else if (isArray(value) && value.length === 0) {
|
| 1010 |
+
return true;
|
| 1011 |
+
} else {
|
| 1012 |
+
return false;
|
| 1013 |
}
|
| 1014 |
+
}
|
| 1015 |
|
| 1016 |
+
function createFrame(object) {
|
| 1017 |
+
var frame = extend({}, object);
|
| 1018 |
+
frame._parent = object;
|
| 1019 |
+
return frame;
|
| 1020 |
+
}
|
| 1021 |
|
| 1022 |
+
function blockParams(params, ids) {
|
| 1023 |
+
params.path = ids;
|
| 1024 |
+
return params;
|
| 1025 |
+
}
|
| 1026 |
|
| 1027 |
+
function appendContextPath(contextPath, id) {
|
| 1028 |
+
return (contextPath ? contextPath + '.' : '') + id;
|
| 1029 |
}
|
| 1030 |
|
| 1031 |
+
/***/ }),
|
| 1032 |
+
/* 6 */
|
| 1033 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1034 |
|
| 1035 |
'use strict';
|
| 1036 |
|
| 1037 |
+
var _Object$defineProperty = __webpack_require__(7)['default'];
|
| 1038 |
|
| 1039 |
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
| 1040 |
|
| 1041 |
+
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
| 1042 |
|
| 1043 |
+
function Exception(message, node) {
|
| 1044 |
+
var loc = node && node.loc,
|
| 1045 |
+
line = undefined,
|
| 1046 |
+
column = undefined;
|
| 1047 |
+
if (loc) {
|
| 1048 |
+
line = loc.start.line;
|
| 1049 |
+
column = loc.start.column;
|
| 1050 |
|
| 1051 |
+
message += ' - ' + line + ':' + column;
|
| 1052 |
+
}
|
| 1053 |
|
| 1054 |
+
var tmp = Error.prototype.constructor.call(this, message);
|
| 1055 |
|
| 1056 |
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
| 1057 |
+
for (var idx = 0; idx < errorProps.length; idx++) {
|
| 1058 |
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
| 1059 |
+
}
|
| 1060 |
|
| 1061 |
+
/* istanbul ignore else */
|
| 1062 |
+
if (Error.captureStackTrace) {
|
| 1063 |
+
Error.captureStackTrace(this, Exception);
|
| 1064 |
+
}
|
| 1065 |
|
| 1066 |
+
try {
|
| 1067 |
+
if (loc) {
|
| 1068 |
+
this.lineNumber = line;
|
| 1069 |
+
|
| 1070 |
+
// Work around issue under safari where we can't directly set the column value
|
| 1071 |
+
/* istanbul ignore next */
|
| 1072 |
+
if (_Object$defineProperty) {
|
| 1073 |
+
Object.defineProperty(this, 'column', {
|
| 1074 |
+
value: column,
|
| 1075 |
+
enumerable: true
|
| 1076 |
+
});
|
| 1077 |
+
} else {
|
| 1078 |
+
this.column = column;
|
| 1079 |
+
}
|
| 1080 |
+
}
|
| 1081 |
+
} catch (nop) {
|
| 1082 |
+
/* Ignore if the browser is very particular */
|
| 1083 |
+
}
|
| 1084 |
+
}
|
| 1085 |
|
| 1086 |
+
Exception.prototype = new Error();
|
|
|
|
|
|
|
|
|
|
| 1087 |
|
| 1088 |
+
exports['default'] = Exception;
|
| 1089 |
+
module.exports = exports['default'];
|
| 1090 |
|
| 1091 |
+
/***/ }),
|
| 1092 |
+
/* 7 */
|
| 1093 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
| 1094 |
|
| 1095 |
+
module.exports = { "default": __webpack_require__(8), __esModule: true };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1096 |
|
| 1097 |
+
/***/ }),
|
| 1098 |
+
/* 8 */
|
| 1099 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1100 |
|
| 1101 |
+
var $ = __webpack_require__(9);
|
| 1102 |
+
module.exports = function defineProperty(it, key, desc){
|
| 1103 |
+
return $.setDesc(it, key, desc);
|
| 1104 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1105 |
|
| 1106 |
+
/***/ }),
|
| 1107 |
+
/* 9 */
|
| 1108 |
+
/***/ (function(module, exports) {
|
| 1109 |
+
|
| 1110 |
+
var $Object = Object;
|
| 1111 |
+
module.exports = {
|
| 1112 |
+
create: $Object.create,
|
| 1113 |
+
getProto: $Object.getPrototypeOf,
|
| 1114 |
+
isEnum: {}.propertyIsEnumerable,
|
| 1115 |
+
getDesc: $Object.getOwnPropertyDescriptor,
|
| 1116 |
+
setDesc: $Object.defineProperty,
|
| 1117 |
+
setDescs: $Object.defineProperties,
|
| 1118 |
+
getKeys: $Object.keys,
|
| 1119 |
+
getNames: $Object.getOwnPropertyNames,
|
| 1120 |
+
getSymbols: $Object.getOwnPropertySymbols,
|
| 1121 |
+
each: [].forEach
|
| 1122 |
+
};
|
| 1123 |
|
| 1124 |
+
/***/ }),
|
| 1125 |
+
/* 10 */
|
| 1126 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
| 1127 |
|
| 1128 |
+
'use strict';
|
| 1129 |
|
| 1130 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
| 1131 |
|
| 1132 |
+
exports.__esModule = true;
|
| 1133 |
+
exports.registerDefaultHelpers = registerDefaultHelpers;
|
| 1134 |
|
| 1135 |
+
var _helpersBlockHelperMissing = __webpack_require__(11);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1136 |
|
| 1137 |
+
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
|
|
|
| 1138 |
|
| 1139 |
+
var _helpersEach = __webpack_require__(12);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1140 |
|
| 1141 |
+
var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
| 1142 |
|
| 1143 |
+
var _helpersHelperMissing = __webpack_require__(13);
|
|
|
|
| 1144 |
|
| 1145 |
+
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
|
|
|
| 1146 |
|
| 1147 |
+
var _helpersIf = __webpack_require__(14);
|
|
|
|
| 1148 |
|
| 1149 |
+
var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
|
|
|
| 1150 |
|
| 1151 |
+
var _helpersLog = __webpack_require__(15);
|
|
|
|
| 1152 |
|
| 1153 |
+
var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
| 1154 |
|
| 1155 |
+
var _helpersLookup = __webpack_require__(16);
|
|
|
|
|
|
|
|
|
|
| 1156 |
|
| 1157 |
+
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1158 |
|
| 1159 |
+
var _helpersWith = __webpack_require__(17);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1160 |
|
| 1161 |
+
var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
|
|
|
| 1162 |
|
| 1163 |
+
function registerDefaultHelpers(instance) {
|
| 1164 |
+
_helpersBlockHelperMissing2['default'](instance);
|
| 1165 |
+
_helpersEach2['default'](instance);
|
| 1166 |
+
_helpersHelperMissing2['default'](instance);
|
| 1167 |
+
_helpersIf2['default'](instance);
|
| 1168 |
+
_helpersLog2['default'](instance);
|
| 1169 |
+
_helpersLookup2['default'](instance);
|
| 1170 |
+
_helpersWith2['default'](instance);
|
| 1171 |
+
}
|
| 1172 |
|
| 1173 |
+
/***/ }),
|
| 1174 |
+
/* 11 */
|
| 1175 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
| 1176 |
|
| 1177 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1178 |
|
| 1179 |
+
exports.__esModule = true;
|
| 1180 |
|
| 1181 |
+
var _utils = __webpack_require__(5);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1182 |
|
| 1183 |
+
exports['default'] = function (instance) {
|
| 1184 |
+
instance.registerHelper('blockHelperMissing', function (context, options) {
|
| 1185 |
+
var inverse = options.inverse,
|
| 1186 |
+
fn = options.fn;
|
| 1187 |
|
| 1188 |
+
if (context === true) {
|
| 1189 |
+
return fn(this);
|
| 1190 |
+
} else if (context === false || context == null) {
|
| 1191 |
+
return inverse(this);
|
| 1192 |
+
} else if (_utils.isArray(context)) {
|
| 1193 |
+
if (context.length > 0) {
|
| 1194 |
+
if (options.ids) {
|
| 1195 |
+
options.ids = [options.name];
|
| 1196 |
+
}
|
| 1197 |
|
| 1198 |
+
return instance.helpers.each(context, options);
|
| 1199 |
+
} else {
|
| 1200 |
+
return inverse(this);
|
| 1201 |
+
}
|
| 1202 |
} else {
|
| 1203 |
+
if (options.data && options.ids) {
|
| 1204 |
+
var data = _utils.createFrame(options.data);
|
| 1205 |
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
| 1206 |
+
options = { data: data };
|
| 1207 |
+
}
|
| 1208 |
|
| 1209 |
+
return fn(context, options);
|
|
|
|
|
|
|
| 1210 |
}
|
| 1211 |
+
});
|
| 1212 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1213 |
|
| 1214 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1215 |
|
| 1216 |
+
/***/ }),
|
| 1217 |
+
/* 12 */
|
| 1218 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1219 |
|
| 1220 |
+
'use strict';
|
|
|
|
| 1221 |
|
| 1222 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 1223 |
|
| 1224 |
+
exports.__esModule = true;
|
|
|
|
| 1225 |
|
| 1226 |
+
var _utils = __webpack_require__(5);
|
|
|
|
|
|
|
|
|
|
| 1227 |
|
| 1228 |
+
var _exception = __webpack_require__(6);
|
|
|
|
|
|
|
|
|
|
| 1229 |
|
| 1230 |
+
var _exception2 = _interopRequireDefault(_exception);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1231 |
|
| 1232 |
+
exports['default'] = function (instance) {
|
| 1233 |
+
instance.registerHelper('each', function (context, options) {
|
| 1234 |
+
if (!options) {
|
| 1235 |
+
throw new _exception2['default']('Must pass iterator to #each');
|
| 1236 |
}
|
|
|
|
| 1237 |
|
| 1238 |
+
var fn = options.fn,
|
| 1239 |
+
inverse = options.inverse,
|
| 1240 |
+
i = 0,
|
| 1241 |
+
ret = '',
|
| 1242 |
+
data = undefined,
|
| 1243 |
+
contextPath = undefined;
|
| 1244 |
|
| 1245 |
+
if (options.data && options.ids) {
|
| 1246 |
+
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
| 1247 |
+
}
|
| 1248 |
|
| 1249 |
+
if (_utils.isFunction(context)) {
|
| 1250 |
+
context = context.call(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1251 |
}
|
|
|
|
| 1252 |
|
| 1253 |
+
if (options.data) {
|
| 1254 |
+
data = _utils.createFrame(options.data);
|
| 1255 |
+
}
|
| 1256 |
|
| 1257 |
+
function execIteration(field, index, last) {
|
| 1258 |
+
if (data) {
|
| 1259 |
+
data.key = field;
|
| 1260 |
+
data.index = index;
|
| 1261 |
+
data.first = index === 0;
|
| 1262 |
+
data.last = !!last;
|
| 1263 |
|
| 1264 |
+
if (contextPath) {
|
| 1265 |
+
data.contextPath = contextPath + field;
|
| 1266 |
+
}
|
| 1267 |
+
}
|
| 1268 |
|
| 1269 |
+
ret = ret + fn(context[field], {
|
| 1270 |
+
data: data,
|
| 1271 |
+
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
| 1272 |
+
});
|
| 1273 |
+
}
|
| 1274 |
|
| 1275 |
+
if (context && typeof context === 'object') {
|
| 1276 |
+
if (_utils.isArray(context)) {
|
| 1277 |
+
for (var j = context.length; i < j; i++) {
|
| 1278 |
+
if (i in context) {
|
| 1279 |
+
execIteration(i, i, i === context.length - 1);
|
| 1280 |
+
}
|
| 1281 |
+
}
|
| 1282 |
+
} else {
|
| 1283 |
+
var priorKey = undefined;
|
|
|
|
| 1284 |
|
| 1285 |
+
for (var key in context) {
|
| 1286 |
+
if (context.hasOwnProperty(key)) {
|
| 1287 |
+
// We're running the iterations one step out of sync so we can detect
|
| 1288 |
+
// the last iteration without have to scan the object twice and create
|
| 1289 |
+
// an itermediate keys array.
|
| 1290 |
+
if (priorKey !== undefined) {
|
| 1291 |
+
execIteration(priorKey, i - 1);
|
| 1292 |
+
}
|
| 1293 |
+
priorKey = key;
|
| 1294 |
+
i++;
|
| 1295 |
+
}
|
| 1296 |
+
}
|
| 1297 |
+
if (priorKey !== undefined) {
|
| 1298 |
+
execIteration(priorKey, i - 1, true);
|
| 1299 |
+
}
|
| 1300 |
+
}
|
| 1301 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1302 |
|
| 1303 |
+
if (i === 0) {
|
| 1304 |
+
ret = inverse(this);
|
|
|
|
| 1305 |
}
|
| 1306 |
|
| 1307 |
+
return ret;
|
| 1308 |
+
});
|
| 1309 |
+
};
|
| 1310 |
|
| 1311 |
+
module.exports = exports['default'];
|
|
|
|
| 1312 |
|
| 1313 |
+
/***/ }),
|
| 1314 |
+
/* 13 */
|
| 1315 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1316 |
|
| 1317 |
+
'use strict';
|
|
|
|
|
|
|
| 1318 |
|
| 1319 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
|
|
|
|
|
|
| 1320 |
|
| 1321 |
+
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1322 |
|
| 1323 |
+
var _exception = __webpack_require__(6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1324 |
|
| 1325 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 1326 |
+
|
| 1327 |
+
exports['default'] = function (instance) {
|
| 1328 |
+
instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
| 1329 |
+
if (arguments.length === 1) {
|
| 1330 |
+
// A missing field in a {{foo}} construct.
|
| 1331 |
+
return undefined;
|
| 1332 |
} else {
|
| 1333 |
+
// Someone is actually trying to call something, blow up.
|
| 1334 |
+
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
| 1335 |
}
|
| 1336 |
+
});
|
| 1337 |
+
};
|
| 1338 |
|
| 1339 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1340 |
|
| 1341 |
+
/***/ }),
|
| 1342 |
+
/* 14 */
|
| 1343 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1344 |
|
| 1345 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
| 1346 |
|
| 1347 |
+
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1348 |
|
| 1349 |
+
var _utils = __webpack_require__(5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1350 |
|
| 1351 |
+
exports['default'] = function (instance) {
|
| 1352 |
+
instance.registerHelper('if', function (conditional, options) {
|
| 1353 |
+
if (_utils.isFunction(conditional)) {
|
| 1354 |
+
conditional = conditional.call(this);
|
| 1355 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1356 |
|
| 1357 |
+
// Default behavior is to render the positive path if the value is truthy and not empty.
|
| 1358 |
+
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
| 1359 |
+
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
| 1360 |
+
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
| 1361 |
+
return options.inverse(this);
|
| 1362 |
} else {
|
| 1363 |
+
return options.fn(this);
|
| 1364 |
}
|
| 1365 |
+
});
|
| 1366 |
|
| 1367 |
+
instance.registerHelper('unless', function (conditional, options) {
|
| 1368 |
+
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
| 1369 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1370 |
};
|
| 1371 |
|
| 1372 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
| 1373 |
|
| 1374 |
+
/***/ }),
|
| 1375 |
+
/* 15 */
|
| 1376 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1377 |
|
| 1378 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
| 1379 |
|
| 1380 |
+
exports.__esModule = true;
|
|
|
|
| 1381 |
|
| 1382 |
+
exports['default'] = function (instance) {
|
| 1383 |
+
instance.registerHelper('log', function () /* message, options */{
|
| 1384 |
+
var args = [undefined],
|
| 1385 |
+
options = arguments[arguments.length - 1];
|
| 1386 |
+
for (var i = 0; i < arguments.length - 1; i++) {
|
| 1387 |
+
args.push(arguments[i]);
|
| 1388 |
+
}
|
| 1389 |
|
| 1390 |
+
var level = 1;
|
| 1391 |
+
if (options.hash.level != null) {
|
| 1392 |
+
level = options.hash.level;
|
| 1393 |
+
} else if (options.data && options.data.level != null) {
|
| 1394 |
+
level = options.data.level;
|
| 1395 |
+
}
|
| 1396 |
+
args[0] = level;
|
| 1397 |
|
| 1398 |
+
instance.log.apply(instance, args);
|
| 1399 |
+
});
|
| 1400 |
+
};
|
| 1401 |
|
| 1402 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1403 |
|
| 1404 |
+
/***/ }),
|
| 1405 |
+
/* 16 */
|
| 1406 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1407 |
|
| 1408 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
| 1409 |
|
| 1410 |
+
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1411 |
|
| 1412 |
+
exports['default'] = function (instance) {
|
| 1413 |
+
instance.registerHelper('lookup', function (obj, field) {
|
| 1414 |
+
return obj && obj[field];
|
| 1415 |
+
});
|
| 1416 |
+
};
|
|
|
|
|
|
|
|
|
|
| 1417 |
|
| 1418 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
| 1419 |
|
| 1420 |
+
/***/ }),
|
| 1421 |
+
/* 17 */
|
| 1422 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1423 |
|
| 1424 |
+
'use strict';
|
| 1425 |
|
| 1426 |
exports.__esModule = true;
|
| 1427 |
|
| 1428 |
+
var _utils = __webpack_require__(5);
|
| 1429 |
|
| 1430 |
+
exports['default'] = function (instance) {
|
| 1431 |
+
instance.registerHelper('with', function (context, options) {
|
| 1432 |
+
if (_utils.isFunction(context)) {
|
| 1433 |
+
context = context.call(this);
|
| 1434 |
+
}
|
| 1435 |
|
| 1436 |
+
var fn = options.fn;
|
| 1437 |
|
| 1438 |
+
if (!_utils.isEmpty(context)) {
|
| 1439 |
+
var data = options.data;
|
| 1440 |
+
if (options.data && options.ids) {
|
| 1441 |
+
data = _utils.createFrame(options.data);
|
| 1442 |
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
| 1443 |
+
}
|
| 1444 |
|
| 1445 |
+
return fn(context, {
|
| 1446 |
+
data: data,
|
| 1447 |
+
blockParams: _utils.blockParams([context], [data && data.contextPath])
|
| 1448 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1449 |
} else {
|
| 1450 |
+
return options.inverse(this);
|
| 1451 |
}
|
| 1452 |
+
});
|
| 1453 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1454 |
|
| 1455 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1456 |
|
| 1457 |
+
/***/ }),
|
| 1458 |
+
/* 18 */
|
| 1459 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1460 |
|
| 1461 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
| 1462 |
|
| 1463 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1464 |
|
| 1465 |
+
exports.__esModule = true;
|
| 1466 |
+
exports.registerDefaultDecorators = registerDefaultDecorators;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1467 |
|
| 1468 |
+
var _decoratorsInline = __webpack_require__(19);
|
| 1469 |
|
| 1470 |
+
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1471 |
|
| 1472 |
+
function registerDefaultDecorators(instance) {
|
| 1473 |
+
_decoratorsInline2['default'](instance);
|
| 1474 |
+
}
|
| 1475 |
|
| 1476 |
+
/***/ }),
|
| 1477 |
+
/* 19 */
|
| 1478 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1479 |
|
| 1480 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1481 |
|
| 1482 |
+
exports.__esModule = true;
|
|
|
|
| 1483 |
|
| 1484 |
+
var _utils = __webpack_require__(5);
|
| 1485 |
+
|
| 1486 |
+
exports['default'] = function (instance) {
|
| 1487 |
+
instance.registerDecorator('inline', function (fn, props, container, options) {
|
| 1488 |
+
var ret = fn;
|
| 1489 |
+
if (!props.partials) {
|
| 1490 |
+
props.partials = {};
|
| 1491 |
+
ret = function (context, options) {
|
| 1492 |
+
// Create a new partials stack frame prior to exec.
|
| 1493 |
+
var original = container.partials;
|
| 1494 |
+
container.partials = _utils.extend({}, original, props.partials);
|
| 1495 |
+
var ret = fn(context, options);
|
| 1496 |
+
container.partials = original;
|
| 1497 |
+
return ret;
|
| 1498 |
+
};
|
| 1499 |
}
|
| 1500 |
|
| 1501 |
+
props.partials[options.args[0]] = options.fn;
|
|
|
|
|
|
|
| 1502 |
|
| 1503 |
+
return ret;
|
| 1504 |
+
});
|
| 1505 |
+
};
|
|
|
|
| 1506 |
|
| 1507 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1508 |
|
| 1509 |
+
/***/ }),
|
| 1510 |
+
/* 20 */
|
| 1511 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1512 |
|
| 1513 |
+
'use strict';
|
|
|
|
| 1514 |
|
| 1515 |
+
exports.__esModule = true;
|
|
|
|
| 1516 |
|
| 1517 |
+
var _utils = __webpack_require__(5);
|
| 1518 |
+
|
| 1519 |
+
var logger = {
|
| 1520 |
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
| 1521 |
+
level: 'info',
|
| 1522 |
+
|
| 1523 |
+
// Maps a given level value to the `methodMap` indexes above.
|
| 1524 |
+
lookupLevel: function lookupLevel(level) {
|
| 1525 |
+
if (typeof level === 'string') {
|
| 1526 |
+
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
| 1527 |
+
if (levelMap >= 0) {
|
| 1528 |
+
level = levelMap;
|
| 1529 |
} else {
|
| 1530 |
+
level = parseInt(level, 10);
|
| 1531 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1532 |
}
|
|
|
|
| 1533 |
|
| 1534 |
+
return level;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1535 |
},
|
| 1536 |
|
| 1537 |
+
// Can be overridden in the host environment
|
| 1538 |
+
log: function log(level) {
|
| 1539 |
+
level = logger.lookupLevel(level);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1540 |
|
| 1541 |
+
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
| 1542 |
+
var method = logger.methodMap[level];
|
| 1543 |
+
if (!console[method]) {
|
| 1544 |
+
// eslint-disable-line no-console
|
| 1545 |
+
method = 'log';
|
| 1546 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1547 |
|
| 1548 |
+
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
| 1549 |
+
message[_key - 1] = arguments[_key];
|
|
|
|
| 1550 |
}
|
| 1551 |
+
|
| 1552 |
+
console[method].apply(console, message); // eslint-disable-line no-console
|
| 1553 |
}
|
| 1554 |
+
}
|
| 1555 |
+
};
|
| 1556 |
|
| 1557 |
+
exports['default'] = logger;
|
| 1558 |
+
module.exports = exports['default'];
|
| 1559 |
|
| 1560 |
+
/***/ }),
|
| 1561 |
+
/* 21 */
|
| 1562 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
| 1563 |
|
| 1564 |
+
// Build out our basic SafeString type
|
| 1565 |
+
'use strict';
|
| 1566 |
|
| 1567 |
+
exports.__esModule = true;
|
| 1568 |
+
function SafeString(string) {
|
| 1569 |
+
this.string = string;
|
| 1570 |
+
}
|
| 1571 |
|
| 1572 |
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
| 1573 |
+
return '' + this.string;
|
| 1574 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1575 |
|
| 1576 |
+
exports['default'] = SafeString;
|
| 1577 |
+
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1578 |
|
| 1579 |
+
/***/ }),
|
| 1580 |
+
/* 22 */
|
| 1581 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1582 |
|
| 1583 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1584 |
|
| 1585 |
+
var _Object$seal = __webpack_require__(23)['default'];
|
|
|
|
|
|
|
| 1586 |
|
| 1587 |
+
var _interopRequireWildcard = __webpack_require__(3)['default'];
|
|
|
|
| 1588 |
|
| 1589 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1590 |
|
| 1591 |
+
exports.__esModule = true;
|
| 1592 |
+
exports.checkRevision = checkRevision;
|
| 1593 |
+
exports.template = template;
|
| 1594 |
+
exports.wrapProgram = wrapProgram;
|
| 1595 |
+
exports.resolvePartial = resolvePartial;
|
| 1596 |
+
exports.invokePartial = invokePartial;
|
| 1597 |
+
exports.noop = noop;
|
| 1598 |
|
| 1599 |
+
var _utils = __webpack_require__(5);
|
|
|
|
| 1600 |
|
| 1601 |
+
var Utils = _interopRequireWildcard(_utils);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1602 |
|
| 1603 |
+
var _exception = __webpack_require__(6);
|
| 1604 |
|
| 1605 |
+
var _exception2 = _interopRequireDefault(_exception);
|
|
|
|
| 1606 |
|
| 1607 |
+
var _base = __webpack_require__(4);
|
|
|
|
| 1608 |
|
| 1609 |
+
function checkRevision(compilerInfo) {
|
| 1610 |
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
| 1611 |
+
currentRevision = _base.COMPILER_REVISION;
|
| 1612 |
+
|
| 1613 |
+
if (compilerRevision !== currentRevision) {
|
| 1614 |
+
if (compilerRevision < currentRevision) {
|
| 1615 |
+
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
| 1616 |
+
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
| 1617 |
+
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 + ').');
|
| 1618 |
} else {
|
| 1619 |
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
| 1620 |
+
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] + ').');
|
| 1621 |
}
|
| 1622 |
+
}
|
| 1623 |
+
}
|
| 1624 |
|
| 1625 |
+
function template(templateSpec, env) {
|
| 1626 |
+
/* istanbul ignore next */
|
| 1627 |
+
if (!env) {
|
| 1628 |
+
throw new _exception2['default']('No environment passed to template');
|
| 1629 |
+
}
|
| 1630 |
+
if (!templateSpec || !templateSpec.main) {
|
| 1631 |
+
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
| 1632 |
+
}
|
| 1633 |
|
| 1634 |
+
templateSpec.main.decorator = templateSpec.main_d;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1635 |
|
| 1636 |
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
| 1637 |
+
// for external users to override these as psuedo-supported APIs.
|
| 1638 |
+
env.VM.checkRevision(templateSpec.compiler);
|
| 1639 |
+
|
| 1640 |
+
function invokePartialWrapper(partial, context, options) {
|
| 1641 |
+
if (options.hash) {
|
| 1642 |
+
context = Utils.extend({}, context, options.hash);
|
| 1643 |
+
if (options.ids) {
|
| 1644 |
+
options.ids[0] = true;
|
| 1645 |
}
|
| 1646 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1647 |
|
| 1648 |
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
| 1649 |
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1650 |
|
| 1651 |
+
if (result == null && env.compile) {
|
| 1652 |
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
| 1653 |
+
result = options.partials[options.name](context, options);
|
| 1654 |
+
}
|
| 1655 |
+
if (result != null) {
|
| 1656 |
+
if (options.indent) {
|
| 1657 |
+
var lines = result.split('\n');
|
| 1658 |
+
for (var i = 0, l = lines.length; i < l; i++) {
|
| 1659 |
+
if (!lines[i] && i + 1 === l) {
|
| 1660 |
+
break;
|
| 1661 |
+
}
|
| 1662 |
|
| 1663 |
+
lines[i] = options.indent + lines[i];
|
| 1664 |
+
}
|
| 1665 |
+
result = lines.join('\n');
|
| 1666 |
+
}
|
| 1667 |
+
return result;
|
| 1668 |
} else {
|
| 1669 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
| 1670 |
}
|
| 1671 |
+
}
|
| 1672 |
|
| 1673 |
+
// Just add water
|
| 1674 |
+
var container = {
|
| 1675 |
+
strict: function strict(obj, name) {
|
| 1676 |
+
if (!(name in obj)) {
|
| 1677 |
+
throw new _exception2['default']('"' + name + '" not defined in ' + obj);
|
| 1678 |
+
}
|
| 1679 |
+
return obj[name];
|
| 1680 |
+
},
|
| 1681 |
+
lookup: function lookup(depths, name) {
|
| 1682 |
+
var len = depths.length;
|
| 1683 |
+
for (var i = 0; i < len; i++) {
|
| 1684 |
+
if (depths[i] && depths[i][name] != null) {
|
| 1685 |
+
return depths[i][name];
|
| 1686 |
+
}
|
| 1687 |
+
}
|
| 1688 |
+
},
|
| 1689 |
+
lambda: function lambda(current, context) {
|
| 1690 |
+
return typeof current === 'function' ? current.call(context) : current;
|
| 1691 |
+
},
|
| 1692 |
|
| 1693 |
+
escapeExpression: Utils.escapeExpression,
|
| 1694 |
+
invokePartial: invokePartialWrapper,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1695 |
|
| 1696 |
+
fn: function fn(i) {
|
| 1697 |
+
var ret = templateSpec[i];
|
| 1698 |
+
ret.decorator = templateSpec[i + '_d'];
|
| 1699 |
+
return ret;
|
| 1700 |
+
},
|
| 1701 |
|
| 1702 |
+
programs: [],
|
| 1703 |
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
| 1704 |
+
var programWrapper = this.programs[i],
|
| 1705 |
+
fn = this.fn(i);
|
| 1706 |
+
if (data || depths || blockParams || declaredBlockParams) {
|
| 1707 |
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
| 1708 |
+
} else if (!programWrapper) {
|
| 1709 |
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
| 1710 |
+
}
|
| 1711 |
+
return programWrapper;
|
| 1712 |
+
},
|
|
|
|
| 1713 |
|
| 1714 |
+
data: function data(value, depth) {
|
| 1715 |
+
while (value && depth--) {
|
| 1716 |
+
value = value._parent;
|
| 1717 |
+
}
|
| 1718 |
+
return value;
|
| 1719 |
+
},
|
| 1720 |
+
merge: function merge(param, common) {
|
| 1721 |
+
var obj = param || common;
|
| 1722 |
|
| 1723 |
+
if (param && common && param !== common) {
|
| 1724 |
+
obj = Utils.extend({}, common, param);
|
| 1725 |
+
}
|
| 1726 |
|
| 1727 |
+
return obj;
|
| 1728 |
+
},
|
| 1729 |
+
// An empty object to use as replacement for null-contexts
|
| 1730 |
+
nullContext: _Object$seal({}),
|
| 1731 |
|
| 1732 |
+
noop: env.VM.noop,
|
| 1733 |
+
compilerInfo: templateSpec.compiler
|
| 1734 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1735 |
|
| 1736 |
+
function ret(context) {
|
| 1737 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1738 |
|
| 1739 |
+
var data = options.data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1740 |
|
| 1741 |
+
ret._setup(options);
|
| 1742 |
+
if (!options.partial && templateSpec.useData) {
|
| 1743 |
+
data = initData(context, data);
|
| 1744 |
+
}
|
| 1745 |
+
var depths = undefined,
|
| 1746 |
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
| 1747 |
+
if (templateSpec.useDepths) {
|
| 1748 |
+
if (options.depths) {
|
| 1749 |
+
depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
| 1750 |
} else {
|
| 1751 |
+
depths = [context];
|
| 1752 |
}
|
| 1753 |
}
|
|
|
|
| 1754 |
|
| 1755 |
+
function main(context /*, options*/) {
|
| 1756 |
+
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1757 |
}
|
| 1758 |
+
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
| 1759 |
+
return main(context, options);
|
| 1760 |
+
}
|
| 1761 |
+
ret.isTop = true;
|
| 1762 |
+
|
| 1763 |
+
ret._setup = function (options) {
|
| 1764 |
+
if (!options.partial) {
|
| 1765 |
+
container.helpers = container.merge(options.helpers, env.helpers);
|
| 1766 |
+
|
| 1767 |
+
if (templateSpec.usePartial) {
|
| 1768 |
+
container.partials = container.merge(options.partials, env.partials);
|
| 1769 |
+
}
|
| 1770 |
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
| 1771 |
+
container.decorators = container.merge(options.decorators, env.decorators);
|
| 1772 |
+
}
|
| 1773 |
+
} else {
|
| 1774 |
+
container.helpers = options.helpers;
|
| 1775 |
+
container.partials = options.partials;
|
| 1776 |
+
container.decorators = options.decorators;
|
| 1777 |
}
|
| 1778 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1779 |
|
| 1780 |
+
ret._child = function (i, data, blockParams, depths) {
|
| 1781 |
+
if (templateSpec.useBlockParams && !blockParams) {
|
| 1782 |
+
throw new _exception2['default']('must pass block params');
|
| 1783 |
}
|
| 1784 |
+
if (templateSpec.useDepths && !depths) {
|
| 1785 |
+
throw new _exception2['default']('must pass parent depths');
|
|
|
|
| 1786 |
}
|
| 1787 |
|
| 1788 |
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
| 1789 |
+
};
|
| 1790 |
+
return ret;
|
| 1791 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1792 |
|
| 1793 |
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
| 1794 |
+
function prog(context) {
|
| 1795 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1796 |
|
| 1797 |
+
var currentDepths = depths;
|
| 1798 |
+
if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
| 1799 |
+
currentDepths = [context].concat(depths);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1800 |
}
|
|
|
|
| 1801 |
|
| 1802 |
+
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
| 1803 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1804 |
|
| 1805 |
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
| 1806 |
+
|
| 1807 |
+
prog.program = i;
|
| 1808 |
+
prog.depth = depths ? depths.length : 0;
|
| 1809 |
+
prog.blockParams = declaredBlockParams || 0;
|
| 1810 |
+
return prog;
|
| 1811 |
+
}
|
| 1812 |
+
|
| 1813 |
+
function resolvePartial(partial, context, options) {
|
| 1814 |
+
if (!partial) {
|
| 1815 |
+
if (options.name === '@partial-block') {
|
| 1816 |
+
partial = options.data['partial-block'];
|
| 1817 |
+
} else {
|
| 1818 |
+
partial = options.partials[options.name];
|
| 1819 |
}
|
| 1820 |
+
} else if (!partial.call && !options.name) {
|
| 1821 |
+
// This is a dynamic partial that returned a string
|
| 1822 |
+
options.name = partial;
|
| 1823 |
+
partial = options.partials[partial];
|
| 1824 |
+
}
|
| 1825 |
+
return partial;
|
| 1826 |
+
}
|
| 1827 |
|
| 1828 |
+
function invokePartial(partial, context, options) {
|
| 1829 |
+
// Use the current closure context to save the partial-block if this partial
|
| 1830 |
+
var currentPartialBlock = options.data && options.data['partial-block'];
|
| 1831 |
+
options.partial = true;
|
| 1832 |
+
if (options.ids) {
|
| 1833 |
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
| 1834 |
+
}
|
| 1835 |
|
| 1836 |
+
var partialBlock = undefined;
|
| 1837 |
+
if (options.fn && options.fn !== noop) {
|
| 1838 |
+
(function () {
|
| 1839 |
+
options.data = _base.createFrame(options.data);
|
| 1840 |
+
// Wrapper function to get access to currentPartialBlock from the closure
|
| 1841 |
+
var fn = options.fn;
|
| 1842 |
+
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
| 1843 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 1844 |
+
|
| 1845 |
+
// Restore the partial-block from the closure for the execution of the block
|
| 1846 |
+
// i.e. the part inside the block of the partial call.
|
| 1847 |
+
options.data = _base.createFrame(options.data);
|
| 1848 |
+
options.data['partial-block'] = currentPartialBlock;
|
| 1849 |
+
return fn(context, options);
|
| 1850 |
+
};
|
| 1851 |
+
if (fn.partials) {
|
| 1852 |
+
options.partials = Utils.extend({}, options.partials, fn.partials);
|
| 1853 |
+
}
|
| 1854 |
+
})();
|
| 1855 |
+
}
|
| 1856 |
|
| 1857 |
+
if (partial === undefined && partialBlock) {
|
| 1858 |
+
partial = partialBlock;
|
| 1859 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1860 |
|
| 1861 |
+
if (partial === undefined) {
|
| 1862 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
| 1863 |
+
} else if (partial instanceof Function) {
|
| 1864 |
+
return partial(context, options);
|
| 1865 |
+
}
|
| 1866 |
+
}
|
| 1867 |
|
| 1868 |
+
function noop() {
|
| 1869 |
+
return '';
|
| 1870 |
+
}
|
| 1871 |
|
| 1872 |
+
function initData(context, data) {
|
| 1873 |
+
if (!data || !('root' in data)) {
|
| 1874 |
+
data = data ? _base.createFrame(data) : {};
|
| 1875 |
+
data.root = context;
|
| 1876 |
+
}
|
| 1877 |
+
return data;
|
| 1878 |
+
}
|
| 1879 |
|
| 1880 |
+
function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
| 1881 |
+
if (fn.decorator) {
|
| 1882 |
+
var props = {};
|
| 1883 |
+
prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
| 1884 |
+
Utils.extend(prog, props);
|
| 1885 |
+
}
|
| 1886 |
+
return prog;
|
| 1887 |
+
}
|
| 1888 |
|
| 1889 |
+
/***/ }),
|
| 1890 |
+
/* 23 */
|
| 1891 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1892 |
|
| 1893 |
+
module.exports = { "default": __webpack_require__(24), __esModule: true };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1894 |
|
| 1895 |
+
/***/ }),
|
| 1896 |
+
/* 24 */
|
| 1897 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
| 1898 |
|
| 1899 |
+
__webpack_require__(25);
|
| 1900 |
+
module.exports = __webpack_require__(30).Object.seal;
|
|
|
|
|
|
|
|
|
|
| 1901 |
|
| 1902 |
+
/***/ }),
|
| 1903 |
+
/* 25 */
|
| 1904 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
| 1905 |
|
| 1906 |
+
// 19.1.2.17 Object.seal(O)
|
| 1907 |
+
var isObject = __webpack_require__(26);
|
|
|
|
|
|
|
|
|
|
| 1908 |
|
| 1909 |
+
__webpack_require__(27)('seal', function($seal){
|
| 1910 |
+
return function seal(it){
|
| 1911 |
+
return $seal && isObject(it) ? $seal(it) : it;
|
| 1912 |
+
};
|
| 1913 |
+
});
|
| 1914 |
|
| 1915 |
+
/***/ }),
|
| 1916 |
+
/* 26 */
|
| 1917 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1918 |
|
| 1919 |
+
module.exports = function(it){
|
| 1920 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
| 1921 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1922 |
|
| 1923 |
+
/***/ }),
|
| 1924 |
+
/* 27 */
|
| 1925 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1926 |
+
|
| 1927 |
+
// most Object methods by ES6 should accept primitives
|
| 1928 |
+
var $export = __webpack_require__(28)
|
| 1929 |
+
, core = __webpack_require__(30)
|
| 1930 |
+
, fails = __webpack_require__(33);
|
| 1931 |
+
module.exports = function(KEY, exec){
|
| 1932 |
+
var fn = (core.Object || {})[KEY] || Object[KEY]
|
| 1933 |
+
, exp = {};
|
| 1934 |
+
exp[KEY] = exec(fn);
|
| 1935 |
+
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
|
| 1936 |
+
};
|
| 1937 |
|
| 1938 |
+
/***/ }),
|
| 1939 |
+
/* 28 */
|
| 1940 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1941 |
+
|
| 1942 |
+
var global = __webpack_require__(29)
|
| 1943 |
+
, core = __webpack_require__(30)
|
| 1944 |
+
, ctx = __webpack_require__(31)
|
| 1945 |
+
, PROTOTYPE = 'prototype';
|
| 1946 |
+
|
| 1947 |
+
var $export = function(type, name, source){
|
| 1948 |
+
var IS_FORCED = type & $export.F
|
| 1949 |
+
, IS_GLOBAL = type & $export.G
|
| 1950 |
+
, IS_STATIC = type & $export.S
|
| 1951 |
+
, IS_PROTO = type & $export.P
|
| 1952 |
+
, IS_BIND = type & $export.B
|
| 1953 |
+
, IS_WRAP = type & $export.W
|
| 1954 |
+
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
| 1955 |
+
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
| 1956 |
+
, key, own, out;
|
| 1957 |
+
if(IS_GLOBAL)source = name;
|
| 1958 |
+
for(key in source){
|
| 1959 |
+
// contains in native
|
| 1960 |
+
own = !IS_FORCED && target && key in target;
|
| 1961 |
+
if(own && key in exports)continue;
|
| 1962 |
+
// export native or passed
|
| 1963 |
+
out = own ? target[key] : source[key];
|
| 1964 |
+
// prevent global pollution for namespaces
|
| 1965 |
+
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
| 1966 |
+
// bind timers to global for call from export context
|
| 1967 |
+
: IS_BIND && own ? ctx(out, global)
|
| 1968 |
+
// wrap global constructors for prevent change them in library
|
| 1969 |
+
: IS_WRAP && target[key] == out ? (function(C){
|
| 1970 |
+
var F = function(param){
|
| 1971 |
+
return this instanceof C ? new C(param) : C(param);
|
| 1972 |
+
};
|
| 1973 |
+
F[PROTOTYPE] = C[PROTOTYPE];
|
| 1974 |
+
return F;
|
| 1975 |
+
// make static versions for prototype methods
|
| 1976 |
+
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
| 1977 |
+
if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
| 1978 |
+
}
|
| 1979 |
+
};
|
| 1980 |
+
// type bitmap
|
| 1981 |
+
$export.F = 1; // forced
|
| 1982 |
+
$export.G = 2; // global
|
| 1983 |
+
$export.S = 4; // static
|
| 1984 |
+
$export.P = 8; // proto
|
| 1985 |
+
$export.B = 16; // bind
|
| 1986 |
+
$export.W = 32; // wrap
|
| 1987 |
+
module.exports = $export;
|
| 1988 |
+
|
| 1989 |
+
/***/ }),
|
| 1990 |
+
/* 29 */
|
| 1991 |
+
/***/ (function(module, exports) {
|
| 1992 |
+
|
| 1993 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
| 1994 |
+
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
| 1995 |
+
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
| 1996 |
+
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
|
| 1997 |
+
|
| 1998 |
+
/***/ }),
|
| 1999 |
+
/* 30 */
|
| 2000 |
+
/***/ (function(module, exports) {
|
| 2001 |
+
|
| 2002 |
+
var core = module.exports = {version: '1.2.6'};
|
| 2003 |
+
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
|
| 2004 |
+
|
| 2005 |
+
/***/ }),
|
| 2006 |
+
/* 31 */
|
| 2007 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2008 |
+
|
| 2009 |
+
// optional / simple context binding
|
| 2010 |
+
var aFunction = __webpack_require__(32);
|
| 2011 |
+
module.exports = function(fn, that, length){
|
| 2012 |
+
aFunction(fn);
|
| 2013 |
+
if(that === undefined)return fn;
|
| 2014 |
+
switch(length){
|
| 2015 |
+
case 1: return function(a){
|
| 2016 |
+
return fn.call(that, a);
|
| 2017 |
+
};
|
| 2018 |
+
case 2: return function(a, b){
|
| 2019 |
+
return fn.call(that, a, b);
|
| 2020 |
+
};
|
| 2021 |
+
case 3: return function(a, b, c){
|
| 2022 |
+
return fn.call(that, a, b, c);
|
| 2023 |
+
};
|
| 2024 |
+
}
|
| 2025 |
+
return function(/* ...args */){
|
| 2026 |
+
return fn.apply(that, arguments);
|
| 2027 |
+
};
|
| 2028 |
+
};
|
| 2029 |
|
| 2030 |
+
/***/ }),
|
| 2031 |
+
/* 32 */
|
| 2032 |
+
/***/ (function(module, exports) {
|
| 2033 |
|
| 2034 |
+
module.exports = function(it){
|
| 2035 |
+
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
| 2036 |
+
return it;
|
| 2037 |
+
};
|
| 2038 |
|
| 2039 |
+
/***/ }),
|
| 2040 |
+
/* 33 */
|
| 2041 |
+
/***/ (function(module, exports) {
|
|
|
|
| 2042 |
|
| 2043 |
+
module.exports = function(exec){
|
| 2044 |
+
try {
|
| 2045 |
+
return !!exec();
|
| 2046 |
+
} catch(e){
|
| 2047 |
+
return true;
|
| 2048 |
+
}
|
| 2049 |
+
};
|
| 2050 |
|
| 2051 |
+
/***/ }),
|
| 2052 |
+
/* 34 */
|
| 2053 |
+
/***/ (function(module, exports) {
|
| 2054 |
|
| 2055 |
+
/* WEBPACK VAR INJECTION */(function(global) {/* global window */
|
| 2056 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2057 |
|
| 2058 |
+
exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2059 |
|
| 2060 |
+
exports['default'] = function (Handlebars) {
|
| 2061 |
+
/* istanbul ignore next */
|
| 2062 |
+
var root = typeof global !== 'undefined' ? global : window,
|
| 2063 |
+
$Handlebars = root.Handlebars;
|
| 2064 |
+
/* istanbul ignore next */
|
| 2065 |
+
Handlebars.noConflict = function () {
|
| 2066 |
+
if (root.Handlebars === Handlebars) {
|
| 2067 |
+
root.Handlebars = $Handlebars;
|
|
|
|
|
|
|
|
|
|
| 2068 |
}
|
| 2069 |
+
return Handlebars;
|
| 2070 |
+
};
|
| 2071 |
+
};
|
| 2072 |
|
| 2073 |
+
module.exports = exports['default'];
|
| 2074 |
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
|
|
|
| 2075 |
|
| 2076 |
+
/***/ }),
|
| 2077 |
+
/* 35 */
|
| 2078 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
| 2079 |
|
| 2080 |
+
'use strict';
|
|
|
|
| 2081 |
|
| 2082 |
+
exports.__esModule = true;
|
| 2083 |
+
var AST = {
|
| 2084 |
+
// Public API used to evaluate derived attributes regarding AST nodes
|
| 2085 |
+
helpers: {
|
| 2086 |
+
// a mustache is definitely a helper if:
|
| 2087 |
+
// * it is an eligible helper, and
|
| 2088 |
+
// * it has at least one parameter or hash segment
|
| 2089 |
+
helperExpression: function helperExpression(node) {
|
| 2090 |
+
return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
|
| 2091 |
+
},
|
| 2092 |
|
| 2093 |
+
scopedId: function scopedId(path) {
|
| 2094 |
+
return (/^\.|this\b/.test(path.original)
|
| 2095 |
+
);
|
| 2096 |
+
},
|
| 2097 |
+
|
| 2098 |
+
// an ID is simple if it only has one part, and that part is not
|
| 2099 |
+
// `..` or `this`.
|
| 2100 |
+
simpleId: function simpleId(path) {
|
| 2101 |
+
return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
| 2102 |
}
|
| 2103 |
+
}
|
| 2104 |
+
};
|
| 2105 |
|
| 2106 |
+
// Must be exported as an object rather than the root of the module as the jison lexer
|
| 2107 |
+
// must modify the object to operate properly.
|
| 2108 |
+
exports['default'] = AST;
|
| 2109 |
+
module.exports = exports['default'];
|
| 2110 |
|
| 2111 |
+
/***/ }),
|
| 2112 |
+
/* 36 */
|
| 2113 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2114 |
|
| 2115 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2116 |
|
| 2117 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
|
|
|
|
|
|
|
|
|
| 2118 |
|
| 2119 |
+
var _interopRequireWildcard = __webpack_require__(3)['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2120 |
|
| 2121 |
+
exports.__esModule = true;
|
| 2122 |
+
exports.parse = parse;
|
|
|
|
|
|
|
| 2123 |
|
| 2124 |
+
var _parser = __webpack_require__(37);
|
|
|
|
| 2125 |
|
| 2126 |
+
var _parser2 = _interopRequireDefault(_parser);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2127 |
|
| 2128 |
+
var _whitespaceControl = __webpack_require__(38);
|
|
|
|
|
|
|
| 2129 |
|
| 2130 |
+
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
| 2131 |
|
| 2132 |
+
var _helpers = __webpack_require__(40);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2133 |
|
| 2134 |
+
var Helpers = _interopRequireWildcard(_helpers);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2135 |
|
| 2136 |
+
var _utils = __webpack_require__(5);
|
|
|
|
|
|
|
| 2137 |
|
| 2138 |
+
exports.parser = _parser2['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2139 |
|
| 2140 |
+
var yy = {};
|
| 2141 |
+
_utils.extend(yy, Helpers);
|
|
|
|
| 2142 |
|
| 2143 |
+
function parse(input, options) {
|
| 2144 |
+
// Just return if an already-compiled AST was passed in.
|
| 2145 |
+
if (input.type === 'Program') {
|
| 2146 |
+
return input;
|
| 2147 |
+
}
|
|
|
|
|
|
|
| 2148 |
|
| 2149 |
+
_parser2['default'].yy = yy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2150 |
|
| 2151 |
+
// Altering the shared object here, but this is ok as parser is a sync operation
|
| 2152 |
+
yy.locInfo = function (locInfo) {
|
| 2153 |
+
return new yy.SourceLocation(options && options.srcName, locInfo);
|
| 2154 |
+
};
|
| 2155 |
|
| 2156 |
+
var strip = new _whitespaceControl2['default'](options);
|
| 2157 |
+
return strip.accept(_parser2['default'].parse(input));
|
| 2158 |
+
}
|
| 2159 |
|
| 2160 |
+
/***/ }),
|
| 2161 |
+
/* 37 */
|
| 2162 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
| 2163 |
|
| 2164 |
+
// File ignored in coverage tests via setting in .istanbul.yml
|
| 2165 |
+
/* Jison generated parser */
|
| 2166 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2167 |
|
| 2168 |
exports.__esModule = true;
|
| 2169 |
+
var handlebars = (function () {
|
| 2170 |
+
var parser = { trace: function trace() {},
|
| 2171 |
+
yy: {},
|
| 2172 |
+
symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
|
| 2173 |
+
terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
|
| 2174 |
+
productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
|
| 2175 |
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
|
| 2176 |
+
/**/) {
|
| 2177 |
|
| 2178 |
+
var $0 = $$.length - 1;
|
| 2179 |
+
switch (yystate) {
|
| 2180 |
+
case 1:
|
| 2181 |
+
return $$[$0 - 1];
|
| 2182 |
+
break;
|
| 2183 |
+
case 2:
|
| 2184 |
+
this.$ = yy.prepareProgram($$[$0]);
|
| 2185 |
+
break;
|
| 2186 |
+
case 3:
|
| 2187 |
+
this.$ = $$[$0];
|
| 2188 |
+
break;
|
| 2189 |
+
case 4:
|
| 2190 |
+
this.$ = $$[$0];
|
| 2191 |
+
break;
|
| 2192 |
+
case 5:
|
| 2193 |
+
this.$ = $$[$0];
|
| 2194 |
+
break;
|
| 2195 |
+
case 6:
|
| 2196 |
+
this.$ = $$[$0];
|
| 2197 |
+
break;
|
| 2198 |
+
case 7:
|
| 2199 |
+
this.$ = $$[$0];
|
| 2200 |
+
break;
|
| 2201 |
+
case 8:
|
| 2202 |
+
this.$ = $$[$0];
|
| 2203 |
+
break;
|
| 2204 |
+
case 9:
|
| 2205 |
+
this.$ = {
|
| 2206 |
+
type: 'CommentStatement',
|
| 2207 |
+
value: yy.stripComment($$[$0]),
|
| 2208 |
+
strip: yy.stripFlags($$[$0], $$[$0]),
|
| 2209 |
+
loc: yy.locInfo(this._$)
|
| 2210 |
+
};
|
| 2211 |
|
| 2212 |
+
break;
|
| 2213 |
+
case 10:
|
| 2214 |
+
this.$ = {
|
| 2215 |
+
type: 'ContentStatement',
|
| 2216 |
+
original: $$[$0],
|
| 2217 |
+
value: $$[$0],
|
| 2218 |
+
loc: yy.locInfo(this._$)
|
| 2219 |
+
};
|
|
|
|
|
|
|
|
|
|
| 2220 |
|
| 2221 |
+
break;
|
| 2222 |
+
case 11:
|
| 2223 |
+
this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
| 2224 |
+
break;
|
| 2225 |
+
case 12:
|
| 2226 |
+
this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
|
| 2227 |
+
break;
|
| 2228 |
+
case 13:
|
| 2229 |
+
this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
|
| 2230 |
+
break;
|
| 2231 |
+
case 14:
|
| 2232 |
+
this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
|
| 2233 |
+
break;
|
| 2234 |
+
case 15:
|
| 2235 |
+
this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 2236 |
+
break;
|
| 2237 |
+
case 16:
|
| 2238 |
+
this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 2239 |
+
break;
|
| 2240 |
+
case 17:
|
| 2241 |
+
this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
|
| 2242 |
+
break;
|
| 2243 |
+
case 18:
|
| 2244 |
+
this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
|
| 2245 |
+
break;
|
| 2246 |
+
case 19:
|
| 2247 |
+
var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
|
| 2248 |
+
program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
|
| 2249 |
+
program.chained = true;
|
| 2250 |
|
| 2251 |
+
this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
|
|
|
|
|
|
|
|
|
|
| 2252 |
|
| 2253 |
+
break;
|
| 2254 |
+
case 20:
|
| 2255 |
+
this.$ = $$[$0];
|
| 2256 |
+
break;
|
| 2257 |
+
case 21:
|
| 2258 |
+
this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
|
| 2259 |
+
break;
|
| 2260 |
+
case 22:
|
| 2261 |
+
this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
| 2262 |
+
break;
|
| 2263 |
+
case 23:
|
| 2264 |
+
this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
|
| 2265 |
+
break;
|
| 2266 |
+
case 24:
|
| 2267 |
+
this.$ = {
|
| 2268 |
+
type: 'PartialStatement',
|
| 2269 |
+
name: $$[$0 - 3],
|
| 2270 |
+
params: $$[$0 - 2],
|
| 2271 |
+
hash: $$[$0 - 1],
|
| 2272 |
+
indent: '',
|
| 2273 |
+
strip: yy.stripFlags($$[$0 - 4], $$[$0]),
|
| 2274 |
+
loc: yy.locInfo(this._$)
|
| 2275 |
+
};
|
| 2276 |
|
| 2277 |
+
break;
|
| 2278 |
+
case 25:
|
| 2279 |
+
this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
|
| 2280 |
+
break;
|
| 2281 |
+
case 26:
|
| 2282 |
+
this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
|
| 2283 |
+
break;
|
| 2284 |
+
case 27:
|
| 2285 |
+
this.$ = $$[$0];
|
| 2286 |
+
break;
|
| 2287 |
+
case 28:
|
| 2288 |
+
this.$ = $$[$0];
|
| 2289 |
+
break;
|
| 2290 |
+
case 29:
|
| 2291 |
+
this.$ = {
|
| 2292 |
+
type: 'SubExpression',
|
| 2293 |
+
path: $$[$0 - 3],
|
| 2294 |
+
params: $$[$0 - 2],
|
| 2295 |
+
hash: $$[$0 - 1],
|
| 2296 |
+
loc: yy.locInfo(this._$)
|
| 2297 |
+
};
|
| 2298 |
|
| 2299 |
+
break;
|
| 2300 |
+
case 30:
|
| 2301 |
+
this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
|
| 2302 |
+
break;
|
| 2303 |
+
case 31:
|
| 2304 |
+
this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
|
| 2305 |
+
break;
|
| 2306 |
+
case 32:
|
| 2307 |
+
this.$ = yy.id($$[$0 - 1]);
|
| 2308 |
+
break;
|
| 2309 |
+
case 33:
|
| 2310 |
+
this.$ = $$[$0];
|
| 2311 |
+
break;
|
| 2312 |
+
case 34:
|
| 2313 |
+
this.$ = $$[$0];
|
| 2314 |
+
break;
|
| 2315 |
+
case 35:
|
| 2316 |
+
this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
|
| 2317 |
+
break;
|
| 2318 |
+
case 36:
|
| 2319 |
+
this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
|
| 2320 |
+
break;
|
| 2321 |
+
case 37:
|
| 2322 |
+
this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
|
| 2323 |
+
break;
|
| 2324 |
+
case 38:
|
| 2325 |
+
this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
|
| 2326 |
+
break;
|
| 2327 |
+
case 39:
|
| 2328 |
+
this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
|
| 2329 |
+
break;
|
| 2330 |
+
case 40:
|
| 2331 |
+
this.$ = $$[$0];
|
| 2332 |
+
break;
|
| 2333 |
+
case 41:
|
| 2334 |
+
this.$ = $$[$0];
|
| 2335 |
+
break;
|
| 2336 |
+
case 42:
|
| 2337 |
+
this.$ = yy.preparePath(true, $$[$0], this._$);
|
| 2338 |
+
break;
|
| 2339 |
+
case 43:
|
| 2340 |
+
this.$ = yy.preparePath(false, $$[$0], this._$);
|
| 2341 |
+
break;
|
| 2342 |
+
case 44:
|
| 2343 |
+
$$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
|
| 2344 |
+
break;
|
| 2345 |
+
case 45:
|
| 2346 |
+
this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
|
| 2347 |
+
break;
|
| 2348 |
+
case 46:
|
| 2349 |
+
this.$ = [];
|
| 2350 |
+
break;
|
| 2351 |
+
case 47:
|
| 2352 |
+
$$[$0 - 1].push($$[$0]);
|
| 2353 |
+
break;
|
| 2354 |
+
case 48:
|
| 2355 |
+
this.$ = [$$[$0]];
|
| 2356 |
+
break;
|
| 2357 |
+
case 49:
|
| 2358 |
+
$$[$0 - 1].push($$[$0]);
|
| 2359 |
+
break;
|
| 2360 |
+
case 50:
|
| 2361 |
+
this.$ = [];
|
| 2362 |
+
break;
|
| 2363 |
+
case 51:
|
| 2364 |
+
$$[$0 - 1].push($$[$0]);
|
| 2365 |
+
break;
|
| 2366 |
+
case 58:
|
| 2367 |
+
this.$ = [];
|
| 2368 |
+
break;
|
| 2369 |
+
case 59:
|
| 2370 |
+
$$[$0 - 1].push($$[$0]);
|
| 2371 |
+
break;
|
| 2372 |
+
case 64:
|
| 2373 |
+
this.$ = [];
|
| 2374 |
+
break;
|
| 2375 |
+
case 65:
|
| 2376 |
+
$$[$0 - 1].push($$[$0]);
|
| 2377 |
+
break;
|
| 2378 |
+
case 70:
|
| 2379 |
+
this.$ = [];
|
| 2380 |
+
break;
|
| 2381 |
+
case 71:
|
| 2382 |
+
$$[$0 - 1].push($$[$0]);
|
| 2383 |
+
break;
|
| 2384 |
+
case 78:
|
| 2385 |
+
this.$ = [];
|
| 2386 |
+
break;
|
| 2387 |
+
case 79:
|
| 2388 |
+
$$[$0 - 1].push($$[$0]);
|
| 2389 |
+
break;
|
| 2390 |
+
case 82:
|
| 2391 |
+
this.$ = [];
|
| 2392 |
+
break;
|
| 2393 |
+
case 83:
|
| 2394 |
+
$$[$0 - 1].push($$[$0]);
|
| 2395 |
+
break;
|
| 2396 |
+
case 86:
|
| 2397 |
+
this.$ = [];
|
| 2398 |
+
break;
|
| 2399 |
+
case 87:
|
| 2400 |
+
$$[$0 - 1].push($$[$0]);
|
| 2401 |
+
break;
|
| 2402 |
+
case 90:
|
| 2403 |
+
this.$ = [];
|
| 2404 |
+
break;
|
| 2405 |
+
case 91:
|
| 2406 |
+
$$[$0 - 1].push($$[$0]);
|
| 2407 |
+
break;
|
| 2408 |
+
case 94:
|
| 2409 |
+
this.$ = [];
|
| 2410 |
+
break;
|
| 2411 |
+
case 95:
|
| 2412 |
+
$$[$0 - 1].push($$[$0]);
|
| 2413 |
+
break;
|
| 2414 |
+
case 98:
|
| 2415 |
+
this.$ = [$$[$0]];
|
| 2416 |
+
break;
|
| 2417 |
+
case 99:
|
| 2418 |
+
$$[$0 - 1].push($$[$0]);
|
| 2419 |
+
break;
|
| 2420 |
+
case 100:
|
| 2421 |
+
this.$ = [$$[$0]];
|
| 2422 |
+
break;
|
| 2423 |
+
case 101:
|
| 2424 |
+
$$[$0 - 1].push($$[$0]);
|
| 2425 |
+
break;
|
| 2426 |
+
}
|
| 2427 |
+
},
|
| 2428 |
+
table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
|
| 2429 |
+
defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },
|
| 2430 |
+
parseError: function parseError(str, hash) {
|
| 2431 |
+
throw new Error(str);
|
| 2432 |
+
},
|
| 2433 |
+
parse: function parse(input) {
|
| 2434 |
+
var self = this,
|
| 2435 |
+
stack = [0],
|
| 2436 |
+
vstack = [null],
|
| 2437 |
+
lstack = [],
|
| 2438 |
+
table = this.table,
|
| 2439 |
+
yytext = "",
|
| 2440 |
+
yylineno = 0,
|
| 2441 |
+
yyleng = 0,
|
| 2442 |
+
recovering = 0,
|
| 2443 |
+
TERROR = 2,
|
| 2444 |
+
EOF = 1;
|
| 2445 |
+
this.lexer.setInput(input);
|
| 2446 |
+
this.lexer.yy = this.yy;
|
| 2447 |
+
this.yy.lexer = this.lexer;
|
| 2448 |
+
this.yy.parser = this;
|
| 2449 |
+
if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
|
| 2450 |
+
var yyloc = this.lexer.yylloc;
|
| 2451 |
+
lstack.push(yyloc);
|
| 2452 |
+
var ranges = this.lexer.options && this.lexer.options.ranges;
|
| 2453 |
+
if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
|
| 2454 |
+
function popStack(n) {
|
| 2455 |
+
stack.length = stack.length - 2 * n;
|
| 2456 |
+
vstack.length = vstack.length - n;
|
| 2457 |
+
lstack.length = lstack.length - n;
|
| 2458 |
+
}
|
| 2459 |
+
function lex() {
|
| 2460 |
+
var token;
|
| 2461 |
+
token = self.lexer.lex() || 1;
|
| 2462 |
+
if (typeof token !== "number") {
|
| 2463 |
+
token = self.symbols_[token] || token;
|
| 2464 |
+
}
|
| 2465 |
+
return token;
|
| 2466 |
+
}
|
| 2467 |
+
var symbol,
|
| 2468 |
+
preErrorSymbol,
|
| 2469 |
+
state,
|
| 2470 |
+
action,
|
| 2471 |
+
a,
|
| 2472 |
+
r,
|
| 2473 |
+
yyval = {},
|
| 2474 |
+
p,
|
| 2475 |
+
len,
|
| 2476 |
+
newState,
|
| 2477 |
+
expected;
|
| 2478 |
+
while (true) {
|
| 2479 |
+
state = stack[stack.length - 1];
|
| 2480 |
+
if (this.defaultActions[state]) {
|
| 2481 |
+
action = this.defaultActions[state];
|
| 2482 |
+
} else {
|
| 2483 |
+
if (symbol === null || typeof symbol == "undefined") {
|
| 2484 |
+
symbol = lex();
|
| 2485 |
+
}
|
| 2486 |
+
action = table[state] && table[state][symbol];
|
| 2487 |
+
}
|
| 2488 |
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
| 2489 |
+
var errStr = "";
|
| 2490 |
+
if (!recovering) {
|
| 2491 |
+
expected = [];
|
| 2492 |
+
for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
| 2493 |
+
expected.push("'" + this.terminals_[p] + "'");
|
| 2494 |
+
}
|
| 2495 |
+
if (this.lexer.showPosition) {
|
| 2496 |
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
| 2497 |
+
} else {
|
| 2498 |
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
| 2499 |
+
}
|
| 2500 |
+
this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
|
| 2501 |
+
}
|
| 2502 |
+
}
|
| 2503 |
+
if (action[0] instanceof Array && action.length > 1) {
|
| 2504 |
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
| 2505 |
+
}
|
| 2506 |
+
switch (action[0]) {
|
| 2507 |
+
case 1:
|
| 2508 |
+
stack.push(symbol);
|
| 2509 |
+
vstack.push(this.lexer.yytext);
|
| 2510 |
+
lstack.push(this.lexer.yylloc);
|
| 2511 |
+
stack.push(action[1]);
|
| 2512 |
+
symbol = null;
|
| 2513 |
+
if (!preErrorSymbol) {
|
| 2514 |
+
yyleng = this.lexer.yyleng;
|
| 2515 |
+
yytext = this.lexer.yytext;
|
| 2516 |
+
yylineno = this.lexer.yylineno;
|
| 2517 |
+
yyloc = this.lexer.yylloc;
|
| 2518 |
+
if (recovering > 0) recovering--;
|
| 2519 |
+
} else {
|
| 2520 |
+
symbol = preErrorSymbol;
|
| 2521 |
+
preErrorSymbol = null;
|
| 2522 |
+
}
|
| 2523 |
+
break;
|
| 2524 |
+
case 2:
|
| 2525 |
+
len = this.productions_[action[1]][1];
|
| 2526 |
+
yyval.$ = vstack[vstack.length - len];
|
| 2527 |
+
yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
|
| 2528 |
+
if (ranges) {
|
| 2529 |
+
yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
| 2530 |
+
}
|
| 2531 |
+
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
| 2532 |
+
if (typeof r !== "undefined") {
|
| 2533 |
+
return r;
|
| 2534 |
+
}
|
| 2535 |
+
if (len) {
|
| 2536 |
+
stack = stack.slice(0, -1 * len * 2);
|
| 2537 |
+
vstack = vstack.slice(0, -1 * len);
|
| 2538 |
+
lstack = lstack.slice(0, -1 * len);
|
| 2539 |
+
}
|
| 2540 |
+
stack.push(this.productions_[action[1]][0]);
|
| 2541 |
+
vstack.push(yyval.$);
|
| 2542 |
+
lstack.push(yyval._$);
|
| 2543 |
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
| 2544 |
+
stack.push(newState);
|
| 2545 |
+
break;
|
| 2546 |
+
case 3:
|
| 2547 |
+
return true;
|
| 2548 |
+
}
|
| 2549 |
+
}
|
| 2550 |
+
return true;
|
| 2551 |
+
}
|
| 2552 |
+
};
|
| 2553 |
+
/* Jison generated lexer */
|
| 2554 |
+
var lexer = (function () {
|
| 2555 |
+
var lexer = { EOF: 1,
|
| 2556 |
+
parseError: function parseError(str, hash) {
|
| 2557 |
+
if (this.yy.parser) {
|
| 2558 |
+
this.yy.parser.parseError(str, hash);
|
| 2559 |
+
} else {
|
| 2560 |
+
throw new Error(str);
|
| 2561 |
+
}
|
| 2562 |
+
},
|
| 2563 |
+
setInput: function setInput(input) {
|
| 2564 |
+
this._input = input;
|
| 2565 |
+
this._more = this._less = this.done = false;
|
| 2566 |
+
this.yylineno = this.yyleng = 0;
|
| 2567 |
+
this.yytext = this.matched = this.match = '';
|
| 2568 |
+
this.conditionStack = ['INITIAL'];
|
| 2569 |
+
this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
|
| 2570 |
+
if (this.options.ranges) this.yylloc.range = [0, 0];
|
| 2571 |
+
this.offset = 0;
|
| 2572 |
+
return this;
|
| 2573 |
+
},
|
| 2574 |
+
input: function input() {
|
| 2575 |
+
var ch = this._input[0];
|
| 2576 |
+
this.yytext += ch;
|
| 2577 |
+
this.yyleng++;
|
| 2578 |
+
this.offset++;
|
| 2579 |
+
this.match += ch;
|
| 2580 |
+
this.matched += ch;
|
| 2581 |
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
| 2582 |
+
if (lines) {
|
| 2583 |
+
this.yylineno++;
|
| 2584 |
+
this.yylloc.last_line++;
|
| 2585 |
+
} else {
|
| 2586 |
+
this.yylloc.last_column++;
|
| 2587 |
+
}
|
| 2588 |
+
if (this.options.ranges) this.yylloc.range[1]++;
|
| 2589 |
+
|
| 2590 |
+
this._input = this._input.slice(1);
|
| 2591 |
+
return ch;
|
| 2592 |
+
},
|
| 2593 |
+
unput: function unput(ch) {
|
| 2594 |
+
var len = ch.length;
|
| 2595 |
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
| 2596 |
+
|
| 2597 |
+
this._input = ch + this._input;
|
| 2598 |
+
this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
|
| 2599 |
+
//this.yyleng -= len;
|
| 2600 |
+
this.offset -= len;
|
| 2601 |
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
| 2602 |
+
this.match = this.match.substr(0, this.match.length - 1);
|
| 2603 |
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
| 2604 |
+
|
| 2605 |
+
if (lines.length - 1) this.yylineno -= lines.length - 1;
|
| 2606 |
+
var r = this.yylloc.range;
|
| 2607 |
+
|
| 2608 |
+
this.yylloc = { first_line: this.yylloc.first_line,
|
| 2609 |
+
last_line: this.yylineno + 1,
|
| 2610 |
+
first_column: this.yylloc.first_column,
|
| 2611 |
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
| 2612 |
+
};
|
| 2613 |
+
|
| 2614 |
+
if (this.options.ranges) {
|
| 2615 |
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
| 2616 |
+
}
|
| 2617 |
+
return this;
|
| 2618 |
+
},
|
| 2619 |
+
more: function more() {
|
| 2620 |
+
this._more = true;
|
| 2621 |
+
return this;
|
| 2622 |
+
},
|
| 2623 |
+
less: function less(n) {
|
| 2624 |
+
this.unput(this.match.slice(n));
|
| 2625 |
+
},
|
| 2626 |
+
pastInput: function pastInput() {
|
| 2627 |
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
| 2628 |
+
return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
| 2629 |
+
},
|
| 2630 |
+
upcomingInput: function upcomingInput() {
|
| 2631 |
+
var next = this.match;
|
| 2632 |
+
if (next.length < 20) {
|
| 2633 |
+
next += this._input.substr(0, 20 - next.length);
|
| 2634 |
+
}
|
| 2635 |
+
return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
| 2636 |
+
},
|
| 2637 |
+
showPosition: function showPosition() {
|
| 2638 |
+
var pre = this.pastInput();
|
| 2639 |
+
var c = new Array(pre.length + 1).join("-");
|
| 2640 |
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
| 2641 |
+
},
|
| 2642 |
+
next: function next() {
|
| 2643 |
+
if (this.done) {
|
| 2644 |
+
return this.EOF;
|
| 2645 |
+
}
|
| 2646 |
+
if (!this._input) this.done = true;
|
| 2647 |
+
|
| 2648 |
+
var token, match, tempMatch, index, col, lines;
|
| 2649 |
+
if (!this._more) {
|
| 2650 |
+
this.yytext = '';
|
| 2651 |
+
this.match = '';
|
| 2652 |
+
}
|
| 2653 |
+
var rules = this._currentRules();
|
| 2654 |
+
for (var i = 0; i < rules.length; i++) {
|
| 2655 |
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
| 2656 |
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
| 2657 |
+
match = tempMatch;
|
| 2658 |
+
index = i;
|
| 2659 |
+
if (!this.options.flex) break;
|
| 2660 |
+
}
|
| 2661 |
+
}
|
| 2662 |
+
if (match) {
|
| 2663 |
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
| 2664 |
+
if (lines) this.yylineno += lines.length;
|
| 2665 |
+
this.yylloc = { first_line: this.yylloc.last_line,
|
| 2666 |
+
last_line: this.yylineno + 1,
|
| 2667 |
+
first_column: this.yylloc.last_column,
|
| 2668 |
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
|
| 2669 |
+
this.yytext += match[0];
|
| 2670 |
+
this.match += match[0];
|
| 2671 |
+
this.matches = match;
|
| 2672 |
+
this.yyleng = this.yytext.length;
|
| 2673 |
+
if (this.options.ranges) {
|
| 2674 |
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
| 2675 |
+
}
|
| 2676 |
+
this._more = false;
|
| 2677 |
+
this._input = this._input.slice(match[0].length);
|
| 2678 |
+
this.matched += match[0];
|
| 2679 |
+
token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
|
| 2680 |
+
if (this.done && this._input) this.done = false;
|
| 2681 |
+
if (token) return token;else return;
|
| 2682 |
+
}
|
| 2683 |
+
if (this._input === "") {
|
| 2684 |
+
return this.EOF;
|
| 2685 |
+
} else {
|
| 2686 |
+
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
| 2687 |
+
}
|
| 2688 |
+
},
|
| 2689 |
+
lex: function lex() {
|
| 2690 |
+
var r = this.next();
|
| 2691 |
+
if (typeof r !== 'undefined') {
|
| 2692 |
+
return r;
|
| 2693 |
+
} else {
|
| 2694 |
+
return this.lex();
|
| 2695 |
+
}
|
| 2696 |
+
},
|
| 2697 |
+
begin: function begin(condition) {
|
| 2698 |
+
this.conditionStack.push(condition);
|
| 2699 |
+
},
|
| 2700 |
+
popState: function popState() {
|
| 2701 |
+
return this.conditionStack.pop();
|
| 2702 |
+
},
|
| 2703 |
+
_currentRules: function _currentRules() {
|
| 2704 |
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
| 2705 |
+
},
|
| 2706 |
+
topState: function topState() {
|
| 2707 |
+
return this.conditionStack[this.conditionStack.length - 2];
|
| 2708 |
+
},
|
| 2709 |
+
pushState: function begin(condition) {
|
| 2710 |
+
this.begin(condition);
|
| 2711 |
+
} };
|
| 2712 |
+
lexer.options = {};
|
| 2713 |
+
lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
|
| 2714 |
+
/**/) {
|
| 2715 |
+
|
| 2716 |
+
function strip(start, end) {
|
| 2717 |
+
return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
|
| 2718 |
+
}
|
| 2719 |
+
|
| 2720 |
+
var YYSTATE = YY_START;
|
| 2721 |
+
switch ($avoiding_name_collisions) {
|
| 2722 |
+
case 0:
|
| 2723 |
+
if (yy_.yytext.slice(-2) === "\\\\") {
|
| 2724 |
+
strip(0, 1);
|
| 2725 |
+
this.begin("mu");
|
| 2726 |
+
} else if (yy_.yytext.slice(-1) === "\\") {
|
| 2727 |
+
strip(0, 1);
|
| 2728 |
+
this.begin("emu");
|
| 2729 |
+
} else {
|
| 2730 |
+
this.begin("mu");
|
| 2731 |
+
}
|
| 2732 |
+
if (yy_.yytext) return 15;
|
| 2733 |
+
|
| 2734 |
+
break;
|
| 2735 |
+
case 1:
|
| 2736 |
+
return 15;
|
| 2737 |
+
break;
|
| 2738 |
+
case 2:
|
| 2739 |
+
this.popState();
|
| 2740 |
+
return 15;
|
| 2741 |
+
|
| 2742 |
+
break;
|
| 2743 |
+
case 3:
|
| 2744 |
+
this.begin('raw');return 15;
|
| 2745 |
+
break;
|
| 2746 |
+
case 4:
|
| 2747 |
+
this.popState();
|
| 2748 |
+
// Should be using `this.topState()` below, but it currently
|
| 2749 |
+
// returns the second top instead of the first top. Opened an
|
| 2750 |
+
// issue about it at https://github.com/zaach/jison/issues/291
|
| 2751 |
+
if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
|
| 2752 |
+
return 15;
|
| 2753 |
+
} else {
|
| 2754 |
+
yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
|
| 2755 |
+
return 'END_RAW_BLOCK';
|
| 2756 |
+
}
|
| 2757 |
+
|
| 2758 |
+
break;
|
| 2759 |
+
case 5:
|
| 2760 |
+
return 15;
|
| 2761 |
+
break;
|
| 2762 |
+
case 6:
|
| 2763 |
+
this.popState();
|
| 2764 |
+
return 14;
|
| 2765 |
+
|
| 2766 |
+
break;
|
| 2767 |
+
case 7:
|
| 2768 |
+
return 65;
|
| 2769 |
+
break;
|
| 2770 |
+
case 8:
|
| 2771 |
+
return 68;
|
| 2772 |
+
break;
|
| 2773 |
+
case 9:
|
| 2774 |
+
return 19;
|
| 2775 |
+
break;
|
| 2776 |
+
case 10:
|
| 2777 |
+
this.popState();
|
| 2778 |
+
this.begin('raw');
|
| 2779 |
+
return 23;
|
| 2780 |
+
|
| 2781 |
+
break;
|
| 2782 |
+
case 11:
|
| 2783 |
+
return 55;
|
| 2784 |
+
break;
|
| 2785 |
+
case 12:
|
| 2786 |
+
return 60;
|
| 2787 |
+
break;
|
| 2788 |
+
case 13:
|
| 2789 |
+
return 29;
|
| 2790 |
+
break;
|
| 2791 |
+
case 14:
|
| 2792 |
+
return 47;
|
| 2793 |
+
break;
|
| 2794 |
+
case 15:
|
| 2795 |
+
this.popState();return 44;
|
| 2796 |
+
break;
|
| 2797 |
+
case 16:
|
| 2798 |
+
this.popState();return 44;
|
| 2799 |
+
break;
|
| 2800 |
+
case 17:
|
| 2801 |
+
return 34;
|
| 2802 |
+
break;
|
| 2803 |
+
case 18:
|
| 2804 |
+
return 39;
|
| 2805 |
+
break;
|
| 2806 |
+
case 19:
|
| 2807 |
+
return 51;
|
| 2808 |
+
break;
|
| 2809 |
+
case 20:
|
| 2810 |
+
return 48;
|
| 2811 |
+
break;
|
| 2812 |
+
case 21:
|
| 2813 |
+
this.unput(yy_.yytext);
|
| 2814 |
+
this.popState();
|
| 2815 |
+
this.begin('com');
|
| 2816 |
+
|
| 2817 |
+
break;
|
| 2818 |
+
case 22:
|
| 2819 |
+
this.popState();
|
| 2820 |
+
return 14;
|
| 2821 |
+
|
| 2822 |
+
break;
|
| 2823 |
+
case 23:
|
| 2824 |
+
return 48;
|
| 2825 |
+
break;
|
| 2826 |
+
case 24:
|
| 2827 |
+
return 73;
|
| 2828 |
+
break;
|
| 2829 |
+
case 25:
|
| 2830 |
+
return 72;
|
| 2831 |
+
break;
|
| 2832 |
+
case 26:
|
| 2833 |
+
return 72;
|
| 2834 |
+
break;
|
| 2835 |
+
case 27:
|
| 2836 |
+
return 87;
|
| 2837 |
+
break;
|
| 2838 |
+
case 28:
|
| 2839 |
+
// ignore whitespace
|
| 2840 |
+
break;
|
| 2841 |
+
case 29:
|
| 2842 |
+
this.popState();return 54;
|
| 2843 |
+
break;
|
| 2844 |
+
case 30:
|
| 2845 |
+
this.popState();return 33;
|
| 2846 |
+
break;
|
| 2847 |
+
case 31:
|
| 2848 |
+
yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
|
| 2849 |
+
break;
|
| 2850 |
+
case 32:
|
| 2851 |
+
yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
|
| 2852 |
+
break;
|
| 2853 |
+
case 33:
|
| 2854 |
+
return 85;
|
| 2855 |
+
break;
|
| 2856 |
+
case 34:
|
| 2857 |
+
return 82;
|
| 2858 |
+
break;
|
| 2859 |
+
case 35:
|
| 2860 |
+
return 82;
|
| 2861 |
+
break;
|
| 2862 |
+
case 36:
|
| 2863 |
+
return 83;
|
| 2864 |
+
break;
|
| 2865 |
+
case 37:
|
| 2866 |
+
return 84;
|
| 2867 |
+
break;
|
| 2868 |
+
case 38:
|
| 2869 |
+
return 81;
|
| 2870 |
+
break;
|
| 2871 |
+
case 39:
|
| 2872 |
+
return 75;
|
| 2873 |
+
break;
|
| 2874 |
+
case 40:
|
| 2875 |
+
return 77;
|
| 2876 |
+
break;
|
| 2877 |
+
case 41:
|
| 2878 |
+
return 72;
|
| 2879 |
+
break;
|
| 2880 |
+
case 42:
|
| 2881 |
+
yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
|
| 2882 |
+
break;
|
| 2883 |
+
case 43:
|
| 2884 |
+
return 'INVALID';
|
| 2885 |
+
break;
|
| 2886 |
+
case 44:
|
| 2887 |
+
return 5;
|
| 2888 |
+
break;
|
| 2889 |
+
}
|
| 2890 |
+
};
|
| 2891 |
+
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
| 2892 |
+
lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
| 2893 |
+
return lexer;
|
| 2894 |
+
})();
|
| 2895 |
+
parser.lexer = lexer;
|
| 2896 |
+
function Parser() {
|
| 2897 |
+
this.yy = {};
|
| 2898 |
+
}Parser.prototype = parser;parser.Parser = Parser;
|
| 2899 |
+
return new Parser();
|
| 2900 |
+
})();exports["default"] = handlebars;
|
| 2901 |
+
module.exports = exports["default"];
|
| 2902 |
+
|
| 2903 |
+
/***/ }),
|
| 2904 |
+
/* 38 */
|
| 2905 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2906 |
+
|
| 2907 |
+
'use strict';
|
| 2908 |
+
|
| 2909 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 2910 |
+
|
| 2911 |
+
exports.__esModule = true;
|
| 2912 |
+
|
| 2913 |
+
var _visitor = __webpack_require__(39);
|
| 2914 |
+
|
| 2915 |
+
var _visitor2 = _interopRequireDefault(_visitor);
|
| 2916 |
+
|
| 2917 |
+
function WhitespaceControl() {
|
| 2918 |
+
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
| 2919 |
+
|
| 2920 |
+
this.options = options;
|
| 2921 |
+
}
|
| 2922 |
+
WhitespaceControl.prototype = new _visitor2['default']();
|
| 2923 |
+
|
| 2924 |
+
WhitespaceControl.prototype.Program = function (program) {
|
| 2925 |
+
var doStandalone = !this.options.ignoreStandalone;
|
| 2926 |
+
|
| 2927 |
+
var isRoot = !this.isRootSeen;
|
| 2928 |
+
this.isRootSeen = true;
|
| 2929 |
+
|
| 2930 |
+
var body = program.body;
|
| 2931 |
+
for (var i = 0, l = body.length; i < l; i++) {
|
| 2932 |
+
var current = body[i],
|
| 2933 |
+
strip = this.accept(current);
|
| 2934 |
+
|
| 2935 |
+
if (!strip) {
|
| 2936 |
+
continue;
|
| 2937 |
+
}
|
| 2938 |
+
|
| 2939 |
+
var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
|
| 2940 |
+
_isNextWhitespace = isNextWhitespace(body, i, isRoot),
|
| 2941 |
+
openStandalone = strip.openStandalone && _isPrevWhitespace,
|
| 2942 |
+
closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
| 2943 |
+
inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
| 2944 |
+
|
| 2945 |
+
if (strip.close) {
|
| 2946 |
+
omitRight(body, i, true);
|
| 2947 |
+
}
|
| 2948 |
+
if (strip.open) {
|
| 2949 |
+
omitLeft(body, i, true);
|
| 2950 |
+
}
|
| 2951 |
+
|
| 2952 |
+
if (doStandalone && inlineStandalone) {
|
| 2953 |
+
omitRight(body, i);
|
| 2954 |
+
|
| 2955 |
+
if (omitLeft(body, i)) {
|
| 2956 |
+
// If we are on a standalone node, save the indent info for partials
|
| 2957 |
+
if (current.type === 'PartialStatement') {
|
| 2958 |
+
// Pull out the whitespace from the final line
|
| 2959 |
+
current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
| 2960 |
+
}
|
| 2961 |
+
}
|
| 2962 |
+
}
|
| 2963 |
+
if (doStandalone && openStandalone) {
|
| 2964 |
+
omitRight((current.program || current.inverse).body);
|
| 2965 |
+
|
| 2966 |
+
// Strip out the previous content node if it's whitespace only
|
| 2967 |
+
omitLeft(body, i);
|
| 2968 |
+
}
|
| 2969 |
+
if (doStandalone && closeStandalone) {
|
| 2970 |
+
// Always strip the next node
|
| 2971 |
+
omitRight(body, i);
|
| 2972 |
+
|
| 2973 |
+
omitLeft((current.inverse || current.program).body);
|
| 2974 |
+
}
|
| 2975 |
+
}
|
| 2976 |
+
|
| 2977 |
+
return program;
|
| 2978 |
+
};
|
| 2979 |
+
|
| 2980 |
+
WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
|
| 2981 |
+
this.accept(block.program);
|
| 2982 |
+
this.accept(block.inverse);
|
| 2983 |
+
|
| 2984 |
+
// Find the inverse program that is involed with whitespace stripping.
|
| 2985 |
+
var program = block.program || block.inverse,
|
| 2986 |
+
inverse = block.program && block.inverse,
|
| 2987 |
+
firstInverse = inverse,
|
| 2988 |
+
lastInverse = inverse;
|
| 2989 |
+
|
| 2990 |
+
if (inverse && inverse.chained) {
|
| 2991 |
+
firstInverse = inverse.body[0].program;
|
| 2992 |
+
|
| 2993 |
+
// Walk the inverse chain to find the last inverse that is actually in the chain.
|
| 2994 |
+
while (lastInverse.chained) {
|
| 2995 |
+
lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
| 2996 |
+
}
|
| 2997 |
+
}
|
| 2998 |
+
|
| 2999 |
+
var strip = {
|
| 3000 |
+
open: block.openStrip.open,
|
| 3001 |
+
close: block.closeStrip.close,
|
| 3002 |
+
|
| 3003 |
+
// Determine the standalone candiacy. Basically flag our content as being possibly standalone
|
| 3004 |
+
// so our parent can determine if we actually are standalone
|
| 3005 |
+
openStandalone: isNextWhitespace(program.body),
|
| 3006 |
+
closeStandalone: isPrevWhitespace((firstInverse || program).body)
|
| 3007 |
+
};
|
| 3008 |
+
|
| 3009 |
+
if (block.openStrip.close) {
|
| 3010 |
+
omitRight(program.body, null, true);
|
| 3011 |
+
}
|
| 3012 |
+
|
| 3013 |
+
if (inverse) {
|
| 3014 |
+
var inverseStrip = block.inverseStrip;
|
| 3015 |
+
|
| 3016 |
+
if (inverseStrip.open) {
|
| 3017 |
+
omitLeft(program.body, null, true);
|
| 3018 |
+
}
|
| 3019 |
+
|
| 3020 |
+
if (inverseStrip.close) {
|
| 3021 |
+
omitRight(firstInverse.body, null, true);
|
| 3022 |
+
}
|
| 3023 |
+
if (block.closeStrip.open) {
|
| 3024 |
+
omitLeft(lastInverse.body, null, true);
|
| 3025 |
+
}
|
| 3026 |
+
|
| 3027 |
+
// Find standalone else statments
|
| 3028 |
+
if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
|
| 3029 |
+
omitLeft(program.body);
|
| 3030 |
+
omitRight(firstInverse.body);
|
| 3031 |
+
}
|
| 3032 |
+
} else if (block.closeStrip.open) {
|
| 3033 |
+
omitLeft(program.body, null, true);
|
| 3034 |
+
}
|
| 3035 |
+
|
| 3036 |
+
return strip;
|
| 3037 |
+
};
|
| 3038 |
+
|
| 3039 |
+
WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
|
| 3040 |
+
return mustache.strip;
|
| 3041 |
+
};
|
| 3042 |
+
|
| 3043 |
+
WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
|
| 3044 |
+
/* istanbul ignore next */
|
| 3045 |
+
var strip = node.strip || {};
|
| 3046 |
+
return {
|
| 3047 |
+
inlineStandalone: true,
|
| 3048 |
+
open: strip.open,
|
| 3049 |
+
close: strip.close
|
| 3050 |
+
};
|
| 3051 |
+
};
|
| 3052 |
+
|
| 3053 |
+
function isPrevWhitespace(body, i, isRoot) {
|
| 3054 |
+
if (i === undefined) {
|
| 3055 |
+
i = body.length;
|
| 3056 |
+
}
|
| 3057 |
+
|
| 3058 |
+
// Nodes that end with newlines are considered whitespace (but are special
|
| 3059 |
+
// cased for strip operations)
|
| 3060 |
+
var prev = body[i - 1],
|
| 3061 |
+
sibling = body[i - 2];
|
| 3062 |
+
if (!prev) {
|
| 3063 |
+
return isRoot;
|
| 3064 |
+
}
|
| 3065 |
+
|
| 3066 |
+
if (prev.type === 'ContentStatement') {
|
| 3067 |
+
return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
|
| 3068 |
+
}
|
| 3069 |
+
}
|
| 3070 |
+
function isNextWhitespace(body, i, isRoot) {
|
| 3071 |
+
if (i === undefined) {
|
| 3072 |
+
i = -1;
|
| 3073 |
+
}
|
| 3074 |
+
|
| 3075 |
+
var next = body[i + 1],
|
| 3076 |
+
sibling = body[i + 2];
|
| 3077 |
+
if (!next) {
|
| 3078 |
+
return isRoot;
|
| 3079 |
+
}
|
| 3080 |
+
|
| 3081 |
+
if (next.type === 'ContentStatement') {
|
| 3082 |
+
return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
|
| 3083 |
+
}
|
| 3084 |
+
}
|
| 3085 |
+
|
| 3086 |
+
// Marks the node to the right of the position as omitted.
|
| 3087 |
+
// I.e. {{foo}}' ' will mark the ' ' node as omitted.
|
| 3088 |
+
//
|
| 3089 |
+
// If i is undefined, then the first child will be marked as such.
|
| 3090 |
+
//
|
| 3091 |
+
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 3092 |
+
// content is met.
|
| 3093 |
+
function omitRight(body, i, multiple) {
|
| 3094 |
+
var current = body[i == null ? 0 : i + 1];
|
| 3095 |
+
if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
|
| 3096 |
+
return;
|
| 3097 |
+
}
|
| 3098 |
+
|
| 3099 |
+
var original = current.value;
|
| 3100 |
+
current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
|
| 3101 |
+
current.rightStripped = current.value !== original;
|
| 3102 |
+
}
|
| 3103 |
+
|
| 3104 |
+
// Marks the node to the left of the position as omitted.
|
| 3105 |
+
// I.e. ' '{{foo}} will mark the ' ' node as omitted.
|
| 3106 |
+
//
|
| 3107 |
+
// If i is undefined then the last child will be marked as such.
|
| 3108 |
+
//
|
| 3109 |
+
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 3110 |
+
// content is met.
|
| 3111 |
+
function omitLeft(body, i, multiple) {
|
| 3112 |
+
var current = body[i == null ? body.length - 1 : i - 1];
|
| 3113 |
+
if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
|
| 3114 |
+
return;
|
| 3115 |
+
}
|
| 3116 |
+
|
| 3117 |
+
// We omit the last node if it's whitespace only and not preceeded by a non-content node.
|
| 3118 |
+
var original = current.value;
|
| 3119 |
+
current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
|
| 3120 |
+
current.leftStripped = current.value !== original;
|
| 3121 |
+
return current.leftStripped;
|
| 3122 |
+
}
|
| 3123 |
+
|
| 3124 |
+
exports['default'] = WhitespaceControl;
|
| 3125 |
+
module.exports = exports['default'];
|
| 3126 |
+
|
| 3127 |
+
/***/ }),
|
| 3128 |
+
/* 39 */
|
| 3129 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 3130 |
+
|
| 3131 |
+
'use strict';
|
| 3132 |
+
|
| 3133 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 3134 |
+
|
| 3135 |
+
exports.__esModule = true;
|
| 3136 |
+
|
| 3137 |
+
var _exception = __webpack_require__(6);
|
| 3138 |
+
|
| 3139 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 3140 |
+
|
| 3141 |
+
function Visitor() {
|
| 3142 |
+
this.parents = [];
|
| 3143 |
+
}
|
| 3144 |
+
|
| 3145 |
+
Visitor.prototype = {
|
| 3146 |
+
constructor: Visitor,
|
| 3147 |
+
mutating: false,
|
| 3148 |
+
|
| 3149 |
+
// Visits a given value. If mutating, will replace the value if necessary.
|
| 3150 |
+
acceptKey: function acceptKey(node, name) {
|
| 3151 |
+
var value = this.accept(node[name]);
|
| 3152 |
+
if (this.mutating) {
|
| 3153 |
+
// Hacky sanity check: This may have a few false positives for type for the helper
|
| 3154 |
+
// methods but will generally do the right thing without a lot of overhead.
|
| 3155 |
+
if (value && !Visitor.prototype[value.type]) {
|
| 3156 |
+
throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
|
| 3157 |
+
}
|
| 3158 |
+
node[name] = value;
|
| 3159 |
+
}
|
| 3160 |
+
},
|
| 3161 |
+
|
| 3162 |
+
// Performs an accept operation with added sanity check to ensure
|
| 3163 |
+
// required keys are not removed.
|
| 3164 |
+
acceptRequired: function acceptRequired(node, name) {
|
| 3165 |
+
this.acceptKey(node, name);
|
| 3166 |
+
|
| 3167 |
+
if (!node[name]) {
|
| 3168 |
+
throw new _exception2['default'](node.type + ' requires ' + name);
|
| 3169 |
+
}
|
| 3170 |
+
},
|
| 3171 |
+
|
| 3172 |
+
// Traverses a given array. If mutating, empty respnses will be removed
|
| 3173 |
+
// for child elements.
|
| 3174 |
+
acceptArray: function acceptArray(array) {
|
| 3175 |
+
for (var i = 0, l = array.length; i < l; i++) {
|
| 3176 |
+
this.acceptKey(array, i);
|
| 3177 |
+
|
| 3178 |
+
if (!array[i]) {
|
| 3179 |
+
array.splice(i, 1);
|
| 3180 |
+
i--;
|
| 3181 |
+
l--;
|
| 3182 |
+
}
|
| 3183 |
+
}
|
| 3184 |
+
},
|
| 3185 |
+
|
| 3186 |
+
accept: function accept(object) {
|
| 3187 |
+
if (!object) {
|
| 3188 |
+
return;
|
| 3189 |
+
}
|
| 3190 |
+
|
| 3191 |
+
/* istanbul ignore next: Sanity code */
|
| 3192 |
+
if (!this[object.type]) {
|
| 3193 |
+
throw new _exception2['default']('Unknown type: ' + object.type, object);
|
| 3194 |
+
}
|
| 3195 |
+
|
| 3196 |
+
if (this.current) {
|
| 3197 |
+
this.parents.unshift(this.current);
|
| 3198 |
+
}
|
| 3199 |
+
this.current = object;
|
| 3200 |
+
|
| 3201 |
+
var ret = this[object.type](object);
|
| 3202 |
+
|
| 3203 |
+
this.current = this.parents.shift();
|
| 3204 |
+
|
| 3205 |
+
if (!this.mutating || ret) {
|
| 3206 |
+
return ret;
|
| 3207 |
+
} else if (ret !== false) {
|
| 3208 |
+
return object;
|
| 3209 |
+
}
|
| 3210 |
+
},
|
| 3211 |
+
|
| 3212 |
+
Program: function Program(program) {
|
| 3213 |
+
this.acceptArray(program.body);
|
| 3214 |
+
},
|
| 3215 |
+
|
| 3216 |
+
MustacheStatement: visitSubExpression,
|
| 3217 |
+
Decorator: visitSubExpression,
|
| 3218 |
+
|
| 3219 |
+
BlockStatement: visitBlock,
|
| 3220 |
+
DecoratorBlock: visitBlock,
|
| 3221 |
+
|
| 3222 |
+
PartialStatement: visitPartial,
|
| 3223 |
+
PartialBlockStatement: function PartialBlockStatement(partial) {
|
| 3224 |
+
visitPartial.call(this, partial);
|
| 3225 |
+
|
| 3226 |
+
this.acceptKey(partial, 'program');
|
| 3227 |
+
},
|
| 3228 |
+
|
| 3229 |
+
ContentStatement: function ContentStatement() /* content */{},
|
| 3230 |
+
CommentStatement: function CommentStatement() /* comment */{},
|
| 3231 |
+
|
| 3232 |
+
SubExpression: visitSubExpression,
|
| 3233 |
+
|
| 3234 |
+
PathExpression: function PathExpression() /* path */{},
|
| 3235 |
+
|
| 3236 |
+
StringLiteral: function StringLiteral() /* string */{},
|
| 3237 |
+
NumberLiteral: function NumberLiteral() /* number */{},
|
| 3238 |
+
BooleanLiteral: function BooleanLiteral() /* bool */{},
|
| 3239 |
+
UndefinedLiteral: function UndefinedLiteral() /* literal */{},
|
| 3240 |
+
NullLiteral: function NullLiteral() /* literal */{},
|
| 3241 |
+
|
| 3242 |
+
Hash: function Hash(hash) {
|
| 3243 |
+
this.acceptArray(hash.pairs);
|
| 3244 |
+
},
|
| 3245 |
+
HashPair: function HashPair(pair) {
|
| 3246 |
+
this.acceptRequired(pair, 'value');
|
| 3247 |
+
}
|
| 3248 |
+
};
|
| 3249 |
+
|
| 3250 |
+
function visitSubExpression(mustache) {
|
| 3251 |
+
this.acceptRequired(mustache, 'path');
|
| 3252 |
+
this.acceptArray(mustache.params);
|
| 3253 |
+
this.acceptKey(mustache, 'hash');
|
| 3254 |
+
}
|
| 3255 |
+
function visitBlock(block) {
|
| 3256 |
+
visitSubExpression.call(this, block);
|
| 3257 |
+
|
| 3258 |
+
this.acceptKey(block, 'program');
|
| 3259 |
+
this.acceptKey(block, 'inverse');
|
| 3260 |
+
}
|
| 3261 |
+
function visitPartial(partial) {
|
| 3262 |
+
this.acceptRequired(partial, 'name');
|
| 3263 |
+
this.acceptArray(partial.params);
|
| 3264 |
+
this.acceptKey(partial, 'hash');
|
| 3265 |
+
}
|
| 3266 |
+
|
| 3267 |
+
exports['default'] = Visitor;
|
| 3268 |
+
module.exports = exports['default'];
|
| 3269 |
+
|
| 3270 |
+
/***/ }),
|
| 3271 |
+
/* 40 */
|
| 3272 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 3273 |
+
|
| 3274 |
+
'use strict';
|
| 3275 |
+
|
| 3276 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 3277 |
+
|
| 3278 |
+
exports.__esModule = true;
|
| 3279 |
+
exports.SourceLocation = SourceLocation;
|
| 3280 |
+
exports.id = id;
|
| 3281 |
+
exports.stripFlags = stripFlags;
|
| 3282 |
+
exports.stripComment = stripComment;
|
| 3283 |
+
exports.preparePath = preparePath;
|
| 3284 |
+
exports.prepareMustache = prepareMustache;
|
| 3285 |
+
exports.prepareRawBlock = prepareRawBlock;
|
| 3286 |
+
exports.prepareBlock = prepareBlock;
|
| 3287 |
+
exports.prepareProgram = prepareProgram;
|
| 3288 |
+
exports.preparePartialBlock = preparePartialBlock;
|
| 3289 |
+
|
| 3290 |
+
var _exception = __webpack_require__(6);
|
| 3291 |
+
|
| 3292 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 3293 |
+
|
| 3294 |
+
function validateClose(open, close) {
|
| 3295 |
+
close = close.path ? close.path.original : close;
|
| 3296 |
+
|
| 3297 |
+
if (open.path.original !== close) {
|
| 3298 |
+
var errorNode = { loc: open.path.loc };
|
| 3299 |
+
|
| 3300 |
+
throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
|
| 3301 |
+
}
|
| 3302 |
+
}
|
| 3303 |
+
|
| 3304 |
+
function SourceLocation(source, locInfo) {
|
| 3305 |
+
this.source = source;
|
| 3306 |
+
this.start = {
|
| 3307 |
+
line: locInfo.first_line,
|
| 3308 |
+
column: locInfo.first_column
|
| 3309 |
+
};
|
| 3310 |
+
this.end = {
|
| 3311 |
+
line: locInfo.last_line,
|
| 3312 |
+
column: locInfo.last_column
|
| 3313 |
+
};
|
| 3314 |
+
}
|
| 3315 |
+
|
| 3316 |
+
function id(token) {
|
| 3317 |
+
if (/^\[.*\]$/.test(token)) {
|
| 3318 |
+
return token.substr(1, token.length - 2);
|
| 3319 |
+
} else {
|
| 3320 |
+
return token;
|
| 3321 |
+
}
|
| 3322 |
+
}
|
| 3323 |
+
|
| 3324 |
+
function stripFlags(open, close) {
|
| 3325 |
+
return {
|
| 3326 |
+
open: open.charAt(2) === '~',
|
| 3327 |
+
close: close.charAt(close.length - 3) === '~'
|
| 3328 |
+
};
|
| 3329 |
+
}
|
| 3330 |
+
|
| 3331 |
+
function stripComment(comment) {
|
| 3332 |
+
return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, '');
|
| 3333 |
+
}
|
| 3334 |
+
|
| 3335 |
+
function preparePath(data, parts, loc) {
|
| 3336 |
+
loc = this.locInfo(loc);
|
| 3337 |
+
|
| 3338 |
+
var original = data ? '@' : '',
|
| 3339 |
+
dig = [],
|
| 3340 |
+
depth = 0,
|
| 3341 |
+
depthString = '';
|
| 3342 |
+
|
| 3343 |
+
for (var i = 0, l = parts.length; i < l; i++) {
|
| 3344 |
+
var part = parts[i].part,
|
| 3345 |
+
|
| 3346 |
+
// If we have [] syntax then we do not treat path references as operators,
|
| 3347 |
+
// i.e. foo.[this] resolves to approximately context.foo['this']
|
| 3348 |
+
isLiteral = parts[i].original !== part;
|
| 3349 |
+
original += (parts[i].separator || '') + part;
|
| 3350 |
+
|
| 3351 |
+
if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
|
| 3352 |
+
if (dig.length > 0) {
|
| 3353 |
+
throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
|
| 3354 |
+
} else if (part === '..') {
|
| 3355 |
+
depth++;
|
| 3356 |
+
depthString += '../';
|
| 3357 |
+
}
|
| 3358 |
+
} else {
|
| 3359 |
+
dig.push(part);
|
| 3360 |
+
}
|
| 3361 |
+
}
|
| 3362 |
+
|
| 3363 |
+
return {
|
| 3364 |
+
type: 'PathExpression',
|
| 3365 |
+
data: data,
|
| 3366 |
+
depth: depth,
|
| 3367 |
+
parts: dig,
|
| 3368 |
+
original: original,
|
| 3369 |
+
loc: loc
|
| 3370 |
+
};
|
| 3371 |
+
}
|
| 3372 |
+
|
| 3373 |
+
function prepareMustache(path, params, hash, open, strip, locInfo) {
|
| 3374 |
+
// Must use charAt to support IE pre-10
|
| 3375 |
+
var escapeFlag = open.charAt(3) || open.charAt(2),
|
| 3376 |
+
escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
| 3377 |
+
|
| 3378 |
+
var decorator = /\*/.test(open);
|
| 3379 |
+
return {
|
| 3380 |
+
type: decorator ? 'Decorator' : 'MustacheStatement',
|
| 3381 |
+
path: path,
|
| 3382 |
+
params: params,
|
| 3383 |
+
hash: hash,
|
| 3384 |
+
escaped: escaped,
|
| 3385 |
+
strip: strip,
|
| 3386 |
+
loc: this.locInfo(locInfo)
|
| 3387 |
+
};
|
| 3388 |
+
}
|
| 3389 |
+
|
| 3390 |
+
function prepareRawBlock(openRawBlock, contents, close, locInfo) {
|
| 3391 |
+
validateClose(openRawBlock, close);
|
| 3392 |
+
|
| 3393 |
+
locInfo = this.locInfo(locInfo);
|
| 3394 |
+
var program = {
|
| 3395 |
+
type: 'Program',
|
| 3396 |
+
body: contents,
|
| 3397 |
+
strip: {},
|
| 3398 |
+
loc: locInfo
|
| 3399 |
+
};
|
| 3400 |
+
|
| 3401 |
+
return {
|
| 3402 |
+
type: 'BlockStatement',
|
| 3403 |
+
path: openRawBlock.path,
|
| 3404 |
+
params: openRawBlock.params,
|
| 3405 |
+
hash: openRawBlock.hash,
|
| 3406 |
+
program: program,
|
| 3407 |
+
openStrip: {},
|
| 3408 |
+
inverseStrip: {},
|
| 3409 |
+
closeStrip: {},
|
| 3410 |
+
loc: locInfo
|
| 3411 |
+
};
|
| 3412 |
+
}
|
| 3413 |
+
|
| 3414 |
+
function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
|
| 3415 |
+
if (close && close.path) {
|
| 3416 |
+
validateClose(openBlock, close);
|
| 3417 |
+
}
|
| 3418 |
+
|
| 3419 |
+
var decorator = /\*/.test(openBlock.open);
|
| 3420 |
+
|
| 3421 |
+
program.blockParams = openBlock.blockParams;
|
| 3422 |
+
|
| 3423 |
+
var inverse = undefined,
|
| 3424 |
+
inverseStrip = undefined;
|
| 3425 |
+
|
| 3426 |
+
if (inverseAndProgram) {
|
| 3427 |
+
if (decorator) {
|
| 3428 |
+
throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
|
| 3429 |
+
}
|
| 3430 |
+
|
| 3431 |
+
if (inverseAndProgram.chain) {
|
| 3432 |
+
inverseAndProgram.program.body[0].closeStrip = close.strip;
|
| 3433 |
+
}
|
| 3434 |
+
|
| 3435 |
+
inverseStrip = inverseAndProgram.strip;
|
| 3436 |
+
inverse = inverseAndProgram.program;
|
| 3437 |
+
}
|
| 3438 |
+
|
| 3439 |
+
if (inverted) {
|
| 3440 |
+
inverted = inverse;
|
| 3441 |
+
inverse = program;
|
| 3442 |
+
program = inverted;
|
| 3443 |
+
}
|
| 3444 |
+
|
| 3445 |
+
return {
|
| 3446 |
+
type: decorator ? 'DecoratorBlock' : 'BlockStatement',
|
| 3447 |
+
path: openBlock.path,
|
| 3448 |
+
params: openBlock.params,
|
| 3449 |
+
hash: openBlock.hash,
|
| 3450 |
+
program: program,
|
| 3451 |
+
inverse: inverse,
|
| 3452 |
+
openStrip: openBlock.strip,
|
| 3453 |
+
inverseStrip: inverseStrip,
|
| 3454 |
+
closeStrip: close && close.strip,
|
| 3455 |
+
loc: this.locInfo(locInfo)
|
| 3456 |
+
};
|
| 3457 |
+
}
|
| 3458 |
+
|
| 3459 |
+
function prepareProgram(statements, loc) {
|
| 3460 |
+
if (!loc && statements.length) {
|
| 3461 |
+
var firstLoc = statements[0].loc,
|
| 3462 |
+
lastLoc = statements[statements.length - 1].loc;
|
| 3463 |
+
|
| 3464 |
+
/* istanbul ignore else */
|
| 3465 |
+
if (firstLoc && lastLoc) {
|
| 3466 |
+
loc = {
|
| 3467 |
+
source: firstLoc.source,
|
| 3468 |
+
start: {
|
| 3469 |
+
line: firstLoc.start.line,
|
| 3470 |
+
column: firstLoc.start.column
|
| 3471 |
+
},
|
| 3472 |
+
end: {
|
| 3473 |
+
line: lastLoc.end.line,
|
| 3474 |
+
column: lastLoc.end.column
|
| 3475 |
+
}
|
| 3476 |
+
};
|
| 3477 |
+
}
|
| 3478 |
+
}
|
| 3479 |
+
|
| 3480 |
+
return {
|
| 3481 |
+
type: 'Program',
|
| 3482 |
+
body: statements,
|
| 3483 |
+
strip: {},
|
| 3484 |
+
loc: loc
|
| 3485 |
+
};
|
| 3486 |
+
}
|
| 3487 |
+
|
| 3488 |
+
function preparePartialBlock(open, program, close, locInfo) {
|
| 3489 |
+
validateClose(open, close);
|
| 3490 |
+
|
| 3491 |
+
return {
|
| 3492 |
+
type: 'PartialBlockStatement',
|
| 3493 |
+
name: open.path,
|
| 3494 |
+
params: open.params,
|
| 3495 |
+
hash: open.hash,
|
| 3496 |
+
program: program,
|
| 3497 |
+
openStrip: open.strip,
|
| 3498 |
+
closeStrip: close && close.strip,
|
| 3499 |
+
loc: this.locInfo(locInfo)
|
| 3500 |
+
};
|
| 3501 |
+
}
|
| 3502 |
+
|
| 3503 |
+
/***/ }),
|
| 3504 |
+
/* 41 */
|
| 3505 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 3506 |
+
|
| 3507 |
+
/* eslint-disable new-cap */
|
| 3508 |
+
|
| 3509 |
+
'use strict';
|
| 3510 |
+
|
| 3511 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 3512 |
+
|
| 3513 |
+
exports.__esModule = true;
|
| 3514 |
+
exports.Compiler = Compiler;
|
| 3515 |
+
exports.precompile = precompile;
|
| 3516 |
+
exports.compile = compile;
|
| 3517 |
+
|
| 3518 |
+
var _exception = __webpack_require__(6);
|
| 3519 |
+
|
| 3520 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 3521 |
+
|
| 3522 |
+
var _utils = __webpack_require__(5);
|
| 3523 |
+
|
| 3524 |
+
var _ast = __webpack_require__(35);
|
| 3525 |
+
|
| 3526 |
+
var _ast2 = _interopRequireDefault(_ast);
|
| 3527 |
+
|
| 3528 |
+
var slice = [].slice;
|
| 3529 |
+
|
| 3530 |
+
function Compiler() {}
|
| 3531 |
+
|
| 3532 |
+
// the foundHelper register will disambiguate helper lookup from finding a
|
| 3533 |
+
// function in a context. This is necessary for mustache compatibility, which
|
| 3534 |
+
// requires that context functions in blocks are evaluated by blockHelperMissing,
|
| 3535 |
+
// and then proceed as if the resulting value was provided to blockHelperMissing.
|
| 3536 |
+
|
| 3537 |
+
Compiler.prototype = {
|
| 3538 |
+
compiler: Compiler,
|
| 3539 |
+
|
| 3540 |
+
equals: function equals(other) {
|
| 3541 |
+
var len = this.opcodes.length;
|
| 3542 |
+
if (other.opcodes.length !== len) {
|
| 3543 |
+
return false;
|
| 3544 |
+
}
|
| 3545 |
|
| 3546 |
+
for (var i = 0; i < len; i++) {
|
| 3547 |
+
var opcode = this.opcodes[i],
|
| 3548 |
+
otherOpcode = other.opcodes[i];
|
| 3549 |
+
if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
|
| 3550 |
+
return false;
|
| 3551 |
+
}
|
| 3552 |
}
|
|
|
|
| 3553 |
|
| 3554 |
+
// We know that length is the same between the two arrays because they are directly tied
|
| 3555 |
+
// to the opcode behavior above.
|
| 3556 |
+
len = this.children.length;
|
| 3557 |
+
for (var i = 0; i < len; i++) {
|
| 3558 |
+
if (!this.children[i].equals(other.children[i])) {
|
| 3559 |
+
return false;
|
| 3560 |
+
}
|
| 3561 |
+
}
|
| 3562 |
|
| 3563 |
+
return true;
|
| 3564 |
+
},
|
| 3565 |
|
| 3566 |
+
guid: 0,
|
| 3567 |
+
|
| 3568 |
+
compile: function compile(program, options) {
|
| 3569 |
+
this.sourceNode = [];
|
| 3570 |
+
this.opcodes = [];
|
| 3571 |
+
this.children = [];
|
| 3572 |
+
this.options = options;
|
| 3573 |
+
this.stringParams = options.stringParams;
|
| 3574 |
+
this.trackIds = options.trackIds;
|
| 3575 |
+
|
| 3576 |
+
options.blockParams = options.blockParams || [];
|
| 3577 |
+
|
| 3578 |
+
// These changes will propagate to the other compiler components
|
| 3579 |
+
var knownHelpers = options.knownHelpers;
|
| 3580 |
+
options.knownHelpers = {
|
| 3581 |
+
'helperMissing': true,
|
| 3582 |
+
'blockHelperMissing': true,
|
| 3583 |
+
'each': true,
|
| 3584 |
+
'if': true,
|
| 3585 |
+
'unless': true,
|
| 3586 |
+
'with': true,
|
| 3587 |
+
'log': true,
|
| 3588 |
+
'lookup': true
|
| 3589 |
+
};
|
| 3590 |
+
if (knownHelpers) {
|
| 3591 |
+
for (var _name in knownHelpers) {
|
| 3592 |
+
/* istanbul ignore else */
|
| 3593 |
+
if (_name in knownHelpers) {
|
| 3594 |
+
this.options.knownHelpers[_name] = knownHelpers[_name];
|
| 3595 |
+
}
|
| 3596 |
+
}
|
| 3597 |
}
|
| 3598 |
+
|
| 3599 |
+
return this.accept(program);
|
| 3600 |
},
|
| 3601 |
|
| 3602 |
+
compileProgram: function compileProgram(program) {
|
| 3603 |
+
var childCompiler = new this.compiler(),
|
| 3604 |
+
// eslint-disable-line new-cap
|
| 3605 |
+
result = childCompiler.compile(program, this.options),
|
| 3606 |
+
guid = this.guid++;
|
| 3607 |
+
|
| 3608 |
+
this.usePartial = this.usePartial || result.usePartial;
|
| 3609 |
+
|
| 3610 |
+
this.children[guid] = result;
|
| 3611 |
+
this.useDepths = this.useDepths || result.useDepths;
|
| 3612 |
+
|
| 3613 |
+
return guid;
|
| 3614 |
},
|
| 3615 |
|
| 3616 |
+
accept: function accept(node) {
|
| 3617 |
+
/* istanbul ignore next: Sanity code */
|
| 3618 |
+
if (!this[node.type]) {
|
| 3619 |
+
throw new _exception2['default']('Unknown type: ' + node.type, node);
|
| 3620 |
+
}
|
| 3621 |
+
|
| 3622 |
+
this.sourceNode.unshift(node);
|
| 3623 |
+
var ret = this[node.type](node);
|
| 3624 |
+
this.sourceNode.shift();
|
| 3625 |
+
return ret;
|
| 3626 |
},
|
| 3627 |
|
| 3628 |
+
Program: function Program(program) {
|
| 3629 |
+
this.options.blockParams.unshift(program.blockParams);
|
| 3630 |
+
|
| 3631 |
+
var body = program.body,
|
| 3632 |
+
bodyLength = body.length;
|
| 3633 |
+
for (var i = 0; i < bodyLength; i++) {
|
| 3634 |
+
this.accept(body[i]);
|
| 3635 |
+
}
|
| 3636 |
+
|
| 3637 |
+
this.options.blockParams.shift();
|
| 3638 |
+
|
| 3639 |
+
this.isSimple = bodyLength === 1;
|
| 3640 |
+
this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
| 3641 |
|
| 3642 |
+
return this;
|
|
|
|
| 3643 |
},
|
| 3644 |
|
| 3645 |
+
BlockStatement: function BlockStatement(block) {
|
| 3646 |
+
transformLiteralToPath(block);
|
| 3647 |
+
|
| 3648 |
+
var program = block.program,
|
| 3649 |
+
inverse = block.inverse;
|
| 3650 |
+
|
| 3651 |
+
program = program && this.compileProgram(program);
|
| 3652 |
+
inverse = inverse && this.compileProgram(inverse);
|
| 3653 |
+
|
| 3654 |
+
var type = this.classifySexpr(block);
|
| 3655 |
+
|
| 3656 |
+
if (type === 'helper') {
|
| 3657 |
+
this.helperSexpr(block, program, inverse);
|
| 3658 |
+
} else if (type === 'simple') {
|
| 3659 |
+
this.simpleSexpr(block);
|
| 3660 |
+
|
| 3661 |
+
// now that the simple mustache is resolved, we need to
|
| 3662 |
+
// evaluate it by executing `blockHelperMissing`
|
| 3663 |
+
this.opcode('pushProgram', program);
|
| 3664 |
+
this.opcode('pushProgram', inverse);
|
| 3665 |
+
this.opcode('emptyHash');
|
| 3666 |
+
this.opcode('blockValue', block.path.original);
|
| 3667 |
+
} else {
|
| 3668 |
+
this.ambiguousSexpr(block, program, inverse);
|
| 3669 |
+
|
| 3670 |
+
// now that the simple mustache is resolved, we need to
|
| 3671 |
+
// evaluate it by executing `blockHelperMissing`
|
| 3672 |
+
this.opcode('pushProgram', program);
|
| 3673 |
+
this.opcode('pushProgram', inverse);
|
| 3674 |
+
this.opcode('emptyHash');
|
| 3675 |
+
this.opcode('ambiguousBlockValue');
|
| 3676 |
+
}
|
| 3677 |
+
|
| 3678 |
+
this.opcode('append');
|
| 3679 |
},
|
| 3680 |
|
| 3681 |
+
DecoratorBlock: function DecoratorBlock(decorator) {
|
| 3682 |
+
var program = decorator.program && this.compileProgram(decorator.program);
|
| 3683 |
+
var params = this.setupFullMustacheParams(decorator, program, undefined),
|
| 3684 |
+
path = decorator.path;
|
| 3685 |
|
| 3686 |
+
this.useDecorators = true;
|
| 3687 |
+
this.opcode('registerDecorator', params.length, path.original);
|
|
|
|
|
|
|
| 3688 |
},
|
| 3689 |
|
| 3690 |
+
PartialStatement: function PartialStatement(partial) {
|
| 3691 |
+
this.usePartial = true;
|
| 3692 |
|
| 3693 |
+
var program = partial.program;
|
| 3694 |
+
if (program) {
|
| 3695 |
+
program = this.compileProgram(partial.program);
|
| 3696 |
+
}
|
|
|
|
| 3697 |
|
| 3698 |
+
var params = partial.params;
|
| 3699 |
+
if (params.length > 1) {
|
| 3700 |
+
throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
|
| 3701 |
+
} else if (!params.length) {
|
| 3702 |
+
if (this.options.explicitPartialContext) {
|
| 3703 |
+
this.opcode('pushLiteral', 'undefined');
|
| 3704 |
+
} else {
|
| 3705 |
+
params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
| 3706 |
+
}
|
| 3707 |
+
}
|
| 3708 |
|
| 3709 |
+
var partialName = partial.name.original,
|
| 3710 |
+
isDynamic = partial.name.type === 'SubExpression';
|
| 3711 |
+
if (isDynamic) {
|
| 3712 |
+
this.accept(partial.name);
|
| 3713 |
+
}
|
| 3714 |
|
| 3715 |
+
this.setupFullMustacheParams(partial, program, undefined, true);
|
|
|
|
|
|
|
| 3716 |
|
| 3717 |
+
var indent = partial.indent || '';
|
| 3718 |
+
if (this.options.preventIndent && indent) {
|
| 3719 |
+
this.opcode('appendContent', indent);
|
| 3720 |
+
indent = '';
|
| 3721 |
+
}
|
| 3722 |
|
| 3723 |
+
this.opcode('invokePartial', isDynamic, partialName, indent);
|
| 3724 |
+
this.opcode('append');
|
| 3725 |
+
},
|
| 3726 |
+
PartialBlockStatement: function PartialBlockStatement(partialBlock) {
|
| 3727 |
+
this.PartialStatement(partialBlock);
|
| 3728 |
+
},
|
| 3729 |
|
| 3730 |
+
MustacheStatement: function MustacheStatement(mustache) {
|
| 3731 |
+
this.SubExpression(mustache);
|
| 3732 |
+
|
| 3733 |
+
if (mustache.escaped && !this.options.noEscape) {
|
| 3734 |
+
this.opcode('appendEscaped');
|
| 3735 |
+
} else {
|
| 3736 |
+
this.opcode('append');
|
|
|
|
| 3737 |
}
|
| 3738 |
+
},
|
| 3739 |
+
Decorator: function Decorator(decorator) {
|
| 3740 |
+
this.DecoratorBlock(decorator);
|
| 3741 |
+
},
|
| 3742 |
|
| 3743 |
+
ContentStatement: function ContentStatement(content) {
|
| 3744 |
+
if (content.value) {
|
| 3745 |
+
this.opcode('appendContent', content.value);
|
| 3746 |
+
}
|
| 3747 |
+
},
|
| 3748 |
|
| 3749 |
+
CommentStatement: function CommentStatement() {},
|
|
|
|
|
|
|
| 3750 |
|
| 3751 |
+
SubExpression: function SubExpression(sexpr) {
|
| 3752 |
+
transformLiteralToPath(sexpr);
|
| 3753 |
+
var type = this.classifySexpr(sexpr);
|
| 3754 |
|
| 3755 |
+
if (type === 'simple') {
|
| 3756 |
+
this.simpleSexpr(sexpr);
|
| 3757 |
+
} else if (type === 'helper') {
|
| 3758 |
+
this.helperSexpr(sexpr);
|
| 3759 |
+
} else {
|
| 3760 |
+
this.ambiguousSexpr(sexpr);
|
| 3761 |
+
}
|
| 3762 |
+
},
|
| 3763 |
+
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
| 3764 |
+
var path = sexpr.path,
|
| 3765 |
+
name = path.parts[0],
|
| 3766 |
+
isBlock = program != null || inverse != null;
|
| 3767 |
|
| 3768 |
+
this.opcode('getContext', path.depth);
|
| 3769 |
|
| 3770 |
+
this.opcode('pushProgram', program);
|
| 3771 |
+
this.opcode('pushProgram', inverse);
|
|
|
|
| 3772 |
|
| 3773 |
+
path.strict = true;
|
| 3774 |
+
this.accept(path);
|
| 3775 |
|
| 3776 |
+
this.opcode('invokeAmbiguous', name, isBlock);
|
| 3777 |
+
},
|
| 3778 |
|
| 3779 |
+
simpleSexpr: function simpleSexpr(sexpr) {
|
| 3780 |
+
var path = sexpr.path;
|
| 3781 |
+
path.strict = true;
|
| 3782 |
+
this.accept(path);
|
| 3783 |
+
this.opcode('resolvePossibleLambda');
|
| 3784 |
+
},
|
| 3785 |
+
|
| 3786 |
+
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
| 3787 |
+
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
| 3788 |
+
path = sexpr.path,
|
| 3789 |
+
name = path.parts[0];
|
| 3790 |
+
|
| 3791 |
+
if (this.options.knownHelpers[name]) {
|
| 3792 |
+
this.opcode('invokeKnownHelper', params.length, name);
|
| 3793 |
+
} else if (this.options.knownHelpersOnly) {
|
| 3794 |
+
throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
|
| 3795 |
+
} else {
|
| 3796 |
+
path.strict = true;
|
| 3797 |
+
path.falsy = true;
|
| 3798 |
|
| 3799 |
+
this.accept(path);
|
| 3800 |
+
this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
|
| 3801 |
+
}
|
| 3802 |
+
},
|
| 3803 |
|
| 3804 |
+
PathExpression: function PathExpression(path) {
|
| 3805 |
+
this.addDepth(path.depth);
|
| 3806 |
+
this.opcode('getContext', path.depth);
|
| 3807 |
|
| 3808 |
+
var name = path.parts[0],
|
| 3809 |
+
scoped = _ast2['default'].helpers.scopedId(path),
|
| 3810 |
+
blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
|
| 3811 |
|
| 3812 |
+
if (blockParamId) {
|
| 3813 |
+
this.opcode('lookupBlockParam', blockParamId, path.parts);
|
| 3814 |
+
} else if (!name) {
|
| 3815 |
+
// Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
|
| 3816 |
+
this.opcode('pushContext');
|
| 3817 |
+
} else if (path.data) {
|
| 3818 |
+
this.options.data = true;
|
| 3819 |
+
this.opcode('lookupData', path.depth, path.parts, path.strict);
|
| 3820 |
+
} else {
|
| 3821 |
+
this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
|
| 3822 |
+
}
|
| 3823 |
+
},
|
| 3824 |
|
| 3825 |
+
StringLiteral: function StringLiteral(string) {
|
| 3826 |
+
this.opcode('pushString', string.value);
|
| 3827 |
+
},
|
| 3828 |
|
| 3829 |
+
NumberLiteral: function NumberLiteral(number) {
|
| 3830 |
+
this.opcode('pushLiteral', number.value);
|
| 3831 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3832 |
|
| 3833 |
+
BooleanLiteral: function BooleanLiteral(bool) {
|
| 3834 |
+
this.opcode('pushLiteral', bool.value);
|
| 3835 |
+
},
|
|
|
|
|
|
|
| 3836 |
|
| 3837 |
+
UndefinedLiteral: function UndefinedLiteral() {
|
| 3838 |
+
this.opcode('pushLiteral', 'undefined');
|
| 3839 |
+
},
|
| 3840 |
|
| 3841 |
+
NullLiteral: function NullLiteral() {
|
| 3842 |
+
this.opcode('pushLiteral', 'null');
|
| 3843 |
+
},
|
| 3844 |
|
| 3845 |
+
Hash: function Hash(hash) {
|
| 3846 |
+
var pairs = hash.pairs,
|
| 3847 |
+
i = 0,
|
| 3848 |
+
l = pairs.length;
|
| 3849 |
|
| 3850 |
+
this.opcode('pushHash');
|
|
|
|
| 3851 |
|
| 3852 |
+
for (; i < l; i++) {
|
| 3853 |
+
this.pushParam(pairs[i].value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3854 |
}
|
| 3855 |
+
while (i--) {
|
| 3856 |
+
this.opcode('assignToHash', pairs[i].key);
|
| 3857 |
+
}
|
| 3858 |
+
this.opcode('popHash');
|
| 3859 |
},
|
| 3860 |
|
| 3861 |
+
// HELPERS
|
| 3862 |
+
opcode: function opcode(name) {
|
| 3863 |
+
this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3864 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3865 |
|
| 3866 |
+
addDepth: function addDepth(depth) {
|
| 3867 |
+
if (!depth) {
|
| 3868 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3869 |
}
|
|
|
|
| 3870 |
|
| 3871 |
+
this.useDepths = true;
|
| 3872 |
+
},
|
|
|
|
| 3873 |
|
| 3874 |
+
classifySexpr: function classifySexpr(sexpr) {
|
| 3875 |
+
var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3876 |
|
| 3877 |
+
var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3878 |
|
| 3879 |
+
// a mustache is an eligible helper if:
|
| 3880 |
+
// * its id is simple (a single part, not `this` or `..`)
|
| 3881 |
+
var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
|
| 3882 |
|
| 3883 |
+
// if a mustache is an eligible helper but not a definite
|
| 3884 |
+
// helper, it is ambiguous, and will be resolved in a later
|
| 3885 |
+
// pass or at runtime.
|
| 3886 |
+
var isEligible = !isBlockParam && (isHelper || isSimple);
|
| 3887 |
|
| 3888 |
+
// if ambiguous, we can possibly resolve the ambiguity now
|
| 3889 |
+
// An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
|
| 3890 |
+
if (isEligible && !isHelper) {
|
| 3891 |
+
var _name2 = sexpr.path.parts[0],
|
| 3892 |
+
options = this.options;
|
|
|
|
| 3893 |
|
| 3894 |
+
if (options.knownHelpers[_name2]) {
|
| 3895 |
+
isHelper = true;
|
| 3896 |
+
} else if (options.knownHelpersOnly) {
|
| 3897 |
+
isEligible = false;
|
| 3898 |
+
}
|
| 3899 |
}
|
| 3900 |
|
| 3901 |
+
if (isHelper) {
|
| 3902 |
+
return 'helper';
|
| 3903 |
+
} else if (isEligible) {
|
| 3904 |
+
return 'ambiguous';
|
| 3905 |
+
} else {
|
| 3906 |
+
return 'simple';
|
| 3907 |
}
|
| 3908 |
+
},
|
| 3909 |
|
| 3910 |
+
pushParams: function pushParams(params) {
|
| 3911 |
+
for (var i = 0, l = params.length; i < l; i++) {
|
| 3912 |
+
this.pushParam(params[i]);
|
| 3913 |
}
|
| 3914 |
+
},
|
| 3915 |
|
| 3916 |
+
pushParam: function pushParam(val) {
|
| 3917 |
+
var value = val.value != null ? val.value : val.original || '';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3918 |
|
| 3919 |
+
if (this.stringParams) {
|
| 3920 |
+
if (value.replace) {
|
| 3921 |
+
value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
| 3922 |
}
|
| 3923 |
|
| 3924 |
+
if (val.depth) {
|
| 3925 |
+
this.addDepth(val.depth);
|
| 3926 |
+
}
|
| 3927 |
+
this.opcode('getContext', val.depth || 0);
|
| 3928 |
+
this.opcode('pushStringParam', value, val.type);
|
| 3929 |
|
| 3930 |
+
if (val.type === 'SubExpression') {
|
| 3931 |
+
// SubExpressions get evaluated and passed in
|
| 3932 |
+
// in string params mode.
|
| 3933 |
+
this.accept(val);
|
| 3934 |
+
}
|
| 3935 |
+
} else {
|
| 3936 |
+
if (this.trackIds) {
|
| 3937 |
+
var blockParamIndex = undefined;
|
| 3938 |
+
if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
|
| 3939 |
+
blockParamIndex = this.blockParamIndex(val.parts[0]);
|
| 3940 |
}
|
| 3941 |
+
if (blockParamIndex) {
|
| 3942 |
+
var blockParamChild = val.parts.slice(1).join('.');
|
| 3943 |
+
this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
| 3944 |
+
} else {
|
| 3945 |
+
value = val.original || value;
|
| 3946 |
+
if (value.replace) {
|
| 3947 |
+
value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3948 |
}
|
| 3949 |
+
|
| 3950 |
+
this.opcode('pushId', val.type, value);
|
|
|
|
| 3951 |
}
|
| 3952 |
}
|
| 3953 |
+
this.accept(val);
|
| 3954 |
}
|
| 3955 |
+
},
|
| 3956 |
|
| 3957 |
+
setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
|
| 3958 |
+
var params = sexpr.params;
|
| 3959 |
+
this.pushParams(params);
|
|
|
|
|
|
|
|
|
|
| 3960 |
|
| 3961 |
+
this.opcode('pushProgram', program);
|
| 3962 |
+
this.opcode('pushProgram', inverse);
|
|
|
|
|
|
|
| 3963 |
|
| 3964 |
+
if (sexpr.hash) {
|
| 3965 |
+
this.accept(sexpr.hash);
|
|
|
|
|
|
|
|
|
|
| 3966 |
} else {
|
| 3967 |
+
this.opcode('emptyHash', omitEmpty);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3968 |
}
|
| 3969 |
|
| 3970 |
+
return params;
|
| 3971 |
+
},
|
| 3972 |
|
| 3973 |
+
blockParamIndex: function blockParamIndex(name) {
|
| 3974 |
+
for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
|
| 3975 |
+
var blockParams = this.options.blockParams[depth],
|
| 3976 |
+
param = blockParams && _utils.indexOf(blockParams, name);
|
| 3977 |
+
if (blockParams && param >= 0) {
|
| 3978 |
+
return [depth, param];
|
| 3979 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3980 |
}
|
| 3981 |
+
}
|
| 3982 |
+
};
|
| 3983 |
|
| 3984 |
+
function precompile(input, options, env) {
|
| 3985 |
+
if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
| 3986 |
+
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
|
| 3987 |
+
}
|
| 3988 |
|
| 3989 |
+
options = options || {};
|
| 3990 |
+
if (!('data' in options)) {
|
| 3991 |
+
options.data = true;
|
| 3992 |
+
}
|
| 3993 |
+
if (options.compat) {
|
| 3994 |
+
options.useDepths = true;
|
| 3995 |
+
}
|
| 3996 |
+
|
| 3997 |
+
var ast = env.parse(input, options),
|
| 3998 |
+
environment = new env.Compiler().compile(ast, options);
|
| 3999 |
+
return new env.JavaScriptCompiler().compile(environment, options);
|
| 4000 |
}
|
| 4001 |
|
| 4002 |
+
function compile(input, options, env) {
|
| 4003 |
+
if (options === undefined) options = {};
|
| 4004 |
|
| 4005 |
+
if (input == null || typeof input !== 'string' && input.type !== 'Program') {
|
| 4006 |
+
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
| 4007 |
+
}
|
|
|
|
|
|
|
|
|
|
| 4008 |
|
| 4009 |
+
options = _utils.extend({}, options);
|
| 4010 |
+
if (!('data' in options)) {
|
| 4011 |
+
options.data = true;
|
| 4012 |
+
}
|
| 4013 |
+
if (options.compat) {
|
| 4014 |
+
options.useDepths = true;
|
| 4015 |
}
|
|
|
|
| 4016 |
|
| 4017 |
+
var compiled = undefined;
|
|
|
|
| 4018 |
|
| 4019 |
+
function compileInput() {
|
| 4020 |
+
var ast = env.parse(input, options),
|
| 4021 |
+
environment = new env.Compiler().compile(ast, options),
|
| 4022 |
+
templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
|
| 4023 |
+
return env.template(templateSpec);
|
| 4024 |
+
}
|
| 4025 |
|
| 4026 |
+
// Template is only compiled on first use and cached after that point.
|
| 4027 |
+
function ret(context, execOptions) {
|
| 4028 |
+
if (!compiled) {
|
| 4029 |
+
compiled = compileInput();
|
| 4030 |
+
}
|
| 4031 |
+
return compiled.call(this, context, execOptions);
|
| 4032 |
+
}
|
| 4033 |
+
ret._setup = function (setupOptions) {
|
| 4034 |
+
if (!compiled) {
|
| 4035 |
+
compiled = compileInput();
|
| 4036 |
+
}
|
| 4037 |
+
return compiled._setup(setupOptions);
|
| 4038 |
+
};
|
| 4039 |
+
ret._child = function (i, data, blockParams, depths) {
|
| 4040 |
+
if (!compiled) {
|
| 4041 |
+
compiled = compileInput();
|
| 4042 |
+
}
|
| 4043 |
+
return compiled._child(i, data, blockParams, depths);
|
| 4044 |
+
};
|
| 4045 |
+
return ret;
|
| 4046 |
}
|
| 4047 |
|
| 4048 |
+
function argEquals(a, b) {
|
| 4049 |
+
if (a === b) {
|
| 4050 |
+
return true;
|
| 4051 |
+
}
|
|
|
|
|
|
|
|
|
|
| 4052 |
|
| 4053 |
+
if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
|
| 4054 |
+
for (var i = 0; i < a.length; i++) {
|
| 4055 |
+
if (!argEquals(a[i], b[i])) {
|
| 4056 |
+
return false;
|
| 4057 |
+
}
|
| 4058 |
+
}
|
| 4059 |
+
return true;
|
| 4060 |
+
}
|
| 4061 |
}
|
| 4062 |
|
| 4063 |
+
function transformLiteralToPath(sexpr) {
|
| 4064 |
+
if (!sexpr.path.parts) {
|
| 4065 |
+
var literal = sexpr.path;
|
| 4066 |
+
// Casting to string here to make false and 0 literal values play nicely with the rest
|
| 4067 |
+
// of the system.
|
| 4068 |
+
sexpr.path = {
|
| 4069 |
+
type: 'PathExpression',
|
| 4070 |
+
data: false,
|
| 4071 |
+
depth: 0,
|
| 4072 |
+
parts: [literal.original + ''],
|
| 4073 |
+
original: literal.original + '',
|
| 4074 |
+
loc: literal.loc
|
| 4075 |
+
};
|
| 4076 |
+
}
|
| 4077 |
+
}
|
| 4078 |
|
| 4079 |
+
/***/ }),
|
| 4080 |
+
/* 42 */
|
| 4081 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 4082 |
|
| 4083 |
'use strict';
|
| 4084 |
|
| 4085 |
+
var _interopRequireDefault = __webpack_require__(1)['default'];
|
| 4086 |
+
|
| 4087 |
exports.__esModule = true;
|
| 4088 |
|
| 4089 |
+
var _base = __webpack_require__(4);
|
| 4090 |
|
| 4091 |
+
var _exception = __webpack_require__(6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4092 |
|
| 4093 |
+
var _exception2 = _interopRequireDefault(_exception);
|
|
|
|
| 4094 |
|
| 4095 |
+
var _utils = __webpack_require__(5);
|
| 4096 |
|
| 4097 |
+
var _codeGen = __webpack_require__(43);
|
|
|
|
|
|
|
|
|
|
| 4098 |
|
| 4099 |
+
var _codeGen2 = _interopRequireDefault(_codeGen);
|
|
|
|
|
|
|
| 4100 |
|
| 4101 |
+
function Literal(value) {
|
| 4102 |
+
this.value = value;
|
|
|
|
|
|
|
| 4103 |
}
|
| 4104 |
|
| 4105 |
+
function JavaScriptCompiler() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4106 |
|
| 4107 |
+
JavaScriptCompiler.prototype = {
|
| 4108 |
+
// PUBLIC API: You can override these methods in a subclass to provide
|
| 4109 |
+
// alternative compiled forms for name lookup and buffering semantics
|
| 4110 |
+
nameLookup: function nameLookup(parent, name /* , type*/) {
|
| 4111 |
+
if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
| 4112 |
+
return [parent, '.', name];
|
| 4113 |
+
} else {
|
| 4114 |
+
return [parent, '[', JSON.stringify(name), ']'];
|
| 4115 |
+
}
|
| 4116 |
+
},
|
| 4117 |
+
depthedLookup: function depthedLookup(name) {
|
| 4118 |
+
return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
|
| 4119 |
+
},
|
| 4120 |
|
| 4121 |
+
compilerInfo: function compilerInfo() {
|
| 4122 |
+
var revision = _base.COMPILER_REVISION,
|
| 4123 |
+
versions = _base.REVISION_CHANGES[revision];
|
| 4124 |
+
return [revision, versions];
|
| 4125 |
+
},
|
| 4126 |
|
| 4127 |
+
appendToBuffer: function appendToBuffer(source, location, explicit) {
|
| 4128 |
+
// Force a source as this simplifies the merge logic.
|
| 4129 |
+
if (!_utils.isArray(source)) {
|
| 4130 |
+
source = [source];
|
|
|
|
|
|
|
| 4131 |
}
|
| 4132 |
+
source = this.source.wrap(source, location);
|
| 4133 |
|
| 4134 |
+
if (this.environment.isSimple) {
|
| 4135 |
+
return ['return ', source, ';'];
|
| 4136 |
+
} else if (explicit) {
|
| 4137 |
+
// This is a case where the buffer operation occurs as a child of another
|
| 4138 |
+
// construct, generally braces. We have to explicitly output these buffer
|
| 4139 |
+
// operations to ensure that the emitted code goes in the correct location.
|
| 4140 |
+
return ['buffer += ', source, ';'];
|
| 4141 |
+
} else {
|
| 4142 |
+
source.appendToBuffer = true;
|
| 4143 |
+
return source;
|
| 4144 |
+
}
|
| 4145 |
+
},
|
| 4146 |
|
| 4147 |
+
initializeBuffer: function initializeBuffer() {
|
| 4148 |
+
return this.quotedString('');
|
| 4149 |
+
},
|
| 4150 |
+
// END PUBLIC API
|
| 4151 |
|
| 4152 |
+
compile: function compile(environment, options, context, asObject) {
|
| 4153 |
+
this.environment = environment;
|
| 4154 |
+
this.options = options;
|
| 4155 |
+
this.stringParams = this.options.stringParams;
|
| 4156 |
+
this.trackIds = this.options.trackIds;
|
| 4157 |
+
this.precompile = !asObject;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4158 |
|
| 4159 |
+
this.name = this.environment.name;
|
| 4160 |
+
this.isChild = !!context;
|
| 4161 |
+
this.context = context || {
|
| 4162 |
+
decorators: [],
|
| 4163 |
+
programs: [],
|
| 4164 |
+
environments: []
|
| 4165 |
+
};
|
| 4166 |
|
| 4167 |
+
this.preamble();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4168 |
|
| 4169 |
+
this.stackSlot = 0;
|
| 4170 |
+
this.stackVars = [];
|
| 4171 |
+
this.aliases = {};
|
| 4172 |
+
this.registers = { list: [] };
|
| 4173 |
+
this.hashes = [];
|
| 4174 |
+
this.compileStack = [];
|
| 4175 |
+
this.inlineStack = [];
|
| 4176 |
+
this.blockParams = [];
|
|
|
|
|
|
|
| 4177 |
|
| 4178 |
+
this.compileChildren(environment, options);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4179 |
|
| 4180 |
+
this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
|
| 4181 |
+
this.useBlockParams = this.useBlockParams || environment.useBlockParams;
|
|
|
|
|
|
|
|
|
|
| 4182 |
|
| 4183 |
+
var opcodes = environment.opcodes,
|
| 4184 |
+
opcode = undefined,
|
| 4185 |
+
firstLoc = undefined,
|
| 4186 |
+
i = undefined,
|
| 4187 |
+
l = undefined;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4188 |
|
| 4189 |
+
for (i = 0, l = opcodes.length; i < l; i++) {
|
| 4190 |
+
opcode = opcodes[i];
|
|
|
|
|
|
|
| 4191 |
|
| 4192 |
+
this.source.currentLocation = opcode.loc;
|
| 4193 |
+
firstLoc = firstLoc || opcode.loc;
|
| 4194 |
+
this[opcode.opcode].apply(this, opcode.args);
|
| 4195 |
+
}
|
| 4196 |
|
| 4197 |
+
// Flush any trailing content that might be pending.
|
| 4198 |
+
this.source.currentLocation = firstLoc;
|
| 4199 |
+
this.pushSource('');
|
| 4200 |
|
| 4201 |
+
/* istanbul ignore next */
|
| 4202 |
+
if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
|
| 4203 |
+
throw new _exception2['default']('Compile completed with content left on stack');
|
| 4204 |
+
}
|
| 4205 |
|
| 4206 |
+
if (!this.decorators.isEmpty()) {
|
| 4207 |
+
this.useDecorators = true;
|
| 4208 |
|
| 4209 |
+
this.decorators.prepend('var decorators = container.decorators;\n');
|
| 4210 |
+
this.decorators.push('return fn;');
|
| 4211 |
|
| 4212 |
+
if (asObject) {
|
| 4213 |
+
this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
|
| 4214 |
+
} else {
|
| 4215 |
+
this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
|
| 4216 |
+
this.decorators.push('}\n');
|
| 4217 |
+
this.decorators = this.decorators.merge();
|
| 4218 |
+
}
|
| 4219 |
+
} else {
|
| 4220 |
+
this.decorators = undefined;
|
| 4221 |
+
}
|
| 4222 |
|
| 4223 |
+
var fn = this.createFunctionContext(asObject);
|
| 4224 |
+
if (!this.isChild) {
|
| 4225 |
+
var ret = {
|
| 4226 |
+
compiler: this.compilerInfo(),
|
| 4227 |
+
main: fn
|
| 4228 |
+
};
|
| 4229 |
|
| 4230 |
+
if (this.decorators) {
|
| 4231 |
+
ret.main_d = this.decorators; // eslint-disable-line camelcase
|
| 4232 |
+
ret.useDecorators = true;
|
| 4233 |
+
}
|
| 4234 |
|
| 4235 |
+
var _context = this.context;
|
| 4236 |
+
var programs = _context.programs;
|
| 4237 |
+
var decorators = _context.decorators;
|
| 4238 |
|
| 4239 |
+
for (i = 0, l = programs.length; i < l; i++) {
|
| 4240 |
+
if (programs[i]) {
|
| 4241 |
+
ret[i] = programs[i];
|
| 4242 |
+
if (decorators[i]) {
|
| 4243 |
+
ret[i + '_d'] = decorators[i];
|
| 4244 |
+
ret.useDecorators = true;
|
| 4245 |
+
}
|
| 4246 |
+
}
|
| 4247 |
+
}
|
| 4248 |
|
| 4249 |
+
if (this.environment.usePartial) {
|
| 4250 |
+
ret.usePartial = true;
|
| 4251 |
+
}
|
| 4252 |
+
if (this.options.data) {
|
| 4253 |
+
ret.useData = true;
|
| 4254 |
+
}
|
| 4255 |
+
if (this.useDepths) {
|
| 4256 |
+
ret.useDepths = true;
|
| 4257 |
+
}
|
| 4258 |
+
if (this.useBlockParams) {
|
| 4259 |
+
ret.useBlockParams = true;
|
| 4260 |
+
}
|
| 4261 |
+
if (this.options.compat) {
|
| 4262 |
+
ret.compat = true;
|
| 4263 |
+
}
|
| 4264 |
|
| 4265 |
+
if (!asObject) {
|
| 4266 |
+
ret.compiler = JSON.stringify(ret.compiler);
|
| 4267 |
|
| 4268 |
+
this.source.currentLocation = { start: { line: 1, column: 0 } };
|
| 4269 |
+
ret = this.objectLiteral(ret);
|
|
|
|
| 4270 |
|
| 4271 |
+
if (options.srcName) {
|
| 4272 |
+
ret = ret.toStringWithSourceMap({ file: options.destName });
|
| 4273 |
+
ret.map = ret.map && ret.map.toString();
|
| 4274 |
+
} else {
|
| 4275 |
+
ret = ret.toString();
|
| 4276 |
+
}
|
| 4277 |
+
} else {
|
| 4278 |
+
ret.compilerOptions = this.options;
|
| 4279 |
+
}
|
| 4280 |
+
|
| 4281 |
+
return ret;
|
| 4282 |
} else {
|
| 4283 |
+
return fn;
|
|
|
|
| 4284 |
}
|
| 4285 |
+
},
|
|
|
|
| 4286 |
|
| 4287 |
+
preamble: function preamble() {
|
| 4288 |
+
// track the last context pushed into place to allow skipping the
|
| 4289 |
+
// getContext opcode when it would be a noop
|
| 4290 |
+
this.lastContext = 0;
|
| 4291 |
+
this.source = new _codeGen2['default'](this.options.srcName);
|
| 4292 |
+
this.decorators = new _codeGen2['default'](this.options.srcName);
|
| 4293 |
+
},
|
|
|
|
| 4294 |
|
| 4295 |
+
createFunctionContext: function createFunctionContext(asObject) {
|
| 4296 |
+
var varDeclarations = '';
|
|
|
|
| 4297 |
|
| 4298 |
+
var locals = this.stackVars.concat(this.registers.list);
|
| 4299 |
+
if (locals.length > 0) {
|
| 4300 |
+
varDeclarations += ', ' + locals.join(', ');
|
| 4301 |
}
|
| 4302 |
|
| 4303 |
+
// Generate minimizer alias mappings
|
| 4304 |
+
//
|
| 4305 |
+
// When using true SourceNodes, this will update all references to the given alias
|
| 4306 |
+
// as the source nodes are reused in situ. For the non-source node compilation mode,
|
| 4307 |
+
// aliases will not be used, but this case is already being run on the client and
|
| 4308 |
+
// we aren't concern about minimizing the template size.
|
| 4309 |
+
var aliasCount = 0;
|
| 4310 |
+
for (var alias in this.aliases) {
|
| 4311 |
+
// eslint-disable-line guard-for-in
|
| 4312 |
+
var node = this.aliases[alias];
|
| 4313 |
|
| 4314 |
+
if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
|
| 4315 |
+
varDeclarations += ', alias' + ++aliasCount + '=' + alias;
|
| 4316 |
+
node.children[0] = 'alias' + aliasCount;
|
| 4317 |
+
}
|
| 4318 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4319 |
|
| 4320 |
+
var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
|
| 4321 |
+
|
| 4322 |
+
if (this.useBlockParams || this.useDepths) {
|
| 4323 |
+
params.push('blockParams');
|
| 4324 |
+
}
|
| 4325 |
+
if (this.useDepths) {
|
| 4326 |
+
params.push('depths');
|
| 4327 |
+
}
|
| 4328 |
+
|
| 4329 |
+
// Perform a second pass over the output to merge content when possible
|
| 4330 |
+
var source = this.mergeSource(varDeclarations);
|
| 4331 |
+
|
| 4332 |
+
if (asObject) {
|
| 4333 |
+
params.push(source);
|
| 4334 |
+
|
| 4335 |
+
return Function.apply(this, params);
|
| 4336 |
} else {
|
| 4337 |
+
return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']);
|
| 4338 |
}
|
| 4339 |
+
},
|
| 4340 |
+
mergeSource: function mergeSource(varDeclarations) {
|
| 4341 |
+
var isSimple = this.environment.isSimple,
|
| 4342 |
+
appendOnly = !this.forceBuffer,
|
| 4343 |
+
appendFirst = undefined,
|
| 4344 |
+
sourceSeen = undefined,
|
| 4345 |
+
bufferStart = undefined,
|
| 4346 |
+
bufferEnd = undefined;
|
| 4347 |
+
this.source.each(function (line) {
|
| 4348 |
+
if (line.appendToBuffer) {
|
| 4349 |
+
if (bufferStart) {
|
| 4350 |
+
line.prepend(' + ');
|
| 4351 |
+
} else {
|
| 4352 |
+
bufferStart = line;
|
| 4353 |
+
}
|
| 4354 |
+
bufferEnd = line;
|
| 4355 |
+
} else {
|
| 4356 |
+
if (bufferStart) {
|
| 4357 |
+
if (!sourceSeen) {
|
| 4358 |
+
appendFirst = true;
|
| 4359 |
+
} else {
|
| 4360 |
+
bufferStart.prepend('buffer += ');
|
| 4361 |
+
}
|
| 4362 |
+
bufferEnd.add(';');
|
| 4363 |
+
bufferStart = bufferEnd = undefined;
|
| 4364 |
+
}
|
| 4365 |
|
| 4366 |
+
sourceSeen = true;
|
| 4367 |
+
if (!isSimple) {
|
| 4368 |
+
appendOnly = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4369 |
}
|
| 4370 |
}
|
| 4371 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4372 |
|
| 4373 |
+
if (appendOnly) {
|
| 4374 |
+
if (bufferStart) {
|
| 4375 |
+
bufferStart.prepend('return ');
|
| 4376 |
+
bufferEnd.add(';');
|
| 4377 |
+
} else if (!sourceSeen) {
|
| 4378 |
+
this.source.push('return "";');
|
|
|
|
|
|
|
| 4379 |
}
|
| 4380 |
+
} else {
|
| 4381 |
+
varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
| 4382 |
|
| 4383 |
+
if (bufferStart) {
|
| 4384 |
+
bufferStart.prepend('return buffer + ');
|
| 4385 |
+
bufferEnd.add(';');
|
| 4386 |
+
} else {
|
| 4387 |
+
this.source.push('return buffer;');
|
| 4388 |
}
|
| 4389 |
+
}
|
| 4390 |
+
|
| 4391 |
+
if (varDeclarations) {
|
| 4392 |
+
this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
|
| 4393 |
+
}
|
| 4394 |
+
|
| 4395 |
+
return this.source.merge();
|
| 4396 |
+
},
|
| 4397 |
+
|
| 4398 |
+
// [blockValue]
|
| 4399 |
+
//
|
| 4400 |
+
// On stack, before: hash, inverse, program, value
|
| 4401 |
+
// On stack, after: return value of blockHelperMissing
|
| 4402 |
+
//
|
| 4403 |
+
// The purpose of this opcode is to take a block of the form
|
| 4404 |
+
// `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
|
| 4405 |
+
// replace it on the stack with the result of properly
|
| 4406 |
+
// invoking blockHelperMissing.
|
| 4407 |
+
blockValue: function blockValue(name) {
|
| 4408 |
+
var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
| 4409 |
+
params = [this.contextName(0)];
|
| 4410 |
+
this.setupHelperArgs(name, 0, params);
|
| 4411 |
|
| 4412 |
+
var blockName = this.popStack();
|
| 4413 |
+
params.splice(1, 0, blockName);
|
|
|
|
| 4414 |
|
| 4415 |
+
this.push(this.source.functionCall(blockHelperMissing, 'call', params));
|
| 4416 |
+
},
|
| 4417 |
|
| 4418 |
+
// [ambiguousBlockValue]
|
| 4419 |
+
//
|
| 4420 |
+
// On stack, before: hash, inverse, program, value
|
| 4421 |
+
// Compiler value, before: lastHelper=value of last found helper, if any
|
| 4422 |
+
// On stack, after, if no lastHelper: same as [blockValue]
|
| 4423 |
+
// On stack, after, if lastHelper: value
|
| 4424 |
+
ambiguousBlockValue: function ambiguousBlockValue() {
|
| 4425 |
+
// We're being a bit cheeky and reusing the options value from the prior exec
|
| 4426 |
+
var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
|
| 4427 |
+
params = [this.contextName(0)];
|
| 4428 |
+
this.setupHelperArgs('', 0, params, true);
|
| 4429 |
|
| 4430 |
+
this.flushInline();
|
|
|
|
| 4431 |
|
| 4432 |
+
var current = this.topStack();
|
| 4433 |
+
params.splice(1, 0, current);
|
| 4434 |
|
| 4435 |
+
this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
|
| 4436 |
+
},
|
| 4437 |
+
|
| 4438 |
+
// [appendContent]
|
| 4439 |
+
//
|
| 4440 |
+
// On stack, before: ...
|
| 4441 |
+
// On stack, after: ...
|
| 4442 |
+
//
|
| 4443 |
+
// Appends the string value of `content` to the current buffer
|
| 4444 |
+
appendContent: function appendContent(content) {
|
| 4445 |
+
if (this.pendingContent) {
|
| 4446 |
+
content = this.pendingContent + content;
|
| 4447 |
+
} else {
|
| 4448 |
+
this.pendingLocation = this.source.currentLocation;
|
| 4449 |
}
|
| 4450 |
|
| 4451 |
+
this.pendingContent = content;
|
| 4452 |
+
},
|
|
|
|
| 4453 |
|
| 4454 |
+
// [append]
|
| 4455 |
+
//
|
| 4456 |
+
// On stack, before: value, ...
|
| 4457 |
+
// On stack, after: ...
|
| 4458 |
+
//
|
| 4459 |
+
// Coerces `value` to a String and appends it to the current buffer.
|
| 4460 |
+
//
|
| 4461 |
+
// If `value` is truthy, or 0, it is coerced into a string and appended
|
| 4462 |
+
// Otherwise, the empty string is appended
|
| 4463 |
+
append: function append() {
|
| 4464 |
+
if (this.isInline()) {
|
| 4465 |
+
this.replaceStack(function (current) {
|
| 4466 |
+
return [' != null ? ', current, ' : ""'];
|
| 4467 |
+
});
|
| 4468 |
|
| 4469 |
+
this.pushSource(this.appendToBuffer(this.popStack()));
|
|
|
|
|
|
|
| 4470 |
} else {
|
| 4471 |
+
var local = this.popStack();
|
| 4472 |
+
this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
|
| 4473 |
+
if (this.environment.isSimple) {
|
| 4474 |
+
this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
|
| 4475 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4476 |
}
|
| 4477 |
+
},
|
| 4478 |
|
| 4479 |
+
// [appendEscaped]
|
| 4480 |
+
//
|
| 4481 |
+
// On stack, before: value, ...
|
| 4482 |
+
// On stack, after: ...
|
| 4483 |
+
//
|
| 4484 |
+
// Escape `value` and append it to the buffer
|
| 4485 |
+
appendEscaped: function appendEscaped() {
|
| 4486 |
+
this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
|
| 4487 |
+
},
|
| 4488 |
|
| 4489 |
+
// [getContext]
|
| 4490 |
+
//
|
| 4491 |
+
// On stack, before: ...
|
| 4492 |
+
// On stack, after: ...
|
| 4493 |
+
// Compiler value, after: lastContext=depth
|
| 4494 |
+
//
|
| 4495 |
+
// Set the value of the `lastContext` compiler value to the depth
|
| 4496 |
+
getContext: function getContext(depth) {
|
| 4497 |
+
this.lastContext = depth;
|
| 4498 |
+
},
|
| 4499 |
|
| 4500 |
+
// [pushContext]
|
| 4501 |
+
//
|
| 4502 |
+
// On stack, before: ...
|
| 4503 |
+
// On stack, after: currentContext, ...
|
| 4504 |
+
//
|
| 4505 |
+
// Pushes the value of the current context onto the stack.
|
| 4506 |
+
pushContext: function pushContext() {
|
| 4507 |
+
this.pushStackLiteral(this.contextName(this.lastContext));
|
| 4508 |
+
},
|
|
|
|
| 4509 |
|
| 4510 |
+
// [lookupOnContext]
|
| 4511 |
+
//
|
| 4512 |
+
// On stack, before: ...
|
| 4513 |
+
// On stack, after: currentContext[name], ...
|
| 4514 |
+
//
|
| 4515 |
+
// Looks up the value of `name` on the current context and pushes
|
| 4516 |
+
// it onto the stack.
|
| 4517 |
+
lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
|
| 4518 |
+
var i = 0;
|
| 4519 |
|
| 4520 |
+
if (!scoped && this.options.compat && !this.lastContext) {
|
| 4521 |
+
// The depthed query is expected to handle the undefined logic for the root level that
|
| 4522 |
+
// is implemented below, so we evaluate that directly in compat mode
|
| 4523 |
+
this.push(this.depthedLookup(parts[i++]));
|
| 4524 |
+
} else {
|
| 4525 |
+
this.pushContext();
|
| 4526 |
+
}
|
| 4527 |
|
| 4528 |
+
this.resolvePath('context', parts, i, falsy, strict);
|
| 4529 |
+
},
|
|
|
|
| 4530 |
|
| 4531 |
+
// [lookupBlockParam]
|
| 4532 |
+
//
|
| 4533 |
+
// On stack, before: ...
|
| 4534 |
+
// On stack, after: blockParam[name], ...
|
| 4535 |
+
//
|
| 4536 |
+
// Looks up the value of `parts` on the given block param and pushes
|
| 4537 |
+
// it onto the stack.
|
| 4538 |
+
lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
|
| 4539 |
+
this.useBlockParams = true;
|
| 4540 |
|
| 4541 |
+
this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
|
| 4542 |
+
this.resolvePath('context', parts, 1);
|
| 4543 |
+
},
|
| 4544 |
|
| 4545 |
+
// [lookupData]
|
| 4546 |
+
//
|
| 4547 |
+
// On stack, before: ...
|
| 4548 |
+
// On stack, after: data, ...
|
| 4549 |
+
//
|
| 4550 |
+
// Push the data lookup operator
|
| 4551 |
+
lookupData: function lookupData(depth, parts, strict) {
|
| 4552 |
+
if (!depth) {
|
| 4553 |
+
this.pushStackLiteral('data');
|
| 4554 |
+
} else {
|
| 4555 |
+
this.pushStackLiteral('container.data(data, ' + depth + ')');
|
| 4556 |
+
}
|
| 4557 |
|
| 4558 |
+
this.resolvePath('data', parts, 0, true, strict);
|
| 4559 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4560 |
|
| 4561 |
+
resolvePath: function resolvePath(type, parts, i, falsy, strict) {
|
| 4562 |
+
// istanbul ignore next
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4563 |
|
| 4564 |
+
var _this = this;
|
| 4565 |
|
| 4566 |
+
if (this.options.strict || this.options.assumeObjects) {
|
| 4567 |
+
this.push(strictLookup(this.options.strict && strict, this, parts, type));
|
| 4568 |
+
return;
|
| 4569 |
+
}
|
| 4570 |
+
|
| 4571 |
+
var len = parts.length;
|
| 4572 |
+
for (; i < len; i++) {
|
| 4573 |
+
/* eslint-disable no-loop-func */
|
| 4574 |
+
this.replaceStack(function (current) {
|
| 4575 |
+
var lookup = _this.nameLookup(current, parts[i], type);
|
| 4576 |
+
// We want to ensure that zero and false are handled properly if the context (falsy flag)
|
| 4577 |
+
// needs to have the special handling for these values.
|
| 4578 |
+
if (!falsy) {
|
| 4579 |
+
return [' != null ? ', lookup, ' : ', current];
|
| 4580 |
+
} else {
|
| 4581 |
+
// Otherwise we can use generic falsy handling
|
| 4582 |
+
return [' && ', lookup];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4583 |
}
|
| 4584 |
+
});
|
| 4585 |
+
/* eslint-enable no-loop-func */
|
| 4586 |
+
}
|
| 4587 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4588 |
|
| 4589 |
+
// [resolvePossibleLambda]
|
| 4590 |
+
//
|
| 4591 |
+
// On stack, before: value, ...
|
| 4592 |
+
// On stack, after: resolved value, ...
|
| 4593 |
+
//
|
| 4594 |
+
// If the `value` is a lambda, replace it on the stack by
|
| 4595 |
+
// the return value of the lambda
|
| 4596 |
+
resolvePossibleLambda: function resolvePossibleLambda() {
|
| 4597 |
+
this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
|
| 4598 |
+
},
|
| 4599 |
|
| 4600 |
+
// [pushStringParam]
|
| 4601 |
+
//
|
| 4602 |
+
// On stack, before: ...
|
| 4603 |
+
// On stack, after: string, currentContext, ...
|
| 4604 |
+
//
|
| 4605 |
+
// This opcode is designed for use in string mode, which
|
| 4606 |
+
// provides the string value of a parameter along with its
|
| 4607 |
+
// depth rather than resolving it immediately.
|
| 4608 |
+
pushStringParam: function pushStringParam(string, type) {
|
| 4609 |
+
this.pushContext();
|
| 4610 |
+
this.pushString(type);
|
| 4611 |
|
| 4612 |
+
// If it's a subexpression, the string result
|
| 4613 |
+
// will be pushed after this opcode.
|
| 4614 |
+
if (type !== 'SubExpression') {
|
| 4615 |
+
if (typeof string === 'string') {
|
| 4616 |
+
this.pushString(string);
|
| 4617 |
+
} else {
|
| 4618 |
+
this.pushStackLiteral(string);
|
| 4619 |
+
}
|
| 4620 |
+
}
|
| 4621 |
+
},
|
| 4622 |
|
| 4623 |
+
emptyHash: function emptyHash(omitEmpty) {
|
| 4624 |
+
if (this.trackIds) {
|
| 4625 |
+
this.push('{}'); // hashIds
|
| 4626 |
+
}
|
| 4627 |
+
if (this.stringParams) {
|
| 4628 |
+
this.push('{}'); // hashContexts
|
| 4629 |
+
this.push('{}'); // hashTypes
|
| 4630 |
+
}
|
| 4631 |
+
this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
|
| 4632 |
+
},
|
| 4633 |
+
pushHash: function pushHash() {
|
| 4634 |
+
if (this.hash) {
|
| 4635 |
+
this.hashes.push(this.hash);
|
| 4636 |
+
}
|
| 4637 |
+
this.hash = { values: [], types: [], contexts: [], ids: [] };
|
| 4638 |
+
},
|
| 4639 |
+
popHash: function popHash() {
|
| 4640 |
+
var hash = this.hash;
|
| 4641 |
+
this.hash = this.hashes.pop();
|
| 4642 |
|
| 4643 |
+
if (this.trackIds) {
|
| 4644 |
+
this.push(this.objectLiteral(hash.ids));
|
| 4645 |
+
}
|
| 4646 |
+
if (this.stringParams) {
|
| 4647 |
+
this.push(this.objectLiteral(hash.contexts));
|
| 4648 |
+
this.push(this.objectLiteral(hash.types));
|
| 4649 |
+
}
|
| 4650 |
+
|
| 4651 |
+
this.push(this.objectLiteral(hash.values));
|
| 4652 |
+
},
|
| 4653 |
+
|
| 4654 |
+
// [pushString]
|
| 4655 |
+
//
|
| 4656 |
+
// On stack, before: ...
|
| 4657 |
+
// On stack, after: quotedString(string), ...
|
| 4658 |
+
//
|
| 4659 |
+
// Push a quoted version of `string` onto the stack
|
| 4660 |
+
pushString: function pushString(string) {
|
| 4661 |
+
this.pushStackLiteral(this.quotedString(string));
|
| 4662 |
+
},
|
| 4663 |
+
|
| 4664 |
+
// [pushLiteral]
|
| 4665 |
+
//
|
| 4666 |
+
// On stack, before: ...
|
| 4667 |
+
// On stack, after: value, ...
|
| 4668 |
+
//
|
| 4669 |
+
// Pushes a value onto the stack. This operation prevents
|
| 4670 |
+
// the compiler from creating a temporary variable to hold
|
| 4671 |
+
// it.
|
| 4672 |
+
pushLiteral: function pushLiteral(value) {
|
| 4673 |
+
this.pushStackLiteral(value);
|
| 4674 |
+
},
|
| 4675 |
+
|
| 4676 |
+
// [pushProgram]
|
| 4677 |
+
//
|
| 4678 |
+
// On stack, before: ...
|
| 4679 |
+
// On stack, after: program(guid), ...
|
| 4680 |
+
//
|
| 4681 |
+
// Push a program expression onto the stack. This takes
|
| 4682 |
+
// a compile-time guid and converts it into a runtime-accessible
|
| 4683 |
+
// expression.
|
| 4684 |
+
pushProgram: function pushProgram(guid) {
|
| 4685 |
+
if (guid != null) {
|
| 4686 |
+
this.pushStackLiteral(this.programExpression(guid));
|
| 4687 |
+
} else {
|
| 4688 |
+
this.pushStackLiteral(null);
|
| 4689 |
+
}
|
| 4690 |
+
},
|
| 4691 |
+
|
| 4692 |
+
// [registerDecorator]
|
| 4693 |
+
//
|
| 4694 |
+
// On stack, before: hash, program, params..., ...
|
| 4695 |
+
// On stack, after: ...
|
| 4696 |
+
//
|
| 4697 |
+
// Pops off the decorator's parameters, invokes the decorator,
|
| 4698 |
+
// and inserts the decorator into the decorators list.
|
| 4699 |
+
registerDecorator: function registerDecorator(paramSize, name) {
|
| 4700 |
+
var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
|
| 4701 |
+
options = this.setupHelperArgs(name, paramSize);
|
| 4702 |
+
|
| 4703 |
+
this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
|
| 4704 |
+
},
|
| 4705 |
+
|
| 4706 |
+
// [invokeHelper]
|
| 4707 |
+
//
|
| 4708 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 4709 |
+
// On stack, after: result of helper invocation
|
| 4710 |
+
//
|
| 4711 |
+
// Pops off the helper's parameters, invokes the helper,
|
| 4712 |
+
// and pushes the helper's return value onto the stack.
|
| 4713 |
+
//
|
| 4714 |
+
// If the helper is not found, `helperMissing` is called.
|
| 4715 |
+
invokeHelper: function invokeHelper(paramSize, name, isSimple) {
|
| 4716 |
+
var nonHelper = this.popStack(),
|
| 4717 |
+
helper = this.setupHelper(paramSize, name),
|
| 4718 |
+
simple = isSimple ? [helper.name, ' || '] : '';
|
| 4719 |
+
|
| 4720 |
+
var lookup = ['('].concat(simple, nonHelper);
|
| 4721 |
+
if (!this.options.strict) {
|
| 4722 |
+
lookup.push(' || ', this.aliasable('helpers.helperMissing'));
|
| 4723 |
+
}
|
| 4724 |
+
lookup.push(')');
|
| 4725 |
+
|
| 4726 |
+
this.push(this.source.functionCall(lookup, 'call', helper.callParams));
|
| 4727 |
+
},
|
| 4728 |
+
|
| 4729 |
+
// [invokeKnownHelper]
|
| 4730 |
+
//
|
| 4731 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 4732 |
+
// On stack, after: result of helper invocation
|
| 4733 |
+
//
|
| 4734 |
+
// This operation is used when the helper is known to exist,
|
| 4735 |
+
// so a `helperMissing` fallback is not required.
|
| 4736 |
+
invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
|
| 4737 |
+
var helper = this.setupHelper(paramSize, name);
|
| 4738 |
+
this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
|
| 4739 |
+
},
|
| 4740 |
+
|
| 4741 |
+
// [invokeAmbiguous]
|
| 4742 |
+
//
|
| 4743 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 4744 |
+
// On stack, after: result of disambiguation
|
| 4745 |
+
//
|
| 4746 |
+
// This operation is used when an expression like `{{foo}}`
|
| 4747 |
+
// is provided, but we don't know at compile-time whether it
|
| 4748 |
+
// is a helper or a path.
|
| 4749 |
+
//
|
| 4750 |
+
// This operation emits more code than the other options,
|
| 4751 |
+
// and can be avoided by passing the `knownHelpers` and
|
| 4752 |
+
// `knownHelpersOnly` flags at compile-time.
|
| 4753 |
+
invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
|
| 4754 |
+
this.useRegister('helper');
|
| 4755 |
+
|
| 4756 |
+
var nonHelper = this.popStack();
|
| 4757 |
+
|
| 4758 |
+
this.emptyHash();
|
| 4759 |
+
var helper = this.setupHelper(0, name, helperCall);
|
| 4760 |
+
|
| 4761 |
+
var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
|
| 4762 |
+
|
| 4763 |
+
var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
|
| 4764 |
+
if (!this.options.strict) {
|
| 4765 |
+
lookup[0] = '(helper = ';
|
| 4766 |
+
lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));
|
| 4767 |
+
}
|
| 4768 |
|
| 4769 |
+
this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
|
| 4770 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4771 |
|
| 4772 |
+
// [invokePartial]
|
| 4773 |
+
//
|
| 4774 |
+
// On stack, before: context, ...
|
| 4775 |
+
// On stack after: result of partial invocation
|
| 4776 |
+
//
|
| 4777 |
+
// This operation pops off a context, invokes a partial with that context,
|
| 4778 |
+
// and pushes the result of the invocation back.
|
| 4779 |
+
invokePartial: function invokePartial(isDynamic, name, indent) {
|
| 4780 |
+
var params = [],
|
| 4781 |
+
options = this.setupParams(name, 1, params);
|
| 4782 |
|
| 4783 |
+
if (isDynamic) {
|
| 4784 |
+
name = this.popStack();
|
| 4785 |
+
delete options.name;
|
| 4786 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4787 |
|
| 4788 |
+
if (indent) {
|
| 4789 |
+
options.indent = JSON.stringify(indent);
|
| 4790 |
+
}
|
| 4791 |
+
options.helpers = 'helpers';
|
| 4792 |
+
options.partials = 'partials';
|
| 4793 |
+
options.decorators = 'container.decorators';
|
| 4794 |
|
| 4795 |
+
if (!isDynamic) {
|
| 4796 |
+
params.unshift(this.nameLookup('partials', name, 'partial'));
|
| 4797 |
+
} else {
|
| 4798 |
+
params.unshift(name);
|
| 4799 |
+
}
|
|
|
|
|
|
|
| 4800 |
|
| 4801 |
+
if (this.options.compat) {
|
| 4802 |
+
options.depths = 'depths';
|
| 4803 |
+
}
|
| 4804 |
+
options = this.objectLiteral(options);
|
| 4805 |
+
params.push(options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4806 |
|
| 4807 |
+
this.push(this.source.functionCall('container.invokePartial', '', params));
|
| 4808 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4809 |
|
| 4810 |
+
// [assignToHash]
|
| 4811 |
+
//
|
| 4812 |
+
// On stack, before: value, ..., hash, ...
|
| 4813 |
+
// On stack, after: ..., hash, ...
|
| 4814 |
+
//
|
| 4815 |
+
// Pops a value off the stack and assigns it to the current hash
|
| 4816 |
+
assignToHash: function assignToHash(key) {
|
| 4817 |
+
var value = this.popStack(),
|
| 4818 |
+
context = undefined,
|
| 4819 |
+
type = undefined,
|
| 4820 |
+
id = undefined;
|
| 4821 |
|
| 4822 |
+
if (this.trackIds) {
|
| 4823 |
+
id = this.popStack();
|
| 4824 |
+
}
|
| 4825 |
+
if (this.stringParams) {
|
| 4826 |
+
type = this.popStack();
|
| 4827 |
+
context = this.popStack();
|
| 4828 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4829 |
|
| 4830 |
+
var hash = this.hash;
|
| 4831 |
+
if (context) {
|
| 4832 |
+
hash.contexts[key] = context;
|
| 4833 |
+
}
|
| 4834 |
+
if (type) {
|
| 4835 |
+
hash.types[key] = type;
|
| 4836 |
+
}
|
| 4837 |
+
if (id) {
|
| 4838 |
+
hash.ids[key] = id;
|
| 4839 |
+
}
|
| 4840 |
+
hash.values[key] = value;
|
| 4841 |
+
},
|
| 4842 |
|
| 4843 |
+
pushId: function pushId(type, name, child) {
|
| 4844 |
+
if (type === 'BlockParam') {
|
| 4845 |
+
this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
|
| 4846 |
+
} else if (type === 'PathExpression') {
|
| 4847 |
+
this.pushString(name);
|
| 4848 |
+
} else if (type === 'SubExpression') {
|
| 4849 |
+
this.pushStackLiteral('true');
|
| 4850 |
+
} else {
|
| 4851 |
+
this.pushStackLiteral('null');
|
| 4852 |
+
}
|
| 4853 |
+
},
|
| 4854 |
|
| 4855 |
+
// HELPERS
|
| 4856 |
|
| 4857 |
+
compiler: JavaScriptCompiler,
|
| 4858 |
|
| 4859 |
+
compileChildren: function compileChildren(environment, options) {
|
| 4860 |
+
var children = environment.children,
|
| 4861 |
+
child = undefined,
|
| 4862 |
+
compiler = undefined;
|
| 4863 |
|
| 4864 |
+
for (var i = 0, l = children.length; i < l; i++) {
|
| 4865 |
+
child = children[i];
|
| 4866 |
+
compiler = new this.compiler(); // eslint-disable-line new-cap
|
| 4867 |
|
| 4868 |
+
var existing = this.matchExistingProgram(child);
|
|
|
|
| 4869 |
|
| 4870 |
+
if (existing == null) {
|
| 4871 |
+
this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
|
| 4872 |
+
var index = this.context.programs.length;
|
| 4873 |
+
child.index = index;
|
| 4874 |
+
child.name = 'program' + index;
|
| 4875 |
+
this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
| 4876 |
+
this.context.decorators[index] = compiler.decorators;
|
| 4877 |
+
this.context.environments[index] = child;
|
| 4878 |
|
| 4879 |
+
this.useDepths = this.useDepths || compiler.useDepths;
|
| 4880 |
+
this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
| 4881 |
+
child.useDepths = this.useDepths;
|
| 4882 |
+
child.useBlockParams = this.useBlockParams;
|
| 4883 |
+
} else {
|
| 4884 |
+
child.index = existing.index;
|
| 4885 |
+
child.name = 'program' + existing.index;
|
| 4886 |
|
| 4887 |
+
this.useDepths = this.useDepths || existing.useDepths;
|
| 4888 |
+
this.useBlockParams = this.useBlockParams || existing.useBlockParams;
|
| 4889 |
+
}
|
| 4890 |
+
}
|
| 4891 |
+
},
|
| 4892 |
+
matchExistingProgram: function matchExistingProgram(child) {
|
| 4893 |
+
for (var i = 0, len = this.context.environments.length; i < len; i++) {
|
| 4894 |
+
var environment = this.context.environments[i];
|
| 4895 |
+
if (environment && environment.equals(child)) {
|
| 4896 |
+
return environment;
|
| 4897 |
+
}
|
| 4898 |
}
|
| 4899 |
+
},
|
| 4900 |
|
| 4901 |
+
programExpression: function programExpression(guid) {
|
| 4902 |
+
var child = this.environment.children[guid],
|
| 4903 |
+
programParams = [child.index, 'data', child.blockParams];
|
|
|
|
|
|
|
| 4904 |
|
| 4905 |
+
if (this.useBlockParams || this.useDepths) {
|
| 4906 |
+
programParams.push('blockParams');
|
| 4907 |
}
|
| 4908 |
+
if (this.useDepths) {
|
| 4909 |
+
programParams.push('depths');
|
| 4910 |
}
|
| 4911 |
|
| 4912 |
+
return 'container.program(' + programParams.join(', ') + ')';
|
| 4913 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4914 |
|
| 4915 |
+
useRegister: function useRegister(name) {
|
| 4916 |
+
if (!this.registers[name]) {
|
| 4917 |
+
this.registers[name] = true;
|
| 4918 |
+
this.registers.list.push(name);
|
| 4919 |
}
|
| 4920 |
+
},
|
|
|
|
|
|
|
| 4921 |
|
| 4922 |
+
push: function push(expr) {
|
| 4923 |
+
if (!(expr instanceof Literal)) {
|
| 4924 |
+
expr = this.source.wrap(expr);
|
| 4925 |
}
|
|
|
|
| 4926 |
|
| 4927 |
+
this.inlineStack.push(expr);
|
| 4928 |
+
return expr;
|
| 4929 |
+
},
|
|
|
|
|
|
|
| 4930 |
|
| 4931 |
+
pushStackLiteral: function pushStackLiteral(item) {
|
| 4932 |
+
this.push(new Literal(item));
|
| 4933 |
+
},
|
|
|
|
|
|
|
| 4934 |
|
| 4935 |
+
pushSource: function pushSource(source) {
|
| 4936 |
+
if (this.pendingContent) {
|
| 4937 |
+
this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
|
| 4938 |
+
this.pendingContent = undefined;
|
| 4939 |
+
}
|
| 4940 |
|
| 4941 |
+
if (source) {
|
| 4942 |
+
this.source.push(source);
|
|
|
|
| 4943 |
}
|
| 4944 |
+
},
|
| 4945 |
|
| 4946 |
+
replaceStack: function replaceStack(callback) {
|
| 4947 |
+
var prefix = ['('],
|
| 4948 |
+
stack = undefined,
|
| 4949 |
+
createdStack = undefined,
|
| 4950 |
+
usedLiteral = undefined;
|
| 4951 |
|
| 4952 |
+
/* istanbul ignore next */
|
| 4953 |
+
if (!this.isInline()) {
|
| 4954 |
+
throw new _exception2['default']('replaceStack on non-inline');
|
| 4955 |
+
}
|
|
|
|
| 4956 |
|
| 4957 |
+
// We want to merge the inline statement into the replacement statement via ','
|
| 4958 |
+
var top = this.popStack(true);
|
|
|
|
| 4959 |
|
| 4960 |
+
if (top instanceof Literal) {
|
| 4961 |
+
// Literals do not need to be inlined
|
| 4962 |
+
stack = [top.value];
|
| 4963 |
+
prefix = ['(', stack];
|
| 4964 |
+
usedLiteral = true;
|
| 4965 |
+
} else {
|
| 4966 |
+
// Get or create the current stack name for use by the inline
|
| 4967 |
+
createdStack = true;
|
| 4968 |
+
var _name = this.incrStack();
|
| 4969 |
|
| 4970 |
+
prefix = ['((', this.push(_name), ' = ', top, ')'];
|
| 4971 |
+
stack = this.topStack();
|
| 4972 |
}
|
| 4973 |
|
| 4974 |
+
var item = callback.call(this, stack);
|
| 4975 |
+
|
| 4976 |
+
if (!usedLiteral) {
|
| 4977 |
+
this.popStack();
|
| 4978 |
}
|
| 4979 |
+
if (createdStack) {
|
| 4980 |
+
this.stackSlot--;
|
| 4981 |
}
|
| 4982 |
+
this.push(prefix.concat(item, ')'));
|
| 4983 |
+
},
|
| 4984 |
|
| 4985 |
+
incrStack: function incrStack() {
|
| 4986 |
+
this.stackSlot++;
|
| 4987 |
+
if (this.stackSlot > this.stackVars.length) {
|
| 4988 |
+
this.stackVars.push('stack' + this.stackSlot);
|
| 4989 |
}
|
| 4990 |
+
return this.topStackName();
|
| 4991 |
+
},
|
| 4992 |
+
topStackName: function topStackName() {
|
| 4993 |
+
return 'stack' + this.stackSlot;
|
| 4994 |
+
},
|
| 4995 |
+
flushInline: function flushInline() {
|
| 4996 |
+
var inlineStack = this.inlineStack;
|
| 4997 |
+
this.inlineStack = [];
|
| 4998 |
+
for (var i = 0, len = inlineStack.length; i < len; i++) {
|
| 4999 |
+
var entry = inlineStack[i];
|
| 5000 |
+
/* istanbul ignore if */
|
| 5001 |
+
if (entry instanceof Literal) {
|
| 5002 |
+
this.compileStack.push(entry);
|
| 5003 |
+
} else {
|
| 5004 |
+
var stack = this.incrStack();
|
| 5005 |
+
this.pushSource([stack, ' = ', entry, ';']);
|
| 5006 |
+
this.compileStack.push(stack);
|
| 5007 |
+
}
|
| 5008 |
+
}
|
| 5009 |
+
},
|
| 5010 |
+
isInline: function isInline() {
|
| 5011 |
+
return this.inlineStack.length;
|
| 5012 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5013 |
|
| 5014 |
+
popStack: function popStack(wrapped) {
|
| 5015 |
+
var inline = this.isInline(),
|
| 5016 |
+
item = (inline ? this.inlineStack : this.compileStack).pop();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5017 |
|
| 5018 |
+
if (!wrapped && item instanceof Literal) {
|
| 5019 |
+
return item.value;
|
| 5020 |
+
} else {
|
| 5021 |
+
if (!inline) {
|
| 5022 |
+
/* istanbul ignore next */
|
| 5023 |
+
if (!this.stackSlot) {
|
| 5024 |
+
throw new _exception2['default']('Invalid stack pop');
|
| 5025 |
+
}
|
| 5026 |
+
this.stackSlot--;
|
| 5027 |
+
}
|
| 5028 |
+
return item;
|
| 5029 |
+
}
|
| 5030 |
+
},
|
| 5031 |
|
| 5032 |
+
topStack: function topStack() {
|
| 5033 |
+
var stack = this.isInline() ? this.inlineStack : this.compileStack,
|
| 5034 |
+
item = stack[stack.length - 1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5035 |
|
| 5036 |
+
/* istanbul ignore if */
|
| 5037 |
+
if (item instanceof Literal) {
|
| 5038 |
+
return item.value;
|
| 5039 |
+
} else {
|
| 5040 |
+
return item;
|
| 5041 |
+
}
|
| 5042 |
+
},
|
| 5043 |
|
| 5044 |
+
contextName: function contextName(context) {
|
| 5045 |
+
if (this.useDepths && context) {
|
| 5046 |
+
return 'depths[' + context + ']';
|
| 5047 |
+
} else {
|
| 5048 |
+
return 'depth' + context;
|
| 5049 |
+
}
|
| 5050 |
+
},
|
| 5051 |
|
| 5052 |
+
quotedString: function quotedString(str) {
|
| 5053 |
+
return this.source.quotedString(str);
|
| 5054 |
+
},
|
| 5055 |
|
| 5056 |
+
objectLiteral: function objectLiteral(obj) {
|
| 5057 |
+
return this.source.objectLiteral(obj);
|
| 5058 |
+
},
|
| 5059 |
|
| 5060 |
+
aliasable: function aliasable(name) {
|
| 5061 |
+
var ret = this.aliases[name];
|
| 5062 |
+
if (ret) {
|
| 5063 |
+
ret.referenceCount++;
|
| 5064 |
+
return ret;
|
| 5065 |
+
}
|
| 5066 |
|
| 5067 |
+
ret = this.aliases[name] = this.source.wrap(name);
|
| 5068 |
+
ret.aliasable = true;
|
| 5069 |
+
ret.referenceCount = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5070 |
|
| 5071 |
+
return ret;
|
| 5072 |
+
},
|
| 5073 |
|
| 5074 |
+
setupHelper: function setupHelper(paramSize, name, blockHelper) {
|
| 5075 |
+
var params = [],
|
| 5076 |
+
paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
| 5077 |
+
var foundHelper = this.nameLookup('helpers', name, 'helper'),
|
| 5078 |
+
callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
|
| 5079 |
|
| 5080 |
+
return {
|
| 5081 |
+
params: params,
|
| 5082 |
+
paramsInit: paramsInit,
|
| 5083 |
+
name: foundHelper,
|
| 5084 |
+
callParams: [callContext].concat(params)
|
| 5085 |
+
};
|
| 5086 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5087 |
|
| 5088 |
+
setupParams: function setupParams(helper, paramSize, params) {
|
| 5089 |
+
var options = {},
|
| 5090 |
+
contexts = [],
|
| 5091 |
+
types = [],
|
| 5092 |
+
ids = [],
|
| 5093 |
+
objectArgs = !params,
|
| 5094 |
+
param = undefined;
|
| 5095 |
|
| 5096 |
+
if (objectArgs) {
|
| 5097 |
+
params = [];
|
| 5098 |
+
}
|
|
|
|
|
|
|
|
|
|
| 5099 |
|
| 5100 |
+
options.name = this.quotedString(helper);
|
| 5101 |
+
options.hash = this.popStack();
|
|
|
|
| 5102 |
|
| 5103 |
+
if (this.trackIds) {
|
| 5104 |
+
options.hashIds = this.popStack();
|
| 5105 |
+
}
|
| 5106 |
+
if (this.stringParams) {
|
| 5107 |
+
options.hashTypes = this.popStack();
|
| 5108 |
+
options.hashContexts = this.popStack();
|
| 5109 |
+
}
|
| 5110 |
|
| 5111 |
+
var inverse = this.popStack(),
|
| 5112 |
+
program = this.popStack();
|
|
|
|
|
|
|
| 5113 |
|
| 5114 |
+
// Avoid setting fn and inverse if neither are set. This allows
|
| 5115 |
+
// helpers to do a check for `if (options.fn)`
|
| 5116 |
+
if (program || inverse) {
|
| 5117 |
+
options.fn = program || 'container.noop';
|
| 5118 |
+
options.inverse = inverse || 'container.noop';
|
| 5119 |
+
}
|
| 5120 |
|
| 5121 |
+
// The parameters go on to the stack in order (making sure that they are evaluated in order)
|
| 5122 |
+
// so we need to pop them off the stack in reverse order
|
| 5123 |
+
var i = paramSize;
|
| 5124 |
+
while (i--) {
|
| 5125 |
+
param = this.popStack();
|
| 5126 |
+
params[i] = param;
|
| 5127 |
|
| 5128 |
+
if (this.trackIds) {
|
| 5129 |
+
ids[i] = this.popStack();
|
| 5130 |
+
}
|
| 5131 |
+
if (this.stringParams) {
|
| 5132 |
+
types[i] = this.popStack();
|
| 5133 |
+
contexts[i] = this.popStack();
|
| 5134 |
}
|
|
|
|
|
|
|
| 5135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5136 |
|
| 5137 |
+
if (objectArgs) {
|
| 5138 |
+
options.args = this.source.generateArray(params);
|
| 5139 |
+
}
|
|
|
|
| 5140 |
|
| 5141 |
+
if (this.trackIds) {
|
| 5142 |
+
options.ids = this.source.generateArray(ids);
|
| 5143 |
+
}
|
| 5144 |
+
if (this.stringParams) {
|
| 5145 |
+
options.types = this.source.generateArray(types);
|
| 5146 |
+
options.contexts = this.source.generateArray(contexts);
|
| 5147 |
+
}
|
| 5148 |
|
| 5149 |
+
if (this.options.data) {
|
| 5150 |
+
options.data = 'data';
|
| 5151 |
+
}
|
| 5152 |
+
if (this.useBlockParams) {
|
| 5153 |
+
options.blockParams = 'blockParams';
|
| 5154 |
+
}
|
| 5155 |
+
return options;
|
| 5156 |
+
},
|
| 5157 |
|
| 5158 |
+
setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
| 5159 |
+
var options = this.setupParams(helper, paramSize, params);
|
| 5160 |
+
options = this.objectLiteral(options);
|
| 5161 |
+
if (useRegister) {
|
| 5162 |
+
this.useRegister('options');
|
| 5163 |
+
params.push('options');
|
| 5164 |
+
return ['options=', options];
|
| 5165 |
+
} else if (params) {
|
| 5166 |
+
params.push(options);
|
| 5167 |
+
return '';
|
| 5168 |
+
} else {
|
| 5169 |
+
return options;
|
| 5170 |
+
}
|
| 5171 |
}
|
| 5172 |
+
};
|
| 5173 |
|
| 5174 |
+
(function () {
|
| 5175 |
+
var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
|
|
|
|
|
|
|
|
|
|
| 5176 |
|
| 5177 |
+
var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
|
|
|
|
|
|
|
|
|
| 5178 |
|
| 5179 |
+
for (var i = 0, l = reservedWords.length; i < l; i++) {
|
| 5180 |
+
compilerWords[reservedWords[i]] = true;
|
| 5181 |
}
|
| 5182 |
+
})();
|
| 5183 |
|
| 5184 |
+
JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
|
| 5185 |
+
return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
| 5186 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5187 |
|
| 5188 |
+
function strictLookup(requireTerminal, compiler, parts, type) {
|
| 5189 |
+
var stack = compiler.popStack(),
|
| 5190 |
+
i = 0,
|
| 5191 |
+
len = parts.length;
|
| 5192 |
+
if (requireTerminal) {
|
| 5193 |
+
len--;
|
| 5194 |
}
|
| 5195 |
|
| 5196 |
+
for (; i < len; i++) {
|
| 5197 |
+
stack = compiler.nameLookup(stack, parts[i], type);
|
|
|
|
|
|
|
| 5198 |
}
|
| 5199 |
|
| 5200 |
+
if (requireTerminal) {
|
| 5201 |
+
return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
|
| 5202 |
+
} else {
|
| 5203 |
+
return stack;
|
| 5204 |
+
}
|
| 5205 |
}
|
| 5206 |
|
| 5207 |
+
exports['default'] = JavaScriptCompiler;
|
| 5208 |
+
module.exports = exports['default'];
|
|
|
|
| 5209 |
|
| 5210 |
+
/***/ }),
|
| 5211 |
+
/* 43 */
|
| 5212 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 5213 |
+
|
| 5214 |
+
/* global define */
|
| 5215 |
'use strict';
|
| 5216 |
|
| 5217 |
exports.__esModule = true;
|
|
|
|
| 5218 |
|
| 5219 |
+
var _utils = __webpack_require__(5);
|
| 5220 |
|
| 5221 |
var SourceNode = undefined;
|
| 5222 |
|
| 5229 |
SourceNode = SourceMap.SourceNode;
|
| 5230 |
}
|
| 5231 |
} catch (err) {}
|
| 5232 |
+
/* NOP */
|
| 5233 |
|
| 5234 |
/* istanbul ignore if: tested but not covered in istanbul due to dist build */
|
| 5235 |
if (!SourceNode) {
|
| 5242 |
/* istanbul ignore next */
|
| 5243 |
SourceNode.prototype = {
|
| 5244 |
add: function add(chunks) {
|
| 5245 |
+
if (_utils.isArray(chunks)) {
|
| 5246 |
chunks = chunks.join('');
|
| 5247 |
}
|
| 5248 |
this.src += chunks;
|
| 5249 |
},
|
| 5250 |
prepend: function prepend(chunks) {
|
| 5251 |
+
if (_utils.isArray(chunks)) {
|
| 5252 |
chunks = chunks.join('');
|
| 5253 |
}
|
| 5254 |
this.src = chunks + this.src;
|
| 5263 |
}
|
| 5264 |
|
| 5265 |
function castChunk(chunk, codeGen, loc) {
|
| 5266 |
+
if (_utils.isArray(chunk)) {
|
| 5267 |
var ret = [];
|
| 5268 |
|
| 5269 |
for (var i = 0, len = chunk.length; i < len; i++) {
|
| 5283 |
}
|
| 5284 |
|
| 5285 |
CodeGen.prototype = {
|
| 5286 |
+
isEmpty: function isEmpty() {
|
| 5287 |
+
return !this.source.length;
|
| 5288 |
+
},
|
| 5289 |
prepend: function prepend(source, loc) {
|
| 5290 |
this.source.unshift(this.wrap(source, loc));
|
| 5291 |
},
|
| 5308 |
},
|
| 5309 |
|
| 5310 |
empty: function empty() {
|
| 5311 |
+
var loc = this.currentLocation || { start: {} };
|
|
|
|
| 5312 |
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
| 5313 |
},
|
| 5314 |
wrap: function wrap(chunk) {
|
| 5315 |
+
var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
|
| 5316 |
|
| 5317 |
if (chunk instanceof SourceNode) {
|
| 5318 |
return chunk;
|
| 5351 |
return ret;
|
| 5352 |
},
|
| 5353 |
|
| 5354 |
+
generateList: function generateList(entries) {
|
| 5355 |
+
var ret = this.empty();
|
| 5356 |
|
| 5357 |
for (var i = 0, len = entries.length; i < len; i++) {
|
| 5358 |
if (i) {
|
| 5359 |
ret.add(',');
|
| 5360 |
}
|
| 5361 |
|
| 5362 |
+
ret.add(castChunk(entries[i], this));
|
| 5363 |
}
|
| 5364 |
|
| 5365 |
return ret;
|
| 5366 |
},
|
| 5367 |
|
| 5368 |
+
generateArray: function generateArray(entries) {
|
| 5369 |
+
var ret = this.generateList(entries);
|
| 5370 |
ret.prepend('[');
|
| 5371 |
ret.add(']');
|
| 5372 |
|
| 5377 |
exports['default'] = CodeGen;
|
| 5378 |
module.exports = exports['default'];
|
| 5379 |
|
| 5380 |
+
/***/ })
|
|
|
|
|
|
|
| 5381 |
/******/ ])
|
| 5382 |
});
|
| 5383 |
;
|
lang/index.php
CHANGED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
// Silence is golden
|
|
|
|
|
|
|
|
|
lang/mailpoet-ca.mo
CHANGED
|
Binary file
|
lang/mailpoet-da_DK.mo
CHANGED
|
Binary file
|
lang/mailpoet-de_DE.mo
CHANGED
|
Binary file
|
lang/mailpoet-en_GB.mo
CHANGED
|
Binary file
|
lang/mailpoet-es_ES.mo
CHANGED
|
Binary file
|
lang/mailpoet-fa_IR.mo
CHANGED
|
Binary file
|
lang/mailpoet-fr_CA.mo
CHANGED
|
Binary file
|
lang/mailpoet-fr_FR.mo
CHANGED
|
Binary file
|
lang/mailpoet-it_IT.mo
CHANGED
|
Binary file
|
lang/mailpoet-ja.mo
CHANGED
|
Binary file
|
lang/mailpoet-nl_NL.mo
CHANGED
|
Binary file
|
lang/mailpoet-pl_PL.mo
CHANGED
|
Binary file
|
lang/mailpoet-pt_BR.mo
CHANGED
|
Binary file
|
lang/mailpoet-pt_PT.mo
CHANGED
|
Binary file
|
lang/mailpoet-ru_RU.mo
CHANGED
|
Binary file
|
lang/mailpoet-sq.mo
ADDED
|
Binary file
|
lang/mailpoet-sv_SE.mo
CHANGED
|
Binary file
|
lang/mailpoet-tr_TR.mo
CHANGED
|
Binary file
|
lang/mailpoet.pot
CHANGED
|
@@ -4,7 +4,7 @@ msgid ""
|
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
-
"POT-Creation-Date: 2017-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -229,14 +229,14 @@ msgstr ""
|
|
| 229 |
|
| 230 |
#: lib/API/MP/v1/API.php:21
|
| 231 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:33
|
| 232 |
-
#: lib/Subscription/Pages.php:
|
| 233 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
| 234 |
msgid "First name"
|
| 235 |
msgstr ""
|
| 236 |
|
| 237 |
#: lib/API/MP/v1/API.php:25
|
| 238 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:34
|
| 239 |
-
#: lib/Subscription/Pages.php:
|
| 240 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
| 241 |
msgid "Last name"
|
| 242 |
msgstr ""
|
|
@@ -291,7 +291,7 @@ msgstr ""
|
|
| 291 |
msgid "Manage segments"
|
| 292 |
msgstr ""
|
| 293 |
|
| 294 |
-
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:
|
| 295 |
msgid "MailPoet"
|
| 296 |
msgstr ""
|
| 297 |
|
|
@@ -392,80 +392,80 @@ msgstr[1] ""
|
|
| 392 |
msgid "Settings imported"
|
| 393 |
msgstr ""
|
| 394 |
|
| 395 |
-
#: lib/Config/Menu.php:
|
| 396 |
msgid "Emails"
|
| 397 |
msgstr ""
|
| 398 |
|
| 399 |
-
#: lib/Config/Menu.php:
|
| 400 |
#: views/newsletter/templates/components/sidebar/styles.hbs:75
|
| 401 |
#: views/newsletters.html:123
|
| 402 |
msgid "Newsletter"
|
| 403 |
msgstr ""
|
| 404 |
|
| 405 |
-
#: lib/Config/Menu.php:
|
| 406 |
msgid "Newsletter Editor"
|
| 407 |
msgstr ""
|
| 408 |
|
| 409 |
-
#: lib/Config/Menu.php:
|
| 410 |
#: views/mp2migration.html:14
|
| 411 |
msgid "Forms"
|
| 412 |
msgstr ""
|
| 413 |
|
| 414 |
-
#: lib/Config/Menu.php:
|
| 415 |
msgid "Form Editor"
|
| 416 |
msgstr ""
|
| 417 |
|
| 418 |
-
#: lib/Config/Menu.php:
|
| 419 |
#: views/subscribers/subscribers.html:18
|
| 420 |
msgid "Subscribers"
|
| 421 |
msgstr ""
|
| 422 |
|
| 423 |
-
#: lib/Config/Menu.php:
|
| 424 |
#: views/subscribers/importExport/import.html:7
|
| 425 |
#: views/subscribers/subscribers.html:94
|
| 426 |
msgid "Import"
|
| 427 |
msgstr ""
|
| 428 |
|
| 429 |
-
#: lib/Config/Menu.php:
|
| 430 |
#: views/subscribers/importExport/export.html:6
|
| 431 |
#: views/subscribers/importExport/export.html:96
|
| 432 |
#: views/subscribers/subscribers.html:95
|
| 433 |
msgid "Export"
|
| 434 |
msgstr ""
|
| 435 |
|
| 436 |
-
#: lib/Config/Menu.php:
|
| 437 |
#: views/newsletters.html:66 views/newsletters.html:168 views/segments.html:13
|
| 438 |
#: views/subscribers/subscribers.html:66
|
| 439 |
msgid "Lists"
|
| 440 |
msgstr ""
|
| 441 |
|
| 442 |
-
#: lib/Config/Menu.php:
|
| 443 |
#: views/mp2migration.html:15 views/newsletters.html:67 views/settings.html:6
|
| 444 |
msgid "Settings"
|
| 445 |
msgstr ""
|
| 446 |
|
| 447 |
-
#: lib/Config/Menu.php:
|
| 448 |
msgid "Help"
|
| 449 |
msgstr ""
|
| 450 |
|
| 451 |
-
#: lib/Config/Menu.php:
|
| 452 |
msgid "Premium"
|
| 453 |
msgstr ""
|
| 454 |
|
| 455 |
-
#: lib/Config/Menu.php:
|
| 456 |
#: views/welcome.html:12
|
| 457 |
msgid "Welcome"
|
| 458 |
msgstr ""
|
| 459 |
|
| 460 |
-
#: lib/Config/Menu.php:
|
| 461 |
msgid "Update"
|
| 462 |
msgstr ""
|
| 463 |
|
| 464 |
-
#: lib/Config/Menu.php:
|
| 465 |
msgid "Migration"
|
| 466 |
msgstr ""
|
| 467 |
|
| 468 |
-
#: lib/Config/Menu.php:
|
| 469 |
msgid "In any WordPress role"
|
| 470 |
msgstr ""
|
| 471 |
|
|
@@ -475,11 +475,11 @@ msgid ""
|
|
| 475 |
"might work within a MultiSite environment, we don’t support it."
|
| 476 |
msgstr ""
|
| 477 |
|
| 478 |
-
#: lib/Config/Populator.php:
|
| 479 |
msgid "My First List"
|
| 480 |
msgstr ""
|
| 481 |
|
| 482 |
-
#: lib/Config/Populator.php:
|
| 483 |
msgid "This list is automatically created when you install MailPoet."
|
| 484 |
msgstr ""
|
| 485 |
|
|
@@ -1065,11 +1065,11 @@ msgid ""
|
|
| 1065 |
"license[/link] by %s to keep enjoying automatic updates and Premium support."
|
| 1066 |
msgstr ""
|
| 1067 |
|
| 1068 |
-
#: lib/Config/Shortcodes.php:
|
| 1069 |
msgid "Oops! There are no newsletters to display."
|
| 1070 |
msgstr ""
|
| 1071 |
|
| 1072 |
-
#: lib/Config/Shortcodes.php:
|
| 1073 |
msgid "Preview in a new tab"
|
| 1074 |
msgstr ""
|
| 1075 |
|
|
@@ -1418,7 +1418,7 @@ msgstr ""
|
|
| 1418 |
msgid "Subscribers without a list (%s)"
|
| 1419 |
msgstr ""
|
| 1420 |
|
| 1421 |
-
#: lib/Models/Subscriber.php:337 lib/Subscription/Pages.php:
|
| 1422 |
#: views/segments.html:30 views/subscribers/subscribers.html:56
|
| 1423 |
msgid "Subscribed"
|
| 1424 |
msgstr ""
|
|
@@ -1428,12 +1428,12 @@ msgstr ""
|
|
| 1428 |
msgid "Unconfirmed"
|
| 1429 |
msgstr ""
|
| 1430 |
|
| 1431 |
-
#: lib/Models/Subscriber.php:347 lib/Subscription/Pages.php:
|
| 1432 |
#: views/segments.html:32 views/subscribers/subscribers.html:57
|
| 1433 |
msgid "Unsubscribed"
|
| 1434 |
msgstr ""
|
| 1435 |
|
| 1436 |
-
#: lib/Models/Subscriber.php:352 lib/Subscription/Pages.php:
|
| 1437 |
#: views/segments.html:33 views/subscribers/subscribers.html:58
|
| 1438 |
msgid "Bounced"
|
| 1439 |
msgstr ""
|
|
@@ -1556,7 +1556,7 @@ msgid "Invalid router endpoint action"
|
|
| 1556 |
msgstr ""
|
| 1557 |
|
| 1558 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1559 |
-
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:
|
| 1560 |
msgid "MailPoet Page"
|
| 1561 |
msgstr ""
|
| 1562 |
|
|
@@ -1619,7 +1619,7 @@ msgid "Not In List"
|
|
| 1619 |
msgstr ""
|
| 1620 |
|
| 1621 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:35
|
| 1622 |
-
#: lib/Subscription/Pages.php:
|
| 1623 |
#: views/subscribers/subscribers.html:54 views/subscribers/subscribers.html:65
|
| 1624 |
msgid "Status"
|
| 1625 |
msgstr ""
|
|
@@ -1657,64 +1657,74 @@ msgstr ""
|
|
| 1657 |
msgid "Yes, please add me to your mailing list."
|
| 1658 |
msgstr ""
|
| 1659 |
|
| 1660 |
-
#: lib/Subscription/Pages.php:
|
| 1661 |
msgid "Hmmm... we don't have a record of you."
|
| 1662 |
msgstr ""
|
| 1663 |
|
| 1664 |
-
#: lib/Subscription/Pages.php:
|
| 1665 |
msgid ""
|
| 1666 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1667 |
"contact us if this appears to be a mistake."
|
| 1668 |
msgstr ""
|
| 1669 |
|
| 1670 |
-
#: lib/Subscription/Pages.php:
|
| 1671 |
msgid "You have subscribed to: %s"
|
| 1672 |
msgstr ""
|
| 1673 |
|
| 1674 |
-
#: lib/Subscription/Pages.php:
|
| 1675 |
msgid "You are now subscribed!"
|
| 1676 |
msgstr ""
|
| 1677 |
|
| 1678 |
-
#: lib/Subscription/Pages.php:
|
| 1679 |
msgid "Manage your subscription"
|
| 1680 |
msgstr ""
|
| 1681 |
|
| 1682 |
-
#: lib/Subscription/Pages.php:
|
| 1683 |
msgid "You are now unsubscribed."
|
| 1684 |
msgstr ""
|
| 1685 |
|
| 1686 |
-
#: lib/Subscription/Pages.php:
|
| 1687 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1688 |
msgstr ""
|
| 1689 |
|
| 1690 |
-
#: lib/Subscription/Pages.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1691 |
msgid "Your lists"
|
| 1692 |
msgstr ""
|
| 1693 |
|
| 1694 |
-
#: lib/Subscription/Pages.php:
|
| 1695 |
#: views/form/editor.html:376 views/newsletter/templates/components/save.hbs:3
|
| 1696 |
#: views/segments.html:56 views/subscribers/subscribers.html:96
|
| 1697 |
msgid "Save"
|
| 1698 |
msgstr ""
|
| 1699 |
|
| 1700 |
-
#: lib/Subscription/Pages.php:
|
| 1701 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1702 |
msgstr ""
|
| 1703 |
|
| 1704 |
-
#: lib/Subscription/Pages.php:
|
| 1705 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1706 |
msgstr ""
|
| 1707 |
|
| 1708 |
-
#: lib/Subscription/Pages.php:
|
| 1709 |
msgid ""
|
| 1710 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1711 |
"again."
|
| 1712 |
msgstr ""
|
| 1713 |
|
| 1714 |
-
#: lib/Subscription/Pages.php:
|
| 1715 |
msgid "Accidentally unsubscribed?"
|
| 1716 |
msgstr ""
|
| 1717 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1718 |
#: lib/Twig/Functions.php:101 views/settings/mta.html:1090
|
| 1719 |
msgid "every minute"
|
| 1720 |
msgstr ""
|
|
@@ -2268,29 +2278,71 @@ msgstr ""
|
|
| 2268 |
msgid "Add New"
|
| 2269 |
msgstr ""
|
| 2270 |
|
| 2271 |
-
#: views/help.html:
|
| 2272 |
msgid "Knowledge Base"
|
| 2273 |
msgstr ""
|
| 2274 |
|
| 2275 |
-
#: views/help.html:
|
| 2276 |
msgid "System Info"
|
| 2277 |
msgstr ""
|
| 2278 |
|
| 2279 |
-
#: views/help.html:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2280 |
msgid "Click on one of these categories below to find more information:"
|
| 2281 |
msgstr ""
|
| 2282 |
|
| 2283 |
-
#: views/help.html:
|
| 2284 |
msgid "Visit our Knowledge Base for more articles"
|
| 2285 |
msgstr ""
|
| 2286 |
|
| 2287 |
-
#: views/help.html:
|
| 2288 |
msgid ""
|
| 2289 |
"The information below is useful when you need to get in touch with our "
|
| 2290 |
"support. Just copy all the text below and paste it into a message to us."
|
| 2291 |
msgstr ""
|
| 2292 |
|
| 2293 |
-
#: views/help.html:
|
| 2294 |
msgid "Sorry, there was an error, please try again later."
|
| 2295 |
msgstr ""
|
| 2296 |
|
|
@@ -2499,7 +2551,7 @@ msgstr ""
|
|
| 2499 |
|
| 2500 |
#: views/newsletter/editor.html:316
|
| 2501 |
#: views/newsletter/templates/blocks/base/toolsGeneric.hbs:6
|
| 2502 |
-
#: views/newsletters.html:
|
| 2503 |
#: views/subscribers/importExport/import/step2.html:150
|
| 2504 |
msgid "Cancel"
|
| 2505 |
msgstr ""
|
|
@@ -2629,7 +2681,8 @@ msgstr ""
|
|
| 2629 |
msgid "Custom"
|
| 2630 |
msgstr ""
|
| 2631 |
|
| 2632 |
-
#: views/newsletter/editor.html:
|
|
|
|
| 2633 |
msgid "Read more"
|
| 2634 |
msgstr ""
|
| 2635 |
|
|
@@ -3842,28 +3895,32 @@ msgid ""
|
|
| 3842 |
msgstr ""
|
| 3843 |
|
| 3844 |
#: views/newsletters.html:260
|
| 3845 |
-
msgid "
|
| 3846 |
msgstr ""
|
| 3847 |
|
| 3848 |
#: views/newsletters.html:261
|
| 3849 |
-
msgid "
|
| 3850 |
msgstr ""
|
| 3851 |
|
| 3852 |
#: views/newsletters.html:262
|
| 3853 |
-
msgid "
|
| 3854 |
msgstr ""
|
| 3855 |
|
| 3856 |
#: views/newsletters.html:263
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3857 |
msgid ""
|
| 3858 |
"Sending is in progress. Do you want to pause sending and edit the "
|
| 3859 |
"newsletter?"
|
| 3860 |
msgstr ""
|
| 3861 |
|
| 3862 |
-
#: views/newsletters.html:
|
| 3863 |
msgid "Confirm to proceed"
|
| 3864 |
msgstr ""
|
| 3865 |
|
| 3866 |
-
#: views/newsletters.html:
|
| 3867 |
msgid "Confirm"
|
| 3868 |
msgstr ""
|
| 3869 |
|
|
@@ -5386,22 +5443,22 @@ msgctxt "Error code (inside parentheses)"
|
|
| 5386 |
msgid "code: %s"
|
| 5387 |
msgstr ""
|
| 5388 |
|
| 5389 |
-
#: lib/Config/Menu.php:
|
| 5390 |
msgctxt "newsletters per page (screen options)"
|
| 5391 |
msgid "Number of newsletters per page"
|
| 5392 |
msgstr ""
|
| 5393 |
|
| 5394 |
-
#: lib/Config/Menu.php:
|
| 5395 |
msgctxt "forms per page (screen options)"
|
| 5396 |
msgid "Number of forms per page"
|
| 5397 |
msgstr ""
|
| 5398 |
|
| 5399 |
-
#: lib/Config/Menu.php:
|
| 5400 |
msgctxt "subscribers per page (screen options)"
|
| 5401 |
msgid "Number of subscribers per page"
|
| 5402 |
msgstr ""
|
| 5403 |
|
| 5404 |
-
#: lib/Config/Menu.php:
|
| 5405 |
msgctxt "segments per page (screen options)"
|
| 5406 |
msgid "Number of segments per page"
|
| 5407 |
msgstr ""
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
+
"POT-Creation-Date: 2017-12-12 16:17:11+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 229 |
|
| 230 |
#: lib/API/MP/v1/API.php:21
|
| 231 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:33
|
| 232 |
+
#: lib/Subscription/Pages.php:283 views/form/editor.html:219
|
| 233 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
| 234 |
msgid "First name"
|
| 235 |
msgstr ""
|
| 236 |
|
| 237 |
#: lib/API/MP/v1/API.php:25
|
| 238 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:34
|
| 239 |
+
#: lib/Subscription/Pages.php:292 views/form/editor.html:228
|
| 240 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
| 241 |
msgid "Last name"
|
| 242 |
msgstr ""
|
| 291 |
msgid "Manage segments"
|
| 292 |
msgstr ""
|
| 293 |
|
| 294 |
+
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:632 views/premium.html:41
|
| 295 |
msgid "MailPoet"
|
| 296 |
msgstr ""
|
| 297 |
|
| 392 |
msgid "Settings imported"
|
| 393 |
msgstr ""
|
| 394 |
|
| 395 |
+
#: lib/Config/Menu.php:85 lib/Config/Menu.php:86 views/newsletters.html:24
|
| 396 |
msgid "Emails"
|
| 397 |
msgstr ""
|
| 398 |
|
| 399 |
+
#: lib/Config/Menu.php:110 lib/Newsletter/Shortcodes/ShortcodesHelper.php:33
|
| 400 |
#: views/newsletter/templates/components/sidebar/styles.hbs:75
|
| 401 |
#: views/newsletters.html:123
|
| 402 |
msgid "Newsletter"
|
| 403 |
msgstr ""
|
| 404 |
|
| 405 |
+
#: lib/Config/Menu.php:111 views/newsletter/editor.html:228
|
| 406 |
msgid "Newsletter Editor"
|
| 407 |
msgstr ""
|
| 408 |
|
| 409 |
+
#: lib/Config/Menu.php:123 lib/Config/Menu.php:124 views/forms.html:25
|
| 410 |
#: views/mp2migration.html:14
|
| 411 |
msgid "Forms"
|
| 412 |
msgstr ""
|
| 413 |
|
| 414 |
+
#: lib/Config/Menu.php:148 lib/Config/Menu.php:149
|
| 415 |
msgid "Form Editor"
|
| 416 |
msgstr ""
|
| 417 |
|
| 418 |
+
#: lib/Config/Menu.php:161 lib/Config/Menu.php:162
|
| 419 |
#: views/subscribers/subscribers.html:18
|
| 420 |
msgid "Subscribers"
|
| 421 |
msgstr ""
|
| 422 |
|
| 423 |
+
#: lib/Config/Menu.php:186 lib/Config/Menu.php:187
|
| 424 |
#: views/subscribers/importExport/import.html:7
|
| 425 |
#: views/subscribers/subscribers.html:94
|
| 426 |
msgid "Import"
|
| 427 |
msgstr ""
|
| 428 |
|
| 429 |
+
#: lib/Config/Menu.php:199 lib/Config/Menu.php:200
|
| 430 |
#: views/subscribers/importExport/export.html:6
|
| 431 |
#: views/subscribers/importExport/export.html:96
|
| 432 |
#: views/subscribers/subscribers.html:95
|
| 433 |
msgid "Export"
|
| 434 |
msgstr ""
|
| 435 |
|
| 436 |
+
#: lib/Config/Menu.php:212 lib/Config/Menu.php:213 views/forms.html:53
|
| 437 |
#: views/newsletters.html:66 views/newsletters.html:168 views/segments.html:13
|
| 438 |
#: views/subscribers/subscribers.html:66
|
| 439 |
msgid "Lists"
|
| 440 |
msgstr ""
|
| 441 |
|
| 442 |
+
#: lib/Config/Menu.php:239 lib/Config/Menu.php:240 views/form/editor.html:37
|
| 443 |
#: views/mp2migration.html:15 views/newsletters.html:67 views/settings.html:6
|
| 444 |
msgid "Settings"
|
| 445 |
msgstr ""
|
| 446 |
|
| 447 |
+
#: lib/Config/Menu.php:252 lib/Config/Menu.php:253 views/help.html:5
|
| 448 |
msgid "Help"
|
| 449 |
msgstr ""
|
| 450 |
|
| 451 |
+
#: lib/Config/Menu.php:266 lib/Config/Menu.php:267
|
| 452 |
msgid "Premium"
|
| 453 |
msgstr ""
|
| 454 |
|
| 455 |
+
#: lib/Config/Menu.php:279 lib/Config/Menu.php:280 views/update.html:16
|
| 456 |
#: views/welcome.html:12
|
| 457 |
msgid "Welcome"
|
| 458 |
msgstr ""
|
| 459 |
|
| 460 |
+
#: lib/Config/Menu.php:292 lib/Config/Menu.php:293 views/segments.html:43
|
| 461 |
msgid "Update"
|
| 462 |
msgstr ""
|
| 463 |
|
| 464 |
+
#: lib/Config/Menu.php:305
|
| 465 |
msgid "Migration"
|
| 466 |
msgstr ""
|
| 467 |
|
| 468 |
+
#: lib/Config/Menu.php:554
|
| 469 |
msgid "In any WordPress role"
|
| 470 |
msgstr ""
|
| 471 |
|
| 475 |
"might work within a MultiSite environment, we don’t support it."
|
| 476 |
msgstr ""
|
| 477 |
|
| 478 |
+
#: lib/Config/Populator.php:158
|
| 479 |
msgid "My First List"
|
| 480 |
msgstr ""
|
| 481 |
|
| 482 |
+
#: lib/Config/Populator.php:160
|
| 483 |
msgid "This list is automatically created when you install MailPoet."
|
| 484 |
msgstr ""
|
| 485 |
|
| 1065 |
"license[/link] by %s to keep enjoying automatic updates and Premium support."
|
| 1066 |
msgstr ""
|
| 1067 |
|
| 1068 |
+
#: lib/Config/Shortcodes.php:91
|
| 1069 |
msgid "Oops! There are no newsletters to display."
|
| 1070 |
msgstr ""
|
| 1071 |
|
| 1072 |
+
#: lib/Config/Shortcodes.php:130
|
| 1073 |
msgid "Preview in a new tab"
|
| 1074 |
msgstr ""
|
| 1075 |
|
| 1418 |
msgid "Subscribers without a list (%s)"
|
| 1419 |
msgstr ""
|
| 1420 |
|
| 1421 |
+
#: lib/Models/Subscriber.php:337 lib/Subscription/Pages.php:306
|
| 1422 |
#: views/segments.html:30 views/subscribers/subscribers.html:56
|
| 1423 |
msgid "Subscribed"
|
| 1424 |
msgstr ""
|
| 1428 |
msgid "Unconfirmed"
|
| 1429 |
msgstr ""
|
| 1430 |
|
| 1431 |
+
#: lib/Models/Subscriber.php:347 lib/Subscription/Pages.php:314
|
| 1432 |
#: views/segments.html:32 views/subscribers/subscribers.html:57
|
| 1433 |
msgid "Unsubscribed"
|
| 1434 |
msgstr ""
|
| 1435 |
|
| 1436 |
+
#: lib/Models/Subscriber.php:352 lib/Subscription/Pages.php:322
|
| 1437 |
#: views/segments.html:33 views/subscribers/subscribers.html:58
|
| 1438 |
msgid "Bounced"
|
| 1439 |
msgstr ""
|
| 1556 |
msgstr ""
|
| 1557 |
|
| 1558 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1559 |
+
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:112
|
| 1560 |
msgid "MailPoet Page"
|
| 1561 |
msgstr ""
|
| 1562 |
|
| 1619 |
msgstr ""
|
| 1620 |
|
| 1621 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:35
|
| 1622 |
+
#: lib/Subscription/Pages.php:302 views/newsletters.html:63
|
| 1623 |
#: views/subscribers/subscribers.html:54 views/subscribers/subscribers.html:65
|
| 1624 |
msgid "Status"
|
| 1625 |
msgstr ""
|
| 1657 |
msgid "Yes, please add me to your mailing list."
|
| 1658 |
msgstr ""
|
| 1659 |
|
| 1660 |
+
#: lib/Subscription/Pages.php:108
|
| 1661 |
msgid "Hmmm... we don't have a record of you."
|
| 1662 |
msgstr ""
|
| 1663 |
|
| 1664 |
+
#: lib/Subscription/Pages.php:138
|
| 1665 |
msgid ""
|
| 1666 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1667 |
"contact us if this appears to be a mistake."
|
| 1668 |
msgstr ""
|
| 1669 |
|
| 1670 |
+
#: lib/Subscription/Pages.php:182 lib/Subscription/Pages.php:194
|
| 1671 |
msgid "You have subscribed to: %s"
|
| 1672 |
msgstr ""
|
| 1673 |
|
| 1674 |
+
#: lib/Subscription/Pages.php:191
|
| 1675 |
msgid "You are now subscribed!"
|
| 1676 |
msgstr ""
|
| 1677 |
|
| 1678 |
+
#: lib/Subscription/Pages.php:204 lib/Subscription/Pages.php:423
|
| 1679 |
msgid "Manage your subscription"
|
| 1680 |
msgstr ""
|
| 1681 |
|
| 1682 |
+
#: lib/Subscription/Pages.php:210
|
| 1683 |
msgid "You are now unsubscribed."
|
| 1684 |
msgstr ""
|
| 1685 |
|
| 1686 |
+
#: lib/Subscription/Pages.php:216
|
| 1687 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1688 |
msgstr ""
|
| 1689 |
|
| 1690 |
+
#: lib/Subscription/Pages.php:233
|
| 1691 |
+
msgid "Subscription management form is only available to mailing lists subscribers."
|
| 1692 |
+
msgstr ""
|
| 1693 |
+
|
| 1694 |
+
#: lib/Subscription/Pages.php:345
|
| 1695 |
msgid "Your lists"
|
| 1696 |
msgstr ""
|
| 1697 |
|
| 1698 |
+
#: lib/Subscription/Pages.php:353 views/form/editor.html:29
|
| 1699 |
#: views/form/editor.html:376 views/newsletter/templates/components/save.hbs:3
|
| 1700 |
#: views/segments.html:56 views/subscribers/subscribers.html:96
|
| 1701 |
msgid "Save"
|
| 1702 |
msgstr ""
|
| 1703 |
|
| 1704 |
+
#: lib/Subscription/Pages.php:383
|
| 1705 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1706 |
msgstr ""
|
| 1707 |
|
| 1708 |
+
#: lib/Subscription/Pages.php:389
|
| 1709 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1710 |
msgstr ""
|
| 1711 |
|
| 1712 |
+
#: lib/Subscription/Pages.php:395
|
| 1713 |
msgid ""
|
| 1714 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1715 |
"again."
|
| 1716 |
msgstr ""
|
| 1717 |
|
| 1718 |
+
#: lib/Subscription/Pages.php:409
|
| 1719 |
msgid "Accidentally unsubscribed?"
|
| 1720 |
msgstr ""
|
| 1721 |
|
| 1722 |
+
#: lib/Subscription/Pages.php:417
|
| 1723 |
+
msgid ""
|
| 1724 |
+
"Link to subscription management page is only available to mailing lists "
|
| 1725 |
+
"subscribers."
|
| 1726 |
+
msgstr ""
|
| 1727 |
+
|
| 1728 |
#: lib/Twig/Functions.php:101 views/settings/mta.html:1090
|
| 1729 |
msgid "every minute"
|
| 1730 |
msgstr ""
|
| 2278 |
msgid "Add New"
|
| 2279 |
msgstr ""
|
| 2280 |
|
| 2281 |
+
#: views/help.html:21
|
| 2282 |
msgid "Knowledge Base"
|
| 2283 |
msgstr ""
|
| 2284 |
|
| 2285 |
+
#: views/help.html:22
|
| 2286 |
msgid "System Info"
|
| 2287 |
msgstr ""
|
| 2288 |
|
| 2289 |
+
#: views/help.html:23
|
| 2290 |
+
msgid "System Status"
|
| 2291 |
+
msgstr ""
|
| 2292 |
+
|
| 2293 |
+
#: views/help.html:24
|
| 2294 |
+
msgid ""
|
| 2295 |
+
"For the plugin to work, it must be able to establish connection with the "
|
| 2296 |
+
"task scheduler."
|
| 2297 |
+
msgstr ""
|
| 2298 |
+
|
| 2299 |
+
#: views/help.html:25
|
| 2300 |
+
msgid ""
|
| 2301 |
+
"For the plugin to work, it must be able to establish connection with the "
|
| 2302 |
+
"task scheduler and the key activation/MailPoet sending service."
|
| 2303 |
+
msgstr ""
|
| 2304 |
+
|
| 2305 |
+
#: views/help.html:26
|
| 2306 |
+
msgid "Task Scheduler"
|
| 2307 |
+
msgstr ""
|
| 2308 |
+
|
| 2309 |
+
#: views/help.html:27
|
| 2310 |
+
msgid "Key Activation and MailPoet Sending Service"
|
| 2311 |
+
msgstr ""
|
| 2312 |
+
|
| 2313 |
+
#: views/help.html:28
|
| 2314 |
+
msgid "Connection successful."
|
| 2315 |
+
msgstr ""
|
| 2316 |
+
|
| 2317 |
+
#: views/help.html:29
|
| 2318 |
+
msgid "Connection unsuccessful."
|
| 2319 |
+
msgstr ""
|
| 2320 |
+
|
| 2321 |
+
#: views/help.html:30
|
| 2322 |
+
msgid ""
|
| 2323 |
+
"Please consult our [link]knowledge base article[/link] for troubleshooting "
|
| 2324 |
+
"tips."
|
| 2325 |
+
msgstr ""
|
| 2326 |
+
|
| 2327 |
+
#: views/help.html:31
|
| 2328 |
+
msgid "Please contact our technical support for assistance."
|
| 2329 |
+
msgstr ""
|
| 2330 |
+
|
| 2331 |
+
#: views/help.html:32
|
| 2332 |
msgid "Click on one of these categories below to find more information:"
|
| 2333 |
msgstr ""
|
| 2334 |
|
| 2335 |
+
#: views/help.html:33
|
| 2336 |
msgid "Visit our Knowledge Base for more articles"
|
| 2337 |
msgstr ""
|
| 2338 |
|
| 2339 |
+
#: views/help.html:34
|
| 2340 |
msgid ""
|
| 2341 |
"The information below is useful when you need to get in touch with our "
|
| 2342 |
"support. Just copy all the text below and paste it into a message to us."
|
| 2343 |
msgstr ""
|
| 2344 |
|
| 2345 |
+
#: views/help.html:35
|
| 2346 |
msgid "Sorry, there was an error, please try again later."
|
| 2347 |
msgstr ""
|
| 2348 |
|
| 2551 |
|
| 2552 |
#: views/newsletter/editor.html:316
|
| 2553 |
#: views/newsletter/templates/blocks/base/toolsGeneric.hbs:6
|
| 2554 |
+
#: views/newsletters.html:267
|
| 2555 |
#: views/subscribers/importExport/import/step2.html:150
|
| 2556 |
msgid "Cancel"
|
| 2557 |
msgstr ""
|
| 2681 |
msgid "Custom"
|
| 2682 |
msgstr ""
|
| 2683 |
|
| 2684 |
+
#: views/newsletter/editor.html:979 views/newsletter/editor.html:981
|
| 2685 |
+
#: views/newsletter/editor.html:1101 views/newsletter/editor.html:1103
|
| 2686 |
msgid "Read more"
|
| 2687 |
msgstr ""
|
| 2688 |
|
| 3895 |
msgstr ""
|
| 3896 |
|
| 3897 |
#: views/newsletters.html:260
|
| 3898 |
+
msgid "Error code: %$1s"
|
| 3899 |
msgstr ""
|
| 3900 |
|
| 3901 |
#: views/newsletters.html:261
|
| 3902 |
+
msgid "Check your [link]sending method settings[/link]."
|
| 3903 |
msgstr ""
|
| 3904 |
|
| 3905 |
#: views/newsletters.html:262
|
| 3906 |
+
msgid "Resume sending"
|
| 3907 |
msgstr ""
|
| 3908 |
|
| 3909 |
#: views/newsletters.html:263
|
| 3910 |
+
msgid "Sending has been resumed."
|
| 3911 |
+
msgstr ""
|
| 3912 |
+
|
| 3913 |
+
#: views/newsletters.html:264
|
| 3914 |
msgid ""
|
| 3915 |
"Sending is in progress. Do you want to pause sending and edit the "
|
| 3916 |
"newsletter?"
|
| 3917 |
msgstr ""
|
| 3918 |
|
| 3919 |
+
#: views/newsletters.html:265
|
| 3920 |
msgid "Confirm to proceed"
|
| 3921 |
msgstr ""
|
| 3922 |
|
| 3923 |
+
#: views/newsletters.html:266
|
| 3924 |
msgid "Confirm"
|
| 3925 |
msgstr ""
|
| 3926 |
|
| 5443 |
msgid "code: %s"
|
| 5444 |
msgstr ""
|
| 5445 |
|
| 5446 |
+
#: lib/Config/Menu.php:98
|
| 5447 |
msgctxt "newsletters per page (screen options)"
|
| 5448 |
msgid "Number of newsletters per page"
|
| 5449 |
msgstr ""
|
| 5450 |
|
| 5451 |
+
#: lib/Config/Menu.php:136
|
| 5452 |
msgctxt "forms per page (screen options)"
|
| 5453 |
msgid "Number of forms per page"
|
| 5454 |
msgstr ""
|
| 5455 |
|
| 5456 |
+
#: lib/Config/Menu.php:174
|
| 5457 |
msgctxt "subscribers per page (screen options)"
|
| 5458 |
msgid "Number of subscribers per page"
|
| 5459 |
msgstr ""
|
| 5460 |
|
| 5461 |
+
#: lib/Config/Menu.php:225
|
| 5462 |
msgctxt "segments per page (screen options)"
|
| 5463 |
msgid "Number of segments per page"
|
| 5464 |
msgstr ""
|
lib/Config/Localizer.php
CHANGED
|
@@ -35,4 +35,15 @@ class Localizer {
|
|
| 35 |
);
|
| 36 |
return $locale;
|
| 37 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 35 |
);
|
| 36 |
return $locale;
|
| 37 |
}
|
| 38 |
+
|
| 39 |
+
function forceLoadWebsiteLocaleText() {
|
| 40 |
+
$language_path = sprintf(
|
| 41 |
+
'%s/%s-%s.mo',
|
| 42 |
+
Env::$languages_path,
|
| 43 |
+
Env::$plugin_name,
|
| 44 |
+
get_locale()
|
| 45 |
+
);
|
| 46 |
+
unload_textdomain(Env::$plugin_name);
|
| 47 |
+
load_textdomain(Env::$plugin_name, $language_path);
|
| 48 |
+
}
|
| 49 |
}
|
lib/Config/Menu.php
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
|
| 3 |
namespace MailPoet\Config;
|
| 4 |
|
|
|
|
| 5 |
use MailPoet\Cron\CronTrigger;
|
| 6 |
use MailPoet\Form\Block;
|
| 7 |
use MailPoet\Form\Renderer as FormRenderer;
|
|
@@ -13,6 +14,7 @@ use MailPoet\Models\Segment;
|
|
| 13 |
use MailPoet\Models\Setting;
|
| 14 |
use MailPoet\Models\Subscriber;
|
| 15 |
use MailPoet\Newsletter\Shortcodes\ShortcodesHelper;
|
|
|
|
| 16 |
use MailPoet\Services\Bridge;
|
| 17 |
use MailPoet\Settings\Hosts;
|
| 18 |
use MailPoet\Settings\Pages;
|
|
@@ -429,8 +431,27 @@ class Menu {
|
|
| 429 |
$this->displayPage('settings.html', $data);
|
| 430 |
}
|
| 431 |
|
|
|
|
| 432 |
function help() {
|
| 433 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 434 |
}
|
| 435 |
|
| 436 |
private function _getFlags() {
|
| 2 |
|
| 3 |
namespace MailPoet\Config;
|
| 4 |
|
| 5 |
+
use MailPoet\Cron\CronHelper;
|
| 6 |
use MailPoet\Cron\CronTrigger;
|
| 7 |
use MailPoet\Form\Block;
|
| 8 |
use MailPoet\Form\Renderer as FormRenderer;
|
| 14 |
use MailPoet\Models\Setting;
|
| 15 |
use MailPoet\Models\Subscriber;
|
| 16 |
use MailPoet\Newsletter\Shortcodes\ShortcodesHelper;
|
| 17 |
+
use MailPoet\Router\Endpoints\CronDaemon;
|
| 18 |
use MailPoet\Services\Bridge;
|
| 19 |
use MailPoet\Settings\Hosts;
|
| 20 |
use MailPoet\Settings\Pages;
|
| 431 |
$this->displayPage('settings.html', $data);
|
| 432 |
}
|
| 433 |
|
| 434 |
+
|
| 435 |
function help() {
|
| 436 |
+
$system_info_data = Beacon::getData();
|
| 437 |
+
$system_status_data = array(
|
| 438 |
+
'cron' => array(
|
| 439 |
+
'url' => CronHelper::getCronUrl(CronDaemon::ACTION_PING),
|
| 440 |
+
'isReachable' => CronHelper::pingDaemon()
|
| 441 |
+
),
|
| 442 |
+
'mss' => array(
|
| 443 |
+
'enabled' => (Bridge::isMPSendingServiceEnabled()) ?
|
| 444 |
+
array('isReachable' => Bridge::pingBridge()) :
|
| 445 |
+
false
|
| 446 |
+
)
|
| 447 |
+
);
|
| 448 |
+
$this->displayPage(
|
| 449 |
+
'help.html',
|
| 450 |
+
array(
|
| 451 |
+
'systemInfoData' => $system_info_data,
|
| 452 |
+
'systemStatusData' => $system_status_data
|
| 453 |
+
)
|
| 454 |
+
);
|
| 455 |
}
|
| 456 |
|
| 457 |
private function _getFlags() {
|
lib/Config/Populator.php
CHANGED
|
@@ -57,6 +57,8 @@ class Populator {
|
|
| 57 |
}
|
| 58 |
|
| 59 |
function up() {
|
|
|
|
|
|
|
| 60 |
$this->convertExistingDataToUTF8();
|
| 61 |
$this->migrateSimpleScheduledTasks();
|
| 62 |
$this->populateNewsletterSentAtField();
|
| 57 |
}
|
| 58 |
|
| 59 |
function up() {
|
| 60 |
+
$localizer = new Localizer();
|
| 61 |
+
$localizer->forceLoadWebsiteLocaleText();
|
| 62 |
$this->convertExistingDataToUTF8();
|
| 63 |
$this->migrateSimpleScheduledTasks();
|
| 64 |
$this->populateNewsletterSentAtField();
|
lib/Config/Shortcodes.php
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
<?php
|
|
|
|
| 2 |
namespace MailPoet\Config;
|
|
|
|
| 3 |
use MailPoet\Models\Newsletter;
|
| 4 |
use MailPoet\Models\Subscriber;
|
| 5 |
use MailPoet\Models\SubscriberSegment;
|
| 6 |
use MailPoet\Newsletter\Url as NewsletterUrl;
|
|
|
|
| 7 |
use MailPoet\WP\Hooks;
|
| 8 |
|
| 9 |
class Shortcodes {
|
| 10 |
-
function __construct() {
|
| 11 |
-
}
|
| 12 |
-
|
| 13 |
function init() {
|
| 14 |
// form widget shortcode
|
| 15 |
add_shortcode('mailpoet_form', array($this, 'formWidget'));
|
|
@@ -33,6 +33,10 @@ class Shortcodes {
|
|
| 33 |
Hooks::addFilter('mailpoet_archive_subject', array(
|
| 34 |
$this, 'renderArchiveSubject'
|
| 35 |
), 2, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
function formWidget($params = array()) {
|
| 1 |
<?php
|
| 2 |
+
|
| 3 |
namespace MailPoet\Config;
|
| 4 |
+
|
| 5 |
use MailPoet\Models\Newsletter;
|
| 6 |
use MailPoet\Models\Subscriber;
|
| 7 |
use MailPoet\Models\SubscriberSegment;
|
| 8 |
use MailPoet\Newsletter\Url as NewsletterUrl;
|
| 9 |
+
use MailPoet\Subscription\Pages;
|
| 10 |
use MailPoet\WP\Hooks;
|
| 11 |
|
| 12 |
class Shortcodes {
|
|
|
|
|
|
|
|
|
|
| 13 |
function init() {
|
| 14 |
// form widget shortcode
|
| 15 |
add_shortcode('mailpoet_form', array($this, 'formWidget'));
|
| 33 |
Hooks::addFilter('mailpoet_archive_subject', array(
|
| 34 |
$this, 'renderArchiveSubject'
|
| 35 |
), 2, 3);
|
| 36 |
+
|
| 37 |
+
// initialize subscription management shortcodes
|
| 38 |
+
$subscription_page = new Pages();
|
| 39 |
+
$subscription_page->initShortcodes();
|
| 40 |
}
|
| 41 |
|
| 42 |
function formWidget($params = array()) {
|
lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php
CHANGED
|
@@ -57,7 +57,7 @@ class Newsletter {
|
|
| 57 |
// return the newsletter if it was previously rendered
|
| 58 |
if(!is_null($queue->getNewsletterRenderedBody())) {
|
| 59 |
return (!$queue->validate()) ?
|
| 60 |
-
$this->stopNewsletterPreProcessing() :
|
| 61 |
$newsletter;
|
| 62 |
}
|
| 63 |
// if tracking is enabled, do additional processing
|
|
@@ -111,7 +111,7 @@ class Newsletter {
|
|
| 111 |
$queue_errors = ($queue->validate() !== true);
|
| 112 |
}
|
| 113 |
if($queue_errors) {
|
| 114 |
-
$this->stopNewsletterPreProcessing();
|
| 115 |
}
|
| 116 |
return $newsletter;
|
| 117 |
}
|
|
@@ -169,10 +169,11 @@ class Newsletter {
|
|
| 169 |
return Helpers::flattenArray($segments);
|
| 170 |
}
|
| 171 |
|
| 172 |
-
function stopNewsletterPreProcessing() {
|
| 173 |
MailerLog::processError(
|
| 174 |
'queue_save',
|
| 175 |
-
__('There was an error processing your newsletter during sending. If possible, please contact us and report this issue.')
|
|
|
|
| 176 |
);
|
| 177 |
}
|
| 178 |
}
|
| 57 |
// return the newsletter if it was previously rendered
|
| 58 |
if(!is_null($queue->getNewsletterRenderedBody())) {
|
| 59 |
return (!$queue->validate()) ?
|
| 60 |
+
$this->stopNewsletterPreProcessing(sprintf('QUEUE-%d-RENDER', $queue->id)) :
|
| 61 |
$newsletter;
|
| 62 |
}
|
| 63 |
// if tracking is enabled, do additional processing
|
| 111 |
$queue_errors = ($queue->validate() !== true);
|
| 112 |
}
|
| 113 |
if($queue_errors) {
|
| 114 |
+
$this->stopNewsletterPreProcessing(sprintf('QUEUE-%d-SAVE', $queue->id));
|
| 115 |
}
|
| 116 |
return $newsletter;
|
| 117 |
}
|
| 169 |
return Helpers::flattenArray($segments);
|
| 170 |
}
|
| 171 |
|
| 172 |
+
function stopNewsletterPreProcessing($error_code = null) {
|
| 173 |
MailerLog::processError(
|
| 174 |
'queue_save',
|
| 175 |
+
__('There was an error processing your newsletter during sending. If possible, please contact us and report this issue.'),
|
| 176 |
+
$error_code
|
| 177 |
);
|
| 178 |
}
|
| 179 |
}
|
lib/Mailer/MailerLog.php
CHANGED
|
@@ -75,7 +75,7 @@ class MailerLog {
|
|
| 75 |
return self::resetMailerLog();
|
| 76 |
}
|
| 77 |
|
| 78 |
-
static function processError($operation, $error_message) {
|
| 79 |
$mailer_log = self::getMailerLog();
|
| 80 |
(int)$mailer_log['retry_attempt']++;
|
| 81 |
$mailer_log['retry_at'] = time() + self::RETRY_INTERVAL;
|
|
@@ -83,6 +83,9 @@ class MailerLog {
|
|
| 83 |
'operation' => $operation,
|
| 84 |
'error_message' => $error_message
|
| 85 |
);
|
|
|
|
|
|
|
|
|
|
| 86 |
self::updateMailerLog($mailer_log);
|
| 87 |
return self::enforceExecutionRequirements();
|
| 88 |
}
|
| 75 |
return self::resetMailerLog();
|
| 76 |
}
|
| 77 |
|
| 78 |
+
static function processError($operation, $error_message, $error_code = null) {
|
| 79 |
$mailer_log = self::getMailerLog();
|
| 80 |
(int)$mailer_log['retry_attempt']++;
|
| 81 |
$mailer_log['retry_at'] = time() + self::RETRY_INTERVAL;
|
| 83 |
'operation' => $operation,
|
| 84 |
'error_message' => $error_message
|
| 85 |
);
|
| 86 |
+
if($error_code) {
|
| 87 |
+
$mailer_log['error']['error_code'] = $error_code;
|
| 88 |
+
}
|
| 89 |
self::updateMailerLog($mailer_log);
|
| 90 |
return self::enforceExecutionRequirements();
|
| 91 |
}
|
lib/Router/Endpoints/Subscription.php
CHANGED
|
@@ -27,16 +27,20 @@ class Subscription {
|
|
| 27 |
}
|
| 28 |
|
| 29 |
function confirm() {
|
| 30 |
-
$subscription =
|
| 31 |
$subscription->confirm();
|
| 32 |
}
|
| 33 |
|
| 34 |
function manage() {
|
| 35 |
-
$subscription =
|
| 36 |
}
|
| 37 |
|
| 38 |
function unsubscribe() {
|
| 39 |
-
$subscription =
|
| 40 |
$subscription->unsubscribe();
|
| 41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
}
|
| 27 |
}
|
| 28 |
|
| 29 |
function confirm() {
|
| 30 |
+
$subscription = $this->initSubscriptionPage(UserSubscription\Pages::ACTION_CONFIRM);
|
| 31 |
$subscription->confirm();
|
| 32 |
}
|
| 33 |
|
| 34 |
function manage() {
|
| 35 |
+
$subscription = $this->initSubscriptionPage(UserSubscription\Pages::ACTION_MANAGE);
|
| 36 |
}
|
| 37 |
|
| 38 |
function unsubscribe() {
|
| 39 |
+
$subscription = $this->initSubscriptionPage(UserSubscription\Pages::ACTION_UNSUBSCRIBE);
|
| 40 |
$subscription->unsubscribe();
|
| 41 |
}
|
| 42 |
+
|
| 43 |
+
private function initSubscriptionPage($action) {
|
| 44 |
+
return new UserSubscription\Pages($action, $this->data, true, true);
|
| 45 |
+
}
|
| 46 |
}
|
lib/Router/Router.php
CHANGED
|
@@ -27,7 +27,7 @@ class Router {
|
|
| 27 |
false;
|
| 28 |
$this->data = isset($api_data['data']) ?
|
| 29 |
self::decodeRequestData($api_data['data']) :
|
| 30 |
-
|
| 31 |
$this->access_control = $access_control;
|
| 32 |
}
|
| 33 |
|
| 27 |
false;
|
| 28 |
$this->data = isset($api_data['data']) ?
|
| 29 |
self::decodeRequestData($api_data['data']) :
|
| 30 |
+
array();
|
| 31 |
$this->access_control = $access_control;
|
| 32 |
}
|
| 33 |
|
lib/Services/Bridge.php
CHANGED
|
@@ -26,6 +26,8 @@ class Bridge {
|
|
| 26 |
const CHECK_ERROR_UNAVAILABLE = 503;
|
| 27 |
const CHECK_ERROR_UNKNOWN = 'unknown';
|
| 28 |
|
|
|
|
|
|
|
| 29 |
public $api;
|
| 30 |
|
| 31 |
static function isMPSendingServiceEnabled() {
|
|
@@ -48,6 +50,15 @@ class Bridge {
|
|
| 48 |
return !empty($key);
|
| 49 |
}
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
function initApi($api_key) {
|
| 52 |
if($this->api) {
|
| 53 |
$this->api->setKey($api_key);
|
| 26 |
const CHECK_ERROR_UNAVAILABLE = 503;
|
| 27 |
const CHECK_ERROR_UNKNOWN = 'unknown';
|
| 28 |
|
| 29 |
+
const BRIDGE_URL = 'https://bridge.mailpoet.com';
|
| 30 |
+
|
| 31 |
public $api;
|
| 32 |
|
| 33 |
static function isMPSendingServiceEnabled() {
|
| 50 |
return !empty($key);
|
| 51 |
}
|
| 52 |
|
| 53 |
+
static function pingBridge() {
|
| 54 |
+
$params = array(
|
| 55 |
+
'blocking' => true,
|
| 56 |
+
'timeout' => 10
|
| 57 |
+
);
|
| 58 |
+
$result = wp_remote_get(self::BRIDGE_URL, $params);
|
| 59 |
+
return wp_remote_retrieve_response_code($result) === 200;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
function initApi($api_key) {
|
| 63 |
if($this->api) {
|
| 64 |
$this->api->setKey($api_key);
|
lib/Subscription/Pages.php
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
<?php
|
|
|
|
| 2 |
namespace MailPoet\Subscription;
|
| 3 |
|
| 4 |
use MailPoet\Models\Subscriber;
|
|
@@ -14,46 +15,50 @@ use MailPoet\Form\Block\Date as FormBlockDate;
|
|
| 14 |
|
| 15 |
class Pages {
|
| 16 |
const DEMO_EMAIL = 'demo@mailpoet.com';
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
private $action;
|
| 19 |
private $data;
|
| 20 |
private $subscriber;
|
| 21 |
|
| 22 |
-
function __construct($action, $data = array()) {
|
| 23 |
$this->action = $action;
|
| 24 |
$this->data = $data;
|
| 25 |
$this->subscriber = $this->getSubscriber();
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
add_filter('wp_title', array($this,'setWindowTitle'), 10, 3);
|
| 29 |
add_filter('document_title_parts', array($this,'setWindowTitleParts'), 10, 1);
|
| 30 |
add_filter('the_title', array($this,'setPageTitle'), 10, 1);
|
| 31 |
add_filter('the_content', array($this,'setPageContent'), 10, 1);
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
// [mailpoet_manage text="Manage your subscription"]
|
| 35 |
add_shortcode('mailpoet_manage', array($this, 'getManageLink'));
|
| 36 |
add_shortcode('mailpoet_manage_subscription', array($this, 'getManageContent'));
|
| 37 |
}
|
| 38 |
|
| 39 |
-
private function isPreview() {
|
| 40 |
-
return (
|
| 41 |
-
array_key_exists('preview', $_GET)
|
| 42 |
-
|| array_key_exists('preview', $this->data)
|
| 43 |
-
);
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
function getSubscriber() {
|
| 47 |
$token = (isset($this->data['token'])) ? $this->data['token'] : null;
|
| 48 |
$email = (isset($this->data['email'])) ? $this->data['email'] : null;
|
|
|
|
| 49 |
|
| 50 |
-
if(
|
| 51 |
-
|
| 52 |
-
if($subscriber !== false) {
|
| 53 |
-
return $subscriber;
|
| 54 |
-
}
|
| 55 |
}
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
function confirm() {
|
|
@@ -113,13 +118,13 @@ class Pages {
|
|
| 113 |
} else {
|
| 114 |
// when it's our own page, generate page title based on requested action
|
| 115 |
switch($this->action) {
|
| 116 |
-
case
|
| 117 |
return $this->getConfirmTitle();
|
| 118 |
|
| 119 |
-
case
|
| 120 |
return $this->getManageTitle();
|
| 121 |
|
| 122 |
-
case
|
| 123 |
return $this->getUnsubscribeTitle();
|
| 124 |
}
|
| 125 |
}
|
|
@@ -137,13 +142,13 @@ class Pages {
|
|
| 137 |
$content = '';
|
| 138 |
|
| 139 |
switch($this->action) {
|
| 140 |
-
case
|
| 141 |
$content = $this->getConfirmContent();
|
| 142 |
break;
|
| 143 |
-
case
|
| 144 |
$content = $this->getManageContent();
|
| 145 |
break;
|
| 146 |
-
case
|
| 147 |
$content = $this->getUnsubscribeContent();
|
| 148 |
break;
|
| 149 |
}
|
|
@@ -225,7 +230,7 @@ class Pages {
|
|
| 225 |
->withCustomFields()
|
| 226 |
->withSubscriptions();
|
| 227 |
} else {
|
| 228 |
-
return;
|
| 229 |
}
|
| 230 |
|
| 231 |
$custom_fields = array_map(function($custom_field) use($subscriber) {
|
|
@@ -409,6 +414,8 @@ class Pages {
|
|
| 409 |
}
|
| 410 |
|
| 411 |
function getManageLink($params) {
|
|
|
|
|
|
|
| 412 |
// get label or display default label
|
| 413 |
$text = (
|
| 414 |
isset($params['text'])
|
|
@@ -420,4 +427,4 @@ class Pages {
|
|
| 420 |
$this->subscriber
|
| 421 |
).'">'.$text.'</a>';
|
| 422 |
}
|
| 423 |
-
}
|
| 1 |
<?php
|
| 2 |
+
|
| 3 |
namespace MailPoet\Subscription;
|
| 4 |
|
| 5 |
use MailPoet\Models\Subscriber;
|
| 15 |
|
| 16 |
class Pages {
|
| 17 |
const DEMO_EMAIL = 'demo@mailpoet.com';
|
| 18 |
+
const ACTION_CONFIRM = 'confirm';
|
| 19 |
+
const ACTION_MANAGE = 'manage';
|
| 20 |
+
const ACTION_UNSUBSCRIBE = 'unsubscribe';
|
| 21 |
|
| 22 |
private $action;
|
| 23 |
private $data;
|
| 24 |
private $subscriber;
|
| 25 |
|
| 26 |
+
function __construct($action = false, $data = array(), $init_shortcodes = false, $init_page_filters = false) {
|
| 27 |
$this->action = $action;
|
| 28 |
$this->data = $data;
|
| 29 |
$this->subscriber = $this->getSubscriber();
|
| 30 |
+
if($init_page_filters) $this->initPageFilters();
|
| 31 |
+
if($init_shortcodes) $this->initShortcodes();
|
| 32 |
+
}
|
| 33 |
|
| 34 |
+
private function isPreview() {
|
| 35 |
+
return (array_key_exists('preview', $_GET) || array_key_exists('preview', $this->data));
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
function initPageFilters() {
|
| 39 |
add_filter('wp_title', array($this,'setWindowTitle'), 10, 3);
|
| 40 |
add_filter('document_title_parts', array($this,'setWindowTitleParts'), 10, 1);
|
| 41 |
add_filter('the_title', array($this,'setPageTitle'), 10, 1);
|
| 42 |
add_filter('the_content', array($this,'setPageContent'), 10, 1);
|
| 43 |
+
}
|
| 44 |
|
| 45 |
+
function initShortcodes() {
|
|
|
|
| 46 |
add_shortcode('mailpoet_manage', array($this, 'getManageLink'));
|
| 47 |
add_shortcode('mailpoet_manage_subscription', array($this, 'getManageContent'));
|
| 48 |
}
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
function getSubscriber() {
|
| 51 |
$token = (isset($this->data['token'])) ? $this->data['token'] : null;
|
| 52 |
$email = (isset($this->data['email'])) ? $this->data['email'] : null;
|
| 53 |
+
$wp_user = wp_get_current_user();
|
| 54 |
|
| 55 |
+
if(!$email && $wp_user->exists()) {
|
| 56 |
+
return Subscriber::where('wp_user_id', $wp_user->ID)->findOne();
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
+
|
| 59 |
+
return (Subscriber::generateToken($email) === $token) ?
|
| 60 |
+
Subscriber::findOne($email) :
|
| 61 |
+
false;
|
| 62 |
}
|
| 63 |
|
| 64 |
function confirm() {
|
| 118 |
} else {
|
| 119 |
// when it's our own page, generate page title based on requested action
|
| 120 |
switch($this->action) {
|
| 121 |
+
case self::ACTION_CONFIRM:
|
| 122 |
return $this->getConfirmTitle();
|
| 123 |
|
| 124 |
+
case self::ACTION_MANAGE:
|
| 125 |
return $this->getManageTitle();
|
| 126 |
|
| 127 |
+
case self::ACTION_UNSUBSCRIBE:
|
| 128 |
return $this->getUnsubscribeTitle();
|
| 129 |
}
|
| 130 |
}
|
| 142 |
$content = '';
|
| 143 |
|
| 144 |
switch($this->action) {
|
| 145 |
+
case self::ACTION_CONFIRM:
|
| 146 |
$content = $this->getConfirmContent();
|
| 147 |
break;
|
| 148 |
+
case self::ACTION_MANAGE:
|
| 149 |
$content = $this->getManageContent();
|
| 150 |
break;
|
| 151 |
+
case self::ACTION_UNSUBSCRIBE:
|
| 152 |
$content = $this->getUnsubscribeContent();
|
| 153 |
break;
|
| 154 |
}
|
| 230 |
->withCustomFields()
|
| 231 |
->withSubscriptions();
|
| 232 |
} else {
|
| 233 |
+
return __('Subscription management form is only available to mailing lists subscribers.', 'mailpoet');
|
| 234 |
}
|
| 235 |
|
| 236 |
$custom_fields = array_map(function($custom_field) use($subscriber) {
|
| 414 |
}
|
| 415 |
|
| 416 |
function getManageLink($params) {
|
| 417 |
+
if(!$this->subscriber) return __('Link to subscription management page is only available to mailing lists subscribers.', 'mailpoet');
|
| 418 |
+
|
| 419 |
// get label or display default label
|
| 420 |
$text = (
|
| 421 |
isset($params['text'])
|
| 427 |
$this->subscriber
|
| 428 |
).'">'.$text.'</a>';
|
| 429 |
}
|
| 430 |
+
}
|
lib/Util/Polyfills.php
CHANGED
|
@@ -15,3 +15,9 @@ if(!function_exists('mb_convert_encoding')) {
|
|
| 15 |
return MbstringPolyfill::mb_convert_encoding($s, $to, $from);
|
| 16 |
}
|
| 17 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
return MbstringPolyfill::mb_convert_encoding($s, $to, $from);
|
| 16 |
}
|
| 17 |
}
|
| 18 |
+
|
| 19 |
+
if(!function_exists('mb_strtoupper')) {
|
| 20 |
+
function mb_strtoupper($s, $encoding = null) {
|
| 21 |
+
return MbstringPolyfill::mb_strtoupper($s, $encoding);
|
| 22 |
+
}
|
| 23 |
+
}
|
mailpoet.php
CHANGED
|
@@ -4,12 +4,12 @@ if(!defined('ABSPATH')) exit;
|
|
| 4 |
|
| 5 |
/*
|
| 6 |
* Plugin Name: MailPoet 3 (New)
|
| 7 |
-
* Version: 3.2.
|
| 8 |
* Plugin URI: http://www.mailpoet.com
|
| 9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
| 10 |
* Author: MailPoet
|
| 11 |
* Author URI: http://www.mailpoet.com
|
| 12 |
-
* Requires at least: 4.
|
| 13 |
* Tested up to: 4.9
|
| 14 |
*
|
| 15 |
* Domain Path: /lang/
|
|
@@ -20,7 +20,7 @@ if(!defined('ABSPATH')) exit;
|
|
| 20 |
*/
|
| 21 |
|
| 22 |
$mailpoet_plugin = array(
|
| 23 |
-
'version' => '3.2.
|
| 24 |
'filename' => __FILE__,
|
| 25 |
'path' => dirname(__FILE__),
|
| 26 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
| 4 |
|
| 5 |
/*
|
| 6 |
* Plugin Name: MailPoet 3 (New)
|
| 7 |
+
* Version: 3.2.5
|
| 8 |
* Plugin URI: http://www.mailpoet.com
|
| 9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
| 10 |
* Author: MailPoet
|
| 11 |
* Author URI: http://www.mailpoet.com
|
| 12 |
+
* Requires at least: 4.7
|
| 13 |
* Tested up to: 4.9
|
| 14 |
*
|
| 15 |
* Domain Path: /lang/
|
| 20 |
*/
|
| 21 |
|
| 22 |
$mailpoet_plugin = array(
|
| 23 |
+
'version' => '3.2.5',
|
| 24 |
'filename' => __FILE__,
|
| 25 |
'path' => dirname(__FILE__),
|
| 26 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
readme.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
=== MailPoet 3 (New) ===
|
| 2 |
Contributors: mailpoet, wysija
|
| 3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
| 4 |
-
Requires at least: 4.
|
| 5 |
-
Tested up to: 4.
|
| 6 |
Requires PHP: 5.3
|
| 7 |
-
Stable tag: 3.2.
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -116,6 +116,15 @@ Stop by our [support site](https://www.mailpoet.com/support).
|
|
| 116 |
|
| 117 |
== Changelog ==
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
= 3.2.3 - 2017-11-29 =
|
| 120 |
* Fixed: bug that prevented configuring third-party sending methods.
|
| 121 |
|
| 1 |
=== MailPoet 3 (New) ===
|
| 2 |
Contributors: mailpoet, wysija
|
| 3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
| 4 |
+
Requires at least: 4.7
|
| 5 |
+
Tested up to: 4.9
|
| 6 |
Requires PHP: 5.3
|
| 7 |
+
Stable tag: 3.2.5
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 116 |
|
| 117 |
== Changelog ==
|
| 118 |
|
| 119 |
+
= 3.2.5 - 2017-12-12 =
|
| 120 |
+
* Premium: you can now segment your subscribers by email events;
|
| 121 |
+
* Fixed: default newsletter templates will not be duplicated when user switches profile language to one that's different from the system's.
|
| 122 |
+
|
| 123 |
+
= 3.2.4 - 2017-12-05 =
|
| 124 |
+
* Improved: [mailpoet_manage_subscription] always renders for logged in WP users. Thx Jon, Sean, Steve & metaglyphics;
|
| 125 |
+
* Fixed: migration from MailPoet 2 on hosts with missing "mbstring" PHP extension. Thanks Alvaro!
|
| 126 |
+
* Fixed: updated existing libraries that previously contained security issues. Thanks Rhiannon (@goija) and Bits of Freedom!
|
| 127 |
+
|
| 128 |
= 3.2.3 - 2017-11-29 =
|
| 129 |
* Fixed: bug that prevented configuring third-party sending methods.
|
| 130 |
|
vendor/autoload.php
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
-
return
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
+
return ComposerAutoloaderInit5186494aa23e2791e4b9d909e44b68a2::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf591f70775e288cfde9d81d40b5e0774
|
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
-
spl_autoload_register(array('
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
-
spl_autoload_unregister(array('
|
| 25 |
|
| 26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 27 |
if ($useStaticLoader) {
|
| 28 |
require_once __DIR__ . '/autoload_static.php';
|
| 29 |
|
| 30 |
-
call_user_func(\Composer\Autoload\
|
| 31 |
} else {
|
| 32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 33 |
foreach ($map as $namespace => $path) {
|
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitf591f70775e288cfde9d81d40b5e0774
|
|
| 48 |
$loader->register(true);
|
| 49 |
|
| 50 |
if ($useStaticLoader) {
|
| 51 |
-
$includeFiles = Composer\Autoload\
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
-
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
-
function
|
| 64 |
{
|
| 65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 66 |
require $file;
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInit5186494aa23e2791e4b9d909e44b68a2
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
spl_autoload_register(array('ComposerAutoloaderInit5186494aa23e2791e4b9d909e44b68a2', 'loadClassLoader'), true, true);
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit5186494aa23e2791e4b9d909e44b68a2', 'loadClassLoader'));
|
| 25 |
|
| 26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
| 27 |
if ($useStaticLoader) {
|
| 28 |
require_once __DIR__ . '/autoload_static.php';
|
| 29 |
|
| 30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::getInitializer($loader));
|
| 31 |
} else {
|
| 32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 33 |
foreach ($map as $namespace => $path) {
|
| 48 |
$loader->register(true);
|
| 49 |
|
| 50 |
if ($useStaticLoader) {
|
| 51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::$files;
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
+
composerRequire5186494aa23e2791e4b9d909e44b68a2($fileIdentifier, $file);
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
+
function composerRequire5186494aa23e2791e4b9d909e44b68a2($fileIdentifier, $file)
|
| 64 |
{
|
| 65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
-
class
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
|
@@ -841,10 +841,10 @@ class ComposerStaticInitf591f70775e288cfde9d81d40b5e0774
|
|
| 841 |
public static function getInitializer(ClassLoader $loader)
|
| 842 |
{
|
| 843 |
return \Closure::bind(function () use ($loader) {
|
| 844 |
-
$loader->prefixLengthsPsr4 =
|
| 845 |
-
$loader->prefixDirsPsr4 =
|
| 846 |
-
$loader->prefixesPsr0 =
|
| 847 |
-
$loader->classMap =
|
| 848 |
|
| 849 |
}, null, ClassLoader::class);
|
| 850 |
}
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
| 841 |
public static function getInitializer(ClassLoader $loader)
|
| 842 |
{
|
| 843 |
return \Closure::bind(function () use ($loader) {
|
| 844 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::$prefixLengthsPsr4;
|
| 845 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::$prefixDirsPsr4;
|
| 846 |
+
$loader->prefixesPsr0 = ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::$prefixesPsr0;
|
| 847 |
+
$loader->classMap = ComposerStaticInit5186494aa23e2791e4b9d909e44b68a2::$classMap;
|
| 848 |
|
| 849 |
}, null, ClassLoader::class);
|
| 850 |
}
|
vendor/composer/installed.json
CHANGED
|
@@ -161,8 +161,8 @@
|
|
| 161 |
},
|
| 162 |
{
|
| 163 |
"name": "mtdowling/cron-expression",
|
| 164 |
-
"version": "v1.2.
|
| 165 |
-
"version_normalized": "1.2.
|
| 166 |
"source": {
|
| 167 |
"type": "git",
|
| 168 |
"url": "https://github.com/mtdowling/cron-expression.git",
|
|
@@ -268,17 +268,17 @@
|
|
| 268 |
},
|
| 269 |
{
|
| 270 |
"name": "symfony/translation",
|
| 271 |
-
"version": "v2.8.
|
| 272 |
-
"version_normalized": "2.8.
|
| 273 |
"source": {
|
| 274 |
"type": "git",
|
| 275 |
"url": "https://github.com/symfony/translation.git",
|
| 276 |
-
"reference": "
|
| 277 |
},
|
| 278 |
"dist": {
|
| 279 |
"type": "zip",
|
| 280 |
-
"url": "https://api.github.com/repos/symfony/translation/zipball/
|
| 281 |
-
"reference": "
|
| 282 |
"shasum": ""
|
| 283 |
},
|
| 284 |
"require": {
|
|
@@ -299,7 +299,7 @@
|
|
| 299 |
"symfony/config": "",
|
| 300 |
"symfony/yaml": ""
|
| 301 |
},
|
| 302 |
-
"time": "2017-
|
| 303 |
"type": "library",
|
| 304 |
"extra": {
|
| 305 |
"branch-alias": {
|
| 161 |
},
|
| 162 |
{
|
| 163 |
"name": "mtdowling/cron-expression",
|
| 164 |
+
"version": "v1.2.1",
|
| 165 |
+
"version_normalized": "1.2.1.0",
|
| 166 |
"source": {
|
| 167 |
"type": "git",
|
| 168 |
"url": "https://github.com/mtdowling/cron-expression.git",
|
| 268 |
},
|
| 269 |
{
|
| 270 |
"name": "symfony/translation",
|
| 271 |
+
"version": "v2.8.32",
|
| 272 |
+
"version_normalized": "2.8.32.0",
|
| 273 |
"source": {
|
| 274 |
"type": "git",
|
| 275 |
"url": "https://github.com/symfony/translation.git",
|
| 276 |
+
"reference": "0c63d56516c4c4c323228ca6348eadb7c91b1daf"
|
| 277 |
},
|
| 278 |
"dist": {
|
| 279 |
"type": "zip",
|
| 280 |
+
"url": "https://api.github.com/repos/symfony/translation/zipball/0c63d56516c4c4c323228ca6348eadb7c91b1daf",
|
| 281 |
+
"reference": "0c63d56516c4c4c323228ca6348eadb7c91b1daf",
|
| 282 |
"shasum": ""
|
| 283 |
},
|
| 284 |
"require": {
|
| 299 |
"symfony/config": "",
|
| 300 |
"symfony/yaml": ""
|
| 301 |
},
|
| 302 |
+
"time": "2017-11-07T14:08:47+00:00",
|
| 303 |
"type": "library",
|
| 304 |
"extra": {
|
| 305 |
"branch-alias": {
|
vendor/symfony/translation/Catalogue/AbstractOperation.php
CHANGED
|
@@ -24,19 +24,8 @@ use Symfony\Component\Translation\MessageCatalogueInterface;
|
|
| 24 |
*/
|
| 25 |
abstract class AbstractOperation implements OperationInterface
|
| 26 |
{
|
| 27 |
-
/**
|
| 28 |
-
* @var MessageCatalogueInterface The source catalogue
|
| 29 |
-
*/
|
| 30 |
protected $source;
|
| 31 |
-
|
| 32 |
-
/**
|
| 33 |
-
* @var MessageCatalogueInterface The target catalogue
|
| 34 |
-
*/
|
| 35 |
protected $target;
|
| 36 |
-
|
| 37 |
-
/**
|
| 38 |
-
* @var MessageCatalogue The result catalogue
|
| 39 |
-
*/
|
| 40 |
protected $result;
|
| 41 |
|
| 42 |
/**
|
|
@@ -69,9 +58,6 @@ abstract class AbstractOperation implements OperationInterface
|
|
| 69 |
protected $messages;
|
| 70 |
|
| 71 |
/**
|
| 72 |
-
* @param MessageCatalogueInterface $source The source catalogue
|
| 73 |
-
* @param MessageCatalogueInterface $target The target catalogue
|
| 74 |
-
*
|
| 75 |
* @throws \LogicException
|
| 76 |
*/
|
| 77 |
public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)
|
| 24 |
*/
|
| 25 |
abstract class AbstractOperation implements OperationInterface
|
| 26 |
{
|
|
|
|
|
|
|
|
|
|
| 27 |
protected $source;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
protected $target;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
protected $result;
|
| 30 |
|
| 31 |
/**
|
| 58 |
protected $messages;
|
| 59 |
|
| 60 |
/**
|
|
|
|
|
|
|
|
|
|
| 61 |
* @throws \LogicException
|
| 62 |
*/
|
| 63 |
public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)
|
vendor/symfony/translation/DataCollector/TranslationDataCollector.php
CHANGED
|
@@ -22,14 +22,8 @@ use Symfony\Component\Translation\DataCollectorTranslator;
|
|
| 22 |
*/
|
| 23 |
class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface
|
| 24 |
{
|
| 25 |
-
/**
|
| 26 |
-
* @var DataCollectorTranslator
|
| 27 |
-
*/
|
| 28 |
private $translator;
|
| 29 |
|
| 30 |
-
/**
|
| 31 |
-
* @param DataCollectorTranslator $translator
|
| 32 |
-
*/
|
| 33 |
public function __construct(DataCollectorTranslator $translator)
|
| 34 |
{
|
| 35 |
$this->translator = $translator;
|
| 22 |
*/
|
| 23 |
class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface
|
| 24 |
{
|
|
|
|
|
|
|
|
|
|
| 25 |
private $translator;
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
public function __construct(DataCollectorTranslator $translator)
|
| 28 |
{
|
| 29 |
$this->translator = $translator;
|
vendor/symfony/translation/DataCollectorTranslator.php
CHANGED
|
@@ -25,9 +25,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
|
|
| 25 |
*/
|
| 26 |
private $translator;
|
| 27 |
|
| 28 |
-
/**
|
| 29 |
-
* @var array
|
| 30 |
-
*/
|
| 31 |
private $messages = array();
|
| 32 |
|
| 33 |
/**
|
| 25 |
*/
|
| 26 |
private $translator;
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
private $messages = array();
|
| 29 |
|
| 30 |
/**
|
vendor/symfony/translation/Dumper/CsvFileDumper.php
CHANGED
|
@@ -54,8 +54,8 @@ class CsvFileDumper extends FileDumper
|
|
| 54 |
/**
|
| 55 |
* Sets the delimiter and escape character for CSV.
|
| 56 |
*
|
| 57 |
-
* @param string $delimiter
|
| 58 |
-
* @param string $enclosure
|
| 59 |
*/
|
| 60 |
public function setCsvControl($delimiter = ';', $enclosure = '"')
|
| 61 |
{
|
| 54 |
/**
|
| 55 |
* Sets the delimiter and escape character for CSV.
|
| 56 |
*
|
| 57 |
+
* @param string $delimiter Delimiter character
|
| 58 |
+
* @param string $enclosure Enclosure character
|
| 59 |
*/
|
| 60 |
public function setCsvControl($delimiter = ';', $enclosure = '"')
|
| 61 |
{
|
vendor/symfony/translation/Extractor/AbstractFileExtractor.php
CHANGED
|
@@ -19,7 +19,7 @@ namespace Symfony\Component\Translation\Extractor;
|
|
| 19 |
abstract class AbstractFileExtractor
|
| 20 |
{
|
| 21 |
/**
|
| 22 |
-
* @param string|array $resource
|
| 23 |
*
|
| 24 |
* @return array
|
| 25 |
*/
|
|
@@ -75,7 +75,7 @@ abstract class AbstractFileExtractor
|
|
| 75 |
abstract protected function canBeExtracted($file);
|
| 76 |
|
| 77 |
/**
|
| 78 |
-
* @param string|array $resource
|
| 79 |
*
|
| 80 |
* @return array files to be extracted
|
| 81 |
*/
|
| 19 |
abstract class AbstractFileExtractor
|
| 20 |
{
|
| 21 |
/**
|
| 22 |
+
* @param string|array $resource Files, a file or a directory
|
| 23 |
*
|
| 24 |
* @return array
|
| 25 |
*/
|
| 75 |
abstract protected function canBeExtracted($file);
|
| 76 |
|
| 77 |
/**
|
| 78 |
+
* @param string|array $resource Files, a file or a directory
|
| 79 |
*
|
| 80 |
* @return array files to be extracted
|
| 81 |
*/
|
vendor/symfony/translation/Extractor/ExtractorInterface.php
CHANGED
|
@@ -24,7 +24,7 @@ interface ExtractorInterface
|
|
| 24 |
/**
|
| 25 |
* Extracts translation messages from files, a file or a directory to the catalogue.
|
| 26 |
*
|
| 27 |
-
* @param string|array $resource
|
| 28 |
* @param MessageCatalogue $catalogue The catalogue
|
| 29 |
*/
|
| 30 |
public function extract($resource, MessageCatalogue $catalogue);
|
| 24 |
/**
|
| 25 |
* Extracts translation messages from files, a file or a directory to the catalogue.
|
| 26 |
*
|
| 27 |
+
* @param string|array $resource Files, a file or a directory
|
| 28 |
* @param MessageCatalogue $catalogue The catalogue
|
| 29 |
*/
|
| 30 |
public function extract($resource, MessageCatalogue $catalogue);
|
vendor/symfony/translation/Loader/CsvFileLoader.php
CHANGED
|
@@ -52,9 +52,9 @@ class CsvFileLoader extends FileLoader
|
|
| 52 |
/**
|
| 53 |
* Sets the delimiter, enclosure, and escape character for CSV.
|
| 54 |
*
|
| 55 |
-
* @param string $delimiter
|
| 56 |
-
* @param string $enclosure
|
| 57 |
-
* @param string $escape
|
| 58 |
*/
|
| 59 |
public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\')
|
| 60 |
{
|
| 52 |
/**
|
| 53 |
* Sets the delimiter, enclosure, and escape character for CSV.
|
| 54 |
*
|
| 55 |
+
* @param string $delimiter Delimiter character
|
| 56 |
+
* @param string $enclosure Enclosure character
|
| 57 |
+
* @param string $escape Escape character
|
| 58 |
*/
|
| 59 |
public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\')
|
| 60 |
{
|
vendor/symfony/translation/Loader/IcuResFileLoader.php
CHANGED
|
@@ -70,9 +70,9 @@ class IcuResFileLoader implements LoaderInterface
|
|
| 70 |
*
|
| 71 |
* This function takes an array by reference and will modify it
|
| 72 |
*
|
| 73 |
-
* @param \ResourceBundle $rb
|
| 74 |
-
* @param array $messages
|
| 75 |
-
* @param string $path
|
| 76 |
*
|
| 77 |
* @return array the flattened ResourceBundle
|
| 78 |
*/
|
| 70 |
*
|
| 71 |
* This function takes an array by reference and will modify it
|
| 72 |
*
|
| 73 |
+
* @param \ResourceBundle $rb The ResourceBundle that will be flattened
|
| 74 |
+
* @param array $messages Used internally for recursive calls
|
| 75 |
+
* @param string $path Current path being parsed, used internally for recursive calls
|
| 76 |
*
|
| 77 |
* @return array the flattened ResourceBundle
|
| 78 |
*/
|
vendor/symfony/translation/Loader/MoFileLoader.php
CHANGED
|
@@ -21,23 +21,17 @@ class MoFileLoader extends FileLoader
|
|
| 21 |
/**
|
| 22 |
* Magic used for validating the format of a MO file as well as
|
| 23 |
* detecting if the machine used to create that file was little endian.
|
| 24 |
-
*
|
| 25 |
-
* @var float
|
| 26 |
*/
|
| 27 |
const MO_LITTLE_ENDIAN_MAGIC = 0x950412de;
|
| 28 |
|
| 29 |
/**
|
| 30 |
* Magic used for validating the format of a MO file as well as
|
| 31 |
* detecting if the machine used to create that file was big endian.
|
| 32 |
-
*
|
| 33 |
-
* @var float
|
| 34 |
*/
|
| 35 |
const MO_BIG_ENDIAN_MAGIC = 0xde120495;
|
| 36 |
|
| 37 |
/**
|
| 38 |
* The size of the header of a MO file in bytes.
|
| 39 |
-
*
|
| 40 |
-
* @var int Number of bytes
|
| 41 |
*/
|
| 42 |
const MO_HEADER_SIZE = 28;
|
| 43 |
|
| 21 |
/**
|
| 22 |
* Magic used for validating the format of a MO file as well as
|
| 23 |
* detecting if the machine used to create that file was little endian.
|
|
|
|
|
|
|
| 24 |
*/
|
| 25 |
const MO_LITTLE_ENDIAN_MAGIC = 0x950412de;
|
| 26 |
|
| 27 |
/**
|
| 28 |
* Magic used for validating the format of a MO file as well as
|
| 29 |
* detecting if the machine used to create that file was big endian.
|
|
|
|
|
|
|
| 30 |
*/
|
| 31 |
const MO_BIG_ENDIAN_MAGIC = 0xde120495;
|
| 32 |
|
| 33 |
/**
|
| 34 |
* The size of the header of a MO file in bytes.
|
|
|
|
|
|
|
| 35 |
*/
|
| 36 |
const MO_HEADER_SIZE = 28;
|
| 37 |
|
vendor/symfony/translation/Loader/PoFileLoader.php
CHANGED
|
@@ -123,9 +123,6 @@ class PoFileLoader extends FileLoader
|
|
| 123 |
*
|
| 124 |
* A .po file could contain by error missing plural indexes. We need to
|
| 125 |
* fix these before saving them.
|
| 126 |
-
*
|
| 127 |
-
* @param array $messages
|
| 128 |
-
* @param array $item
|
| 129 |
*/
|
| 130 |
private function addMessage(array &$messages, array $item)
|
| 131 |
{
|
| 123 |
*
|
| 124 |
* A .po file could contain by error missing plural indexes. We need to
|
| 125 |
* fix these before saving them.
|
|
|
|
|
|
|
|
|
|
| 126 |
*/
|
| 127 |
private function addMessage(array &$messages, array $item)
|
| 128 |
{
|
vendor/symfony/translation/LoggingTranslator.php
CHANGED
|
@@ -23,9 +23,6 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface
|
|
| 23 |
*/
|
| 24 |
private $translator;
|
| 25 |
|
| 26 |
-
/**
|
| 27 |
-
* @var LoggerInterface
|
| 28 |
-
*/
|
| 29 |
private $logger;
|
| 30 |
|
| 31 |
/**
|
| 23 |
*/
|
| 24 |
private $translator;
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
private $logger;
|
| 27 |
|
| 28 |
/**
|
vendor/symfony/translation/MessageCatalogueInterface.php
CHANGED
|
@@ -104,8 +104,6 @@ interface MessageCatalogueInterface
|
|
| 104 |
* Merges translations from the given Catalogue into the current one.
|
| 105 |
*
|
| 106 |
* The two catalogues must have the same locale.
|
| 107 |
-
*
|
| 108 |
-
* @param self $catalogue
|
| 109 |
*/
|
| 110 |
public function addCatalogue(MessageCatalogueInterface $catalogue);
|
| 111 |
|
|
@@ -114,8 +112,6 @@ interface MessageCatalogueInterface
|
|
| 114 |
* only when the translation does not exist.
|
| 115 |
*
|
| 116 |
* This is used to provide default translations when they do not exist for the current locale.
|
| 117 |
-
*
|
| 118 |
-
* @param self $catalogue
|
| 119 |
*/
|
| 120 |
public function addFallbackCatalogue(MessageCatalogueInterface $catalogue);
|
| 121 |
|
|
@@ -135,8 +131,6 @@ interface MessageCatalogueInterface
|
|
| 135 |
|
| 136 |
/**
|
| 137 |
* Adds a resource for this collection.
|
| 138 |
-
*
|
| 139 |
-
* @param ResourceInterface $resource A resource instance
|
| 140 |
*/
|
| 141 |
public function addResource(ResourceInterface $resource);
|
| 142 |
}
|
| 104 |
* Merges translations from the given Catalogue into the current one.
|
| 105 |
*
|
| 106 |
* The two catalogues must have the same locale.
|
|
|
|
|
|
|
| 107 |
*/
|
| 108 |
public function addCatalogue(MessageCatalogueInterface $catalogue);
|
| 109 |
|
| 112 |
* only when the translation does not exist.
|
| 113 |
*
|
| 114 |
* This is used to provide default translations when they do not exist for the current locale.
|
|
|
|
|
|
|
| 115 |
*/
|
| 116 |
public function addFallbackCatalogue(MessageCatalogueInterface $catalogue);
|
| 117 |
|
| 131 |
|
| 132 |
/**
|
| 133 |
* Adds a resource for this collection.
|
|
|
|
|
|
|
| 134 |
*/
|
| 135 |
public function addResource(ResourceInterface $resource);
|
| 136 |
}
|
vendor/symfony/translation/PluralizationRules.php
CHANGED
|
@@ -71,7 +71,6 @@ class PluralizationRules
|
|
| 71 |
case 'vi':
|
| 72 |
case 'zh':
|
| 73 |
return 0;
|
| 74 |
-
break;
|
| 75 |
|
| 76 |
case 'af':
|
| 77 |
case 'bn':
|
| 71 |
case 'vi':
|
| 72 |
case 'zh':
|
| 73 |
return 0;
|
|
|
|
| 74 |
|
| 75 |
case 'af':
|
| 76 |
case 'bn':
|
vendor/symfony/translation/Translator.php
CHANGED
|
@@ -83,11 +83,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
|
|
| 83 |
$this->debug = $debug;
|
| 84 |
}
|
| 85 |
|
| 86 |
-
/**
|
| 87 |
-
* Sets the ConfigCache factory to use.
|
| 88 |
-
*
|
| 89 |
-
* @param ConfigCacheFactoryInterface $configCacheFactory
|
| 90 |
-
*/
|
| 91 |
public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory)
|
| 92 |
{
|
| 93 |
$this->configCacheFactory = $configCacheFactory;
|
| 83 |
$this->debug = $debug;
|
| 84 |
}
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory)
|
| 87 |
{
|
| 88 |
$this->configCacheFactory = $configCacheFactory;
|
vendor/symfony/translation/Writer/TranslationWriter.php
CHANGED
|
@@ -21,11 +21,6 @@ use Symfony\Component\Translation\Dumper\DumperInterface;
|
|
| 21 |
*/
|
| 22 |
class TranslationWriter
|
| 23 |
{
|
| 24 |
-
/**
|
| 25 |
-
* Dumpers used for export.
|
| 26 |
-
*
|
| 27 |
-
* @var array
|
| 28 |
-
*/
|
| 29 |
private $dumpers = array();
|
| 30 |
|
| 31 |
/**
|
| 21 |
*/
|
| 22 |
class TranslationWriter
|
| 23 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
private $dumpers = array();
|
| 25 |
|
| 26 |
/**
|
views/help.html
CHANGED
|
@@ -7,7 +7,8 @@
|
|
| 7 |
<div id="mailpoet_help">
|
| 8 |
|
| 9 |
<script type="text/javascript">
|
| 10 |
-
var
|
|
|
|
| 11 |
</script>
|
| 12 |
|
| 13 |
<div id="help_container"></div>
|
|
@@ -19,6 +20,15 @@
|
|
| 19 |
<%= localize({
|
| 20 |
'tabKnowledgeBaseTitle': __('Knowledge Base'),
|
| 21 |
'tabSystemInfoTitle': __('System Info'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
'knowledgeBaseIntro': __('Click on one of these categories below to find more information:'),
|
| 23 |
'knowledgeBaseButton': __('Visit our Knowledge Base for more articles'),
|
| 24 |
'systemInfoIntro': __('The information below is useful when you need to get in touch with our support. Just copy all the text below and paste it into a message to us.'),
|
| 7 |
<div id="mailpoet_help">
|
| 8 |
|
| 9 |
<script type="text/javascript">
|
| 10 |
+
var systemInfoData = <%= json_encode(systemInfoData) %>;
|
| 11 |
+
var systemStatusData = <%= json_encode(systemStatusData) %>;
|
| 12 |
</script>
|
| 13 |
|
| 14 |
<div id="help_container"></div>
|
| 20 |
<%= localize({
|
| 21 |
'tabKnowledgeBaseTitle': __('Knowledge Base'),
|
| 22 |
'tabSystemInfoTitle': __('System Info'),
|
| 23 |
+
'tabSystemStatusTitle': __('System Status'),
|
| 24 |
+
'systemStatusIntroCron': __('For the plugin to work, it must be able to establish connection with the task scheduler.'),
|
| 25 |
+
'systemStatusIntroCronMSS': __('For the plugin to work, it must be able to establish connection with the task scheduler and the key activation/MailPoet sending service.'),
|
| 26 |
+
'systemStatusCronTitle': __('Task Scheduler'),
|
| 27 |
+
'systemStatusMSSTitle': __('Key Activation and MailPoet Sending Service'),
|
| 28 |
+
'systemStatusConnectionSuccessful': __('Connection successful.'),
|
| 29 |
+
'systemStatusConnectionUnsuccessful': __('Connection unsuccessful.'),
|
| 30 |
+
'systemStatusCronConnectionUnsuccessfulInfo': __('Please consult our [link]knowledge base article[/link] for troubleshooting tips.'),
|
| 31 |
+
'systemStatusMSSConnectionUnsuccessfulInfo': __('Please contact our technical support for assistance.'),
|
| 32 |
'knowledgeBaseIntro': __('Click on one of these categories below to find more information:'),
|
| 33 |
'knowledgeBaseButton': __('Visit our Knowledge Base for more articles'),
|
| 34 |
'systemInfoIntro': __('The information below is useful when you need to get in touch with our support. Just copy all the text below and paste it into a message to us.'),
|
views/newsletter/editor.html
CHANGED
|
@@ -976,7 +976,7 @@
|
|
| 976 |
showCategories: 'no', // 'no'|'aboveText'|'belowText'
|
| 977 |
categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
|
| 978 |
readMoreType: 'button', // 'link'|'button'
|
| 979 |
-
readMoreText: 'Read more'
|
| 980 |
readMoreButton: {
|
| 981 |
text: '<%= __('Read more') | escape('js') %>',
|
| 982 |
url: '[postLink]',
|
|
@@ -1098,7 +1098,7 @@
|
|
| 1098 |
showCategories: 'no', // 'no'|'aboveText'|'belowText'
|
| 1099 |
categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
|
| 1100 |
readMoreType: 'link', // 'link'|'button'
|
| 1101 |
-
readMoreText: 'Read more'
|
| 1102 |
readMoreButton: {
|
| 1103 |
text: '<%= __('Read more') | escape('js') %>',
|
| 1104 |
url: '[postLink]',
|
| 976 |
showCategories: 'no', // 'no'|'aboveText'|'belowText'
|
| 977 |
categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
|
| 978 |
readMoreType: 'button', // 'link'|'button'
|
| 979 |
+
readMoreText: '<%= __('Read more') | escape('js') %>',
|
| 980 |
readMoreButton: {
|
| 981 |
text: '<%= __('Read more') | escape('js') %>',
|
| 982 |
url: '[postLink]',
|
| 1098 |
showCategories: 'no', // 'no'|'aboveText'|'belowText'
|
| 1099 |
categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
|
| 1100 |
readMoreType: 'link', // 'link'|'button'
|
| 1101 |
+
readMoreText: '<%= __('Read more') | escape('js') %>',
|
| 1102 |
readMoreButton: {
|
| 1103 |
text: '<%= __('Read more') | escape('js') %>',
|
| 1104 |
url: '[postLink]',
|
views/newsletters.html
CHANGED
|
@@ -257,6 +257,7 @@
|
|
| 257 |
|
| 258 |
'mailerSendErrorNotice': __('Sending is paused because %$1s prevents MailPoet from delivering emails with the following error: %$2s'),
|
| 259 |
'mailerConnectionErrorNotice': __('Sending is paused because the following connection issue prevents MailPoet from delivering emails: %$1s'),
|
|
|
|
| 260 |
'mailerCheckSettingsNotice': __('Check your [link]sending method settings[/link].'),
|
| 261 |
'mailerResumeSendingButton': __('Resume sending'),
|
| 262 |
'mailerSendingResumedNotice': __('Sending has been resumed.'),
|
| 257 |
|
| 258 |
'mailerSendErrorNotice': __('Sending is paused because %$1s prevents MailPoet from delivering emails with the following error: %$2s'),
|
| 259 |
'mailerConnectionErrorNotice': __('Sending is paused because the following connection issue prevents MailPoet from delivering emails: %$1s'),
|
| 260 |
+
'mailerErrorCode': __('Error code: %$1s'),
|
| 261 |
'mailerCheckSettingsNotice': __('Check your [link]sending method settings[/link].'),
|
| 262 |
'mailerResumeSendingButton': __('Resume sending'),
|
| 263 |
'mailerSendingResumedNotice': __('Sending has been resumed.'),
|
views/update.html
CHANGED
|
@@ -94,7 +94,7 @@
|
|
| 94 |
<div class="feature-section one-col mailpoet_centered">
|
| 95 |
<h2><%= __('Care to Give Your Opinion?') %></h2>
|
| 96 |
|
| 97 |
-
<div class="pd-embed" id="
|
| 98 |
<script type="text/javascript">
|
| 99 |
var _polldaddy = [] || _polldaddy;
|
| 100 |
|
|
@@ -102,8 +102,8 @@
|
|
| 102 |
type: "iframe",
|
| 103 |
auto: "1",
|
| 104 |
domain: "mailpoet.polldaddy.com/s/",
|
| 105 |
-
id: "what-s-one-feature-that-s-missing-in-mailpoet
|
| 106 |
-
placeholder: "
|
| 107 |
} );
|
| 108 |
|
| 109 |
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
|
| 94 |
<div class="feature-section one-col mailpoet_centered">
|
| 95 |
<h2><%= __('Care to Give Your Opinion?') %></h2>
|
| 96 |
|
| 97 |
+
<div class="pd-embed" id="pd_1505214143"></div>
|
| 98 |
<script type="text/javascript">
|
| 99 |
var _polldaddy = [] || _polldaddy;
|
| 100 |
|
| 102 |
type: "iframe",
|
| 103 |
auto: "1",
|
| 104 |
domain: "mailpoet.polldaddy.com/s/",
|
| 105 |
+
id: "what-s-one-feature-that-s-missing-in-mailpoet",
|
| 106 |
+
placeholder: "pd_1505214143"
|
| 107 |
} );
|
| 108 |
|
| 109 |
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
|
