diff --git a/languages/de.yaml b/languages/de.yaml index 4d73d9d5b..828c8b442 100644 --- a/languages/de.yaml +++ b/languages/de.yaml @@ -715,7 +715,7 @@ PLUGIN_ADMIN: REDIS_SOCKET_HELP: "Der Redis-Socket" NOT_SET: "Nicht eingestellt" PERMISSIONS: "Zugriffsrechte" - NEVER_CACHE_TWIG: "Twig niemals chachen" + NEVER_CACHE_TWIG: "Twig niemals cachen" NEVER_CACHE_TWIG_HELP: "Nur Inhalte zwischenspeichern und Twig für Seiten jedes Mal verarbeiten. Ignoriert die Einstellung twig_first." ALLOW_WEBSERVER_GZIP: "Webserver Gzip erlauben" ALLOW_WEBSERVER_GZIP_HELP: "Ist standardmäßig deaktiviert. Wenn diese Option aktiviert ist, wird die WebServer konfigurierte Gzip/Deflate-Komprimierung verwendet, aber die HTTP-Verbindung wird nicht vor dem onShutDown() Ereignis geschlossen, was ein langsameres laden der Seite bedeutet" diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index 3da9f860e..6b4992ff5 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -1,15007 +1,1183 @@ +/* + * ATTENTION: An "eval-source-map" devtool has been used. + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ var Grav; /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 56299: +/***/ "./app/dashboard/backup.js": +/*!*********************************!*\ + !*** ./app/dashboard/backup.js ***! + \*********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "default": () => (/* binding */ main) -}); - -// EXTERNAL MODULE: ./node_modules/@babel/polyfill/lib/index.js -var lib = __webpack_require__(26981); -// EXTERNAL MODULE: external "jQuery" -var external_jQuery_ = __webpack_require__(65311); -var external_jQuery_default = /*#__PURE__*/__webpack_require__.n(external_jQuery_); -;// CONCATENATED MODULE: ./app/utils/remodal.js -/* Remodal from https://github.com/vodkabears/Remodal - * With Stackable option from https://github.com/antstorm/Remodal patch - */ - -!function (root, factory) { - return factory(root, (external_jQuery_default())); -}(undefined, function (global, $) { - 'use strict'; - /** - * Name of the plugin - * @private - * @const - * @type {String} - */ - - var PLUGIN_NAME = 'remodal'; - /** - * Namespace for CSS and events - * @private - * @const - * @type {String} - */ - - var NAMESPACE = window.REMODAL_GLOBALS && window.REMODAL_GLOBALS.NAMESPACE || PLUGIN_NAME; - /** - * Animationstart event with vendor prefixes - * @private - * @const - * @type {String} - */ - - var ANIMATIONSTART_EVENTS = $.map(['animationstart', 'webkitAnimationStart', 'MSAnimationStart', 'oAnimationStart'], function (eventName) { - return eventName + '.' + NAMESPACE; - }).join(' '); - /** - * Animationend event with vendor prefixes - * @private - * @const - * @type {String} - */ - - var ANIMATIONEND_EVENTS = $.map(['animationend', 'webkitAnimationEnd', 'MSAnimationEnd', 'oAnimationEnd'], function (eventName) { - return eventName + '.' + NAMESPACE; - }).join(' '); - /** - * Default settings - * @private - * @const - * @type {Object} - */ - - var DEFAULTS = $.extend({ - hashTracking: true, - closeOnConfirm: true, - closeOnCancel: true, - closeOnEscape: true, - closeOnOutsideClick: true, - modifier: '', - stack: false, - appendTo: null - }, window.REMODAL_GLOBALS && window.REMODAL_GLOBALS.DEFAULTS); - /** - * States of the Remodal - * @private - * @const - * @enum {String} - */ - - var STATES = { - CLOSING: 'closing', - CLOSED: 'closed', - OPENING: 'opening', - OPENED: 'opened' - }; - /** - * Reasons of the state change. - * @private - * @const - * @enum {String} - */ - - var STATE_CHANGE_REASONS = { - CONFIRMATION: 'confirmation', - CANCELLATION: 'cancellation' - }; - /** - * Is animation supported? - * @private - * @const - * @type {Boolean} - */ - - var IS_ANIMATION = function () { - var style = document.createElement('div').style; - return style.animationName !== undefined || style.WebkitAnimationName !== undefined || style.MozAnimationName !== undefined || style.msAnimationName !== undefined || style.OAnimationName !== undefined; - }(); - /** - * Is iOS? - * @private - * @const - * @type {Boolean} - */ - - - var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform); - /** - * Current modal - * @private - * @type {Remodal} - */ - - var openModals = []; - /** - * Scrollbar position - * @private - * @type {Number} - */ - - var scrollTop; - /** - * Returns an animation duration - * @private - * @param {jQuery} $elem - * @returns {Number} - */ - - function getAnimationDuration($elem) { - if (IS_ANIMATION && $elem.css('animation-name') === 'none' && $elem.css('-webkit-animation-name') === 'none' && $elem.css('-moz-animation-name') === 'none' && $elem.css('-o-animation-name') === 'none' && $elem.css('-ms-animation-name') === 'none') { - return 0; - } - - var duration = $elem.css('animation-duration') || $elem.css('-webkit-animation-duration') || $elem.css('-moz-animation-duration') || $elem.css('-o-animation-duration') || $elem.css('-ms-animation-duration') || '0s'; - var delay = $elem.css('animation-delay') || $elem.css('-webkit-animation-delay') || $elem.css('-moz-animation-delay') || $elem.css('-o-animation-delay') || $elem.css('-ms-animation-delay') || '0s'; - var iterationCount = $elem.css('animation-iteration-count') || $elem.css('-webkit-animation-iteration-count') || $elem.css('-moz-animation-iteration-count') || $elem.css('-o-animation-iteration-count') || $elem.css('-ms-animation-iteration-count') || '1'; - var max; - var len; - var num; - var i; - duration = duration.split(', '); - delay = delay.split(', '); - iterationCount = iterationCount.split(', '); // The 'duration' size is the same as the 'delay' size - - for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) { - num = parseFloat(duration[i]) * parseInt(iterationCount[i], 10) + parseFloat(delay[i]); - - if (num > max) { - max = num; - } - } - - return max; - } - /** - * Returns a scrollbar width - * @private - * @returns {Number} - */ - - - function getScrollbarWidth() { - if ($(document).height() <= $(window).height()) { - return 0; - } - - var outer = document.createElement('div'); - var inner = document.createElement('div'); - var widthNoScroll; - var widthWithScroll; - outer.style.visibility = 'hidden'; - outer.style.width = '100px'; - document.body.appendChild(outer); - widthNoScroll = outer.offsetWidth; // Force scrollbars - - outer.style.overflow = 'scroll'; // Add inner div - - inner.style.width = '100%'; - outer.appendChild(inner); - widthWithScroll = inner.offsetWidth; // Remove divs - - outer.parentNode.removeChild(outer); - return widthNoScroll - widthWithScroll; - } - /** - * Locks the screen - * @private - */ - - - function lockScreen() { - if (IS_IOS) { - return; - } - - var $html = $('html'); - var lockedClass = namespacify('is-locked'); - var paddingRight; - var $body; - - if (!$html.hasClass(lockedClass)) { - $body = $(document.body); // Zepto does not support '-=', '+=' in the `css` method - - paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth(); - $body.css('padding-right', paddingRight + 'px'); - $html.addClass(lockedClass); - } - } - /** - * Unlocks the screen - * @private - */ - - - function unlockScreen() { - if (IS_IOS) { - return; - } - - var $html = $('html'); - var lockedClass = namespacify('is-locked'); - var paddingRight; - var $body; - - if ($html.hasClass(lockedClass)) { - $body = $(document.body); // Zepto does not support '-=', '+=' in the `css` method - - paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth(); - $body.css('padding-right', paddingRight + 'px'); - $html.removeClass(lockedClass); - } - } - /** - * Sets a state for an instance - * @private - * @param {Remodal} instance - * @param {STATES} state - * @param {Boolean} isSilent If true, Remodal does not trigger events - * @param {String} Reason of a state change. - */ - - - function setState(instance, state, isSilent, reason) { - var newState = namespacify('is', state); - var allStates = [namespacify('is', STATES.CLOSING), namespacify('is', STATES.OPENING), namespacify('is', STATES.CLOSED), namespacify('is', STATES.OPENED)].join(' '); - instance.$bg.removeClass(allStates).addClass(newState); - instance.$overlay.removeClass(allStates).addClass(newState); - instance.$wrapper.removeClass(allStates).addClass(newState); - instance.$modal.removeClass(allStates).addClass(newState); - instance.state = state; - !isSilent && instance.$modal.trigger({ - type: state, - reason: reason - }, [{ - reason: reason - }]); - } - /** - * Synchronizes with the animation - * @param {Function} doBeforeAnimation - * @param {Function} doAfterAnimation - * @param {Remodal} instance - */ - - - function syncWithAnimation(doBeforeAnimation, doAfterAnimation, instance) { - var runningAnimationsCount = 0; - - var handleAnimationStart = function handleAnimationStart(e) { - if (e.target !== this) { - return; - } - - runningAnimationsCount++; - }; - - var handleAnimationEnd = function handleAnimationEnd(e) { - if (e.target !== this) { - return; - } - - if (--runningAnimationsCount === 0) { - // Remove event listeners - $.each(['$bg', '$overlay', '$wrapper', '$modal'], function (index, elemName) { - instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); - }); - doAfterAnimation(); - } - }; - - $.each(['$bg', '$overlay', '$wrapper', '$modal'], function (index, elemName) { - instance[elemName].on(ANIMATIONSTART_EVENTS, handleAnimationStart).on(ANIMATIONEND_EVENTS, handleAnimationEnd); - }); - doBeforeAnimation(); // If the animation is not supported by a browser or its duration is 0 - - if (getAnimationDuration(instance.$bg) === 0 && getAnimationDuration(instance.$overlay) === 0 && getAnimationDuration(instance.$wrapper) === 0 && getAnimationDuration(instance.$modal) === 0) { - // Remove event listeners - $.each(['$bg', '$overlay', '$wrapper', '$modal'], function (index, elemName) { - instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); - }); - doAfterAnimation(); - } - } - /** - * Closes immediately - * @private - * @param {Remodal} instance - */ - - - function halt(instance) { - if (instance.state === STATES.CLOSED) { - return; - } - - $.each(['$bg', '$overlay', '$wrapper', '$modal'], function (index, elemName) { - instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); - }); - removeModal(instance); - instance.$bg.removeClass(instance.settings.modifier); - instance.$overlay.removeClass(instance.settings.modifier).hide(); - instance.$wrapper.hide(); - - if (openModals.length === 0) { - unlockScreen(); - } - - setState(instance, STATES.CLOSED, true); - } - /** - * Parses a string with options - * @private - * @param str - * @returns {Object} - */ - - - function parseOptions(str) { - var obj = {}; - var arr; - var len; - var val; - var i; // Remove spaces before and after delimiters - - str = str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ','); // Parse a string - - arr = str.split(','); - - for (i = 0, len = arr.length; i < len; i++) { - arr[i] = arr[i].split(':'); - val = arr[i][1]; // Convert a string value if it is like a boolean - - if (typeof val === 'string' || val instanceof String) { - val = val === 'true' || (val === 'false' ? false : val); - } // Convert a string value if it is like a number - - - if (typeof val === 'string' || val instanceof String) { - val = !isNaN(val) ? +val : val; - } - - obj[arr[i][0]] = val; - } - - return obj; - } - /** - * Generates a string separated by dashes and prefixed with NAMESPACE - * @private - * @param {...String} - * @returns {String} - */ - - - function namespacify() { - var result = NAMESPACE; - - for (var i = 0; i < arguments.length; ++i) { - result += '-' + arguments[i]; - } - - return result; - } - /** - * Handles the hashchange event - * @private - * @listens hashchange - */ - - - function handleHashChangeEvent() { - var id = location.hash.replace('#', ''); - var instance; - var $elem; - var current = currentModal(); - - if (!id) { - // Check if we have currently opened modal and animation was completed - if (current && current.state === STATES.OPENED && current.settings.hashTracking) { - current.close(); - } - } else { - if (!current || current.id !== id) { - // Catch syntax error if your hash is bad - try { - $elem = $('[data-' + PLUGIN_NAME + '-id="' + id + '"]'); - } catch (err) {} - - if ($elem && $elem.length) { - instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)]; - - if (instance && instance.settings.hashTracking) { - instance.open(); - } - } - } - } - } - - function currentModal() { - return openModals[openModals.length - 1]; - } - - function removeModal(remodal) { - var index = openModals.indexOf(remodal); - - if (index >= 0) { - openModals.slice(index, 1); - } - } - /** - * Remodal constructor - * @constructor - * @param {jQuery} $modal - * @param {Object} options - */ - - - function Remodal($modal, options) { - var $body = $(document.body); - var $appendTo = $body; - var remodal = this; - remodal.id = $modal.attr('data-' + PLUGIN_NAME + '-id'); - remodal.settings = $.extend({}, DEFAULTS, options); - remodal.index = $[PLUGIN_NAME].lookup.push(remodal) - 1; - remodal.state = STATES.CLOSED; // remodal.$overlay = $('.' + namespacify('overlay')); - - if (remodal.settings.appendTo !== null && remodal.settings.appendTo.length) { - $appendTo = $(remodal.settings.appendTo); - } - - if (!remodal.$overlay) { - remodal.$overlay = $('
".concat(error.stack, "
") : '';
- utils_toastr.error("Fetch Failed: ".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD, " {{fileName}}
\n").concat(response.message, "") - }); - } - }, { - key: "onDropzoneComplete", - value: function onDropzoneComplete(file) { - if (!file.accepted && !file.rejected) { - var data = { - status: 'error', - message: "".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_UNSUPPORTED, ": ").concat(file.name.match(/\..+/).join('')) - }; - return this.handleError({ - file: file, - data: data, - mode: 'removeFile', - msg: "
".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_ERROR_ADD, " {{fileName}}
\n").concat(data.message, "") - }); - } - - if (this.options.reloadPage) { - __webpack_require__.g.location.reload(); - } - } - }, { - key: "b64_to_utf8", - value: function b64_to_utf8(str) { - str = str.replace(/\s/g, ''); - return decodeURIComponent(escape(window.atob(str))); - } - }, { - key: "onDropzoneAddedFile", - value: function onDropzoneAddedFile(file) { - return this.dropzone.options.addedfile(file); - } - }, { - key: "onDropzoneRemovedFile", - value: function onDropzoneRemovedFile(file) { - var _this5 = this; - - if (!file.accepted || file.rejected) { - return; - } - - var url = file.removeUrl || this.urls["delete"] || this.options.url; - var path = (url || '').match(/path:(.*)\//); - var body = { - filename: file.name, - uri: this.getURI() - }; - - if (file.sessionParams) { - body.task = 'filessessionremove'; - body.session = file.sessionParams; - } - - var customPost = this.container.data('filePostRemove') || {}; - - if (Object.keys(customPost).length) { - body = {}; - Object.keys(customPost).forEach(function (key) { - body[key] = customPost[key]; - }); - } - - body['filename'] = file.name; - body['admin-nonce'] = external_GravAdmin_namespaceObject.config.admin_nonce; - utils_request(url, { - method: 'post', - body: body - }, function () { - if (!path) { - return; - } - - path = _this5.b64_to_utf8(path[1]); - - var input = _this5.container.find('[name][type="hidden"]'); - - var data = JSON.parse(input.val() || '{}'); - delete data[path]; - input.val(JSON.stringify(data)); - }); - } - }, { - key: "onDropzoneError", - value: function onDropzoneError(file, response, xhr) { - var message = xhr ? response.error.message : response; - external_jQuery_default()(file.previewElement).find('[data-dz-errormessage]').html(message); - return this.handleError({ - file: file, - data: { - status: 'error' - }, - msg: "
".concat(message, "") - }); - } - }, { - key: "handleError", - value: function handleError(options) { - var file = options.file, - data = options.data, - mode = options.mode, - msg = options.msg; - - if (data.status !== 'error' && data.status !== 'unauthorized') { - return; - } - - switch (mode) { - case 'addBack': - if (file instanceof File) { - this.dropzone.addFile.call(this.dropzone, file); - } else { - this.dropzone.files.push(file); - this.dropzone.options.addedfile.call(this.dropzone, file); - this.dropzone.options.thumbnail.call(this.dropzone, file, file.extras.url); - } - - break; - - case 'removeFile': - default: - if (~this.dropzone.files.indexOf(file)) { - file.rejected = true; - this.dropzone.removeFile.call(this.dropzone, file, { - silent: true - }); - } - - break; - } - - var modal = external_jQuery_default()('[data-remodal-id="generic"]'); - var cleanName = file.name.replace('<', '<').replace('>', '>'); - modal.find('.error-content').html(msg.replace('{{fileName}}', cleanName)); - (external_jQuery_default()).remodal.lookup[modal.data('remodal')].open(); - } - }]); - - return FilesField; -}(); - - -function UriToMarkdown(uri) { - uri = uri.replace(/@3x|@2x|@1x/, ''); - uri = uri.replace(/\(/g, '%28'); - uri = uri.replace(/\)/g, '%29'); - var title = uri.split('.').slice(0, -1).join('.'); - return uri.match(/\.(jpe?g|png|gif|svg|webp|mp4|webm|ogv|mov)$/i) ? "![".concat(title, "](").concat(uri, " \"").concat(title, "\")") : "[".concat(decodeURI(uri), "](").concat(uri, ")"); -} -var instances = []; -var cache = external_jQuery_default()(); - -var onAddedNodes = function onAddedNodes(event, target -/* , record, instance */ -) { - var files = external_jQuery_default()(target).find('.dropzone.files-upload'); - - if (!files.length) { - return; - } - - files.each(function (index, file) { - file = external_jQuery_default()(file); - - if (!~cache.index(file)) { - addNode(file); - } - }); -}; - -var addNode = function addNode(container) { - container = external_jQuery_default()(container); - var input = container.find('input[type="file"]'); - var settings = container.data('grav-file-settings') || {}; - - if (settings.accept && ~settings.accept.indexOf('*')) { - settings.accept = ['']; - } - - var options = { - url: container.data('file-url-add') || (container.closest('form').attr('action') || external_GravAdmin_namespaceObject.config.current_url) + '.json', - paramName: settings.paramName || 'file', - dotNotation: settings.name || 'file', - acceptedFiles: settings.accept ? settings.accept.join(',') : input.attr('accept') || container.data('media-types'), - maxFilesize: typeof settings.filesize !== 'undefined' ? settings.filesize : 256, - maxFiles: settings.limit || null, - resizeWidth: settings.resizeWidth || null, - resizeHeight: settings.resizeHeight || null, - resizeQuality: settings.resizeQuality || null, - resolution: settings.resolution || null, - accept: function accept(file, done) { - ACCEPT_FUNC(file, done, settings); - } - }; - cache = cache.add(container); - container = container[0]; - instances.push(new FilesField({ - container: container, - options: options - })); -}; - -var Instance = function () { - external_jQuery_default()('.dropzone.files-upload').each(function (i, container) { - return addNode(container); - }); - external_jQuery_default()('body').on('mutation._grav', onAddedNodes); - return instances; -}(); -// EXTERNAL MODULE: ./node_modules/events/events.js -var events = __webpack_require__(17187); -var events_default = /*#__PURE__*/__webpack_require__.n(events); -;// CONCATENATED MODULE: ./app/utils/gpm.js -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } - -function gpm_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function gpm_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function gpm_createClass(Constructor, protoProps, staticProps) { if (protoProps) gpm_defineProperties(Constructor.prototype, protoProps); if (staticProps) gpm_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - - - - - -var GPM = /*#__PURE__*/function (_EventEmitter) { - _inherits(GPM, _EventEmitter); - - var _super = _createSuper(GPM); - - function GPM() { - var _this; - - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'getUpdates'; - - gpm_classCallCheck(this, GPM); - - _this = _super.call(this); - _this.payload = {}; - _this.raw = {}; - _this.action = action; - return _this; - } - - gpm_createClass(GPM, [{ - key: "setPayload", - value: function setPayload() { - var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - this.payload = payload; - this.emit('payload', payload); - return this; - } - }, { - key: "setAction", - value: function setAction() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'getUpdates'; - this.action = action; - this.emit('action', action); - return this; - } - }, { - key: "fetch", - value: function (_fetch) { - function fetch() { - return _fetch.apply(this, arguments); - } - - fetch.toString = function () { - return _fetch.toString(); - }; - - return fetch; - }(function () { - var _this2 = this; - - var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () { - return true; - }; - var flush = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var data = new FormData(); - data.append('admin-nonce', external_GravAdmin_namespaceObject.config.admin_nonce); - - if (flush) { - data.append('flush', true); - } - - this.emit('fetching', this); - fetch("".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/update.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "getUpdates"), { - credentials: 'same-origin', - method: 'post', - body: data - }).then(function (response) { - _this2.raw = response; - return response; - }).then(parseStatus).then(parseJSON).then(function (response) { - return _this2.response(response); - }).then(function (response) { - return callback(response, _this2.raw); - }).then(function (response) { - return _this2.emit('fetched', _this2.payload, _this2.raw, _this2); - })["catch"](userFeedbackError); - }) - }, { - key: "response", - value: function response(_response) { - this.payload = _response; - return _response; - } - }]); - - return GPM; -}((events_default())); - - -var gpm_Instance = new GPM(); -;// CONCATENATED MODULE: ./app/utils/keepalive.js -function keepalive_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function keepalive_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function keepalive_createClass(Constructor, protoProps, staticProps) { if (protoProps) keepalive_defineProperties(Constructor.prototype, protoProps); if (staticProps) keepalive_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - -var MAX_SAFE_DELAY = 2147483647; - -var KeepAlive = /*#__PURE__*/function () { - function KeepAlive() { - keepalive_classCallCheck(this, KeepAlive); - - this.active = false; - } - - keepalive_createClass(KeepAlive, [{ - key: "start", - value: function start() { - var _this = this; - - var timeout = external_GravAdmin_namespaceObject.config.admin_timeout / 1.5 * 1000; - this.timer = setInterval(function () { - return _this.fetch(); - }, Math.min(timeout, MAX_SAFE_DELAY)); - this.active = true; - } - }, { - key: "stop", - value: function stop() { - clearInterval(this.timer); - this.active = false; - } - }, { - key: "fetch", - value: function (_fetch) { - function fetch() { - return _fetch.apply(this, arguments); - } - - fetch.toString = function () { - return _fetch.toString(); - }; - - return fetch; - }(function () { - var data = new FormData(); - data.append('admin-nonce', external_GravAdmin_namespaceObject.config.admin_nonce); - fetch("".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "keepAlive"), { - credentials: 'same-origin', - method: 'post', - body: data - })["catch"](userFeedbackError); - }) - }]); - - return KeepAlive; -}(); - -/* harmony default export */ const keepalive = (new KeepAlive()); -// EXTERNAL MODULE: ./node_modules/mout/array/unique.js -var unique = __webpack_require__(79863); -var unique_default = /*#__PURE__*/__webpack_require__.n(unique); -;// CONCATENATED MODULE: ./app/updates/notifications.js -function notifications_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function notifications_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function notifications_createClass(Constructor, protoProps, staticProps) { if (protoProps) notifications_defineProperties(Constructor.prototype, protoProps); if (staticProps) notifications_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - - - -var canFetchNotifications = function canFetchNotifications() { - return external_GravAdmin_namespaceObject.config.notifications.enabled; -}; - -var notificationsFilters = function notificationsFilters() { - return external_GravAdmin_namespaceObject.config.notifications.filters; -}; - -var Notifications = /*#__PURE__*/function () { - function Notifications() { - notifications_classCallCheck(this, Notifications); - } - - notifications_createClass(Notifications, [{ - key: "fetch", - value: // Grav.default.Notifications.fetch() - function fetch() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$filter = _ref.filter, - filter = _ref$filter === void 0 ? notificationsFilters() : _ref$filter, - _ref$refresh = _ref.refresh, - refresh = _ref$refresh === void 0 ? false : _ref$refresh; - - if (!canFetchNotifications()) { - return false; - } - - var feed = external_jQuery_default()('#notifications'); - var loader = feed.find('.widget-loader'); - var content = feed.find('.widget-content > ul'); - loader.find('div').remove(); - loader.find('.fa-warning').removeClass('fa-warning').addClass('fa-refresh fa-spin'); - loader.show(); - content.hide(); - - var processNotifications = function processNotifications(response) { - var notifications = response.notifications; - external_jQuery_default()('#notifications').find('.widget-content > ul').empty(); - - if (notifications) { - Object.keys(notifications).forEach(function (location) { - return Notifications.processLocation(location, notifications[location]); - }); - } - }; - - utils_request("".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "getNotifications"), { - method: 'post', - body: { - refresh: refresh, - filter: filter - } - }, function (response) { - processNotifications(response); - })["catch"](function () { - var widget = external_jQuery_default()('#notifications .widget-content'); - widget.find('.widget-loader').find('div').remove(); - widget.find('.widget-loader').append('
\n ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ALL, " ").concat(type_translation, "\n \n ").concat(length, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.OF_YOUR, " ").concat(type_translation.toLowerCase(), " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE, "\n
\n ")); - var existing_slugs = external_jQuery_default()('[data-update-packages]').attr('data-packages-slugs') || ''; - - if (existing_slugs) { - existing_slugs = existing_slugs.split(','); - } else { - existing_slugs = []; - } - - var slugs = unique_default()(existing_slugs.concat(Object.keys(resources))).join(); - external_jQuery_default()('[data-update-packages]').attr('data-packages-slugs', "".concat(slugs)); - Object.keys(resources).forEach(function (item) { - // listing page - var container = external_jQuery_default()("[data-gpm-".concat(singles[index], "=\"").concat(item, "\"]")); - var element = container.find('.gpm-name'); - var url = element.find('a'); - var content_wrapper = container.parents('.content-wrapper'); - - if (type === 'plugins' && !element.find('.badge.update').length) { - element.append("").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE, "!")); - content_wrapper.addClass('has-updates'); - } else if (type === 'themes') { - element.append("")); - content_wrapper.addClass('has-updates'); - } // details page - - - if (container.length) { - var details = external_jQuery_default()(".grav-update.".concat(singles[index])); - - if (details.length) { - var releaseType = resources[item].type === 'testing' ? 'test release' : ''; - details.html("\n\n ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE, " ").concat(singles[index].charAt(0).toUpperCase() + singles[index].substr(1).toLowerCase(), "\n \n v").concat(resources[item].available, " ").concat(releaseType, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.OF_THIS, " ").concat(singles[index], " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE, "!\n
\n ")).css('display', 'block'); - is_current_package_latest = false; - } - } - }); - external_jQuery_default()('[data-update-packages]').removeClass('hidden'); - }); - external_jQuery_default()('.content-wrapper').addClass('updates-checked'); - - if (!is_current_package_latest) { - external_jQuery_default()('.warning-reinstall-not-latest-release').removeClass('hidden'); - } - } - }]); - - return Updates; -}(); - - -var updates_Instance = new Updates(); - // automatically refresh UI for updates (graph, sidebar, plugin/themes pages) after every fetch - -gpm_Instance.on('fetched', function (response, raw) { - updates_Instance.setPayload(response.payload || {}); - updates_Instance.grav().resources(); -}); - -if (external_GravAdmin_namespaceObject.config.enable_auto_updates_check === '1') { - gpm_Instance.fetch(); -} -// EXTERNAL MODULE: ./node_modules/chartist/dist/chartist.js -var chartist = __webpack_require__(69259); -var chartist_default = /*#__PURE__*/__webpack_require__.n(chartist); -;// CONCATENATED MODULE: ./app/dashboard/chart.js -function chart_typeof(obj) { "@babel/helpers - typeof"; return chart_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, chart_typeof(obj); } - -function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); } - -function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = chart_getPrototypeOf(object); if (object === null) break; } return object; } - -function chart_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) chart_setPrototypeOf(subClass, superClass); } - -function chart_setPrototypeOf(o, p) { chart_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return chart_setPrototypeOf(o, p); } - -function chart_createSuper(Derived) { var hasNativeReflectConstruct = chart_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = chart_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = chart_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return chart_possibleConstructorReturn(this, result); }; } - -function chart_possibleConstructorReturn(self, call) { if (call && (chart_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return chart_assertThisInitialized(self); } - -function chart_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function chart_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - -function chart_getPrototypeOf(o) { chart_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return chart_getPrototypeOf(o); } - -function chart_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function chart_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function chart_createClass(Constructor, protoProps, staticProps) { if (protoProps) chart_defineProperties(Constructor.prototype, protoProps); if (staticProps) chart_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - - - - // let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; - -var defaults = { - data: { - series: [100, 0] - }, - options: { - Pie: { - donut: true, - donutWidth: 10, - startAngle: 0, - total: 100, - showLabel: false, - height: 150, - // chartPadding: !isFirefox ? 10 : 25 // workaround for older versions of firefox - chartPadding: 5 - }, - Bar: { - height: 164, - chartPadding: 20, - // workaround for older versions of firefox - axisX: { - showGrid: false, - labelOffset: { - x: 0, - y: 0 - } - }, - axisY: { - offset: 15, - showLabel: true, - showGrid: true, - labelOffset: { - x: 5, - y: 5 - }, - scaleMinSpace: 25 - } - } - } -}; - -var Chart = /*#__PURE__*/function () { - function Chart(element) { - var _this = this; - - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - chart_classCallCheck(this, Chart); - - this.element = external_jQuery_default()(element) || []; - - if (!this.element[0]) { - return; - } - - var type = (this.element.data('chart-type') || 'pie').toLowerCase(); - this.type = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase(); - options = Object.assign({}, defaults.options[this.type], options); - data = Object.assign({}, defaults.data, data); - Object.assign(this, { - options: options, - data: data - }); - this.chart = (chartist_default())[this.type](this.element.find('.ct-chart').empty()[0], this.data, this.options); - this.chart.on('created', function () { - _this.element.find('.hidden').removeClass('hidden'); // FIX: workaround for chartist issue not allowing HTML in labels anymore - // https://github.com/gionkunz/chartist-js/issues/937 - - - _this.element.find('.ct-label').each(function (index, label) { - label = external_jQuery_default()(label); - var text = label.html().replace('<', '<').replace('>', '>'); - label.html(text); - }); - }); - } - - chart_createClass(Chart, [{ - key: "updateData", - value: function updateData(data) { - Object.assign(this.data, data); - this.chart.update(this.data); - } - }]); - - return Chart; -}(); - - -; -var UpdatesChart = /*#__PURE__*/function (_Chart) { - chart_inherits(UpdatesChart, _Chart); - - var _super = chart_createSuper(UpdatesChart); - - function UpdatesChart(element) { - var _this2; - - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - chart_classCallCheck(this, UpdatesChart); - - _this2 = _super.call(this, element, options, data); - - _this2.chart.on('draw', function (data) { - return _this2.draw(data); - }); - - gpm_Instance.on('fetched', function (response) { - if (!response.payload) { - return; - } - - var payload = response.payload.grav; - var missing = (response.payload.resources.total + (payload.isUpdatable ? 1 : 0)) * 100 / (response.payload.installed + (payload.isUpdatable ? 1 : 0)); - var updated = 100 - missing; - - _this2.updateData({ - series: [updated, missing] - }); - - if (response.payload.resources.total) { - updates_Instance.maintenance('show'); - } - }); - return _this2; - } - - chart_createClass(UpdatesChart, [{ - key: "draw", - value: function draw(data) { - if (data.index) { - return; - } - - var notice = external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN[data.value === 100 ? 'FULLY_UPDATED' : 'UPDATES_AVAILABLE']; - this.element.find('.numeric span').text("".concat(Math.round(data.value), "%")); - this.element.find('.js__updates-available-description').html(notice); - this.element.find('.hidden').removeClass('hidden'); - } - }, { - key: "updateData", - value: function updateData(data) { - _get(chart_getPrototypeOf(UpdatesChart.prototype), "updateData", this).call(this, data); // missing updates - - - if (this.data.series[0] < 100) { - this.element.closest('#updates').find('[data-update-packages]').fadeIn(); - } - } - }]); - - return UpdatesChart; -}(Chart); -var charts = {}; -external_jQuery_default()('[data-chart-name]').each(function () { - var element = external_jQuery_default()(this); - var name = element.data('chart-name') || ''; - var options = element.data('chart-options') || {}; - var data = element.data('chart-data') || {}; - - if (name === 'updates') { - charts[name] = new UpdatesChart(element, options, data); - } else { - charts[name] = new Chart(element, options, data); - } -}); -var Instances = charts; -;// CONCATENATED MODULE: ./app/dashboard/cache.js -function cache_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function cache_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function cache_createClass(Constructor, protoProps, staticProps) { if (protoProps) cache_defineProperties(Constructor.prototype, protoProps); if (staticProps) cache_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - - - -var getUrl = function getUrl() { - var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - - if (type) { - type = "cleartype:".concat(type, "/"); - } - - return "".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/cache.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "clearCache/").concat(type, "admin-nonce").concat(external_GravAdmin_namespaceObject.config.param_sep).concat(external_GravAdmin_namespaceObject.config.admin_nonce); -}; - -var Cache = /*#__PURE__*/function () { - function Cache() { - var _this = this; - - cache_classCallCheck(this, Cache); - - this.element = external_jQuery_default()('[data-clear-cache]'); - external_jQuery_default()('body').on('click', '[data-clear-cache]', function (event) { - return _this.clear(event, event.target); - }); - } - - cache_createClass(Cache, [{ - key: "clear", - value: function clear(event, element) { - var _this2 = this; - - var type = ''; - - if (event && event.preventDefault) { - event.preventDefault(); - } - - if (typeof event === 'string') { - type = event; - } - - element = element ? external_jQuery_default()(element) : external_jQuery_default()("[data-clear-cache-type=\"".concat(type, "\"]")); - type = type || external_jQuery_default()(element).data('clear-cache-type') || ''; - var url = element.data('clearCache') || getUrl(type); - this.disable(); - utils_request(url, function () { - return _this2.enable(); - }); - } - }, { - key: "enable", - value: function enable() { - this.element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin fa-retweet').addClass('fa-retweet'); - } - }, { - key: "disable", - value: function disable() { - this.element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-retweet').addClass('fa-refresh fa-spin'); - } - }]); - - return Cache; -}(); - - -var cache_Instance = new Cache(); - -;// CONCATENATED MODULE: ./app/dashboard/backup.js - - - - -external_jQuery_default()('[data-backup][data-ajax*="backup/"]').on('click', function () { - var element = external_jQuery_default()(this); - var url = element.data('ajax'); - var inDropdown = element.closest('.dropdown-menu'); - (inDropdown.length ? inDropdown : element).closest('.button-group').find('> button:first').attr('disabled', 'disabled').find('> .fa').removeClass('fa-life-ring').addClass('fa-spin fa-refresh'); - utils_request(url, function - /* response */ - () { - if (Instances && Instances.backups) { - Instances.backups.updateData({ - series: [0, 100] - }); - Instances.backups.element.find('.numeric').html("0 ".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DAYS.toLowerCase(), "")); - } - - (inDropdown.length ? inDropdown : element).closest('.button-group').find('> button:first').removeAttr('disabled').find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-life-ring'); - }); -}); -external_jQuery_default()('[data-backup][data-ajax*="backupDelete"]').on('click', function () { - var element = external_jQuery_default()(this); - var url = element.data('ajax'); - var tr = element.closest('tr'); - tr.addClass('deleting'); - utils_request(url, function (response) { - if (response.status === 'success') { - tr.remove(); - } else { - tr.removeClass('deleting'); - } - }); -}); -;// CONCATENATED MODULE: ./app/dashboard/index.js - - - -/* harmony default export */ const dashboard = ({ - Chart: { - Chart: Chart, - UpdatesChart: UpdatesChart, - Instances: Instances - }, - Cache: cache_Instance -}); -// EXTERNAL MODULE: ./node_modules/sortablejs/modular/sortable.esm.js -var sortable_esm = __webpack_require__(51474); -// EXTERNAL MODULE: ./node_modules/debounce/index.js -var debounce = __webpack_require__(20296); -var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); -// EXTERNAL MODULE: ./app/utils/storage.js -var storage = __webpack_require__(31619); -;// CONCATENATED MODULE: ./app/pages/tree.js -function tree_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function tree_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function tree_createClass(Constructor, protoProps, staticProps) { if (protoProps) tree_defineProperties(Constructor.prototype, protoProps); if (staticProps) tree_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - -var sessionKey = 'grav:admin:pages'; - -if (!sessionStorage.getItem(sessionKey)) { - sessionStorage.setItem(sessionKey, '{}'); -} - -var PagesTree = /*#__PURE__*/function () { - function PagesTree(query) { - var _this = this; - - var elements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - tree_classCallCheck(this, PagesTree); - - this.query = query; - this.elements = external_jQuery_default()(elements !== undefined ? elements : this.query); - this.session = JSON.parse(sessionStorage.getItem(sessionKey) || '{}'); - - if (!this.elements.length) { - return; - } - - this.restore(); - this.elements.find('.page-icon').on('click', function (event) { - return _this.toggle(event.target); - }); - this.elements.data('tree_init', 1); - external_jQuery_default()('[data-page-toggleall]').on('click', function (event) { - var element = external_jQuery_default()(event.target).closest('[data-page-toggleall]'); - var action = element.data('page-toggleall'); - - _this[action](); - }); - } - - tree_createClass(PagesTree, [{ - key: "reload", - value: function reload() { - var elements = external_jQuery_default()(this.query).filter(function (index, element) { - return !external_jQuery_default()(element).data('tree_init'); - }); - - if (!elements.length) { - return; - } - - this.constructor(this.query, elements); - } - }, { - key: "toggle", - value: function toggle(elements) { - var _this2 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - elements = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")).find('[data-toggle="children"]'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this2.getState(element.closest('[data-toggle="children"]')); - - _this2[state.isOpen ? 'collapse' : 'expand'](state.id, dontStore); - }); - } - }, { - key: "collapse", - value: function collapse(elements) { - var _this3 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - elements = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")).find('[data-toggle="children"]'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this3.getState(element); - - if (state.isOpen) { - state.children.hide(); - state.icon.removeClass('children-open').addClass('children-closed'); - - if (!dontStore) { - delete _this3.session[state.id]; - } - } - }); - - if (!dontStore) { - this.save(); - } - } - }, { - key: "expand", - value: function expand(elements) { - var _this4 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - var element = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")); - var parents = element.parents('[data-nav-id]'); // loop back through parents, we don't want to expand an hidden child - - if (parents.length) { - parents = parents.find('[data-toggle="children"]:first'); - parents = parents.add(element.find('[data-toggle="children"]:first')); - return this.expand(parents, dontStore); - } - - elements = element.find('[data-toggle="children"]:first'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this4.getState(element); - - if (!state.isOpen) { - state.children.show(); - state.icon.removeClass('children-closed').addClass('children-open'); - - if (!dontStore) { - _this4.session[state.id] = 1; - } - } - }); - - if (!dontStore) { - this.save(); - } - } - }, { - key: "restore", - value: function restore() { - var _this5 = this; - - this.collapse(null, true); - Object.keys(this.session).forEach(function (key) { - _this5.expand(key, 'no-store'); - }); - } - }, { - key: "save", - value: function save() { - return sessionStorage.setItem(sessionKey, JSON.stringify(this.session)); - } - }, { - key: "getState", - value: function getState(element) { - element = external_jQuery_default()(element); - return { - id: element.closest('[data-nav-id]').data('nav-id'), - children: element.closest('li.page-item').find('ul:first'), - icon: element.find('.page-icon'), - - get isOpen() { - return this.icon.hasClass('children-open'); - } - - }; - } - }]); - - return PagesTree; -}(); - - -var tree_Instance = new PagesTree('[data-toggle="children"]'); - -// EXTERNAL MODULE: ./node_modules/selectize/dist/js/selectize.js -var selectize = __webpack_require__(25703); -var selectize_default = /*#__PURE__*/__webpack_require__.n(selectize); -;// CONCATENATED MODULE: ./app/utils/selectize-required-fix.js -/** - * This is a plugin to override the `.refreshValidityState` method of - * the Selectize library (https://selectize.github.io/selectize.js/). - * The library is not maintained anymore (as of 2017-09-13) and contains - * a bug which causes Microsoft Edge to not work with selectized [required] - * form fields. This plugin should be removed if - * https://github.com/selectize/selectize.js/pull/1320 is ever merged - * and a new version of Selectize gets released. - */ - -selectize_default().define('required-fix', function (options) { - var _this = this; - - this.refreshValidityState = function () { - if (!_this.isRequired) return false; - var invalid = !_this.items.length; - _this.isInvalid = invalid; - - if (invalid) { - _this.$control_input.attr('required', ''); - - _this.$input.removeAttr('required'); - } else { - _this.$control_input.removeAttr('required'); - - _this.$input.attr('required'); - } - }; -}); -;// CONCATENATED MODULE: ./app/pages/filter.js -function filter_typeof(obj) { "@babel/helpers - typeof"; return filter_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, filter_typeof(obj); } - -function filter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function filter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function filter_createClass(Constructor, protoProps, staticProps) { if (protoProps) filter_defineProperties(Constructor.prototype, protoProps); if (staticProps) filter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - - - - - - - -/* @formatter:off */ - -/* eslint-disable */ - -var options = [{ - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.MODULE, - key: 'Module', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.VISIBLE, - key: 'Visible', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ROUTABLE, - key: 'Routable', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.PUBLISHED, - key: 'Published', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_MODULE, - key: 'NonModule', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_VISIBLE, - key: 'NonVisible', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_ROUTABLE, - key: 'NonRoutable', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_PUBLISHED, - key: 'NonPublished', - cat: 'mode' -}]; -/* @formatter:on */ - -/* eslint-enable */ - -var PagesFilter = /*#__PURE__*/function () { - function PagesFilter(filters, search) { - var _this = this; - - filter_classCallCheck(this, PagesFilter); - - this.filters = external_jQuery_default()(filters); - this.search = external_jQuery_default()(search); - this.options = options; - this.tree = tree_Instance; - var storage = JSON.parse(localStorage.getItem('grav:admin:pages:filter') || '{}'); - - if (!this.filters.length || !this.search.length) { - return; - } - - this.labels = this.filters.data('filter-labels'); - this.search.on('input', debounce_default()(function () { - return _this.filter(); - }, 250)); - this.filters.on('change', function () { - return _this.filter(); - }); // restore state - - if (storage.flags || storage.query) { - this.setValues(storage); - this.filter(); - } - - this._initSelectize(); - } - - filter_createClass(PagesFilter, [{ - key: "filter", - value: function filter(value) { - var _this2 = this; - - var data = { - flags: '', - query: '' - }; - - if (filter_typeof(value) === 'object') { - Object.assign(data, value); - } - - if (typeof value === 'string') { - data.query = value; - } - - if (typeof value === 'undefined') { - data.flags = this.filters.val(); - data.query = this.search.val(); - } - - if (!Object.keys(data).filter(function (key) { - return data[key] !== ''; - }).length) { - this.resetValues(); - return; - } - - data.flags = data.flags.replace(/(\s{1,})?,(\s{1,})?/g, ','); - this.setValues({ - flags: data.flags, - query: data.query - }, 'silent'); - utils_request("".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/pages-filter.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "filterPages"), { - method: 'post', - body: data - }, function (response) { - _this2.refreshDOM(response); - }); - } - }, { - key: "refreshDOM", - value: function refreshDOM(response) { - var _this3 = this; - - var items = external_jQuery_default()('[data-nav-id]'); - - if (!response) { - items.removeClass('search-match').show(); - this.tree.restore(); - return; - } - - items.removeClass('search-match').hide(); - response.results.forEach(function (page) { - var match = items.filter("[data-nav-id=\"".concat(page, "\"]")).addClass('search-match').show(); - match.parents('[data-nav-id]').addClass('search-match').show(); - - _this3.tree.expand(page, 'no-store'); - }); - } - }, { - key: "setValues", - value: function setValues(_ref, silent) { - var _ref$flags = _ref.flags, - flags = _ref$flags === void 0 ? '' : _ref$flags, - _ref$query = _ref.query, - query = _ref$query === void 0 ? '' : _ref$query; - var flagsArray = flags.replace(/(\s{1,})?,(\s{1,})?/g, ',').split(','); - - if (this.filters.val() !== flags) { - var selectize = this.filters.data('selectize'); - this.filters[selectize ? 'setValue' : 'val'](flagsArray, silent); - } - - if (this.search.val() !== query) { - this.search.val(query); - } - - localStorage.setItem('grav:admin:pages:filter', JSON.stringify({ - flags: flags, - query: query - })); - } - }, { - key: "resetValues", - value: function resetValues() { - this.setValues('', 'silent'); - this.refreshDOM(); - } - }, { - key: "_initSelectize", - value: function _initSelectize() { - var _this4 = this; - - var extras = { - type: this.filters.data('filter-types') || {}, - access: this.filters.data('filter-access-levels') || {} - }; - Object.keys(extras).forEach(function (cat) { - Object.keys(extras[cat]).forEach(function (key) { - _this4.options.push({ - cat: cat, - key: key, - flag: extras[cat][key] - }); - }); - }); - this.filters.selectize({ - maxItems: null, - valueField: 'key', - labelField: 'flag', - searchField: ['flag', 'key'], - options: this.options, - optgroups: this.labels, - optgroupField: 'cat', - optgroupLabelField: 'name', - optgroupValueField: 'id', - optgroupOrder: this.labels.map(function (item) { - return item.id; - }), - plugins: ['optgroup_columns', 'required-fix'] - }); - } - }]); - - return PagesFilter; -}(); - - -var filter_Instance = new PagesFilter('input[name="page-filter"]', 'input[name="page-search"]'); - -// EXTERNAL MODULE: ./node_modules/speakingurl/index.js -var speakingurl = __webpack_require__(989); -var speakingurl_default = /*#__PURE__*/__webpack_require__.n(speakingurl); -;// CONCATENATED MODULE: ./app/utils/jquery-utils.js -var _this = undefined; - - - // jQuery no parents filter - -(external_jQuery_default()).expr[":"].noparents = external_jQuery_default().expr.createPseudo(function (text) { - return function (element) { - return external_jQuery_default()(element).parents(text).length < 1; - }; -}); // Slugify -// CommonJS and ES6 version of https://github.com/madflow/jquery-slugify - -(external_jQuery_default()).fn.slugify = function (source, options) { - return _this.each(function (element) { - var target = external_jQuery_default()(element); - var source = external_jQuery_default()(source); - target.on('keyup change', function () { - target.data('locked', target.val() !== '' && target.val() !== undefined); - }); - source.on('keyup change', function () { - if (target.data('locked') === true) { - return true; - } - - var isInput = target.is('input') || target.is('textarea'); - target[isInput ? 'val' : 'text'](external_jQuery_default().slugify(source.val(), options)); - }); - }); -}; // Static method. - - -(external_jQuery_default()).slugify = function (sourceString, options) { - options = external_jQuery_default().extend({}, (external_jQuery_default()).slugify.options, options); - options.lang = options.lang || external_jQuery_default()('html').prop('lang'); - - if (typeof options.preSlug === 'function') { - sourceString = options.preSlug(sourceString); - } - - sourceString = options.slugFunc(sourceString, options); - - if (typeof options.postSlug === 'function') { - sourceString = options.postSlug(sourceString); - } - - return sourceString; -}; // Default plugin options - - -(external_jQuery_default()).slugify.options = { - preSlug: null, - postSlug: null, - slugFunc: function slugFunc(input, opts) { - return speakingurl_default()(input, opts); - } -}; -;// CONCATENATED MODULE: ./app/pages/page/add.js - - - - -var custom = false; -var folder = external_jQuery_default()('[data-remodal-id="modal"] input[name="data[folder]"], [data-remodal-id="module"] input[name="data[folder]"], [data-remodal-id="modal-page-copy"] input[name="data[folder]"]'); -var title = external_jQuery_default()('[data-remodal-id="modal"] input[name="data[title]"], [data-remodal-id="module"] input[name="data[title]"], [data-remodal-id="modal-page-copy"] input[name="data[title]"]'); - -var getFields = function getFields(type, target) { - target = external_jQuery_default()(target); - var query = "[data-remodal-id=\"".concat(target.closest('[data-remodal-id]').data('remodal-id'), "\"]"); - return { - title: type === 'title' ? external_jQuery_default()(target) : external_jQuery_default()("".concat(query, " input[name=\"data[title]\"]")), - folder: type === 'folder' ? external_jQuery_default()(target) : external_jQuery_default()("".concat(query, " input[name=\"data[folder]\"]")) - }; -}; - -title.on('input focus blur', function (event) { - if (custom) { - return true; - } - - var elements = getFields('title', event.currentTarget); - var slug = external_jQuery_default().slugify(elements.title.val(), { - custom: { - "'": '', - '‘': '', - '’': '' - } - }); - elements.folder.val(slug); -}); -folder.on('input', function (event) { - var elements = getFields('folder', event.currentTarget); - var input = elements.folder.get(0); - var value = elements.folder.val(); - var selection = { - start: input.selectionStart, - end: input.selectionEnd - }; - value = value.toLowerCase().replace(/\s/g, '-').replace(/[^a-z0-9_\-]/g, ''); - elements.folder.val(value); - custom = !!value; // restore cursor position - - input.setSelectionRange(selection.start, selection.end); -}); -folder.on('focus blur', function (event) { - getFields('title').title.trigger('input'); -}); -external_jQuery_default()(document).on('change', '[name="data[route]"]', function (event) { - var rawroute = external_jQuery_default()(event.currentTarget).val(); - var pageTemplate = external_jQuery_default()('[name="data[name]"]'); - var URI = "".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/ajax.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "getChildTypes"); - - if (pageTemplate.length === 0) { - return; - } - - utils_request(URI, { - method: 'post', - body: { - rawroute: rawroute - } - }, function (response) { - var type = response.child_type; - - if (type !== '' && type !== 'default') { - pageTemplate.val(type); - pageTemplate.data('selectize').setValue(type); - } - }); -}); -;// CONCATENATED MODULE: ./app/pages/page/move.js - -external_jQuery_default()(document).on('click', '[data-page-move] button[name="task"][value="save"]', function (event) { - /* let route = $('form#blueprints:first select[name="data[route]"]'); - let moveTo = $('[data-page-move] select').val(); - if (route.length && route.val() !== moveTo) { - let selectize = route.data('selectize'); - route.val(moveTo); - if (selectize) selectize.setValue(moveTo); - }*/ - var modal = external_jQuery_default()(event.currentTarget).closest('[data-remodal-id]'); - var parents = modal.data('parents') || {}; - var finder = parents.finder; - - if (!parents || !finder) { - return true; - } - - var field = parents.field; - var parentLabel = parents.parentLabel; - var parentName = parents.parentName; - var selection = finder.findLastActive().item[0]; - var value = selection._item[finder.config.valueKey]; - var name = selection._item[finder.config.labelKey]; - field.val(value); - parentLabel.text(value); - parentName.text(name); - finder.config.defaultPath = value; - external_jQuery_default()('').css({ - backgroundColor: 'rgba(255, 255, 255, 0.1)', - position: 'fixed', - top: 0, - left: 0, - width: '100vw', - height: '100vh', - zIndex: 15000 - }).appendTo(external_jQuery_default()('body')); -}); -/* -$(document).on('click', '[data-remodal-id="parents"] [data-parents-select]', (event) => { - const modal = $(event.currentTarget).closest('[data-remodal-id]'); - const parents = modal.data('parents'); - const finder = parents.finder; - const field = parents.field; - const parentLabel = parents.parentLabel; - const parentName = parents.parentName; - const selection = finder.findLastActive().item[0]; - const value = selection._item[finder.config.valueKey]; - const name = selection._item[finder.config.labelKey]; - - field.val(value); - parentLabel.text(value); - parentName.text(name); - finder.config.defaultPath = value; - - const remodal = $.remodal.lookup[$(`[data-remodal-id="${modal.data('remodalId')}"]`).data('remodal')]; - remodal.close(); -}); -*/ -;// CONCATENATED MODULE: ./app/pages/page/delete.js - -external_jQuery_default()(document).on('click', '[data-remodal-target="delete"]', function () { - var confirm = external_jQuery_default()('[data-remodal-id="delete"] [data-delete-action]'); - var link = external_jQuery_default()(this).data('delete-url'); - confirm.data('delete-action', link); -}); -external_jQuery_default()(document).on('click', '[data-delete-action]', function () { - var remodal = (external_jQuery_default()).remodal.lookup[external_jQuery_default()('[data-remodal-id="delete"]').data('remodal')]; - __webpack_require__.g.location.href = external_jQuery_default()(this).data('delete-action'); - remodal.close(); -}); -;// CONCATENATED MODULE: ./app/pages/page/unset.js - -external_jQuery_default()(document).on('click', '.dz-unset', function () { - var file_upload = external_jQuery_default()(this).closest('.files-upload'); - external_jQuery_default()(this).closest('.dz-image-preview').remove(); - var unset_image = external_jQuery_default()(this).closest('.dz-image-preview').find('[data-dz-name]').text().trim(); - var images = JSON.parse(file_upload.find('input[data-grav-field="hidden"]').val()) || {}; - var image_array = {}; - external_jQuery_default().each(images, function (ind, obj) { - if (!ind.endsWith(unset_image)) { - image_array[ind] = obj; - } - }); - file_upload.find('input[data-grav-field="hidden"]').val(JSON.stringify(image_array)); -}); -;// CONCATENATED MODULE: ./app/pages/page/disable-buttons.js - -external_jQuery_default()('.disable-after-click').on('click', function () { - external_jQuery_default()(this).addClass('pointer-events-disabled'); -}); -;// CONCATENATED MODULE: ./app/utils/cookies.js -function cookies_typeof(obj) { "@babel/helpers - typeof"; return cookies_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, cookies_typeof(obj); } - -/* - * Cookies.js - 1.2.3-grav - * https://github.com/ScottHamper/Cookies - * - * With SameSite support by Grav - * - * This is free and unencumbered software released into the public domain. - */ -var factory = function factory(window) { - var _arguments = arguments; - - if (cookies_typeof(window.document) !== 'object') { - throw new Error('Cookies.js requires a `window` with a `document` object'); - } - - var Cookies = function Cookies(key, value, options) { - return _arguments.length === 1 ? Cookies.get(key) : Cookies.set(key, value, options); - }; // Allows for setter injection in unit tests - - - Cookies._document = window.document; // Used to ensure cookie keys do not collide with - // built-in `Object` properties - - Cookies._cacheKeyPrefix = 'cookey.'; // Hurr hurr, :) - - Cookies._maxExpireDate = new Date('Fri, 31 Dec 9999 23:59:59 UTC'); - Cookies.defaults = { - path: '/', - secure: false, - sameSite: 'Lax' - }; - - Cookies.get = function (key) { - if (Cookies._cachedDocumentCookie !== Cookies._document.cookie) { - Cookies._renewCache(); - } - - var value = Cookies._cache[Cookies._cacheKeyPrefix + key]; - return value === undefined ? undefined : decodeURIComponent(value); - }; - - Cookies.set = function (key, value, options) { - options = Cookies._getExtendedOptions(options); - options.expires = Cookies._getExpiresDate(value === undefined ? -1 : options.expires); - Cookies._document.cookie = Cookies._generateCookieString(key, value, options); - return Cookies; - }; - - Cookies.expire = function (key, options) { - return Cookies.set(key, undefined, options); - }; - - Cookies._getExtendedOptions = function (options) { - return { - path: options && options.path || Cookies.defaults.path, - domain: options && options.domain || Cookies.defaults.domain, - expires: options && options.expires || Cookies.defaults.expires, - secure: options && options.secure !== undefined ? options.secure : Cookies.defaults.secure, - sameSite: options && options.sameSite || Cookies.defaults.sameSite - }; - }; - - Cookies._isValidDate = function (date) { - return Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime()); - }; - - Cookies._getExpiresDate = function (expires, now) { - now = now || new Date(); - - if (typeof expires === 'number') { - expires = expires === Infinity ? Cookies._maxExpireDate : new Date(now.getTime() + expires * 1000); - } else if (typeof expires === 'string') { - expires = new Date(expires); - } - - if (expires && !Cookies._isValidDate(expires)) { - throw new Error('`expires` parameter cannot be converted to a valid Date instance'); - } - - return expires; - }; - - Cookies._generateCookieString = function (key, value, options) { - key = key.replace(/[^#$&+\^`|]/g, encodeURIComponent); - key = key.replace(/\(/g, '%28').replace(/\)/g, '%29'); - value = (value + '').replace(/[^!#$&-+\--:<-\[\]-~]/g, encodeURIComponent); - options = options || {}; - var cookieString = key + '=' + value; - cookieString += options.path ? ';path=' + options.path : ''; - cookieString += options.domain ? ';domain=' + options.domain : ''; - cookieString += options.expires ? ';expires=' + options.expires.toUTCString() : ''; - cookieString += options.secure ? ';secure' : ''; - cookieString += options.sameSite ? ';SameSite=' + options.sameSite : ''; - return cookieString; - }; - - Cookies._getCacheFromString = function (documentCookie) { - var cookieCache = {}; - var cookiesArray = documentCookie ? documentCookie.split('; ') : []; - - for (var i = 0; i < cookiesArray.length; i++) { - var cookieKvp = Cookies._getKeyValuePairFromCookieString(cookiesArray[i]); - - if (cookieCache[Cookies._cacheKeyPrefix + cookieKvp.key] === undefined) { - cookieCache[Cookies._cacheKeyPrefix + cookieKvp.key] = cookieKvp.value; - } - } - - return cookieCache; - }; - - Cookies._getKeyValuePairFromCookieString = function (cookieString) { - // "=" is a valid character in a cookie value according to RFC6265, so cannot `split('=')` - var separatorIndex = cookieString.indexOf('='); // IE omits the "=" when the cookie value is an empty string - - separatorIndex = separatorIndex < 0 ? cookieString.length : separatorIndex; - var key = cookieString.substr(0, separatorIndex); - var decodedKey; - - try { - decodedKey = decodeURIComponent(key); - } catch (e) { - if (console && typeof console.error === 'function') { - console.error('Could not decode cookie with key "' + key + '"', e); - } - } - - return { - key: decodedKey, - value: cookieString.substr(separatorIndex + 1) // Defer decoding value until accessed - - }; - }; - - Cookies._renewCache = function () { - Cookies._cache = Cookies._getCacheFromString(Cookies._document.cookie); - Cookies._cachedDocumentCookie = Cookies._document.cookie; - }; - - Cookies._areEnabled = function () { - var testKey = 'cookies.js'; - var areEnabled = Cookies.set(testKey, 1).get(testKey) === '1'; - Cookies.expire(testKey); - return areEnabled; - }; - - Cookies.enabled = Cookies._areEnabled(); - return Cookies; -}; - -__webpack_require__.g.Cookies = __webpack_require__.g && cookies_typeof(__webpack_require__.g.document) === 'object' ? factory(__webpack_require__.g) : factory; -/* harmony default export */ const cookies = (__webpack_require__.g.Cookies); -;// CONCATENATED MODULE: ./app/forms/fields/editor/buttons.js - - - - -var replacer = function replacer(_ref) { - var name = _ref.name, - replace = _ref.replace, - codemirror = _ref.codemirror, - button = _ref.button, - _ref$mode = _ref.mode, - mode = _ref$mode === void 0 ? 'replaceSelections' : _ref$mode, - runner = _ref.runner; - button.on("click.editor.".concat(name), function () { - strategies[mode]({ - token: '$1', - template: replace, - codemirror: codemirror, - runner: runner - }); - }); -}; - -var strategies = { - replaceSelections: function replaceSelections(_ref2) { - var template = _ref2.template, - token = _ref2.token, - codemirror = _ref2.codemirror, - runner = _ref2.runner; - var replacements = []; - var ranges = []; - var selections = codemirror.getSelections(); - var list = codemirror.listSelections(); - var accumulator = {}; - selections.forEach(function (selection, index) { - var markup = template.replace(token, selection); - var cursor = markup.indexOf('$cur'); - var _list$index$anchor = list[index].anchor, - line = _list$index$anchor.line, - ch = _list$index$anchor.ch; - markup = markup.replace('$cur', ''); - markup = runner ? runner(selection, markup, list) : markup; - replacements.push(markup); - - if (!accumulator[line]) { - accumulator[line] = 0; - } - - ch += accumulator[line] + (cursor === -1 ? markup.length : cursor); - var range = { - ch: ch, - line: line - }; - ranges.push({ - anchor: range, - head: range - }); - accumulator[line] += markup.length - selection.length; - }); - codemirror.replaceSelections(replacements); - codemirror.setSelections(ranges); - codemirror.focus(); - }, - replaceLine: function replaceLine(_ref3) { - var template = _ref3.template, - token = _ref3.token, - codemirror = _ref3.codemirror, - runner = _ref3.runner; - var list = codemirror.listSelections(); - var range; - list.forEach(function (selection) { - var lines = { - min: Math.min(selection.anchor.line, selection.head.line), - max: Math.max(selection.anchor.line, selection.head.line) - }; - codemirror.eachLine(lines.min, lines.max + 1, function (handler) { - var markup = template.replace(token, handler.text); - var line = codemirror.getLineNumber(handler); - markup = runner ? runner(handler, markup) : markup; - codemirror.replaceRange(markup, { - line: line, - ch: 0 - }, { - line: line, - ch: markup.length - }); - range = { - line: line, - ch: markup.length - }; - }); - }); - codemirror.setSelection(range, range, 'end'); - codemirror.focus(); - }, - replaceRange: function replaceRange() {} -}; - -var flipDisabled = function flipDisabled(codemirror, button, type) { - var hasHistory = codemirror.historySize()[type]; - var element = button.find('a'); - button[hasHistory ? 'removeClass' : 'addClass']('button-disabled'); - - if (!hasHistory) { - element.attr('title-disabled', element.attr('title')); - element.attr('data-hint-disabled', element.attr('data-hint')); - element.removeAttr('title').removeAttr('data-hint'); - } else { - element.attr('title', element.attr('title-disabled')); - element.attr('data-hint', element.attr('data-hint-disabled')); - element.removeAttr('title-disabled').removeAttr('data-hint-disabled'); - } -}; - -/* harmony default export */ const buttons = ({ - navigation: [{ - undo: { - identifier: 'undo', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UNDO, - label: '', - modes: [], - action: function action(_ref4) { - var codemirror = _ref4.codemirror, - button = _ref4.button, - textarea = _ref4.textarea; - button.addClass('button-disabled'); - codemirror.on('change', function () { - return flipDisabled(codemirror, button, 'undo'); - }); - button.on('click.editor.undo', function () { - codemirror.undo(); - }); - } - } - }, { - redo: { - identifier: 'redo', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.REDO, - label: '', - modes: [], - action: function action(_ref5) { - var codemirror = _ref5.codemirror, - button = _ref5.button, - textarea = _ref5.textarea; - button.addClass('button-disabled'); - codemirror.on('change', function () { - return flipDisabled(codemirror, button, 'redo'); - }); - button.on('click.editor.redo', function () { - codemirror.redo(); - }); - } - } - }, { - headers: { - identifier: 'headers', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.HEADERS, - label: '', - modes: ['gfm', 'markdown'], - children: [{ - h1: { - identifier: 'h1', - label: '1', - modes: ['gfm', 'markdown'], - action: function action(_ref6) { - var codemirror = _ref6.codemirror, - button = _ref6.button, - textarea = _ref6.textarea; - replacer({ - name: 'h1', - replace: '# $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h2: { - identifier: 'h2', - label: '2', - modes: ['gfm', 'markdown'], - action: function action(_ref7) { - var codemirror = _ref7.codemirror, - button = _ref7.button, - textarea = _ref7.textarea; - replacer({ - name: 'h2', - replace: '## $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h3: { - identifier: 'h3', - label: '3', - modes: ['gfm', 'markdown'], - action: function action(_ref8) { - var codemirror = _ref8.codemirror, - button = _ref8.button, - textarea = _ref8.textarea; - replacer({ - name: 'h3', - replace: '### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h4: { - identifier: 'h4', - label: '4', - modes: ['gfm', 'markdown'], - action: function action(_ref9) { - var codemirror = _ref9.codemirror, - button = _ref9.button, - textarea = _ref9.textarea; - replacer({ - name: 'h4', - replace: '#### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h5: { - identifier: 'h5', - label: '5', - modes: ['gfm', 'markdown'], - action: function action(_ref10) { - var codemirror = _ref10.codemirror, - button = _ref10.button, - textarea = _ref10.textarea; - replacer({ - name: 'h5', - replace: '##### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h6: { - identifier: 'h6', - label: '6', - modes: ['gfm', 'markdown'], - action: function action(_ref11) { - var codemirror = _ref11.codemirror, - button = _ref11.button, - textarea = _ref11.textarea; - replacer({ - name: 'h6', - replace: '###### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }] - } - }, { - bold: { - identifier: 'bold', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.BOLD, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-B', 'Cmd-B'], - action: function action(_ref12) { - var codemirror = _ref12.codemirror, - button = _ref12.button, - textarea = _ref12.textarea; - replacer({ - name: 'bold', - replace: '**$1$cur**', - codemirror: codemirror, - button: button - }); - } - } - }, { - italic: { - identifier: 'italic', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ITALIC, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-I', 'Cmd-I'], - action: function action(_ref13) { - var codemirror = _ref13.codemirror, - button = _ref13.button, - textarea = _ref13.textarea; - replacer({ - name: 'italic', - replace: '_$1$cur_', - codemirror: codemirror, - button: button - }); - } - } - }, { - strike: { - identifier: 'strike', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.STRIKETHROUGH, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref14) { - var codemirror = _ref14.codemirror, - button = _ref14.button, - textarea = _ref14.textarea; - replacer({ - name: 'strike', - replace: '~~$1$cur~~', - codemirror: codemirror, - button: button - }); - } - } - }, { - delimiter: { - identifier: 'delimiter', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.SUMMARY_DELIMITER, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref15) { - var codemirror = _ref15.codemirror, - button = _ref15.button, - textarea = _ref15.textarea; - replacer({ - name: 'delimiter', - replace: "".concat(external_GravAdmin_namespaceObject.config.site.delimiter, "$1"), - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - link: { - identifier: 'link', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.LINK, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-K', 'Cmd-K'], - action: function action(_ref16) { - var codemirror = _ref16.codemirror, - button = _ref16.button, - textarea = _ref16.textarea; - replacer({ - name: 'link', - replace: '[$1]($cur)', - codemirror: codemirror, - button: button - }); - } - } - }, { - image: { - identifier: 'image', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.IMAGE, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref17) { - var codemirror = _ref17.codemirror, - button = _ref17.button, - textarea = _ref17.textarea; - replacer({ - name: 'image', - replace: '![$1]($cur)', - codemirror: codemirror, - button: button - }); - } - } - }, { - blockquote: { - identifier: 'blockquote', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.BLOCKQUOTE, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref18) { - var codemirror = _ref18.codemirror, - button = _ref18.button, - textarea = _ref18.textarea; - replacer({ - name: 'blockquote', - replace: '> $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - listUl: { - identifier: 'listUl', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UNORDERED_LIST, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref19) { - var codemirror = _ref19.codemirror, - button = _ref19.button, - textarea = _ref19.textarea; - replacer({ - name: 'listUl', - replace: '* $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - listOl: { - identifier: 'listOl', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ORDERED_LIST, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref20) { - var codemirror = _ref20.codemirror, - button = _ref20.button, - textarea = _ref20.textarea; - replacer({ - name: 'listOl', - replace: '. $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine', - runner: function runner(line, markup) { - var lineNo = codemirror.getLineNumber(line); - var previousLine = codemirror.getLine(lineNo - 1) || ''; - var match = previousLine.match(/^(\d+)\./); - var prefix = 1 + (match ? Number(match[1]) : 0); - return "".concat(prefix).concat(markup); - } - }); - } - } - }], - states: [{ - code: { - identifier: 'editor', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.EDITOR, - label: '', - action: function action(_ref21) { - var codemirror = _ref21.codemirror, - button = _ref21.button, - textarea = _ref21.textarea, - ui = _ref21.ui; - - if (textarea.data('grav-editor-mode') === 'editor') { - button.addClass('editor-active'); - } - - button.on('click.states.editor', function () { - button.siblings().removeClass('editor-active'); - button.addClass('editor-active'); - textarea.data('grav-editor-mode', 'editor'); - var previewContainer = textarea.data('grav-editor-preview-container'); - var content = textarea.parent('.grav-editor-content'); - content.addClass('is-active'); - ui.navigation.find('.grav-editor-actions').css('visibility', 'visible'); - - if (previewContainer) { - previewContainer.removeClass('is-active'); - } - }); - } - } - }, { - preview: { - identifier: 'preview', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.PREVIEW, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref22) { - var codemirror = _ref22.codemirror, - button = _ref22.button, - textarea = _ref22.textarea, - ui = _ref22.ui; - - if (textarea.data('grav-editor-mode') === 'preview') { - button.addClass('editor-active'); - } - - button.on('click.states.preview', function () { - var previewContainer = textarea.data('grav-editor-preview-container'); - var content = textarea.parent('.grav-editor-content'); - button.siblings().removeClass('editor-active'); - button.addClass('editor-active'); - textarea.data('grav-editor-mode', 'preview'); - - if (!previewContainer) { - previewContainer = external_jQuery_default()(''); - content.after(previewContainer); - textarea.data('grav-editor-preview-container', previewContainer); - } - - previewContainer.css({ - height: content.height() - }); - previewContainer.addClass('is-active'); - content.removeClass('is-active'); - ui.navigation.find('.grav-editor-actions').css('visibility', 'hidden'); - var url = "".concat(textarea.data('grav-urlpreview'), "/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "processmarkdown"); - var params = textarea.closest('form').serializeArray(); - var body = {}; - params.map(function (obj) { - body[obj.name] = obj.value; - }); - utils_request(url, { - method: 'post', - body: body - }, function (response) { - return previewContainer.html(response.preview); - }); - }); - } - } - }, { - fullscreen: { - identifier: 'fullscreen', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FULLSCREEN, - label: '', - action: function action(_ref23) { - var codemirror = _ref23.codemirror, - button = _ref23.button, - textarea = _ref23.textarea; - button.on('click.editor.fullscreen', function () { - var container = textarea.closest('.grav-editor'); - var wrapper = codemirror.getWrapperElement(); - var contentWrapper = external_jQuery_default()('.content-wrapper'); - - if (!container.hasClass('grav-editor-fullscreen')) { - textarea.data('fullScreenRestore', { - scrollTop: __webpack_require__.g.pageYOffset, - scrollLeft: __webpack_require__.g.pageXOffset, - width: wrapper.style.width, - height: wrapper.style.height - }); - wrapper.style.width = ''; - wrapper.style.height = textarea.parent('.grav-editor-content').height() + 'px'; - __webpack_require__.g.document.documentElement.style.overflow = 'hidden'; - var hints = container.find('.grav-editor-toolbar .hint--top'); - - if (hints) { - hints.removeClass('hint--top').addClass('hint--bottom'); - external_jQuery_default()(hints[hints.length - 1]).addClass('hint--bottom-left'); - } - - if (contentWrapper) { - contentWrapper.css('overflow', 'visible'); - } - } else { - __webpack_require__.g.document.documentElement.style.overflow = ''; - var state = textarea.data('fullScreenRestore'); - wrapper.style.width = state.width; - wrapper.style.height = state.height; - __webpack_require__.g.scrollTo(state.scrollLeft, state.scrollTop); - - var _hints = container.find('.grav-editor-toolbar .hint--bottom'); - - if (_hints) { - _hints.removeClass('hint--bottom').addClass('hint--top'); - - external_jQuery_default()(_hints[_hints.length - 1]).removeClass('hint--bottom-left'); - } - - if (contentWrapper) { - contentWrapper.css('overflow', 'auto'); - } - } - - container.toggleClass('grav-editor-fullscreen'); - setTimeout(function () { - codemirror.refresh(); // this.preview.parent().css('height', this.code.height()); - - external_jQuery_default()(__webpack_require__.g).trigger('resize'); - }, 5); - }); - } - } - }] -}); -// EXTERNAL MODULE: ./node_modules/codemirror/lib/codemirror.js -var codemirror = __webpack_require__(4631); -var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror); -// EXTERNAL MODULE: ./node_modules/watchjs/src/watch.js -var watch = __webpack_require__(29950); -// EXTERNAL MODULE: ./node_modules/js-yaml/dist/js-yaml.mjs -var js_yaml = __webpack_require__(1272); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/css/css.js -var css = __webpack_require__(36629); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/gfm/gfm.js -var gfm = __webpack_require__(42425); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/htmlmixed/htmlmixed.js -var htmlmixed = __webpack_require__(16531); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/javascript/javascript.js -var javascript = __webpack_require__(96876); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/markdown/markdown.js -var markdown = __webpack_require__(49047); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/php/php.js -var php = __webpack_require__(36702); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/sass/sass.js -var sass = __webpack_require__(81201); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/twig/twig.js -var twig = __webpack_require__(54702); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/xml/xml.js -var xml = __webpack_require__(29589); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/yaml/yaml.js -var yaml = __webpack_require__(53631); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/edit/continuelist.js -var continuelist = __webpack_require__(23350); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/mode/overlay.js -var overlay = __webpack_require__(14146); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/selection/active-line.js -var active_line = __webpack_require__(20017); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/lint.js -var lint = __webpack_require__(3256); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/lint.css -var lint_lint = __webpack_require__(46226); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/css-lint.js -var css_lint = __webpack_require__(41423); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/javascript-lint.js -var javascript_lint = __webpack_require__(96477); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/json-lint.js -var json_lint = __webpack_require__(62193); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/yaml-lint.js -var yaml_lint = __webpack_require__(82783); -;// CONCATENATED MODULE: ./app/forms/fields/editor.js -function editor_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function editor_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function editor_createClass(Constructor, protoProps, staticProps) { if (protoProps) editor_defineProperties(Constructor.prototype, protoProps); if (staticProps) editor_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } - - - - - - -__webpack_require__.g.jsyaml = js_yaml/* default */.ZP; // Modes - - - - - - - - - - - // Add-ons - - - - - - - - - - -var IS_MOUSEDOWN = false; -var ThemesMap = ['paper']; -var Defaults = { - codemirror: { - mode: 'htmlmixed', - theme: 'paper', - lineWrapping: true, - dragDrop: true, - autoCloseTags: true, - matchTags: true, - autoCloseBrackets: true, - matchBrackets: true, - indentUnit: 4, - indentWithTabs: false, - tabSize: 4, - hintOptions: { - completionSingle: false - }, - extraKeys: { - 'Enter': 'newlineAndIndentContinueMarkdownList' - } - } -}; - -var EditorField = /*#__PURE__*/function () { - function EditorField(options) { - var _this = this; - - editor_classCallCheck(this, EditorField); - - var body = external_jQuery_default()('body'); - this.editors = external_jQuery_default()(); - this.options = Object.assign({}, Defaults, options); - this.buttons = buttons; - this.buttonStrategies = strategies; - (0,watch.watch)(buttons, function - /* key, modifier, prev, next */ - () { - _this.editors.each(function (index, editor) { - return external_jQuery_default()(editor).data('toolbar').renderButtons(); - }); - }); - external_jQuery_default()('[data-grav-editor]').each(function (index, editor) { - return _this.addEditor(editor); - }); - external_jQuery_default()(function () { - body.trigger('grav-editor-ready'); - }); - body.on('mutation._grav', this._onAddedNodes.bind(this)); - body.on('mouseup._grav', function () { - if (!IS_MOUSEDOWN) { - return true; - } - - body.unbind('mousemove._grav'); - IS_MOUSEDOWN = false; - }); - body.on('mousedown._grav', '.grav-editor-resizer', function (event) { - event && event.preventDefault(); - IS_MOUSEDOWN = true; - var target = external_jQuery_default()(event.currentTarget); - var container = target.siblings('.grav-editor-content'); - var editor = container.find('.CodeMirror'); - var codemirror = container.find('textarea').data('codemirror'); - body.on('mousemove._grav', function (event) { - editor.css('height', Math.max(100, event.pageY - container.offset().top)); - codemirror.refresh(); - }); - }); - } - - editor_createClass(EditorField, [{ - key: "addButton", - value: function addButton(button, options) { - if (options && (options.before || options.after)) { - var index = this.buttons.navigation.findIndex(function (obj) { - var key = Object.keys(obj).shift(); - return obj[key].identifier === (options.before || options.after); - }); - - if (!~index) { - options = 'end'; - } else { - this.buttons.navigation.splice(options.before ? index : index + 1, 0, button); - } - } - - if (options === 'start') { - this.buttons.navigation.splice(0, 0, button); - } - - if (!options || options === 'end') { - this.buttons.navigation.push(button); - } - } - }, { - key: "addEditor", - value: function addEditor(textarea) { - textarea = external_jQuery_default()(textarea); - var options = Object.assign({}, this.options.codemirror, textarea.data('grav-editor').codemirror); - var theme = options.theme || 'paper'; - this.editors = this.editors.add(textarea); - - if (theme && !~ThemesMap.indexOf(theme)) { - ThemesMap.push(theme); // let themeCSS = `https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.12.0/theme/${theme}.min.css`; - // $('head').append($('').attr('href', themeCSS)); - } - - if (options.mode === 'yaml') { - Object.assign(options.extraKeys, { - Tab: function Tab(cm) { - cm.replaceSelection(' ', 'end'); - } - }); - } - - var editor = codemirror_default().fromTextArea(textarea.get(0), options); - textarea.data('codemirror', editor); - textarea.data('toolbar', new Toolbar(textarea)); - textarea.addClass('code-mirrored'); - - if (options.toolbar === false) { - textarea.data('toolbar').ui.navigation.addClass('grav-editor-hide-toolbar'); - } - - editor.on('change', function () { - return editor.save(); - }); - } - }, { - key: "_onAddedNodes", - value: function _onAddedNodes(event, target - /* , record, instance */ - ) { - var _this2 = this; - - var editors = external_jQuery_default()(target).find('[data-grav-editor]'); - - if (!editors.length) { - return; - } - - editors.each(function (index, editor) { - editor = external_jQuery_default()(editor); - - if (!~_this2.editors.index(editor)) { - _this2.addEditor(editor); - } - }); - } - }]); - - return EditorField; -}(); - - -var Toolbar = /*#__PURE__*/function () { - function Toolbar(editor) { - editor_classCallCheck(this, Toolbar); - - this.editor = external_jQuery_default()(editor); - this.codemirror = this.editor.data('codemirror'); - this.buttons = buttons.navigation; - this.ui = { - navigation: external_jQuery_default()(Toolbar.templates().navigation) - }; - this.editor.parent('.grav-editor-content').before(this.ui.navigation).after(this.ui.states); - this.renderButtons(); - } - - editor_createClass(Toolbar, [{ - key: "renderButtons", - value: function renderButtons() { - var _this3 = this; - - var map = { - 'actions': 'navigation', - 'modes': 'states' - }; - ['actions', 'modes'].forEach(function (type) { - _this3.ui.navigation.find(".grav-editor-".concat(type)).empty().append('\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD, \" {{fileName}}
\\n\").concat(response.message, \"\")\n });\n }\n }, {\n key: \"onDropzoneComplete\",\n value: function onDropzoneComplete(file) {\n if (!file.accepted && !file.rejected) {\n var data = {\n status: 'error',\n message: \"\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_UNSUPPORTED, \": \").concat(file.name.match(/\\..+/).join(''))\n };\n return this.handleError({\n file: file,\n data: data,\n mode: 'removeFile',\n msg: \"
\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_ERROR_ADD, \" {{fileName}}
\\n\").concat(data.message, \"\")\n });\n }\n if (this.options.reloadPage) {\n __webpack_require__.g.location.reload();\n }\n }\n }, {\n key: \"b64_to_utf8\",\n value: function b64_to_utf8(str) {\n str = str.replace(/\\s/g, '');\n return decodeURIComponent(escape(window.atob(str)));\n }\n }, {\n key: \"onDropzoneAddedFile\",\n value: function onDropzoneAddedFile(file) {\n return this.dropzone.options.addedfile(file);\n }\n }, {\n key: \"onDropzoneRemovedFile\",\n value: function onDropzoneRemovedFile(file) {\n var _this5 = this;\n if (!file.accepted || file.rejected) {\n return;\n }\n var url = file.removeUrl || this.urls[\"delete\"] || this.options.url;\n var path = (url || '').match(/path:(.*)\\//);\n var body = {\n filename: file.name,\n uri: this.getURI()\n };\n if (file.sessionParams) {\n body.task = 'filessessionremove';\n body.session = file.sessionParams;\n }\n var customPost = this.container.data('filePostRemove') || {};\n if (Object.keys(customPost).length) {\n body = {};\n Object.keys(customPost).forEach(function (key) {\n body[key] = customPost[key];\n });\n }\n body['filename'] = file.name;\n body['admin-nonce'] = grav_config__WEBPACK_IMPORTED_MODULE_3__.config.admin_nonce;\n (0,_utils_request__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(url, {\n method: 'post',\n body: body\n }, function () {\n if (!path) {\n return;\n }\n path = _this5.b64_to_utf8(path[1]);\n var input = _this5.container.find('[name][type=\"hidden\"]');\n var data = JSON.parse(input.val() || '{}');\n delete data[path];\n input.val(JSON.stringify(data));\n });\n }\n }, {\n key: \"onDropzoneError\",\n value: function onDropzoneError(file, response, xhr) {\n var message = xhr ? response.error.message : response;\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(file.previewElement).find('[data-dz-errormessage]').html(message);\n return this.handleError({\n file: file,\n data: {\n status: 'error'\n },\n msg: \"
\".concat(message, \"\")\n });\n }\n }, {\n key: \"handleError\",\n value: function handleError(options) {\n var file = options.file,\n data = options.data,\n mode = options.mode,\n msg = options.msg;\n if (data.status !== 'error' && data.status !== 'unauthorized') {\n return;\n }\n switch (mode) {\n case 'addBack':\n if (file instanceof File) {\n this.dropzone.addFile.call(this.dropzone, file);\n } else {\n this.dropzone.files.push(file);\n this.dropzone.options.addedfile.call(this.dropzone, file);\n this.dropzone.options.thumbnail.call(this.dropzone, file, file.extras.url);\n }\n break;\n case 'removeFile':\n default:\n if (~this.dropzone.files.indexOf(file)) {\n file.rejected = true;\n this.dropzone.removeFile.call(this.dropzone, file, {\n silent: true\n });\n }\n break;\n }\n var modal = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-remodal-id=\"generic\"]');\n var cleanName = file.name.replace('<', '<').replace('>', '>');\n modal.find('.error-content').html(msg.replace('{{fileName}}', cleanName));\n (jquery__WEBPACK_IMPORTED_MODULE_0___default().remodal).lookup[modal.data('remodal')].open();\n }\n }]);\n}();\n\nfunction UriToMarkdown(uri) {\n uri = uri.replace(/@3x|@2x|@1x/, '');\n uri = uri.replace(/\\(/g, '%28');\n uri = uri.replace(/\\)/g, '%29');\n var title = uri.split('.').slice(0, -1).join('.');\n return uri.match(/\\.(jpe?g|png|gif|svg|webp|mp4|webm|ogv|mov)$/i) ? \"![\".concat(title, \"](\").concat(uri, \" \\\"\").concat(title, \"\\\")\") : \"[\".concat(decodeURI(uri), \"](\").concat(uri, \")\");\n}\nvar instances = [];\nvar cache = jquery__WEBPACK_IMPORTED_MODULE_0___default()();\nvar onAddedNodes = function onAddedNodes(event, target /* , record, instance */) {\n var files = jquery__WEBPACK_IMPORTED_MODULE_0___default()(target).find('.dropzone.files-upload');\n if (!files.length) {\n return;\n }\n files.each(function (index, file) {\n file = jquery__WEBPACK_IMPORTED_MODULE_0___default()(file);\n if (!~cache.index(file)) {\n addNode(file);\n }\n });\n};\nvar addNode = function addNode(container) {\n container = jquery__WEBPACK_IMPORTED_MODULE_0___default()(container);\n var input = container.find('input[type=\"file\"]');\n var settings = container.data('grav-file-settings') || {};\n if (settings.accept && ~settings.accept.indexOf('*')) {\n settings.accept = [''];\n }\n var options = {\n url: container.data('file-url-add') || (container.closest('form').attr('action') || grav_config__WEBPACK_IMPORTED_MODULE_3__.config.current_url) + '.json',\n paramName: settings.paramName || 'file',\n dotNotation: settings.name || 'file',\n acceptedFiles: settings.accept ? settings.accept.join(',') : input.attr('accept') || container.data('media-types'),\n maxFilesize: typeof settings.filesize !== 'undefined' ? settings.filesize : 256,\n maxFiles: settings.limit || null,\n resizeWidth: settings.resizeWidth || null,\n resizeHeight: settings.resizeHeight || null,\n resizeQuality: settings.resizeQuality || null,\n resolution: settings.resolution || null,\n accept: function accept(file, done) {\n ACCEPT_FUNC(file, done, settings);\n }\n };\n cache = cache.add(container);\n container = container[0];\n instances.push(new FilesField({\n container: container,\n options: options\n }));\n};\nvar Instance = function () {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('.dropzone.files-upload').each(function (i, container) {\n return addNode(container);\n });\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('mutation._grav', onAddedNodes);\n return instances;\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hcHAvZm9ybXMvZmllbGRzL2ZpbGVzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBdUI7QUFDUztBQUNoQztBQUMwQztBQUNTOztBQUVuRDtBQUNBLElBQU1LLFVBQVUsR0FBRztFQUNmQyxnQkFBZ0IsRUFBRUYscURBQVksQ0FBQ0csWUFBWSxDQUFDQyxzQkFBc0I7RUFDbEVDLDRCQUE0QixFQUFFTCxxREFBWSxDQUFDRyxZQUFZLENBQUNHLG1DQUFtQztFQUMzRkMsa0JBQWtCLEVBQUVQLHFEQUFZLENBQUNHLFlBQVksQ0FBQ0ssd0JBQXdCO0VBQ3RFQyxtQkFBbUIsRUFBRVQscURBQVksQ0FBQ0csWUFBWSxDQUFDTyx5QkFBeUI7RUFDeEVDLGdCQUFnQixFQUFFWCxxREFBWSxDQUFDRyxZQUFZLENBQUNTLHNCQUFzQjtFQUNsRUMsY0FBYyxFQUFFYixxREFBWSxDQUFDRyxZQUFZLENBQUNXLHFCQUFxQjtFQUMvREMsbUJBQW1CLEVBQUVmLHFEQUFZLENBQUNHLFlBQVksQ0FBQ2EsMEJBQTBCO0VBQ3pFQy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uICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc29sdXRpb24ubWluW2F0dHJdICYmIHRoaXNbYXR0cl0gPCByZXNvbHV0aW9uLm1pblthdHRyXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yICs9IHRyYW5zbGF0aW9ucy5QTFVHSU5fRk9STS5SRVNPTFVUSU9OX01JTi5yZXBsYWNlKC97e2F0dHJ9fS9nLCBhdHRyKS5yZXBsYWNlKC97e21pbn19L2csIHJlc29sdXRpb24ubWluW2F0dHJdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCEoc2V0dGluZ3MucmVzaXplV2lkdGggfHwgc2V0dGluZ3MucmVzaXplSGVpZ2h0KSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzb2x1dGlvbi5tYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlc29sdXRpb24ubWF4KS5mb3JFYWNoKChhdHRyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc29sdXRpb24ubWF4W2F0dHJdICYmIHRoaXNbYXR0cl0gPiByZXNvbHV0aW9uLm1heFthdHRyXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvciArPSB0cmFuc2xhdGlvbnMuUExVR0lOX0ZPUk0uUkVTT0xVVElPTl9NQVgucmVwbGFjZSgve3thdHRyfX0vZywgYXR0cikucmVwbGFjZSgve3ttYXh9fS9nLCByZXNvbHV0aW9uLm1heFthdHRyXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBVUkwucmV2b2tlT2JqZWN0VVJMKGltYWdlLnNyYyk7IC8vIHJlbGVhc2UgbWVtb3J5XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVycm9yID8gZG9uZShlcnJvcikgOiBkb25lKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGUpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBlcnJvciA/IGRvbmUoZXJyb3IpIDogZG9uZSgpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEZpbGVzRmllbGQge1xuICAgIGNvbnN0cnVjdG9yKHsgY29udGFpbmVyID0gJy5kcm9wem9uZS5maWxlcy11cGxvYWQnLCBvcHRpb25zID0ge30gfSA9IHt9KSB7XG4gICAgICAgIHRoaXMuY29udGFpbmVyID0gJChjb250YWluZXIpO1xuICAgICAgICBpZiAoIXRoaXMuY29udGFpbmVyLmxlbmd0aCkgeyByZXR1cm47IH1cblxuICAgICAgICB0aGlzLnVybHMgPSB7fTtcbiAgICAgICAgdGhpcy5jdXN0b21Qb3N0ID0gdGhpcy5jb250YWluZXIuZGF0YSgnZmlsZVBvc3RBZGQnKSB8fCB7fTtcbiAgICAgICAgdGhpcy5vcHRpb25zID0gT2JqZWN0LmFzc2lnbih7fSwgRGljdGlvbmFyeSwgRHJvcHpvbmVNZWRpYUNvbmZpZywge1xuICAgICAgICAgICAga2xhc3M6IHRoaXMsXG4gICAgICAgICAgICB1cmw6IHRoaXMuY29udGFpbmVyLmRhdGEoJ2ZpbGUtdXJsLWFkZCcpIHx8IGNvbmZpZy5jdXJyZW50X3VybCxcbiAgICAgICAgICAgIGFjY2VwdGVkRmlsZXM6IHRoaXMuY29udGFpbmVyLmRhdGEoJ21lZGlhLXR5cGVzJyksXG4gICAgICAgICAgICBpbml0OiB0aGlzLmluaXREcm9wem9uZVxuICAgICAgICB9LCB0aGlzLmNvbnRhaW5lci5kYXRhKCdkcm9wem9uZS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FtZV1bdHlwZT1cImhpZGRlblwiXScpLnZhbCgpIHx8ICd7fScpO1xuICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gJChlLmN1cnJlbnRUYXJnZXQpO1xuICAgICAgICAgICAgY29uc3QgZmlsZSA9IHRhcmdldC5wYXJlbnQoJy5kei1wcmV2aWV3JykuZmluZCgnLmR6LWZpbGVuYW1lJyk7XG4gICAgICAgICAgICBjb25zdCBmaWxlbmFtZSA9IGVuY29kZVVSSShmaWxlLnRleHQoKSk7XG5cbiAgICAgICAgICAgIGNvbnN0IFVSTCA9IE9iamVjdC5rZXlzKHZhbHVlKS5maWx0ZXIoKGtleSkgPT4gdmFsdWVba2V5XS5uYW1lID09PSBmaWxlbmFtZSkuc2hpZnQoKTtcbiAgICAgICAgICAgIHRhcmdldC5hdHRyKCdocmVmJywgYCR7Y29uZmlnLmJhc2VfdXJsX3NpbXBsZX0vJHtVUkx9YCk7XG4gICAgICAgIH0pO1xuXG4gICAgfVxuXG4gICAgaW5pdERyb3B6b25lKCkge1xuICAgICAgICBsZXQgZmlsZXMgPSB0aGlzLm9wdGlvbnMua2xhc3MuY29udGFpbmVyLmZpbmQoJ1tkYXRhLWZpbGVdJyk7XG4gICAgICAgIGxldCBkcm9wem9uZSA9IHRoaXM7XG4gICAgICAgIGlmICghZmlsZXMubGVuZ3RoKSB7IHJldHVybjsgfVxuXG4gICAgICAgIGZpbGVzLmVhY2goKGluZGV4LCBmaWxlKSA9PiB7XG4gICAgICAgICAgICBmaWxlID0gJChmaWxlKTtcbiAgICAgICAgICAgIGxldCBkYXRhID0gZmlsZS5kYXRhKCdmaWxlJyk7XG4gICAgICAgICAgICBsZXQgbW9jayA9IHtcbiAgICAgICAgICAgICAgICBuYW1lOiBkYXRhLm5hbWUsXG4gICAgICAgICAgICAgICAgc2l6ZTogZGF0YS5zaXplLFxuICAgICAgICAgICAgICAgIHR5cGU6IGRhdGEudHlwZSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6IERyb3B6b25lLkFEREVELFxuICAgICAgICAgICAgICAgIGFjY2VwdGVkOiB0cnVlLFxuICAgICAgICAgICAgICAgIHVybDogdGhpcy5vcHRpb25zLnVybCxcbiAgICAgICAgICAgICAgICByZW1vdmVVcmw6IGRhdGEucmVtb3ZlXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBkcm9wem9uZS5maWxlcy5wdXNoKG1vY2spO1xuICAgICAgICAgICAgZHJvcHpvbmUub3B0aW9ucy5hZGRlZGZpbGUuY2FsbChkcm9wem9uZSwgbW9jayk7XG4gICAgICAgICAgICBpZiAobW9jay50eXBlLm1hdGNoKC9eaW1hZ2VcXC8vKSkge1xuICAgICAgICAgICAgICAgIGRyb3B6b25lLm9wdGlvbnMudGh1bWJuYWlsLmNhbGwoZHJvcHpvbmUsIG1vY2ssIGRhdGEucGF0aCk7XG4gICAgICAgICAgICAgICAgZHJvcHpvbmUuY3JlYXRlVGh1bWJuYWlsRnJvbVVybChtb2NrLCBkYXRhLnBhdGgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmaWxlLnJlbW92ZSgpO1xuICAgICAgICB9KTtcblxuICAgIH1cblxuICAgIGdldFVSSSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29udGFpbmVyLmRhdGEoJ21lZGlhVXJpJykgfHwgJyc7XG4gICAgfVxuXG4gICAgb25Ecm9wem9uZVNlbmRpbmcoZmlsZSwgeGhyLCBmb3JtRGF0YSkge1xuICAgICAgICBpZiAoT2JqZWN0LmtleXModGhpcy5jdXN0b21Qb3N0KS5sZW5ndGgpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoaXMuY3VzdG9tUG9zdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKGtleSwgdGhpcy5jdXN0b21Qb3N0W2tleV0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBm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ICAgICBjb25zdCB2YWx1ZSA9IGlucHV0LnZhbCgpO1xuICAgICAgICAgICAgaW5wdXQudmFsKHZhbHVlICsgJyAnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmhhbmRsZUVycm9yKHtcbiAgICAgICAgICAgIGZpbGUsXG4gICAgICAgICAgICBkYXRhOiByZXNwb25zZSxcbiAgICAgICAgICAgIG1vZGU6ICdyZW1vdmVGaWxlJyxcbiAgICAgICAgICAgIG1zZzogYDxwPiR7dHJhbnNsYXRpb25zLlBMVUdJTl9BRE1JTi5GSUxFX0VSUk9SX1VQTE9BRH0gPHN0cm9uZz57e2ZpbGVOYW1lfX08L3N0cm9uZz48L3A+XG4gICAgICAgICAgICA8cHJlPiR7cmVzcG9uc2UubWVzc2FnZX08L3ByZT5gXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIG9uRHJvcHpvbmVDb21wbGV0ZShmaWxlKSB7XG4gICAgICAgIGlmICghZmlsZS5hY2NlcHRlZCAmJiAhZmlsZS5yZWplY3RlZCkge1xuICAgICAgICAgICAgbGV0IGRhdGEgPSB7XG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGAke3RyYW5zbGF0aW9ucy5QTFVHSU5fQURNSU4uRklMRV9VTlNVUFBPUlRFRH06ICR7ZmlsZS5uYW1lLm1hdGNoKC9cXC4uKy8pLmpvaW4oJycpfWBcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmhhbmRsZUVycm9yKHtcbiAgICAgICAgICAgICAgICBmaWxlLFxuICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgbW9kZTogJ3JlbW92ZUZpbGUnLFxuICAgICAgICAgICAgICAgIG1zZzogYDxwPiR7dHJhbnNsYXRpb25zLlBMVUdJTl9BRE1JTi5GSUxFX0VSUk9SX0FERH0gPHN0cm9uZz57e2ZpbGVO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VUkkiLCJ4aHIiLCJmb3JtRGF0YSIsIl90aGlzNCIsImFwcGVuZCIsImRvdE5vdGF0aW9uIiwiYWRtaW5fbm9uY2UiLCJyZXNwb25zZSIsInJlbG9hZFBhZ2UiLCJnbG9iYWwiLCJsb2NhdGlvbiIsInJlbG9hZCIsInNlc3Npb24iLCJzZXNzaW9uUGFyYW1zIiwiaW5wdXQiLCJoYW5kbGVFcnJvciIsIm1vZGUiLCJtc2ciLCJtZXNzYWdlIiwiRklMRV9VTlNVUFBPUlRFRCIsImpvaW4iLCJGSUxFX0VSUk9SX0FERCIsImI2NF90b191dGY4Iiwic3RyIiwiZGVjb2RlVVJJQ29tcG9uZW50IiwiZXNjYXBlIiwid2luZG93IiwiYXRvYiIsIl90aGlzNSIsImJvZHkiLCJ1cmkiLCJ0YXNrIiwibWV0aG9kIiwic3RyaW5naWZ5IiwicHJldmlld0VsZW1lbnQiLCJodG1sIiwiRmlsZSIsImFkZEZpbGUiLCJleHRyYXMiLCJpbmRleE9mIiwicmVtb3ZlRmlsZSIsInNpbGVudCIsIm1vZGFsIiwiY2xlYW5OYW1lIiwiZGVmYXVsdCIsIlVyaVRvTWFya2Rvd24iLCJ0aXRsZSIsInNwbGl0Iiwic2xpY2UiLCJkZWNvZGVVUkkiLCJpbnN0YW5jZXMiLCJjYWNoZSIsIm9uQWRkZWROb2RlcyIsImFkZE5vZGUiLCJjbG9zZXN0IiwicGFyYW1OYW1lIiwibWF4RmlsZXNpemUiLCJmaWxlc2l6ZSIsIm1heEZpbGVzIiwibGltaXQiLCJyZXNpemVRdWFsaXR5IiwiYWRkIiwiSW5zdGFuY2UiLCJpIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./app/forms/fields/files.js\n"); +/***/ }), - this.isOpened = function () { - return _$list.is(':visible'); - }; // add a selected value to the list +/***/ "./app/forms/fields/folder.js": +/*!************************************!*\ + !*** ./app/forms/fields/folder.js ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"jquery\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n\nvar Regenerate = function Regenerate() {\n var field = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '[name=\"data[folder]\"]';\n var element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(field);\n var title = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[name=\"data[header][title]\"]');\n var slug = jquery__WEBPACK_IMPORTED_MODULE_0___default().slugify(title.val(), {\n custom: {\n \"'\": ''\n }\n });\n element.addClass('highlight').val(slug);\n setTimeout(function () {\n return element.removeClass('highlight');\n }, 500);\n};\njquery__WEBPACK_IMPORTED_MODULE_0___default()(document).on('click', '[data-regenerate]', function (event) {\n var target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(event.currentTarget);\n var field = jquery__WEBPACK_IMPORTED_MODULE_0___default()(target.data('regenerate'));\n Regenerate(field);\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Regenerate);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hcHAvZm9ybXMvZmllbGRzL2ZvbGRlci5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBdUI7QUFFdkIsSUFBTUMsVUFBVSxHQUFHLFNBQWJBLFVBQVVBLENBQUEsRUFBd0M7RUFBQSxJQUFwQ0MsS0FBSyxHQUFBQyxTQUFBLENBQUFDLE1BQUEsUUFBQUQsU0FBQSxRQUFBRSxTQUFBLEdBQUFGLFNB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QgPSAnW25hbWU9XCJkYXRhW2ZvbGRlcl1cIl0nKSA9PiB7XG4gICAgY29uc3QgZWxlbWVudCA9ICQoZmllbGQpO1xuICAgIGNvbnN0IHRpdGxlID0gJCgnW25hbWU9XCJkYXRhW2hlYWRlcl1bdGl0bGVdXCJdJyk7XG4gICAgY29uc3Qgc2x1ZyA9ICQuc2x1Z2lmeSh0aXRsZS52YWwoKSwge2N1c3RvbToge1wiJ1wiOiAnJ319KTtcblxuICAgIGVsZW1lbnQuYWRkQ2xhc3MoJ2hpZ2hsaWdodCcpLnZhbChzbHVnKTtcblxuICAgIHNldFRpbWVvdXQoKCkgPT4gZWxlbWVudC5yZW1vdmVDbGFzcygnaGlnaGxpZ2h0JyksIDUwMCk7XG59O1xuXG4kKGRvY3VtZW50KS5vbignY2xpY2snLCAnW2RhdGEtcmVnZW5lcmF0ZV0nLCAoZXZlbnQpID0+IHtcbiAgICBjb25zdCB0YXJnZXQgPSAkKGV2ZW50LmN1cnJlbnRUYXJnZXQpO1xuICAgIGNvbnN0IGZpZWxkID0gJCh0YXJnZXQuZGF0YSgncmVnZW5lcmF0ZScpKTtcblxuICAgIFJlZ2VuZXJhdGUoZmllbGQpO1xufSk7XG5cbmV4cG9ydCBkZWZhdWx0IFJlZ2VuZXJhdGU7XG4iXSwibmFtZXMiOlsiJCIsIlJlZ2VuZXJhdGUiLCJmaWVsZCIsImFyZ3VtZW50cyIsImxlbmd0aCIsInVuZGVmaW5lZCIsImVsZW1lbnQiLCJ0aXRsZSIsInNsdWciLCJzbHVnaWZ5IiwidmFsIiwiY3VzdG9tIiwiYWRkQ2xhc3MiLCJzZXRUaW1lb3V0IiwicmVtb3ZlQ2xhc3MiLCJkb2N1bWVudCIsIm9uIiwiZXZlbnQiLCJ0YXJnZXQiLCJjdXJyZW50VGFyZ2V0IiwiZGF0YSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./app/forms/fields/folder.js\n"); - this.addValue = function (key) { - var values = _multiple ? _value.slice(0) : []; // clone array +/***/ }), - values.push(key); +/***/ "./app/forms/fields/iconpicker.js": +/*!****************************************!*\ + !*** ./app/forms/fields/iconpicker.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - _self.setValue(values); - }; // remove a selected value from the list +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Instance: () => (/* binding */ Instance),\n/* harmony export */ \"default\": () => (/* binding */ IconpickerField)\n/* harmony export */ });\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"jquery\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\n/* Icon Picker by QueryLoop\n * Author: @eliorivero\n * URL: http://queryloop.com/\n * License: GPLv2\n */\n\nvar defaults = {\n 'mode': 'dialog',\n // show overlay 'dialog' panel or slide down 'inline' panel\n 'closeOnPick': true,\n // whether to close panel after picking or 'no'\n 'save': 'class',\n // save icon 'class' or 'code'\n 'size': '',\n 'classes': {\n 'launcher': '',\n // extra classes for launcher buttons\n 'clear': 'remove-times',\n // extra classes for button that removes preview and clears field\n 'highlight': '',\n // extra classes when highlighting an icon\n 'close': '' // extra classes for close button\n },\n 'iconSets': {\n // example data structure. Used to specify which launchers will be created\n 'genericon': 'Genericon',\n // create a launcher to pick genericon icons\n 'fa': 'FontAwesome' // create a launcher to pick fontawesome icons\n }\n};\nvar QL_Icon_Picker = /*#__PURE__*/function () {\n function QL_Icon_Picker(element, options) {\n _classCallCheck(this, QL_Icon_Picker);\n this.iconSet = '';\n this.iconSetName = '';\n this.$field = '';\n this.element = element;\n this.settings = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, defaults, options);\n this._defaults = defaults;\n this.init();\n }\n return _createClass(QL_Icon_Picker, [{\n key: \"init\",\n value: function init() {\n var $brick = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.element);\n var pickerId = $brick.data('pickerid');\n var $preview = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n this.$field = $brick.find('input');\n\n // Add preview area\n this.makePreview($brick, pickerId, $preview);\n\n // Make button to clear field and remove preview\n this.makeClear(pickerId, $preview);\n\n // Make buttons that open the panel of icons\n this.makeLaunchers($brick, pickerId);\n\n // Prepare display styles, inline and dialog\n this.makeDisplay($brick);\n }\n }, {\n key: \"makePreview\",\n value: function makePreview($brick, pickerId, $preview) {\n var $icon = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n var iconValue = this.$field.val();\n $preview.prependTo($brick);\n $icon.prependTo($preview);\n if (iconValue !== '') {\n $preview.addClass('icon-preview-on');\n $icon.addClass(iconValue);\n }\n }\n }, {\n key: \"makeClear\",\n value: function makeClear(pickerId, $preview) {\n var base = this;\n var $clear = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n\n // Hide button to remove icon and preview and append it to preview area\n $clear.hide().prependTo($preview);\n // If there's a icon saved in the field, show remove icon button\n if (base.$field.val() !== '') {\n $clear.show();\n }\n $preview.on('click', '.remove-icon', function (e) {\n e.preventDefault();\n base.$field.val('');\n $preview.removeClass('icon-preview-on').find('i').removeClass();\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).hide();\n });\n }\n }, {\n key: \"makeDisplay\",\n value: function makeDisplay($brick) {\n var base = this;\n var close = base.settings.classes.close;\n var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body');\n var $close = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n if (base.settings.mode === 'inline') {\n $brick.find('.icon-set').append($close).removeClass('dialog').addClass('ip-inline ' + base.settings.size).parent().addClass('icon-set-wrap');\n } else if (base.settings.mode === 'dialog') {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('.icon-set').addClass('dialog ' + base.settings.size);\n if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.icon-picker-overlay').length <= 0) {\n $body.append('