vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3
vendor: 20,128 bytes, lines 4-595
4/***/ "./node_modules/a-template/lib/index.js": 5/*!**********************************************!*\ 6 !*** ./node_modules/a-template/lib/index.js ***! 7 \**********************************************/ 8/***/ ((module, exports, __webpack_require__) => { 9 10"use strict"; 11 12 13Object.defineProperty(exports, "__esModule", ({ 14 value: true 15})); 16 17var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 18 19__webpack_require__(/*! ie-array-find-polyfill */ "./node_modules/ie-array-find-polyfill/index.js"); 20 21var _morphdom = __webpack_require__(/*! morphdom */ "./node_modules/morphdom/dist/morphdom-esm.js"); 22 23var _morphdom2 = _interopRequireDefault(_morphdom); 24 25var _util = __webpack_require__(/*! ./util */ "./node_modules/a-template/lib/util.js"); 26 27function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 28 29function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } 30 31function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 32 33var eventType = 'input paste copy click change keydown keyup keypress contextmenu mouseup mousedown mousemove touchstart touchend touchmove compositionstart compositionend focus'; 34var bindType = 'input change click'; 35var dataAction = eventType.replace(/([a-z]+)/g, '[data-action-$1],') + '[data-action]'; 36 37var aTemplate = function () { 38 function aTemplate(opt) { 39 var _this = this; 40 41 _classCallCheck(this, aTemplate); 42 43 this.atemplate = []; 44 if (opt) { 45 Object.keys(opt).forEach(function (key) { 46 _this[key] = opt[key]; 47 }); 48 } 49 if (!this.data) { 50 this.data = {}; 51 } 52 if (!this.templates) { 53 this.templates = []; 54 } 55 var templates = this.templates; 56 var length = templates.length; 57 for (var i = 0, n = length; i < n; i += 1) { 58 var template = this.templates[i]; 59 var html = (0, _util.selector)('#' + template).innerHTML; 60 this.atemplate.push({ id: template, html: html, binded: false }); 61 } 62 } 63 64 _createClass(aTemplate, [{ 65 key: 'addDataBind', 66 value: function addDataBind(ele) { 67 var _this2 = this; 68 69 (0, _util.on)(ele, '[data-bind]', bindType, function (e) { 70 var target = e.delegateTarget; 71 var data = target.getAttribute('data-bind'); 72 var attr = target.getAttribute('href'); 73 var value = target.value; 74 if (attr) { 75 value = value.replace('#', ''); 76 } 77 if (target.getAttribute('type') === 'checkbox') { 78 (function () { 79 var arr = []; 80 var items = document.querySelectorAll('[data-bind="' + data + '"]'); 81 [].forEach.call(items, function (item) { 82 if (item.checked) { 83 arr.push(item.value); 84 } 85 }); 86 })(); 87 } else if (target.getAttribute('type') !== 'radio') { 88 _this2.updateDataByString(data, value); 89 } 90 }); 91 } 92 }, { 93 key: 'addActionBind', 94 value: function addActionBind(ele) { 95 var _this3 = this; 96 97 (0, _util.on)(ele, dataAction, eventType, function (e) { 98 var target = e.delegateTarget; 99 var events = eventType.split(' '); 100 var action = 'action'; 101 events.forEach(function (event) { 102 if (target.getAttribute('data-action-' + event)) { 103 if (e.type === event) { 104 action += '-' + event; 105 } 106 } 107 }); 108 var string = target.getAttribute('data-' + action); 109 if (!string) { 110 return; 111 } 112 var method = string.replace(/\(.*?\);?/, ''); 113 var parameter = string.replace(/(.*?)\((.*?)\);?/, '$2'); 114 var pts = parameter.split(','); // å¼ãæ° 115 _this3.e = e; 116 if (_this3.method && _this3.method[method]) { 117 var _method; 118 119 (_method = _this3.method)[method].apply(_method, _toConsumableArray(pts)); 120 } else if (_this3[method]) { 121 _this3[method].apply(_this3, _toConsumableArray(pts)); 122 } 123 }); 124 } 125 }, { 126 key: 'addTemplate', 127 value: function addTemplate(id, html) { 128 this.atemplate.push({ id: id, html: html, binded: false }); 129 this.templates.push(id); 130 } 131 132 // loadHtml() { 133 // const templates = this.templates; 134 // const promises = []; 135 // templates.forEach((template) => { 136 // const d = new $.Deferred(); 137 // promises.push(d); 138 // const src = selector(`#${template}`).getAttribute('src'); 139 // $.ajax({ 140 // url: src, 141 // type: 'GET', 142 // dataType: 'text' 143 // }).success((data) => { 144 // selector(`#${template}`).innerHTML = data; 145 // d.resolve(); 146 // }); 147 // }); 148 // return $.when(...promises); 149 // } 150 151 }, { 152 key: 'getData', 153 value: function getData() { 154 return JSON.parse(JSON.stringify(this.data)); 155 } 156 }, { 157 key: 'saveData', 158 value: function saveData(key) { 159 var data = JSON.stringify(this.data); 160 localStorage.setItem(key, data); 161 } 162 }, { 163 key: 'setData', 164 value: function setData(opt) { 165 var _this4 = this; 166 167 Object.keys(opt).forEach(function (key) { 168 if (typeof opt[key] !== 'function') { 169 _this4.data[key] = opt[key]; 170 } 171 }); 172 } 173 }, { 174 key: 'loadData', 175 value: function loadData(key) { 176 var data = JSON.parse(localStorage.getItem(key)); 177 if (data) { 178 this.setData(data); 179 } 180 } 181 }, { 182 key: 'getRand', 183 value: function getRand(a, b) { 184 return ~~(Math.random() * (b - a + 1)) + a; 185 } 186 }, { 187 key: 'getRandText', 188 value: function getRandText(limit) { 189 var ret = ''; 190 var strings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 191 var length = strings.length; 192 for (var i = 0; i < limit; i += 1) { 193 ret += strings.charAt(Math.floor(this.getRand(0, length))); 194 } 195 return ret; 196 } 197 }, { 198 key: 'getDataFromObj', 199 value: function getDataFromObj(s, o) { 200 s = s.replace(/\[([\w\-\.ã-ãã¡-ã¶äº-ç]+)\]/g, '.$1'); // convert indexes to properties 201 s = s.replace(/^\./, ''); // strip leading dot 202 var a = s.split('.'); 203 while (a.length) { 204 var n = a.shift(); 205 if (n in o) { 206 o = o[n]; 207 } else { 208 return null; 209 } 210 } 211 return o; 212 } 213 }, { 214 key: 'getDataByString', 215 value: function getDataByString(s) { 216 var o = this.data; 217 return this.getDataFromObj(s, o); 218 } 219 }, { 220 key: 'updateDataByString', 221 value: function updateDataByString(path, newValue) { 222 var object = this.data; 223 var stack = path.split('.'); 224 while (stack.length > 1) { 225 object = object[stack.shift()]; 226 } 227 object[stack.shift()] = newValue; 228 } 229 }, { 230 key: 'removeDataByString', 231 value: function removeDataByString(path) { 232 var object = this.data; 233 var stack = path.split('.'); 234 while (stack.length > 1) { 235 object = object[stack.shift()]; 236 } 237 var shift = stack.shift(); 238 if (shift.match(/^\d+$/)) { 239 object.splice(Number(shift), 1); 240 } else { 241 delete object[shift]; 242 } 243 } 244 }, { 245 key: 'resolveBlock', 246 value: function resolveBlock(html, item, i) { 247 var that = this; 248 var touchs = html.match(/<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+):touch#([\w\-\.ã-ãã¡-ã¶äº-ç]+) -->/g); 249 var touchnots = html.match(/<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+):touchnot#([\w\-\.ã-ãã¡-ã¶äº-ç]+) -->/g); 250 var exists = html.match(/<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+):exist -->/g); 251 var empties = html.match(/<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+):empty -->/g); 252 /* ã¿ãããããã¯è§£æ±º*/ 253 if (touchs) { 254 for (var k = 0, n = touchs.length; k < n; k += 1) { 255 var start = touchs[k]; 256 start = start.replace(/([\w\-\.ã-ãã¡-ã¶äº-ç]+):touch#([\w\-\.ã-ãã¡-ã¶äº-ç]+)/, '($1):touch#($2)'); 257 var end = start.replace(/BEGIN/, 'END'); 258 var reg = new RegExp(start + '(([\\n\\r\\t]|.)*?)' + end, 'g'); 259 html = html.replace(reg, function (m, key2, val, next) { 260 var itemkey = typeof item[key2] === 'function' ? item[key2].apply(that) : that.getDataFromObj(key2, item); 261 if ('' + itemkey === val) { 262 return next; 263 } 264 return ''; 265 }); 266 } 267 } 268 /* ã¿ããããããããã¯è§£æ±º*/ 269 if (touchnots) { 270 for (var _k = 0, _n = touchnots.length; _k < _n; _k += 1) { 271 var _start = touchnots[_k]; 272 _start = _start.replace(/([\w\-\.ã-ãã¡-ã¶äº-ç]+):touchnot#([\w\-\.ã-ãã¡-ã¶äº-ç]+)/, '($1):touchnot#($2)'); 273 var _end = _start.replace(/BEGIN/, 'END'); 274 var _reg = new RegExp(_start + '(([\\n\\r\\t]|.)*?)' + _end, 'g'); 275 html = html.replace(_reg, function (m, key2, val, next) { 276 var itemkey = typeof item[key2] === 'function' ? item[key2].apply(that) : that.getDataFromObj(key2, item); 277 if ('' + itemkey !== val) { 278 return next; 279 } 280 return ''; 281 }); 282 } 283 } 284 /* existãããã¯ã解決*/ 285 if (exists) { 286 for (var _k2 = 0, _n2 = exists.length; _k2 < _n2; _k2 += 1) { 287 var _start2 = exists[_k2]; 288 _start2 = _start2.replace(/([\w\-\.ã-ãã¡-ã¶äº-ç]+):exist/, '($1):exist'); 289 var _end2 = _start2.replace(/BEGIN/, 'END'); 290 var _reg2 = new RegExp(_start2 + '(([\\n\\r\\t]|.)*?)' + _end2, 'g'); 291 html = html.replace(_reg2, function (m, key2, next) { 292 var itemkey = typeof item[key2] === 'function' ? item[key2].apply(that) : that.getDataFromObj(key2, item); 293 if (itemkey || itemkey === 0) { 294 return next; 295 } 296 return ''; 297 }); 298 } 299 } 300 /* emptyãããã¯ã解決*/ 301 if (empties) { 302 for (var _k3 = 0, _n3 = empties.length; _k3 < _n3; _k3 += 1) { 303 var _start3 = empties[_k3]; 304 _start3 = _start3.replace(/([\w\-\.ã-ãã¡-ã¶äº-ç]+):empty/, '($1):empty'); 305 var _end3 = _start3.replace(/BEGIN/, 'END'); 306 var empty = new RegExp(_start3 + '(([\\n\\r\\t]|.)*?)' + _end3, 'g'); 307 html = html.replace(empty, function (m, key2, next) { 308 var itemkey = typeof item[key2] === 'function' ? item[key2].apply(that) : that.getDataFromObj(key2, item); 309 if (!itemkey && itemkey !== 0) { 310 return next; 311 } 312 return ''; 313 }); 314 } 315 } 316 /* 夿°è§£æ±º*/ 317 html = html.replace(/{([\w\-\.ã-ãã¡-ã¶äº-ç]+)}(\[([\w\-\.ã-ãã¡-ã¶äº-ç]+)\])*/g, function (n, key3, key4, converter) { 318 var data = void 0; 319 if ('' + key3 === 'i') { 320 data = i; 321 } else if (item[key3] || item[key3] === 0) { 322 if (typeof item[key3] === 'function') { 323 data = item[key3].apply(that); 324 } else { 325 data = item[key3]; 326 } 327 } else { 328 if (converter && that.convert && that.convert[converter]) { 329 return that.convert[converter].call(that, ''); 330 } 331 return ''; 332 } 333 if (converter && that.convert && that.convert[converter]) { 334 return that.convert[converter].call(that, data); 335 } 336 return data; 337 }); 338 return html; 339 } 340 /* 絶対ãã¹å½¢å¼ã®å¤æ°ã解決*/ 341 342 }, { 343 key: 'resolveAbsBlock', 344 value: function resolveAbsBlock(html) { 345 var that = this; 346 html = html.replace(/{(.*?)}/g, function (n, key3) { 347 var data = that.getDataByString(key3); 348 if (typeof data !== 'undefined') { 349 if (typeof data === 'function') { 350 return data.apply(that); 351 } 352 return data; 353 } 354 return n; 355 }); 356 return html; 357 } 358 }, { 359 key: 'resolveInclude', 360 value: function resolveInclude(html) { 361 var include = /<!-- #include id="(.*?)" -->/g; 362 html = html.replace(include, function (m, key) { 363 return (0, _util.selector)('#' + key).innerHTML; 364 }); 365 return html; 366 } 367 }, { 368 key: 'resolveWith', 369 value: function resolveWith(html) { 370 var width = /<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+):with -->(([\n\r\t]|.)*?)<!-- END ([\w\-\.ã-ãã¡-ã¶äº-ç]+):with -->/g; 371 html = html.replace(width, function (m, key) { 372 m = m.replace(/data\-bind=['"](.*?)['"]/g, 'data-bind=\'' + key + '.$1\''); 373 return m; 374 }); 375 return html; 376 } 377 }, { 378 key: 'resolveLoop', 379 value: function resolveLoop(html) { 380 var loop = /<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+?):loop -->(([\n\r\t]|.)*?)<!-- END ([\w\-\.ã-ãã¡-ã¶äº-ç]+?):loop -->/g; 381 var that = this; 382 /* ã«ã¼ãæè§£æ±º*/ 383 html = html.replace(loop, function (m, key, val) { 384 var keyItem = that.getDataByString(key); 385 var keys = []; 386 if (typeof keyItem === 'function') { 387 keys = keyItem.apply(that); 388 } else { 389 keys = keyItem; 390 } 391 var ret = ''; 392 if (keys instanceof Array) { 393 for (var i = 0, n = keys.length; i < n; i += 1) { 394 ret += that.resolveBlock(val, keys[i], i); 395 } 396 } 397 /* ã¨ã¹ã±ã¼ãåé¤*/ 398 ret = ret.replace(/\\([^\\])/g, '$1'); 399 return ret; 400 }); 401 return html; 402 } 403 }, { 404 key: 'removeData', 405 value: function removeData(arr) { 406 var data = this.data; 407 Object.keys(data).forEach(function (i) { 408 for (var t = 0, n = arr.length; t < n; t += 1) { 409 if (i === arr[t]) { 410 delete data[i]; 411 } 412 } 413 }); 414 return this; 415 } 416 }, { 417 key: 'hasLoop', 418 value: function hasLoop(txt) { 419 var loop = /<!-- BEGIN ([\w\-\.ã-ãã¡-ã¶äº-ç]+?):loop -->(([\n\r\t]|.)*?)<!-- END ([\w\-\.ã-ãã¡-ã¶äº-ç]+?):loop -->/g; 420 if (txt.match(loop)) { 421 return true; 422 } 423 return false; 424 } 425 }, { 426 key: 'getHtml', 427 value: function getHtml(query, row) { 428 var template = this.atemplate.find(function (item) { 429 return item.id === query; 430 }); 431 var html = ''; 432 if (template && template.html) { 433 html = template.html; 434 } 435 if (row) { 436 html = query; 437 } 438 if (!html) { 439 return ''; 440 } 441 var data = this.data; 442 /* ã¤ã³ã¯ã«ã¼ã解決*/ 443 html = this.resolveInclude(html); 444 /* with解決*/ 445 html = this.resolveWith(html); 446 /* ã«ã¼ã解決*/ 447 while (this.hasLoop(html)) { 448 html = this.resolveLoop(html); 449 } 450 /* 夿°è§£æ±º*/ 451 html = this.resolveBlock(html, data); 452 /* ã¨ã¹ã±ã¼ãåé¤*/ 453 html = html.replace(/\\([^\\])/g, '$1'); 454 /* 絶対ãã¹ã§æå®ããã夿°ã解決*/ 455 html = this.resolveAbsBlock(html); 456 /* 空è¡åé¤*/ 457 return html.replace(/^([\t ])*\n/gm, ''); 458 } 459 }, { 460 key: 'update', 461 value: function update() { 462 var _this5 = this; 463 464 var renderWay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'html'; 465 var part = arguments[1]; 466 467 var templates = this.templates; 468 if (this.beforeUpdated) { 469 this.beforeUpdated(); 470 } 471 472 var _loop = function _loop(i, n) { 473 var tem = templates[i]; 474 var query = '#' + tem; 475 var html = _this5.getHtml(tem); 476 var target = (0, _util.selector)('[data-id=\'' + tem + '\']'); 477 if (!target) { 478 (0, _util.selector)(query).insertAdjacentHTML('afterend', '<div data-id="' + tem + '"></div>'); 479 if (renderWay === 'text') { 480 (0, _util.selector)('[data-id=\'' + tem + '\']').innerText = html; 481 } else { 482 (0, _util.selector)('[data-id=\'' + tem + '\']').innerHTML = html; 483 } 484 } else if (renderWay === 'text') { 485 target.innerText = html; 486 } else if (part) { 487 var doc = document.createElement('div'); 488 doc.innerHTML = html; 489 var partHtml = doc.querySelector(part).outerHTML; 490 (0, _morphdom2.default)(target.querySelector(part), partHtml); 491 } else { 492 (0, _morphdom2.default)(target, '<div data-id=\'' + tem + '\'>' + html + '</div>'); 493 } 494 var template = _this5.atemplate.find(function (item) { 495 return item.id === tem; 496 }); 497 if (!template.binded) { 498 template.binded = true; 499 _this5.addDataBind((0, _util.selector)('[data-id=\'' + tem + '\']')); 500 _this5.addActionBind((0, _util.selector)('[data-id=\'' + tem + '\']')); 501 } 502 }; 503 504 for (var i = 0, n = templates.length; i < n; i += 1) { 505 _loop(i, n); 506 } 507 this.updateBindingData(part); 508 if (this.onUpdated) { 509 this.onUpdated(part); 510 } 511 return this; 512 } 513 }, { 514 key: 'updateBindingData', 515 value: function updateBindingData(part) { 516 var _this6 = this; 517 518 var templates = this.templates; 519 for (var i = 0, n = templates.length; i < n; i += 1) { 520 var temp = templates[i]; 521 var _template = (0, _util.selector)('[data-id=\'' + temp + '\']'); 522 if (part) { 523 _template = _template.querySelector(part); 524 } 525 var binds = _template.querySelectorAll('[data-bind]'); 526 [].forEach.call(binds, function (item) { 527 var data = _this6.getDataByString(item.getAttribute('data-bind')); 528 if (item.getAttribute('type') === 'checkbox' || item.getAttribute('type') === 'radio') { 529 if (data === item.value) { 530 item.checked = true; 531 } 532 } else { 533 // if(item !== document.activeElement) { 534 item.value = data; 535 // } 536 } 537 }); 538 var onewaybinds = _template.querySelectorAll('[data-bind-oneway]'); 539 [].forEach.call(onewaybinds, function (item) { 540 var data = _this6.getDataByString(item.getAttribute('data-bind-oneway')); 541 if (item.getAttribute('type') === 'checkbox' || item.getAttribute('type') === 'radio') { 542 if (data === item.value) { 543 item.checked = true; 544 } 545 } else { 546 // if(item !== document.activeElement) { 547 item.value = data; 548 // } 549 } 550 }); 551 } 552 return this; 553 } 554 }, { 555 key: 'applyMethod', 556 value: function applyMethod(method) { 557 var _method2; 558 559 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 560 args[_key - 1] = arguments[_key]; 561 } 562 563 return (_method2 = this.method)[method].apply(_method2, args); 564 } 565 }, { 566 key: 'getComputedProp', 567 value: function getComputedProp(prop) { 568 return this.data[prop].apply(this); 569 } 570 }, { 571 key: 'remove', 572 value: function remove(path) { 573 var object = this.data; 574 var stack = path.split('.'); 575 while (stack.length > 1) { 576 object = object[stack.shift()]; 577 } 578 var shift = stack.shift(); 579 if (shift.match(/^\d+$/)) { 580 object.splice(Number(shift), 1); 581 } else { 582 delete object[shift]; 583 } 584 return this; 585 } 586 }]); 587 588 return aTemplate; 589}(); 590 591exports["default"] = aTemplate; 592module.exports = exports['default']; 593 594/***/ }), 595
vendor: 1,450 bytes, lines 596-647
596/***/ "./node_modules/a-template/lib/util.js": 597/*!*********************************************!*\ 598 !*** ./node_modules/a-template/lib/util.js ***! 599 \*********************************************/ 600/***/ ((__unused_webpack_module, exports) => { 601 602"use strict"; 603 604 605Object.defineProperty(exports, "__esModule", ({ 606 value: true 607})); 608var matches = exports.matches = function matches(element, query) { 609 var matches = (element.document || element.ownerDocument).querySelectorAll(query); 610 var i = matches.length; 611 while (--i >= 0 && matches.item(i) !== element) {} 612 return i > -1; 613}; 614 615var selector = exports.selector = function selector(_selector) { 616 return document.querySelector(_selector); 617}; 618 619var findAncestor = exports.findAncestor = function findAncestor(element, selector) { 620 if (typeof element.closest === 'function') { 621 return element.closest(selector) || null; 622 } 623 while (element && element !== document) { 624 if (matches(element, selector)) { 625 return element; 626 } 627 element = element.parentElement; 628 } 629 return null; 630}; 631 632var on = exports.on = function on(element, query, eventNames, fn) { 633 var events = eventNames.split(' '); 634 events.forEach(function (event) { 635 element.addEventListener(event, function (e) { 636 var target = e.target; 637 var delegateTarget = findAncestor(e.target, query); 638 if (delegateTarget) { 639 e.delegateTarget = delegateTarget; 640 fn(e); 641 } 642 }); 643 }); 644}; 645 646/***/ }), 647
vendor: 342 bytes, lines 648-657
648/***/ "./node_modules/axios/index.js": 649/*!*************************************!*\ 650 !*** ./node_modules/axios/index.js ***! 651 \*************************************/ 652/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 653 654module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js"); 655 656/***/ }), 657
vendor: 6,945 bytes, lines 658-848
658/***/ "./node_modules/axios/lib/adapters/xhr.js": 659/*!************************************************!*\ 660 !*** ./node_modules/axios/lib/adapters/xhr.js ***! 661 \************************************************/ 662/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 663 664"use strict"; 665 666 667var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 668var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js"); 669var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js"); 670var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js"); 671var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); 672var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js"); 673var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(/*! ./../helpers/btoa */ "./node_modules/axios/lib/helpers/btoa.js"); 674 675module.exports = function xhrAdapter(config) { 676 return new Promise(function dispatchXhrRequest(resolve, reject) { 677 var requestData = config.data; 678 var requestHeaders = config.headers; 679 680 if (utils.isFormData(requestData)) { 681 delete requestHeaders['Content-Type']; // Let the browser set it 682 } 683 684 var request = new XMLHttpRequest(); 685 var loadEvent = 'onreadystatechange'; 686 var xDomain = false; 687 688 // For IE 8/9 CORS support 689 // Only supports POST and GET calls and doesn't returns the response headers. 690 // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. 691 if ( true && 692 typeof window !== 'undefined' && 693 window.XDomainRequest && !('withCredentials' in request) && 694 !isURLSameOrigin(config.url)) { 695 request = new window.XDomainRequest(); 696 loadEvent = 'onload'; 697 xDomain = true; 698 request.onprogress = function handleProgress() {}; 699 request.ontimeout = function handleTimeout() {}; 700 } 701 702 // HTTP basic authentication 703 if (config.auth) { 704 var username = config.auth.username || ''; 705 var password = config.auth.password || ''; 706 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); 707 } 708 709 request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); 710 711 // Set the request timeout in MS 712 request.timeout = config.timeout; 713 714 // Listen for ready state 715 request[loadEvent] = function handleLoad() { 716 if (!request || (request.readyState !== 4 && !xDomain)) { 717 return; 718 } 719 720 // The request errored out and we didn't get a response, this will be 721 // handled by onerror instead 722 // With one exception: request that using file: protocol, most browsers 723 // will return status as 0 even though it's a successful request 724 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { 725 return; 726 } 727 728 // Prepare the response 729 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; 730 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; 731 var response = { 732 data: responseData, 733 // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) 734 status: request.status === 1223 ? 204 : request.status, 735 statusText: request.status === 1223 ? 'No Content' : request.statusText, 736 headers: responseHeaders, 737 config: config, 738 request: request 739 }; 740 741 settle(resolve, reject, response); 742 743 // Clean up request 744 request = null; 745 }; 746 747 // Handle low level network errors 748 request.onerror = function handleError() { 749 // Real errors are hidden from us by the browser 750 // onerror should only fire if it's a network error 751 reject(createError('Network Error', config, null, request)); 752 753 // Clean up request 754 request = null; 755 }; 756 757 // Handle timeout 758 request.ontimeout = function handleTimeout() { 759 reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', 760 request)); 761 762 // Clean up request 763 request = null; 764 }; 765 766 // Add xsrf header 767 // This is only done if running in a standard browser environment. 768 // Specifically not if we're in a web worker, or react-native. 769 if (utils.isStandardBrowserEnv()) { 770 var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js"); 771 772 // Add xsrf header 773 var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? 774 cookies.read(config.xsrfCookieName) : 775 undefined; 776 777 if (xsrfValue) { 778 requestHeaders[config.xsrfHeaderName] = xsrfValue; 779 } 780 } 781 782 // Add headers to the request 783 if ('setRequestHeader' in request) { 784 utils.forEach(requestHeaders, function setRequestHeader(val, key) { 785 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { 786 // Remove Content-Type if data is undefined 787 delete requestHeaders[key]; 788 } else { 789 // Otherwise add header to the request 790 request.setRequestHeader(key, val); 791 } 792 }); 793 } 794 795 // Add withCredentials to request if needed 796 if (config.withCredentials) { 797 request.withCredentials = true; 798 } 799 800 // Add responseType to request if needed 801 if (config.responseType) { 802 try { 803 request.responseType = config.responseType; 804 } catch (e) { 805 // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. 806 // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. 807 if (config.responseType !== 'json') { 808 throw e; 809 } 810 } 811 } 812 813 // Handle progress if needed 814 if (typeof config.onDownloadProgress === 'function') { 815 request.addEventListener('progress', config.onDownloadProgress); 816 } 817 818 // Not all browsers support upload events 819 if (typeof config.onUploadProgress === 'function' && request.upload) { 820 request.upload.addEventListener('progress', config.onUploadProgress); 821 } 822 823 if (config.cancelToken) { 824 // Handle cancellation 825 config.cancelToken.promise.then(function onCanceled(cancel) { 826 if (!request) { 827 return; 828 } 829 830 request.abort(); 831 reject(cancel); 832 // Clean up request 833 request = null; 834 }); 835 } 836 837 if (requestData === undefined) { 838 requestData = null; 839 } 840 841 // Send the request 842 request.send(requestData); 843 }); 844}; 845 846 847/***/ }), 848
vendor: 2,116 bytes, lines 849-911
849/***/ "./node_modules/axios/lib/axios.js": 850/*!*****************************************!*\ 851 !*** ./node_modules/axios/lib/axios.js ***! 852 \*****************************************/ 853/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 854 855"use strict"; 856 857 858var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); 859var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); 860var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js"); 861var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults.js"); 862 863/** 864 * Create an instance of Axios 865 * 866 * @param {Object} defaultConfig The default config for the instance 867 * @return {Axios} A new instance of Axios 868 */ 869function createInstance(defaultConfig) { 870 var context = new Axios(defaultConfig); 871 var instance = bind(Axios.prototype.request, context); 872 873 // Copy axios.prototype to instance 874 utils.extend(instance, Axios.prototype, context); 875 876 // Copy context to instance 877 utils.extend(instance, context); 878 879 return instance; 880} 881 882// Create the default instance to be exported 883var axios = createInstance(defaults); 884 885// Expose Axios class to allow class inheritance 886axios.Axios = Axios; 887 888// Factory for creating new instances 889axios.create = function create(instanceConfig) { 890 return createInstance(utils.merge(defaults, instanceConfig)); 891}; 892 893// Expose Cancel & CancelToken 894axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); 895axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js"); 896axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); 897 898// Expose all/spread 899axios.all = function all(promises) { 900 return Promise.all(promises); 901}; 902axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js"); 903 904module.exports = axios; 905 906// Allow use of default import syntax in TypeScript 907module.exports["default"] = axios; 908 909 910/***/ }), 911
vendor: 636 bytes, lines 912-941
912/***/ "./node_modules/axios/lib/cancel/Cancel.js": 913/*!*************************************************!*\ 914 !*** ./node_modules/axios/lib/cancel/Cancel.js ***! 915 \*************************************************/ 916/***/ ((module) => { 917 918"use strict"; 919 920 921/** 922 * A `Cancel` is an object that is thrown when an operation is canceled. 923 * 924 * @class 925 * @param {string=} message The message. 926 */ 927function Cancel(message) { 928 this.message = message; 929} 930 931Cancel.prototype.toString = function toString() { 932 return 'Cancel' + (this.message ? ': ' + this.message : ''); 933}; 934 935Cancel.prototype.__CANCEL__ = true; 936 937module.exports = Cancel; 938 939 940/***/ }), 941
vendor: 1,619 bytes, lines 942-1009
942/***/ "./node_modules/axios/lib/cancel/CancelToken.js": 943/*!******************************************************!*\ 944 !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! 945 \******************************************************/ 946/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 947 948"use strict"; 949 950 951var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); 952 953/** 954 * A `CancelToken` is an object that can be used to request cancellation of an operation. 955 * 956 * @class 957 * @param {Function} executor The executor function. 958 */ 959function CancelToken(executor) { 960 if (typeof executor !== 'function') { 961 throw new TypeError('executor must be a function.'); 962 } 963 964 var resolvePromise; 965 this.promise = new Promise(function promiseExecutor(resolve) { 966 resolvePromise = resolve; 967 }); 968 969 var token = this; 970 executor(function cancel(message) { 971 if (token.reason) { 972 // Cancellation has already been requested 973 return; 974 } 975 976 token.reason = new Cancel(message); 977 resolvePromise(token.reason); 978 }); 979} 980 981/** 982 * Throws a `Cancel` if cancellation has been requested. 983 */ 984CancelToken.prototype.throwIfRequested = function throwIfRequested() { 985 if (this.reason) { 986 throw this.reason; 987 } 988}; 989 990/** 991 * Returns an object that contains a new `CancelToken` and a function that, when called, 992 * cancels the `CancelToken`. 993 */ 994CancelToken.source = function source() { 995 var cancel; 996 var token = new CancelToken(function executor(c) { 997 cancel = c; 998 }); 999 return { 1000 token: token, 1001 cancel: cancel 1002 }; 1003}; 1004 1005module.exports = CancelToken; 1006 1007 1008/***/ }), 1009
vendor: 361 bytes, lines 1010-1025
1010/***/ "./node_modules/axios/lib/cancel/isCancel.js": 1011/*!***************************************************!*\ 1012 !*** ./node_modules/axios/lib/cancel/isCancel.js ***! 1013 \***************************************************/ 1014/***/ ((module) => { 1015 1016"use strict"; 1017 1018 1019module.exports = function isCancel(value) { 1020 return !!(value && value.__CANCEL__); 1021}; 1022 1023 1024/***/ }), 1025
vendor: 3,118 bytes, lines 1026-1122
1026/***/ "./node_modules/axios/lib/core/Axios.js": 1027/*!**********************************************!*\ 1028 !*** ./node_modules/axios/lib/core/Axios.js ***! 1029 \**********************************************/ 1030/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1031 1032"use strict"; 1033 1034 1035var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/axios/lib/defaults.js"); 1036var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1037var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js"); 1038var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js"); 1039var isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); 1040var combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js"); 1041 1042/** 1043 * Create a new instance of Axios 1044 * 1045 * @param {Object} instanceConfig The default config for the instance 1046 */ 1047function Axios(instanceConfig) { 1048 this.defaults = instanceConfig; 1049 this.interceptors = { 1050 request: new InterceptorManager(), 1051 response: new InterceptorManager() 1052 }; 1053} 1054 1055/** 1056 * Dispatch a request 1057 * 1058 * @param {Object} config The config specific for this request (merged with this.defaults) 1059 */ 1060Axios.prototype.request = function request(config) { 1061 /*eslint no-param-reassign:0*/ 1062 // Allow for axios('example/url'[, config]) a la fetch API 1063 if (typeof config === 'string') { 1064 config = utils.merge({ 1065 url: arguments[0] 1066 }, arguments[1]); 1067 } 1068 1069 config = utils.merge(defaults, this.defaults, { method: 'get' }, config); 1070 config.method = config.method.toLowerCase(); 1071 1072 // Support baseURL config 1073 if (config.baseURL && !isAbsoluteURL(config.url)) { 1074 config.url = combineURLs(config.baseURL, config.url); 1075 } 1076 1077 // Hook up interceptors middleware 1078 var chain = [dispatchRequest, undefined]; 1079 var promise = Promise.resolve(config); 1080 1081 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { 1082 chain.unshift(interceptor.fulfilled, interceptor.rejected); 1083 }); 1084 1085 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { 1086 chain.push(interceptor.fulfilled, interceptor.rejected); 1087 }); 1088 1089 while (chain.length) { 1090 promise = promise.then(chain.shift(), chain.shift()); 1091 } 1092 1093 return promise; 1094}; 1095 1096// Provide aliases for supported request methods 1097utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { 1098 /*eslint func-names:0*/ 1099 Axios.prototype[method] = function(url, config) { 1100 return this.request(utils.merge(config || {}, { 1101 method: method, 1102 url: url 1103 })); 1104 }; 1105}); 1106 1107utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 1108 /*eslint func-names:0*/ 1109 Axios.prototype[method] = function(url, data, config) { 1110 return this.request(utils.merge(config || {}, { 1111 method: method, 1112 url: url, 1113 data: data 1114 })); 1115 }; 1116}); 1117 1118module.exports = Axios; 1119 1120 1121/***/ }), 1122
vendor: 1,642 bytes, lines 1123-1185
1123/***/ "./node_modules/axios/lib/core/InterceptorManager.js": 1124/*!***********************************************************!*\ 1125 !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! 1126 \***********************************************************/ 1127/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1128 1129"use strict"; 1130 1131 1132var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1133 1134function InterceptorManager() { 1135 this.handlers = []; 1136} 1137 1138/** 1139 * Add a new interceptor to the stack 1140 * 1141 * @param {Function} fulfilled The function to handle `then` for a `Promise` 1142 * @param {Function} rejected The function to handle `reject` for a `Promise` 1143 * 1144 * @return {Number} An ID used to remove interceptor later 1145 */ 1146InterceptorManager.prototype.use = function use(fulfilled, rejected) { 1147 this.handlers.push({ 1148 fulfilled: fulfilled, 1149 rejected: rejected 1150 }); 1151 return this.handlers.length - 1; 1152}; 1153 1154/** 1155 * Remove an interceptor from the stack 1156 * 1157 * @param {Number} id The ID that was returned by `use` 1158 */ 1159InterceptorManager.prototype.eject = function eject(id) { 1160 if (this.handlers[id]) { 1161 this.handlers[id] = null; 1162 } 1163}; 1164 1165/** 1166 * Iterate over all the registered interceptors 1167 * 1168 * This method is particularly useful for skipping over any 1169 * interceptors that may have become `null` calling `eject`. 1170 * 1171 * @param {Function} fn The function to call for each interceptor 1172 */ 1173InterceptorManager.prototype.forEach = function forEach(fn) { 1174 utils.forEach(this.handlers, function forEachHandler(h) { 1175 if (h !== null) { 1176 fn(h); 1177 } 1178 }); 1179}; 1180 1181module.exports = InterceptorManager; 1182 1183 1184/***/ }), 1185
vendor: 1,000 bytes, lines 1186-1214
1186/***/ "./node_modules/axios/lib/core/createError.js": 1187/*!****************************************************!*\ 1188 !*** ./node_modules/axios/lib/core/createError.js ***! 1189 \****************************************************/ 1190/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1191 1192"use strict"; 1193 1194 1195var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/axios/lib/core/enhanceError.js"); 1196 1197/** 1198 * Create an Error with the specified message, config, error code, request and response. 1199 * 1200 * @param {string} message The error message. 1201 * @param {Object} config The config. 1202 * @param {string} [code] The error code (for example, 'ECONNABORTED'). 1203 * @param {Object} [request] The request. 1204 * @param {Object} [response] The response. 1205 * @returns {Error} The created error. 1206 */ 1207module.exports = function createError(message, config, code, request, response) { 1208 var error = new Error(message); 1209 return enhanceError(error, config, code, request, response); 1210}; 1211 1212 1213/***/ }), 1214
vendor: 2,504 bytes, lines 1215-1304
1215/***/ "./node_modules/axios/lib/core/dispatchRequest.js": 1216/*!********************************************************!*\ 1217 !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! 1218 \********************************************************/ 1219/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1220 1221"use strict"; 1222 1223 1224var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1225var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js"); 1226var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); 1227var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults.js"); 1228 1229/** 1230 * Throws a `Cancel` if cancellation has been requested. 1231 */ 1232function throwIfCancellationRequested(config) { 1233 if (config.cancelToken) { 1234 config.cancelToken.throwIfRequested(); 1235 } 1236} 1237 1238/** 1239 * Dispatch a request to the server using the configured adapter. 1240 * 1241 * @param {object} config The config that is to be used for the request 1242 * @returns {Promise} The Promise to be fulfilled 1243 */ 1244module.exports = function dispatchRequest(config) { 1245 throwIfCancellationRequested(config); 1246 1247 // Ensure headers exist 1248 config.headers = config.headers || {}; 1249 1250 // Transform request data 1251 config.data = transformData( 1252 config.data, 1253 config.headers, 1254 config.transformRequest 1255 ); 1256 1257 // Flatten headers 1258 config.headers = utils.merge( 1259 config.headers.common || {}, 1260 config.headers[config.method] || {}, 1261 config.headers || {} 1262 ); 1263 1264 utils.forEach( 1265 ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], 1266 function cleanHeaderConfig(method) { 1267 delete config.headers[method]; 1268 } 1269 ); 1270 1271 var adapter = config.adapter || defaults.adapter; 1272 1273 return adapter(config).then(function onAdapterResolution(response) { 1274 throwIfCancellationRequested(config); 1275 1276 // Transform response data 1277 response.data = transformData( 1278 response.data, 1279 response.headers, 1280 config.transformResponse 1281 ); 1282 1283 return response; 1284 }, function onAdapterRejection(reason) { 1285 if (!isCancel(reason)) { 1286 throwIfCancellationRequested(config); 1287 1288 // Transform response data 1289 if (reason && reason.response) { 1290 reason.response.data = transformData( 1291 reason.response.data, 1292 reason.response.headers, 1293 config.transformResponse 1294 ); 1295 } 1296 } 1297 1298 return Promise.reject(reason); 1299 }); 1300}; 1301 1302 1303/***/ }), 1304
vendor: 859 bytes, lines 1305-1336
1305/***/ "./node_modules/axios/lib/core/enhanceError.js": 1306/*!*****************************************************!*\ 1307 !*** ./node_modules/axios/lib/core/enhanceError.js ***! 1308 \*****************************************************/ 1309/***/ ((module) => { 1310 1311"use strict"; 1312 1313 1314/** 1315 * Update an Error with the specified config, error code, and response. 1316 * 1317 * @param {Error} error The error to update. 1318 * @param {Object} config The config. 1319 * @param {string} [code] The error code (for example, 'ECONNABORTED'). 1320 * @param {Object} [request] The request. 1321 * @param {Object} [response] The response. 1322 * @returns {Error} The error. 1323 */ 1324module.exports = function enhanceError(error, config, code, request, response) { 1325 error.config = config; 1326 if (code) { 1327 error.code = code; 1328 } 1329 error.request = request; 1330 error.response = response; 1331 return error; 1332}; 1333 1334 1335/***/ }), 1336
vendor: 1,111 bytes, lines 1337-1373
1337/***/ "./node_modules/axios/lib/core/settle.js": 1338/*!***********************************************!*\ 1339 !*** ./node_modules/axios/lib/core/settle.js ***! 1340 \***********************************************/ 1341/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1342 1343"use strict"; 1344 1345 1346var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios/lib/core/createError.js"); 1347 1348/** 1349 * Resolve or reject a Promise based on response status. 1350 * 1351 * @param {Function} resolve A function that resolves the promise. 1352 * @param {Function} reject A function that rejects the promise. 1353 * @param {object} response The response. 1354 */ 1355module.exports = function settle(resolve, reject, response) { 1356 var validateStatus = response.config.validateStatus; 1357 // Note: status is not exposed by XDomainRequest 1358 if (!response.status || !validateStatus || validateStatus(response.status)) { 1359 resolve(response); 1360 } else { 1361 reject(createError( 1362 'Request failed with status code ' + response.status, 1363 response.config, 1364 null, 1365 response.request, 1366 response 1367 )); 1368 } 1369}; 1370 1371 1372/***/ }), 1373
vendor: 921 bytes, lines 1374-1404
1374/***/ "./node_modules/axios/lib/core/transformData.js": 1375/*!******************************************************!*\ 1376 !*** ./node_modules/axios/lib/core/transformData.js ***! 1377 \******************************************************/ 1378/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1379 1380"use strict"; 1381 1382 1383var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1384 1385/** 1386 * Transform the data for a request or a response 1387 * 1388 * @param {Object|String} data The data to be transformed 1389 * @param {Array} headers The headers for the request or response 1390 * @param {Array|Function} fns A single function or Array of functions 1391 * @returns {*} The resulting transformed data 1392 */ 1393module.exports = function transformData(data, headers, fns) { 1394 /*eslint no-param-reassign:0*/ 1395 utils.forEach(fns, function transform(fn) { 1396 data = fn(data, headers); 1397 }); 1398 1399 return data; 1400}; 1401 1402 1403/***/ }), 1404
vendor: 2,966 bytes, lines 1405-1508
1405/***/ "./node_modules/axios/lib/defaults.js": 1406/*!********************************************!*\ 1407 !*** ./node_modules/axios/lib/defaults.js ***! 1408 \********************************************/ 1409/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1410 1411"use strict"; 1412/* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js"); 1413 1414 1415var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); 1416var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js"); 1417 1418var DEFAULT_CONTENT_TYPE = { 1419 'Content-Type': 'application/x-www-form-urlencoded' 1420}; 1421 1422function setContentTypeIfUnset(headers, value) { 1423 if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { 1424 headers['Content-Type'] = value; 1425 } 1426} 1427 1428function getDefaultAdapter() { 1429 var adapter; 1430 if (typeof XMLHttpRequest !== 'undefined') { 1431 // For browsers use XHR adapter 1432 adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js"); 1433 } else if (typeof process !== 'undefined') { 1434 // For node use HTTP adapter 1435 adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/axios/lib/adapters/xhr.js"); 1436 } 1437 return adapter; 1438} 1439 1440var defaults = { 1441 adapter: getDefaultAdapter(), 1442 1443 transformRequest: [function transformRequest(data, headers) { 1444 normalizeHeaderName(headers, 'Content-Type'); 1445 if (utils.isFormData(data) || 1446 utils.isArrayBuffer(data) || 1447 utils.isBuffer(data) || 1448 utils.isStream(data) || 1449 utils.isFile(data) || 1450 utils.isBlob(data) 1451 ) { 1452 return data; 1453 } 1454 if (utils.isArrayBufferView(data)) { 1455 return data.buffer; 1456 } 1457 if (utils.isURLSearchParams(data)) { 1458 setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); 1459 return data.toString(); 1460 } 1461 if (utils.isObject(data)) { 1462 setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); 1463 return JSON.stringify(data); 1464 } 1465 return data; 1466 }], 1467 1468 transformResponse: [function transformResponse(data) { 1469 /*eslint no-param-reassign:0*/ 1470 if (typeof data === 'string') { 1471 try { 1472 data = JSON.parse(data); 1473 } catch (e) { /* Ignore */ } 1474 } 1475 return data; 1476 }], 1477 1478 timeout: 0, 1479 1480 xsrfCookieName: 'XSRF-TOKEN', 1481 xsrfHeaderName: 'X-XSRF-TOKEN', 1482 1483 maxContentLength: -1, 1484 1485 validateStatus: function validateStatus(status) { 1486 return status >= 200 && status < 300; 1487 } 1488}; 1489 1490defaults.headers = { 1491 common: { 1492 'Accept': 'application/json, text/plain, */*' 1493 } 1494}; 1495 1496utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { 1497 defaults.headers[method] = {}; 1498}); 1499 1500utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 1501 defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); 1502}); 1503 1504module.exports = defaults; 1505 1506 1507/***/ }), 1508
vendor: 503 bytes, lines 1509-1530
1509/***/ "./node_modules/axios/lib/helpers/bind.js": 1510/*!************************************************!*\ 1511 !*** ./node_modules/axios/lib/helpers/bind.js ***! 1512 \************************************************/ 1513/***/ ((module) => { 1514 1515"use strict"; 1516 1517 1518module.exports = function bind(fn, thisArg) { 1519 return function wrap() { 1520 var args = new Array(arguments.length); 1521 for (var i = 0; i < args.length; i++) { 1522 args[i] = arguments[i]; 1523 } 1524 return fn.apply(thisArg, args); 1525 }; 1526}; 1527 1528 1529/***/ }), 1530
vendor: 1,233 bytes, lines 1531-1577
1531/***/ "./node_modules/axios/lib/helpers/btoa.js": 1532/*!************************************************!*\ 1533 !*** ./node_modules/axios/lib/helpers/btoa.js ***! 1534 \************************************************/ 1535/***/ ((module) => { 1536 1537"use strict"; 1538 1539 1540// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js 1541 1542var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 1543 1544function E() { 1545 this.message = 'String contains an invalid character'; 1546} 1547E.prototype = new Error; 1548E.prototype.code = 5; 1549E.prototype.name = 'InvalidCharacterError'; 1550 1551function btoa(input) { 1552 var str = String(input); 1553 var output = ''; 1554 for ( 1555 // initialize result and counter 1556 var block, charCode, idx = 0, map = chars; 1557 // if the next str index does not exist: 1558 // change the mapping table to "=" 1559 // check if d has no fractional digits 1560 str.charAt(idx | 0) || (map = '=', idx % 1); 1561 // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 1562 output += map.charAt(63 & block >> 8 - idx % 1 * 8) 1563 ) { 1564 charCode = str.charCodeAt(idx += 3 / 4); 1565 if (charCode > 0xFF) { 1566 throw new E(); 1567 } 1568 block = block << 8 | charCode; 1569 } 1570 return output; 1571} 1572 1573module.exports = btoa; 1574 1575 1576/***/ }), 1577
vendor: 1,939 bytes, lines 1578-1656
1578/***/ "./node_modules/axios/lib/helpers/buildURL.js": 1579/*!****************************************************!*\ 1580 !*** ./node_modules/axios/lib/helpers/buildURL.js ***! 1581 \****************************************************/ 1582/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1583 1584"use strict"; 1585 1586 1587var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1588 1589function encode(val) { 1590 return encodeURIComponent(val). 1591 replace(/%40/gi, '@'). 1592 replace(/%3A/gi, ':'). 1593 replace(/%24/g, '$'). 1594 replace(/%2C/gi, ','). 1595 replace(/%20/g, '+'). 1596 replace(/%5B/gi, '['). 1597 replace(/%5D/gi, ']'); 1598} 1599 1600/** 1601 * Build a URL by appending params to the end 1602 * 1603 * @param {string} url The base of the url (e.g., http://www.google.com) 1604 * @param {object} [params] The params to be appended 1605 * @returns {string} The formatted url 1606 */ 1607module.exports = function buildURL(url, params, paramsSerializer) { 1608 /*eslint no-param-reassign:0*/ 1609 if (!params) { 1610 return url; 1611 } 1612 1613 var serializedParams; 1614 if (paramsSerializer) { 1615 serializedParams = paramsSerializer(params); 1616 } else if (utils.isURLSearchParams(params)) { 1617 serializedParams = params.toString(); 1618 } else { 1619 var parts = []; 1620 1621 utils.forEach(params, function serialize(val, key) { 1622 if (val === null || typeof val === 'undefined') { 1623 return; 1624 } 1625 1626 if (utils.isArray(val)) { 1627 key = key + '[]'; 1628 } 1629 1630 if (!utils.isArray(val)) { 1631 val = [val]; 1632 } 1633 1634 utils.forEach(val, function parseValue(v) { 1635 if (utils.isDate(v)) { 1636 v = v.toISOString(); 1637 } else if (utils.isObject(v)) { 1638 v = JSON.stringify(v); 1639 } 1640 parts.push(encode(key) + '=' + encode(v)); 1641 }); 1642 }); 1643 1644 serializedParams = parts.join('&'); 1645 } 1646 1647 if (serializedParams) { 1648 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; 1649 } 1650 1651 return url; 1652}; 1653 1654 1655/***/ }), 1656
vendor: 655 bytes, lines 1657-1681
1657/***/ "./node_modules/axios/lib/helpers/combineURLs.js": 1658/*!*******************************************************!*\ 1659 !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! 1660 \*******************************************************/ 1661/***/ ((module) => { 1662 1663"use strict"; 1664 1665 1666/** 1667 * Creates a new URL by combining the specified URLs 1668 * 1669 * @param {string} baseURL The base URL 1670 * @param {string} relativeURL The relative URL 1671 * @returns {string} The combined URL 1672 */ 1673module.exports = function combineURLs(baseURL, relativeURL) { 1674 return relativeURL 1675 ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 1676 : baseURL; 1677}; 1678 1679 1680/***/ }), 1681
vendor: 1,724 bytes, lines 1682-1745
1682/***/ "./node_modules/axios/lib/helpers/cookies.js": 1683/*!***************************************************!*\ 1684 !*** ./node_modules/axios/lib/helpers/cookies.js ***! 1685 \***************************************************/ 1686/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1687 1688"use strict"; 1689 1690 1691var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1692 1693module.exports = ( 1694 utils.isStandardBrowserEnv() ? 1695 1696 // Standard browser envs support document.cookie 1697 (function standardBrowserEnv() { 1698 return { 1699 write: function write(name, value, expires, path, domain, secure) { 1700 var cookie = []; 1701 cookie.push(name + '=' + encodeURIComponent(value)); 1702 1703 if (utils.isNumber(expires)) { 1704 cookie.push('expires=' + new Date(expires).toGMTString()); 1705 } 1706 1707 if (utils.isString(path)) { 1708 cookie.push('path=' + path); 1709 } 1710 1711 if (utils.isString(domain)) { 1712 cookie.push('domain=' + domain); 1713 } 1714 1715 if (secure === true) { 1716 cookie.push('secure'); 1717 } 1718 1719 document.cookie = cookie.join('; '); 1720 }, 1721 1722 read: function read(name) { 1723 var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); 1724 return (match ? decodeURIComponent(match[3]) : null); 1725 }, 1726 1727 remove: function remove(name) { 1728 this.write(name, '', Date.now() - 86400000); 1729 } 1730 }; 1731 })() : 1732 1733 // Non standard browser env (web workers, react-native) lack needed support. 1734 (function nonStandardBrowserEnv() { 1735 return { 1736 write: function write() {}, 1737 read: function read() { return null; }, 1738 remove: function remove() {} 1739 }; 1740 })() 1741); 1742 1743 1744/***/ }), 1745
vendor: 846 bytes, lines 1746-1770
1746/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": 1747/*!*********************************************************!*\ 1748 !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! 1749 \*********************************************************/ 1750/***/ ((module) => { 1751 1752"use strict"; 1753 1754 1755/** 1756 * Determines whether the specified URL is absolute 1757 * 1758 * @param {string} url The URL to test 1759 * @returns {boolean} True if the specified URL is absolute, otherwise false 1760 */ 1761module.exports = function isAbsoluteURL(url) { 1762 // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). 1763 // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 1764 // by any combination of letters, digits, plus, period, or hyphen. 1765 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 1766}; 1767 1768 1769/***/ }), 1770
vendor: 2,636 bytes, lines 1771-1849
1771/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": 1772/*!***********************************************************!*\ 1773 !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! 1774 \***********************************************************/ 1775/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1776 1777"use strict"; 1778 1779 1780var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1781 1782module.exports = ( 1783 utils.isStandardBrowserEnv() ? 1784 1785 // Standard browser envs have full support of the APIs needed to test 1786 // whether the request URL is of the same origin as current location. 1787 (function standardBrowserEnv() { 1788 var msie = /(msie|trident)/i.test(navigator.userAgent); 1789 var urlParsingNode = document.createElement('a'); 1790 var originURL; 1791 1792 /** 1793 * Parse a URL to discover it's components 1794 * 1795 * @param {String} url The URL to be parsed 1796 * @returns {Object} 1797 */ 1798 function resolveURL(url) { 1799 var href = url; 1800 1801 if (msie) { 1802 // IE needs attribute set twice to normalize properties 1803 urlParsingNode.setAttribute('href', href); 1804 href = urlParsingNode.href; 1805 } 1806 1807 urlParsingNode.setAttribute('href', href); 1808 1809 // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 1810 return { 1811 href: urlParsingNode.href, 1812 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 1813 host: urlParsingNode.host, 1814 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 1815 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 1816 hostname: urlParsingNode.hostname, 1817 port: urlParsingNode.port, 1818 pathname: (urlParsingNode.pathname.charAt(0) === '/') ? 1819 urlParsingNode.pathname : 1820 '/' + urlParsingNode.pathname 1821 }; 1822 } 1823 1824 originURL = resolveURL(window.location.href); 1825 1826 /** 1827 * Determine if a URL shares the same origin as the current location 1828 * 1829 * @param {String} requestURL The URL to test 1830 * @returns {boolean} True if URL shares the same origin, otherwise false 1831 */ 1832 return function isURLSameOrigin(requestURL) { 1833 var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; 1834 return (parsed.protocol === originURL.protocol && 1835 parsed.host === originURL.host); 1836 }; 1837 })() : 1838 1839 // Non standard browser envs (web workers, react-native) lack needed support. 1840 (function nonStandardBrowserEnv() { 1841 return function isURLSameOrigin() { 1842 return true; 1843 }; 1844 })() 1845); 1846 1847 1848/***/ }), 1849
vendor: 764 bytes, lines 1850-1872
1850/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js": 1851/*!***************************************************************!*\ 1852 !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***! 1853 \***************************************************************/ 1854/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1855 1856"use strict"; 1857 1858 1859var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); 1860 1861module.exports = function normalizeHeaderName(headers, normalizedName) { 1862 utils.forEach(headers, function processHeader(value, name) { 1863 if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { 1864 headers[normalizedName] = value; 1865 delete headers[name]; 1866 } 1867 }); 1868}; 1869 1870 1871/***/ }), 1872
vendor: 1,163 bytes, lines 1873-1920
1873/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": 1874/*!********************************************************!*\ 1875 !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! 1876 \********************************************************/ 1877/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1878 1879"use strict"; 1880 1881 1882var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); 1883 1884/** 1885 * Parse headers into an object 1886 * 1887 * ``` 1888 * Date: Wed, 27 Aug 2014 08:58:49 GMT 1889 * Content-Type: application/json 1890 * Connection: keep-alive 1891 * Transfer-Encoding: chunked 1892 * ``` 1893 * 1894 * @param {String} headers Headers needing to be parsed 1895 * @returns {Object} Headers parsed into an object 1896 */ 1897module.exports = function parseHeaders(headers) { 1898 var parsed = {}; 1899 var key; 1900 var val; 1901 var i; 1902 1903 if (!headers) { return parsed; } 1904 1905 utils.forEach(headers.split('\n'), function parser(line) { 1906 i = line.indexOf(':'); 1907 key = utils.trim(line.substr(0, i)).toLowerCase(); 1908 val = utils.trim(line.substr(i + 1)); 1909 1910 if (key) { 1911 parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; 1912 } 1913 }); 1914 1915 return parsed; 1916}; 1917 1918 1919/***/ }), 1920
vendor: 819 bytes, lines 1921-1958
1921/***/ "./node_modules/axios/lib/helpers/spread.js": 1922/*!**************************************************!*\ 1923 !*** ./node_modules/axios/lib/helpers/spread.js ***! 1924 \**************************************************/ 1925/***/ ((module) => { 1926 1927"use strict"; 1928 1929 1930/** 1931 * Syntactic sugar for invoking a function and expanding an array for arguments. 1932 * 1933 * Common use case would be to use `Function.prototype.apply`. 1934 * 1935 * ```js 1936 * function f(x, y, z) {} 1937 * var args = [1, 2, 3]; 1938 * f.apply(null, args); 1939 * ``` 1940 * 1941 * With `spread` this example can be re-written. 1942 * 1943 * ```js 1944 * spread(function(x, y, z) {})([1, 2, 3]); 1945 * ``` 1946 * 1947 * @param {Function} callback 1948 * @returns {Function} 1949 */ 1950module.exports = function spread(callback) { 1951 return function wrap(arr) { 1952 return callback.apply(null, arr); 1953 }; 1954}; 1955 1956 1957/***/ }), 1958
vendor: 48,447 bytes, lines 1959-3710
1959/***/ "./node_modules/axios/lib/utils.js": 1960/*!*****************************************!*\ 1961 !*** ./node_modules/axios/lib/utils.js ***! 1962 \*****************************************/ 1963/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1964 1965"use strict"; 1966 1967 1968var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); 1969var isBuffer = __webpack_require__(/*! is-buffer */ "./node_modules/is-buffer/index.js"); 1970 1971/*global toString:true*/ 1972 1973// utils is a library of generic helper functions non-specific to axios 1974 1975var toString = Object.prototype.toString; 1976 1977/** 1978 * Determine if a value is an Array 1979 * 1980 * @param {Object} val The value to test 1981 * @returns {boolean} True if value is an Array, otherwise false 1982 */ 1983function isArray(val) { 1984 return toString.call(val) === '[object Array]'; 1985} 1986 1987/** 1988 * Determine if a value is an ArrayBuffer 1989 * 1990 * @param {Object} val The value to test 1991 * @returns {boolean} True if value is an ArrayBuffer, otherwise false 1992 */ 1993function isArrayBuffer(val) { 1994 return toString.call(val) === '[object ArrayBuffer]'; 1995} 1996 1997/** 1998 * Determine if a value is a FormData 1999 * 2000 * @param {Object} val The value to test 2001 * @returns {boolean} True if value is an FormData, otherwise false 2002 */ 2003function isFormData(val) { 2004 return (typeof FormData !== 'undefined') && (val instanceof FormData); 2005} 2006 2007/** 2008 * Determine if a value is a view on an ArrayBuffer 2009 * 2010 * @param {Object} val The value to test 2011 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false 2012 */ 2013function isArrayBufferView(val) { 2014 var result; 2015 if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { 2016 result = ArrayBuffer.isView(val); 2017 } else { 2018 result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); 2019 } 2020 return result; 2021} 2022 2023/** 2024 * Determine if a value is a String 2025 * 2026 * @param {Object} val The value to test 2027 * @returns {boolean} True if value is a String, otherwise false 2028 */ 2029function isString(val) { 2030 return typeof val === 'string'; 2031} 2032 2033/** 2034 * Determine if a value is a Number 2035 * 2036 * @param {Object} val The value to test 2037 * @returns {boolean} True if value is a Number, otherwise false 2038 */ 2039function isNumber(val) { 2040 return typeof val === 'number'; 2041} 2042 2043/** 2044 * Determine if a value is undefined 2045 * 2046 * @param {Object} val The value to test 2047 * @returns {boolean} True if the value is undefined, otherwise false 2048 */ 2049function isUndefined(val) { 2050 return typeof val === 'undefined'; 2051} 2052 2053/** 2054 * Determine if a value is an Object 2055 * 2056 * @param {Object} val The value to test 2057 * @returns {boolean} True if value is an Object, otherwise false 2058 */ 2059function isObject(val) { 2060 return val !== null && typeof val === 'object'; 2061} 2062 2063/** 2064 * Determine if a value is a Date 2065 * 2066 * @param {Object} val The value to test 2067 * @returns {boolean} True if value is a Date, otherwise false 2068 */ 2069function isDate(val) { 2070 return toString.call(val) === '[object Date]'; 2071} 2072 2073/** 2074 * Determine if a value is a File 2075 * 2076 * @param {Object} val The value to test 2077 * @returns {boolean} True if value is a File, otherwise false 2078 */ 2079function isFile(val) { 2080 return toString.call(val) === '[object File]'; 2081} 2082 2083/** 2084 * Determine if a value is a Blob 2085 * 2086 * @param {Object} val The value to test 2087 * @returns {boolean} True if value is a Blob, otherwise false 2088 */ 2089function isBlob(val) { 2090 return toString.call(val) === '[object Blob]'; 2091} 2092 2093/** 2094 * Determine if a value is a Function 2095 * 2096 * @param {Object} val The value to test 2097 * @returns {boolean} True if value is a Function, otherwise false 2098 */ 2099function isFunction(val) { 2100 return toString.call(val) === '[object Function]'; 2101} 2102 2103/** 2104 * Determine if a value is a Stream 2105 * 2106 * @param {Object} val The value to test 2107 * @returns {boolean} True if value is a Stream, otherwise false 2108 */ 2109function isStream(val) { 2110 return isObject(val) && isFunction(val.pipe); 2111} 2112 2113/** 2114 * Determine if a value is a URLSearchParams object 2115 * 2116 * @param {Object} val The value to test 2117 * @returns {boolean} True if value is a URLSearchParams object, otherwise false 2118 */ 2119function isURLSearchParams(val) { 2120 return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; 2121} 2122 2123/** 2124 * Trim excess whitespace off the beginning and end of a string 2125 * 2126 * @param {String} str The String to trim 2127 * @returns {String} The String freed of excess whitespace 2128 */ 2129function trim(str) { 2130 return str.replace(/^\s*/, '').replace(/\s*$/, ''); 2131} 2132 2133/** 2134 * Determine if we're running in a standard browser environment 2135 * 2136 * This allows axios to run in a web worker, and react-native. 2137 * Both environments support XMLHttpRequest, but not fully standard globals. 2138 * 2139 * web workers: 2140 * typeof window -> undefined 2141 * typeof document -> undefined 2142 * 2143 * react-native: 2144 * navigator.product -> 'ReactNative' 2145 */ 2146function isStandardBrowserEnv() { 2147 if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { 2148 return false; 2149 } 2150 return ( 2151 typeof window !== 'undefined' && 2152 typeof document !== 'undefined' 2153 ); 2154} 2155 2156/** 2157 * Iterate over an Array or an Object invoking a function for each item. 2158 * 2159 * If `obj` is an Array callback will be called passing 2160 * the value, index, and complete array for each item. 2161 * 2162 * If 'obj' is an Object callback will be called passing 2163 * the value, key, and complete object for each property. 2164 * 2165 * @param {Object|Array} obj The object to iterate 2166 * @param {Function} fn The callback to invoke for each item 2167 */ 2168function forEach(obj, fn) { 2169 // Don't bother if no value provided 2170 if (obj === null || typeof obj === 'undefined') { 2171 return; 2172 } 2173 2174 // Force an array if not already something iterable 2175 if (typeof obj !== 'object' && !isArray(obj)) { 2176 /*eslint no-param-reassign:0*/ 2177 obj = [obj]; 2178 } 2179 2180 if (isArray(obj)) { 2181 // Iterate over array values 2182 for (var i = 0, l = obj.length; i < l; i++) { 2183 fn.call(null, obj[i], i, obj); 2184 } 2185 } else { 2186 // Iterate over object keys 2187 for (var key in obj) { 2188 if (Object.prototype.hasOwnProperty.call(obj, key)) { 2189 fn.call(null, obj[key], key, obj); 2190 } 2191 } 2192 } 2193} 2194 2195/** 2196 * Accepts varargs expecting each argument to be an object, then 2197 * immutably merges the properties of each object and returns result. 2198 * 2199 * When multiple objects contain the same key the later object in 2200 * the arguments list will take precedence. 2201 * 2202 * Example: 2203 * 2204 * ```js 2205 * var result = merge({foo: 123}, {foo: 456}); 2206 * console.log(result.foo); // outputs 456 2207 * ``` 2208 * 2209 * @param {Object} obj1 Object to merge 2210 * @returns {Object} Result of all merge properties 2211 */ 2212function merge(/* obj1, obj2, obj3, ... */) { 2213 var result = {}; 2214 function assignValue(val, key) { 2215 if (typeof result[key] === 'object' && typeof val === 'object') { 2216 result[key] = merge(result[key], val); 2217 } else { 2218 result[key] = val; 2219 } 2220 } 2221 2222 for (var i = 0, l = arguments.length; i < l; i++) { 2223 forEach(arguments[i], assignValue); 2224 } 2225 return result; 2226} 2227 2228/** 2229 * Extends object a by mutably adding to it the properties of object b. 2230 * 2231 * @param {Object} a The object to be extended 2232 * @param {Object} b The object to copy properties from 2233 * @param {Object} thisArg The object to bind function to 2234 * @return {Object} The resulting value of object a 2235 */ 2236function extend(a, b, thisArg) { 2237 forEach(b, function assignValue(val, key) { 2238 if (thisArg && typeof val === 'function') { 2239 a[key] = bind(val, thisArg); 2240 } else { 2241 a[key] = val; 2242 } 2243 }); 2244 return a; 2245} 2246 2247module.exports = { 2248 isArray: isArray, 2249 isArrayBuffer: isArrayBuffer, 2250 isBuffer: isBuffer, 2251 isFormData: isFormData, 2252 isArrayBufferView: isArrayBufferView, 2253 isString: isString, 2254 isNumber: isNumber, 2255 isObject: isObject, 2256 isUndefined: isUndefined, 2257 isDate: isDate, 2258 isFile: isFile, 2259 isBlob: isBlob, 2260 isFunction: isFunction, 2261 isStream: isStream, 2262 isURLSearchParams: isURLSearchParams, 2263 isStandardBrowserEnv: isStandardBrowserEnv, 2264 forEach: forEach, 2265 merge: merge, 2266 extend: extend, 2267 trim: trim 2268}; 2269 2270 2271/***/ }), 2272 2273/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js&": 2274/*!***********************************************************************************************************************************************************************************************************************************!*\ 2275 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js& ***! 2276 \***********************************************************************************************************************************************************************************************************************************/ 2277/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2278 2279"use strict"; 2280__webpack_require__.r(__webpack_exports__); 2281/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2282/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2283/* harmony export */ }); 2284/* harmony import */ var _Desktop_Items__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Desktop/Items */ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue"); 2285/* harmony import */ var _Desktop_Cart__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Desktop/Cart */ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue"); 2286/* harmony import */ var _Desktop_Item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Desktop/Item */ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue"); 2287/* harmony import */ var _Desktop_Order__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Desktop/Order */ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue"); 2288/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 2289/* harmony import */ var _Desktop_Merch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Desktop/Merch */ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue"); 2290/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/dist/js/swiper.esm.bundle.js"); 2291// 2292// 2293// 2294// 2295// 2296// 2297// 2298// 2299// 2300// 2301// 2302// 2303// 2304// 2305// 2306// 2307// 2308// 2309// 2310// 2311// 2312// 2313// 2314// 2315// 2316// 2317// 2318// 2319// 2320// 2321// 2322// 2323// 2324// 2325// 2326// 2327// 2328// 2329// 2330// 2331// 2332// 2333// 2334// 2335// 2336// 2337// 2338// 2339// 2340// 2341// 2342// 2343// 2344// 2345// 2346// 2347// 2348// 2349// 2350// 2351// 2352// 2353// 2354// 2355// 2356// 2357// 2358// 2359// 2360// 2361// 2362// 2363// 2364// 2365// 2366// 2367// 2368// 2369// 2370// 2371// 2372// 2373// 2374// 2375// 2376// 2377// 2378// 2379// 2380// 2381// 2382// 2383// 2384 2385 2386 2387 2388 2389 2390 2391 2392/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 2393 props: { 2394 available: {}, 2395 item: {}, 2396 order_source: {} 2397 }, 2398 components: { 2399 Merch: _Desktop_Merch__WEBPACK_IMPORTED_MODULE_5__["default"], 2400 items: _Desktop_Items__WEBPACK_IMPORTED_MODULE_0__["default"], 2401 cart: _Desktop_Cart__WEBPACK_IMPORTED_MODULE_1__["default"], 2402 item: _Desktop_Item__WEBPACK_IMPORTED_MODULE_2__["default"], 2403 order: _Desktop_Order__WEBPACK_IMPORTED_MODULE_3__["default"] 2404 }, 2405 data: function data() { 2406 return { 2407 order: this.order_source, 2408 tab: 'magazine', 2409 page: 'items', 2410 items: [] 2411 }; 2412 }, 2413 mounted: function mounted() { 2414 var _this = this; 2415 if (this.order.items.length === 0 && localStorage.getItem('cart')) this.loadCart(); 2416 var page = window.location.pathname.split('/').length > 2 ? window.location.pathname.split('/')[2] : null; 2417 if (!page) page = 'items'; 2418 switch (page) { 2419 case 'item': 2420 this.show(page, this.item.id); 2421 break; 2422 case 'order': 2423 this.show(page, this.order.invoice); 2424 break; 2425 default: 2426 this.show(page); 2427 break; 2428 } 2429 window.addEventListener('popstate', function (event) { 2430 //console.log(event, event.state); 2431 _this.show(event.state.page, event.state.id, true); 2432 }); 2433 new swiper__WEBPACK_IMPORTED_MODULE_6__["default"]('.menu.mobile', { 2434 slidesPerView: 3, 2435 spaceBetween: 30, 2436 freeMode: true 2437 }); 2438 }, 2439 watch: { 2440 order: { 2441 handler: function handler(order) { 2442 localStorage.setItem('cart', JSON.stringify(order.items)); 2443 }, 2444 deep: true 2445 } 2446 }, 2447 methods: { 2448 setTab: function setTab(tab) { 2449 this.item = null; 2450 this.tab = tab; 2451 this.show(tab); 2452 }, 2453 addToCart: function addToCart(item) { 2454 var exist; 2455 if (this.order.invoice) this.resetOrder(); 2456 this.order.items.forEach(function (i) { 2457 if (i.id === item.id) { 2458 exist = true; 2459 if (i.count >= 15) return; 2460 i.count++; 2461 i.total += item.price; 2462 } 2463 }); 2464 if (!exist) { 2465 this.order.items.push({ 2466 id: item.id, 2467 name: item.name, 2468 image: item.image, 2469 price: item.price, 2470 total: item.price, 2471 count: 1, 2472 size: item.size 2473 }); 2474 } 2475 _plugins_toast__WEBPACK_IMPORTED_MODULE_4__["default"].success(item.name + ' добавлен в коÑзинÑ!'); 2476 }, 2477 loadCart: function loadCart() { 2478 if (this.order.invoice) return; 2479 var _this = this, 2480 priceChanged, 2481 itemSold; 2482 this.order.items = JSON.parse(localStorage.getItem('cart')); 2483 this.order.items.forEach(function (itemOrder, index) { 2484 if (typeof _this.available.find(function (item) { 2485 return item.id === itemOrder.id; 2486 }) === 'undefined') { 2487 _this.order.items.splice(index, 1); 2488 itemSold = true; 2489 } 2490 _this.available.forEach(function (item) { 2491 if (item.id === itemOrder.id && itemOrder.id === 54) { 2492 console.log(itemOrder, item); 2493 } 2494 if (item.id === itemOrder.id) { 2495 if (item.count < itemOrder.count && item.count > 0) { 2496 itemOrder.count = item.count; 2497 } else if (item.count <= 0 || itemOrder.count <= 0) { 2498 _this.order.items.splice(index, 1); 2499 itemSold = true; 2500 } 2501 if (itemOrder.price !== item.price) { 2502 itemOrder.price = item.price; 2503 itemOrder.total = item.price * itemOrder.count; 2504 priceChanged = true; 2505 } 2506 } 2507 }); 2508 }); 2509 if (itemSold) _plugins_toast__WEBPACK_IMPORTED_MODULE_4__["default"].info('ÐекоÑоÑÑе ÑоваÑÑ Ð¸Ð· коÑÐ·Ð¸Ð½Ñ Ð·Ð°ÐºÐ¾Ð½ÑилиÑÑ'); 2510 if (priceChanged) _plugins_toast__WEBPACK_IMPORTED_MODULE_4__["default"].info('СÑоимоÑÑÑ Ð½ÐµÐºÐ¾ÑоÑÑÑ ÑоваÑов в коÑзине изменилаÑÑ'); 2511 }, 2512 show: function show(page, id, popstate) { 2513 if (page === 'cart' && this.order.items.length === 0) { 2514 _plugins_toast__WEBPACK_IMPORTED_MODULE_4__["default"].error('ÐоÑзина пÑÑÑа'); 2515 return; 2516 } 2517 if (page === 'cart' && this.order.invoice) { 2518 page = 'order'; 2519 id = this.order.invoice; 2520 } 2521 if (page === 'order' && !this.order.invoice) { 2522 page = 'cart'; 2523 window.history.replaceState({ 2524 page: page 2525 }, null, '/store/' + page); 2526 } 2527 if (!popstate) switch (page) { 2528 case 'item': 2529 window.history.pushState({ 2530 page: page, 2531 id: id 2532 }, null, '/store/item/' + id); 2533 break; 2534 case 'items': 2535 window.history.pushState({ 2536 page: page 2537 }, null, '/store'); 2538 break; 2539 case 'merch': 2540 window.history.pushState({ 2541 page: page 2542 }, null, '/store/merch'); 2543 break; 2544 case 'cart': 2545 window.history.pushState({ 2546 page: page 2547 }, null, '/store/' + page); 2548 break; 2549 case 'order': 2550 window.history.pushState({ 2551 page: page, 2552 id: id 2553 }, null, '/store/' + page + '/' + id); 2554 break; 2555 default: 2556 window.history.pushState({ 2557 page: page 2558 }, null, '/store'); 2559 break; 2560 } 2561 if (page === 'order' && !this.order.paid && !this.order.cdek_id) page = 'cart'; 2562 this.page = page; 2563 window.scrollTo(0, 0); 2564 }, 2565 showItem: function showItem(item) { 2566 this.item = item; 2567 this.show('item', item.id); 2568 }, 2569 inCart: function inCart(item) { 2570 var exist = this.order.items.filter(function (i) { 2571 return i.id === item.id; 2572 }); 2573 return exist.length > 0; 2574 }, 2575 resetOrder: function resetOrder() { 2576 this.order.cdek_id = null; 2577 this.order.invoice = null; 2578 }, 2579 onItemsUpdate: function onItemsUpdate(items) { 2580 this.items = items; 2581 } 2582 } 2583}); 2584 2585/***/ }), 2586 2587/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js&": 2588/*!****************************************************************************************************************************************************************************************************************************************!*\ 2589 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js& ***! 2590 \****************************************************************************************************************************************************************************************************************************************/ 2591/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2592 2593"use strict"; 2594__webpack_require__.r(__webpack_exports__); 2595/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2596/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2597/* harmony export */ }); 2598/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 2599/* harmony import */ var _plugins_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../../plugins/debounce */ "./resources/assets/js/plugins/debounce.js"); 2600/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js"); 2601/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__); 2602/* harmony import */ var vue_the_mask__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-the-mask */ "./node_modules/vue-the-mask/dist/vue-the-mask.js"); 2603/* harmony import */ var vue_the_mask__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue_the_mask__WEBPACK_IMPORTED_MODULE_3__); 2604/* harmony import */ var vue_simple_suggest__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-simple-suggest */ "./node_modules/vue-simple-suggest/dist/es6.js"); 2605// 2606// 2607// 2608// 2609// 2610// 2611// 2612// 2613// 2614// 2615// 2616// 2617// 2618// 2619// 2620// 2621// 2622// 2623// 2624// 2625// 2626// 2627// 2628// 2629// 2630// 2631// 2632// 2633// 2634// 2635// 2636// 2637// 2638// 2639// 2640// 2641// 2642// 2643// 2644// 2645// 2646// 2647// 2648// 2649// 2650// 2651// 2652// 2653// 2654// 2655// 2656// 2657// 2658// 2659// 2660// 2661// 2662// 2663// 2664// 2665// 2666// 2667// 2668// 2669// 2670// 2671// 2672// 2673// 2674// 2675// 2676// 2677// 2678// 2679// 2680// 2681// 2682// 2683// 2684// 2685// 2686// 2687// 2688// 2689// 2690// 2691// 2692// 2693// 2694// 2695// 2696// 2697// 2698// 2699// 2700// 2701// 2702// 2703// 2704// 2705// 2706// 2707// 2708// 2709// 2710// 2711// 2712// 2713// 2714// 2715// 2716// 2717// 2718// 2719// 2720// 2721// 2722// 2723// 2724// 2725// 2726// 2727// 2728// 2729// 2730// 2731// 2732// 2733// 2734// 2735// 2736// 2737// 2738// 2739// 2740// 2741// 2742// 2743// 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 2769 2770 2771/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 2772 components: { 2773 TheMask: vue_the_mask__WEBPACK_IMPORTED_MODULE_3__.TheMask, 2774 VueSimpleSuggest: vue_simple_suggest__WEBPACK_IMPORTED_MODULE_4__["default"] 2775 }, 2776 props: { 2777 order: { 2778 required: true 2779 } 2780 }, 2781 data: function data() { 2782 return { 2783 delivery_calculated: false, 2784 widgetCdek: null, 2785 busy: false, 2786 errors: {}, 2787 gameHint: false, 2788 widgetBoxberry: null, 2789 delivery_service: null, 2790 suggestions: { 2791 cities: [], 2792 streets: [], 2793 flats: [] 2794 } 2795 }; 2796 }, 2797 mounted: function mounted() { 2798 window.th = this; 2799 var _this = this; 2800 Object.assign(this.order, { 2801 items_cost: 0, 2802 total: 0 2803 }); 2804 this.calcTotal(); 2805 this.order.delivery_type = 'courier'; 2806 /*if(this.order.delivery_type === 'pvz') { 2807 this.initCdekWidget(function () { 2808 console.log('loaded', _this.widget.city); 2809 _this.widget.city.set(_this.order.city_id); 2810 }); 2811 } else { 2812 //if(!this.autocomplete) 2813 // this.autocompleteInit(); 2814 if(this.order.delivery_cost > 0) 2815 this.delivery_calculated = true; 2816 }*/ 2817 2818 setTimeout(function () { 2819 _this.gameHint = !_this.getCookie('game_disable'); 2820 }, 5000); 2821 }, 2822 computed: { 2823 gameInCart: function gameInCart() { 2824 var inCart = false; 2825 this.order.items.forEach(function (item) { 2826 if (item.id === 151) inCart = true; 2827 }); 2828 return inCart; 2829 }, 2830 gameShow: function gameShow() { 2831 return !this.getCookie('game_disable'); 2832 }, 2833 size: function size() {} 2834 }, 2835 watch: { 2836 'delivery_service': { 2837 handler: function handler(value) { 2838 if (this.delivery_service === 'boxberry') { 2839 this.order.delivery_type = 'pvz'; 2840 } 2841 } 2842 }, 2843 'order.delivery_type': { 2844 handler: function handler(value) { 2845 var _this = this; 2846 this.$nextTick(function () { 2847 if (value === 'pvz') { 2848 if (_this.delivery_service === 'boxberry') { 2849 _this.order.delivery_type = 'pvz'; 2850 if (!_this.widgetBoxberry) { 2851 _this.initBoxberryWidget(); 2852 _this.widgetBoxberry = true; 2853 } 2854 } 2855 if (_this.delivery_service === 'cdek') { 2856 if (!_this.widgetCdek) { 2857 _this.initCdekWidget(); 2858 _this.widgetCdek = true; 2859 } 2860 } 2861 } else { 2862 _this.removeWidgets(); 2863 } 2864 _this.$forceUpdate(); 2865 }); 2866 } 2867 }, 2868 'order.items': { 2869 handler: function handler(value) { 2870 this.calcTotal(); 2871 if (this.order.items.length === 0) { 2872 this.order.items_cost = 0; 2873 this.order.delivery_cost = 0; 2874 this.order.total = 0; 2875 this.delivery_calculated = false; 2876 return; 2877 } 2878 if (this.delivery_calculated) this.calculate(); 2879 }, 2880 deep: true 2881 } 2882 }, 2883 methods: { 2884 setBoxberry: function setBoxberry(args) { 2885 this.order.city = args.name; 2886 this.order.city_id = args.zip; 2887 this.order.pvz_id = args.id; 2888 this.order.street = args.address; 2889 this.calculate(); 2890 console.log(args); 2891 }, 2892 calculate: function calculate() { 2893 var _this = this; 2894 if (this.busy) return; 2895 this.busy = true; 2896 this.order.delivery_cost = 0; 2897 axios__WEBPACK_IMPORTED_MODULE_2___default().post('/store/calculateBoxberry?delivery_service=' + this.delivery_service, this.order).then(function (response) { 2898 _this.order.delivery_cost = response.data; 2899 _this.delivery_calculated = true; 2900 })["catch"](function (error) { 2901 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(error.response.data.length > 0 ? error.response.data : 'ÐÑибка'); 2902 })["finally"](function () { 2903 _this.busy = false; 2904 _this.calcTotal(); 2905 }); 2906 }, 2907 changeDeliveryService: function changeDeliveryService() { 2908 this.delivery_service = null; 2909 this.order.delivery_type = 'courier'; 2910 this.widget = null; 2911 this.autocomplete = null; 2912 this.resetDelivery(); 2913 }, 2914 increase: function increase(item) { 2915 if (item.count >= 20) { 2916 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('Ðе более 20 ÑÑÑк на Ð¾Ð´Ð½Ñ Ð¿Ð¾Ð·Ð¸ÑиÑ'); 2917 return; 2918 } 2919 this.$parent.available.forEach(function (i) { 2920 if (item.id === i.id) { 2921 console.log('count: ' + i.count + ', order count: ' + item.count, i.count < item.count); 2922 if (i.count <= item.count) { 2923 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('ÐакÑималÑное колиÑеÑÑво!'); 2924 } else { 2925 item.count++; 2926 item.total += item.price; 2927 } 2928 } 2929 }); 2930 }, 2931 decrease: function decrease(item, index) { 2932 this.$parent.available.forEach(function (i) { 2933 if (item.id === i.id) { 2934 item.count--; 2935 item.total -= item.price; 2936 } 2937 }); 2938 if (item.count <= 0) { 2939 this.order.items.splice(index, 1); 2940 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].success(item.name + ' Ñдалено!'); 2941 } 2942 }, 2943 remove: function remove(item, index) { 2944 this.order.items.splice(index, 1); 2945 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].success(item.name + ' Ñдалено!'); 2946 }, 2947 calcTotal: function calcTotal() { 2948 var order = this.order; 2949 this.order.items_cost = 0; 2950 order.items.forEach(function (item) { 2951 order.items_cost += item.price * item.count; 2952 }); 2953 order.total = order.items_cost + order.delivery_cost; 2954 }, 2955 /*calculate: function () { 2956 let _this = this; 2957 if(this.busy) 2958 return; 2959 this.busy = true; 2960 this.order.delivery_cost = 0; 2961 axios.post('/store/calculate', this.order).then(function (response) { 2962 _this.order.delivery_cost = response.data; 2963 console.log('calc', _this.order.delivery_cost, response.data) 2964 _this.delivery_calculated = true; 2965 }).catch(function (error) { 2966 toast.error('оÑибка') 2967 }).finally(function () { 2968 _this.busy = false; 2969 _this.calcTotal(); 2970 }); 2971 },*/ 2972 2973 saveOrder: function saveOrder() { 2974 var _this = this; 2975 if (this.busy) return; 2976 this.errors = {}; 2977 if (!this.order.name) this.errors['name'] = 'ÐÐ¼Ñ Ð½Ðµ Ñказано'; 2978 if (!this.order.last_name) this.errors['last_name'] = 'Ð¤Ð°Ð¼Ð¸Ð»Ð¸Ñ Ð½Ðµ Ñказана'; 2979 if (!this.order.phone) this.errors['phone'] = 'ТелеÑон не Ñказан'; 2980 if (!this.order.email) this.errors['email'] = 'E-mail не Ñказан'; 2981 if (this.order.delivery_type === 'courier') { 2982 if (!this.order.city_id) { 2983 this.errors['city'] = 'Ðе вÑбÑан гоÑод'; 2984 } 2985 if (!this.order.street) { 2986 this.errors['street'] = 'Ðе вÑбÑана ÑлиÑа'; 2987 } 2988 if (!this.order.house) { 2989 this.errors['house'] = 'Ðе вÑбÑан дом'; 2990 } 2991 } 2992 if (Object.keys(this.errors).length > 0) { 2993 var message = ''; 2994 Object.keys(this.errors).map(function (field) { 2995 message += _this.errors[field] + '<br>'; 2996 }); 2997 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(message); 2998 return; 2999 } 3000 this.busy = true; 3001 axios__WEBPACK_IMPORTED_MODULE_2___default().post('/store/order?delivery_service=' + this.delivery_service, this.order).then(function (response) { 3002 //_this.order = response.data; 3003 //_this.cdekOrder(); 3004 console.log(response.data); 3005 window.location.href = response.data; 3006 })["catch"](function (error) { 3007 console.log(error); 3008 if (error.response.status === 404) { 3009 error.response.data.forEach(function (error) { 3010 var el = document.getElementById('item_' + error.id); 3011 el.classList.add('shadow'); 3012 document.querySelector('.order-bag').scrollIntoView({ 3013 behavior: 'smooth' 3014 }); 3015 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(error.message); 3016 setTimeout(function () { 3017 el.classList.remove('shadow'); 3018 }, 5000); 3019 }); 3020 } else { 3021 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('ÐÑибка!'); 3022 } 3023 })["finally"](function () { 3024 _this.busy = false; 3025 }); 3026 }, 3027 cdekOrder: function cdekOrder() { 3028 var _this = this; 3029 axios__WEBPACK_IMPORTED_MODULE_2___default().post('/store/cdekOrder', this.order).then(function (response) { 3030 console.log(response.data); 3031 _this.order = response.data; 3032 _this.yandexCheckout(); 3033 })["catch"](function (error) { 3034 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(error.response.data, 'ÐÑибка!'); 3035 _this.busy = false; 3036 }); 3037 }, 3038 yandexCheckout: function yandexCheckout() { 3039 var _this = this; 3040 axios__WEBPACK_IMPORTED_MODULE_2___default().post('/store/yandexCheckout', this.order).then(function (response) { 3041 console.log(response.data); 3042 //window.open(response.data, '_blank'); ios not working 3043 window.location.href = response.data; 3044 _this.order.items.forEach(function (item) { 3045 if (item.id === 151) _this.gameDisable(); 3046 }); 3047 })["catch"](function (error) { 3048 if (error.response.status === 404) { 3049 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(error.response.data.sold_out); 3050 } else { 3051 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('ÐÑибка!'); 3052 } 3053 })["finally"](function () { 3054 _this.busy = false; 3055 }); 3056 }, 3057 showItem: function showItem(item) { 3058 var _this2 = this; 3059 this.$parent.items.forEach(function (i) { 3060 if (item.id === i.id) _this2.$parent.showItem(i); 3061 }); 3062 }, 3063 initBoxberryWidget: function initBoxberryWidget() { 3064 window.boxberry.openOnPage('boxberry_map'); 3065 window.boxberry.open(this.setBoxberry, '1$VAp2p4L5_siSkwGS8ujfM_eaptZw9MgC', 'ÐоÑква', '', 500, 500, 0, 30, 21, 5); 3066 }, 3067 initCdekWidget: function initCdekWidget(callback) { 3068 window.cdek_widget = new window.CDEKWidget({ 3069 from: 'ÐоÑква', 3070 root: 'forpvz', 3071 apiKey: '25cc6ad5-278a-43b8-a12d-810df2a59ed8', 3072 servicePath: '/store/cdek', 3073 defaultLocation: 'ÐоÑква', 3074 tariffs: { 3075 office: [234, 136, 138], 3076 door: [] 3077 }, 3078 hideDeliveryOptions: { 3079 office: false, 3080 door: true 3081 }, 3082 onChoose: onChoose 3083 }); 3084 // new ISDEKWidjet({ 3085 // defaultCity: 'ÐоÑква', 3086 // cityFrom: 'ÐоÑква', 3087 // country: 'РоÑÑиÑ', 3088 // link: 'forpvz', 3089 // path: 'https://widget.cdek.ru/widget/scripts/', 3090 // servicepath: '/store/cdek', 3091 // apikey: '944a1fe3-74c9-4a75-8ff4-a3fd4234c119', 3092 // showWarns: false, 3093 // showErrors: true, 3094 // showLogs: false, 3095 // hidedress: true, 3096 // hidecash: true, 3097 // hidedelt: true, 3098 // onChoose: onChoose, 3099 // onReady: callback 3100 // }); 3101 3102 var _this = this; 3103 function onChoose(type, address, params) { 3104 console.log(type, address, params); 3105 _this.order.city = params.city; 3106 _this.order.city_id = params.city_code; 3107 _this.order.pvz_id = params.code; 3108 _this.order.street = params.address; 3109 _this.calculate(); 3110 } 3111 }, 3112 removeWidgets: function removeWidgets() { 3113 if (document.querySelector('#forpvz')) document.querySelector('#forpvz').innerHTML = ''; 3114 if (document.querySelector('#boxberry_map')) document.querySelector('#boxberry_map').innerHTML = ''; 3115 this.widgetBoxberry = null; 3116 this.widgetCdek = null; 3117 }, 3118 getCities: function getCities(input) { 3119 if (input.length < 3) return; 3120 return axios__WEBPACK_IMPORTED_MODULE_2___default().get('/store/city?delivery_service=' + this.delivery_service + '&q=' + input).then(function (response) { 3121 return response.data; 3122 }); 3123 }, 3124 autocompleteFormat: function autocompleteFormat(result) { 3125 console.log(result); 3126 if (typeof result.area !== 'undefined') return result.name + ' (' + result.area + ')'; 3127 return result.name; 3128 }, 3129 autocompleteSubmit: function autocompleteSubmit(city) { 3130 this.order.city = city.name; 3131 this.order.city_id = city.id; 3132 if (this.delivery_service === 'cdek') this.calculate(); 3133 }, 3134 setCity: function setCity(data) { 3135 var _this = this; 3136 console.log('set city', data); 3137 this.$nextTick(function () { 3138 _this.order.city = data.name; 3139 _this.order.city_id = data.id; 3140 _this.$refs.city.clearSuggestions(); 3141 _this.calculate(); 3142 }); 3143 }, 3144 unsetCity: function unsetCity() { 3145 if (this.order.city) { 3146 this.order.city = null; 3147 this.order.city_id = null; 3148 this.order.street = null; 3149 this.order.flat = null; 3150 this.$refs.city.setText(''); 3151 this.$refs.street.setText(''); 3152 } 3153 }, 3154 getSteets: function getSteets(input) { 3155 var _this = this, 3156 token = "0cdeff147d66a748b6de8a85769629391686a1ca"; 3157 if (!this.order.city) { 3158 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('ÐÑбеÑиÑе гоÑод'); 3159 this.$refs.street.setText(''); 3160 return []; 3161 } 3162 if (input.length < 3) return; 3163 return axios__WEBPACK_IMPORTED_MODULE_2___default().post('https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address', { 3164 query: input, 3165 locations: [{ 3166 city: _this.order.city 3167 }], 3168 to_bound: { 3169 value: 'street' 3170 }, 3171 restrict_value: true 3172 }, { 3173 headers: { 3174 "Content-Type": "application/json", 3175 "Accept": "application/json", 3176 "Authorization": "Token " + token 3177 } 3178 }).then(function (response) { 3179 return response.data.suggestions; 3180 }); 3181 }, 3182 setStreet: function setStreet(data) { 3183 this.order.street = data.value; 3184 }, 3185 isError: function isError(field) { 3186 return typeof this.errors[field] !== 'undefined'; 3187 }, 3188 resetDelivery: function resetDelivery() { 3189 this.delivery_calculated = false; 3190 this.order.city = null; 3191 this.order.city_id = null; 3192 this.order.pvz_id = null; 3193 this.order.street = null; 3194 if (document.querySelector('#forpvz > *')) { 3195 document.querySelector('#forpvz > *').classList.remove('mobile'); 3196 } 3197 }, 3198 addGame: function addGame() { 3199 this.order.items.push({ 3200 id: 151, 3201 name: 'ÐвÑоÑÐµÐ²Ñ Quiz', 3202 image: 'https://autoreview.ru/images/Item/1/Item_151.jpg', 3203 price: 990, 3204 total: 990, 3205 count: 1 3206 }); 3207 }, 3208 gameDisable: function gameDisable() { 3209 this.gameHint = false; 3210 document.cookie = 'game_disable=true; expires=Sun, 1 Jan 2033 00:00:00 UTC; path=/;'; 3211 }, 3212 gameClose: function gameClose() { 3213 this.gameHint = false; 3214 }, 3215 getCookie: function getCookie(name) { 3216 var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); 3217 return v ? v[2] : null; 3218 } 3219 } 3220}); 3221 3222/***/ }), 3223 3224/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js&": 3225/*!****************************************************************************************************************************************************************************************************************************************!*\ 3226 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js& ***! 3227 \****************************************************************************************************************************************************************************************************************************************/ 3228/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3229 3230"use strict"; 3231__webpack_require__.r(__webpack_exports__); 3232/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3233/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3234/* harmony export */ }); 3235/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 3236/* harmony import */ var smartphoto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! smartphoto */ "./node_modules/smartphoto/lib/index.js"); 3237/* harmony import */ var smartphoto__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(smartphoto__WEBPACK_IMPORTED_MODULE_1__); 3238/* harmony import */ var smartphoto_css_smartphoto_min_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! smartphoto/css/smartphoto.min.css */ "./node_modules/smartphoto/css/smartphoto.min.css"); 3239/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/dist/js/swiper.esm.bundle.js"); 3240// 3241// 3242// 3243// 3244// 3245// 3246// 3247// 3248// 3249// 3250// 3251// 3252// 3253// 3254// 3255// 3256// 3257// 3258// 3259// 3260// 3261// 3262// 3263// 3264// 3265// 3266// 3267// 3268// 3269// 3270// 3271// 3272// 3273// 3274// 3275// 3276// 3277// 3278// 3279// 3280// 3281// 3282// 3283// 3284// 3285// 3286// 3287// 3288// 3289// 3290// 3291// 3292// 3293// 3294// 3295// 3296// 3297// 3298// 3299// 3300// 3301// 3302// 3303// 3304// 3305// 3306// 3307// 3308// 3309// 3310// 3311// 3312// 3313// 3314// 3315// 3316// 3317// 3318// 3319// 3320// 3321// 3322 3323 3324 3325 3326 3327/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 3328 props: { 3329 item: { 3330 required: true 3331 } 3332 }, 3333 data: function data() { 3334 return {}; 3335 }, 3336 mounted: function mounted() { 3337 new (smartphoto__WEBPACK_IMPORTED_MODULE_1___default())('.gallery-top a', { 3338 resizeStyle: 'fit', 3339 nav: false 3340 }); 3341 var galleryThumbs = new swiper__WEBPACK_IMPORTED_MODULE_3__["default"]('.gallery-thumbs', { 3342 spaceBetween: 10, 3343 centeredSlides: true, 3344 slidesPerView: 4, 3345 touchRatio: 0.2, 3346 slideToClickedSlide: true 3347 }); 3348 var galleryTop = new swiper__WEBPACK_IMPORTED_MODULE_3__["default"]('.gallery-top', { 3349 spaceBetween: 10, 3350 navigation: { 3351 nextEl: '.swiper-button-next', 3352 prevEl: '.swiper-button-prev' 3353 }, 3354 thumbs: { 3355 swiper: galleryThumbs 3356 } 3357 }); 3358 galleryTop.controller.control = galleryThumbs; 3359 galleryThumbs.controller.control = galleryTop; 3360 }, 3361 watch: {}, 3362 computed: {}, 3363 methods: { 3364 availability: function availability(_availability) { 3365 var states = { 3366 none: ['_red', 'ÐÐµÑ Ð² налиÑии'], 3367 low: ['_orange', 'ÐÑÑалоÑÑ Ð½ÐµÐ¼Ð½Ð¾Ð³Ð¾'], 3368 high: ['_greed', 'РналиÑии'] 3369 }; 3370 return states[_availability]; 3371 }, 3372 delivery: function delivery() { 3373 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].info('ÐобавиÑÑ Ð¸Ð½Ñо о доÑÑавке?'); 3374 } 3375 } 3376}); 3377 3378/***/ }), 3379 3380/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js&": 3381/*!*****************************************************************************************************************************************************************************************************************************************!*\ 3382 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js& ***! 3383 \*****************************************************************************************************************************************************************************************************************************************/ 3384/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3385 3386"use strict"; 3387__webpack_require__.r(__webpack_exports__); 3388/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3389/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3390/* harmony export */ }); 3391/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js"); 3392/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); 3393/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 3394// 3395// 3396// 3397// 3398// 3399// 3400// 3401// 3402// 3403// 3404// 3405// 3406// 3407// 3408// 3409// 3410// 3411// 3412// 3413// 3414 3415 3416 3417/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 3418 props: { 3419 items: { 3420 required: true 3421 } 3422 }, 3423 data: function data() { 3424 return { 3425 busy: false, 3426 page: 0, 3427 last_page: 0 3428 }; 3429 }, 3430 mounted: function mounted() { 3431 this.page = 0; 3432 this.more(); 3433 //} 3434 }, 3435 3436 methods: { 3437 more: function more() { 3438 var _this = this; 3439 if (this.busy) return; 3440 this.busy = true; 3441 axios__WEBPACK_IMPORTED_MODULE_0___default().get('/store/more?page=' + (this.page + 1)).then(function (response) { 3442 var data = response.data; 3443 _this.last_page = data.last_page; 3444 if (_this.page === 0) { 3445 _this.items = data.data; 3446 } else { 3447 _this.items = _this.items.concat(data.data); 3448 } 3449 _this.$emit('update', _this.items); 3450 _this.page = data.current_page; 3451 })["catch"](function (error) { 3452 _plugins_toast__WEBPACK_IMPORTED_MODULE_1__["default"].error('ÐÑибка!'); 3453 })["finally"](function () { 3454 _this.busy = false; 3455 }); 3456 }, 3457 checkHint: function checkHint() { 3458 console.log(document.cookie.indexOf('store_hint') > -1); 3459 return document.cookie.indexOf('store_hint') > -1; 3460 }, 3461 hideHint: function hideHint(e) { 3462 e.target.closest('.hide').style.display = 'none'; 3463 document.cookie = 'store_hint=true; expires=' + new Date(new Date().getTime() + 600 * 24 * 3600 * 1000) + ';path=/;'; 3464 } 3465 } 3466}); 3467 3468/***/ }), 3469 3470/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js&": 3471/*!*****************************************************************************************************************************************************************************************************************************************!*\ 3472 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js& ***! 3473 \*****************************************************************************************************************************************************************************************************************************************/ 3474/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3475 3476"use strict"; 3477__webpack_require__.r(__webpack_exports__); 3478/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3479/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3480/* harmony export */ }); 3481/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js"); 3482/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); 3483/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 3484// 3485// 3486// 3487// 3488// 3489// 3490// 3491// 3492// 3493// 3494// 3495// 3496// 3497// 3498// 3499// 3500// 3501// 3502// 3503// 3504 3505 3506 3507/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 3508 props: { 3509 items: { 3510 required: true 3511 } 3512 }, 3513 data: function data() { 3514 return { 3515 busy: false, 3516 page: 1, 3517 last_page: 1 3518 }; 3519 }, 3520 mounted: function mounted() { 3521 this.items = []; 3522 this.more(); 3523 }, 3524 beforeDestroy: function beforeDestroy() { 3525 this.items = []; 3526 console.log('dest'); 3527 }, 3528 methods: { 3529 more: function more() { 3530 var _this = this; 3531 if (this.busy) return; 3532 this.busy = true; 3533 axios__WEBPACK_IMPORTED_MODULE_0___default().get('/store/more?page=' + this.page + '&type=merch').then(function (response) { 3534 var data = response.data; 3535 _this.last_page = data.last_page; 3536 _this.items = _this.items.concat(data.data); 3537 _this.$emit('update', _this.items); 3538 if (_this.last_page > _this.page) _this.page++; 3539 })["catch"](function (error) { 3540 _plugins_toast__WEBPACK_IMPORTED_MODULE_1__["default"].error('ÐÑибка!'); 3541 })["finally"](function () { 3542 _this.busy = false; 3543 }); 3544 } 3545 } 3546}); 3547 3548/***/ }), 3549 3550/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js&": 3551/*!*****************************************************************************************************************************************************************************************************************************************!*\ 3552 !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js& ***! 3553 \*****************************************************************************************************************************************************************************************************************************************/ 3554/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3555 3556"use strict"; 3557__webpack_require__.r(__webpack_exports__); 3558/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3559/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3560/* harmony export */ }); 3561/* harmony import */ var _plugins_toast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../plugins/toast */ "./resources/assets/js/plugins/toast.js"); 3562/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js"); 3563/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__); 3564// 3565// 3566// 3567// 3568// 3569// 3570// 3571// 3572// 3573// 3574// 3575// 3576// 3577// 3578// 3579// 3580// 3581// 3582// 3583// 3584// 3585// 3586// 3587// 3588// 3589// 3590// 3591// 3592// 3593// 3594// 3595// 3596// 3597// 3598// 3599// 3600// 3601// 3602// 3603// 3604// 3605// 3606// 3607// 3608// 3609// 3610// 3611// 3612// 3613// 3614// 3615// 3616// 3617// 3618// 3619// 3620// 3621// 3622// 3623// 3624// 3625// 3626// 3627// 3628// 3629// 3630// 3631// 3632// 3633// 3634// 3635// 3636// 3637// 3638// 3639// 3640// 3641// 3642// 3643// 3644// 3645// 3646// 3647// 3648// 3649// 3650// 3651// 3652// 3653// 3654 3655 3656 3657//import MaskedInput from 'vue-masked-input' 3658 3659/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 3660 props: { 3661 order: { 3662 required: true 3663 } 3664 }, 3665 data: function data() { 3666 return { 3667 items_cost: 0, 3668 total: 0, 3669 busy: false 3670 }; 3671 }, 3672 mounted: function mounted() { 3673 this.calcTotal(); 3674 }, 3675 methods: { 3676 calcTotal: function calcTotal() { 3677 var _this2 = this; 3678 this.items_cost = 0; 3679 this.order.items.forEach(function (item) { 3680 _this2.items_cost += item.price * item.count; 3681 }); 3682 this.total = this.items_cost + this.order.delivery_cost; 3683 }, 3684 showItem: function showItem(item) { 3685 var _this3 = this; 3686 this.$parent.items.forEach(function (i) { 3687 if (item.id === i.id) _this3.$parent.showItem(i); 3688 }); 3689 }, 3690 yandexCheckout: function yandexCheckout() { 3691 var _this = this; 3692 axios__WEBPACK_IMPORTED_MODULE_1___default().post('/store/yandexCheckout', this.order).then(function (response) { 3693 console.log(response.data); 3694 //window.open(response.data, '_blank'); ios not working 3695 window.location.href = response.data; 3696 })["catch"](function (error) { 3697 if (error.response.status === 404) { 3698 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error(error.response.data.sold_out); 3699 } else { 3700 _plugins_toast__WEBPACK_IMPORTED_MODULE_0__["default"].error('ÐÑибка!'); 3701 } 3702 })["finally"](function () { 3703 _this.busy = false; 3704 }); 3705 } 3706 } 3707}); 3708 3709/***/ }), 3710
3711/***/ "./resources/assets/js/plugins/debounce.js": 3712/*!*************************************************!*\ 3713 !*** ./resources/assets/js/plugins/debounce.js ***! 3714 \*************************************************/ 3715/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3716 3717"use strict"; 3718__webpack_require__.r(__webpack_exports__); 3719/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3720/* harmony export */ "default": () => (/* binding */ debounce) 3721/* harmony export */ }); 3722function debounce(fn, delay) { 3723 var timeoutID = null; 3724 return function () { 3725 clearTimeout(timeoutID); 3726 var args = arguments; 3727 var that = this; 3728 timeoutID = setTimeout(function () { 3729 fn.apply(that, args); 3730 }, delay); 3731 }; 3732} 3733 3734/***/ }), 3735
3736/***/ "./resources/assets/js/plugins/toast.js": 3737/*!**********************************************!*\ 3738 !*** ./resources/assets/js/plugins/toast.js ***! 3739 \**********************************************/ 3740/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3741 3742"use strict"; 3743__webpack_require__.r(__webpack_exports__); 3744/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3745/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3746/* harmony export */ }); 3747/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 3748 defaults: { 3749 width: '', 3750 displayDuration: 4500, 3751 fadeOutDuration: 500 3752 }, 3753 info: function info(message, title) { 3754 this._toast('info', message, title); 3755 }, 3756 success: function success(message, title) { 3757 this._toast('success', message, title); 3758 }, 3759 warning: function warning(message, title) { 3760 this._toast('warning', message, title); 3761 }, 3762 error: function error(message, title) { 3763 this._toast('error', message, title); 3764 }, 3765 _toast: function _toast(type, message, title) { 3766 var options = this.defaults; 3767 var _container = document.querySelector('#toast-container'); 3768 if (!_container) { 3769 _container = document.createElement('div'); 3770 _container.id = 'toast-container'; 3771 document.body.appendChild(_container); 3772 } 3773 if (options.width) { 3774 _container.style.width = options.width; 3775 } 3776 var inner = document.createElement('div'); 3777 inner.className = 'toast toast-' + type; 3778 if (title) inner.innerHTML = '<div class="toast-title">' + title + '</div>'; 3779 if (message) inner.innerHTML += '<div class="toast-message">' + message + '</div>'; 3780 _container.appendChild(inner); 3781 if (options.displayDuration > 0) { 3782 setTimeout(function () { 3783 _container.remove(); 3784 }, options.displayDuration); 3785 } 3786 inner.addEventListener('click', function () { 3787 inner.remove(); 3788 }); 3789 } 3790}); 3791 3792/***/ }), 3793 3794/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/smartphoto/css/smartphoto.min.css": 3795/*!******************************************************************************************************************************************************************************************************************!*\ 3796 !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/smartphoto/css/smartphoto.min.css ***! 3797 \******************************************************************************************************************************************************************************************************************/ 3798/***/ ((module, __webpack_exports__, __webpack_require__) => { 3799 3800"use strict"; 3801__webpack_require__.r(__webpack_exports__); 3802/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3803/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3804/* harmony export */ }); 3805/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 3806/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 3807// Imports 3808 3809var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 3810// Module 3811___CSS_LOADER_EXPORT___.push([module.id, "@keyframes smartphoto{from{opacity:0}to{opacity:1}}@keyframes smartphoto-img-wrap{from{opacity:0}to{opacity:1}}@keyframes smartphoto-inner{from{transform:translate(0, 100px)}to{transform:translate(0, 0)}}@keyframes smartphoto-loader{0%{opacity:.4;transform:rotate(0deg)}50%{opacity:1;transform:rotate(180deg)}100%{opacity:.4;transform:rotate(360deg)}}@keyframes smartphoto-appear{0%{display:none;opacity:0}1%{display:block;opacity:0}
3811100%{display:block;opacity:1}}@keyframes smartphoto-hide{0%{display:block;opacity:1}99%{display:block;opacity:0}100%{display:none;opacity:0}}.smartphoto{position:fixed;z-index:100;top:0;left:0;width:100%;height:100%;overflow:hidden;background-color:#000;opacity:1;font-family:sans-serif;cursor:pointer;transition:opacity .3s ease-out;transition:all 0.3s ease-out;animation-name:smartphoto;animation-duration:.3s;animation-timing-function:ease-out}.smartphoto[aria-hidden=\"true\"]{display:none}.smartphoto-close{opacity:0}.smartphoto-count{display:inline-block;color:#FFF;font-size:16px}.smartphoto-header{display:block;box-sizing:border-box;position:fixed;z-index:102;top:0;left:0;width:100%;height:50px;padding:15px;background-color:rgba(0,0,0,0.2)}.smartphoto-content{display:block;position:absolute;top:0;left:0;width:100%;height:100%}.smartphoto-dismiss{display:block;position:absolute;top:15px;right:10px;width:20px;height:20px;padding:0;border:none;background-color:transparent;background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0i44Os44Kk44Ok44O8XzEiIGRhdGEtbmFtZT0i44Os44Kk44Ok44O8IDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI4MzQuNjUgMjgzNC42NSIgZmlsbD0iI0ZGRiI+PHRpdGxlPmljb248L3RpdGxlPjxwYXRoIGQ9Ik0xNTc2LjQyLDE0MDYuNzYsMjc4NCwxOTkuMTlhNTYuODYsNTYuODYsMCwwLDAsMC04MC4xOGwtNzguOTItNzguOTJhNTYuODYsNTYuODYsMCwwLDAtODAuMTgsMEwxNDE3LjMyLDEyNDcuNjYsMjA5Ljc1LDQwLjA5YTU2Ljg2LDU2Ljg2LDAsMCwwLTgwLjE4LDBMNTAuNjUsMTE5YTU2Ljg2LDU2Ljg2LDAsMCwwLDAsODAuMThMMTI1OC4yMywxNDA2Ljc2LDUwLjY1LDI2MTQuMzRhNTYuODYsNTYuODYsMCwwLDAsMCw4MC4xOGw3OC45Miw3OC45MmE1Ni44Niw1Ni44NiwwLDAsMCw4MC4xOCwwTDE0MTcuMzIsMTU2NS44NiwyNjI0LjksMjc3My40NGE1Ni44Niw1Ni44NiwwLDAsMCw4MC4xOCwwbDc4LjkyLTc4LjkyYTU2Ljg2LDU2Ljg2LDAsMCwwLDAtODAuMThaIi8+PC9zdmc+);text-shadow:0 1px 0 #FFF;color:#FFF;font-size:30px;text-decoration:none;cursor:pointer;line-height:1}.smartphoto-body{position:relative;z-index:102;width:100%;height:100%;margin:0 auto}.smartphoto-inner{position:relative;width:100%;height:100%;vertical-align:top}.smartphoto-img{display:none;max-width:none;width:auto;height:auto;cursor:zoom-in;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:transform 0.3s ease-out;-webkit-user-drag:none}.smartphoto-img.active{display:block}.smartphoto-img-onmove{cursor:grab;cursor:-webkit-grab;transition:none}.smartphoto-img-elasticmove{transition:transform 0.3s ease-out}.smartphoto-img-wrap{display:inline-block;opacity:1;transition:opacity .3s ease-out;animation-name:smartphoto-img-wrap;animation-duration:.3s;animation-timing-function:ease-out}.smartphoto-img-left{transform:translateX(150%) !important}.smartphoto-img-right{transform:translateX(-150%) !important}.smartphoto-arrows{list-style-type:none;margin:0;padding:0;position:relative;z-index:1002;top:50%;left:0;opacity:1;animation-name:smartphoto-appear;animation-duration:.3s;animation-timing-function:ease-out}.smartphoto-arrows[aria-hidden=\"true\"]{animation-name:smartphoto-hide;display:none}.smartphoto-arrows li{display:block;position:absolute;top:50%;width:30px;height:30px;margin-top:-20px;animation-duration:.3s;animation-timing-function:ease-out;animation-name:smartphoto-appear}.smartphoto-arrows li:focus{outline:none}.smartphoto-arrows [aria-hidden=\"true\"]{animation-name:smartphoto-hide;display:none}.smartphoto-arrows a{display:block;width:100%;height:100%;text-decoration:none}.smartphoto-arrow-right{right:0;padding:5px 0;background-color:rgba(0,0,0,0.5)}.smartphoto-arrow-right a{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0i44Os44Kk44Ok44O8XzEiIGRhdGEtbmFtZT0i44Os44Kk44Ok44O8IDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI4MzQuNjUgMjgzNC42NSIgZmlsbD0iI0ZGRiAiPjx0aXRsZT5pY29uPC90aXRsZT48cGF0aCBkPSJNMTgzNy44OCwxNDE3LjMyLDY0My41OSwyMjNhNzIuMjEsNzIuMjEsMCwwLDEsMC0xMDEuODJMNzQzLjgyLDIxYTcyLjIxLDcyLjIxLDAsMCwxLDEwMS44MiwwTDIwOTAuODMsMTI2Ni4xOWwxMDAuMjMsMTAwLjIzYTcyLjIxLDcyLjIxLDAsMCwxLDAsMTAxLjgyTDg0NS42NCwyODEzLjY1YTcyLjIxLDcyLjIxLDAsMCwxLTEwMS44MiwwTDY0My41OSwyNzEzLjQyYTcyLjIxLDcyLjIxLDAsMCwxLDAtMTAxLjgyWiIvPjwvc3ZnPg==)}.smartphoto-arrow-left{left:0;padding:5px 0;background-color:rgba(0,0,0,0.5)}.smartphoto-arrow-left a{background-image:url(data:image/svg+xml;base64,PHN2ZyBpZD0i44Os44Kk44Ok44O8XzEiIGRhdGEtbmFtZT0i44Os44Kk44Ok44O8IDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI4MzQuNjUgMjgzNC42NSIgZmlsbD0iI0ZGRiI+PHRpdGxlPmljb248L3RpdGxlPjxwYXRoIGQ9Ik05OTYuNzcsMTQxNy4zMiwyMTkxLjA2LDIyM2E3Mi4yMSw3Mi4yMSwwLDAsMCwwLTEwMS44MkwyMDkwLjgzLDIxQTcyLjIxLDcyLjIxLDAsMCwwLDE5ODksMjFMNzQzLjgyLDEyNjYuMTksNjQzLjU5LDEzNjYuNDJhNzIuMjEsNzIuMjEsMCwwLDAsMCwxMDEuODJMMTk4OSwyODEzLjY1YTcyLjIxLDcyLjIxLDAsMCwwLDEwMS44MiwwbDEwMC4yMy0xMDAuMjNhNzIuMjEsNzIuMjEsMCwwLDAsMC0xMDEuODJaIi8+PC9zdmc+)}.smartPhotoArrowHideIcon{display:none}.smartphoto-nav{position:absolute;bottom:0;left:0;width:100%;opacity:1;animation-name:smartphoto-appear;animation-duration:.3s;animation-timing-function:ease-out}.smartphoto-nav[aria-hidden=\"true\"]{animation-name:smartphoto-hide;display:none}.smartphoto-nav ul{display:block;overflow-x:auto;list-style:none;margin:0;padding:0;text-align:center;white-space:nowrap;-webkit-overflow-scrolling:touch}.smartphoto-nav li{display:inline-block;overflow:hidden;width:50px;height:50px}.smartphoto-nav a{display:block;width:100%;height:100%;background-color:#FFF;background-position:center center;background-size:cover;opacity:.5}.smartphoto-nav a:focus{opacity:.8}.smartphoto-nav a.current{opacity:1}.smartphoto-nav img{width:auto;height:100%}.smartphoto-list{list-style-type:none;position:absolute;z-index:101;top:0;left:0;margin:0;padding:0;white-space:nowrap}.smartphoto-list li{display:block;position:absolute;top:0;left:0;width:100%;height:100%;transition:all 0.3s ease-out}.smartphoto-list li:focus{outline:none}.smartphoto-list-onmove{transition:all 0.3s ease-out}.smartphoto-caption{overflow:hidden;box-sizing:border-box;position:absolute;top:0;left:0;width:100%;height:50px;padding:0 50px;color:#FFF;font-size:12px;text-align:center;line-height:50px;white-space:nowrap;text-overflow:ellipsis}.smartphoto-caption:focus{outline:none}.smartphoto-loader-wrap{display:block;position:relative;z-index:103;width:0;height:0;transform:translate(50vw, 50vh)}.smartphoto-loader{position:absolute;z-index:101;top:0;left:0;width:30px;height:30px;margin-top:-25px;margin-left:-25px;border:8px solid #17CDDD;border-right-color:transparent;border-radius:50%;animation:smartphoto-loader .5s infinite linear}.smartphoto-img-clone{position:fixed;z-index:100;
3811top:0;left:0;transition:all .3s ease-out}.smartphoto-sr-only{overflow:hidden;position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;clip:rect(0, 0, 0, 0)}\n", ""]); 3812// Exports 3813/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); 3814 3815 3816/***/ }), 3817 3818/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&": 3819/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 3820 !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css& ***! 3821 \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 3822/***/ ((module, __webpack_exports__, __webpack_require__) => { 3823 3824"use strict"; 3825__webpack_require__.r(__webpack_exports__); 3826/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3827/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3828/* harmony export */ }); 3829/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 3830/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 3831// Imports 3832 3833var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 3834// Module 3835___CSS_LOADER_EXPORT___.push([module.id, "\n#toast-container {\n position: fixed;\n min-width: 150px;\n max-width: 320px;\n bottom: 15px;\n right: 15px;\n}\n#toast-container .toast {\n background: #f5f5f5;\n color: #0e0e0e;\n padding: 10px 15px;\n cursor: pointer;\n border-bottom: 2px solid;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.35);\n margin-top: 20px;\n}\n#toast-container .toast-info {\n border-color: #5ca2f9;\n}\n#toast-container .toast-warning {\n border-color: #c7c7c7;\n}\n#toast-container .toast-error {\n border-color: #e0002a;\n}\n#toast-container .toast-success {\n border-color: #00b200;\n}\n@media only screen and (max-width: 959px) {\n.desktop {\n display: none;\n}\n.foot-nav {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n margin: 0 20px;\n justify-content: center;\n}\n.foot-nav div {\n width: 36%;\n display: flex;\n flex-direction: column;\n text-align: center;\n}\n.foot-nav a {\n margin-bottom: 20px;\n color: rgba(255, 255, 255, 0.5);\n font: 16px/16px \"OpenSans Semi Bold\";\n text-transform: uppercase;\n text-decoration: none;\n display: inline-block;\n position: relative;\n}\n.foot-nav div:last-child {\n flex-direction: row;\n flex: 1 1 100%;\n justify-content: center;\n margin-bottom: 30px;\n padding: 10px 0;\n border-top: 1px dashed rgba(255, 255, 255, 0.2);\n border-bottom: 1px dashed rgba(255, 255, 255, 0.2);\n}\n.foot-nav div:last-child a {\n margin-bottom: 0;\n color: #fff;\n}\n.foot-nav div:last-child a:first-child:after {\n content: \"â¢\";\n color: rgba(255, 255, 255, 0.1);\n display: inline-block;\n vertical-align: top;\n margin: 0 10px;\n}\n.page-wrapper-content_price {\n color: #999;\n font: 34px/50px \"OpenSans Semi Bold\";\n margin: 30px 0 25px;\n display: inline-block;\n vertical-align: middle;\n}\n.page-wrapper-content_price span:after {\n content: \"\\e900\";\n font: 24px/24px \"icon\";\n display: inline-block;\n vertical-align: top;\n margin: 14px 0 0 5px;\n}\n.page-wrapper-content_nalichee {\n font: 16px/16px \"OpenSans\";\n align-items: center;\n position: relative;\n margin: 5px 0 0 20px;\n display: inline-block;\n vertical-align: middle;\n}\n.page-wrapper-content_nalichee:before {\n content: \"\";\n width: 8px;\n height: 8px;\n display: inline-block;\n border-radius: 100%;\n background: #ccc;\n margin-right: 10px;\n}\n._green:before {\n background: #33A000;\n}\n._orange:before {\n background: #FF9900;\n}\n._red:before {\n background: #BC0023;\n}\n.order-bag-item,\n .order-bag-item:last-child {\n display: grid;\n}\n.order-bag-item_image {\n grid-area: 1 / 1 / 4 / 2;\n}\n.order-bag-item_text {\n grid-area: 1 / 2 / 2 / 3;\n}\n.order-bag-item_coll {\n grid-area: 3 / 2 / 4 / 3;\n}\n.order-bag-item_price {\n grid-area: 2 / 2 / 3 / 3;\n}\n}\n@media only screen and (min-width: 960px) {\n.mobile {\n display: none;\n}\n}\n", ""]); 3836// Exports 3837/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_
3837LOADER_EXPORT___); 3838 3839 3840/***/ }), 3841 3842/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&": 3843/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 3844 !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css& ***! 3845 \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 3846/***/ ((module, __webpack_exports__, __webpack_require__) => { 3847 3848"use strict"; 3849__webpack_require__.r(__webpack_exports__); 3850/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3851/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3852/* harmony export */ }); 3853/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 3854/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 3855// Imports 3856 3857var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 3858// Module 3859___CSS_LOADER_EXPORT___.push([module.id, "\n.autocomplete ul {\n position: absolute;\n margin-left: -18px;\n z-index: 1;\n background-color: #fff;\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);\n}\n.autocomplete ul > li {\n padding: 10px 20px;\n}\n.autocomplete ul > li:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n}\n.autocomplete button {\n display: none;\n}\nform.loading:before {\n content: '';\n background: rgba(248, 248, 248, 0.5);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 100;\n}\n.lds-ring {\n display: inline-block;\n width: 80px;\n height: 80px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin: -40px;\n z-index: 101;\n}\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #bbb;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #bbb transparent transparent transparent;\n}\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n0% {\n transform: rotate(0deg);\n}\n100% {\n transform: rotate(360deg);\n}\n}\n.game-close {\n position: absolute;\n right: 10px;\n top: 0;\n font-size: 30px;\n color: #8d8d8d;\n cursor: pointer;\n z-index: 1;\n}\n.delivery-service {\n justify-content: center;\n flex-wrap: wrap;\n}\n.delivery-service span {\n flex: 0 0 100%;\n text-align: center;\n}\n.delivery-service img {\n margin: 40px 10px;\n width: 150px;\n cursor: pointer;\n}\n.change-delivery img {\n width: 100px;\n vertical-align: middle;\n}\n.change-delivery i {\n cursor: pointer;\n}
3859\n.change-delivery i:hover:before {\n color: #e0002e;\n}\n.change-delivery i:before {\n color: #999;\n font: 16px \"icon\";\n content: \"\";\n margin-left: 5px;\n}\n.input input {\n width: 100%;\n}\n.order-bag-item.shadow {\n box-shadow: 0 0 10px rgba(188, 0, 35, 0.5);\n}\n", ""]); 3860// Exports 3861/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); 3862 3863 3864/***/ }), 3865 3866/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&": 3867/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 3868 !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css& ***! 3869 \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 3870/***/ ((module, __webpack_exports__, __webpack_require__) => { 3871 3872"use strict"; 3873__webpack_require__.r(__webpack_exports__); 3874/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3875/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3876/* harmony export */ }); 3877/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 3878/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 3879// Imports 3880 3881var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 3882// Module 3883___CSS_LOADER_EXPORT___.push([module.id, "\n.swiper-slide {\n background-size: contain!important;\n background-repeat: no-repeat!important;\n}\n.page-wrapper-content_text li {\n margin-bottom: 10px;\n}\n.page-wrapper-content_option-item .size .control_indicator {\n width: auto;\n min-width: 40px;\n color: #999;\n text-decoration: none;\n}\n.page-wrapper-content_option-item .size .control_indicator:after {\n min-width: 40px;\n width: 100%;\n left: auto;\n}\n.page-wrapper-images .swiper-container.gallery-thumbs .swiper-slide.swiper-slide-active {\n opacity: 1;\n}\n@media only screen and (max-width: 959px) {\n.page-wrapper-content_title {\n font-size: 22px;\n padding-bottom: 15px;\n}\n.page-wrapper {\n margin: 0;\n}\n}\n", ""]); 3884// Exports 3885/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); 3886 3887 3888/***/ }), 3889 3890/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&": 3891/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 3892 !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLo
3892ader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css& ***! 3893 \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 3894/***/ ((module, __webpack_exports__, __webpack_require__) => { 3895 3896"use strict"; 3897__webpack_require__.r(__webpack_exports__); 3898/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3899/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3900/* harmony export */ }); 3901/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); 3902/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); 3903// Imports 3904 3905var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); 3906// Module 3907___CSS_LOADER_EXPORT___.push([module.id, "\n#autoComplete_list {\n position: absolute;\n margin-top: 45px;\n margin-left: -18px;\n z-index: 1;\n background-color: #fff;\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);\n}\n#autoComplete_list > li {\n padding: 10px 20px;\n}\n#autoComplete_list > li:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n}\n.order-order-grid .input input,\ntextarea {\n background: transparent!important;\n}\nform.loading:before {\n content: '';\n background: rgba(248, 248, 248, 0.5);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 100;\n}\n.lds-ring {\n display: inline-block;\n width: 80px;\n height: 80px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin: -40px;\n z-index: 101;\n}\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #bbb;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #bbb transparent transparent transparent;\n}\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n0% {\n transform: rotate(0deg);\n}\n100% {\n transform: rotate(360deg);\n}\n}\n", ""]); 3908// Exports 3909/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); 3910 3911 3912/***/ }), 3913
vendor: 1,872 bytes, lines 3914-3989
3914/***/ "./node_modules/css-loader/dist/runtime/api.js": 3915/*!*****************************************************!*\ 3916 !*** ./node_modules/css-loader/dist/runtime/api.js ***! 3917 \*****************************************************/ 3918/***/ ((module) => { 3919 3920"use strict"; 3921 3922 3923/* 3924 MIT License http://www.opensource.org/licenses/mit-license.php 3925 Author Tobias Koppers @sokra 3926*/ 3927// css base code, injected by the css-loader 3928// eslint-disable-next-line func-names 3929module.exports = function (cssWithMappingToString) { 3930 var list = []; // return the list of modules as css string 3931 3932 list.toString = function toString() { 3933 return this.map(function (item) { 3934 var content = cssWithMappingToString(item); 3935 3936 if (item[2]) { 3937 return "@media ".concat(item[2], " {").concat(content, "}"); 3938 } 3939 3940 return content; 3941 }).join(""); 3942 }; // import a list of modules into the list 3943 // eslint-disable-next-line func-names 3944 3945 3946 list.i = function (modules, mediaQuery, dedupe) { 3947 if (typeof modules === "string") { 3948 // eslint-disable-next-line no-param-reassign 3949 modules = [[null, modules, ""]]; 3950 } 3951 3952 var alreadyImportedModules = {}; 3953 3954 if (dedupe) { 3955 for (var i = 0; i < this.length; i++) { 3956 // eslint-disable-next-line prefer-destructuring 3957 var id = this[i][0]; 3958 3959 if (id != null) { 3960 alreadyImportedModules[id] = true; 3961 } 3962 } 3963 } 3964 3965 for (var _i = 0; _i < modules.length; _i++) { 3966 var item = [].concat(modules[_i]); 3967 3968 if (dedupe && alreadyImportedModules[item[0]]) { 3969 // eslint-disable-next-line no-continue 3970 continue; 3971 } 3972 3973 if (mediaQuery) { 3974 if (!item[2]) { 3975 item[2] = mediaQuery; 3976 } else { 3977 item[2] = "".concat(mediaQuery, " and ").concat(item[2]); 3978 } 3979 } 3980 3981 list.push(item); 3982 } 3983 }; 3984 3985 return list; 3986}; 3987 3988/***/ }), 3989
vendor: 1,609 bytes, lines 3990-4043
3990/***/ "./node_modules/custom-event-polyfill/custom-event-polyfill.js": 3991/*!*********************************************************************!*\ 3992 !*** ./node_modules/custom-event-polyfill/custom-event-polyfill.js ***! 3993 \*********************************************************************/ 3994/***/ (() => { 3995 3996// Polyfill for creating CustomEvents on IE9/10/11 3997 3998// code pulled from: 3999// https://github.com/d4tocchini/customevent-polyfill 4000// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill 4001 4002try { 4003 var ce = new window.CustomEvent('test'); 4004 ce.preventDefault(); 4005 if (ce.defaultPrevented !== true) { 4006 // IE has problems with .preventDefault() on custom events 4007 // http://stackoverflow.com/questions/23349191 4008 throw new Error('Could not prevent default'); 4009 } 4010} catch(e) { 4011 var CustomEvent = function(event, params) { 4012 var evt, origPrevent; 4013 params = params || { 4014 bubbles: false, 4015 cancelable: false, 4016 detail: undefined 4017 }; 4018 4019 evt = document.createEvent("CustomEvent"); 4020 evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); 4021 origPrevent = evt.preventDefault; 4022 evt.preventDefault = function () { 4023 origPrevent.call(this); 4024 try { 4025 Object.defineProperty(this, 'defaultPrevented', { 4026 get: function () { 4027 return true; 4028 } 4029 }); 4030 } catch(e) { 4031 this.defaultPrevented = true; 4032 } 4033 }; 4034 return evt; 4035 }; 4036 4037 CustomEvent.prototype = window.Event.prototype; 4038 window.CustomEvent = CustomEvent; // expose definition to window 4039} 4040 4041 4042/***/ }), 4043
vendor: 45,820 bytes, lines 4044-5493
4044/***/ "./node_modules/dom7/dist/dom7.modular.js": 4045/*!************************************************!*\ 4046 !*** ./node_modules/dom7/dist/dom7.modular.js ***! 4047 \************************************************/ 4048/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4049 4050"use strict"; 4051__webpack_require__.r(__webpack_exports__); 4052/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4053/* harmony export */ "$": () => (/* binding */ $), 4054/* harmony export */ "add": () => (/* binding */ add), 4055/* harmony export */ "addClass": () => (/* binding */ addClass), 4056/* harmony export */ "animate": () => (/* binding */ animate), 4057/* harmony export */ "animationEnd": () => (/* binding */ animationEnd), 4058/* harmony export */ "append": () => (/* binding */ append), 4059/* harmony export */ "appendTo": () => (/* binding */ appendTo), 4060/* harmony export */ "attr": () => (/* binding */ attr), 4061/* harmony export */ "blur": () => (/* binding */ blur), 4062/* harmony export */ "change": () => (/* binding */ change), 4063/* harmony export */ "children": () => (/* binding */ children), 4064/* harmony export */ "click": () => (/* binding */ click), 4065/* harmony export */ "closest": () => (/* binding */ closest), 4066/* harmony export */ "css": () => (/* binding */ css), 4067/* harmony export */ "data": () => (/* binding */ data), 4068/* harmony export */ "dataset": () => (/* binding */ dataset), 4069/* harmony export */ "detach": () => (/* binding */ detach), 4070/* harmony export */ "each": () => (/* binding */ each), 4071/* harmony export */ "empty": () => (/* binding */ empty), 4072/* harmony export */ "eq": () => (/* binding */ eq), 4073/* harmony export */ "filter": () => (/* binding */ filter), 4074/* harmony export */ "find": () => (/* binding */ find), 4075/* harmony export */ "focus": () => (/* binding */ focus), 4076/* harmony export */ "focusin": () => (/* binding */ focusin), 4077/* harmony export */ "focusout": () => (/* binding */ focusout), 4078/* harmony export */ "forEach": () => (/* binding */ forEach), 4079/* harmony export */ "hasClass": () => (/* binding */ hasClass), 4080/* harmony export */ "height": () => (/* binding */ height), 4081/* harmony export */ "hide": () => (/* binding */ hide), 4082/* harmony export */ "html": () => (/* binding */ html), 4083/* harmony export */ "index": () => (/* binding */ index), 4084/* harmony export */ "indexOf": () => (/* binding */ indexOf), 4085/* harmony export */ "insertAfter": () => (/* binding */ insertAfter), 4086/* harmony export */ "insertBefore": () => (/* binding */ insertBefore), 4087/* harmony export */ "is": () => (/* binding */ is), 4088/* harmony export */ "keydown": () => (/* binding */ keydown), 4089/* harmony export */ "keypress": () => (/* binding */ keypress), 4090/* harmony export */ "keyup": () => (/* binding */ keyup), 4091/* harmony export */ "map": () => (/* binding */ map), 4092/* harmony export */ "mousedown": () => (/* binding */ mousedown), 4093/* harmony export */ "mouseenter": () => (/* binding */ mouseenter), 4094/* harmony export */ "mouseleave": () => (/* binding */ mouseleave), 4095/* harmony export */ "mousemove": () => (/* binding */ mousemove), 4096/* harmony export */ "mouseout": () => (/* binding */ mouseout), 4097/* harmony export */ "mouseover": () => (/* binding */ mouseover), 4098/* harmony export */ "mouseup": () => (/* binding */ mouseup), 4099/* harmony export */ "next": () => (/* binding */ next), 4100/* harmony export */ "nextAll": () => (/* binding */ nextAll), 4101/* harmony export */ "off": () => (/* binding */ off), 4102/* harmony export */ "offset": () => (/* binding */ offset), 4103/* harmony export */ "on": () => (/* binding */ on), 4104/* harmony export */ "once": () => (/* binding */ once), 4105/* harmony export */ "outerHeight": () => (/* binding */ outerHeight), 4106/* harmony export */ "outerWidth": () => (/* binding */ outerWidth), 4107/* harmony export */ "parent": () => (/* binding */ parent), 4108/* harmony export */ "parents": () => (/* binding */ parents), 4109/* harmony export */ "prepend": () => (/* binding */ prepend), 4110/* harmony export */ "prependTo": () => (/* binding */ prependTo), 4111/* harmony export */ "prev": () => (/* binding */ prev), 4112/* harmony export */ "prevAll": () => (/* binding */ prevAll), 4113/* harmony export */ "prop": () => (/* binding */ prop), 4114/* harmony export */ "remove": () => (/* binding */ remove), 4115/* harmony export */ "removeAttr": () => (/* binding */ removeAttr), 4116/* harmony export */ "removeClass": () => (/* binding */ removeClass), 4117/* harmony export */ "removeData": () => (/* binding */ removeData), 4118/* harmony export */ "resize": () => (/* binding */ resize), 4119/* harmony export */ "scroll": () => (/* binding */ scroll), 4120/* harmony export */ "scrollLeft": () => (/* binding */ scrollLeft), 4121/* harmony export */ "scrollTo": () => (/* binding */ scrollTo), 4122/* harmony export */ "scrollTop": () => (/* binding */ scrollTop), 4123/* harmony export */ "show": () => (/* binding */ show), 4124/* harmony export */ "siblings": () => (/* binding */ siblings), 4125/* harmony export */ "stop": () => (/* binding */ stop), 4126/* harmony export */ "styles": () => (/* binding */ styles), 4127/* harmony export */ "submit": () => (/* binding */ submit), 4128/* harmony export */ "text": () => (/* binding */ text), 4129/* harmony export */ "toArray": () => (/* binding */ toArray), 4130/* harmony export */ "toggleClass": () => (/* binding */ toggleClass), 4131/* harmony export */ "touchend": () => (/* binding */ touchend), 4132/* harmony export */ "touchmove": () => (/* binding */ touchmove), 4133/* harmony export */ "touchstart": () => (/* binding */ touchstart), 4134/* harmony export */ "transform": () => (/* binding */ transform), 4135/* harmony export */ "transition": () => (/* binding */ transition), 4136/* harmony export */ "transitionEnd": () => (/* binding */ transitionEnd), 4137/* harmony export */ "trigger": () => (/* binding */ trigger), 4138/* harmony export */ "val": () => (/* binding */ val), 4139/* harmony export */ "width": () => (/* binding */ width) 4140/* harmony export */ }); 4141/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/dom7/node_modules/ssr-window/dist/ssr-window.esm.js"); 4142/** 4143 * Dom7 2.1.5 4144 * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API 4145 * http://framework7.io/docs/dom.html 4146 * 4147 * Copyright 2020, Vladimir Kharlampidi 4148 * The iDangero.us 4149 * http://www.idangero.us/ 4150 * 4151 * Licensed under MIT 4152 * 4153 * Released on: May 15, 2020 4154 */ 4155 4156 4157class Dom7 { 4158 constructor(arr) { 4159 const self = this; 4160 // Create array-like object 4161 for (let i = 0; i < arr.length; i += 1) { 4162 self[i] = arr[i]; 4163 } 4164 self.length = arr.length; 4165 // Return collection with methods 4166 return this; 4167 } 4168} 4169 4170function $(selector, context) { 4171 const arr = []; 4172 let i = 0; 4173 if (selector && !context) { 4174 if (selector instanceof Dom7) { 4175 return selector; 4176 } 4177 } 4178 if (selector) { 4179 // String 4180 if (typeof selector === 'string') { 4181 let els; 4182 let tempParent; 4183 const html = selector.trim(); 4184 if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { 4185 let toCreate = 'div'; 4186 if (html.indexOf('<li') === 0) toCreate = 'ul'; 4187 if (html.indexOf('<tr') === 0) toCreate = 'tbody'; 4188 if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr'; 4189 if (html.indexOf('<tbody') === 0) toCreate = 'table'; 4190 if (html.indexOf('<option') === 0) toCreate = 'select'; 4191 tempParent = ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.createElement(toCreate); 4192 tempParent.innerHTML = html; 4193 for (i = 0; i < tempParent.childNodes.length; i += 1) { 4194 arr.push(tempParent.childNodes[i]); 4195 } 4196 } else { 4197 if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) { 4198 // Pure ID selector 4199 els = [ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.getElementById(selector.trim().split('#')[1])]; 4200 } else { 4201 // Other selectors 4202 els = (context || ssr_window__WEBPACK_IMPORTED_MODULE_0__.document).querySelectorAll(selector.trim()); 4203 } 4204 for (i = 0; i < els.length; i += 1) { 4205 if (els[i]) arr.push(els[i]); 4206 } 4207 } 4208 } else if (selector.nodeType || selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window || selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__.document) { 4209 // Node/element 4210 arr.push(selector); 4211 } else if (selector.length > 0 && selector[0].nodeType) { 4212 // Array of elements or instance of Dom 4213 for (i = 0; i < selector.length; i += 1) { 4214 arr.push(selector[i]); 4215 } 4216 } 4217 } 4218 return new Dom7(arr); 4219} 4220 4221$.fn = Dom7.prototype; 4222$.Class = Dom7; 4223$.Dom7 = Dom7; 4224 4225function unique(arr) { 4226 const uniqueArray = []; 4227 for (let i = 0; i < arr.length; i += 1) { 4228 if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); 4229 } 4230 return uniqueArray; 4231} 4232function toCamelCase(string) { 4233 return string.toLowerCase().replace(/-(.)/g, (match, group1) => group1.toUpperCase()); 4234} 4235 4236function requestAnimationFrame(callback) { 4237 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.requestAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.requestAnimationFrame(callback); 4238 else if (ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.webkitRequestAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.webkitRequestAnimationFrame(callback); 4239 return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.setTimeout(callback, 1000 / 60); 4240} 4241function cancelAnimationFrame(id) { 4242 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.cancelAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.cancelAnimationFrame(id); 4243 else if (ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.webkitCancelAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.webkitCancelAnimationFrame(id); 4244 return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.clearTimeout(id); 4245} 4246 4247// Classes and attributes 4248function addClass(className) { 4249 if (typeof className === 'undefined') { 4250 return this; 4251 } 4252 const classes = className.split(' '); 4253 for (let i = 0; i < classes.length; i += 1) { 4254 for (let j = 0; j < this.length; j += 1) { 4255 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.add(classes[i]); 4256 } 4257 } 4258 return this; 4259} 4260function removeClass(className) { 4261 const classes = className.split(' '); 4262 for (let i = 0; i < classes.length; i += 1) { 4263 for (let j = 0; j < this.length; j += 1) { 4264 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.remove(classes[i]); 4265 } 4266 } 4267 return this; 4268} 4269function hasClass(className) { 4270 if (!this[0]) return false; 4271 return this[0].classList.contains(className); 4272} 4273function toggleClass(className) { 4274 const classes = className.split(' '); 4275 for (let i = 0; i < classes.length; i += 1) { 4276 for (let j = 0; j < this.length; j += 1) { 4277 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.toggle(classes[i]); 4278 } 4279 } 4280 return this; 4281} 4282function attr(attrs, value) { 4283 if (arguments.length === 1 && typeof attrs === 'string') { 4284 // Get attr 4285 if (this[0]) return this[0].getAttribute(attrs); 4286 return undefined; 4287 } 4288 4289 // Set attrs 4290 for (let i = 0; i < this.length; i += 1) { 4291 if (arguments.length === 2) { 4292 // String 4293 this[i].setAttribute(attrs, value); 4294 } else { 4295 // Object 4296 // eslint-disable-next-line 4297 for (const attrName in attrs) { 4298 this[i][attrName] = attrs[attrName]; 4299 this[i].setAttribute(attrName, attrs[attrName]); 4300 } 4301 } 4302 } 4303 return this; 4304} 4305// eslint-disable-next-line 4306function removeAttr(attr) { 4307 for (let i = 0; i < this.length; i += 1) { 4308 this[i].removeAttribute(attr); 4309 } 4310 return this; 4311} 4312// eslint-disable-next-line 4313function prop(props, value) { 4314 if (arguments.length === 1 && typeof props === 'string') { 4315 // Get prop 4316 if (this[0]) return this[0][props]; 4317 } else { 4318 // Set props 4319 for (let i = 0; i < this.length; i += 1) { 4320 if (arguments.length === 2) { 4321 // String 4322 this[i][props] = value; 4323 } else { 4324 // Object 4325 // eslint-disable-next-line 4326 for (const propName in props) { 4327 this[i][propName] = props[propName]; 4328 } 4329 } 4330 } 4331 return this; 4332 } 4333} 4334function data(key, value) { 4335 let el; 4336 if (typeof value === 'undefined') { 4337 el = this[0]; 4338 // Get value 4339 if (el) { 4340 if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) { 4341 return el.dom7ElementDataStorage[key]; 4342 } 4343 4344 const dataKey = el.getAttribute(`data-${key}`); 4345 if (dataKey) { 4346 return dataKey; 4347 } 4348 return undefined; 4349 } 4350 return undefined; 4351 } 4352 4353 // Set value 4354 for (let i = 0; i < this.length; i += 1) { 4355 el = this[i]; 4356 if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {}; 4357 el.dom7ElementDataStorage[key] = value; 4358 } 4359 return this; 4360} 4361function removeData(key) { 4362 for (let i = 0; i < this.length; i += 1) { 4363 const el = this[i]; 4364 if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) { 4365 el.dom7ElementDataStorage[key] = null; 4366 delete el.dom7ElementDataStorage[key]; 4367 } 4368 } 4369} 4370function dataset() { 4371 const el = this[0]; 4372 if (!el) return undefined; 4373 const dataset = {}; // eslint-disable-line 4374 if (el.dataset) { 4375 // eslint-disable-next-line 4376 for (const dataKey in el.dataset) { 4377 dataset[dataKey] = el.dataset[dataKey]; 4378 } 4379 } else { 4380 for (let i = 0; i < el.attributes.length; i += 1) { 4381 // eslint-disable-next-line 4382 const attr = el.attributes[i]; 4383 if (attr.name.indexOf('data-') >= 0) { 4384 dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value; 4385 } 4386 } 4387 } 4388 // eslint-disable-next-line 4389 for (const key in dataset) { 4390 if (dataset[key] === 'false') dataset[key] = false; 4391 else if (dataset[key] === 'true') dataset[key] = true; 4392 else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1; 4393 } 4394 return dataset; 4395} 4396function val(value) { 4397 const dom = this; 4398 if (typeof value === 'undefined') { 4399 if (dom[0]) { 4400 if (dom[0].multiple && dom[0].nodeName.toLowerCase() === 'select') { 4401 const values = []; 4402 for (let i = 0; i < dom[0].selectedOptions.length; i += 1) { 4403 values.push(dom[0].selectedOptions[i].value); 4404 } 4405 return values; 4406 } 4407 return dom[0].value; 4408 } 4409 return undefined; 4410 } 4411 4412 for (let i = 0; i < dom.length; i += 1) { 4413 const el = dom[i]; 4414 if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') { 4415 for (let j = 0; j < el.options.length; j += 1) { 4416 el.options[j].selected = value.indexOf(el.options[j].value) >= 0; 4417 } 4418 } else { 4419 el.value = value; 4420 } 4421 } 4422 return dom; 4423} 4424// Transforms 4425// eslint-disable-next-line 4426function transform(transform) { 4427 for (let i = 0; i < this.length; i += 1) { 4428 const elStyle = this[i].style; 4429 elStyle.webkitTransform = transform; 4430 elStyle.transform = transform; 4431 } 4432 return this; 4433} 4434function transition(duration) { 4435 if (typeof duration !== 'string') { 4436 duration = `${duration}ms`; // eslint-disable-line 4437 } 4438 for (let i = 0; i < this.length; i += 1) { 4439 const elStyle = this[i].style; 4440 elStyle.webkitTransitionDuration = duration; 4441 elStyle.transitionDuration = duration; 4442 } 4443 return this; 4444} 4445// Events 4446function on(...args) { 4447 let [eventType, targetSelector, listener, capture] = args; 4448 if (typeof args[1] === 'function') { 4449 [eventType, listener, capture] = args; 4450 targetSelector = undefined; 4451 } 4452 if (!capture) capture = false; 4453 4454 function handleLiveEvent(e) { 4455 const target = e.target; 4456 if (!target) return; 4457 const eventData = e.target.dom7EventData || []; 4458 if (eventData.indexOf(e) < 0) { 4459 eventData.unshift(e); 4460 } 4461 if ($(target).is(targetSelector)) listener.apply(target, eventData); 4462 else { 4463 const parents = $(target).parents(); // eslint-disable-line 4464 for (let k = 0; k < parents.length; k += 1) { 4465 if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData); 4466 } 4467 } 4468 } 4469 function handleEvent(e) { 4470 const eventData = e && e.target ? e.target.dom7EventData || [] : []; 4471 if (eventData.indexOf(e) < 0) { 4472 eventData.unshift(e); 4473 } 4474 listener.apply(this, eventData); 4475 } 4476 const events = eventType.split(' '); 4477 let j; 4478 for (let i = 0; i < this.length; i += 1) { 4479 const el = this[i]; 4480 if (!targetSelector) { 4481 for (j = 0; j < events.length; j += 1) { 4482 const event = events[j]; 4483 if (!el.dom7Listeners) el.dom7Listeners = {}; 4484 if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; 4485 el.dom7Listeners[event].push({ 4486 listener, 4487 proxyListener: handleEvent, 4488 }); 4489 el.addEventListener(event, handleEvent, capture); 4490 } 4491 } else { 4492 // Live events 4493 for (j = 0; j < events.length; j += 1) { 4494 const event = events[j]; 4495 if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; 4496 if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = []; 4497 el.dom7LiveListeners[event].push({ 4498 listener, 4499 proxyListener: handleLiveEvent, 4500 }); 4501 el.addEventListener(event, handleLiveEvent, capture); 4502 } 4503 } 4504 } 4505 return this; 4506} 4507function off(...args) { 4508 let [eventType, targetSelector, listener, capture] = args; 4509 if (typeof args[1] === 'function') { 4510 [eventType, listener, capture] = args; 4511 targetSelector = undefined; 4512 } 4513 if (!capture) capture = false; 4514 4515 const events = eventType.split(' '); 4516 for (let i = 0; i < events.length; i += 1) { 4517 const event = events[i]; 4518 for (let j = 0; j < this.length; j += 1) { 4519 const el = this[j]; 4520 let handlers; 4521 if (!targetSelector && el.dom7Listeners) { 4522 handlers = el.dom7Listeners[event]; 4523 } else if (targetSelector && el.dom7LiveListeners) { 4524 handlers = el.dom7LiveListeners[event]; 4525 } 4526 if (handlers && handlers.length) { 4527 for (let k = handlers.length - 1; k >= 0; k -= 1) { 4528 const handler = handlers[k]; 4529 if (listener && handler.listener === listener) { 4530 el.removeEventListener(event, handler.proxyListener, capture); 4531 handlers.splice(k, 1); 4532 } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { 4533 el.removeEventListener(event, handler.proxyListener, capture); 4534 handlers.splice(k, 1); 4535 } else if (!listener) { 4536 el.removeEventListener(event, handler.proxyListener, capture); 4537 handlers.splice(k, 1); 4538 } 4539 } 4540 } 4541 } 4542 } 4543 return this; 4544} 4545function once(...args) { 4546 const dom = this; 4547 let [eventName, targetSelector, listener, capture] = args; 4548 if (typeof args[1] === 'function') { 4549 [eventName, listener, capture] = args; 4550 targetSelector = undefined; 4551 } 4552 function onceHandler(...eventArgs) { 4553 listener.apply(this, eventArgs); 4554 dom.off(eventName, targetSelector, onceHandler, capture); 4555 if (onceHandler.dom7proxy) { 4556 delete onceHandler.dom7proxy; 4557 } 4558 } 4559 onceHandler.dom7proxy = listener; 4560 return dom.on(eventName, targetSelector, onceHandler, capture); 4561} 4562function trigger(...args) { 4563 const events = args[0].split(' '); 4564 const eventData = args[1]; 4565 for (let i = 0; i < events.length; i += 1) { 4566 const event = events[i]; 4567 for (let j = 0; j < this.length; j += 1) { 4568 const el = this[j]; 4569 let evt; 4570 try { 4571 evt = new ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.CustomEvent(event, { 4572 detail: eventData, 4573 bubbles: true, 4574 cancelable: true, 4575 }); 4576 } catch (e) { 4577 evt = ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.createEvent('Event'); 4578 evt.initEvent(event, true, true); 4579 evt.detail = eventData; 4580 } 4581 // eslint-disable-next-line 4582 el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); 4583 el.dispatchEvent(evt); 4584 el.dom7EventData = []; 4585 delete el.dom7EventData; 4586 } 4587 } 4588 return this; 4589} 4590function transitionEnd(callback) { 4591 const events = ['webkitTransitionEnd', 'transitionend']; 4592 const dom = this; 4593 let i; 4594 function fireCallBack(e) { 4595 /* jshint validthis:true */ 4596 if (e.target !== this) return; 4597 callback.call(this, e); 4598 for (i = 0; i < events.length; i += 1) { 4599 dom.off(events[i], fireCallBack); 4600 } 4601 } 4602 if (callback) { 4603 for (i = 0; i < events.length; i += 1) { 4604 dom.on(events[i], fireCallBack); 4605 } 4606 } 4607 return this; 4608} 4609function animationEnd(callback) { 4610 const events = ['webkitAnimationEnd', 'animationend']; 4611 const dom = this; 4612 let i; 4613 function fireCallBack(e) { 4614 if (e.target !== this) return; 4615 callback.call(this, e); 4616 for (i = 0; i < events.length; i += 1) { 4617 dom.off(events[i], fireCallBack); 4618 } 4619 } 4620 if (callback) { 4621 for (i = 0; i < events.length; i += 1) { 4622 dom.on(events[i], fireCallBack); 4623 } 4624 } 4625 return this; 4626} 4627// Sizing/Styles 4628function width() { 4629 if (this[0] === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window) { 4630 return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.innerWidth; 4631 } 4632 4633 if (this.length > 0) { 4634 return parseFloat(this.css('width')); 4635 } 4636 4637 return null; 4638} 4639function outerWidth(includeMargins) { 4640 if (this.length > 0) { 4641 if (includeMargins) { 4642 // eslint-disable-next-line 4643 const styles = this.styles(); 4644 return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); 4645 } 4646 return this[0].offsetWidth; 4647 } 4648 return null; 4649} 4650function height() { 4651 if (this[0] === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window) { 4652 return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.innerHeight; 4653 } 4654 4655 if (this.length > 0) { 4656 return parseFloat(this.css('height')); 4657 } 4658 4659 return null; 4660} 4661function outerHeight(includeMargins) { 4662 if (this.length > 0) { 4663 if (includeMargins) { 4664 // eslint-disable-next-line 4665 const styles = this.styles(); 4666 return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); 4667 } 4668 return this[0].offsetHeight; 4669 } 4670 return null; 4671} 4672function offset() { 4673 if (this.length > 0) { 4674 const el = this[0]; 4675 const box = el.getBoundingClientRect(); 4676 const body = ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.body; 4677 const clientTop = el.clientTop || body.clientTop || 0; 4678 const clientLeft = el.clientLeft || body.clientLeft || 0; 4679 const scrollTop = el === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window ? ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.scrollY : el.scrollTop; 4680 const scrollLeft = el === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window ? ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.scrollX : el.scrollLeft; 4681 return { 4682 top: (box.top + scrollTop) - clientTop, 4683 left: (box.left + scrollLeft) - clientLeft, 4684 }; 4685 } 4686 4687 return null; 4688} 4689function hide() { 4690 for (let i = 0; i < this.length; i += 1) { 4691 this[i].style.display = 'none'; 4692 } 4693 return this; 4694} 4695function show() { 4696 for (let i = 0; i < this.length; i += 1) { 4697 const el = this[i]; 4698 if (el.style.display === 'none') { 4699 el.style.display = ''; 4700 } 4701 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.getComputedStyle(el, null).getPropertyValue('display') === 'none') { 4702 // Still not visible 4703 el.style.display = 'block'; 4704 } 4705 } 4706 return this; 4707} 4708function styles() { 4709 if (this[0]) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.getComputedStyle(this[0], null); 4710 return {}; 4711} 4712function css(props, value) { 4713 let i; 4714 if (arguments.length === 1) { 4715 if (typeof props === 'string') { 4716 if (this[0]) return ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.getComputedStyle(this[0], null).getPropertyValue(props); 4717 } else { 4718 for (i = 0; i < this.length; i += 1) { 4719 // eslint-disable-next-line 4720 for (let prop in props) { 4721 this[i].style[prop] = props[prop]; 4722 } 4723 } 4724 return this; 4725 } 4726 } 4727 if (arguments.length === 2 && typeof props === 'string') { 4728 for (i = 0; i < this.length; i += 1) { 4729 this[i].style[props] = value; 4730 } 4731 return this; 4732 } 4733 return this; 4734} 4735 4736// Dom manipulation 4737function toArray() { 4738 const arr = []; 4739 for (let i = 0; i < this.length; i += 1) { 4740 arr.push(this[i]); 4741 } 4742 return arr; 4743} 4744// Iterate over the collection passing elements to `callback` 4745function each(callback) { 4746 // Don't bother continuing without a callback 4747 if (!callback) return this; 4748 // Iterate over the current collection 4749 for (let i = 0; i < this.length; i += 1) { 4750 // If the callback returns false 4751 if (callback.call(this[i], i, this[i]) === false) { 4752 // End the loop early 4753 return this; 4754 } 4755 } 4756 // Return `this` to allow chained DOM operations 4757 return this; 4758} 4759function forEach(callback) { 4760 // Don't bother continuing without a callback 4761 if (!callback) return this; 4762 // Iterate over the current collection 4763 for (let i = 0; i < this.length; i += 1) { 4764 // If the callback returns false 4765 if (callback.call(this[i], this[i], i) === false) { 4766 // End the loop early 4767 return this; 4768 } 4769 } 4770 // Return `this` to allow chained DOM operations 4771 return this; 4772} 4773function filter(callback) { 4774 const matchedItems = []; 4775 const dom = this; 4776 for (let i = 0; i < dom.length; i += 1) { 4777 if (callback.call(dom[i], i, dom[i])) matchedItems.push(dom[i]); 4778 } 4779 return new Dom7(matchedItems); 4780} 4781function map(callback) { 4782 const modifiedItems = []; 4783 const dom = this; 4784 for (let i = 0; i < dom.length; i += 1) { 4785 modifiedItems.push(callback.call(dom[i], i, dom[i])); 4786 } 4787 return new Dom7(modifiedItems); 4788} 4789// eslint-disable-next-line 4790function html(html) { 4791 if (typeof html === 'undefined') { 4792 return this[0] ? this[0].innerHTML : undefined; 4793 } 4794 4795 for (let i = 0; i < this.length; i += 1) { 4796 this[i].innerHTML = html; 4797 } 4798 return this; 4799} 4800// eslint-disable-next-line 4801function text(text) { 4802 if (typeof text === 'undefined') { 4803 if (this[0]) { 4804 return this[0].textContent.trim(); 4805 } 4806 return null; 4807 } 4808 4809 for (let i = 0; i < this.length; i += 1) { 4810 this[i].textContent = text; 4811 } 4812 return this; 4813} 4814function is(selector) { 4815 const el = this[0]; 4816 let compareWith; 4817 let i; 4818 if (!el || typeof selector === 'undefined') return false; 4819 if (typeof selector === 'string') { 4820 if (el.matches) return el.matches(selector); 4821 else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); 4822 else if (el.msMatchesSelector) return el.msMatchesSelector(selector); 4823 4824 compareWith = $(selector); 4825 for (i = 0; i < compareWith.length; i += 1) { 4826 if (compareWith[i] === el) return true; 4827 } 4828 return false; 4829 } else if (selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__.document) return el === ssr_window__WEBPACK_IMPORTED_MODULE_0__.document; 4830 else if (selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window) return el === ssr_window__WEBPACK_IMPORTED_MODULE_0__.window; 4831 4832 if (selector.nodeType || selector instanceof Dom7) { 4833 compareWith = selector.nodeType ? [selector] : selector; 4834 for (i = 0; i < compareWith.length; i += 1) { 4835 if (compareWith[i] === el) return true; 4836 } 4837 return false; 4838 } 4839 return false; 4840} 4841function indexOf(el) { 4842 for (let i = 0; i < this.length; i += 1) { 4843 if (this[i] === el) return i; 4844 } 4845 return -1; 4846} 4847function index() { 4848 let child = this[0]; 4849 let i; 4850 if (child) { 4851 i = 0; 4852 // eslint-disable-next-line 4853 while ((child = child.previousSibling) !== null) { 4854 if (child.nodeType === 1) i += 1; 4855 } 4856 return i; 4857 } 4858 return undefined; 4859} 4860// eslint-disable-next-line 4861function eq(index) { 4862 if (typeof index === 'undefined') return this; 4863 const length = this.length; 4864 let returnIndex; 4865 if (index > length - 1) { 4866 return new Dom7([]); 4867 } 4868 if (index < 0) { 4869 returnIndex = length + index; 4870 if (returnIndex < 0) return new Dom7([]); 4871 return new Dom7([this[returnIndex]]); 4872 } 4873 return new Dom7([this[index]]); 4874} 4875function append(...args) { 4876 let newChild; 4877 4878 for (let k = 0; k < args.length; k += 1) { 4879 newChild = args[k]; 4880 for (let i = 0; i < this.length; i += 1) { 4881 if (typeof newChild === 'string') { 4882 const tempDiv = ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.createElement('div'); 4883 tempDiv.innerHTML = newChild; 4884 while (tempDiv.firstChild) { 4885 this[i].appendChild(tempDiv.firstChild); 4886 } 4887 } else if (newChild instanceof Dom7) { 4888 for (let j = 0; j < newChild.length; j += 1) { 4889 this[i].appendChild(newChild[j]); 4890 } 4891 } else { 4892 this[i].appendChild(newChild); 4893 } 4894 } 4895 } 4896 4897 return this; 4898} 4899// eslint-disable-next-line 4900function appendTo(parent) { 4901 $(parent).append(this); 4902 return this; 4903} 4904function prepend(newChild) { 4905 let i; 4906 let j; 4907 for (i = 0; i < this.length; i += 1) { 4908 if (typeof newChild === 'string') { 4909 const tempDiv = ssr_window__WEBPACK_IMPORTED_MODULE_0__.document.createElement('div'); 4910 tempDiv.innerHTML = newChild; 4911 for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { 4912 this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); 4913 } 4914 } else if (newChild instanceof Dom7) { 4915 for (j = 0; j < newChild.length; j += 1) { 4916 this[i].insertBefore(newChild[j], this[i].childNodes[0]); 4917 } 4918 } else { 4919 this[i].insertBefore(newChild, this[i].childNodes[0]); 4920 } 4921 } 4922 return this; 4923} 4924// eslint-disable-next-line 4925function prependTo(parent) { 4926 $(parent).prepend(this); 4927 return this; 4928} 4929function insertBefore(selector) { 4930 const before = $(selector); 4931 for (let i = 0; i < this.length; i += 1) { 4932 if (before.length === 1) { 4933 before[0].parentNode.insertBefore(this[i], before[0]); 4934 } else if (before.length > 1) { 4935 for (let j = 0; j < before.length; j += 1) { 4936 before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]); 4937 } 4938 } 4939 } 4940} 4941function insertAfter(selector) { 4942 const after = $(selector); 4943 for (let i = 0; i < this.length; i += 1) { 4944 if (after.length === 1) { 4945 after[0].parentNode.insertBefore(this[i], after[0].nextSibling); 4946 } else if (after.length > 1) { 4947 for (let j = 0; j < after.length; j += 1) { 4948 after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling); 4949 } 4950 } 4951 } 4952} 4953function next(selector) { 4954 if (this.length > 0) { 4955 if (selector) { 4956 if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { 4957 return new Dom7([this[0].nextElementSibling]); 4958 } 4959 return new Dom7([]); 4960 } 4961 4962 if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]); 4963 return new Dom7([]); 4964 } 4965 return new Dom7([]); 4966} 4967function nextAll(selector) { 4968 const nextEls = []; 4969 let el = this[0]; 4970 if (!el) return new Dom7([]); 4971 while (el.nextElementSibling) { 4972 const next = el.nextElementSibling; // eslint-disable-line 4973 if (selector) { 4974 if ($(next).is(selector)) nextEls.push(next); 4975 } else nextEls.push(next); 4976 el = next; 4977 } 4978 return new Dom7(nextEls); 4979} 4980function prev(selector) { 4981 if (this.length > 0) { 4982 const el = this[0]; 4983 if (selector) { 4984 if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { 4985 return new Dom7([el.previousElementSibling]); 4986 } 4987 return new Dom7([]); 4988 } 4989 4990 if (el.previousElementSibling) return new Dom7([el.previousElementSibling]); 4991 return new Dom7([]); 4992 } 4993 return new Dom7([]); 4994} 4995function prevAll(selector) { 4996 const prevEls = []; 4997 let el = this[0]; 4998 if (!el) return new Dom7([]); 4999 while (el.previousElementSibling) { 5000 const prev = el.previousElementSibling; // eslint-disable-line 5001 if (selector) { 5002 if ($(prev).is(selector)) prevEls.push(prev); 5003 } else prevEls.push(prev); 5004 el = prev; 5005 } 5006 return new Dom7(prevEls); 5007} 5008function siblings(selector) { 5009 return this.nextAll(selector).add(this.prevAll(selector)); 5010} 5011function parent(selector) { 5012 const parents = []; // eslint-disable-line 5013 for (let i = 0; i < this.length; i += 1) { 5014 if (this[i].parentNode !== null) { 5015 if (selector) { 5016 if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); 5017 } else { 5018 parents.push(this[i].parentNode); 5019 } 5020 } 5021 } 5022 return $(unique(parents)); 5023} 5024function parents(selector) { 5025 const parents = []; // eslint-disable-line 5026 for (let i = 0; i < this.length; i += 1) { 5027 let parent = this[i].parentNode; // eslint-disable-line 5028 while (parent) { 5029 if (selector) { 5030 if ($(parent).is(selector)) parents.push(parent); 5031 } else { 5032 parents.push(parent); 5033 } 5034 parent = parent.parentNode; 5035 } 5036 } 5037 return $(unique(parents)); 5038} 5039function closest(selector) { 5040 let closest = this; // eslint-disable-line 5041 if (typeof selector === 'undefined') { 5042 return new Dom7([]); 5043 } 5044 if (!closest.is(selector)) { 5045 closest = closest.parents(selector).eq(0); 5046 } 5047 return closest; 5048} 5049function find(selector) { 5050 const foundElements = []; 5051 for (let i = 0; i < this.length; i += 1) { 5052 const found = this[i].querySelectorAll(selector); 5053 for (let j = 0; j < found.length; j += 1) { 5054 foundElements.push(found[j]); 5055 } 5056 } 5057 return new Dom7(foundElements); 5058} 5059function children(selector) { 5060 const children = []; // eslint-disable-line 5061 for (let i = 0; i < this.length; i += 1) { 5062 const childNodes = this[i].childNodes; 5063 5064 for (let j = 0; j < childNodes.length; j += 1) { 5065 if (!selector) { 5066 if (childNodes[j].nodeType === 1) children.push(childNodes[j]); 5067 } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { 5068 children.push(childNodes[j]); 5069 } 5070 } 5071 } 5072 return new Dom7(unique(children)); 5073} 5074function remove() { 5075 for (let i = 0; i < this.length; i += 1) { 5076 if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); 5077 } 5078 return this; 5079} 5080function detach() { 5081 return this.remove(); 5082} 5083function add(...args) { 5084 const dom = this; 5085 let i; 5086 let j; 5087 for (i = 0; i < args.length; i += 1) { 5088 const toAdd = $(args[i]); 5089 for (j = 0; j < toAdd.length; j += 1) { 5090 dom[dom.length] = toAdd[j]; 5091 dom.length += 1; 5092 } 5093 } 5094 return dom; 5095} 5096function empty() { 5097 for (let i = 0; i < this.length; i += 1) { 5098 const el = this[i]; 5099 if (el.nodeType === 1) { 5100 for (let j = 0; j < el.childNodes.length; j += 1) { 5101 if (el.childNodes[j].parentNode) { 5102 el.childNodes[j].parentNode.removeChild(el.childNodes[j]); 5103 } 5104 } 5105 el.textContent = ''; 5106 } 5107 } 5108 return this; 5109} 5110 5111function scrollTo(...args) { 5112 let [left, top, duration, easing, callback] = args; 5113 if (args.length === 4 && typeof easing === 'function') { 5114 callback = easing; 5115 [left, top, duration, callback, easing] = args; 5116 } 5117 if (typeof easing === 'undefined') easing = 'swing'; 5118 5119 return this.each(function animate() { 5120 const el = this; 5121 let currentTop; 5122 let currentLeft; 5123 let maxTop; 5124 let maxLeft; 5125 let newTop; 5126 let newLeft; 5127 let scrollTop; // eslint-disable-line 5128 let scrollLeft; // eslint-disable-line 5129 let animateTop = top > 0 || top === 0; 5130 let animateLeft = left > 0 || left === 0; 5131 if (typeof easing === 'undefined') { 5132 easing = 'swing'; 5133 } 5134 if (animateTop) { 5135 currentTop = el.scrollTop; 5136 if (!duration) { 5137 el.scrollTop = top; 5138 } 5139 } 5140 if (animateLeft) { 5141 currentLeft = el.scrollLeft; 5142 if (!duration) { 5143 el.scrollLeft = left; 5144 } 5145 } 5146 if (!duration) return; 5147 if (animateTop) { 5148 maxTop = el.scrollHeight - el.offsetHeight; 5149 newTop = Math.max(Math.min(top, maxTop), 0); 5150 } 5151 if (animateLeft) { 5152 maxLeft = el.scrollWidth - el.offsetWidth; 5153 newLeft = Math.max(Math.min(left, maxLeft), 0); 5154 } 5155 let startTime = null; 5156 if (animateTop && newTop === currentTop) animateTop = false; 5157 if (animateLeft && newLeft === currentLeft) animateLeft = false; 5158 function render(time = new Date().getTime()) { 5159 if (startTime === null) { 5160 startTime = time; 5161 } 5162 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 5163 const easeProgress = easing === 'linear' ? progress : (0.5 - (Math.cos(progress * Math.PI) / 2)); 5164 let done; 5165 if (animateTop) scrollTop = currentTop + (easeProgress * (newTop - currentTop)); 5166 if (animateLeft) scrollLeft = currentLeft + (easeProgress * (newLeft - currentLeft)); 5167 if (animateTop && newTop > currentTop && scrollTop >= newTop) { 5168 el.scrollTop = newTop; 5169 done = true; 5170 } 5171 if (animateTop && newTop < currentTop && scrollTop <= newTop) { 5172 el.scrollTop = newTop; 5173 done = true; 5174 } 5175 if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) { 5176 el.scrollLeft = newLeft; 5177 done = true; 5178 } 5179 if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) { 5180 el.scrollLeft = newLeft; 5181 done = true; 5182 } 5183 5184 if (done) { 5185 if (callback) callback(); 5186 return; 5187 } 5188 if (animateTop) el.scrollTop = scrollTop; 5189 if (animateLeft) el.scrollLeft = scrollLeft; 5190 requestAnimationFrame(render); 5191 } 5192 requestAnimationFrame(render); 5193 }); 5194} 5195// scrollTop(top, duration, easing, callback) { 5196function scrollTop(...args) { 5197 let [top, duration, easing, callback] = args; 5198 if (args.length === 3 && typeof easing === 'function') { 5199 [top, duration, callback, easing] = args; 5200 } 5201 const dom = this; 5202 if (typeof top === 'undefined') { 5203 if (dom.length > 0) return dom[0].scrollTop; 5204 return null; 5205 } 5206 return dom.scrollTo(undefined, top, duration, easing, callback); 5207} 5208function scrollLeft(...args) { 5209 let [left, duration, easing, callback] = args; 5210 if (args.length === 3 && typeof easing === 'function') { 5211 [left, duration, callback, easing] = args; 5212 } 5213 const dom = this; 5214 if (typeof left === 'undefined') { 5215 if (dom.length > 0) return dom[0].scrollLeft; 5216 return null; 5217 } 5218 return dom.scrollTo(left, undefined, duration, easing, callback); 5219} 5220 5221function animate(initialProps, initialParams) { 5222 const els = this; 5223 const a = { 5224 props: Object.assign({}, initialProps), 5225 params: Object.assign({ 5226 duration: 300, 5227 easing: 'swing', // or 'linear' 5228 /* Callbacks 5229 begin(elements) 5230 complete(elements) 5231 progress(elements, complete, remaining, start, tweenValue) 5232 */ 5233 }, initialParams), 5234 5235 elements: els, 5236 animating: false, 5237 que: [], 5238 5239 easingProgress(easing, progress) { 5240 if (easing === 'swing') { 5241 return 0.5 - (Math.cos(progress * Math.PI) / 2); 5242 } 5243 if (typeof easing === 'function') { 5244 return easing(progress); 5245 } 5246 return progress; 5247 }, 5248 stop() { 5249 if (a.frameId) { 5250 cancelAnimationFrame(a.frameId); 5251 } 5252 a.animating = false; 5253 a.elements.each((index, el) => { 5254 const element = el; 5255 delete element.dom7AnimateInstance; 5256 }); 5257 a.que = []; 5258 }, 5259 done(complete) { 5260 a.animating = false; 5261 a.elements.each((index, el) => { 5262 const element = el; 5263 delete element.dom7AnimateInstance; 5264 }); 5265 if (complete) complete(els); 5266 if (a.que.length > 0) { 5267 const que = a.que.shift(); 5268 a.animate(que[0], que[1]); 5269 } 5270 }, 5271 animate(props, params) { 5272 if (a.animating) { 5273 a.que.push([props, params]); 5274 return a; 5275 } 5276 const elements = []; 5277 5278 // Define & Cache Initials & Units 5279 a.elements.each((index, el) => { 5280 let initialFullValue; 5281 let initialValue; 5282 let unit; 5283 let finalValue; 5284 let finalFullValue; 5285 5286 if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a; 5287 5288 elements[index] = { 5289 container: el, 5290 }; 5291 Object.keys(props).forEach((prop) => { 5292 initialFullValue = ssr_window__WEBPACK_IMPORTED_MODULE_0__.window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); 5293 initialValue = parseFloat(initialFullValue); 5294 unit = initialFullValue.replace(initialValue, ''); 5295 finalValue = parseFloat(props[prop]); 5296 finalFullValue = props[prop] + unit; 5297 elements[index][prop] = { 5298 initialFullValue, 5299 initialValue, 5300 unit, 5301 finalValue, 5302 finalFullValue, 5303 currentValue: initialValue, 5304 }; 5305 }); 5306 }); 5307 5308 let startTime = null; 5309 let time; 5310 let elementsDone = 0; 5311 let propsDone = 0; 5312 let done; 5313 let began = false; 5314 5315 a.animating = true; 5316 5317 function render() { 5318 time = new Date().getTime(); 5319 let progress; 5320 let easeProgress; 5321 // let el; 5322 if (!began) { 5323 began = true; 5324 if (params.begin) params.begin(els); 5325 } 5326 if (startTime === null) { 5327 startTime = time; 5328 } 5329 if (params.progress) { 5330 // eslint-disable-next-line 5331 params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), ((startTime + params.duration) - time < 0 ? 0 : (startTime + params.duration) - time), startTime); 5332 } 5333 5334 elements.forEach((element) => { 5335 const el = element; 5336 if (done || el.done) return; 5337 Object.keys(props).forEach((prop) => { 5338 if (done || el.done) return; 5339 progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0); 5340 easeProgress = a.easingProgress(params.easing, progress); 5341 const { initialValue, finalValue, unit } = el[prop]; 5342 el[prop].currentValue = initialValue + (easeProgress * (finalValue - initialValue)); 5343 const currentValue = el[prop].currentValue; 5344 5345 if ( 5346 (finalValue > initialValue && currentValue >= finalValue) || 5347 (finalValue < initialValue && currentValue <= finalValue)) { 5348 el.container.style[prop] = finalValue + unit; 5349 propsDone += 1; 5350 if (propsDone === Object.keys(props).length) { 5351 el.done = true; 5352 elementsDone += 1; 5353 } 5354 if (elementsDone === elements.length) { 5355 done = true; 5356 } 5357 } 5358 if (done) { 5359 a.done(params.complete); 5360 return; 5361 } 5362 el.container.style[prop] = currentValue + unit; 5363 }); 5364 }); 5365 if (done) return; 5366 // Then call 5367 a.frameId = requestAnimationFrame(render); 5368 } 5369 a.frameId = requestAnimationFrame(render); 5370 return a; 5371 }, 5372 }; 5373 5374 if (a.elements.length === 0) { 5375 return els; 5376 } 5377 5378 let animateInstance; 5379 for (let i = 0; i < a.elements.length; i += 1) { 5380 if (a.elements[i].dom7AnimateInstance) { 5381 animateInstance = a.elements[i].dom7AnimateInstance; 5382 } else a.elements[i].dom7AnimateInstance = a; 5383 } 5384 if (!animateInstance) { 5385 animateInstance = a; 5386 } 5387 5388 if (initialProps === 'stop') { 5389 animateInstance.stop(); 5390 } else { 5391 animateInstance.animate(a.props, a.params); 5392 } 5393 5394 return els; 5395} 5396 5397function stop() { 5398 const els = this; 5399 for (let i = 0; i < els.length; i += 1) { 5400 if (els[i].dom7AnimateInstance) { 5401 els[i].dom7AnimateInstance.stop(); 5402 } 5403 } 5404} 5405 5406const noTrigger = ('resize scroll').split(' '); 5407function eventShortcut(name, ...args) { 5408 if (typeof args[0] === 'undefined') { 5409 for (let i = 0; i < this.length; i += 1) { 5410 if (noTrigger.indexOf(name) < 0) { 5411 if (name in this[i]) this[i][name](); 5412 else { 5413 $(this[i]).trigger(name); 5414 } 5415 } 5416 } 5417 return this; 5418 } 5419 return this.on(name, ...args); 5420} 5421 5422function click(...args) { 5423 return eventShortcut.bind(this)('click', ...args); 5424} 5425function blur(...args) { 5426 return eventShortcut.bind(this)('blur', ...args); 5427} 5428function focus(...args) { 5429 return eventShortcut.bind(this)('focus', ...args); 5430} 5431function focusin(...args) { 5432 return eventShortcut.bind(this)('focusin', ...args); 5433} 5434function focusout(...args) { 5435 return eventShortcut.bind(this)('focusout', ...args); 5436} 5437function keyup(...args) { 5438 return eventShortcut.bind(this)('keyup', ...args); 5439} 5440function keydown(...args) { 5441 return eventShortcut.bind(this)('keydown', ...args); 5442} 5443function keypress(...args) { 5444 return eventShortcut.bind(this)('keypress', ...args); 5445} 5446function submit(...args) { 5447 return eventShortcut.bind(this)('submit', ...args); 5448} 5449function change(...args) { 5450 return eventShortcut.bind(this)('change', ...args); 5451} 5452function mousedown(...args) { 5453 return eventShortcut.bind(this)('mousedown', ...args); 5454} 5455function mousemove(...args) { 5456 return eventShortcut.bind(this)('mousemove', ...args); 5457} 5458function mouseup(...args) { 5459 return eventShortcut.bind(this)('mouseup', ...args); 5460} 5461function mouseenter(...args) { 5462 return eventShortcut.bind(this)('mouseenter', ...args); 5463} 5464function mouseleave(...args) { 5465 return eventShortcut.bind(this)('mouseleave', ...args); 5466} 5467function mouseout(...args) { 5468 return eventShortcut.bind(this)('mouseout', ...args); 5469} 5470function mouseover(...args) { 5471 return eventShortcut.bind(this)('mouseover', ...args); 5472} 5473function touchstart(...args) { 5474 return eventShortcut.bind(this)('touchstart', ...args); 5475} 5476function touchend(...args) { 5477 return eventShortcut.bind(this)('touchend', ...args); 5478} 5479function touchmove(...args) { 5480 return eventShortcut.bind(this)('touchmove', ...args); 5481} 5482function resize(...args) { 5483 return eventShortcut.bind(this)('resize', ...args); 5484} 5485function scroll(...args) { 5486 return eventShortcut.bind(this)('scroll', ...args); 5487} 5488 5489 5490 5491 5492/***/ }), 5493
vendor: 3,776 bytes, lines 5494-5641
5494/***/ "./node_modules/dom7/node_modules/ssr-window/dist/ssr-window.esm.js": 5495/*!**************************************************************************!*\ 5496 !*** ./node_modules/dom7/node_modules/ssr-window/dist/ssr-window.esm.js ***! 5497 \**************************************************************************/ 5498/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5499 5500"use strict"; 5501__webpack_require__.r(__webpack_exports__); 5502/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5503/* harmony export */ "document": () => (/* binding */ doc), 5504/* harmony export */ "extend": () => (/* binding */ extend), 5505/* harmony export */ "window": () => (/* binding */ win) 5506/* harmony export */ }); 5507/** 5508 * SSR Window 2.0.0 5509 * Better handling for window object in SSR environment 5510 * https://github.com/nolimits4web/ssr-window 5511 * 5512 * Copyright 2020, Vladimir Kharlampidi 5513 * 5514 * Licensed under MIT 5515 * 5516 * Released on: May 12, 2020 5517 */ 5518/* eslint-disable no-param-reassign */ 5519function isObject(obj) { 5520 return (obj !== null && 5521 typeof obj === 'object' && 5522 'constructor' in obj && 5523 obj.constructor === Object); 5524} 5525function extend(target, src) { 5526 if (target === void 0) { target = {}; } 5527 if (src === void 0) { src = {}; } 5528 Object.keys(src).forEach(function (key) { 5529 if (typeof target[key] === 'undefined') 5530 target[key] = src[key]; 5531 else if (isObject(src[key]) && 5532 isObject(target[key]) && 5533 Object.keys(src[key]).length > 0) { 5534 extend(target[key], src[key]); 5535 } 5536 }); 5537} 5538 5539var doc = typeof document !== 'undefined' ? document : {}; 5540var ssrDocument = { 5541 body: {}, 5542 addEventListener: function () { }, 5543 removeEventListener: function () { }, 5544 activeElement: { 5545 blur: function () { }, 5546 nodeName: '', 5547 }, 5548 querySelector: function () { 5549 return null; 5550 }, 5551 querySelectorAll: function () { 5552 return []; 5553 }, 5554 getElementById: function () { 5555 return null; 5556 }, 5557 createEvent: function () { 5558 return { 5559 initEvent: function () { }, 5560 }; 5561 }, 5562 createElement: function () { 5563 return { 5564 children: [], 5565 childNodes: [], 5566 style: {}, 5567 setAttribute: function () { }, 5568 getElementsByTagName: function () { 5569 return []; 5570 }, 5571 }; 5572 }, 5573 createElementNS: function () { 5574 return {}; 5575 }, 5576 importNode: function () { 5577 return null; 5578 }, 5579 location: { 5580 hash: '', 5581 host: '', 5582 hostname: '', 5583 href: '', 5584 origin: '', 5585 pathname: '', 5586 protocol: '', 5587 search: '', 5588 }, 5589}; 5590extend(doc, ssrDocument); 5591 5592var win = typeof window !== 'undefined' ? window : {}; 5593var ssrWindow = { 5594 document: ssrDocument, 5595 navigator: { 5596 userAgent: '', 5597 }, 5598 location: { 5599 hash: '', 5600 host: '', 5601 hostname: '', 5602 href: '', 5603 origin: '', 5604 pathname: '', 5605 protocol: '', 5606 search: '', 5607 }, 5608 history: { 5609 replaceState: function () { }, 5610 pushState: function () { }, 5611 go: function () { }, 5612 back: function () { }, 5613 }, 5614 CustomEvent: function CustomEvent() { 5615 return this; 5616 }, 5617 addEventListener: function () { }, 5618 removeEventListener: function () { }, 5619 getComputedStyle: function () { 5620 return { 5621 getPropertyValue: function () { 5622 return ''; 5623 }, 5624 }; 5625 }, 5626 Image: function () { }, 5627 Date: function () { }, 5628 screen: {}, 5629 setTimeout: function () { }, 5630 clearTimeout: function () { }, 5631 matchMedia: function () { 5632 return {}; 5633 }, 5634}; 5635extend(win, ssrWindow); 5636 5637 5638 5639 5640/***/ }), 5641
vendor: 7,496 bytes, lines 5642-5994
5642/***/ "./node_modules/es6-promise-polyfill/promise.js": 5643/*!******************************************************!*\ 5644 !*** ./node_modules/es6-promise-polyfill/promise.js ***! 5645 \******************************************************/ 5646/***/ (function(module, exports, __webpack_require__) { 5647 5648var __WEBPACK_AMD_DEFINE_RESULT__;(function(global){ 5649 5650// 5651// Check for native Promise and it has correct interface 5652// 5653 5654var NativePromise = global['Promise']; 5655var nativePromiseSupported = 5656 NativePromise && 5657 // Some of these methods are missing from 5658 // Firefox/Chrome experimental implementations 5659 'resolve' in NativePromise && 5660 'reject' in NativePromise && 5661 'all' in NativePromise && 5662 'race' in NativePromise && 5663 // Older version of the spec had a resolver object 5664 // as the arg rather than a function 5665 (function(){ 5666 var resolve; 5667 new NativePromise(function(r){ resolve = r; }); 5668 return typeof resolve === 'function'; 5669 })(); 5670 5671 5672// 5673// export if necessary 5674// 5675 5676if ( true && exports) 5677{ 5678 // node.js 5679 exports.Promise = nativePromiseSupported ? NativePromise : Promise; 5680 exports.Polyfill = Promise; 5681} 5682else 5683{ 5684 // AMD 5685 if (true) 5686 { 5687 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){ 5688 return nativePromiseSupported ? NativePromise : Promise; 5689 }).call(exports, __webpack_require__, exports, module), 5690 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 5691 } 5692 else 5693 {} 5694} 5695 5696 5697// 5698// Polyfill 5699// 5700 5701var PENDING = 'pending'; 5702var SEALED = 'sealed'; 5703var FULFILLED = 'fulfilled'; 5704var REJECTED = 'rejected'; 5705var NOOP = function(){}; 5706 5707function isArray(value) { 5708 return Object.prototype.toString.call(value) === '[object Array]'; 5709} 5710 5711// async calls 5712var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout; 5713var asyncQueue = []; 5714var asyncTimer; 5715 5716function asyncFlush(){ 5717 // run promise callbacks 5718 for (var i = 0; i < asyncQueue.length; i++) 5719 asyncQueue[i][0](asyncQueue[i][1]); 5720 5721 // reset async asyncQueue 5722 asyncQueue = []; 5723 asyncTimer = false; 5724} 5725 5726function asyncCall(callback, arg){ 5727 asyncQueue.push([callback, arg]); 5728 5729 if (!asyncTimer) 5730 { 5731 asyncTimer = true; 5732 asyncSetTimer(asyncFlush, 0); 5733 } 5734} 5735 5736 5737function invokeResolver(resolver, promise) { 5738 function resolvePromise(value) { 5739 resolve(promise, value); 5740 } 5741 5742 function rejectPromise(reason) { 5743 reject(promise, reason); 5744 } 5745 5746 try { 5747 resolver(resolvePromise, rejectPromise); 5748 } catch(e) { 5749 rejectPromise(e); 5750 } 5751} 5752 5753function invokeCallback(subscriber){ 5754 var owner = subscriber.owner; 5755 var settled = owner.state_; 5756 var value = owner.data_; 5757 var callback = subscriber[settled]; 5758 var promise = subscriber.then; 5759 5760 if (typeof callback === 'function') 5761 { 5762 settled = FULFILLED; 5763 try { 5764 value = callback(value); 5765 } catch(e) { 5766 reject(promise, e); 5767 } 5768 } 5769 5770 if (!handleThenable(promise, value)) 5771 { 5772 if (settled === FULFILLED) 5773 resolve(promise, value); 5774 5775 if (settled === REJECTED) 5776 reject(promise, value); 5777 } 5778} 5779 5780function handleThenable(promise, value) { 5781 var resolved; 5782 5783 try { 5784 if (promise === value) 5785 throw new TypeError('A promises callback cannot return that same promise.'); 5786 5787 if (value && (typeof value === 'function' || typeof value === 'object')) 5788 { 5789 var then = value.then; // then should be retrived only once 5790 5791 if (typeof then === 'function') 5792 { 5793 then.call(value, function(val){ 5794 if (!resolved) 5795 { 5796 resolved = true; 5797 5798 if (value !== val) 5799 resolve(promise, val); 5800 else 5801 fulfill(promise, val); 5802 } 5803 }, function(reason){ 5804 if (!resolved) 5805 { 5806 resolved = true; 5807 5808 reject(promise, reason); 5809 } 5810 }); 5811 5812 return true; 5813 } 5814 } 5815 } catch (e) { 5816 if (!resolved) 5817 reject(promise, e); 5818 5819 return true; 5820 } 5821 5822 return false; 5823} 5824 5825function resolve(promise, value){ 5826 if (promise === value || !handleThenable(promise, value)) 5827 fulfill(promise, value); 5828} 5829 5830function fulfill(promise, value){ 5831 if (promise.state_ === PENDING) 5832 { 5833 promise.state_ = SEALED; 5834 promise.data_ = value; 5835 5836 asyncCall(publishFulfillment, promise); 5837 } 5838} 5839 5840function reject(promise, reason){ 5841 if (promise.state_ === PENDING) 5842 { 5843 promise.state_ = SEALED; 5844 promise.data_ = reason; 5845 5846 asyncCall(publishRejection, promise); 5847 } 5848} 5849 5850function publish(promise) { 5851 var callbacks = promise.then_; 5852 promise.then_ = undefined; 5853 5854 for (var i = 0; i < callbacks.length; i++) { 5855 invokeCallback(callbacks[i]); 5856 } 5857} 5858 5859function publishFulfillment(promise){ 5860 promise.state_ = FULFILLED; 5861 publish(promise); 5862} 5863 5864function publishRejection(promise){ 5865 promise.state_ = REJECTED; 5866 publish(promise); 5867} 5868 5869/** 5870* @class 5871*/ 5872function Promise(resolver){ 5873 if (typeof resolver !== 'function') 5874 throw new TypeError('Promise constructor takes a function argument'); 5875 5876 if (this instanceof Promise === false) 5877 throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); 5878 5879 this.then_ = []; 5880 5881 invokeResolver(resolver, this); 5882} 5883 5884Promise.prototype = { 5885 constructor: Promise, 5886 5887 state_: PENDING, 5888 then_: null, 5889 data_: undefined, 5890 5891 then: function(onFulfillment, onRejection){ 5892 var subscriber = { 5893 owner: this, 5894 then: new this.constructor(NOOP), 5895 fulfilled: onFulfillment, 5896 rejected: onRejection 5897 }; 5898 5899 if (this.state_ === FULFILLED || this.state_ === REJECTED) 5900 { 5901 // already resolved, call callback async 5902 asyncCall(invokeCallback, subscriber); 5903 } 5904 else 5905 { 5906 // subscribe 5907 this.then_.push(subscriber); 5908 } 5909 5910 return subscriber.then; 5911 }, 5912 5913 'catch': function(onRejection) { 5914 return this.then(null, onRejection); 5915 } 5916}; 5917 5918Promise.all = function(promises){ 5919 var Class = this; 5920 5921 if (!isArray(promises)) 5922 throw new TypeError('You must pass an array to Promise.all().'); 5923 5924 return new Class(function(resolve, reject){ 5925 var results = []; 5926 var remaining = 0; 5927 5928 function resolver(index){ 5929 remaining++; 5930 return function(value){ 5931 results[index] = value; 5932 if (!--remaining) 5933 resolve(results); 5934 }; 5935 } 5936 5937 for (var i = 0, promise; i < promises.length; i++) 5938 { 5939 promise = promises[i]; 5940 5941 if (promise && typeof promise.then === 'function') 5942 promise.then(resolver(i), reject); 5943 else 5944 results[i] = promise; 5945 } 5946 5947 if (!remaining) 5948 resolve(results); 5949 }); 5950}; 5951 5952Promise.race = function(promises){ 5953 var Class = this; 5954 5955 if (!isArray(promises)) 5956 throw new TypeError('You must pass an array to Promise.race().'); 5957 5958 return new Class(function(resolve, reject) { 5959 for (var i = 0, promise; i < promises.length; i++) 5960 { 5961 promise = promises[i]; 5962 5963 if (promise && typeof promise.then === 'function') 5964 promise.then(resolve, reject); 5965 else 5966 resolve(promise); 5967 } 5968 }); 5969}; 5970 5971Promise.resolve = function(value){ 5972 var Class = this; 5973 5974 if (value && typeof value === 'object' && value.constructor === Class) 5975 return value; 5976 5977 return new Class(function(resolve){ 5978 resolve(value); 5979 }); 5980}; 5981 5982Promise.reject = function(reason){ 5983 var Class = this; 5984 5985 return new Class(function(resolve, reject){ 5986 reject(reason); 5987 }); 5988}; 5989 5990})(typeof window != 'undefined' ? window : typeof __webpack_require__.g != 'undefined' ? __webpack_require__.g : typeof self != 'undefined' ? self : this); 5991 5992 5993/***/ }), 5994
vendor: 1,080 bytes, lines 5995-6036
5995/***/ "./node_modules/ie-array-find-polyfill/index.js": 5996/*!******************************************************!*\ 5997 !*** ./node_modules/ie-array-find-polyfill/index.js ***! 5998 \******************************************************/ 5999/***/ (() => { 6000 6001"use strict"; 6002 6003if (!Array.prototype.find) { 6004 Object.defineProperty(Array.prototype, 'find', { 6005 value: function (predicate) { 6006 6007 if (this == null) { 6008 throw new TypeError('this is null or not defined'); 6009 } 6010 6011 var obj = Object(this); 6012 var len = obj.length >>> 0; 6013 6014 if (typeof predicate !== 'function') { 6015 throw new TypeError('predicate must be a function'); 6016 } 6017 6018 var thisArg = arguments[1]; 6019 6020 var index = 0; 6021 6022 while (index < len) { 6023 var iValue = obj[index]; 6024 if (predicate.call(thisArg, iValue, index, obj)) { 6025 return iValue; 6026 } 6027 index++; 6028 } 6029 6030 return undefined; 6031 } 6032 }); 6033} 6034 6035/***/ }), 6036
vendor: 916 bytes, lines 6037-6067
6037/***/ "./node_modules/is-buffer/index.js": 6038/*!*****************************************!*\ 6039 !*** ./node_modules/is-buffer/index.js ***! 6040 \*****************************************/ 6041/***/ ((module) => { 6042 6043/*! 6044 * Determine if an object is a Buffer 6045 * 6046 * @author Feross Aboukhadijeh <https://feross.org> 6047 * @license MIT 6048 */ 6049 6050// The _isBuffer check is for Safari 5-7 support, because it's missing 6051// Object.prototype.constructor. Remove this eventually 6052module.exports = function (obj) { 6053 return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) 6054} 6055 6056function isBuffer (obj) { 6057 return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) 6058} 6059 6060// For Node v0.10 support. Remove this eventually. 6061function isSlowBuffer (obj) { 6062 return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) 6063} 6064 6065 6066/***/ }), 6067
vendor: 28,495 bytes, lines 6068-6842
6068/***/ "./node_modules/morphdom/dist/morphdom-esm.js": 6069/*!****************************************************!*\ 6070 !*** ./node_modules/morphdom/dist/morphdom-esm.js ***! 6071 \****************************************************/ 6072/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6073 6074"use strict"; 6075__webpack_require__.r(__webpack_exports__); 6076/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6077/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 6078/* harmony export */ }); 6079var DOCUMENT_FRAGMENT_NODE = 11; 6080 6081function morphAttrs(fromNode, toNode) { 6082 var toNodeAttrs = toNode.attributes; 6083 var attr; 6084 var attrName; 6085 var attrNamespaceURI; 6086 var attrValue; 6087 var fromValue; 6088 6089 // document-fragments dont have attributes so lets not do anything 6090 if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE || fromNode.nodeType === DOCUMENT_FRAGMENT_NODE) { 6091 return; 6092 } 6093 6094 // update attributes on original DOM element 6095 for (var i = toNodeAttrs.length - 1; i >= 0; i--) { 6096 attr = toNodeAttrs[i]; 6097 attrName = attr.name; 6098 attrNamespaceURI = attr.namespaceURI; 6099 attrValue = attr.value; 6100 6101 if (attrNamespaceURI) { 6102 attrName = attr.localName || attrName; 6103 fromValue = fromNode.getAttributeNS(attrNamespaceURI, attrName); 6104 6105 if (fromValue !== attrValue) { 6106 if (attr.prefix === 'xmlns'){ 6107 attrName = attr.name; // It's not allowed to set an attribute with the XMLNS namespace without specifying the `xmlns` prefix 6108 } 6109 fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue); 6110 } 6111 } else { 6112 fromValue = fromNode.getAttribute(attrName); 6113 6114 if (fromValue !== attrValue) { 6115 fromNode.setAttribute(attrName, attrValue); 6116 } 6117 } 6118 } 6119 6120 // Remove any extra attributes found on the original DOM element that 6121 // weren't found on the target element. 6122 var fromNodeAttrs = fromNode.attributes; 6123 6124 for (var d = fromNodeAttrs.length - 1; d >= 0; d--) { 6125 attr = fromNodeAttrs[d]; 6126 attrName = attr.name; 6127 attrNamespaceURI = attr.namespaceURI; 6128 6129 if (attrNamespaceURI) { 6130 attrName = attr.localName || attrName; 6131 6132 if (!toNode.hasAttributeNS(attrNamespaceURI, attrName)) { 6133 fromNode.removeAttributeNS(attrNamespaceURI, attrName); 6134 } 6135 } else { 6136 if (!toNode.hasAttribute(attrName)) { 6137 fromNode.removeAttribute(attrName); 6138 } 6139 } 6140 } 6141} 6142 6143var range; // Create a range object for efficently rendering strings to elements. 6144var NS_XHTML = 'http://www.w3.org/1999/xhtml'; 6145 6146var doc = typeof document === 'undefined' ? undefined : document; 6147var HAS_TEMPLATE_SUPPORT = !!doc && 'content' in doc.createElement('template'); 6148var HAS_RANGE_SUPPORT = !!doc && doc.createRange && 'createContextualFragment' in doc.createRange(); 6149 6150function createFragmentFromTemplate(str) { 6151 var template = doc.createElement('template'); 6152 template.innerHTML = str; 6153 return template.content.childNodes[0]; 6154} 6155 6156function createFragmentFromRange(str) { 6157 if (!range) { 6158 range = doc.createRange(); 6159 range.selectNode(doc.body); 6160 } 6161 6162 var fragment = range.createContextualFragment(str); 6163 return fragment.childNodes[0]; 6164} 6165 6166function createFragmentFromWrap(str) { 6167 var fragment = doc.createElement('body'); 6168 fragment.innerHTML = str; 6169 return fragment.childNodes[0]; 6170} 6171 6172/** 6173 * This is about the same 6174 * var html = new DOMParser().parseFromString(str, 'text/html'); 6175 * return html.body.firstChild; 6176 * 6177 * @method toElement 6178 * @param {String} str 6179 */ 6180function toElement(str) { 6181 str = str.trim(); 6182 if (HAS_TEMPLATE_SUPPORT) { 6183 // avoid restrictions on content for things like `<tr><th>Hi</th></tr>` which 6184 // createContextualFragment doesn't support 6185 // <template> support not available in IE 6186 return createFragmentFromTemplate(str); 6187 } else if (HAS_RANGE_SUPPORT) { 6188 return createFragmentFromRange(str); 6189 } 6190 6191 return createFragmentFromWrap(str); 6192} 6193 6194/** 6195 * Returns true if two node's names are the same. 6196 * 6197 * NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same 6198 * nodeName and different namespace URIs. 6199 * 6200 * @param {Element} a 6201 * @param {Element} b The target element 6202 * @return {boolean} 6203 */ 6204function compareNodeNames(fromEl, toEl) { 6205 var fromNodeName = fromEl.nodeName; 6206 var toNodeName = toEl.nodeName; 6207 var fromCodeStart, toCodeStart; 6208 6209 if (fromNodeName === toNodeName) { 6210 return true; 6211 } 6212 6213 fromCodeStart = fromNodeName.charCodeAt(0); 6214 toCodeStart = toNodeName.charCodeAt(0); 6215 6216 // If the target element is a virtual DOM node or SVG node then we may 6217 // need to normalize the tag name before comparing. Normal HTML elements that are 6218 // in the "http://www.w3.org/1999/xhtml" 6219 // are converted to upper case 6220 if (fromCodeStart <= 90 && toCodeStart >= 97) { // from is upper and to is lower 6221 return fromNodeName === toNodeName.toUpperCase(); 6222 } else if (toCodeStart <= 90 && fromCodeStart >= 97) { // to is upper and from is lower 6223 return toNodeName === fromNodeName.toUpperCase(); 6224 } else { 6225 return false; 6226 } 6227} 6228 6229/** 6230 * Create an element, optionally with a known namespace URI. 6231 * 6232 * @param {string} name the element name, e.g. 'div' or 'svg' 6233 * @param {string} [namespaceURI] the element's namespace URI, i.e. the value of 6234 * its `xmlns` attribute or its inferred namespace. 6235 * 6236 * @return {Element} 6237 */ 6238function createElementNS(name, namespaceURI) { 6239 return !namespaceURI || namespaceURI === NS_XHTML ? 6240 doc.createElement(name) : 6241 doc.createElementNS(namespaceURI, name); 6242} 6243 6244/** 6245 * Copies the children of one DOM element to another DOM element 6246 */ 6247function moveChildren(fromEl, toEl) { 6248 var curChild = fromEl.firstChild; 6249 while (curChild) { 6250 var nextChild = curChild.nextSibling; 6251 toEl.appendChild(curChild); 6252 curChild = nextChild; 6253 } 6254 return toEl; 6255} 6256 6257function syncBooleanAttrProp(fromEl, toEl, name) { 6258 if (fromEl[name] !== toEl[name]) { 6259 fromEl[name] = toEl[name]; 6260 if (fromEl[name]) { 6261 fromEl.setAttribute(name, ''); 6262 } else { 6263 fromEl.removeAttribute(name); 6264 } 6265 } 6266} 6267 6268var specialElHandlers = { 6269 OPTION: function(fromEl, toEl) { 6270 var parentNode = fromEl.parentNode; 6271 if (parentNode) { 6272 var parentName = parentNode.nodeName.toUpperCase(); 6273 if (parentName === 'OPTGROUP') { 6274 parentNode = parentNode.parentNode; 6275 parentName = parentNode && parentNode.nodeName.toUpperCase(); 6276 } 6277 if (parentName === 'SELECT' && !parentNode.hasAttribute('multiple')) { 6278 if (fromEl.hasAttribute('selected') && !toEl.selected) { 6279 // Workaround for MS Edge bug where the 'selected' attribute can only be 6280 // removed if set to a non-empty value: 6281 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12087679/ 6282 fromEl.setAttribute('selected', 'selected'); 6283 fromEl.removeAttribute('selected'); 6284 } 6285 // We have to reset select element's selectedIndex to -1, otherwise setting 6286 // fromEl.selected using the syncBooleanAttrProp below has no effect. 6287 // The correct selectedIndex will be set in the SELECT special handler below. 6288 parentNode.selectedIndex = -1; 6289 } 6290 } 6291 syncBooleanAttrProp(fromEl, toEl, 'selected'); 6292 }, 6293 /** 6294 * The "value" attribute is special for the <input> element since it sets 6295 * the initial value. Changing the "value" attribute without changing the 6296 * "value" property will have no effect since it is only used to the set the 6297 * initial value. Similar for the "checked" attribute, and "disabled". 6298 */ 6299 INPUT: function(fromEl, toEl) { 6300 syncBooleanAttrProp(fromEl, toEl, 'checked'); 6301 syncBooleanAttrProp(fromEl, toEl, 'disabled'); 6302 6303 if (fromEl.value !== toEl.value) { 6304 fromEl.value = toEl.value; 6305 } 6306 6307 if (!toEl.hasAttribute('value')) { 6308 fromEl.removeAttribute('value'); 6309 } 6310 }, 6311 6312 TEXTAREA: function(fromEl, toEl) { 6313 var newValue = toEl.value; 6314 if (fromEl.value !== newValue) { 6315 fromEl.value = newValue; 6316 } 6317 6318 var firstChild = fromEl.firstChild; 6319 if (firstChild) { 6320 // Needed for IE. Apparently IE sets the placeholder as the 6321 // node value and vise versa. This ignores an empty update. 6322 var oldValue = firstChild.nodeValue; 6323 6324 if (oldValue == newValue || (!newValue && oldValue == fromEl.placeholder)) { 6325 return; 6326 } 6327 6328 firstChild.nodeValue = newValue; 6329 } 6330 }, 6331 SELECT: function(fromEl, toEl) { 6332 if (!toEl.hasAttribute('multiple')) { 6333 var selectedIndex = -1; 6334 var i = 0; 6335 // We have to loop through children of fromEl, not toEl since nodes can be moved 6336 // from toEl to fromEl directly when morphing. 6337 // At the time this special handler is invoked, all children have already been morphed 6338 // and appended to / removed from fromEl, so using fromEl here is safe and correct. 6339 var curChild = fromEl.firstChild; 6340 var optgroup; 6341 var nodeName; 6342 while(curChild) { 6343 nodeName = curChild.nodeName && curChild.nodeName.toUpperCase(); 6344 if (nodeName === 'OPTGROUP') { 6345 optgroup = curChild; 6346 curChild = optgroup.firstChild; 6347 } else { 6348 if (nodeName === 'OPTION') { 6349 if (curChild.hasAttribute('selected')) { 6350 selectedIndex = i; 6351 break; 6352 } 6353 i++; 6354 } 6355 curChild = curChild.nextSibling; 6356 if (!curChild && optgroup) { 6357 curChild = optgroup.nextSibling; 6358 optgroup = null; 6359 } 6360 } 6361 } 6362 6363 fromEl.selectedIndex = selectedIndex; 6364 } 6365 } 6366}; 6367 6368var ELEMENT_NODE = 1; 6369var DOCUMENT_FRAGMENT_NODE$1 = 11; 6370var TEXT_NODE = 3; 6371var COMMENT_NODE = 8; 6372 6373function noop() {} 6374 6375function defaultGetNodeKey(node) { 6376 if (node) { 6377 return (node.getAttribute && node.getAttribute('id')) || node.id; 6378 } 6379} 6380 6381function morphdomFactory(morphAttrs) { 6382 6383 return function morphdom(fromNode, toNode, options) { 6384 if (!options) { 6385 options = {}; 6386 } 6387 6388 if (typeof toNode === 'string') { 6389 if (fromNode.nodeName === '#document' || fromNode.nodeName === 'HTML' || fromNode.nodeName === 'BODY') { 6390 var toNodeHtml = toNode; 6391 toNode = doc.createElement('html'); 6392 toNode.innerHTML = toNodeHtml; 6393 } else { 6394 toNode = toElement(toNode); 6395 } 6396 } else if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE$1) { 6397 toNode = toNode.firstElementChild; 6398 } 6399 6400 var getNodeKey = options.getNodeKey || defaultGetNodeKey; 6401 var onBeforeNodeAdded = options.onBeforeNodeAdded || noop; 6402 var onNodeAdded = options.onNodeAdded || noop; 6403 var onBeforeElUpdated = options.onBeforeElUpdated || noop; 6404 var onElUpdated = options.onElUpdated || noop; 6405 var onBeforeNodeDiscarded = options.onBeforeNodeDiscarded || noop; 6406 var onNodeDiscarded = options.onNodeDiscarded || noop; 6407 var onBeforeElChildrenUpdated = options.onBeforeElChildrenUpdated || noop; 6408 var skipFromChildren = options.skipFromChildren || noop; 6409 var addChild = options.addChild || function(parent, child){ return parent.appendChild(child); }; 6410 var childrenOnly = options.childrenOnly === true; 6411 6412 // This object is used as a lookup to quickly find all keyed elements in the original DOM tree. 6413 var fromNodesLookup = Object.create(null); 6414 var keyedRemovalList = []; 6415 6416 function addKeyedRemoval(key) { 6417 keyedRemovalList.push(key); 6418 } 6419 6420 function walkDiscardedChildNodes(node, skipKeyedNodes) { 6421 if (node.nodeType === ELEMENT_NODE) { 6422 var curChild = node.firstChild; 6423 while (curChild) { 6424 6425 var key = undefined; 6426 6427 if (skipKeyedNodes && (key = getNodeKey(curChild))) { 6428 // If we are skipping keyed nodes then we add the key 6429 // to a list so that it can be handled at the very end. 6430 addKeyedRemoval(key); 6431 } else { 6432 // Only report the node as discarded if it is not keyed. We do this because 6433 // at the end we loop through all keyed elements that were unmatched 6434 // and then discard them in one final pass. 6435 onNodeDiscarded(curChild); 6436 if (curChild.firstChild) { 6437 walkDiscardedChildNodes(curChild, skipKeyedNodes); 6438 } 6439 } 6440 6441 curChild = curChild.nextSibling; 6442 } 6443 } 6444 } 6445 6446 /** 6447 * Removes a DOM node out of the original DOM 6448 * 6449 * @param {Node} node The node to remove 6450 * @param {Node} parentNode The nodes parent 6451 * @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded. 6452 * @return {undefined} 6453 */ 6454 function removeNode(node, parentNode, skipKeyedNodes) { 6455 if (onBeforeNodeDiscarded(node) === false) { 6456 return; 6457 } 6458 6459 if (parentNode) { 6460 parentNode.removeChild(node); 6461 } 6462 6463 onNodeDiscarded(node); 6464 walkDiscardedChildNodes(node, skipKeyedNodes); 6465 } 6466 6467 // // TreeWalker implementation is no faster, but keeping this around in case this changes in the future 6468 // function indexTree(root) { 6469 // var treeWalker = document.createTreeWalker( 6470 // root, 6471 // NodeFilter.SHOW_ELEMENT); 6472 // 6473 // var el; 6474 // while((el = treeWalker.nextNode())) { 6475 // var key = getNodeKey(el); 6476 // if (key) { 6477 // fromNodesLookup[key] = el; 6478 // } 6479 // } 6480 // } 6481 6482 // // NodeIterator implementation is no faster, but keeping this around in case this changes in the future 6483 // 6484 // function indexTree(node) { 6485 // var nodeIterator = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT); 6486 // var el; 6487 // while((el = nodeIterator.nextNode())) { 6488 // var key = getNodeKey(el); 6489 // if (key) { 6490 // fromNodesLookup[key] = el; 6491 // } 6492 // } 6493 // } 6494 6495 function indexTree(node) { 6496 if (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE$1) { 6497 var curChild = node.firstChild; 6498 while (curChild) { 6499 var key = getNodeKey(curChild); 6500 if (key) { 6501 fromNodesLookup[key] = curChild; 6502 } 6503 6504 // Walk recursively 6505 indexTree(curChild); 6506 6507 curChild = curChild.nextSibling; 6508 } 6509 } 6510 } 6511 6512 indexTree(fromNode); 6513 6514 function handleNodeAdded(el) { 6515 onNodeAdded(el); 6516 6517 var curChild = el.firstChild; 6518 while (curChild) { 6519 var nextSibling = curChild.nextSibling; 6520 6521 var key = getNodeKey(curChild); 6522 if (key) { 6523 var unmatchedFromEl = fromNodesLookup[key]; 6524 // if we find a duplicate #id node in cache, replace `el` with cache value 6525 // and morph it to the child node. 6526 if (unmatchedFromEl && compareNodeNames(curChild, unmatchedFromEl)) { 6527 curChild.parentNode.replaceChild(unmatchedFromEl, curChild); 6528 morphEl(unmatchedFromEl, curChild); 6529 } else { 6530 handleNodeAdded(curChild); 6531 } 6532 } else { 6533 // recursively call for curChild and it's children to see if we find something in 6534 // fromNodesLookup 6535 handleNodeAdded(curChild); 6536 } 6537 6538 curChild = nextSibling; 6539 } 6540 } 6541 6542 function cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey) { 6543 // We have processed all of the "to nodes". If curFromNodeChild is 6544 // non-null then we still have some from nodes left over that need 6545 // to be removed 6546 while (curFromNodeChild) { 6547 var fromNextSibling = curFromNodeChild.nextSibling; 6548 if ((curFromNodeKey = getNodeKey(curFromNodeChild))) { 6549 // Since the node is keyed it might be matched up later so we defer 6550 // the actual removal to later 6551 addKeyedRemoval(curFromNodeKey); 6552 } else { 6553 // NOTE: we skip nested keyed nodes from being removed since there is 6554 // still a chance they will be matched up later 6555 removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); 6556 } 6557 curFromNodeChild = fromNextSibling; 6558 } 6559 } 6560 6561 function morphEl(fromEl, toEl, childrenOnly) { 6562 var toElKey = getNodeKey(toEl); 6563 6564 if (toElKey) { 6565 // If an element with an ID is being morphed then it will be in the final 6566 // DOM so clear it out of the saved elements collection 6567 delete fromNodesLookup[toElKey]; 6568 } 6569 6570 if (!childrenOnly) { 6571 // optional 6572 if (onBeforeElUpdated(fromEl, toEl) === false) { 6573 return; 6574 } 6575 6576 // update attributes on original DOM element first 6577 morphAttrs(fromEl, toEl); 6578 // optional 6579 onElUpdated(fromEl); 6580 6581 if (onBeforeElChildrenUpdated(fromEl, toEl) === false) { 6582 return; 6583 } 6584 } 6585 6586 if (fromEl.nodeName !== 'TEXTAREA') { 6587 morphChildren(fromEl, toEl); 6588 } else { 6589 specialElHandlers.TEXTAREA(fromEl, toEl); 6590 } 6591 } 6592 6593 function morphChildren(fromEl, toEl) { 6594 var skipFrom = skipFromChildren(fromEl); 6595 var curToNodeChild = toEl.firstChild; 6596 var curFromNodeChild = fromEl.firstChild; 6597 var curToNodeKey; 6598 var curFromNodeKey; 6599 6600 var fromNextSibling; 6601 var toNextSibling; 6602 var matchingFromEl; 6603 6604 // walk the children 6605 outer: while (curToNodeChild) { 6606 toNextSibling = curToNodeChild.nextSibling; 6607 curToNodeKey = getNodeKey(curToNodeChild); 6608 6609 // walk the fromNode children all the way through 6610 while (!skipFrom && curFromNodeChild) { 6611 fromNextSibling = curFromNodeChild.nextSibling; 6612 6613 if (curToNodeChild.isSameNode && curToNodeChild.isSameNode(curFromNodeChild)) { 6614 curToNodeChild = toNextSibling; 6615 curFromNodeChild = fromNextSibling; 6616 continue outer; 6617 } 6618 6619 curFromNodeKey = getNodeKey(curFromNodeChild); 6620 6621 var curFromNodeType = curFromNodeChild.nodeType; 6622 6623 // this means if the curFromNodeChild doesnt have a match with the curToNodeChild 6624 var isCompatible = undefined; 6625 6626 if (curFromNodeType === curToNodeChild.nodeType) { 6627 if (curFromNodeType === ELEMENT_NODE) { 6628 // Both nodes being compared are Element nodes 6629 6630 if (curToNodeKey) { 6631 // The target node has a key so we want to match it up with the correct element 6632 // in the original DOM tree 6633 if (curToNodeKey !== curFromNodeKey) { 6634 // The current element in the original DOM tree does not have a matching key so 6635 // let's check our lookup to see if there is a matching element in the original 6636 // DOM tree 6637 if ((matchingFromEl = fromNodesLookup[curToNodeKey])) { 6638 if (fromNextSibling === matchingFromEl) { 6639 // Special case for single element removals. To avoid removing the original 6640 // DOM node out of the tree (since that can break CSS transitions, etc.), 6641 // we will instead discard the current node and wait until the next 6642 // iteration to properly match up the keyed target element with its matching 6643 // element in the original tree 6644 isCompatible = false; 6645 } else { 6646 // We found a matching keyed element somewhere in the original DOM tree. 6647 // Let's move the original DOM node into the current position and morph 6648 // it. 6649 6650 // NOTE: We use insertBefore instead of replaceChild because we want to go through 6651 // the `removeNode()` function for the node that is being discarded so that 6652 // all lifecycle hooks are correctly invoked 6653 fromEl.insertBefore(matchingFromEl, curFromNodeChild); 6654 6655 // fromNextSibling = curFromNodeChild.nextSibling; 6656 6657 if (curFromNodeKey) { 6658 // Since the node is keyed it might be matched up later so we defer 6659 // the actual removal to later 6660 addKeyedRemoval(curFromNodeKey); 6661 } else { 6662 // NOTE: we skip nested keyed nodes from being removed since there is 6663 // still a chance they will be matched up later 6664 removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); 6665 } 6666 6667 curFromNodeChild = matchingFromEl; 6668 } 6669 } else { 6670 // The nodes are not compatible since the "to" node has a key and there 6671 // is no matching keyed node in the source tree 6672 isCompatible = false; 6673 } 6674 } 6675 } else if (curFromNodeKey) { 6676 // The original has a key 6677 isCompatible = false; 6678 } 6679 6680 isCompatible = isCompatible !== false && compareNodeNames(curFromNodeChild, curToNodeChild); 6681 if (isCompatible) { 6682 // We found compatible DOM elements so transform 6683 // the current "from" node to match the current 6684 // target DOM node. 6685 // MORPH 6686 morphEl(curFromNodeChild, curToNodeChild); 6687 } 6688 6689 } else if (curFromNodeType === TEXT_NODE || curFromNodeType == COMMENT_NODE) { 6690 // Both nodes being compared are Text or Comment nodes 6691 isCompatible = true; 6692 // Simply update nodeValue on the original node to 6693 // change the text value 6694 if (curFromNodeChild.nodeValue !== curToNodeChild.nodeValue) { 6695 curFromNodeChild.nodeValue = curToNodeChild.nodeValue; 6696 } 6697 6698 } 6699 } 6700 6701 if (isCompatible) { 6702 // Advance both the "to" child and the "from" child since we found a match 6703 // Nothing else to do as we already recursively called morphChildren above 6704 curToNodeChild = toNextSibling; 6705 curFromNodeChild = fromNextSibling; 6706 continue outer; 6707 } 6708 6709 // No compatible match so remove the old node from the DOM and continue trying to find a 6710 // match in the original DOM. However, we only do this if the from node is not keyed 6711 // since it is possible that a keyed node might match up with a node somewhere else in the 6712 // target tree and we don't want to discard it just yet since it still might find a 6713 // home in the final DOM tree. After everything is done we will remove any keyed nodes 6714 // that didn't find a home 6715 if (curFromNodeKey) { 6716 // Since the node is keyed it might be matched up later so we defer 6717 // the actual removal to later 6718 addKeyedRemoval(curFromNodeKey); 6719 } else { 6720 // NOTE: we skip nested keyed nodes from being removed since there is 6721 // still a chance they will be matched up later 6722 removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); 6723 } 6724 6725 curFromNodeChild = fromNextSibling; 6726 } // END: while(curFromNodeChild) {} 6727 6728 // If we got this far then we did not find a candidate match for 6729 // our "to node" and we exhausted all of the children "from" 6730 // nodes. Therefore, we will just append the current "to" node 6731 // to the end 6732 if (curToNodeKey && (matchingFromEl = fromNodesLookup[curToNodeKey]) && compareNodeNames(matchingFromEl, curToNodeChild)) { 6733 // MORPH 6734 if(!skipFrom){ addChild(fromEl, matchingFromEl); } 6735 morphEl(matchingFromEl, curToNodeChild); 6736 } else { 6737 var onBeforeNodeAddedResult = onBeforeNodeAdded(curToNodeChild); 6738 if (onBeforeNodeAddedResult !== false) { 6739 if (onBeforeNodeAddedResult) { 6740 curToNodeChild = onBeforeNodeAddedResult; 6741 } 6742 6743 if (curToNodeChild.actualize) { 6744 curToNodeChild = curToNodeChild.actualize(fromEl.ownerDocument || doc); 6745 } 6746 addChild(fromEl, curToNodeChild); 6747 handleNodeAdded(curToNodeChild); 6748 } 6749 } 6750 6751 curToNodeChild = toNextSibling; 6752 curFromNodeChild = fromNextSibling; 6753 } 6754 6755 cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey); 6756 6757 var specialElHandler = specialElHandlers[fromEl.nodeName]; 6758 if (specialElHandler) { 6759 specialElHandler(fromEl, toEl); 6760 } 6761 } // END: morphChildren(...) 6762 6763 var morphedNode = fromNode; 6764 var morphedNodeType = morphedNode.nodeType; 6765 var toNodeType = toNode.nodeType; 6766 6767 if (!childrenOnly) { 6768 // Handle the case where we are given two DOM nodes that are not 6769 // compatible (e.g. <div> --> <span> or <div> --> TEXT) 6770 if (morphedNodeType === ELEMENT_NODE) { 6771 if (toNodeType === ELEMENT_NODE) { 6772 if (!compareNodeNames(fromNode, toNode)) { 6773 onNodeDiscarded(fromNode); 6774 morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI)); 6775 } 6776 } else { 6777 // Going from an element node to a text node 6778 morphedNode = toNode; 6779 } 6780 } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { // Text or comment node 6781 if (toNodeType === morphedNodeType) { 6782 if (morphedNode.nodeValue !== toNode.nodeValue) { 6783 morphedNode.nodeValue = toNode.nodeValue; 6784 } 6785 6786 return morphedNode; 6787 } else { 6788 // Text node to something else 6789 morphedNode = toNode; 6790 } 6791 } 6792 } 6793 6794 if (morphedNode === toNode) { 6795 // The "to node" was not compatible with the "from node" so we had to 6796 // toss out the "from node" and use the "to node" 6797 onNodeDiscarded(fromNode); 6798 } else { 6799 if (toNode.isSameNode && toNode.isSameNode(morphedNode)) { 6800 return; 6801 } 6802 6803 morphEl(morphedNode, toNode, childrenOnly); 6804 6805 // We now need to loop over any keyed nodes that might need to be 6806 // removed. We only do the removal if we know that the keyed node 6807 // never found a match. When a keyed node is matched up we remove 6808 // it out of fromNodesLookup and we use fromNodesLookup to determine 6809 // if a keyed node has been matched up or not 6810 if (keyedRemovalList) { 6811 for (var i=0, len=keyedRemovalList.length; i<len; i++) { 6812 var elToRemove = fromNodesLookup[keyedRemovalList[i]]; 6813 if (elToRemove) { 6814 removeNode(elToRemove, elToRemove.parentNode, false); 6815 } 6816 } 6817 } 6818 } 6819 6820 if (!childrenOnly && morphedNode !== fromNode && fromNode.parentNode) { 6821 if (morphedNode.actualize) { 6822 morphedNode = morphedNode.actualize(fromNode.ownerDocument || doc); 6823 } 6824 // If we had to swap out the from node with a new node because the old 6825 // node was not compatible with the target node then we need to 6826 // replace the old DOM node in the original DOM tree. This is only 6827 // possible if the original DOM node was part of a DOM tree which 6828 // we know is the case if it has a parent node. 6829 fromNode.parentNode.replaceChild(morphedNode, fromNode); 6830 } 6831 6832 return morphedNode; 6833 }; 6834} 6835 6836var morphdom = morphdomFactory(morphAttrs); 6837 6838/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (morphdom); 6839 6840 6841/***/ }), 6842
vendor: 5,636 bytes, lines 6843-7036
6843/***/ "./node_modules/process/browser.js": 6844/*!*****************************************!*\ 6845 !*** ./node_modules/process/browser.js ***! 6846 \*****************************************/ 6847/***/ ((module) => { 6848 6849// shim for using process in browser 6850var process = module.exports = {}; 6851 6852// cached from whatever global is present so that test runners that stub it 6853// don't break things. But we need to wrap it in a try catch in case it is 6854// wrapped in strict mode code which doesn't define any globals. It's inside a 6855// function because try/catches deoptimize in certain engines. 6856 6857var cachedSetTimeout; 6858var cachedClearTimeout; 6859 6860function defaultSetTimout() { 6861 throw new Error('setTimeout has not been defined'); 6862} 6863function defaultClearTimeout () { 6864 throw new Error('clearTimeout has not been defined'); 6865} 6866(function () { 6867 try { 6868 if (typeof setTimeout === 'function') { 6869 cachedSetTimeout = setTimeout; 6870 } else { 6871 cachedSetTimeout = defaultSetTimout; 6872 } 6873 } catch (e) { 6874 cachedSetTimeout = defaultSetTimout; 6875 } 6876 try { 6877 if (typeof clearTimeout === 'function') { 6878 cachedClearTimeout = clearTimeout; 6879 } else { 6880 cachedClearTimeout = defaultClearTimeout; 6881 } 6882 } catch (e) { 6883 cachedClearTimeout = defaultClearTimeout; 6884 } 6885} ()) 6886function runTimeout(fun) { 6887 if (cachedSetTimeout === setTimeout) { 6888 //normal enviroments in sane situations 6889 return setTimeout(fun, 0); 6890 } 6891 // if setTimeout wasn't available but was latter defined 6892 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 6893 cachedSetTimeout = setTimeout; 6894 return setTimeout(fun, 0); 6895 } 6896 try { 6897 // when when somebody has screwed with setTimeout but no I.E. maddness 6898 return cachedSetTimeout(fun, 0); 6899 } catch(e){ 6900 try { 6901 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 6902 return cachedSetTimeout.call(null, fun, 0); 6903 } catch(e){ 6904 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 6905 return cachedSetTimeout.call(this, fun, 0); 6906 } 6907 } 6908 6909 6910} 6911function runClearTimeout(marker) { 6912 if (cachedClearTimeout === clearTimeout) { 6913 //normal enviroments in sane situations 6914 return clearTimeout(marker); 6915 } 6916 // if clearTimeout wasn't available but was latter defined 6917 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 6918 cachedClearTimeout = clearTimeout; 6919 return clearTimeout(marker); 6920 } 6921 try { 6922 // when when somebody has screwed with setTimeout but no I.E. maddness 6923 return cachedClearTimeout(marker); 6924 } catch (e){ 6925 try { 6926 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 6927 return cachedClearTimeout.call(null, marker); 6928 } catch (e){ 6929 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 6930 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 6931 return cachedClearTimeout.call(this, marker); 6932 } 6933 } 6934 6935 6936 6937} 6938var queue = []; 6939var draining = false; 6940var currentQueue; 6941var queueIndex = -1; 6942 6943function cleanUpNextTick() { 6944 if (!draining || !currentQueue) { 6945 return; 6946 } 6947 draining = false; 6948 if (currentQueue.length) { 6949 queue = currentQueue.concat(queue); 6950 } else { 6951 queueIndex = -1; 6952 } 6953 if (queue.length) { 6954 drainQueue(); 6955 } 6956} 6957 6958function drainQueue() { 6959 if (draining) { 6960 return; 6961 } 6962 var timeout = runTimeout(cleanUpNextTick); 6963 draining = true; 6964 6965 var len = queue.length; 6966 while(len) { 6967 currentQueue = queue; 6968 queue = []; 6969 while (++queueIndex < len) { 6970 if (currentQueue) { 6971 currentQueue[queueIndex].run(); 6972 } 6973 } 6974 queueIndex = -1; 6975 len = queue.length; 6976 } 6977 currentQueue = null; 6978 draining = false; 6979 runClearTimeout(timeout); 6980} 6981 6982process.nextTick = function (fun) { 6983 var args = new Array(arguments.length - 1); 6984 if (arguments.length > 1) { 6985 for (var i = 1; i < arguments.length; i++) { 6986 args[i - 1] = arguments[i]; 6987 } 6988 } 6989 queue.push(new Item(fun, args)); 6990 if (queue.length === 1 && !draining) { 6991 runTimeout(drainQueue); 6992 } 6993}; 6994 6995// v8 likes predictible objects 6996function Item(fun, array) { 6997 this.fun = fun; 6998 this.array = array; 6999} 7000Item.prototype.run = function () { 7001 this.fun.apply(null, this.array); 7002}; 7003process.title = 'browser'; 7004process.browser = true; 7005process.env = {}; 7006process.argv = []; 7007process.version = ''; // empty string to avoid regexp issues 7008process.versions = {}; 7009 7010function noop() {} 7011 7012process.on = noop; 7013process.addListener = noop; 7014process.once = noop; 7015process.off = noop; 7016process.removeListener = noop; 7017process.removeAllListeners = noop; 7018process.emit = noop; 7019process.prependListener = noop; 7020process.prependOnceListener = noop; 7021 7022process.listeners = function (name) { return [] } 7023 7024process.binding = function (name) { 7025 throw new Error('process.binding is not supported'); 7026}; 7027 7028process.cwd = function () { return '/' }; 7029process.chdir = function (dir) { 7030 throw new Error('process.chdir is not supported'); 7031}; 7032process.umask = function() { return 0; }; 7033 7034 7035/***/ }), 7036
vendor: 45,325 bytes, lines 7037-8298
7037/***/ "./node_modules/smartphoto/lib/core/index.js": 7038/*!***************************************************!*\ 7039 !*** ./node_modules/smartphoto/lib/core/index.js ***! 7040 \***************************************************/ 7041/***/ ((module, exports, __webpack_require__) => { 7042 7043"use strict"; 7044 7045 7046Object.defineProperty(exports, "__esModule", ({ 7047 value: true 7048})); 7049 7050var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 7051 7052var _aTemplate = __webpack_require__(/*! a-template */ "./node_modules/a-template/lib/index.js"); 7053 7054var _aTemplate2 = _interopRequireDefault(_aTemplate); 7055 7056__webpack_require__(/*! custom-event-polyfill */ "./node_modules/custom-event-polyfill/custom-event-polyfill.js"); 7057 7058function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 7059 7060function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7061 7062function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } 7063 7064function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 7065 7066var template = '<div class="\\{classNames.smartPhoto\\}"<!-- BEGIN hide:exist --> aria-hidden="true"<!-- END hide:exist --><!-- BEGIN hide:empty --> aria-hidden="false"<!-- END hide:empty --> role="dialog">\n\t<div class="\\{classNames.smartPhotoBody\\}">\n\t\t<div class="\\{classNames.smartPhotoInner\\}">\n\t\t\t <div class="\\{classNames.smartPhotoHeader\\}">\n\t\t\t\t\t<span class="\\{classNames.smartPhotoCount\\}">{currentIndex}[increment]/{total}</span>\n\t\t\t\t\t<span class="\\{classNames.smartPhotoCaption\\}" aria-live="polite" tabindex="-1"><!-- BEGIN groupItems:loop --><!-- \\BEGIN currentIndex:touch#{index} -->{caption}<!-- \\END currentIndex:touch#{index} --><!-- END groupItems:loop --></span>\n\t\t\t\t\t<button class="\\{classNames.smartPhotoDismiss\\}" data-action-click="hidePhoto()"><span class="smartphoto-sr-only">\\{message.closeDialog\\}</span></button>\n\t\t\t\t</div>\n\t\t\t\t<div class="\\{classNames.smartPhotoContent\\}"<!-- BEGIN isSmartPhone:exist --> data-action-touchstart="beforeDrag" data-action-touchmove="onDrag" data-action-touchend="afterDrag(false)"<!-- END isSmartPhone:exist --><!-- BEGIN isSmartPhone:empty --> data-action-click="hidePhoto()"<!-- END isSmartPhone:empty -->>\n\t\t\t\t</div>\n\t\t\t\t<ul style="transform:translate({translateX}[round]px,{translateY}[round]px);" class="\\{classNames.smartPhotoList\\}<!-- BEGIN onMoveClass:exist --> \\{classNames.smartPhotoListOnMove\\}<!-- END onMoveClass:exist -->">\n\t\t\t\t\t<!-- BEGIN groupItems:loop -->\n\t\t\t\t\t<li style="transform:translate({translateX}[round]px,{translateY}[round]px);" class="<!-- \\BEGIN currentIndex:touch#{index} -->current<!-- \\END currentIndex:touch#{index} -->">\n\t\t\t\t\t\t<!-- BEGIN processed:exist -->\n\t\t\t\t\t\t<div style="transform:translate({x}[round]px,{y}[round]px) scale({scale});" class="\\\\{classNames.smartPhotoImgWrap\\\\}"<!-- \\BEGIN isSmartPhone:empty --> data-action-mousemove="onDrag" data-action-mousedown="beforeDrag" data-action-mouseup="afterDrag"<!-- \\END isSmartPhone:empty --><!-- \\BEGIN isSmartPhone:exist --> data-action-touchstart="beforeDrag" data-action-touchmove="onDrag" data-action-touchend="afterDrag"<!-- \\END isSmartPhone:exist -->>\n\t\t\t\t\t\t\t<img style="<!-- \\BEGIN currentIndex:touch#{index} -->transform:translate(\\{photoPosX\\}[virtualPos]px,\\{photoPosY\\}[virtualPos]px) scale(\\{scaleSize\\});<!-- \\END currentIndex:touch#{index} -->width:{width}px;" src="{src}" class="\\\\{classNames.smartPhotoImg\\\\}<!-- \\BEGIN scale:exist --> \\\\{classNames.smartPhotoImgOnMove\\\\}<!-- \\END scale:exist --><!-- \\BEGIN elastic:exist --> \\\\{classNames.smartPhotoImgElasticMove\\\\}<!-- \\END elastic:exist --><!-- \\BEGIN appear:exist --> active<!-- \\END appear:exist -->" ondragstart="return false;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- END processed:exist -->\n\t\t\t\t\t\t<!-- BEGIN processed:empty -->\n\t\t\t\t\t\t<div class="\\\\{classNames.smartPhotoLoaderWrap\\\\}">\n\t\t\t\t\t\t\t<span class="\\\\{classNames.smartPhotoLoader\\\\}"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<!-- END processed:empty -->\n\t\t\t\t\t</li>\n\t\t\t\t\t<!-- END groupItems:loop -->\n\t\t\t\t</ul>\n\t\t\t\t<!-- BEGIN arrows:exist -->\n\t\t\t\t<ul class="\\{classNames.smartPhotoArrows\\}"<!-- BEGIN hideUi:exist --> aria-hidden="true"<!-- END hideUi:exist --><!-- BEGIN hideUi:exist --> aria-hidden="false"<!-- END hideUi:exist -->>\n\t\t\t\t\t<li class="\\{classNames.smartPhotoArrowLeft\\}<!-- BEGIN isSmartPhone:exist --> \\{classNames.smartPhotoArrowHideIcon\\}<!-- END isSmartPhone:exist -->"<!-- BEGIN showPrevArrow:empty --> aria-hidden="true"<!-- END showPrevArrow:empty -->><a href="#" data-action-click="gotoSlide({prev})" role="button"><span class="smartphoto-sr-only">\\{message.gotoPrevImage\\}</span></a></li>\n\t\t\t\t\t<li class="\\{classNames.smartPhotoArrowRight\\}<!-- BEGIN isSmartPhone:exist --> \\{classNames.smartPhotoArrowHideIcon\\}<!-- END isSmartPhone:exist -->"<!-- BEGIN showNextArrow:empty --> aria-hidden="true"<!-- END showNextArrow:empty -->><a href="#" data-action-click="gotoSlide({next})" role="button"><span class="smartphoto-sr-only">\\{message.gotoNextImage\\}</span></a></li>\n\t\t\t\t</ul>\n\t\t\t\t<!-- END arrows:exist -->\n\t\t\t\t<!-- BEGIN nav:exist -->\n\t\t\t\t<nav class="\\{classNames.smartPhotoNav\\}"<!-- BEGIN hideUi:exist --> aria-hidden="true"<!-- END hideUi:exist --><!-- BEGIN hideUi:exist --> aria-hidden="false"<!-- END hideUi:exist -->>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<!-- BEGIN groupItems:loop -->\n\t\t\t\t\t\t<li><a href="#" data-action-click="gotoSlide({index})" class="<!-- \\BEGIN currentIndex:touch#{index} -->current<!-- \\END currentIndex:touch#{index} -->" style="background-image:url({thumb});" role="button"><span class="smartphoto-sr-only">go to {caption}</span></a></li>\n\t\t\t\t\t\t<!-- END groupItems:loop -->\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t\t<!-- END nav:exist -->\n\t\t</div>\n\t\t<!-- BEGIN appearEffect:exist -->\n\t\t<img src=\\{appearEffect.img\\}\n\t\tclass="\\{classNames.smartPhotoImgClone\\}"\n\t\tstyle="width:\\{appearEffect.width\\}px;height:\\{appearEffect.height\\}px;transform:translate(\\{appearEffect.left\\}px,\\{appearEffect.top\\}px) scale(1)" />\n\t\t<!-- END appearEffect:exist -->\n\t</div>\n</div>\n'; 7067 7068 7069var util = __webpack_require__(/*! ../lib/util */ "./node_modules/smartphoto/lib/lib/util.js"); 7070var Promise = (__webpack_require__(/*! es6-promise-polyfill */ "./node_modules/es6-promise-polyfill/promise.js").Promise); 7071 7072var defaults = { 7073 classNames: { 7074 smartPhoto: 'smartphoto', 7075 smartPhotoClose: 'smartphoto-close', 7076 smartPhotoBody: 'smartphoto-body', 7077 smartPhotoInner: 'smartphoto-inner', 7078 smartPhotoContent: 'smartphoto-content', 7079 smartPhotoImg: 'smartphoto-img', 7080 smartPhotoImgOnMove: 'smartphoto-img-onmove', 7081 smartPhotoImgElasticMove: 'smartphoto-img-elasticmove', 7082 smartPhotoImgWrap: 'smartphoto-img-wrap', 7083 smartPhotoArrows: 'smartphoto-arrows', 7084 smartPhotoNav: 'smartphoto-nav', 7085 smartPhotoArrowRight: 'smartphoto-arrow-right', 7086 smartPhotoArrowLeft: 'smartphoto-arrow-left', 7087 smartPhotoArrowHideIcon: 'smartphoto-arrow-hide', 7088 smartPhotoImgLeft: 'smartphoto-img-left', 7089 smartPhotoImgRight: 'smartphoto-img-right', 7090 smartPhotoList: 'smartphoto-list', 7091 smartPhotoListOnMove: 'smartphoto-list-onmove', 7092 smartPhotoHeader: 'smartphoto-header', 7093 smartPhotoCount: 'smartphoto-count', 7094 smartPhotoCaption: 'smartphoto-caption', 7095 smartPhotoDismiss: 'smartphoto-dismiss', 7096 smartPhotoLoader: 'smartphoto-loader', 7097 smartPhotoLoaderWrap: 'smartphoto-loader-wrap', 7098 smartPhotoImgClone: 'smartphoto-img-clone' 7099 }, 7100 message: { 7101 gotoNextImage: 'go to the next image', 7102 gotoPrevImage: 'go to the previous image', 7103 closeDialog: 'close the image dialog' 7104 }, 7105 arrows: true, 7106 nav: true, 7107 showAnimation: true, 7108 verticalGravity: false, 7109 useOrientationApi: false, 7110 useHistoryApi: true, 7111 swipeTopToClose: false, 7112 swipeBottomToClose: true, 7113 swipeOffset: 100, 7114 headerHeight: 60, 7115 footerHeight: 60, 7116 forceInterval: 10, 7117 registance: 0.5, 7118 loadOffset: 2, 7119 resizeStyle: 'fit' 7120}; 7121 7122var SmartPhoto = function (_ATemplate) { 7123 _inherits(SmartPhoto, _ATemplate); 7124 7125 function SmartPhoto(selector, settings) { 7126 _classCallCheck(this, SmartPhoto); 7127 7128 var _this = _possibleConstructorReturn(this, (SmartPhoto.__proto__ || Object.getPrototypeOf(SmartPhoto)).call(this)); 7129 7130 _this.data = util.extend({}, defaults, settings); 7131 _this.data.currentIndex = 0; 7132 _this.data.oldIndex = 0; 7133 _this.data.hide = true; 7134 _this.data.group = {}; 7135 _this.data.scaleSize = 1; 7136 _this.data.scale = false; 7137 _this.pos = { x: 0, y: 0 }; 7138 _this.data.photoPosX = 0; 7139 _this.data.photoPosY = 0; 7140 _this.convert = { 7141 increment: _this.increment, 7142 virtualPos: _this.virtualPos, 7143 round: _this.round 7144 }; 7145 _this.data.groupItems = _this.groupItems; 7146 _this.elements = typeof selector === 'string' ? document.querySelectorAll(selector) : selector; 7147 var date = new Date(); 7148 _this.tapSecond = date.getTime(); 7149 _this.onListMove = false; 7150 _this.clicked = false; 7151 _this.id = _this._getUniqId(); 7152 _this.vx = 0; 7153 _this.vy = 0; 7154 _this.data.appearEffect = null; 7155 _this.addTemplate(_this.id, template); 7156 _this.data.isSmartPhone = _this._isSmartPhone(); 7157 var body = document.querySelector('body'); 7158 util.append(body, '<div data-id=\'' + _this.id + '\'></div>'); 7159 [].forEach.call(_this.elements, function (element) { 7160 _this.addNewItem(element); 7161 }); 7162 7163 _this.update(); 7164 var currentItem = _this._getCurrentItemByHash(); 7165 if (currentItem) { 7166 util.triggerEvent(currentItem.element, 'click'); 7167 } 7168 7169 setInterval(function () { 7170 _this._doAnim(); 7171 }, _this.data.forceInterval); 7172 7173 if (!_this.data.isSmartPhone) { 7174 window.addEventListener('resize', function () { 7175 if (!_this.groupItems()) { 7176 return; 7177 } 7178 _this._resetTranslate(); 7179 _this._setPosByCurrentIndex(); 7180 _this._setSizeByScreen(); 7181 _this.update(); 7182 }); 7183 7184 window.addEventListener('keydown', function (e) { 7185 var code = e.keyCode || e.which; 7186 if (_this.data.hide === true) { 7187 return; 7188 } 7189 if (code === 37) { 7190 _this.gotoSlide(_this.data.prev); 7191 } else if (code === 39) { 7192 _this.gotoSlide(_this.data.next); 7193 } else if (code === 27) { 7194 _this.hidePhoto(); 7195 } 7196 }); 7197 return _possibleConstructorReturn(_this); 7198 } 7199 7200 window.addEventListener('orientationchange', function () { 7201 if (!_this.groupItems()) { 7202 return; 7203 } 7204 _this._resetTranslate(); 7205 _this._setPosByCurrentIndex(); 7206 _this._setHashByCurrentIndex(); 7207 _this._setSizeByScreen(); 7208 _this.update(); 7209 }); 7210 7211 if (!_this.data.useOrientationApi) { 7212 return _possibleConstructorReturn(_this); 7213 } 7214 7215 window.addEventListener('deviceorientation', function (e) { 7216 var _window = window, 7217 orientation = _window.orientation; 7218 7219 if (!e || !e.gamma || _this.data.appearEffect) { 7220 return; 7221 } 7222 if (!_this.isBeingZoomed && !_this.photoSwipable && !_this.data.elastic && _this.data.scale) { 7223 if (orientation === 0) { 7224 _this._calcGravity(e.gamma, e.beta); 7225 } else if (orientation === 90) { 7226 _this._calcGravity(e.beta, e.gamma); 7227 } else if (orientation === -90) { 7228 _this._calcGravity(-e.beta, -e.gamma); 7229 } else if (orientation === 180) { 7230 _this._calcGravity(-e.gamma, -e.beta); 7231 } 7232 } 7233 }); 7234 return _this; 7235 } 7236 7237 _createClass(SmartPhoto, [{ 7238 key: 'on', 7239 value: function on(event, fn) { 7240 var _this2 = this; 7241 7242 var photo = this._getElementByClass(this.data.classNames.smartPhoto); 7243 photo.addEventListener(event, function (e) { 7244 fn.call(_this2, e); 7245 }); 7246 } 7247 }, { 7248 key: 'increment', 7249 value: function increment(item) { 7250 return item + 1; 7251 } 7252 }, { 7253 key: 'round', 7254 value: function round(number) { 7255 return Math.round(number); 7256 } 7257 }, { 7258 key: 'virtualPos', 7259 value: function virtualPos(pos) { 7260 pos = parseInt(pos, 10); 7261 var item = this._getSelectedItem(); 7262 return pos / item.scale / this.data.scaleSize; 7263 } 7264 }, { 7265 key: 'groupItems', 7266 value: function groupItems() { 7267 return this.data.group[this.data.currentGroup]; 7268 } 7269 }, { 7270 key: '_resetTranslate', 7271 value: function _resetTranslate() { 7272 var _this3 = this; 7273 7274 var items = this.groupItems(); 7275 items.forEach(function (item, index) { 7276 item.translateX = _this3._getWindowWidth() * index; 7277 }); 7278 } 7279 }, { 7280 key: 'addNewItem', 7281 value: function addNewItem(element) { 7282 var _this4 = this; 7283 7284 var groupId = element.getAttribute('data-group') || 'nogroup'; 7285 var group = this.data.group; 7286 7287 if (groupId === 'nogroup') { 7288 element.setAttribute('data-group', 'nogroup'); 7289 } 7290 if (!group[groupId]) { 7291 group[groupId] = []; 7292 } 7293 var index = group[groupId].length; 7294 var body = document.querySelector('body'); 7295 var src = element.getAttribute('href'); 7296 var img = element.querySelector('img'); 7297 var thumb = src; 7298 if (img) { 7299 if (img.currentSrc) { 7300 thumb = img.currentSrc; 7301 } else { 7302 thumb = img.src; 7303 } 7304 } 7305 var item = { 7306 src: src, 7307 thumb: thumb, 7308 caption: element.getAttribute('data-caption'), 7309 groupId: groupId, 7310 translateX: this._getWindowWidth() * index, 7311 index: index, 7312 translateY: 0, 7313 width: 50, 7314 height: 50, 7315 id: element.getAttribute('data-id') || index, 7316 loaded: false, 7317 processed: false, 7318 element: element 7319 }; 7320 group[groupId].push(item); 7321 this.data.currentGroup = groupId; 7322 var id = element.getAttribute('data-id'); 7323 if (!id) { 7324 element.setAttribute('data-id', index); 7325 } 7326 element.setAttribute('data-index', index); 7327 element.addEventListener('click', function (event) { 7328 event.preventDefault(); 7329 _this4.data.currentGroup = element.getAttribute('data-group'); 7330 _this4.data.currentIndex = parseInt(element.getAttribute('data-index'), 10); 7331 _this4._setHashByCurrentIndex(); 7332 var currentItem = _this4._getSelectedItem(); 7333 if (currentItem.loaded) { 7334 _this4._initPhoto(); 7335 _this4.addAppearEffect(element, currentItem); 7336 _this4.clicked = true; 7337 _this4.update(); 7338 body.style.overflow = 'hidden'; 7339 _this4._fireEvent('open'); 7340 } else { 7341 _this4._loadItem(currentItem).then(function () { 7342 _this4._initPhoto(); 7343 _this4.addAppearEffect(element, currentItem); 7344 _this4.clicked = true; 7345 _this4.update(); 7346 body.style.overflow = 'hidden'; 7347 _this4._fireEvent('open'); 7348 }); 7349 } 7350 }); 7351 } 7352 }, { 7353 key: '_initPhoto', 7354 value: function _initPhoto() { 7355 this.data.total = this.groupItems().length; 7356 this.data.hide = false; 7357 this.data.photoPosX = 0; 7358 this.data.photoPosY = 0; 7359 this._setPosByCurrentIndex(); 7360 this._setSizeByScreen(); 7361 this.setArrow(); 7362 if (this.data.resizeStyle === 'fill' && this.data.isSmartPhone) { 7363 this.data.scale = true; 7364 this.data.hideUi = true; 7365 this.data.scaleSize = this._getScaleBoarder(); 7366 } 7367 } 7368 }, { 7369 key: 'onUpdated', 7370 value: function onUpdated() { 7371 var _this5 = this; 7372 7373 if (this.data.appearEffect && this.data.appearEffect.once) { 7374 this.data.appearEffect.once = false; 7375 this.execEffect().then(function () { 7376 _this5.data.appearEffect = null; 7377 _this5.data.appear = true; 7378 _this5.update(); 7379 }); 7380 } 7381 if (this.clicked) { 7382 this.clicked = false; 7383 var classNames = this.data.classNames; 7384 7385 var caption = this._getElementByClass(classNames.smartPhotoCaption); 7386 caption.focus(); 7387 } 7388 } 7389 }, { 7390 key: 'execEffect', 7391 value: function execEffect() { 7392 var _this6 = this; 7393 7394 return new Promise(function (resolve) { 7395 if (util.isOldIE()) { 7396 resolve(); 7397 } 7398 var _data = _this6.data, 7399 appearEffect = _data.appearEffect, 7400 classNames = _data.classNames; 7401 7402 var effect = _this6._getElementByClass(classNames.smartPhotoImgClone); 7403 var handler = function handler() { 7404 effect.removeEventListener('transitionend', handler, true); 7405 resolve(); 7406 }; 7407 effect.addEventListener('transitionend', handler, true); 7408 setTimeout(function () { 7409 effect.style.transform = 'translate(' + appearEffect.afterX + 'px, ' + appearEffect.afterY + 'px) scale(' + appearEffect.scale + ')'; 7410 }, 10); 7411 }); 7412 } 7413 }, { 7414 key: 'addAppearEffect', 7415 value: function addAppearEffect(element, item) { 7416 if (this.data.showAnimation === false) { 7417 this.data.appear = true; 7418 return; 7419 } 7420 var img = element.querySelector('img'); 7421 var pos = util.getViewPos(img); 7422 var appear = {}; 7423 var scale = 1; 7424 appear.width = img.offsetWidth; 7425 appear.height = img.offsetHeight; 7426 appear.top = pos.top; 7427 appear.left = pos.left; 7428 appear.once = true; 7429 appear.img = item.src; 7430 var toX = this._getWindowWidth(); 7431 var toY = this._getWindowHeight(); 7432 var screenY = toY - this.data.headerHeight - this.data.footerHeight; 7433 7434 if (this.data.resizeStyle === 'fill' && this.data.isSmartPhone) { 7435 if (img.offsetWidth > img.offsetHeight) { 7436 scale = toY / img.offsetHeight; 7437 } else { 7438 scale = toX / img.offsetWidth; 7439 } 7440 } else { 7441 if (appear.width >= appear.height) { 7442 if (item.height < screenY) { 7443 scale = item.width / appear.width; 7444 } else { 7445 scale = screenY / appear.height; 7446 } 7447 } else if (appear.height > appear.width) { 7448 if (item.height < screenY) { 7449 scale = item.height / appear.height; 7450 } else { 7451 scale = screenY / appear.height; 7452 } 7453 } 7454 if (appear.width * scale > toX) { 7455 scale = toX / appear.width; 7456 } 7457 } 7458 7459 var x = (scale - 1) / 2 * img.offsetWidth + (toX - img.offsetWidth * scale) / 2; 7460 var y = (scale - 1) / 2 * img.offsetHeight + (toY - img.offsetHeight * scale) / 2; 7461 appear.afterX = x; 7462 appear.afterY = y; 7463 appear.scale = scale; 7464 this.data.appearEffect = appear; 7465 } 7466 }, { 7467 key: 'hidePhoto', 7468 value: function hidePhoto() { 7469 var _this7 = this; 7470 7471 var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottom'; 7472 7473 this.data.hide = true; 7474 this.data.appear = false; 7475 this.data.appearEffect = null; 7476 this.data.hideUi = false; 7477 this.data.scale = false; 7478 this.data.scaleSize = 1; 7479 var scrollX = window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft; 7480 var scrollY = window.pageYOffset !== undefined ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; 7481 var body = document.querySelector('body'); 7482 if (window.location.hash) { 7483 this._setHash(''); 7484 } 7485 window.scroll(scrollX, scrollY); 7486 this._doHideEffect(dir).then(function () { 7487 _this7.update(); 7488 body.style.overflow = ''; 7489 _this7._fireEvent('close'); 7490 }); 7491 } 7492 }, { 7493 key: '_doHideEffect', 7494 value: function _doHideEffect(dir) { 7495 var _this8 = this; 7496 7497 return new Promise(function (resolve) { 7498 if (util.isOldIE()) { 7499 resolve(); 7500 } 7501 var classNames = _this8.data.classNames; 7502 7503 var photo = _this8._getElementByClass(classNames.smartPhoto); 7504 var img = _this8._getElementByQuery('.current .' + classNames.smartPhotoImg); 7505 var height = _this8._getWindowHeight(); 7506 var handler = function handler() { 7507 photo.removeEventListener('transitionend', handler, true); 7508 resolve(); 7509 }; 7510 photo.style.opacity = 0; 7511 if (dir === 'bottom') { 7512 img.style.transform = 'translateY(' + height + 'px)'; 7513 } else if (dir === 'top') { 7514 img.style.transform = 'translateY(-' + height + 'px)'; 7515 } 7516 photo.addEventListener('transitionend', handler, true); 7517 }); 7518 } 7519 }, { 7520 key: '_getElementByClass', 7521 value: function _getElementByClass(className) { 7522 return document.querySelector('[data-id="' + this.id + '"] .' + className); 7523 } 7524 }, { 7525 key: '_getElementByQuery', 7526 value: function _getElementByQuery(query) { 7527 return document.querySelector('[data-id="' + this.id + '"] ' + query); 7528 } 7529 }, { 7530 key: '_getTouchPos', 7531 value: function _getTouchPos() { 7532 var x = 0; 7533 var y = 0; 7534 var e = typeof event === 'undefined' ? this.e : event; 7535 if (this._isTouched(e)) { 7536 x = e.touches[0].pageX; 7537 y = e.touches[0].pageY; 7538 } else if (e.pageX) { 7539 x = e.pageX; 7540 y = e.pageY; 7541 } 7542 return { x: x, y: y }; 7543 } 7544 }, { 7545 key: '_getGesturePos', 7546 value: function _getGesturePos(e) { 7547 var touches = e.touches; 7548 return [{ x: touches[0].pageX, y: touches[0].pageY }, { x: touches[1].pageX, y: touches[1].pageY }]; 7549 } 7550 }, { 7551 key: '_setPosByCurrentIndex', 7552 value: function _setPosByCurrentIndex() { 7553 var _this9 = this; 7554 7555 var items = this.groupItems(); 7556 var moveX = -1 * items[this.data.currentIndex].translateX; 7557 this.pos.x = moveX; 7558 setTimeout(function () { 7559 _this9.data.translateX = moveX; 7560 _this9.data.translateY = 0; 7561 _this9._listUpdate(); 7562 }, 1); 7563 } 7564 }, { 7565 key: '_setHashByCurrentIndex', 7566 value: function _setHashByCurrentIndex() { 7567 var scrollX = window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft; 7568 var scrollY = window.pageYOffset !== undefined ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; 7569 var items = this.groupItems(); 7570 var id = items[this.data.currentIndex].id; 7571 var group = this.data.currentGroup; 7572 var hash = 'group=' + group + '&photo=' + id; 7573 this._setHash(hash); 7574 window.scroll(scrollX, scrollY); 7575 } 7576 }, { 7577 key: '_setHash', 7578 value: function _setHash(hash) { 7579 if (!(window.history && window.history.pushState) || !this.data.useHistoryApi) { 7580 return; 7581 } 7582 if (hash) { 7583 window.history.replaceState(null, null, '' + location.pathname + location.search + '#' + hash); 7584 } else { 7585 window.history.replaceState(null, null, '' + location.pathname + location.search); 7586 } 7587 } 7588 }, { 7589 key: '_getCurrentItemByHash', 7590 value: function _getCurrentItemByHash() { 7591 var group = this.data.group; 7592 var hash = location.hash.substr(1); 7593 var hashObj = util.parseQuery(hash); 7594 var currentItem = null; 7595 var getCurrentItem = function getCurrentItem(item) { 7596 if (hashObj.group === item.groupId && hashObj.photo === item.id) { 7597 currentItem = item; 7598 } 7599 }; 7600 Object.keys(group).forEach(function (key) { 7601 group[key].forEach(getCurrentItem); 7602 }); 7603 return currentItem; 7604 } 7605 }, { 7606 key: '_loadItem', 7607 value: function _loadItem(item) { 7608 return new Promise(function (resolve) { 7609 var img = new Image(); 7610 img.onload = function () { 7611 item.width = img.width; 7612 item.height = img.height; 7613 item.loaded = true; 7614 resolve(); 7615 }; 7616 img.onerror = function () { 7617 resolve(); 7618 }; 7619 img.src = item.src; 7620 }); 7621 } 7622 }, { 7623 key: '_getItemByIndex', 7624 value: function _getItemByIndex(index) { 7625 var data = this.data; 7626 7627 if (data.group[data.currentGroup][index]) { 7628 return data.group[data.currentGroup][index]; 7629 } else { 7630 return null; 7631 } 7632 } 7633 }, { 7634 key: '_loadNeighborItems', 7635 value: function _loadNeighborItems() { 7636 var _this10 = this; 7637 7638 var index = this.data.currentIndex; 7639 var loadOffset = this.data.loadOffset; 7640 7641 var from = index - loadOffset; 7642 var to = index + loadOffset; 7643 var promises = []; 7644 for (var i = from; i < to; i++) { 7645 var item = this._getItemByIndex(i); 7646 if (item && !item.loaded) { 7647 promises.push(this._loadItem(item)); 7648 } 7649 } 7650 if (promises.length) { 7651 Promise.all(promises).then(function () { 7652 _this10._initPhoto(); 7653 _this10.update(); 7654 }); 7655 } 7656 } 7657 }, { 7658 key: '_setSizeByScreen', 7659 value: function _setSizeByScreen() { 7660 var windowX = this._getWindowWidth(); 7661 var windowY = this._getWindowHeight(); 7662 var headerHeight = this.data.headerHeight; 7663 var footerHeight = this.data.footerHeight; 7664 var screenY = windowY - (headerHeight + footerHeight); 7665 var items = this.groupItems(); 7666 items.forEach(function (item) { 7667 if (!item.loaded) { 7668 return; 7669 } 7670 item.processed = true; 7671 item.scale = screenY / item.height; 7672 if (item.height < screenY) { 7673 item.scale = 1; 7674 } 7675 item.x = (item.scale - 1) / 2 * item.width + (windowX - item.width * item.scale) / 2; 7676 item.y = (item.scale - 1) / 2 * item.height + (windowY - item.height * item.scale) / 2; 7677 if (item.width * item.scale > windowX) { 7678 item.scale = windowX / item.width; 7679 item.x = (item.scale - 1) / 2 * item.width; 7680 } 7681 }); 7682 } 7683 }, { 7684 key: '_slideList', 7685 value: function _slideList() { 7686 var _this11 = this; 7687 7688 this.data.scaleSize = 1; 7689 this.isBeingZoomed = false; 7690 this.data.hideUi = false; 7691 this.data.scale = false; 7692 this.data.photoPosX = 0; 7693 this.data.photoPosY = 0; 7694 this.data.onMoveClass = true; 7695 this._setPosByCurrentIndex(); 7696 this._setHashByCurrentIndex(); 7697 this._setSizeByScreen(); 7698 setTimeout(function () { 7699 var item = _this11._getSelectedItem(); 7700 _this11.data.onMoveClass = false; 7701 _this11.setArrow(); 7702 _this11.update(); 7703 if (_this11.data.oldIndex !== _this11.data.currentIndex) { 7704 _this11._fireEvent('change'); 7705 } 7706 _this11.data.oldIndex = _this11.data.currentIndex; 7707 _this11._loadNeighborItems(); 7708 if (!item.loaded) { 7709 _this11._loadItem(item).then(function () { 7710 _this11._initPhoto(); 7711 _this11.update(); 7712 }); 7713 } 7714 }, 200); 7715 } 7716 }, { 7717 key: 'gotoSlide', 7718 value: function gotoSlide(index) { 7719 if (this.e && this.e.preventDefault) { 7720 this.e.preventDefault(); 7721 } 7722 this.data.currentIndex = parseInt(index, 10); 7723 if (!this.data.currentIndex) { 7724 this.data.currentIndex = 0; 7725 } 7726 this._slideList(); 7727 } 7728 }, { 7729 key: 'setArrow', 7730 value: function setArrow() { 7731 var items = this.groupItems(); 7732 var length = items.length; 7733 var next = this.data.currentIndex + 1; 7734 var prev = this.data.currentIndex - 1; 7735 this.data.showNextArrow = false; 7736 this.data.showPrevArrow = false; 7737 if (next !== length) { 7738 this.data.next = next; 7739 this.data.showNextArrow = true; 7740 } 7741 if (prev !== -1) { 7742 this.data.prev = prev; 7743 this.data.showPrevArrow = true; 7744 } 7745 } 7746 }, { 7747 key: 'beforeDrag', 7748 value: function beforeDrag() { 7749 if (this._isGestured(this.e)) { 7750 this.beforeGesture(); 7751 return; 7752 } 7753 this.isBeingZoomed = false; 7754 if (this.data.scale) { 7755 this.beforePhotoDrag(); 7756 return; 7757 } 7758 var pos = this._getTouchPos(); 7759 this.isSwipable = true; 7760 this.dragStart = true; 7761 this.firstPos = pos; 7762 this.oldPos = pos; 7763 } 7764 }, { 7765 key: 'afterDrag', 7766 value: function afterDrag() { 7767 var items = this.groupItems(); 7768 var date = new Date(); 7769 var tapSecond = date.getTime(); 7770 var offset = this.tapSecond - tapSecond; 7771 var swipeWidth = 0; 7772 var swipeHeight = 0; 7773 this.isSwipable = false; 7774 this.onListMove = false; 7775 7776 if (this.oldPos) { 7777 swipeWidth = this.oldPos.x - this.firstPos.x; 7778 swipeHeight = this.oldPos.y - this.firstPos.y; 7779 } 7780 if (this.isBeingZoomed) { 7781 this.afterGesture(); 7782 return; 7783 } 7784 if (this.data.scale) { 7785 this.afterPhotoDrag(); 7786 return; 7787 } else if (!util.isSmartPhone() && swipeWidth === 0 && swipeHeight === 0) { 7788 this.zoomPhoto(); 7789 return; 7790 } 7791 if (Math.abs(offset) <= 500 && swipeWidth === 0 && swipeHeight === 0) { 7792 this.e.preventDefault(); 7793 this.zoomPhoto(); 7794 return; 7795 } 7796 this.tapSecond = tapSecond; 7797 this._fireEvent('swipeend'); 7798 if (this.moveDir === 'horizontal') { 7799 if (swipeWidth >= this.data.swipeOffset && this.data.currentIndex !== 0) { 7800 this.data.currentIndex -= 1; 7801 } else if (swipeWidth <= -this.data.swipeOffset && this.data.currentIndex !== items.length - 1) { 7802 this.data.currentIndex += 1; 7803 } 7804 this._slideList(); 7805 } 7806 if (this.moveDir === 'vertical') { 7807 if (this.data.swipeBottomToClose && swipeHeight >= this.data.swipeOffset) { 7808 this.hidePhoto('bottom'); 7809 } else if (this.data.swipeTopToClose && swipeHeight <= -this.data.swipeOffset) { 7810 this.hidePhoto('top'); 7811 } else { 7812 this.data.translateY = 0; 7813 this._slideList(); 7814 } 7815 } 7816 } 7817 }, { 7818 key: 'onDrag', 7819 value: function onDrag() { 7820 this.e.preventDefault(); 7821 if (this._isGestured(this.e) && this.onListMove === false) { 7822 this.onGesture(); 7823 return; 7824 } 7825 if (this.isBeingZoomed) { 7826 return; 7827 } 7828 if (this.data.scale) { 7829 this.onPhotoDrag(); 7830 return; 7831 } 7832 if (!this.isSwipable) { 7833 return; 7834 } 7835 7836 var pos = this._getTouchPos(); 7837 var x = pos.x - this.oldPos.x; 7838 var y = pos.y - this.firstPos.y; 7839 7840 if (this.dragStart) { 7841 this._fireEvent('swipestart'); 7842 this.dragStart = false; 7843 if (Math.abs(x) > Math.abs(y)) { 7844 this.moveDir = 'horizontal'; 7845 } else { 7846 this.moveDir = 'vertical'; 7847 } 7848 } 7849 7850 if (this.moveDir === 'horizontal') { 7851 this.pos.x += x; 7852 this.data.translateX = this.pos.x; 7853 } else { 7854 this.data.translateY = y; 7855 } 7856 this.onListMove = true; 7857 this.oldPos = pos; 7858 this._listUpdate(); 7859 } 7860 }, { 7861 key: 'zoomPhoto', 7862 value: function zoomPhoto() { 7863 var _this12 = this; 7864 7865 this.data.hideUi = true; 7866 this.data.scaleSize = this._getScaleBoarder(); 7867 if (this.data.scaleSize <= 1) { 7868 return; 7869 } 7870 this.data.photoPosX = 0; 7871 this.data.photoPosY = 0; 7872 this._photoUpdate(); 7873 setTimeout(function () { 7874 _this12.data.scale = true; 7875 _this12._photoUpdate(); 7876 _this12._fireEvent('zoomin'); 7877 }, 300); 7878 } 7879 }, { 7880 key: 'zoomOutPhoto', 7881 value: function zoomOutPhoto() { 7882 this.data.scaleSize = 1; 7883 this.isBeingZoomed = false; 7884 this.data.hideUi = false; 7885 this.data.scale = false; 7886 this.data.photoPosX = 0; 7887 this.data.photoPosY = 0; 7888 this._photoUpdate(); 7889 this._fireEvent('zoomout'); 7890 } 7891 }, { 7892 key: 'beforePhotoDrag', 7893 value: function beforePhotoDrag() { 7894 var pos = this._getTouchPos(); 7895 this.photoSwipable = true; 7896 if (!this.data.photoPosX) { 7897 this.data.photoPosX = 0; 7898 } 7899 if (!this.data.photoPosY) { 7900 this.data.photoPosY = 0; 7901 } 7902 this.oldPhotoPos = pos; 7903 this.firstPhotoPos = pos; 7904 } 7905 }, { 7906 key: 'onPhotoDrag', 7907 value: function onPhotoDrag() { 7908 if (!this.photoSwipable) { 7909 return; 7910 } 7911 this.e.preventDefault(); 7912 var pos = this._getTouchPos(); 7913 var x = pos.x - this.oldPhotoPos.x; 7914 var y = pos.y - this.oldPhotoPos.y; 7915 var moveX = this._round(this.data.scaleSize * x, 6); 7916 var moveY = this._round(this.data.scaleSize * y, 6); 7917 if (typeof moveX === 'number') { 7918 this.data.photoPosX += moveX; 7919 this.photoVX = moveX; 7920 } 7921 if (typeof moveY === 'number') { 7922 this.data.photoPosY += moveY; 7923 this.photoVY = moveY; 7924 } 7925 this.oldPhotoPos = pos; 7926 this._photoUpdate(); 7927 } 7928 }, { 7929 key: 'afterPhotoDrag', 7930 value: function afterPhotoDrag() { 7931 if (this.oldPhotoPos.x === this.firstPhotoPos.x && this.photoSwipable) { 7932 this.photoSwipable = false; 7933 this.zoomOutPhoto(); 7934 } else { 7935 this.photoSwipable = false; 7936 var item = this._getSelectedItem(); 7937 var bound = this._makeBound(item); 7938 var offset = this.data.swipeOffset * this.data.scaleSize; 7939 var flagX = 0; 7940 var flagY = 0; 7941 if (this.data.photoPosX > bound.maxX) { 7942 flagX = -1; 7943 } else if (this.data.photoPosX < bound.minX) { 7944 flagX = 1; 7945 } 7946 if (this.data.photoPosY > bound.maxY) { 7947 flagY = -1; 7948 } else if (this.data.photoPosY < bound.minY) { 7949 flagY = 1; 7950 } 7951 7952 if (this.data.photoPosX - bound.maxX > offset && this.data.currentIndex !== 0) { 7953 this.gotoSlide(this.data.prev); 7954 return; 7955 } 7956 7957 if (bound.minX - this.data.photoPosX > offset && this.data.currentIndex + 1 !== this.data.total) { 7958 this.gotoSlide(this.data.next); 7959 return; 7960 } 7961 7962 // todo 7963 // if(this.data.photoPosY - bound.maxY > offset) { 7964 // this.hidePhoto(); 7965 // return; 7966 // } 7967 7968 if (flagX === 0 && flagY === 0) { 7969 this.vx = this.photoVX / 5; 7970 this.vy = this.photoVY / 5; 7971 } else { 7972 this._registerElasticForce(flagX, flagY); 7973 } 7974 } 7975 } 7976 }, { 7977 key: 'beforeGesture', 7978 value: function beforeGesture() { 7979 this._fireEvent('gesturestart'); 7980 var pos = this._getGesturePos(this.e); 7981 var distance = this._getDistance(pos[0], pos[1]); 7982 this.isBeingZoomed = true; 7983 this.oldDistance = distance; 7984 this.data.scale = true; 7985 this.e.preventDefault(); 7986 } 7987 }, { 7988 key: 'onGesture', 7989 value: function onGesture() { 7990 var pos = this._getGesturePos(this.e); 7991 var distance = this._getDistance(pos[0], pos[1]); 7992 var size = (distance - this.oldDistance) / 100; 7993 var oldScaleSize = this.data.scaleSize; 7994 var posX = this.data.photoPosX; 7995 var posY = this.data.photoPosY; 7996 this.isBeingZoomed = true; 7997 this.data.scaleSize += this._round(size, 6); 7998 if (this.data.scaleSize < 0.2) { 7999 this.data.scaleSize = 0.2; 8000 } 8001 // todo 8002 if (this.data.scaleSize < oldScaleSize) { 8003 this.data.photoPosX = (1 + this.data.scaleSize - oldScaleSize) * posX; 8004 this.data.photoPosY = (1 + this.data.scaleSize - oldScaleSize) * posY; 8005 } 8006 8007 if (this.data.scaleSize < 1 || this.data.scaleSize > this._getScaleBoarder()) { 8008 this.data.hideUi = true; 8009 } else { 8010 this.data.hideUi = false; 8011 } 8012 this.oldDistance = distance; 8013 this.e.preventDefault(); 8014 this._photoUpdate(); 8015 } 8016 }, { 8017 key: 'afterGesture', 8018 value: function afterGesture() { 8019 if (this.data.scaleSize > this._getScaleBoarder()) { 8020 return; 8021 } 8022 this.data.photoPosX = 0; 8023 this.data.photoPosY = 0; 8024 this.data.scale = false; 8025 this.data.scaleSize = 1; 8026 this.data.hideUi = false; 8027 this._fireEvent('gestureend'); 8028 this._photoUpdate(); 8029 } 8030 }, { 8031 key: '_getForceAndTheta', 8032 value: function _getForceAndTheta(vx, vy) { 8033 return { 8034 force: Math.sqrt(vx * vx + vy * vy), 8035 theta: Math.atan2(vy, vx) 8036 }; 8037 } 8038 }, { 8039 key: '_getScaleBoarder', 8040 value: function _getScaleBoarder() { 8041 var item = this._getSelectedItem(); 8042 var windowWidth = this._getWindowWidth(); 8043 var windowHeight = this._getWindowHeight(); 8044 if (!util.isSmartPhone()) { 8045 return 1 / item.scale; 8046 } 8047 if (item.width > item.height) { 8048 return windowHeight / (item.height * item.scale); 8049 } 8050 return windowWidth / (item.width * item.scale); 8051 } 8052 }, { 8053 key: '_makeBound', 8054 value: function _makeBound(item) { 8055 var width = item.width * item.scale * this.data.scaleSize; 8056 var height = item.height * item.scale * this.data.scaleSize; 8057 var minX = void 0; 8058 var minY = void 0; 8059 var maxX = void 0; 8060 var maxY = void 0; 8061 var windowWidth = this._getWindowWidth(); 8062 var windowHeight = this._getWindowHeight(); 8063 if (windowWidth > width) { 8064 maxX = (windowWidth - width) / 2; 8065 minX = -1 * maxX; 8066 } else { 8067 maxX = (width - windowWidth) / 2; 8068 minX = -1 * maxX; 8069 } 8070 if (windowHeight > height) { 8071 maxY = (windowHeight - height) / 2; 8072 minY = -1 * maxY; 8073 } else { 8074 maxY = (height - windowHeight) / 2; 8075 minY = -1 * maxY; 8076 } 8077 return { 8078 minX: this._round(minX, 6) * this.data.scaleSize, 8079 minY: this._round(minY, 6) * this.data.scaleSize, 8080 maxX: this._round(maxX, 6) * this.data.scaleSize, 8081 maxY: this._round(maxY, 6) * this.data.scaleSize 8082 }; 8083 } 8084 }, { 8085 key: '_registerElasticForce', 8086 value: function _registerElasticForce(x, y) { 8087 var _this13 = this; 8088 8089 var item = this._getSelectedItem(); 8090 var bound = this._makeBound(item); 8091 this.data.elastic = true; 8092 if (x === 1) { 8093 this.data.photoPosX = bound.minX; 8094 } else if (x === -1) { 8095 this.data.photoPosX = bound.maxX; 8096 } 8097 if (y === 1) { 8098 this.data.photoPosY = bound.minY; 8099 } else if (y === -1) { 8100 this.data.photoPosY = bound.maxY; 8101 } 8102 this._photoUpdate(); 8103 setTimeout(function () { 8104 _this13.data.elastic = false; 8105 _this13._photoUpdate(); 8106 }, 300); 8107 } 8108 }, { 8109 key: '_getSelectedItem', 8110 value: function _getSelectedItem() { 8111 var data = this.data; 8112 var index = data.currentIndex; 8113 return data.group[data.currentGroup][index]; 8114 } 8115 }, { 8116 key: '_getUniqId', 8117 value: function _getUniqId() { 8118 return (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(); 8119 } 8120 }, { 8121 key: '_getDistance', 8122 value: function _getDistance(point1, point2) { 8123 var x = point1.x - point2.x; 8124 var y = point1.y - point2.y; 8125 return Math.sqrt(x * x + y * y); 8126 } 8127 }, { 8128 key: '_round', 8129 value: function _round(val, precision) { 8130 var digit = Math.pow(10, precision); 8131 val *= digit; 8132 val = Math.round(val); 8133 val /= digit; 8134 return val; 8135 } 8136 }, { 8137 key: '_isTouched', 8138 value: function _isTouched(e) { 8139 if (e && e.touches) { 8140 return true; 8141 } 8142 return false; 8143 } 8144 }, { 8145 key: '_isGestured', 8146 value: function _isGestured(e) { 8147 if (e && e.touches && e.touches.length > 1) { 8148 return true; 8149 } 8150 return false; 8151 } 8152 }, { 8153 key: '_isSmartPhone', 8154 value: function _isSmartPhone() { 8155 var agent = navigator.userAgent; 8156 if (agent.indexOf('iPhone') > 0 || agent.indexOf('iPad') > 0 || agent.indexOf('ipod') > 0 || agent.indexOf('Android') > 0) { 8157 return true; 8158 } 8159 return false; 8160 } 8161 }, { 8162 key: '_calcGravity', 8163 value: function _calcGravity(gamma, beta) { 8164 if (gamma > 5 || gamma < -5) { 8165 this.vx += gamma * 0.05; 8166 } 8167 if (this.data.verticalGravity === false) { 8168 return; 8169 } 8170 if (beta > 5 || beta < -5) { 8171 this.vy += beta * 0.05; 8172 } 8173 } 8174 }, { 8175 key: '_photoUpdate', 8176 value: function _photoUpdate() { 8177 var classNames = this.data.classNames; 8178 var current = this._getElementByQuery('.current'); 8179 var img = current.querySelector('.' + classNames.smartPhotoImg); 8180 var nav = this._getElementByQuery('.' + classNames.smartPhotoNav); 8181 var arrows = this._getElementByQuery('.' + classNames.smartPhotoArrows); 8182 var photoPosX = this.virtualPos(this.data.photoPosX); 8183 var photoPosY = this.virtualPos(this.data.photoPosY); 8184 var scaleSize = this.data.scaleSize; 8185 var transform = 'translate(' + photoPosX + 'px,' + photoPosY + 'px) scale(' + scaleSize + ')'; 8186 8187 img.style.transform = transform; 8188 if (this.data.scale) { 8189 util.addClass(img, classNames.smartPhotoImgOnMove); 8190 } else { 8191 util.removeClass(img, classNames.smartPhotoImgOnMove); 8192 } 8193 if (this.data.elastic) { 8194 util.addClass(img, classNames.smartPhotoImgElasticMove); 8195 } else { 8196 util.removeClass(img, classNames.smartPhotoImgElasticMove); 8197 } 8198 if (this.data.hideUi) { 8199 if (nav) { 8200 nav.setAttribute('aria-hidden', 'true'); 8201 } 8202 if (arrows) { 8203 arrows.setAttribute('aria-hidden', 'true'); 8204 } 8205 } else { 8206 if (nav) { 8207 nav.setAttribute('aria-hidden', 'false'); 8208 } 8209 if (arrows) { 8210 arrows.setAttribute('aria-hidden', 'false'); 8211 } 8212 } 8213 } 8214 }, { 8215 key: '_getWindowWidth', 8216 value: function _getWindowWidth() { 8217 if (document && document.documentElement) { 8218 return document.documentElement.clientWidth; 8219 } else if (window && window.innerWidth) { 8220 return window.innerWidth; 8221 } 8222 return 0; 8223 } 8224 }, { 8225 key: '_getWindowHeight', 8226 value: function _getWindowHeight() { 8227 if (document && document.documentElement) { 8228 return document.documentElement.clientHeight; 8229 } else if (window && window.innerHeight) { 8230 return window.innerHeight; 8231 } 8232 return 0; 8233 } 8234 }, { 8235 key: '_listUpdate', 8236 value: function _listUpdate() { 8237 var classNames = this.data.classNames; 8238 var list = this._getElementByQuery('.' + classNames.smartPhotoList); 8239 var transform = 'translate(' + this.data.translateX + 'px,' + this.data.translateY + 'px)'; 8240 list.style.transform = transform; 8241 // $list 8242 if (this.data.onMoveClass) { 8243 util.addClass(list, classNames.smartPhotoListOnMove); 8244 } else { 8245 util.removeClass(list, classNames.smartPhotoListOnMove); 8246 } 8247 } 8248 }, { 8249 key: '_fireEvent', 8250 value: function _fireEvent(eventName) { 8251 var photo = this._getElementByClass(this.data.classNames.smartPhoto); 8252 util.triggerEvent(photo, eventName); 8253 } 8254 }, { 8255 key: '_doAnim', 8256 value: function _doAnim() { 8257 if (this.isBeingZoomed || this.isSwipable || this.photoSwipable || this.data.elastic || !this.data.scale) { 8258 return; 8259 } 8260 this.data.photoPosX += this.vx; 8261 this.data.photoPosY += this.vy; 8262 var item = this._getSelectedItem(); 8263 var bound = this._makeBound(item); 8264 if (this.data.photoPosX < bound.minX) { 8265 this.data.photoPosX = bound.minX; 8266 this.vx *= -0.2; 8267 } else if (this.data.photoPosX > bound.maxX) { 8268 this.data.photoPosX = bound.maxX; 8269 this.vx *= -0.2; 8270 } 8271 if (this.data.photoPosY < bound.minY) { 8272 this.data.photoPosY = bound.minY; 8273 this.vy *= -0.2; 8274 } else if (this.data.photoPosY > bound.maxY) { 8275 this.data.photoPosY = bound.maxY; 8276 this.vy *= -0.2; 8277 } 8278 var power = this._getForceAndTheta(this.vx, this.vy); 8279 var force = power.force; 8280 var theta = power.theta; 8281 force -= this.data.registance; 8282 if (Math.abs(force) < 0.5) { 8283 return; 8284 } 8285 this.vx = Math.cos(theta) * force; 8286 this.vy = Math.sin(theta) * force; 8287 this._photoUpdate(); 8288 } 8289 }]); 8290 8291 return SmartPhoto; 8292}(_aTemplate2.default); 8293 8294exports["default"] = SmartPhoto; 8295module.exports = exports['default']; 8296 8297/***/ }), 8298
vendor: 400 bytes, lines 8299-8311
8299/***/ "./node_modules/smartphoto/lib/index.js": 8300/*!**********************************************!*\ 8301 !*** ./node_modules/smartphoto/lib/index.js ***! 8302 \**********************************************/ 8303/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8304 8305"use strict"; 8306 8307 8308module.exports = __webpack_require__(/*! ./core/ */ "./node_modules/smartphoto/lib/core/index.js"); 8309 8310/***/ }), 8311
vendor: 4,360 bytes, lines 8312-8468
8312/***/ "./node_modules/smartphoto/lib/lib/util.js": 8313/*!*************************************************!*\ 8314 !*** ./node_modules/smartphoto/lib/lib/util.js ***! 8315 \*************************************************/ 8316/***/ ((__unused_webpack_module, exports) => { 8317 8318"use strict"; 8319 8320 8321Object.defineProperty(exports, "__esModule", ({ 8322 value: true 8323})); 8324 8325var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 8326 8327var isSmartPhone = exports.isSmartPhone = function isSmartPhone() { 8328 var agent = navigator.userAgent; 8329 if (agent.indexOf('iPhone') > 0 || agent.indexOf('iPad') > 0 || agent.indexOf('ipod') > 0 || agent.indexOf('Android') > 0) { 8330 return true; 8331 } else { 8332 return false; 8333 } 8334}; 8335 8336function deepExtend(out) { 8337 out = out || {}; 8338 8339 for (var i = 1; i < arguments.length; i++) { 8340 var obj = arguments[i]; 8341 if (!obj) { 8342 continue; 8343 } 8344 8345 for (var key in obj) { 8346 if (obj.hasOwnProperty(key)) { 8347 if (_typeof(obj[key]) === 'object') out[key] = deepExtend(out[key], obj[key]);else out[key] = obj[key]; 8348 } 8349 } 8350 } 8351 8352 return out; 8353}; 8354 8355var extend = exports.extend = deepExtend; 8356 8357var triggerEvent = exports.triggerEvent = function triggerEvent(el, eventName, options) { 8358 var event = void 0; 8359 if (window.CustomEvent) { 8360 event = new CustomEvent(eventName, { cancelable: true }); 8361 } else { 8362 event = document.createEvent('CustomEvent'); 8363 event.initCustomEvent(eventName, false, false, options); 8364 } 8365 el.dispatchEvent(event); 8366}; 8367 8368var parseQuery = exports.parseQuery = function parseQuery(query) { 8369 var s = query.split('&'), 8370 data = {}, 8371 i = 0, 8372 iz = s.length, 8373 param, 8374 key, 8375 value; 8376 for (; i < iz; i++) { 8377 param = s[i].split('='); 8378 if (param[0] !== void 0) { 8379 key = param[0]; 8380 value = param[1] !== void 0 ? param.slice(1).join('=') : key; 8381 data[key] = decodeURIComponent(value); 8382 } 8383 } 8384 return data; 8385}; 8386 8387var getViewPos = exports.getViewPos = function getViewPos(element) { 8388 return { 8389 left: element.getBoundingClientRect().left, 8390 top: element.getBoundingClientRect().top 8391 }; 8392}; 8393 8394var removeElement = exports.removeElement = function removeElement(element) { 8395 if (element && element.parentNode) { 8396 element.parentNode.removeChild(element); 8397 } 8398}; 8399 8400var append = exports.append = function append(element, string) { 8401 var div = document.createElement('div'); 8402 div.innerHTML = string; 8403 while (div.children.length > 0) { 8404 element.appendChild(div.children[0]); 8405 } 8406}; 8407 8408var addClass = exports.addClass = function addClass(element, className) { 8409 if (element.classList) { 8410 element.classList.add(className); 8411 } else { 8412 element.className += ' ' + className; 8413 } 8414}; 8415 8416var removeClass = exports.removeClass = function removeClass(element, className) { 8417 if (element.classList) { 8418 element.classList.remove(className); 8419 } else { 8420 element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); 8421 } 8422}; 8423 8424var getBrowser = exports.getBrowser = function getBrowser() { 8425 var ua = window.navigator.userAgent.toLowerCase(); 8426 var ver = window.navigator.appVersion.toLowerCase(); 8427 var name = 'unknown'; 8428 8429 if (ua.indexOf('msie') != -1) { 8430 if (ver.indexOf('msie 6.') != -1) { 8431 name = 'ie6'; 8432 } else if (ver.indexOf('msie 7.') != -1) { 8433 name = 'ie7'; 8434 } else if (ver.indexOf('msie 8.') != -1) { 8435 name = 'ie8'; 8436 } else if (ver.indexOf('msie 9.') != -1) { 8437 name = 'ie9'; 8438 } else if (ver.indexOf('msie 10.') != -1) { 8439 name = 'ie10'; 8440 } else { 8441 name = 'ie'; 8442 } 8443 } else if (ua.indexOf('trident/7') != -1) { 8444 name = 'ie11'; 8445 } else if (ua.indexOf('chrome') != -1) { 8446 name = 'chrome'; 8447 } else if (ua.indexOf('safari') != -1) { 8448 name = 'safari'; 8449 } else if (ua.indexOf('opera') != -1) { 8450 name = 'opera'; 8451 } else if (ua.indexOf('firefox') != -1) { 8452 name = 'firefox'; 8453 } 8454 return name; 8455}; 8456 8457var isOldIE = exports.isOldIE = function isOldIE() { 8458 var browser = getBrowser(); 8459 if (browser.indexOf('ie') !== -1) { 8460 if (parseInt(browser.replace(/[^0-9]/g, '')) <= 10) { 8461 return true; 8462 } 8463 } 8464 return false; 8465}; 8466 8467/***/ }), 8468
vendor: 2,376 bytes, lines 8469-8558
8469/***/ "./node_modules/ssr-window/dist/ssr-window.esm.js": 8470/*!********************************************************!*\ 8471 !*** ./node_modules/ssr-window/dist/ssr-window.esm.js ***! 8472 \********************************************************/ 8473/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8474 8475"use strict"; 8476__webpack_require__.r(__webpack_exports__); 8477/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8478/* harmony export */ "document": () => (/* binding */ doc), 8479/* harmony export */ "window": () => (/* binding */ win) 8480/* harmony export */ }); 8481/** 8482 * SSR Window 1.0.1 8483 * Better handling for window object in SSR environment 8484 * https://github.com/nolimits4web/ssr-window 8485 * 8486 * Copyright 2018, Vladimir Kharlampidi 8487 * 8488 * Licensed under MIT 8489 * 8490 * Released on: July 18, 2018 8491 */ 8492var doc = (typeof document === 'undefined') ? { 8493 body: {}, 8494 addEventListener: function addEventListener() {}, 8495 removeEventListener: function removeEventListener() {}, 8496 activeElement: { 8497 blur: function blur() {}, 8498 nodeName: '', 8499 }, 8500 querySelector: function querySelector() { 8501 return null; 8502 }, 8503 querySelectorAll: function querySelectorAll() { 8504 return []; 8505 }, 8506 getElementById: function getElementById() { 8507 return null; 8508 }, 8509 createEvent: function createEvent() { 8510 return { 8511 initEvent: function initEvent() {}, 8512 }; 8513 }, 8514 createElement: function createElement() { 8515 return { 8516 children: [], 8517 childNodes: [], 8518 style: {}, 8519 setAttribute: function setAttribute() {}, 8520 getElementsByTagName: function getElementsByTagName() { 8521 return []; 8522 }, 8523 }; 8524 }, 8525 location: { hash: '' }, 8526} : document; // eslint-disable-line 8527 8528var win = (typeof window === 'undefined') ? { 8529 document: doc, 8530 navigator: { 8531 userAgent: '', 8532 }, 8533 location: {}, 8534 history: {}, 8535 CustomEvent: function CustomEvent() { 8536 return this; 8537 }, 8538 addEventListener: function addEventListener() {}, 8539 removeEventListener: function removeEventListener() {}, 8540 getComputedStyle: function getComputedStyle() { 8541 return { 8542 getPropertyValue: function getPropertyValue() { 8543 return ''; 8544 }, 8545 }; 8546 }, 8547 Image: function Image() {}, 8548 Date: function Date() {}, 8549 screen: {}, 8550 setTimeout: function setTimeout() {}, 8551 clearTimeout: function clearTimeout() {}, 8552} : window; // eslint-disable-line 8553 8554 8555 8556 8557/***/ }), 8558
vendor: 20,992 bytes, lines 8559-8708
8559/***/ "./node_modules/smartphoto/css/smartphoto.min.css": 8560/*!********************************************************!*\ 8561 !*** ./node_modules/smartphoto/css/smartphoto.min.css ***! 8562 \********************************************************/ 8563/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8564 8565"use strict"; 8566__webpack_require__.r(__webpack_exports__); 8567/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8568/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8569/* harmony export */ }); 8570/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8571/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8572/* harmony import */ var _css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_smartphoto_min_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./smartphoto.min.css */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/smartphoto/css/smartphoto.min.css"); 8573 8574 8575 8576var options = {}; 8577 8578options.insert = "head"; 8579options.singleton = false; 8580 8581var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_smartphoto_min_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); 8582 8583 8584 8585/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_smartphoto_min_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8586 8587/***/ }), 8588 8589/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&": 8590/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 8591 !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css& ***! 8592 \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 8593/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8594 8595"use strict"; 8596__webpack_require__.r(__webpack_exports__); 8597/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8598/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8599/* harmony export */ }); 8600/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8601/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8602/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Desktop.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&"); 8603 8604 8605 8606var options = {}; 8607 8608options.insert = "head"; 8609options.singleton = false; 8610 8611var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"], options); 8612 8613 8614 8615/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8616 8617/***/ }), 8618 8619/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&": 8620/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 8621 !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css& ***! 8622 \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 8623/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8624 8625"use strict"; 8626__webpack_require__.r(__webpack_exports__); 8627/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8628/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8629/* harmony export */ }); 8630/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8631/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8632/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&"); 8633 8634 8635 8636var options = {}; 8637 8638options.insert = "head"; 8639options.singleton = false; 8640 8641var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"], options); 8642 8643 8644 8645/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8646 8647/***/ }), 8648 8649/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&": 8650/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 8651 !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css& ***! 8652 \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 8653/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8654 8655"use strict"; 8656__webpack_require__.r(__webpack_exports__); 8657/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8658/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8659/* harmony export */ }); 8660/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8661/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8662/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Item.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&"); 8663 8664 8665 8666var options = {}; 8667 8668options.insert = "head"; 8669options.singleton = false; 8670 8671var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"], options); 8672 8673 8674 8675/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8676 8677/***/ }), 8678 8679/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&": 8680/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ 8681 !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css& ***! 8682 \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ 8683/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8684 8685"use strict"; 8686__webpack_require__.r(__webpack_exports__); 8687/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8688/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8689/* harmony export */ }); 8690/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); 8691/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); 8692/* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Order.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&"); 8693 8694 8695 8696var options = {}; 8697 8698options.insert = "head"; 8699options.singleton = false; 8700 8701var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"], options); 8702 8703 8704 8705/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); 8706 8707/***/ }), 8708
vendor: 7,200 bytes, lines 8709-8987
8709/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": 8710/*!****************************************************************************!*\ 8711 !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! 8712 \****************************************************************************/ 8713/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8714 8715"use strict"; 8716 8717 8718var isOldIE = function isOldIE() { 8719 var memo; 8720 return function memorize() { 8721 if (typeof memo === 'undefined') { 8722 // Test for IE <= 9 as proposed by Browserhacks 8723 // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 8724 // Tests for existence of standard globals is to allow style-loader 8725 // to operate correctly into non-standard environments 8726 // @see https://github.com/webpack-contrib/style-loader/issues/177 8727 memo = Boolean(window && document && document.all && !window.atob); 8728 } 8729 8730 return memo; 8731 }; 8732}(); 8733 8734var getTarget = function getTarget() { 8735 var memo = {}; 8736 return function memorize(target) { 8737 if (typeof memo[target] === 'undefined') { 8738 var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself 8739 8740 if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { 8741 try { 8742 // This will throw an exception if access to iframe is blocked 8743 // due to cross-origin restrictions 8744 styleTarget = styleTarget.contentDocument.head; 8745 } catch (e) { 8746 // istanbul ignore next 8747 styleTarget = null; 8748 } 8749 } 8750 8751 memo[target] = styleTarget; 8752 } 8753 8754 return memo[target]; 8755 }; 8756}(); 8757 8758var stylesInDom = []; 8759 8760function getIndexByIdentifier(identifier) { 8761 var result = -1; 8762 8763 for (var i = 0; i < stylesInDom.length; i++) { 8764 if (stylesInDom[i].identifier === identifier) { 8765 result = i; 8766 break; 8767 } 8768 } 8769 8770 return result; 8771} 8772 8773function modulesToDom(list, options) { 8774 var idCountMap = {}; 8775 var identifiers = []; 8776 8777 for (var i = 0; i < list.length; i++) { 8778 var item = list[i]; 8779 var id = options.base ? item[0] + options.base : item[0]; 8780 var count = idCountMap[id] || 0; 8781 var identifier = "".concat(id, " ").concat(count); 8782 idCountMap[id] = count + 1; 8783 var index = getIndexByIdentifier(identifier); 8784 var obj = { 8785 css: item[1], 8786 media: item[2], 8787 sourceMap: item[3] 8788 }; 8789 8790 if (index !== -1) { 8791 stylesInDom[index].references++; 8792 stylesInDom[index].updater(obj); 8793 } else { 8794 stylesInDom.push({ 8795 identifier: identifier, 8796 updater: addStyle(obj, options), 8797 references: 1 8798 }); 8799 } 8800 8801 identifiers.push(identifier); 8802 } 8803 8804 return identifiers; 8805} 8806 8807function insertStyleElement(options) { 8808 var style = document.createElement('style'); 8809 var attributes = options.attributes || {}; 8810 8811 if (typeof attributes.nonce === 'undefined') { 8812 var nonce = true ? __webpack_require__.nc : 0; 8813 8814 if (nonce) { 8815 attributes.nonce = nonce; 8816 } 8817 } 8818 8819 Object.keys(attributes).forEach(function (key) { 8820 style.setAttribute(key, attributes[key]); 8821 }); 8822 8823 if (typeof options.insert === 'function') { 8824 options.insert(style); 8825 } else { 8826 var target = getTarget(options.insert || 'head'); 8827 8828 if (!target) { 8829 throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); 8830 } 8831 8832 target.appendChild(style); 8833 } 8834 8835 return style; 8836} 8837 8838function removeStyleElement(style) { 8839 // istanbul ignore if 8840 if (style.parentNode === null) { 8841 return false; 8842 } 8843 8844 style.parentNode.removeChild(style); 8845} 8846/* istanbul ignore next */ 8847 8848 8849var replaceText = function replaceText() { 8850 var textStore = []; 8851 return function replace(index, replacement) { 8852 textStore[index] = replacement; 8853 return textStore.filter(Boolean).join('\n'); 8854 }; 8855}(); 8856 8857function applyToSingletonTag(style, index, remove, obj) { 8858 var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE 8859 8860 /* istanbul ignore if */ 8861 8862 if (style.styleSheet) { 8863 style.styleSheet.cssText = replaceText(index, css); 8864 } else { 8865 var cssNode = document.createTextNode(css); 8866 var childNodes = style.childNodes; 8867 8868 if (childNodes[index]) { 8869 style.removeChild(childNodes[index]); 8870 } 8871 8872 if (childNodes.length) { 8873 style.insertBefore(cssNode, childNodes[index]); 8874 } else { 8875 style.appendChild(cssNode); 8876 } 8877 } 8878} 8879 8880function applyToTag(style, options, obj) { 8881 var css = obj.css; 8882 var media = obj.media; 8883 var sourceMap = obj.sourceMap; 8884 8885 if (media) { 8886 style.setAttribute('media', media); 8887 } else { 8888 style.removeAttribute('media'); 8889 } 8890 8891 if (sourceMap && typeof btoa !== 'undefined') { 8892 css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); 8893 } // For old IE 8894 8895 /* istanbul ignore if */ 8896 8897 8898 if (style.styleSheet) { 8899 style.styleSheet.cssText = css; 8900 } else { 8901 while (style.firstChild) { 8902 style.removeChild(style.firstChild); 8903 } 8904 8905 style.appendChild(document.createTextNode(css)); 8906 } 8907} 8908 8909var singleton = null; 8910var singletonCounter = 0; 8911 8912function addStyle(obj, options) { 8913 var style; 8914 var update; 8915 var remove; 8916 8917 if (options.singleton) { 8918 var styleIndex = singletonCounter++; 8919 style = singleton || (singleton = insertStyleElement(options)); 8920 update = applyToSingletonTag.bind(null, style, styleIndex, false); 8921 remove = applyToSingletonTag.bind(null, style, styleIndex, true); 8922 } else { 8923 style = insertStyleElement(options); 8924 update = applyToTag.bind(null, style, options); 8925 8926 remove = function remove() { 8927 removeStyleElement(style); 8928 }; 8929 } 8930 8931 update(obj); 8932 return function updateStyle(newObj) { 8933 if (newObj) { 8934 if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { 8935 return; 8936 } 8937 8938 update(obj = newObj); 8939 } else { 8940 remove(); 8941 } 8942 }; 8943} 8944 8945module.exports = function (list, options) { 8946 options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> 8947 // tags it will allow on a page 8948 8949 if (!options.singleton && typeof options.singleton !== 'boolean') { 8950 options.singleton = isOldIE(); 8951 } 8952 8953 list = list || []; 8954 var lastIdentifiers = modulesToDom(list, options); 8955 return function update(newList) { 8956 newList = newList || []; 8957 8958 if (Object.prototype.toString.call(newList) !== '[object Array]') { 8959 return; 8960 } 8961 8962 for (var i = 0; i < lastIdentifiers.length; i++) { 8963 var identifier = lastIdentifiers[i]; 8964 var index = getIndexByIdentifier(identifier); 8965 stylesInDom[index].references--; 8966 } 8967 8968 var newLastIdentifiers = modulesToDom(newList, options); 8969 8970 for (var _i = 0; _i < lastIdentifiers.length; _i++) { 8971 var _identifier = lastIdentifiers[_i]; 8972 8973 var _index = getIndexByIdentifier(_identifier); 8974 8975 if (stylesInDom[_index].references === 0) { 8976 stylesInDom[_index].updater(); 8977 8978 stylesInDom.splice(_index, 1); 8979 } 8980 } 8981 8982 lastIdentifiers = newLastIdentifiers; 8983 }; 8984}; 8985 8986/***/ }), 8987
vendor: 224,558 bytes, lines 8988-15741
8988/***/ "./node_modules/swiper/dist/js/swiper.esm.bundle.js": 8989/*!**********************************************************!*\ 8990 !*** ./node_modules/swiper/dist/js/swiper.esm.bundle.js ***! 8991 \**********************************************************/ 8992/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8993 8994"use strict"; 8995__webpack_require__.r(__webpack_exports__); 8996/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8997/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 8998/* harmony export */ }); 8999/* harmony import */ var dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7/dist/dom7.modular */ "./node_modules/dom7/dist/dom7.modular.js"); 9000/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/dist/ssr-window.esm.js"); 9001/** 9002 * Swiper 4.3.5 9003 * Most modern mobile touch slider and framework with hardware accelerated transitions 9004 * http://www.idangero.us/swiper/ 9005 * 9006 * Copyright 2014-2018 Vladimir Kharlampidi 9007 * 9008 * Released under the MIT License 9009 * 9010 * Released on: July 31, 2018 9011 */ 9012 9013 9014 9015 9016const Methods = { 9017 addClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.addClass, 9018 removeClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.removeClass, 9019 hasClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.hasClass, 9020 toggleClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.toggleClass, 9021 attr: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.attr, 9022 removeAttr: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.removeAttr, 9023 data: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.data, 9024 transform: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.transform, 9025 transition: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.transition, 9026 on: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.on, 9027 off: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.off, 9028 trigger: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.trigger, 9029 transitionEnd: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.transitionEnd, 9030 outerWidth: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.outerWidth, 9031 outerHeight: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.outerHeight, 9032 offset: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.offset, 9033 css: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.css, 9034 each: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.each, 9035 html: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.html, 9036 text: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.text, 9037 is: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.is, 9038 index: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.index, 9039 eq: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.eq, 9040 append: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.append, 9041 prepend: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.prepend, 9042 next: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.next, 9043 nextAll: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.nextAll, 9044 prev: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.prev, 9045 prevAll: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.prevAll, 9046 parent: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.parent, 9047 parents: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.parents, 9048 closest: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.closest, 9049 find: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.find, 9050 children: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.children, 9051 remove: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.remove, 9052 add: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.add, 9053 styles: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.styles, 9054}; 9055 9056Object.keys(Methods).forEach((methodName) => { 9057 dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$.fn[methodName] = Methods[methodName]; 9058}); 9059 9060const Utils = { 9061 deleteProps(obj) { 9062 const object = obj; 9063 Object.keys(object).forEach((key) => { 9064 try { 9065 object[key] = null; 9066 } catch (e) { 9067 // no getter for object 9068 } 9069 try { 9070 delete object[key]; 9071 } catch (e) { 9072 // something got wrong 9073 } 9074 }); 9075 }, 9076 nextTick(callback, delay = 0) { 9077 return setTimeout(callback, delay); 9078 }, 9079 now() { 9080 return Date.now(); 9081 }, 9082 getTranslate(el, axis = 'x') { 9083 let matrix; 9084 let curTransform; 9085 let transformMatrix; 9086 9087 const curStyle = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.getComputedStyle(el, null); 9088 9089 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.WebKitCSSMatrix) { 9090 curTransform = curStyle.transform || curStyle.webkitTransform; 9091 if (curTransform.split(',').length > 6) { 9092 curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); 9093 } 9094 // Some old versions of Webkit choke when 'none' is passed; pass 9095 // empty string instead in this case 9096 transformMatrix = new ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); 9097 } else { 9098 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); 9099 matrix = transformMatrix.toString().split(','); 9100 } 9101 9102 if (axis === 'x') { 9103 // Latest Chrome and webkits Fix 9104 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.WebKitCSSMatrix) curTransform = transformMatrix.m41; 9105 // Crazy IE10 Matrix 9106 else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); 9107 // Normal Browsers 9108 else curTransform = parseFloat(matrix[4]); 9109 } 9110 if (axis === 'y') { 9111 // Latest Chrome and webkits Fix 9112 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.WebKitCSSMatrix) curTransform = transformMatrix.m42; 9113 // Crazy IE10 Matrix 9114 else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); 9115 // Normal Browsers 9116 else curTransform = parseFloat(matrix[5]); 9117 } 9118 return curTransform || 0; 9119 }, 9120 parseUrlQuery(url) { 9121 const query = {}; 9122 let urlToParse = url || ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.location.href; 9123 let i; 9124 let params; 9125 let param; 9126 let length; 9127 if (typeof urlToParse === 'string' && urlToParse.length) { 9128 urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : ''; 9129 params = urlToParse.split('&').filter(paramsPart => paramsPart !== ''); 9130 length = params.length; 9131 9132 for (i = 0; i < length; i += 1) { 9133 param = params[i].replace(/#\S+/g, '').split('='); 9134 query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || ''; 9135 } 9136 } 9137 return query; 9138 }, 9139 isObject(o) { 9140 return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; 9141 }, 9142 extend(...args) { 9143 const to = Object(args[0]); 9144 for (let i = 1; i < args.length; i += 1) { 9145 const nextSource = args[i]; 9146 if (nextSource !== undefined && nextSource !== null) { 9147 const keysArray = Object.keys(Object(nextSource)); 9148 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 9149 const nextKey = keysArray[nextIndex]; 9150 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 9151 if (desc !== undefined && desc.enumerable) { 9152 if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { 9153 Utils.extend(to[nextKey], nextSource[nextKey]); 9154 } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { 9155 to[nextKey] = {}; 9156 Utils.extend(to[nextKey], nextSource[nextKey]); 9157 } else { 9158 to[nextKey] = nextSource[nextKey]; 9159 } 9160 } 9161 } 9162 } 9163 } 9164 return to; 9165 }, 9166}; 9167 9168const Support = (function Support() { 9169 const testDiv = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.createElement('div'); 9170 return { 9171 touch: (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Modernizr && ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Modernizr.touch === true) || (function checkTouch() { 9172 return !!(("ontouchstart" in ssr_window__WEBPACK_IMPORTED_MODULE_1__.window) || (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.DocumentTouch && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document instanceof ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.DocumentTouch)); 9173 }()), 9174 9175 pointerEvents: !!(ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.pointerEnabled || ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.PointerEvent), 9176 prefixedPointerEvents: !!ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.msPointerEnabled, 9177 9178 transition: (function checkTransition() { 9179 const style = testDiv.style; 9180 return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style); 9181 }()), 9182 transforms3d: (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Modernizr && ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Modernizr.csstransforms3d === true) || (function checkTransforms3d() { 9183 const style = testDiv.style; 9184 return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style); 9185 }()), 9186 9187 flexbox: (function checkFlexbox() { 9188 const style = testDiv.style; 9189 const styles$$1 = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' '); 9190 for (let i = 0; i < styles$$1.length; i += 1) { 9191 if (styles$$1[i] in style) return true; 9192 } 9193 return false; 9194 }()), 9195 9196 observer: (function checkObserver() { 9197 return ("MutationObserver" in ssr_window__WEBPACK_IMPORTED_MODULE_1__.window || "WebkitMutationObserver" in ssr_window__WEBPACK_IMPORTED_MODULE_1__.window); 9198 }()), 9199 9200 passiveListener: (function checkPassiveListener() { 9201 let supportsPassive = false; 9202 try { 9203 const opts = Object.defineProperty({}, 'passive', { 9204 // eslint-disable-next-line 9205 get() { 9206 supportsPassive = true; 9207 }, 9208 }); 9209 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.addEventListener('testPassiveListener', null, opts); 9210 } catch (e) { 9211 // No support 9212 } 9213 return supportsPassive; 9214 }()), 9215 9216 gestures: (function checkGestures() { 9217 return "ongesturestart" in ssr_window__WEBPACK_IMPORTED_MODULE_1__.window; 9218 }()), 9219 }; 9220}()); 9221 9222class SwiperClass { 9223 constructor(params = {}) { 9224 const self = this; 9225 self.params = params; 9226 9227 // Events 9228 self.eventsListeners = {}; 9229 9230 if (self.params && self.params.on) { 9231 Object.keys(self.params.on).forEach((eventName) => { 9232 self.on(eventName, self.params.on[eventName]); 9233 }); 9234 } 9235 } 9236 9237 on(events, handler, priority) { 9238 const self = this; 9239 if (typeof handler !== 'function') return self; 9240 const method = priority ? 'unshift' : 'push'; 9241 events.split(' ').forEach((event) => { 9242 if (!self.eventsListeners[event]) self.eventsListeners[event] = []; 9243 self.eventsListeners[event][method](handler); 9244 }); 9245 return self; 9246 } 9247 9248 once(events, handler, priority) { 9249 const self = this; 9250 if (typeof handler !== 'function') return self; 9251 function onceHandler(...args) { 9252 handler.apply(self, args); 9253 self.off(events, onceHandler); 9254 } 9255 return self.on(events, onceHandler, priority); 9256 } 9257 9258 off(events, handler) { 9259 const self = this; 9260 if (!self.eventsListeners) return self; 9261 events.split(' ').forEach((event) => { 9262 if (typeof handler === 'undefined') { 9263 self.eventsListeners[event] = []; 9264 } else { 9265 self.eventsListeners[event].forEach((eventHandler, index$$1) => { 9266 if (eventHandler === handler) { 9267 self.eventsListeners[event].splice(index$$1, 1); 9268 } 9269 }); 9270 } 9271 }); 9272 return self; 9273 } 9274 9275 emit(...args) { 9276 const self = this; 9277 if (!self.eventsListeners) return self; 9278 let events; 9279 let data$$1; 9280 let context; 9281 if (typeof args[0] === 'string' || Array.isArray(args[0])) { 9282 events = args[0]; 9283 data$$1 = args.slice(1, args.length); 9284 context = self; 9285 } else { 9286 events = args[0].events; 9287 data$$1 = args[0].data; 9288 context = args[0].context || self; 9289 } 9290 const eventsArray = Array.isArray(events) ? events : events.split(' '); 9291 eventsArray.forEach((event) => { 9292 if (self.eventsListeners && self.eventsListeners[event]) { 9293 const handlers = []; 9294 self.eventsListeners[event].forEach((eventHandler) => { 9295 handlers.push(eventHandler); 9296 }); 9297 handlers.forEach((eventHandler) => { 9298 eventHandler.apply(context, data$$1); 9299 }); 9300 } 9301 }); 9302 return self; 9303 } 9304 9305 useModulesParams(instanceParams) { 9306 const instance = this; 9307 if (!instance.modules) return; 9308 Object.keys(instance.modules).forEach((moduleName) => { 9309 const module = instance.modules[moduleName]; 9310 // Extend params 9311 if (module.params) { 9312 Utils.extend(instanceParams, module.params); 9313 } 9314 }); 9315 } 9316 9317 useModules(modulesParams = {}) { 9318 const instance = this; 9319 if (!instance.modules) return; 9320 Object.keys(instance.modules).forEach((moduleName) => { 9321 const module = instance.modules[moduleName]; 9322 const moduleParams = modulesParams[moduleName] || {}; 9323 // Extend instance methods and props 9324 if (module.instance) { 9325 Object.keys(module.instance).forEach((modulePropName) => { 9326 const moduleProp = module.instance[modulePropName]; 9327 if (typeof moduleProp === 'function') { 9328 instance[modulePropName] = moduleProp.bind(instance); 9329 } else { 9330 instance[modulePropName] = moduleProp; 9331 } 9332 }); 9333 } 9334 // Add event listeners 9335 if (module.on && instance.on) { 9336 Object.keys(module.on).forEach((moduleEventName) => { 9337 instance.on(moduleEventName, module.on[moduleEventName]); 9338 }); 9339 } 9340 9341 // Module create callback 9342 if (module.create) { 9343 module.create.bind(instance)(moduleParams); 9344 } 9345 }); 9346 } 9347 9348 static set components(components) { 9349 const Class = this; 9350 if (!Class.use) return; 9351 Class.use(components); 9352 } 9353 9354 static installModule(module, ...params) { 9355 const Class = this; 9356 if (!Class.prototype.modules) Class.prototype.modules = {}; 9357 const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`); 9358 Class.prototype.modules[name] = module; 9359 // Prototype 9360 if (module.proto) { 9361 Object.keys(module.proto).forEach((key) => { 9362 Class.prototype[key] = module.proto[key]; 9363 }); 9364 } 9365 // Class 9366 if (module.static) { 9367 Object.keys(module.static).forEach((key) => { 9368 Class[key] = module.static[key]; 9369 }); 9370 } 9371 // Callback 9372 if (module.install) { 9373 module.install.apply(Class, params); 9374 } 9375 return Class; 9376 } 9377 9378 static use(module, ...params) { 9379 const Class = this; 9380 if (Array.isArray(module)) { 9381 module.forEach(m => Class.installModule(m)); 9382 return Class; 9383 } 9384 return Class.installModule(module, ...params); 9385 } 9386} 9387 9388function updateSize () { 9389 const swiper = this; 9390 let width; 9391 let height; 9392 const $el = swiper.$el; 9393 if (typeof swiper.params.width !== 'undefined') { 9394 width = swiper.params.width; 9395 } else { 9396 width = $el[0].clientWidth; 9397 } 9398 if (typeof swiper.params.height !== 'undefined') { 9399 height = swiper.params.height; 9400 } else { 9401 height = $el[0].clientHeight; 9402 } 9403 if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) { 9404 return; 9405 } 9406 9407 // Subtract paddings 9408 width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10); 9409 height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10); 9410 9411 Utils.extend(swiper, { 9412 width, 9413 height, 9414 size: swiper.isHorizontal() ? width : height, 9415 }); 9416} 9417 9418function updateSlides () { 9419 const swiper = this; 9420 const params = swiper.params; 9421 9422 const { 9423 $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL, 9424 } = swiper; 9425 const isVirtual = swiper.virtual && params.virtual.enabled; 9426 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 9427 const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); 9428 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 9429 let snapGrid = []; 9430 const slidesGrid = []; 9431 const slidesSizesGrid = []; 9432 9433 let offsetBefore = params.slidesOffsetBefore; 9434 if (typeof offsetBefore === 'function') { 9435 offsetBefore = params.slidesOffsetBefore.call(swiper); 9436 } 9437 9438 let offsetAfter = params.slidesOffsetAfter; 9439 if (typeof offsetAfter === 'function') { 9440 offsetAfter = params.slidesOffsetAfter.call(swiper); 9441 } 9442 9443 const previousSnapGridLength = swiper.snapGrid.length; 9444 const previousSlidesGridLength = swiper.snapGrid.length; 9445 9446 let spaceBetween = params.spaceBetween; 9447 let slidePosition = -offsetBefore; 9448 let prevSlideSize = 0; 9449 let index$$1 = 0; 9450 if (typeof swiperSize === 'undefined') { 9451 return; 9452 } 9453 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 9454 spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize; 9455 } 9456 9457 swiper.virtualSize = -spaceBetween; 9458 9459 // reset margins 9460 if (rtl) slides.css({ marginLeft: '', marginTop: '' }); 9461 else slides.css({ marginRight: '', marginBottom: '' }); 9462 9463 let slidesNumberEvenToRows; 9464 if (params.slidesPerColumn > 1) { 9465 if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) { 9466 slidesNumberEvenToRows = slidesLength; 9467 } else { 9468 slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn; 9469 } 9470 if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') { 9471 slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn); 9472 } 9473 } 9474 9475 // Calc slides 9476 let slideSize; 9477 const slidesPerColumn = params.slidesPerColumn; 9478 const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; 9479 const numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength); 9480 for (let i = 0; i < slidesLength; i += 1) { 9481 slideSize = 0; 9482 const slide = slides.eq(i); 9483 if (params.slidesPerColumn > 1) { 9484 // Set slides order 9485 let newSlideOrderIndex; 9486 let column; 9487 let row; 9488 if (params.slidesPerColumnFill === 'column') { 9489 column = Math.floor(i / slidesPerColumn); 9490 row = i - (column * slidesPerColumn); 9491 if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) { 9492 row += 1; 9493 if (row >= slidesPerColumn) { 9494 row = 0; 9495 column += 1; 9496 } 9497 } 9498 newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn); 9499 slide 9500 .css({ 9501 '-webkit-box-ordinal-group': newSlideOrderIndex, 9502 '-moz-box-ordinal-group': newSlideOrderIndex, 9503 '-ms-flex-order': newSlideOrderIndex, 9504 '-webkit-order': newSlideOrderIndex, 9505 order: newSlideOrderIndex, 9506 }); 9507 } else { 9508 row = Math.floor(i / slidesPerRow); 9509 column = i - (row * slidesPerRow); 9510 } 9511 slide 9512 .css( 9513 `margin-${swiper.isHorizontal() ? 'top' : 'left'}`, 9514 (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`) 9515 ) 9516 .attr('data-swiper-column', column) 9517 .attr('data-swiper-row', row); 9518 } 9519 if (slide.css('display') === 'none') continue; // eslint-disable-line 9520 9521 if (params.slidesPerView === 'auto') { 9522 const slideStyles = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.getComputedStyle(slide[0], null); 9523 const currentTransform = slide[0].style.transform; 9524 const currentWebKitTransform = slide[0].style.webkitTransform; 9525 if (currentTransform) { 9526 slide[0].style.transform = 'none'; 9527 } 9528 if (currentWebKitTransform) { 9529 slide[0].style.webkitTransform = 'none'; 9530 } 9531 if (swiper.isHorizontal()) { 9532 slideSize = slide[0].getBoundingClientRect().width 9533 + parseFloat(slideStyles.getPropertyValue('margin-left')) 9534 + parseFloat(slideStyles.getPropertyValue('margin-right')); 9535 } else { 9536 slideSize = slide[0].getBoundingClientRect().height 9537 + parseFloat(slideStyles.getPropertyValue('margin-top')) 9538 + parseFloat(slideStyles.getPropertyValue('margin-bottom')); 9539 } 9540 if (currentTransform) { 9541 slide[0].style.transform = currentTransform; 9542 } 9543 if (currentWebKitTransform) { 9544 slide[0].style.webkitTransform = currentWebKitTransform; 9545 } 9546 if (params.roundLengths) slideSize = Math.floor(slideSize); 9547 } else { 9548 slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView; 9549 if (params.roundLengths) slideSize = Math.floor(slideSize); 9550 9551 if (slides[i]) { 9552 if (swiper.isHorizontal()) { 9553 slides[i].style.width = `${slideSize}px`; 9554 } else { 9555 slides[i].style.height = `${slideSize}px`; 9556 } 9557 } 9558 } 9559 if (slides[i]) { 9560 slides[i].swiperSlideSize = slideSize; 9561 } 9562 slidesSizesGrid.push(slideSize); 9563 9564 9565 if (params.centeredSlides) { 9566 slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween; 9567 if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; 9568 if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; 9569 if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; 9570 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 9571 if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 9572 slidesGrid.push(slidePosition); 9573 } else { 9574 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 9575 if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 9576 slidesGrid.push(slidePosition); 9577 slidePosition = slidePosition + slideSize + spaceBetween; 9578 } 9579 9580 swiper.virtualSize += slideSize + spaceBetween; 9581 9582 prevSlideSize = slideSize; 9583 9584 index$$1 += 1; 9585 } 9586 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 9587 let newSlidesGrid; 9588 9589 if ( 9590 rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { 9591 $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` }); 9592 } 9593 if (!Support.flexbox || params.setWrapperSize) { 9594 if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` }); 9595 else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` }); 9596 } 9597 9598 if (params.slidesPerColumn > 1) { 9599 swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows; 9600 swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween; 9601 if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` }); 9602 else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` }); 9603 if (params.centeredSlides) { 9604 newSlidesGrid = []; 9605 for (let i = 0; i < snapGrid.length; i += 1) { 9606 let slidesGridItem = snapGrid[i]; 9607 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 9608 if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); 9609 } 9610 snapGrid = newSlidesGrid; 9611 } 9612 } 9613 9614 // Remove last grid elements depending on width 9615 if (!params.centeredSlides) { 9616 newSlidesGrid = []; 9617 for (let i = 0; i < snapGrid.length; i += 1) { 9618 let slidesGridItem = snapGrid[i]; 9619 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 9620 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 9621 newSlidesGrid.push(slidesGridItem); 9622 } 9623 } 9624 snapGrid = newSlidesGrid; 9625 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 9626 snapGrid.push(swiper.virtualSize - swiperSize); 9627 } 9628 } 9629 if (snapGrid.length === 0) snapGrid = [0]; 9630 9631 if (params.spaceBetween !== 0) { 9632 if (swiper.isHorizontal()) { 9633 if (rtl) slides.css({ marginLeft: `${spaceBetween}px` }); 9634 else slides.css({ marginRight: `${spaceBetween}px` }); 9635 } else slides.css({ marginBottom: `${spaceBetween}px` }); 9636 } 9637 9638 Utils.extend(swiper, { 9639 slides, 9640 snapGrid, 9641 slidesGrid, 9642 slidesSizesGrid, 9643 }); 9644 9645 if (slidesLength !== previousSlidesLength) { 9646 swiper.emit('slidesLengthChange'); 9647 } 9648 if (snapGrid.length !== previousSnapGridLength) { 9649 if (swiper.params.watchOverflow) swiper.checkOverflow(); 9650 swiper.emit('snapGridLengthChange'); 9651 } 9652 if (slidesGrid.length !== previousSlidesGridLength) { 9653 swiper.emit('slidesGridLengthChange'); 9654 } 9655 9656 if (params.watchSlidesProgress || params.watchSlidesVisibility) { 9657 swiper.updateSlidesOffset(); 9658 } 9659} 9660 9661function updateAutoHeight (speed) { 9662 const swiper = this; 9663 const activeSlides = []; 9664 let newHeight = 0; 9665 let i; 9666 if (typeof speed === 'number') { 9667 swiper.setTransition(speed); 9668 } else if (speed === true) { 9669 swiper.setTransition(swiper.params.speed); 9670 } 9671 // Find slides currently in view 9672 if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { 9673 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 9674 const index$$1 = swiper.activeIndex + i; 9675 if (index$$1 > swiper.slides.length) break; 9676 activeSlides.push(swiper.slides.eq(index$$1)[0]); 9677 } 9678 } else { 9679 activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]); 9680 } 9681 9682 // Find new height from highest slide in view 9683 for (i = 0; i < activeSlides.length; i += 1) { 9684 if (typeof activeSlides[i] !== 'undefined') { 9685 const height = activeSlides[i].offsetHeight; 9686 newHeight = height > newHeight ? height : newHeight; 9687 } 9688 } 9689 9690 // Update Height 9691 if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`); 9692} 9693 9694function updateSlidesOffset () { 9695 const swiper = this; 9696 const slides = swiper.slides; 9697 for (let i = 0; i < slides.length; i += 1) { 9698 slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; 9699 } 9700} 9701 9702function updateSlidesProgress (translate = (this && this.translate) || 0) { 9703 const swiper = this; 9704 const params = swiper.params; 9705 9706 const { slides, rtlTranslate: rtl } = swiper; 9707 9708 if (slides.length === 0) return; 9709 if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); 9710 9711 let offsetCenter = -translate; 9712 if (rtl) offsetCenter = translate; 9713 9714 // Visible Slides 9715 slides.removeClass(params.slideVisibleClass); 9716 9717 for (let i = 0; i < slides.length; i += 1) { 9718 const slide = slides[i]; 9719 const slideProgress = ( 9720 (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset 9721 ) / (slide.swiperSlideSize + params.spaceBetween); 9722 if (params.watchSlidesVisibility) { 9723 const slideBefore = -(offsetCenter - slide.swiperSlideOffset); 9724 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 9725 const isVisible = (slideBefore >= 0 && slideBefore < swiper.size) 9726 || (slideAfter > 0 && slideAfter <= swiper.size) 9727 || (slideBefore <= 0 && slideAfter >= swiper.size); 9728 if (isVisible) { 9729 slides.eq(i).addClass(params.slideVisibleClass); 9730 } 9731 } 9732 slide.progress = rtl ? -slideProgress : slideProgress; 9733 } 9734} 9735 9736function updateProgress (translate = (this && this.translate) || 0) { 9737 const swiper = this; 9738 const params = swiper.params; 9739 9740 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 9741 let { progress, isBeginning, isEnd } = swiper; 9742 const wasBeginning = isBeginning; 9743 const wasEnd = isEnd; 9744 if (translatesDiff === 0) { 9745 progress = 0; 9746 isBeginning = true; 9747 isEnd = true; 9748 } else { 9749 progress = (translate - swiper.minTranslate()) / (translatesDiff); 9750 isBeginning = progress <= 0; 9751 isEnd = progress >= 1; 9752 } 9753 Utils.extend(swiper, { 9754 progress, 9755 isBeginning, 9756 isEnd, 9757 }); 9758 9759 if (params.watchSlidesProgress || params.watchSlidesVisibility) swiper.updateSlidesProgress(translate); 9760 9761 if (isBeginning && !wasBeginning) { 9762 swiper.emit('reachBeginning toEdge'); 9763 } 9764 if (isEnd && !wasEnd) { 9765 swiper.emit('reachEnd toEdge'); 9766 } 9767 if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) { 9768 swiper.emit('fromEdge'); 9769 } 9770 9771 swiper.emit('progress', progress); 9772} 9773 9774function updateSlidesClasses () { 9775 const swiper = this; 9776 9777 const { 9778 slides, params, $wrapperEl, activeIndex, realIndex, 9779 } = swiper; 9780 const isVirtual = swiper.virtual && params.virtual.enabled; 9781 9782 slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); 9783 9784 let activeSlide; 9785 if (isVirtual) { 9786 activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); 9787 } else { 9788 activeSlide = slides.eq(activeIndex); 9789 } 9790 9791 // Active classes 9792 activeSlide.addClass(params.slideActiveClass); 9793 9794 if (params.loop) { 9795 // Duplicate to all looped slides 9796 if (activeSlide.hasClass(params.slideDuplicateClass)) { 9797 $wrapperEl 9798 .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`) 9799 .addClass(params.slideDuplicateActiveClass); 9800 } else { 9801 $wrapperEl 9802 .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`) 9803 .addClass(params.slideDuplicateActiveClass); 9804 } 9805 } 9806 // Next Slide 9807 let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); 9808 if (params.loop && nextSlide.length === 0) { 9809 nextSlide = slides.eq(0); 9810 nextSlide.addClass(params.slideNextClass); 9811 } 9812 // Prev Slide 9813 let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); 9814 if (params.loop && prevSlide.length === 0) { 9815 prevSlide = slides.eq(-1); 9816 prevSlide.addClass(params.slidePrevClass); 9817 } 9818 if (params.loop) { 9819 // Duplicate to all looped slides 9820 if (nextSlide.hasClass(params.slideDuplicateClass)) { 9821 $wrapperEl 9822 .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`) 9823 .addClass(params.slideDuplicateNextClass); 9824 } else { 9825 $wrapperEl 9826 .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`) 9827 .addClass(params.slideDuplicateNextClass); 9828 } 9829 if (prevSlide.hasClass(params.slideDuplicateClass)) { 9830 $wrapperEl 9831 .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`) 9832 .addClass(params.slideDuplicatePrevClass); 9833 } else { 9834 $wrapperEl 9835 .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`) 9836 .addClass(params.slideDuplicatePrevClass); 9837 } 9838 } 9839} 9840 9841function updateActiveIndex (newActiveIndex) { 9842 const swiper = this; 9843 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 9844 const { 9845 slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex, 9846 } = swiper; 9847 let activeIndex = newActiveIndex; 9848 let snapIndex; 9849 if (typeof activeIndex === 'undefined') { 9850 for (let i = 0; i < slidesGrid.length; i += 1) { 9851 if (typeof slidesGrid[i + 1] !== 'undefined') { 9852 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) { 9853 activeIndex = i; 9854 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 9855 activeIndex = i + 1; 9856 } 9857 } else if (translate >= slidesGrid[i]) { 9858 activeIndex = i; 9859 } 9860 } 9861 // Normalize slideIndex 9862 if (params.normalizeSlideIndex) { 9863 if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; 9864 } 9865 } 9866 if (snapGrid.indexOf(translate) >= 0) { 9867 snapIndex = snapGrid.indexOf(translate); 9868 } else { 9869 snapIndex = Math.floor(activeIndex / params.slidesPerGroup); 9870 } 9871 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 9872 if (activeIndex === previousIndex) { 9873 if (snapIndex !== previousSnapIndex) { 9874 swiper.snapIndex = snapIndex; 9875 swiper.emit('snapIndexChange'); 9876 } 9877 return; 9878 } 9879 9880 // Get real index 9881 const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); 9882 9883 Utils.extend(swiper, { 9884 snapIndex, 9885 realIndex, 9886 previousIndex, 9887 activeIndex, 9888 }); 9889 swiper.emit('activeIndexChange'); 9890 swiper.emit('snapIndexChange'); 9891 if (previousRealIndex !== realIndex) { 9892 swiper.emit('realIndexChange'); 9893 } 9894 swiper.emit('slideChange'); 9895} 9896 9897function updateClickedSlide (e) { 9898 const swiper = this; 9899 const params = swiper.params; 9900 const slide = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).closest(`.${params.slideClass}`)[0]; 9901 let slideFound = false; 9902 if (slide) { 9903 for (let i = 0; i < swiper.slides.length; i += 1) { 9904 if (swiper.slides[i] === slide) slideFound = true; 9905 } 9906 } 9907 9908 if (slide && slideFound) { 9909 swiper.clickedSlide = slide; 9910 if (swiper.virtual && swiper.params.virtual.enabled) { 9911 swiper.clickedIndex = parseInt((0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slide).attr('data-swiper-slide-index'), 10); 9912 } else { 9913 swiper.clickedIndex = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slide).index(); 9914 } 9915 } else { 9916 swiper.clickedSlide = undefined; 9917 swiper.clickedIndex = undefined; 9918 return; 9919 } 9920 if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { 9921 swiper.slideToClickedSlide(); 9922 } 9923} 9924 9925var update = { 9926 updateSize, 9927 updateSlides, 9928 updateAutoHeight, 9929 updateSlidesOffset, 9930 updateSlidesProgress, 9931 updateProgress, 9932 updateSlidesClasses, 9933 updateActiveIndex, 9934 updateClickedSlide, 9935}; 9936 9937function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') { 9938 const swiper = this; 9939 9940 const { 9941 params, rtlTranslate: rtl, translate, $wrapperEl, 9942 } = swiper; 9943 9944 if (params.virtualTranslate) { 9945 return rtl ? -translate : translate; 9946 } 9947 9948 let currentTranslate = Utils.getTranslate($wrapperEl[0], axis); 9949 if (rtl) currentTranslate = -currentTranslate; 9950 9951 return currentTranslate || 0; 9952} 9953 9954function setTranslate (translate, byController) { 9955 const swiper = this; 9956 const { 9957 rtlTranslate: rtl, params, $wrapperEl, progress, 9958 } = swiper; 9959 let x = 0; 9960 let y = 0; 9961 const z = 0; 9962 9963 if (swiper.isHorizontal()) { 9964 x = rtl ? -translate : translate; 9965 } else { 9966 y = translate; 9967 } 9968 9969 if (params.roundLengths) { 9970 x = Math.floor(x); 9971 y = Math.floor(y); 9972 } 9973 9974 if (!params.virtualTranslate) { 9975 if (Support.transforms3d) $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); 9976 else $wrapperEl.transform(`translate(${x}px, ${y}px)`); 9977 } 9978 swiper.previousTranslate = swiper.translate; 9979 swiper.translate = swiper.isHorizontal() ? x : y; 9980 9981 // Check if we need to update progress 9982 let newProgress; 9983 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 9984 if (translatesDiff === 0) { 9985 newProgress = 0; 9986 } else { 9987 newProgress = (translate - swiper.minTranslate()) / (translatesDiff); 9988 } 9989 if (newProgress !== progress) { 9990 swiper.updateProgress(translate); 9991 } 9992 9993 swiper.emit('setTranslate', swiper.translate, byController); 9994} 9995 9996function minTranslate () { 9997 return (-this.snapGrid[0]); 9998} 9999 10000function maxTranslate () { 10001 return (-this.snapGrid[this.snapGrid.length - 1]); 10002} 10003 10004var translate = { 10005 getTranslate, 10006 setTranslate, 10007 minTranslate, 10008 maxTranslate, 10009}; 10010 10011function setTransition (duration, byController) { 10012 const swiper = this; 10013 10014 swiper.$wrapperEl.transition(duration); 10015 10016 swiper.emit('setTransition', duration, byController); 10017} 10018 10019function transitionStart (runCallbacks = true, direction) { 10020 const swiper = this; 10021 const { activeIndex, params, previousIndex } = swiper; 10022 if (params.autoHeight) { 10023 swiper.updateAutoHeight(); 10024 } 10025 10026 let dir = direction; 10027 if (!dir) { 10028 if (activeIndex > previousIndex) dir = 'next'; 10029 else if (activeIndex < previousIndex) dir = 'prev'; 10030 else dir = 'reset'; 10031 } 10032 10033 swiper.emit('transitionStart'); 10034 10035 if (runCallbacks && activeIndex !== previousIndex) { 10036 if (dir === 'reset') { 10037 swiper.emit('slideResetTransitionStart'); 10038 return; 10039 } 10040 swiper.emit('slideChangeTransitionStart'); 10041 if (dir === 'next') { 10042 swiper.emit('slideNextTransitionStart'); 10043 } else { 10044 swiper.emit('slidePrevTransitionStart'); 10045 } 10046 } 10047} 10048 10049function transitionEnd$1 (runCallbacks = true, direction) { 10050 const swiper = this; 10051 const { activeIndex, previousIndex } = swiper; 10052 swiper.animating = false; 10053 swiper.setTransition(0); 10054 10055 let dir = direction; 10056 if (!dir) { 10057 if (activeIndex > previousIndex) dir = 'next'; 10058 else if (activeIndex < previousIndex) dir = 'prev'; 10059 else dir = 'reset'; 10060 } 10061 10062 swiper.emit('transitionEnd'); 10063 10064 if (runCallbacks && activeIndex !== previousIndex) { 10065 if (dir === 'reset') { 10066 swiper.emit('slideResetTransitionEnd'); 10067 return; 10068 } 10069 swiper.emit('slideChangeTransitionEnd'); 10070 if (dir === 'next') { 10071 swiper.emit('slideNextTransitionEnd'); 10072 } else { 10073 swiper.emit('slidePrevTransitionEnd'); 10074 } 10075 } 10076} 10077 10078var transition$1 = { 10079 setTransition, 10080 transitionStart, 10081 transitionEnd: transitionEnd$1, 10082}; 10083 10084function slideTo (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) { 10085 const swiper = this; 10086 let slideIndex = index$$1; 10087 if (slideIndex < 0) slideIndex = 0; 10088 10089 const { 10090 params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl, 10091 } = swiper; 10092 if (swiper.animating && params.preventInteractionOnTransition) { 10093 return false; 10094 } 10095 10096 let snapIndex = Math.floor(slideIndex / params.slidesPerGroup); 10097 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 10098 10099 if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { 10100 swiper.emit('beforeSlideChangeStart'); 10101 } 10102 10103 const translate = -snapGrid[snapIndex]; 10104 10105 // Update progress 10106 swiper.updateProgress(translate); 10107 10108 // Normalize slideIndex 10109 if (params.normalizeSlideIndex) { 10110 for (let i = 0; i < slidesGrid.length; i += 1) { 10111 if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) { 10112 slideIndex = i; 10113 } 10114 } 10115 } 10116 // Directions locks 10117 if (swiper.initialized && slideIndex !== activeIndex) { 10118 if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { 10119 return false; 10120 } 10121 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 10122 if ((activeIndex || 0) !== slideIndex) return false; 10123 } 10124 } 10125 10126 let direction; 10127 if (slideIndex > activeIndex) direction = 'next'; 10128 else if (slideIndex < activeIndex) direction = 'prev'; 10129 else direction = 'reset'; 10130 10131 10132 // Update Index 10133 if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) { 10134 swiper.updateActiveIndex(slideIndex); 10135 // Update Height 10136 if (params.autoHeight) { 10137 swiper.updateAutoHeight(); 10138 } 10139 swiper.updateSlidesClasses(); 10140 if (params.effect !== 'slide') { 10141 swiper.setTranslate(translate); 10142 } 10143 if (direction !== 'reset') { 10144 swiper.transitionStart(runCallbacks, direction); 10145 swiper.transitionEnd(runCallbacks, direction); 10146 } 10147 return false; 10148 } 10149 10150 if (speed === 0 || !Support.transition) { 10151 swiper.setTransition(0); 10152 swiper.setTranslate(translate); 10153 swiper.updateActiveIndex(slideIndex); 10154 swiper.updateSlidesClasses(); 10155 swiper.emit('beforeTransitionStart', speed, internal); 10156 swiper.transitionStart(runCallbacks, direction); 10157 swiper.transitionEnd(runCallbacks, direction); 10158 } else { 10159 swiper.setTransition(speed); 10160 swiper.setTranslate(translate); 10161 swiper.updateActiveIndex(slideIndex); 10162 swiper.updateSlidesClasses(); 10163 swiper.emit('beforeTransitionStart', speed, internal); 10164 swiper.transitionStart(runCallbacks, direction); 10165 if (!swiper.animating) { 10166 swiper.animating = true; 10167 if (!swiper.onSlideToWrapperTransitionEnd) { 10168 swiper.onSlideToWrapperTransitionEnd = function transitionEnd$$1(e) { 10169 if (!swiper || swiper.destroyed) return; 10170 if (e.target !== this) return; 10171 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 10172 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 10173 swiper.onSlideToWrapperTransitionEnd = null; 10174 delete swiper.onSlideToWrapperTransitionEnd; 10175 swiper.transitionEnd(runCallbacks, direction); 10176 }; 10177 } 10178 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 10179 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 10180 } 10181 } 10182 10183 return true; 10184} 10185 10186function slideToLoop (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) { 10187 const swiper = this; 10188 let newIndex = index$$1; 10189 if (swiper.params.loop) { 10190 newIndex += swiper.loopedSlides; 10191 } 10192 10193 return swiper.slideTo(newIndex, speed, runCallbacks, internal); 10194} 10195 10196/* eslint no-unused-vars: "off" */ 10197function slideNext (speed = this.params.speed, runCallbacks = true, internal) { 10198 const swiper = this; 10199 const { params, animating } = swiper; 10200 if (params.loop) { 10201 if (animating) return false; 10202 swiper.loopFix(); 10203 // eslint-disable-next-line 10204 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 10205 return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal); 10206 } 10207 return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal); 10208} 10209 10210/* eslint no-unused-vars: "off" */ 10211function slidePrev (speed = this.params.speed, runCallbacks = true, internal) { 10212 const swiper = this; 10213 const { 10214 params, animating, snapGrid, slidesGrid, rtlTranslate, 10215 } = swiper; 10216 10217 if (params.loop) { 10218 if (animating) return false; 10219 swiper.loopFix(); 10220 // eslint-disable-next-line 10221 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 10222 } 10223 const translate = rtlTranslate ? swiper.translate : -swiper.translate; 10224 function normalize(val) { 10225 if (val < 0) return -Math.floor(Math.abs(val)); 10226 return Math.floor(val); 10227 } 10228 const normalizedTranslate = normalize(translate); 10229 const normalizedSnapGrid = snapGrid.map(val => normalize(val)); 10230 const normalizedSlidesGrid = slidesGrid.map(val => normalize(val)); 10231 10232 const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)]; 10233 const prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 10234 let prevIndex; 10235 if (typeof prevSnap !== 'undefined') { 10236 prevIndex = slidesGrid.indexOf(prevSnap); 10237 if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; 10238 } 10239 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 10240} 10241 10242/* eslint no-unused-vars: "off" */ 10243function slideReset (speed = this.params.speed, runCallbacks = true, internal) { 10244 const swiper = this; 10245 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 10246} 10247 10248/* eslint no-unused-vars: "off" */ 10249function slideToClosest (speed = this.params.speed, runCallbacks = true, internal) { 10250 const swiper = this; 10251 let index$$1 = swiper.activeIndex; 10252 const snapIndex = Math.floor(index$$1 / swiper.params.slidesPerGroup); 10253 10254 if (snapIndex < swiper.snapGrid.length - 1) { 10255 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 10256 10257 const currentSnap = swiper.snapGrid[snapIndex]; 10258 const nextSnap = swiper.snapGrid[snapIndex + 1]; 10259 10260 if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) { 10261 index$$1 = swiper.params.slidesPerGroup; 10262 } 10263 } 10264 10265 return swiper.slideTo(index$$1, speed, runCallbacks, internal); 10266} 10267 10268function slideToClickedSlide () { 10269 const swiper = this; 10270 const { params, $wrapperEl } = swiper; 10271 10272 const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; 10273 let slideToIndex = swiper.clickedIndex; 10274 let realIndex; 10275 if (params.loop) { 10276 if (swiper.animating) return; 10277 realIndex = parseInt((0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); 10278 if (params.centeredSlides) { 10279 if ( 10280 (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) 10281 || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2)) 10282 ) { 10283 swiper.loopFix(); 10284 slideToIndex = $wrapperEl 10285 .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`) 10286 .eq(0) 10287 .index(); 10288 10289 Utils.nextTick(() => { 10290 swiper.slideTo(slideToIndex); 10291 }); 10292 } else { 10293 swiper.slideTo(slideToIndex); 10294 } 10295 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 10296 swiper.loopFix(); 10297 slideToIndex = $wrapperEl 10298 .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`) 10299 .eq(0) 10300 .index(); 10301 10302 Utils.nextTick(() => { 10303 swiper.slideTo(slideToIndex); 10304 }); 10305 } else { 10306 swiper.slideTo(slideToIndex); 10307 } 10308 } else { 10309 swiper.slideTo(slideToIndex); 10310 } 10311} 10312 10313var slide = { 10314 slideTo, 10315 slideToLoop, 10316 slideNext, 10317 slidePrev, 10318 slideReset, 10319 slideToClosest, 10320 slideToClickedSlide, 10321}; 10322 10323function loopCreate () { 10324 const swiper = this; 10325 const { params, $wrapperEl } = swiper; 10326 // Remove duplicated slides 10327 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); 10328 10329 let slides = $wrapperEl.children(`.${params.slideClass}`); 10330 10331 if (params.loopFillGroupWithBlank) { 10332 const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup); 10333 if (blankSlidesNum !== params.slidesPerGroup) { 10334 for (let i = 0; i < blankSlidesNum; i += 1) { 10335 const blankNode = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`); 10336 $wrapperEl.append(blankNode); 10337 } 10338 slides = $wrapperEl.children(`.${params.slideClass}`); 10339 } 10340 } 10341 10342 if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; 10343 10344 swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10); 10345 swiper.loopedSlides += params.loopAdditionalSlides; 10346 if (swiper.loopedSlides > slides.length) { 10347 swiper.loopedSlides = slides.length; 10348 } 10349 10350 const prependSlides = []; 10351 const appendSlides = []; 10352 slides.each((index$$1, el) => { 10353 const slide = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(el); 10354 if (index$$1 < swiper.loopedSlides) appendSlides.push(el); 10355 if (index$$1 < slides.length && index$$1 >= slides.length - swiper.loopedSlides) prependSlides.push(el); 10356 slide.attr('data-swiper-slide-index', index$$1); 10357 }); 10358 for (let i = 0; i < appendSlides.length; i += 1) { 10359 $wrapperEl.append((0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 10360 } 10361 for (let i = prependSlides.length - 1; i >= 0; i -= 1) { 10362 $wrapperEl.prepend((0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 10363 } 10364} 10365 10366function loopFix () { 10367 const swiper = this; 10368 const { 10369 params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl, 10370 } = swiper; 10371 let newIndex; 10372 swiper.allowSlidePrev = true; 10373 swiper.allowSlideNext = true; 10374 10375 const snapTranslate = -snapGrid[activeIndex]; 10376 const diff = snapTranslate - swiper.getTranslate(); 10377 10378 10379 // Fix For Negative Oversliding 10380 if (activeIndex < loopedSlides) { 10381 newIndex = (slides.length - (loopedSlides * 3)) + activeIndex; 10382 newIndex += loopedSlides; 10383 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 10384 if (slideChanged && diff !== 0) { 10385 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 10386 } 10387 } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) { 10388 // Fix For Positive Oversliding 10389 newIndex = -slides.length + activeIndex + loopedSlides; 10390 newIndex += loopedSlides; 10391 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 10392 if (slideChanged && diff !== 0) { 10393 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 10394 } 10395 } 10396 swiper.allowSlidePrev = allowSlidePrev; 10397 swiper.allowSlideNext = allowSlideNext; 10398} 10399 10400function loopDestroy () { 10401 const swiper = this; 10402 const { $wrapperEl, params, slides } = swiper; 10403 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); 10404 slides.removeAttr('data-swiper-slide-index'); 10405} 10406 10407var loop = { 10408 loopCreate, 10409 loopFix, 10410 loopDestroy, 10411}; 10412 10413function setGrabCursor (moving) { 10414 const swiper = this; 10415 if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return; 10416 const el = swiper.el; 10417 el.style.cursor = 'move'; 10418 el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; 10419 el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; 10420 el.style.cursor = moving ? 'grabbing' : 'grab'; 10421} 10422 10423function unsetGrabCursor () { 10424 const swiper = this; 10425 if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return; 10426 swiper.el.style.cursor = ''; 10427} 10428 10429var grabCursor = { 10430 setGrabCursor, 10431 unsetGrabCursor, 10432}; 10433 10434function appendSlide (slides) { 10435 const swiper = this; 10436 const { $wrapperEl, params } = swiper; 10437 if (params.loop) { 10438 swiper.loopDestroy(); 10439 } 10440 if (typeof slides === 'object' && 'length' in slides) { 10441 for (let i = 0; i < slides.length; i += 1) { 10442 if (slides[i]) $wrapperEl.append(slides[i]); 10443 } 10444 } else { 10445 $wrapperEl.append(slides); 10446 } 10447 if (params.loop) { 10448 swiper.loopCreate(); 10449 } 10450 if (!(params.observer && Support.observer)) { 10451 swiper.update(); 10452 } 10453} 10454 10455function prependSlide (slides) { 10456 const swiper = this; 10457 const { params, $wrapperEl, activeIndex } = swiper; 10458 10459 if (params.loop) { 10460 swiper.loopDestroy(); 10461 } 10462 let newActiveIndex = activeIndex + 1; 10463 if (typeof slides === 'object' && 'length' in slides) { 10464 for (let i = 0; i < slides.length; i += 1) { 10465 if (slides[i]) $wrapperEl.prepend(slides[i]); 10466 } 10467 newActiveIndex = activeIndex + slides.length; 10468 } else { 10469 $wrapperEl.prepend(slides); 10470 } 10471 if (params.loop) { 10472 swiper.loopCreate(); 10473 } 10474 if (!(params.observer && Support.observer)) { 10475 swiper.update(); 10476 } 10477 swiper.slideTo(newActiveIndex, 0, false); 10478} 10479 10480function addSlide (index$$1, slides) { 10481 const swiper = this; 10482 const { $wrapperEl, params, activeIndex } = swiper; 10483 let activeIndexBuffer = activeIndex; 10484 if (params.loop) { 10485 activeIndexBuffer -= swiper.loopedSlides; 10486 swiper.loopDestroy(); 10487 swiper.slides = $wrapperEl.children(`.${params.slideClass}`); 10488 } 10489 const baseLength = swiper.slides.length; 10490 if (index$$1 <= 0) { 10491 swiper.prependSlide(slides); 10492 return; 10493 } 10494 if (index$$1 >= baseLength) { 10495 swiper.appendSlide(slides); 10496 return; 10497 } 10498 let newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + 1 : activeIndexBuffer; 10499 10500 const slidesBuffer = []; 10501 for (let i = baseLength - 1; i >= index$$1; i -= 1) { 10502 const currentSlide = swiper.slides.eq(i); 10503 currentSlide.remove(); 10504 slidesBuffer.unshift(currentSlide); 10505 } 10506 10507 if (typeof slides === 'object' && 'length' in slides) { 10508 for (let i = 0; i < slides.length; i += 1) { 10509 if (slides[i]) $wrapperEl.append(slides[i]); 10510 } 10511 newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + slides.length : activeIndexBuffer; 10512 } else { 10513 $wrapperEl.append(slides); 10514 } 10515 10516 for (let i = 0; i < slidesBuffer.length; i += 1) { 10517 $wrapperEl.append(slidesBuffer[i]); 10518 } 10519 10520 if (params.loop) { 10521 swiper.loopCreate(); 10522 } 10523 if (!(params.observer && Support.observer)) { 10524 swiper.update(); 10525 } 10526 if (params.loop) { 10527 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 10528 } else { 10529 swiper.slideTo(newActiveIndex, 0, false); 10530 } 10531} 10532 10533function removeSlide (slidesIndexes) { 10534 const swiper = this; 10535 const { params, $wrapperEl, activeIndex } = swiper; 10536 10537 let activeIndexBuffer = activeIndex; 10538 if (params.loop) { 10539 activeIndexBuffer -= swiper.loopedSlides; 10540 swiper.loopDestroy(); 10541 swiper.slides = $wrapperEl.children(`.${params.slideClass}`); 10542 } 10543 let newActiveIndex = activeIndexBuffer; 10544 let indexToRemove; 10545 10546 if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { 10547 for (let i = 0; i < slidesIndexes.length; i += 1) { 10548 indexToRemove = slidesIndexes[i]; 10549 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 10550 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 10551 } 10552 newActiveIndex = Math.max(newActiveIndex, 0); 10553 } else { 10554 indexToRemove = slidesIndexes; 10555 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 10556 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 10557 newActiveIndex = Math.max(newActiveIndex, 0); 10558 } 10559 10560 if (params.loop) { 10561 swiper.loopCreate(); 10562 } 10563 10564 if (!(params.observer && Support.observer)) { 10565 swiper.update(); 10566 } 10567 if (params.loop) { 10568 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 10569 } else { 10570 swiper.slideTo(newActiveIndex, 0, false); 10571 } 10572} 10573 10574function removeAllSlides () { 10575 const swiper = this; 10576 10577 const slidesIndexes = []; 10578 for (let i = 0; i < swiper.slides.length; i += 1) { 10579 slidesIndexes.push(i); 10580 } 10581 swiper.removeSlide(slidesIndexes); 10582} 10583 10584var manipulation = { 10585 appendSlide, 10586 prependSlide, 10587 addSlide, 10588 removeSlide, 10589 removeAllSlides, 10590}; 10591 10592const Device = (function Device() { 10593 const ua = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent; 10594 10595 const device = { 10596 ios: false, 10597 android: false, 10598 androidChrome: false, 10599 desktop: false, 10600 windows: false, 10601 iphone: false, 10602 ipod: false, 10603 ipad: false, 10604 cordova: ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.cordova || ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.phonegap, 10605 phonegap: ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.cordova || ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.phonegap, 10606 }; 10607 10608 const windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line 10609 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line 10610 const ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 10611 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 10612 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 10613 10614 10615 // Windows 10616 if (windows) { 10617 device.os = 'windows'; 10618 device.osVersion = windows[2]; 10619 device.windows = true; 10620 } 10621 // Android 10622 if (android && !windows) { 10623 device.os = 'android'; 10624 device.osVersion = android[2]; 10625 device.android = true; 10626 device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; 10627 } 10628 if (ipad || iphone || ipod) { 10629 device.os = 'ios'; 10630 device.ios = true; 10631 } 10632 // iOS 10633 if (iphone && !ipod) { 10634 device.osVersion = iphone[2].replace(/_/g, '.'); 10635 device.iphone = true; 10636 } 10637 if (ipad) { 10638 device.osVersion = ipad[2].replace(/_/g, '.'); 10639 device.ipad = true; 10640 } 10641 if (ipod) { 10642 device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; 10643 device.iphone = true; 10644 } 10645 // iOS 8+ changed UA 10646 if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { 10647 if (device.osVersion.split('.')[0] === '10') { 10648 device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; 10649 } 10650 } 10651 10652 // Desktop 10653 device.desktop = !(device.os || device.android || device.webView); 10654 10655 // Webview 10656 device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i); 10657 10658 // Minimal UI 10659 if (device.os && device.os === 'ios') { 10660 const osVersionArr = device.osVersion.split('.'); 10661 const metaViewport = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.querySelector('meta[name="viewport"]'); 10662 device.minimalUi = !device.webView 10663 && (ipod || iphone) 10664 && (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) 10665 && metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0; 10666 } 10667 10668 // Pixel Ratio 10669 device.pixelRatio = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.devicePixelRatio || 1; 10670 10671 // Export object 10672 return device; 10673}()); 10674 10675function onTouchStart (event) { 10676 const swiper = this; 10677 const data$$1 = swiper.touchEventsData; 10678 const { params, touches } = swiper; 10679 if (swiper.animating && params.preventInteractionOnTransition) { 10680 return; 10681 } 10682 let e = event; 10683 if (e.originalEvent) e = e.originalEvent; 10684 data$$1.isTouchEvent = e.type === 'touchstart'; 10685 if (!data$$1.isTouchEvent && 'which' in e && e.which === 3) return; 10686 if (data$$1.isTouched && data$$1.isMoved) return; 10687 if (params.noSwiping && (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) { 10688 swiper.allowClick = true; 10689 return; 10690 } 10691 if (params.swipeHandler) { 10692 if (!(0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e).closest(params.swipeHandler)[0]) return; 10693 } 10694 10695 touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 10696 touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 10697 const startX = touches.currentX; 10698 const startY = touches.currentY; 10699 10700 // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore 10701 10702 const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; 10703 const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; 10704 if ( 10705 edgeSwipeDetection 10706 && ((startX <= edgeSwipeThreshold) 10707 || (startX >= ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.screen.width - edgeSwipeThreshold)) 10708 ) { 10709 return; 10710 } 10711 10712 Utils.extend(data$$1, { 10713 isTouched: true, 10714 isMoved: false, 10715 allowTouchCallbacks: true, 10716 isScrolling: undefined, 10717 startMoving: undefined, 10718 }); 10719 10720 touches.startX = startX; 10721 touches.startY = startY; 10722 data$$1.touchStartTime = Utils.now(); 10723 swiper.allowClick = true; 10724 swiper.updateSize(); 10725 swiper.swipeDirection = undefined; 10726 if (params.threshold > 0) data$$1.allowThresholdMove = false; 10727 if (e.type !== 'touchstart') { 10728 let preventDefault = true; 10729 if ((0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).is(data$$1.formElements)) preventDefault = false; 10730 if ( 10731 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement 10732 && (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement).is(data$$1.formElements) 10733 && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement !== e.target 10734 ) { 10735 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement.blur(); 10736 } 10737 if (preventDefault && swiper.allowTouchMove) { 10738 e.preventDefault(); 10739 } 10740 } 10741 swiper.emit('touchStart', e); 10742} 10743 10744function onTouchMove (event) { 10745 const swiper = this; 10746 const data$$1 = swiper.touchEventsData; 10747 const { params, touches, rtlTranslate: rtl } = swiper; 10748 let e = event; 10749 if (e.originalEvent) e = e.originalEvent; 10750 if (!data$$1.isTouched) { 10751 if (data$$1.startMoving && data$$1.isScrolling) { 10752 swiper.emit('touchMoveOpposite', e); 10753 } 10754 return; 10755 } 10756 if (data$$1.isTouchEvent && e.type === 'mousemove') return; 10757 const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; 10758 const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; 10759 if (e.preventedByNestedSwiper) { 10760 touches.startX = pageX; 10761 touches.startY = pageY; 10762 return; 10763 } 10764 if (!swiper.allowTouchMove) { 10765 // isMoved = true; 10766 swiper.allowClick = false; 10767 if (data$$1.isTouched) { 10768 Utils.extend(touches, { 10769 startX: pageX, 10770 startY: pageY, 10771 currentX: pageX, 10772 currentY: pageY, 10773 }); 10774 data$$1.touchStartTime = Utils.now(); 10775 } 10776 return; 10777 } 10778 if (data$$1.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { 10779 if (swiper.isVertical()) { 10780 // Vertical 10781 if ( 10782 (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) 10783 || (pageY > touches.startY && swiper.translate >= swiper.minTranslate()) 10784 ) { 10785 data$$1.isTouched = false; 10786 data$$1.isMoved = false; 10787 return; 10788 } 10789 } else if ( 10790 (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) 10791 || (pageX > touches.startX && swiper.translate >= swiper.minTranslate()) 10792 ) { 10793 return; 10794 } 10795 } 10796 if (data$$1.isTouchEvent && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement) { 10797 if (e.target === ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement && (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).is(data$$1.formElements)) { 10798 data$$1.isMoved = true; 10799 swiper.allowClick = false; 10800 return; 10801 } 10802 } 10803 if (data$$1.allowTouchCallbacks) { 10804 swiper.emit('touchMove', e); 10805 } 10806 if (e.targetTouches && e.targetTouches.length > 1) return; 10807 10808 touches.currentX = pageX; 10809 touches.currentY = pageY; 10810 10811 const diffX = touches.currentX - touches.startX; 10812 const diffY = touches.currentY - touches.startY; 10813 if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return; 10814 10815 if (typeof data$$1.isScrolling === 'undefined') { 10816 let touchAngle; 10817 if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) { 10818 data$$1.isScrolling = false; 10819 } else { 10820 // eslint-disable-next-line 10821 if ((diffX * diffX) + (diffY * diffY) >= 25) { 10822 touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI; 10823 data$$1.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle); 10824 } 10825 } 10826 } 10827 if (data$$1.isScrolling) { 10828 swiper.emit('touchMoveOpposite', e); 10829 } 10830 if (typeof data$$1.startMoving === 'undefined') { 10831 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 10832 data$$1.startMoving = true; 10833 } 10834 } 10835 if (data$$1.isScrolling) { 10836 data$$1.isTouched = false; 10837 return; 10838 } 10839 if (!data$$1.startMoving) { 10840 return; 10841 } 10842 swiper.allowClick = false; 10843 e.preventDefault(); 10844 if (params.touchMoveStopPropagation && !params.nested) { 10845 e.stopPropagation(); 10846 } 10847 10848 if (!data$$1.isMoved) { 10849 if (params.loop) { 10850 swiper.loopFix(); 10851 } 10852 data$$1.startTranslate = swiper.getTranslate(); 10853 swiper.setTransition(0); 10854 if (swiper.animating) { 10855 swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); 10856 } 10857 data$$1.allowMomentumBounce = false; 10858 // Grab Cursor 10859 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 10860 swiper.setGrabCursor(true); 10861 } 10862 swiper.emit('sliderFirstMove', e); 10863 } 10864 swiper.emit('sliderMove', e); 10865 data$$1.isMoved = true; 10866 10867 let diff = swiper.isHorizontal() ? diffX : diffY; 10868 touches.diff = diff; 10869 10870 diff *= params.touchRatio; 10871 if (rtl) diff = -diff; 10872 10873 swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; 10874 data$$1.currentTranslate = diff + data$$1.startTranslate; 10875 10876 let disableParentSwiper = true; 10877 let resistanceRatio = params.resistanceRatio; 10878 if (params.touchReleaseOnEdges) { 10879 resistanceRatio = 0; 10880 } 10881 if ((diff > 0 && data$$1.currentTranslate > swiper.minTranslate())) { 10882 disableParentSwiper = false; 10883 if (params.resistance) data$$1.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data$$1.startTranslate + diff) ** resistanceRatio); 10884 } else if (diff < 0 && data$$1.currentTranslate < swiper.maxTranslate()) { 10885 disableParentSwiper = false; 10886 if (params.resistance) data$$1.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data$$1.startTranslate - diff) ** resistanceRatio); 10887 } 10888 10889 if (disableParentSwiper) { 10890 e.preventedByNestedSwiper = true; 10891 } 10892 10893 // Directions locks 10894 if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data$$1.currentTranslate < data$$1.startTranslate) { 10895 data$$1.currentTranslate = data$$1.startTranslate; 10896 } 10897 if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data$$1.currentTranslate > data$$1.startTranslate) { 10898 data$$1.currentTranslate = data$$1.startTranslate; 10899 } 10900 10901 10902 // Threshold 10903 if (params.threshold > 0) { 10904 if (Math.abs(diff) > params.threshold || data$$1.allowThresholdMove) { 10905 if (!data$$1.allowThresholdMove) { 10906 data$$1.allowThresholdMove = true; 10907 touches.startX = touches.currentX; 10908 touches.startY = touches.currentY; 10909 data$$1.currentTranslate = data$$1.startTranslate; 10910 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 10911 return; 10912 } 10913 } else { 10914 data$$1.currentTranslate = data$$1.startTranslate; 10915 return; 10916 } 10917 } 10918 10919 if (!params.followFinger) return; 10920 10921 // Update active index in free mode 10922 if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) { 10923 swiper.updateActiveIndex(); 10924 swiper.updateSlidesClasses(); 10925 } 10926 if (params.freeMode) { 10927 // Velocity 10928 if (data$$1.velocities.length === 0) { 10929 data$$1.velocities.push({ 10930 position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], 10931 time: data$$1.touchStartTime, 10932 }); 10933 } 10934 data$$1.velocities.push({ 10935 position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], 10936 time: Utils.now(), 10937 }); 10938 } 10939 // Update progress 10940 swiper.updateProgress(data$$1.currentTranslate); 10941 // Update translate 10942 swiper.setTranslate(data$$1.currentTranslate); 10943} 10944 10945function onTouchEnd (event) { 10946 const swiper = this; 10947 const data$$1 = swiper.touchEventsData; 10948 10949 const { 10950 params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid, 10951 } = swiper; 10952 let e = event; 10953 if (e.originalEvent) e = e.originalEvent; 10954 if (data$$1.allowTouchCallbacks) { 10955 swiper.emit('touchEnd', e); 10956 } 10957 data$$1.allowTouchCallbacks = false; 10958 if (!data$$1.isTouched) { 10959 if (data$$1.isMoved && params.grabCursor) { 10960 swiper.setGrabCursor(false); 10961 } 10962 data$$1.isMoved = false; 10963 data$$1.startMoving = false; 10964 return; 10965 } 10966 // Return Grab Cursor 10967 if (params.grabCursor && data$$1.isMoved && data$$1.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 10968 swiper.setGrabCursor(false); 10969 } 10970 10971 // Time diff 10972 const touchEndTime = Utils.now(); 10973 const timeDiff = touchEndTime - data$$1.touchStartTime; 10974 10975 // Tap, doubleTap, Click 10976 if (swiper.allowClick) { 10977 swiper.updateClickedSlide(e); 10978 swiper.emit('tap', e); 10979 if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) > 300) { 10980 if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout); 10981 data$$1.clickTimeout = Utils.nextTick(() => { 10982 if (!swiper || swiper.destroyed) return; 10983 swiper.emit('click', e); 10984 }, 300); 10985 } 10986 if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) < 300) { 10987 if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout); 10988 swiper.emit('doubleTap', e); 10989 } 10990 } 10991 10992 data$$1.lastClickTime = Utils.now(); 10993 Utils.nextTick(() => { 10994 if (!swiper.destroyed) swiper.allowClick = true; 10995 }); 10996 10997 if (!data$$1.isTouched || !data$$1.isMoved || !swiper.swipeDirection || touches.diff === 0 || data$$1.currentTranslate === data$$1.startTranslate) { 10998 data$$1.isTouched = false; 10999 data$$1.isMoved = false; 11000 data$$1.startMoving = false; 11001 return; 11002 } 11003 data$$1.isTouched = false; 11004 data$$1.isMoved = false; 11005 data$$1.startMoving = false; 11006 11007 let currentPos; 11008 if (params.followFinger) { 11009 currentPos = rtl ? swiper.translate : -swiper.translate; 11010 } else { 11011 currentPos = -data$$1.currentTranslate; 11012 } 11013 11014 if (params.freeMode) { 11015 if (currentPos < -swiper.minTranslate()) { 11016 swiper.slideTo(swiper.activeIndex); 11017 return; 11018 } 11019 if (currentPos > -swiper.maxTranslate()) { 11020 if (swiper.slides.length < snapGrid.length) { 11021 swiper.slideTo(snapGrid.length - 1); 11022 } else { 11023 swiper.slideTo(swiper.slides.length - 1); 11024 } 11025 return; 11026 } 11027 11028 if (params.freeModeMomentum) { 11029 if (data$$1.velocities.length > 1) { 11030 const lastMoveEvent = data$$1.velocities.pop(); 11031 const velocityEvent = data$$1.velocities.pop(); 11032 11033 const distance = lastMoveEvent.position - velocityEvent.position; 11034 const time = lastMoveEvent.time - velocityEvent.time; 11035 swiper.velocity = distance / time; 11036 swiper.velocity /= 2; 11037 if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) { 11038 swiper.velocity = 0; 11039 } 11040 // this implies that the user stopped moving a finger then released. 11041 // There would be no events with distance zero, so the last event is stale. 11042 if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) { 11043 swiper.velocity = 0; 11044 } 11045 } else { 11046 swiper.velocity = 0; 11047 } 11048 swiper.velocity *= params.freeModeMomentumVelocityRatio; 11049 11050 data$$1.velocities.length = 0; 11051 let momentumDuration = 1000 * params.freeModeMomentumRatio; 11052 const momentumDistance = swiper.velocity * momentumDuration; 11053 11054 let newPosition = swiper.translate + momentumDistance; 11055 if (rtl) newPosition = -newPosition; 11056 11057 let doBounce = false; 11058 let afterBouncePosition; 11059 const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio; 11060 let needsLoopFix; 11061 if (newPosition < swiper.maxTranslate()) { 11062 if (params.freeModeMomentumBounce) { 11063 if (newPosition + swiper.maxTranslate() < -bounceAmount) { 11064 newPosition = swiper.maxTranslate() - bounceAmount; 11065 } 11066 afterBouncePosition = swiper.maxTranslate(); 11067 doBounce = true; 11068 data$$1.allowMomentumBounce = true; 11069 } else { 11070 newPosition = swiper.maxTranslate(); 11071 } 11072 if (params.loop && params.centeredSlides) needsLoopFix = true; 11073 } else if (newPosition > swiper.minTranslate()) { 11074 if (params.freeModeMomentumBounce) { 11075 if (newPosition - swiper.minTranslate() > bounceAmount) { 11076 newPosition = swiper.minTranslate() + bounceAmount; 11077 } 11078 afterBouncePosition = swiper.minTranslate(); 11079 doBounce = true; 11080 data$$1.allowMomentumBounce = true; 11081 } else { 11082 newPosition = swiper.minTranslate(); 11083 } 11084 if (params.loop && params.centeredSlides) needsLoopFix = true; 11085 } else if (params.freeModeSticky) { 11086 let nextSlide; 11087 for (let j = 0; j < snapGrid.length; j += 1) { 11088 if (snapGrid[j] > -newPosition) { 11089 nextSlide = j; 11090 break; 11091 } 11092 } 11093 11094 if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { 11095 newPosition = snapGrid[nextSlide]; 11096 } else { 11097 newPosition = snapGrid[nextSlide - 1]; 11098 } 11099 newPosition = -newPosition; 11100 } 11101 if (needsLoopFix) { 11102 swiper.once('transitionEnd', () => { 11103 swiper.loopFix(); 11104 }); 11105 } 11106 // Fix duration 11107 if (swiper.velocity !== 0) { 11108 if (rtl) { 11109 momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); 11110 } else { 11111 momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); 11112 } 11113 } else if (params.freeModeSticky) { 11114 swiper.slideToClosest(); 11115 return; 11116 } 11117 11118 if (params.freeModeMomentumBounce && doBounce) { 11119 swiper.updateProgress(afterBouncePosition); 11120 swiper.setTransition(momentumDuration); 11121 swiper.setTranslate(newPosition); 11122 swiper.transitionStart(true, swiper.swipeDirection); 11123 swiper.animating = true; 11124 $wrapperEl.transitionEnd(() => { 11125 if (!swiper || swiper.destroyed || !data$$1.allowMomentumBounce) return; 11126 swiper.emit('momentumBounce'); 11127 11128 swiper.setTransition(params.speed); 11129 swiper.setTranslate(afterBouncePosition); 11130 $wrapperEl.transitionEnd(() => { 11131 if (!swiper || swiper.destroyed) return; 11132 swiper.transitionEnd(); 11133 }); 11134 }); 11135 } else if (swiper.velocity) { 11136 swiper.updateProgress(newPosition); 11137 swiper.setTransition(momentumDuration); 11138 swiper.setTranslate(newPosition); 11139 swiper.transitionStart(true, swiper.swipeDirection); 11140 if (!swiper.animating) { 11141 swiper.animating = true; 11142 $wrapperEl.transitionEnd(() => { 11143 if (!swiper || swiper.destroyed) return; 11144 swiper.transitionEnd(); 11145 }); 11146 } 11147 } else { 11148 swiper.updateProgress(newPosition); 11149 } 11150 11151 swiper.updateActiveIndex(); 11152 swiper.updateSlidesClasses(); 11153 } else if (params.freeModeSticky) { 11154 swiper.slideToClosest(); 11155 return; 11156 } 11157 11158 if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) { 11159 swiper.updateProgress(); 11160 swiper.updateActiveIndex(); 11161 swiper.updateSlidesClasses(); 11162 } 11163 return; 11164 } 11165 11166 // Find current slide 11167 let stopIndex = 0; 11168 let groupSize = swiper.slidesSizesGrid[0]; 11169 for (let i = 0; i < slidesGrid.length; i += params.slidesPerGroup) { 11170 if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') { 11171 if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) { 11172 stopIndex = i; 11173 groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i]; 11174 } 11175 } else if (currentPos >= slidesGrid[i]) { 11176 stopIndex = i; 11177 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 11178 } 11179 } 11180 11181 // Find current slide size 11182 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 11183 11184 if (timeDiff > params.longSwipesMs) { 11185 // Long touches 11186 if (!params.longSwipes) { 11187 swiper.slideTo(swiper.activeIndex); 11188 return; 11189 } 11190 if (swiper.swipeDirection === 'next') { 11191 if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + params.slidesPerGroup); 11192 else swiper.slideTo(stopIndex); 11193 } 11194 if (swiper.swipeDirection === 'prev') { 11195 if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + params.slidesPerGroup); 11196 else swiper.slideTo(stopIndex); 11197 } 11198 } else { 11199 // Short swipes 11200 if (!params.shortSwipes) { 11201 swiper.slideTo(swiper.activeIndex); 11202 return; 11203 } 11204 if (swiper.swipeDirection === 'next') { 11205 swiper.slideTo(stopIndex + params.slidesPerGroup); 11206 } 11207 if (swiper.swipeDirection === 'prev') { 11208 swiper.slideTo(stopIndex); 11209 } 11210 } 11211} 11212 11213function onResize () { 11214 const swiper = this; 11215 11216 const { params, el } = swiper; 11217 11218 if (el && el.offsetWidth === 0) return; 11219 11220 // Breakpoints 11221 if (params.breakpoints) { 11222 swiper.setBreakpoint(); 11223 } 11224 11225 // Save locks 11226 const { allowSlideNext, allowSlidePrev, snapGrid } = swiper; 11227 11228 // Disable locks on resize 11229 swiper.allowSlideNext = true; 11230 swiper.allowSlidePrev = true; 11231 11232 swiper.updateSize(); 11233 swiper.updateSlides(); 11234 11235 if (params.freeMode) { 11236 const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate()); 11237 swiper.setTranslate(newTranslate); 11238 swiper.updateActiveIndex(); 11239 swiper.updateSlidesClasses(); 11240 11241 if (params.autoHeight) { 11242 swiper.updateAutoHeight(); 11243 } 11244 } else { 11245 swiper.updateSlidesClasses(); 11246 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { 11247 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 11248 } else { 11249 swiper.slideTo(swiper.activeIndex, 0, false, true); 11250 } 11251 } 11252 // Return locks after resize 11253 swiper.allowSlidePrev = allowSlidePrev; 11254 swiper.allowSlideNext = allowSlideNext; 11255 11256 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 11257 swiper.checkOverflow(); 11258 } 11259} 11260 11261function onClick (e) { 11262 const swiper = this; 11263 if (!swiper.allowClick) { 11264 if (swiper.params.preventClicks) e.preventDefault(); 11265 if (swiper.params.preventClicksPropagation && swiper.animating) { 11266 e.stopPropagation(); 11267 e.stopImmediatePropagation(); 11268 } 11269 } 11270} 11271 11272function attachEvents() { 11273 const swiper = this; 11274 const { 11275 params, touchEvents, el, wrapperEl, 11276 } = swiper; 11277 11278 { 11279 swiper.onTouchStart = onTouchStart.bind(swiper); 11280 swiper.onTouchMove = onTouchMove.bind(swiper); 11281 swiper.onTouchEnd = onTouchEnd.bind(swiper); 11282 } 11283 11284 swiper.onClick = onClick.bind(swiper); 11285 11286 const target = params.touchEventsTarget === 'container' ? el : wrapperEl; 11287 const capture = !!params.nested; 11288 11289 // Touch Events 11290 { 11291 if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { 11292 target.addEventListener(touchEvents.start, swiper.onTouchStart, false); 11293 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener(touchEvents.move, swiper.onTouchMove, capture); 11294 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener(touchEvents.end, swiper.onTouchEnd, false); 11295 } else { 11296 if (Support.touch) { 11297 const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; 11298 target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); 11299 target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture); 11300 target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); 11301 } 11302 if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { 11303 target.addEventListener('mousedown', swiper.onTouchStart, false); 11304 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener('mousemove', swiper.onTouchMove, capture); 11305 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener('mouseup', swiper.onTouchEnd, false); 11306 } 11307 } 11308 // Prevent Links Clicks 11309 if (params.preventClicks || params.preventClicksPropagation) { 11310 target.addEventListener('click', swiper.onClick, true); 11311 } 11312 } 11313 11314 // Resize handler 11315 swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true); 11316} 11317 11318function detachEvents() { 11319 const swiper = this; 11320 11321 const { 11322 params, touchEvents, el, wrapperEl, 11323 } = swiper; 11324 11325 const target = params.touchEventsTarget === 'container' ? el : wrapperEl; 11326 const capture = !!params.nested; 11327 11328 // Touch Events 11329 { 11330 if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { 11331 target.removeEventListener(touchEvents.start, swiper.onTouchStart, false); 11332 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); 11333 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener(touchEvents.end, swiper.onTouchEnd, false); 11334 } else { 11335 if (Support.touch) { 11336 const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; 11337 target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); 11338 target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); 11339 target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); 11340 } 11341 if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { 11342 target.removeEventListener('mousedown', swiper.onTouchStart, false); 11343 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener('mousemove', swiper.onTouchMove, capture); 11344 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener('mouseup', swiper.onTouchEnd, false); 11345 } 11346 } 11347 // Prevent Links Clicks 11348 if (params.preventClicks || params.preventClicksPropagation) { 11349 target.removeEventListener('click', swiper.onClick, true); 11350 } 11351 } 11352 11353 // Resize handler 11354 swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize); 11355} 11356 11357var events = { 11358 attachEvents, 11359 detachEvents, 11360}; 11361 11362function setBreakpoint () { 11363 const swiper = this; 11364 const { 11365 activeIndex, initialized, loopedSlides = 0, params, 11366 } = swiper; 11367 const breakpoints = params.breakpoints; 11368 if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return; 11369 // Set breakpoint for window width and update parameters 11370 const breakpoint = swiper.getBreakpoint(breakpoints); 11371 if (breakpoint && swiper.currentBreakpoint !== breakpoint) { 11372 const breakPointsParams = breakpoint in breakpoints ? breakpoints[breakpoint] : swiper.originalParams; 11373 const needsReLoop = params.loop && (breakPointsParams.slidesPerView !== params.slidesPerView); 11374 11375 Utils.extend(swiper.params, breakPointsParams); 11376 11377 Utils.extend(swiper, { 11378 allowTouchMove: swiper.params.allowTouchMove, 11379 allowSlideNext: swiper.params.allowSlideNext, 11380 allowSlidePrev: swiper.params.allowSlidePrev, 11381 }); 11382 11383 swiper.currentBreakpoint = breakpoint; 11384 11385 if (needsReLoop && initialized) { 11386 swiper.loopDestroy(); 11387 swiper.loopCreate(); 11388 swiper.updateSlides(); 11389 swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false); 11390 } 11391 swiper.emit('breakpoint', breakPointsParams); 11392 } 11393} 11394 11395function getBreakpoint (breakpoints) { 11396 // Get breakpoint for window width 11397 if (!breakpoints) return undefined; 11398 let breakpoint = false; 11399 const points = []; 11400 Object.keys(breakpoints).forEach((point) => { 11401 points.push(point); 11402 }); 11403 points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10)); 11404 for (let i = 0; i < points.length; i += 1) { 11405 const point = points[i]; 11406 if (point >= ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.innerWidth && !breakpoint) { 11407 breakpoint = point; 11408 } 11409 } 11410 return breakpoint || 'max'; 11411} 11412 11413var breakpoints = { setBreakpoint, getBreakpoint }; 11414 11415const Browser = (function Browser() { 11416 function isSafari() { 11417 const ua = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent.toLowerCase(); 11418 return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); 11419 } 11420 return { 11421 isIE: !!ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent.match(/Trident/g) || !!ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent.match(/MSIE/g), 11422 isSafari: isSafari(), 11423 isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent), 11424 }; 11425}()); 11426 11427function addClasses () { 11428 const swiper = this; 11429 const { 11430 classNames, params, rtl, $el, 11431 } = swiper; 11432 const suffixes = []; 11433 11434 suffixes.push(params.direction); 11435 11436 if (params.freeMode) { 11437 suffixes.push('free-mode'); 11438 } 11439 if (!Support.flexbox) { 11440 suffixes.push('no-flexbox'); 11441 } 11442 if (params.autoHeight) { 11443 suffixes.push('autoheight'); 11444 } 11445 if (rtl) { 11446 suffixes.push('rtl'); 11447 } 11448 if (params.slidesPerColumn > 1) { 11449 suffixes.push('multirow'); 11450 } 11451 if (Device.android) { 11452 suffixes.push('android'); 11453 } 11454 if (Device.ios) { 11455 suffixes.push('ios'); 11456 } 11457 // WP8 Touch Events Fix 11458 if (Browser.isIE && (Support.pointerEvents || Support.prefixedPointerEvents)) { 11459 suffixes.push(`wp8-${params.direction}`); 11460 } 11461 11462 suffixes.forEach((suffix) => { 11463 classNames.push(params.containerModifierClass + suffix); 11464 }); 11465 11466 $el.addClass(classNames.join(' ')); 11467} 11468 11469function removeClasses () { 11470 const swiper = this; 11471 const { $el, classNames } = swiper; 11472 11473 $el.removeClass(classNames.join(' ')); 11474} 11475 11476var classes = { addClasses, removeClasses }; 11477 11478function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) { 11479 let image; 11480 function onReady() { 11481 if (callback) callback(); 11482 } 11483 if (!imageEl.complete || !checkForComplete) { 11484 if (src) { 11485 image = new ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Image(); 11486 image.onload = onReady; 11487 image.onerror = onReady; 11488 if (sizes) { 11489 image.sizes = sizes; 11490 } 11491 if (srcset) { 11492 image.srcset = srcset; 11493 } 11494 if (src) { 11495 image.src = src; 11496 } 11497 } else { 11498 onReady(); 11499 } 11500 } else { 11501 // image already loaded... 11502 onReady(); 11503 } 11504} 11505 11506function preloadImages () { 11507 const swiper = this; 11508 swiper.imagesToLoad = swiper.$el.find('img'); 11509 function onReady() { 11510 if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; 11511 if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; 11512 if (swiper.imagesLoaded === swiper.imagesToLoad.length) { 11513 if (swiper.params.updateOnImagesReady) swiper.update(); 11514 swiper.emit('imagesReady'); 11515 } 11516 } 11517 for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { 11518 const imageEl = swiper.imagesToLoad[i]; 11519 swiper.loadImage( 11520 imageEl, 11521 imageEl.currentSrc || imageEl.getAttribute('src'), 11522 imageEl.srcset || imageEl.getAttribute('srcset'), 11523 imageEl.sizes || imageEl.getAttribute('sizes'), 11524 true, 11525 onReady 11526 ); 11527 } 11528} 11529 11530var images = { 11531 loadImage, 11532 preloadImages, 11533}; 11534 11535function checkOverflow() { 11536 const swiper = this; 11537 const wasLocked = swiper.isLocked; 11538 11539 swiper.isLocked = swiper.snapGrid.length === 1; 11540 swiper.allowSlideNext = !swiper.isLocked; 11541 swiper.allowSlidePrev = !swiper.isLocked; 11542 11543 // events 11544 if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); 11545 11546 if (wasLocked && wasLocked !== swiper.isLocked) { 11547 swiper.isEnd = false; 11548 swiper.navigation.update(); 11549 } 11550} 11551 11552var checkOverflow$1 = { checkOverflow }; 11553 11554var defaults = { 11555 init: true, 11556 direction: 'horizontal', 11557 touchEventsTarget: 'container', 11558 initialSlide: 0, 11559 speed: 300, 11560 // 11561 preventInteractionOnTransition: false, 11562 11563 // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). 11564 edgeSwipeDetection: false, 11565 edgeSwipeThreshold: 20, 11566 11567 // Free mode 11568 freeMode: false, 11569 freeModeMomentum: true, 11570 freeModeMomentumRatio: 1, 11571 freeModeMomentumBounce: true, 11572 freeModeMomentumBounceRatio: 1, 11573 freeModeMomentumVelocityRatio: 1, 11574 freeModeSticky: false, 11575 freeModeMinimumVelocity: 0.02, 11576 11577 // Autoheight 11578 autoHeight: false, 11579 11580 // Set wrapper width 11581 setWrapperSize: false, 11582 11583 // Virtual Translate 11584 virtualTranslate: false, 11585 11586 // Effects 11587 effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' 11588 11589 // Breakpoints 11590 breakpoints: undefined, 11591 11592 // Slides grid 11593 spaceBetween: 0, 11594 slidesPerView: 1, 11595 slidesPerColumn: 1, 11596 slidesPerColumnFill: 'column', 11597 slidesPerGroup: 1, 11598 centeredSlides: false, 11599 slidesOffsetBefore: 0, // in px 11600 slidesOffsetAfter: 0, // in px 11601 normalizeSlideIndex: true, 11602 11603 // Disable swiper and hide navigation when container not overflow 11604 watchOverflow: false, 11605 11606 // Round length 11607 roundLengths: false, 11608 11609 // Touches 11610 touchRatio: 1, 11611 touchAngle: 45, 11612 simulateTouch: true, 11613 shortSwipes: true, 11614 longSwipes: true, 11615 longSwipesRatio: 0.5, 11616 longSwipesMs: 300, 11617 followFinger: true, 11618 allowTouchMove: true, 11619 threshold: 0, 11620 touchMoveStopPropagation: true, 11621 touchReleaseOnEdges: false, 11622 11623 // Unique Navigation Elements 11624 uniqueNavElements: true, 11625 11626 // Resistance 11627 resistance: true, 11628 resistanceRatio: 0.85, 11629 11630 // Progress 11631 watchSlidesProgress: false, 11632 watchSlidesVisibility: false, 11633 11634 // Cursor 11635 grabCursor: false, 11636 11637 // Clicks 11638 preventClicks: true, 11639 preventClicksPropagation: true, 11640 slideToClickedSlide: false, 11641 11642 // Images 11643 preloadImages: true, 11644 updateOnImagesReady: true, 11645 11646 // loop 11647 loop: false, 11648 loopAdditionalSlides: 0, 11649 loopedSlides: null, 11650 loopFillGroupWithBlank: false, 11651 11652 // Swiping/no swiping 11653 allowSlidePrev: true, 11654 allowSlideNext: true, 11655 swipeHandler: null, // '.swipe-handler', 11656 noSwiping: true, 11657 noSwipingClass: 'swiper-no-swiping', 11658 noSwipingSelector: null, 11659 11660 // Passive Listeners 11661 passiveListeners: true, 11662 11663 // NS 11664 containerModifierClass: 'swiper-container-', // NEW 11665 slideClass: 'swiper-slide', 11666 slideBlankClass: 'swiper-slide-invisible-blank', 11667 slideActiveClass: 'swiper-slide-active', 11668 slideDuplicateActiveClass: 'swiper-slide-duplicate-active', 11669 slideVisibleClass: 'swiper-slide-visible', 11670 slideDuplicateClass: 'swiper-slide-duplicate', 11671 slideNextClass: 'swiper-slide-next', 11672 slideDuplicateNextClass: 'swiper-slide-duplicate-next', 11673 slidePrevClass: 'swiper-slide-prev', 11674 slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', 11675 wrapperClass: 'swiper-wrapper', 11676 11677 // Callbacks 11678 runCallbacksOnInit: true, 11679}; 11680 11681const prototypes = { 11682 update, 11683 translate, 11684 transition: transition$1, 11685 slide, 11686 loop, 11687 grabCursor, 11688 manipulation, 11689 events, 11690 breakpoints, 11691 checkOverflow: checkOverflow$1, 11692 classes, 11693 images, 11694}; 11695 11696const extendedDefaults = {}; 11697 11698class Swiper extends SwiperClass { 11699 constructor(...args) { 11700 let el; 11701 let params; 11702 if (args.length === 1 && args[0].constructor && args[0].constructor === Object) { 11703 params = args[0]; 11704 } else { 11705 [el, params] = args; 11706 } 11707 if (!params) params = {}; 11708 11709 params = Utils.extend({}, params); 11710 if (el && !params.el) params.el = el; 11711 11712 super(params); 11713 11714 Object.keys(prototypes).forEach((prototypeGroup) => { 11715 Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => { 11716 if (!Swiper.prototype[protoMethod]) { 11717 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 11718 } 11719 }); 11720 }); 11721 11722 // Swiper Instance 11723 const swiper = this; 11724 if (typeof swiper.modules === 'undefined') { 11725 swiper.modules = {}; 11726 } 11727 Object.keys(swiper.modules).forEach((moduleName) => { 11728 const module = swiper.modules[moduleName]; 11729 if (module.params) { 11730 const moduleParamName = Object.keys(module.params)[0]; 11731 const moduleParams = module.params[moduleParamName]; 11732 if (typeof moduleParams !== 'object') return; 11733 if (!(moduleParamName in params && 'enabled' in moduleParams)) return; 11734 if (params[moduleParamName] === true) { 11735 params[moduleParamName] = { enabled: true }; 11736 } 11737 if ( 11738 typeof params[moduleParamName] === 'object' 11739 && !('enabled' in params[moduleParamName]) 11740 ) { 11741 params[moduleParamName].enabled = true; 11742 } 11743 if (!params[moduleParamName]) params[moduleParamName] = { enabled: false }; 11744 } 11745 }); 11746 11747 // Extend defaults with modules params 11748 const swiperParams = Utils.extend({}, defaults); 11749 swiper.useModulesParams(swiperParams); 11750 11751 // Extend defaults with passed params 11752 swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params); 11753 swiper.originalParams = Utils.extend({}, swiper.params); 11754 swiper.passedParams = Utils.extend({}, params); 11755 11756 // Save Dom lib 11757 swiper.$ = dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$; 11758 11759 // Find el 11760 const $el = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.params.el); 11761 el = $el[0]; 11762 11763 if (!el) { 11764 return undefined; 11765 } 11766 11767 if ($el.length > 1) { 11768 const swipers = []; 11769 $el.each((index$$1, containerEl) => { 11770 const newParams = Utils.extend({}, params, { el: containerEl }); 11771 swipers.push(new Swiper(newParams)); 11772 }); 11773 return swipers; 11774 } 11775 11776 el.swiper = swiper; 11777 $el.data('swiper', swiper); 11778 11779 // Find Wrapper 11780 const $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`); 11781 11782 // Extend Swiper 11783 Utils.extend(swiper, { 11784 $el, 11785 el, 11786 $wrapperEl, 11787 wrapperEl: $wrapperEl[0], 11788 11789 // Classes 11790 classNames: [], 11791 11792 // Slides 11793 slides: (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(), 11794 slidesGrid: [], 11795 snapGrid: [], 11796 slidesSizesGrid: [], 11797 11798 // isDirection 11799 isHorizontal() { 11800 return swiper.params.direction === 'horizontal'; 11801 }, 11802 isVertical() { 11803 return swiper.params.direction === 'vertical'; 11804 }, 11805 // RTL 11806 rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), 11807 rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), 11808 wrongRTL: $wrapperEl.css('display') === '-webkit-box', 11809 11810 // Indexes 11811 activeIndex: 0, 11812 realIndex: 0, 11813 11814 // 11815 isBeginning: true, 11816 isEnd: false, 11817 11818 // Props 11819 translate: 0, 11820 previousTranslate: 0, 11821 progress: 0, 11822 velocity: 0, 11823 animating: false, 11824 11825 // Locks 11826 allowSlideNext: swiper.params.allowSlideNext, 11827 allowSlidePrev: swiper.params.allowSlidePrev, 11828 11829 // Touch Events 11830 touchEvents: (function touchEvents() { 11831 const touch = ['touchstart', 'touchmove', 'touchend']; 11832 let desktop = ['mousedown', 'mousemove', 'mouseup']; 11833 if (Support.pointerEvents) { 11834 desktop = ['pointerdown', 'pointermove', 'pointerup']; 11835 } else if (Support.prefixedPointerEvents) { 11836 desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp']; 11837 } 11838 swiper.touchEventsTouch = { 11839 start: touch[0], 11840 move: touch[1], 11841 end: touch[2], 11842 }; 11843 swiper.touchEventsDesktop = { 11844 start: desktop[0], 11845 move: desktop[1], 11846 end: desktop[2], 11847 }; 11848 return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; 11849 }()), 11850 touchEventsData: { 11851 isTouched: undefined, 11852 isMoved: undefined, 11853 allowTouchCallbacks: undefined, 11854 touchStartTime: undefined, 11855 isScrolling: undefined, 11856 currentTranslate: undefined, 11857 startTranslate: undefined, 11858 allowThresholdMove: undefined, 11859 // Form elements to match 11860 formElements: 'input, select, option, textarea, button, video', 11861 // Last click time 11862 lastClickTime: Utils.now(), 11863 clickTimeout: undefined, 11864 // Velocities 11865 velocities: [], 11866 allowMomentumBounce: undefined, 11867 isTouchEvent: undefined, 11868 startMoving: undefined, 11869 }, 11870 11871 // Clicks 11872 allowClick: true, 11873 11874 // Touches 11875 allowTouchMove: swiper.params.allowTouchMove, 11876 11877 touches: { 11878 startX: 0, 11879 startY: 0, 11880 currentX: 0, 11881 currentY: 0, 11882 diff: 0, 11883 }, 11884 11885 // Images 11886 imagesToLoad: [], 11887 imagesLoaded: 0, 11888 11889 }); 11890 11891 // Install Modules 11892 swiper.useModules(); 11893 11894 // Init 11895 if (swiper.params.init) { 11896 swiper.init(); 11897 } 11898 11899 // Return app instance 11900 return swiper; 11901 } 11902 11903 slidesPerViewDynamic() { 11904 const swiper = this; 11905 const { 11906 params, slides, slidesGrid, size: swiperSize, activeIndex, 11907 } = swiper; 11908 let spv = 1; 11909 if (params.centeredSlides) { 11910 let slideSize = slides[activeIndex].swiperSlideSize; 11911 let breakLoop; 11912 for (let i = activeIndex + 1; i < slides.length; i += 1) { 11913 if (slides[i] && !breakLoop) { 11914 slideSize += slides[i].swiperSlideSize; 11915 spv += 1; 11916 if (slideSize > swiperSize) breakLoop = true; 11917 } 11918 } 11919 for (let i = activeIndex - 1; i >= 0; i -= 1) { 11920 if (slides[i] && !breakLoop) { 11921 slideSize += slides[i].swiperSlideSize; 11922 spv += 1; 11923 if (slideSize > swiperSize) breakLoop = true; 11924 } 11925 } 11926 } else { 11927 for (let i = activeIndex + 1; i < slides.length; i += 1) { 11928 if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) { 11929 spv += 1; 11930 } 11931 } 11932 } 11933 return spv; 11934 } 11935 11936 update() { 11937 const swiper = this; 11938 if (!swiper || swiper.destroyed) return; 11939 const { snapGrid, params } = swiper; 11940 // Breakpoints 11941 if (params.breakpoints) { 11942 swiper.setBreakpoint(); 11943 } 11944 swiper.updateSize(); 11945 swiper.updateSlides(); 11946 swiper.updateProgress(); 11947 swiper.updateSlidesClasses(); 11948 11949 function setTranslate() { 11950 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 11951 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 11952 swiper.setTranslate(newTranslate); 11953 swiper.updateActiveIndex(); 11954 swiper.updateSlidesClasses(); 11955 } 11956 let translated; 11957 if (swiper.params.freeMode) { 11958 setTranslate(); 11959 if (swiper.params.autoHeight) { 11960 swiper.updateAutoHeight(); 11961 } 11962 } else { 11963 if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { 11964 translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); 11965 } else { 11966 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 11967 } 11968 if (!translated) { 11969 setTranslate(); 11970 } 11971 } 11972 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 11973 swiper.checkOverflow(); 11974 } 11975 swiper.emit('update'); 11976 } 11977 11978 init() { 11979 const swiper = this; 11980 if (swiper.initialized) return; 11981 11982 swiper.emit('beforeInit'); 11983 11984 // Set breakpoint 11985 if (swiper.params.breakpoints) { 11986 swiper.setBreakpoint(); 11987 } 11988 11989 // Add Classes 11990 swiper.addClasses(); 11991 11992 // Create loop 11993 if (swiper.params.loop) { 11994 swiper.loopCreate(); 11995 } 11996 11997 // Update size 11998 swiper.updateSize(); 11999 12000 // Update slides 12001 swiper.updateSlides(); 12002 12003 if (swiper.params.watchOverflow) { 12004 swiper.checkOverflow(); 12005 } 12006 12007 // Set Grab Cursor 12008 if (swiper.params.grabCursor) { 12009 swiper.setGrabCursor(); 12010 } 12011 12012 if (swiper.params.preloadImages) { 12013 swiper.preloadImages(); 12014 } 12015 12016 // Slide To Initial Slide 12017 if (swiper.params.loop) { 12018 swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit); 12019 } else { 12020 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit); 12021 } 12022 12023 // Attach events 12024 swiper.attachEvents(); 12025 12026 // Init Flag 12027 swiper.initialized = true; 12028 12029 // Emit 12030 swiper.emit('init'); 12031 } 12032 12033 destroy(deleteInstance = true, cleanStyles = true) { 12034 const swiper = this; 12035 const { 12036 params, $el, $wrapperEl, slides, 12037 } = swiper; 12038 12039 if (typeof swiper.params === 'undefined' || swiper.destroyed) { 12040 return null; 12041 } 12042 12043 swiper.emit('beforeDestroy'); 12044 12045 // Init Flag 12046 swiper.initialized = false; 12047 12048 // Detach events 12049 swiper.detachEvents(); 12050 12051 // Destroy loop 12052 if (params.loop) { 12053 swiper.loopDestroy(); 12054 } 12055 12056 // Cleanup styles 12057 if (cleanStyles) { 12058 swiper.removeClasses(); 12059 $el.removeAttr('style'); 12060 $wrapperEl.removeAttr('style'); 12061 if (slides && slides.length) { 12062 slides 12063 .removeClass([ 12064 params.slideVisibleClass, 12065 params.slideActiveClass, 12066 params.slideNextClass, 12067 params.slidePrevClass, 12068 ].join(' ')) 12069 .removeAttr('style') 12070 .removeAttr('data-swiper-slide-index') 12071 .removeAttr('data-swiper-column') 12072 .removeAttr('data-swiper-row'); 12073 } 12074 } 12075 12076 swiper.emit('destroy'); 12077 12078 // Detach emitter events 12079 Object.keys(swiper.eventsListeners).forEach((eventName) => { 12080 swiper.off(eventName); 12081 }); 12082 12083 if (deleteInstance !== false) { 12084 swiper.$el[0].swiper = null; 12085 swiper.$el.data('swiper', null); 12086 Utils.deleteProps(swiper); 12087 } 12088 swiper.destroyed = true; 12089 12090 return null; 12091 } 12092 12093 static extendDefaults(newDefaults) { 12094 Utils.extend(extendedDefaults, newDefaults); 12095 } 12096 12097 static get extendedDefaults() { 12098 return extendedDefaults; 12099 } 12100 12101 static get defaults() { 12102 return defaults; 12103 } 12104 12105 static get Class() { 12106 return SwiperClass; 12107 } 12108 12109 static get $() { 12110 return dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$; 12111 } 12112} 12113 12114var Device$1 = { 12115 name: 'device', 12116 proto: { 12117 device: Device, 12118 }, 12119 static: { 12120 device: Device, 12121 }, 12122}; 12123 12124var Support$1 = { 12125 name: 'support', 12126 proto: { 12127 support: Support, 12128 }, 12129 static: { 12130 support: Support, 12131 }, 12132}; 12133 12134var Browser$1 = { 12135 name: 'browser', 12136 proto: { 12137 browser: Browser, 12138 }, 12139 static: { 12140 browser: Browser, 12141 }, 12142}; 12143 12144var Resize = { 12145 name: 'resize', 12146 create() { 12147 const swiper = this; 12148 Utils.extend(swiper, { 12149 resize: { 12150 resizeHandler() { 12151 if (!swiper || swiper.destroyed || !swiper.initialized) return; 12152 swiper.emit('beforeResize'); 12153 swiper.emit('resize'); 12154 }, 12155 orientationChangeHandler() { 12156 if (!swiper || swiper.destroyed || !swiper.initialized) return; 12157 swiper.emit('orientationchange'); 12158 }, 12159 }, 12160 }); 12161 }, 12162 on: { 12163 init() { 12164 const swiper = this; 12165 // Emit resize 12166 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.addEventListener('resize', swiper.resize.resizeHandler); 12167 12168 // Emit orientationchange 12169 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler); 12170 }, 12171 destroy() { 12172 const swiper = this; 12173 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.removeEventListener('resize', swiper.resize.resizeHandler); 12174 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler); 12175 }, 12176 }, 12177}; 12178 12179const Observer = { 12180 func: ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.MutationObserver || ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.WebkitMutationObserver, 12181 attach(target, options = {}) { 12182 const swiper = this; 12183 12184 const ObserverFunc = Observer.func; 12185 const observer = new ObserverFunc((mutations) => { 12186 // The observerUpdate event should only be triggered 12187 // once despite the number of mutations. Additional 12188 // triggers are redundant and are very costly 12189 if (mutations.length === 1) { 12190 swiper.emit('observerUpdate', mutations[0]); 12191 return; 12192 } 12193 const observerUpdate = function observerUpdate() { 12194 swiper.emit('observerUpdate', mutations[0]); 12195 }; 12196 12197 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.requestAnimationFrame) { 12198 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.requestAnimationFrame(observerUpdate); 12199 } else { 12200 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.setTimeout(observerUpdate, 0); 12201 } 12202 }); 12203 12204 observer.observe(target, { 12205 attributes: typeof options.attributes === 'undefined' ? true : options.attributes, 12206 childList: typeof options.childList === 'undefined' ? true : options.childList, 12207 characterData: typeof options.characterData === 'undefined' ? true : options.characterData, 12208 }); 12209 12210 swiper.observer.observers.push(observer); 12211 }, 12212 init() { 12213 const swiper = this; 12214 if (!Support.observer || !swiper.params.observer) return; 12215 if (swiper.params.observeParents) { 12216 const containerParents = swiper.$el.parents(); 12217 for (let i = 0; i < containerParents.length; i += 1) { 12218 swiper.observer.attach(containerParents[i]); 12219 } 12220 } 12221 // Observe container 12222 swiper.observer.attach(swiper.$el[0], { childList: false }); 12223 12224 // Observe wrapper 12225 swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false }); 12226 }, 12227 destroy() { 12228 const swiper = this; 12229 swiper.observer.observers.forEach((observer) => { 12230 observer.disconnect(); 12231 }); 12232 swiper.observer.observers = []; 12233 }, 12234}; 12235 12236var Observer$1 = { 12237 name: 'observer', 12238 params: { 12239 observer: false, 12240 observeParents: false, 12241 }, 12242 create() { 12243 const swiper = this; 12244 Utils.extend(swiper, { 12245 observer: { 12246 init: Observer.init.bind(swiper), 12247 attach: Observer.attach.bind(swiper), 12248 destroy: Observer.destroy.bind(swiper), 12249 observers: [], 12250 }, 12251 }); 12252 }, 12253 on: { 12254 init() { 12255 const swiper = this; 12256 swiper.observer.init(); 12257 }, 12258 destroy() { 12259 const swiper = this; 12260 swiper.observer.destroy(); 12261 }, 12262 }, 12263}; 12264 12265const Virtual = { 12266 update(force) { 12267 const swiper = this; 12268 const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params; 12269 const { 12270 from: previousFrom, 12271 to: previousTo, 12272 slides, 12273 slidesGrid: previousSlidesGrid, 12274 renderSlide, 12275 offset: previousOffset, 12276 } = swiper.virtual; 12277 swiper.updateActiveIndex(); 12278 const activeIndex = swiper.activeIndex || 0; 12279 12280 let offsetProp; 12281 if (swiper.rtlTranslate) offsetProp = 'right'; 12282 else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; 12283 12284 let slidesAfter; 12285 let slidesBefore; 12286 if (centeredSlides) { 12287 slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup; 12288 slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup; 12289 } else { 12290 slidesAfter = slidesPerView + (slidesPerGroup - 1); 12291 slidesBefore = slidesPerGroup; 12292 } 12293 const from = Math.max((activeIndex || 0) - slidesBefore, 0); 12294 const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); 12295 const offset$$1 = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); 12296 12297 Utils.extend(swiper.virtual, { 12298 from, 12299 to, 12300 offset: offset$$1, 12301 slidesGrid: swiper.slidesGrid, 12302 }); 12303 12304 function onRendered() { 12305 swiper.updateSlides(); 12306 swiper.updateProgress(); 12307 swiper.updateSlidesClasses(); 12308 if (swiper.lazy && swiper.params.lazy.enabled) { 12309 swiper.lazy.load(); 12310 } 12311 } 12312 12313 if (previousFrom === from && previousTo === to && !force) { 12314 if (swiper.slidesGrid !== previousSlidesGrid && offset$$1 !== previousOffset) { 12315 swiper.slides.css(offsetProp, `${offset$$1}px`); 12316 } 12317 swiper.updateProgress(); 12318 return; 12319 } 12320 if (swiper.params.virtual.renderExternal) { 12321 swiper.params.virtual.renderExternal.call(swiper, { 12322 offset: offset$$1, 12323 from, 12324 to, 12325 slides: (function getSlides() { 12326 const slidesToRender = []; 12327 for (let i = from; i <= to; i += 1) { 12328 slidesToRender.push(slides[i]); 12329 } 12330 return slidesToRender; 12331 }()), 12332 }); 12333 onRendered(); 12334 return; 12335 } 12336 const prependIndexes = []; 12337 const appendIndexes = []; 12338 if (force) { 12339 swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove(); 12340 } else { 12341 for (let i = previousFrom; i <= previousTo; i += 1) { 12342 if (i < from || i > to) { 12343 swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove(); 12344 } 12345 } 12346 } 12347 for (let i = 0; i < slides.length; i += 1) { 12348 if (i >= from && i <= to) { 12349 if (typeof previousTo === 'undefined' || force) { 12350 appendIndexes.push(i); 12351 } else { 12352 if (i > previousTo) appendIndexes.push(i); 12353 if (i < previousFrom) prependIndexes.push(i); 12354 } 12355 } 12356 } 12357 appendIndexes.forEach((index$$1) => { 12358 swiper.$wrapperEl.append(renderSlide(slides[index$$1], index$$1)); 12359 }); 12360 prependIndexes.sort((a, b) => a < b).forEach((index$$1) => { 12361 swiper.$wrapperEl.prepend(renderSlide(slides[index$$1], index$$1)); 12362 }); 12363 swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset$$1}px`); 12364 onRendered(); 12365 }, 12366 renderSlide(slide, index$$1) { 12367 const swiper = this; 12368 const params = swiper.params.virtual; 12369 if (params.cache && swiper.virtual.cache[index$$1]) { 12370 return swiper.virtual.cache[index$$1]; 12371 } 12372 const $slideEl = params.renderSlide 12373 ? (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(params.renderSlide.call(swiper, slide, index$$1)) 12374 : (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index$$1}">${slide}</div>`); 12375 if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index$$1); 12376 if (params.cache) swiper.virtual.cache[index$$1] = $slideEl; 12377 return $slideEl; 12378 }, 12379 appendSlide(slide) { 12380 const swiper = this; 12381 swiper.virtual.slides.push(slide); 12382 swiper.virtual.update(true); 12383 }, 12384 prependSlide(slide) { 12385 const swiper = this; 12386 swiper.virtual.slides.unshift(slide); 12387 if (swiper.params.virtual.cache) { 12388 const cache = swiper.virtual.cache; 12389 const newCache = {}; 12390 Object.keys(cache).forEach((cachedIndex) => { 12391 newCache[cachedIndex + 1] = cache[cachedIndex]; 12392 }); 12393 swiper.virtual.cache = newCache; 12394 } 12395 swiper.virtual.update(true); 12396 swiper.slideNext(0); 12397 }, 12398}; 12399 12400var Virtual$1 = { 12401 name: 'virtual', 12402 params: { 12403 virtual: { 12404 enabled: false, 12405 slides: [], 12406 cache: true, 12407 renderSlide: null, 12408 renderExternal: null, 12409 }, 12410 }, 12411 create() { 12412 const swiper = this; 12413 Utils.extend(swiper, { 12414 virtual: { 12415 update: Virtual.update.bind(swiper), 12416 appendSlide: Virtual.appendSlide.bind(swiper), 12417 prependSlide: Virtual.prependSlide.bind(swiper), 12418 renderSlide: Virtual.renderSlide.bind(swiper), 12419 slides: swiper.params.virtual.slides, 12420 cache: {}, 12421 }, 12422 }); 12423 }, 12424 on: { 12425 beforeInit() { 12426 const swiper = this; 12427 if (!swiper.params.virtual.enabled) return; 12428 swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); 12429 const overwriteParams = { 12430 watchSlidesProgress: true, 12431 }; 12432 Utils.extend(swiper.params, overwriteParams); 12433 Utils.extend(swiper.originalParams, overwriteParams); 12434 12435 swiper.virtual.update(); 12436 }, 12437 setTranslate() { 12438 const swiper = this; 12439 if (!swiper.params.virtual.enabled) return; 12440 swiper.virtual.update(); 12441 }, 12442 }, 12443}; 12444 12445const Keyboard = { 12446 handle(event) { 12447 const swiper = this; 12448 const { rtlTranslate: rtl } = swiper; 12449 let e = event; 12450 if (e.originalEvent) e = e.originalEvent; // jquery fix 12451 const kc = e.keyCode || e.charCode; 12452 // Directions locks 12453 if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) { 12454 return false; 12455 } 12456 if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) { 12457 return false; 12458 } 12459 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 12460 return undefined; 12461 } 12462 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement.nodeName && (ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement.nodeName.toLowerCase() === 'input' || ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.activeElement.nodeName.toLowerCase() === 'textarea')) { 12463 return undefined; 12464 } 12465 if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) { 12466 let inView = false; 12467 // Check that swiper should be inside of visible area of window 12468 if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) { 12469 return undefined; 12470 } 12471 const windowWidth = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.innerWidth; 12472 const windowHeight = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.innerHeight; 12473 const swiperOffset = swiper.$el.offset(); 12474 if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; 12475 const swiperCoord = [ 12476 [swiperOffset.left, swiperOffset.top], 12477 [swiperOffset.left + swiper.width, swiperOffset.top], 12478 [swiperOffset.left, swiperOffset.top + swiper.height], 12479 [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height], 12480 ]; 12481 for (let i = 0; i < swiperCoord.length; i += 1) { 12482 const point = swiperCoord[i]; 12483 if ( 12484 point[0] >= 0 && point[0] <= windowWidth 12485 && point[1] >= 0 && point[1] <= windowHeight 12486 ) { 12487 inView = true; 12488 } 12489 } 12490 if (!inView) return undefined; 12491 } 12492 if (swiper.isHorizontal()) { 12493 if (kc === 37 || kc === 39) { 12494 if (e.preventDefault) e.preventDefault(); 12495 else e.returnValue = false; 12496 } 12497 if ((kc === 39 && !rtl) || (kc === 37 && rtl)) swiper.slideNext(); 12498 if ((kc === 37 && !rtl) || (kc === 39 && rtl)) swiper.slidePrev(); 12499 } else { 12500 if (kc === 38 || kc === 40) { 12501 if (e.preventDefault) e.preventDefault(); 12502 else e.returnValue = false; 12503 } 12504 if (kc === 40) swiper.slideNext(); 12505 if (kc === 38) swiper.slidePrev(); 12506 } 12507 swiper.emit('keyPress', kc); 12508 return undefined; 12509 }, 12510 enable() { 12511 const swiper = this; 12512 if (swiper.keyboard.enabled) return; 12513 (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.document).on('keydown', swiper.keyboard.handle); 12514 swiper.keyboard.enabled = true; 12515 }, 12516 disable() { 12517 const swiper = this; 12518 if (!swiper.keyboard.enabled) return; 12519 (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.document).off('keydown', swiper.keyboard.handle); 12520 swiper.keyboard.enabled = false; 12521 }, 12522}; 12523 12524var Keyboard$1 = { 12525 name: 'keyboard', 12526 params: { 12527 keyboard: { 12528 enabled: false, 12529 onlyInViewport: true, 12530 }, 12531 }, 12532 create() { 12533 const swiper = this; 12534 Utils.extend(swiper, { 12535 keyboard: { 12536 enabled: false, 12537 enable: Keyboard.enable.bind(swiper), 12538 disable: Keyboard.disable.bind(swiper), 12539 handle: Keyboard.handle.bind(swiper), 12540 }, 12541 }); 12542 }, 12543 on: { 12544 init() { 12545 const swiper = this; 12546 if (swiper.params.keyboard.enabled) { 12547 swiper.keyboard.enable(); 12548 } 12549 }, 12550 destroy() { 12551 const swiper = this; 12552 if (swiper.keyboard.enabled) { 12553 swiper.keyboard.disable(); 12554 } 12555 }, 12556 }, 12557}; 12558 12559function isEventSupported() { 12560 const eventName = 'onwheel'; 12561 let isSupported = eventName in ssr_window__WEBPACK_IMPORTED_MODULE_1__.document; 12562 12563 if (!isSupported) { 12564 const element = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.createElement('div'); 12565 element.setAttribute(eventName, 'return;'); 12566 isSupported = typeof element[eventName] === 'function'; 12567 } 12568 12569 if (!isSupported 12570 && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.implementation 12571 && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.implementation.hasFeature 12572 // always returns true in newer browsers as per the standard. 12573 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature 12574 && ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.implementation.hasFeature('', '') !== true 12575 ) { 12576 // This is the only way to test support for the `wheel` event in IE9+. 12577 isSupported = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.implementation.hasFeature('Events.wheel', '3.0'); 12578 } 12579 12580 return isSupported; 12581} 12582const Mousewheel = { 12583 lastScrollTime: Utils.now(), 12584 event: (function getEvent() { 12585 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll'; 12586 return isEventSupported() ? 'wheel' : 'mousewheel'; 12587 }()), 12588 normalize(e) { 12589 // Reasonable defaults 12590 const PIXEL_STEP = 10; 12591 const LINE_HEIGHT = 40; 12592 const PAGE_HEIGHT = 800; 12593 12594 let sX = 0; 12595 let sY = 0; // spinX, spinY 12596 let pX = 0; 12597 let pY = 0; // pixelX, pixelY 12598 12599 // Legacy 12600 if ('detail' in e) { 12601 sY = e.detail; 12602 } 12603 if ('wheelDelta' in e) { 12604 sY = -e.wheelDelta / 120; 12605 } 12606 if ('wheelDeltaY' in e) { 12607 sY = -e.wheelDeltaY / 120; 12608 } 12609 if ('wheelDeltaX' in e) { 12610 sX = -e.wheelDeltaX / 120; 12611 } 12612 12613 // side scrolling on FF with DOMMouseScroll 12614 if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { 12615 sX = sY; 12616 sY = 0; 12617 } 12618 12619 pX = sX * PIXEL_STEP; 12620 pY = sY * PIXEL_STEP; 12621 12622 if ('deltaY' in e) { 12623 pY = e.deltaY; 12624 } 12625 if ('deltaX' in e) { 12626 pX = e.deltaX; 12627 } 12628 12629 if ((pX || pY) && e.deltaMode) { 12630 if (e.deltaMode === 1) { // delta in LINE units 12631 pX *= LINE_HEIGHT; 12632 pY *= LINE_HEIGHT; 12633 } else { // delta in PAGE units 12634 pX *= PAGE_HEIGHT; 12635 pY *= PAGE_HEIGHT; 12636 } 12637 } 12638 12639 // Fall-back if spin cannot be determined 12640 if (pX && !sX) { 12641 sX = (pX < 1) ? -1 : 1; 12642 } 12643 if (pY && !sY) { 12644 sY = (pY < 1) ? -1 : 1; 12645 } 12646 12647 return { 12648 spinX: sX, 12649 spinY: sY, 12650 pixelX: pX, 12651 pixelY: pY, 12652 }; 12653 }, 12654 handleMouseEnter() { 12655 const swiper = this; 12656 swiper.mouseEntered = true; 12657 }, 12658 handleMouseLeave() { 12659 const swiper = this; 12660 swiper.mouseEntered = false; 12661 }, 12662 handle(event) { 12663 let e = event; 12664 const swiper = this; 12665 const params = swiper.params.mousewheel; 12666 12667 if (!swiper.mouseEntered && !params.releaseOnEdges) return true; 12668 12669 if (e.originalEvent) e = e.originalEvent; // jquery fix 12670 let delta = 0; 12671 const rtlFactor = swiper.rtlTranslate ? -1 : 1; 12672 12673 const data$$1 = Mousewheel.normalize(e); 12674 12675 if (params.forceToAxis) { 12676 if (swiper.isHorizontal()) { 12677 if (Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY)) delta = data$$1.pixelX * rtlFactor; 12678 else return true; 12679 } else if (Math.abs(data$$1.pixelY) > Math.abs(data$$1.pixelX)) delta = data$$1.pixelY; 12680 else return true; 12681 } else { 12682 delta = Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY) ? -data$$1.pixelX * rtlFactor : -data$$1.pixelY; 12683 } 12684 12685 if (delta === 0) return true; 12686 12687 if (params.invert) delta = -delta; 12688 12689 if (!swiper.params.freeMode) { 12690 if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) { 12691 if (delta < 0) { 12692 if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { 12693 swiper.slideNext(); 12694 swiper.emit('scroll', e); 12695 } else if (params.releaseOnEdges) return true; 12696 } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { 12697 swiper.slidePrev(); 12698 swiper.emit('scroll', e); 12699 } else if (params.releaseOnEdges) return true; 12700 } 12701 swiper.mousewheel.lastScrollTime = (new ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.Date()).getTime(); 12702 } else { 12703 // Freemode or scrollContainer: 12704 if (swiper.params.loop) { 12705 swiper.loopFix(); 12706 } 12707 let position = swiper.getTranslate() + (delta * params.sensitivity); 12708 const wasBeginning = swiper.isBeginning; 12709 const wasEnd = swiper.isEnd; 12710 12711 if (position >= swiper.minTranslate()) position = swiper.minTranslate(); 12712 if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); 12713 12714 swiper.setTransition(0); 12715 swiper.setTranslate(position); 12716 swiper.updateProgress(); 12717 swiper.updateActiveIndex(); 12718 swiper.updateSlidesClasses(); 12719 12720 if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) { 12721 swiper.updateSlidesClasses(); 12722 } 12723 12724 if (swiper.params.freeModeSticky) { 12725 clearTimeout(swiper.mousewheel.timeout); 12726 swiper.mousewheel.timeout = Utils.nextTick(() => { 12727 swiper.slideToClosest(); 12728 }, 300); 12729 } 12730 // Emit event 12731 swiper.emit('scroll', e); 12732 12733 // Stop autoplay 12734 if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); 12735 // Return page scroll on edge positions 12736 if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; 12737 } 12738 12739 if (e.preventDefault) e.preventDefault(); 12740 else e.returnValue = false; 12741 return false; 12742 }, 12743 enable() { 12744 const swiper = this; 12745 if (!Mousewheel.event) return false; 12746 if (swiper.mousewheel.enabled) return false; 12747 let target = swiper.$el; 12748 if (swiper.params.mousewheel.eventsTarged !== 'container') { 12749 target = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.params.mousewheel.eventsTarged); 12750 } 12751 target.on('mouseenter', swiper.mousewheel.handleMouseEnter); 12752 target.on('mouseleave', swiper.mousewheel.handleMouseLeave); 12753 target.on(Mousewheel.event, swiper.mousewheel.handle); 12754 swiper.mousewheel.enabled = true; 12755 return true; 12756 }, 12757 disable() { 12758 const swiper = this; 12759 if (!Mousewheel.event) return false; 12760 if (!swiper.mousewheel.enabled) return false; 12761 let target = swiper.$el; 12762 if (swiper.params.mousewheel.eventsTarged !== 'container') { 12763 target = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.params.mousewheel.eventsTarged); 12764 } 12765 target.off(Mousewheel.event, swiper.mousewheel.handle); 12766 swiper.mousewheel.enabled = false; 12767 return true; 12768 }, 12769}; 12770 12771var Mousewheel$1 = { 12772 name: 'mousewheel', 12773 params: { 12774 mousewheel: { 12775 enabled: false, 12776 releaseOnEdges: false, 12777 invert: false, 12778 forceToAxis: false, 12779 sensitivity: 1, 12780 eventsTarged: 'container', 12781 }, 12782 }, 12783 create() { 12784 const swiper = this; 12785 Utils.extend(swiper, { 12786 mousewheel: { 12787 enabled: false, 12788 enable: Mousewheel.enable.bind(swiper), 12789 disable: Mousewheel.disable.bind(swiper), 12790 handle: Mousewheel.handle.bind(swiper), 12791 handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper), 12792 handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper), 12793 lastScrollTime: Utils.now(), 12794 }, 12795 }); 12796 }, 12797 on: { 12798 init() { 12799 const swiper = this; 12800 if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable(); 12801 }, 12802 destroy() { 12803 const swiper = this; 12804 if (swiper.mousewheel.enabled) swiper.mousewheel.disable(); 12805 }, 12806 }, 12807}; 12808 12809const Navigation = { 12810 update() { 12811 // Update Navigation Buttons 12812 const swiper = this; 12813 const params = swiper.params.navigation; 12814 12815 if (swiper.params.loop) return; 12816 const { $nextEl, $prevEl } = swiper.navigation; 12817 12818 if ($prevEl && $prevEl.length > 0) { 12819 if (swiper.isBeginning) { 12820 $prevEl.addClass(params.disabledClass); 12821 } else { 12822 $prevEl.removeClass(params.disabledClass); 12823 } 12824 $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 12825 } 12826 if ($nextEl && $nextEl.length > 0) { 12827 if (swiper.isEnd) { 12828 $nextEl.addClass(params.disabledClass); 12829 } else { 12830 $nextEl.removeClass(params.disabledClass); 12831 } 12832 $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 12833 } 12834 }, 12835 init() { 12836 const swiper = this; 12837 const params = swiper.params.navigation; 12838 if (!(params.nextEl || params.prevEl)) return; 12839 12840 let $nextEl; 12841 let $prevEl; 12842 if (params.nextEl) { 12843 $nextEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(params.nextEl); 12844 if ( 12845 swiper.params.uniqueNavElements 12846 && typeof params.nextEl === 'string' 12847 && $nextEl.length > 1 12848 && swiper.$el.find(params.nextEl).length === 1 12849 ) { 12850 $nextEl = swiper.$el.find(params.nextEl); 12851 } 12852 } 12853 if (params.prevEl) { 12854 $prevEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(params.prevEl); 12855 if ( 12856 swiper.params.uniqueNavElements 12857 && typeof params.prevEl === 'string' 12858 && $prevEl.length > 1 12859 && swiper.$el.find(params.prevEl).length === 1 12860 ) { 12861 $prevEl = swiper.$el.find(params.prevEl); 12862 } 12863 } 12864 12865 if ($nextEl && $nextEl.length > 0) { 12866 $nextEl.on('click', (e) => { 12867 e.preventDefault(); 12868 if (swiper.isEnd && !swiper.params.loop) return; 12869 swiper.slideNext(); 12870 }); 12871 } 12872 if ($prevEl && $prevEl.length > 0) { 12873 $prevEl.on('click', (e) => { 12874 e.preventDefault(); 12875 if (swiper.isBeginning && !swiper.params.loop) return; 12876 swiper.slidePrev(); 12877 }); 12878 } 12879 12880 Utils.extend(swiper.navigation, { 12881 $nextEl, 12882 nextEl: $nextEl && $nextEl[0], 12883 $prevEl, 12884 prevEl: $prevEl && $prevEl[0], 12885 }); 12886 }, 12887 destroy() { 12888 const swiper = this; 12889 const { $nextEl, $prevEl } = swiper.navigation; 12890 if ($nextEl && $nextEl.length) { 12891 $nextEl.off('click'); 12892 $nextEl.removeClass(swiper.params.navigation.disabledClass); 12893 } 12894 if ($prevEl && $prevEl.length) { 12895 $prevEl.off('click'); 12896 $prevEl.removeClass(swiper.params.navigation.disabledClass); 12897 } 12898 }, 12899}; 12900 12901var Navigation$1 = { 12902 name: 'navigation', 12903 params: { 12904 navigation: { 12905 nextEl: null, 12906 prevEl: null, 12907 12908 hideOnClick: false, 12909 disabledClass: 'swiper-button-disabled', 12910 hiddenClass: 'swiper-button-hidden', 12911 lockClass: 'swiper-button-lock', 12912 }, 12913 }, 12914 create() { 12915 const swiper = this; 12916 Utils.extend(swiper, { 12917 navigation: { 12918 init: Navigation.init.bind(swiper), 12919 update: Navigation.update.bind(swiper), 12920 destroy: Navigation.destroy.bind(swiper), 12921 }, 12922 }); 12923 }, 12924 on: { 12925 init() { 12926 const swiper = this; 12927 swiper.navigation.init(); 12928 swiper.navigation.update(); 12929 }, 12930 toEdge() { 12931 const swiper = this; 12932 swiper.navigation.update(); 12933 }, 12934 fromEdge() { 12935 const swiper = this; 12936 swiper.navigation.update(); 12937 }, 12938 destroy() { 12939 const swiper = this; 12940 swiper.navigation.destroy(); 12941 }, 12942 click(e) { 12943 const swiper = this; 12944 const { $nextEl, $prevEl } = swiper.navigation; 12945 if ( 12946 swiper.params.navigation.hideOnClick 12947 && !(0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).is($prevEl) 12948 && !(0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).is($nextEl) 12949 ) { 12950 if ($nextEl) $nextEl.toggleClass(swiper.params.navigation.hiddenClass); 12951 if ($prevEl) $prevEl.toggleClass(swiper.params.navigation.hiddenClass); 12952 } 12953 }, 12954 }, 12955}; 12956 12957const Pagination = { 12958 update() { 12959 // Render || Update Pagination bullets/items 12960 const swiper = this; 12961 const rtl = swiper.rtl; 12962 const params = swiper.params.pagination; 12963 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 12964 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 12965 const $el = swiper.pagination.$el; 12966 // Current/Total 12967 let current; 12968 const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 12969 if (swiper.params.loop) { 12970 current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); 12971 if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) { 12972 current -= (slidesLength - (swiper.loopedSlides * 2)); 12973 } 12974 if (current > total - 1) current -= total; 12975 if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; 12976 } else if (typeof swiper.snapIndex !== 'undefined') { 12977 current = swiper.snapIndex; 12978 } else { 12979 current = swiper.activeIndex || 0; 12980 } 12981 // Types 12982 if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { 12983 const bullets = swiper.pagination.bullets; 12984 let firstIndex; 12985 let lastIndex; 12986 let midIndex; 12987 if (params.dynamicBullets) { 12988 swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); 12989 $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`); 12990 if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { 12991 swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex); 12992 if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) { 12993 swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1; 12994 } else if (swiper.pagination.dynamicBulletIndex < 0) { 12995 swiper.pagination.dynamicBulletIndex = 0; 12996 } 12997 } 12998 firstIndex = current - swiper.pagination.dynamicBulletIndex; 12999 lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); 13000 midIndex = (lastIndex + firstIndex) / 2; 13001 } 13002 bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`); 13003 if ($el.length > 1) { 13004 bullets.each((index$$1, bullet) => { 13005 const $bullet = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(bullet); 13006 const bulletIndex = $bullet.index(); 13007 if (bulletIndex === current) { 13008 $bullet.addClass(params.bulletActiveClass); 13009 } 13010 if (params.dynamicBullets) { 13011 if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { 13012 $bullet.addClass(`${params.bulletActiveClass}-main`); 13013 } 13014 if (bulletIndex === firstIndex) { 13015 $bullet 13016 .prev() 13017 .addClass(`${params.bulletActiveClass}-prev`) 13018 .prev() 13019 .addClass(`${params.bulletActiveClass}-prev-prev`); 13020 } 13021 if (bulletIndex === lastIndex) { 13022 $bullet 13023 .next() 13024 .addClass(`${params.bulletActiveClass}-next`) 13025 .next() 13026 .addClass(`${params.bulletActiveClass}-next-next`); 13027 } 13028 } 13029 }); 13030 } else { 13031 const $bullet = bullets.eq(current); 13032 $bullet.addClass(params.bulletActiveClass); 13033 if (params.dynamicBullets) { 13034 const $firstDisplayedBullet = bullets.eq(firstIndex); 13035 const $lastDisplayedBullet = bullets.eq(lastIndex); 13036 for (let i = firstIndex; i <= lastIndex; i += 1) { 13037 bullets.eq(i).addClass(`${params.bulletActiveClass}-main`); 13038 } 13039 $firstDisplayedBullet 13040 .prev() 13041 .addClass(`${params.bulletActiveClass}-prev`) 13042 .prev() 13043 .addClass(`${params.bulletActiveClass}-prev-prev`); 13044 $lastDisplayedBullet 13045 .next() 13046 .addClass(`${params.bulletActiveClass}-next`) 13047 .next() 13048 .addClass(`${params.bulletActiveClass}-next-next`); 13049 } 13050 } 13051 if (params.dynamicBullets) { 13052 const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); 13053 const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize); 13054 const offsetProp = rtl ? 'right' : 'left'; 13055 bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`); 13056 } 13057 } 13058 if (params.type === 'fraction') { 13059 $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1)); 13060 $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total)); 13061 } 13062 if (params.type === 'progressbar') { 13063 let progressbarDirection; 13064 if (params.progressbarOpposite) { 13065 progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; 13066 } else { 13067 progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; 13068 } 13069 const scale = (current + 1) / total; 13070 let scaleX = 1; 13071 let scaleY = 1; 13072 if (progressbarDirection === 'horizontal') { 13073 scaleX = scale; 13074 } else { 13075 scaleY = scale; 13076 } 13077 $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed); 13078 } 13079 if (params.type === 'custom' && params.renderCustom) { 13080 $el.html(params.renderCustom(swiper, current + 1, total)); 13081 swiper.emit('paginationRender', swiper, $el[0]); 13082 } else { 13083 swiper.emit('paginationUpdate', swiper, $el[0]); 13084 } 13085 $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 13086 }, 13087 render() { 13088 // Render Container 13089 const swiper = this; 13090 const params = swiper.params.pagination; 13091 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 13092 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 13093 13094 const $el = swiper.pagination.$el; 13095 let paginationHTML = ''; 13096 if (params.type === 'bullets') { 13097 const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 13098 for (let i = 0; i < numberOfBullets; i += 1) { 13099 if (params.renderBullet) { 13100 paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); 13101 } else { 13102 paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`; 13103 } 13104 } 13105 $el.html(paginationHTML); 13106 swiper.pagination.bullets = $el.find(`.${params.bulletClass}`); 13107 } 13108 if (params.type === 'fraction') { 13109 if (params.renderFraction) { 13110 paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); 13111 } else { 13112 paginationHTML = `<span class="${params.currentClass}"></span>` 13113 + ' / ' 13114 + `<span class="${params.totalClass}"></span>`; 13115 } 13116 $el.html(paginationHTML); 13117 } 13118 if (params.type === 'progressbar') { 13119 if (params.renderProgressbar) { 13120 paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); 13121 } else { 13122 paginationHTML = `<span class="${params.progressbarFillClass}"></span>`; 13123 } 13124 $el.html(paginationHTML); 13125 } 13126 if (params.type !== 'custom') { 13127 swiper.emit('paginationRender', swiper.pagination.$el[0]); 13128 } 13129 }, 13130 init() { 13131 const swiper = this; 13132 const params = swiper.params.pagination; 13133 if (!params.el) return; 13134 13135 let $el = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(params.el); 13136 if ($el.length === 0) return; 13137 13138 if ( 13139 swiper.params.uniqueNavElements 13140 && typeof params.el === 'string' 13141 && $el.length > 1 13142 && swiper.$el.find(params.el).length === 1 13143 ) { 13144 $el = swiper.$el.find(params.el); 13145 } 13146 13147 if (params.type === 'bullets' && params.clickable) { 13148 $el.addClass(params.clickableClass); 13149 } 13150 13151 $el.addClass(params.modifierClass + params.type); 13152 13153 if (params.type === 'bullets' && params.dynamicBullets) { 13154 $el.addClass(`${params.modifierClass}${params.type}-dynamic`); 13155 swiper.pagination.dynamicBulletIndex = 0; 13156 if (params.dynamicMainBullets < 1) { 13157 params.dynamicMainBullets = 1; 13158 } 13159 } 13160 if (params.type === 'progressbar' && params.progressbarOpposite) { 13161 $el.addClass(params.progressbarOppositeClass); 13162 } 13163 13164 if (params.clickable) { 13165 $el.on('click', `.${params.bulletClass}`, function onClick(e) { 13166 e.preventDefault(); 13167 let index$$1 = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(this).index() * swiper.params.slidesPerGroup; 13168 if (swiper.params.loop) index$$1 += swiper.loopedSlides; 13169 swiper.slideTo(index$$1); 13170 }); 13171 } 13172 13173 Utils.extend(swiper.pagination, { 13174 $el, 13175 el: $el[0], 13176 }); 13177 }, 13178 destroy() { 13179 const swiper = this; 13180 const params = swiper.params.pagination; 13181 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 13182 const $el = swiper.pagination.$el; 13183 13184 $el.removeClass(params.hiddenClass); 13185 $el.removeClass(params.modifierClass + params.type); 13186 if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass); 13187 if (params.clickable) { 13188 $el.off('click', `.${params.bulletClass}`); 13189 } 13190 }, 13191}; 13192 13193var Pagination$1 = { 13194 name: 'pagination', 13195 params: { 13196 pagination: { 13197 el: null, 13198 bulletElement: 'span', 13199 clickable: false, 13200 hideOnClick: false, 13201 renderBullet: null, 13202 renderProgressbar: null, 13203 renderFraction: null, 13204 renderCustom: null, 13205 progressbarOpposite: false, 13206 type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom' 13207 dynamicBullets: false, 13208 dynamicMainBullets: 1, 13209 formatFractionCurrent: number => number, 13210 formatFractionTotal: number => number, 13211 bulletClass: 'swiper-pagination-bullet', 13212 bulletActiveClass: 'swiper-pagination-bullet-active', 13213 modifierClass: 'swiper-pagination-', // NEW 13214 currentClass: 'swiper-pagination-current', 13215 totalClass: 'swiper-pagination-total', 13216 hiddenClass: 'swiper-pagination-hidden', 13217 progressbarFillClass: 'swiper-pagination-progressbar-fill', 13218 progressbarOppositeClass: 'swiper-pagination-progressbar-opposite', 13219 clickableClass: 'swiper-pagination-clickable', // NEW 13220 lockClass: 'swiper-pagination-lock', 13221 }, 13222 }, 13223 create() { 13224 const swiper = this; 13225 Utils.extend(swiper, { 13226 pagination: { 13227 init: Pagination.init.bind(swiper), 13228 render: Pagination.render.bind(swiper), 13229 update: Pagination.update.bind(swiper), 13230 destroy: Pagination.destroy.bind(swiper), 13231 dynamicBulletIndex: 0, 13232 }, 13233 }); 13234 }, 13235 on: { 13236 init() { 13237 const swiper = this; 13238 swiper.pagination.init(); 13239 swiper.pagination.render(); 13240 swiper.pagination.update(); 13241 }, 13242 activeIndexChange() { 13243 const swiper = this; 13244 if (swiper.params.loop) { 13245 swiper.pagination.update(); 13246 } else if (typeof swiper.snapIndex === 'undefined') { 13247 swiper.pagination.update(); 13248 } 13249 }, 13250 snapIndexChange() { 13251 const swiper = this; 13252 if (!swiper.params.loop) { 13253 swiper.pagination.update(); 13254 } 13255 }, 13256 slidesLengthChange() { 13257 const swiper = this; 13258 if (swiper.params.loop) { 13259 swiper.pagination.render(); 13260 swiper.pagination.update(); 13261 } 13262 }, 13263 snapGridLengthChange() { 13264 const swiper = this; 13265 if (!swiper.params.loop) { 13266 swiper.pagination.render(); 13267 swiper.pagination.update(); 13268 } 13269 }, 13270 destroy() { 13271 const swiper = this; 13272 swiper.pagination.destroy(); 13273 }, 13274 click(e) { 13275 const swiper = this; 13276 if ( 13277 swiper.params.pagination.el 13278 && swiper.params.pagination.hideOnClick 13279 && swiper.pagination.$el.length > 0 13280 && !(0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).hasClass(swiper.params.pagination.bulletClass) 13281 ) { 13282 swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass); 13283 } 13284 }, 13285 }, 13286}; 13287 13288const Scrollbar = { 13289 setTranslate() { 13290 const swiper = this; 13291 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 13292 const { scrollbar, rtlTranslate: rtl, progress } = swiper; 13293 const { 13294 dragSize, trackSize, $dragEl, $el, 13295 } = scrollbar; 13296 const params = swiper.params.scrollbar; 13297 13298 let newSize = dragSize; 13299 let newPos = (trackSize - dragSize) * progress; 13300 if (rtl) { 13301 newPos = -newPos; 13302 if (newPos > 0) { 13303 newSize = dragSize - newPos; 13304 newPos = 0; 13305 } else if (-newPos + dragSize > trackSize) { 13306 newSize = trackSize + newPos; 13307 } 13308 } else if (newPos < 0) { 13309 newSize = dragSize + newPos; 13310 newPos = 0; 13311 } else if (newPos + dragSize > trackSize) { 13312 newSize = trackSize - newPos; 13313 } 13314 if (swiper.isHorizontal()) { 13315 if (Support.transforms3d) { 13316 $dragEl.transform(`translate3d(${newPos}px, 0, 0)`); 13317 } else { 13318 $dragEl.transform(`translateX(${newPos}px)`); 13319 } 13320 $dragEl[0].style.width = `${newSize}px`; 13321 } else { 13322 if (Support.transforms3d) { 13323 $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`); 13324 } else { 13325 $dragEl.transform(`translateY(${newPos}px)`); 13326 } 13327 $dragEl[0].style.height = `${newSize}px`; 13328 } 13329 if (params.hide) { 13330 clearTimeout(swiper.scrollbar.timeout); 13331 $el[0].style.opacity = 1; 13332 swiper.scrollbar.timeout = setTimeout(() => { 13333 $el[0].style.opacity = 0; 13334 $el.transition(400); 13335 }, 1000); 13336 } 13337 }, 13338 setTransition(duration) { 13339 const swiper = this; 13340 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 13341 swiper.scrollbar.$dragEl.transition(duration); 13342 }, 13343 updateSize() { 13344 const swiper = this; 13345 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 13346 13347 const { scrollbar } = swiper; 13348 const { $dragEl, $el } = scrollbar; 13349 13350 $dragEl[0].style.width = ''; 13351 $dragEl[0].style.height = ''; 13352 const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; 13353 13354 const divider = swiper.size / swiper.virtualSize; 13355 const moveDivider = divider * (trackSize / swiper.size); 13356 let dragSize; 13357 if (swiper.params.scrollbar.dragSize === 'auto') { 13358 dragSize = trackSize * divider; 13359 } else { 13360 dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); 13361 } 13362 13363 if (swiper.isHorizontal()) { 13364 $dragEl[0].style.width = `${dragSize}px`; 13365 } else { 13366 $dragEl[0].style.height = `${dragSize}px`; 13367 } 13368 13369 if (divider >= 1) { 13370 $el[0].style.display = 'none'; 13371 } else { 13372 $el[0].style.display = ''; 13373 } 13374 if (swiper.params.scrollbarHide) { 13375 $el[0].style.opacity = 0; 13376 } 13377 Utils.extend(scrollbar, { 13378 trackSize, 13379 divider, 13380 moveDivider, 13381 dragSize, 13382 }); 13383 scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); 13384 }, 13385 setDragPosition(e) { 13386 const swiper = this; 13387 const { scrollbar, rtlTranslate: rtl } = swiper; 13388 const { $el, dragSize, trackSize } = scrollbar; 13389 13390 let pointerPosition; 13391 if (swiper.isHorizontal()) { 13392 pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX); 13393 } else { 13394 pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY); 13395 } 13396 let positionRatio; 13397 positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize); 13398 positionRatio = Math.max(Math.min(positionRatio, 1), 0); 13399 if (rtl) { 13400 positionRatio = 1 - positionRatio; 13401 } 13402 13403 const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio); 13404 13405 swiper.updateProgress(position); 13406 swiper.setTranslate(position); 13407 swiper.updateActiveIndex(); 13408 swiper.updateSlidesClasses(); 13409 }, 13410 onDragStart(e) { 13411 const swiper = this; 13412 const params = swiper.params.scrollbar; 13413 const { scrollbar, $wrapperEl } = swiper; 13414 const { $el, $dragEl } = scrollbar; 13415 swiper.scrollbar.isTouched = true; 13416 e.preventDefault(); 13417 e.stopPropagation(); 13418 13419 $wrapperEl.transition(100); 13420 $dragEl.transition(100); 13421 scrollbar.setDragPosition(e); 13422 13423 clearTimeout(swiper.scrollbar.dragTimeout); 13424 13425 $el.transition(0); 13426 if (params.hide) { 13427 $el.css('opacity', 1); 13428 } 13429 swiper.emit('scrollbarDragStart', e); 13430 }, 13431 onDragMove(e) { 13432 const swiper = this; 13433 const { scrollbar, $wrapperEl } = swiper; 13434 const { $el, $dragEl } = scrollbar; 13435 13436 if (!swiper.scrollbar.isTouched) return; 13437 if (e.preventDefault) e.preventDefault(); 13438 else e.returnValue = false; 13439 scrollbar.setDragPosition(e); 13440 $wrapperEl.transition(0); 13441 $el.transition(0); 13442 $dragEl.transition(0); 13443 swiper.emit('scrollbarDragMove', e); 13444 }, 13445 onDragEnd(e) { 13446 const swiper = this; 13447 13448 const params = swiper.params.scrollbar; 13449 const { scrollbar } = swiper; 13450 const { $el } = scrollbar; 13451 13452 if (!swiper.scrollbar.isTouched) return; 13453 swiper.scrollbar.isTouched = false; 13454 if (params.hide) { 13455 clearTimeout(swiper.scrollbar.dragTimeout); 13456 swiper.scrollbar.dragTimeout = Utils.nextTick(() => { 13457 $el.css('opacity', 0); 13458 $el.transition(400); 13459 }, 1000); 13460 } 13461 swiper.emit('scrollbarDragEnd', e); 13462 if (params.snapOnRelease) { 13463 swiper.slideToClosest(); 13464 } 13465 }, 13466 enableDraggable() { 13467 const swiper = this; 13468 if (!swiper.params.scrollbar.el) return; 13469 const { 13470 scrollbar, touchEvents, touchEventsDesktop, params, 13471 } = swiper; 13472 const $el = scrollbar.$el; 13473 const target = $el[0]; 13474 const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; 13475 const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; 13476 if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { 13477 target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); 13478 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); 13479 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); 13480 } else { 13481 if (Support.touch) { 13482 target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener); 13483 target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener); 13484 target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener); 13485 } 13486 if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { 13487 target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener); 13488 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener); 13489 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener); 13490 } 13491 } 13492 }, 13493 disableDraggable() { 13494 const swiper = this; 13495 if (!swiper.params.scrollbar.el) return; 13496 const { 13497 scrollbar, touchEvents, touchEventsDesktop, params, 13498 } = swiper; 13499 const $el = scrollbar.$el; 13500 const target = $el[0]; 13501 const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; 13502 const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; 13503 if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { 13504 target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); 13505 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); 13506 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); 13507 } else { 13508 if (Support.touch) { 13509 target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener); 13510 target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener); 13511 target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener); 13512 } 13513 if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { 13514 target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener); 13515 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener); 13516 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener); 13517 } 13518 } 13519 }, 13520 init() { 13521 const swiper = this; 13522 if (!swiper.params.scrollbar.el) return; 13523 const { scrollbar, $el: $swiperEl } = swiper; 13524 const params = swiper.params.scrollbar; 13525 13526 let $el = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(params.el); 13527 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { 13528 $el = $swiperEl.find(params.el); 13529 } 13530 13531 let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`); 13532 if ($dragEl.length === 0) { 13533 $dragEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="${swiper.params.scrollbar.dragClass}"></div>`); 13534 $el.append($dragEl); 13535 } 13536 13537 Utils.extend(scrollbar, { 13538 $el, 13539 el: $el[0], 13540 $dragEl, 13541 dragEl: $dragEl[0], 13542 }); 13543 13544 if (params.draggable) { 13545 scrollbar.enableDraggable(); 13546 } 13547 }, 13548 destroy() { 13549 const swiper = this; 13550 swiper.scrollbar.disableDraggable(); 13551 }, 13552}; 13553 13554var Scrollbar$1 = { 13555 name: 'scrollbar', 13556 params: { 13557 scrollbar: { 13558 el: null, 13559 dragSize: 'auto', 13560 hide: false, 13561 draggable: false, 13562 snapOnRelease: true, 13563 lockClass: 'swiper-scrollbar-lock', 13564 dragClass: 'swiper-scrollbar-drag', 13565 }, 13566 }, 13567 create() { 13568 const swiper = this; 13569 Utils.extend(swiper, { 13570 scrollbar: { 13571 init: Scrollbar.init.bind(swiper), 13572 destroy: Scrollbar.destroy.bind(swiper), 13573 updateSize: Scrollbar.updateSize.bind(swiper), 13574 setTranslate: Scrollbar.setTranslate.bind(swiper), 13575 setTransition: Scrollbar.setTransition.bind(swiper), 13576 enableDraggable: Scrollbar.enableDraggable.bind(swiper), 13577 disableDraggable: Scrollbar.disableDraggable.bind(swiper), 13578 setDragPosition: Scrollbar.setDragPosition.bind(swiper), 13579 onDragStart: Scrollbar.onDragStart.bind(swiper), 13580 onDragMove: Scrollbar.onDragMove.bind(swiper), 13581 onDragEnd: Scrollbar.onDragEnd.bind(swiper), 13582 isTouched: false, 13583 timeout: null, 13584 dragTimeout: null, 13585 }, 13586 }); 13587 }, 13588 on: { 13589 init() { 13590 const swiper = this; 13591 swiper.scrollbar.init(); 13592 swiper.scrollbar.updateSize(); 13593 swiper.scrollbar.setTranslate(); 13594 }, 13595 update() { 13596 const swiper = this; 13597 swiper.scrollbar.updateSize(); 13598 }, 13599 resize() { 13600 const swiper = this; 13601 swiper.scrollbar.updateSize(); 13602 }, 13603 observerUpdate() { 13604 const swiper = this; 13605 swiper.scrollbar.updateSize(); 13606 }, 13607 setTranslate() { 13608 const swiper = this; 13609 swiper.scrollbar.setTranslate(); 13610 }, 13611 setTransition(duration) { 13612 const swiper = this; 13613 swiper.scrollbar.setTransition(duration); 13614 }, 13615 destroy() { 13616 const swiper = this; 13617 swiper.scrollbar.destroy(); 13618 }, 13619 }, 13620}; 13621 13622const Parallax = { 13623 setTransform(el, progress) { 13624 const swiper = this; 13625 const { rtl } = swiper; 13626 13627 const $el = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(el); 13628 const rtlFactor = rtl ? -1 : 1; 13629 13630 const p = $el.attr('data-swiper-parallax') || '0'; 13631 let x = $el.attr('data-swiper-parallax-x'); 13632 let y = $el.attr('data-swiper-parallax-y'); 13633 const scale = $el.attr('data-swiper-parallax-scale'); 13634 const opacity = $el.attr('data-swiper-parallax-opacity'); 13635 13636 if (x || y) { 13637 x = x || '0'; 13638 y = y || '0'; 13639 } else if (swiper.isHorizontal()) { 13640 x = p; 13641 y = '0'; 13642 } else { 13643 y = p; 13644 x = '0'; 13645 } 13646 13647 if ((x).indexOf('%') >= 0) { 13648 x = `${parseInt(x, 10) * progress * rtlFactor}%`; 13649 } else { 13650 x = `${x * progress * rtlFactor}px`; 13651 } 13652 if ((y).indexOf('%') >= 0) { 13653 y = `${parseInt(y, 10) * progress}%`; 13654 } else { 13655 y = `${y * progress}px`; 13656 } 13657 13658 if (typeof opacity !== 'undefined' && opacity !== null) { 13659 const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress))); 13660 $el[0].style.opacity = currentOpacity; 13661 } 13662 if (typeof scale === 'undefined' || scale === null) { 13663 $el.transform(`translate3d(${x}, ${y}, 0px)`); 13664 } else { 13665 const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress))); 13666 $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`); 13667 } 13668 }, 13669 setTranslate() { 13670 const swiper = this; 13671 const { 13672 $el, slides, progress, snapGrid, 13673 } = swiper; 13674 $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') 13675 .each((index$$1, el) => { 13676 swiper.parallax.setTransform(el, progress); 13677 }); 13678 slides.each((slideIndex, slideEl) => { 13679 let slideProgress = slideEl.progress; 13680 if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { 13681 slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1)); 13682 } 13683 slideProgress = Math.min(Math.max(slideProgress, -1), 1); 13684 (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') 13685 .each((index$$1, el) => { 13686 swiper.parallax.setTransform(el, slideProgress); 13687 }); 13688 }); 13689 }, 13690 setTransition(duration = this.params.speed) { 13691 const swiper = this; 13692 const { $el } = swiper; 13693 $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') 13694 .each((index$$1, parallaxEl) => { 13695 const $parallaxEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(parallaxEl); 13696 let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; 13697 if (duration === 0) parallaxDuration = 0; 13698 $parallaxEl.transition(parallaxDuration); 13699 }); 13700 }, 13701}; 13702 13703var Parallax$1 = { 13704 name: 'parallax', 13705 params: { 13706 parallax: { 13707 enabled: false, 13708 }, 13709 }, 13710 create() { 13711 const swiper = this; 13712 Utils.extend(swiper, { 13713 parallax: { 13714 setTransform: Parallax.setTransform.bind(swiper), 13715 setTranslate: Parallax.setTranslate.bind(swiper), 13716 setTransition: Parallax.setTransition.bind(swiper), 13717 }, 13718 }); 13719 }, 13720 on: { 13721 beforeInit() { 13722 const swiper = this; 13723 if (!swiper.params.parallax.enabled) return; 13724 swiper.params.watchSlidesProgress = true; 13725 }, 13726 init() { 13727 const swiper = this; 13728 if (!swiper.params.parallax) return; 13729 swiper.parallax.setTranslate(); 13730 }, 13731 setTranslate() { 13732 const swiper = this; 13733 if (!swiper.params.parallax) return; 13734 swiper.parallax.setTranslate(); 13735 }, 13736 setTransition(duration) { 13737 const swiper = this; 13738 if (!swiper.params.parallax) return; 13739 swiper.parallax.setTransition(duration); 13740 }, 13741 }, 13742}; 13743 13744const Zoom = { 13745 // Calc Scale From Multi-touches 13746 getDistanceBetweenTouches(e) { 13747 if (e.targetTouches.length < 2) return 1; 13748 const x1 = e.targetTouches[0].pageX; 13749 const y1 = e.targetTouches[0].pageY; 13750 const x2 = e.targetTouches[1].pageX; 13751 const y2 = e.targetTouches[1].pageY; 13752 const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2)); 13753 return distance; 13754 }, 13755 // Events 13756 onGestureStart(e) { 13757 const swiper = this; 13758 const params = swiper.params.zoom; 13759 const zoom = swiper.zoom; 13760 const { gesture } = zoom; 13761 zoom.fakeGestureTouched = false; 13762 zoom.fakeGestureMoved = false; 13763 if (!Support.gestures) { 13764 if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) { 13765 return; 13766 } 13767 zoom.fakeGestureTouched = true; 13768 gesture.scaleStart = Zoom.getDistanceBetweenTouches(e); 13769 } 13770 if (!gesture.$slideEl || !gesture.$slideEl.length) { 13771 gesture.$slideEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target).closest('.swiper-slide'); 13772 if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 13773 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); 13774 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 13775 gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 13776 if (gesture.$imageWrapEl.length === 0) { 13777 gesture.$imageEl = undefined; 13778 return; 13779 } 13780 } 13781 gesture.$imageEl.transition(0); 13782 swiper.zoom.isScaling = true; 13783 }, 13784 onGestureChange(e) { 13785 const swiper = this; 13786 const params = swiper.params.zoom; 13787 const zoom = swiper.zoom; 13788 const { gesture } = zoom; 13789 if (!Support.gestures) { 13790 if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) { 13791 return; 13792 } 13793 zoom.fakeGestureMoved = true; 13794 gesture.scaleMove = Zoom.getDistanceBetweenTouches(e); 13795 } 13796 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 13797 if (Support.gestures) { 13798 swiper.zoom.scale = e.scale * zoom.currentScale; 13799 } else { 13800 zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale; 13801 } 13802 if (zoom.scale > gesture.maxRatio) { 13803 zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5); 13804 } 13805 if (zoom.scale < params.minRatio) { 13806 zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5); 13807 } 13808 gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`); 13809 }, 13810 onGestureEnd(e) { 13811 const swiper = this; 13812 const params = swiper.params.zoom; 13813 const zoom = swiper.zoom; 13814 const { gesture } = zoom; 13815 if (!Support.gestures) { 13816 if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) { 13817 return; 13818 } 13819 if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) { 13820 return; 13821 } 13822 zoom.fakeGestureTouched = false; 13823 zoom.fakeGestureMoved = false; 13824 } 13825 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 13826 zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); 13827 gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`); 13828 zoom.currentScale = zoom.scale; 13829 zoom.isScaling = false; 13830 if (zoom.scale === 1) gesture.$slideEl = undefined; 13831 }, 13832 onTouchStart(e) { 13833 const swiper = this; 13834 const zoom = swiper.zoom; 13835 const { gesture, image } = zoom; 13836 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 13837 if (image.isTouched) return; 13838 if (Device.android) e.preventDefault(); 13839 image.isTouched = true; 13840 image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 13841 image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 13842 }, 13843 onTouchMove(e) { 13844 const swiper = this; 13845 const zoom = swiper.zoom; 13846 const { gesture, image, velocity } = zoom; 13847 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 13848 swiper.allowClick = false; 13849 if (!image.isTouched || !gesture.$slideEl) return; 13850 13851 if (!image.isMoved) { 13852 image.width = gesture.$imageEl[0].offsetWidth; 13853 image.height = gesture.$imageEl[0].offsetHeight; 13854 image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0; 13855 image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0; 13856 gesture.slideWidth = gesture.$slideEl[0].offsetWidth; 13857 gesture.slideHeight = gesture.$slideEl[0].offsetHeight; 13858 gesture.$imageWrapEl.transition(0); 13859 if (swiper.rtl) { 13860 image.startX = -image.startX; 13861 image.startY = -image.startY; 13862 } 13863 } 13864 // Define if we need image drag 13865 const scaledWidth = image.width * zoom.scale; 13866 const scaledHeight = image.height * zoom.scale; 13867 13868 if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; 13869 13870 image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); 13871 image.maxX = -image.minX; 13872 image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); 13873 image.maxY = -image.minY; 13874 13875 image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; 13876 image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; 13877 13878 if (!image.isMoved && !zoom.isScaling) { 13879 if ( 13880 swiper.isHorizontal() 13881 && ( 13882 (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) 13883 || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x) 13884 ) 13885 ) { 13886 image.isTouched = false; 13887 return; 13888 } if ( 13889 !swiper.isHorizontal() 13890 && ( 13891 (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) 13892 || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y) 13893 ) 13894 ) { 13895 image.isTouched = false; 13896 return; 13897 } 13898 } 13899 e.preventDefault(); 13900 e.stopPropagation(); 13901 13902 image.isMoved = true; 13903 image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX; 13904 image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY; 13905 13906 if (image.currentX < image.minX) { 13907 image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8); 13908 } 13909 if (image.currentX > image.maxX) { 13910 image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8); 13911 } 13912 13913 if (image.currentY < image.minY) { 13914 image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8); 13915 } 13916 if (image.currentY > image.maxY) { 13917 image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8); 13918 } 13919 13920 // Velocity 13921 if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; 13922 if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; 13923 if (!velocity.prevTime) velocity.prevTime = Date.now(); 13924 velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; 13925 velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; 13926 if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; 13927 if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; 13928 velocity.prevPositionX = image.touchesCurrent.x; 13929 velocity.prevPositionY = image.touchesCurrent.y; 13930 velocity.prevTime = Date.now(); 13931 13932 gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); 13933 }, 13934 onTouchEnd() { 13935 const swiper = this; 13936 const zoom = swiper.zoom; 13937 const { gesture, image, velocity } = zoom; 13938 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 13939 if (!image.isTouched || !image.isMoved) { 13940 image.isTouched = false; 13941 image.isMoved = false; 13942 return; 13943 } 13944 image.isTouched = false; 13945 image.isMoved = false; 13946 let momentumDurationX = 300; 13947 let momentumDurationY = 300; 13948 const momentumDistanceX = velocity.x * momentumDurationX; 13949 const newPositionX = image.currentX + momentumDistanceX; 13950 const momentumDistanceY = velocity.y * momentumDurationY; 13951 const newPositionY = image.currentY + momentumDistanceY; 13952 13953 // Fix duration 13954 if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); 13955 if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); 13956 const momentumDuration = Math.max(momentumDurationX, momentumDurationY); 13957 13958 image.currentX = newPositionX; 13959 image.currentY = newPositionY; 13960 13961 // Define if we need image drag 13962 const scaledWidth = image.width * zoom.scale; 13963 const scaledHeight = image.height * zoom.scale; 13964 image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); 13965 image.maxX = -image.minX; 13966 image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); 13967 image.maxY = -image.minY; 13968 image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); 13969 image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); 13970 13971 gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); 13972 }, 13973 onTransitionEnd() { 13974 const swiper = this; 13975 const zoom = swiper.zoom; 13976 const { gesture } = zoom; 13977 if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { 13978 gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); 13979 gesture.$imageWrapEl.transform('translate3d(0,0,0)'); 13980 gesture.$slideEl = undefined; 13981 gesture.$imageEl = undefined; 13982 gesture.$imageWrapEl = undefined; 13983 13984 zoom.scale = 1; 13985 zoom.currentScale = 1; 13986 } 13987 }, 13988 // Toggle Zoom 13989 toggle(e) { 13990 const swiper = this; 13991 const zoom = swiper.zoom; 13992 13993 if (zoom.scale && zoom.scale !== 1) { 13994 // Zoom Out 13995 zoom.out(); 13996 } else { 13997 // Zoom In 13998 zoom.in(e); 13999 } 14000 }, 14001 in(e) { 14002 const swiper = this; 14003 14004 const zoom = swiper.zoom; 14005 const params = swiper.params.zoom; 14006 const { gesture, image } = zoom; 14007 14008 if (!gesture.$slideEl) { 14009 gesture.$slideEl = swiper.clickedSlide ? (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); 14010 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); 14011 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 14012 } 14013 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 14014 14015 gesture.$slideEl.addClass(`${params.zoomedSlideClass}`); 14016 14017 let touchX; 14018 let touchY; 14019 let offsetX; 14020 let offsetY; 14021 let diffX; 14022 let diffY; 14023 let translateX; 14024 let translateY; 14025 let imageWidth; 14026 let imageHeight; 14027 let scaledWidth; 14028 let scaledHeight; 14029 let translateMinX; 14030 let translateMinY; 14031 let translateMaxX; 14032 let translateMaxY; 14033 let slideWidth; 14034 let slideHeight; 14035 14036 if (typeof image.touchesStart.x === 'undefined' && e) { 14037 touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; 14038 touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; 14039 } else { 14040 touchX = image.touchesStart.x; 14041 touchY = image.touchesStart.y; 14042 } 14043 14044 zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 14045 zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 14046 if (e) { 14047 slideWidth = gesture.$slideEl[0].offsetWidth; 14048 slideHeight = gesture.$slideEl[0].offsetHeight; 14049 offsetX = gesture.$slideEl.offset().left; 14050 offsetY = gesture.$slideEl.offset().top; 14051 diffX = (offsetX + (slideWidth / 2)) - touchX; 14052 diffY = (offsetY + (slideHeight / 2)) - touchY; 14053 14054 imageWidth = gesture.$imageEl[0].offsetWidth; 14055 imageHeight = gesture.$imageEl[0].offsetHeight; 14056 scaledWidth = imageWidth * zoom.scale; 14057 scaledHeight = imageHeight * zoom.scale; 14058 14059 translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0); 14060 translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0); 14061 translateMaxX = -translateMinX; 14062 translateMaxY = -translateMinY; 14063 14064 translateX = diffX * zoom.scale; 14065 translateY = diffY * zoom.scale; 14066 14067 if (translateX < translateMinX) { 14068 translateX = translateMinX; 14069 } 14070 if (translateX > translateMaxX) { 14071 translateX = translateMaxX; 14072 } 14073 14074 if (translateY < translateMinY) { 14075 translateY = translateMinY; 14076 } 14077 if (translateY > translateMaxY) { 14078 translateY = translateMaxY; 14079 } 14080 } else { 14081 translateX = 0; 14082 translateY = 0; 14083 } 14084 gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`); 14085 gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`); 14086 }, 14087 out() { 14088 const swiper = this; 14089 14090 const zoom = swiper.zoom; 14091 const params = swiper.params.zoom; 14092 const { gesture } = zoom; 14093 14094 if (!gesture.$slideEl) { 14095 gesture.$slideEl = swiper.clickedSlide ? (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); 14096 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); 14097 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 14098 } 14099 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 14100 14101 zoom.scale = 1; 14102 zoom.currentScale = 1; 14103 gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); 14104 gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); 14105 gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`); 14106 gesture.$slideEl = undefined; 14107 }, 14108 // Attach/Detach Events 14109 enable() { 14110 const swiper = this; 14111 const zoom = swiper.zoom; 14112 if (zoom.enabled) return; 14113 zoom.enabled = true; 14114 14115 const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; 14116 14117 // Scale image 14118 if (Support.gestures) { 14119 swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); 14120 swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); 14121 swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); 14122 } else if (swiper.touchEvents.start === 'touchstart') { 14123 swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); 14124 swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener); 14125 swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); 14126 } 14127 14128 // Move image 14129 swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove); 14130 }, 14131 disable() { 14132 const swiper = this; 14133 const zoom = swiper.zoom; 14134 if (!zoom.enabled) return; 14135 14136 swiper.zoom.enabled = false; 14137 14138 const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; 14139 14140 // Scale image 14141 if (Support.gestures) { 14142 swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); 14143 swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); 14144 swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); 14145 } else if (swiper.touchEvents.start === 'touchstart') { 14146 swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); 14147 swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener); 14148 swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); 14149 } 14150 14151 // Move image 14152 swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove); 14153 }, 14154}; 14155 14156var Zoom$1 = { 14157 name: 'zoom', 14158 params: { 14159 zoom: { 14160 enabled: false, 14161 maxRatio: 3, 14162 minRatio: 1, 14163 toggle: true, 14164 containerClass: 'swiper-zoom-container', 14165 zoomedSlideClass: 'swiper-slide-zoomed', 14166 }, 14167 }, 14168 create() { 14169 const swiper = this; 14170 const zoom = { 14171 enabled: false, 14172 scale: 1, 14173 currentScale: 1, 14174 isScaling: false, 14175 gesture: { 14176 $slideEl: undefined, 14177 slideWidth: undefined, 14178 slideHeight: undefined, 14179 $imageEl: undefined, 14180 $imageWrapEl: undefined, 14181 maxRatio: 3, 14182 }, 14183 image: { 14184 isTouched: undefined, 14185 isMoved: undefined, 14186 currentX: undefined, 14187 currentY: undefined, 14188 minX: undefined, 14189 minY: undefined, 14190 maxX: undefined, 14191 maxY: undefined, 14192 width: undefined, 14193 height: undefined, 14194 startX: undefined, 14195 startY: undefined, 14196 touchesStart: {}, 14197 touchesCurrent: {}, 14198 }, 14199 velocity: { 14200 x: undefined, 14201 y: undefined, 14202 prevPositionX: undefined, 14203 prevPositionY: undefined, 14204 prevTime: undefined, 14205 }, 14206 }; 14207 ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => { 14208 zoom[methodName] = Zoom[methodName].bind(swiper); 14209 }); 14210 Utils.extend(swiper, { 14211 zoom, 14212 }); 14213 }, 14214 on: { 14215 init() { 14216 const swiper = this; 14217 if (swiper.params.zoom.enabled) { 14218 swiper.zoom.enable(); 14219 } 14220 }, 14221 destroy() { 14222 const swiper = this; 14223 swiper.zoom.disable(); 14224 }, 14225 touchStart(e) { 14226 const swiper = this; 14227 if (!swiper.zoom.enabled) return; 14228 swiper.zoom.onTouchStart(e); 14229 }, 14230 touchEnd(e) { 14231 const swiper = this; 14232 if (!swiper.zoom.enabled) return; 14233 swiper.zoom.onTouchEnd(e); 14234 }, 14235 doubleTap(e) { 14236 const swiper = this; 14237 if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { 14238 swiper.zoom.toggle(e); 14239 } 14240 }, 14241 transitionEnd() { 14242 const swiper = this; 14243 if (swiper.zoom.enabled && swiper.params.zoom.enabled) { 14244 swiper.zoom.onTransitionEnd(); 14245 } 14246 }, 14247 }, 14248}; 14249 14250const Lazy = { 14251 loadInSlide(index$$1, loadInDuplicate = true) { 14252 const swiper = this; 14253 const params = swiper.params.lazy; 14254 if (typeof index$$1 === 'undefined') return; 14255 if (swiper.slides.length === 0) return; 14256 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 14257 14258 const $slideEl = isVirtual 14259 ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index$$1}"]`) 14260 : swiper.slides.eq(index$$1); 14261 14262 let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`); 14263 if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { 14264 $images = $images.add($slideEl[0]); 14265 } 14266 if ($images.length === 0) return; 14267 14268 $images.each((imageIndex, imageEl) => { 14269 const $imageEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(imageEl); 14270 $imageEl.addClass(params.loadingClass); 14271 14272 const background = $imageEl.attr('data-background'); 14273 const src = $imageEl.attr('data-src'); 14274 const srcset = $imageEl.attr('data-srcset'); 14275 const sizes = $imageEl.attr('data-sizes'); 14276 14277 swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => { 14278 if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return; 14279 if (background) { 14280 $imageEl.css('background-image', `url("${background}")`); 14281 $imageEl.removeAttr('data-background'); 14282 } else { 14283 if (srcset) { 14284 $imageEl.attr('srcset', srcset); 14285 $imageEl.removeAttr('data-srcset'); 14286 } 14287 if (sizes) { 14288 $imageEl.attr('sizes', sizes); 14289 $imageEl.removeAttr('data-sizes'); 14290 } 14291 if (src) { 14292 $imageEl.attr('src', src); 14293 $imageEl.removeAttr('data-src'); 14294 } 14295 } 14296 14297 $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); 14298 $slideEl.find(`.${params.preloaderClass}`).remove(); 14299 if (swiper.params.loop && loadInDuplicate) { 14300 const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); 14301 if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { 14302 const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`); 14303 swiper.lazy.loadInSlide(originalSlide.index(), false); 14304 } else { 14305 const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`); 14306 swiper.lazy.loadInSlide(duplicatedSlide.index(), false); 14307 } 14308 } 14309 swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]); 14310 }); 14311 14312 swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]); 14313 }); 14314 }, 14315 load() { 14316 const swiper = this; 14317 const { 14318 $wrapperEl, params: swiperParams, slides, activeIndex, 14319 } = swiper; 14320 const isVirtual = swiper.virtual && swiperParams.virtual.enabled; 14321 const params = swiperParams.lazy; 14322 14323 let slidesPerView = swiperParams.slidesPerView; 14324 if (slidesPerView === 'auto') { 14325 slidesPerView = 0; 14326 } 14327 14328 function slideExist(index$$1) { 14329 if (isVirtual) { 14330 if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index$$1}"]`).length) { 14331 return true; 14332 } 14333 } else if (slides[index$$1]) return true; 14334 return false; 14335 } 14336 function slideIndex(slideEl) { 14337 if (isVirtual) { 14338 return (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slideEl).attr('data-swiper-slide-index'); 14339 } 14340 return (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slideEl).index(); 14341 } 14342 14343 if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true; 14344 if (swiper.params.watchSlidesVisibility) { 14345 $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => { 14346 const index$$1 = isVirtual ? (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slideEl).attr('data-swiper-slide-index') : (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(slideEl).index(); 14347 swiper.lazy.loadInSlide(index$$1); 14348 }); 14349 } else if (slidesPerView > 1) { 14350 for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) { 14351 if (slideExist(i)) swiper.lazy.loadInSlide(i); 14352 } 14353 } else { 14354 swiper.lazy.loadInSlide(activeIndex); 14355 } 14356 if (params.loadPrevNext) { 14357 if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) { 14358 const amount = params.loadPrevNextAmount; 14359 const spv = slidesPerView; 14360 const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); 14361 const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); 14362 // Next Slides 14363 for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) { 14364 if (slideExist(i)) swiper.lazy.loadInSlide(i); 14365 } 14366 // Prev Slides 14367 for (let i = minIndex; i < activeIndex; i += 1) { 14368 if (slideExist(i)) swiper.lazy.loadInSlide(i); 14369 } 14370 } else { 14371 const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`); 14372 if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide)); 14373 14374 const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`); 14375 if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide)); 14376 } 14377 } 14378 }, 14379}; 14380 14381var Lazy$1 = { 14382 name: 'lazy', 14383 params: { 14384 lazy: { 14385 enabled: false, 14386 loadPrevNext: false, 14387 loadPrevNextAmount: 1, 14388 loadOnTransitionStart: false, 14389 14390 elementClass: 'swiper-lazy', 14391 loadingClass: 'swiper-lazy-loading', 14392 loadedClass: 'swiper-lazy-loaded', 14393 preloaderClass: 'swiper-lazy-preloader', 14394 }, 14395 }, 14396 create() { 14397 const swiper = this; 14398 Utils.extend(swiper, { 14399 lazy: { 14400 initialImageLoaded: false, 14401 load: Lazy.load.bind(swiper), 14402 loadInSlide: Lazy.loadInSlide.bind(swiper), 14403 }, 14404 }); 14405 }, 14406 on: { 14407 beforeInit() { 14408 const swiper = this; 14409 if (swiper.params.lazy.enabled && swiper.params.preloadImages) { 14410 swiper.params.preloadImages = false; 14411 } 14412 }, 14413 init() { 14414 const swiper = this; 14415 if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) { 14416 swiper.lazy.load(); 14417 } 14418 }, 14419 scroll() { 14420 const swiper = this; 14421 if (swiper.params.freeMode && !swiper.params.freeModeSticky) { 14422 swiper.lazy.load(); 14423 } 14424 }, 14425 resize() { 14426 const swiper = this; 14427 if (swiper.params.lazy.enabled) { 14428 swiper.lazy.load(); 14429 } 14430 }, 14431 scrollbarDragMove() { 14432 const swiper = this; 14433 if (swiper.params.lazy.enabled) { 14434 swiper.lazy.load(); 14435 } 14436 }, 14437 transitionStart() { 14438 const swiper = this; 14439 if (swiper.params.lazy.enabled) { 14440 if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) { 14441 swiper.lazy.load(); 14442 } 14443 } 14444 }, 14445 transitionEnd() { 14446 const swiper = this; 14447 if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { 14448 swiper.lazy.load(); 14449 } 14450 }, 14451 }, 14452}; 14453 14454/* eslint no-bitwise: ["error", { "allow": [">>"] }] */ 14455 14456const Controller = { 14457 LinearSpline: function LinearSpline(x, y) { 14458 const binarySearch = (function search() { 14459 let maxIndex; 14460 let minIndex; 14461 let guess; 14462 return (array, val) => { 14463 minIndex = -1; 14464 maxIndex = array.length; 14465 while (maxIndex - minIndex > 1) { 14466 guess = maxIndex + minIndex >> 1; 14467 if (array[guess] <= val) { 14468 minIndex = guess; 14469 } else { 14470 maxIndex = guess; 14471 } 14472 } 14473 return maxIndex; 14474 }; 14475 }()); 14476 this.x = x; 14477 this.y = y; 14478 this.lastIndex = x.length - 1; 14479 // Given an x value (x2), return the expected y2 value: 14480 // (x1,y1) is the known point before given value, 14481 // (x3,y3) is the known point after given value. 14482 let i1; 14483 let i3; 14484 14485 this.interpolate = function interpolate(x2) { 14486 if (!x2) return 0; 14487 14488 // Get the indexes of x1 and x3 (the array indexes before and after given x2): 14489 i3 = binarySearch(this.x, x2); 14490 i1 = i3 - 1; 14491 14492 // We have our indexes i1 & i3, so we can calculate already: 14493 // y2 := ((x2âx1) à (y3ây1)) ÷ (x3âx1) + y1 14494 return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1]; 14495 }; 14496 return this; 14497 }, 14498 // xxx: for now i will just save one spline function to to 14499 getInterpolateFunction(c) { 14500 const swiper = this; 14501 if (!swiper.controller.spline) { 14502 swiper.controller.spline = swiper.params.loop 14503 ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) 14504 : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid); 14505 } 14506 }, 14507 setTranslate(setTranslate, byController) { 14508 const swiper = this; 14509 const controlled = swiper.controller.control; 14510 let multiplier; 14511 let controlledTranslate; 14512 function setControlledTranslate(c) { 14513 // this will create an Interpolate function based on the snapGrids 14514 // x is the Grid of the scrolled scroller and y will be the controlled scroller 14515 // it makes sense to create this only once and recall it for the interpolation 14516 // the function does a lot of value caching for performance 14517 const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; 14518 if (swiper.params.controller.by === 'slide') { 14519 swiper.controller.getInterpolateFunction(c); 14520 // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid 14521 // but it did not work out 14522 controlledTranslate = -swiper.controller.spline.interpolate(-translate); 14523 } 14524 14525 if (!controlledTranslate || swiper.params.controller.by === 'container') { 14526 multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); 14527 controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate(); 14528 } 14529 14530 if (swiper.params.controller.inverse) { 14531 controlledTranslate = c.maxTranslate() - controlledTranslate; 14532 } 14533 c.updateProgress(controlledTranslate); 14534 c.setTranslate(controlledTranslate, swiper); 14535 c.updateActiveIndex(); 14536 c.updateSlidesClasses(); 14537 } 14538 if (Array.isArray(controlled)) { 14539 for (let i = 0; i < controlled.length; i += 1) { 14540 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 14541 setControlledTranslate(controlled[i]); 14542 } 14543 } 14544 } else if (controlled instanceof Swiper && byController !== controlled) { 14545 setControlledTranslate(controlled); 14546 } 14547 }, 14548 setTransition(duration, byController) { 14549 const swiper = this; 14550 const controlled = swiper.controller.control; 14551 let i; 14552 function setControlledTransition(c) { 14553 c.setTransition(duration, swiper); 14554 if (duration !== 0) { 14555 c.transitionStart(); 14556 if (c.params.autoHeight) { 14557 Utils.nextTick(() => { 14558 c.updateAutoHeight(); 14559 }); 14560 } 14561 c.$wrapperEl.transitionEnd(() => { 14562 if (!controlled) return; 14563 if (c.params.loop && swiper.params.controller.by === 'slide') { 14564 c.loopFix(); 14565 } 14566 c.transitionEnd(); 14567 }); 14568 } 14569 } 14570 if (Array.isArray(controlled)) { 14571 for (i = 0; i < controlled.length; i += 1) { 14572 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 14573 setControlledTransition(controlled[i]); 14574 } 14575 } 14576 } else if (controlled instanceof Swiper && byController !== controlled) { 14577 setControlledTransition(controlled); 14578 } 14579 }, 14580}; 14581var Controller$1 = { 14582 name: 'controller', 14583 params: { 14584 controller: { 14585 control: undefined, 14586 inverse: false, 14587 by: 'slide', // or 'container' 14588 }, 14589 }, 14590 create() { 14591 const swiper = this; 14592 Utils.extend(swiper, { 14593 controller: { 14594 control: swiper.params.controller.control, 14595 getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper), 14596 setTranslate: Controller.setTranslate.bind(swiper), 14597 setTransition: Controller.setTransition.bind(swiper), 14598 }, 14599 }); 14600 }, 14601 on: { 14602 update() { 14603 const swiper = this; 14604 if (!swiper.controller.control) return; 14605 if (swiper.controller.spline) { 14606 swiper.controller.spline = undefined; 14607 delete swiper.controller.spline; 14608 } 14609 }, 14610 resize() { 14611 const swiper = this; 14612 if (!swiper.controller.control) return; 14613 if (swiper.controller.spline) { 14614 swiper.controller.spline = undefined; 14615 delete swiper.controller.spline; 14616 } 14617 }, 14618 observerUpdate() { 14619 const swiper = this; 14620 if (!swiper.controller.control) return; 14621 if (swiper.controller.spline) { 14622 swiper.controller.spline = undefined; 14623 delete swiper.controller.spline; 14624 } 14625 }, 14626 setTranslate(translate, byController) { 14627 const swiper = this; 14628 if (!swiper.controller.control) return; 14629 swiper.controller.setTranslate(translate, byController); 14630 }, 14631 setTransition(duration, byController) { 14632 const swiper = this; 14633 if (!swiper.controller.control) return; 14634 swiper.controller.setTransition(duration, byController); 14635 }, 14636 }, 14637}; 14638 14639const a11y = { 14640 makeElFocusable($el) { 14641 $el.attr('tabIndex', '0'); 14642 return $el; 14643 }, 14644 addElRole($el, role) { 14645 $el.attr('role', role); 14646 return $el; 14647 }, 14648 addElLabel($el, label) { 14649 $el.attr('aria-label', label); 14650 return $el; 14651 }, 14652 disableEl($el) { 14653 $el.attr('aria-disabled', true); 14654 return $el; 14655 }, 14656 enableEl($el) { 14657 $el.attr('aria-disabled', false); 14658 return $el; 14659 }, 14660 onEnterKey(e) { 14661 const swiper = this; 14662 const params = swiper.params.a11y; 14663 if (e.keyCode !== 13) return; 14664 const $targetEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(e.target); 14665 if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { 14666 if (!(swiper.isEnd && !swiper.params.loop)) { 14667 swiper.slideNext(); 14668 } 14669 if (swiper.isEnd) { 14670 swiper.a11y.notify(params.lastSlideMessage); 14671 } else { 14672 swiper.a11y.notify(params.nextSlideMessage); 14673 } 14674 } 14675 if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { 14676 if (!(swiper.isBeginning && !swiper.params.loop)) { 14677 swiper.slidePrev(); 14678 } 14679 if (swiper.isBeginning) { 14680 swiper.a11y.notify(params.firstSlideMessage); 14681 } else { 14682 swiper.a11y.notify(params.prevSlideMessage); 14683 } 14684 } 14685 if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) { 14686 $targetEl[0].click(); 14687 } 14688 }, 14689 notify(message) { 14690 const swiper = this; 14691 const notification = swiper.a11y.liveRegion; 14692 if (notification.length === 0) return; 14693 notification.html(''); 14694 notification.html(message); 14695 }, 14696 updateNavigation() { 14697 const swiper = this; 14698 14699 if (swiper.params.loop) return; 14700 const { $nextEl, $prevEl } = swiper.navigation; 14701 14702 if ($prevEl && $prevEl.length > 0) { 14703 if (swiper.isBeginning) { 14704 swiper.a11y.disableEl($prevEl); 14705 } else { 14706 swiper.a11y.enableEl($prevEl); 14707 } 14708 } 14709 if ($nextEl && $nextEl.length > 0) { 14710 if (swiper.isEnd) { 14711 swiper.a11y.disableEl($nextEl); 14712 } else { 14713 swiper.a11y.enableEl($nextEl); 14714 } 14715 } 14716 }, 14717 updatePagination() { 14718 const swiper = this; 14719 const params = swiper.params.a11y; 14720 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 14721 swiper.pagination.bullets.each((bulletIndex, bulletEl) => { 14722 const $bulletEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(bulletEl); 14723 swiper.a11y.makeElFocusable($bulletEl); 14724 swiper.a11y.addElRole($bulletEl, 'button'); 14725 swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1)); 14726 }); 14727 } 14728 }, 14729 init() { 14730 const swiper = this; 14731 14732 swiper.$el.append(swiper.a11y.liveRegion); 14733 14734 // Navigation 14735 const params = swiper.params.a11y; 14736 let $nextEl; 14737 let $prevEl; 14738 if (swiper.navigation && swiper.navigation.$nextEl) { 14739 $nextEl = swiper.navigation.$nextEl; 14740 } 14741 if (swiper.navigation && swiper.navigation.$prevEl) { 14742 $prevEl = swiper.navigation.$prevEl; 14743 } 14744 if ($nextEl) { 14745 swiper.a11y.makeElFocusable($nextEl); 14746 swiper.a11y.addElRole($nextEl, 'button'); 14747 swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); 14748 $nextEl.on('keydown', swiper.a11y.onEnterKey); 14749 } 14750 if ($prevEl) { 14751 swiper.a11y.makeElFocusable($prevEl); 14752 swiper.a11y.addElRole($prevEl, 'button'); 14753 swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); 14754 $prevEl.on('keydown', swiper.a11y.onEnterKey); 14755 } 14756 14757 // Pagination 14758 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 14759 swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey); 14760 } 14761 }, 14762 destroy() { 14763 const swiper = this; 14764 if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove(); 14765 14766 let $nextEl; 14767 let $prevEl; 14768 if (swiper.navigation && swiper.navigation.$nextEl) { 14769 $nextEl = swiper.navigation.$nextEl; 14770 } 14771 if (swiper.navigation && swiper.navigation.$prevEl) { 14772 $prevEl = swiper.navigation.$prevEl; 14773 } 14774 if ($nextEl) { 14775 $nextEl.off('keydown', swiper.a11y.onEnterKey); 14776 } 14777 if ($prevEl) { 14778 $prevEl.off('keydown', swiper.a11y.onEnterKey); 14779 } 14780 14781 // Pagination 14782 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 14783 swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey); 14784 } 14785 }, 14786}; 14787var A11y = { 14788 name: 'a11y', 14789 params: { 14790 a11y: { 14791 enabled: true, 14792 notificationClass: 'swiper-notification', 14793 prevSlideMessage: 'Previous slide', 14794 nextSlideMessage: 'Next slide', 14795 firstSlideMessage: 'This is the first slide', 14796 lastSlideMessage: 'This is the last slide', 14797 paginationBulletMessage: 'Go to slide {{index}}', 14798 }, 14799 }, 14800 create() { 14801 const swiper = this; 14802 Utils.extend(swiper, { 14803 a11y: { 14804 liveRegion: (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`), 14805 }, 14806 }); 14807 Object.keys(a11y).forEach((methodName) => { 14808 swiper.a11y[methodName] = a11y[methodName].bind(swiper); 14809 }); 14810 }, 14811 on: { 14812 init() { 14813 const swiper = this; 14814 if (!swiper.params.a11y.enabled) return; 14815 swiper.a11y.init(); 14816 swiper.a11y.updateNavigation(); 14817 }, 14818 toEdge() { 14819 const swiper = this; 14820 if (!swiper.params.a11y.enabled) return; 14821 swiper.a11y.updateNavigation(); 14822 }, 14823 fromEdge() { 14824 const swiper = this; 14825 if (!swiper.params.a11y.enabled) return; 14826 swiper.a11y.updateNavigation(); 14827 }, 14828 paginationUpdate() { 14829 const swiper = this; 14830 if (!swiper.params.a11y.enabled) return; 14831 swiper.a11y.updatePagination(); 14832 }, 14833 destroy() { 14834 const swiper = this; 14835 if (!swiper.params.a11y.enabled) return; 14836 swiper.a11y.destroy(); 14837 }, 14838 }, 14839}; 14840 14841const History = { 14842 init() { 14843 const swiper = this; 14844 if (!swiper.params.history) return; 14845 if (!ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history || !ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.pushState) { 14846 swiper.params.history.enabled = false; 14847 swiper.params.hashNavigation.enabled = true; 14848 return; 14849 } 14850 const history = swiper.history; 14851 history.initialized = true; 14852 history.paths = History.getPathValues(); 14853 if (!history.paths.key && !history.paths.value) return; 14854 history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit); 14855 if (!swiper.params.history.replaceState) { 14856 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.addEventListener('popstate', swiper.history.setHistoryPopState); 14857 } 14858 }, 14859 destroy() { 14860 const swiper = this; 14861 if (!swiper.params.history.replaceState) { 14862 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.removeEventListener('popstate', swiper.history.setHistoryPopState); 14863 } 14864 }, 14865 setHistoryPopState() { 14866 const swiper = this; 14867 swiper.history.paths = History.getPathValues(); 14868 swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false); 14869 }, 14870 getPathValues() { 14871 const pathArray = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.location.pathname.slice(1).split('/').filter(part => part !== ''); 14872 const total = pathArray.length; 14873 const key = pathArray[total - 2]; 14874 const value = pathArray[total - 1]; 14875 return { key, value }; 14876 }, 14877 setHistory(key, index$$1) { 14878 const swiper = this; 14879 if (!swiper.history.initialized || !swiper.params.history.enabled) return; 14880 const slide = swiper.slides.eq(index$$1); 14881 let value = History.slugify(slide.attr('data-history')); 14882 if (!ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.location.pathname.includes(key)) { 14883 value = `${key}/${value}`; 14884 } 14885 const currentState = ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.state; 14886 if (currentState && currentState.value === value) { 14887 return; 14888 } 14889 if (swiper.params.history.replaceState) { 14890 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.replaceState({ value }, null, value); 14891 } else { 14892 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.pushState({ value }, null, value); 14893 } 14894 }, 14895 slugify(text$$1) { 14896 return text$$1.toString().toLowerCase() 14897 .replace(/\s+/g, '-') 14898 .replace(/[^\w-]+/g, '') 14899 .replace(/--+/g, '-') 14900 .replace(/^-+/, '') 14901 .replace(/-+$/, ''); 14902 }, 14903 scrollToSlide(speed, value, runCallbacks) { 14904 const swiper = this; 14905 if (value) { 14906 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 14907 const slide = swiper.slides.eq(i); 14908 const slideHistory = History.slugify(slide.attr('data-history')); 14909 if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { 14910 const index$$1 = slide.index(); 14911 swiper.slideTo(index$$1, speed, runCallbacks); 14912 } 14913 } 14914 } else { 14915 swiper.slideTo(0, speed, runCallbacks); 14916 } 14917 }, 14918}; 14919 14920var History$1 = { 14921 name: 'history', 14922 params: { 14923 history: { 14924 enabled: false, 14925 replaceState: false, 14926 key: 'slides', 14927 }, 14928 }, 14929 create() { 14930 const swiper = this; 14931 Utils.extend(swiper, { 14932 history: { 14933 init: History.init.bind(swiper), 14934 setHistory: History.setHistory.bind(swiper), 14935 setHistoryPopState: History.setHistoryPopState.bind(swiper), 14936 scrollToSlide: History.scrollToSlide.bind(swiper), 14937 destroy: History.destroy.bind(swiper), 14938 }, 14939 }); 14940 }, 14941 on: { 14942 init() { 14943 const swiper = this; 14944 if (swiper.params.history.enabled) { 14945 swiper.history.init(); 14946 } 14947 }, 14948 destroy() { 14949 const swiper = this; 14950 if (swiper.params.history.enabled) { 14951 swiper.history.destroy(); 14952 } 14953 }, 14954 transitionEnd() { 14955 const swiper = this; 14956 if (swiper.history.initialized) { 14957 swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); 14958 } 14959 }, 14960 }, 14961}; 14962 14963const HashNavigation = { 14964 onHashCange() { 14965 const swiper = this; 14966 const newHash = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.location.hash.replace('#', ''); 14967 const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); 14968 if (newHash !== activeSlideHash) { 14969 swiper.slideTo(swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index()); 14970 } 14971 }, 14972 setHash() { 14973 const swiper = this; 14974 if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return; 14975 if (swiper.params.hashNavigation.replaceState && ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history && ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.replaceState) { 14976 ssr_window__WEBPACK_IMPORTED_MODULE_1__.window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '')); 14977 } else { 14978 const slide = swiper.slides.eq(swiper.activeIndex); 14979 const hash = slide.attr('data-hash') || slide.attr('data-history'); 14980 ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.location.hash = hash || ''; 14981 } 14982 }, 14983 init() { 14984 const swiper = this; 14985 if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return; 14986 swiper.hashNavigation.initialized = true; 14987 const hash = ssr_window__WEBPACK_IMPORTED_MODULE_1__.document.location.hash.replace('#', ''); 14988 if (hash) { 14989 const speed = 0; 14990 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 14991 const slide = swiper.slides.eq(i); 14992 const slideHash = slide.attr('data-hash') || slide.attr('data-history'); 14993 if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { 14994 const index$$1 = slide.index(); 14995 swiper.slideTo(index$$1, speed, swiper.params.runCallbacksOnInit, true); 14996 } 14997 } 14998 } 14999 if (swiper.params.hashNavigation.watchState) { 15000 (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.window).on('hashchange', swiper.hashNavigation.onHashCange); 15001 } 15002 }, 15003 destroy() { 15004 const swiper = this; 15005 if (swiper.params.hashNavigation.watchState) { 15006 (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(ssr_window__WEBPACK_IMPORTED_MODULE_1__.window).off('hashchange', swiper.hashNavigation.onHashCange); 15007 } 15008 }, 15009}; 15010var HashNavigation$1 = { 15011 name: 'hash-navigation', 15012 params: { 15013 hashNavigation: { 15014 enabled: false, 15015 replaceState: false, 15016 watchState: false, 15017 }, 15018 }, 15019 create() { 15020 const swiper = this; 15021 Utils.extend(swiper, { 15022 hashNavigation: { 15023 initialized: false, 15024 init: HashNavigation.init.bind(swiper), 15025 destroy: HashNavigation.destroy.bind(swiper), 15026 setHash: HashNavigation.setHash.bind(swiper), 15027 onHashCange: HashNavigation.onHashCange.bind(swiper), 15028 }, 15029 }); 15030 }, 15031 on: { 15032 init() { 15033 const swiper = this; 15034 if (swiper.params.hashNavigation.enabled) { 15035 swiper.hashNavigation.init(); 15036 } 15037 }, 15038 destroy() { 15039 const swiper = this; 15040 if (swiper.params.hashNavigation.enabled) { 15041 swiper.hashNavigation.destroy(); 15042 } 15043 }, 15044 transitionEnd() { 15045 const swiper = this; 15046 if (swiper.hashNavigation.initialized) { 15047 swiper.hashNavigation.setHash(); 15048 } 15049 }, 15050 }, 15051}; 15052 15053/* eslint no-underscore-dangle: "off" */ 15054 15055const Autoplay = { 15056 run() { 15057 const swiper = this; 15058 const $activeSlideEl = swiper.slides.eq(swiper.activeIndex); 15059 let delay = swiper.params.autoplay.delay; 15060 if ($activeSlideEl.attr('data-swiper-autoplay')) { 15061 delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; 15062 } 15063 swiper.autoplay.timeout = Utils.nextTick(() => { 15064 if (swiper.params.autoplay.reverseDirection) { 15065 if (swiper.params.loop) { 15066 swiper.loopFix(); 15067 swiper.slidePrev(swiper.params.speed, true, true); 15068 swiper.emit('autoplay'); 15069 } else if (!swiper.isBeginning) { 15070 swiper.slidePrev(swiper.params.speed, true, true); 15071 swiper.emit('autoplay'); 15072 } else if (!swiper.params.autoplay.stopOnLastSlide) { 15073 swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); 15074 swiper.emit('autoplay'); 15075 } else { 15076 swiper.autoplay.stop(); 15077 } 15078 } else if (swiper.params.loop) { 15079 swiper.loopFix(); 15080 swiper.slideNext(swiper.params.speed, true, true); 15081 swiper.emit('autoplay'); 15082 } else if (!swiper.isEnd) { 15083 swiper.slideNext(swiper.params.speed, true, true); 15084 swiper.emit('autoplay'); 15085 } else if (!swiper.params.autoplay.stopOnLastSlide) { 15086 swiper.slideTo(0, swiper.params.speed, true, true); 15087 swiper.emit('autoplay'); 15088 } else { 15089 swiper.autoplay.stop(); 15090 } 15091 }, delay); 15092 }, 15093 start() { 15094 const swiper = this; 15095 if (typeof swiper.autoplay.timeout !== 'undefined') return false; 15096 if (swiper.autoplay.running) return false; 15097 swiper.autoplay.running = true; 15098 swiper.emit('autoplayStart'); 15099 swiper.autoplay.run(); 15100 return true; 15101 }, 15102 stop() { 15103 const swiper = this; 15104 if (!swiper.autoplay.running) return false; 15105 if (typeof swiper.autoplay.timeout === 'undefined') return false; 15106 15107 if (swiper.autoplay.timeout) { 15108 clearTimeout(swiper.autoplay.timeout); 15109 swiper.autoplay.timeout = undefined; 15110 } 15111 swiper.autoplay.running = false; 15112 swiper.emit('autoplayStop'); 15113 return true; 15114 }, 15115 pause(speed) { 15116 const swiper = this; 15117 if (!swiper.autoplay.running) return; 15118 if (swiper.autoplay.paused) return; 15119 if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout); 15120 swiper.autoplay.paused = true; 15121 if (speed === 0 || !swiper.params.autoplay.waitForTransition) { 15122 swiper.autoplay.paused = false; 15123 swiper.autoplay.run(); 15124 } else { 15125 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd); 15126 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); 15127 } 15128 }, 15129}; 15130 15131var Autoplay$1 = { 15132 name: 'autoplay', 15133 params: { 15134 autoplay: { 15135 enabled: false, 15136 delay: 3000, 15137 waitForTransition: true, 15138 disableOnInteraction: true, 15139 stopOnLastSlide: false, 15140 reverseDirection: false, 15141 }, 15142 }, 15143 create() { 15144 const swiper = this; 15145 Utils.extend(swiper, { 15146 autoplay: { 15147 running: false, 15148 paused: false, 15149 run: Autoplay.run.bind(swiper), 15150 start: Autoplay.start.bind(swiper), 15151 stop: Autoplay.stop.bind(swiper), 15152 pause: Autoplay.pause.bind(swiper), 15153 onTransitionEnd(e) { 15154 if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; 15155 if (e.target !== this) return; 15156 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd); 15157 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); 15158 swiper.autoplay.paused = false; 15159 if (!swiper.autoplay.running) { 15160 swiper.autoplay.stop(); 15161 } else { 15162 swiper.autoplay.run(); 15163 } 15164 }, 15165 }, 15166 }); 15167 }, 15168 on: { 15169 init() { 15170 const swiper = this; 15171 if (swiper.params.autoplay.enabled) { 15172 swiper.autoplay.start(); 15173 } 15174 }, 15175 beforeTransitionStart(speed, internal) { 15176 const swiper = this; 15177 if (swiper.autoplay.running) { 15178 if (internal || !swiper.params.autoplay.disableOnInteraction) { 15179 swiper.autoplay.pause(speed); 15180 } else { 15181 swiper.autoplay.stop(); 15182 } 15183 } 15184 }, 15185 sliderFirstMove() { 15186 const swiper = this; 15187 if (swiper.autoplay.running) { 15188 if (swiper.params.autoplay.disableOnInteraction) { 15189 swiper.autoplay.stop(); 15190 } else { 15191 swiper.autoplay.pause(); 15192 } 15193 } 15194 }, 15195 destroy() { 15196 const swiper = this; 15197 if (swiper.autoplay.running) { 15198 swiper.autoplay.stop(); 15199 } 15200 }, 15201 }, 15202}; 15203 15204const Fade = { 15205 setTranslate() { 15206 const swiper = this; 15207 const { slides } = swiper; 15208 for (let i = 0; i < slides.length; i += 1) { 15209 const $slideEl = swiper.slides.eq(i); 15210 const offset$$1 = $slideEl[0].swiperSlideOffset; 15211 let tx = -offset$$1; 15212 if (!swiper.params.virtualTranslate) tx -= swiper.translate; 15213 let ty = 0; 15214 if (!swiper.isHorizontal()) { 15215 ty = tx; 15216 tx = 0; 15217 } 15218 const slideOpacity = swiper.params.fadeEffect.crossFade 15219 ? Math.max(1 - Math.abs($slideEl[0].progress), 0) 15220 : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); 15221 $slideEl 15222 .css({ 15223 opacity: slideOpacity, 15224 }) 15225 .transform(`translate3d(${tx}px, ${ty}px, 0px)`); 15226 } 15227 }, 15228 setTransition(duration) { 15229 const swiper = this; 15230 const { slides, $wrapperEl } = swiper; 15231 slides.transition(duration); 15232 if (swiper.params.virtualTranslate && duration !== 0) { 15233 let eventTriggered = false; 15234 slides.transitionEnd(() => { 15235 if (eventTriggered) return; 15236 if (!swiper || swiper.destroyed) return; 15237 eventTriggered = true; 15238 swiper.animating = false; 15239 const triggerEvents = ['webkitTransitionEnd', 'transitionend']; 15240 for (let i = 0; i < triggerEvents.length; i += 1) { 15241 $wrapperEl.trigger(triggerEvents[i]); 15242 } 15243 }); 15244 } 15245 }, 15246}; 15247 15248var EffectFade = { 15249 name: 'effect-fade', 15250 params: { 15251 fadeEffect: { 15252 crossFade: false, 15253 }, 15254 }, 15255 create() { 15256 const swiper = this; 15257 Utils.extend(swiper, { 15258 fadeEffect: { 15259 setTranslate: Fade.setTranslate.bind(swiper), 15260 setTransition: Fade.setTransition.bind(swiper), 15261 }, 15262 }); 15263 }, 15264 on: { 15265 beforeInit() { 15266 const swiper = this; 15267 if (swiper.params.effect !== 'fade') return; 15268 swiper.classNames.push(`${swiper.params.containerModifierClass}fade`); 15269 const overwriteParams = { 15270 slidesPerView: 1, 15271 slidesPerColumn: 1, 15272 slidesPerGroup: 1, 15273 watchSlidesProgress: true, 15274 spaceBetween: 0, 15275 virtualTranslate: true, 15276 }; 15277 Utils.extend(swiper.params, overwriteParams); 15278 Utils.extend(swiper.originalParams, overwriteParams); 15279 }, 15280 setTranslate() { 15281 const swiper = this; 15282 if (swiper.params.effect !== 'fade') return; 15283 swiper.fadeEffect.setTranslate(); 15284 }, 15285 setTransition(duration) { 15286 const swiper = this; 15287 if (swiper.params.effect !== 'fade') return; 15288 swiper.fadeEffect.setTransition(duration); 15289 }, 15290 }, 15291}; 15292 15293const Cube = { 15294 setTranslate() { 15295 const swiper = this; 15296 const { 15297 $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize, 15298 } = swiper; 15299 const params = swiper.params.cubeEffect; 15300 const isHorizontal = swiper.isHorizontal(); 15301 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 15302 let wrapperRotate = 0; 15303 let $cubeShadowEl; 15304 if (params.shadow) { 15305 if (isHorizontal) { 15306 $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); 15307 if ($cubeShadowEl.length === 0) { 15308 $cubeShadowEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)('<div class="swiper-cube-shadow"></div>'); 15309 $wrapperEl.append($cubeShadowEl); 15310 } 15311 $cubeShadowEl.css({ height: `${swiperWidth}px` }); 15312 } else { 15313 $cubeShadowEl = $el.find('.swiper-cube-shadow'); 15314 if ($cubeShadowEl.length === 0) { 15315 $cubeShadowEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)('<div class="swiper-cube-shadow"></div>'); 15316 $el.append($cubeShadowEl); 15317 } 15318 } 15319 } 15320 for (let i = 0; i < slides.length; i += 1) { 15321 const $slideEl = slides.eq(i); 15322 let slideIndex = i; 15323 if (isVirtual) { 15324 slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); 15325 } 15326 let slideAngle = slideIndex * 90; 15327 let round = Math.floor(slideAngle / 360); 15328 if (rtl) { 15329 slideAngle = -slideAngle; 15330 round = Math.floor(-slideAngle / 360); 15331 } 15332 const progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 15333 let tx = 0; 15334 let ty = 0; 15335 let tz = 0; 15336 if (slideIndex % 4 === 0) { 15337 tx = -round * 4 * swiperSize; 15338 tz = 0; 15339 } else if ((slideIndex - 1) % 4 === 0) { 15340 tx = 0; 15341 tz = -round * 4 * swiperSize; 15342 } else if ((slideIndex - 2) % 4 === 0) { 15343 tx = swiperSize + (round * 4 * swiperSize); 15344 tz = swiperSize; 15345 } else if ((slideIndex - 3) % 4 === 0) { 15346 tx = -swiperSize; 15347 tz = (3 * swiperSize) + (swiperSize * 4 * round); 15348 } 15349 if (rtl) { 15350 tx = -tx; 15351 } 15352 15353 if (!isHorizontal) { 15354 ty = tx; 15355 tx = 0; 15356 } 15357 15358 const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; 15359 if (progress <= 1 && progress > -1) { 15360 wrapperRotate = (slideIndex * 90) + (progress * 90); 15361 if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90); 15362 } 15363 $slideEl.transform(transform$$1); 15364 if (params.slideShadows) { 15365 // Set shadows 15366 let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 15367 let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 15368 if (shadowBefore.length === 0) { 15369 shadowBefore = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`); 15370 $slideEl.append(shadowBefore); 15371 } 15372 if (shadowAfter.length === 0) { 15373 shadowAfter = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`); 15374 $slideEl.append(shadowAfter); 15375 } 15376 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 15377 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 15378 } 15379 } 15380 $wrapperEl.css({ 15381 '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`, 15382 '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`, 15383 '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`, 15384 'transform-origin': `50% 50% -${swiperSize / 2}px`, 15385 }); 15386 15387 if (params.shadow) { 15388 if (isHorizontal) { 15389 $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`); 15390 } else { 15391 const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90); 15392 const multiplier = 1.5 - ( 15393 (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) 15394 + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2) 15395 ); 15396 const scale1 = params.shadowScale; 15397 const scale2 = params.shadowScale / multiplier; 15398 const offset$$1 = params.shadowOffset; 15399 $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`); 15400 } 15401 } 15402 const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0; 15403 $wrapperEl 15404 .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`); 15405 }, 15406 setTransition(duration) { 15407 const swiper = this; 15408 const { $el, slides } = swiper; 15409 slides 15410 .transition(duration) 15411 .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') 15412 .transition(duration); 15413 if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { 15414 $el.find('.swiper-cube-shadow').transition(duration); 15415 } 15416 }, 15417}; 15418 15419var EffectCube = { 15420 name: 'effect-cube', 15421 params: { 15422 cubeEffect: { 15423 slideShadows: true, 15424 shadow: true, 15425 shadowOffset: 20, 15426 shadowScale: 0.94, 15427 }, 15428 }, 15429 create() { 15430 const swiper = this; 15431 Utils.extend(swiper, { 15432 cubeEffect: { 15433 setTranslate: Cube.setTranslate.bind(swiper), 15434 setTransition: Cube.setTransition.bind(swiper), 15435 }, 15436 }); 15437 }, 15438 on: { 15439 beforeInit() { 15440 const swiper = this; 15441 if (swiper.params.effect !== 'cube') return; 15442 swiper.classNames.push(`${swiper.params.containerModifierClass}cube`); 15443 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 15444 const overwriteParams = { 15445 slidesPerView: 1, 15446 slidesPerColumn: 1, 15447 slidesPerGroup: 1, 15448 watchSlidesProgress: true, 15449 resistanceRatio: 0, 15450 spaceBetween: 0, 15451 centeredSlides: false, 15452 virtualTranslate: true, 15453 }; 15454 Utils.extend(swiper.params, overwriteParams); 15455 Utils.extend(swiper.originalParams, overwriteParams); 15456 }, 15457 setTranslate() { 15458 const swiper = this; 15459 if (swiper.params.effect !== 'cube') return; 15460 swiper.cubeEffect.setTranslate(); 15461 }, 15462 setTransition(duration) { 15463 const swiper = this; 15464 if (swiper.params.effect !== 'cube') return; 15465 swiper.cubeEffect.setTransition(duration); 15466 }, 15467 }, 15468}; 15469 15470const Flip = { 15471 setTranslate() { 15472 const swiper = this; 15473 const { slides, rtlTranslate: rtl } = swiper; 15474 for (let i = 0; i < slides.length; i += 1) { 15475 const $slideEl = slides.eq(i); 15476 let progress = $slideEl[0].progress; 15477 if (swiper.params.flipEffect.limitRotation) { 15478 progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 15479 } 15480 const offset$$1 = $slideEl[0].swiperSlideOffset; 15481 const rotate = -180 * progress; 15482 let rotateY = rotate; 15483 let rotateX = 0; 15484 let tx = -offset$$1; 15485 let ty = 0; 15486 if (!swiper.isHorizontal()) { 15487 ty = tx; 15488 tx = 0; 15489 rotateX = -rotateY; 15490 rotateY = 0; 15491 } else if (rtl) { 15492 rotateY = -rotateY; 15493 } 15494 15495 $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; 15496 15497 if (swiper.params.flipEffect.slideShadows) { 15498 // Set shadows 15499 let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 15500 let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 15501 if (shadowBefore.length === 0) { 15502 shadowBefore = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`); 15503 $slideEl.append(shadowBefore); 15504 } 15505 if (shadowAfter.length === 0) { 15506 shadowAfter = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`); 15507 $slideEl.append(shadowAfter); 15508 } 15509 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 15510 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 15511 } 15512 $slideEl 15513 .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`); 15514 } 15515 }, 15516 setTransition(duration) { 15517 const swiper = this; 15518 const { slides, activeIndex, $wrapperEl } = swiper; 15519 slides 15520 .transition(duration) 15521 .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') 15522 .transition(duration); 15523 if (swiper.params.virtualTranslate && duration !== 0) { 15524 let eventTriggered = false; 15525 // eslint-disable-next-line 15526 slides.eq(activeIndex).transitionEnd(function onTransitionEnd() { 15527 if (eventTriggered) return; 15528 if (!swiper || swiper.destroyed) return; 15529 // if (!$(this).hasClass(swiper.params.slideActiveClass)) return; 15530 eventTriggered = true; 15531 swiper.animating = false; 15532 const triggerEvents = ['webkitTransitionEnd', 'transitionend']; 15533 for (let i = 0; i < triggerEvents.length; i += 1) { 15534 $wrapperEl.trigger(triggerEvents[i]); 15535 } 15536 }); 15537 } 15538 }, 15539}; 15540 15541var EffectFlip = { 15542 name: 'effect-flip', 15543 params: { 15544 flipEffect: { 15545 slideShadows: true, 15546 limitRotation: true, 15547 }, 15548 }, 15549 create() { 15550 const swiper = this; 15551 Utils.extend(swiper, { 15552 flipEffect: { 15553 setTranslate: Flip.setTranslate.bind(swiper), 15554 setTransition: Flip.setTransition.bind(swiper), 15555 }, 15556 }); 15557 }, 15558 on: { 15559 beforeInit() { 15560 const swiper = this; 15561 if (swiper.params.effect !== 'flip') return; 15562 swiper.classNames.push(`${swiper.params.containerModifierClass}flip`); 15563 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 15564 const overwriteParams = { 15565 slidesPerView: 1, 15566 slidesPerColumn: 1, 15567 slidesPerGroup: 1, 15568 watchSlidesProgress: true, 15569 spaceBetween: 0, 15570 virtualTranslate: true, 15571 }; 15572 Utils.extend(swiper.params, overwriteParams); 15573 Utils.extend(swiper.originalParams, overwriteParams); 15574 }, 15575 setTranslate() { 15576 const swiper = this; 15577 if (swiper.params.effect !== 'flip') return; 15578 swiper.flipEffect.setTranslate(); 15579 }, 15580 setTransition(duration) { 15581 const swiper = this; 15582 if (swiper.params.effect !== 'flip') return; 15583 swiper.flipEffect.setTransition(duration); 15584 }, 15585 }, 15586}; 15587 15588const Coverflow = { 15589 setTranslate() { 15590 const swiper = this; 15591 const { 15592 width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid, 15593 } = swiper; 15594 const params = swiper.params.coverflowEffect; 15595 const isHorizontal = swiper.isHorizontal(); 15596 const transform$$1 = swiper.translate; 15597 const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2); 15598 const rotate = isHorizontal ? params.rotate : -params.rotate; 15599 const translate = params.depth; 15600 // Each slide offset from center 15601 for (let i = 0, length = slides.length; i < length; i += 1) { 15602 const $slideEl = slides.eq(i); 15603 const slideSize = slidesSizesGrid[i]; 15604 const slideOffset = $slideEl[0].swiperSlideOffset; 15605 const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier; 15606 15607 let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; 15608 let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; 15609 // var rotateZ = 0 15610 let translateZ = -translate * Math.abs(offsetMultiplier); 15611 15612 let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier); 15613 let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0; 15614 15615 // Fix for ultra small values 15616 if (Math.abs(translateX) < 0.001) translateX = 0; 15617 if (Math.abs(translateY) < 0.001) translateY = 0; 15618 if (Math.abs(translateZ) < 0.001) translateZ = 0; 15619 if (Math.abs(rotateY) < 0.001) rotateY = 0; 15620 if (Math.abs(rotateX) < 0.001) rotateX = 0; 15621 15622 const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; 15623 15624 $slideEl.transform(slideTransform); 15625 $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; 15626 if (params.slideShadows) { 15627 // Set shadows 15628 let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 15629 let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 15630 if ($shadowBeforeEl.length === 0) { 15631 $shadowBeforeEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`); 15632 $slideEl.append($shadowBeforeEl); 15633 } 15634 if ($shadowAfterEl.length === 0) { 15635 $shadowAfterEl = (0,dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__.$)(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`); 15636 $slideEl.append($shadowAfterEl); 15637 } 15638 if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; 15639 if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; 15640 } 15641 } 15642 15643 // Set correct perspective for IE10 15644 if (Support.pointerEvents || Support.prefixedPointerEvents) { 15645 const ws = $wrapperEl[0].style; 15646 ws.perspectiveOrigin = `${center}px 50%`; 15647 } 15648 }, 15649 setTransition(duration) { 15650 const swiper = this; 15651 swiper.slides 15652 .transition(duration) 15653 .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') 15654 .transition(duration); 15655 }, 15656}; 15657 15658var EffectCoverflow = { 15659 name: 'effect-coverflow', 15660 params: { 15661 coverflowEffect: { 15662 rotate: 50, 15663 stretch: 0, 15664 depth: 100, 15665 modifier: 1, 15666 slideShadows: true, 15667 }, 15668 }, 15669 create() { 15670 const swiper = this; 15671 Utils.extend(swiper, { 15672 coverflowEffect: { 15673 setTranslate: Coverflow.setTranslate.bind(swiper), 15674 setTransition: Coverflow.setTransition.bind(swiper), 15675 }, 15676 }); 15677 }, 15678 on: { 15679 beforeInit() { 15680 const swiper = this; 15681 if (swiper.params.effect !== 'coverflow') return; 15682 15683 swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`); 15684 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 15685 15686 swiper.params.watchSlidesProgress = true; 15687 swiper.originalParams.watchSlidesProgress = true; 15688 }, 15689 setTranslate() { 15690 const swiper = this; 15691 if (swiper.params.effect !== 'coverflow') return; 15692 swiper.coverflowEffect.setTranslate(); 15693 }, 15694 setTransition(duration) { 15695 const swiper = this; 15696 if (swiper.params.effect !== 'coverflow') return; 15697 swiper.coverflowEffect.setTransition(duration); 15698 }, 15699 }, 15700}; 15701 15702// Swiper Class 15703 15704const components = [ 15705 Device$1, 15706 Support$1, 15707 Browser$1, 15708 Resize, 15709 Observer$1, 15710 Virtual$1, 15711 Keyboard$1, 15712 Mousewheel$1, 15713 Navigation$1, 15714 Pagination$1, 15715 Scrollbar$1, 15716 Parallax$1, 15717 Zoom$1, 15718 Lazy$1, 15719 Controller$1, 15720 A11y, 15721 History$1, 15722 HashNavigation$1, 15723 Autoplay$1, 15724 EffectFade, 15725 EffectCube, 15726 EffectFlip, 15727 EffectCoverflow 15728]; 15729 15730if (typeof Swiper.use === 'undefined') { 15731 Swiper.use = Swiper.Class.use; 15732 Swiper.installModule = Swiper.Class.installModule; 15733} 15734 15735Swiper.use(components); 15736 15737/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Swiper); 15738 15739 15740/***/ }), 15741
15742/***/ "./resources/assets/js/desktop/components/Store/Desktop.vue": 15743/*!******************************************************************!*\ 15744 !*** ./resources/assets/js/desktop/components/Store/Desktop.vue ***! 15745 \******************************************************************/ 15746/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15747 15748"use strict"; 15749__webpack_require__.r(__webpack_exports__); 15750/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15751/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15752/* harmony export */ }); 15753/* harmony import */ var _Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Desktop.vue?vue&type=template&id=0238078c& */ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c&"); 15754/* harmony import */ var _Desktop_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Desktop.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js&"); 15755/* harmony import */ var _Desktop_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Desktop.vue?vue&type=style&index=0&lang=css& */ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&"); 15756/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15757 15758 15759 15760; 15761 15762 15763/* normalize component */ 15764 15765var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( 15766 _Desktop_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15767 _Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__.render, 15768 _Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15769 false, 15770 null, 15771 null, 15772 null 15773 15774) 15775 15776/* hot reload */ 15777if (false) { var api; } 15778component.options.__file = "resources/assets/js/desktop/components/Store/Desktop.vue" 15779/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15780 15781/***/ }), 15782
15783/***/ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue": 15784/*!***********************************************************************!*\ 15785 !*** ./resources/assets/js/desktop/components/Store/Desktop/Cart.vue ***! 15786 \***********************************************************************/ 15787/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15788 15789"use strict"; 15790__webpack_require__.r(__webpack_exports__); 15791/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15792/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15793/* harmony export */ }); 15794/* harmony import */ var _Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Cart.vue?vue&type=template&id=1c46cea5& */ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5&"); 15795/* harmony import */ var _Cart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cart.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js&"); 15796/* harmony import */ var _Cart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Cart.vue?vue&type=style&index=0&lang=css& */ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&"); 15797/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15798 15799 15800 15801; 15802 15803 15804/* normalize component */ 15805 15806var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( 15807 _Cart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15808 _Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__.render, 15809 _Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15810 false, 15811 null, 15812 null, 15813 null 15814 15815) 15816 15817/* hot reload */ 15818if (false) { var api; } 15819component.options.__file = "resources/assets/js/desktop/components/Store/Desktop/Cart.vue" 15820/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15821 15822/***/ }), 15823
15824/***/ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue": 15825/*!***********************************************************************!*\ 15826 !*** ./resources/assets/js/desktop/components/Store/Desktop/Item.vue ***! 15827 \***********************************************************************/ 15828/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15829 15830"use strict"; 15831__webpack_require__.r(__webpack_exports__); 15832/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15833/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15834/* harmony export */ }); 15835/* harmony import */ var _Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Item.vue?vue&type=template&id=62129d18& */ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18&"); 15836/* harmony import */ var _Item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Item.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js&"); 15837/* harmony import */ var _Item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Item.vue?vue&type=style&index=0&lang=css& */ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&"); 15838/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15839 15840 15841 15842; 15843 15844 15845/* normalize component */ 15846 15847var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( 15848 _Item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15849 _Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__.render, 15850 _Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15851 false, 15852 null, 15853 null, 15854 null 15855 15856) 15857 15858/* hot reload */ 15859if (false) { var api; } 15860component.options.__file = "resources/assets/js/desktop/components/Store/Desktop/Item.vue" 15861/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15862 15863/***/ }), 15864
15865/***/ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue": 15866/*!************************************************************************!*\ 15867 !*** ./resources/assets/js/desktop/components/Store/Desktop/Items.vue ***! 15868 \************************************************************************/ 15869/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15870 15871"use strict"; 15872__webpack_require__.r(__webpack_exports__); 15873/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15874/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15875/* harmony export */ }); 15876/* harmony import */ var _Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Items.vue?vue&type=template&id=3826b1ea& */ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea&"); 15877/* harmony import */ var _Items_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Items.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js&"); 15878/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15879 15880 15881 15882 15883 15884/* normalize component */ 15885; 15886var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( 15887 _Items_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15888 _Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__.render, 15889 _Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15890 false, 15891 null, 15892 null, 15893 null 15894 15895) 15896 15897/* hot reload */ 15898if (false) { var api; } 15899component.options.__file = "resources/assets/js/desktop/components/Store/Desktop/Items.vue" 15900/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15901 15902/***/ }), 15903
15904/***/ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue": 15905/*!************************************************************************!*\ 15906 !*** ./resources/assets/js/desktop/components/Store/Desktop/Merch.vue ***! 15907 \************************************************************************/ 15908/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15909 15910"use strict"; 15911__webpack_require__.r(__webpack_exports__); 15912/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15913/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15914/* harmony export */ }); 15915/* harmony import */ var _Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Merch.vue?vue&type=template&id=865b68ec& */ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec&"); 15916/* harmony import */ var _Merch_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Merch.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js&"); 15917/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15918 15919 15920 15921 15922 15923/* normalize component */ 15924; 15925var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( 15926 _Merch_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15927 _Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__.render, 15928 _Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15929 false, 15930 null, 15931 null, 15932 null 15933 15934) 15935 15936/* hot reload */ 15937if (false) { var api; } 15938component.options.__file = "resources/assets/js/desktop/components/Store/Desktop/Merch.vue" 15939/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15940 15941/***/ }), 15942
15943/***/ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue": 15944/*!************************************************************************!*\ 15945 !*** ./resources/assets/js/desktop/components/Store/Desktop/Order.vue ***! 15946 \************************************************************************/ 15947/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15948 15949"use strict"; 15950__webpack_require__.r(__webpack_exports__); 15951/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15952/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15953/* harmony export */ }); 15954/* harmony import */ var _Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order.vue?vue&type=template&id=4b29cf99& */ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99&"); 15955/* harmony import */ var _Order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Order.vue?vue&type=script&lang=js& */ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js&"); 15956/* harmony import */ var _Order_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Order.vue?vue&type=style&index=0&lang=css& */ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&"); 15957/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); 15958 15959 15960 15961; 15962 15963 15964/* normalize component */ 15965 15966var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( 15967 _Order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], 15968 _Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__.render, 15969 _Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, 15970 false, 15971 null, 15972 null, 15973 null 15974 15975) 15976 15977/* hot reload */ 15978if (false) { var api; } 15979component.options.__file = "resources/assets/js/desktop/components/Store/Desktop/Order.vue" 15980/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); 15981 15982/***/ }), 15983 15984/***/ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js&": 15985/*!*******************************************************************************************!*\ 15986 !*** ./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js& ***! 15987 \*******************************************************************************************/ 15988/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 15989 15990"use strict"; 15991__webpack_require__.r(__webpack_exports__); 15992/* harmony export */ __webpack_require__.d(__webpack_exports__, { 15993/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 15994/* harmony export */ }); 15995/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Desktop.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=script&lang=js&"); 15996 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 15997 15998/***/ }), 15999 16000/***/ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js&": 16001/*!************************************************************************************************!*\ 16002 !*** ./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js& ***! 16003 \************************************************************************************************/ 16004/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16005 16006"use strict"; 16007__webpack_require__.r(__webpack_exports__); 16008/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16009/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 16010/* harmony export */ }); 16011/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_
160110_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=script&lang=js&"); 16012 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 16013 16014/***/ }), 16015 16016/***/ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js&": 16017/*!************************************************************************************************!*\ 16018 !*** ./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js& ***! 16019 \************************************************************************************************/ 16020/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16021 16022"use strict"; 16023__webpack_require__.r(__webpack_exports__); 16024/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16025/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 16026/* harmony export */ }); 16027/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Item.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=script&lang=js&"); 16028 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 16029 16030/***/ }), 16031 16032/***/ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js&": 16033/*!*************************************************************************************************!*\ 16034 !*** ./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js& ***! 16035 \*************************************************************************************************/ 16036/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16037 16038"use strict"; 16039__webpack_require__.r(__webpack_exports__); 16040/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16041/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 16042/* harmony export */ }); 16043/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Items_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Items.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=script&lang=js&"); 16044 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Items_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 16045 16046/***/ }), 16047 16048/***/ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js&": 16049/*!*************************************************************************************************!*\ 16050 !*** ./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js& ***! 16051 \*************************************************************************************************/ 16052/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16053 16054"use strict"; 16055__webpack_require__.r(__webpack_exports__); 16056/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16057/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 16058/* harmony export */ }); 16059/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_
160590_node_modules_vue_loader_lib_index_js_vue_loader_options_Merch_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Merch.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=script&lang=js&"); 16060 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Merch_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 16061 16062/***/ }), 16063 16064/***/ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js&": 16065/*!*************************************************************************************************!*\ 16066 !*** ./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js& ***! 16067 \*************************************************************************************************/ 16068/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16069 16070"use strict"; 16071__webpack_require__.r(__webpack_exports__); 16072/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16073/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 16074/* harmony export */ }); 16075/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Order.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=script&lang=js&"); 16076 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 16077 16078/***/ }), 16079 16080/***/ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&": 16081/*!***************************************************************************************************!*\ 16082 !*** ./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css& ***! 16083 \***************************************************************************************************/ 16084/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16085 16086"use strict"; 16087__webpack_require__.r(__webpack_exports__); 16088/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Desktop.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLo
16088ader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=style&index=0&lang=css&"); 16089 16090 16091/***/ }), 16092 16093/***/ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&": 16094/*!********************************************************************************************************!*\ 16095 !*** ./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css& ***! 16096 \********************************************************************************************************/ 16097/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16098 16099"use strict"; 16100__webpack_require__.r(__webpack_exports__); 16101/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=style&index=0&lang=css&"); 16102 16103 16104/***/ }), 16105 16106/***/ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&": 16107/*!********************************************************************************************************!*\ 16108 !*** ./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css& ***! 16109 \********************************************************************************************************/ 16110/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16111 16112"use strict"; 16113__webpack_require__.r(__webpack_exports__); 16114/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Item.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=style&index=0&lang=css&"); 16115 16116 16117/***/ }), 16118 16119/***/ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&": 16120/*!*********************************************************************************************************!*\ 16121 !*** ./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css& ***! 16122 \*********************************************************************************************************/ 16123/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16124 16125"use strict"; 16126__webpack_require__.r(__webpack_exports__); 16127/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_1_node_modules_vue_loader_lib_loaders_stylePostLo
16127ader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_10_0_rules_0_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Order.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-10[0].rules[0].use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=style&index=0&lang=css&"); 16128 16129 16130/***/ }), 16131 16132/***/ "./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c&": 16133/*!*************************************************************************************************!*\ 16134 !*** ./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c& ***! 16135 \*************************************************************************************************/ 16136/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16137 16138"use strict"; 16139__webpack_require__.r(__webpack_exports__); 16140/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16141/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__.render), 16142/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16143/* harmony export */ }); 16144/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Desktop_vue_vue_type_template_id_0238078c___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Desktop.vue?vue&type=template&id=0238078c& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c&"); 16145 16146 16147/***/ }), 16148 16149/***/ "./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5&": 16150/*!******************************************************************************************************!*\ 16151 !*** ./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5& ***! 16152 \******************************************************************************************************/ 16153/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16154 16155"use strict"; 16156__webpack_require__.r(__webpack_exports__); 16157/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16158/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__.render), 16159/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16160/* harmony export */ }); 16161/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Cart_vue_vue_type_template_id_1c46cea5___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=template&id=1c46cea5& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5&"); 16162 16163
16164/***/ }), 16165 16166/***/ "./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18&": 16167/*!******************************************************************************************************!*\ 16168 !*** ./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18& ***! 16169 \******************************************************************************************************/ 16170/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16171 16172"use strict"; 16173__webpack_require__.r(__webpack_exports__); 16174/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16175/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__.render), 16176/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16177/* harmony export */ }); 16178/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Item_vue_vue_type_template_id_62129d18___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Item.vue?vue&type=template&id=62129d18& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18&"); 16179 16180 16181/***/ }), 16182 16183/***/ "./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea&": 16184/*!*******************************************************************************************************!*\ 16185 !*** ./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea& ***! 16186 \*******************************************************************************************************/ 16187/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16188 16189"use strict"; 16190__webpack_require__.r(__webpack_exports__); 16191/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16192/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__.render), 16193/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16194/* harmony export */ }); 16195/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Items_vue_vue_type_template_id_3826b1ea___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Items.vue?vue&type=template&id=3826b1ea& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea&"); 16196 16197 16198/***/ }), 16199 16200/***/ "./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec&": 16201/*!*******************************************************************************************************!*\ 16202 !*** ./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec& ***! 16203 \*******************************************************************************************************/ 16204/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16205 16206"use strict"; 16207__webpack_require__.r(__webpack_exports__); 16208/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16209/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__.render), 16210/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16211/* harmony export */ }); 16212/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Merch_vue_vue_type_template_id_865b68ec___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Merch.vue?vue&type=template&id=865b68ec& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec&"); 16213 16214
16215/***/ }), 16216 16217/***/ "./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99&": 16218/*!*******************************************************************************************************!*\ 16219 !*** ./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99& ***! 16220 \*******************************************************************************************************/ 16221/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16222 16223"use strict"; 16224__webpack_require__.r(__webpack_exports__); 16225/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16226/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__.render), 16227/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) 16228/* harmony export */ }); 16229/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Order_vue_vue_type_template_id_4b29cf99___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Order.vue?vue&type=template&id=4b29cf99& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99&"); 16230 16231 16232/***/ }), 16233 16234/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c&": 16235/*!****************************************************************************************************************************************************************************************************************************************!*\ 16236 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop.vue?vue&type=template&id=0238078c& ***! 16237 \****************************************************************************************************************************************************************************************************************************************/ 16238/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16239 16240"use strict"; 16241__webpack_require__.r(__webpack_exports__); 16242/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16243/* harmony export */ "render": () => (/* binding */ render), 16244/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 16245/* harmony export */ }); 16246var render = function () { 16247 var _vm = this 16248 var _h = _vm.$createElement 16249 var _c = _vm._self._c || _h 16250 return _c( 16251 "div", 16252 { staticClass: "store" }, 16253 [ 16254 _c("header", { staticClass: "desktop" }, [ 16255 _c("div", { staticClass: "container menu" }, [ 16256 _c("div", { staticClass: "menu-left" }, [ 16257 _vm._m(0), 16258 _vm._v(" "), 16259 _vm._m(1), 16260 _vm._v(" "), 16261 _c( 16262 "a", 16263 { 16264 staticClass: "menu-left-item", 16265 attrs: { href: "#" }, 16266 on: { 16267 click: function ($event) { 16268 $event.preventDefault() 16269 _vm.setTab("items") 16270 }, 16271 }, 16272 }, 16273 [_vm._v("ÐÑмажнÑй жÑÑнал")] 16274 ), 16275 _vm._v(" "), 16276 _c( 16277 "a", 16278 { 16279 staticClass: "menu-left-item", 16280 attrs: { href: "#" }, 16281 on: { 16282 click: function ($event) { 16283 $event.preventDefault() 16284 _vm.setTab("merch") 16285 }, 16286 }, 16287 }, 16288 [_vm._v("СÑвениÑÑ")] 16289 ), 16290 ]), 16291 _vm._v(" "), 16292 _c("div", { staticClass: "menu-right" }, [ 16293 _c( 16294 "a", 16295 { 16296 staticClass: "shopping", 16297 attrs: { href: "#" }, 16298 on: { 16299 click: function ($event) { 16300 $event.preventDefault() 16301 _vm.show("cart") 16302 }, 16303 }, 16304 }, 16305 [ 16306 _vm.order.items.length > 0 16307 ? _c("span", { 16308 domProps: { textContent: _vm._s(_vm.order.items.length) }, 16309 }) 16310 : _vm._e(), 16311 ] 16312 ), 16313 _vm._v(" "), 16314 _vm._m(2), 16315 ]), 16316 ]), 16317 ]), 16318 _vm._v(" "), 16319 _c("header", { staticClass: "mobile" }, [ 16320 _c("div", { staticClass: "left" }, [ 16321 _c("a", { 16322 staticClass: "left-logo", 16323 attrs: { href: "/store" }, 16324 on: { 16325 click: function ($event) { 16326 $event.preventDefault() 16327 _vm.show("items") 16328 }, 16329 }, 16330 }), 16331 ]), 16332 _vm._v(" "), 16333 _c("div", { staticClass: "center" }, [ 16334 _c( 16335 "a", 16336 { 16337 staticStyle: { "text-decoration": "none" }, 16338 attrs: { href: "/store" }, 16339 on: { 16340 click: function ($event) { 16341 $event.preventDefault() 16342 _vm.show("items") 16343 }, 16344 }, 16345 }, 16346 [_c("span", [_vm._v("магазин")])] 16347 ), 16348 ]), 16349 _vm._v(" "), 16350 _c("div", { staticClass: "right" }, [ 16351 _c( 16352 "a", 16353 { 16354 staticClass: "shopping", 16355 attrs: { href: "/store/cart" }, 16356 on: { 16357 click: function ($event) { 16358 $event.preventDefault() 16359 _vm.show("cart") 16360 }, 16361 }, 16362 }, 16363 [ 16364 _vm.order.items.length > 0 16365 ? _c("span", { 16366 domProps: { textContent: _vm._s(_vm.order.items.length) }, 16367 }) 16368 : _vm._e(), 16369 ] 16370 ), 16371 _vm._v(" "), 16372 _c("a", { staticClass: "exit", attrs: { href: "/" } }), 16373 ]), 16374 ]), 16375 _vm._v(" "), 16376 _c("nav", { staticClass: "menu mobile" }, [ 16377 _c("ul", { staticClass: "swiper-wrapper" }, [ 16378 _c("li", { staticClass: "swiper-slide" }, [ 16379 _c( 16380 "a", 16381 { 16382 attrs: { href: "/store" }, 16383 on: { 16384 click: function ($event) { 16385 $event.preventDefault() 16386 _vm.setTab("items") 16387 }, 16388 }, 16389 }, 16390 [_vm._v("ÐÑмажнÑй жÑÑнал")] 16391 ), 16392 ]), 16393 _vm._v(" "), 16394 _c("li", { staticClass: "swiper-slide" }, [ 16395 _c( 16396 "a", 16397 { 16398 attrs: { href: "" }, 16399 on: { 16400 click: function ($event) { 16401 $event.preventDefault() 16402 _vm.setTab("merch") 16403 }, 16404 }, 16405 }, 16406 [_vm._v("СÑвениÑÑ")] 16407 ), 16408 ]), 16409 _vm._v(" "), 16410 _c("li", { staticClass: "swiper-slide" }, [_vm._v(" ")]), 16411 ]), 16412 ]), 16413 _vm._v(" "), 16414 _vm.page === "items" 16415 ? _c("items", { 16416 attrs: { items: _vm.items }, 16417 on: { update: _vm.onItemsUpdate }, 16418 }) 16419 : _vm._e(), 16420 _vm._v(" "), 16421 _vm.page === "merch" 16422 ? _c("merch", { 16423 attrs: { items: _vm.items }, 16424 on: { update: _vm.onItemsUpdate }, 16425 }) 16426 : _vm._e(), 16427 _vm._v(" "), 16428 _vm.page === "item" 16429 ? _c("item", { attrs: { item: _vm.item } }) 16430 : _vm._e(), 16431 _vm._v(" "), 16432 _vm.page === "cart" 16433 ? _c("cart", { attrs: { order: _vm.order } }) 16434 : _vm._e(), 16435 _vm._v(" "), 16436 _vm.page === "order" 16437 ? _c("order", { attrs: { order: _vm.order } }) 16438 : _vm._e(), 16439 _vm._v(" "), 16440 _vm._m(3), 16441 _vm._v(" "), 16442 _vm._m(4), 16443 ], 16444 1 16445 ) 16446} 16447var staticRenderFns = [ 16448 function () { 16449 var _vm = this 16450 var _h = _vm.$createElement 16451 var _c = _vm._self._c || _h 16452 return _c( 16453 "a", 16454 { staticClass: "menu-left-logo", attrs: { href: "/store" } },
16455 [_c("img", { attrs: { src: "/static/img/logo.png" } })] 16456 ) 16457 }, 16458 function () { 16459 var _vm = this 16460 var _h = _vm.$createElement 16461 var _c = _vm._self._c || _h 16462 return _c("div", { staticClass: "menu-left-shop" }, [ 16463 _c("span", [_vm._v("магазин")]), 16464 ]) 16465 }, 16466 function () { 16467 var _vm = this 16468 var _h = _vm.$createElement 16469 var _c = _vm._self._c || _h 16470 return _c( 16471 "a", 16472 { 16473 staticClass: "exit tooltip-bottom", 16474 attrs: { href: "/", "data-title": "Ðа оÑновной ÑайÑ" }, 16475 }, 16476 [_c("span")] 16477 ) 16478 }, 16479 function () { 16480 var _vm = this 16481 var _h = _vm.$createElement 16482 var _c = _vm._self._c || _h 16483 return _c("div", { staticClass: "main-form" }, [ 16484 _c("div", { staticClass: "container" }, [ 16485 _c("div", { staticClass: "main-form-title" }, [ 16486 _vm._v("ÐÑли Ð²Ñ Ñ Ð¾ÑиÑе кÑпиÑÑ Ð±Ð¾Ð»ÐµÐµ ÑÑаÑÑй вÑпÑÑк ÐвÑоÑевÑ,"), 16487 _c("br"), 16488 _vm._v("заполниÑе заÑÐ²ÐºÑ â Ð¼Ñ Ñ Ð²Ð°Ð¼Ð¸ ÑвÑжемÑÑ"), 16489 ]), 16490 _vm._v(" "), 16491 _c("form", { attrs: { action: "" } }, [ 16492 _c("div", { staticClass: "main-form-item" }, [ 16493 _c("label", [_vm._v("Ðод")]), 16494 _vm._v(" "), 16495 _c("input", { attrs: { type: "text", placeholder: "1990" } }), 16496 ]), 16497 _vm._v(" "), 16498 _c("div", { staticClass: "main-form-item err" }, [ 16499 _c("label", [_vm._v("ÐомеÑ")]), 16500 _vm._v(" "), 16501 _c("input", { attrs: { type: "text", placeholder: "ÐÐ â1" } }), 16502 ]), 16503 _vm._v(" "), 16504 _c("div", { staticClass: "main-form-item" }, [ 16505 _c("label", [_vm._v("ÐмÑ")]), 16506 _vm._v(" "), 16507 _c("input", { attrs: { type: "text", placeholder: "ÐаÑе имÑ" } }), 16508 ]), 16509 _vm._v(" "), 16510 _c("div", { staticClass: "main-form-item" }, [ 16511 _c("label", [_vm._v("e-mail")]), 16512 _vm._v(" "), 16513 _c("input", { attrs: { type: "text", placeholder: "ÐаÑа поÑÑа" } }), 16514 ]), 16515 _vm._v(" "), 16516 _c("div", { staticClass: "main-form-button" }, [ 16517 _c("input", { 16518 staticClass: "button _border _light", 16519 attrs: { type: "submit", value: "ÐÑпÑавиÑÑ" }, 16520 }), 16521 ]), 16522 ]), 16523 ]), 16524 ]) 16525 }, 16526 function () { 16527 var _vm = this 16528 var _h = _vm.$createElement 16529 var _c = _vm._self._c || _h 16530 return _c("div", { staticClass: "main-form" }, [ 16531 _c("div", { staticClass: "container" }, [ 16532 _c("div", { staticClass: "main-form-title" }, [ 16533 _vm._v("СпаÑибо!"), 16534 _c("br"), 16535 _vm._v("ÐаÑа заÑвка оÑпÑавлена."), 16536 ]), 16537 ]), 16538 ]) 16539 }, 16540] 16541render._withStripped = true 16542 16543 16544 16545/***/ }), 16546 16547/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5&": 16548/*!*********************************************************************************************************************************************************************************************************************************************!*\ 16549 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Cart.vue?vue&type=template&id=1c46cea5& ***! 16550 \*********************************************************************************************************************************************************************************************************************************************/ 16551/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 16552 16553"use strict"; 16554__webpack_require__.r(__webpack_exports__); 16555/* harmony export */ __webpack_require__.d(__webpack_exports__, { 16556/* harmony export */ "render": () => (/* binding */ render), 16557/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 16558/* harmony export */ }); 16559var render = function () { 16560 var _vm = this 16561 var _h = _vm.$createElement 16562 var _c = _vm._self._c || _h 16563 return _c( 16564 "form", 16565 { 16566 staticClass: "order container", 16567 class: { loading: _vm.busy }, 16568 attrs: { autocomplete: "off" }, 16569 on: { 16570 submit: function ($event) { 16571 $event.preventDefault() 16572 return _vm.saveOrder($event) 16573 }, 16574 }, 16575 }, 16576 [ 16577 _vm.busy 16578 ? _c("div", { staticClass: "lds-ring" }, [ 16579 _c("div"), 16580 _c("div"), 16581 _c("div"), 16582 _c("div"), 16583 ]) 16584 : _vm._e(), 16585 _vm._v(" "), 16586 _c("div", { staticClass: "order-title" }, [_vm._v("ÐоÑзина")]), 16587 _vm._v(" "), 16588 _c( 16589 "div", 16590 { staticClass: "order-bag" }, 16591 [ 16592 _vm.order.items.length === 0 16593 ? _c("p", { staticStyle: { "margin-bottom": "150px" } }, [ 16594 _vm._v("ÐоÑзина пÑÑÑа."), 16595 ]) 16596 : _vm._e(), 16597 _vm._v(" "), 16598 _vm._l(_vm.order.items, function (item, index) { 16599 return _c( 16600 "div", 16601 { 16602 staticClass: "order-bag-item", 16603 attrs: { id: "item_" + item.id }, 16604 }, 16605 [ 16606 _c( 16607 "a", 16608 { 16609 staticClass: "order-bag-item_image", 16610 attrs: { href: "/store/item/" + item.id }, 16611 on: { 16612 click: function ($event) { 16613 $event.preventDefault() 16614 _vm.showItem(item) 16615 }, 16616 }, 16617 }, 16618 [_c("img", { attrs: { src: item.image } })] 16619 ), 16620 _vm._v(" "), 16621 _c("div", { staticClass: "order-bag-item_text" }, [ 16622 _c("a", { 16623 staticClass: "order-bag-item_text-title", 16624 attrs: { href: "/store/item/" + item.id }, 16625 domProps: { textContent: _vm._s(item.name) }, 16626 on: { 16627 click: function ($event) { 16628 $event.preventDefault() 16629 _vm.showItem(item) 16630 }, 16631 }, 16632 }), 16633 _vm._v(" "), 16634 typeof item.size !== "undefined" && item.size 16635 ? _c("div", { staticClass: "order-bag-item_text-text" }, [ 16636 _c("span", [ 16637 _vm._v("РазмеÑ: " + _vm._s(item.size.toUpperCase())), 16638 ]), 16639 ]) 16640 : _vm._e(), 16641 ]), 16642 _vm._v(" "), 16643 _c("div", { staticClass: "order-bag-item_coll" }, [ 16644 _c( 16645 "button", 16646 { 16647 staticClass: "quantity-arrow-minus", 16648 on: { 16649 click: function ($event) { 16650 $event.preventDefault() 16651 _vm.decrease(item, index) 16652 }, 16653 }, 16654 }, 16655 [_vm._v("â")] 16656 ), 16657 _vm._v(" "), 16658 _c("input", { 16659 staticClass: "quantity-num", 16660 attrs: { 16661 type: "number", 16662 min: "1", 16663 max: "20", 16664 disabled: "", 16665 }, 16666 domProps: { value: item.count }, 16667 }), 16668 _vm._v(" "), 16669 _c( 16670 "button", 16671 { 16672 staticClass: "quantity-arrow-plus", 16673 on: { 16674 click: function ($event) { 16675 $event.preventDefault() 16676 _vm.increase(item) 16677 }, 16678 }, 16679 }, 16680 [_vm._v("+")] 16681 ), 16682 ]), 16683 _vm._v(" "), 16684 _c("div", { staticClass: "order-bag-item_price" }, [ 16685 _c("span", { domProps: { textContent: _vm._s(item.total) } }), 16686 ]), 16687 _vm._v(" "), 16688 _c("a", { 16689 staticClass: "order-bag-item_link _js-delete tooltip-bottom", 16690 attrs: { href: "#", title: "УдалиÑÑ ÑоваÑ" }, 16691 on: { 16692 click: function ($event) { 16693 $event.preventDefault() 16694 _vm.remove(item, index) 16695 }, 16696 }, 16697 }), 16698 ] 16699 ) 16700 }), 16701 _vm._v(" "), 16702 this.order.items_cost > 0 16703 ? _c("div", { staticClass: "order-bag-item" }, [ 16704 _c("div", { staticClass: "order-bag-item_itog" }, [ 16705 _vm._v("Ðа ÑоваÑ"), 16706 _c( 16707 "span", 16708 { domProps: { textContent: _vm._s(_vm.order.items_cost) } }, 16709 [_vm._v("0")] 16710 ), 16711 ]), 16712 ]) 16713 : _vm._e(), 16714 ], 16715 2 16716 ), 16717 _vm._v(" "), 16718 !_vm.delivery_service && _vm.order.items.length !== 0 16719 ? _c("div", [ 16720 _c("div", { staticClass: "order-title delivery-service" }, [ 16721 _c("span", [_vm._v("ÐÑбеÑиÑе ÑпоÑоб доÑÑавки")]), 16722 _vm._v(" "), 16723 _c("img", { 16724 attrs: { 16725 src: "https://autoreview.ru/static/img/YD-Logo-Short.png", 16726 }, 16727 on: { 16728 click: function ($event) { 16729 _vm.delivery_service = "boxberry" 16730 }, 16731 }, 16732 }), 16733 _vm._v(" "), 16734 _c("img", { 16735 attrs: { 16736 src: "/static/img/WwRC73vQdmjyYz-FuqiKlHCMWdW2xv0P.
16736svg", 16737 }, 16738 on: { 16739 click: function ($event) { 16740 _vm.delivery_service = "cdek" 16741 }, 16742 }, 16743 }), 16744 ]), 16745 ]) 16746 : _vm._e(), 16747 _vm._v(" "), 16748 _vm.delivery_service 16749 ? _c("div", [ 16750 _c("div", { staticClass: "order-title" }, [ 16751 _c("span", { staticClass: "change-delivery" }, [ 16752 _vm.delivery_service === "boxberry" 16753 ? _c("img", { 16754 attrs: { 16755 src: "https://autoreview.ru/static/img/YD-Logo-Short.png", 16756 }, 16757 }) 16758 : _vm._e(), 16759 _vm._v(" "), 16760 _vm.delivery_service === "cdek" 16761 ? _c("img", { 16762 attrs: { 16763 src: "/static/img/WwRC73vQdmjyYz-FuqiKlHCMWdW2xv0P.svg", 16764 }, 16765 }) 16766 : _vm._e(), 16767 _vm._v(" "), 16768 _c("i", { on: { click: _vm.changeDeliveryService } }), 16769 ]), 16770 _vm._v(" "), 16771 _c("div", { staticClass: "order-title-button" }, [ 16772 _vm.delivery_service !== "boxberry" 16773 ? _c( 16774 "a", 16775 { 16776 class: { 16777 active: _vm.order.delivery_type === "courier", 16778 }, 16779 attrs: { href: "javascript:void(0);" }, 16780 on: { 16781 click: function ($event) { 16782 $event.preventDefault() 16783 _vm.resetDelivery() 16784 _vm.order.delivery_type = "courier" 16785 }, 16786 }, 16787 }, 16788 [_vm._v("Ðа дом")] 16789 ) 16790 : _vm._e(), 16791 _vm._v(" "), 16792 _c( 16793 "a", 16794 { 16795 class: { active: _vm.order.delivery_type === "pvz" }, 16796 attrs: { href: "javascript:void(0);" }, 16797 on: { 16798 click: function ($event) { 16799 $event.preventDefault() 16800 _vm.resetDelivery() 16801 _vm.order.delivery_type = "pvz" 16802 }, 16803 }, 16804 }, 16805 [_vm._v("СамовÑвоз")] 16806 ), 16807 ]), 16808 ]), 16809 _vm._v(" "), 16810 _c( 16811 "div", 16812 { 16813 directives: [ 16814 { 16815 name: "show", 16816 rawName: "v-show", 16817 value: _vm.order.delivery_type === "courier", 16818 expression: "order.delivery_type === 'courier'", 16819 }, 16820 ], 16821 staticClass: "order-order-grid", 16822 staticStyle: { "margin-bottom": "20px" }, 16823 }, 16824 [ 16825 _c( 16826 "div", 16827 { staticClass: "input", class: { err: _vm.isError("city") } }, 16828 [ 16829 _c("label", [_vm._v("ÐоÑод*")]), 16830 _vm._v(" "), 16831 _c("vue-simple-suggest", { 16832 ref: "city", 16833 staticClass: "autocomplete", 16834 attrs: { 16835 list: _vm.getCities, 16836 "value-attribute": "id", 16837 "display-attribute": "fullname", 16838 debounce: 200, 16839 }, 16840 on: { select: _vm.setCity, focus: _vm.unsetCity }, 16841 }), 16842 ], 16843 1 16844 ), 16845 _vm._v(" "), 16846 _c( 16847 "div", 16848 { 16849 staticClass: "input", 16850 class: { err: _vm.isError("street") }, 16851 }, 16852 [ 16853 _c("label", [_vm._v("УлиÑа*")]), 16854 _vm._v(" "), 16855 _c("vue-simple-suggest", { 16856 ref: "street", 16857 staticClass: "autocomplete", 16858 attrs: { 16859 list: _vm.getSteets, 16860 "value-attribute": "data.street_kladr_id", 16861 "display-attribute": "value", 16862 debounce: 200, 16863 }, 16864 on: { select: _vm.setStreet }, 16865 }), 16866 ], 16867 1 16868 ), 16869 _vm._v(" "), 16870 _c( 16871 "div", 16872 { 16873 staticClass: "input", 16874 class: { err: _vm.isError("house") }, 16875 }, 16876 [ 16877 _c("label", [_vm._v("Ðом*")]), 16878 _vm._v(" "), 16879 _c("input", { 16880 directives: [ 16881 { 16882 name: "model", 16883 rawName: "v-model", 16884 value: _vm.order.house, 16885 expression: "order.house", 16886 }, 16887 ], 16888 attrs: { type: "text" }, 16889 domProps: { value: _vm.order.house }, 16890 on: { 16891 input: function ($event) { 16892 if ($event.target.composing) { 16893 return 16894 } 16895 _vm.$set(_vm.order, "house", $event.target.value) 16896 }, 16897 }, 16898 }), 16899 ] 16900 ), 16901 _vm._v(" "), 16902 _c("div", { staticClass: "input" }, [ 16903 _c("label", [_vm._v("ÐваÑÑиÑа")]), 16904 _vm._v(" "), 16905 _c("input", { 16906 directives: [ 16907 { 16908 name: "model", 16909 rawName: "v-model", 16910 value: _vm.order.flat, 16911 expression: "order.flat", 16912 }, 16913 ], 16914 attrs: { type: "text" }, 16915 domProps: { value: _vm.order.flat }, 16916 on: { 16917 input: function ($event) { 16918 if ($event.target.composing) { 16919 return 16920 } 16921 _vm.$set(_vm.order, "flat", $event.target.value) 16922 }, 16923 }, 16924 }), 16925 ]), 16926 ] 16927 ), 16928 _vm._v(" "), 16929 _c( 16930 "div", 16931 { 16932 directives: [ 16933 { 16934 name: "show", 16935 rawName: "v-show", 16936 value: 16937 _vm.order.delivery_type === "pvz" && 16938 !_vm.delivery_calculated, 16939 expression: 16940 "order.delivery_type === 'pvz' && !delivery_calculated", 16941 }, 16942 ], 16943 staticClass: "order-sdek", 16944 }, 16945 [ 16946 _c("div", { staticClass: "order-sdek-title" }, [ 16947 _vm._v("ÐÑбеÑиÑе ближайÑий пÑÐ½ÐºÑ Ð²ÑдаÑи заказов"), 16948 ]), 16949 _vm._v(" "), 16950 _vm.delivery_service === "cdek" 16951 ? _c("div", { 16952 staticStyle: { 16953 width: "100%", 16954 height: "400px", 16955 margin: "20px 0", 16956 }, 16957 attrs: { id: "forpvz" }, 16958 }) 16959 : _vm._e(), 16960 _vm._v(" "), 16961 _vm.delivery_service === "boxberry" 16962 ? _c("div", { attrs: { id: "boxberry_map" } }) 16963 : _vm._e(), 16964 ] 16965 ), 16966 _vm._v(" "), 16967 _vm.delivery_calculated 16968 ? _c("div", { staticClass: "order-delivery" }, [ 16969 _c("p", [ 16970 _vm._v( 16971 "РаÑÑÐµÑ ÑÑоимоÑÑи доÑÑавки, оÑпÑавка поÑле 100% пÑедоплаÑÑ." 16972 ), 16973 ]), 16974 _vm._v(" "), 16975 _c("div", { staticClass: "order-delivery-grid" }, [ 16976 _c("p", [_vm._v("СÑоимоÑÑÑ Ð´Ð¾ÑÑавки")]), 16977 _vm._v(" "), 16978 _vm.order.delivery_type === "courier" 16979 ? _c("p", [ 16980 _c("span", { 16981 staticClass: "rub", 16982 domProps: { 16983 textContent: _vm._s(_vm.order.delivery_cost), 16984 }, 16985 }), 16986 _vm._v(" до адÑеÑа по наÑÐµÐ»ÐµÐ½Ð½Ð¾Ð¼Ñ Ð¿ÑнкÑÑ"), 16987 ]) 16988 : _vm._e(), 16989 _vm._v(" "), 16990 _vm.order.delivery_type === "pvz" 16991 ? _c("p", [ 16992 _c("span", { 16993 staticClass: "rub", 16994 domProps: { 16995 textContent: _vm._s(_vm.order.delivery_cost), 16996 }, 16997 }), 16998 _vm._v(" до пÑнкÑа ÑамовÑвоза"), 16999 ]) 17000 : _vm._e(), 17001 _vm._v(" "), 17002 _vm.order.delivery_type === "pvz" 17003 ? _c("p", [_vm._v("ÐÑÐ½ÐºÑ Ð²ÑдаÑи заказа:")]) 17004 : _vm._e(), 17005 _vm._v(" "), 17006 _vm.order.delivery_type === "pvz" 17007 ? _c("p", [ 17008 _c("span", { 17009 domProps: { 17010 textContent: _vm._s( 17011 "г. " + _vm.order.city + ", " + _vm.order.street 17012 ), 17013 }, 17014 }), 17015 _vm._v("\n ("), 17016 _c( 17017 "a", 17018 { 17019 attrs: { href: "#" }, 17020 on: { 17021 click: function ($event) { 17022 $event.preventDefault() 17023 return _vm.resetDelivery($event) 17024 }, 17025 }, 17026 }, 17027 [_vm._v("измениÑÑ")] 17028 ), 17029 _vm._v(")\n "), 17030 ]) 17031 : _vm._e(), 17032 _vm._v(" "), 17033 _c("p", [_vm._v("СÑок оÑгÑÑзки")]), 17034 _vm._v(" "), 17035 _c("p", [_vm._v("до 5 ÑабоÑÐ¸Ñ Ð´Ð½ÐµÐ¹")]), 17036 ]), 17037 _vm._v(" "), 17038 _c( 17039 "div", 17040 { 17041 staticClass: "order-order", 17042 staticStyle: { "margin-bottom": "15px" }, 17043 }, 17044 [ 17045 _c("div", { staticClass: "order-order-grid" }, [ 17046 _c( 17047 "div", 17048 { 17049 staticClass: "input", 17050 class: { err: _vm.isError("name") }, 17051 }, 17052 [ 17053 _c("label", [_vm._v("имÑ*")]), 17054 _vm._v(" "), 17055 _c("input", { 17056 directives: [ 17057 { 17058 name: "model", 17059 rawName: "v-model", 17060 value: _vm.order.name, 17061 expression: "order.name", 17062 }, 17063 ], 17064 attrs: { 17065 type: "text", 17066 name: "name", 17067 placeholder: "ÐаÑе имÑ", 17068 }, 17069 domProps: { value: _vm.order.name }, 17070 on: { 17071 input: function ($event) { 17072 if ($event.target.composing) { 17073 return 17074 } 17075 _vm.$set( 17076 _vm.order, 17077 "name", 17078 $event.target.value 17079 ) 17080 }, 17081 }, 17082 }), 17083 ] 17084 ), 17085 _vm._v(" "), 17086 _c( 17087 "div", 17088 { 17089 staticClass: "input", 17090 class: { err: _vm.isError("last_name") }, 17091 }, 17092 [ 17093 _c("label", [_vm._v("ÑамилиÑ*")]), 17094 _vm._v(" "), 17095 _c("input", { 17096 directives: [ 17097 { 17098 name: "model", 17099 rawName: "v-model", 17100 value: _vm.order.last_name, 17101 expression: "order.last_name", 17102 }, 17103 ], 17104 attrs: { 17105 type: "text", 17106 name: "last_name", 17107 placeholder: "ÐаÑа ÑамилиÑ", 17108 }, 17109 domProps: { value: _vm.order.last_name }, 17110 on: { 17111 input: function ($event) { 17112 if ($event.target.composing) { 17113 return 17114 } 17115 _vm.$set( 17116 _vm.order, 17117 "last_name", 17118 $event.target.value 17119 ) 17120 }, 17121 }, 17122 }), 17123 ] 17124 ), 17125 _vm._v(" "), 17126 _c( 17127 "div", 17128 { 17129 staticClass: "input", 17130 class: { err: _vm.isError("phone") }, 17131 }, 17132 [ 17133 _c("label", [_vm._v("ÑелеÑон*")]), 17134 _vm._v(" "), 17135 _c("the-mask", { 17136 attrs: { 17137 mask: "+7 (###) ###-##-##", 17138 type: "text", 17139 masked: "false", 17140 placeholder: "ÐÐ°Ñ ÑелеÑон", 17141 }, 17142 model: { 17143 value: _vm.order.phone, 17144 callback: function ($$v) { 17145 _vm.$set(_vm.order, "phone", $$v) 17146 }, 17147 expression: "order.phone", 17148 }, 17149 }), 17150 ], 17151
17151 1 17152 ), 17153 _vm._v(" "), 17154 _c( 17155 "div", 17156 { 17157 staticClass: "input", 17158 class: { err: _vm.isError("email") }, 17159 }, 17160 [ 17161 _c("label", [_vm._v("поÑÑа*")]), 17162 _vm._v(" "), 17163 _c("input", { 17164 directives: [ 17165 { 17166 name: "model", 17167 rawName: "v-model", 17168 value: _vm.order.email, 17169 expression: "order.email", 17170 }, 17171 ], 17172 attrs: { 17173 type: "text", 17174 name: "email", 17175 placeholder: "ÐаÑа поÑÑа", 17176 }, 17177 domProps: { value: _vm.order.email }, 17178 on: { 17179 input: function ($event) { 17180 if ($event.target.composing) { 17181 return 17182 } 17183 _vm.$set( 17184 _vm.order, 17185 "email", 17186 $event.target.value 17187 ) 17188 }, 17189 }, 17190 }), 17191 ] 17192 ), 17193 ]), 17194 ] 17195 ), 17196 _vm._v(" "), 17197 _c("div", { staticClass: "order-delivery-comment" }, [ 17198 _c("label", [_vm._v("ÐомменÑаÑий к заказÑ")]), 17199 _vm._v(" "), 17200 _c("textarea", { 17201 directives: [ 17202 { 17203 name: "model", 17204 rawName: "v-model", 17205 value: _vm.order.comment, 17206 expression: "order.comment", 17207 }, 17208 ], 17209 attrs: { name: "comment" }, 17210 domProps: { value: _vm.order.comment }, 17211 on: { 17212 input: function ($event) { 17213 if ($event.target.composing) { 17214 return 17215 } 17216 _vm.$set(_vm.order, "comment", $event.target.value) 17217 }, 17218 }, 17219 }), 17220 ]), 17221 _vm._v(" "), 17222 _c("div", { staticClass: "order-delivery-grid" }, [ 17223 _c("p", [_vm._v("СÑоимоÑÑÑ ÑоваÑа")]), 17224 _vm._v(" "), 17225 _c("p", { staticClass: "right" }, [ 17226 _c("span", { 17227 staticClass: "rub", 17228 domProps: { textContent: _vm._s(_vm.order.items_cost) }, 17229 }), 17230 ]), 17231 _vm._v(" "), 17232 _c("p", [_vm._v("СÑоимоÑÑÑ Ð´Ð¾ÑÑавки")]), 17233 _vm._v(" "), 17234 _c("p", { staticClass: "right" }, [ 17235 _c("span", { 17236 staticClass: "rub", 17237 domProps: { 17238 textContent: _vm._s(_vm.order.delivery_cost), 17239 }, 17240 }), 17241 ]), 17242 _vm._v(" "), 17243 _c("p", { staticClass: "itog" }, [_vm._v("ÐÑог")]), 17244 _vm._v(" "), 17245 _c("p", { staticClass: "itog right" }, [ 17246 _c("span", { 17247 staticClass: "rub", 17248 domProps: { textContent: _vm._s(_vm.order.total) }, 17249 }), 17250 ]), 17251 ]), 17252 _vm._v(" "), 17253 _c("div", { staticClass: "order-delivery-button" }, [ 17254 _c("input", { 17255 staticClass: "button _blue", 17256 class: { _disabled: _vm.order.items.length === 0 }, 17257 attrs: { type: "submit", value: "ÐплаÑиÑÑ" }, 17258 }), 17259 ]), 17260 _vm._v(" "), 17261 _vm._m(0), 17262 ]) 17263 : _vm._e(), 17264 ]) 17265 : _vm._e(), 17266 _vm._v(" "), 17267 !_vm.gameInCart && _vm.gameHint 17268 ? _c("div", { staticClass: "special active" }, [ 17269 _c( 17270 "i", 17271 { staticClass: "game-close", on: { click: _vm.gameClose } }, 17272 [_vm._v("Ã")] 17273 ), 17274 _vm._v(" "), 17275 _c("div", { staticClass: "special-wrapper" }, [ 17276 _c("div", { staticClass: "special-wrapper__content" }, [ 17277 _c("img", { attrs: { src: "/img/quiz.png", alt: "" } }), 17278 _vm._v(" "), 17279 _c("div", { staticClass: "text" }, [
17280 _c("h3", [_vm._v("ÐÑавиÑÑÑ ÐвÑоÑевÑ?")]), 17281 _vm._v(" "), 17282 _vm._m(1), 17283 _vm._v(" "), 17284 _c("div", { staticClass: "text-button" }, [ 17285 _c( 17286 "a", 17287 { 17288 staticClass: "btn", 17289 attrs: { href: "#" }, 17290 on: { 17291 click: function ($event) { 17292 $event.preventDefault() 17293 return _vm.addGame($event) 17294 }, 17295 }, 17296 }, 17297 [_vm._v("ÐобавиÑÑ")] 17298 ), 17299 _vm._v(" "), 17300 _c( 17301 "a", 17302 { 17303 attrs: { href: "#" }, 17304 on: { 17305 click: function ($event) { 17306 $event.preventDefault() 17307 return _vm.gameDisable($event) 17308 }, 17309 }, 17310 }, 17311 [_vm._v("Уже заказал")] 17312 ), 17313 ]), 17314 ]), 17315 ]), 17316 ]), 17317 ]) 17318 : _vm._e(), 17319 ] 17320 ) 17321} 17322var staticRenderFns = [ 17323 function () { 17324 var _vm = this 17325 var _h = _vm.$createElement 17326 var _c = _vm._self._c || _h 17327 return _c("p", { staticClass: "center" }, [ 17328 _vm._v("ÐÐ°Ð¶Ð¸Ð¼Ð°Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ Ð¿Ð¾Ð´ÑвеÑждениÑ, Ñ Ð¿ÑÐ¸Ð½Ð¸Ð¼Ð°Ñ ÑÑÐ»Ð¾Ð²Ð¸Ñ "), 17329 _c( 17330 "a", 17331 { 17332 attrs: { 17333 href: "https://autoreview.ru/ad/ÐÑеÑÑа магазина ÐвÑоÑевÑ.pdf", 17334 target: "_blank", 17335 }, 17336 }, 17337 [_vm._v("ÐÑеÑÑÑ")] 17338 ), 17339 ]) 17340 }, 17341 function () { 17342 var _vm = this 17343 var _h = _vm.$createElement 17344 var _c = _vm._self._c || _h 17345 return _c("p", [ 17346 _vm._v("ÐобавÑÑе в заказ наÑÑ"), 17347 _c("br"), 17348 _vm._v("каÑÑоÑнÑÑ Ð¸Ð³ÑÑ Ð¿Ñо авÑомобили!"), 17349 ]) 17350 }, 17351] 17352render._withStripped = true 17353 17354 17355 17356/***/ }), 17357 17358/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18&": 17359/*!*********************************************************************************************************************************************************************************************************************************************!*\ 17360 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Item.vue?vue&type=template&id=62129d18& ***! 17361 \*********************************************************************************************************************************************************************************************************************************************/ 17362/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 17363 17364"use strict"; 17365__webpack_require__.r(__webpack_exports__); 17366/* harmony export */ __webpack_require__.d(__webpack_exports__, { 17367/* harmony export */ "render": () => (/* binding */ render), 17368/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 17369/* harmony export */ }); 17370var render = function () { 17371 var _vm = this 17372 var _h = _vm.$createElement 17373 var _c = _vm._self._c || _h 17374 return _c("div", { staticClass: "page container" }, [ 17375 _c("div", { staticClass: "page-wrapper" }, [ 17376 _c("div", { staticClass: "page-wrapper-images" }, [ 17377 _c("div", { staticClass: "swiper-container gallery-top" }, [ 17378 _c( 17379 "div", 17380 { staticClass: "swiper-wrapper" }, 17381 [ 17382 _c( 17383 "a", 17384 { 17385 staticClass: "swiper-slide", 17386 attrs: { href: _vm.item.image }, 17387 }, 17388 [ 17389 _c("img", { 17390 staticStyle: { width: "100%" }, 17391 attrs: { src: _vm.item.image }, 17392 }), 17393 ] 17394 ), 17395 _vm._v(" "), 17396 _vm._l(_vm.item.images, function (image) { 17397 return _c( 17398 "a", 17399 { staticClass: "swiper-slide", attrs: { href: image } },
17400 [ 17401 _c("img", { 17402 staticStyle: { width: "100%" }, 17403 attrs: { src: image }, 17404 }), 17405 ] 17406 ) 17407 }), 17408 ], 17409 2 17410 ), 17411 ]), 17412 _vm._v(" "), 17413 _c("div", { staticClass: "swiper-shadow" }), 17414 _vm._v(" "), 17415 _vm.item.images.length > 1 17416 ? _c("div", { staticClass: "swiper-container gallery-thumbs" }, [ 17417 _c( 17418 "div", 17419 { staticClass: "swiper-wrapper" }, 17420 [ 17421 _c("div", { 17422 staticClass: "swiper-slide", 17423 style: { backgroundImage: "url(" + _vm.item.image + ")" }, 17424 }), 17425 _vm._v(" "), 17426 _vm._l(_vm.item.images, function (image) { 17427 return _c("div", { 17428 staticClass: "swiper-slide", 17429 style: { backgroundImage: "url(" + image + ")" }, 17430 }) 17431 }), 17432 ], 17433 2 17434 ), 17435 _vm._v(" "), 17436 _c("div", { 17437 staticClass: "swiper-button-next swiper-button-black", 17438 }), 17439 _vm._v(" "), 17440 _c("div", { 17441 staticClass: "swiper-button-prev swiper-button-black", 17442 }), 17443 ]) 17444 : _vm._e(), 17445 ]), 17446 _vm._v(" "), 17447 _c("div", { staticClass: "page-wrapper-content" }, [ 17448 _c("div", { 17449 staticClass: "page-wrapper-content_title", 17450 domProps: { textContent: _vm._s(_vm.item.name) }, 17451 }), 17452 _vm._v(" "), 17453 _c("div", { 17454 staticClass: "page-wrapper-content_text", 17455 domProps: { innerHTML: _vm._s(_vm.item.description) }, 17456 }), 17457 _vm._v(" "), 17458 _c("div", { staticClass: "page-wrapper-content_price" }, [ 17459 _c("span", { domProps: { textContent: _vm._s(_vm.item.price) } }), 17460 ]), 17461 _vm._v(" "), 17462 _c( 17463 "div", 17464 { 17465 staticClass: "page-wrapper-content_nalichee _green", 17466 class: [_vm.availability(_vm.item.availability)[0]], 17467 domProps: { 17468 textContent: _vm._s(_vm.availability(_vm.item.availability)[1]), 17469 }, 17470 }, 17471 [_vm._v("РналиÑии")] 17472 ), 17473 _vm._v(" "), 17474 Object.keys(_vm.item.sizes).length > 1 17475 ? _c("div", { staticClass: "page-wrapper-content_option" }, [ 17476 _c("div", { staticClass: "page-wrapper-content_option-item" }, [ 17477 _c("p", [_vm._v("РазмеÑ")]), 17478 _vm._v(" "), 17479 _c( 17480 "div", 17481 { staticClass: "size" }, 17482 _vm._l(_vm.item.sizes, function (size, id) { 17483 return _c( 17484 "label", 17485 { staticClass: "control tooltip-bottom" }, 17486 [ 17487 _c("input", { 17488 attrs: { type: "radio", name: "item_" + id }, 17489 domProps: { 17490 checked: _vm.item.id.toString() === id.toString(), 17491 }, 17492 }), 17493 _vm._v(" "), 17494 _c( 17495 "a", 17496 { 17497 staticClass: "control_indicator", 17498 attrs: { href: "/store/item/" + id }, 17499 }, 17500 [_vm._v(_vm._s(size))] 17501 ), 17502 ] 17503 ) 17504 }) 17505 ), 17506 ]), 17507 ]) 17508 : _vm._e(), 17509 _vm._v(" "), 17510 _vm.item.count > 0 17511 ? _c("div", { staticClass: "page-wrapper-content_button" }, [ 17512 _vm.$parent.inCart(_vm.item) 17513 ? _c( 17514 "a", 17515 { 17516 staticClass: "button _border _light _blue", 17517 attrs: { href: "/store/cart" }, 17518 on: { 17519 click: function ($event) { 17520 $event.stopPropagation() 17521 $event.preventDefault() 17522 _vm.$parent.show("cart") 17523 }, 17524 }, 17525 }, 17526 [_vm._v("РкоÑзине")] 17527 ) 17528 : _vm._e(), 17529 _vm._v(" "), 17530 !_vm.$parent.inCart(_vm.item) 17531 ? _c( 17532 "a", 17533 { 17534 staticClass: "button _border _light _blue", 17535 attrs: { href: "#" }, 17536 on: { 17537 click: function ($event) { 17538 $event.stopPropagation() 17539 $event.preventDefault() 17540 _vm.$parent.addToCart(_vm.item) 17541 }, 17542 }, 17543 }, 17544 [_vm._v("ÐÑпиÑÑ")] 17545 ) 17546 : _vm._e(), 17547 _vm._v(" "), 17548 _vm.$parent.inCart(_vm.item) 17549 ? _c( 17550 "a", 17551 { 17552 staticClass: "link", 17553 attrs: { href: "/store/cart" }, 17554 on: { 17555 click: function ($event) { 17556 $event.preventDefault() 17557 _vm.$parent.show("cart") 17558 }, 17559 }, 17560 },
17561 [_vm._v("ÐеÑейÑи к оплаÑе")] 17562 ) 17563 : _vm._e(), 17564 ]) 17565 : _vm._e(), 17566 _vm._v(" "), 17567 _vm.item.count <= 0 17568 ? _c("div", { staticClass: "page-wrapper-content_button" }, [ 17569 _c( 17570 "a", 17571 { 17572 staticClass: "button _border _light _gray", 17573 attrs: { href: "#" }, 17574 on: { 17575 click: function ($event) { 17576 $event.stopPropagation() 17577 $event.preventDefault() 17578 }, 17579 }, 17580 }, 17581 [_vm._v("ÐаконÑилиÑÑ")] 17582 ), 17583 ]) 17584 : _vm._e(), 17585 ]), 17586 ]), 17587 ]) 17588} 17589var staticRenderFns = [] 17590render._withStripped = true 17591 17592 17593 17594/***/ }), 17595 17596/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea&": 17597/*!**********************************************************************************************************************************************************************************************************************************************!*\ 17598 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Items.vue?vue&type=template&id=3826b1ea& ***! 17599 \**********************************************************************************************************************************************************************************************************************************************/ 17600/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 17601 17602"use strict"; 17603__webpack_require__.r(__webpack_exports__); 17604/* harmony export */ __webpack_require__.d(__webpack_exports__, { 17605/* harmony export */ "render": () => (/* binding */ render), 17606/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 17607/* harmony export */ }); 17608var render = function () { 17609 var _vm = this 17610 var _h = _vm.$createElement 17611 var _c = _vm._self._c || _h 17612 return _c("div", { staticClass: "main container" }, [ 17613 _c( 17614 "div", 17615 { staticClass: "main-wrapper" }, 17616 [ 17617 _vm._l(_vm.items, function (item, index) { 17618 return _c( 17619 "a", 17620 { 17621 staticClass: "main-wrapper-item", 17622 class: { new: item.new }, 17623 attrs: { href: "/store/item/" + item.id }, 17624 on: { 17625 click: function ($event) { 17626 $event.stopPropagation() 17627 $event.preventDefault() 17628 _vm.$parent.showItem(item) 17629 }, 17630 }, 17631 }, 17632 [ 17633 _c( 17634 "div", 17635 { 17636 staticClass: "main-wrapper-item_images", 17637 style: { filter: item.count === 0 ? "grayscale(1)" : "none" }, 17638 }, 17639 [_c("img", { attrs: { src: item.image } })] 17640 ), 17641 _vm._v(" "), 17642 _c("div", { 17643 staticClass: "main-wrapper-item_title", 17644 domProps: { textContent: _vm._s(item.name) }, 17645 }), 17646 _vm._v(" "), 17647 _c("div", { staticClass: "main-wrapper-item_price" }, [ 17648 _c("span", { domProps: { textContent: _vm._s(item.price) } }), 17649 ]), 17650 _vm._v(" "), 17651 _c("object", [ 17652 _vm.$parent.inCart(item) && item.count > 0 17653 ? _c( 17654 "button", 17655 { 17656 staticClass: "button _border _light _blue", 17657 on: { 17658 click: function ($event) { 17659 $event.stopPropagation() 17660 $event.preventDefault() 17661 _vm.$parent.show("cart") 17662 }, 17663 }, 17664 }, 17665 [_vm._v("РкоÑзине")] 17666 ) 17667 : _vm._e(), 17668 _vm._v(" "), 17669 !_vm.$parent.inCart(item) && item.count > 0 17670 ? _c( 17671 "button", 17672 { 17673 staticClass: "button _border _light _blue", 17674 on: { 17675 click: function ($event) { 17676 $event.stopPropagation() 17677 $event.preventDefault() 17678 _vm.$parent.addToCart(item) 17679 }, 17680 }, 17681 }, 17682 [_vm._v("ÐÑпиÑÑ")] 17683 ) 17684 : _vm._e(), 17685 _vm._v(" "), 17686 item.count <= 0 17687 ? _c( 17688 "button", 17689 { 17690 staticClass: "button _border _light _gray", 17691 on: { 17692 click: function ($event) { 17693 $event.stopPropagation() 17694 $event.preventDefault() 17695 }, 17696 }, 17697 }, 17698 [_vm._v("ÐаконÑилиÑÑ")] 17699 ) 17700 : _vm._e(), 17701 ]), 17702 ] 17703 ) 17704 }), 17705 _vm._v(" "), 17706 _vm.last_page > _vm.page 17707 ? _c( 17708 "a", 17709 { 17710 staticClass: "button _border _light main-button _last", 17711 staticStyle: { "grid-column-end": "3" }, 17712 attrs: { href: "#" }, 17713 on: { 17714 click: function ($event) { 17715 $event.preventDefault() 17716 return _vm.more($event) 17717 }, 17718 }, 17719 }, 17720 [_vm._v("ÐоказаÑÑ ÐµÑÑ")] 17721 ) 17722 : _vm._e(), 17723 ], 17724 2 17725 ), 17726 ]) 17727} 17728var staticRenderFns = [] 17729render._withStripped = true 17730 17731 17732 17733/***/ }), 17734 17735/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec&": 17736/*!**********************************************************************************************************************************************************************************************************************************************!*\ 17737 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Merch.vue?vue&type=template&id=865b68ec& ***! 17738 \**********************************************************************************************************************************************************************************************************************************************/ 17739/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 17740 17741"use strict"; 17742__webpack_require__.r(__webpack_exports__); 17743/* harmony export */ __webpack_require__.d(__webpack_exports__, { 17744/* harmony export */ "render": () => (/* binding */ render), 17745/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 17746/* harmony export */ }); 17747var render = function () { 17748 var _vm = this 17749 var _h = _vm.$createElement 17750 var _c = _vm._self._c || _h 17751 return _c("div", { staticClass: "main container" }, [ 17752 _c( 17753 "div", 17754 { staticClass: "main-wrapper" }, 17755 [ 17756 _vm._l(_vm.items, function (item, index) { 17757 return _c( 17758 "a", 17759 { 17760 staticClass: "main-wrapper-item", 17761 class: { new: index === 0 }, 17762 attrs: { href: "/store/item/" + item.id }, 17763 on: { 17764 click: function ($event) { 17765 $event.stopPropagation() 17766 $event.preventDefault() 17767 _vm.$parent.showItem(item) 17768 }, 17769 }, 17770 }, 17771 [ 17772 _c( 17773 "div", 17774 { 17775 staticClass: "main-wrapper-item_images", 17776 style: { filter: item.count === 0 ? "grayscale(1)" : "none" }, 17777 }, 17778 [_c("img", { attrs: { src: item.image } })] 17779 ), 17780 _vm._v(" "), 17781 _c("div", { 17782 staticClass: "main-wrapper-item_title", 17783 domProps: { textContent: _vm._s(item.name) }, 17784 }), 17785 _vm._v(" "), 17786 _c("div", { staticClass: "main-wrapper-item_price" }, [ 17787 _c("span", { domProps: { textContent: _vm._s(item.price) } }), 17788 ]), 17789 _vm._v(" "), 17790 _c("object", [ 17791 _vm.$parent.inCart(item) && item.count > 0 17792 ? _c( 17793 "button", 17794 { 17795 staticClass: "button _border _light _blue", 17796 on: { 17797 click: function ($event) { 17798 $event.stopPropagation() 17799 $event.preventDefault() 17800 _vm.$parent.show("cart") 17801 }, 17802 }, 17803 }, 17804 [_vm._v("РкоÑзине")] 17805 ) 17806 : _vm._e(), 17807 _vm._v(" "), 17808 !_vm.$parent.inCart(item) && item.count > 0 17809 ? _c( 17810 "button", 17811 { 17812 staticClass: "button _border _light _blue", 17813 on: { 17814 click: function ($event) { 17815 $event.stopPropagation() 17816 $event.preventDefault() 17817 _vm.$parent.addToCart(item) 17818 }, 17819 }, 17820 }, 17821 [_vm._v("ÐÑпиÑÑ")] 17822 ) 17823 : _vm._e(), 17824 _vm._v(" "), 17825 item.count <= 0 17826 ? _c( 17827 "button", 17828 { 17829 staticClass: "button _border _light _gray", 17830 on: { 17831 click: function ($event) { 17832 $event.stopPropagation() 17833 $event.preventDefault() 17834 }, 17835 }, 17836 }, 17837 [_vm._v("ÐаконÑилиÑÑ")] 17838 ) 17839 : _vm._e(), 17840 ]), 17841 ] 17842 ) 17843 }), 17844 _vm._v(" "), 17845 _vm.page !== _vm.last_page 17846 ? _c( 17847 "a", 17848 { 17849 staticClass: "main-wrapper-item _last", 17850 attrs: { href: "#" }, 17851 on: { 17852 click: function ($event) { 17853 $event.preventDefault() 17854 return _vm.more($event) 17855 }, 17856 }, 17857 }, 17858 [_vm._v("ÐоказаÑÑ ÐµÑÑ")] 17859 ) 17860 : _vm._e(), 17861 ], 17862 2 17863 ), 17864 ]) 17865} 17866var staticRenderFns = [] 17867render._withStripped = true 17868 17869 17870 17871/***/ }), 17872 17873/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99&": 17874/*!**********************************************************************************************************************************************************************************************************************************************!*\ 17875 !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/desktop/components/Store/Desktop/Order.vue?vue&type=template&id=4b29cf99& ***! 17876 \**********************************************************************************************************************************************************************************************************************************************/ 17877/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 17878 17879"use strict"; 17880__webpack_require__.r(__webpack_exports__); 17881/* harmony export */ __webpack_require__.d(__webpack_exports__, { 17882/* harmony export */ "render": () => (/* binding */ render), 17883/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) 17884/* harmony export */ }); 17885var render = function () { 17886 var _vm = this 17887 var _h = _vm.$createElement 17888 var _c = _vm._self._c || _h 17889 return _c( 17890 "form", 17891 { 17892 staticClass: "order container", 17893 class: { loading: _vm.busy }, 17894 attrs: { autocomplete: "off" }, 17895 on: { 17896 submit: function ($event) { 17897 $event.preventDefault() 17898 return _vm.yandexCheckout($event) 17899 }, 17900 }, 17901 }, 17902 [ 17903 _vm.busy 17904 ? _c("div", { staticClass: "lds-ring" }, [ 17905 _c("div"), 17906 _c("div"), 17907 _c("div"), 17908 _c("div"), 17909 ]) 17910 : _vm._e(), 17911 _vm._v(" "), 17912 !_vm.order.cdek_id 17913 ? _c("div", { 17914 staticClass: "order-title", 17915 domProps: { textContent: _vm._s("Ðаказ #" + _vm.order.invoice) }, 17916 }) 17917 : _vm._e(), 17918 _vm._v(" "), 17919 _vm.order.cdek_id && !_vm.order.paid 17920 ? _c("div", { 17921 staticClass: "order-title", 17922 domProps: { 17923 textContent: _vm._s( 17924 "Ðаказ #" + _vm.order.invoice + " (ÐÐ¶Ð¸Ð´Ð°ÐµÑ Ð¾Ð¿Ð»Ð°ÑÑ)" 17925 ), 17926 }, 17927 }) 17928 : _vm._e(), 17929 _vm._v(" "), 17930 _vm.order.paid 17931 ? _c("div", { 17932 staticClass: "order-title", 17933 domProps: { 17934 textContent: _vm._s("Ðаказ #" + _vm.order.invoice + " (ÐплаÑен)"), 17935 }, 17936 }) 17937 : _vm._e(), 17938 _vm._v(" "), 17939 _c( 17940 "div", 17941 { staticClass: "order-bag" }, 17942 [ 17943 _vm._l(_vm.order.items, function (item, index) { 17944 return _c("div", { staticClass: "order-bag-item" }, [ 17945 _c( 17946 "a", 17947 { 17948 staticClass: "order-bag-item_image", 17949 attrs: { href: "#" }, 17950 on: { 17951 click: function ($event) { 17952 $event.preventDefault() 17953 _vm.showItem(item) 17954 }, 17955 }, 17956 }, 17957 [_c("img", { attrs: { src: item.image } })] 17958 ), 17959 _vm._v(" "), 17960 _c("div", { staticClass: "order-bag-item_text" }, [ 17961 _c("a", { 17962 staticClass: "order-bag-item_text-title", 17963 attrs: { href: "#" }, 17964 domProps: { textContent: _vm._s(item.name) }, 17965 on: { 17966 click: function ($event) { 17967 $event.preventDefault() 17968 _vm.showItem(item) 17969 }, 17970 }, 17971 }), 17972 ]), 17973 _vm._v(" "), 17974 _c("div", { staticClass: "order-bag-item_coll" }, [ 17975 _c("input", { 17976 staticClass: "quantity-num", 17977 attrs: { disabled: "" }, 17978 domProps: { value: item.count + " ÑÑ" }, 17979 }), 17980 ]), 17981 _vm._v(" "), 17982 _c("div", { staticClass: "order-bag-item_price" }, [ 17983 _c("span", { domProps: { textContent: _vm._s(item.total) } }), 17984 ]), 17985 ]) 17986 }), 17987 _vm._v(" "), 17988 _c("div", { staticClass: "order-bag-item" }, [ 17989 _c("div", { staticClass: "order-bag-item_itog" }, [ 17990 _vm._v("ÐÑого"), 17991 _c( 17992 "span", 17993 { domProps: { textContent: _vm._s(_vm.orde
17993r.total) } }, 17994 [_vm._v("0")] 17995 ), 17996 ]), 17997 ]), 17998 ], 17999 2 18000 ), 18001 _vm._v(" "), 18002 _c("div", { staticClass: "order-title" }, [ 18003 _c("span", [_vm._v("ÐоÑÑавка")]), 18004 _vm._v(" "), 18005 _c("div", { staticClass: "order-title-button" }, [ 18006 _c( 18007 "a", 18008 { 18009 class: { active: _vm.order.delivery_type === "courier" }, 18010 attrs: { href: "javascript:void(0);" }, 18011 on: { 18012 click: function ($event) { 18013 $event.preventDefault() 18014 }, 18015 }, 18016 }, 18017 [_vm._v("Ðа дом")] 18018 ), 18019 _vm._v(" "), 18020 _c( 18021 "a", 18022 { 18023 class: { active: _vm.order.delivery_type === "pvz" }, 18024 attrs: { href: "javascript:void(0);" }, 18025 on: { 18026 click: function ($event) { 18027 $event.preventDefault() 18028 }, 18029 }, 18030 }, 18031 [_vm._v("СамовÑвоз")] 18032 ), 18033 ]), 18034 ]), 18035 _vm._v(" "), 18036 _c("div", { staticClass: "order-delivery" }, [ 18037 _vm.order.delivery_type === "courier" 18038 ? _c("div", { staticClass: "order-delivery-grid" }, [ 18039 _c("p", [_vm._v("СÑоимоÑÑÑ Ð´Ð¾ÑÑавки:")]), 18040 _vm._v(" "), 18041 _c("p", [ 18042 _c("span", { 18043 staticClass: "rub", 18044 domProps: { textContent: _vm._s(_vm.order.delivery_cost) }, 18045 }), 18046 _vm._v(" до адÑеÑа по наÑÐµÐ»ÐµÐ½Ð½Ð¾Ð¼Ñ Ð¿ÑнкÑÑ"), 18047 ]), 18048 _vm._v(" "), 18049 _c("p", [_vm._v("ÐдÑÐµÑ Ð´Ð¾ÑÑавки:")]), 18050 _vm._v(" "), 18051 _c("p", [ 18052 _c("span", { 18053 domProps: { 18054 textContent: _vm._s( 18055 "г. " + 18056 _vm.order.city + 18057 ", " + 18058 _vm.order.street + 18059 ", " + 18060 _vm.order.house 18061 ), 18062 }, 18063 }), 18064 _vm._v(" "), 18065 _vm.order.flat 18066 ? _c("span", { 18067 domProps: { textContent: _vm._s(_vm.order.flat) }, 18068 }) 18069 : _vm._e(), 18070 ]), 18071 _vm._v(" "), 18072 _vm.order.paid 18073 ? _c("p", [_vm._v("ÐÐ¾Ð¼ÐµÑ Ð¾ÑÑлеживаниÑ")]) 18074 : _vm._e(), 18075 _vm._v(" "), 18076 _vm.order.paid 18077 ? _c("p", [ 18078 _c("span", [ 18079 _vm.order.delivery_service === "boxberry" 18080 ? _c("a", { 18081 staticClass: "cdek-track", 18082 attrs: { 18083 href: 18084 "https://boxberry.ru/tracking-page?id=" + 18085 _vm.order.cdek_id, 18086 }, 18087 domProps: { 18088 textContent: _vm._s(_vm.order.cdek_id), 18089 }, 18090 }) 18091 : _vm._e(), 18092 _vm._v(" "), 18093 _vm.order.delivery_service === "cdek" 18094 ? _c("a", { 18095 staticClass: "cdek-track", 18096 attrs: { 18097 href: 18098 "https://www.cdek.ru/track.html?order_id=" + 18099 _vm.order.cdek_id, 18100 }, 18101 domProps: { 18102 textContent: _vm._s(_vm.order.cdek_id), 18103 }, 18104 }) 18105 : _vm._e(), 18106 ]), 18107 ]) 18108 : _vm._e(), 18109 _vm._v(" "), 18110 _c("p", [_vm._v("ÐолÑÑаÑелÑ:")]), 18111 _vm._v(" "), 18112 _c("p", { 18113 domProps: { 18114 textContent: _vm._s( 18115 _vm.order.name + " " + _vm.order.last_name 18116 ), 18117 }, 18118 }), 18119 _vm._v(" "), 18120 _c("p", [_vm._v("ТелеÑон:")]), 18121 _vm._v(" "), 18122 _c("p", { domProps: { textContent: _vm._s(_vm.order.phone) } }), 18123 _vm._v(" "), 18124 _vm.order.email ? _c("p", [_vm._v("E-mail:")]) : _vm._e(), 18125 _vm._v(" "), 18126 _vm.order.email 18127 ? _c("p", { 18128 domProps: { textContent: _vm._s(_vm.order.email) }, 18129 }) 18130 : _vm._e(), 18131 ]) 18132 : _vm._e(), 18133 _vm._v(" "), 18134 _vm.order.delivery_type === "pvz" 18135 ? _c("div", { staticClass: "order-delivery-grid" }, [ 18136 _c("p", [_vm._v("СÑоимоÑÑÑ Ð´Ð¾ÑÑавки:")]), 18137 _vm._v(" "), 18138 _c("p", [ 18139 _c("span", { 18140 staticClass: "rub", 18141 domProps: { textContent: _vm._s(_vm.order.delivery_cost) }, 18142 }), 18143 _vm._v(" до пÑнкÑа ÑамовÑвоза"), 18144 ]), 18145 _vm._v(" "), 18146 _c("p", [_vm._v("ÐÑÐ½ÐºÑ Ð²ÑдаÑи заказа:")]), 18147 _vm._v(" "), 18148 _c("p", [ 18149 _c("span", { 18150 domProps: { 18151 textContent: _vm._s( 18152 "г. " + _vm.order.city + ", " + _vm.order.street 18153 ), 18154 }, 18155 }), 18156 ]), 18157 _vm._v(" "), 18158 _vm.order.paid 18159 ? _c("p", [_vm._v("ÐÐ¾Ð¼ÐµÑ Ð¾ÑÑлеживаниÑ")]) 18160 : _vm._e(), 18161 _vm._v(" "), 18162 _vm.order.paid 18163 ? _c("p", [ 18164 _c("span", [ 18165 _vm.order.delivery_service === "boxberry" 18166 ? _c("a", { 18167 staticClass: "cdek-track", 18168 attrs: { 18169 href: 18170 "https://boxberry.ru/tracking-page?id=" + 18171 _vm.order.cdek_id, 18172 }, 18173 domProps: { 18174 textContent: _vm._s(_vm.order.cdek_id), 18175 }, 18176 }) 18177 : _vm._e(), 18178 _vm._v(" "), 18179 _vm.order.delivery_service === "cdek" 18180 ? _c("a", { 18181 staticClass: "cdek-track", 18182 attrs: { 18183 href: 18184 "https://www.cdek.ru/track.html?order_id=" + 18185 _vm.order.cdek_id, 18186 }, 18187 domProps: { 18188 textContent: _vm._s(_vm.order.cdek_id), 18189 }, 18190 }) 18191 : _vm._e(), 18192 ]), 18193 ]) 18194 : _vm._e(), 18195 _vm._v(" "), 18196 _c("p", [_vm._v("ÐолÑÑаÑелÑ:")]), 18197 _vm._v(" "), 18198 _c("p", { 18199 domProps: { 18200 textContent: _vm._s( 18201 _vm.order.name + " " + _vm.order.last_name 18202 ), 18203 }, 18204 }), 18205 _vm._v(" "), 18206 _c("p", [_vm._v("ТелеÑон:")]), 18207 _vm._v(" "), 18208 _c("p", { domProps: { textContent: _vm._s(_vm.order.phone) } }), 18209 _vm._v(" "), 18210 _vm.order.email ? _c("p", [_vm._v("E-mail:")]) : _vm._e(), 18211 _vm._v(" "), 18212 _vm.order.email 18213 ? _c("p", { 18214 domProps: { textContent: _vm._s(_vm.order.email) }, 18215 }) 18216 : _vm._e(), 18217 ]) 18218 : _vm._e(), 18219 _vm._v(" "), 18220 _c("div", { staticClass: "order-delivery-grid" }, [ 18221 _c("p", [_vm._v("СÑоимоÑÑÑ ÑоваÑа")]), 18222 _vm._v(" "), 18223 _c("p", { staticClass: "right" }, [ 18224 _c("span", { 18225 staticClass: "rub", 18226 domProps: { textContent: _vm._s(_vm.items_cost) }, 18227 }), 18228 ]), 18229 _vm._v(" "), 18230 _c("p", [_vm._v("СÑоимоÑÑÑ Ð´Ð¾ÑÑавки")]), 18231 _vm._v(" "), 18232 _c("p", { staticClass: "right" }, [ 18233 _c("span", { 18234 staticClass: "rub", 18235 domProps: { textContent: _vm._s(_vm.order.delivery_cost) }, 18236 }), 18237 ]), 18238 _vm._v(" "), 18239 _c("p", { staticClass: "itog" }, [_vm._v("ÐÑог")]), 18240 _vm._v(" "), 18241 _c("p", { staticClass: "itog right" }, [ 18242 _c("span", { 18243 staticClass: "rub", 18244 domProps: { textContent: _vm._s(_vm.total) }, 18245 }), 18246 ]), 18247 ]), 18248 _vm._v(" "), 18249 !_vm.order.paid 18250 ? _c("div", [_vm._m(0), _vm._v(" "), _vm._m(1)]) 18251 : _vm._e(), 18252 ]), 18253 ] 18254 ) 18255} 18256var staticRenderFns = [ 18257 function () { 18258 var _vm = this 18259 var _h = _vm.$createElement 18260 var _c = _vm._self._c || _h 18261 return _c("div", { staticClass: "order-delivery-button" }, [ 18262 _c("input", { 18263 staticClass: "button _blue", 18264 attrs: { type: "submit", value: "ÐплаÑиÑÑ" }, 18265 }), 18266 ]) 18267 }, 18268 function () { 18269 var _vm = this 18270 var _h = _vm.$createElement 18271 var _c = _vm._self._c || _h 18272 return _c("p", { staticClass: "center" }, [ 18273 _vm._v("ÐÐ°Ð¶Ð¸Ð¼Ð°Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ Ð¿Ð¾Ð´ÑвеÑждениÑ, Ñ Ð¿ÑÐ¸Ð½Ð¸Ð¼Ð°Ñ ÑÑÐ»Ð¾Ð²Ð¸Ñ Ð¿Ð¾Ð»Ð¸Ñики "), 18274 _c("a", { attrs: { href: "/rules", target: "_blank" } }, [ 18275 _vm._v("обÑабоÑки пеÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ "), 18276 ]), 18277 ]) 18278 }, 18279] 18280render._withStripped = true 18281 18282 18283 18284/***/ }), 18285
vendor: 3,365 bytes, lines 18286-18398
18286/***/ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js": 18287/*!********************************************************************!*\ 18288 !*** ./node_modules/vue-loader/lib/runtime/componentNormalizer.js ***! 18289 \********************************************************************/ 18290/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 18291 18292"use strict"; 18293__webpack_require__.r(__webpack_exports__); 18294/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18295/* harmony export */ "default": () => (/* binding */ normalizeComponent) 18296/* harmony export */ }); 18297/* globals __VUE_SSR_CONTEXT__ */ 18298 18299// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). 18300// This module is a runtime utility for cleaner component module output and will 18301// be included in the final webpack user bundle. 18302 18303function normalizeComponent ( 18304 scriptExports, 18305 render, 18306 staticRenderFns, 18307 functionalTemplate, 18308 injectStyles, 18309 scopeId, 18310 moduleIdentifier, /* server only */ 18311 shadowMode /* vue-cli only */ 18312) { 18313 // Vue.extend constructor export interop 18314 var options = typeof scriptExports === 'function' 18315 ? scriptExports.options 18316 : scriptExports 18317 18318 // render functions 18319 if (render) { 18320 options.render = render 18321 options.staticRenderFns = staticRenderFns 18322 options._compiled = true 18323 } 18324 18325 // functional template 18326 if (functionalTemplate) { 18327 options.functional = true 18328 } 18329 18330 // scopedId 18331 if (scopeId) { 18332 options._scopeId = 'data-v-' + scopeId 18333 } 18334 18335 var hook 18336 if (moduleIdentifier) { // server build 18337 hook = function (context) { 18338 // 2.3 injection 18339 context = 18340 context || // cached call 18341 (this.$vnode && this.$vnode.ssrContext) || // stateful 18342 (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional 18343 // 2.2 with runInNewContext: true 18344 if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { 18345 context = __VUE_SSR_CONTEXT__ 18346 } 18347 // inject component styles 18348 if (injectStyles) { 18349 injectStyles.call(this, context) 18350 } 18351 // register component module identifier for async chunk inferrence 18352 if (context && context._registeredComponents) { 18353 context._registeredComponents.add(moduleIdentifier) 18354 } 18355 } 18356 // used by ssr in case component is cached and beforeCreate 18357 // never gets called 18358 options._ssrRegister = hook 18359 } else if (injectStyles) { 18360 hook = shadowMode 18361 ? function () { 18362 injectStyles.call( 18363 this, 18364 (options.functional ? this.parent : this).$root.$options.shadowRoot 18365 ) 18366 } 18367 : injectStyles 18368 } 18369 18370 if (hook) { 18371 if (options.functional) { 18372 // for template-only hot-reload because in that case the render fn doesn't 18373 // go through the normalizer 18374 options._injectStyles = hook 18375 // register for functional component in vue file 18376 var originalRender = options.render 18377 options.render = function renderWithStyleInjection (h, context) { 18378 hook.call(context) 18379 return originalRender(h, context) 18380 } 18381 } else { 18382 // inject component registration as beforeCreate hook 18383 var existing = options.beforeCreate 18384 options.beforeCreate = existing 18385 ? [].concat(existing, hook) 18386 : [hook] 18387 } 18388 } 18389 18390 return { 18391 exports: scriptExports, 18392 options: options 18393 } 18394} 18395 18396 18397/***/ }), 18398
vendor: 21,671 bytes, lines 18399-19098
18399/***/ "./node_modules/vue-simple-suggest/dist/es6.js": 18400/*!*****************************************************!*\ 18401 !*** ./node_modules/vue-simple-suggest/dist/es6.js ***! 18402 \*****************************************************/ 18403/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 18404 18405"use strict"; 18406__webpack_require__.r(__webpack_exports__); 18407/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18408/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 18409/* harmony export */ }); 18410/* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js"); 18411const defaultControls = { 18412 selectionUp: [38], 18413 selectionDown: [40], 18414 select: [13], 18415 hideList: [27], 18416 showList: [40], 18417 autocomplete: [32, 13] 18418}; 18419 18420const modes = { 18421 input: String, 18422 select: Object 18423}; 18424 18425function fromPath(obj, path) { 18426 return path.split('.').reduce((o, i) => o === Object(o) ? o[i] : o, obj); 18427} 18428 18429function hasKeyCode(arr, event) { 18430 return hasKeyCodeByCode(arr, event.keyCode); 18431} 18432 18433function hasKeyCodeByCode(arr, keyCode) { 18434 if (arr.length <= 0) return false; 18435 18436 const has = arr => arr.some(code => code === keyCode); 18437 if (Array.isArray(arr[0])) { 18438 return arr.some(array => has(array)); 18439 } else { 18440 return has(arr); 18441 } 18442} 18443 18444function _await(value, then, direct) { 18445 if (direct) { 18446 return then ? then(value) : value; 18447 }if (!value || !value.then) { 18448 value = Promise.resolve(value); 18449 }return then ? value.then(then) : value; 18450}function _async(f) { 18451 return function () { 18452 for (var args = [], i = 0; i < arguments.length; i++) { 18453 args[i] = arguments[i]; 18454 }try { 18455 return Promise.resolve(f.apply(this, args)); 18456 } catch (e) { 18457 return Promise.reject(e); 18458 } 18459 }; 18460}function _empty() {}function _awaitIgnored(value, direct) { 18461 if (!direct) { 18462 return value && value.then ? value.then(_empty) : Promise.resolve(); 18463 } 18464}function _invoke(body, then) { 18465 var result = body();if (result && result.then) { 18466 return result.then(then); 18467 }return then(result); 18468}function _invokeIgnored(body) { 18469 var result = body();if (result && result.then) { 18470 return result.then(_empty); 18471 } 18472} 18473function _catch(body, recover) { 18474 try { 18475 var result = body(); 18476 } catch (e) { 18477 return recover(e); 18478 }if (result && result.then) { 18479 return result.then(void 0, recover); 18480 }return result; 18481}function _finally(body, finalizer) { 18482 try { 18483 var result = body(); 18484 } catch (e) { 18485 return finalizer(); 18486 }if (result && result.then) { 18487 return result.then(finalizer, finalizer); 18488 }return finalizer(); 18489}var VueSimpleSuggest = { 18490 render: function () { 18491 var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "vue-simple-suggest", class: [_vm.styles.vueSimpleSuggest, { designed: !_vm.destyled, focus: _vm.isInFocus }], on: { "keydown": function ($event) { 18492 if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) { 18493 return null; 18494 }_vm.isTabbed = true; 18495 } } }, [_c('div', { ref: "inputSlot", staticClass: "input-wrapper", class: _vm.styles.inputWrapper, attrs: { "role": "combobox", "aria-haspopup": "listbox", "aria-owns": _vm.listId, "aria-expanded": !!_vm.listShown && !_vm.removeList ? 'true' : 'false' } }, [_vm._t("default", [_c('input', _vm._b({ staticClass: "default-input", class: _vm.styles.defaultInput, domProps: { "value": _vm.text || '' } }, 'input', _vm.$attrs, false))])], 2), _vm._v(" "), _c('transition', { attrs: { "name": "vue-simple-suggest" } }, [!!_vm.listShown && !_vm.removeList ? _c('ul', { staticClass: "suggestions", class: _vm.styles.suggestions, attrs: { "id": _vm.listId, "role": "listbox", "aria-labelledby": _vm.listId } }, [!!this.$scopedSlots['misc-item-above'] ? _c('li', { class: _vm.styles.miscItemAbove }, [_vm._t("misc-item-above", null, { "suggestions": _vm.suggestions, "query": _vm.text })], 2) : _vm._e(), _vm._v(" "), _vm._l(_vm.suggestions, function (suggestion, index) { 18496 return _c('li', { key: _vm.getId(suggestion, index), staticClass: "suggest-item", class: [_vm.styles.suggestItem, { 18497 selected: _vm.isSelected(suggestion), 18498 hover: _vm.isHovered(suggestion) 18499 }], attrs: { "role": "option", "aria-selected": _vm.isHovered(suggestion) || _vm.isSelected(suggestion) ? 'true' : 'false', "id": _vm.getId(suggestion, index) }, on: { "mouseenter": function ($event) { 18500 return _vm.hover(suggestion, $event.target); 18501 }, "mouseleave": function ($event) { 18502 return _vm.hover(undefined); 18503 }, "click": function ($event) { 18504 return _vm.suggestionClick(suggestion, $event); 18505 } } }, [_vm._t("suggestion-item", [_c('span', [_vm._v(_vm._s(_vm.displayProperty(suggestion)))])], { "autocomplete": function () { 18506 return _vm.autocompleteText(suggestion); 18507 }, "suggestion": suggestion, "query": _vm.text })], 2); 18508 }), _vm._v(" "), !!this.$scopedSlots['misc-item-below'] ? _c('li', { class: _vm.styles.miscItemBelow }, [_vm._t("misc-item-below", null, { "suggestions": _vm.suggestions, "query": _vm.text })], 2) : _vm._e()], 2) : _vm._e()])], 1); 18509 }, 18510 staticRenderFns: [], 18511 name: 'vue-simple-suggest', 18512 inheritAttrs: false, 18513 model: { 18514 prop: 'value', 18515 event: 'input' 18516 }, 18517 props: { 18518 styles: { 18519 type: Object, 18520 default: () => ({}) 18521 }, 18522 controls: { 18523 type: Object, 18524 default: () => defaultControls 18525 }, 18526 minLength: { 18527 type: Number, 18528 default: 1 18529 }, 18530 maxSuggestions: { 18531 type: Number, 18532 default: 10 18533 }, 18534 displayAttribute: { 18535 type: String, 18536 default: 'title' 18537 }, 18538 valueAttribute: { 18539 type: String, 18540 default: 'id' 18541 }, 18542 list: { 18543 type: [Function, Array], 18544 default: () => [] 18545 }, 18546 removeList: { 18547 type: Boolean, 18548 default: false 18549 }, 18550 destyled: { 18551 type: Boolean, 18552 default: false 18553 }, 18554 filterByQuery: { 18555 type: Boolean, 18556 default: false 18557 }, 18558 filter: { 18559 type: Function, 18560 default(el, value) { 18561 return value ? ~this.displayProperty(el).toLowerCase().indexOf(value.toLowerCase()) : true; 18562 } 18563 }, 18564 debounce: { 18565 type: Number, 18566 default: 0 18567 }, 18568 nullableSelect: { 18569 type: Boolean, 18570 default: false 18571 }, 18572 value: {}, 18573 mode: { 18574 type: String, 18575 default: 'input', 18576 validator: value => !!~Object.keys(modes).indexOf(value.toLowerCase()) 18577 }, 18578 preventHide: { 18579 type: Boolean, 18580 default: false 18581 } 18582 }, 18583 // Handle run-time mode changes (now working): 18584 watch: { 18585 mode: { 18586 handler(current, old) { 18587 this.constructor.options.model.event = current; 18588 18589 // Can be null if the component is root 18590 this.$parent && this.$parent.$forceUpdate(); 18591 18592 this.$nextTick(() => { 18593 if (current === 'input') { 18594 this.$emit('input', this.text); 18595 } else { 18596 this.$emit('select', this.selected); 18597 } 18598 }); 18599 }, 18600 immediate: true 18601 }, 18602 value: { 18603 handler(current) { 18604 if (typeof current !== 'string') { 18605 current = this.displayProperty(current); 18606 } 18607 this.updateTextOutside(current); 18608 }, 18609 immediate: true 18610 } 18611 }, 18612 // 18613 data() { 18614 return { 18615 selected: null, 18616 hovered: null, 18617 suggestions: [], 18618 listShown: false, 18619 inputElement: null, 18620 canSend: true, 18621 timeoutInstance: null, 18622 text: this.value, 18623 isPlainSuggestion: false, 18624 isClicking: false, 18625 isInFocus: false, 18626 isFalseFocus: false, 18627 isTabbed: false, 18628 controlScheme: {}, 18629 listId: `${this._uid}-suggestions` 18630 }; 18631 }, 18632 computed: { 18633 listIsRequest() { 18634 return typeof this.list === 'function'; 18635 }, 18636 inputIsComponent() { 18637 return this.$slots.default && this.$slots.default.length > 0 && !!this.$slots.default[0].componentInstance; 18638 }, 18639 input() { 18640 return this.inputIsComponent ? this.$slots.default[0].componentInstance : this.inputElement; 18641 }, 18642 on() { 18643 return this.inputIsComponent ? '$on' : 'addEventListener'; 18644 }, 18645 off() { 18646 return this.inputIsComponent ? '$off' : 'removeEventListener'; 18647 }, 18648 hoveredIndex() { 18649 for (let i = 0; i < this.suggestions.length; i++) { 18650 const el = this.suggestions[i]; 18651 if (this.hovered && this.valueProperty(this.hovered) == this.valueProperty(el)) { 18652 return i; 18653 } 18654 } 18655 return -1; 18656 }, 18657 textLength() { 18658 return this.text && this.text.length || this.inputElement.value.length || 0; 18659 }, 18660 isSelectedUpToDate() { 18661 return !!this.selected && this.displayProperty(this.selected) === this.text; 18662 } 18663 }, 18664 created() { 18665 this.controlScheme = Object.assign({}, defaultControls, this.controls); 18666 }, 18667 mounted: _async(function () { 18668 const _this = this; 18669 18670 return _await(_this.$slots.default, function () { 18671 18672 _this.$nextTick(() => { 18673 _this.inputElement = _this.$refs['inputSlot'].querySelector('input'); 18674 18675 if (_this.inputElement) { 18676 _this.setInputAriaAttributes(); 18677 _this.prepareEventHandlers(true); 18678 } else { 18679 console.error('No input element found'); 18680 } 18681 }); 18682 }); 18683 }), 18684 18685 beforeDestroy() { 18686 this.prepareEventHandlers(false); 18687 }, 18688 methods: { 18689 isEqual(suggestion, item) { 18690 return item && this.valueProperty(suggestion) == this.valueProperty(item); 18691 }, 18692 isSelected(suggestion) { 18693 return this.isEqual(suggestion, this.selected); 18694 }, 18695 isHovered(suggestion) { 18696 return this.isEqual(suggestion, this.hovered); 18697 }, 18698 setInputAriaAttributes() { 18699 this.inputElement.setAttribute('aria-activedescendant', ''); 18700 this.inputElement.setAttribute('aria-autocomplete', 'list'); 18701 this.inputElement.setAttribute('aria-controls', this.listId); 18702 }, 18703 prepareEventHandlers(enable) { 18704 const binder = this[enable ? 'on' : 'off']; 18705 const keyEventsList = { 18706 click: this.showSuggestions, 18707 keydown: this.onKeyDown, 18708 keyup: this.onListKeyUp 18709 }; 18710 const eventsList = Object.assign({ 18711 blur: this.onBlur, 18712 focus: this.onFocus, 18713 input: this.onInput 18714 }, keyEventsList); 18715 18716 for (const event in eventsList) { 18717 this.input[binder](event, eventsList[event]); 18718 } 18719 18720 const listenerBinder = enable ? 'addEventListener' : 'removeEventListener'; 18721 18722 for (const event in keyEventsList) { 18723 this.inputElement[listenerBinder](event, keyEventsList[event]); 18724 } 18725 }, 18726 isScopedSlotEmpty(slot) { 18727 if (slot) { 18728 const vNode = slot(this); 18729 return !(Array.isArray(vNode) || vNode && (vNode.tag || vNode.context || vNode.text || vNode.children)); 18730 } 18731 18732 return true; 18733 }, 18734 miscSlotsAreEmpty() { 18735 const slots = ['misc-item-above', 'misc-item-below'].map(s => this.$scopedSlots[s]); 18736 18737 if (slots.every(s => !!s)) { 18738 return slots.every(this.isScopedSlotEmpty.bind(this)); 18739 } 18740 18741 const slot = slots.find(s => !!s); 18742 18743 return this.isScopedSlotEmpty.call(this, slot); 18744 }, 18745 getPropertyByAttribute(obj, attr) { 18746 return this.isPlainSuggestion ? obj : typeof obj !== undefined ? fromPath(obj, attr) : obj; 18747 }, 18748 displayProperty(obj) { 18749 if (this.isPlainSuggestion) { 18750 return obj; 18751 } 18752 18753 let display = this.getPropertyByAttribute(obj, this.displayAttribute); 18754 18755 if (typeof display === 'undefined') { 18756 display = JSON.stringify(obj); 18757 18758 if (process && ~"development".indexOf('dev')) { 18759 console.warn('[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.'); 18760 } 18761 } 18762 18763 return String(display || ''); 18764 }, 18765 valueProperty(obj) { 18766 if (this.isPlainSuggestion) { 18767 return obj; 18768 } 18769 18770 const value = this.getPropertyByAttribute(obj, this.valueAttribute); 18771 18772 if (typeof value === 'undefined') { 18773 console.error(`[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly. 18774 Your list objects should always contain a unique identifier.`); 18775 } 18776 18777 return value; 18778 }, 18779 18780 autocompleteText(suggestion) { 18781 this.setText(this.displayProperty(suggestion)); 18782 }, 18783 setText(text) { 18784 this.$nextTick(() => { 18785 this.inputElement.value = text; 18786 this.text = text; 18787 this.$emit('input', text); 18788 }); 18789 }, 18790 select(item) { 18791 if (this.selected !== item || this.nullableSelect && !item) { 18792 this.selected = item; 18793 this.$emit('select', item); 18794 18795 if (item) { 18796 this.autocompleteText(item); 18797 } 18798 } 18799 18800 this.hover(null); 18801 }, 18802 hover(item, elem) { 18803 const elemId = !!item ? this.getId(item, this.hoveredIndex) : ''; 18804 18805 this.inputElement.setAttribute('aria-activedescendant', elemId); 18806 18807 if (item && item !== this.hovered) { 18808 this.$emit('hover', item, elem); 18809 } 18810 18811 this.hovered = item; 18812 }, 18813 hideList() { 18814 if (this.listShown) { 18815 this.listShown = false; 18816 this.hover(null); 18817 this.$emit('hide-list'); 18818 } 18819 }, 18820 showList() { 18821 if (!this.listShown) { 18822 if (this.textLength >= this.minLength && (this.suggestions.length > 0 || !this.miscSlotsAreEmpty())) { 18823 this.listShown = true; 18824 this.$emit('show-list'); 18825 } 18826 } 18827 }, 18828 showSuggestions: _async(function () { 18829 const _this2 = this; 18830 18831 return _invoke(function () { 18832 if (_this2.suggestions.length === 0 && _this2.minLength <= _this2.textLength) { 18833 // try show misc slots while researching 18834 _this2.showList(); 18835 return _awaitIgnored(_this2.research()); 18836 } 18837 }, function () { 18838 18839 _this2.showList(); 18840 }); 18841 }), 18842 18843 onShowList(e) { 18844 if (hasKeyCode(this.controlScheme.showList, e)) { 18845 this.showSuggestions(); 18846 } 18847 }, 18848 moveSelection(e) { 18849 if (!this.listShown || !this.suggestions.length) return; 18850 if (hasKeyCode([this.controlScheme.selectionUp, this.controlScheme.selectionDown], e)) { 18851 e.preventDefault(); 18852 18853 const isMovingDown = hasKeyCode(this.controlScheme.selectionDown, e); 18854 const direction = isMovingDown * 2 - 1; 18855 const listEdge = isMovingDown ? 0 : this.suggestions.length - 1; 18856 const hoversBetweenEdges = isMovingDown ? this.hoveredIndex < this.suggestions.length - 1 : this.hoveredIndex > 0; 18857 18858 let item = null; 18859 18860 if (!this.hovered) { 18861 item = this.selected || this.suggestions[listEdge]; 18862 } else if (hoversBetweenEdges) { 18863 item = this.suggestions[this.hoveredIndex + direction]; 18864 } else /* if hovers on edge */{ 18865 item = this.suggestions[listEdge]; 18866 } 18867 this.hover(item); 18868 } 18869 }, 18870 onKeyDown(e) { 18871 const select = this.controlScheme.select, 18872 hideList = this.controlScheme.hideList; 18873 18874 // prevent form submit on keydown if Enter key registered in the keyup list 18875 if (e.key === 'Enter' && this.listShown && hasKeyCodeByCode([select, hideList], 13)) { 18876 e.preventDefault(); 18877 } 18878 18879 if (e.key === 'Tab' && this.hovered) { 18880 this.select(this.hovered); 18881 } 18882 18883 this.onShowList(e); 18884 this.moveSelection(e); 18885 this.onAutocomplete(e); 18886 }, 18887 onListKeyUp(e) { 18888 const select = this.controlScheme.select, 18889 hideList = this.controlScheme.hideList; 18890 18891 if (this.listShown && hasKeyCode([select, hideList], e)) { 18892 e.preventDefault(); 18893 if (hasKeyCode(select, e)) { 18894 this.select(this.hovered); 18895 } 18896 18897 this.hideList(); 18898 } 18899 }, 18900 onAutocomplete(e) { 18901 if (hasKeyCode(this.controlScheme.autocomplete, e) && (e.ctrlKey || e.shiftKey) && this.suggestions.length > 0 && this.suggestions[0] && this.listShown) { 18902 e.preventDefault(); 18903 this.hover(this.suggestions[0]); 18904 this.autocompleteText(this.suggestions[0]); 18905 } 18906 }, 18907 suggestionClick(suggestion, e) { 18908 this.$emit('suggestion-click', suggestion, e); 18909 this.select(suggestion); 18910 18911 if (!this.preventHide) this.hideList(); 18912 18913 if (this.isClicking) { 18914 setTimeout(() => { 18915 this.inputElement.focus(); 18916 18917 /// Ensure, that all needed flags are off before finishing the click. 18918 this.isClicking = false; 18919 }, 0); 18920 } 18921 }, 18922 onBlur(e) { 18923 if (this.isInFocus) { 18924 18925 /// Clicking starts here, because input's blur occurs before the suggestionClick 18926 /// and exactly when the user clicks the mouse button or taps the screen. 18927 this.isClicking = this.hovered && !this.isTabbed; 18928 18929 if (!this.isClicking) { 18930 this.isInFocus = false; 18931 this.hideList(); 18932 18933 this.$emit('blur', e); 18934 } else if (e && e.isTrusted && !this.isTabbed) { 18935 this.isFalseFocus = true; 18936 } 18937 } else { 18938 this.inputElement.blur(); 18939 console.error(`This should never happen! 18940 If you encountered this error, please make sure that your input component emits 'focus' events properly. 18941 For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input. 18942 18943 If your 'vue-simple-suggest' setup does not include a custom input component - please, 18944 report to https://github.com/KazanExpress/vue-simple-suggest/issues/new`); 18945 } 18946 18947 this.isTabbed = false; 18948 }, 18949 onFocus(e) { 18950 this.isInFocus = true; 18951 18952 // Only emit, if it was a native input focus 18953 if (e && !this.isFalseFocus) { 18954 this.$emit('focus', e); 18955 } 18956 18957 // Show list only if the item has not been clicked (isFalseFocus indicates that click was made earlier) 18958 if (!this.isClicking && !this.isFalseFocus) { 18959 this.showSuggestions(); 18960 } 18961 18962 this.isFalseFocus = false; 18963 }, 18964 onInput(inputEvent) { 18965 const value = !inputEvent.target ? inputEvent : inputEvent.target.value; 18966 18967 this.updateTextOutside(value); 18968 this.$emit('input', value); 18969 }, 18970 updateTextOutside(value) { 18971 if (this.text === value) { 18972 return; 18973 } 18974 18975 this.text = value; 18976 if (this.hovered) this.hover(null); 18977 18978 if (this.text.length < this.minLength) { 18979 this.hideList(); 18980 return; 18981 } 18982 18983 if (this.debounce) { 18984 clearTimeout(this.timeoutInstance); 18985 this.timeoutInstance = setTimeout(this.research, this.debounce); 18986 } else { 18987 this.research(); 18988 } 18989 }, 18990 research: _async(function () { 18991 const _this3 = this; 18992 18993 return _finally(function () { 18994 return _catch(function () { 18995 return _invokeIgnored(function () { 18996 if (_this3.canSend) { 18997 _this3.canSend = false; 18998 // @TODO: fix when promises will be cancelable (never :D) 18999 let textBeforeRequest = _this3.text; 19000 return _await(_this3.getSuggestions(_this3.text), function (newList) { 19001 if (textBeforeRequest === _this3.text) { 19002 _this3.$set(_this3, 'suggestions', newList); 19003 } 19004 }); 19005 } 19006 }); 19007 }, function (e) { 19008 _this3.clearSuggestions(); 19009 throw e; 19010 }); 19011 }, function () { 19012 _this3.canSend = true; 19013 19014 if (_this3.suggestions.length === 0 && _this3.miscSlotsAreEmpty()) { 19015 _this3.hideList(); 19016 } else if (_this3.isInFocus) { 19017 _this3.showList(); 19018 } 19019 19020 return _this3.suggestions; 19021 }); 19022 }), 19023 getSuggestions: _async(function (value) { 19024 const _this4 = this; 19025 19026 value = value || ''; 19027 19028 if (value.length < _this4.minLength) { 19029 return []; 19030 } 19031 19032 _this4.selected = null; 19033 19034 // Start request if can 19035 if (_this4.listIsRequest) { 19036 _this4.$emit('request-start', value); 19037 } 19038 19039 let nextIsPlainSuggestion = false; 19040 let result = []; 19041 return _finally(function () { 19042 return _catch(function () { 19043 return _invoke(function () { 19044 if (_this4.listIsRequest) { 19045 return _await(_this4.list(value), function (_this4$list) { 19046 result = _this4$list || []; 19047 }); 19048 } else { 19049 result = _this4.list; 19050 } 19051 }, function () { 19052 19053 // IFF the result is not an array (just in case!) - make it an array 19054 if (!Array.isArray(result)) { 19055 result = [result]; 19056 } 19057 19058 nextIsPlainSuggestion = typeof result[0] !== 'object' && typeof result[0] !== 'undefined' || Array.isArray(result[0]); 19059 19060 if (_this4.filterByQuery) { 19061 result = result.filter(el => _this4.filter(el, value)); 19062 } 19063 19064 if (_this4.listIsRequest) { 19065 _this4.$emit('request-done', result); 19066 } 19067 }); 19068 }, function (e) { 19069 if (_this4.listIsRequest) { 19070 _this4.$emit('request-failed', e); 19071 } else { 19072 throw e; 19073 } 19074 }); 19075 }, function () { 19076 if (_this4.maxSuggestions) { 19077 result.splice(_this4.maxSuggestions); 19078 } 19079 19080 _this4.isPlainSuggestion = nextIsPlainSuggestion; 19081 return result; 19082 }); 19083 }), 19084 19085 clearSuggestions() { 19086 this.suggestions.splice(0); 19087 }, 19088 getId(value, i) { 19089 return `${this.listId}-suggestion-${this.isPlainSuggestion ? i : this.valueProperty(value) || i}`; 19090 } 19091 } 19092}; 19093 19094/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VueSimpleSuggest); 19095 19096 19097/***/ }), 19098
vendor: 4,862 bytes, lines 19099-19108
19099/***/ "./node_modules/vue-the-mask/dist/vue-the-mask.js": 19100/*!********************************************************!*\ 19101 !*** ./node_modules/vue-the-mask/dist/vue-the-mask.js ***! 19102 \********************************************************/ 19103/***/ (function(module) { 19104 19105(function(e,t){ true?module.exports=t():0})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=10)}([function(e,t){e.exports={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleLowerCase()}},"!":{escape:!0}}},function(e,t,n){"use strict";function r(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var a=n(2),o=n(0),i=n.n(o);t.a=function(e,t){var o=t.value;if((Array.isArray(o)||"string"==typeof o)&&(o={mask:o,tokens:i.a}),"INPUT"!==e.tagName.toLocaleUpperCase()){var u=e.getElementsByTagName("input");if(1!==u.length)throw new Error("v-mask directive requires 1 input, found "+u.length);e=u[0]}e.oninput=function(t){if(t.isTrusted){var i=e.selectionEnd,u=e.value[i-1];for(e.value=n.i(a.a)(e.value,o.mask,!0,o.tokens);i<e.value.length&&e.value.charAt(i-1)!==u;)i++;e===document.activeElement&&(e.setSelectionRange(i,i),setTimeout(function(){e.setSelectionRange(i,i)},0)),e.dispatchEvent(r("input"))}};var s=n.i(a.a)(e.value,o.mask,!0,o.tokens);s!==e.value&&(e.value=s,e.dispatchEvent(r("input")))}},function(e,t,n){"use strict";var r=n(6),a=n(5);t.a=function(e,t){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments[3];return Array.isArray(t)?n.i(a.a)(r.a,t,i)(e,t,o,i):n.i(r.a)(e,t,o,i)}},function(e,t,n){"use strict";function r(e){e.component(s.a.name,s.a),e.directive("mask",i.a)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n.n(a),i=n(1),u=n(7),s=n.n(u);n.d(t,"TheMask",function(){return s.a}),n.d(t,"mask",function(){return i.a}),n.d(t,"tokens",function(){return o.a}),n.d(t,"version",function(){return c});var c="0.11.1";t.default=r,"undefined"!=typeof window&&window.Vue&&window.Vue.use(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(0),o=n.n(a),i=n(2);t.default={name:"TheMask",props:{value:[String,Number],mask:{type:[String,Array],required:!0},masked:{type:Boolean,default:!1},tokens:{type:Object,default:function(){return o.a}}},directives:{mask:r.a},data:function(){return{lastValue:null,display:this.value}},watch:{value:function(e){e!==this.lastValue&&(this.display=e)},masked:function(){this.refresh(this.display)}},computed:{config:function(){return{mask:this.mask,tokens:this.tokens,masked:this.masked}}},methods:{onInput:function(e){e.isTrusted||this.refresh(e.target.value)},refresh:function(e){this.display=e;var e=n.i(i.a)(e,this.mask,this.masked,this.tokens);e!==this.lastValue&&(this.lastValue=e,this.$emit("input",e))}}}},function(e,t,n){"use strict";function r(e,t,n){return t=t.sort(function(e,t){return e.length-t.length}),function(r,a){for(var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=0;i<t.length;){var u=t[i];i++;var s=t[i];if(!(s&&e(r,s,!0,n).length>u.length))return e(r,u,o,n)}return""}}t.a=r},function(e,t,n){"use strict";function r(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments[3];e=e||"",t=t||"";for(var a=0,o=0,i="";a<t.length&&o<e.length;){var u=t[a],s=r[u],c=e[o];s&&!s.escape?(s.pattern.test(c)&&(i+=s.transform?s.transform(c):c,a++),o++):(s&&s.escape&&(a++,u=t[a]),n&&(i+=u),c===u&&o++,a++)}for(var f="";a<t.length&&n;){var u=t[a];if(r[u]){f="";break}f+=u,a++}return i+f}t.a=r},function(e,t,n){var r=n(8)(n(4),n(9),null,null);e.exports=r.exports},function(e,t){e.exports=function(e,t,n,r){var a,o=e=e||{},i=typeof e.default;"object"!==i&&"function"!==i||(a=e,o=e.default);var u="function"==typeof o?o.options:o;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),n&&(u._scopeId=n),r){var s=u.computed||(u.computed={});Object.keys(r).forEach(function(e){var t=r[e];s[e]=function(){return t}})}return{esModule:a,exports:o,options:u}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"mask",rawName:"v-mask",value:e.config,expression:"config"}],attrs:{type:"text"},domProps:{value:e.display},on:{input:e.onInput}})},staticRenderFns:[]}},function(e,t,n){e.exports=n(3)}])}); 19106 19107/***/ }), 19108
vendor: 288,662 bytes, lines 19109-30065
19109/***/ "./node_modules/vue/dist/vue.esm.js": 19110/*!******************************************!*\ 19111 !*** ./node_modules/vue/dist/vue.esm.js ***! 19112 \******************************************/ 19113/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 19114 19115"use strict"; 19116__webpack_require__.r(__webpack_exports__); 19117/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19118/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 19119/* harmony export */ }); 19120/*! 19121 * Vue.js v2.5.16 19122 * (c) 2014-2018 Evan You 19123 * Released under the MIT License. 19124 */ 19125/* */ 19126 19127var emptyObject = Object.freeze({}); 19128 19129// these helpers produces better vm code in JS engines due to their 19130// explicitness and function inlining 19131function isUndef (v) { 19132 return v === undefined || v === null 19133} 19134 19135function isDef (v) { 19136 return v !== undefined && v !== null 19137} 19138 19139function isTrue (v) { 19140 return v === true 19141} 19142 19143function isFalse (v) { 19144 return v === false 19145} 19146 19147/** 19148 * Check if value is primitive 19149 */ 19150function isPrimitive (value) { 19151 return ( 19152 typeof value === 'string' || 19153 typeof value === 'number' || 19154 // $flow-disable-line 19155 typeof value === 'symbol' || 19156 typeof value === 'boolean' 19157 ) 19158} 19159 19160/** 19161 * Quick object check - this is primarily used to tell 19162 * Objects from primitive values when we know the value 19163 * is a JSON-compliant type. 19164 */ 19165function isObject (obj) { 19166 return obj !== null && typeof obj === 'object' 19167} 19168 19169/** 19170 * Get the raw type string of a value e.g. [object Object] 19171 */ 19172var _toString = Object.prototype.toString; 19173 19174function toRawType (value) { 19175 return _toString.call(value).slice(8, -1) 19176} 19177 19178/** 19179 * Strict object type check. Only returns true 19180 * for plain JavaScript objects. 19181 */ 19182function isPlainObject (obj) { 19183 return _toString.call(obj) === '[object Object]' 19184} 19185 19186function isRegExp (v) { 19187 return _toString.call(v) === '[object RegExp]' 19188} 19189 19190/** 19191 * Check if val is a valid array index. 19192 */ 19193function isValidArrayIndex (val) { 19194 var n = parseFloat(String(val)); 19195 return n >= 0 && Math.floor(n) === n && isFinite(val) 19196} 19197 19198/** 19199 * Convert a value to a string that is actually rendered. 19200 */ 19201function toString (val) { 19202 return val == null 19203 ? '' 19204 : typeof val === 'object' 19205 ? JSON.stringify(val, null, 2) 19206 : String(val) 19207} 19208 19209/** 19210 * Convert a input value to a number for persistence. 19211 * If the conversion fails, return original string. 19212 */ 19213function toNumber (val) { 19214 var n = parseFloat(val); 19215 return isNaN(n) ? val : n 19216} 19217 19218/** 19219 * Make a map and return a function for checking if a key 19220 * is in that map. 19221 */ 19222function makeMap ( 19223 str, 19224 expectsLowerCase 19225) { 19226 var map = Object.create(null); 19227 var list = str.split(','); 19228 for (var i = 0; i < list.length; i++) { 19229 map[list[i]] = true; 19230 } 19231 return expectsLowerCase 19232 ? function (val) { return map[val.toLowerCase()]; } 19233 : function (val) { return map[val]; } 19234} 19235 19236/** 19237 * Check if a tag is a built-in tag. 19238 */ 19239var isBuiltInTag = makeMap('slot,component', true); 19240 19241/** 19242 * Check if a attribute is a reserved attribute. 19243 */ 19244var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); 19245 19246/** 19247 * Remove an item from an array 19248 */ 19249function remove (arr, item) { 19250 if (arr.length) { 19251 var index = arr.indexOf(item); 19252 if (index > -1) { 19253 return arr.splice(index, 1) 19254 } 19255 } 19256} 19257 19258/** 19259 * Check whether the object has the property. 19260 */ 19261var hasOwnProperty = Object.prototype.hasOwnProperty; 19262function hasOwn (obj, key) { 19263 return hasOwnProperty.call(obj, key) 19264} 19265 19266/** 19267 * Create a cached version of a pure function. 19268 */ 19269function cached (fn) { 19270 var cache = Object.create(null); 19271 return (function cachedFn (str) { 19272 var hit = cache[str]; 19273 return hit || (cache[str] = fn(str)) 19274 }) 19275} 19276 19277/** 19278 * Camelize a hyphen-delimited string. 19279 */ 19280var camelizeRE = /-(\w)/g; 19281var camelize = cached(function (str) { 19282 return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) 19283}); 19284 19285/** 19286 * Capitalize a string. 19287 */ 19288var capitalize = cached(function (str) { 19289 return str.charAt(0).toUpperCase() + str.slice(1) 19290}); 19291 19292/** 19293 * Hyphenate a camelCase string. 19294 */ 19295var hyphenateRE = /\B([A-Z])/g; 19296var hyphenate = cached(function (str) { 19297 return str.replace(hyphenateRE, '-$1').toLowerCase() 19298}); 19299 19300/** 19301 * Simple bind polyfill for environments that do not support it... e.g. 19302 * PhantomJS 1.x. Technically we don't need this anymore since native bind is 19303 * now more performant in most browsers, but removing it would be breaking for 19304 * code that was able to run in PhantomJS 1.x, so this must be kept for 19305 * backwards compatibility. 19306 */ 19307 19308/* istanbul ignore next */ 19309function polyfillBind (fn, ctx) { 19310 function boundFn (a) { 19311 var l = arguments.length; 19312 return l 19313 ? l > 1 19314 ? fn.apply(ctx, arguments) 19315 : fn.call(ctx, a) 19316 : fn.call(ctx) 19317 } 19318 19319 boundFn._length = fn.length; 19320 return boundFn 19321} 19322 19323function nativeBind (fn, ctx) { 19324 return fn.bind(ctx) 19325} 19326 19327var bind = Function.prototype.bind 19328 ? nativeBind 19329 : polyfillBind; 19330 19331/** 19332 * Convert an Array-like object to a real Array. 19333 */ 19334function toArray (list, start) { 19335 start = start || 0; 19336 var i = list.length - start; 19337 var ret = new Array(i); 19338 while (i--) { 19339 ret[i] = list[i + start]; 19340 } 19341 return ret 19342} 19343 19344/** 19345 * Mix properties into target object. 19346 */ 19347function extend (to, _from) { 19348 for (var key in _from) { 19349 to[key] = _from[key]; 19350 } 19351 return to 19352} 19353 19354/** 19355 * Merge an Array of Objects into a single Object. 19356 */ 19357function toObject (arr) { 19358 var res = {}; 19359 for (var i = 0; i < arr.length; i++) { 19360 if (arr[i]) { 19361 extend(res, arr[i]); 19362 } 19363 } 19364 return res 19365} 19366 19367/** 19368 * Perform no operation. 19369 * Stubbing args to make Flow happy without leaving useless transpiled code 19370 * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) 19371 */ 19372function noop (a, b, c) {} 19373 19374/** 19375 * Always return false. 19376 */ 19377var no = function (a, b, c) { return false; }; 19378 19379/** 19380 * Return same value 19381 */ 19382var identity = function (_) { return _; }; 19383 19384/** 19385 * Generate a static keys string from compiler modules. 19386 */ 19387function genStaticKeys (modules) { 19388 return modules.reduce(function (keys, m) { 19389 return keys.concat(m.staticKeys || []) 19390 }, []).join(',') 19391} 19392 19393/** 19394 * Check if two values are loosely equal - that is, 19395 * if they are plain objects, do they have the same shape? 19396 */ 19397function looseEqual (a, b) { 19398 if (a === b) { return true } 19399 var isObjectA = isObject(a); 19400 var isObjectB = isObject(b); 19401 if (isObjectA && isObjectB) { 19402 try { 19403 var isArrayA = Array.isArray(a); 19404 var isArrayB = Array.isArray(b); 19405 if (isArrayA && isArrayB) { 19406 return a.length === b.length && a.every(function (e, i) { 19407 return looseEqual(e, b[i]) 19408 }) 19409 } else if (!isArrayA && !isArrayB) { 19410 var keysA = Object.keys(a); 19411 var keysB = Object.keys(b); 19412 return keysA.length === keysB.length && keysA.every(function (key) { 19413 return looseEqual(a[key], b[key]) 19414 }) 19415 } else { 19416 /* istanbul ignore next */ 19417 return false 19418 } 19419 } catch (e) { 19420 /* istanbul ignore next */ 19421 return false 19422 } 19423 } else if (!isObjectA && !isObjectB) { 19424 return String(a) === String(b) 19425 } else { 19426 return false 19427 } 19428} 19429 19430function looseIndexOf (arr, val) { 19431 for (var i = 0; i < arr.length; i++) { 19432 if (looseEqual(arr[i], val)) { return i } 19433 } 19434 return -1 19435} 19436 19437/** 19438 * Ensure a function is called only once. 19439 */ 19440function once (fn) { 19441 var called = false; 19442 return function () { 19443 if (!called) { 19444 called = true; 19445 fn.apply(this, arguments); 19446 } 19447 } 19448} 19449 19450var SSR_ATTR = 'data-server-rendered'; 19451 19452var ASSET_TYPES = [ 19453 'component', 19454 'directive', 19455 'filter' 19456]; 19457 19458var LIFECYCLE_HOOKS = [ 19459 'beforeCreate', 19460 'created', 19461 'beforeMount', 19462 'mounted', 19463 'beforeUpdate', 19464 'updated', 19465 'beforeDestroy', 19466 'destroyed', 19467 'activated', 19468 'deactivated', 19469 'errorCaptured' 19470]; 19471 19472/* */ 19473 19474var config = ({ 19475 /** 19476 * Option merge strategies (used in core/util/options) 19477 */ 19478 // $flow-disable-line 19479 optionMergeStrategies: Object.create(null), 19480 19481 /** 19482 * Whether to suppress warnings. 19483 */ 19484 silent: false, 19485 19486 /** 19487 * Show production mode tip message on boot? 19488 */ 19489 productionTip: "development" !== 'production', 19490 19491 /** 19492 * Whether to enable devtools 19493 */ 19494 devtools: "development" !== 'production', 19495 19496 /** 19497 * Whether to record perf 19498 */ 19499 performance: false, 19500 19501 /** 19502 * Error handler for watcher errors 19503 */ 19504 errorHandler: null, 19505 19506 /** 19507 * Warn handler for watcher warns 19508 */ 19509 warnHandler: null, 19510 19511 /** 19512 * Ignore certain custom elements 19513 */ 19514 ignoredElements: [], 19515 19516 /** 19517 * Custom user key aliases for v-on 19518 */ 19519 // $flow-disable-line 19520 keyCodes: Object.create(null), 19521 19522 /** 19523 * Check if a tag is reserved so that it cannot be registered as a 19524 * component. This is platform-dependent and may be overwritten. 19525 */ 19526 isReservedTag: no, 19527 19528 /** 19529 * Check if an attribute is reserved so that it cannot be used as a component 19530 * prop. This is platform-dependent and may be overwritten. 19531 */ 19532 isReservedAttr: no, 19533 19534 /** 19535 * Check if a tag is an unknown element. 19536 * Platform-dependent. 19537 */ 19538 isUnknownElement: no, 19539 19540 /** 19541 * Get the namespace of an element 19542 */ 19543 getTagNamespace: noop, 19544 19545 /** 19546 * Parse the real tag name for the specific platform. 19547 */ 19548 parsePlatformTagName: identity, 19549 19550 /** 19551 * Check if an attribute must be bound using property, e.g. value 19552 * Platform-dependent. 19553 */ 19554 mustUseProp: no, 19555 19556 /** 19557 * Exposed for legacy reasons 19558 */ 19559 _lifecycleHooks: LIFECYCLE_HOOKS 19560}) 19561 19562/* */ 19563 19564/** 19565 * Check if a string starts with $ or _ 19566 */ 19567function isReserved (str) { 19568 var c = (str + '').charCodeAt(0); 19569 return c === 0x24 || c === 0x5F 19570} 19571 19572/** 19573 * Define a property. 19574 */ 19575function def (obj, key, val, enumerable) { 19576 Object.defineProperty(obj, key, { 19577 value: val, 19578 enumerable: !!enumerable, 19579 writable: true, 19580 configurable: true 19581 }); 19582} 19583 19584/** 19585 * Parse simple path. 19586 */ 19587var bailRE = /[^\w.$]/; 19588function parsePath (path) { 19589 if (bailRE.test(path)) { 19590 return 19591 } 19592 var segments = path.split('.'); 19593 return function (obj) { 19594 for (var i = 0; i < segments.length; i++) { 19595 if (!obj) { return } 19596 obj = obj[segments[i]]; 19597 } 19598 return obj 19599 } 19600} 19601 19602/* */ 19603 19604// can we use __proto__? 19605var hasProto = '__proto__' in {}; 19606 19607// Browser environment sniffing 19608var inBrowser = typeof window !== 'undefined'; 19609var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; 19610var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); 19611var UA = inBrowser && window.navigator.userAgent.toLowerCase(); 19612var isIE = UA && /msie|trident/.test(UA); 19613var isIE9 = UA && UA.indexOf('msie 9.0') > 0; 19614var isEdge = UA && UA.indexOf('edge/') > 0; 19615var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); 19616var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); 19617var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; 19618 19619// Firefox has a "watch" function on Object.prototype... 19620var nativeWatch = ({}).watch; 19621 19622var supportsPassive = false; 19623if (inBrowser) { 19624 try { 19625 var opts = {}; 19626 Object.defineProperty(opts, 'passive', ({ 19627 get: function get () { 19628 /* istanbul ignore next */ 19629 supportsPassive = true; 19630 } 19631 })); // https://github.com/facebook/flow/issues/285 19632 window.addEventListener('test-passive', null, opts); 19633 } catch (e) {} 19634} 19635 19636// this needs to be lazy-evaled because vue may be required before 19637// vue-server-renderer can set VUE_ENV 19638var _isServer; 19639var isServerRendering = function () { 19640 if (_isServer === undefined) { 19641 /* istanbul ignore if */ 19642 if (!inBrowser && !inWeex && typeof __webpack_require__.g !== 'undefined') { 19643 // detect presence of vue-server-renderer and avoid 19644 // Webpack shimming the process 19645 _isServer = __webpack_require__.g['process'].env.VUE_ENV === 'server'; 19646 } else { 19647 _isServer = false; 19648 } 19649 } 19650 return _isServer 19651}; 19652 19653// detect devtools 19654var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; 19655 19656/* istanbul ignore next */ 19657function isNative (Ctor) { 19658 return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) 19659} 19660 19661var hasSymbol = 19662 typeof Symbol !== 'undefined' && isNative(Symbol) && 19663 typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); 19664 19665var _Set; 19666/* istanbul ignore if */ // $flow-disable-line 19667if (typeof Set !== 'undefined' && isNative(Set)) { 19668 // use native Set when available. 19669 _Set = Set; 19670} else { 19671 // a non-standard Set polyfill that only works with primitive keys. 19672 _Set = (function () { 19673 function Set () { 19674 this.set = Object.create(null); 19675 } 19676 Set.prototype.has = function has (key) { 19677 return this.set[key] === true 19678 }; 19679 Set.prototype.add = function add (key) { 19680 this.set[key] = true; 19681 }; 19682 Set.prototype.clear = function clear () { 19683 this.set = Object.create(null); 19684 }; 19685 19686 return Set; 19687 }()); 19688} 19689 19690/* */ 19691 19692var warn = noop; 19693var tip = noop; 19694var generateComponentTrace = (noop); // work around flow check 19695var formatComponentName = (noop); 19696 19697if (true) { 19698 var hasConsole = typeof console !== 'undefined'; 19699 var classifyRE = /(?:^|[-_])(\w)/g; 19700 var classify = function (str) { return str 19701 .replace(classifyRE, function (c) { return c.toUpperCase(); }) 19702 .replace(/[-_]/g, ''); }; 19703 19704 warn = function (msg, vm) { 19705 var trace = vm ? generateComponentTrace(vm) : ''; 19706 19707 if (config.warnHandler) { 19708 config.warnHandler.call(null, msg, vm, trace); 19709 } else if (hasConsole && (!config.silent)) { 19710 console.error(("[Vue warn]: " + msg + trace)); 19711 } 19712 }; 19713 19714 tip = function (msg, vm) { 19715 if (hasConsole && (!config.silent)) { 19716 console.warn("[Vue tip]: " + msg + ( 19717 vm ? generateComponentTrace(vm) : '' 19718 )); 19719 } 19720 }; 19721 19722 formatComponentName = function (vm, includeFile) { 19723 if (vm.$root === vm) { 19724 return '<Root>' 19725 } 19726 var options = typeof vm === 'function' && vm.cid != null 19727 ? vm.options 19728 : vm._isVue 19729 ? vm.$options || vm.constructor.options 19730 : vm || {}; 19731 var name = options.name || options._componentTag; 19732 var file = options.__file; 19733 if (!name && file) { 19734 var match = file.match(/([^/\\]+)\.vue$/); 19735 name = match && match[1]; 19736 } 19737 19738 return ( 19739 (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") + 19740 (file && includeFile !== false ? (" at " + file) : '') 19741 ) 19742 }; 19743 19744 var repeat = function (str, n) { 19745 var res = ''; 19746 while (n) { 19747 if (n % 2 === 1) { res += str; } 19748 if (n > 1) { str += str; } 19749 n >>= 1; 19750 } 19751 return res 19752 }; 19753 19754 generateComponentTrace = function (vm) { 19755 if (vm._isVue && vm.$parent) { 19756 var tree = []; 19757 var currentRecursiveSequence = 0; 19758 while (vm) { 19759 if (tree.length > 0) { 19760 var last = tree[tree.length - 1]; 19761 if (last.constructor === vm.constructor) { 19762 currentRecursiveSequence++; 19763 vm = vm.$parent; 19764 continue 19765 } else if (currentRecursiveSequence > 0) { 19766 tree[tree.length - 1] = [last, currentRecursiveSequence]; 19767 currentRecursiveSequence = 0; 19768 } 19769 } 19770 tree.push(vm); 19771 vm = vm.$parent; 19772 } 19773 return '\n\nfound in\n\n' + tree 19774 .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) 19775 ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") 19776 : formatComponentName(vm))); }) 19777 .join('\n') 19778 } else { 19779 return ("\n\n(found in " + (formatComponentName(vm)) + ")") 19780 } 19781 }; 19782} 19783 19784/* */ 19785 19786 19787var uid = 0; 19788 19789/** 19790 * A dep is an observable that can have multiple 19791 * directives subscribing to it. 19792 */ 19793var Dep = function Dep () { 19794 this.id = uid++; 19795 this.subs = []; 19796}; 19797 19798Dep.prototype.addSub = function addSub (sub) { 19799 this.subs.push(sub); 19800}; 19801 19802Dep.prototype.removeSub = function removeSub (sub) { 19803 remove(this.subs, sub); 19804}; 19805 19806Dep.prototype.depend = function depend () { 19807 if (Dep.target) { 19808 Dep.target.addDep(this); 19809 } 19810}; 19811 19812Dep.prototype.notify = function notify () { 19813 // stabilize the subscriber list first 19814 var subs = this.subs.slice(); 19815 for (var i = 0, l = subs.length; i < l; i++) { 19816 subs[i].update(); 19817 } 19818}; 19819 19820// the current target watcher being evaluated. 19821// this is globally unique because there could be only one 19822// watcher being evaluated at any time. 19823Dep.target = null; 19824var targetStack = []; 19825 19826function pushTarget (_target) { 19827 if (Dep.target) { targetStack.push(Dep.target); } 19828 Dep.target = _target; 19829} 19830 19831function popTarget () { 19832 Dep.target = targetStack.pop(); 19833} 19834 19835/* */ 19836 19837var VNode = function VNode ( 19838 tag, 19839 data, 19840 children, 19841 text, 19842 elm, 19843 context, 19844 componentOptions, 19845 asyncFactory 19846) { 19847 this.tag = tag; 19848 this.data = data; 19849 this.children = children; 19850 this.text = text; 19851 this.elm = elm; 19852 this.ns = undefined; 19853 this.context = context; 19854 this.fnContext = undefined; 19855 this.fnOptions = undefined; 19856 this.fnScopeId = undefined; 19857 this.key = data && data.key; 19858 this.componentOptions = componentOptions; 19859 this.componentInstance = undefined; 19860 this.parent = undefined; 19861 this.raw = false; 19862 this.isStatic = false; 19863 this.isRootInsert = true; 19864 this.isComment = false; 19865 this.isCloned = false; 19866 this.isOnce = false; 19867 this.asyncFactory = asyncFactory; 19868 this.asyncMeta = undefined; 19869 this.isAsyncPlaceholder = false; 19870}; 19871 19872var prototypeAccessors = { child: { configurable: true } }; 19873 19874// DEPRECATED: alias for componentInstance for backwards compat. 19875/* istanbul ignore next */ 19876prototypeAccessors.child.get = function () { 19877 return this.componentInstance 19878}; 19879 19880Object.defineProperties( VNode.prototype, prototypeAccessors ); 19881 19882var createEmptyVNode = function (text) { 19883 if ( text === void 0 ) text = ''; 19884 19885 var node = new VNode(); 19886 node.text = text; 19887 node.isComment = true; 19888 return node 19889}; 19890 19891function createTextVNode (val) { 19892 return new VNode(undefined, undefined, undefined, String(val)) 19893} 19894 19895// optimized shallow clone 19896// used for static nodes and slot nodes because they may be reused across 19897// multiple renders, cloning them avoids errors when DOM manipulations rely 19898// on their elm reference. 19899function cloneVNode (vnode) { 19900 var cloned = new VNode( 19901 vnode.tag, 19902 vnode.data, 19903 vnode.children, 19904 vnode.text, 19905 vnode.elm, 19906 vnode.context, 19907 vnode.componentOptions, 19908 vnode.asyncFactory 19909 ); 19910 cloned.ns = vnode.ns; 19911 cloned.isStatic = vnode.isStatic; 19912 cloned.key = vnode.key; 19913 cloned.isComment = vnode.isComment; 19914 cloned.fnContext = vnode.fnContext; 19915 cloned.fnOptions = vnode.fnOptions; 19916 cloned.fnScopeId = vnode.fnScopeId; 19917 cloned.isCloned = true; 19918 return cloned 19919} 19920 19921/* 19922 * not type checking this file because flow doesn't play well with 19923 * dynamically accessing methods on Array prototype 19924 */ 19925 19926var arrayProto = Array.prototype; 19927var arrayMethods = Object.create(arrayProto); 19928 19929var methodsToPatch = [ 19930 'push', 19931 'pop', 19932 'shift', 19933 'unshift', 19934 'splice', 19935 'sort', 19936 'reverse' 19937]; 19938 19939/** 19940 * Intercept mutating methods and emit events 19941 */ 19942methodsToPatch.forEach(function (method) { 19943 // cache original method 19944 var original = arrayProto[method]; 19945 def(arrayMethods, method, function mutator () { 19946 var args = [], len = arguments.length; 19947 while ( len-- ) args[ len ] = arguments[ len ]; 19948 19949 var result = original.apply(this, args); 19950 var ob = this.__ob__; 19951 var inserted; 19952 switch (method) { 19953 case 'push': 19954 case 'unshift': 19955 inserted = args; 19956 break 19957 case 'splice': 19958 inserted = args.slice(2); 19959 break 19960 } 19961 if (inserted) { ob.observeArray(inserted); } 19962 // notify change 19963 ob.dep.notify(); 19964 return result 19965 }); 19966}); 19967 19968/* */ 19969 19970var arrayKeys = Object.getOwnPropertyNames(arrayMethods); 19971 19972/** 19973 * In some cases we may want to disable observation inside a component's 19974 * update computation. 19975 */ 19976var shouldObserve = true; 19977 19978function toggleObserving (value) { 19979 shouldObserve = value; 19980} 19981 19982/** 19983 * Observer class that is attached to each observed 19984 * object. Once attached, the observer converts the target 19985 * object's property keys into getter/setters that 19986 * collect dependencies and dispatch updates. 19987 */ 19988var Observer = function Observer (value) { 19989 this.value = value; 19990 this.dep = new Dep(); 19991 this.vmCount = 0; 19992 def(value, '__ob__', this); 19993 if (Array.isArray(value)) { 19994 var augment = hasProto 19995 ? protoAugment 19996 : copyAugment; 19997 augment(value, arrayMethods, arrayKeys); 19998 this.observeArray(value); 19999 } else { 20000 this.walk(value); 20001 } 20002}; 20003 20004/** 20005 * Walk through each property and convert them into 20006 * getter/setters. This method should only be called when 20007 * value type is Object. 20008 */ 20009Observer.prototype.walk = function walk (obj) { 20010 var keys = Object.keys(obj); 20011 for (var i = 0; i < keys.length; i++) { 20012 defineReactive(obj, keys[i]); 20013 } 20014}; 20015 20016/** 20017 * Observe a list of Array items. 20018 */ 20019Observer.prototype.observeArray = function observeArray (items) { 20020 for (var i = 0, l = items.length; i < l; i++) { 20021 observe(items[i]); 20022 } 20023}; 20024 20025// helpers 20026 20027/** 20028 * Augment an target Object or Array by intercepting 20029 * the prototype chain using __proto__ 20030 */ 20031function protoAugment (target, src, keys) { 20032 /* eslint-disable no-proto */ 20033 target.__proto__ = src; 20034 /* eslint-enable no-proto */ 20035} 20036 20037/** 20038 * Augment an target Object or Array by defining 20039 * hidden properties. 20040 */ 20041/* istanbul ignore next */ 20042function copyAugment (target, src, keys) { 20043 for (var i = 0, l = keys.length; i < l; i++) { 20044 var key = keys[i]; 20045 def(target, key, src[key]); 20046 } 20047} 20048 20049/** 20050 * Attempt to create an observer instance for a value, 20051 * returns the new observer if successfully observed, 20052 * or the existing observer if the value already has one. 20053 */ 20054function observe (value, asRootData) { 20055 if (!isObject(value) || value instanceof VNode) { 20056 return 20057 } 20058 var ob; 20059 if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { 20060 ob = value.__ob__; 20061 } else if ( 20062 shouldObserve && 20063 !isServerRendering() && 20064 (Array.isArray(value) || isPlainObject(value)) && 20065 Object.isExtensible(value) && 20066 !value._isVue 20067 ) { 20068 ob = new Observer(value); 20069 } 20070 if (asRootData && ob) { 20071 ob.vmCount++; 20072 } 20073 return ob 20074} 20075 20076/** 20077 * Define a reactive property on an Object. 20078 */ 20079function defineReactive ( 20080 obj, 20081 key, 20082 val, 20083 customSetter, 20084 shallow 20085) { 20086 var dep = new Dep(); 20087 20088 var property = Object.getOwnPropertyDescriptor(obj, key); 20089 if (property && property.configurable === false) { 20090 return 20091 } 20092 20093 // cater for pre-defined getter/setters 20094 var getter = property && property.get; 20095 if (!getter && arguments.length === 2) { 20096 val = obj[key]; 20097 } 20098 var setter = property && property.set; 20099 20100 var childOb = !shallow && observe(val); 20101 Object.defineProperty(obj, key, { 20102 enumerable: true, 20103 configurable: true, 20104 get: function reactiveGetter () { 20105 var value = getter ? getter.call(obj) : val; 20106 if (Dep.target) { 20107 dep.depend(); 20108 if (childOb) { 20109 childOb.dep.depend(); 20110 if (Array.isArray(value)) { 20111 dependArray(value); 20112 } 20113 } 20114 } 20115 return value 20116 }, 20117 set: function reactiveSetter (newVal) { 20118 var value = getter ? getter.call(obj) : val; 20119 /* eslint-disable no-self-compare */ 20120 if (newVal === value || (newVal !== newVal && value !== value)) { 20121 return 20122 } 20123 /* eslint-enable no-self-compare */ 20124 if ( true && customSetter) { 20125 customSetter(); 20126 } 20127 if (setter) { 20128 setter.call(obj, newVal); 20129 } else { 20130 val = newVal; 20131 } 20132 childOb = !shallow && observe(newVal); 20133 dep.notify(); 20134 } 20135 }); 20136} 20137 20138/** 20139 * Set a property on an object. Adds the new property and 20140 * triggers change notification if the property doesn't 20141 * already exist. 20142 */ 20143function set (target, key, val) { 20144 if ( true && 20145 (isUndef(target) || isPrimitive(target)) 20146 ) { 20147 warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); 20148 } 20149 if (Array.isArray(target) && isValidArrayIndex(key)) { 20150 target.length = Math.max(target.length, key); 20151 target.splice(key, 1, val); 20152 return val 20153 } 20154 if (key in target && !(key in Object.prototype)) { 20155 target[key] = val; 20156 return val 20157 } 20158 var ob = (target).__ob__; 20159 if (target._isVue || (ob && ob.vmCount)) { 20160 true && warn( 20161 'Avoid adding reactive properties to a Vue instance or its root $data ' + 20162 'at runtime - declare it upfront in the data option.' 20163 ); 20164 return val 20165 } 20166 if (!ob) { 20167 target[key] = val; 20168 return val 20169 } 20170 defineReactive(ob.value, key, val); 20171 ob.dep.notify(); 20172 return val 20173} 20174 20175/** 20176 * Delete a property and trigger change if necessary. 20177 */ 20178function del (target, key) { 20179 if ( true && 20180 (isUndef(target) || isPrimitive(target)) 20181 ) { 20182 warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); 20183 } 20184 if (Array.isArray(target) && isValidArrayIndex(key)) { 20185 target.splice(key, 1); 20186 return 20187 } 20188 var ob = (target).__ob__; 20189 if (target._isVue || (ob && ob.vmCount)) { 20190 true && warn( 20191 'Avoid deleting properties on a Vue instance or its root $data ' + 20192 '- just set it to null.' 20193 ); 20194 return 20195 } 20196 if (!hasOwn(target, key)) { 20197 return 20198 } 20199 delete target[key]; 20200 if (!ob) { 20201 return 20202 } 20203 ob.dep.notify(); 20204} 20205 20206/** 20207 * Collect dependencies on array elements when the array is touched, since 20208 * we cannot intercept array element access like property getters. 20209 */ 20210function dependArray (value) { 20211 for (var e = (void 0), i = 0, l = value.length; i < l; i++) { 20212 e = value[i]; 20213 e && e.__ob__ && e.__ob__.dep.depend(); 20214 if (Array.isArray(e)) { 20215 dependArray(e); 20216 } 20217 } 20218} 20219 20220/* */ 20221 20222/** 20223 * Option overwriting strategies are functions that handle 20224 * how to merge a parent option value and a child option 20225 * value into the final value. 20226 */ 20227var strats = config.optionMergeStrategies; 20228 20229/** 20230 * Options with restrictions 20231 */ 20232if (true) { 20233 strats.el = strats.propsData = function (parent, child, vm, key) { 20234 if (!vm) { 20235 warn( 20236 "option \"" + key + "\" can only be used during instance " + 20237 'creation with the `new` keyword.' 20238 ); 20239 } 20240 return defaultStrat(parent, child) 20241 }; 20242} 20243 20244/** 20245 * Helper that recursively merges two data objects together. 20246 */ 20247function mergeData (to, from) { 20248 if (!from) { return to } 20249 var key, toVal, fromVal; 20250 var keys = Object.keys(from); 20251 for (var i = 0; i < keys.length; i++) { 20252 key = keys[i]; 20253 toVal = to[key]; 20254 fromVal = from[key]; 20255 if (!hasOwn(to, key)) { 20256 set(to, key, fromVal); 20257 } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { 20258 mergeData(toVal, fromVal); 20259 } 20260 } 20261 return to 20262} 20263 20264/** 20265 * Data 20266 */ 20267function mergeDataOrFn ( 20268 parentVal, 20269 childVal, 20270 vm 20271) { 20272 if (!vm) { 20273 // in a Vue.extend merge, both should be functions 20274 if (!childVal) { 20275 return parentVal 20276 } 20277 if (!parentVal) { 20278 return childVal 20279 } 20280 // when parentVal & childVal are both present, 20281 // we need to return a function that returns the 20282 // merged result of both functions... no need to 20283 // check if parentVal is a function here because 20284 // it has to be a function to pass previous merges. 20285 return function mergedDataFn () { 20286 return mergeData( 20287 typeof childVal === 'function' ? childVal.call(this, this) : childVal, 20288 typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal 20289 ) 20290 } 20291 } else { 20292 return function mergedInstanceDataFn () { 20293 // instance merge 20294 var instanceData = typeof childVal === 'function' 20295 ? childVal.call(vm, vm) 20296 : childVal; 20297 var defaultData = typeof parentVal === 'function' 20298 ? parentVal.call(vm, vm) 20299 : parentVal; 20300 if (instanceData) { 20301 return mergeData(instanceData, defaultData) 20302 } else { 20303 return defaultData 20304 } 20305 } 20306 } 20307} 20308 20309strats.data = function ( 20310 parentVal, 20311 childVal, 20312 vm 20313) { 20314 if (!vm) { 20315 if (childVal && typeof childVal !== 'function') { 20316 true && warn( 20317 'The "data" option should be a function ' + 20318 'that returns a per-instance value in component ' + 20319 'definitions.', 20320 vm 20321 ); 20322 20323 return parentVal 20324 } 20325 return mergeDataOrFn(parentVal, childVal) 20326 } 20327 20328 return mergeDataOrFn(parentVal, childVal, vm) 20329}; 20330 20331/** 20332 * Hooks and props are merged as arrays. 20333 */ 20334function mergeHook ( 20335 parentVal, 20336 childVal 20337) { 20338 return childVal 20339 ? parentVal 20340 ? parentVal.concat(childVal) 20341 : Array.isArray(childVal) 20342 ? childVal 20343 : [childVal] 20344 : parentVal 20345} 20346 20347LIFECYCLE_HOOKS.forEach(function (hook) { 20348 strats[hook] = mergeHook; 20349}); 20350 20351/** 20352 * Assets 20353 * 20354 * When a vm is present (instance creation), we need to do 20355 * a three-way merge between constructor options, instance 20356 * options and parent options. 20357 */ 20358function mergeAssets ( 20359 parentVal, 20360 childVal, 20361 vm, 20362 key 20363) { 20364 var res = Object.create(parentVal || null); 20365 if (childVal) { 20366 true && assertObjectType(key, childVal, vm); 20367 return extend(res, childVal) 20368 } else { 20369 return res 20370 } 20371} 20372 20373ASSET_TYPES.forEach(function (type) { 20374 strats[type + 's'] = mergeAssets; 20375}); 20376 20377/** 20378 * Watchers. 20379 * 20380 * Watchers hashes should not overwrite one 20381 * another, so we merge them as arrays. 20382 */ 20383strats.watch = function ( 20384 parentVal, 20385 childVal, 20386 vm, 20387 key 20388) { 20389 // work around Firefox's Object.prototype.watch... 20390 if (parentVal === nativeWatch) { parentVal = undefined; } 20391 if (childVal === nativeWatch) { childVal = undefined; } 20392 /* istanbul ignore if */ 20393 if (!childVal) { return Object.create(parentVal || null) } 20394 if (true) { 20395 assertObjectType(key, childVal, vm); 20396 } 20397 if (!parentVal) { return childVal } 20398 var ret = {}; 20399 extend(ret, parentVal); 20400 for (var key$1 in childVal) { 20401 var parent = ret[key$1]; 20402 var child = childVal[key$1]; 20403 if (parent && !Array.isArray(parent)) { 20404 parent = [parent]; 20405 } 20406 ret[key$1] = parent 20407 ? parent.concat(child) 20408 : Array.isArray(child) ? child : [child]; 20409 } 20410 return ret 20411}; 20412 20413/** 20414 * Other object hashes. 20415 */ 20416strats.props = 20417strats.methods = 20418strats.inject = 20419strats.computed = function ( 20420 parentVal, 20421 childVal, 20422 vm, 20423 key 20424) { 20425 if (childVal && "development" !== 'production') { 20426 assertObjectType(key, childVal, vm); 20427 } 20428 if (!parentVal) { return childVal } 20429 var ret = Object.create(null); 20430 extend(ret, parentVal); 20431 if (childVal) { extend(ret, childVal); } 20432 return ret 20433}; 20434strats.provide = mergeDataOrFn; 20435 20436/** 20437 * Default strategy. 20438 */ 20439var defaultStrat = function (parentVal, childVal) { 20440 return childVal === undefined 20441 ? parentVal 20442 : childVal 20443}; 20444 20445/** 20446 * Validate component names 20447 */ 20448function checkComponents (options) { 20449 for (var key in options.components) { 20450 validateComponentName(key); 20451 } 20452} 20453 20454function validateComponentName (name) { 20455 if (!/^[a-zA-Z][\w-]*$/.test(name)) { 20456 warn( 20457 'Invalid component name: "' + name + '". Component names ' + 20458 'can only contain alphanumeric characters and the hyphen, ' + 20459 'and must start with a letter.' 20460 ); 20461 } 20462 if (isBuiltInTag(name) || config.isReservedTag(name)) { 20463 warn( 20464 'Do not use built-in or reserved HTML elements as component ' + 20465 'id: ' + name 20466 ); 20467 } 20468} 20469 20470/** 20471 * Ensure all props option syntax are normalized into the 20472 * Object-based format. 20473 */ 20474function normalizeProps (options, vm) { 20475 var props = options.props; 20476 if (!props) { return } 20477 var res = {}; 20478 var i, val, name; 20479 if (Array.isArray(props)) { 20480 i = props.length; 20481 while (i--) { 20482 val = props[i]; 20483 if (typeof val === 'string') { 20484 name = camelize(val); 20485 res[name] = { type: null }; 20486 } else if (true) { 20487 warn('props must be strings when using array syntax.'); 20488 } 20489 } 20490 } else if (isPlainObject(props)) { 20491 for (var key in props) { 20492 val = props[key]; 20493 name = camelize(key); 20494 res[name] = isPlainObject(val) 20495 ? val 20496 : { type: val }; 20497 } 20498 } else if (true) { 20499 warn( 20500 "Invalid value for option \"props\": expected an Array or an Object, " + 20501 "but got " + (toRawType(props)) + ".", 20502 vm 20503 ); 20504 } 20505 options.props = res; 20506} 20507 20508/** 20509 * Normalize all injections into Object-based format 20510 */ 20511function normalizeInject (options, vm) { 20512 var inject = options.inject; 20513 if (!inject) { return } 20514 var normalized = options.inject = {}; 20515 if (Array.isArray(inject)) { 20516 for (var i = 0; i < inject.length; i++) { 20517 normalized[inject[i]] = { from: inject[i] }; 20518 } 20519 } else if (isPlainObject(inject)) { 20520 for (var key in inject) { 20521 var val = inject[key]; 20522 normalized[key] = isPlainObject(val) 20523 ? extend({ from: key }, val) 20524 : { from: val }; 20525 } 20526 } else if (true) { 20527 warn( 20528 "Invalid value for option \"inject\": expected an Array or an Object, " + 20529 "but got " + (toRawType(inject)) + ".", 20530 vm 20531 ); 20532 } 20533} 20534 20535/** 20536 * Normalize raw function directives into object format. 20537 */ 20538function normalizeDirectives (options) { 20539 var dirs = options.directives; 20540 if (dirs) { 20541 for (var key in dirs) { 20542 var def = dirs[key]; 20543 if (typeof def === 'function') { 20544 dirs[key] = { bind: def, update: def }; 20545 } 20546 } 20547 } 20548} 20549 20550function assertObjectType (name, value, vm) { 20551 if (!isPlainObject(value)) { 20552 warn( 20553 "Invalid value for option \"" + name + "\": expected an Object, " + 20554 "but got " + (toRawType(value)) + ".", 20555 vm 20556 ); 20557 } 20558} 20559 20560/** 20561 * Merge two option objects into a new one. 20562 * Core utility used in both instantiation and inheritance. 20563 */ 20564function mergeOptions ( 20565 parent, 20566 child, 20567 vm 20568) { 20569 if (true) { 20570 checkComponents(child); 20571 } 20572 20573 if (typeof child === 'function') { 20574 child = child.options; 20575 } 20576 20577 normalizeProps(child, vm); 20578 normalizeInject(child, vm); 20579 normalizeDirectives(child); 20580 var extendsFrom = child.extends; 20581 if (extendsFrom) { 20582 parent = mergeOptions(parent, extendsFrom, vm); 20583 } 20584 if (child.mixins) { 20585 for (var i = 0, l = child.mixins.length; i < l; i++) { 20586 parent = mergeOptions(parent, child.mixins[i], vm); 20587 } 20588 } 20589 var options = {}; 20590 var key; 20591 for (key in parent) { 20592 mergeField(key); 20593 } 20594 for (key in child) { 20595 if (!hasOwn(parent, key)) { 20596 mergeField(key); 20597 } 20598 } 20599 function mergeField (key) { 20600 var strat = strats[key] || defaultStrat; 20601 options[key] = strat(parent[key], child[key], vm, key); 20602 } 20603 return options 20604} 20605 20606/** 20607 * Resolve an asset. 20608 * This function is used because child instances need access 20609 * to assets defined in its ancestor chain. 20610 */ 20611function resolveAsset ( 20612 options, 20613 type, 20614 id, 20615 warnMissing 20616) { 20617 /* istanbul ignore if */ 20618 if (typeof id !== 'string') { 20619 return 20620 } 20621 var assets = options[type]; 20622 // check local registration variations first 20623 if (hasOwn(assets, id)) { return assets[id] } 20624 var camelizedId = camelize(id); 20625 if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } 20626 var PascalCaseId = capitalize(camelizedId); 20627 if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } 20628 // fallback to prototype chain 20629 var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; 20630 if ( true && warnMissing && !res) { 20631 warn( 20632 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, 20633 options 20634 ); 20635 } 20636 return res 20637} 20638 20639/* */ 20640 20641function validateProp ( 20642 key, 20643 propOptions, 20644 propsData, 20645 vm 20646) { 20647 var prop = propOptions[key]; 20648 var absent = !hasOwn(propsData, key); 20649 var value = propsData[key]; 20650 // boolean casting 20651 var booleanIndex = getTypeIndex(Boolean, prop.type); 20652 if (booleanIndex > -1) { 20653 if (absent && !hasOwn(prop, 'default')) { 20654 value = false; 20655 } else if (value === '' || value === hyphenate(key)) { 20656 // only cast empty string / same name to boolean if 20657 // boolean has higher priority 20658 var stringIndex = getTypeIndex(String, prop.type); 20659 if (stringIndex < 0 || booleanIndex < stringIndex) { 20660 value = true; 20661 } 20662 } 20663 } 20664 // check default value 20665 if (value === undefined) { 20666 value = getPropDefaultValue(vm, prop, key); 20667 // since the default value is a fresh copy, 20668 // make sure to observe it. 20669 var prevShouldObserve = shouldObserve; 20670 toggleObserving(true); 20671 observe(value); 20672 toggleObserving(prevShouldObserve); 20673 } 20674 if ( 20675 true 20676 ) { 20677 assertProp(prop, key, value, vm, absent); 20678 } 20679 return value 20680} 20681 20682/** 20683 * Get the default value of a prop. 20684 */ 20685function getPropDefaultValue (vm, prop, key) { 20686 // no default, return undefined 20687 if (!hasOwn(prop, 'default')) { 20688 return undefined 20689 } 20690 var def = prop.default; 20691 // warn against non-factory defaults for Object & Array 20692 if ( true && isObject(def)) { 20693 warn( 20694 'Invalid default value for prop "' + key + '": ' + 20695 'Props with type Object/Array must use a factory function ' + 20696 'to return the default value.', 20697 vm 20698 ); 20699 } 20700 // the raw prop value was also undefined from previous render, 20701 // return previous default value to avoid unnecessary watcher trigger 20702 if (vm && vm.$options.propsData && 20703 vm.$options.propsData[key] === undefined && 20704 vm._props[key] !== undefined 20705 ) { 20706 return vm._props[key] 20707 } 20708 // call factory function for non-Function types 20709 // a value is Function if its prototype is function even across different execution context 20710 return typeof def === 'function' && getType(prop.type) !== 'Function' 20711 ? def.call(vm) 20712 : def 20713} 20714 20715/** 20716 * Assert whether a prop is valid. 20717 */ 20718function assertProp ( 20719 prop, 20720 name, 20721 value, 20722 vm, 20723 absent 20724) { 20725 if (prop.required && absent) { 20726 warn( 20727 'Missing required prop: "' + name + '"', 20728 vm 20729 ); 20730 return 20731 } 20732 if (value == null && !prop.required) { 20733 return 20734 } 20735 var type = prop.type; 20736 var valid = !type || type === true; 20737 var expectedTypes = []; 20738 if (type) { 20739 if (!Array.isArray(type)) { 20740 type = [type]; 20741 } 20742 for (var i = 0; i < type.length && !valid; i++) { 20743 var assertedType = assertType(value, type[i]); 20744 expectedTypes.push(assertedType.expectedType || ''); 20745 valid = assertedType.valid; 20746 } 20747 } 20748 if (!valid) { 20749 warn( 20750 "Invalid prop: type check failed for prop \"" + name + "\"." + 20751 " Expected " + (expectedTypes.map(capitalize).join(', ')) + 20752 ", got " + (toRawType(value)) + ".", 20753 vm 20754 ); 20755 return 20756 } 20757 var validator = prop.validator; 20758 if (validator) { 20759 if (!validator(value)) { 20760 warn( 20761 'Invalid prop: custom validator check failed for prop "' + name + '".', 20762 vm 20763 ); 20764 } 20765 } 20766} 20767 20768var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; 20769 20770function assertType (value, type) { 20771 var valid; 20772 var expectedType = getType(type); 20773 if (simpleCheckRE.test(expectedType)) { 20774 var t = typeof value; 20775 valid = t === expectedType.toLowerCase(); 20776 // for primitive wrapper objects 20777 if (!valid && t === 'object') { 20778 valid = value instanceof type; 20779 } 20780 } else if (expectedType === 'Object') { 20781 valid = isPlainObject(value); 20782 } else if (expectedType === 'Array') { 20783 valid = Array.isArray(value); 20784 } else { 20785 valid = value instanceof type; 20786 } 20787 return { 20788 valid: valid, 20789 expectedType: expectedType 20790 } 20791} 20792 20793/** 20794 * Use function string name to check built-in types, 20795 * because a simple equality check will fail when running 20796 * across different vms / iframes. 20797 */ 20798function getType (fn) { 20799 var match = fn && fn.toString().match(/^\s*function (\w+)/); 20800 return match ? match[1] : '' 20801} 20802 20803function isSameType (a, b) { 20804 return getType(a) === getType(b) 20805} 20806 20807function getTypeIndex (type, expectedTypes) { 20808 if (!Array.isArray(expectedTypes)) { 20809 return isSameType(expectedTypes, type) ? 0 : -1 20810 } 20811 for (var i = 0, len = expectedTypes.length; i < len; i++) { 20812 if (isSameType(expectedTypes[i], type)) { 20813 return i 20814 } 20815 } 20816 return -1 20817} 20818 20819/* */ 20820 20821function handleError (err, vm, info) { 20822 if (vm) { 20823 var cur = vm; 20824 while ((cur = cur.$parent)) { 20825 var hooks = cur.$options.errorCaptured; 20826 if (hooks) { 20827 for (var i = 0; i < hooks.length; i++) { 20828 try { 20829 var capture = hooks[i].call(cur, err, vm, info) === false; 20830 if (capture) { return } 20831 } catch (e) { 20832 globalHandleError(e, cur, 'errorCaptured hook'); 20833 } 20834 } 20835 } 20836 } 20837 } 20838 globalHandleError(err, vm, info); 20839} 20840 20841function globalHandleError (err, vm, info) { 20842 if (config.errorHandler) { 20843 try { 20844 return config.errorHandler.call(null, err, vm, info) 20845 } catch (e) { 20846 logError(e, null, 'config.errorHandler'); 20847 } 20848 } 20849 logError(err, vm, info); 20850} 20851 20852function logError (err, vm, info) { 20853 if (true) { 20854 warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); 20855 } 20856 /* istanbul ignore else */ 20857 if ((inBrowser || inWeex) && typeof console !== 'undefined') { 20858 console.error(err); 20859 } else { 20860 throw err 20861 } 20862} 20863 20864/* */ 20865/* globals MessageChannel */ 20866 20867var callbacks = []; 20868var pending = false; 20869 20870function flushCallbacks () { 20871 pending = false; 20872 var copies = callbacks.slice(0); 20873 callbacks.length = 0; 20874 for (var i = 0; i < copies.length; i++) { 20875 copies[i](); 20876 } 20877} 20878 20879// Here we have async deferring wrappers using both microtasks and (macro) tasks. 20880// In < 2.4 we used microtasks everywhere, but there are some scenarios where 20881// microtasks have too high a priority and fire in between supposedly 20882// sequential events (e.g. #4521, #6690) or even between bubbling of the same 20883// event (#6566). However, using (macro) tasks everywhere also has subtle problems 20884// when state is changed right before repaint (e.g. #6813, out-in transitions). 20885// Here we use microtask by default, but expose a way to force (macro) task when 20886// needed (e.g. in event handlers attached by v-on). 20887var microTimerFunc; 20888var macroTimerFunc; 20889var useMacroTask = false; 20890 20891// Determine (macro) task defer implementation. 20892// Technically setImmediate should be the ideal choice, but it's only available 20893// in IE. The only polyfill that consistently queues the callback after all DOM 20894// events triggered in the same loop is by using MessageChannel. 20895/* istanbul ignore if */ 20896if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { 20897 macroTimerFunc = function () { 20898 setImmediate(flushCallbacks); 20899 }; 20900} else if (typeof MessageChannel !== 'undefined' && ( 20901 isNative(MessageChannel) || 20902 // PhantomJS 20903 MessageChannel.toString() === '[object MessageChannelConstructor]' 20904)) { 20905 var channel = new MessageChannel(); 20906 var port = channel.port2; 20907 channel.port1.onmessage = flushCallbacks; 20908 macroTimerFunc = function () { 20909 port.postMessage(1); 20910 }; 20911} else { 20912 /* istanbul ignore next */ 20913 macroTimerFunc = function () { 20914 setTimeout(flushCallbacks, 0); 20915 }; 20916} 20917 20918// Determine microtask defer implementation. 20919/* istanbul ignore next, $flow-disable-line */ 20920if (typeof Promise !== 'undefined' && isNative(Promise)) { 20921 var p = Promise.resolve(); 20922 microTimerFunc = function () { 20923 p.then(flushCallbacks); 20924 // in problematic UIWebViews, Promise.then doesn't completely break, but 20925 // it can get stuck in a weird state where callbacks are pushed into the 20926 // microtask queue but the queue isn't being flushed, until the browser 20927 // needs to do some other work, e.g. handle a timer. Therefore we can 20928 // "force" the microtask queue to be flushed by adding an empty timer. 20929 if (isIOS) { setTimeout(noop); } 20930 }; 20931} else { 20932 // fallback to macro 20933 microTimerFunc = macroTimerFunc; 20934} 20935 20936/** 20937 * Wrap a function so that if any code inside triggers state change, 20938 * the changes are queued using a (macro) task instead of a microtask. 20939 */ 20940function withMacroTask (fn) { 20941 return fn._withTask || (fn._withTask = function () { 20942 useMacroTask = true; 20943 var res = fn.apply(null, arguments); 20944 useMacroTask = false; 20945 return res 20946 }) 20947} 20948 20949function nextTick (cb, ctx) { 20950 var _resolve; 20951 callbacks.push(function () { 20952 if (cb) { 20953 try { 20954 cb.call(ctx); 20955 } catch (e) { 20956 handleError(e, ctx, 'nextTick'); 20957 } 20958 } else if (_resolve) { 20959 _resolve(ctx); 20960 } 20961 }); 20962 if (!pending) { 20963 pending = true; 20964 if (useMacroTask) { 20965 macroTimerFunc(); 20966 } else { 20967 microTimerFunc(); 20968 } 20969 } 20970 // $flow-disable-line 20971 if (!cb && typeof Promise !== 'undefined') { 20972 return new Promise(function (resolve) { 20973 _resolve = resolve; 20974 }) 20975 } 20976} 20977 20978/* */ 20979 20980var mark; 20981var measure; 20982 20983if (true) { 20984 var perf = inBrowser && window.performance; 20985 /* istanbul ignore if */ 20986 if ( 20987 perf && 20988 perf.mark && 20989 perf.measure && 20990 perf.clearMarks && 20991 perf.clearMeasures 20992 ) { 20993 mark = function (tag) { return perf.mark(tag); }; 20994 measure = function (name, startTag, endTag) { 20995 perf.measure(name, startTag, endTag); 20996 perf.clearMarks(startTag); 20997 perf.clearMarks(endTag); 20998 perf.clearMeasures(name); 20999 }; 21000 } 21001} 21002 21003/* not type checking this file because flow doesn't play well with Proxy */ 21004 21005var initProxy; 21006 21007if (true) { 21008 var allowedGlobals = makeMap( 21009 'Infinity,undefined,NaN,isFinite,isNaN,' + 21010 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + 21011 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + 21012 'require' // for Webpack/Browserify 21013 ); 21014 21015 var warnNonPresent = function (target, key) { 21016 warn( 21017 "Property or method \"" + key + "\" is not defined on the instance but " + 21018 'referenced during render. Make sure that this property is reactive, ' + 21019 'either in the data option, or for class-based components, by ' + 21020 'initializing the property. ' + 21021 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', 21022 target 21023 ); 21024 }; 21025 21026 var hasProxy = 21027 typeof Proxy !== 'undefined' && isNative(Proxy); 21028 21029 if (hasProxy) { 21030 var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); 21031 config.keyCodes = new Proxy(config.keyCodes, { 21032 set: function set (target, key, value) { 21033 if (isBuiltInModifier(key)) { 21034 warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); 21035 return false 21036 } else { 21037 target[key] = value; 21038 return true 21039 } 21040 } 21041 }); 21042 } 21043 21044 var hasHandler = { 21045 has: function has (target, key) { 21046 var has = key in target; 21047 var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; 21048 if (!has && !isAllowed) { 21049 warnNonPresent(target, key); 21050 } 21051 return has || !isAllowed 21052 } 21053 }; 21054 21055 var getHandler = { 21056 get: function get (target, key) { 21057 if (typeof key === 'string' && !(key in target)) { 21058 warnNonPresent(target, key); 21059 } 21060 return target[key] 21061 } 21062 }; 21063 21064 initProxy = function initProxy (vm) { 21065 if (hasProxy) { 21066 // determine which proxy handler to use 21067 var options = vm.$options; 21068 var handlers = options.render && options.render._withStripped 21069 ? getHandler 21070 : hasHandler; 21071 vm._renderProxy = new Proxy(vm, handlers); 21072 } else { 21073 vm._renderProxy = vm; 21074 } 21075 }; 21076} 21077 21078/* */ 21079 21080var seenObjects = new _Set(); 21081 21082/** 21083 * Recursively traverse an object to evoke all converted 21084 * getters, so that every nested property inside the object 21085 * is collected as a "deep" dependency. 21086 */ 21087function traverse (val) { 21088 _traverse(val, seenObjects); 21089 seenObjects.clear(); 21090} 21091 21092function _traverse (val, seen) { 21093 var i, keys; 21094 var isA = Array.isArray(val); 21095 if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { 21096 return 21097 } 21098 if (val.__ob__) { 21099 var depId = val.__ob__.dep.id; 21100 if (seen.has(depId)) { 21101 return 21102 } 21103 seen.add(depId); 21104 } 21105 if (isA) { 21106 i = val.length; 21107 while (i--) { _traverse(val[i], seen); } 21108 } else { 21109 keys = Object.keys(val); 21110 i = keys.length; 21111 while (i--) { _traverse(val[keys[i]], seen); } 21112 } 21113} 21114 21115/* */ 21116 21117var normalizeEvent = cached(function (name) { 21118 var passive = name.charAt(0) === '&'; 21119 name = passive ? name.slice(1) : name; 21120 var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first 21121 name = once$$1 ? name.slice(1) : name; 21122 var capture = name.charAt(0) === '!'; 21123 name = capture ? name.slice(1) : name; 21124 return { 21125 name: name, 21126 once: once$$1, 21127 capture: capture, 21128 passive: passive 21129 } 21130}); 21131 21132function createFnInvoker (fns) { 21133 function invoker () { 21134 var arguments$1 = arguments; 21135 21136 var fns = invoker.fns; 21137 if (Array.isArray(fns)) { 21138 var cloned = fns.slice(); 21139 for (var i = 0; i < cloned.length; i++) { 21140 cloned[i].apply(null, arguments$1); 21141 } 21142 } else { 21143 // return handler return value for single handlers 21144 return fns.apply(null, arguments) 21145 } 21146 } 21147 invoker.fns = fns; 21148 return invoker 21149} 21150 21151function updateListeners ( 21152 on, 21153 oldOn, 21154 add, 21155 remove$$1, 21156 vm 21157) { 21158 var name, def, cur, old, event; 21159 for (name in on) { 21160 def = cur = on[name]; 21161 old = oldOn[name]; 21162 event = normalizeEvent(name); 21163 /* istanbul ignore if */ 21164 if (isUndef(cur)) { 21165 true && warn( 21166 "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), 21167 vm 21168 ); 21169 } else if (isUndef(old)) { 21170 if (isUndef(cur.fns)) { 21171 cur = on[name] = createFnInvoker(cur); 21172 } 21173 add(event.name, cur, event.once, event.capture, event.passive, event.params); 21174 } else if (cur !== old) { 21175 old.fns = cur; 21176 on[name] = old; 21177 } 21178 } 21179 for (name in oldOn) { 21180 if (isUndef(on[name])) { 21181 event = normalizeEvent(name); 21182 remove$$1(event.name, oldOn[name], event.capture); 21183 } 21184 } 21185} 21186 21187/* */ 21188 21189function mergeVNodeHook (def, hookKey, hook) { 21190 if (def instanceof VNode) { 21191 def = def.data.hook || (def.data.hook = {}); 21192 } 21193 var invoker; 21194 var oldHook = def[hookKey]; 21195 21196 function wrappedHook () { 21197 hook.apply(this, arguments); 21198 // important: remove merged hook to ensure it's called only once 21199 // and prevent memory leak 21200 remove(invoker.fns, wrappedHook); 21201 } 21202 21203 if (isUndef(oldHook)) { 21204 // no existing hook 21205 invoker = createFnInvoker([wrappedHook]); 21206 } else { 21207 /* istanbul ignore if */ 21208 if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { 21209 // already a merged invoker 21210 invoker = oldHook; 21211 invoker.fns.push(wrappedHook); 21212 } else { 21213 // existing plain hook 21214 invoker = createFnInvoker([oldHook, wrappedHook]); 21215 } 21216 } 21217 21218 invoker.merged = true; 21219 def[hookKey] = invoker; 21220} 21221 21222/* */ 21223 21224function extractPropsFromVNodeData ( 21225 data, 21226 Ctor, 21227 tag 21228) { 21229 // we are only extracting raw values here. 21230 // validation and default values are handled in the child 21231 // component itself. 21232 var propOptions = Ctor.options.props; 21233 if (isUndef(propOptions)) { 21234 return 21235 } 21236 var res = {}; 21237 var attrs = data.attrs; 21238 var props = data.props; 21239 if (isDef(attrs) || isDef(props)) { 21240 for (var key in propOptions) { 21241 var altKey = hyphenate(key); 21242 if (true) { 21243 var keyInLowerCase = key.toLowerCase(); 21244 if ( 21245 key !== keyInLowerCase && 21246 attrs && hasOwn(attrs, keyInLowerCase) 21247 ) { 21248 tip( 21249 "Prop \"" + keyInLowerCase + "\" is passed to component " + 21250 (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + 21251 " \"" + key + "\". " + 21252 "Note that HTML attributes are case-insensitive and camelCased " + 21253 "props need to use their kebab-case equivalents when using in-DOM " + 21254 "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." 21255 ); 21256 } 21257 } 21258 checkProp(res, props, key, altKey, true) || 21259 checkProp(res, attrs, key, altKey, false); 21260 } 21261 } 21262 return res 21263} 21264 21265function checkProp ( 21266 res, 21267 hash, 21268 key, 21269 altKey, 21270 preserve 21271) { 21272 if (isDef(hash)) { 21273 if (hasOwn(hash, key)) { 21274 res[key] = hash[key]; 21275 if (!preserve) { 21276 delete hash[key]; 21277 } 21278 return true 21279 } else if (hasOwn(hash, altKey)) { 21280 res[key] = hash[altKey]; 21281 if (!preserve) { 21282 delete hash[altKey]; 21283 } 21284 return true 21285 } 21286 } 21287 return false 21288} 21289 21290/* */ 21291 21292// The template compiler attempts to minimize the need for normalization by 21293// statically analyzing the template at compile time. 21294// 21295// For plain HTML markup, normalization can be completely skipped because the 21296// generated render function is guaranteed to return Array<VNode>. There are 21297// two cases where extra normalization is needed: 21298 21299// 1. When the children contains components - because a functional component 21300// may return an Array instead of a single root. In this case, just a simple 21301// normalization is needed - if any child is an Array, we flatten the whole 21302// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep 21303// because functional components already normalize their own children. 21304function simpleNormalizeChildren (children) { 21305 for (var i = 0; i < children.length; i++) { 21306 if (Array.isArray(children[i])) { 21307 return Array.prototype.concat.apply([], children) 21308 } 21309 } 21310 return children 21311} 21312 21313// 2. When the children contains constructs that always generated nested Arrays, 21314// e.g. <template>, <slot>, v-for, or when the children is provided by user 21315// with hand-written render functions / JSX. In such cases a full normalization 21316// is needed to cater to all possible types of children values. 21317function normalizeChildren (children) { 21318 return isPrimitive(children) 21319 ? [createTextVNode(children)] 21320 : Array.isArray(children) 21321 ? normalizeArrayChildren(children) 21322 : undefined 21323} 21324 21325function isTextNode (node) { 21326 return isDef(node) && isDef(node.text) && isFalse(node.isComment) 21327} 21328 21329function normalizeArrayChildren (children, nestedIndex) { 21330 var res = []; 21331 var i, c, lastIndex, last; 21332 for (i = 0; i < children.length; i++) { 21333 c = children[i]; 21334 if (isUndef(c) || typeof c === 'boolean') { continue } 21335 lastIndex = res.length - 1; 21336 last = res[lastIndex]; 21337 // nested 21338 if (Array.isArray(c)) { 21339 if (c.length > 0) { 21340 c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)); 21341 // merge adjacent text nodes 21342 if (isTextNode(c[0]) && isTextNode(last)) { 21343 res[lastIndex] = createTextVNode(last.text + (c[0]).text); 21344 c.shift(); 21345 } 21346 res.push.apply(res, c); 21347 } 21348 } else if (isPrimitive(c)) { 21349 if (isTextNode(last)) { 21350 // merge adjacent text nodes 21351 // this is necessary for SSR hydration because text nodes are 21352 // essentially merged when rendered to HTML strings 21353 res[lastIndex] = createTextVNode(last.text + c); 21354 } else if (c !== '') { 21355 // convert primitive to vnode 21356 res.push(createTextVNode(c)); 21357 } 21358 } else { 21359 if (isTextNode(c) && isTextNode(last)) { 21360 // merge adjacent text nodes 21361 res[lastIndex] = createTextVNode(last.text + c.text); 21362 } else { 21363 // default key for nested array children (likely generated by v-for) 21364 if (isTrue(children._isVList) && 21365 isDef(c.tag) && 21366 isUndef(c.key) && 21367 isDef(nestedIndex)) { 21368 c.key = "__vlist" + nestedIndex + "_" + i + "__"; 21369 } 21370 res.push(c); 21371 } 21372 } 21373 } 21374 return res 21375} 21376 21377/* */ 21378 21379function ensureCtor (comp, base) { 21380 if ( 21381 comp.__esModule || 21382 (hasSymbol && comp[Symbol.toStringTag] === 'Module') 21383 ) { 21384 comp = comp.default; 21385 } 21386 return isObject(comp) 21387 ? base.extend(comp) 21388 : comp 21389} 21390 21391function createAsyncPlaceholder ( 21392 factory, 21393 data, 21394 context, 21395 children, 21396 tag 21397) { 21398 var node = createEmptyVNode(); 21399 node.asyncFactory = factory; 21400 node.asyncMeta = { data: data, context: context, children: children, tag: tag }; 21401 return node 21402} 21403 21404function resolveAsyncComponent ( 21405 factory, 21406 baseCtor, 21407 context 21408) { 21409 if (isTrue(factory.error) && isDef(factory.errorComp)) { 21410 return factory.errorComp 21411 } 21412 21413 if (isDef(factory.resolved)) { 21414 return factory.resolved 21415 } 21416 21417 if (isTrue(factory.loading) && isDef(factory.loadingComp)) { 21418 return factory.loadingComp 21419 } 21420 21421 if (isDef(factory.contexts)) { 21422 // already pending 21423 factory.contexts.push(context); 21424 } else { 21425 var contexts = factory.contexts = [context]; 21426 var sync = true; 21427 21428 var forceRender = function () { 21429 for (var i = 0, l = contexts.length; i < l; i++) { 21430 contexts[i].$forceUpdate(); 21431 } 21432 }; 21433 21434 var resolve = once(function (res) { 21435 // cache resolved 21436 factory.resolved = ensureCtor(res, baseCtor); 21437 // invoke callbacks only if this is not a synchronous resolve 21438 // (async resolves are shimmed as synchronous during SSR) 21439 if (!sync) { 21440 forceRender(); 21441 } 21442 }); 21443 21444 var reject = once(function (reason) { 21445 true && warn( 21446 "Failed to resolve async component: " + (String(factory)) + 21447 (reason ? ("\nReason: " + reason) : '') 21448 ); 21449 if (isDef(factory.errorComp)) { 21450 factory.error = true; 21451 forceRender(); 21452 } 21453 }); 21454 21455 var res = factory(resolve, reject); 21456 21457 if (isObject(res)) { 21458 if (typeof res.then === 'function') { 21459 // () => Promise 21460 if (isUndef(factory.resolved)) { 21461 res.then(resolve, reject); 21462 } 21463 } else if (isDef(res.component) && typeof res.component.then === 'function') { 21464 res.component.then(resolve, reject); 21465 21466 if (isDef(res.error)) { 21467 factory.errorComp = ensureCtor(res.error, baseCtor); 21468 } 21469 21470 if (isDef(res.loading)) { 21471 factory.loadingComp = ensureCtor(res.loading, baseCtor); 21472 if (res.delay === 0) { 21473 factory.loading = true; 21474 } else { 21475 setTimeout(function () { 21476 if (isUndef(factory.resolved) && isUndef(factory.error)) { 21477 factory.loading = true; 21478 forceRender(); 21479 } 21480 }, res.delay || 200); 21481 } 21482 } 21483 21484 if (isDef(res.timeout)) { 21485 setTimeout(function () { 21486 if (isUndef(factory.resolved)) { 21487 reject( 21488 true 21489 ? ("timeout (" + (res.timeout) + "ms)") 21490 : 0 21491 ); 21492 } 21493 }, res.timeout); 21494 } 21495 } 21496 } 21497 21498 sync = false; 21499 // return in case resolved synchronously 21500 return factory.loading 21501 ? factory.loadingComp 21502 : factory.resolved 21503 } 21504} 21505 21506/* */ 21507 21508function isAsyncPlaceholder (node) { 21509 return node.isComment && node.asyncFactory 21510} 21511 21512/* */ 21513 21514function getFirstComponentChild (children) { 21515 if (Array.isArray(children)) { 21516 for (var i = 0; i < children.length; i++) { 21517 var c = children[i]; 21518 if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 21519 return c 21520 } 21521 } 21522 } 21523} 21524 21525/* */ 21526 21527/* */ 21528 21529function initEvents (vm) { 21530 vm._events = Object.create(null); 21531 vm._hasHookEvent = false; 21532 // init parent attached events 21533 var listeners = vm.$options._parentListeners; 21534 if (listeners) { 21535 updateComponentListeners(vm, listeners); 21536 } 21537} 21538 21539var target; 21540 21541function add (event, fn, once) { 21542 if (once) { 21543 target.$once(event, fn); 21544 } else { 21545 target.$on(event, fn); 21546 } 21547} 21548 21549function remove$1 (event, fn) { 21550 target.$off(event, fn); 21551} 21552 21553function updateComponentListeners ( 21554 vm, 21555 listeners, 21556 oldListeners 21557) { 21558 target = vm; 21559 updateListeners(listeners, oldListeners || {}, add, remove$1, vm); 21560 target = undefined; 21561} 21562 21563function eventsMixin (Vue) { 21564 var hookRE = /^hook:/; 21565 Vue.prototype.$on = function (event, fn) { 21566 var this$1 = this; 21567 21568 var vm = this; 21569 if (Array.isArray(event)) { 21570 for (var i = 0, l = event.length; i < l; i++) { 21571 this$1.$on(event[i], fn); 21572 } 21573 } else { 21574 (vm._events[event] || (vm._events[event] = [])).push(fn); 21575 // optimize hook:event cost by using a boolean flag marked at registration 21576 // instead of a hash lookup 21577 if (hookRE.test(event)) { 21578 vm._hasHookEvent = true; 21579 } 21580 } 21581 return vm 21582 }; 21583 21584 Vue.prototype.$once = function (event, fn) { 21585 var vm = this; 21586 function on () { 21587 vm.$off(event, on); 21588 fn.apply(vm, arguments); 21589 } 21590 on.fn = fn; 21591 vm.$on(event, on); 21592 return vm 21593 }; 21594 21595 Vue.prototype.$off = function (event, fn) { 21596 var this$1 = this; 21597 21598 var vm = this; 21599 // all 21600 if (!arguments.length) { 21601 vm._events = Object.create(null); 21602 return vm 21603 } 21604 // array of events 21605 if (Array.isArray(event)) { 21606 for (var i = 0, l = event.length; i < l; i++) { 21607 this$1.$off(event[i], fn); 21608 } 21609 return vm 21610 } 21611 // specific event 21612 var cbs = vm._events[event]; 21613 if (!cbs) { 21614 return vm 21615 } 21616 if (!fn) { 21617 vm._events[event] = null; 21618 return vm 21619 } 21620 if (fn) { 21621 // specific handler 21622 var cb; 21623 var i$1 = cbs.length; 21624 while (i$1--) { 21625 cb = cbs[i$1]; 21626 if (cb === fn || cb.fn === fn) { 21627 cbs.splice(i$1, 1); 21628 break 21629 } 21630 } 21631 } 21632 return vm 21633 }; 21634 21635 Vue.prototype.$emit = function (event) { 21636 var vm = this; 21637 if (true) { 21638 var lowerCaseEvent = event.toLowerCase(); 21639 if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { 21640 tip( 21641 "Event \"" + lowerCaseEvent + "\" is emitted in component " + 21642 (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + 21643 "Note that HTML attributes are case-insensitive and you cannot use " + 21644 "v-on to listen to camelCase events when using in-DOM templates. " + 21645 "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." 21646 ); 21647 } 21648 } 21649 var cbs = vm._events[event]; 21650 if (cbs) { 21651 cbs = cbs.length > 1 ? toArray(cbs) : cbs; 21652 var args = toArray(arguments, 1); 21653 for (var i = 0, l = cbs.length; i < l; i++) { 21654 try { 21655 cbs[i].apply(vm, args); 21656 } catch (e) { 21657 handleError(e, vm, ("event handler for \"" + event + "\"")); 21658 } 21659 } 21660 } 21661 return vm 21662 }; 21663} 21664 21665/* */ 21666 21667 21668 21669/** 21670 * Runtime helper for resolving raw children VNodes into a slot object. 21671 */ 21672function resolveSlots ( 21673 children, 21674 context 21675) { 21676 var slots = {}; 21677 if (!children) { 21678 return slots 21679 } 21680 for (var i = 0, l = children.length; i < l; i++) { 21681 var child = children[i]; 21682 var data = child.data; 21683 // remove slot attribute if the node is resolved as a Vue slot node 21684 if (data && data.attrs && data.attrs.slot) { 21685 delete data.attrs.slot; 21686 } 21687 // named slots should only be respected if the vnode was rendered in the 21688 // same context. 21689 if ((child.context === context || child.fnContext === context) && 21690 data && data.slot != null 21691 ) { 21692 var name = data.slot; 21693 var slot = (slots[name] || (slots[name] = [])); 21694 if (child.tag === 'template') { 21695 slot.push.apply(slot, child.children || []); 21696 } else { 21697 slot.push(child); 21698 } 21699 } else { 21700 (slots.default || (slots.default = [])).push(child); 21701 } 21702 } 21703 // ignore slots that contains only whitespace 21704 for (var name$1 in slots) { 21705 if (slots[name$1].every(isWhitespace)) { 21706 delete slots[name$1]; 21707 } 21708 } 21709 return slots 21710} 21711 21712function isWhitespace (node) { 21713 return (node.isComment && !node.asyncFactory) || node.text === ' ' 21714} 21715 21716function resolveScopedSlots ( 21717 fns, // see flow/vnode 21718 res 21719) { 21720 res = res || {}; 21721 for (var i = 0; i < fns.length; i++) { 21722 if (Array.isArray(fns[i])) { 21723 resolveScopedSlots(fns[i], res); 21724 } else { 21725 res[fns[i].key] = fns[i].fn; 21726 } 21727 } 21728 return res 21729} 21730 21731/* */ 21732 21733var activeInstance = null; 21734var isUpdatingChildComponent = false; 21735 21736function initLifecycle (vm) { 21737 var options = vm.$options; 21738 21739 // locate first non-abstract parent 21740 var parent = options.parent; 21741 if (parent && !options.abstract) { 21742 while (parent.$options.abstract && parent.$parent) { 21743 parent = parent.$parent; 21744 } 21745 parent.$children.push(vm); 21746 } 21747 21748 vm.$parent = parent; 21749 vm.$root = parent ? parent.$root : vm; 21750 21751 vm.$children = []; 21752 vm.$refs = {}; 21753 21754 vm._watcher = null; 21755 vm._inactive = null; 21756 vm._directInactive = false; 21757 vm._isMounted = false; 21758 vm._isDestroyed = false; 21759 vm._isBeingDestroyed = false; 21760} 21761 21762function lifecycleMixin (Vue) { 21763 Vue.prototype._update = function (vnode, hydrating) { 21764 var vm = this; 21765 if (vm._isMounted) { 21766 callHook(vm, 'beforeUpdate'); 21767 } 21768 var prevEl = vm.$el; 21769 var prevVnode = vm._vnode; 21770 var prevActiveInstance = activeInstance; 21771 activeInstance = vm; 21772 vm._vnode = vnode; 21773 // Vue.prototype.__patch__ is injected in entry points 21774 // based on the rendering backend used. 21775 if (!prevVnode) { 21776 // initial render 21777 vm.$el = vm.__patch__( 21778 vm.$el, vnode, hydrating, false /* removeOnly */, 21779 vm.$options._parentElm, 21780 vm.$options._refElm 21781 ); 21782 // no need for the ref nodes after initial patch 21783 // this prevents keeping a detached DOM tree in memory (#5851) 21784 vm.$options._parentElm = vm.$options._refElm = null; 21785 } else { 21786 // updates 21787 vm.$el = vm.__patch__(prevVnode, vnode); 21788 } 21789 activeInstance = prevActiveInstance; 21790 // update __vue__ reference 21791 if (prevEl) { 21792 prevEl.__vue__ = null; 21793 } 21794 if (vm.$el) { 21795 vm.$el.__vue__ = vm; 21796 } 21797 // if parent is an HOC, update its $el as well 21798 if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { 21799 vm.$parent.$el = vm.$el; 21800 } 21801 // updated hook is called by the scheduler to ensure that children are 21802 // updated in a parent's updated hook. 21803 }; 21804 21805 Vue.prototype.$forceUpdate = function () { 21806 var vm = this; 21807 if (vm._watcher) { 21808 vm._watcher.update(); 21809 } 21810 }; 21811 21812 Vue.prototype.$destroy = function () { 21813 var vm = this; 21814 if (vm._isBeingDestroyed) { 21815 return 21816 } 21817 callHook(vm, 'beforeDestroy'); 21818 vm._isBeingDestroyed = true; 21819 // remove self from parent 21820 var parent = vm.$parent; 21821 if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { 21822 remove(parent.$children, vm); 21823 } 21824 // teardown watchers 21825 if (vm._watcher) { 21826 vm._watcher.teardown(); 21827 } 21828 var i = vm._watchers.length; 21829 while (i--) { 21830 vm._watchers[i].teardown(); 21831 } 21832 // remove reference from data ob 21833 // frozen object may not have observer. 21834 if (vm._data.__ob__) { 21835 vm._data.__ob__.vmCount--; 21836 } 21837 // call the last hook... 21838 vm._isDestroyed = true; 21839 // invoke destroy hooks on current rendered tree 21840 vm.__patch__(vm._vnode, null); 21841 // fire destroyed hook 21842 callHook(vm, 'destroyed'); 21843 // turn off all instance listeners. 21844 vm.$off(); 21845 // remove __vue__ reference 21846 if (vm.$el) { 21847 vm.$el.__vue__ = null; 21848 } 21849 // release circular reference (#6759) 21850 if (vm.$vnode) { 21851 vm.$vnode.parent = null; 21852 } 21853 }; 21854} 21855 21856function mountComponent ( 21857 vm, 21858 el, 21859 hydrating 21860) { 21861 vm.$el = el; 21862 if (!vm.$options.render) { 21863 vm.$options.render = createEmptyVNode; 21864 if (true) { 21865 /* istanbul ignore if */ 21866 if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || 21867 vm.$options.el || el) { 21868 warn( 21869 'You are using the runtime-only build of Vue where the template ' + 21870 'compiler is not available. Either pre-compile the templates into ' + 21871 'render functions, or use the compiler-included build.', 21872 vm 21873 ); 21874 } else { 21875 warn( 21876 'Failed to mount component: template or render function not defined.', 21877 vm 21878 ); 21879 } 21880 } 21881 } 21882 callHook(vm, 'beforeMount'); 21883 21884 var updateComponent; 21885 /* istanbul ignore if */ 21886 if ( true && config.performance && mark) { 21887 updateComponent = function () { 21888 var name = vm._name; 21889 var id = vm._uid; 21890 var startTag = "vue-perf-start:" + id; 21891 var endTag = "vue-perf-end:" + id; 21892 21893 mark(startTag); 21894 var vnode = vm._render(); 21895 mark(endTag); 21896 measure(("vue " + name + " render"), startTag, endTag); 21897 21898 mark(startTag); 21899 vm._update(vnode, hydrating); 21900 mark(endTag); 21901 measure(("vue " + name + " patch"), startTag, endTag); 21902 }; 21903 } else { 21904 updateComponent = function () { 21905 vm._update(vm._render(), hydrating); 21906 }; 21907 } 21908 21909 // we set this to vm._watcher inside the watcher's constructor 21910 // since the watcher's initial patch may call $forceUpdate (e.g. inside child 21911 // component's mounted hook), which relies on vm._watcher being already defined 21912 new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */); 21913 hydrating = false; 21914 21915 // manually mounted instance, call mounted on self 21916 // mounted is called for render-created child components in its inserted hook 21917 if (vm.$vnode == null) { 21918 vm._isMounted = true; 21919 callHook(vm, 'mounted'); 21920 } 21921 return vm 21922} 21923 21924function updateChildComponent ( 21925 vm, 21926 propsData, 21927 listeners, 21928 parentVnode, 21929 renderChildren 21930) { 21931 if (true) { 21932 isUpdatingChildComponent = true; 21933 } 21934 21935 // determine whether component has slot children 21936 // we need to do this before overwriting $options._renderChildren 21937 var hasChildren = !!( 21938 renderChildren || // has new static slots 21939 vm.$options._renderChildren || // has old static slots 21940 parentVnode.data.scopedSlots || // has new scoped slots 21941 vm.$scopedSlots !== emptyObject // has old scoped slots 21942 ); 21943 21944 vm.$options._parentVnode = parentVnode; 21945 vm.$vnode = parentVnode; // update vm's placeholder node without re-render 21946 21947 if (vm._vnode) { // update child tree's parent 21948 vm._vnode.parent = parentVnode; 21949 } 21950 vm.$options._renderChildren = renderChildren; 21951 21952 // update $attrs and $listeners hash 21953 // these are also reactive so they may trigger child update if the child 21954 // used them during render 21955 vm.$attrs = parentVnode.data.attrs || emptyObject; 21956 vm.$listeners = listeners || emptyObject; 21957 21958 // update props 21959 if (propsData && vm.$options.props) { 21960 toggleObserving(false); 21961 var props = vm._props; 21962 var propKeys = vm.$options._propKeys || []; 21963 for (var i = 0; i < propKeys.length; i++) { 21964 var key = propKeys[i]; 21965 var propOptions = vm.$options.props; // wtf flow? 21966 props[key] = validateProp(key, propOptions, propsData, vm); 21967 } 21968 toggleObserving(true); 21969 // keep a copy of raw propsData 21970 vm.$options.propsData = propsData; 21971 } 21972 21973 // update listeners 21974 listeners = listeners || emptyObject; 21975 var oldListeners = vm.$options._parentListeners; 21976 vm.$options._parentListeners = listeners; 21977 updateComponentListeners(vm, listeners, oldListeners); 21978 21979 // resolve slots + force update if has children 21980 if (hasChildren) { 21981 vm.$slots = resolveSlots(renderChildren, parentVnode.context); 21982 vm.$forceUpdate(); 21983 } 21984 21985 if (true) { 21986 isUpdatingChildComponent = false; 21987 } 21988} 21989 21990function isInInactiveTree (vm) { 21991 while (vm && (vm = vm.$parent)) { 21992 if (vm._inactive) { return true } 21993 } 21994 return false 21995} 21996 21997function activateChildComponent (vm, direct) { 21998 if (direct) { 21999 vm._directInactive = false; 22000 if (isInInactiveTree(vm)) { 22001 return 22002 } 22003 } else if (vm._directInactive) { 22004 return 22005 } 22006 if (vm._inactive || vm._inactive === null) { 22007 vm._inactive = false; 22008 for (var i = 0; i < vm.$children.length; i++) { 22009 activateChildComponent(vm.$children[i]); 22010 } 22011 callHook(vm, 'activated'); 22012 } 22013} 22014 22015function deactivateChildComponent (vm, direct) { 22016 if (direct) { 22017 vm._directInactive = true; 22018 if (isInInactiveTree(vm)) { 22019 return 22020 } 22021 } 22022 if (!vm._inactive) { 22023 vm._inactive = true; 22024 for (var i = 0; i < vm.$children.length; i++) { 22025 deactivateChildComponent(vm.$children[i]); 22026 } 22027 callHook(vm, 'deactivated'); 22028 } 22029} 22030 22031function callHook (vm, hook) { 22032 // #7573 disable dep collection when invoking lifecycle hooks 22033 pushTarget(); 22034 var handlers = vm.$options[hook]; 22035 if (handlers) { 22036 for (var i = 0, j = handlers.length; i < j; i++) { 22037 try { 22038 handlers[i].call(vm); 22039 } catch (e) { 22040 handleError(e, vm, (hook + " hook")); 22041 } 22042 } 22043 } 22044 if (vm._hasHookEvent) { 22045 vm.$emit('hook:' + hook); 22046 } 22047 popTarget(); 22048} 22049 22050/* */ 22051 22052 22053var MAX_UPDATE_COUNT = 100; 22054 22055var queue = []; 22056var activatedChildren = []; 22057var has = {}; 22058var circular = {}; 22059var waiting = false; 22060var flushing = false; 22061var index = 0; 22062 22063/** 22064 * Reset the scheduler's state. 22065 */ 22066function resetSchedulerState () { 22067 index = queue.length = activatedChildren.length = 0; 22068 has = {}; 22069 if (true) { 22070 circular = {}; 22071 } 22072 waiting = flushing = false; 22073} 22074 22075/** 22076 * Flush both queues and run the watchers. 22077 */ 22078function flushSchedulerQueue () { 22079 flushing = true; 22080 var watcher, id; 22081 22082 // Sort queue before flush. 22083 // This ensures that: 22084 // 1. Components are updated from parent to child. (because parent is always 22085 // created before the child) 22086 // 2. A component's user watchers are run before its render watcher (because 22087 // user watchers are created before the render watcher) 22088 // 3. If a component is destroyed during a parent component's watcher run, 22089 // its watchers can be skipped. 22090 queue.sort(function (a, b) { return a.id - b.id; }); 22091 22092 // do not cache length because more watchers might be pushed 22093 // as we run existing watchers 22094 for (index = 0; index < queue.length; index++) { 22095 watcher = queue[index]; 22096 id = watcher.id; 22097 has[id] = null; 22098 watcher.run(); 22099 // in dev build, check and stop circular updates. 22100 if ( true && has[id] != null) { 22101 circular[id] = (circular[id] || 0) + 1; 22102 if (circular[id] > MAX_UPDATE_COUNT) { 22103 warn( 22104 'You may have an infinite update loop ' + ( 22105 watcher.user 22106 ? ("in watcher with expression \"" + (watcher.expression) + "\"") 22107 : "in a component render function." 22108 ), 22109 watcher.vm 22110 ); 22111 break 22112 } 22113 } 22114 } 22115 22116 // keep copies of post queues before resetting state 22117 var activatedQueue = activatedChildren.slice(); 22118 var updatedQueue = queue.slice(); 22119 22120 resetSchedulerState(); 22121 22122 // call component updated and activated hooks 22123 callActivatedHooks(activatedQueue); 22124 callUpdatedHooks(updatedQueue); 22125 22126 // devtool hook 22127 /* istanbul ignore if */ 22128 if (devtools && config.devtools) { 22129 devtools.emit('flush'); 22130 } 22131} 22132 22133function callUpdatedHooks (queue) { 22134 var i = queue.length; 22135 while (i--) { 22136 var watcher = queue[i]; 22137 var vm = watcher.vm; 22138 if (vm._watcher === watcher && vm._isMounted) { 22139 callHook(vm, 'updated'); 22140 } 22141 } 22142} 22143 22144/** 22145 * Queue a kept-alive component that was activated during patch. 22146 * The queue will be processed after the entire tree has been patched. 22147 */ 22148function queueActivatedComponent (vm) { 22149 // setting _inactive to false here so that a render function can 22150 // rely on checking whether it's in an inactive tree (e.g. router-view) 22151 vm._inactive = false; 22152 activatedChildren.push(vm); 22153} 22154 22155function callActivatedHooks (queue) { 22156 for (var i = 0; i < queue.length; i++) { 22157 queue[i]._inactive = true; 22158 activateChildComponent(queue[i], true /* true */); 22159 } 22160} 22161 22162/** 22163 * Push a watcher into the watcher queue. 22164 * Jobs with duplicate IDs will be skipped unless it's 22165 * pushed when the queue is being flushed. 22166 */ 22167function queueWatcher (watcher) { 22168 var id = watcher.id; 22169 if (has[id] == null) { 22170 has[id] = true; 22171 if (!flushing) { 22172 queue.push(watcher); 22173 } else { 22174 // if already flushing, splice the watcher based on its id 22175 // if already past its id, it will be run next immediately. 22176 var i = queue.length - 1; 22177 while (i > index && queue[i].id > watcher.id) { 22178 i--; 22179 } 22180 queue.splice(i + 1, 0, watcher); 22181 } 22182 // queue the flush 22183 if (!waiting) { 22184 waiting = true; 22185 nextTick(flushSchedulerQueue); 22186 } 22187 } 22188} 22189 22190/* */ 22191 22192var uid$1 = 0; 22193 22194/** 22195 * A watcher parses an expression, collects dependencies, 22196 * and fires callback when the expression value changes. 22197 * This is used for both the $watch() api and directives. 22198 */ 22199var Watcher = function Watcher ( 22200 vm, 22201 expOrFn, 22202 cb, 22203 options, 22204 isRenderWatcher 22205) { 22206 this.vm = vm; 22207 if (isRenderWatcher) { 22208 vm._watcher = this; 22209 } 22210 vm._watchers.push(this); 22211 // options 22212 if (options) { 22213 this.deep = !!options.deep; 22214 this.user = !!options.user; 22215 this.lazy = !!options.lazy; 22216 this.sync = !!options.sync; 22217 } else { 22218 this.deep = this.user = this.lazy = this.sync = false; 22219 } 22220 this.cb = cb; 22221 this.id = ++uid$1; // uid for batching 22222 this.active = true; 22223 this.dirty = this.lazy; // for lazy watchers 22224 this.deps = []; 22225 this.newDeps = []; 22226 this.depIds = new _Set(); 22227 this.newDepIds = new _Set(); 22228 this.expression = true 22229 ? expOrFn.toString() 22230 : 0; 22231 // parse expression for getter 22232 if (typeof expOrFn === 'function') { 22233 this.getter = expOrFn; 22234 } else { 22235 this.getter = parsePath(expOrFn); 22236 if (!this.getter) { 22237 this.getter = function () {}; 22238 true && warn( 22239 "Failed watching path: \"" + expOrFn + "\" " + 22240 'Watcher only accepts simple dot-delimited paths. ' + 22241 'For full control, use a function instead.', 22242 vm 22243 ); 22244 } 22245 } 22246 this.value = this.lazy 22247 ? undefined 22248 : this.get(); 22249}; 22250 22251/** 22252 * Evaluate the getter, and re-collect dependencies. 22253 */ 22254Watcher.prototype.get = function get () { 22255 pushTarget(this); 22256 var value; 22257 var vm = this.vm; 22258 try { 22259 value = this.getter.call(vm, vm); 22260 } catch (e) { 22261 if (this.user) { 22262 handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); 22263 } else { 22264 throw e 22265 } 22266 } finally { 22267 // "touch" every property so they are all tracked as 22268 // dependencies for deep watching 22269 if (this.deep) { 22270 traverse(value); 22271 } 22272 popTarget(); 22273 this.cleanupDeps(); 22274 } 22275 return value 22276}; 22277 22278/** 22279 * Add a dependency to this directive. 22280 */ 22281Watcher.prototype.addDep = function addDep (dep) { 22282 var id = dep.id; 22283 if (!this.newDepIds.has(id)) { 22284 this.newDepIds.add(id); 22285 this.newDeps.push(dep); 22286 if (!this.depIds.has(id)) { 22287 dep.addSub(this); 22288 } 22289 } 22290}; 22291 22292/** 22293 * Clean up for dependency collection. 22294 */ 22295Watcher.prototype.cleanupDeps = function cleanupDeps () { 22296 var this$1 = this; 22297 22298 var i = this.deps.length; 22299 while (i--) { 22300 var dep = this$1.deps[i]; 22301 if (!this$1.newDepIds.has(dep.id)) { 22302 dep.removeSub(this$1); 22303 } 22304 } 22305 var tmp = this.depIds; 22306 this.depIds = this.newDepIds; 22307 this.newDepIds = tmp; 22308 this.newDepIds.clear(); 22309 tmp = this.deps; 22310 this.deps = this.newDeps; 22311 this.newDeps = tmp; 22312 this.newDeps.length = 0; 22313}; 22314 22315/** 22316 * Subscriber interface. 22317 * Will be called when a dependency changes. 22318 */ 22319Watcher.prototype.update = function update () { 22320 /* istanbul ignore else */ 22321 if (this.lazy) { 22322 this.dirty = true; 22323 } else if (this.sync) { 22324 this.run(); 22325 } else { 22326 queueWatcher(this); 22327 } 22328}; 22329 22330/** 22331 * Scheduler job interface. 22332 * Will be called by the scheduler. 22333 */ 22334Watcher.prototype.run = function run () { 22335 if (this.active) { 22336 var value = this.get(); 22337 if ( 22338 value !== this.value || 22339 // Deep watchers and watchers on Object/Arrays should fire even 22340 // when the value is the same, because the value may 22341 // have mutated. 22342 isObject(value) || 22343 this.deep 22344 ) { 22345 // set new value 22346 var oldValue = this.value; 22347 this.value = value; 22348 if (this.user) { 22349 try { 22350 this.cb.call(this.vm, value, oldValue); 22351 } catch (e) { 22352 handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); 22353 } 22354 } else { 22355 this.cb.call(this.vm, value, oldValue); 22356 } 22357 } 22358 } 22359}; 22360 22361/** 22362 * Evaluate the value of the watcher. 22363 * This only gets called for lazy watchers. 22364 */ 22365Watcher.prototype.evaluate = function evaluate () { 22366 this.value = this.get(); 22367 this.dirty = false; 22368}; 22369 22370/** 22371 * Depend on all deps collected by this watcher. 22372 */ 22373Watcher.prototype.depend = function depend () { 22374 var this$1 = this; 22375 22376 var i = this.deps.length; 22377 while (i--) { 22378 this$1.deps[i].depend(); 22379 } 22380}; 22381 22382/** 22383 * Remove self from all dependencies' subscriber list. 22384 */ 22385Watcher.prototype.teardown = function teardown () { 22386 var this$1 = this; 22387 22388 if (this.active) { 22389 // remove self from vm's watcher list 22390 // this is a somewhat expensive operation so we skip it 22391 // if the vm is being destroyed. 22392 if (!this.vm._isBeingDestroyed) { 22393 remove(this.vm._watchers, this); 22394 } 22395 var i = this.deps.length; 22396 while (i--) { 22397 this$1.deps[i].removeSub(this$1); 22398 } 22399 this.active = false; 22400 } 22401}; 22402 22403/* */ 22404 22405var sharedPropertyDefinition = { 22406 enumerable: true, 22407 configurable: true, 22408 get: noop, 22409 set: noop 22410}; 22411 22412function proxy (target, sourceKey, key) { 22413 sharedPropertyDefinition.get = function proxyGetter () { 22414 return this[sourceKey][key] 22415 }; 22416 sharedPropertyDefinition.set = function proxySetter (val) { 22417 this[sourceKey][key] = val; 22418 }; 22419 Object.defineProperty(target, key, sharedPropertyDefinition); 22420} 22421 22422function initState (vm) { 22423 vm._watchers = []; 22424 var opts = vm.$options; 22425 if (opts.props) { initProps(vm, opts.props); } 22426 if (opts.methods) { initMethods(vm, opts.methods); } 22427 if (opts.data) { 22428 initData(vm); 22429 } else { 22430 observe(vm._data = {}, true /* asRootData */); 22431 } 22432 if (opts.computed) { initComputed(vm, opts.computed); } 22433 if (opts.watch && opts.watch !== nativeWatch) { 22434 initWatch(vm, opts.watch); 22435 } 22436} 22437 22438function initProps (vm, propsOptions) { 22439 var propsData = vm.$options.propsData || {}; 22440 var props = vm._props = {}; 22441 // cache prop keys so that future props updates can iterate using Array 22442 // instead of dynamic object key enumeration. 22443 var keys = vm.$options._propKeys = []; 22444 var isRoot = !vm.$parent; 22445 // root instance props should be converted 22446 if (!isRoot) { 22447 toggleObserving(false); 22448 } 22449 var loop = function ( key ) { 22450 keys.push(key); 22451 var value = validateProp(key, propsOptions, propsData, vm); 22452 /* istanbul ignore else */ 22453 if (true) { 22454 var hyphenatedKey = hyphenate(key); 22455 if (isReservedAttribute(hyphenatedKey) || 22456 config.isReservedAttr(hyphenatedKey)) { 22457 warn( 22458 ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), 22459 vm 22460 ); 22461 } 22462 defineReactive(props, key, value, function () { 22463 if (vm.$parent && !isUpdatingChildComponent) { 22464 warn( 22465 "Avoid mutating a prop directly since the value will be " + 22466 "overwritten whenever the parent component re-renders. " + 22467 "Instead, use a data or computed property based on the prop's " + 22468 "value. Prop being mutated: \"" + key + "\"", 22469 vm 22470 ); 22471 } 22472 }); 22473 } else {} 22474 // static props are already proxied on the component's prototype 22475 // during Vue.extend(). We only need to proxy props defined at 22476 // instantiation here. 22477 if (!(key in vm)) { 22478 proxy(vm, "_props", key); 22479 } 22480 }; 22481 22482 for (var key in propsOptions) loop( key ); 22483 toggleObserving(true); 22484} 22485 22486function initData (vm) { 22487 var data = vm.$options.data; 22488 data = vm._data = typeof data === 'function' 22489 ? getData(data, vm) 22490 : data || {}; 22491 if (!isPlainObject(data)) { 22492 data = {}; 22493 true && warn( 22494 'data functions should return an object:\n' + 22495 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', 22496 vm 22497 ); 22498 } 22499 // proxy data on instance 22500 var keys = Object.keys(data); 22501 var props = vm.$options.props; 22502 var methods = vm.$options.methods; 22503 var i = keys.length; 22504 while (i--) { 22505 var key = keys[i]; 22506 if (true) { 22507 if (methods && hasOwn(methods, key)) { 22508 warn( 22509 ("Method \"" + key + "\" has already been defined as a data property."), 22510 vm 22511 ); 22512 } 22513 } 22514 if (props && hasOwn(props, key)) { 22515 true && warn( 22516 "The data property \"" + key + "\" is already declared as a prop. " + 22517 "Use prop default value instead.", 22518 vm 22519 ); 22520 } else if (!isReserved(key)) { 22521 proxy(vm, "_data", key); 22522 } 22523 } 22524 // observe data 22525 observe(data, true /* asRootData */); 22526} 22527 22528function getData (data, vm) { 22529 // #7573 disable dep collection when invoking data getters 22530 pushTarget(); 22531 try { 22532 return data.call(vm, vm) 22533 } catch (e) { 22534 handleError(e, vm, "data()"); 22535 return {} 22536 } finally { 22537 popTarget(); 22538 } 22539} 22540 22541var computedWatcherOptions = { lazy: true }; 22542 22543function initComputed (vm, computed) { 22544 // $flow-disable-line 22545 var watchers = vm._computedWatchers = Object.create(null); 22546 // computed properties are just getters during SSR 22547 var isSSR = isServerRendering(); 22548 22549 for (var key in computed) { 22550 var userDef = computed[key]; 22551 var getter = typeof userDef === 'function' ? userDef : userDef.get; 22552 if ( true && getter == null) { 22553 warn( 22554 ("Getter is missing for computed property \"" + key + "\"."), 22555 vm 22556 ); 22557 } 22558 22559 if (!isSSR) { 22560 // create internal watcher for the computed property. 22561 watchers[key] = new Watcher( 22562 vm, 22563 getter || noop, 22564 noop, 22565 computedWatcherOptions 22566 ); 22567 } 22568 22569 // component-defined computed properties are already defined on the 22570 // component prototype. We only need to define computed properties defined 22571 // at instantiation here. 22572 if (!(key in vm)) { 22573 defineComputed(vm, key, userDef); 22574 } else if (true) { 22575 if (key in vm.$data) { 22576 warn(("The computed property \"" + key + "\" is already defined in data."), vm); 22577 } else if (vm.$options.props && key in vm.$options.props) { 22578 warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); 22579 } 22580 } 22581 } 22582} 22583 22584function defineComputed ( 22585 target, 22586 key, 22587 userDef 22588) { 22589 var shouldCache = !isServerRendering(); 22590 if (typeof userDef === 'function') { 22591 sharedPropertyDefinition.get = shouldCache 22592 ? createComputedGetter(key) 22593 : userDef; 22594 sharedPropertyDefinition.set = noop; 22595 } else { 22596 sharedPropertyDefinition.get = userDef.get 22597 ? shouldCache && userDef.cache !== false 22598 ? createComputedGetter(key) 22599 : userDef.get 22600 : noop; 22601 sharedPropertyDefinition.set = userDef.set 22602 ? userDef.set 22603 : noop; 22604 } 22605 if ( true && 22606 sharedPropertyDefinition.set === noop) { 22607 sharedPropertyDefinition.set = function () { 22608 warn( 22609 ("Computed property \"" + key + "\" was assigned to but it has no setter."), 22610 this 22611 ); 22612 }; 22613 } 22614 Object.defineProperty(target, key, sharedPropertyDefinition); 22615} 22616 22617function createComputedGetter (key) { 22618 return function computedGetter () { 22619 var watcher = this._computedWatchers && this._computedWatchers[key]; 22620 if (watcher) { 22621 if (watcher.dirty) { 22622 watcher.evaluate(); 22623 } 22624 if (Dep.target) { 22625 watcher.depend(); 22626 } 22627 return watcher.value 22628 } 22629 } 22630} 22631 22632function initMethods (vm, methods) { 22633 var props = vm.$options.props; 22634 for (var key in methods) { 22635 if (true) { 22636 if (methods[key] == null) { 22637 warn( 22638 "Method \"" + key + "\" has an undefined value in the component definition. " + 22639 "Did you reference the function correctly?", 22640 vm 22641 ); 22642 } 22643 if (props && hasOwn(props, key)) { 22644 warn( 22645 ("Method \"" + key + "\" has already been defined as a prop."), 22646 vm 22647 ); 22648 } 22649 if ((key in vm) && isReserved(key)) { 22650 warn( 22651 "Method \"" + key + "\" conflicts with an existing Vue instance method. " + 22652 "Avoid defining component methods that start with _ or $." 22653 ); 22654 } 22655 } 22656 vm[key] = methods[key] == null ? noop : bind(methods[key], vm); 22657 } 22658} 22659 22660function initWatch (vm, watch) { 22661 for (var key in watch) { 22662 var handler = watch[key]; 22663 if (Array.isArray(handler)) { 22664 for (var i = 0; i < handler.length; i++) { 22665 createWatcher(vm, key, handler[i]); 22666 } 22667 } else { 22668 createWatcher(vm, key, handler); 22669 } 22670 } 22671} 22672 22673function createWatcher ( 22674 vm, 22675 expOrFn, 22676 handler, 22677 options 22678) { 22679 if (isPlainObject(handler)) { 22680 options = handler; 22681 handler = handler.handler; 22682 } 22683 if (typeof handler === 'string') { 22684 handler = vm[handler]; 22685 } 22686 return vm.$watch(expOrFn, handler, options) 22687} 22688 22689function stateMixin (Vue) { 22690 // flow somehow has problems with directly declared definition object 22691 // when using Object.defineProperty, so we have to procedurally build up 22692 // the object here. 22693 var dataDef = {}; 22694 dataDef.get = function () { return this._data }; 22695 var propsDef = {}; 22696 propsDef.get = function () { return this._props }; 22697 if (true) { 22698 dataDef.set = function (newData) { 22699 warn( 22700 'Avoid replacing instance root $data. ' + 22701 'Use nested data properties instead.', 22702 this 22703 ); 22704 }; 22705 propsDef.set = function () { 22706 warn("$props is readonly.", this); 22707 }; 22708 } 22709 Object.defineProperty(Vue.prototype, '$data', dataDef); 22710 Object.defineProperty(Vue.prototype, '$props', propsDef); 22711 22712 Vue.prototype.$set = set; 22713 Vue.prototype.$delete = del; 22714 22715 Vue.prototype.$watch = function ( 22716 expOrFn, 22717 cb, 22718 options 22719 ) { 22720 var vm = this; 22721 if (isPlainObject(cb)) { 22722 return createWatcher(vm, expOrFn, cb, options) 22723 } 22724 options = options || {}; 22725 options.user = true; 22726 var watcher = new Watcher(vm, expOrFn, cb, options); 22727 if (options.immediate) { 22728 cb.call(vm, watcher.value); 22729 } 22730 return function unwatchFn () { 22731 watcher.teardown(); 22732 } 22733 }; 22734} 22735 22736/* */ 22737 22738function initProvide (vm) { 22739 var provide = vm.$options.provide; 22740 if (provide) { 22741 vm._provided = typeof provide === 'function' 22742 ? provide.call(vm) 22743 : provide; 22744 } 22745} 22746 22747function initInjections (vm) { 22748 var result = resolveInject(vm.$options.inject, vm); 22749 if (result) { 22750 toggleObserving(false); 22751 Object.keys(result).forEach(function (key) { 22752 /* istanbul ignore else */ 22753 if (true) { 22754 defineReactive(vm, key, result[key], function () { 22755 warn( 22756 "Avoid mutating an injected value directly since the changes will be " + 22757 "overwritten whenever the provided component re-renders. " + 22758 "injection being mutated: \"" + key + "\"", 22759 vm 22760 ); 22761 }); 22762 } else {} 22763 }); 22764 toggleObserving(true); 22765 } 22766} 22767 22768function resolveInject (inject, vm) { 22769 if (inject) { 22770 // inject is :any because flow is not smart enough to figure out cached 22771 var result = Object.create(null); 22772 var keys = hasSymbol 22773 ? Reflect.ownKeys(inject).filter(function (key) { 22774 /* istanbul ignore next */ 22775 return Object.getOwnPropertyDescriptor(inject, key).enumerable 22776 }) 22777 : Object.keys(inject); 22778 22779 for (var i = 0; i < keys.length; i++) { 22780 var key = keys[i]; 22781 var provideKey = inject[key].from; 22782 var source = vm; 22783 while (source) { 22784 if (source._provided && hasOwn(source._provided, provideKey)) { 22785 result[key] = source._provided[provideKey]; 22786 break 22787 } 22788 source = source.$parent; 22789 } 22790 if (!source) { 22791 if ('default' in inject[key]) { 22792 var provideDefault = inject[key].default; 22793 result[key] = typeof provideDefault === 'function' 22794 ? provideDefault.call(vm) 22795 : provideDefault; 22796 } else if (true) { 22797 warn(("Injection \"" + key + "\" not found"), vm); 22798 } 22799 } 22800 } 22801 return result 22802 } 22803} 22804 22805/* */ 22806 22807/** 22808 * Runtime helper for rendering v-for lists. 22809 */ 22810function renderList ( 22811 val, 22812 render 22813) { 22814 var ret, i, l, keys, key; 22815 if (Array.isArray(val) || typeof val === 'string') { 22816 ret = new Array(val.length); 22817 for (i = 0, l = val.length; i < l; i++) { 22818 ret[i] = render(val[i], i); 22819 } 22820 } else if (typeof val === 'number') { 22821 ret = new Array(val); 22822 for (i = 0; i < val; i++) { 22823 ret[i] = render(i + 1, i); 22824 } 22825 } else if (isObject(val)) { 22826 keys = Object.keys(val); 22827 ret = new Array(keys.length); 22828 for (i = 0, l = keys.length; i < l; i++) { 22829 key = keys[i]; 22830 ret[i] = render(val[key], key, i); 22831 } 22832 } 22833 if (isDef(ret)) { 22834 (ret)._isVList = true; 22835 } 22836 return ret 22837} 22838 22839/* */ 22840 22841/** 22842 * Runtime helper for rendering <slot> 22843 */ 22844function renderSlot ( 22845 name, 22846 fallback, 22847 props, 22848 bindObject 22849) { 22850 var scopedSlotFn = this.$scopedSlots[name]; 22851 var nodes; 22852 if (scopedSlotFn) { // scoped slot 22853 props = props || {}; 22854 if (bindObject) { 22855 if ( true && !isObject(bindObject)) { 22856 warn( 22857 'slot v-bind without argument expects an Object', 22858 this 22859 ); 22860 } 22861 props = extend(extend({}, bindObject), props); 22862 } 22863 nodes = scopedSlotFn(props) || fallback; 22864 } else { 22865 var slotNodes = this.$slots[name]; 22866 // warn duplicate slot usage 22867 if (slotNodes) { 22868 if ( true && slotNodes._rendered) { 22869 warn( 22870 "Duplicate presence of slot \"" + name + "\" found in the same render tree " + 22871 "- this will likely cause render errors.", 22872 this 22873 ); 22874 } 22875 slotNodes._rendered = true; 22876 } 22877 nodes = slotNodes || fallback; 22878 } 22879 22880 var target = props && props.slot; 22881 if (target) { 22882 return this.$createElement('template', { slot: target }, nodes) 22883 } else { 22884 return nodes 22885 } 22886} 22887 22888/* */ 22889 22890/** 22891 * Runtime helper for resolving filters 22892 */ 22893function resolveFilter (id) { 22894 return resolveAsset(this.$options, 'filters', id, true) || identity 22895} 22896 22897/* */ 22898 22899function isKeyNotMatch (expect, actual) { 22900 if (Array.isArray(expect)) { 22901 return expect.indexOf(actual) === -1 22902 } else { 22903 return expect !== actual 22904 } 22905} 22906 22907/** 22908 * Runtime helper for checking keyCodes from config. 22909 * exposed as Vue.prototype._k 22910 * passing in eventKeyName as last argument separately for backwards compat 22911 */ 22912function checkKeyCodes ( 22913 eventKeyCode, 22914 key, 22915 builtInKeyCode, 22916 eventKeyName, 22917 builtInKeyName 22918) { 22919 var mappedKeyCode = config.keyCodes[key] || builtInKeyCode; 22920 if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { 22921 return isKeyNotMatch(builtInKeyName, eventKeyName) 22922 } else if (mappedKeyCode) { 22923 return isKeyNotMatch(mappedKeyCode, eventKeyCode) 22924 } else if (eventKeyName) { 22925 return hyphenate(eventKeyName) !== key 22926 } 22927} 22928 22929/* */ 22930 22931/** 22932 * Runtime helper for merging v-bind="object" into a VNode's data. 22933 */ 22934function bindObjectProps ( 22935 data, 22936 tag, 22937 value, 22938 asProp, 22939 isSync 22940) { 22941 if (value) { 22942 if (!isObject(value)) { 22943 true && warn( 22944 'v-bind without argument expects an Object or Array value', 22945 this 22946 ); 22947 } else { 22948 if (Array.isArray(value)) { 22949 value = toObject(value); 22950 } 22951 var hash; 22952 var loop = function ( key ) { 22953 if ( 22954 key === 'class' || 22955 key === 'style' || 22956 isReservedAttribute(key) 22957 ) { 22958 hash = data; 22959 } else { 22960 var type = data.attrs && data.attrs.type; 22961 hash = asProp || config.mustUseProp(tag, type, key) 22962 ? data.domProps || (data.domProps = {}) 22963 : data.attrs || (data.attrs = {}); 22964 } 22965 if (!(key in hash)) { 22966 hash[key] = value[key]; 22967 22968 if (isSync) { 22969 var on = data.on || (data.on = {}); 22970 on[("update:" + key)] = function ($event) { 22971 value[key] = $event; 22972 }; 22973 } 22974 } 22975 }; 22976 22977 for (var key in value) loop( key ); 22978 } 22979 } 22980 return data 22981} 22982 22983/* */ 22984 22985/** 22986 * Runtime helper for rendering static trees. 22987 */ 22988function renderStatic ( 22989 index, 22990 isInFor 22991) { 22992 var cached = this._staticTrees || (this._staticTrees = []); 22993 var tree = cached[index]; 22994 // if has already-rendered static tree and not inside v-for, 22995 // we can reuse the same tree. 22996 if (tree && !isInFor) { 22997 return tree 22998 } 22999 // otherwise, render a fresh tree. 23000 tree = cached[index] = this.$options.staticRenderFns[index].call( 23001 this._renderProxy, 23002 null, 23003 this // for render fns generated for functional component templates 23004 ); 23005 markStatic(tree, ("__static__" + index), false); 23006 return tree 23007} 23008 23009/** 23010 * Runtime helper for v-once. 23011 * Effectively it means marking the node as static with a unique key. 23012 */ 23013function markOnce ( 23014 tree, 23015 index, 23016 key 23017) { 23018 markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); 23019 return tree 23020} 23021 23022function markStatic ( 23023 tree, 23024 key, 23025 isOnce 23026) { 23027 if (Array.isArray(tree)) { 23028 for (var i = 0; i < tree.length; i++) { 23029 if (tree[i] && typeof tree[i] !== 'string') { 23030 markStaticNode(tree[i], (key + "_" + i), isOnce); 23031 } 23032 } 23033 } else { 23034 markStaticNode(tree, key, isOnce); 23035 } 23036} 23037 23038function markStaticNode (node, key, isOnce) { 23039 node.isStatic = true; 23040 node.key = key; 23041 node.isOnce = isOnce; 23042} 23043 23044/* */ 23045 23046function bindObjectListeners (data, value) { 23047 if (value) { 23048 if (!isPlainObject(value)) { 23049 true && warn( 23050 'v-on without argument expects an Object value', 23051 this 23052 ); 23053 } else { 23054 var on = data.on = data.on ? extend({}, data.on) : {}; 23055 for (var key in value) { 23056 var existing = on[key]; 23057 var ours = value[key]; 23058 on[key] = existing ? [].concat(existing, ours) : ours; 23059 } 23060 } 23061 } 23062 return data 23063} 23064 23065/* */ 23066 23067function installRenderHelpers (target) { 23068 target._o = markOnce; 23069 target._n = toNumber; 23070 target._s = toString; 23071 target._l = renderList; 23072 target._t = renderSlot; 23073 target._q = looseEqual; 23074 target._i = looseIndexOf; 23075 target._m = renderStatic; 23076 target._f = resolveFilter; 23077 target._k = checkKeyCodes; 23078 target._b = bindObjectProps; 23079 target._v = createTextVNode; 23080 target._e = createEmptyVNode; 23081 target._u = resolveScopedSlots; 23082 target._g = bindObjectListeners; 23083} 23084 23085/* */ 23086 23087function FunctionalRenderContext ( 23088 data, 23089 props, 23090 children, 23091 parent, 23092 Ctor 23093) { 23094 var options = Ctor.options; 23095 // ensure the createElement function in functional components 23096 // gets a unique context - this is necessary for correct named slot check 23097 var contextVm; 23098 if (hasOwn(parent, '_uid')) { 23099 contextVm = Object.create(parent); 23100 // $flow-disable-line 23101 contextVm._original = parent; 23102 } else { 23103 // the context vm passed in is a functional context as well. 23104 // in this case we want to make sure we are able to get a hold to the 23105 // real context instance. 23106 contextVm = parent; 23107 // $flow-disable-line 23108 parent = parent._original; 23109 } 23110 var isCompiled = isTrue(options._compiled); 23111 var needNormalization = !isCompiled; 23112 23113 this.data = data; 23114 this.props = props; 23115 this.children = children; 23116 this.parent = parent; 23117 this.listeners = data.on || emptyObject; 23118 this.injections = resolveInject(options.inject, parent); 23119 this.slots = function () { return resolveSlots(children, parent); }; 23120 23121 // support for compiled functional template 23122 if (isCompiled) { 23123 // exposing $options for renderStatic() 23124 this.$options = options; 23125 // pre-resolve slots for renderSlot() 23126 this.$slots = this.slots(); 23127 this.$scopedSlots = data.scopedSlots || emptyObject; 23128 } 23129 23130 if (options._scopeId) { 23131 this._c = function (a, b, c, d) { 23132 var vnode = createElement(contextVm, a, b, c, d, needNormalization); 23133 if (vnode && !Array.isArray(vnode)) { 23134 vnode.fnScopeId = options._scopeId; 23135 vnode.fnContext = parent; 23136 } 23137 return vnode 23138 }; 23139 } else { 23140 this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); }; 23141 } 23142} 23143 23144installRenderHelpers(FunctionalRenderContext.prototype); 23145 23146function createFunctionalComponent ( 23147 Ctor, 23148 propsData, 23149 data, 23150 contextVm, 23151 children 23152) { 23153 var options = Ctor.options; 23154 var props = {}; 23155 var propOptions = options.props; 23156 if (isDef(propOptions)) { 23157 for (var key in propOptions) { 23158 props[key] = validateProp(key, propOptions, propsData || emptyObject); 23159 } 23160 } else { 23161 if (isDef(data.attrs)) { mergeProps(props, data.attrs); } 23162 if (isDef(data.props)) { mergeProps(props, data.props); } 23163 } 23164 23165 var renderContext = new FunctionalRenderContext( 23166 data, 23167 props, 23168 children, 23169 contextVm, 23170 Ctor 23171 ); 23172 23173 var vnode = options.render.call(null, renderContext._c, renderContext); 23174 23175 if (vnode instanceof VNode) { 23176 return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options) 23177 } else if (Array.isArray(vnode)) { 23178 var vnodes = normalizeChildren(vnode) || []; 23179 var res = new Array(vnodes.length); 23180 for (var i = 0; i < vnodes.length; i++) { 23181 res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options); 23182 } 23183 return res 23184 } 23185} 23186 23187function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) { 23188 // #7817 clone node before setting fnContext, otherwise if the node is reused 23189 // (e.g. it was from a cached normal slot) the fnContext causes named slots 23190 // that should not be matched to match. 23191 var clone = cloneVNode(vnode); 23192 clone.fnContext = contextVm; 23193 clone.fnOptions = options; 23194 if (data.slot) { 23195 (clone.data || (clone.data = {})).slot = data.slot; 23196 } 23197 return clone 23198} 23199 23200function mergeProps (to, from) { 23201 for (var key in from) { 23202 to[camelize(key)] = from[key]; 23203 } 23204} 23205 23206/* */ 23207 23208 23209 23210 23211// Register the component hook to weex native render engine. 23212// The hook will be triggered by native, not javascript. 23213 23214 23215// Updates the state of the component to weex native render engine. 23216 23217/* */ 23218 23219// https://github.com/Hanks10100/weex-native-directive/tree/master/component 23220 23221// listening on native callback 23222 23223/* */ 23224 23225/* */ 23226 23227// inline hooks to be invoked on component VNodes during patch 23228var componentVNodeHooks = { 23229 init: function init ( 23230 vnode, 23231 hydrating, 23232 parentElm, 23233 refElm 23234 ) { 23235 if ( 23236 vnode.componentInstance && 23237 !vnode.componentInstance._isDestroyed && 23238 vnode.data.keepAlive 23239 ) { 23240 // kept-alive components, treat as a patch 23241 var mountedNode = vnode; // work around flow 23242 componentVNodeHooks.prepatch(mountedNode, mountedNode); 23243 } else { 23244 var child = vnode.componentInstance = createComponentInstanceForVnode( 23245 vnode, 23246 activeInstance, 23247 parentElm, 23248 refElm 23249 ); 23250 child.$mount(hydrating ? vnode.elm : undefined, hydrating); 23251 } 23252 }, 23253 23254 prepatch: function prepatch (oldVnode, vnode) { 23255 var options = vnode.componentOptions; 23256 var child = vnode.componentInstance = oldVnode.componentInstance; 23257 updateChildComponent( 23258 child, 23259 options.propsData, // updated props 23260 options.listeners, // updated listeners 23261 vnode, // new parent vnode 23262 options.children // new children 23263 ); 23264 }, 23265 23266 insert: function insert (vnode) { 23267 var context = vnode.context; 23268 var componentInstance = vnode.componentInstance; 23269 if (!componentInstance._isMounted) { 23270 componentInstance._isMounted = true; 23271 callHook(componentInstance, 'mounted'); 23272 } 23273 if (vnode.data.keepAlive) { 23274 if (context._isMounted) { 23275 // vue-router#1212 23276 // During updates, a kept-alive component's child components may 23277 // change, so directly walking the tree here may call activated hooks 23278 // on incorrect children. Instead we push them into a queue which will 23279 // be processed after the whole patch process ended. 23280 queueActivatedComponent(componentInstance); 23281 } else { 23282 activateChildComponent(componentInstance, true /* direct */); 23283 } 23284 } 23285 }, 23286 23287 destroy: function destroy (vnode) { 23288 var componentInstance = vnode.componentInstance; 23289 if (!componentInstance._isDestroyed) { 23290 if (!vnode.data.keepAlive) { 23291 componentInstance.$destroy(); 23292 } else { 23293 deactivateChildComponent(componentInstance, true /* direct */); 23294 } 23295 } 23296 } 23297}; 23298 23299var hooksToMerge = Object.keys(componentVNodeHooks); 23300 23301function createComponent ( 23302 Ctor, 23303 data, 23304 context, 23305 children, 23306 tag 23307) { 23308 if (isUndef(Ctor)) { 23309 return 23310 } 23311 23312 var baseCtor = context.$options._base; 23313 23314 // plain options object: turn it into a constructor 23315 if (isObject(Ctor)) { 23316 Ctor = baseCtor.extend(Ctor); 23317 } 23318 23319 // if at this stage it's not a constructor or an async component factory, 23320 // reject. 23321 if (typeof Ctor !== 'function') { 23322 if (true) { 23323 warn(("Invalid Component definition: " + (String(Ctor))), context); 23324 } 23325 return 23326 } 23327 23328 // async component 23329 var asyncFactory; 23330 if (isUndef(Ctor.cid)) { 23331 asyncFactory = Ctor; 23332 Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context); 23333 if (Ctor === undefined) { 23334 // return a placeholder node for async component, which is rendered 23335 // as a comment node but preserves all the raw information for the node. 23336 // the information will be used for async server-rendering and hydration. 23337 return createAsyncPlaceholder( 23338 asyncFactory, 23339 data, 23340 context, 23341 children, 23342 tag 23343 ) 23344 } 23345 } 23346 23347 data = data || {}; 23348 23349 // resolve constructor options in case global mixins are applied after 23350 // component constructor creation 23351 resolveConstructorOptions(Ctor); 23352 23353 // transform component v-model data into props & events 23354 if (isDef(data.model)) { 23355 transformModel(Ctor.options, data); 23356 } 23357 23358 // extract props 23359 var propsData = extractPropsFromVNodeData(data, Ctor, tag); 23360 23361 // functional component 23362 if (isTrue(Ctor.options.functional)) { 23363 return createFunctionalComponent(Ctor, propsData, data, context, children) 23364 } 23365 23366 // extract listeners, since these needs to be treated as 23367 // child component listeners instead of DOM listeners 23368 var listeners = data.on; 23369 // replace with listeners with .native modifier 23370 // so it gets processed during parent component patch. 23371 data.on = data.nativeOn; 23372 23373 if (isTrue(Ctor.options.abstract)) { 23374 // abstract components do not keep anything 23375 // other than props & listeners & slot 23376 23377 // work around flow 23378 var slot = data.slot; 23379 data = {}; 23380 if (slot) { 23381 data.slot = slot; 23382 } 23383 } 23384 23385 // install component management hooks onto the placeholder node 23386 installComponentHooks(data); 23387 23388 // return a placeholder vnode 23389 var name = Ctor.options.name || tag; 23390 var vnode = new VNode( 23391 ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), 23392 data, undefined, undefined, undefined, context, 23393 { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, 23394 asyncFactory 23395 ); 23396 23397 // Weex specific: invoke recycle-list optimized @render function for 23398 // extracting cell-slot template. 23399 // https://github.com/Hanks10100/weex-native-directive/tree/master/component 23400 /* istanbul ignore if */ 23401 return vnode 23402} 23403 23404function createComponentInstanceForVnode ( 23405 vnode, // we know it's MountedComponentVNode but flow doesn't 23406 parent, // activeInstance in lifecycle state 23407 parentElm, 23408 refElm 23409) { 23410 var options = { 23411 _isComponent: true, 23412 parent: parent, 23413 _parentVnode: vnode, 23414 _parentElm: parentElm || null, 23415 _refElm: refElm || null 23416 }; 23417 // check inline-template render functions 23418 var inlineTemplate = vnode.data.inlineTemplate; 23419 if (isDef(inlineTemplate)) { 23420 options.render = inlineTemplate.render; 23421 options.staticRenderFns = inlineTemplate.staticRenderFns; 23422 } 23423 return new vnode.componentOptions.Ctor(options) 23424} 23425 23426function installComponentHooks (data) { 23427 var hooks = data.hook || (data.hook = {}); 23428 for (var i = 0; i < hooksToMerge.length; i++) { 23429 var key = hooksToMerge[i]; 23430 hooks[key] = componentVNodeHooks[key]; 23431 } 23432} 23433 23434// transform component v-model info (value and callback) into 23435// prop and event handler respectively. 23436function transformModel (options, data) { 23437 var prop = (options.model && options.model.prop) || 'value'; 23438 var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value; 23439 var on = data.on || (data.on = {}); 23440 if (isDef(on[event])) { 23441 on[event] = [data.model.callback].concat(on[event]); 23442 } else { 23443 on[event] = data.model.callback; 23444 } 23445} 23446 23447/* */ 23448 23449var SIMPLE_NORMALIZE = 1; 23450var ALWAYS_NORMALIZE = 2; 23451 23452// wrapper function for providing a more flexible interface 23453// without getting yelled at by flow 23454function createElement ( 23455 context, 23456 tag, 23457 data, 23458 children, 23459 normalizationType, 23460 alwaysNormalize 23461) { 23462 if (Array.isArray(data) || isPrimitive(data)) { 23463 normalizationType = children; 23464 children = data; 23465 data = undefined; 23466 } 23467 if (isTrue(alwaysNormalize)) { 23468 normalizationType = ALWAYS_NORMALIZE; 23469 } 23470 return _createElement(context, tag, data, children, normalizationType) 23471} 23472 23473function _createElement ( 23474 context, 23475 tag, 23476 data, 23477 children, 23478 normalizationType 23479) { 23480 if (isDef(data) && isDef((data).__ob__)) { 23481 true && warn( 23482 "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + 23483 'Always create fresh vnode data objects in each render!', 23484 context 23485 ); 23486 return createEmptyVNode() 23487 } 23488 // object syntax in v-bind 23489 if (isDef(data) && isDef(data.is)) { 23490 tag = data.is; 23491 } 23492 if (!tag) { 23493 // in case of component :is set to falsy value 23494 return createEmptyVNode() 23495 } 23496 // warn against non-primitive key 23497 if ( true && 23498 isDef(data) && isDef(data.key) && !isPrimitive(data.key) 23499 ) { 23500 { 23501 warn( 23502 'Avoid using non-primitive value as key, ' + 23503 'use string/number value instead.', 23504 context 23505 ); 23506 } 23507 } 23508 // support single function children as default scoped slot 23509 if (Array.isArray(children) && 23510 typeof children[0] === 'function' 23511 ) { 23512 data = data || {}; 23513 data.scopedSlots = { default: children[0] }; 23514 children.length = 0; 23515 } 23516 if (normalizationType === ALWAYS_NORMALIZE) { 23517 children = normalizeChildren(children); 23518 } else if (normalizationType === SIMPLE_NORMALIZE) { 23519 children = simpleNormalizeChildren(children); 23520 } 23521 var vnode, ns; 23522 if (typeof tag === 'string') { 23523 var Ctor; 23524 ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); 23525 if (config.isReservedTag(tag)) { 23526 // platform built-in elements 23527 vnode = new VNode( 23528 config.parsePlatformTagName(tag), data, children, 23529 undefined, undefined, context 23530 ); 23531 } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { 23532 // component 23533 vnode = createComponent(Ctor, data, context, children, tag); 23534 } else { 23535 // unknown or unlisted namespaced elements 23536 // check at runtime because it may get assigned a namespace when its 23537 // parent normalizes children 23538 vnode = new VNode( 23539 tag, data, children, 23540 undefined, undefined, context 23541 ); 23542 } 23543 } else { 23544 // direct component options / constructor 23545 vnode = createComponent(tag, data, context, children); 23546 } 23547 if (Array.isArray(vnode)) { 23548 return vnode 23549 } else if (isDef(vnode)) { 23550 if (isDef(ns)) { applyNS(vnode, ns); } 23551 if (isDef(data)) { registerDeepBindings(data); } 23552 return vnode 23553 } else { 23554 return createEmptyVNode() 23555 } 23556} 23557 23558function applyNS (vnode, ns, force) { 23559 vnode.ns = ns; 23560 if (vnode.tag === 'foreignObject') { 23561 // use default namespace inside foreignObject 23562 ns = undefined; 23563 force = true; 23564 } 23565 if (isDef(vnode.children)) { 23566 for (var i = 0, l = vnode.children.length; i < l; i++) { 23567 var child = vnode.children[i]; 23568 if (isDef(child.tag) && ( 23569 isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) { 23570 applyNS(child, ns, force); 23571 } 23572 } 23573 } 23574} 23575 23576// ref #5318 23577// necessary to ensure parent re-render when deep bindings like :style and 23578// :class are used on slot nodes 23579function registerDeepBindings (data) { 23580 if (isObject(data.style)) { 23581 traverse(data.style); 23582 } 23583 if (isObject(data.class)) { 23584 traverse(data.class); 23585 } 23586} 23587 23588/* */ 23589 23590function initRender (vm) { 23591 vm._vnode = null; // the root of the child tree 23592 vm._staticTrees = null; // v-once cached trees 23593 var options = vm.$options; 23594 var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree 23595 var renderContext = parentVnode && parentVnode.context; 23596 vm.$slots = resolveSlots(options._renderChildren, renderContext); 23597 vm.$scopedSlots = emptyObject; 23598 // bind the createElement fn to this instance 23599 // so that we get proper render context inside it. 23600 // args order: tag, data, children, normalizationType, alwaysNormalize 23601 // internal version is used by render functions compiled from templates 23602 vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); }; 23603 // normalization is always applied for the public version, used in 23604 // user-written render functions. 23605 vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); }; 23606 23607 // $attrs & $listeners are exposed for easier HOC creation. 23608 // they need to be reactive so that HOCs using them are always updated 23609 var parentData = parentVnode && parentVnode.data; 23610 23611 /* istanbul ignore else */ 23612 if (true) { 23613 defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { 23614 !isUpdatingChildComponent && warn("$attrs is readonly.", vm); 23615 }, true); 23616 defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () { 23617 !isUpdatingChildComponent && warn("$listeners is readonly.", vm); 23618 }, true); 23619 } else {} 23620} 23621 23622function renderMixin (Vue) { 23623 // install runtime convenience helpers 23624 installRenderHelpers(Vue.prototype); 23625 23626 Vue.prototype.$nextTick = function (fn) { 23627 return nextTick(fn, this) 23628 }; 23629 23630 Vue.prototype._render = function () { 23631 var vm = this; 23632 var ref = vm.$options; 23633 var render = ref.render; 23634 var _parentVnode = ref._parentVnode; 23635 23636 // reset _rendered flag on slots for duplicate slot check 23637 if (true) { 23638 for (var key in vm.$slots) { 23639 // $flow-disable-line 23640 vm.$slots[key]._rendered = false; 23641 } 23642 } 23643 23644 if (_parentVnode) { 23645 vm.$scopedSlots = _parentVnode.data.scopedSlots || emptyObject; 23646 } 23647 23648 // set parent vnode. this allows render functions to have access 23649 // to the data on the placeholder node. 23650 vm.$vnode = _parentVnode; 23651 // render self 23652 var vnode; 23653 try { 23654 vnode = render.call(vm._renderProxy, vm.$createElement); 23655 } catch (e) { 23656 handleError(e, vm, "render"); 23657 // return error render result, 23658 // or previous vnode to prevent render error causing blank component 23659 /* istanbul ignore else */ 23660 if (true) { 23661 if (vm.$options.renderError) { 23662 try { 23663 vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); 23664 } catch (e) { 23665 handleError(e, vm, "renderError"); 23666 vnode = vm._vnode; 23667 } 23668 } else { 23669 vnode = vm._vnode; 23670 } 23671 } else {} 23672 } 23673 // return empty vnode in case the render function errored out 23674 if (!(vnode instanceof VNode)) { 23675 if ( true && Array.isArray(vnode)) { 23676 warn( 23677 'Multiple root nodes returned from render function. Render function ' + 23678 'should return a single root node.', 23679 vm 23680 ); 23681 } 23682 vnode = createEmptyVNode(); 23683 } 23684 // set parent 23685 vnode.parent = _parentVnode; 23686 return vnode 23687 }; 23688} 23689 23690/* */ 23691 23692var uid$3 = 0; 23693 23694function initMixin (Vue) { 23695 Vue.prototype._init = function (options) { 23696 var vm = this; 23697 // a uid 23698 vm._uid = uid$3++; 23699 23700 var startTag, endTag; 23701 /* istanbul ignore if */ 23702 if ( true && config.performance && mark) { 23703 startTag = "vue-perf-start:" + (vm._uid); 23704 endTag = "vue-perf-end:" + (vm._uid); 23705 mark(startTag); 23706 } 23707 23708 // a flag to avoid this being observed 23709 vm._isVue = true; 23710 // merge options 23711 if (options && options._isComponent) { 23712 // optimize internal component instantiation 23713 // since dynamic options merging is pretty slow, and none of the 23714 // internal component options needs special treatment. 23715 initInternalComponent(vm, options); 23716 } else { 23717 vm.$options = mergeOptions( 23718 resolveConstructorOptions(vm.constructor), 23719 options || {}, 23720 vm 23721 ); 23722 } 23723 /* istanbul ignore else */ 23724 if (true) { 23725 initProxy(vm); 23726 } else {} 23727 // expose real self 23728 vm._self = vm; 23729 initLifecycle(vm); 23730 initEvents(vm); 23731 initRender(vm); 23732 callHook(vm, 'beforeCreate'); 23733 initInjections(vm); // resolve injections before data/props 23734 initState(vm); 23735 initProvide(vm); // resolve provide after data/props 23736 callHook(vm, 'created'); 23737 23738 /* istanbul ignore if */ 23739 if ( true && config.performance && mark) { 23740 vm._name = formatComponentName(vm, false); 23741 mark(endTag); 23742 measure(("vue " + (vm._name) + " init"), startTag, endTag); 23743 } 23744 23745 if (vm.$options.el) { 23746 vm.$mount(vm.$options.el); 23747 } 23748 }; 23749} 23750 23751function initInternalComponent (vm, options) { 23752 var opts = vm.$options = Object.create(vm.constructor.options); 23753 // doing this because it's faster than dynamic enumeration. 23754 var parentVnode = options._parentVnode; 23755 opts.parent = options.parent; 23756 opts._parentVnode = parentVnode; 23757 opts._parentElm = options._parentElm; 23758 opts._refElm = options._refElm; 23759 23760 var vnodeComponentOptions = parentVnode.componentOptions; 23761 opts.propsData = vnodeComponentOptions.propsData; 23762 opts._parentListeners = vnodeComponentOptions.listeners; 23763 opts._renderChildren = vnodeComponentOptions.children; 23764 opts._componentTag = vnodeComponentOptions.tag; 23765 23766 if (options.render) { 23767 opts.render = options.render; 23768 opts.staticRenderFns = options.staticRenderFns; 23769 } 23770} 23771 23772function resolveConstructorOptions (Ctor) { 23773 var options = Ctor.options; 23774 if (Ctor.super) { 23775 var superOptions = resolveConstructorOptions(Ctor.super); 23776 var cachedSuperOptions = Ctor.superOptions; 23777 if (superOptions !== cachedSuperOptions) { 23778 // super option changed, 23779 // need to resolve new options. 23780 Ctor.superOptions = superOptions; 23781 // check if there are any late-modified/attached options (#4976) 23782 var modifiedOptions = resolveModifiedOptions(Ctor); 23783 // update base extend options 23784 if (modifiedOptions) { 23785 extend(Ctor.extendOptions, modifiedOptions); 23786 } 23787 options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions); 23788 if (options.name) { 23789 options.components[options.name] = Ctor; 23790 } 23791 } 23792 } 23793 return options 23794} 23795 23796function resolveModifiedOptions (Ctor) { 23797 var modified; 23798 var latest = Ctor.options; 23799 var extended = Ctor.extendOptions; 23800 var sealed = Ctor.sealedOptions; 23801 for (var key in latest) { 23802 if (latest[key] !== sealed[key]) { 23803 if (!modified) { modified = {}; } 23804 modified[key] = dedupe(latest[key], extended[key], sealed[key]); 23805 } 23806 } 23807 return modified 23808} 23809 23810function dedupe (latest, extended, sealed) { 23811 // compare latest and sealed to ensure lifecycle hooks won't be duplicated 23812 // between merges 23813 if (Array.isArray(latest)) { 23814 var res = []; 23815 sealed = Array.isArray(sealed) ? sealed : [sealed]; 23816 extended = Array.isArray(extended) ? extended : [extended]; 23817 for (var i = 0; i < latest.length; i++) { 23818 // push original options and not sealed options to exclude duplicated options 23819 if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) { 23820 res.push(latest[i]); 23821 } 23822 } 23823 return res 23824 } else { 23825 return latest 23826 } 23827} 23828 23829function Vue (options) { 23830 if ( true && 23831 !(this instanceof Vue) 23832 ) { 23833 warn('Vue is a constructor and should be called with the `new` keyword'); 23834 } 23835 this._init(options); 23836} 23837 23838initMixin(Vue); 23839stateMixin(Vue); 23840eventsMixin(Vue); 23841lifecycleMixin(Vue); 23842renderMixin(Vue); 23843 23844/* */ 23845 23846function initUse (Vue) { 23847 Vue.use = function (plugin) { 23848 var installedPlugins = (this._installedPlugins || (this._installedPlugins = [])); 23849 if (installedPlugins.indexOf(plugin) > -1) { 23850 return this 23851 } 23852 23853 // additional parameters 23854 var args = toArray(arguments, 1); 23855 args.unshift(this); 23856 if (typeof plugin.install === 'function') { 23857 plugin.install.apply(plugin, args); 23858 } else if (typeof plugin === 'function') { 23859 plugin.apply(null, args); 23860 } 23861 installedPlugins.push(plugin); 23862 return this 23863 }; 23864} 23865 23866/* */ 23867 23868function initMixin$1 (Vue) { 23869 Vue.mixin = function (mixin) { 23870 this.options = mergeOptions(this.options, mixin); 23871 return this 23872 }; 23873} 23874 23875/* */ 23876 23877function initExtend (Vue) { 23878 /** 23879 * Each instance constructor, including Vue, has a unique 23880 * cid. This enables us to create wrapped "child 23881 * constructors" for prototypal inheritance and cache them. 23882 */ 23883 Vue.cid = 0; 23884 var cid = 1; 23885 23886 /** 23887 * Class inheritance 23888 */ 23889 Vue.extend = function (extendOptions) { 23890 extendOptions = extendOptions || {}; 23891 var Super = this; 23892 var SuperId = Super.cid; 23893 var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {}); 23894 if (cachedCtors[SuperId]) { 23895 return cachedCtors[SuperId] 23896 } 23897 23898 var name = extendOptions.name || Super.options.name; 23899 if ( true && name) { 23900 validateComponentName(name); 23901 } 23902 23903 var Sub = function VueComponent (options) { 23904 this._init(options); 23905 }; 23906 Sub.prototype = Object.create(Super.prototype); 23907 Sub.prototype.constructor = Sub; 23908 Sub.cid = cid++; 23909 Sub.options = mergeOptions( 23910 Super.options, 23911 extendOptions 23912 ); 23913 Sub['super'] = Super; 23914 23915 // For props and computed properties, we define the proxy getters on 23916 // the Vue instances at extension time, on the extended prototype. This 23917 // avoids Object.defineProperty calls for each instance created. 23918 if (Sub.options.props) { 23919 initProps$1(Sub); 23920 } 23921 if (Sub.options.computed) { 23922 initComputed$1(Sub); 23923 } 23924 23925 // allow further extension/mixin/plugin usage 23926 Sub.extend = Super.extend; 23927 Sub.mixin = Super.mixin; 23928 Sub.use = Super.use; 23929 23930 // create asset registers, so extended classes 23931 // can have their private assets too. 23932 ASSET_TYPES.forEach(function (type) { 23933 Sub[type] = Super[type]; 23934 }); 23935 // enable recursive self-lookup 23936 if (name) { 23937 Sub.options.components[name] = Sub; 23938 } 23939 23940 // keep a reference to the super options at extension time. 23941 // later at instantiation we can check if Super's options have 23942 // been updated. 23943 Sub.superOptions = Super.options; 23944 Sub.extendOptions = extendOptions; 23945 Sub.sealedOptions = extend({}, Sub.options); 23946 23947 // cache constructor 23948 cachedCtors[SuperId] = Sub; 23949 return Sub 23950 }; 23951} 23952 23953function initProps$1 (Comp) { 23954 var props = Comp.options.props; 23955 for (var key in props) { 23956 proxy(Comp.prototype, "_props", key); 23957 } 23958} 23959 23960function initComputed$1 (Comp) { 23961 var computed = Comp.options.computed; 23962 for (var key in computed) { 23963 defineComputed(Comp.prototype, key, computed[key]); 23964 } 23965} 23966 23967/* */ 23968 23969function initAssetRegisters (Vue) { 23970 /** 23971 * Create asset registration methods. 23972 */ 23973 ASSET_TYPES.forEach(function (type) { 23974 Vue[type] = function ( 23975 id, 23976 definition 23977 ) { 23978 if (!definition) { 23979 return this.options[type + 's'][id] 23980 } else { 23981 /* istanbul ignore if */ 23982 if ( true && type === 'component') { 23983 validateComponentName(id); 23984 } 23985 if (type === 'component' && isPlainObject(definition)) { 23986 definition.name = definition.name || id; 23987 definition = this.options._base.extend(definition); 23988 } 23989 if (type === 'directive' && typeof definition === 'function') { 23990 definition = { bind: definition, update: definition }; 23991 } 23992 this.options[type + 's'][id] = definition; 23993 return definition 23994 } 23995 }; 23996 }); 23997} 23998 23999/* */ 24000 24001function getComponentName (opts) { 24002 return opts && (opts.Ctor.options.name || opts.tag) 24003} 24004 24005function matches (pattern, name) { 24006 if (Array.isArray(pattern)) { 24007 return pattern.indexOf(name) > -1 24008 } else if (typeof pattern === 'string') { 24009 return pattern.split(',').indexOf(name) > -1 24010 } else if (isRegExp(pattern)) { 24011 return pattern.test(name) 24012 } 24013 /* istanbul ignore next */ 24014 return false 24015} 24016 24017function pruneCache (keepAliveInstance, filter) { 24018 var cache = keepAliveInstance.cache; 24019 var keys = keepAliveInstance.keys; 24020 var _vnode = keepAliveInstance._vnode; 24021 for (var key in cache) { 24022 var cachedNode = cache[key]; 24023 if (cachedNode) { 24024 var name = getComponentName(cachedNode.componentOptions); 24025 if (name && !filter(name)) { 24026 pruneCacheEntry(cache, key, keys, _vnode); 24027 } 24028 } 24029 } 24030} 24031 24032function pruneCacheEntry ( 24033 cache, 24034 key, 24035 keys, 24036 current 24037) { 24038 var cached$$1 = cache[key]; 24039 if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { 24040 cached$$1.componentInstance.$destroy(); 24041 } 24042 cache[key] = null; 24043 remove(keys, key); 24044} 24045 24046var patternTypes = [String, RegExp, Array]; 24047 24048var KeepAlive = { 24049 name: 'keep-alive', 24050 abstract: true, 24051 24052 props: { 24053 include: patternTypes, 24054 exclude: patternTypes, 24055 max: [String, Number] 24056 }, 24057 24058 created: function created () { 24059 this.cache = Object.create(null); 24060 this.keys = []; 24061 }, 24062 24063 destroyed: function destroyed () { 24064 var this$1 = this; 24065 24066 for (var key in this$1.cache) { 24067 pruneCacheEntry(this$1.cache, key, this$1.keys); 24068 } 24069 }, 24070 24071 mounted: function mounted () { 24072 var this$1 = this; 24073 24074 this.$watch('include', function (val) { 24075 pruneCache(this$1, function (name) { return matches(val, name); }); 24076 }); 24077 this.$watch('exclude', function (val) { 24078 pruneCache(this$1, function (name) { return !matches(val, name); }); 24079 }); 24080 }, 24081 24082 render: function render () { 24083 var slot = this.$slots.default; 24084 var vnode = getFirstComponentChild(slot); 24085 var componentOptions = vnode && vnode.componentOptions; 24086 if (componentOptions) { 24087 // check pattern 24088 var name = getComponentName(componentOptions); 24089 var ref = this; 24090 var include = ref.include; 24091 var exclude = ref.exclude; 24092 if ( 24093 // not included 24094 (include && (!name || !matches(include, name))) || 24095 // excluded 24096 (exclude && name && matches(exclude, name)) 24097 ) { 24098 return vnode 24099 } 24100 24101 var ref$1 = this; 24102 var cache = ref$1.cache; 24103 var keys = ref$1.keys; 24104 var key = vnode.key == null 24105 // same constructor may get registered as different local components 24106 // so cid alone is not enough (#3269) 24107 ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '') 24108 : vnode.key; 24109 if (cache[key]) { 24110 vnode.componentInstance = cache[key].componentInstance; 24111 // make current key freshest 24112 remove(keys, key); 24113 keys.push(key); 24114 } else { 24115 cache[key] = vnode; 24116 keys.push(key); 24117 // prune oldest entry 24118 if (this.max && keys.length > parseInt(this.max)) { 24119 pruneCacheEntry(cache, keys[0], keys, this._vnode); 24120 } 24121 } 24122 24123 vnode.data.keepAlive = true; 24124 } 24125 return vnode || (slot && slot[0]) 24126 } 24127} 24128 24129var builtInComponents = { 24130 KeepAlive: KeepAlive 24131} 24132 24133/* */ 24134 24135function initGlobalAPI (Vue) { 24136 // config 24137 var configDef = {}; 24138 configDef.get = function () { return config; }; 24139 if (true) { 24140 configDef.set = function () { 24141 warn( 24142 'Do not replace the Vue.config object, set individual fields instead.' 24143 ); 24144 }; 24145 } 24146 Object.defineProperty(Vue, 'config', configDef); 24147 24148 // exposed util methods. 24149 // NOTE: these are not considered part of the public API - avoid relying on 24150 // them unless you are aware of the risk. 24151 Vue.util = { 24152 warn: warn, 24153 extend: extend, 24154 mergeOptions: mergeOptions, 24155 defineReactive: defineReactive 24156 }; 24157 24158 Vue.set = set; 24159 Vue.delete = del; 24160 Vue.nextTick = nextTick; 24161 24162 Vue.options = Object.create(null); 24163 ASSET_TYPES.forEach(function (type) { 24164 Vue.options[type + 's'] = Object.create(null); 24165 }); 24166 24167 // this is used to identify the "base" constructor to extend all plain-object 24168 // components with in Weex's multi-instance scenarios. 24169 Vue.options._base = Vue; 24170 24171 extend(Vue.options.components, builtInComponents); 24172 24173 initUse(Vue); 24174 initMixin$1(Vue); 24175 initExtend(Vue); 24176 initAssetRegisters(Vue); 24177} 24178 24179initGlobalAPI(Vue); 24180 24181Object.defineProperty(Vue.prototype, '$isServer', { 24182 get: isServerRendering 24183}); 24184 24185Object.defineProperty(Vue.prototype, '$ssrContext', { 24186 get: function get () { 24187 /* istanbul ignore next */ 24188 return this.$vnode && this.$vnode.ssrContext 24189 } 24190}); 24191 24192// expose FunctionalRenderContext for ssr runtime helper installation 24193Object.defineProperty(Vue, 'FunctionalRenderContext', { 24194 value: FunctionalRenderContext 24195}); 24196 24197Vue.version = '2.5.16'; 24198 24199/* */ 24200 24201// these are reserved for web because they are directly compiled away 24202// during template compilation 24203var isReservedAttr = makeMap('style,class'); 24204 24205// attributes that should be using props for binding 24206var acceptValue = makeMap('input,textarea,option,select,progress'); 24207var mustUseProp = function (tag, type, attr) { 24208 return ( 24209 (attr === 'value' && acceptValue(tag)) && type !== 'button' || 24210 (attr === 'selected' && tag === 'option') || 24211 (attr === 'checked' && tag === 'input') || 24212 (attr === 'muted' && tag === 'video') 24213 ) 24214}; 24215 24216var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); 24217 24218var isBooleanAttr = makeMap( 24219 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + 24220 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + 24221 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + 24222 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + 24223 'required,reversed,scoped,seamless,selected,sortable,translate,' + 24224 'truespeed,typemustmatch,visible' 24225); 24226 24227var xlinkNS = 'http://www.w3.org/1999/xlink'; 24228 24229var isXlink = function (name) { 24230 return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink' 24231}; 24232 24233var getXlinkProp = function (name) { 24234 return isXlink(name) ? name.slice(6, name.length) : '' 24235}; 24236 24237var isFalsyAttrValue = function (val) { 24238 return val == null || val === false 24239}; 24240 24241/* */ 24242 24243function genClassForVnode (vnode) { 24244 var data = vnode.data; 24245 var parentNode = vnode; 24246 var childNode = vnode; 24247 while (isDef(childNode.componentInstance)) { 24248 childNode = childNode.componentInstance._vnode; 24249 if (childNode && childNode.data) { 24250 data = mergeClassData(childNode.data, data); 24251 } 24252 } 24253 while (isDef(parentNode = parentNode.parent)) { 24254 if (parentNode && parentNode.data) { 24255 data = mergeClassData(data, parentNode.data); 24256 } 24257 } 24258 return renderClass(data.staticClass, data.class) 24259} 24260 24261function mergeClassData (child, parent) { 24262 return { 24263 staticClass: concat(child.staticClass, parent.staticClass), 24264 class: isDef(child.class) 24265 ? [child.class, parent.class] 24266 : parent.class 24267 } 24268} 24269 24270function renderClass ( 24271 staticClass, 24272 dynamicClass 24273) { 24274 if (isDef(staticClass) || isDef(dynamicClass)) { 24275 return concat(staticClass, stringifyClass(dynamicClass)) 24276 } 24277 /* istanbul ignore next */ 24278 return '' 24279} 24280 24281function concat (a, b) { 24282 return a ? b ? (a + ' ' + b) : a : (b || '') 24283} 24284 24285function stringifyClass (value) { 24286 if (Array.isArray(value)) { 24287 return stringifyArray(value) 24288 } 24289 if (isObject(value)) { 24290 return stringifyObject(value) 24291 } 24292 if (typeof value === 'string') { 24293 return value 24294 } 24295 /* istanbul ignore next */ 24296 return '' 24297} 24298 24299function stringifyArray (value) { 24300 var res = ''; 24301 var stringified; 24302 for (var i = 0, l = value.length; i < l; i++) { 24303 if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') { 24304 if (res) { res += ' '; } 24305 res += stringified; 24306 } 24307 } 24308 return res 24309} 24310 24311function stringifyObject (value) { 24312 var res = ''; 24313 for (var key in value) { 24314 if (value[key]) { 24315 if (res) { res += ' '; } 24316 res += key; 24317 } 24318 } 24319 return res 24320} 24321 24322/* */ 24323 24324var namespaceMap = { 24325 svg: 'http://www.w3.org/2000/svg', 24326 math: 'http://www.w3.org/1998/Math/MathML' 24327}; 24328 24329var isHTMLTag = makeMap( 24330 'html,body,base,head,link,meta,style,title,' + 24331 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' + 24332 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' + 24333 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' + 24334 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' + 24335 'embed,object,param,source,canvas,script,noscript,del,ins,' + 24336 'caption,col,colgroup,table,thead,tbody,td,th,tr,' + 24337 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' + 24338 'output,progress,select,textarea,' + 24339 'details,dialog,menu,menuitem,summary,' + 24340 'content,element,shadow,template,blockquote,iframe,tfoot' 24341); 24342 24343// this map is intentionally selective, only covering SVG elements that may 24344// contain child elements. 24345var isSVG = makeMap( 24346 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + 24347 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + 24348 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', 24349 true 24350); 24351 24352var isPreTag = function (tag) { return tag === 'pre'; }; 24353 24354var isReservedTag = function (tag) { 24355 return isHTMLTag(tag) || isSVG(tag) 24356}; 24357 24358function getTagNamespace (tag) { 24359 if (isSVG(tag)) { 24360 return 'svg' 24361 } 24362 // basic support for MathML 24363 // note it doesn't support other MathML elements being component roots 24364 if (tag === 'math') { 24365 return 'math' 24366 } 24367} 24368 24369var unknownElementCache = Object.create(null); 24370function isUnknownElement (tag) { 24371 /* istanbul ignore if */ 24372 if (!inBrowser) { 24373 return true 24374 } 24375 if (isReservedTag(tag)) { 24376 return false 24377 } 24378 tag = tag.toLowerCase(); 24379 /* istanbul ignore if */ 24380 if (unknownElementCache[tag] != null) { 24381 return unknownElementCache[tag] 24382 } 24383 var el = document.createElement(tag); 24384 if (tag.indexOf('-') > -1) { 24385 // http://stackoverflow.com/a/28210364/1070244 24386 return (unknownElementCache[tag] = ( 24387 el.constructor === window.HTMLUnknownElement || 24388 el.constructor === window.HTMLElement 24389 )) 24390 } else { 24391 return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString())) 24392 } 24393} 24394 24395var isTextInputType = makeMap('text,number,password,search,email,tel,url'); 24396 24397/* */ 24398 24399/** 24400 * Query an element selector if it's not an element already. 24401 */ 24402function query (el) { 24403 if (typeof el === 'string') { 24404 var selected = document.querySelector(el); 24405 if (!selected) { 24406 true && warn( 24407 'Cannot find element: ' + el 24408 ); 24409 return document.createElement('div') 24410 } 24411 return selected 24412 } else { 24413 return el 24414 } 24415} 24416 24417/* */ 24418 24419function createElement$1 (tagName, vnode) { 24420 var elm = document.createElement(tagName); 24421 if (tagName !== 'select') { 24422 return elm 24423 } 24424 // false or null will remove the attribute but undefined will not 24425 if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { 24426 elm.setAttribute('multiple', 'multiple'); 24427 } 24428 return elm 24429} 24430 24431function createElementNS (namespace, tagName) { 24432 return document.createElementNS(namespaceMap[namespace], tagName) 24433} 24434 24435function createTextNode (text) { 24436 return document.createTextNode(text) 24437} 24438 24439function createComment (text) { 24440 return document.createComment(text) 24441} 24442 24443function insertBefore (parentNode, newNode, referenceNode) { 24444 parentNode.insertBefore(newNode, referenceNode); 24445} 24446 24447function removeChild (node, child) { 24448 node.removeChild(child); 24449} 24450 24451function appendChild (node, child) { 24452 node.appendChild(child); 24453} 24454 24455function parentNode (node) { 24456 return node.parentNode 24457} 24458 24459function nextSibling (node) { 24460 return node.nextSibling 24461} 24462 24463function tagName (node) { 24464 return node.tagName 24465} 24466 24467function setTextContent (node, text) { 24468 node.textContent = text; 24469} 24470 24471function setStyleScope (node, scopeId) { 24472 node.setAttribute(scopeId, ''); 24473} 24474 24475 24476var nodeOps = Object.freeze({ 24477 createElement: createElement$1, 24478 createElementNS: createElementNS, 24479 createTextNode: createTextNode, 24480 createComment: createComment, 24481 insertBefore: insertBefore, 24482 removeChild: removeChild, 24483 appendChild: appendChild, 24484 parentNode: parentNode, 24485 nextSibling: nextSibling, 24486 tagName: tagName, 24487 setTextContent: setTextContent, 24488 setStyleScope: setStyleScope 24489}); 24490 24491/* */ 24492 24493var ref = { 24494 create: function create (_, vnode) { 24495 registerRef(vnode); 24496 }, 24497 update: function update (oldVnode, vnode) { 24498 if (oldVnode.data.ref !== vnode.data.ref) { 24499 registerRef(oldVnode, true); 24500 registerRef(vnode); 24501 } 24502 }, 24503 destroy: function destroy (vnode) { 24504 registerRef(vnode, true); 24505 } 24506} 24507 24508function registerRef (vnode, isRemoval) { 24509 var key = vnode.data.ref; 24510 if (!isDef(key)) { return } 24511 24512 var vm = vnode.context; 24513 var ref = vnode.componentInstance || vnode.elm; 24514 var refs = vm.$refs; 24515 if (isRemoval) { 24516 if (Array.isArray(refs[key])) { 24517 remove(refs[key], ref); 24518 } else if (refs[key] === ref) { 24519 refs[key] = undefined; 24520 } 24521 } else { 24522 if (vnode.data.refInFor) { 24523 if (!Array.isArray(refs[key])) { 24524 refs[key] = [ref]; 24525 } else if (refs[key].indexOf(ref) < 0) { 24526 // $flow-disable-line 24527 refs[key].push(ref); 24528 } 24529 } else { 24530 refs[key] = ref; 24531 } 24532 } 24533} 24534 24535/** 24536 * Virtual DOM patching algorithm based on Snabbdom by 24537 * Simon Friis Vindum (@paldepind) 24538 * Licensed under the MIT License 24539 * https://github.com/paldepind/snabbdom/blob/master/LICENSE 24540 * 24541 * modified by Evan You (@yyx990803) 24542 * 24543 * Not type-checking this because this file is perf-critical and the cost 24544 * of making flow understand it is not worth it. 24545 */ 24546 24547var emptyNode = new VNode('', {}, []); 24548 24549var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; 24550 24551function sameVnode (a, b) { 24552 return ( 24553 a.key === b.key && ( 24554 ( 24555 a.tag === b.tag && 24556 a.isComment === b.isComment && 24557 isDef(a.data) === isDef(b.data) && 24558 sameInputType(a, b) 24559 ) || ( 24560 isTrue(a.isAsyncPlaceholder) && 24561 a.asyncFactory === b.asyncFactory && 24562 isUndef(b.asyncFactory.error) 24563 ) 24564 ) 24565 ) 24566} 24567 24568function sameInputType (a, b) { 24569 if (a.tag !== 'input') { return true } 24570 var i; 24571 var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type; 24572 var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type; 24573 return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB) 24574} 24575 24576function createKeyToOldIdx (children, beginIdx, endIdx) { 24577 var i, key; 24578 var map = {}; 24579 for (i = beginIdx; i <= endIdx; ++i) { 24580 key = children[i].key; 24581 if (isDef(key)) { map[key] = i; } 24582 } 24583 return map 24584} 24585 24586function createPatchFunction (backend) { 24587 var i, j; 24588 var cbs = {}; 24589 24590 var modules = backend.modules; 24591 var nodeOps = backend.nodeOps; 24592 24593 for (i = 0; i < hooks.length; ++i) { 24594 cbs[hooks[i]] = []; 24595 for (j = 0; j < modules.length; ++j) { 24596 if (isDef(modules[j][hooks[i]])) { 24597 cbs[hooks[i]].push(modules[j][hooks[i]]); 24598 } 24599 } 24600 } 24601 24602 function emptyNodeAt (elm) { 24603 return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) 24604 } 24605 24606 function createRmCb (childElm, listeners) { 24607 function remove () { 24608 if (--remove.listeners === 0) { 24609 removeNode(childElm); 24610 } 24611 } 24612 remove.listeners = listeners; 24613 return remove 24614 } 24615 24616 function removeNode (el) { 24617 var parent = nodeOps.parentNode(el); 24618 // element may have already been removed due to v-html / v-text 24619 if (isDef(parent)) { 24620 nodeOps.removeChild(parent, el); 24621 } 24622 } 24623 24624 function isUnknownElement$$1 (vnode, inVPre) { 24625 return ( 24626 !inVPre && 24627 !vnode.ns && 24628 !( 24629 config.ignoredElements.length && 24630 config.ignoredElements.some(function (ignore) { 24631 return isRegExp(ignore) 24632 ? ignore.test(vnode.tag) 24633 : ignore === vnode.tag 24634 }) 24635 ) && 24636 config.isUnknownElement(vnode.tag) 24637 ) 24638 } 24639 24640 var creatingElmInVPre = 0; 24641 24642 function createElm ( 24643 vnode, 24644 insertedVnodeQueue, 24645 parentElm, 24646 refElm, 24647 nested, 24648 ownerArray, 24649 index 24650 ) { 24651 if (isDef(vnode.elm) && isDef(ownerArray)) { 24652 // This vnode was used in a previous render! 24653 // now it's used as a new node, overwriting its elm would cause 24654 // potential patch errors down the road when it's used as an insertion 24655 // reference node. Instead, we clone the node on-demand before creating 24656 // associated DOM element for it. 24657 vnode = ownerArray[index] = cloneVNode(vnode); 24658 } 24659 24660 vnode.isRootInsert = !nested; // for transition enter check 24661 if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) { 24662 return 24663 } 24664 24665 var data = vnode.data; 24666 var children = vnode.children; 24667 var tag = vnode.tag; 24668 if (isDef(tag)) { 24669 if (true) { 24670 if (data && data.pre) { 24671 creatingElmInVPre++; 24672 } 24673 if (isUnknownElement$$1(vnode, creatingElmInVPre)) { 24674 warn( 24675 'Unknown custom element: <' + tag + '> - did you ' + 24676 'register the component correctly? For recursive components, ' + 24677 'make sure to provide the "name" option.', 24678 vnode.context 24679 ); 24680 } 24681 } 24682 24683 vnode.elm = vnode.ns 24684 ? nodeOps.createElementNS(vnode.ns, tag) 24685 : nodeOps.createElement(tag, vnode); 24686 setScope(vnode); 24687 24688 /* istanbul ignore if */ 24689 { 24690 createChildren(vnode, children, insertedVnodeQueue); 24691 if (isDef(data)) { 24692 invokeCreateHooks(vnode, insertedVnodeQueue); 24693 } 24694 insert(parentElm, vnode.elm, refElm); 24695 } 24696 24697 if ( true && data && data.pre) { 24698 creatingElmInVPre--; 24699 } 24700 } else if (isTrue(vnode.isComment)) { 24701 vnode.elm = nodeOps.createComment(vnode.text); 24702 insert(parentElm, vnode.elm, refElm); 24703 } else { 24704 vnode.elm = nodeOps.createTextNode(vnode.text); 24705 insert(parentElm, vnode.elm, refElm); 24706 } 24707 } 24708 24709 function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) { 24710 var i = vnode.data; 24711 if (isDef(i)) { 24712 var isReactivated = isDef(vnode.componentInstance) && i.keepAlive; 24713 if (isDef(i = i.hook) && isDef(i = i.init)) { 24714 i(vnode, false /* hydrating */, parentElm, refElm); 24715 } 24716 // after calling the init hook, if the vnode is a child component 24717 // it should've created a child instance and mounted it. the child 24718 // component also has set the placeholder vnode's elm. 24719 // in that case we can just return the element and be done. 24720 if (isDef(vnode.componentInstance)) { 24721 initComponent(vnode, insertedVnodeQueue); 24722 if (isTrue(isReactivated)) { 24723 reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm); 24724 } 24725 return true 24726 } 24727 } 24728 } 24729 24730 function initComponent (vnode, insertedVnodeQueue) { 24731 if (isDef(vnode.data.pendingInsert)) { 24732 insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert); 24733 vnode.data.pendingInsert = null; 24734 } 24735 vnode.elm = vnode.componentInstance.$el; 24736 if (isPatchable(vnode)) { 24737 invokeCreateHooks(vnode, insertedVnodeQueue); 24738 setScope(vnode); 24739 } else { 24740 // empty component root. 24741 // skip all element-related modules except for ref (#3455) 24742 registerRef(vnode); 24743 // make sure to invoke the insert hook 24744 insertedVnodeQueue.push(vnode); 24745 } 24746 } 24747 24748 function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) { 24749 var i; 24750 // hack for #4339: a reactivated component with inner transition 24751 // does not trigger because the inner node's created hooks are not called 24752 // again. It's not ideal to involve module-specific logic in here but 24753 // there doesn't seem to be a better way to do it. 24754 var innerNode = vnode; 24755 while (innerNode.componentInstance) { 24756 innerNode = innerNode.componentInstance._vnode; 24757 if (isDef(i = innerNode.data) && isDef(i = i.transition)) { 24758 for (i = 0; i < cbs.activate.length; ++i) { 24759 cbs.activate[i](emptyNode, innerNode); 24760 } 24761 insertedVnodeQueue.push(innerNode); 24762 break 24763 } 24764 } 24765 // unlike a newly created component, 24766 // a reactivated keep-alive component doesn't insert itself 24767 insert(parentElm, vnode.elm, refElm); 24768 } 24769 24770 function insert (parent, elm, ref$$1) { 24771 if (isDef(parent)) { 24772 if (isDef(ref$$1)) { 24773 if (ref$$1.parentNode === parent) { 24774 nodeOps.insertBefore(parent, elm, ref$$1); 24775 } 24776 } else { 24777 nodeOps.appendChild(parent, elm); 24778 } 24779 } 24780 } 24781 24782 function createChildren (vnode, children, insertedVnodeQueue) { 24783 if (Array.isArray(children)) { 24784 if (true) { 24785 checkDuplicateKeys(children); 24786 } 24787 for (var i = 0; i < children.length; ++i) { 24788 createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i); 24789 } 24790 } else if (isPrimitive(vnode.text)) { 24791 nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text))); 24792 } 24793 } 24794 24795 function isPatchable (vnode) { 24796 while (vnode.componentInstance) { 24797 vnode = vnode.componentInstance._vnode; 24798 } 24799 return isDef(vnode.tag) 24800 } 24801 24802 function invokeCreateHooks (vnode, insertedVnodeQueue) { 24803 for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { 24804 cbs.create[i$1](emptyNode, vnode); 24805 } 24806 i = vnode.data.hook; // Reuse variable 24807 if (isDef(i)) { 24808 if (isDef(i.create)) { i.create(emptyNode, vnode); } 24809 if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); } 24810 } 24811 } 24812 24813 // set scope id attribute for scoped CSS. 24814 // this is implemented as a special case to avoid the overhead 24815 // of going through the normal attribute patching process. 24816 function setScope (vnode) { 24817 var i; 24818 if (isDef(i = vnode.fnScopeId)) { 24819 nodeOps.setStyleScope(vnode.elm, i); 24820 } else { 24821 var ancestor = vnode; 24822 while (ancestor) { 24823 if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { 24824 nodeOps.setStyleScope(vnode.elm, i); 24825 } 24826 ancestor = ancestor.parent; 24827 } 24828 } 24829 // for slot content they should also get the scopeId from the host instance. 24830 if (isDef(i = activeInstance) && 24831 i !== vnode.context && 24832 i !== vnode.fnContext && 24833 isDef(i = i.$options._scopeId) 24834 ) { 24835 nodeOps.setStyleScope(vnode.elm, i); 24836 } 24837 } 24838 24839 function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) { 24840 for (; startIdx <= endIdx; ++startIdx) { 24841 createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx); 24842 } 24843 } 24844 24845 function invokeDestroyHook (vnode) { 24846 var i, j; 24847 var data = vnode.data; 24848 if (isDef(data)) { 24849 if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); } 24850 for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); } 24851 } 24852 if (isDef(i = vnode.children)) { 24853 for (j = 0; j < vnode.children.length; ++j) { 24854 invokeDestroyHook(vnode.children[j]); 24855 } 24856 } 24857 } 24858 24859 function removeVnodes (parentElm, vnodes, startIdx, endIdx) { 24860 for (; startIdx <= endIdx; ++startIdx) { 24861 var ch = vnodes[startIdx]; 24862 if (isDef(ch)) { 24863 if (isDef(ch.tag)) { 24864 removeAndInvokeRemoveHook(ch); 24865 invokeDestroyHook(ch); 24866 } else { // Text node 24867 removeNode(ch.elm); 24868 } 24869 } 24870 } 24871 } 24872 24873 function removeAndInvokeRemoveHook (vnode, rm) { 24874 if (isDef(rm) || isDef(vnode.data)) { 24875 var i; 24876 var listeners = cbs.remove.length + 1; 24877 if (isDef(rm)) { 24878 // we have a recursively passed down rm callback 24879 // increase the listeners count 24880 rm.listeners += listeners; 24881 } else { 24882 // directly removing 24883 rm = createRmCb(vnode.elm, listeners); 24884 } 24885 // recursively invoke hooks on child component root node 24886 if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) { 24887 removeAndInvokeRemoveHook(i, rm); 24888 } 24889 for (i = 0; i < cbs.remove.length; ++i) { 24890 cbs.remove[i](vnode, rm); 24891 } 24892 if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) { 24893 i(vnode, rm); 24894 } else { 24895 rm(); 24896 } 24897 } else { 24898 removeNode(vnode.elm); 24899 } 24900 } 24901 24902 function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) { 24903 var oldStartIdx = 0; 24904 var newStartIdx = 0; 24905 var oldEndIdx = oldCh.length - 1; 24906 var oldStartVnode = oldCh[0]; 24907 var oldEndVnode = oldCh[oldEndIdx]; 24908 var newEndIdx = newCh.length - 1; 24909 var newStartVnode = newCh[0]; 24910 var newEndVnode = newCh[newEndIdx]; 24911 var oldKeyToIdx, idxInOld, vnodeToMove, refElm; 24912 24913 // removeOnly is a special flag used only by <transition-group> 24914 // to ensure removed elements stay in correct relative positions 24915 // during leaving transitions 24916 var canMove = !removeOnly; 24917 24918 if (true) { 24919 checkDuplicateKeys(newCh); 24920 } 24921 24922 while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { 24923 if (isUndef(oldStartVnode)) { 24924 oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left 24925 } else if (isUndef(oldEndVnode)) { 24926 oldEndVnode = oldCh[--oldEndIdx]; 24927 } else if (sameVnode(oldStartVnode, newStartVnode)) { 24928 patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue); 24929 oldStartVnode = oldCh[++oldStartIdx]; 24930 newStartVnode = newCh[++newStartIdx]; 24931 } else if (sameVnode(oldEndVnode, newEndVnode)) { 24932 patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue); 24933 oldEndVnode = oldCh[--oldEndIdx]; 24934 newEndVnode = newCh[--newEndIdx]; 24935 } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right 24936 patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue); 24937 canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm)); 24938 oldStartVnode = oldCh[++oldStartIdx]; 24939 newEndVnode = newCh[--newEndIdx]; 24940 } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left 24941 patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue); 24942 canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); 24943 oldEndVnode = oldCh[--oldEndIdx]; 24944 newStartVnode = newCh[++newStartIdx]; 24945 } else { 24946 if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); } 24947 idxInOld = isDef(newStartVnode.key) 24948 ? oldKeyToIdx[newStartVnode.key] 24949 : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx); 24950 if (isUndef(idxInOld)) { // New element 24951 createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); 24952 } else { 24953 vnodeToMove = oldCh[idxInOld]; 24954 if (sameVnode(vnodeToMove, newStartVnode)) { 24955 patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue); 24956 oldCh[idxInOld] = undefined; 24957 canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm); 24958 } else { 24959 // same key but different element. treat as new element 24960 createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); 24961 } 24962 } 24963 newStartVnode = newCh[++newStartIdx]; 24964 } 24965 } 24966 if (oldStartIdx > oldEndIdx) { 24967 refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; 24968 addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); 24969 } else if (newStartIdx > newEndIdx) { 24970 removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); 24971 } 24972 } 24973 24974 function checkDuplicateKeys (children) { 24975 var seenKeys = {}; 24976 for (var i = 0; i < children.length; i++) { 24977 var vnode = children[i]; 24978 var key = vnode.key; 24979 if (isDef(key)) { 24980 if (seenKeys[key]) { 24981 warn( 24982 ("Duplicate keys detected: '" + key + "'. This may cause an update error."), 24983 vnode.context 24984 ); 24985 } else { 24986 seenKeys[key] = true; 24987 } 24988 } 24989 } 24990 } 24991 24992 function findIdxInOld (node, oldCh, start, end) { 24993 for (var i = start; i < end; i++) { 24994 var c = oldCh[i]; 24995 if (isDef(c) && sameVnode(node, c)) { return i } 24996 } 24997 } 24998 24999 function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) { 25000 if (oldVnode === vnode) { 25001 return 25002 } 25003 25004 var elm = vnode.elm = oldVnode.elm; 25005 25006 if (isTrue(oldVnode.isAsyncPlaceholder)) { 25007 if (isDef(vnode.asyncFactory.resolved)) { 25008 hydrate(oldVnode.elm, vnode, insertedVnodeQueue); 25009 } else { 25010 vnode.isAsyncPlaceholder = true; 25011 } 25012 return 25013 } 25014 25015 // reuse element for static trees. 25016 // note we only do this if the vnode is cloned - 25017 // if the new node is not cloned it means the render functions have been 25018 // reset by the hot-reload-api and we need to do a proper re-render. 25019 if (isTrue(vnode.isStatic) && 25020 isTrue(oldVnode.isStatic) && 25021 vnode.key === oldVnode.key && 25022 (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) 25023 ) { 25024 vnode.componentInstance = oldVnode.componentInstance; 25025 return 25026 } 25027 25028 var i; 25029 var data = vnode.data; 25030 if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) { 25031 i(oldVnode, vnode); 25032 } 25033 25034 var oldCh = oldVnode.children; 25035 var ch = vnode.children; 25036 if (isDef(data) && isPatchable(vnode)) { 25037 for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); } 25038 if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); } 25039 } 25040 if (isUndef(vnode.text)) { 25041 if (isDef(oldCh) && isDef(ch)) { 25042 if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); } 25043 } else if (isDef(ch)) { 25044 if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } 25045 addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); 25046 } else if (isDef(oldCh)) { 25047 removeVnodes(elm, oldCh, 0, oldCh.length - 1); 25048 } else if (isDef(oldVnode.text)) { 25049 nodeOps.setTextContent(elm, ''); 25050 } 25051 } else if (oldVnode.text !== vnode.text) { 25052 nodeOps.setTextContent(elm, vnode.text); 25053 } 25054 if (isDef(data)) { 25055 if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); } 25056 } 25057 } 25058 25059 function invokeInsertHook (vnode, queue, initial) { 25060 // delay insert hooks for component root nodes, invoke them after the 25061 // element is really inserted 25062 if (isTrue(initial) && isDef(vnode.parent)) { 25063 vnode.parent.data.pendingInsert = queue; 25064 } else { 25065 for (var i = 0; i < queue.length; ++i) { 25066 queue[i].data.hook.insert(queue[i]); 25067 } 25068 } 25069 } 25070 25071 var hydrationBailed = false; 25072 // list of modules that can skip create hook during hydration because they 25073 // are already rendered on the client or has no need for initialization 25074 // Note: style is excluded because it relies on initial clone for future 25075 // deep updates (#7063). 25076 var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); 25077 25078 // Note: this is a browser-only function so we can assume elms are DOM nodes. 25079 function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { 25080 var i; 25081 var tag = vnode.tag; 25082 var data = vnode.data; 25083 var children = vnode.children; 25084 inVPre = inVPre || (data && data.pre); 25085 vnode.elm = elm; 25086 25087 if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { 25088 vnode.isAsyncPlaceholder = true; 25089 return true 25090 } 25091 // assert node match 25092 if (true) { 25093 if (!assertNodeMatch(elm, vnode, inVPre)) { 25094 return false 25095 } 25096 } 25097 if (isDef(data)) { 25098 if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } 25099 if (isDef(i = vnode.componentInstance)) { 25100 // child component. it should have hydrated its own tree. 25101 initComponent(vnode, insertedVnodeQueue); 25102 return true 25103 } 25104 } 25105 if (isDef(tag)) { 25106 if (isDef(children)) { 25107 // empty element, allow client to pick up and populate children 25108 if (!elm.hasChildNodes()) { 25109 createChildren(vnode, children, insertedVnodeQueue); 25110 } else { 25111 // v-html and domProps: innerHTML 25112 if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { 25113 if (i !== elm.innerHTML) { 25114 /* istanbul ignore if */ 25115 if ( true && 25116 typeof console !== 'undefined' && 25117 !hydrationBailed 25118 ) { 25119 hydrationBailed = true; 25120 console.warn('Parent: ', elm); 25121 console.warn('server innerHTML: ', i); 25122 console.warn('client innerHTML: ', elm.innerHTML); 25123 } 25124 return false 25125 } 25126 } else { 25127 // iterate and compare children lists 25128 var childrenMatch = true; 25129 var childNode = elm.firstChild; 25130 for (var i$1 = 0; i$1 < children.length; i$1++) { 25131 if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { 25132 childrenMatch = false; 25133 break 25134 } 25135 childNode = childNode.nextSibling; 25136 } 25137 // if childNode is not null, it means the actual childNodes list is 25138 // longer than the virtual children list. 25139 if (!childrenMatch || childNode) { 25140 /* istanbul ignore if */ 25141 if ( true && 25142 typeof console !== 'undefined' && 25143 !hydrationBailed 25144 ) { 25145 hydrationBailed = true; 25146 console.warn('Parent: ', elm); 25147 console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); 25148 } 25149 return false 25150 } 25151 } 25152 } 25153 } 25154 if (isDef(data)) { 25155 var fullInvoke = false; 25156 for (var key in data) { 25157 if (!isRenderedModule(key)) { 25158 fullInvoke = true; 25159 invokeCreateHooks(vnode, insertedVnodeQueue); 25160 break 25161 } 25162 } 25163 if (!fullInvoke && data['class']) { 25164 // ensure collecting deps for deep class bindings for future updates 25165 traverse(data['class']); 25166 } 25167 } 25168 } else if (elm.data !== vnode.text) { 25169 elm.data = vnode.text; 25170 } 25171 return true 25172 } 25173 25174 function assertNodeMatch (node, vnode, inVPre) { 25175 if (isDef(vnode.tag)) { 25176 return vnode.tag.indexOf('vue-component') === 0 || ( 25177 !isUnknownElement$$1(vnode, inVPre) && 25178 vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) 25179 ) 25180 } else { 25181 return node.nodeType === (vnode.isComment ? 8 : 3) 25182 } 25183 } 25184 25185 return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) { 25186 if (isUndef(vnode)) { 25187 if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); } 25188 return 25189 } 25190 25191 var isInitialPatch = false; 25192 var insertedVnodeQueue = []; 25193 25194 if (isUndef(oldVnode)) { 25195 // empty mount (likely as component), create new root element 25196 isInitialPatch = true; 25197 createElm(vnode, insertedVnodeQueue, parentElm, refElm); 25198 } else { 25199 var isRealElement = isDef(oldVnode.nodeType); 25200 if (!isRealElement && sameVnode(oldVnode, vnode)) { 25201 // patch existing root node 25202 patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly); 25203 } else { 25204 if (isRealElement) { 25205 // mounting to a real element 25206 // check if this is server-rendered content and if we can perform 25207 // a successful hydration. 25208 if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) { 25209 oldVnode.removeAttribute(SSR_ATTR); 25210 hydrating = true; 25211 } 25212 if (isTrue(hydrating)) { 25213 if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { 25214 invokeInsertHook(vnode, insertedVnodeQueue, true); 25215 return oldVnode 25216 } else if (true) { 25217 warn( 25218 'The client-side rendered virtual DOM tree is not matching ' + 25219 'server-rendered content. This is likely caused by incorrect ' + 25220 'HTML markup, for example nesting block-level elements inside ' + 25221 '<p>, or missing <tbody>. Bailing hydration and performing ' + 25222 'full client-side render.' 25223 ); 25224 } 25225 } 25226 // either not server-rendered, or hydration failed. 25227 // create an empty node and replace it 25228 oldVnode = emptyNodeAt(oldVnode); 25229 } 25230 25231 // replacing existing element 25232 var oldElm = oldVnode.elm; 25233 var parentElm$1 = nodeOps.parentNode(oldElm); 25234 25235 // create new node 25236 createElm( 25237 vnode, 25238 insertedVnodeQueue, 25239 // extremely rare edge case: do not insert if old element is in a 25240 // leaving transition. Only happens when combining transition + 25241 // keep-alive + HOCs. (#4590) 25242 oldElm._leaveCb ? null : parentElm$1, 25243 nodeOps.nextSibling(oldElm) 25244 ); 25245 25246 // update parent placeholder node element, recursively 25247 if (isDef(vnode.parent)) { 25248 var ancestor = vnode.parent; 25249 var patchable = isPatchable(vnode); 25250 while (ancestor) { 25251 for (var i = 0; i < cbs.destroy.length; ++i) { 25252 cbs.destroy[i](ancestor); 25253 } 25254 ancestor.elm = vnode.elm; 25255 if (patchable) { 25256 for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { 25257 cbs.create[i$1](emptyNode, ancestor); 25258 } 25259 // #6513 25260 // invoke insert hooks that may have been merged by create hooks. 25261 // e.g. for directives that uses the "inserted" hook. 25262 var insert = ancestor.data.hook.insert; 25263 if (insert.merged) { 25264 // start at index 1 to avoid re-invoking component mounted hook 25265 for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { 25266 insert.fns[i$2](); 25267 } 25268 } 25269 } else { 25270 registerRef(ancestor); 25271 } 25272 ancestor = ancestor.parent; 25273 } 25274 } 25275 25276 // destroy old node 25277 if (isDef(parentElm$1)) { 25278 removeVnodes(parentElm$1, [oldVnode], 0, 0); 25279 } else if (isDef(oldVnode.tag)) { 25280 invokeDestroyHook(oldVnode); 25281 } 25282 } 25283 } 25284 25285 invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); 25286 return vnode.elm 25287 } 25288} 25289 25290/* */ 25291 25292var directives = { 25293 create: updateDirectives, 25294 update: updateDirectives, 25295 destroy: function unbindDirectives (vnode) { 25296 updateDirectives(vnode, emptyNode); 25297 } 25298} 25299 25300function updateDirectives (oldVnode, vnode) { 25301 if (oldVnode.data.directives || vnode.data.directives) { 25302 _update(oldVnode, vnode); 25303 } 25304} 25305 25306function _update (oldVnode, vnode) { 25307 var isCreate = oldVnode === emptyNode; 25308 var isDestroy = vnode === emptyNode; 25309 var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); 25310 var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); 25311 25312 var dirsWithInsert = []; 25313 var dirsWithPostpatch = []; 25314 25315 var key, oldDir, dir; 25316 for (key in newDirs) { 25317 oldDir = oldDirs[key]; 25318 dir = newDirs[key]; 25319 if (!oldDir) { 25320 // new directive, bind 25321 callHook$1(dir, 'bind', vnode, oldVnode); 25322 if (dir.def && dir.def.inserted) { 25323 dirsWithInsert.push(dir); 25324 } 25325 } else { 25326 // existing directive, update 25327 dir.oldValue = oldDir.value; 25328 callHook$1(dir, 'update', vnode, oldVnode); 25329 if (dir.def && dir.def.componentUpdated) { 25330 dirsWithPostpatch.push(dir); 25331 } 25332 } 25333 } 25334 25335 if (dirsWithInsert.length) { 25336 var callInsert = function () { 25337 for (var i = 0; i < dirsWithInsert.length; i++) { 25338 callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); 25339 } 25340 }; 25341 if (isCreate) { 25342 mergeVNodeHook(vnode, 'insert', callInsert); 25343 } else { 25344 callInsert(); 25345 } 25346 } 25347 25348 if (dirsWithPostpatch.length) { 25349 mergeVNodeHook(vnode, 'postpatch', function () { 25350 for (var i = 0; i < dirsWithPostpatch.length; i++) { 25351 callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); 25352 } 25353 }); 25354 } 25355 25356 if (!isCreate) { 25357 for (key in oldDirs) { 25358 if (!newDirs[key]) { 25359 // no longer present, unbind 25360 callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); 25361 } 25362 } 25363 } 25364} 25365 25366var emptyModifiers = Object.create(null); 25367 25368function normalizeDirectives$1 ( 25369 dirs, 25370 vm 25371) { 25372 var res = Object.create(null); 25373 if (!dirs) { 25374 // $flow-disable-line 25375 return res 25376 } 25377 var i, dir; 25378 for (i = 0; i < dirs.length; i++) { 25379 dir = dirs[i]; 25380 if (!dir.modifiers) { 25381 // $flow-disable-line 25382 dir.modifiers = emptyModifiers; 25383 } 25384 res[getRawDirName(dir)] = dir; 25385 dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); 25386 } 25387 // $flow-disable-line 25388 return res 25389} 25390 25391function getRawDirName (dir) { 25392 return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) 25393} 25394 25395function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { 25396 var fn = dir.def && dir.def[hook]; 25397 if (fn) { 25398 try { 25399 fn(vnode.elm, dir, vnode, oldVnode, isDestroy); 25400 } catch (e) { 25401 handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); 25402 } 25403 } 25404} 25405 25406var baseModules = [ 25407 ref, 25408 directives 25409] 25410 25411/* */ 25412 25413function updateAttrs (oldVnode, vnode) { 25414 var opts = vnode.componentOptions; 25415 if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { 25416 return 25417 } 25418 if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { 25419 return 25420 } 25421 var key, cur, old; 25422 var elm = vnode.elm; 25423 var oldAttrs = oldVnode.data.attrs || {}; 25424 var attrs = vnode.data.attrs || {}; 25425 // clone observed objects, as the user probably wants to mutate it 25426 if (isDef(attrs.__ob__)) { 25427 attrs = vnode.data.attrs = extend({}, attrs); 25428 } 25429 25430 for (key in attrs) { 25431 cur = attrs[key]; 25432 old = oldAttrs[key]; 25433 if (old !== cur) { 25434 setAttr(elm, key, cur); 25435 } 25436 } 25437 // #4391: in IE9, setting type can reset value for input[type=radio] 25438 // #6666: IE/Edge forces progress value down to 1 before setting a max 25439 /* istanbul ignore if */ 25440 if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { 25441 setAttr(elm, 'value', attrs.value); 25442 } 25443 for (key in oldAttrs) { 25444 if (isUndef(attrs[key])) { 25445 if (isXlink(key)) { 25446 elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); 25447 } else if (!isEnumeratedAttr(key)) { 25448 elm.removeAttribute(key); 25449 } 25450 } 25451 } 25452} 25453 25454function setAttr (el, key, value) { 25455 if (el.tagName.indexOf('-') > -1) { 25456 baseSetAttr(el, key, value); 25457 } else if (isBooleanAttr(key)) { 25458 // set attribute for blank value 25459 // e.g. <option disabled>Select one</option> 25460 if (isFalsyAttrValue(value)) { 25461 el.removeAttribute(key); 25462 } else { 25463 // technically allowfullscreen is a boolean attribute for <iframe>, 25464 // but Flash expects a value of "true" when used on <embed> tag 25465 value = key === 'allowfullscreen' && el.tagName === 'EMBED' 25466 ? 'true' 25467 : key; 25468 el.setAttribute(key, value); 25469 } 25470 } else if (isEnumeratedAttr(key)) { 25471 el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true'); 25472 } else if (isXlink(key)) { 25473 if (isFalsyAttrValue(value)) { 25474 el.removeAttributeNS(xlinkNS, getXlinkProp(key)); 25475 } else { 25476 el.setAttributeNS(xlinkNS, key, value); 25477 } 25478 } else { 25479 baseSetAttr(el, key, value); 25480 } 25481} 25482 25483function baseSetAttr (el, key, value) { 25484 if (isFalsyAttrValue(value)) { 25485 el.removeAttribute(key); 25486 } else { 25487 // #7138: IE10 & 11 fires input event when setting placeholder on 25488 // <textarea>... block the first input event and remove the blocker 25489 // immediately. 25490 /* istanbul ignore if */ 25491 if ( 25492 isIE && !isIE9 && 25493 el.tagName === 'TEXTAREA' && 25494 key === 'placeholder' && !el.__ieph 25495 ) { 25496 var blocker = function (e) { 25497 e.stopImmediatePropagation(); 25498 el.removeEventListener('input', blocker); 25499 }; 25500 el.addEventListener('input', blocker); 25501 // $flow-disable-line 25502 el.__ieph = true; /* IE placeholder patched */ 25503 } 25504 el.setAttribute(key, value); 25505 } 25506} 25507 25508var attrs = { 25509 create: updateAttrs, 25510 update: updateAttrs 25511} 25512 25513/* */ 25514 25515function updateClass (oldVnode, vnode) { 25516 var el = vnode.elm; 25517 var data = vnode.data; 25518 var oldData = oldVnode.data; 25519 if ( 25520 isUndef(data.staticClass) && 25521 isUndef(data.class) && ( 25522 isUndef(oldData) || ( 25523 isUndef(oldData.staticClass) && 25524 isUndef(oldData.class) 25525 ) 25526 ) 25527 ) { 25528 return 25529 } 25530 25531 var cls = genClassForVnode(vnode); 25532 25533 // handle transition classes 25534 var transitionClass = el._transitionClasses; 25535 if (isDef(transitionClass)) { 25536 cls = concat(cls, stringifyClass(transitionClass)); 25537 } 25538 25539 // set the class 25540 if (cls !== el._prevClass) { 25541 el.setAttribute('class', cls); 25542 el._prevClass = cls; 25543 } 25544} 25545 25546var klass = { 25547 create: updateClass, 25548 update: updateClass 25549} 25550 25551/* */ 25552 25553var validDivisionCharRE = /[\w).+\-_$\]]/; 25554 25555function parseFilters (exp) { 25556 var inSingle = false; 25557 var inDouble = false; 25558 var inTemplateString = false; 25559 var inRegex = false; 25560 var curly = 0; 25561 var square = 0; 25562 var paren = 0; 25563 var lastFilterIndex = 0; 25564 var c, prev, i, expression, filters; 25565 25566 for (i = 0; i < exp.length; i++) { 25567 prev = c; 25568 c = exp.charCodeAt(i); 25569 if (inSingle) { 25570 if (c === 0x27 && prev !== 0x5C) { inSingle = false; } 25571 } else if (inDouble) { 25572 if (c === 0x22 && prev !== 0x5C) { inDouble = false; } 25573 } else if (inTemplateString) { 25574 if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; } 25575 } else if (inRegex) { 25576 if (c === 0x2f && prev !== 0x5C) { inRegex = false; } 25577 } else if ( 25578 c === 0x7C && // pipe 25579 exp.charCodeAt(i + 1) !== 0x7C && 25580 exp.charCodeAt(i - 1) !== 0x7C && 25581 !curly && !square && !paren 25582 ) { 25583 if (expression === undefined) { 25584 // first filter, end of expression 25585 lastFilterIndex = i + 1; 25586 expression = exp.slice(0, i).trim(); 25587 } else { 25588 pushFilter(); 25589 } 25590 } else { 25591 switch (c) { 25592 case 0x22: inDouble = true; break // " 25593 case 0x27: inSingle = true; break // ' 25594 case 0x60: inTemplateString = true; break // ` 25595 case 0x28: paren++; break // ( 25596 case 0x29: paren--; break // ) 25597 case 0x5B: square++; break // [ 25598 case 0x5D: square--; break // ] 25599 case 0x7B: curly++; break // { 25600 case 0x7D: curly--; break // } 25601 } 25602 if (c === 0x2f) { // / 25603 var j = i - 1; 25604 var p = (void 0); 25605 // find first non-whitespace prev char 25606 for (; j >= 0; j--) { 25607 p = exp.charAt(j); 25608 if (p !== ' ') { break } 25609 } 25610 if (!p || !validDivisionCharRE.test(p)) { 25611 inRegex = true; 25612 } 25613 } 25614 } 25615 } 25616 25617 if (expression === undefined) { 25618 expression = exp.slice(0, i).trim(); 25619 } else if (lastFilterIndex !== 0) { 25620 pushFilter(); 25621 } 25622 25623 function pushFilter () { 25624 (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim()); 25625 lastFilterIndex = i + 1; 25626 } 25627 25628 if (filters) { 25629 for (i = 0; i < filters.length; i++) { 25630 expression = wrapFilter(expression, filters[i]); 25631 } 25632 } 25633 25634 return expression 25635} 25636 25637function wrapFilter (exp, filter) { 25638 var i = filter.indexOf('('); 25639 if (i < 0) { 25640 // _f: resolveFilter 25641 return ("_f(\"" + filter + "\")(" + exp + ")") 25642 } else { 25643 var name = filter.slice(0, i); 25644 var args = filter.slice(i + 1); 25645 return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args)) 25646 } 25647} 25648 25649/* */ 25650 25651function baseWarn (msg) { 25652 console.error(("[Vue compiler]: " + msg)); 25653} 25654 25655function pluckModuleFunction ( 25656 modules, 25657 key 25658) { 25659 return modules 25660 ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) 25661 : [] 25662} 25663 25664function addProp (el, name, value) { 25665 (el.props || (el.props = [])).push({ name: name, value: value }); 25666 el.plain = false; 25667} 25668 25669function addAttr (el, name, value) { 25670 (el.attrs || (el.attrs = [])).push({ name: name, value: value }); 25671 el.plain = false; 25672} 25673 25674// add a raw attr (use this in preTransforms) 25675function addRawAttr (el, name, value) { 25676 el.attrsMap[name] = value; 25677 el.attrsList.push({ name: name, value: value }); 25678} 25679 25680function addDirective ( 25681 el, 25682 name, 25683 rawName, 25684 value, 25685 arg, 25686 modifiers 25687) { 25688 (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers }); 25689 el.plain = false; 25690} 25691 25692function addHandler ( 25693 el, 25694 name, 25695 value, 25696 modifiers, 25697 important, 25698 warn 25699) { 25700 modifiers = modifiers || emptyObject; 25701 // warn prevent and passive modifier 25702 /* istanbul ignore if */ 25703 if ( 25704 true && warn && 25705 modifiers.prevent && modifiers.passive 25706 ) { 25707 warn( 25708 'passive and prevent can\'t be used together. ' + 25709 'Passive handler can\'t prevent default event.' 25710 ); 25711 } 25712 25713 // check capture modifier 25714 if (modifiers.capture) { 25715 delete modifiers.capture; 25716 name = '!' + name; // mark the event as captured 25717 } 25718 if (modifiers.once) { 25719 delete modifiers.once; 25720 name = '~' + name; // mark the event as once 25721 } 25722 /* istanbul ignore if */ 25723 if (modifiers.passive) { 25724 delete modifiers.passive; 25725 name = '&' + name; // mark the event as passive 25726 } 25727 25728 // normalize click.right and click.middle since they don't actually fire 25729 // this is technically browser-specific, but at least for now browsers are 25730 // the only target envs that have right/middle clicks. 25731 if (name === 'click') { 25732 if (modifiers.right) { 25733 name = 'contextmenu'; 25734 delete modifiers.right; 25735 } else if (modifiers.middle) { 25736 name = 'mouseup'; 25737 } 25738 } 25739 25740 var events; 25741 if (modifiers.native) { 25742 delete modifiers.native; 25743 events = el.nativeEvents || (el.nativeEvents = {}); 25744 } else { 25745 events = el.events || (el.events = {}); 25746 } 25747 25748 var newHandler = { 25749 value: value.trim() 25750 }; 25751 if (modifiers !== emptyObject) { 25752 newHandler.modifiers = modifiers; 25753 } 25754 25755 var handlers = events[name]; 25756 /* istanbul ignore if */ 25757 if (Array.isArray(handlers)) { 25758 important ? handlers.unshift(newHandler) : handlers.push(newHandler); 25759 } else if (handlers) { 25760 events[name] = important ? [newHandler, handlers] : [handlers, newHandler]; 25761 } else { 25762 events[name] = newHandler; 25763 } 25764 25765 el.plain = false; 25766} 25767 25768function getBindingAttr ( 25769 el, 25770 name, 25771 getStatic 25772) { 25773 var dynamicValue = 25774 getAndRemoveAttr(el, ':' + name) || 25775 getAndRemoveAttr(el, 'v-bind:' + name); 25776 if (dynamicValue != null) { 25777 return parseFilters(dynamicValue) 25778 } else if (getStatic !== false) { 25779 var staticValue = getAndRemoveAttr(el, name); 25780 if (staticValue != null) { 25781 return JSON.stringify(staticValue) 25782 } 25783 } 25784} 25785 25786// note: this only removes the attr from the Array (attrsList) so that it 25787// doesn't get processed by processAttrs. 25788// By default it does NOT remove it from the map (attrsMap) because the map is 25789// needed during codegen. 25790function getAndRemoveAttr ( 25791 el, 25792 name, 25793 removeFromMap 25794) { 25795 var val; 25796 if ((val = el.attrsMap[name]) != null) { 25797 var list = el.attrsList; 25798 for (var i = 0, l = list.length; i < l; i++) { 25799 if (list[i].name === name) { 25800 list.splice(i, 1); 25801 break 25802 } 25803 } 25804 } 25805 if (removeFromMap) { 25806 delete el.attrsMap[name]; 25807 } 25808 return val 25809} 25810 25811/* */ 25812 25813/** 25814 * Cross-platform code generation for component v-model 25815 */ 25816function genComponentModel ( 25817 el, 25818 value, 25819 modifiers 25820) { 25821 var ref = modifiers || {}; 25822 var number = ref.number; 25823 var trim = ref.trim; 25824 25825 var baseValueExpression = '$$v'; 25826 var valueExpression = baseValueExpression; 25827 if (trim) { 25828 valueExpression = 25829 "(typeof " + baseValueExpression + " === 'string'" + 25830 "? " + baseValueExpression + ".trim()" + 25831 ": " + baseValueExpression + ")"; 25832 } 25833 if (number) { 25834 valueExpression = "_n(" + valueExpression + ")"; 25835 } 25836 var assignment = genAssignmentCode(value, valueExpression); 25837 25838 el.model = { 25839 value: ("(" + value + ")"), 25840 expression: ("\"" + value + "\""), 25841 callback: ("function (" + baseValueExpression + ") {" + assignment + "}") 25842 }; 25843} 25844 25845/** 25846 * Cross-platform codegen helper for generating v-model value assignment code. 25847 */ 25848function genAssignmentCode ( 25849 value, 25850 assignment 25851) { 25852 var res = parseModel(value); 25853 if (res.key === null) { 25854 return (value + "=" + assignment) 25855 } else { 25856 return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")") 25857 } 25858} 25859 25860/** 25861 * Parse a v-model expression into a base path and a final key segment. 25862 * Handles both dot-path and possible square brackets. 25863 * 25864 * Possible cases: 25865 * 25866 * - test 25867 * - test[key] 25868 * - test[test1[key]] 25869 * - test["a"][key] 25870 * - xxx.test[a[a].test1[key]] 25871 * - test.xxx.a["asa"][test1[key]] 25872 * 25873 */ 25874 25875var len; 25876var str; 25877var chr; 25878var index$1; 25879var expressionPos; 25880var expressionEndPos; 25881 25882 25883 25884function parseModel (val) { 25885 // Fix https://github.com/vuejs/vue/pull/7730 25886 // allow v-model="obj.val " (trailing whitespace) 25887 val = val.trim(); 25888 len = val.length; 25889 25890 if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { 25891 index$1 = val.lastIndexOf('.'); 25892 if (index$1 > -1) { 25893 return { 25894 exp: val.slice(0, index$1), 25895 key: '"' + val.slice(index$1 + 1) + '"' 25896 } 25897 } else { 25898 return { 25899 exp: val, 25900 key: null 25901 } 25902 } 25903 } 25904 25905 str = val; 25906 index$1 = expressionPos = expressionEndPos = 0; 25907 25908 while (!eof()) { 25909 chr = next(); 25910 /* istanbul ignore if */ 25911 if (isStringStart(chr)) { 25912 parseString(chr); 25913 } else if (chr === 0x5B) { 25914 parseBracket(chr); 25915 } 25916 } 25917 25918 return { 25919 exp: val.slice(0, expressionPos), 25920 key: val.slice(expressionPos + 1, expressionEndPos) 25921 } 25922} 25923 25924function next () { 25925 return str.charCodeAt(++index$1) 25926} 25927 25928function eof () { 25929 return index$1 >= len 25930} 25931 25932function isStringStart (chr) { 25933 return chr === 0x22 || chr === 0x27 25934} 25935 25936function parseBracket (chr) { 25937 var inBracket = 1; 25938 expressionPos = index$1; 25939 while (!eof()) { 25940 chr = next(); 25941 if (isStringStart(chr)) { 25942 parseString(chr); 25943 continue 25944 } 25945 if (chr === 0x5B) { inBracket++; } 25946 if (chr === 0x5D) { inBracket--; } 25947 if (inBracket === 0) { 25948 expressionEndPos = index$1; 25949 break 25950 } 25951 } 25952} 25953 25954function parseString (chr) { 25955 var stringQuote = chr; 25956 while (!eof()) { 25957 chr = next(); 25958 if (chr === stringQuote) { 25959 break 25960 } 25961 } 25962} 25963 25964/* */ 25965 25966var warn$1; 25967 25968// in some cases, the event used has to be determined at runtime 25969// so we used some reserved tokens during compile. 25970var RANGE_TOKEN = '__r'; 25971var CHECKBOX_RADIO_TOKEN = '__c'; 25972 25973function model ( 25974 el, 25975 dir, 25976 _warn 25977) { 25978 warn$1 = _warn; 25979 var value = dir.value; 25980 var modifiers = dir.modifiers; 25981 var tag = el.tag; 25982 var type = el.attrsMap.type; 25983 25984 if (true) { 25985 // inputs with type="file" are read only and setting the input's 25986 // value will throw an error. 25987 if (tag === 'input' && type === 'file') { 25988 warn$1( 25989 "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + 25990 "File inputs are read only. Use a v-on:change listener instead." 25991 ); 25992 } 25993 } 25994 25995 if (el.component) { 25996 genComponentModel(el, value, modifiers); 25997 // component v-model doesn't need extra runtime 25998 return false 25999 } else if (tag === 'select') { 26000 genSelect(el, value, modifiers); 26001 } else if (tag === 'input' && type === 'checkbox') { 26002 genCheckboxModel(el, value, modifiers); 26003 } else if (tag === 'input' && type === 'radio') { 26004 genRadioModel(el, value, modifiers); 26005 } else if (tag === 'input' || tag === 'textarea') { 26006 genDefaultModel(el, value, modifiers); 26007 } else if (!config.isReservedTag(tag)) { 26008 genComponentModel(el, value, modifiers); 26009 // component v-model doesn't need extra runtime 26010 return false 26011 } else if (true) { 26012 warn$1( 26013 "<" + (el.tag) + " v-model=\"" + value + "\">: " + 26014 "v-model is not supported on this element type. " + 26015 'If you are working with contenteditable, it\'s recommended to ' + 26016 'wrap a library dedicated for that purpose inside a custom component.' 26017 ); 26018 } 26019 26020 // ensure runtime directive metadata 26021 return true 26022} 26023 26024function genCheckboxModel ( 26025 el, 26026 value, 26027 modifiers 26028) { 26029 var number = modifiers && modifiers.number; 26030 var valueBinding = getBindingAttr(el, 'value') || 'null'; 26031 var trueValueBinding = getBindingAttr(el, 'true-value') || 'true'; 26032 var falseValueBinding = getBindingAttr(el, 'false-value') || 'false'; 26033 addProp(el, 'checked', 26034 "Array.isArray(" + value + ")" + 26035 "?_i(" + value + "," + valueBinding + ")>-1" + ( 26036 trueValueBinding === 'true' 26037 ? (":(" + value + ")") 26038 : (":_q(" + value + "," + trueValueBinding + ")") 26039 ) 26040 ); 26041 addHandler(el, 'change', 26042 "var $$a=" + value + "," + 26043 '$$el=$event.target,' + 26044 "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" + 26045 'if(Array.isArray($$a)){' + 26046 "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," + 26047 '$$i=_i($$a,$$v);' + 26048 "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" + 26049 "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" + 26050 "}else{" + (genAssignmentCode(value, '$$c')) + "}", 26051 null, true 26052 ); 26053} 26054 26055function genRadioModel ( 26056 el, 26057 value, 26058 modifiers 26059) { 26060 var number = modifiers && modifiers.number; 26061 var valueBinding = getBindingAttr(el, 'value') || 'null'; 26062 valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding; 26063 addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")")); 26064 addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true); 26065} 26066 26067function genSelect ( 26068 el, 26069 value, 26070 modifiers 26071) { 26072 var number = modifiers && modifiers.number; 26073 var selectedVal = "Array.prototype.filter" + 26074 ".call($event.target.options,function(o){return o.selected})" + 26075 ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" + 26076 "return " + (number ? '_n(val)' : 'val') + "})"; 26077 26078 var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]'; 26079 var code = "var $$selectedVal = " + selectedVal + ";"; 26080 code = code + " " + (genAssignmentCode(value, assignment)); 26081 addHandler(el, 'change', code, null, true); 26082} 26083 26084function genDefaultModel ( 26085 el, 26086 value, 26087 modifiers 26088) { 26089 var type = el.attrsMap.type; 26090 26091 // warn if v-bind:value conflicts with v-model 26092 // except for inputs with v-bind:type 26093 if (true) { 26094 var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; 26095 var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; 26096 if (value$1 && !typeBinding) { 26097 var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; 26098 warn$1( 26099 binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + 26100 'because the latter already expands to a value binding internally' 26101 ); 26102 } 26103 } 26104 26105 var ref = modifiers || {}; 26106 var lazy = ref.lazy; 26107 var number = ref.number; 26108 var trim = ref.trim; 26109 var needCompositionGuard = !lazy && type !== 'range'; 26110 var event = lazy 26111 ? 'change' 26112 : type === 'range' 26113 ? RANGE_TOKEN 26114 : 'input'; 26115 26116 var valueExpression = '$event.target.value'; 26117 if (trim) { 26118 valueExpression = "$event.target.value.trim()"; 26119 } 26120 if (number) { 26121 valueExpression = "_n(" + valueExpression + ")"; 26122 } 26123 26124 var code = genAssignmentCode(value, valueExpression); 26125 if (needCompositionGuard) { 26126 code = "if($event.target.composing)return;" + code; 26127 } 26128 26129 addProp(el, 'value', ("(" + value + ")")); 26130 addHandler(el, event, code, null, true); 26131 if (trim || number) { 26132 addHandler(el, 'blur', '$forceUpdate()'); 26133 } 26134} 26135 26136/* */ 26137 26138// normalize v-model event tokens that can only be determined at runtime. 26139// it's important to place the event as the first in the array because 26140// the whole point is ensuring the v-model callback gets called before 26141// user-attached handlers. 26142function normalizeEvents (on) { 26143 /* istanbul ignore if */ 26144 if (isDef(on[RANGE_TOKEN])) { 26145 // IE input[type=range] only supports `change` event 26146 var event = isIE ? 'change' : 'input'; 26147 on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); 26148 delete on[RANGE_TOKEN]; 26149 } 26150 // This was originally intended to fix #4521 but no longer necessary 26151 // after 2.5. Keeping it for backwards compat with generated code from < 2.4 26152 /* istanbul ignore if */ 26153 if (isDef(on[CHECKBOX_RADIO_TOKEN])) { 26154 on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); 26155 delete on[CHECKBOX_RADIO_TOKEN]; 26156 } 26157} 26158 26159var target$1; 26160 26161function createOnceHandler (handler, event, capture) { 26162 var _target = target$1; // save current target element in closure 26163 return function onceHandler () { 26164 var res = handler.apply(null, arguments); 26165 if (res !== null) { 26166 remove$2(event, onceHandler, capture, _target); 26167 } 26168 } 26169} 26170 26171function add$1 ( 26172 event, 26173 handler, 26174 once$$1, 26175 capture, 26176 passive 26177) { 26178 handler = withMacroTask(handler); 26179 if (once$$1) { handler = createOnceHandler(handler, event, capture); } 26180 target$1.addEventListener( 26181 event, 26182 handler, 26183 supportsPassive 26184 ? { capture: capture, passive: passive } 26185 : capture 26186 ); 26187} 26188 26189function remove$2 ( 26190 event, 26191 handler, 26192 capture, 26193 _target 26194) { 26195 (_target || target$1).removeEventListener( 26196 event, 26197 handler._withTask || handler, 26198 capture 26199 ); 26200} 26201 26202function updateDOMListeners (oldVnode, vnode) { 26203 if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { 26204 return 26205 } 26206 var on = vnode.data.on || {}; 26207 var oldOn = oldVnode.data.on || {}; 26208 target$1 = vnode.elm; 26209 normalizeEvents(on); 26210 updateListeners(on, oldOn, add$1, remove$2, vnode.context); 26211 target$1 = undefined; 26212} 26213 26214var events = { 26215 create: updateDOMListeners, 26216 update: updateDOMListeners 26217} 26218 26219/* */ 26220 26221function updateDOMProps (oldVnode, vnode) { 26222 if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { 26223 return 26224 } 26225 var key, cur; 26226 var elm = vnode.elm; 26227 var oldProps = oldVnode.data.domProps || {}; 26228 var props = vnode.data.domProps || {}; 26229 // clone observed objects, as the user probably wants to mutate it 26230 if (isDef(props.__ob__)) { 26231 props = vnode.data.domProps = extend({}, props); 26232 } 26233 26234 for (key in oldProps) { 26235 if (isUndef(props[key])) { 26236 elm[key] = ''; 26237 } 26238 } 26239 for (key in props) { 26240 cur = props[key]; 26241 // ignore children if the node has textContent or innerHTML, 26242 // as these will throw away existing DOM nodes and cause removal errors 26243 // on subsequent patches (#3360) 26244 if (key === 'textContent' || key === 'innerHTML') { 26245 if (vnode.children) { vnode.children.length = 0; } 26246 if (cur === oldProps[key]) { continue } 26247 // #6601 work around Chrome version <= 55 bug where single textNode 26248 // replaced by innerHTML/textContent retains its parentNode property 26249 if (elm.childNodes.length === 1) { 26250 elm.removeChild(elm.childNodes[0]); 26251 } 26252 } 26253 26254 if (key === 'value') { 26255 // store value as _value as well since 26256 // non-string values will be stringified 26257 elm._value = cur; 26258 // avoid resetting cursor position when value is the same 26259 var strCur = isUndef(cur) ? '' : String(cur); 26260 if (shouldUpdateValue(elm, strCur)) { 26261 elm.value = strCur; 26262 } 26263 } else { 26264 elm[key] = cur; 26265 } 26266 } 26267} 26268 26269// check platforms/web/util/attrs.js acceptValue 26270 26271 26272function shouldUpdateValue (elm, checkVal) { 26273 return (!elm.composing && ( 26274 elm.tagName === 'OPTION' || 26275 isNotInFocusAndDirty(elm, checkVal) || 26276 isDirtyWithModifiers(elm, checkVal) 26277 )) 26278} 26279 26280function isNotInFocusAndDirty (elm, checkVal) { 26281 // return true when textbox (.number and .trim) loses focus and its value is 26282 // not equal to the updated value 26283 var notInFocus = true; 26284 // #6157 26285 // work around IE bug when accessing document.activeElement in an iframe 26286 try { notInFocus = document.activeElement !== elm; } catch (e) {} 26287 return notInFocus && elm.value !== checkVal 26288} 26289 26290function isDirtyWithModifiers (elm, newVal) { 26291 var value = elm.value; 26292 var modifiers = elm._vModifiers; // injected by v-model runtime 26293 if (isDef(modifiers)) { 26294 if (modifiers.lazy) { 26295 // inputs with lazy should only be updated when not in focus 26296 return false 26297 } 26298 if (modifiers.number) { 26299 return toNumber(value) !== toNumber(newVal) 26300 } 26301 if (modifiers.trim) { 26302 return value.trim() !== newVal.trim() 26303 } 26304 } 26305 return value !== newVal 26306} 26307 26308var domProps = { 26309 create: updateDOMProps, 26310 update: updateDOMProps 26311} 26312 26313/* */ 26314 26315var parseStyleText = cached(function (cssText) { 26316 var res = {}; 26317 var listDelimiter = /;(?![^(]*\))/g; 26318 var propertyDelimiter = /:(.+)/; 26319 cssText.split(listDelimiter).forEach(function (item) { 26320 if (item) { 26321 var tmp = item.split(propertyDelimiter); 26322 tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim()); 26323 } 26324 }); 26325 return res 26326}); 26327 26328// merge static and dynamic style data on the same vnode 26329function normalizeStyleData (data) { 26330 var style = normalizeStyleBinding(data.style); 26331 // static style is pre-processed into an object during compilation 26332 // and is always a fresh object, so it's safe to merge into it 26333 return data.staticStyle 26334 ? extend(data.staticStyle, style) 26335 : style 26336} 26337 26338// normalize possible array / string values into Object 26339function normalizeStyleBinding (bindingStyle) { 26340 if (Array.isArray(bindingStyle)) { 26341 return toObject(bindingStyle) 26342 } 26343 if (typeof bindingStyle === 'string') { 26344 return parseStyleText(bindingStyle) 26345 } 26346 return bindingStyle 26347} 26348 26349/** 26350 * parent component style should be after child's 26351 * so that parent component's style could override it 26352 */ 26353function getStyle (vnode, checkChild) { 26354 var res = {}; 26355 var styleData; 26356 26357 if (checkChild) { 26358 var childNode = vnode; 26359 while (childNode.componentInstance) { 26360 childNode = childNode.componentInstance._vnode; 26361 if ( 26362 childNode && childNode.data && 26363 (styleData = normalizeStyleData(childNode.data)) 26364 ) { 26365 extend(res, styleData); 26366 } 26367 } 26368 } 26369 26370 if ((styleData = normalizeStyleData(vnode.data))) { 26371 extend(res, styleData); 26372 } 26373 26374 var parentNode = vnode; 26375 while ((parentNode = parentNode.parent)) { 26376 if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) { 26377 extend(res, styleData); 26378 } 26379 } 26380 return res 26381} 26382 26383/* */ 26384 26385var cssVarRE = /^--/; 26386var importantRE = /\s*!important$/; 26387var setProp = function (el, name, val) { 26388 /* istanbul ignore if */ 26389 if (cssVarRE.test(name)) { 26390 el.style.setProperty(name, val); 26391 } else if (importantRE.test(val)) { 26392 el.style.setProperty(name, val.replace(importantRE, ''), 'important'); 26393 } else { 26394 var normalizedName = normalize(name); 26395 if (Array.isArray(val)) { 26396 // Support values array created by autoprefixer, e.g. 26397 // {display: ["-webkit-box", "-ms-flexbox", "flex"]} 26398 // Set them one by one, and the browser will only set those it can recognize 26399 for (var i = 0, len = val.length; i < len; i++) { 26400 el.style[normalizedName] = val[i]; 26401 } 26402 } else { 26403 el.style[normalizedName] = val; 26404 } 26405 } 26406}; 26407 26408var vendorNames = ['Webkit', 'Moz', 'ms']; 26409 26410var emptyStyle; 26411var normalize = cached(function (prop) { 26412 emptyStyle = emptyStyle || document.createElement('div').style; 26413 prop = camelize(prop); 26414 if (prop !== 'filter' && (prop in emptyStyle)) { 26415 return prop 26416 } 26417 var capName = prop.charAt(0).toUpperCase() + prop.slice(1); 26418 for (var i = 0; i < vendorNames.length; i++) { 26419 var name = vendorNames[i] + capName; 26420 if (name in emptyStyle) { 26421 return name 26422 } 26423 } 26424}); 26425 26426function updateStyle (oldVnode, vnode) { 26427 var data = vnode.data; 26428 var oldData = oldVnode.data; 26429 26430 if (isUndef(data.staticStyle) && isUndef(data.style) && 26431 isUndef(oldData.staticStyle) && isUndef(oldData.style) 26432 ) { 26433 return 26434 } 26435 26436 var cur, name; 26437 var el = vnode.elm; 26438 var oldStaticStyle = oldData.staticStyle; 26439 var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; 26440 26441 // if static style exists, stylebinding already merged into it when doing normalizeStyleData 26442 var oldStyle = oldStaticStyle || oldStyleBinding; 26443 26444 var style = normalizeStyleBinding(vnode.data.style) || {}; 26445 26446 // store normalized style under a different key for next diff 26447 // make sure to clone it if it's reactive, since the user likely wants 26448 // to mutate it. 26449 vnode.data.normalizedStyle = isDef(style.__ob__) 26450 ? extend({}, style) 26451 : style; 26452 26453 var newStyle = getStyle(vnode, true); 26454 26455 for (name in oldStyle) { 26456 if (isUndef(newStyle[name])) { 26457 setProp(el, name, ''); 26458 } 26459 } 26460 for (name in newStyle) { 26461 cur = newStyle[name]; 26462 if (cur !== oldStyle[name]) { 26463 // ie9 setting to null has no effect, must use empty string 26464 setProp(el, name, cur == null ? '' : cur); 26465 } 26466 } 26467} 26468 26469var style = { 26470 create: updateStyle, 26471 update: updateStyle 26472} 26473 26474/* */ 26475 26476/** 26477 * Add class with compatibility for SVG since classList is not supported on 26478 * SVG elements in IE 26479 */ 26480function addClass (el, cls) { 26481 /* istanbul ignore if */ 26482 if (!cls || !(cls = cls.trim())) { 26483 return 26484 } 26485 26486 /* istanbul ignore else */ 26487 if (el.classList) { 26488 if (cls.indexOf(' ') > -1) { 26489 cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); }); 26490 } else { 26491 el.classList.add(cls); 26492 } 26493 } else { 26494 var cur = " " + (el.getAttribute('class') || '') + " "; 26495 if (cur.indexOf(' ' + cls + ' ') < 0) { 26496 el.setAttribute('class', (cur + cls).trim()); 26497 } 26498 } 26499} 26500 26501/** 26502 * Remove class with compatibility for SVG since classList is not supported on 26503 * SVG elements in IE 26504 */ 26505function removeClass (el, cls) { 26506 /* istanbul ignore if */ 26507 if (!cls || !(cls = cls.trim())) { 26508 return 26509 } 26510 26511 /* istanbul ignore else */ 26512 if (el.classList) { 26513 if (cls.indexOf(' ') > -1) { 26514 cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); }); 26515 } else { 26516 el.classList.remove(cls); 26517 } 26518 if (!el.classList.length) { 26519 el.removeAttribute('class'); 26520 } 26521 } else { 26522 var cur = " " + (el.getAttribute('class') || '') + " "; 26523 var tar = ' ' + cls + ' '; 26524 while (cur.indexOf(tar) >= 0) { 26525 cur = cur.replace(tar, ' '); 26526 } 26527 cur = cur.trim(); 26528 if (cur) { 26529 el.setAttribute('class', cur); 26530 } else { 26531 el.removeAttribute('class'); 26532 } 26533 } 26534} 26535 26536/* */ 26537 26538function resolveTransition (def) { 26539 if (!def) { 26540 return 26541 } 26542 /* istanbul ignore else */ 26543 if (typeof def === 'object') { 26544 var res = {}; 26545 if (def.css !== false) { 26546 extend(res, autoCssTransition(def.name || 'v')); 26547 } 26548 extend(res, def); 26549 return res 26550 } else if (typeof def === 'string') { 26551 return autoCssTransition(def) 26552 } 26553} 26554 26555var autoCssTransition = cached(function (name) { 26556 return { 26557 enterClass: (name + "-enter"), 26558 enterToClass: (name + "-enter-to"), 26559 enterActiveClass: (name + "-enter-active"), 26560 leaveClass: (name + "-leave"), 26561 leaveToClass: (name + "-leave-to"), 26562 leaveActiveClass: (name + "-leave-active") 26563 } 26564}); 26565 26566var hasTransition = inBrowser && !isIE9; 26567var TRANSITION = 'transition'; 26568var ANIMATION = 'animation'; 26569 26570// Transition property/event sniffing 26571var transitionProp = 'transition'; 26572var transitionEndEvent = 'transitionend'; 26573var animationProp = 'animation'; 26574var animationEndEvent = 'animationend'; 26575if (hasTransition) { 26576 /* istanbul ignore if */ 26577 if (window.ontransitionend === undefined && 26578 window.onwebkittransitionend !== undefined 26579 ) { 26580 transitionProp = 'WebkitTransition'; 26581 transitionEndEvent = 'webkitTransitionEnd'; 26582 } 26583 if (window.onanimationend === undefined && 26584 window.onwebkitanimationend !== undefined 26585 ) { 26586 animationProp = 'WebkitAnimation'; 26587 animationEndEvent = 'webkitAnimationEnd'; 26588 } 26589} 26590 26591// binding to window is necessary to make hot reload work in IE in strict mode 26592var raf = inBrowser 26593 ? window.requestAnimationFrame 26594 ? window.requestAnimationFrame.bind(window) 26595 : setTimeout 26596 : /* istanbul ignore next */ function (fn) { return fn(); }; 26597 26598function nextFrame (fn) { 26599 raf(function () { 26600 raf(fn); 26601 }); 26602} 26603 26604function addTransitionClass (el, cls) { 26605 var transitionClasses = el._transitionClasses || (el._transitionClasses = []); 26606 if (transitionClasses.indexOf(cls) < 0) { 26607 transitionClasses.push(cls); 26608 addClass(el, cls); 26609 } 26610} 26611 26612function removeTransitionClass (el, cls) { 26613 if (el._transitionClasses) { 26614 remove(el._transitionClasses, cls); 26615 } 26616 removeClass(el, cls); 26617} 26618 26619function whenTransitionEnds ( 26620 el, 26621 expectedType, 26622 cb 26623) { 26624 var ref = getTransitionInfo(el, expectedType); 26625 var type = ref.type; 26626 var timeout = ref.timeout; 26627 var propCount = ref.propCount; 26628 if (!type) { return cb() } 26629 var event = type === TRANSITION ? transitionEndEvent : animationEndEvent; 26630 var ended = 0; 26631 var end = function () { 26632 el.removeEventListener(event, onEnd); 26633 cb(); 26634 }; 26635 var onEnd = function (e) { 26636 if (e.target === el) { 26637 if (++ended >= propCount) { 26638 end(); 26639 } 26640 } 26641 }; 26642 setTimeout(function () { 26643 if (ended < propCount) { 26644 end(); 26645 } 26646 }, timeout + 1); 26647 el.addEventListener(event, onEnd); 26648} 26649 26650var transformRE = /\b(transform|all)(,|$)/; 26651 26652function getTransitionInfo (el, expectedType) { 26653 var styles = window.getComputedStyle(el); 26654 var transitionDelays = styles[transitionProp + 'Delay'].split(', '); 26655 var transitionDurations = styles[transitionProp + 'Duration'].split(', '); 26656 var transitionTimeout = getTimeout(transitionDelays, transitionDurations); 26657 var animationDelays = styles[animationProp + 'Delay'].split(', '); 26658 var animationDurations = styles[animationProp + 'Duration'].split(', '); 26659 var animationTimeout = getTimeout(animationDelays, animationDurations); 26660 26661 var type; 26662 var timeout = 0; 26663 var propCount = 0; 26664 /* istanbul ignore if */ 26665 if (expectedType === TRANSITION) { 26666 if (transitionTimeout > 0) { 26667 type = TRANSITION; 26668 timeout = transitionTimeout; 26669 propCount = transitionDurations.length; 26670 } 26671 } else if (expectedType === ANIMATION) { 26672 if (animationTimeout > 0) { 26673 type = ANIMATION; 26674 timeout = animationTimeout; 26675 propCount = animationDurations.length; 26676 } 26677 } else { 26678 timeout = Math.max(transitionTimeout, animationTimeout); 26679 type = timeout > 0 26680 ? transitionTimeout > animationTimeout 26681 ? TRANSITION 26682 : ANIMATION 26683 : null; 26684 propCount = type 26685 ? type === TRANSITION 26686 ? transitionDurations.length 26687 : animationDurations.length 26688 : 0; 26689 } 26690 var hasTransform = 26691 type === TRANSITION && 26692 transformRE.test(styles[transitionProp + 'Property']); 26693 return { 26694 type: type, 26695 timeout: timeout, 26696 propCount: propCount, 26697 hasTransform: hasTransform 26698 } 26699} 26700 26701function getTimeout (delays, durations) { 26702 /* istanbul ignore next */ 26703 while (delays.length < durations.length) { 26704 delays = delays.concat(delays); 26705 } 26706 26707 return Math.max.apply(null, durations.map(function (d, i) { 26708 return toMs(d) + toMs(delays[i]) 26709 })) 26710} 26711 26712function toMs (s) { 26713 return Number(s.slice(0, -1)) * 1000 26714} 26715 26716/* */ 26717 26718function enter (vnode, toggleDisplay) { 26719 var el = vnode.elm; 26720 26721 // call leave callback now 26722 if (isDef(el._leaveCb)) { 26723 el._leaveCb.cancelled = true; 26724 el._leaveCb(); 26725 } 26726 26727 var data = resolveTransition(vnode.data.transition); 26728 if (isUndef(data)) { 26729 return 26730 } 26731 26732 /* istanbul ignore if */ 26733 if (isDef(el._enterCb) || el.nodeType !== 1) { 26734 return 26735 } 26736 26737 var css = data.css; 26738 var type = data.type; 26739 var enterClass = data.enterClass; 26740 var enterToClass = data.enterToClass; 26741 var enterActiveClass = data.enterActiveClass; 26742 var appearClass = data.appearClass; 26743 var appearToClass = data.appearToClass; 26744 var appearActiveClass = data.appearActiveClass; 26745 var beforeEnter = data.beforeEnter; 26746 var enter = data.enter; 26747 var afterEnter = data.afterEnter; 26748 var enterCancelled = data.enterCancelled; 26749 var beforeAppear = data.beforeAppear; 26750 var appear = data.appear; 26751 var afterAppear = data.afterAppear; 26752 var appearCancelled = data.appearCancelled; 26753 var duration = data.duration; 26754 26755 // activeInstance will always be the <transition> component managing this 26756 // transition. One edge case to check is when the <transition> is placed 26757 // as the root node of a child component. In that case we need to check 26758 // <transition>'s parent for appear check. 26759 var context = activeInstance; 26760 var transitionNode = activeInstance.$vnode; 26761 while (transitionNode && transitionNode.parent) { 26762 transitionNode = transitionNode.parent; 26763 context = transitionNode.context; 26764 } 26765 26766 var isAppear = !context._isMounted || !vnode.isRootInsert; 26767 26768 if (isAppear && !appear && appear !== '') { 26769 return 26770 } 26771 26772 var startClass = isAppear && appearClass 26773 ? appearClass 26774 : enterClass; 26775 var activeClass = isAppear && appearActiveClass 26776 ? appearActiveClass 26777 : enterActiveClass; 26778 var toClass = isAppear && appearToClass 26779 ? appearToClass 26780 : enterToClass; 26781 26782 var beforeEnterHook = isAppear 26783 ? (beforeAppear || beforeEnter) 26784 : beforeEnter; 26785 var enterHook = isAppear 26786 ? (typeof appear === 'function' ? appear : enter) 26787 : enter; 26788 var afterEnterHook = isAppear 26789 ? (afterAppear || afterEnter) 26790 : afterEnter; 26791 var enterCancelledHook = isAppear 26792 ? (appearCancelled || enterCancelled) 26793 : enterCancelled; 26794 26795 var explicitEnterDuration = toNumber( 26796 isObject(duration) 26797 ? duration.enter 26798 : duration 26799 ); 26800 26801 if ( true && explicitEnterDuration != null) { 26802 checkDuration(explicitEnterDuration, 'enter', vnode); 26803 } 26804 26805 var expectsCSS = css !== false && !isIE9; 26806 var userWantsControl = getHookArgumentsLength(enterHook); 26807 26808 var cb = el._enterCb = once(function () { 26809 if (expectsCSS) { 26810 removeTransitionClass(el, toClass); 26811 removeTransitionClass(el, activeClass); 26812 } 26813 if (cb.cancelled) { 26814 if (expectsCSS) { 26815 removeTransitionClass(el, startClass); 26816 } 26817 enterCancelledHook && enterCancelledHook(el); 26818 } else { 26819 afterEnterHook && afterEnterHook(el); 26820 } 26821 el._enterCb = null; 26822 }); 26823 26824 if (!vnode.data.show) { 26825 // remove pending leave element on enter by injecting an insert hook 26826 mergeVNodeHook(vnode, 'insert', function () { 26827 var parent = el.parentNode; 26828 var pendingNode = parent && parent._pending && parent._pending[vnode.key]; 26829 if (pendingNode && 26830 pendingNode.tag === vnode.tag && 26831 pendingNode.elm._leaveCb 26832 ) { 26833 pendingNode.elm._leaveCb(); 26834 } 26835 enterHook && enterHook(el, cb); 26836 }); 26837 } 26838 26839 // start enter transition 26840 beforeEnterHook && beforeEnterHook(el); 26841 if (expectsCSS) { 26842 addTransitionClass(el, startClass); 26843 addTransitionClass(el, activeClass); 26844 nextFrame(function () { 26845 removeTransitionClass(el, startClass); 26846 if (!cb.cancelled) { 26847 addTransitionClass(el, toClass); 26848 if (!userWantsControl) { 26849 if (isValidDuration(explicitEnterDuration)) { 26850 setTimeout(cb, explicitEnterDuration); 26851 } else { 26852 whenTransitionEnds(el, type, cb); 26853 } 26854 } 26855 } 26856 }); 26857 } 26858 26859 if (vnode.data.show) { 26860 toggleDisplay && toggleDisplay(); 26861 enterHook && enterHook(el, cb); 26862 } 26863 26864 if (!expectsCSS && !userWantsControl) { 26865 cb(); 26866 } 26867} 26868 26869function leave (vnode, rm) { 26870 var el = vnode.elm; 26871 26872 // call enter callback now 26873 if (isDef(el._enterCb)) { 26874 el._enterCb.cancelled = true; 26875 el._enterCb(); 26876 } 26877 26878 var data = resolveTransition(vnode.data.transition); 26879 if (isUndef(data) || el.nodeType !== 1) { 26880 return rm() 26881 } 26882 26883 /* istanbul ignore if */ 26884 if (isDef(el._leaveCb)) { 26885 return 26886 } 26887 26888 var css = data.css; 26889 var type = data.type; 26890 var leaveClass = data.leaveClass; 26891 var leaveToClass = data.leaveToClass; 26892 var leaveActiveClass = data.leaveActiveClass; 26893 var beforeLeave = data.beforeLeave; 26894 var leave = data.leave; 26895 var afterLeave = data.afterLeave; 26896 var leaveCancelled = data.leaveCancelled; 26897 var delayLeave = data.delayLeave; 26898 var duration = data.duration; 26899 26900 var expectsCSS = css !== false && !isIE9; 26901 var userWantsControl = getHookArgumentsLength(leave); 26902 26903 var explicitLeaveDuration = toNumber( 26904 isObject(duration) 26905 ? duration.leave 26906 : duration 26907 ); 26908 26909 if ( true && isDef(explicitLeaveDuration)) { 26910 checkDuration(explicitLeaveDuration, 'leave', vnode); 26911 } 26912 26913 var cb = el._leaveCb = once(function () { 26914 if (el.parentNode && el.parentNode._pending) { 26915 el.parentNode._pending[vnode.key] = null; 26916 } 26917 if (expectsCSS) { 26918 removeTransitionClass(el, leaveToClass); 26919 removeTransitionClass(el, leaveActiveClass); 26920 } 26921 if (cb.cancelled) { 26922 if (expectsCSS) { 26923 removeTransitionClass(el, leaveClass); 26924 } 26925 leaveCancelled && leaveCancelled(el); 26926 } else { 26927 rm(); 26928 afterLeave && afterLeave(el); 26929 } 26930 el._leaveCb = null; 26931 }); 26932 26933 if (delayLeave) { 26934 delayLeave(performLeave); 26935 } else { 26936 performLeave(); 26937 } 26938 26939 function performLeave () { 26940 // the delayed leave may have already been cancelled 26941 if (cb.cancelled) { 26942 return 26943 } 26944 // record leaving element 26945 if (!vnode.data.show) { 26946 (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode; 26947 } 26948 beforeLeave && beforeLeave(el); 26949 if (expectsCSS) { 26950 addTransitionClass(el, leaveClass); 26951 addTransitionClass(el, leaveActiveClass); 26952 nextFrame(function () { 26953 removeTransitionClass(el, leaveClass); 26954 if (!cb.cancelled) { 26955 addTransitionClass(el, leaveToClass); 26956 if (!userWantsControl) { 26957 if (isValidDuration(explicitLeaveDuration)) { 26958 setTimeout(cb, explicitLeaveDuration); 26959 } else { 26960 whenTransitionEnds(el, type, cb); 26961 } 26962 } 26963 } 26964 }); 26965 } 26966 leave && leave(el, cb); 26967 if (!expectsCSS && !userWantsControl) { 26968 cb(); 26969 } 26970 } 26971} 26972 26973// only used in dev mode 26974function checkDuration (val, name, vnode) { 26975 if (typeof val !== 'number') { 26976 warn( 26977 "<transition> explicit " + name + " duration is not a valid number - " + 26978 "got " + (JSON.stringify(val)) + ".", 26979 vnode.context 26980 ); 26981 } else if (isNaN(val)) { 26982 warn( 26983 "<transition> explicit " + name + " duration is NaN - " + 26984 'the duration expression might be incorrect.', 26985 vnode.context 26986 ); 26987 } 26988} 26989 26990function isValidDuration (val) { 26991 return typeof val === 'number' && !isNaN(val) 26992} 26993 26994/** 26995 * Normalize a transition hook's argument length. The hook may be: 26996 * - a merged hook (invoker) with the original in .fns 26997 * - a wrapped component method (check ._length) 26998 * - a plain function (.length) 26999 */ 27000function getHookArgumentsLength (fn) { 27001 if (isUndef(fn)) { 27002 return false 27003 } 27004 var invokerFns = fn.fns; 27005 if (isDef(invokerFns)) { 27006 // invoker 27007 return getHookArgumentsLength( 27008 Array.isArray(invokerFns) 27009 ? invokerFns[0] 27010 : invokerFns 27011 ) 27012 } else { 27013 return (fn._length || fn.length) > 1 27014 } 27015} 27016 27017function _enter (_, vnode) { 27018 if (vnode.data.show !== true) { 27019 enter(vnode); 27020 } 27021} 27022 27023var transition = inBrowser ? { 27024 create: _enter, 27025 activate: _enter, 27026 remove: function remove$$1 (vnode, rm) { 27027 /* istanbul ignore else */ 27028 if (vnode.data.show !== true) { 27029 leave(vnode, rm); 27030 } else { 27031 rm(); 27032 } 27033 } 27034} : {} 27035 27036var platformModules = [ 27037 attrs, 27038 klass, 27039 events, 27040 domProps, 27041 style, 27042 transition 27043] 27044 27045/* */ 27046 27047// the directive module should be applied last, after all 27048// built-in modules have been applied. 27049var modules = platformModules.concat(baseModules); 27050 27051var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules }); 27052 27053/** 27054 * Not type checking this file because flow doesn't like attaching 27055 * properties to Elements. 27056 */ 27057 27058/* istanbul ignore if */ 27059if (isIE9) { 27060 // http://www.matts411.com/post/internet-explorer-9-oninput/ 27061 document.addEventListener('selectionchange', function () { 27062 var el = document.activeElement; 27063 if (el && el.vmodel) { 27064 trigger(el, 'input'); 27065 } 27066 }); 27067} 27068 27069var directive = { 27070 inserted: function inserted (el, binding, vnode, oldVnode) { 27071 if (vnode.tag === 'select') { 27072 // #6903 27073 if (oldVnode.elm && !oldVnode.elm._vOptions) { 27074 mergeVNodeHook(vnode, 'postpatch', function () { 27075 directive.componentUpdated(el, binding, vnode); 27076 }); 27077 } else { 27078 setSelected(el, binding, vnode.context); 27079 } 27080 el._vOptions = [].map.call(el.options, getValue); 27081 } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) { 27082 el._vModifiers = binding.modifiers; 27083 if (!binding.modifiers.lazy) { 27084 el.addEventListener('compositionstart', onCompositionStart); 27085 el.addEventListener('compositionend', onCompositionEnd); 27086 // Safari < 10.2 & UIWebView doesn't fire compositionend when 27087 // switching focus before confirming composition choice 27088 // this also fixes the issue where some browsers e.g. iOS Chrome 27089 // fires "change" instead of "input" on autocomplete. 27090 el.addEventListener('change', onCompositionEnd); 27091 /* istanbul ignore if */ 27092 if (isIE9) { 27093 el.vmodel = true; 27094 } 27095 } 27096 } 27097 }, 27098 27099 componentUpdated: function componentUpdated (el, binding, vnode) { 27100 if (vnode.tag === 'select') { 27101 setSelected(el, binding, vnode.context); 27102 // in case the options rendered by v-for have changed, 27103 // it's possible that the value is out-of-sync with the rendered options. 27104 // detect such cases and filter out values that no longer has a matching 27105 // option in the DOM. 27106 var prevOptions = el._vOptions; 27107 var curOptions = el._vOptions = [].map.call(el.options, getValue); 27108 if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) { 27109 // trigger change event if 27110 // no matching option found for at least one value 27111 var needReset = el.multiple 27112 ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); }) 27113 : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions); 27114 if (needReset) { 27115 trigger(el, 'change'); 27116 } 27117 } 27118 } 27119 } 27120}; 27121 27122function setSelected (el, binding, vm) { 27123 actuallySetSelected(el, binding, vm); 27124 /* istanbul ignore if */ 27125 if (isIE || isEdge) { 27126 setTimeout(function () { 27127 actuallySetSelected(el, binding, vm); 27128 }, 0); 27129 } 27130} 27131 27132function actuallySetSelected (el, binding, vm) { 27133 var value = binding.value; 27134 var isMultiple = el.multiple; 27135 if (isMultiple && !Array.isArray(value)) { 27136 true && warn( 27137 "<select multiple v-model=\"" + (binding.expression) + "\"> " + 27138 "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)), 27139 vm 27140 ); 27141 return 27142 } 27143 var selected, option; 27144 for (var i = 0, l = el.options.length; i < l; i++) { 27145 option = el.options[i]; 27146 if (isMultiple) { 27147 selected = looseIndexOf(value, getValue(option)) > -1; 27148 if (option.selected !== selected) { 27149 option.selected = selected; 27150 } 27151 } else { 27152 if (looseEqual(getValue(option), value)) { 27153 if (el.selectedIndex !== i) { 27154 el.selectedIndex = i; 27155 } 27156 return 27157 } 27158 } 27159 } 27160 if (!isMultiple) { 27161 el.selectedIndex = -1; 27162 } 27163} 27164 27165function hasNoMatchingOption (value, options) { 27166 return options.every(function (o) { return !looseEqual(o, value); }) 27167} 27168 27169function getValue (option) { 27170 return '_value' in option 27171 ? option._value 27172 : option.value 27173} 27174 27175function onCompositionStart (e) { 27176 e.target.composing = true; 27177} 27178 27179function onCompositionEnd (e) { 27180 // prevent triggering an input event for no reason 27181 if (!e.target.composing) { return } 27182 e.target.composing = false; 27183 trigger(e.target, 'input'); 27184} 27185 27186function trigger (el, type) { 27187 var e = document.createEvent('HTMLEvents'); 27188 e.initEvent(type, true, true); 27189 el.dispatchEvent(e); 27190} 27191 27192/* */ 27193 27194// recursively search for possible transition defined inside the component root 27195function locateNode (vnode) { 27196 return vnode.componentInstance && (!vnode.data || !vnode.data.transition) 27197 ? locateNode(vnode.componentInstance._vnode) 27198 : vnode 27199} 27200 27201var show = { 27202 bind: function bind (el, ref, vnode) { 27203 var value = ref.value; 27204 27205 vnode = locateNode(vnode); 27206 var transition$$1 = vnode.data && vnode.data.transition; 27207 var originalDisplay = el.__vOriginalDisplay = 27208 el.style.display === 'none' ? '' : el.style.display; 27209 if (value && transition$$1) { 27210 vnode.data.show = true; 27211 enter(vnode, function () { 27212 el.style.display = originalDisplay; 27213 }); 27214 } else { 27215 el.style.display = value ? originalDisplay : 'none'; 27216 } 27217 }, 27218 27219 update: function update (el, ref, vnode) { 27220 var value = ref.value; 27221 var oldValue = ref.oldValue; 27222 27223 /* istanbul ignore if */ 27224 if (!value === !oldValue) { return } 27225 vnode = locateNode(vnode); 27226 var transition$$1 = vnode.data && vnode.data.transition; 27227 if (transition$$1) { 27228 vnode.data.show = true; 27229 if (value) { 27230 enter(vnode, function () { 27231 el.style.display = el.__vOriginalDisplay; 27232 }); 27233 } else { 27234 leave(vnode, function () { 27235 el.style.display = 'none'; 27236 }); 27237 } 27238 } else { 27239 el.style.display = value ? el.__vOriginalDisplay : 'none'; 27240 } 27241 }, 27242 27243 unbind: function unbind ( 27244 el, 27245 binding, 27246 vnode, 27247 oldVnode, 27248 isDestroy 27249 ) { 27250 if (!isDestroy) { 27251 el.style.display = el.__vOriginalDisplay; 27252 } 27253 } 27254} 27255 27256var platformDirectives = { 27257 model: directive, 27258 show: show 27259} 27260 27261/* */ 27262 27263// Provides transition support for a single element/component. 27264// supports transition mode (out-in / in-out) 27265 27266var transitionProps = { 27267 name: String, 27268 appear: Boolean, 27269 css: Boolean, 27270 mode: String, 27271 type: String, 27272 enterClass: String, 27273 leaveClass: String, 27274 enterToClass: String, 27275 leaveToClass: String, 27276 enterActiveClass: String, 27277 leaveActiveClass: String, 27278 appearClass: String, 27279 appearActiveClass: String, 27280 appearToClass: String, 27281 duration: [Number, String, Object] 27282}; 27283 27284// in case the child is also an abstract component, e.g. <keep-alive> 27285// we want to recursively retrieve the real component to be rendered 27286function getRealChild (vnode) { 27287 var compOptions = vnode && vnode.componentOptions; 27288 if (compOptions && compOptions.Ctor.options.abstract) { 27289 return getRealChild(getFirstComponentChild(compOptions.children)) 27290 } else { 27291 return vnode 27292 } 27293} 27294 27295function extractTransitionData (comp) { 27296 var data = {}; 27297 var options = comp.$options; 27298 // props 27299 for (var key in options.propsData) { 27300 data[key] = comp[key]; 27301 } 27302 // events. 27303 // extract listeners and pass them directly to the transition methods 27304 var listeners = options._parentListeners; 27305 for (var key$1 in listeners) { 27306 data[camelize(key$1)] = listeners[key$1]; 27307 } 27308 return data 27309} 27310 27311function placeholder (h, rawChild) { 27312 if (/\d-keep-alive$/.test(rawChild.tag)) { 27313 return h('keep-alive', { 27314 props: rawChild.componentOptions.propsData 27315 }) 27316 } 27317} 27318 27319function hasParentTransition (vnode) { 27320 while ((vnode = vnode.parent)) { 27321 if (vnode.data.transition) { 27322 return true 27323 } 27324 } 27325} 27326 27327function isSameChild (child, oldChild) { 27328 return oldChild.key === child.key && oldChild.tag === child.tag 27329} 27330 27331var Transition = { 27332 name: 'transition', 27333 props: transitionProps, 27334 abstract: true, 27335 27336 render: function render (h) { 27337 var this$1 = this; 27338 27339 var children = this.$slots.default; 27340 if (!children) { 27341 return 27342 } 27343 27344 // filter out text nodes (possible whitespaces) 27345 children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); }); 27346 /* istanbul ignore if */ 27347 if (!children.length) { 27348 return 27349 } 27350 27351 // warn multiple elements 27352 if ( true && children.length > 1) { 27353 warn( 27354 '<transition> can only be used on a single element. Use ' + 27355 '<transition-group> for lists.', 27356 this.$parent 27357 ); 27358 } 27359 27360 var mode = this.mode; 27361 27362 // warn invalid mode 27363 if ( true && 27364 mode && mode !== 'in-out' && mode !== 'out-in' 27365 ) { 27366 warn( 27367 'invalid <transition> mode: ' + mode, 27368 this.$parent 27369 ); 27370 } 27371 27372 var rawChild = children[0]; 27373 27374 // if this is a component root node and the component's 27375 // parent container node also has transition, skip. 27376 if (hasParentTransition(this.$vnode)) { 27377 return rawChild 27378 } 27379 27380 // apply transition data to child 27381 // use getRealChild() to ignore abstract components e.g. keep-alive 27382 var child = getRealChild(rawChild); 27383 /* istanbul ignore if */ 27384 if (!child) { 27385 return rawChild 27386 } 27387 27388 if (this._leaving) { 27389 return placeholder(h, rawChild) 27390 } 27391 27392 // ensure a key that is unique to the vnode type and to this transition 27393 // component instance. This key will be used to remove pending leaving nodes 27394 // during entering. 27395 var id = "__transition-" + (this._uid) + "-"; 27396 child.key = child.key == null 27397 ? child.isComment 27398 ? id + 'comment' 27399 : id + child.tag 27400 : isPrimitive(child.key) 27401 ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key) 27402 : child.key; 27403 27404 var data = (child.data || (child.data = {})).transition = extractTransitionData(this); 27405 var oldRawChild = this._vnode; 27406 var oldChild = getRealChild(oldRawChild); 27407 27408 // mark v-show 27409 // so that the transition module can hand over the control to the directive 27410 if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) { 27411 child.data.show = true; 27412 } 27413 27414 if ( 27415 oldChild && 27416 oldChild.data && 27417 !isSameChild(child, oldChild) && 27418 !isAsyncPlaceholder(oldChild) && 27419 // #6687 component root is a comment node 27420 !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment) 27421 ) { 27422 // replace old child transition data with fresh one 27423 // important for dynamic transitions! 27424 var oldData = oldChild.data.transition = extend({}, data); 27425 // handle transition mode 27426 if (mode === 'out-in') { 27427 // return placeholder node and queue update when leave finishes 27428 this._leaving = true; 27429 mergeVNodeHook(oldData, 'afterLeave', function () { 27430 this$1._leaving = false; 27431 this$1.$forceUpdate(); 27432 }); 27433 return placeholder(h, rawChild) 27434 } else if (mode === 'in-out') { 27435 if (isAsyncPlaceholder(child)) { 27436 return oldRawChild 27437 } 27438 var delayedLeave; 27439 var performLeave = function () { delayedLeave(); }; 27440 mergeVNodeHook(data, 'afterEnter', performLeave); 27441 mergeVNodeHook(data, 'enterCancelled', performLeave); 27442 mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; }); 27443 } 27444 } 27445 27446 return rawChild 27447 } 27448} 27449 27450/* */ 27451 27452// Provides transition support for list items. 27453// supports move transitions using the FLIP technique. 27454 27455// Because the vdom's children update algorithm is "unstable" - i.e. 27456// it doesn't guarantee the relative positioning of removed elements, 27457// we force transition-group to update its children into two passes: 27458// in the first pass, we remove all nodes that need to be removed, 27459// triggering their leaving transition; in the second pass, we insert/move 27460// into the final desired state. This way in the second pass removed 27461// nodes will remain where they should be. 27462 27463var props = extend({ 27464 tag: String, 27465 moveClass: String 27466}, transitionProps); 27467 27468delete props.mode; 27469 27470var TransitionGroup = { 27471 props: props, 27472 27473 render: function render (h) { 27474 var tag = this.tag || this.$vnode.data.tag || 'span'; 27475 var map = Object.create(null); 27476 var prevChildren = this.prevChildren = this.children; 27477 var rawChildren = this.$slots.default || []; 27478 var children = this.children = []; 27479 var transitionData = extractTransitionData(this); 27480 27481 for (var i = 0; i < rawChildren.length; i++) { 27482 var c = rawChildren[i]; 27483 if (c.tag) { 27484 if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { 27485 children.push(c); 27486 map[c.key] = c 27487 ;(c.data || (c.data = {})).transition = transitionData; 27488 } else if (true) { 27489 var opts = c.componentOptions; 27490 var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag; 27491 warn(("<transition-group> children must be keyed: <" + name + ">")); 27492 } 27493 } 27494 } 27495 27496 if (prevChildren) { 27497 var kept = []; 27498 var removed = []; 27499 for (var i$1 = 0; i$1 < prevChildren.length; i$1++) { 27500 var c$1 = prevChildren[i$1]; 27501 c$1.data.transition = transitionData; 27502 c$1.data.pos = c$1.elm.getBoundingClientRect(); 27503 if (map[c$1.key]) { 27504 kept.push(c$1); 27505 } else { 27506 removed.push(c$1); 27507 } 27508 } 27509 this.kept = h(tag, null, kept); 27510 this.removed = removed; 27511 } 27512 27513 return h(tag, null, children) 27514 }, 27515 27516 beforeUpdate: function beforeUpdate () { 27517 // force removing pass 27518 this.__patch__( 27519 this._vnode, 27520 this.kept, 27521 false, // hydrating 27522 true // removeOnly (!important, avoids unnecessary moves) 27523 ); 27524 this._vnode = this.kept; 27525 }, 27526 27527 updated: function updated () { 27528 var children = this.prevChildren; 27529 var moveClass = this.moveClass || ((this.name || 'v') + '-move'); 27530 if (!children.length || !this.hasMove(children[0].elm, moveClass)) { 27531 return 27532 } 27533 27534 // we divide the work into three loops to avoid mixing DOM reads and writes 27535 // in each iteration - which helps prevent layout thrashing. 27536 children.forEach(callPendingCbs); 27537 children.forEach(recordPosition); 27538 children.forEach(applyTranslation); 27539 27540 // force reflow to put everything in position 27541 // assign to this to avoid being removed in tree-shaking 27542 // $flow-disable-line 27543 this._reflow = document.body.offsetHeight; 27544 27545 children.forEach(function (c) { 27546 if (c.data.moved) { 27547 var el = c.elm; 27548 var s = el.style; 27549 addTransitionClass(el, moveClass); 27550 s.transform = s.WebkitTransform = s.transitionDuration = ''; 27551 el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) { 27552 if (!e || /transform$/.test(e.propertyName)) { 27553 el.removeEventListener(transitionEndEvent, cb); 27554 el._moveCb = null; 27555 removeTransitionClass(el, moveClass); 27556 } 27557 }); 27558 } 27559 }); 27560 }, 27561 27562 methods: { 27563 hasMove: function hasMove (el, moveClass) { 27564 /* istanbul ignore if */ 27565 if (!hasTransition) { 27566 return false 27567 } 27568 /* istanbul ignore if */ 27569 if (this._hasMove) { 27570 return this._hasMove 27571 } 27572 // Detect whether an element with the move class applied has 27573 // CSS transitions. Since the element may be inside an entering 27574 // transition at this very moment, we make a clone of it and remove 27575 // all other transition classes applied to ensure only the move class 27576 // is applied. 27577 var clone = el.cloneNode(); 27578 if (el._transitionClasses) { 27579 el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); }); 27580 } 27581 addClass(clone, moveClass); 27582 clone.style.display = 'none'; 27583 this.$el.appendChild(clone); 27584 var info = getTransitionInfo(clone); 27585 this.$el.removeChild(clone); 27586 return (this._hasMove = info.hasTransform) 27587 } 27588 } 27589} 27590 27591function callPendingCbs (c) { 27592 /* istanbul ignore if */ 27593 if (c.elm._moveCb) { 27594 c.elm._moveCb(); 27595 } 27596 /* istanbul ignore if */ 27597 if (c.elm._enterCb) { 27598 c.elm._enterCb(); 27599 } 27600} 27601 27602function recordPosition (c) { 27603 c.data.newPos = c.elm.getBoundingClientRect(); 27604} 27605 27606function applyTranslation (c) { 27607 var oldPos = c.data.pos; 27608 var newPos = c.data.newPos; 27609 var dx = oldPos.left - newPos.left; 27610 var dy = oldPos.top - newPos.top; 27611 if (dx || dy) { 27612 c.data.moved = true; 27613 var s = c.elm.style; 27614 s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)"; 27615 s.transitionDuration = '0s'; 27616 } 27617} 27618 27619var platformComponents = { 27620 Transition: Transition, 27621 TransitionGroup: TransitionGroup 27622} 27623 27624/* */ 27625 27626// install platform specific utils 27627Vue.config.mustUseProp = mustUseProp; 27628Vue.config.isReservedTag = isReservedTag; 27629Vue.config.isReservedAttr = isReservedAttr; 27630Vue.config.getTagNamespace = getTagNamespace; 27631Vue.config.isUnknownElement = isUnknownElement; 27632 27633// install platform runtime directives & components 27634extend(Vue.options.directives, platformDirectives); 27635extend(Vue.options.components, platformComponents); 27636 27637// install platform patch function 27638Vue.prototype.__patch__ = inBrowser ? patch : noop; 27639 27640// public mount method 27641Vue.prototype.$mount = function ( 27642 el, 27643 hydrating 27644) { 27645 el = el && inBrowser ? query(el) : undefined; 27646 return mountComponent(this, el, hydrating) 27647}; 27648 27649// devtools global hook 27650/* istanbul ignore next */ 27651if (inBrowser) { 27652 setTimeout(function () { 27653 if (config.devtools) { 27654 if (devtools) { 27655 devtools.emit('init', Vue); 27656 } else if ( 27657 true && 27658 isChrome 27659 ) { 27660 console[console.info ? 'info' : 'log']( 27661 'Download the Vue Devtools extension for a better development experience:\n' + 27662 'https://github.com/vuejs/vue-devtools' 27663 ); 27664 } 27665 } 27666 if ( true && 27667 config.productionTip !== false && 27668 typeof console !== 'undefined' 27669 ) { 27670 console[console.info ? 'info' : 'log']( 27671 "You are running Vue in development mode.\n" + 27672 "Make sure to turn on production mode when deploying for production.\n" + 27673 "See more tips at https://vuejs.org/guide/deployment.html" 27674 ); 27675 } 27676 }, 0); 27677} 27678 27679/* */ 27680 27681var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g; 27682var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; 27683 27684var buildRegex = cached(function (delimiters) { 27685 var open = delimiters[0].replace(regexEscapeRE, '\\$&'); 27686 var close = delimiters[1].replace(regexEscapeRE, '\\$&'); 27687 return new RegExp(open + '((?:.|\\n)+?)' + close, 'g') 27688}); 27689 27690 27691 27692function parseText ( 27693 text, 27694 delimiters 27695) { 27696 var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE; 27697 if (!tagRE.test(text)) { 27698 return 27699 } 27700 var tokens = []; 27701 var rawTokens = []; 27702 var lastIndex = tagRE.lastIndex = 0; 27703 var match, index, tokenValue; 27704 while ((match = tagRE.exec(text))) { 27705 index = match.index; 27706 // push text token 27707 if (index > lastIndex) { 27708 rawTokens.push(tokenValue = text.slice(lastIndex, index)); 27709 tokens.push(JSON.stringify(tokenValue)); 27710 } 27711 // tag token 27712 var exp = parseFilters(match[1].trim()); 27713 tokens.push(("_s(" + exp + ")")); 27714 rawTokens.push({ '@binding': exp }); 27715 lastIndex = index + match[0].length; 27716 } 27717 if (lastIndex < text.length) { 27718 rawTokens.push(tokenValue = text.slice(lastIndex)); 27719 tokens.push(JSON.stringify(tokenValue)); 27720 } 27721 return { 27722 expression: tokens.join('+'), 27723 tokens: rawTokens 27724 } 27725} 27726 27727/* */ 27728 27729function transformNode (el, options) { 27730 var warn = options.warn || baseWarn; 27731 var staticClass = getAndRemoveAttr(el, 'class'); 27732 if ( true && staticClass) { 27733 var res = parseText(staticClass, options.delimiters); 27734 if (res) { 27735 warn( 27736 "class=\"" + staticClass + "\": " + 27737 'Interpolation inside attributes has been removed. ' + 27738 'Use v-bind or the colon shorthand instead. For example, ' + 27739 'instead of <div class="{{ val }}">, use <div :class="val">.' 27740 ); 27741 } 27742 } 27743 if (staticClass) { 27744 el.staticClass = JSON.stringify(staticClass); 27745 } 27746 var classBinding = getBindingAttr(el, 'class', false /* getStatic */); 27747 if (classBinding) { 27748 el.classBinding = classBinding; 27749 } 27750} 27751 27752function genData (el) { 27753 var data = ''; 27754 if (el.staticClass) { 27755 data += "staticClass:" + (el.staticClass) + ","; 27756 } 27757 if (el.classBinding) { 27758 data += "class:" + (el.classBinding) + ","; 27759 } 27760 return data 27761} 27762 27763var klass$1 = { 27764 staticKeys: ['staticClass'], 27765 transformNode: transformNode, 27766 genData: genData 27767} 27768 27769/* */ 27770 27771function transformNode$1 (el, options) { 27772 var warn = options.warn || baseWarn; 27773 var staticStyle = getAndRemoveAttr(el, 'style'); 27774 if (staticStyle) { 27775 /* istanbul ignore if */ 27776 if (true) { 27777 var res = parseText(staticStyle, options.delimiters); 27778 if (res) { 27779 warn( 27780 "style=\"" + staticStyle + "\": " + 27781 'Interpolation inside attributes has been removed. ' + 27782 'Use v-bind or the colon shorthand instead. For example, ' + 27783 'instead of <div style="{{ val }}">, use <div :style="val">.' 27784 ); 27785 } 27786 } 27787 el.staticStyle = JSON.stringify(parseStyleText(staticStyle)); 27788 } 27789 27790 var styleBinding = getBindingAttr(el, 'style', false /* getStatic */); 27791 if (styleBinding) { 27792 el.styleBinding = styleBinding; 27793 } 27794} 27795 27796function genData$1 (el) { 27797 var data = ''; 27798 if (el.staticStyle) { 27799 data += "staticStyle:" + (el.staticStyle) + ","; 27800 } 27801 if (el.styleBinding) { 27802 data += "style:(" + (el.styleBinding) + "),"; 27803 } 27804 return data 27805} 27806 27807var style$1 = { 27808 staticKeys: ['staticStyle'], 27809 transformNode: transformNode$1, 27810 genData: genData$1 27811} 27812 27813/* */ 27814 27815var decoder; 27816 27817var he = { 27818 decode: function decode (html) { 27819 decoder = decoder || document.createElement('div'); 27820 decoder.innerHTML = html; 27821 return decoder.textContent 27822 } 27823} 27824 27825/* */ 27826 27827var isUnaryTag = makeMap( 27828 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + 27829 'link,meta,param,source,track,wbr' 27830); 27831 27832// Elements that you can, intentionally, leave open 27833// (and which close themselves) 27834var canBeLeftOpenTag = makeMap( 27835 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' 27836); 27837 27838// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 27839// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content 27840var isNonPhrasingTag = makeMap( 27841 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + 27842 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + 27843 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + 27844 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + 27845 'title,tr,track' 27846); 27847 27848/** 27849 * Not type-checking this file because it's mostly vendor code. 27850 */ 27851 27852/*! 27853 * HTML Parser By John Resig (ejohn.org) 27854 * Modified by Juriy "kangax" Zaytsev 27855 * Original code by Erik Arvidsson, Mozilla Public License 27856 * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js 27857 */ 27858 27859// Regular Expressions for parsing tags and attributes 27860var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; 27861// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName 27862// but for Vue templates we can enforce a simple charset 27863var ncname = '[a-zA-Z_][\\w\\-\\.]*'; 27864var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; 27865var startTagOpen = new RegExp(("^<" + qnameCapture)); 27866var startTagClose = /^\s*(\/?)>/; 27867var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>")); 27868var doctype = /^<!DOCTYPE [^>]+>/i; 27869// #7298: escape - to avoid being pased as HTML comment when inlined in page 27870var comment = /^<!\--/; 27871var conditionalComment = /^<!\[/; 27872 27873var IS_REGEX_CAPTURING_BROKEN = false; 27874'x'.replace(/x(.)?/g, function (m, g) { 27875 IS_REGEX_CAPTURING_BROKEN = g === ''; 27876}); 27877 27878// Special Elements (can contain anything) 27879var isPlainTextElement = makeMap('script,style,textarea', true); 27880var reCache = {}; 27881 27882var decodingMap = { 27883 '<': '<', 27884 '>': '>', 27885 '"': '"', 27886 '&': '&', 27887 ' ': '\n', 27888 '	': '\t' 27889}; 27890var encodedAttr = /&(?:lt|gt|quot|amp);/g; 27891var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g; 27892 27893// #5992 27894var isIgnoreNewlineTag = makeMap('pre,textarea', true); 27895var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; }; 27896 27897function decodeAttr (value, shouldDecodeNewlines) { 27898 var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr; 27899 return value.replace(re, function (match) { return decodingMap[match]; }) 27900} 27901 27902function parseHTML (html, options) { 27903 var stack = []; 27904 var expectHTML = options.expectHTML; 27905 var isUnaryTag$$1 = options.isUnaryTag || no; 27906 var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no; 27907 var index = 0; 27908 var last, lastTag; 27909 while (html) { 27910 last = html; 27911 // Make sure we're not in a plaintext content element like script/style 27912 if (!lastTag || !isPlainTextElement(lastTag)) { 27913 var textEnd = html.indexOf('<'); 27914 if (textEnd === 0) { 27915 // Comment: 27916 if (comment.test(html)) { 27917 var commentEnd = html.indexOf('-->'); 27918 27919 if (commentEnd >= 0) { 27920 if (options.shouldKeepComment) { 27921 options.comment(html.substring(4, commentEnd)); 27922 } 27923 advance(commentEnd + 3); 27924 continue 27925 } 27926 } 27927 27928 // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment 27929 if (conditionalComment.test(html)) { 27930 var conditionalEnd = html.indexOf(']>'); 27931 27932 if (conditionalEnd >= 0) { 27933 advance(conditionalEnd + 2); 27934 continue 27935 } 27936 } 27937 27938 // Doctype: 27939 var doctypeMatch = html.match(doctype); 27940 if (doctypeMatch) { 27941 advance(doctypeMatch[0].length); 27942 continue 27943 } 27944 27945 // End tag: 27946 var endTagMatch = html.match(endTag); 27947 if (endTagMatch) { 27948 var curIndex = index; 27949 advance(endTagMatch[0].length); 27950 parseEndTag(endTagMatch[1], curIndex, index); 27951 continue 27952 } 27953 27954 // Start tag: 27955 var startTagMatch = parseStartTag(); 27956 if (startTagMatch) { 27957 handleStartTag(startTagMatch); 27958 if (shouldIgnoreFirstNewline(lastTag, html)) { 27959 advance(1); 27960 } 27961 continue 27962 } 27963 } 27964 27965 var text = (void 0), rest = (void 0), next = (void 0); 27966 if (textEnd >= 0) { 27967 rest = html.slice(textEnd); 27968 while ( 27969 !endTag.test(rest) && 27970 !startTagOpen.test(rest) && 27971 !comment.test(rest) && 27972 !conditionalComment.test(rest) 27973 ) { 27974 // < in plain text, be forgiving and treat it as text 27975 next = rest.indexOf('<', 1); 27976 if (next < 0) { break } 27977 textEnd += next; 27978 rest = html.slice(textEnd); 27979 } 27980 text = html.substring(0, textEnd); 27981 advance(textEnd); 27982 } 27983 27984 if (textEnd < 0) { 27985 text = html; 27986 html = ''; 27987 } 27988 27989 if (options.chars && text) { 27990 options.chars(text); 27991 } 27992 } else { 27993 var endTagLength = 0; 27994 var stackedTag = lastTag.toLowerCase(); 27995 var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i')); 27996 var rest$1 = html.replace(reStackedTag, function (all, text, endTag) { 27997 endTagLength = endTag.length; 27998 if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') { 27999 text = text 28000 .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298 28001 .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1'); 28002 } 28003 if (shouldIgnoreFirstNewline(stackedTag, text)) { 28004 text = text.slice(1); 28005 } 28006 if (options.chars) { 28007 options.chars(text); 28008 } 28009 return '' 28010 }); 28011 index += html.length - rest$1.length; 28012 html = rest$1; 28013 parseEndTag(stackedTag, index - endTagLength, index); 28014 } 28015 28016 if (html === last) { 28017 options.chars && options.chars(html); 28018 if ( true && !stack.length && options.warn) { 28019 options.warn(("Mal-formatted tag at end of template: \"" + html + "\"")); 28020 } 28021 break 28022 } 28023 } 28024 28025 // Clean up any remaining tags 28026 parseEndTag(); 28027 28028 function advance (n) { 28029 index += n; 28030 html = html.substring(n); 28031 } 28032 28033 function parseStartTag () { 28034 var start = html.match(startTagOpen); 28035 if (start) { 28036 var match = { 28037 tagName: start[1], 28038 attrs: [], 28039 start: index 28040 }; 28041 advance(start[0].length); 28042 var end, attr; 28043 while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { 28044 advance(attr[0].length); 28045 match.attrs.push(attr); 28046 } 28047 if (end) { 28048 match.unarySlash = end[1]; 28049 advance(end[0].length); 28050 match.end = index; 28051 return match 28052 } 28053 } 28054 } 28055 28056 function handleStartTag (match) { 28057 var tagName = match.tagName; 28058 var unarySlash = match.unarySlash; 28059 28060 if (expectHTML) { 28061 if (lastTag === 'p' && isNonPhrasingTag(tagName)) { 28062 parseEndTag(lastTag); 28063 } 28064 if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) { 28065 parseEndTag(tagName); 28066 } 28067 } 28068 28069 var unary = isUnaryTag$$1(tagName) || !!unarySlash; 28070 28071 var l = match.attrs.length; 28072 var attrs = new Array(l); 28073 for (var i = 0; i < l; i++) { 28074 var args = match.attrs[i]; 28075 // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778 28076 if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) { 28077 if (args[3] === '') { delete args[3]; } 28078 if (args[4] === '') { delete args[4]; } 28079 if (args[5] === '') { delete args[5]; } 28080 } 28081 var value = args[3] || args[4] || args[5] || ''; 28082 var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href' 28083 ? options.shouldDecodeNewlinesForHref 28084 : options.shouldDecodeNewlines; 28085 attrs[i] = { 28086 name: args[1], 28087 value: decodeAttr(value, shouldDecodeNewlines) 28088 }; 28089 } 28090 28091 if (!unary) { 28092 stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs }); 28093 lastTag = tagName; 28094 } 28095 28096 if (options.start) { 28097 options.start(tagName, attrs, unary, match.start, match.end); 28098 } 28099 } 28100 28101 function parseEndTag (tagName, start, end) { 28102 var pos, lowerCasedTagName; 28103 if (start == null) { start = index; } 28104 if (end == null) { end = index; } 28105 28106 if (tagName) { 28107 lowerCasedTagName = tagName.toLowerCase(); 28108 } 28109 28110 // Find the closest opened tag of the same type 28111 if (tagName) { 28112 for (pos = stack.length - 1; pos >= 0; pos--) { 28113 if (stack[pos].lowerCasedTag === lowerCasedTagName) { 28114 break 28115 } 28116 } 28117 } else { 28118 // If no tag name is provided, clean shop 28119 pos = 0; 28120 } 28121 28122 if (pos >= 0) { 28123 // Close all the open elements, up the stack 28124 for (var i = stack.length - 1; i >= pos; i--) { 28125 if ( true && 28126 (i > pos || !tagName) && 28127 options.warn 28128 ) { 28129 options.warn( 28130 ("tag <" + (stack[i].tag) + "> has no matching end tag.") 28131 ); 28132 } 28133 if (options.end) { 28134 options.end(stack[i].tag, start, end); 28135 } 28136 } 28137 28138 // Remove the open elements from the stack 28139 stack.length = pos; 28140 lastTag = pos && stack[pos - 1].tag; 28141 } else if (lowerCasedTagName === 'br') { 28142 if (options.start) { 28143 options.start(tagName, [], true, start, end); 28144 } 28145 } else if (lowerCasedTagName === 'p') { 28146 if (options.start) { 28147 options.start(tagName, [], false, start, end); 28148 } 28149 if (options.end) { 28150 options.end(tagName, start, end); 28151 } 28152 } 28153 } 28154} 28155 28156/* */ 28157 28158var onRE = /^@|^v-on:/; 28159var dirRE = /^v-|^@|^:/; 28160var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/; 28161var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; 28162var stripParensRE = /^\(|\)$/g; 28163 28164var argRE = /:(.*)$/; 28165var bindRE = /^:|^v-bind:/; 28166var modifierRE = /\.[^.]+/g; 28167 28168var decodeHTMLCached = cached(he.decode); 28169 28170// configurable state 28171var warn$2; 28172var delimiters; 28173var transforms; 28174var preTransforms; 28175var postTransforms; 28176var platformIsPreTag; 28177var platformMustUseProp; 28178var platformGetTagNamespace; 28179 28180 28181 28182function createASTElement ( 28183 tag, 28184 attrs, 28185 parent 28186) { 28187 return { 28188 type: 1, 28189 tag: tag, 28190 attrsList: attrs, 28191 attrsMap: makeAttrsMap(attrs), 28192 parent: parent, 28193 children: [] 28194 } 28195} 28196 28197/** 28198 * Convert HTML string to AST. 28199 */ 28200function parse ( 28201 template, 28202 options 28203) { 28204 warn$2 = options.warn || baseWarn; 28205 28206 platformIsPreTag = options.isPreTag || no; 28207 platformMustUseProp = options.mustUseProp || no; 28208 platformGetTagNamespace = options.getTagNamespace || no; 28209 28210 transforms = pluckModuleFunction(options.modules, 'transformNode'); 28211 preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); 28212 postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); 28213 28214 delimiters = options.delimiters; 28215 28216 var stack = []; 28217 var preserveWhitespace = options.preserveWhitespace !== false; 28218 var root; 28219 var currentParent; 28220 var inVPre = false; 28221 var inPre = false; 28222 var warned = false; 28223 28224 function warnOnce (msg) { 28225 if (!warned) { 28226 warned = true; 28227 warn$2(msg); 28228 } 28229 } 28230 28231 function closeElement (element) { 28232 // check pre state 28233 if (element.pre) { 28234 inVPre = false; 28235 } 28236 if (platformIsPreTag(element.tag)) { 28237 inPre = false; 28238 } 28239 // apply post-transforms 28240 for (var i = 0; i < postTransforms.length; i++) { 28241 postTransforms[i](element, options); 28242 } 28243 } 28244 28245 parseHTML(template, { 28246 warn: warn$2, 28247 expectHTML: options.expectHTML, 28248 isUnaryTag: options.isUnaryTag, 28249 canBeLeftOpenTag: options.canBeLeftOpenTag, 28250 shouldDecodeNewlines: options.shouldDecodeNewlines, 28251 shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref, 28252 shouldKeepComment: options.comments, 28253 start: function start (tag, attrs, unary) { 28254 // check namespace. 28255 // inherit parent ns if there is one 28256 var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag); 28257 28258 // handle IE svg bug 28259 /* istanbul ignore if */ 28260 if (isIE && ns === 'svg') { 28261 attrs = guardIESVGBug(attrs); 28262 } 28263 28264 var element = createASTElement(tag, attrs, currentParent); 28265 if (ns) { 28266 element.ns = ns; 28267 } 28268 28269 if (isForbiddenTag(element) && !isServerRendering()) { 28270 element.forbidden = true; 28271 true && warn$2( 28272 'Templates should only be responsible for mapping the state to the ' + 28273 'UI. Avoid placing tags with side-effects in your templates, such as ' + 28274 "<" + tag + ">" + ', as they will not be parsed.' 28275 ); 28276 } 28277 28278 // apply pre-transforms 28279 for (var i = 0; i < preTransforms.length; i++) { 28280 element = preTransforms[i](element, options) || element; 28281 } 28282 28283 if (!inVPre) { 28284 processPre(element); 28285 if (element.pre) { 28286 inVPre = true; 28287 } 28288 } 28289 if (platformIsPreTag(element.tag)) { 28290 inPre = true; 28291 } 28292 if (inVPre) { 28293 processRawAttrs(element); 28294 } else if (!element.processed) { 28295 // structural directives 28296 processFor(element); 28297 processIf(element); 28298 processOnce(element); 28299 // element-scope stuff 28300 processElement(element, options); 28301 } 28302 28303 function checkRootConstraints (el) { 28304 if (true) { 28305 if (el.tag === 'slot' || el.tag === 'template') { 28306 warnOnce( 28307 "Cannot use <" + (el.tag) + "> as component root element because it may " + 28308 'contain multiple nodes.' 28309 ); 28310 } 28311 if (el.attrsMap.hasOwnProperty('v-for')) { 28312 warnOnce( 28313 'Cannot use v-for on stateful component root element because ' + 28314 'it renders multiple elements.' 28315 ); 28316 } 28317 } 28318 } 28319 28320 // tree management 28321 if (!root) { 28322 root = element; 28323 checkRootConstraints(root); 28324 } else if (!stack.length) { 28325 // allow root elements with v-if, v-else-if and v-else 28326 if (root.if && (element.elseif || element.else)) { 28327 checkRootConstraints(element); 28328 addIfCondition(root, { 28329 exp: element.elseif, 28330 block: element 28331 }); 28332 } else if (true) { 28333 warnOnce( 28334 "Component template should contain exactly one root element. " + 28335 "If you are using v-if on multiple elements, " + 28336 "use v-else-if to chain them instead." 28337 ); 28338 } 28339 } 28340 if (currentParent && !element.forbidden) { 28341 if (element.elseif || element.else) { 28342 processIfConditions(element, currentParent); 28343 } else if (element.slotScope) { // scoped slot 28344 currentParent.plain = false; 28345 var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element; 28346 } else { 28347 currentParent.children.push(element); 28348 element.parent = currentParent; 28349 } 28350 } 28351 if (!unary) { 28352 currentParent = element; 28353 stack.push(element); 28354 } else { 28355 closeElement(element); 28356 } 28357 }, 28358 28359 end: function end () { 28360 // remove trailing whitespace 28361 var element = stack[stack.length - 1]; 28362 var lastNode = element.children[element.children.length - 1]; 28363 if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) { 28364 element.children.pop(); 28365 } 28366 // pop stack 28367 stack.length -= 1; 28368 currentParent = stack[stack.length - 1]; 28369 closeElement(element); 28370 }, 28371 28372 chars: function chars (text) { 28373 if (!currentParent) { 28374 if (true) { 28375 if (text === template) { 28376 warnOnce( 28377 'Component template requires a root element, rather than just text.' 28378 ); 28379 } else if ((text = text.trim())) { 28380 warnOnce( 28381 ("text \"" + text + "\" outside root element will be ignored.") 28382 ); 28383 } 28384 } 28385 return 28386 } 28387 // IE textarea placeholder bug 28388 /* istanbul ignore if */ 28389 if (isIE && 28390 currentParent.tag === 'textarea' && 28391 currentParent.attrsMap.placeholder === text 28392 ) { 28393 return 28394 } 28395 var children = currentParent.children; 28396 text = inPre || text.trim() 28397 ? isTextTag(currentParent) ? text : decodeHTMLCached(text) 28398 // only preserve whitespace if its not right after a starting tag 28399 : preserveWhitespace && children.length ? ' ' : ''; 28400 if (text) { 28401 var res; 28402 if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) { 28403 children.push({ 28404 type: 2, 28405 expression: res.expression, 28406 tokens: res.tokens, 28407 text: text 28408 }); 28409 } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') { 28410 children.push({ 28411 type: 3, 28412 text: text 28413 }); 28414 } 28415 } 28416 }, 28417 comment: function comment (text) { 28418 currentParent.children.push({ 28419 type: 3, 28420 text: text, 28421 isComment: true 28422 }); 28423 } 28424 }); 28425 return root 28426} 28427 28428function processPre (el) { 28429 if (getAndRemoveAttr(el, 'v-pre') != null) { 28430 el.pre = true; 28431 } 28432} 28433 28434function processRawAttrs (el) { 28435 var l = el.attrsList.length; 28436 if (l) { 28437 var attrs = el.attrs = new Array(l); 28438 for (var i = 0; i < l; i++) { 28439 attrs[i] = { 28440 name: el.attrsList[i].name, 28441 value: JSON.stringify(el.attrsList[i].value) 28442 }; 28443 } 28444 } else if (!el.pre) { 28445 // non root node in pre blocks with no attributes 28446 el.plain = true; 28447 } 28448} 28449 28450function processElement (element, options) { 28451 processKey(element); 28452 28453 // determine whether this is a plain element after 28454 // removing structural attributes 28455 element.plain = !element.key && !element.attrsList.length; 28456 28457 processRef(element); 28458 processSlot(element); 28459 processComponent(element); 28460 for (var i = 0; i < transforms.length; i++) { 28461 element = transforms[i](element, options) || element; 28462 } 28463 processAttrs(element); 28464} 28465 28466function processKey (el) { 28467 var exp = getBindingAttr(el, 'key'); 28468 if (exp) { 28469 if ( true && el.tag === 'template') { 28470 warn$2("<template> cannot be keyed. Place the key on real elements instead."); 28471 } 28472 el.key = exp; 28473 } 28474} 28475 28476function processRef (el) { 28477 var ref = getBindingAttr(el, 'ref'); 28478 if (ref) { 28479 el.ref = ref; 28480 el.refInFor = checkInFor(el); 28481 } 28482} 28483 28484function processFor (el) { 28485 var exp; 28486 if ((exp = getAndRemoveAttr(el, 'v-for'))) { 28487 var res = parseFor(exp); 28488 if (res) { 28489 extend(el, res); 28490 } else if (true) { 28491 warn$2( 28492 ("Invalid v-for expression: " + exp) 28493 ); 28494 } 28495 } 28496} 28497 28498 28499 28500function parseFor (exp) { 28501 var inMatch = exp.match(forAliasRE); 28502 if (!inMatch) { return } 28503 var res = {}; 28504 res.for = inMatch[2].trim(); 28505 var alias = inMatch[1].trim().replace(stripParensRE, ''); 28506 var iteratorMatch = alias.match(forIteratorRE); 28507 if (iteratorMatch) { 28508 res.alias = alias.replace(forIteratorRE, ''); 28509 res.iterator1 = iteratorMatch[1].trim(); 28510 if (iteratorMatch[2]) { 28511 res.iterator2 = iteratorMatch[2].trim(); 28512 } 28513 } else { 28514 res.alias = alias; 28515 } 28516 return res 28517} 28518 28519function processIf (el) { 28520 var exp = getAndRemoveAttr(el, 'v-if'); 28521 if (exp) { 28522 el.if = exp; 28523 addIfCondition(el, { 28524 exp: exp, 28525 block: el 28526 }); 28527 } else { 28528 if (getAndRemoveAttr(el, 'v-else') != null) { 28529 el.else = true; 28530 } 28531 var elseif = getAndRemoveAttr(el, 'v-else-if'); 28532 if (elseif) { 28533 el.elseif = elseif; 28534 } 28535 } 28536} 28537 28538function processIfConditions (el, parent) { 28539 var prev = findPrevElement(parent.children); 28540 if (prev && prev.if) { 28541 addIfCondition(prev, { 28542 exp: el.elseif, 28543 block: el 28544 }); 28545 } else if (true) { 28546 warn$2( 28547 "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " + 28548 "used on element <" + (el.tag) + "> without corresponding v-if." 28549 ); 28550 } 28551} 28552 28553function findPrevElement (children) { 28554 var i = children.length; 28555 while (i--) { 28556 if (children[i].type === 1) { 28557 return children[i] 28558 } else { 28559 if ( true && children[i].text !== ' ') { 28560 warn$2( 28561 "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " + 28562 "will be ignored." 28563 ); 28564 } 28565 children.pop(); 28566 } 28567 } 28568} 28569 28570function addIfCondition (el, condition) { 28571 if (!el.ifConditions) { 28572 el.ifConditions = []; 28573 } 28574 el.ifConditions.push(condition); 28575} 28576 28577function processOnce (el) { 28578 var once$$1 = getAndRemoveAttr(el, 'v-once'); 28579 if (once$$1 != null) { 28580 el.once = true; 28581 } 28582} 28583 28584function processSlot (el) { 28585 if (el.tag === 'slot') { 28586 el.slotName = getBindingAttr(el, 'name'); 28587 if ( true && el.key) { 28588 warn$2( 28589 "`key` does not work on <slot> because slots are abstract outlets " + 28590 "and can possibly expand into multiple elements. " + 28591 "Use the key on a wrapping element instead." 28592 ); 28593 } 28594 } else { 28595 var slotScope; 28596 if (el.tag === 'template') { 28597 slotScope = getAndRemoveAttr(el, 'scope'); 28598 /* istanbul ignore if */ 28599 if ( true && slotScope) { 28600 warn$2( 28601 "the \"scope\" attribute for scoped slots have been deprecated and " + 28602 "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " + 28603 "can also be used on plain elements in addition to <template> to " + 28604 "denote scoped slots.", 28605 true 28606 ); 28607 } 28608 el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope'); 28609 } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) { 28610 /* istanbul ignore if */ 28611 if ( true && el.attrsMap['v-for']) { 28612 warn$2( 28613 "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " + 28614 "(v-for takes higher priority). Use a wrapper <template> for the " + 28615 "scoped slot to make it clearer.", 28616 true 28617 ); 28618 } 28619 el.slotScope = slotScope; 28620 } 28621 var slotTarget = getBindingAttr(el, 'slot'); 28622 if (slotTarget) { 28623 el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget; 28624 // preserve slot as an attribute for native shadow DOM compat 28625 // only for non-scoped slots. 28626 if (el.tag !== 'template' && !el.slotScope) { 28627 addAttr(el, 'slot', slotTarget); 28628 } 28629 } 28630 } 28631} 28632 28633function processComponent (el) { 28634 var binding; 28635 if ((binding = getBindingAttr(el, 'is'))) { 28636 el.component = binding; 28637 } 28638 if (getAndRemoveAttr(el, 'inline-template') != null) { 28639 el.inlineTemplate = true; 28640 } 28641} 28642 28643function processAttrs (el) { 28644 var list = el.attrsList; 28645 var i, l, name, rawName, value, modifiers, isProp; 28646 for (i = 0, l = list.length; i < l; i++) { 28647 name = rawName = list[i].name; 28648 value = list[i].value; 28649 if (dirRE.test(name)) { 28650 // mark element as dynamic 28651 el.hasBindings = true; 28652 // modifiers 28653 modifiers = parseModifiers(name); 28654 if (modifiers) { 28655 name = name.replace(modifierRE, ''); 28656 } 28657 if (bindRE.test(name)) { // v-bind 28658 name = name.replace(bindRE, ''); 28659 value = parseFilters(value); 28660 isProp = false; 28661 if (modifiers) { 28662 if (modifiers.prop) { 28663 isProp = true; 28664 name = camelize(name); 28665 if (name === 'innerHtml') { name = 'innerHTML'; } 28666 } 28667 if (modifiers.camel) { 28668 name = camelize(name); 28669 } 28670 if (modifiers.sync) { 28671 addHandler( 28672 el, 28673 ("update:" + (camelize(name))), 28674 genAssignmentCode(value, "$event") 28675 ); 28676 } 28677 } 28678 if (isProp || ( 28679 !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name) 28680 )) { 28681 addProp(el, name, value); 28682 } else { 28683 addAttr(el, name, value); 28684 } 28685 } else if (onRE.test(name)) { // v-on 28686 name = name.replace(onRE, ''); 28687 addHandler(el, name, value, modifiers, false, warn$2); 28688 } else { // normal directives 28689 name = name.replace(dirRE, ''); 28690 // parse arg 28691 var argMatch = name.match(argRE); 28692 var arg = argMatch && argMatch[1]; 28693 if (arg) { 28694 name = name.slice(0, -(arg.length + 1)); 28695 } 28696 addDirective(el, name, rawName, value, arg, modifiers); 28697 if ( true && name === 'model') { 28698 checkForAliasModel(el, value); 28699 } 28700 } 28701 } else { 28702 // literal attribute 28703 if (true) { 28704 var res = parseText(value, delimiters); 28705 if (res) { 28706 warn$2( 28707 name + "=\"" + value + "\": " + 28708 'Interpolation inside attributes has been removed. ' + 28709 'Use v-bind or the colon shorthand instead. For example, ' + 28710 'instead of <div id="{{ val }}">, use <div :id="val">.' 28711 ); 28712 } 28713 } 28714 addAttr(el, name, JSON.stringify(value)); 28715 // #6887 firefox doesn't update muted state if set via attribute 28716 // even immediately after element creation 28717 if (!el.component && 28718 name === 'muted' && 28719 platformMustUseProp(el.tag, el.attrsMap.type, name)) { 28720 addProp(el, name, 'true'); 28721 } 28722 } 28723 } 28724} 28725 28726function checkInFor (el) { 28727 var parent = el; 28728 while (parent) { 28729 if (parent.for !== undefined) { 28730 return true 28731 } 28732 parent = parent.parent; 28733 } 28734 return false 28735} 28736 28737function parseModifiers (name) { 28738 var match = name.match(modifierRE); 28739 if (match) { 28740 var ret = {}; 28741 match.forEach(function (m) { ret[m.slice(1)] = true; }); 28742 return ret 28743 } 28744} 28745 28746function makeAttrsMap (attrs) { 28747 var map = {}; 28748 for (var i = 0, l = attrs.length; i < l; i++) { 28749 if ( 28750 true && 28751 map[attrs[i].name] && !isIE && !isEdge 28752 ) { 28753 warn$2('duplicate attribute: ' + attrs[i].name); 28754 } 28755 map[attrs[i].name] = attrs[i].value; 28756 } 28757 return map 28758} 28759 28760// for script (e.g. type="x/template") or style, do not decode content 28761function isTextTag (el) { 28762 return el.tag === 'script' || el.tag === 'style' 28763} 28764 28765function isForbiddenTag (el) { 28766 return ( 28767 el.tag === 'style' || 28768 (el.tag === 'script' && ( 28769 !el.attrsMap.type || 28770 el.attrsMap.type === 'text/javascript' 28771 )) 28772 ) 28773} 28774 28775var ieNSBug = /^xmlns:NS\d+/; 28776var ieNSPrefix = /^NS\d+:/; 28777 28778/* istanbul ignore next */ 28779function guardIESVGBug (attrs) { 28780 var res = []; 28781 for (var i = 0; i < attrs.length; i++) { 28782 var attr = attrs[i]; 28783 if (!ieNSBug.test(attr.name)) { 28784 attr.name = attr.name.replace(ieNSPrefix, ''); 28785 res.push(attr); 28786 } 28787 } 28788 return res 28789} 28790 28791function checkForAliasModel (el, value) { 28792 var _el = el; 28793 while (_el) { 28794 if (_el.for && _el.alias === value) { 28795 warn$2( 28796 "<" + (el.tag) + " v-model=\"" + value + "\">: " + 28797 "You are binding v-model directly to a v-for iteration alias. " + 28798 "This will not be able to modify the v-for source array because " + 28799 "writing to the alias is like modifying a function local variable. " + 28800 "Consider using an array of objects and use v-model on an object property instead." 28801 ); 28802 } 28803 _el = _el.parent; 28804 } 28805} 28806 28807/* */ 28808 28809/** 28810 * Expand input[v-model] with dyanmic type bindings into v-if-else chains 28811 * Turn this: 28812 * <input v-model="data[type]" :type="type"> 28813 * into this: 28814 * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]"> 28815 * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]"> 28816 * <input v-else :type="type" v-model="data[type]"> 28817 */ 28818 28819function preTransformNode (el, options) { 28820 if (el.tag === 'input') { 28821 var map = el.attrsMap; 28822 if (!map['v-model']) { 28823 return 28824 } 28825 28826 var typeBinding; 28827 if (map[':type'] || map['v-bind:type']) { 28828 typeBinding = getBindingAttr(el, 'type'); 28829 } 28830 if (!map.type && !typeBinding && map['v-bind']) { 28831 typeBinding = "(" + (map['v-bind']) + ").type"; 28832 } 28833 28834 if (typeBinding) { 28835 var ifCondition = getAndRemoveAttr(el, 'v-if', true); 28836 var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : ""; 28837 var hasElse = getAndRemoveAttr(el, 'v-else', true) != null; 28838 var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true); 28839 // 1. checkbox 28840 var branch0 = cloneASTElement(el); 28841 // process for on the main node 28842 processFor(branch0); 28843 addRawAttr(branch0, 'type', 'checkbox'); 28844 processElement(branch0, options); 28845 branch0.processed = true; // prevent it from double-processed 28846 branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra; 28847 addIfCondition(branch0, { 28848 exp: branch0.if, 28849 block: branch0 28850 }); 28851 // 2. add radio else-if condition 28852 var branch1 = cloneASTElement(el); 28853 getAndRemoveAttr(branch1, 'v-for', true); 28854 addRawAttr(branch1, 'type', 'radio'); 28855 processElement(branch1, options); 28856 addIfCondition(branch0, { 28857 exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra, 28858 block: branch1 28859 }); 28860 // 3. other 28861 var branch2 = cloneASTElement(el); 28862 getAndRemoveAttr(branch2, 'v-for', true); 28863 addRawAttr(branch2, ':type', typeBinding); 28864 processElement(branch2, options); 28865 addIfCondition(branch0, { 28866 exp: ifCondition, 28867 block: branch2 28868 }); 28869 28870 if (hasElse) { 28871 branch0.else = true; 28872 } else if (elseIfCondition) { 28873 branch0.elseif = elseIfCondition; 28874 } 28875 28876 return branch0 28877 } 28878 } 28879} 28880 28881function cloneASTElement (el) { 28882 return createASTElement(el.tag, el.attrsList.slice(), el.parent) 28883} 28884 28885var model$2 = { 28886 preTransformNode: preTransformNode 28887} 28888 28889var modules$1 = [ 28890 klass$1, 28891 style$1, 28892 model$2 28893] 28894 28895/* */ 28896 28897function text (el, dir) { 28898 if (dir.value) { 28899 addProp(el, 'textContent', ("_s(" + (dir.value) + ")")); 28900 } 28901} 28902 28903/* */ 28904 28905function html (el, dir) { 28906 if (dir.value) { 28907 addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")")); 28908 } 28909} 28910 28911var directives$1 = { 28912 model: model, 28913 text: text, 28914 html: html 28915} 28916 28917/* */ 28918 28919var baseOptions = { 28920 expectHTML: true, 28921 modules: modules$1, 28922 directives: directives$1, 28923 isPreTag: isPreTag, 28924 isUnaryTag: isUnaryTag, 28925 mustUseProp: mustUseProp, 28926 canBeLeftOpenTag: canBeLeftOpenTag, 28927 isReservedTag: isReservedTag, 28928 getTagNamespace: getTagNamespace, 28929 staticKeys: genStaticKeys(modules$1) 28930}; 28931 28932/* */ 28933 28934var isStaticKey; 28935var isPlatformReservedTag; 28936 28937var genStaticKeysCached = cached(genStaticKeys$1); 28938 28939/** 28940 * Goal of the optimizer: walk the generated template AST tree 28941 * and detect sub-trees that are purely static, i.e. parts of 28942 * the DOM that never needs to change. 28943 * 28944 * Once we detect these sub-trees, we can: 28945 * 28946 * 1. Hoist them into constants, so that we no longer need to 28947 * create fresh nodes for them on each re-render; 28948 * 2. Completely skip them in the patching process. 28949 */ 28950function optimize (root, options) { 28951 if (!root) { return } 28952 isStaticKey = genStaticKeysCached(options.staticKeys || ''); 28953 isPlatformReservedTag = options.isReservedTag || no; 28954 // first pass: mark all non-static nodes. 28955 markStatic$1(root); 28956 // second pass: mark static roots. 28957 markStaticRoots(root, false); 28958} 28959 28960function genStaticKeys$1 (keys) { 28961 return makeMap( 28962 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' + 28963 (keys ? ',' + keys : '') 28964 ) 28965} 28966 28967function markStatic$1 (node) { 28968 node.static = isStatic(node); 28969 if (node.type === 1) { 28970 // do not make component slot content static. this avoids 28971 // 1. components not able to mutate slot nodes 28972 // 2. static slot content fails for hot-reloading 28973 if ( 28974 !isPlatformReservedTag(node.tag) && 28975 node.tag !== 'slot' && 28976 node.attrsMap['inline-template'] == null 28977 ) { 28978 return 28979 } 28980 for (var i = 0, l = node.children.length; i < l; i++) { 28981 var child = node.children[i]; 28982 markStatic$1(child); 28983 if (!child.static) { 28984 node.static = false; 28985 } 28986 } 28987 if (node.ifConditions) { 28988 for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { 28989 var block = node.ifConditions[i$1].block; 28990 markStatic$1(block); 28991 if (!block.static) { 28992 node.static = false; 28993 } 28994 } 28995 } 28996 } 28997} 28998 28999function markStaticRoots (node, isInFor) { 29000 if (node.type === 1) { 29001 if (node.static || node.once) { 29002 node.staticInFor = isInFor; 29003 } 29004 // For a node to qualify as a static root, it should have children that 29005 // are not just static text. Otherwise the cost of hoisting out will 29006 // outweigh the benefits and it's better off to just always render it fresh. 29007 if (node.static && node.children.length && !( 29008 node.children.length === 1 && 29009 node.children[0].type === 3 29010 )) { 29011 node.staticRoot = true; 29012 return 29013 } else { 29014 node.staticRoot = false; 29015 } 29016 if (node.children) { 29017 for (var i = 0, l = node.children.length; i < l; i++) { 29018 markStaticRoots(node.children[i], isInFor || !!node.for); 29019 } 29020 } 29021 if (node.ifConditions) { 29022 for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { 29023 markStaticRoots(node.ifConditions[i$1].block, isInFor); 29024 } 29025 } 29026 } 29027} 29028 29029function isStatic (node) { 29030 if (node.type === 2) { // expression 29031 return false 29032 } 29033 if (node.type === 3) { // text 29034 return true 29035 } 29036 return !!(node.pre || ( 29037 !node.hasBindings && // no dynamic bindings 29038 !node.if && !node.for && // not v-if or v-for or v-else 29039 !isBuiltInTag(node.tag) && // not a built-in 29040 isPlatformReservedTag(node.tag) && // not a component 29041 !isDirectChildOfTemplateFor(node) && 29042 Object.keys(node).every(isStaticKey) 29043 )) 29044} 29045 29046function isDirectChildOfTemplateFor (node) { 29047 while (node.parent) { 29048 node = node.parent; 29049 if (node.tag !== 'template') { 29050 return false 29051 } 29052 if (node.for) { 29053 return true 29054 } 29055 } 29056 return false 29057} 29058 29059/* */ 29060 29061var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; 29062var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; 29063 29064// KeyboardEvent.keyCode aliases 29065var keyCodes = { 29066 esc: 27, 29067 tab: 9, 29068 enter: 13, 29069 space: 32, 29070 up: 38, 29071 left: 37, 29072 right: 39, 29073 down: 40, 29074 'delete': [8, 46] 29075}; 29076 29077// KeyboardEvent.key aliases 29078var keyNames = { 29079 esc: 'Escape', 29080 tab: 'Tab', 29081 enter: 'Enter', 29082 space: ' ', 29083 // #7806: IE11 uses key names without `Arrow` prefix for arrow keys. 29084 up: ['Up', 'ArrowUp'], 29085 left: ['Left', 'ArrowLeft'], 29086 right: ['Right', 'ArrowRight'], 29087 down: ['Down', 'ArrowDown'], 29088 'delete': ['Backspace', 'Delete'] 29089}; 29090 29091// #4868: modifiers that prevent the execution of the listener 29092// need to explicitly return null so that we can determine whether to remove 29093// the listener for .once 29094var genGuard = function (condition) { return ("if(" + condition + ")return null;"); }; 29095 29096var modifierCode = { 29097 stop: '$event.stopPropagation();', 29098 prevent: '$event.preventDefault();', 29099 self: genGuard("$event.target !== $event.currentTarget"), 29100 ctrl: genGuard("!$event.ctrlKey"), 29101 shift: genGuard("!$event.shiftKey"), 29102 alt: genGuard("!$event.altKey"), 29103 meta: genGuard("!$event.metaKey"), 29104 left: genGuard("'button' in $event && $event.button !== 0"), 29105 middle: genGuard("'button' in $event && $event.button !== 1"), 29106 right: genGuard("'button' in $event && $event.button !== 2") 29107}; 29108 29109function genHandlers ( 29110 events, 29111 isNative, 29112 warn 29113) { 29114 var res = isNative ? 'nativeOn:{' : 'on:{'; 29115 for (var name in events) { 29116 res += "\"" + name + "\":" + (genHandler(name, events[name])) + ","; 29117 } 29118 return res.slice(0, -1) + '}' 29119} 29120 29121function genHandler ( 29122 name, 29123 handler 29124) { 29125 if (!handler) { 29126 return 'function(){}' 29127 } 29128 29129 if (Array.isArray(handler)) { 29130 return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]") 29131 } 29132 29133 var isMethodPath = simplePathRE.test(handler.value); 29134 var isFunctionExpression = fnExpRE.test(handler.value); 29135 29136 if (!handler.modifiers) { 29137 if (isMethodPath || isFunctionExpression) { 29138 return handler.value 29139 } 29140 /* istanbul ignore if */ 29141 return ("function($event){" + (handler.value) + "}") // inline statement 29142 } else { 29143 var code = ''; 29144 var genModifierCode = ''; 29145 var keys = []; 29146 for (var key in handler.modifiers) { 29147 if (modifierCode[key]) { 29148 genModifierCode += modifierCode[key]; 29149 // left/right 29150 if (keyCodes[key]) { 29151 keys.push(key); 29152 } 29153 } else if (key === 'exact') { 29154 var modifiers = (handler.modifiers); 29155 genModifierCode += genGuard( 29156 ['ctrl', 'shift', 'alt', 'meta'] 29157 .filter(function (keyModifier) { return !modifiers[keyModifier]; }) 29158 .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); }) 29159 .join('||') 29160 ); 29161 } else { 29162 keys.push(key); 29163 } 29164 } 29165 if (keys.length) { 29166 code += genKeyFilter(keys); 29167 } 29168 // Make sure modifiers like prevent and stop get executed after key filtering 29169 if (genModifierCode) { 29170 code += genModifierCode; 29171 } 29172 var handlerCode = isMethodPath 29173 ? ("return " + (handler.value) + "($event)") 29174 : isFunctionExpression 29175 ? ("return (" + (handler.value) + ")($event)") 29176 : handler.value; 29177 /* istanbul ignore if */ 29178 return ("function($event){" + code + handlerCode + "}") 29179 } 29180} 29181 29182function genKeyFilter (keys) { 29183 return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;") 29184} 29185 29186function genFilterCode (key) { 29187 var keyVal = parseInt(key, 10); 29188 if (keyVal) { 29189 return ("$event.keyCode!==" + keyVal) 29190 } 29191 var keyCode = keyCodes[key]; 29192 var keyName = keyNames[key]; 29193 return ( 29194 "_k($event.keyCode," + 29195 (JSON.stringify(key)) + "," + 29196 (JSON.stringify(keyCode)) + "," + 29197 "$event.key," + 29198 "" + (JSON.stringify(keyName)) + 29199 ")" 29200 ) 29201} 29202 29203/* */ 29204 29205function on (el, dir) { 29206 if ( true && dir.modifiers) { 29207 warn("v-on without argument does not support modifiers."); 29208 } 29209 el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); }; 29210} 29211 29212/* */ 29213 29214function bind$1 (el, dir) { 29215 el.wrapData = function (code) { 29216 return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")") 29217 }; 29218} 29219 29220/* */ 29221 29222var baseDirectives = { 29223 on: on, 29224 bind: bind$1, 29225 cloak: noop 29226} 29227 29228/* */ 29229 29230var CodegenState = function CodegenState (options) { 29231 this.options = options; 29232 this.warn = options.warn || baseWarn; 29233 this.transforms = pluckModuleFunction(options.modules, 'transformCode'); 29234 this.dataGenFns = pluckModuleFunction(options.modules, 'genData'); 29235 this.directives = extend(extend({}, baseDirectives), options.directives); 29236 var isReservedTag = options.isReservedTag || no; 29237 this.maybeComponent = function (el) { return !isReservedTag(el.tag); }; 29238 this.onceId = 0; 29239 this.staticRenderFns = []; 29240}; 29241 29242 29243 29244function generate ( 29245 ast, 29246 options 29247) { 29248 var state = new CodegenState(options); 29249 var code = ast ? genElement(ast, state) : '_c("div")'; 29250 return { 29251 render: ("with(this){return " + code + "}"), 29252 staticRenderFns: state.staticRenderFns 29253 } 29254} 29255 29256function genElement (el, state) { 29257 if (el.staticRoot && !el.staticProcessed) { 29258 return genStatic(el, state) 29259 } else if (el.once && !el.onceProcessed) { 29260 return genOnce(el, state) 29261 } else if (el.for && !el.forProcessed) { 29262 return genFor(el, state) 29263 } else if (el.if && !el.ifProcessed) { 29264 return genIf(el, state) 29265 } else if (el.tag === 'template' && !el.slotTarget) { 29266 return genChildren(el, state) || 'void 0' 29267 } else if (el.tag === 'slot') { 29268 return genSlot(el, state) 29269 } else { 29270 // component or element 29271 var code; 29272 if (el.component) { 29273 code = genComponent(el.component, el, state); 29274 } else { 29275 var data = el.plain ? undefined : genData$2(el, state); 29276 29277 var children = el.inlineTemplate ? null : genChildren(el, state, true); 29278 code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")"; 29279 } 29280 // module transforms 29281 for (var i = 0; i < state.transforms.length; i++) { 29282 code = state.transforms[i](el, code); 29283 } 29284 return code 29285 } 29286} 29287 29288// hoist static sub-trees out 29289function genStatic (el, state) { 29290 el.staticProcessed = true; 29291 state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}")); 29292 return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")") 29293} 29294 29295// v-once 29296function genOnce (el, state) { 29297 el.onceProcessed = true; 29298 if (el.if && !el.ifProcessed) { 29299 return genIf(el, state) 29300 } else if (el.staticInFor) { 29301 var key = ''; 29302 var parent = el.parent; 29303 while (parent) { 29304 if (parent.for) { 29305 key = parent.key; 29306 break 29307 } 29308 parent = parent.parent; 29309 } 29310 if (!key) { 29311 true && state.warn( 29312 "v-once can only be used inside v-for that is keyed. " 29313 ); 29314 return genElement(el, state) 29315 } 29316 return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")") 29317 } else { 29318 return genStatic(el, state) 29319 } 29320} 29321 29322function genIf ( 29323 el, 29324 state, 29325 altGen, 29326 altEmpty 29327) { 29328 el.ifProcessed = true; // avoid recursion 29329 return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty) 29330} 29331 29332function genIfConditions ( 29333 conditions, 29334 state, 29335 altGen, 29336 altEmpty 29337) { 29338 if (!conditions.length) { 29339 return altEmpty || '_e()' 29340 } 29341 29342 var condition = conditions.shift(); 29343 if (condition.exp) { 29344 return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty))) 29345 } else { 29346 return ("" + (genTernaryExp(condition.block))) 29347 } 29348 29349 // v-if with v-once should generate code like (a)?_m(0):_m(1) 29350 function genTernaryExp (el) { 29351 return altGen 29352 ? altGen(el, state) 29353 : el.once 29354 ? genOnce(el, state) 29355 : genElement(el, state) 29356 } 29357} 29358 29359function genFor ( 29360 el, 29361 state, 29362 altGen, 29363 altHelper 29364) { 29365 var exp = el.for; 29366 var alias = el.alias; 29367 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; 29368 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; 29369 29370 if ( true && 29371 state.maybeComponent(el) && 29372 el.tag !== 'slot' && 29373 el.tag !== 'template' && 29374 !el.key 29375 ) { 29376 state.warn( 29377 "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " + 29378 "v-for should have explicit keys. " + 29379 "See https://vuejs.org/guide/list.html#key for more info.", 29380 true /* tip */ 29381 ); 29382 } 29383 29384 el.forProcessed = true; // avoid recursion 29385 return (altHelper || '_l') + "((" + exp + ")," + 29386 "function(" + alias + iterator1 + iterator2 + "){" + 29387 "return " + ((altGen || genElement)(el, state)) + 29388 '})' 29389} 29390 29391function genData$2 (el, state) { 29392 var data = '{'; 29393 29394 // directives first. 29395 // directives may mutate the el's other properties before they are generated. 29396 var dirs = genDirectives(el, state); 29397 if (dirs) { data += dirs + ','; } 29398 29399 // key 29400 if (el.key) { 29401 data += "key:" + (el.key) + ","; 29402 } 29403 // ref 29404 if (el.ref) { 29405 data += "ref:" + (el.ref) + ","; 29406 } 29407 if (el.refInFor) { 29408 data += "refInFor:true,"; 29409 } 29410 // pre 29411 if (el.pre) { 29412 data += "pre:true,"; 29413 } 29414 // record original tag name for components using "is" attribute 29415 if (el.component) { 29416 data += "tag:\"" + (el.tag) + "\","; 29417 } 29418 // module data generation functions 29419 for (var i = 0; i < state.dataGenFns.length; i++) { 29420 data += state.dataGenFns[i](el); 29421 } 29422 // attributes 29423 if (el.attrs) { 29424 data += "attrs:{" + (genProps(el.attrs)) + "},"; 29425 } 29426 // DOM props 29427 if (el.props) { 29428 data += "domProps:{" + (genProps(el.props)) + "},"; 29429 } 29430 // event handlers 29431 if (el.events) { 29432 data += (genHandlers(el.events, false, state.warn)) + ","; 29433 } 29434 if (el.nativeEvents) { 29435 data += (genHandlers(el.nativeEvents, true, state.warn)) + ","; 29436 } 29437 // slot target 29438 // only for non-scoped slots 29439 if (el.slotTarget && !el.slotScope) { 29440 data += "slot:" + (el.slotTarget) + ","; 29441 } 29442 // scoped slots 29443 if (el.scopedSlots) { 29444 data += (genScopedSlots(el.scopedSlots, state)) + ","; 29445 } 29446 // component v-model 29447 if (el.model) { 29448 data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},"; 29449 } 29450 // inline-template 29451 if (el.inlineTemplate) { 29452 var inlineTemplate = genInlineTemplate(el, state); 29453 if (inlineTemplate) { 29454 data += inlineTemplate + ","; 29455 } 29456 } 29457 data = data.replace(/,$/, '') + '}'; 29458 // v-bind data wrap 29459 if (el.wrapData) { 29460 data = el.wrapData(data); 29461 } 29462 // v-on data wrap 29463 if (el.wrapListeners) { 29464 data = el.wrapListeners(data); 29465 } 29466 return data 29467} 29468 29469function genDirectives (el, state) { 29470 var dirs = el.directives; 29471 if (!dirs) { return } 29472 var res = 'directives:['; 29473 var hasRuntime = false; 29474 var i, l, dir, needRuntime; 29475 for (i = 0, l = dirs.length; i < l; i++) { 29476 dir = dirs[i]; 29477 needRuntime = true; 29478 var gen = state.directives[dir.name]; 29479 if (gen) { 29480 // compile-time directive that manipulates AST. 29481 // returns true if it also needs a runtime counterpart. 29482 needRuntime = !!gen(el, dir, state.warn); 29483 } 29484 if (needRuntime) { 29485 hasRuntime = true; 29486 res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},"; 29487 } 29488 } 29489 if (hasRuntime) { 29490 return res.slice(0, -1) + ']' 29491 } 29492} 29493 29494function genInlineTemplate (el, state) { 29495 var ast = el.children[0]; 29496 if ( true && ( 29497 el.children.length !== 1 || ast.type !== 1 29498 )) { 29499 state.warn('Inline-template components must have exactly one child element.'); 29500 } 29501 if (ast.type === 1) { 29502 var inlineRenderFns = generate(ast, state.options); 29503 return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}") 29504 } 29505} 29506 29507function genScopedSlots ( 29508 slots, 29509 state 29510) { 29511 return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) { 29512 return genScopedSlot(key, slots[key], state) 29513 }).join(',')) + "])") 29514} 29515 29516function genScopedSlot ( 29517 key, 29518 el, 29519 state 29520) { 29521 if (el.for && !el.forProcessed) { 29522 return genForScopedSlot(key, el, state) 29523 } 29524 var fn = "function(" + (String(el.slotScope)) + "){" + 29525 "return " + (el.tag === 'template' 29526 ? el.if 29527 ? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined") 29528 : genChildren(el, state) || 'undefined' 29529 : genElement(el, state)) + "}"; 29530 return ("{key:" + key + ",fn:" + fn + "}") 29531} 29532 29533function genForScopedSlot ( 29534 key, 29535 el, 29536 state 29537) { 29538 var exp = el.for; 29539 var alias = el.alias; 29540 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; 29541 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; 29542 el.forProcessed = true; // avoid recursion 29543 return "_l((" + exp + ")," + 29544 "function(" + alias + iterator1 + iterator2 + "){" + 29545 "return " + (genScopedSlot(key, el, state)) + 29546 '})' 29547} 29548 29549function genChildren ( 29550 el, 29551 state, 29552 checkSkip, 29553 altGenElement, 29554 altGenNode 29555) { 29556 var children = el.children; 29557 if (children.length) { 29558 var el$1 = children[0]; 29559 // optimize single v-for 29560 if (children.length === 1 && 29561 el$1.for && 29562 el$1.tag !== 'template' && 29563 el$1.tag !== 'slot' 29564 ) { 29565 return (altGenElement || genElement)(el$1, state) 29566 } 29567 var normalizationType = checkSkip 29568 ? getNormalizationType(children, state.maybeComponent) 29569 : 0; 29570 var gen = altGenNode || genNode; 29571 return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : '')) 29572 } 29573} 29574 29575// determine the normalization needed for the children array. 29576// 0: no normalization needed 29577// 1: simple normalization needed (possible 1-level deep nested array) 29578// 2: full normalization needed 29579function getNormalizationType ( 29580 children, 29581 maybeComponent 29582) { 29583 var res = 0; 29584 for (var i = 0; i < children.length; i++) { 29585 var el = children[i]; 29586 if (el.type !== 1) { 29587 continue 29588 } 29589 if (needsNormalization(el) || 29590 (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) { 29591 res = 2; 29592 break 29593 } 29594 if (maybeComponent(el) || 29595 (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) { 29596 res = 1; 29597 } 29598 } 29599 return res 29600} 29601 29602function needsNormalization (el) { 29603 return el.for !== undefined || el.tag === 'template' || el.tag === 'slot' 29604} 29605 29606function genNode (node, state) { 29607 if (node.type === 1) { 29608 return genElement(node, state) 29609 } if (node.type === 3 && node.isComment) { 29610 return genComment(node) 29611 } else { 29612 return genText(node) 29613 } 29614} 29615 29616function genText (text) { 29617 return ("_v(" + (text.type === 2 29618 ? text.expression // no need for () because already wrapped in _s() 29619 : transformSpecialNewlines(JSON.stringify(text.text))) + ")") 29620} 29621 29622function genComment (comment) { 29623 return ("_e(" + (JSON.stringify(comment.text)) + ")") 29624} 29625 29626function genSlot (el, state) { 29627 var slotName = el.slotName || '"default"'; 29628 var children = genChildren(el, state); 29629 var res = "_t(" + slotName + (children ? ("," + children) : ''); 29630 var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}"); 29631 var bind$$1 = el.attrsMap['v-bind']; 29632 if ((attrs || bind$$1) && !children) { 29633 res += ",null"; 29634 } 29635 if (attrs) { 29636 res += "," + attrs; 29637 } 29638 if (bind$$1) { 29639 res += (attrs ? '' : ',null') + "," + bind$$1; 29640 } 29641 return res + ')' 29642} 29643 29644// componentName is el.component, take it as argument to shun flow's pessimistic refinement 29645function genComponent ( 29646 componentName, 29647 el, 29648 state 29649) { 29650 var children = el.inlineTemplate ? null : genChildren(el, state, true); 29651 return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")") 29652} 29653 29654function genProps (props) { 29655 var res = ''; 29656 for (var i = 0; i < props.length; i++) { 29657 var prop = props[i]; 29658 /* istanbul ignore if */ 29659 { 29660 res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ","; 29661 } 29662 } 29663 return res.slice(0, -1) 29664} 29665 29666// #3895, #4268 29667function transformSpecialNewlines (text) { 29668 return text 29669 .replace(/\u2028/g, '\\u2028') 29670 .replace(/\u2029/g, '\\u2029') 29671} 29672 29673/* */ 29674 29675// these keywords should not appear inside expressions, but operators like 29676// typeof, instanceof and in are allowed 29677var prohibitedKeywordRE = new RegExp('\\b' + ( 29678 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + 29679 'super,throw,while,yield,delete,export,import,return,switch,default,' + 29680 'extends,finally,continue,debugger,function,arguments' 29681).split(',').join('\\b|\\b') + '\\b'); 29682 29683// these unary operators should not be used as property/method names 29684var unaryOperatorsRE = new RegExp('\\b' + ( 29685 'delete,typeof,void' 29686).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)'); 29687 29688// strip strings in expressions 29689var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; 29690 29691// detect problematic expressions in a template 29692function detectErrors (ast) { 29693 var errors = []; 29694 if (ast) { 29695 checkNode(ast, errors); 29696 } 29697 return errors 29698} 29699 29700function checkNode (node, errors) { 29701 if (node.type === 1) { 29702 for (var name in node.attrsMap) { 29703 if (dirRE.test(name)) { 29704 var value = node.attrsMap[name]; 29705 if (value) { 29706 if (name === 'v-for') { 29707 checkFor(node, ("v-for=\"" + value + "\""), errors); 29708 } else if (onRE.test(name)) { 29709 checkEvent(value, (name + "=\"" + value + "\""), errors); 29710 } else { 29711 checkExpression(value, (name + "=\"" + value + "\""), errors); 29712 } 29713 } 29714 } 29715 } 29716 if (node.children) { 29717 for (var i = 0; i < node.children.length; i++) { 29718 checkNode(node.children[i], errors); 29719 } 29720 } 29721 } else if (node.type === 2) { 29722 checkExpression(node.expression, node.text, errors); 29723 } 29724} 29725 29726function checkEvent (exp, text, errors) { 29727 var stipped = exp.replace(stripStringRE, ''); 29728 var keywordMatch = stipped.match(unaryOperatorsRE); 29729 if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { 29730 errors.push( 29731 "avoid using JavaScript unary operator as property name: " + 29732 "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()) 29733 ); 29734 } 29735 checkExpression(exp, text, errors); 29736} 29737 29738function checkFor (node, text, errors) { 29739 checkExpression(node.for || '', text, errors); 29740 checkIdentifier(node.alias, 'v-for alias', text, errors); 29741 checkIdentifier(node.iterator1, 'v-for iterator', text, errors); 29742 checkIdentifier(node.iterator2, 'v-for iterator', text, errors); 29743} 29744 29745function checkIdentifier ( 29746 ident, 29747 type, 29748 text, 29749 errors 29750) { 29751 if (typeof ident === 'string') { 29752 try { 29753 new Function(("var " + ident + "=_")); 29754 } catch (e) { 29755 errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim()))); 29756 } 29757 } 29758} 29759 29760function checkExpression (exp, text, errors) { 29761 try { 29762 new Function(("return " + exp)); 29763 } catch (e) { 29764 var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE); 29765 if (keywordMatch) { 29766 errors.push( 29767 "avoid using JavaScript keyword as property name: " + 29768 "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()) 29769 ); 29770 } else { 29771 errors.push( 29772 "invalid expression: " + (e.message) + " in\n\n" + 29773 " " + exp + "\n\n" + 29774 " Raw expression: " + (text.trim()) + "\n" 29775 ); 29776 } 29777 } 29778} 29779 29780/* */ 29781 29782function createFunction (code, errors) { 29783 try { 29784 return new Function(code) 29785 } catch (err) { 29786 errors.push({ err: err, code: code }); 29787 return noop 29788 } 29789} 29790 29791function createCompileToFunctionFn (compile) { 29792 var cache = Object.create(null); 29793 29794 return function compileToFunctions ( 29795 template, 29796 options, 29797 vm 29798 ) { 29799 options = extend({}, options); 29800 var warn$$1 = options.warn || warn; 29801 delete options.warn; 29802 29803 /* istanbul ignore if */ 29804 if (true) { 29805 // detect possible CSP restriction 29806 try { 29807 new Function('return 1'); 29808 } catch (e) { 29809 if (e.toString().match(/unsafe-eval|CSP/)) { 29810 warn$$1( 29811 'It seems you are using the standalone build of Vue.js in an ' + 29812 'environment with Content Security Policy that prohibits unsafe-eval. ' + 29813 'The template compiler cannot work in this environment. Consider ' + 29814 'relaxing the policy to allow unsafe-eval or pre-compiling your ' + 29815 'templates into render functions.' 29816 ); 29817 } 29818 } 29819 } 29820 29821 // check cache 29822 var key = options.delimiters 29823 ? String(options.delimiters) + template 29824 : template; 29825 if (cache[key]) { 29826 return cache[key] 29827 } 29828 29829 // compile 29830 var compiled = compile(template, options); 29831 29832 // check compilation errors/tips 29833 if (true) { 29834 if (compiled.errors && compiled.errors.length) { 29835 warn$$1( 29836 "Error compiling template:\n\n" + template + "\n\n" + 29837 compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n', 29838 vm 29839 ); 29840 } 29841 if (compiled.tips && compiled.tips.length) { 29842 compiled.tips.forEach(function (msg) { return tip(msg, vm); }); 29843 } 29844 } 29845 29846 // turn code into functions 29847 var res = {}; 29848 var fnGenErrors = []; 29849 res.render = createFunction(compiled.render, fnGenErrors); 29850 res.staticRenderFns = compiled.staticRenderFns.map(function (code) { 29851 return createFunction(code, fnGenErrors) 29852 }); 29853 29854 // check function generation errors. 29855 // this should only happen if there is a bug in the compiler itself. 29856 // mostly for codegen development use 29857 /* istanbul ignore if */ 29858 if (true) { 29859 if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) { 29860 warn$$1( 29861 "Failed to generate render function:\n\n" + 29862 fnGenErrors.map(function (ref) { 29863 var err = ref.err; 29864 var code = ref.code; 29865 29866 return ((err.toString()) + " in\n\n" + code + "\n"); 29867 }).join('\n'), 29868 vm 29869 ); 29870 } 29871 } 29872 29873 return (cache[key] = res) 29874 } 29875} 29876 29877/* */ 29878 29879function createCompilerCreator (baseCompile) { 29880 return function createCompiler (baseOptions) { 29881 function compile ( 29882 template, 29883 options 29884 ) { 29885 var finalOptions = Object.create(baseOptions); 29886 var errors = []; 29887 var tips = []; 29888 finalOptions.warn = function (msg, tip) { 29889 (tip ? tips : errors).push(msg); 29890 }; 29891 29892 if (options) { 29893 // merge custom modules 29894 if (options.modules) { 29895 finalOptions.modules = 29896 (baseOptions.modules || []).concat(options.modules); 29897 } 29898 // merge custom directives 29899 if (options.directives) { 29900 finalOptions.directives = extend( 29901 Object.create(baseOptions.directives || null), 29902 options.directives 29903 ); 29904 } 29905 // copy other options 29906 for (var key in options) { 29907 if (key !== 'modules' && key !== 'directives') { 29908 finalOptions[key] = options[key]; 29909 } 29910 } 29911 } 29912 29913 var compiled = baseCompile(template, finalOptions); 29914 if (true) { 29915 errors.push.apply(errors, detectErrors(compiled.ast)); 29916 } 29917 compiled.errors = errors; 29918 compiled.tips = tips; 29919 return compiled 29920 } 29921 29922 return { 29923 compile: compile, 29924 compileToFunctions: createCompileToFunctionFn(compile) 29925 } 29926 } 29927} 29928 29929/* */ 29930 29931// `createCompilerCreator` allows creating compilers that use alternative 29932// parser/optimizer/codegen, e.g the SSR optimizing compiler. 29933// Here we just export a default compiler using the default parts. 29934var createCompiler = createCompilerCreator(function baseCompile ( 29935 template, 29936 options 29937) { 29938 var ast = parse(template.trim(), options); 29939 if (options.optimize !== false) { 29940 optimize(ast, options); 29941 } 29942 var code = generate(ast, options); 29943 return { 29944 ast: ast, 29945 render: code.render, 29946 staticRenderFns: code.staticRenderFns 29947 } 29948}); 29949 29950/* */ 29951 29952var ref$1 = createCompiler(baseOptions); 29953var compileToFunctions = ref$1.compileToFunctions; 29954 29955/* */ 29956 29957// check whether current browser encodes a char inside attribute values 29958var div; 29959function getShouldDecode (href) { 29960 div = div || document.createElement('div'); 29961 div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>"; 29962 return div.innerHTML.indexOf(' ') > 0 29963} 29964 29965// #3663: IE encodes newlines inside attribute values while other browsers don't 29966var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false; 29967// #6828: chrome encodes content in a[href] 29968var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false; 29969 29970/* */ 29971 29972var idToTemplate = cached(function (id) { 29973 var el = query(id); 29974 return el && el.innerHTML 29975}); 29976 29977var mount = Vue.prototype.$mount; 29978Vue.prototype.$mount = function ( 29979 el, 29980 hydrating 29981) { 29982 el = el && query(el); 29983 29984 /* istanbul ignore if */ 29985 if (el === document.body || el === document.documentElement) { 29986 true && warn( 29987 "Do not mount Vue to <html> or <body> - mount to normal elements instead." 29988 ); 29989 return this 29990 } 29991 29992 var options = this.$options; 29993 // resolve template/el and convert to render function 29994 if (!options.render) { 29995 var template = options.template; 29996 if (template) { 29997 if (typeof template === 'string') { 29998 if (template.charAt(0) === '#') { 29999 template = idToTemplate(template); 30000 /* istanbul ignore if */ 30001 if ( true && !template) { 30002 warn( 30003 ("Template element not found or is empty: " + (options.template)), 30004 this 30005 ); 30006 } 30007 } 30008 } else if (template.nodeType) { 30009 template = template.innerHTML; 30010 } else { 30011 if (true) { 30012 warn('invalid template option:' + template, this); 30013 } 30014 return this 30015 } 30016 } else if (el) { 30017 template = getOuterHTML(el); 30018 } 30019 if (template) { 30020 /* istanbul ignore if */ 30021 if ( true && config.performance && mark) { 30022 mark('compile'); 30023 } 30024 30025 var ref = compileToFunctions(template, { 30026 shouldDecodeNewlines: shouldDecodeNewlines, 30027 shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref, 30028 delimiters: options.delimiters, 30029 comments: options.comments 30030 }, this); 30031 var render = ref.render; 30032 var staticRenderFns = ref.staticRenderFns; 30033 options.render = render; 30034 options.staticRenderFns = staticRenderFns; 30035 30036 /* istanbul ignore if */ 30037 if ( true && config.performance && mark) { 30038 mark('compile end'); 30039 measure(("vue " + (this._name) + " compile"), 'compile', 'compile end'); 30040 } 30041 } 30042 } 30043 return mount.call(this, el, hydrating) 30044}; 30045 30046/** 30047 * Get outerHTML of elements, taking care 30048 * of SVG elements in IE as well. 30049 */ 30050function getOuterHTML (el) { 30051 if (el.outerHTML) { 30052 return el.outerHTML 30053 } else { 30054 var container = document.createElement('div'); 30055 container.appendChild(el.cloneNode(true)); 30056 return container.innerHTML 30057 } 30058} 30059 30060Vue.compile = compileToFunctions; 30061 30062/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Vue); 30063 30064 30065/***/ })
vendor: 4,995 bytes, lines 30065-30200
30065 30066 30067/******/ }); 30068/************************************************************************/ 30069/******/ // The module cache 30070/******/ var __webpack_module_cache__ = {}; 30071/******/ 30072/******/ // The require function 30073/******/ function __webpack_require__(moduleId) { 30074/******/ // Check if module is in cache 30075/******/ var cachedModule = __webpack_module_cache__[moduleId]; 30076/******/ if (cachedModule !== undefined) { 30077/******/ return cachedModule.exports; 30078/******/ } 30079/******/ // Create a new module (and put it into the cache) 30080/******/ var module = __webpack_module_cache__[moduleId] = { 30081/******/ id: moduleId, 30082/******/ // no module.loaded needed 30083/******/ exports: {} 30084/******/ }; 30085/******/ 30086/******/ // Execute the module function 30087/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 30088/******/ 30089/******/ // Return the exports of the module 30090/******/ return module.exports; 30091/******/ } 30092/******/ 30093/************************************************************************/ 30094/******/ /* webpack/runtime/compat get default export */ 30095/******/ (() => { 30096/******/ // getDefaultExport function for compatibility with non-harmony modules 30097/******/ __webpack_require__.n = (module) => { 30098/******/ var getter = module && module.__esModule ? 30099/******/ () => (module['default']) : 30100/******/ () => (module); 30101/******/ __webpack_require__.d(getter, { a: getter }); 30102/******/ return getter; 30103/******/ }; 30104/******/ })(); 30105/******/ 30106/******/ /* webpack/runtime/define property getters */ 30107/******/ (() => { 30108/******/ // define getter functions for harmony exports 30109/******/ __webpack_require__.d = (exports, definition) => { 30110/******/ for(var key in definition) { 30111/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 30112/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 30113/******/ } 30114/******/ } 30115/******/ }; 30116/******/ })(); 30117/******/ 30118/******/ /* webpack/runtime/global */ 30119/******/ (() => { 30120/******/ __webpack_require__.g = (function() { 30121/******/ if (typeof globalThis === 'object') return globalThis; 30122/******/ try { 30123/******/ return this || new Function('return this')(); 30124/******/ } catch (e) { 30125/******/ if (typeof window === 'object') return window; 30126/******/ } 30127/******/ })(); 30128/******/ })(); 30129/******/ 30130/******/ /* webpack/runtime/hasOwnProperty shorthand */ 30131/******/ (() => { 30132/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 30133/******/ })(); 30134/******/ 30135/******/ /* webpack/runtime/make namespace object */ 30136/******/ (() => { 30137/******/ // define __esModule on exports 30138/******/ __webpack_require__.r = (exports) => { 30139/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 30140/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 30141/******/ } 30142/******/ Object.defineProperty(exports, '__esModule', { value: true }); 30143/******/ }; 30144/******/ })(); 30145/******/ 30146/******/ /* webpack/runtime/nonce */ 30147/******/ (() => { 30148/******/ __webpack_require__.nc = undefined; 30149/******/ })(); 30150/******/ 30151/************************************************************************/ 30152var __webpack_exports__ = {}; 30153// This entry need to be wrapped in an IIFE because it need to be in strict mode. 30154(() => { 30155"use strict"; 30156/*!**************************************!*\ 30157 !*** ./resources/assets/js/store.js ***! 30158 \**************************************/ 30159__webpack_require__.r(__webpack_exports__); 30160/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm.js"); 30161/* harmony import */ var _desktop_components_Store_Desktop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./desktop/components/Store/Desktop */ "./resources/assets/js/desktop/components/Store/Desktop.vue"); 30162__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm.js"); 30163 30164window.Vue = vue__WEBPACK_IMPORTED_MODULE_0__["default"]; 30165 30166new vue__WEBPACK_IMPORTED_MODULE_0__["default"]({ 30167 el: '#store', 30168 components: { 30169 desktop: _desktop_components_Store_Desktop__WEBPACK_IMPORTED_MODULE_1__["default"] 30170 } 30171}); 30172 30173//let upButton = document.querySelector('.up-button'); 30174//if(upButton) { 30175// window.addEventListener('scroll', () => { 30176// if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { 30177// upButton.style.display = 'block'; 30178// } else { 30179// upButton.style.display = 'none'; 30180// } 30181// }); 30182// 30183// upButton.addEventListener('click', () => { 30184// let upProgress = setInterval(() => { 30185// if (window.pageYOffset === 0) { 30186// clearInterval(upProgress); 30187// } 30188// 30189// window.scroll(0, window.pageYOffset - 100); 30190// }, 10); 30191// }); 30192//} 30193 30194vue__WEBPACK_IMPORTED_MODULE_0__["default"].config.devtools = true; 30195vue__WEBPACK_IMPORTED_MODULE_0__["default"].config.debug = true; 30196vue__WEBPACK_IMPORTED_MODULE_0__["default"].config.silent = true; 30197})(); 30198 30199/******/ })() 30200;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.