| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | -/******/ "use strict"; | |
| 3 | 2 | /******/ var __webpack_modules__ = ({ |
| 4 | 3 | |
| 5 | 4 | /***/ "./assets/src/js/admin/init-tom-select.js" |
| 6 | 5 | /*!************************************************!*\ |
| @@ -7,8 +6,9 @@ | ||
| 7 | 6 | !*** ./assets/src/js/admin/init-tom-select.js ***! |
| 8 | 7 | \************************************************/ |
| 9 | 8 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 10 | 9 | |
| 10 | +"use strict"; | |
| 11 | 11 | __webpack_require__.r(__webpack_exports__); |
| 12 | 12 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13 | 13 | /* harmony export */ initElsTomSelect: () => (/* binding */ initElsTomSelect), |
| 14 | 14 | /* harmony export */ initTomSelect: () => (/* binding */ initTomSelect), |
| @@ -16,17 +16,17 @@ | ||
| 16 | 16 | /* harmony export */ }); |
| 17 | 17 | /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js"); |
| 18 | 18 | |
| 19 | 19 | |
| 20 | -/** | |
| 21 | - * Handle data response from API for tom-select | |
| 22 | - * | |
| 23 | - * @param {*} response | |
| 24 | - * @param {*} tomSelectEl | |
| 25 | - * @param dataStruct | |
| 26 | - * @param fetchAPI | |
| 27 | - * @param customOptions | |
| 28 | - * @param {*} callBack | |
| 20 | +/** | |
| 21 | + * Handle data response from API for tom-select | |
| 22 | + * | |
| 23 | + * @param {*} response | |
| 24 | + * @param {*} tomSelectEl | |
| 25 | + * @param dataStruct | |
| 26 | + * @param fetchAPI | |
| 27 | + * @param customOptions | |
| 28 | + * @param {*} callBack | |
| 29 | 29 | */ |
| 30 | 30 | const handleResponse = (response, tomSelectEl, dataStruct, fetchAPI, customOptions = {}, callBack) => { |
| 31 | 31 | if (!response || !tomSelectEl || !dataStruct || !fetchAPI || !callBack) { |
| 32 | 32 | return; |
| @@ -250,8 +250,319 @@ | ||
| 250 | 250 | |
| 251 | 251 | |
| 252 | 252 | /***/ }, |
| 253 | 253 | |
| 254 | +/***/ "./assets/src/js/admin/share/dropdown-pages.js" | |
| 255 | +/*!*****************************************************!*\ | |
| 256 | + !*** ./assets/src/js/admin/share/dropdown-pages.js ***! | |
| 257 | + \*****************************************************/ | |
| 258 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 259 | + | |
| 260 | +"use strict"; | |
| 261 | +__webpack_require__.r(__webpack_exports__); | |
| 262 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 263 | +/* harmony export */ DropdownPages: () => (/* binding */ DropdownPages) | |
| 264 | +/* harmony export */ }); | |
| 265 | +/* harmony import */ var lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lpAssetsJsPath/utils.js */ "./assets/src/js/utils.js"); | |
| 266 | +/* harmony import */ var lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lpAssetsJsPath/lpToastify.js */ "./assets/src/js/lpToastify.js"); | |
| 267 | +/** | |
| 268 | + * Dropdown Pages | |
| 269 | + * | |
| 270 | + * @since 4.2.5.1 | |
| 271 | + * @version 1.0.0 | |
| 272 | + */ | |
| 273 | + | |
| 274 | + | |
| 275 | +class DropdownPages { | |
| 276 | + static selectors = { | |
| 277 | + elDropdown: '.learn-press-dropdown-pages', | |
| 278 | + elSelect: 'select', | |
| 279 | + elListWrap: '.list-pages-wrapper', | |
| 280 | + elActions: '.quick-add-page-actions', | |
| 281 | + elForm: '.quick-add-page-inline', | |
| 282 | + elButtonQuickAdd: '.button-quick-add-page', | |
| 283 | + elInput: '.quick-add-page-inline input[type="text"]', | |
| 284 | + elButtonSubmit: '.quick-add-page-inline button', | |
| 285 | + elButtonCancel: '.quick-add-page-inline a' | |
| 286 | + }; | |
| 287 | + constructor() { | |
| 288 | + this.elDropdowns = []; | |
| 289 | + } | |
| 290 | + init() { | |
| 291 | + this.elDropdowns = document.querySelectorAll(DropdownPages.selectors.elDropdown); | |
| 292 | + if (!this.elDropdowns.length) { | |
| 293 | + return; | |
| 294 | + } | |
| 295 | + this.events(); | |
| 296 | + } | |
| 297 | + events() { | |
| 298 | + // Check and attach events only once | |
| 299 | + if (DropdownPages._loadedEvents) { | |
| 300 | + return; | |
| 301 | + } | |
| 302 | + DropdownPages._loadedEvents = this; | |
| 303 | + | |
| 304 | + // Change events | |
| 305 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('change', [{ | |
| 306 | + selector: DropdownPages.selectors.elDropdown, | |
| 307 | + class: this, | |
| 308 | + callBack: this.handleChangeSelect.name | |
| 309 | + }]); | |
| 310 | + | |
| 311 | + // Click events | |
| 312 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('click', [{ | |
| 313 | + selector: DropdownPages.selectors.elButtonSubmit, | |
| 314 | + class: this, | |
| 315 | + callBack: this.handleSubmit.name | |
| 316 | + }, { | |
| 317 | + selector: DropdownPages.selectors.elButtonCancel, | |
| 318 | + class: this, | |
| 319 | + callBack: this.handleCancel.name | |
| 320 | + }, { | |
| 321 | + selector: DropdownPages.selectors.elButtonQuickAdd, | |
| 322 | + class: this, | |
| 323 | + callBack: this.handleQuickAdd.name | |
| 324 | + }]); | |
| 325 | + | |
| 326 | + // Keydown events | |
| 327 | + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('keydown', [{ | |
| 328 | + selector: DropdownPages.selectors.elInput, | |
| 329 | + class: this, | |
| 330 | + callBack: this.handleInputEnter.name, | |
| 331 | + checkIsEventEnter: true | |
| 332 | + }, { | |
| 333 | + selector: DropdownPages.selectors.elInput, | |
| 334 | + class: this, | |
| 335 | + callBack: this.handleInputEscape.name | |
| 336 | + }]); | |
| 337 | + } | |
| 338 | + handleChangeSelect(args) { | |
| 339 | + const { | |
| 340 | + e | |
| 341 | + } = args; | |
| 342 | + const elSelect = e.target; | |
| 343 | + if (!elSelect.matches(DropdownPages.selectors.elSelect)) { | |
| 344 | + return; | |
| 345 | + } | |
| 346 | + const elDropdown = elSelect.closest(DropdownPages.selectors.elDropdown); | |
| 347 | + if (!elDropdown) { | |
| 348 | + return; | |
| 349 | + } | |
| 350 | + const elActions = elDropdown.querySelector(DropdownPages.selectors.elActions); | |
| 351 | + if (elActions) { | |
| 352 | + elActions.classList.add('hide-if-js'); | |
| 353 | + } | |
| 354 | + if (parseInt(elSelect.value, 10)) { | |
| 355 | + if (elActions) { | |
| 356 | + const editLink = elActions.querySelector('a.edit-page'); | |
| 357 | + const viewLink = elActions.querySelector('a.view-page'); | |
| 358 | + if (editLink) { | |
| 359 | + editLink.href = `post.php?post=${elSelect.value}&action=edit`; | |
| 360 | + } | |
| 361 | + if (viewLink) { | |
| 362 | + viewLink.href = `${window.lpGlobalSettings.siteurl}?page_id=${elSelect.value}`; | |
| 363 | + } | |
| 364 | + elActions.classList.remove('hide-if-js'); | |
| 365 | + } | |
| 366 | + elSelect.setAttribute('data-selected', elSelect.value); | |
| 367 | + } | |
| 368 | + } | |
| 369 | + openQuickAddForm(elDropdown) { | |
| 370 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 371 | + const elForm = elDropdown.querySelector(DropdownPages.selectors.elForm); | |
| 372 | + if (elListWrap) { | |
| 373 | + elListWrap.classList.add('hide-if-js'); | |
| 374 | + } | |
| 375 | + if (elForm) { | |
| 376 | + elForm.classList.remove('hide-if-js'); | |
| 377 | + const elInput = elForm.querySelector('input'); | |
| 378 | + if (elInput) { | |
| 379 | + elInput.value = ''; | |
| 380 | + elInput.focus(); | |
| 381 | + } | |
| 382 | + } | |
| 383 | + } | |
| 384 | + handleSubmit(args) { | |
| 385 | + const { | |
| 386 | + e | |
| 387 | + } = args; | |
| 388 | + e.preventDefault(); | |
| 389 | + const elButton = e.target.closest(DropdownPages.selectors.elButtonSubmit); | |
| 390 | + if (!elButton) { | |
| 391 | + return; | |
| 392 | + } | |
| 393 | + const elForm = elButton.closest(DropdownPages.selectors.elForm); | |
| 394 | + if (!elForm) { | |
| 395 | + return; | |
| 396 | + } | |
| 397 | + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown); | |
| 398 | + if (!elDropdown) { | |
| 399 | + return; | |
| 400 | + } | |
| 401 | + const elInput = elForm.querySelector('input'); | |
| 402 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 403 | + const pageName = elInput ? elInput.value.trim() : ''; | |
| 404 | + if (!pageName) { | |
| 405 | + alert('Please enter the name of page'); | |
| 406 | + if (elInput) { | |
| 407 | + elInput.focus(); | |
| 408 | + } | |
| 409 | + return; | |
| 410 | + } | |
| 411 | + elButton.disabled = true; | |
| 412 | + let fieldName = ''; | |
| 413 | + const elFieldName = elDropdown.querySelector('select'); | |
| 414 | + fieldName = elFieldName ? elFieldName.name : ''; | |
| 415 | + if (!window.lpGlobalSettings || !window.lpGlobalSettings.ajax || !window.lpDataAdmin || !window.lpDataAdmin.nonce) { | |
| 416 | + elButton.disabled = false; | |
| 417 | + return; | |
| 418 | + } | |
| 419 | + const formData = new FormData(); | |
| 420 | + formData.append('action', 'learnpress_create_page'); | |
| 421 | + formData.append('page_name', pageName); | |
| 422 | + formData.append('field_name', fieldName); | |
| 423 | + formData.append('nonce', window.lpDataAdmin.nonce); | |
| 424 | + fetch(window.lpGlobalSettings.ajax, { | |
| 425 | + method: 'POST', | |
| 426 | + body: formData | |
| 427 | + }).then(response => response.json()).then(response => { | |
| 428 | + const { | |
| 429 | + message, | |
| 430 | + status, | |
| 431 | + data | |
| 432 | + } = response; | |
| 433 | + if (status === 'success') { | |
| 434 | + elForm.classList.add('hide-if-js'); | |
| 435 | + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(message, 'success'); | |
| 436 | + setTimeout(() => { | |
| 437 | + window.location.reload(); | |
| 438 | + }, 1000); | |
| 439 | + } else { | |
| 440 | + throw new Error(message); | |
| 441 | + } | |
| 442 | + }).catch(error => { | |
| 443 | + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(error.message, 'error'); | |
| 444 | + }).finally(() => { | |
| 445 | + elButton.disabled = false; | |
| 446 | + if (elListWrap) { | |
| 447 | + elListWrap.classList.remove('hide-if-js'); | |
| 448 | + } | |
| 449 | + }); | |
| 450 | + } | |
| 451 | + addNewPageToList(args) { | |
| 452 | + const { | |
| 453 | + ID, | |
| 454 | + name, | |
| 455 | + positions | |
| 456 | + } = args; | |
| 457 | + const option = document.createElement('option'); | |
| 458 | + option.value = ID; | |
| 459 | + option.textContent = name; | |
| 460 | + const position = positions.indexOf(ID + ''); | |
| 461 | + document.querySelectorAll(`${DropdownPages.selectors.elDropdown} ${DropdownPages.selectors.elSelect}`).forEach(select => { | |
| 462 | + const newOption = option.cloneNode(true); | |
| 463 | + if (position === 0) { | |
| 464 | + const options = select.querySelectorAll('option'); | |
| 465 | + for (const opt of options) { | |
| 466 | + if (parseInt(opt.value, 10)) { | |
| 467 | + opt.before(newOption); | |
| 468 | + break; | |
| 469 | + } | |
| 470 | + } | |
| 471 | + } else if (position === positions.length - 1) { | |
| 472 | + select.appendChild(newOption); | |
| 473 | + } else { | |
| 474 | + const prevOption = select.querySelector(`option[value="${positions[position - 1]}"]`); | |
| 475 | + if (prevOption) { | |
| 476 | + prevOption.after(newOption); | |
| 477 | + } else { | |
| 478 | + select.appendChild(newOption); | |
| 479 | + } | |
| 480 | + } | |
| 481 | + }); | |
| 482 | + } | |
| 483 | + handleCancel(args) { | |
| 484 | + const { | |
| 485 | + e | |
| 486 | + } = args; | |
| 487 | + e.preventDefault(); | |
| 488 | + const elCancel = e.target.closest(DropdownPages.selectors.elButtonCancel); | |
| 489 | + if (!elCancel) { | |
| 490 | + return; | |
| 491 | + } | |
| 492 | + const elForm = elCancel.closest(DropdownPages.selectors.elForm); | |
| 493 | + if (!elForm) { | |
| 494 | + return; | |
| 495 | + } | |
| 496 | + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown); | |
| 497 | + if (!elDropdown) { | |
| 498 | + return; | |
| 499 | + } | |
| 500 | + const elSelect = elDropdown.querySelector(DropdownPages.selectors.elSelect); | |
| 501 | + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap); | |
| 502 | + const selected = elSelect ? elSelect.getAttribute('data-selected') : ''; | |
| 503 | + elForm.classList.add('hide-if-js'); | |
| 504 | + if (elSelect) { | |
| 505 | + elSelect.value = selected + ''; | |
| 506 | + elSelect.removeAttribute('disabled'); | |
| 507 | + elSelect.dispatchEvent(new Event('change', { | |
| 508 | + bubbles: true | |
| 509 | + })); | |
| 510 | + } | |
| 511 | + if (elListWrap) { | |
| 512 | + elListWrap.classList.remove('hide-if-js'); | |
| 513 | + } | |
| 514 | + } | |
| 515 | + handleQuickAdd(args) { | |
| 516 | + const { | |
| 517 | + e | |
| 518 | + } = args; | |
| 519 | + const elButton = e.target.closest(DropdownPages.selectors.elButtonQuickAdd); | |
| 520 | + if (!elButton) { | |
| 521 | + return; | |
| 522 | + } | |
| 523 | + const elDropdown = elButton.closest(DropdownPages.selectors.elDropdown); | |
| 524 | + if (!elDropdown) { | |
| 525 | + return; | |
| 526 | + } | |
| 527 | + this.openQuickAddForm(elDropdown); | |
| 528 | + } | |
| 529 | + handleInputEnter(args) { | |
| 530 | + const { | |
| 531 | + e | |
| 532 | + } = args; | |
| 533 | + e.preventDefault(); | |
| 534 | + const elInput = e.target; | |
| 535 | + const elForm = elInput.closest(DropdownPages.selectors.elForm); | |
| 536 | + if (!elForm) { | |
| 537 | + return; | |
| 538 | + } | |
| 539 | + const elButton = elForm.querySelector('button'); | |
| 540 | + if (elButton) { | |
| 541 | + elButton.click(); | |
| 542 | + } | |
| 543 | + } | |
| 544 | + handleInputEscape(args) { | |
| 545 | + const { | |
| 546 | + e | |
| 547 | + } = args; | |
| 548 | + if (e.key !== 'Escape') { | |
| 549 | + return; | |
| 550 | + } | |
| 551 | + const elInput = e.target; | |
| 552 | + const elForm = elInput.closest(DropdownPages.selectors.elForm); | |
| 553 | + if (!elForm) { | |
| 554 | + return; | |
| 555 | + } | |
| 556 | + const elCancel = elForm.querySelector('a'); | |
| 557 | + if (elCancel) { | |
| 558 | + elCancel.click(); | |
| 559 | + } | |
| 560 | + } | |
| 561 | +} | |
| 562 | + | |
| 563 | +/***/ }, | |
| 564 | + | |
| 254 | 565 | /***/ "./assets/src/js/admin/utils-admin.js" |
| 255 | 566 | /*!********************************************!*\ |
| 256 | 567 | !*** ./assets/src/js/admin/utils-admin.js ***! |
| 257 | 568 | \********************************************/ |
| @@ -256,8 +567,9 @@ | ||
| 256 | 567 | !*** ./assets/src/js/admin/utils-admin.js ***! |
| 257 | 568 | \********************************************/ |
| 258 | 569 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 259 | 570 | |
| 571 | +"use strict"; | |
| 260 | 572 | __webpack_require__.r(__webpack_exports__); |
| 261 | 573 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 262 | 574 | /* harmony export */ AdminUtilsFunctions: () => (/* binding */ AdminUtilsFunctions), |
| 263 | 575 | /* harmony export */ Api: () => (/* reexport safe */ _api_js__WEBPACK_IMPORTED_MODULE_2__["default"]), |
| @@ -265,13 +577,13 @@ | ||
| 265 | 577 | /* harmony export */ }); |
| 266 | 578 | /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./assets/src/js/utils.js"); |
| 267 | 579 | /* harmony import */ var tom_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tom-select */ "./node_modules/tom-select/dist/esm/tom-select.complete.js"); |
| 268 | 580 | /* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api.js */ "./assets/src/js/api.js"); |
| 269 | -/** | |
| 270 | - * Library run on Admin | |
| 271 | - * | |
| 272 | - * @since 4.2.6.9 | |
| 273 | - * @version 1.0.1 | |
| 581 | +/** | |
| 582 | + * Library run on Admin | |
| 583 | + * | |
| 584 | + * @since 4.2.6.9 | |
| 585 | + * @version 1.0.1 | |
| 274 | 586 | */ |
| 275 | 587 | |
| 276 | 588 | |
| 277 | 589 | |
| @@ -311,26 +623,26 @@ | ||
| 311 | 623 | ...optionDefault, |
| 312 | 624 | ...options |
| 313 | 625 | }; |
| 314 | 626 | const items_selected = options.options; |
| 315 | - /*if ( options?.options?.length > 20 ) { | |
| 316 | - const chunkSize = 20; | |
| 317 | - const length = options.options.length; | |
| 318 | - let i = 0; | |
| 319 | - const chunkedOptions = { ...options }; | |
| 320 | - chunkedOptions.options = items_selected.slice( i, chunkSize ); | |
| 321 | - const tomSelect = new TomSelect( elTomSelect, chunkedOptions ); | |
| 322 | - i += chunkSize; | |
| 323 | - const interval = setInterval( () => { | |
| 324 | - if ( i > ( length - 1 ) ) { | |
| 325 | - clearInterval( interval ); | |
| 326 | - } | |
| 327 | - const optionsSlice = items_selected.slice( i, i + chunkSize ); | |
| 328 | - i += chunkSize; | |
| 329 | - tomSelect.addOptions( optionsSlice ); | |
| 330 | - tomSelect.setValue( options.items ); | |
| 331 | - }, 200 ); | |
| 332 | - return tomSelect; | |
| 627 | + /*if ( options?.options?.length > 20 ) { | |
| 628 | + const chunkSize = 20; | |
| 629 | + const length = options.options.length; | |
| 630 | + let i = 0; | |
| 631 | + const chunkedOptions = { ...options }; | |
| 632 | + chunkedOptions.options = items_selected.slice( i, chunkSize ); | |
| 633 | + const tomSelect = new TomSelect( elTomSelect, chunkedOptions ); | |
| 634 | + i += chunkSize; | |
| 635 | + const interval = setInterval( () => { | |
| 636 | + if ( i > ( length - 1 ) ) { | |
| 637 | + clearInterval( interval ); | |
| 638 | + } | |
| 639 | + const optionsSlice = items_selected.slice( i, i + chunkSize ); | |
| 640 | + i += chunkSize; | |
| 641 | + tomSelect.addOptions( optionsSlice ); | |
| 642 | + tomSelect.setValue( options.items ); | |
| 643 | + }, 200 ); | |
| 644 | + return tomSelect; | |
| 333 | 645 | }*/ |
| 334 | 646 | |
| 335 | 647 | return new tom_select__WEBPACK_IMPORTED_MODULE_1__["default"](elTomSelect, options); |
| 336 | 648 | }, |
| @@ -378,17 +690,18 @@ | ||
| 378 | 690 | !*** ./assets/src/js/api.js ***! |
| 379 | 691 | \******************************/ |
| 380 | 692 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 381 | 693 | |
| 694 | +"use strict"; | |
| 382 | 695 | __webpack_require__.r(__webpack_exports__); |
| 383 | 696 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 384 | 697 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 385 | 698 | /* harmony export */ }); |
| 386 | -/** | |
| 387 | - * List API on backend | |
| 388 | - * | |
| 389 | - * @since 4.2.6 | |
| 390 | - * @version 1.0.2 | |
| 699 | +/** | |
| 700 | + * List API on backend | |
| 701 | + * | |
| 702 | + * @since 4.2.6 | |
| 703 | + * @version 1.0.2 | |
| 391 | 704 | */ |
| 392 | 705 | |
| 393 | 706 | const lplistAPI = {}; |
| 394 | 707 | let lp_rest_url; |
| @@ -394,12 +707,9 @@ | ||
| 394 | 707 | let lp_rest_url; |
| 395 | 708 | if ('undefined' !== typeof lpDataAdmin) { |
| 396 | 709 | lp_rest_url = lpDataAdmin.lp_rest_url; |
| 397 | 710 | lplistAPI.admin = { |
| 398 | - apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices', | |
| 399 | - apiAddons: lp_rest_url + 'lp/v1/addon/all', | |
| 400 | - apiAddonAction: lp_rest_url + 'lp/v1/addon/action-n', | |
| 401 | - apiAddonsPurchase: lp_rest_url + 'lp/v1/addon/info-addons-purchase', | |
| 711 | + // apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices', | |
| 402 | 712 | apiSearchCourses: lp_rest_url + 'lp/v1/admin/tools/search-course', |
| 403 | 713 | apiSearchUsers: lp_rest_url + 'lp/v1/admin/tools/search-user', |
| 404 | 714 | apiAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/assign-user-course', |
| 405 | 715 | apiUnAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/unassign-user-course' |
| @@ -424,8 +734,62 @@ | ||
| 424 | 734 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lplistAPI); |
| 425 | 735 | |
| 426 | 736 | /***/ }, |
| 427 | 737 | |
| 738 | +/***/ "./assets/src/js/lpToastify.js" | |
| 739 | +/*!*************************************!*\ | |
| 740 | + !*** ./assets/src/js/lpToastify.js ***! | |
| 741 | + \*************************************/ | |
| 742 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 743 | + | |
| 744 | +"use strict"; | |
| 745 | +__webpack_require__.r(__webpack_exports__); | |
| 746 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 747 | +/* harmony export */ show: () => (/* binding */ show) | |
| 748 | +/* harmony export */ }); | |
| 749 | +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! toastify-js */ "./node_modules/toastify-js/src/toastify.js"); | |
| 750 | +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(toastify_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 751 | +/* harmony import */ var toastify_js_src_toastify_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! toastify-js/src/toastify.css */ "./node_modules/toastify-js/src/toastify.css"); | |
| 752 | +/** | |
| 753 | + * Utils functions | |
| 754 | + * | |
| 755 | + * @param url | |
| 756 | + * @param data | |
| 757 | + * @param functions | |
| 758 | + * @since 4.3.0 | |
| 759 | + * @version 1.0.0 | |
| 760 | + */ | |
| 761 | + | |
| 762 | + | |
| 763 | +const argsToastify = { | |
| 764 | + text: '', | |
| 765 | + gravity: lpData.toast.gravity, | |
| 766 | + // `top` or `bottom` | |
| 767 | + position: lpData.toast.position, | |
| 768 | + // `left`, `center` or `right` | |
| 769 | + className: `${lpData.toast.classPrefix}`, | |
| 770 | + close: lpData.toast.close == 1, | |
| 771 | + stopOnFocus: lpData.toast.stopOnFocus == 1, | |
| 772 | + duration: lpData.toast.duration | |
| 773 | +}; | |
| 774 | +const show = (message, status = 'success', argsCustom) => { | |
| 775 | + let args = argsToastify; | |
| 776 | + if (argsCustom) { | |
| 777 | + args = { | |
| 778 | + ...args, | |
| 779 | + ...argsCustom | |
| 780 | + }; | |
| 781 | + } | |
| 782 | + const toastify = new (toastify_js__WEBPACK_IMPORTED_MODULE_0___default())({ | |
| 783 | + ...args, | |
| 784 | + text: message, | |
| 785 | + className: `${lpData.toast.classPrefix} ${status}` | |
| 786 | + }); | |
| 787 | + toastify.showToast(); | |
| 788 | +}; | |
| 789 | + | |
| 790 | +/***/ }, | |
| 791 | + | |
| 428 | 792 | /***/ "./assets/src/js/utils.js" |
| 429 | 793 | /*!********************************!*\ |
| 430 | 794 | !*** ./assets/src/js/utils.js ***! |
| 431 | 795 | \********************************/ |
| @@ -430,12 +794,14 @@ | ||
| 430 | 794 | !*** ./assets/src/js/utils.js ***! |
| 431 | 795 | \********************************/ |
| 432 | 796 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 433 | 797 | |
| 798 | +"use strict"; | |
| 434 | 799 | __webpack_require__.r(__webpack_exports__); |
| 435 | 800 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 436 | 801 | /* harmony export */ debounce: () => (/* binding */ debounce), |
| 437 | 802 | /* harmony export */ eventHandlers: () => (/* binding */ eventHandlers), |
| 803 | +/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView), | |
| 438 | 804 | /* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm), |
| 439 | 805 | /* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm), |
| 440 | 806 | /* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated), |
| 441 | 807 | /* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed), |
| @@ -447,18 +813,19 @@ | ||
| 447 | 813 | /* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady), |
| 448 | 814 | /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl), |
| 449 | 815 | /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl), |
| 450 | 816 | /* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm), |
| 451 | -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse) | |
| 817 | +/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse), | |
| 818 | +/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable) | |
| 452 | 819 | /* harmony export */ }); |
| 453 | -/** | |
| 454 | - * Utils functions | |
| 455 | - * | |
| 456 | - * @param url | |
| 457 | - * @param data | |
| 458 | - * @param functions | |
| 459 | - * @since 4.2.5.1 | |
| 460 | - * @version 1.0.6 | |
| 820 | +/** | |
| 821 | + * Utils functions | |
| 822 | + * | |
| 823 | + * @param url | |
| 824 | + * @param data | |
| 825 | + * @param functions | |
| 826 | + * @since 4.2.5.1 | |
| 827 | + * @version 1.0.7 | |
| 461 | 828 | */ |
| 462 | 829 | const lpClassName = { |
| 463 | 830 | hidden: 'lp-hidden', |
| 464 | 831 | loading: 'loading', |
| @@ -463,9 +830,12 @@ | ||
| 463 | 830 | hidden: 'lp-hidden', |
| 464 | 831 | loading: 'loading', |
| 465 | 832 | elCollapse: 'lp-collapse', |
| 466 | 833 | elSectionToggle: '.lp-section-toggle', |
| 467 | - elTriggerToggle: '.lp-trigger-toggle' | |
| 834 | + elTriggerToggle: '.lp-trigger-toggle', | |
| 835 | + elBtnFullScreen: '.lp-btn-full-screen-view', | |
| 836 | + elFullScreen: 'lp-full-screen-view', | |
| 837 | + elBtnFullScreenClose: 'lp-full-screen-view__close' | |
| 468 | 838 | }; |
| 469 | 839 | const lpFetchAPI = (url, data = {}, functions = {}) => { |
| 470 | 840 | if ('function' === typeof functions.before) { |
| 471 | 841 | functions.before(); |
| @@ -487,12 +857,12 @@ | ||
| 487 | 857 | } |
| 488 | 858 | }); |
| 489 | 859 | }; |
| 490 | 860 | |
| 491 | -/** | |
| 492 | - * Get current URL without params. | |
| 493 | - * | |
| 494 | - * @since 4.2.5.1 | |
| 861 | +/** | |
| 862 | + * Get current URL without params. | |
| 863 | + * | |
| 864 | + * @since 4.2.5.1 | |
| 495 | 865 | */ |
| 496 | 866 | const lpGetCurrentURLNoParam = () => { |
| 497 | 867 | let currentUrl = window.location.href; |
| 498 | 868 | const hasParams = currentUrl.includes('?'); |
| @@ -508,14 +878,14 @@ | ||
| 508 | 878 | }); |
| 509 | 879 | return url; |
| 510 | 880 | }; |
| 511 | 881 | |
| 512 | -/** | |
| 513 | - * Listen element viewed. | |
| 514 | - * | |
| 515 | - * @param el | |
| 516 | - * @param callback | |
| 517 | - * @since 4.2.5.8 | |
| 882 | +/** | |
| 883 | + * Listen element viewed. | |
| 884 | + * | |
| 885 | + * @param el | |
| 886 | + * @param callback | |
| 887 | + * @since 4.2.5.8 | |
| 518 | 888 | */ |
| 519 | 889 | const listenElementViewed = (el, callback) => { |
| 520 | 890 | const observerSeeItem = new IntersectionObserver(function (entries) { |
| 521 | 891 | for (const entry of entries) { |
| @@ -526,13 +896,13 @@ | ||
| 526 | 896 | }); |
| 527 | 897 | observerSeeItem.observe(el); |
| 528 | 898 | }; |
| 529 | 899 | |
| 530 | -/** | |
| 531 | - * Listen element created. | |
| 532 | - * | |
| 533 | - * @param callback | |
| 534 | - * @since 4.2.5.8 | |
| 900 | +/** | |
| 901 | + * Listen element created. | |
| 902 | + * | |
| 903 | + * @param callback | |
| 904 | + * @since 4.2.5.8 | |
| 535 | 905 | */ |
| 536 | 906 | const listenElementCreated = callback => { |
| 537 | 907 | const observerCreateItem = new MutationObserver(function (mutations) { |
| 538 | 908 | mutations.forEach(function (mutation) { |
| @@ -551,14 +921,14 @@ | ||
| 551 | 921 | }); |
| 552 | 922 | // End. |
| 553 | 923 | }; |
| 554 | 924 | |
| 555 | -/** | |
| 556 | - * Listen element created. | |
| 557 | - * | |
| 558 | - * @param selector | |
| 559 | - * @param callback | |
| 560 | - * @since 4.2.7.1 | |
| 925 | +/** | |
| 926 | + * Listen element created. | |
| 927 | + * | |
| 928 | + * @param selector | |
| 929 | + * @param callback | |
| 930 | + * @since 4.2.7.1 | |
| 561 | 931 | */ |
| 562 | 932 | const lpOnElementReady = (selector, callback) => { |
| 563 | 933 | const element = document.querySelector(selector); |
| 564 | 934 | if (element) { |
| @@ -699,17 +1069,17 @@ | ||
| 699 | 1069 | }; |
| 700 | 1070 | return dataHandle; |
| 701 | 1071 | }; |
| 702 | 1072 | |
| 703 | -/** | |
| 704 | - * Event trigger | |
| 705 | - * For each list of event handlers, listen event on document. | |
| 706 | - * | |
| 707 | - * eventName: 'click', 'change', ... | |
| 708 | - * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ] | |
| 709 | - * | |
| 710 | - * @param eventName | |
| 711 | - * @param eventHandlers | |
| 1073 | +/** | |
| 1074 | + * Event trigger | |
| 1075 | + * For each list of event handlers, listen event on document. | |
| 1076 | + * | |
| 1077 | + * eventName: 'click', 'change', ... | |
| 1078 | + * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ] | |
| 1079 | + * | |
| 1080 | + * @param eventName | |
| 1081 | + * @param eventHandlers | |
| 712 | 1082 | */ |
| 713 | 1083 | const eventHandlers = (eventName, eventHandlers) => { |
| 714 | 1084 | document.addEventListener(eventName, e => { |
| 715 | 1085 | const target = e.target; |
| @@ -750,32 +1120,32 @@ | ||
| 750 | 1120 | }); |
| 751 | 1121 | }); |
| 752 | 1122 | }; |
| 753 | 1123 | |
| 754 | -/** | |
| 755 | - * Debounce - delays function execution until after `wait` ms of inactivity. | |
| 756 | - * | |
| 757 | - * Each call resets the timer. Only the last call in a burst executes. | |
| 758 | - * | |
| 759 | - * USE CASES: | |
| 760 | - * - Search inputs, form validation, window resize | |
| 761 | - * - Multiple elements need independent timers | |
| 762 | - * - When you need to call with different arguments | |
| 763 | - * | |
| 764 | - * EXAMPLES: | |
| 765 | - * const debouncedSearch = debounce( (query) => fetchResults(query), 300 ); | |
| 766 | - * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value)); | |
| 767 | - * | |
| 768 | - * const debouncedResize = debounce( recalculateLayout, 250 ); | |
| 769 | - * window.addEventListener('resize', debouncedResize); | |
| 770 | - * | |
| 771 | - * ⚠️ Create ONCE outside event handlers, not inside. | |
| 772 | - * | |
| 773 | - * @param {Function} func - Function to debounce (can be anonymous) | |
| 774 | - * @param {number} wait - Milliseconds to wait (default: 500) | |
| 775 | - * @return {Function} Debounced wrapper function | |
| 776 | - * @since 4.3.7 | |
| 777 | - * @version 1.0.0 | |
| 1124 | +/** | |
| 1125 | + * Debounce - delays function execution until after `wait` ms of inactivity. | |
| 1126 | + * | |
| 1127 | + * Each call resets the timer. Only the last call in a burst executes. | |
| 1128 | + * | |
| 1129 | + * USE CASES: | |
| 1130 | + * - Search inputs, form validation, window resize | |
| 1131 | + * - Multiple elements need independent timers | |
| 1132 | + * - When you need to call with different arguments | |
| 1133 | + * | |
| 1134 | + * EXAMPLES: | |
| 1135 | + * const debouncedSearch = debounce( (query) => fetchResults(query), 300 ); | |
| 1136 | + * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value)); | |
| 1137 | + * | |
| 1138 | + * const debouncedResize = debounce( recalculateLayout, 250 ); | |
| 1139 | + * window.addEventListener('resize', debouncedResize); | |
| 1140 | + * | |
| 1141 | + * ⚠️ Create ONCE outside event handlers, not inside. | |
| 1142 | + * | |
| 1143 | + * @param {Function} func - Function to debounce (can be anonymous) | |
| 1144 | + * @param {number} wait - Milliseconds to wait (default: 500) | |
| 1145 | + * @return {Function} Debounced wrapper function | |
| 1146 | + * @since 4.3.7 | |
| 1147 | + * @version 1.0.0 | |
| 778 | 1148 | */ |
| 779 | 1149 | const debounce = (func, wait = 500) => { |
| 780 | 1150 | let timer; |
| 781 | 1151 | return args => { |
| @@ -783,10 +1153,1159 @@ | ||
| 783 | 1153 | timer = setTimeout(() => func(args), wait); |
| 784 | 1154 | }; |
| 785 | 1155 | }; |
| 786 | 1156 | |
| 1157 | +/** | |
| 1158 | + * Initialize lp-toggle-enable components. | |
| 1159 | + * | |
| 1160 | + * Finds all `.lp-toggle-enable` elements and wires up toggle behavior. | |
| 1161 | + * Reads initial state from `data-enabled` attribute ("true"/"false"). | |
| 1162 | + * Calls `data-on-toggle` callback (if provided via options) on state change. | |
| 1163 | + * | |
| 1164 | + * HTML structure: | |
| 1165 | + * <label class="lp-toggle-enable" data-enabled="true"> | |
| 1166 | + * <input type="checkbox" class="lp-toggle-enable__input" /> | |
| 1167 | + * <span class="lp-toggle-enable__track"></span> | |
| 1168 | + * </label> | |
| 1169 | + * | |
| 1170 | + * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable') | |
| 1171 | + * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change | |
| 1172 | + * @since 4.4.5 | |
| 1173 | + * @version 1.0.0 | |
| 1174 | + */ | |
| 1175 | +window.lpToggleEnableInit = 0; | |
| 1176 | +const toggleEnable = (onToggle = null) => { | |
| 1177 | + if (window.lpToggleEnableInit) { | |
| 1178 | + return; | |
| 1179 | + } | |
| 1180 | + window.lpToggleEnableInit = 1; | |
| 1181 | + const selector = '.lp-toggle-enable'; | |
| 1182 | + const updateUI = (toggle, isEnabled) => { | |
| 1183 | + toggle.classList.toggle('is-enabled', isEnabled); | |
| 1184 | + const input = toggle.querySelector('.lp-toggle-enable__input'); | |
| 1185 | + if (input) { | |
| 1186 | + input.checked = isEnabled; | |
| 1187 | + input.value = isEnabled ? '1' : '0'; | |
| 1188 | + } | |
| 1189 | + }; | |
| 1190 | + | |
| 1191 | + // Delegate click handling via eventHandlers. | |
| 1192 | + eventHandlers('click', [{ | |
| 1193 | + selector, | |
| 1194 | + callBack: args => { | |
| 1195 | + const { | |
| 1196 | + e, | |
| 1197 | + target | |
| 1198 | + } = args; | |
| 1199 | + const toggle = target.closest(selector); | |
| 1200 | + if (!toggle || toggle.classList.contains('is-disabled')) { | |
| 1201 | + return; | |
| 1202 | + } | |
| 1203 | + e.preventDefault(); | |
| 1204 | + const isEnabled = !toggle.classList.contains('is-enabled'); | |
| 1205 | + updateUI(toggle, isEnabled); | |
| 1206 | + if ('function' === typeof onToggle) { | |
| 1207 | + onToggle(toggle, isEnabled); | |
| 1208 | + } | |
| 1209 | + } | |
| 1210 | + }]); | |
| 1211 | +}; | |
| 1212 | + | |
| 1213 | +/** | |
| 1214 | + * Initialize custom fullscreen view buttons. | |
| 1215 | + * | |
| 1216 | + * Delegates clicks on `.lp-btn-full-screen-view` buttons to | |
| 1217 | + * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the | |
| 1218 | + * target element. Falls back to the button's parent element when | |
| 1219 | + * `data-target` is not provided. | |
| 1220 | + * | |
| 1221 | + * @since 4.4.5 | |
| 1222 | + * @version 1.0.0 | |
| 1223 | + */ | |
| 1224 | +window.lpFullScreenViewInit = 0; | |
| 1225 | +const fullScreenView = () => { | |
| 1226 | + if (window.lpFullScreenViewInit) { | |
| 1227 | + return; | |
| 1228 | + } | |
| 1229 | + window.lpFullScreenViewInit = 1; | |
| 1230 | + let lastScrollY = 0; | |
| 1231 | + const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => { | |
| 1232 | + const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen); | |
| 1233 | + if (isFullscreen) { | |
| 1234 | + elTarget.classList.remove(lpClassName.elFullScreen); | |
| 1235 | + document.documentElement.classList.remove('lp-full-screen-active'); | |
| 1236 | + window.scrollTo(0, lastScrollY); | |
| 1237 | + } else { | |
| 1238 | + lastScrollY = window.scrollY; | |
| 1239 | + elTarget.classList.add(lpClassName.elFullScreen); | |
| 1240 | + document.documentElement.classList.add('lp-full-screen-active'); | |
| 1241 | + } | |
| 1242 | + if (!isFullscreen) { | |
| 1243 | + if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) { | |
| 1244 | + const closeButton = document.createElement('button'); | |
| 1245 | + closeButton.type = 'button'; | |
| 1246 | + closeButton.className = lpClassName.elBtnFullScreenClose; | |
| 1247 | + closeButton.setAttribute('aria-label', 'Close'); | |
| 1248 | + closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close ×'; | |
| 1249 | + closeButton.addEventListener('click', e => { | |
| 1250 | + e.preventDefault(); | |
| 1251 | + lpToggleFullscreenView(elTarget); | |
| 1252 | + }); | |
| 1253 | + elTarget.appendChild(closeButton); | |
| 1254 | + } | |
| 1255 | + } else { | |
| 1256 | + const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`); | |
| 1257 | + if (closeButton) { | |
| 1258 | + closeButton.remove(); | |
| 1259 | + } | |
| 1260 | + } | |
| 1261 | + }; | |
| 1262 | + eventHandlers('click', [{ | |
| 1263 | + selector: lpClassName.elBtnFullScreen, | |
| 1264 | + callBack: args => { | |
| 1265 | + const { | |
| 1266 | + e, | |
| 1267 | + target | |
| 1268 | + } = args; | |
| 1269 | + const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen); | |
| 1270 | + if (!elBtnFullScreen) { | |
| 1271 | + console.log('No full screen button found'); | |
| 1272 | + return; | |
| 1273 | + } | |
| 1274 | + e.preventDefault(); | |
| 1275 | + let elTarget = null; | |
| 1276 | + const targetSelector = elBtnFullScreen.dataset.targetFullscreen; | |
| 1277 | + console.log(targetSelector); | |
| 1278 | + if (targetSelector) { | |
| 1279 | + elTarget = document.querySelector(targetSelector); | |
| 1280 | + } | |
| 1281 | + if (!elTarget) { | |
| 1282 | + console.log('No target element found'); | |
| 1283 | + return; | |
| 1284 | + } | |
| 1285 | + lpToggleFullscreenView(elTarget, elBtnFullScreen); | |
| 1286 | + } | |
| 1287 | + }]); | |
| 1288 | +}; | |
| 1289 | + | |
| 787 | 1290 | /***/ }, |
| 788 | 1291 | |
| 1292 | +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css" | |
| 1293 | +/*!*****************************************************************************************!*\ | |
| 1294 | + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css ***! | |
| 1295 | + \*****************************************************************************************/ | |
| 1296 | +(module, __webpack_exports__, __webpack_require__) { | |
| 1297 | + | |
| 1298 | +"use strict"; | |
| 1299 | +__webpack_require__.r(__webpack_exports__); | |
| 1300 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1301 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1302 | +/* harmony export */ }); | |
| 1303 | +/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); | |
| 1304 | +/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1305 | +/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); | |
| 1306 | +/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1307 | +// Imports | |
| 1308 | + | |
| 1309 | + | |
| 1310 | +var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); | |
| 1311 | +// Module | |
| 1312 | +___CSS_LOADER_EXPORT___.push([module.id, `/*! | |
| 1313 | + * Toastify js 1.12.0 | |
| 1314 | + * https://github.com/apvarun/toastify-js | |
| 1315 | + * @license MIT licensed | |
| 1316 | + * | |
| 1317 | + * Copyright (C) 2018 Varun A P | |
| 1318 | + */ | |
| 1319 | + | |
| 1320 | +.toastify { | |
| 1321 | + padding: 12px 20px; | |
| 1322 | + color: #ffffff; | |
| 1323 | + display: inline-block; | |
| 1324 | + box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3); | |
| 1325 | + background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5); | |
| 1326 | + background: linear-gradient(135deg, #73a5ff, #5477f5); | |
| 1327 | + position: fixed; | |
| 1328 | + opacity: 0; | |
| 1329 | + transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| 1330 | + border-radius: 2px; | |
| 1331 | + cursor: pointer; | |
| 1332 | + text-decoration: none; | |
| 1333 | + max-width: calc(50% - 20px); | |
| 1334 | + z-index: 2147483647; | |
| 1335 | +} | |
| 1336 | + | |
| 1337 | +.toastify.on { | |
| 1338 | + opacity: 1; | |
| 1339 | +} | |
| 1340 | + | |
| 1341 | +.toast-close { | |
| 1342 | + background: transparent; | |
| 1343 | + border: 0; | |
| 1344 | + color: white; | |
| 1345 | + cursor: pointer; | |
| 1346 | + font-family: inherit; | |
| 1347 | + font-size: 1em; | |
| 1348 | + opacity: 0.4; | |
| 1349 | + padding: 0 5px; | |
| 1350 | +} | |
| 1351 | + | |
| 1352 | +.toastify-right { | |
| 1353 | + right: 15px; | |
| 1354 | +} | |
| 1355 | + | |
| 1356 | +.toastify-left { | |
| 1357 | + left: 15px; | |
| 1358 | +} | |
| 1359 | + | |
| 1360 | +.toastify-top { | |
| 1361 | + top: -150px; | |
| 1362 | +} | |
| 1363 | + | |
| 1364 | +.toastify-bottom { | |
| 1365 | + bottom: -150px; | |
| 1366 | +} | |
| 1367 | + | |
| 1368 | +.toastify-rounded { | |
| 1369 | + border-radius: 25px; | |
| 1370 | +} | |
| 1371 | + | |
| 1372 | +.toastify-avatar { | |
| 1373 | + width: 1.5em; | |
| 1374 | + height: 1.5em; | |
| 1375 | + margin: -7px 5px; | |
| 1376 | + border-radius: 2px; | |
| 1377 | +} | |
| 1378 | + | |
| 1379 | +.toastify-center { | |
| 1380 | + margin-left: auto; | |
| 1381 | + margin-right: auto; | |
| 1382 | + left: 0; | |
| 1383 | + right: 0; | |
| 1384 | + max-width: fit-content; | |
| 1385 | + max-width: -moz-fit-content; | |
| 1386 | +} | |
| 1387 | + | |
| 1388 | +@media only screen and (max-width: 360px) { | |
| 1389 | + .toastify-right, .toastify-left { | |
| 1390 | + margin-left: auto; | |
| 1391 | + margin-right: auto; | |
| 1392 | + left: 0; | |
| 1393 | + right: 0; | |
| 1394 | + max-width: fit-content; | |
| 1395 | + } | |
| 1396 | +} | |
| 1397 | +`, "",{"version":3,"sources":["webpack://./node_modules/toastify-js/src/toastify.css"],"names":[],"mappings":"AAAA;;;;;;EAME;;AAEF;IACI,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,uFAAuF;IACvF,6DAA6D;IAC7D,qDAAqD;IACrD,eAAe;IACf,UAAU;IACV,wDAAwD;IACxD,kBAAkB;IAClB,eAAe;IACf,qBAAqB;IACrB,2BAA2B;IAC3B,mBAAmB;AACvB;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,uBAAuB;IACvB,SAAS;IACT,YAAY;IACZ,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,YAAY;IACZ,cAAc;AAClB;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,sBAAsB;IACtB,2BAA2B;AAC/B;;AAEA;IACI;QACI,iBAAiB;QACjB,kBAAkB;QAClB,OAAO;QACP,QAAQ;QACR,sBAAsB;IAC1B;AACJ","sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n padding: 12px 20px;\n color: #ffffff;\n display: inline-block;\n box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n background: linear-gradient(135deg, #73a5ff, #5477f5);\n position: fixed;\n opacity: 0;\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n border-radius: 2px;\n cursor: pointer;\n text-decoration: none;\n max-width: calc(50% - 20px);\n z-index: 2147483647;\n}\n\n.toastify.on {\n opacity: 1;\n}\n\n.toast-close {\n background: transparent;\n border: 0;\n color: white;\n cursor: pointer;\n font-family: inherit;\n font-size: 1em;\n opacity: 0.4;\n padding: 0 5px;\n}\n\n.toastify-right {\n right: 15px;\n}\n\n.toastify-left {\n left: 15px;\n}\n\n.toastify-top {\n top: -150px;\n}\n\n.toastify-bottom {\n bottom: -150px;\n}\n\n.toastify-rounded {\n border-radius: 25px;\n}\n\n.toastify-avatar {\n width: 1.5em;\n height: 1.5em;\n margin: -7px 5px;\n border-radius: 2px;\n}\n\n.toastify-center {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n .toastify-right, .toastify-left {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n }\n}\n"],"sourceRoot":""}]); | |
| 1398 | +// Exports | |
| 1399 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); | |
| 1400 | + | |
| 1401 | + | |
| 1402 | +/***/ }, | |
| 1403 | + | |
| 1404 | +/***/ "./node_modules/css-loader/dist/runtime/api.js" | |
| 1405 | +/*!*****************************************************!*\ | |
| 1406 | + !*** ./node_modules/css-loader/dist/runtime/api.js ***! | |
| 1407 | + \*****************************************************/ | |
| 1408 | +(module) { | |
| 1409 | + | |
| 1410 | +"use strict"; | |
| 1411 | + | |
| 1412 | + | |
| 1413 | +/* | |
| 1414 | + MIT License http://www.opensource.org/licenses/mit-license.php | |
| 1415 | + Author Tobias Koppers @sokra | |
| 1416 | +*/ | |
| 1417 | +module.exports = function (cssWithMappingToString) { | |
| 1418 | + var list = []; | |
| 1419 | + | |
| 1420 | + // return the list of modules as css string | |
| 1421 | + list.toString = function toString() { | |
| 1422 | + return this.map(function (item) { | |
| 1423 | + var content = ""; | |
| 1424 | + var needLayer = typeof item[5] !== "undefined"; | |
| 1425 | + if (item[4]) { | |
| 1426 | + content += "@supports (".concat(item[4], ") {"); | |
| 1427 | + } | |
| 1428 | + if (item[2]) { | |
| 1429 | + content += "@media ".concat(item[2], " {"); | |
| 1430 | + } | |
| 1431 | + if (needLayer) { | |
| 1432 | + content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); | |
| 1433 | + } | |
| 1434 | + content += cssWithMappingToString(item); | |
| 1435 | + if (needLayer) { | |
| 1436 | + content += "}"; | |
| 1437 | + } | |
| 1438 | + if (item[2]) { | |
| 1439 | + content += "}"; | |
| 1440 | + } | |
| 1441 | + if (item[4]) { | |
| 1442 | + content += "}"; | |
| 1443 | + } | |
| 1444 | + return content; | |
| 1445 | + }).join(""); | |
| 1446 | + }; | |
| 1447 | + | |
| 1448 | + // import a list of modules into the list | |
| 1449 | + list.i = function i(modules, media, dedupe, supports, layer) { | |
| 1450 | + if (typeof modules === "string") { | |
| 1451 | + modules = [[null, modules, undefined]]; | |
| 1452 | + } | |
| 1453 | + var alreadyImportedModules = {}; | |
| 1454 | + if (dedupe) { | |
| 1455 | + for (var k = 0; k < this.length; k++) { | |
| 1456 | + var id = this[k][0]; | |
| 1457 | + if (id != null) { | |
| 1458 | + alreadyImportedModules[id] = true; | |
| 1459 | + } | |
| 1460 | + } | |
| 1461 | + } | |
| 1462 | + for (var _k = 0; _k < modules.length; _k++) { | |
| 1463 | + var item = [].concat(modules[_k]); | |
| 1464 | + if (dedupe && alreadyImportedModules[item[0]]) { | |
| 1465 | + continue; | |
| 1466 | + } | |
| 1467 | + if (typeof layer !== "undefined") { | |
| 1468 | + if (typeof item[5] === "undefined") { | |
| 1469 | + item[5] = layer; | |
| 1470 | + } else { | |
| 1471 | + item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); | |
| 1472 | + item[5] = layer; | |
| 1473 | + } | |
| 1474 | + } | |
| 1475 | + if (media) { | |
| 1476 | + if (!item[2]) { | |
| 1477 | + item[2] = media; | |
| 1478 | + } else { | |
| 1479 | + item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); | |
| 1480 | + item[2] = media; | |
| 1481 | + } | |
| 1482 | + } | |
| 1483 | + if (supports) { | |
| 1484 | + if (!item[4]) { | |
| 1485 | + item[4] = "".concat(supports); | |
| 1486 | + } else { | |
| 1487 | + item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); | |
| 1488 | + item[4] = supports; | |
| 1489 | + } | |
| 1490 | + } | |
| 1491 | + list.push(item); | |
| 1492 | + } | |
| 1493 | + }; | |
| 1494 | + return list; | |
| 1495 | +}; | |
| 1496 | + | |
| 1497 | +/***/ }, | |
| 1498 | + | |
| 1499 | +/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js" | |
| 1500 | +/*!************************************************************!*\ | |
| 1501 | + !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***! | |
| 1502 | + \************************************************************/ | |
| 1503 | +(module) { | |
| 1504 | + | |
| 1505 | +"use strict"; | |
| 1506 | + | |
| 1507 | + | |
| 1508 | +module.exports = function (item) { | |
| 1509 | + var content = item[1]; | |
| 1510 | + var cssMapping = item[3]; | |
| 1511 | + if (!cssMapping) { | |
| 1512 | + return content; | |
| 1513 | + } | |
| 1514 | + if (typeof btoa === "function") { | |
| 1515 | + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); | |
| 1516 | + var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); | |
| 1517 | + var sourceMapping = "/*# ".concat(data, " */"); | |
| 1518 | + return [content].concat([sourceMapping]).join("\n"); | |
| 1519 | + } | |
| 1520 | + return [content].join("\n"); | |
| 1521 | +}; | |
| 1522 | + | |
| 1523 | +/***/ }, | |
| 1524 | + | |
| 1525 | +/***/ "./node_modules/toastify-js/src/toastify.css" | |
| 1526 | +/*!***************************************************!*\ | |
| 1527 | + !*** ./node_modules/toastify-js/src/toastify.css ***! | |
| 1528 | + \***************************************************/ | |
| 1529 | +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1530 | + | |
| 1531 | +"use strict"; | |
| 1532 | +__webpack_require__.r(__webpack_exports__); | |
| 1533 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1534 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1535 | +/* harmony export */ }); | |
| 1536 | +/* 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"); | |
| 1537 | +/* 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__); | |
| 1538 | +/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); | |
| 1539 | +/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1540 | +/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); | |
| 1541 | +/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); | |
| 1542 | +/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); | |
| 1543 | +/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); | |
| 1544 | +/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); | |
| 1545 | +/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); | |
| 1546 | +/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); | |
| 1547 | +/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); | |
| 1548 | +/* harmony import */ var _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js!./toastify.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css"); | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | +var options = {}; | |
| 1561 | + | |
| 1562 | +options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); | |
| 1563 | +options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); | |
| 1564 | + | |
| 1565 | + options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); | |
| 1566 | + | |
| 1567 | +options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); | |
| 1568 | +options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); | |
| 1569 | + | |
| 1570 | +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); | |
| 1576 | + | |
| 1577 | + | |
| 1578 | +/***/ }, | |
| 1579 | + | |
| 1580 | +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js" | |
| 1581 | +/*!****************************************************************************!*\ | |
| 1582 | + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! | |
| 1583 | + \****************************************************************************/ | |
| 1584 | +(module) { | |
| 1585 | + | |
| 1586 | +"use strict"; | |
| 1587 | + | |
| 1588 | + | |
| 1589 | +var stylesInDOM = []; | |
| 1590 | +function getIndexByIdentifier(identifier) { | |
| 1591 | + var result = -1; | |
| 1592 | + for (var i = 0; i < stylesInDOM.length; i++) { | |
| 1593 | + if (stylesInDOM[i].identifier === identifier) { | |
| 1594 | + result = i; | |
| 1595 | + break; | |
| 1596 | + } | |
| 1597 | + } | |
| 1598 | + return result; | |
| 1599 | +} | |
| 1600 | +function modulesToDom(list, options) { | |
| 1601 | + var idCountMap = {}; | |
| 1602 | + var identifiers = []; | |
| 1603 | + for (var i = 0; i < list.length; i++) { | |
| 1604 | + var item = list[i]; | |
| 1605 | + var id = options.base ? item[0] + options.base : item[0]; | |
| 1606 | + var count = idCountMap[id] || 0; | |
| 1607 | + var identifier = "".concat(id, " ").concat(count); | |
| 1608 | + idCountMap[id] = count + 1; | |
| 1609 | + var indexByIdentifier = getIndexByIdentifier(identifier); | |
| 1610 | + var obj = { | |
| 1611 | + css: item[1], | |
| 1612 | + media: item[2], | |
| 1613 | + sourceMap: item[3], | |
| 1614 | + supports: item[4], | |
| 1615 | + layer: item[5] | |
| 1616 | + }; | |
| 1617 | + if (indexByIdentifier !== -1) { | |
| 1618 | + stylesInDOM[indexByIdentifier].references++; | |
| 1619 | + stylesInDOM[indexByIdentifier].updater(obj); | |
| 1620 | + } else { | |
| 1621 | + var updater = addElementStyle(obj, options); | |
| 1622 | + options.byIndex = i; | |
| 1623 | + stylesInDOM.splice(i, 0, { | |
| 1624 | + identifier: identifier, | |
| 1625 | + updater: updater, | |
| 1626 | + references: 1 | |
| 1627 | + }); | |
| 1628 | + } | |
| 1629 | + identifiers.push(identifier); | |
| 1630 | + } | |
| 1631 | + return identifiers; | |
| 1632 | +} | |
| 1633 | +function addElementStyle(obj, options) { | |
| 1634 | + var api = options.domAPI(options); | |
| 1635 | + api.update(obj); | |
| 1636 | + var updater = function updater(newObj) { | |
| 1637 | + if (newObj) { | |
| 1638 | + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { | |
| 1639 | + return; | |
| 1640 | + } | |
| 1641 | + api.update(obj = newObj); | |
| 1642 | + } else { | |
| 1643 | + api.remove(); | |
| 1644 | + } | |
| 1645 | + }; | |
| 1646 | + return updater; | |
| 1647 | +} | |
| 1648 | +module.exports = function (list, options) { | |
| 1649 | + options = options || {}; | |
| 1650 | + list = list || []; | |
| 1651 | + var lastIdentifiers = modulesToDom(list, options); | |
| 1652 | + return function update(newList) { | |
| 1653 | + newList = newList || []; | |
| 1654 | + for (var i = 0; i < lastIdentifiers.length; i++) { | |
| 1655 | + var identifier = lastIdentifiers[i]; | |
| 1656 | + var index = getIndexByIdentifier(identifier); | |
| 1657 | + stylesInDOM[index].references--; | |
| 1658 | + } | |
| 1659 | + var newLastIdentifiers = modulesToDom(newList, options); | |
| 1660 | + for (var _i = 0; _i < lastIdentifiers.length; _i++) { | |
| 1661 | + var _identifier = lastIdentifiers[_i]; | |
| 1662 | + var _index = getIndexByIdentifier(_identifier); | |
| 1663 | + if (stylesInDOM[_index].references === 0) { | |
| 1664 | + stylesInDOM[_index].updater(); | |
| 1665 | + stylesInDOM.splice(_index, 1); | |
| 1666 | + } | |
| 1667 | + } | |
| 1668 | + lastIdentifiers = newLastIdentifiers; | |
| 1669 | + }; | |
| 1670 | +}; | |
| 1671 | + | |
| 1672 | +/***/ }, | |
| 1673 | + | |
| 1674 | +/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js" | |
| 1675 | +/*!********************************************************************!*\ | |
| 1676 | + !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! | |
| 1677 | + \********************************************************************/ | |
| 1678 | +(module) { | |
| 1679 | + | |
| 1680 | +"use strict"; | |
| 1681 | + | |
| 1682 | + | |
| 1683 | +var memo = {}; | |
| 1684 | + | |
| 1685 | +/* istanbul ignore next */ | |
| 1686 | +function getTarget(target) { | |
| 1687 | + if (typeof memo[target] === "undefined") { | |
| 1688 | + var styleTarget = document.querySelector(target); | |
| 1689 | + | |
| 1690 | + // Special case to return head of iframe instead of iframe itself | |
| 1691 | + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { | |
| 1692 | + try { | |
| 1693 | + // This will throw an exception if access to iframe is blocked | |
| 1694 | + // due to cross-origin restrictions | |
| 1695 | + styleTarget = styleTarget.contentDocument.head; | |
| 1696 | + } catch (e) { | |
| 1697 | + // istanbul ignore next | |
| 1698 | + styleTarget = null; | |
| 1699 | + } | |
| 1700 | + } | |
| 1701 | + memo[target] = styleTarget; | |
| 1702 | + } | |
| 1703 | + return memo[target]; | |
| 1704 | +} | |
| 1705 | + | |
| 1706 | +/* istanbul ignore next */ | |
| 1707 | +function insertBySelector(insert, style) { | |
| 1708 | + var target = getTarget(insert); | |
| 1709 | + if (!target) { | |
| 1710 | + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); | |
| 1711 | + } | |
| 1712 | + target.appendChild(style); | |
| 1713 | +} | |
| 1714 | +module.exports = insertBySelector; | |
| 1715 | + | |
| 1716 | +/***/ }, | |
| 1717 | + | |
| 1718 | +/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js" | |
| 1719 | +/*!**********************************************************************!*\ | |
| 1720 | + !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! | |
| 1721 | + \**********************************************************************/ | |
| 1722 | +(module) { | |
| 1723 | + | |
| 1724 | +"use strict"; | |
| 1725 | + | |
| 1726 | + | |
| 1727 | +/* istanbul ignore next */ | |
| 1728 | +function insertStyleElement(options) { | |
| 1729 | + var element = document.createElement("style"); | |
| 1730 | + options.setAttributes(element, options.attributes); | |
| 1731 | + options.insert(element, options.options); | |
| 1732 | + return element; | |
| 1733 | +} | |
| 1734 | +module.exports = insertStyleElement; | |
| 1735 | + | |
| 1736 | +/***/ }, | |
| 1737 | + | |
| 1738 | +/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js" | |
| 1739 | +/*!**********************************************************************************!*\ | |
| 1740 | + !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! | |
| 1741 | + \**********************************************************************************/ | |
| 1742 | +(module, __unused_webpack_exports, __webpack_require__) { | |
| 1743 | + | |
| 1744 | +"use strict"; | |
| 1745 | + | |
| 1746 | + | |
| 1747 | +/* istanbul ignore next */ | |
| 1748 | +function setAttributesWithoutAttributes(styleElement) { | |
| 1749 | + var nonce = true ? __webpack_require__.nc : 0; | |
| 1750 | + if (nonce) { | |
| 1751 | + styleElement.setAttribute("nonce", nonce); | |
| 1752 | + } | |
| 1753 | +} | |
| 1754 | +module.exports = setAttributesWithoutAttributes; | |
| 1755 | + | |
| 1756 | +/***/ }, | |
| 1757 | + | |
| 1758 | +/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js" | |
| 1759 | +/*!***************************************************************!*\ | |
| 1760 | + !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! | |
| 1761 | + \***************************************************************/ | |
| 1762 | +(module) { | |
| 1763 | + | |
| 1764 | +"use strict"; | |
| 1765 | + | |
| 1766 | + | |
| 1767 | +/* istanbul ignore next */ | |
| 1768 | +function apply(styleElement, options, obj) { | |
| 1769 | + var css = ""; | |
| 1770 | + if (obj.supports) { | |
| 1771 | + css += "@supports (".concat(obj.supports, ") {"); | |
| 1772 | + } | |
| 1773 | + if (obj.media) { | |
| 1774 | + css += "@media ".concat(obj.media, " {"); | |
| 1775 | + } | |
| 1776 | + var needLayer = typeof obj.layer !== "undefined"; | |
| 1777 | + if (needLayer) { | |
| 1778 | + css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); | |
| 1779 | + } | |
| 1780 | + css += obj.css; | |
| 1781 | + if (needLayer) { | |
| 1782 | + css += "}"; | |
| 1783 | + } | |
| 1784 | + if (obj.media) { | |
| 1785 | + css += "}"; | |
| 1786 | + } | |
| 1787 | + if (obj.supports) { | |
| 1788 | + css += "}"; | |
| 1789 | + } | |
| 1790 | + var sourceMap = obj.sourceMap; | |
| 1791 | + if (sourceMap && typeof btoa !== "undefined") { | |
| 1792 | + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); | |
| 1793 | + } | |
| 1794 | + | |
| 1795 | + // For old IE | |
| 1796 | + /* istanbul ignore if */ | |
| 1797 | + options.styleTagTransform(css, styleElement, options.options); | |
| 1798 | +} | |
| 1799 | +function removeStyleElement(styleElement) { | |
| 1800 | + // istanbul ignore if | |
| 1801 | + if (styleElement.parentNode === null) { | |
| 1802 | + return false; | |
| 1803 | + } | |
| 1804 | + styleElement.parentNode.removeChild(styleElement); | |
| 1805 | +} | |
| 1806 | + | |
| 1807 | +/* istanbul ignore next */ | |
| 1808 | +function domAPI(options) { | |
| 1809 | + if (typeof document === "undefined") { | |
| 1810 | + return { | |
| 1811 | + update: function update() {}, | |
| 1812 | + remove: function remove() {} | |
| 1813 | + }; | |
| 1814 | + } | |
| 1815 | + var styleElement = options.insertStyleElement(options); | |
| 1816 | + return { | |
| 1817 | + update: function update(obj) { | |
| 1818 | + apply(styleElement, options, obj); | |
| 1819 | + }, | |
| 1820 | + remove: function remove() { | |
| 1821 | + removeStyleElement(styleElement); | |
| 1822 | + } | |
| 1823 | + }; | |
| 1824 | +} | |
| 1825 | +module.exports = domAPI; | |
| 1826 | + | |
| 1827 | +/***/ }, | |
| 1828 | + | |
| 1829 | +/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js" | |
| 1830 | +/*!*********************************************************************!*\ | |
| 1831 | + !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! | |
| 1832 | + \*********************************************************************/ | |
| 1833 | +(module) { | |
| 1834 | + | |
| 1835 | +"use strict"; | |
| 1836 | + | |
| 1837 | + | |
| 1838 | +/* istanbul ignore next */ | |
| 1839 | +function styleTagTransform(css, styleElement) { | |
| 1840 | + if (styleElement.styleSheet) { | |
| 1841 | + styleElement.styleSheet.cssText = css; | |
| 1842 | + } else { | |
| 1843 | + while (styleElement.firstChild) { | |
| 1844 | + styleElement.removeChild(styleElement.firstChild); | |
| 1845 | + } | |
| 1846 | + styleElement.appendChild(document.createTextNode(css)); | |
| 1847 | + } | |
| 1848 | +} | |
| 1849 | +module.exports = styleTagTransform; | |
| 1850 | + | |
| 1851 | +/***/ }, | |
| 1852 | + | |
| 1853 | +/***/ "./node_modules/toastify-js/src/toastify.js" | |
| 1854 | +/*!**************************************************!*\ | |
| 1855 | + !*** ./node_modules/toastify-js/src/toastify.js ***! | |
| 1856 | + \**************************************************/ | |
| 1857 | +(module) { | |
| 1858 | + | |
| 1859 | +/*! | |
| 1860 | + * Toastify js 1.12.0 | |
| 1861 | + * https://github.com/apvarun/toastify-js | |
| 1862 | + * @license MIT licensed | |
| 1863 | + * | |
| 1864 | + * Copyright (C) 2018 Varun A P | |
| 1865 | + */ | |
| 1866 | +(function(root, factory) { | |
| 1867 | + if ( true && module.exports) { | |
| 1868 | + module.exports = factory(); | |
| 1869 | + } else { | |
| 1870 | + root.Toastify = factory(); | |
| 1871 | + } | |
| 1872 | +})(this, function(global) { | |
| 1873 | + // Object initialization | |
| 1874 | + var Toastify = function(options) { | |
| 1875 | + // Returning a new init object | |
| 1876 | + return new Toastify.lib.init(options); | |
| 1877 | + }, | |
| 1878 | + // Library version | |
| 1879 | + version = "1.12.0"; | |
| 1880 | + | |
| 1881 | + // Set the default global options | |
| 1882 | + Toastify.defaults = { | |
| 1883 | + oldestFirst: true, | |
| 1884 | + text: "Toastify is awesome!", | |
| 1885 | + node: undefined, | |
| 1886 | + duration: 3000, | |
| 1887 | + selector: undefined, | |
| 1888 | + callback: function () { | |
| 1889 | + }, | |
| 1890 | + destination: undefined, | |
| 1891 | + newWindow: false, | |
| 1892 | + close: false, | |
| 1893 | + gravity: "toastify-top", | |
| 1894 | + positionLeft: false, | |
| 1895 | + position: '', | |
| 1896 | + backgroundColor: '', | |
| 1897 | + avatar: "", | |
| 1898 | + className: "", | |
| 1899 | + stopOnFocus: true, | |
| 1900 | + onClick: function () { | |
| 1901 | + }, | |
| 1902 | + offset: {x: 0, y: 0}, | |
| 1903 | + escapeMarkup: true, | |
| 1904 | + ariaLive: 'polite', | |
| 1905 | + style: {background: ''} | |
| 1906 | + }; | |
| 1907 | + | |
| 1908 | + // Defining the prototype of the object | |
| 1909 | + Toastify.lib = Toastify.prototype = { | |
| 1910 | + toastify: version, | |
| 1911 | + | |
| 1912 | + constructor: Toastify, | |
| 1913 | + | |
| 1914 | + // Initializing the object with required parameters | |
| 1915 | + init: function(options) { | |
| 1916 | + // Verifying and validating the input object | |
| 1917 | + if (!options) { | |
| 1918 | + options = {}; | |
| 1919 | + } | |
| 1920 | + | |
| 1921 | + // Creating the options object | |
| 1922 | + this.options = {}; | |
| 1923 | + | |
| 1924 | + this.toastElement = null; | |
| 1925 | + | |
| 1926 | + // Validating the options | |
| 1927 | + this.options.text = options.text || Toastify.defaults.text; // Display message | |
| 1928 | + this.options.node = options.node || Toastify.defaults.node; // Display content as node | |
| 1929 | + this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration | |
| 1930 | + this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector | |
| 1931 | + this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display | |
| 1932 | + this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination | |
| 1933 | + this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window | |
| 1934 | + this.options.close = options.close || Toastify.defaults.close; // Show toast close icon | |
| 1935 | + this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom | |
| 1936 | + this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right | |
| 1937 | + this.options.position = options.position || Toastify.defaults.position; // toast position - left or right | |
| 1938 | + this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color | |
| 1939 | + this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path | |
| 1940 | + this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast | |
| 1941 | + this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus | |
| 1942 | + this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click | |
| 1943 | + this.options.offset = options.offset || Toastify.defaults.offset; // toast offset | |
| 1944 | + this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup; | |
| 1945 | + this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive; | |
| 1946 | + this.options.style = options.style || Toastify.defaults.style; | |
| 1947 | + if(options.backgroundColor) { | |
| 1948 | + this.options.style.background = options.backgroundColor; | |
| 1949 | + } | |
| 1950 | + | |
| 1951 | + // Returning the current object for chaining functions | |
| 1952 | + return this; | |
| 1953 | + }, | |
| 1954 | + | |
| 1955 | + // Building the DOM element | |
| 1956 | + buildToast: function() { | |
| 1957 | + // Validating if the options are defined | |
| 1958 | + if (!this.options) { | |
| 1959 | + throw "Toastify is not initialized"; | |
| 1960 | + } | |
| 1961 | + | |
| 1962 | + // Creating the DOM object | |
| 1963 | + var divElement = document.createElement("div"); | |
| 1964 | + divElement.className = "toastify on " + this.options.className; | |
| 1965 | + | |
| 1966 | + // Positioning toast to left or right or center | |
| 1967 | + if (!!this.options.position) { | |
| 1968 | + divElement.className += " toastify-" + this.options.position; | |
| 1969 | + } else { | |
| 1970 | + // To be depreciated in further versions | |
| 1971 | + if (this.options.positionLeft === true) { | |
| 1972 | + divElement.className += " toastify-left"; | |
| 1973 | + console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.') | |
| 1974 | + } else { | |
| 1975 | + // Default position | |
| 1976 | + divElement.className += " toastify-right"; | |
| 1977 | + } | |
| 1978 | + } | |
| 1979 | + | |
| 1980 | + // Assigning gravity of element | |
| 1981 | + divElement.className += " " + this.options.gravity; | |
| 1982 | + | |
| 1983 | + if (this.options.backgroundColor) { | |
| 1984 | + // This is being deprecated in favor of using the style HTML DOM property | |
| 1985 | + console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'); | |
| 1986 | + } | |
| 1987 | + | |
| 1988 | + // Loop through our style object and apply styles to divElement | |
| 1989 | + for (var property in this.options.style) { | |
| 1990 | + divElement.style[property] = this.options.style[property]; | |
| 1991 | + } | |
| 1992 | + | |
| 1993 | + // Announce the toast to screen readers | |
| 1994 | + if (this.options.ariaLive) { | |
| 1995 | + divElement.setAttribute('aria-live', this.options.ariaLive) | |
| 1996 | + } | |
| 1997 | + | |
| 1998 | + // Adding the toast message/node | |
| 1999 | + if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) { | |
| 2000 | + // If we have a valid node, we insert it | |
| 2001 | + divElement.appendChild(this.options.node) | |
| 2002 | + } else { | |
| 2003 | + if (this.options.escapeMarkup) { | |
| 2004 | + divElement.innerText = this.options.text; | |
| 2005 | + } else { | |
| 2006 | + divElement.innerHTML = this.options.text; | |
| 2007 | + } | |
| 2008 | + | |
| 2009 | + if (this.options.avatar !== "") { | |
| 2010 | + var avatarElement = document.createElement("img"); | |
| 2011 | + avatarElement.src = this.options.avatar; | |
| 2012 | + | |
| 2013 | + avatarElement.className = "toastify-avatar"; | |
| 2014 | + | |
| 2015 | + if (this.options.position == "left" || this.options.positionLeft === true) { | |
| 2016 | + // Adding close icon on the left of content | |
| 2017 | + divElement.appendChild(avatarElement); | |
| 2018 | + } else { | |
| 2019 | + // Adding close icon on the right of content | |
| 2020 | + divElement.insertAdjacentElement("afterbegin", avatarElement); | |
| 2021 | + } | |
| 2022 | + } | |
| 2023 | + } | |
| 2024 | + | |
| 2025 | + // Adding a close icon to the toast | |
| 2026 | + if (this.options.close === true) { | |
| 2027 | + // Create a span for close element | |
| 2028 | + var closeElement = document.createElement("button"); | |
| 2029 | + closeElement.type = "button"; | |
| 2030 | + closeElement.setAttribute("aria-label", "Close"); | |
| 2031 | + closeElement.className = "toast-close"; | |
| 2032 | + closeElement.innerHTML = "✖"; | |
| 2033 | + | |
| 2034 | + // Triggering the removal of toast from DOM on close click | |
| 2035 | + closeElement.addEventListener( | |
| 2036 | + "click", | |
| 2037 | + function(event) { | |
| 2038 | + event.stopPropagation(); | |
| 2039 | + this.removeElement(this.toastElement); | |
| 2040 | + window.clearTimeout(this.toastElement.timeOutValue); | |
| 2041 | + }.bind(this) | |
| 2042 | + ); | |
| 2043 | + | |
| 2044 | + //Calculating screen width | |
| 2045 | + var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2046 | + | |
| 2047 | + // Adding the close icon to the toast element | |
| 2048 | + // Display on the right if screen width is less than or equal to 360px | |
| 2049 | + if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) { | |
| 2050 | + // Adding close icon on the left of content | |
| 2051 | + divElement.insertAdjacentElement("afterbegin", closeElement); | |
| 2052 | + } else { | |
| 2053 | + // Adding close icon on the right of content | |
| 2054 | + divElement.appendChild(closeElement); | |
| 2055 | + } | |
| 2056 | + } | |
| 2057 | + | |
| 2058 | + // Clear timeout while toast is focused | |
| 2059 | + if (this.options.stopOnFocus && this.options.duration > 0) { | |
| 2060 | + var self = this; | |
| 2061 | + // stop countdown | |
| 2062 | + divElement.addEventListener( | |
| 2063 | + "mouseover", | |
| 2064 | + function(event) { | |
| 2065 | + window.clearTimeout(divElement.timeOutValue); | |
| 2066 | + } | |
| 2067 | + ) | |
| 2068 | + // add back the timeout | |
| 2069 | + divElement.addEventListener( | |
| 2070 | + "mouseleave", | |
| 2071 | + function() { | |
| 2072 | + divElement.timeOutValue = window.setTimeout( | |
| 2073 | + function() { | |
| 2074 | + // Remove the toast from DOM | |
| 2075 | + self.removeElement(divElement); | |
| 2076 | + }, | |
| 2077 | + self.options.duration | |
| 2078 | + ) | |
| 2079 | + } | |
| 2080 | + ) | |
| 2081 | + } | |
| 2082 | + | |
| 2083 | + // Adding an on-click destination path | |
| 2084 | + if (typeof this.options.destination !== "undefined") { | |
| 2085 | + divElement.addEventListener( | |
| 2086 | + "click", | |
| 2087 | + function(event) { | |
| 2088 | + event.stopPropagation(); | |
| 2089 | + if (this.options.newWindow === true) { | |
| 2090 | + window.open(this.options.destination, "_blank"); | |
| 2091 | + } else { | |
| 2092 | + window.location = this.options.destination; | |
| 2093 | + } | |
| 2094 | + }.bind(this) | |
| 2095 | + ); | |
| 2096 | + } | |
| 2097 | + | |
| 2098 | + if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") { | |
| 2099 | + divElement.addEventListener( | |
| 2100 | + "click", | |
| 2101 | + function(event) { | |
| 2102 | + event.stopPropagation(); | |
| 2103 | + this.options.onClick(); | |
| 2104 | + }.bind(this) | |
| 2105 | + ); | |
| 2106 | + } | |
| 2107 | + | |
| 2108 | + // Adding offset | |
| 2109 | + if(typeof this.options.offset === "object") { | |
| 2110 | + | |
| 2111 | + var x = getAxisOffsetAValue("x", this.options); | |
| 2112 | + var y = getAxisOffsetAValue("y", this.options); | |
| 2113 | + | |
| 2114 | + var xOffset = this.options.position == "left" ? x : "-" + x; | |
| 2115 | + var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y; | |
| 2116 | + | |
| 2117 | + divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")"; | |
| 2118 | + | |
| 2119 | + } | |
| 2120 | + | |
| 2121 | + // Returning the generated element | |
| 2122 | + return divElement; | |
| 2123 | + }, | |
| 2124 | + | |
| 2125 | + // Displaying the toast | |
| 2126 | + showToast: function() { | |
| 2127 | + // Creating the DOM object for the toast | |
| 2128 | + this.toastElement = this.buildToast(); | |
| 2129 | + | |
| 2130 | + // Getting the root element to with the toast needs to be added | |
| 2131 | + var rootElement; | |
| 2132 | + if (typeof this.options.selector === "string") { | |
| 2133 | + rootElement = document.getElementById(this.options.selector); | |
| 2134 | + } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) { | |
| 2135 | + rootElement = this.options.selector; | |
| 2136 | + } else { | |
| 2137 | + rootElement = document.body; | |
| 2138 | + } | |
| 2139 | + | |
| 2140 | + // Validating if root element is present in DOM | |
| 2141 | + if (!rootElement) { | |
| 2142 | + throw "Root element is not defined"; | |
| 2143 | + } | |
| 2144 | + | |
| 2145 | + // Adding the DOM element | |
| 2146 | + var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild; | |
| 2147 | + rootElement.insertBefore(this.toastElement, elementToInsert); | |
| 2148 | + | |
| 2149 | + // Repositioning the toasts in case multiple toasts are present | |
| 2150 | + Toastify.reposition(); | |
| 2151 | + | |
| 2152 | + if (this.options.duration > 0) { | |
| 2153 | + this.toastElement.timeOutValue = window.setTimeout( | |
| 2154 | + function() { | |
| 2155 | + // Remove the toast from DOM | |
| 2156 | + this.removeElement(this.toastElement); | |
| 2157 | + }.bind(this), | |
| 2158 | + this.options.duration | |
| 2159 | + ); // Binding `this` for function invocation | |
| 2160 | + } | |
| 2161 | + | |
| 2162 | + // Supporting function chaining | |
| 2163 | + return this; | |
| 2164 | + }, | |
| 2165 | + | |
| 2166 | + hideToast: function() { | |
| 2167 | + if (this.toastElement.timeOutValue) { | |
| 2168 | + clearTimeout(this.toastElement.timeOutValue); | |
| 2169 | + } | |
| 2170 | + this.removeElement(this.toastElement); | |
| 2171 | + }, | |
| 2172 | + | |
| 2173 | + // Removing the element from the DOM | |
| 2174 | + removeElement: function(toastElement) { | |
| 2175 | + // Hiding the element | |
| 2176 | + // toastElement.classList.remove("on"); | |
| 2177 | + toastElement.className = toastElement.className.replace(" on", ""); | |
| 2178 | + | |
| 2179 | + // Removing the element from DOM after transition end | |
| 2180 | + window.setTimeout( | |
| 2181 | + function() { | |
| 2182 | + // remove options node if any | |
| 2183 | + if (this.options.node && this.options.node.parentNode) { | |
| 2184 | + this.options.node.parentNode.removeChild(this.options.node); | |
| 2185 | + } | |
| 2186 | + | |
| 2187 | + // Remove the element from the DOM, only when the parent node was not removed before. | |
| 2188 | + if (toastElement.parentNode) { | |
| 2189 | + toastElement.parentNode.removeChild(toastElement); | |
| 2190 | + } | |
| 2191 | + | |
| 2192 | + // Calling the callback function | |
| 2193 | + this.options.callback.call(toastElement); | |
| 2194 | + | |
| 2195 | + // Repositioning the toasts again | |
| 2196 | + Toastify.reposition(); | |
| 2197 | + }.bind(this), | |
| 2198 | + 400 | |
| 2199 | + ); // Binding `this` for function invocation | |
| 2200 | + }, | |
| 2201 | + }; | |
| 2202 | + | |
| 2203 | + // Positioning the toasts on the DOM | |
| 2204 | + Toastify.reposition = function() { | |
| 2205 | + | |
| 2206 | + // Top margins with gravity | |
| 2207 | + var topLeftOffsetSize = { | |
| 2208 | + top: 15, | |
| 2209 | + bottom: 15, | |
| 2210 | + }; | |
| 2211 | + var topRightOffsetSize = { | |
| 2212 | + top: 15, | |
| 2213 | + bottom: 15, | |
| 2214 | + }; | |
| 2215 | + var offsetSize = { | |
| 2216 | + top: 15, | |
| 2217 | + bottom: 15, | |
| 2218 | + }; | |
| 2219 | + | |
| 2220 | + // Get all toast messages on the DOM | |
| 2221 | + var allToasts = document.getElementsByClassName("toastify"); | |
| 2222 | + | |
| 2223 | + var classUsed; | |
| 2224 | + | |
| 2225 | + // Modifying the position of each toast element | |
| 2226 | + for (var i = 0; i < allToasts.length; i++) { | |
| 2227 | + // Getting the applied gravity | |
| 2228 | + if (containsClass(allToasts[i], "toastify-top") === true) { | |
| 2229 | + classUsed = "toastify-top"; | |
| 2230 | + } else { | |
| 2231 | + classUsed = "toastify-bottom"; | |
| 2232 | + } | |
| 2233 | + | |
| 2234 | + var height = allToasts[i].offsetHeight; | |
| 2235 | + classUsed = classUsed.substr(9, classUsed.length-1) | |
| 2236 | + // Spacing between toasts | |
| 2237 | + var offset = 15; | |
| 2238 | + | |
| 2239 | + var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2240 | + | |
| 2241 | + // Show toast in center if screen with less than or equal to 360px | |
| 2242 | + if (width <= 360) { | |
| 2243 | + // Setting the position | |
| 2244 | + allToasts[i].style[classUsed] = offsetSize[classUsed] + "px"; | |
| 2245 | + | |
| 2246 | + offsetSize[classUsed] += height + offset; | |
| 2247 | + } else { | |
| 2248 | + if (containsClass(allToasts[i], "toastify-left") === true) { | |
| 2249 | + // Setting the position | |
| 2250 | + allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px"; | |
| 2251 | + | |
| 2252 | + topLeftOffsetSize[classUsed] += height + offset; | |
| 2253 | + } else { | |
| 2254 | + // Setting the position | |
| 2255 | + allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px"; | |
| 2256 | + | |
| 2257 | + topRightOffsetSize[classUsed] += height + offset; | |
| 2258 | + } | |
| 2259 | + } | |
| 2260 | + } | |
| 2261 | + | |
| 2262 | + // Supporting function chaining | |
| 2263 | + return this; | |
| 2264 | + }; | |
| 2265 | + | |
| 2266 | + // Helper function to get offset. | |
| 2267 | + function getAxisOffsetAValue(axis, options) { | |
| 2268 | + | |
| 2269 | + if(options.offset[axis]) { | |
| 2270 | + if(isNaN(options.offset[axis])) { | |
| 2271 | + return options.offset[axis]; | |
| 2272 | + } | |
| 2273 | + else { | |
| 2274 | + return options.offset[axis] + 'px'; | |
| 2275 | + } | |
| 2276 | + } | |
| 2277 | + | |
| 2278 | + return '0px'; | |
| 2279 | + | |
| 2280 | + } | |
| 2281 | + | |
| 2282 | + function containsClass(elem, yourClass) { | |
| 2283 | + if (!elem || typeof yourClass !== "string") { | |
| 2284 | + return false; | |
| 2285 | + } else if ( | |
| 2286 | + elem.className && | |
| 2287 | + elem.className | |
| 2288 | + .trim() | |
| 2289 | + .split(/\s+/gi) | |
| 2290 | + .indexOf(yourClass) > -1 | |
| 2291 | + ) { | |
| 2292 | + return true; | |
| 2293 | + } else { | |
| 2294 | + return false; | |
| 2295 | + } | |
| 2296 | + } | |
| 2297 | + | |
| 2298 | + // Setting up the prototype for the init object | |
| 2299 | + Toastify.lib.init.prototype = Toastify.lib; | |
| 2300 | + | |
| 2301 | + // Returning the Toastify function to be assigned to the window object/module | |
| 2302 | + return Toastify; | |
| 2303 | +}); | |
| 2304 | + | |
| 2305 | + | |
| 2306 | +/***/ }, | |
| 2307 | + | |
| 789 | 2308 | /***/ "./node_modules/@orchidjs/sifter/dist/esm/sifter.js" |
| 790 | 2309 | /*!**********************************************************!*\ |
| 791 | 2310 | !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***! |
| 792 | 2311 | \**********************************************************/ |
| @@ -791,8 +2310,9 @@ | ||
| 791 | 2310 | !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***! |
| 792 | 2311 | \**********************************************************/ |
| 793 | 2312 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 794 | 2313 | |
| 2314 | +"use strict"; | |
| 795 | 2315 | __webpack_require__.r(__webpack_exports__); |
| 796 | 2316 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 797 | 2317 | /* harmony export */ Sifter: () => (/* binding */ Sifter), |
| 798 | 2318 | /* harmony export */ cmp: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.cmp), |
| @@ -1118,8 +2638,9 @@ | ||
| 1118 | 2638 | !*** ./node_modules/@orchidjs/sifter/dist/esm/types.js ***! |
| 1119 | 2639 | \*********************************************************/ |
| 1120 | 2640 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1121 | 2641 | |
| 2642 | +"use strict"; | |
| 1122 | 2643 | __webpack_require__.r(__webpack_exports__); |
| 1123 | 2644 | |
| 1124 | 2645 | //# sourceMappingURL=types.js.map |
| 1125 | 2646 | |
| @@ -1130,8 +2651,9 @@ | ||
| 1130 | 2651 | !*** ./node_modules/@orchidjs/sifter/dist/esm/utils.js ***! |
| 1131 | 2652 | \*********************************************************/ |
| 1132 | 2653 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1133 | 2654 | |
| 2655 | +"use strict"; | |
| 1134 | 2656 | __webpack_require__.r(__webpack_exports__); |
| 1135 | 2657 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1136 | 2658 | /* harmony export */ cmp: () => (/* binding */ cmp), |
| 1137 | 2659 | /* harmony export */ getAttr: () => (/* binding */ getAttr), |
| @@ -1242,8 +2764,9 @@ | ||
| 1242 | 2764 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/index.js ***! |
| 1243 | 2765 | \*******************************************************************/ |
| 1244 | 2766 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1245 | 2767 | |
| 2768 | +"use strict"; | |
| 1246 | 2769 | __webpack_require__.r(__webpack_exports__); |
| 1247 | 2770 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1248 | 2771 | /* harmony export */ _asciifold: () => (/* binding */ _asciifold), |
| 1249 | 2772 | /* harmony export */ asciifold: () => (/* binding */ asciifold), |
| @@ -1645,8 +3168,9 @@ | ||
| 1645 | 3168 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/regex.js ***! |
| 1646 | 3169 | \*******************************************************************/ |
| 1647 | 3170 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1648 | 3171 | |
| 3172 | +"use strict"; | |
| 1649 | 3173 | __webpack_require__.r(__webpack_exports__); |
| 1650 | 3174 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1651 | 3175 | /* harmony export */ arrayToPattern: () => (/* binding */ arrayToPattern), |
| 1652 | 3176 | /* harmony export */ escape_regex: () => (/* binding */ escape_regex), |
| @@ -1730,8 +3254,9 @@ | ||
| 1730 | 3254 | !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/strings.js ***! |
| 1731 | 3255 | \*********************************************************************/ |
| 1732 | 3256 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1733 | 3257 | |
| 3258 | +"use strict"; | |
| 1734 | 3259 | __webpack_require__.r(__webpack_exports__); |
| 1735 | 3260 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1736 | 3261 | /* harmony export */ allSubstrings: () => (/* binding */ allSubstrings) |
| 1737 | 3262 | /* harmony export */ }); |
| @@ -1764,8 +3289,9 @@ | ||
| 1764 | 3289 | !*** ./node_modules/tom-select/dist/esm/constants.js ***! |
| 1765 | 3290 | \*******************************************************/ |
| 1766 | 3291 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1767 | 3292 | |
| 3293 | +"use strict"; | |
| 1768 | 3294 | __webpack_require__.r(__webpack_exports__); |
| 1769 | 3295 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1770 | 3296 | /* harmony export */ IS_MAC: () => (/* binding */ IS_MAC), |
| 1771 | 3297 | /* harmony export */ KEY_A: () => (/* binding */ KEY_A), |
| @@ -1801,8 +3327,9 @@ | ||
| 1801 | 3327 | !*** ./node_modules/tom-select/dist/esm/contrib/highlight.js ***! |
| 1802 | 3328 | \***************************************************************/ |
| 1803 | 3329 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1804 | 3330 | |
| 3331 | +"use strict"; | |
| 1805 | 3332 | __webpack_require__.r(__webpack_exports__); |
| 1806 | 3333 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1807 | 3334 | /* harmony export */ highlight: () => (/* binding */ highlight), |
| 1808 | 3335 | /* harmony export */ removeHighlight: () => (/* binding */ removeHighlight) |
| @@ -1880,8 +3407,9 @@ | ||
| 1880 | 3407 | !*** ./node_modules/tom-select/dist/esm/contrib/microevent.js ***! |
| 1881 | 3408 | \****************************************************************/ |
| 1882 | 3409 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1883 | 3410 | |
| 3411 | +"use strict"; | |
| 1884 | 3412 | __webpack_require__.r(__webpack_exports__); |
| 1885 | 3413 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1886 | 3414 | /* harmony export */ "default": () => (/* binding */ MicroEvent) |
| 1887 | 3415 | /* harmony export */ }); |
| @@ -1954,8 +3482,9 @@ | ||
| 1954 | 3482 | !*** ./node_modules/tom-select/dist/esm/contrib/microplugin.js ***! |
| 1955 | 3483 | \*****************************************************************/ |
| 1956 | 3484 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 1957 | 3485 | |
| 3486 | +"use strict"; | |
| 1958 | 3487 | __webpack_require__.r(__webpack_exports__); |
| 1959 | 3488 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1960 | 3489 | /* harmony export */ "default": () => (/* binding */ MicroPlugin) |
| 1961 | 3490 | /* harmony export */ }); |
| @@ -2076,8 +3605,9 @@ | ||
| 2076 | 3605 | !*** ./node_modules/tom-select/dist/esm/defaults.js ***! |
| 2077 | 3606 | \******************************************************/ |
| 2078 | 3607 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2079 | 3608 | |
| 3609 | +"use strict"; | |
| 2080 | 3610 | __webpack_require__.r(__webpack_exports__); |
| 2081 | 3611 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2082 | 3612 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2083 | 3613 | /* harmony export */ }); |
| @@ -2171,8 +3701,9 @@ | ||
| 2171 | 3701 | !*** ./node_modules/tom-select/dist/esm/getSettings.js ***! |
| 2172 | 3702 | \*********************************************************/ |
| 2173 | 3703 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2174 | 3704 | |
| 3705 | +"use strict"; | |
| 2175 | 3706 | __webpack_require__.r(__webpack_exports__); |
| 2176 | 3707 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2177 | 3708 | /* harmony export */ "default": () => (/* binding */ getSettings) |
| 2178 | 3709 | /* harmony export */ }); |
| @@ -2329,8 +3860,9 @@ | ||
| 2329 | 3860 | !*** ./node_modules/tom-select/dist/esm/plugins/caret_position/plugin.js ***! |
| 2330 | 3861 | \***************************************************************************/ |
| 2331 | 3862 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2332 | 3863 | |
| 3864 | +"use strict"; | |
| 2333 | 3865 | __webpack_require__.r(__webpack_exports__); |
| 2334 | 3866 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2335 | 3867 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2336 | 3868 | /* harmony export */ }); |
| @@ -2506,8 +4038,9 @@ | ||
| 2506 | 4038 | !*** ./node_modules/tom-select/dist/esm/plugins/change_listener/plugin.js ***! |
| 2507 | 4039 | \****************************************************************************/ |
| 2508 | 4040 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2509 | 4041 | |
| 4042 | +"use strict"; | |
| 2510 | 4043 | __webpack_require__.r(__webpack_exports__); |
| 2511 | 4044 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2512 | 4045 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2513 | 4046 | /* harmony export */ }); |
| @@ -2571,8 +4104,9 @@ | ||
| 2571 | 4104 | !*** ./node_modules/tom-select/dist/esm/plugins/checkbox_options/plugin.js ***! |
| 2572 | 4105 | \*****************************************************************************/ |
| 2573 | 4106 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2574 | 4107 | |
| 4108 | +"use strict"; | |
| 2575 | 4109 | __webpack_require__.r(__webpack_exports__); |
| 2576 | 4110 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2577 | 4111 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2578 | 4112 | /* harmony export */ }); |
| @@ -2764,8 +4298,9 @@ | ||
| 2764 | 4298 | !*** ./node_modules/tom-select/dist/esm/plugins/clear_button/plugin.js ***! |
| 2765 | 4299 | \*************************************************************************/ |
| 2766 | 4300 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2767 | 4301 | |
| 4302 | +"use strict"; | |
| 2768 | 4303 | __webpack_require__.r(__webpack_exports__); |
| 2769 | 4304 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2770 | 4305 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2771 | 4306 | /* harmony export */ }); |
| @@ -2851,8 +4386,9 @@ | ||
| 2851 | 4386 | !*** ./node_modules/tom-select/dist/esm/plugins/drag_drop/plugin.js ***! |
| 2852 | 4387 | \**********************************************************************/ |
| 2853 | 4388 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 2854 | 4389 | |
| 4390 | +"use strict"; | |
| 2855 | 4391 | __webpack_require__.r(__webpack_exports__); |
| 2856 | 4392 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2857 | 4393 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 2858 | 4394 | /* harmony export */ }); |
| @@ -3085,8 +4621,9 @@ | ||
| 3085 | 4621 | !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_header/plugin.js ***! |
| 3086 | 4622 | \****************************************************************************/ |
| 3087 | 4623 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3088 | 4624 | |
| 4625 | +"use strict"; | |
| 3089 | 4626 | __webpack_require__.r(__webpack_exports__); |
| 3090 | 4627 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3091 | 4628 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3092 | 4629 | /* harmony export */ }); |
| @@ -3201,8 +4738,9 @@ | ||
| 3201 | 4738 | !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_input/plugin.js ***! |
| 3202 | 4739 | \***************************************************************************/ |
| 3203 | 4740 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3204 | 4741 | |
| 4742 | +"use strict"; | |
| 3205 | 4743 | __webpack_require__.r(__webpack_exports__); |
| 3206 | 4744 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3207 | 4745 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3208 | 4746 | /* harmony export */ }); |
| @@ -3429,8 +4967,9 @@ | ||
| 3429 | 4967 | !*** ./node_modules/tom-select/dist/esm/plugins/input_autogrow/plugin.js ***! |
| 3430 | 4968 | \***************************************************************************/ |
| 3431 | 4969 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3432 | 4970 | |
| 4971 | +"use strict"; | |
| 3433 | 4972 | __webpack_require__.r(__webpack_exports__); |
| 3434 | 4973 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3435 | 4974 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3436 | 4975 | /* harmony export */ }); |
| @@ -3517,8 +5056,9 @@ | ||
| 3517 | 5056 | !*** ./node_modules/tom-select/dist/esm/plugins/no_active_items/plugin.js ***! |
| 3518 | 5057 | \****************************************************************************/ |
| 3519 | 5058 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3520 | 5059 | |
| 5060 | +"use strict"; | |
| 3521 | 5061 | __webpack_require__.r(__webpack_exports__); |
| 3522 | 5062 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3523 | 5063 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3524 | 5064 | /* harmony export */ }); |
| @@ -3557,8 +5097,9 @@ | ||
| 3557 | 5097 | !*** ./node_modules/tom-select/dist/esm/plugins/no_backspace_delete/plugin.js ***! |
| 3558 | 5098 | \********************************************************************************/ |
| 3559 | 5099 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3560 | 5100 | |
| 5101 | +"use strict"; | |
| 3561 | 5102 | __webpack_require__.r(__webpack_exports__); |
| 3562 | 5103 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3563 | 5104 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3564 | 5105 | /* harmony export */ }); |
| @@ -3603,8 +5144,9 @@ | ||
| 3603 | 5144 | !*** ./node_modules/tom-select/dist/esm/plugins/optgroup_columns/plugin.js ***! |
| 3604 | 5145 | \*****************************************************************************/ |
| 3605 | 5146 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3606 | 5147 | |
| 5148 | +"use strict"; | |
| 3607 | 5149 | __webpack_require__.r(__webpack_exports__); |
| 3608 | 5150 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3609 | 5151 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3610 | 5152 | /* harmony export */ }); |
| @@ -3703,8 +5245,9 @@ | ||
| 3703 | 5245 | !*** ./node_modules/tom-select/dist/esm/plugins/remove_button/plugin.js ***! |
| 3704 | 5246 | \**************************************************************************/ |
| 3705 | 5247 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3706 | 5248 | |
| 5249 | +"use strict"; | |
| 3707 | 5250 | __webpack_require__.r(__webpack_exports__); |
| 3708 | 5251 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3709 | 5252 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3710 | 5253 | /* harmony export */ }); |
| @@ -3851,8 +5394,9 @@ | ||
| 3851 | 5394 | !*** ./node_modules/tom-select/dist/esm/plugins/restore_on_backspace/plugin.js ***! |
| 3852 | 5395 | \*********************************************************************************/ |
| 3853 | 5396 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3854 | 5397 | |
| 5398 | +"use strict"; | |
| 3855 | 5399 | __webpack_require__.r(__webpack_exports__); |
| 3856 | 5400 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3857 | 5401 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3858 | 5402 | /* harmony export */ }); |
| @@ -3907,8 +5451,9 @@ | ||
| 3907 | 5451 | !*** ./node_modules/tom-select/dist/esm/plugins/virtual_scroll/plugin.js ***! |
| 3908 | 5452 | \***************************************************************************/ |
| 3909 | 5453 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 3910 | 5454 | |
| 5455 | +"use strict"; | |
| 3911 | 5456 | __webpack_require__.r(__webpack_exports__); |
| 3912 | 5457 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3913 | 5458 | /* harmony export */ "default": () => (/* binding */ plugin) |
| 3914 | 5459 | /* harmony export */ }); |
| @@ -4193,8 +5738,9 @@ | ||
| 4193 | 5738 | !*** ./node_modules/tom-select/dist/esm/tom-select.complete.js ***! |
| 4194 | 5739 | \*****************************************************************/ |
| 4195 | 5740 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 4196 | 5741 | |
| 5742 | +"use strict"; | |
| 4197 | 5743 | __webpack_require__.r(__webpack_exports__); |
| 4198 | 5744 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4199 | 5745 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 4200 | 5746 | /* harmony export */ }); |
| @@ -4252,8 +5798,9 @@ | ||
| 4252 | 5798 | !*** ./node_modules/tom-select/dist/esm/tom-select.js ***! |
| 4253 | 5799 | \********************************************************/ |
| 4254 | 5800 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 4255 | 5801 | |
| 5802 | +"use strict"; | |
| 4256 | 5803 | __webpack_require__.r(__webpack_exports__); |
| 4257 | 5804 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4258 | 5805 | /* harmony export */ "default": () => (/* binding */ TomSelect) |
| 4259 | 5806 | /* harmony export */ }); |
| @@ -6543,8 +8090,9 @@ | ||
| 6543 | 8090 | !*** ./node_modules/tom-select/dist/esm/utils.js ***! |
| 6544 | 8091 | \***************************************************/ |
| 6545 | 8092 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 6546 | 8093 | |
| 8094 | +"use strict"; | |
| 6547 | 8095 | __webpack_require__.r(__webpack_exports__); |
| 6548 | 8096 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6549 | 8097 | /* harmony export */ addEvent: () => (/* binding */ addEvent), |
| 6550 | 8098 | /* harmony export */ addSlashes: () => (/* binding */ addSlashes), |
| @@ -6764,8 +8312,9 @@ | ||
| 6764 | 8312 | !*** ./node_modules/tom-select/dist/esm/vanilla.js ***! |
| 6765 | 8313 | \*****************************************************/ |
| 6766 | 8314 | (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { |
| 6767 | 8315 | |
| 8316 | +"use strict"; | |
| 6768 | 8317 | __webpack_require__.r(__webpack_exports__); |
| 6769 | 8318 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 6770 | 8319 | /* harmony export */ addClasses: () => (/* binding */ addClasses), |
| 6771 | 8320 | /* harmony export */ applyCSS: () => (/* binding */ applyCSS), |
| @@ -6972,9 +8521,9 @@ | ||
| 6972 | 8521 | /******/ return cachedModule.exports; |
| 6973 | 8522 | /******/ } |
| 6974 | 8523 | /******/ // Create a new module (and put it into the cache) |
| 6975 | 8524 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 6976 | -/******/ // no module.id needed | |
| 8525 | +/******/ id: moduleId, | |
| 6977 | 8526 | /******/ // no module.loaded needed |
| 6978 | 8527 | /******/ exports: {} |
| 6979 | 8528 | /******/ }; |
| 6980 | 8529 | /******/ |
| @@ -6984,9 +8533,9 @@ | ||
| 6984 | 8533 | /******/ var e = new Error("Cannot find module '" + moduleId + "'"); |
| 6985 | 8534 | /******/ e.code = 'MODULE_NOT_FOUND'; |
| 6986 | 8535 | /******/ throw e; |
| 6987 | 8536 | /******/ } |
| 6988 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 8537 | +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
| 6989 | 8538 | /******/ |
| 6990 | 8539 | /******/ // Return the exports of the module |
| 6991 | 8540 | /******/ return module.exports; |
| 6992 | 8541 | /******/ } |
| @@ -6991,8 +8540,20 @@ | ||
| 6991 | 8540 | /******/ return module.exports; |
| 6992 | 8541 | /******/ } |
| 6993 | 8542 | /******/ |
| 6994 | 8543 | /************************************************************************/ |
| 8544 | +/******/ /* webpack/runtime/compat get default export */ | |
| 8545 | +/******/ (() => { | |
| 8546 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 8547 | +/******/ __webpack_require__.n = (module) => { | |
| 8548 | +/******/ var getter = module && module.__esModule ? | |
| 8549 | +/******/ () => (module['default']) : | |
| 8550 | +/******/ () => (module); | |
| 8551 | +/******/ __webpack_require__.d(getter, { a: getter }); | |
| 8552 | +/******/ return getter; | |
| 8553 | +/******/ }; | |
| 8554 | +/******/ })(); | |
| 8555 | +/******/ | |
| 6995 | 8556 | /******/ /* webpack/runtime/define property getters */ |
| 6996 | 8557 | /******/ (() => { |
| 6997 | 8558 | /******/ // define getter functions for harmony exports |
| 6998 | 8559 | /******/ __webpack_require__.d = (exports, definition) => { |
| @@ -7019,12 +8580,18 @@ | ||
| 7019 | 8580 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 7020 | 8581 | /******/ }; |
| 7021 | 8582 | /******/ })(); |
| 7022 | 8583 | /******/ |
| 8584 | +/******/ /* webpack/runtime/nonce */ | |
| 8585 | +/******/ (() => { | |
| 8586 | +/******/ __webpack_require__.nc = undefined; | |
| 8587 | +/******/ })(); | |
| 8588 | +/******/ | |
| 7023 | 8589 | /************************************************************************/ |
| 7024 | 8590 | var __webpack_exports__ = {}; |
| 7025 | -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. | |
| 8591 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 7026 | 8592 | (() => { |
| 8593 | +"use strict"; | |
| 7027 | 8594 | /*!**************************************!*\ |
| 7028 | 8595 | !*** ./assets/src/js/admin/admin.js ***! |
| 7029 | 8596 | \**************************************/ |
| 7030 | 8597 | __webpack_require__.r(__webpack_exports__); |
| @@ -7029,15 +8596,17 @@ | ||
| 7029 | 8596 | \**************************************/ |
| 7030 | 8597 | __webpack_require__.r(__webpack_exports__); |
| 7031 | 8598 | /* harmony import */ var _init_tom_select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init-tom-select.js */ "./assets/src/js/admin/init-tom-select.js"); |
| 7032 | 8599 | /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js"); |
| 8600 | +/* harmony import */ var _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./share/dropdown-pages.js */ "./assets/src/js/admin/share/dropdown-pages.js"); | |
| 7033 | 8601 | |
| 7034 | 8602 | |
| 8603 | + | |
| 7035 | 8604 | (function ($) { |
| 7036 | - /** | |
| 7037 | - * Callback event for button to creating pages inside error message. | |
| 7038 | - * | |
| 7039 | - * @param {Event} e | |
| 8605 | + /** | |
| 8606 | + * Callback event for button to creating pages inside error message. | |
| 8607 | + * | |
| 8608 | + * @param {Event} e | |
| 7040 | 8609 | */ |
| 7041 | 8610 | |
| 7042 | 8611 | const createPages = function createPages(e) { |
| 7043 | 8612 | const $button = $(this).addClass('disabled'); |
| @@ -7146,9 +8715,10 @@ | ||
| 7146 | 8715 | }; |
| 7147 | 8716 | const onReady = function onReady() { |
| 7148 | 8717 | lpMetaboxFileInput(); |
| 7149 | 8718 | //updateDb(); |
| 7150 | - $('.learn-press-dropdown-pages').LP('DropdownPages'); | |
| 8719 | + const dropdownPages = new _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__.DropdownPages(); | |
| 8720 | + dropdownPages.init(); | |
| 7151 | 8721 | //$( '.learn-press-advertisement-slider' ).LP( 'Advertisement', 'a', 's' ).appendTo( $( '#wpbody-content' ) ); |
| 7152 | 8722 | //$( '.learn-press-toggle-item-preview' ).on( 'change', updateItemPreview ); |
| 7153 | 8723 | $('.learn-press-tip').LP('QuickTip'); //$('.learn-press-tabs').LP('AdminTab'); |
| 7154 | 8724 | |
| @@ -7176,24 +8746,24 @@ | ||
| 7176 | 8746 | } |
| 7177 | 8747 | } |
| 7178 | 8748 | |
| 7179 | 8749 | // Show/hide meta-box field with type checkbox |
| 7180 | - /*$( 'input' ).on( 'click', function( e ) { | |
| 7181 | - const el = $( e.target ); | |
| 7182 | - if ( ! el.length ) { | |
| 7183 | - return; | |
| 7184 | - } | |
| 7185 | - const id = el.attr( 'id' ); | |
| 7186 | - if ( ! id ) { | |
| 7187 | - return; | |
| 7188 | - } | |
| 7189 | - const classHide = id.replace( 'learn_press_', '' ); | |
| 7190 | - const elHide = $( `.show_if_${ classHide }` ); | |
| 7191 | - if ( el.is( ':checked' ) ) { | |
| 7192 | - elHide.show(); | |
| 7193 | - } else { | |
| 7194 | - elHide.hide(); | |
| 7195 | - } | |
| 8750 | + /*$( 'input' ).on( 'click', function( e ) { | |
| 8751 | + const el = $( e.target ); | |
| 8752 | + if ( ! el.length ) { | |
| 8753 | + return; | |
| 8754 | + } | |
| 8755 | + const id = el.attr( 'id' ); | |
| 8756 | + if ( ! id ) { | |
| 8757 | + return; | |
| 8758 | + } | |
| 8759 | + const classHide = id.replace( 'learn_press_', '' ); | |
| 8760 | + const elHide = $( `.show_if_${ classHide }` ); | |
| 8761 | + if ( el.is( ':checked' ) ) { | |
| 8762 | + elHide.show(); | |
| 8763 | + } else { | |
| 8764 | + elHide.hide(); | |
| 8765 | + } | |
| 7196 | 8766 | } );*/ |
| 7197 | 8767 | }; |
| 7198 | 8768 | $(document).ready(onReady); |
| 7199 | 8769 | })(jQuery); |