From 06aa6ca75653fdfaf5d68e7eba2a90fbe1b59400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jorry=E6=9C=89=E6=A1=A5?= <980522557@qq.com> Date: Thu, 23 Sep 2021 09:02:44 +0800 Subject: [PATCH 001/170] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E5=9B=BE=EF=BC=8C=E4=B8=94=E5=AF=B9=E6=8E=A5OSS=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $this->getStorage()->put()方法,不支持传递Image对象, 使用 $image->encode()->stream() 生成 Stream 流对象才可以 --- src/Form/Field/ImageField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Field/ImageField.php b/src/Form/Field/ImageField.php index 85149a7dd..35fd8e715 100755 --- a/src/Form/Field/ImageField.php +++ b/src/Form/Field/ImageField.php @@ -182,9 +182,9 @@ protected function uploadAndDeleteOriginalThumbnail(UploadedFile $file) }); if (! is_null($this->storagePermission)) { - $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode(), $this->storagePermission); + $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode()->stream(), $this->storagePermission); } else { - $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode()); + $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode()->stream()); } } From 6ae850fc01c4eb5033e731c2ec75aafddfc64e37 Mon Sep 17 00:00:00 2001 From: shookliu Date: Fri, 24 Sep 2021 18:18:09 +0800 Subject: [PATCH 002/170] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E7=AD=9B=E9=80=89=E9=BB=98=E8=AE=A4=E9=A1=B9?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=AE=BE=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Grid/Filter/AbstractFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php index dc7e9c0fc..2de379a63 100755 --- a/src/Grid/Filter/AbstractFilter.php +++ b/src/Grid/Filter/AbstractFilter.php @@ -460,7 +460,7 @@ protected function presenter() */ public function default($default = null) { - if ($default) { + if (filled($default)) { $this->defaultValue = $default; } From 987d131aef83d64846def0fd993d6249cf769e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=9E=E8=BE=89?= <1145769693@qq.com> Date: Tue, 28 Sep 2021 18:04:30 +0800 Subject: [PATCH 003/170] =?UTF-8?q?file=20image=20=E6=94=AF=E6=8C=81=20art?= =?UTF-8?q?tribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使 form 组件 file,image 支持 attribute 属性,便于通过js获取并控制 --- resources/views/form/file.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/form/file.blade.php b/resources/views/form/file.blade.php index f1ce6925e..928499f17 100755 --- a/resources/views/form/file.blade.php +++ b/resources/views/form/file.blade.php @@ -21,7 +21,7 @@ @include('admin::form.error') - +
From 4cc6bd553cc9940a723787966101194b6be30632 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Tue, 28 Sep 2021 16:35:35 +0800 Subject: [PATCH 004/170] add autocomplete --- .../autocomplete/jquery.autocomplete.js | 1008 +++++++++++++++++ .../autocomplete/jquery.autocomplete.min.js | 8 + resources/views/form/autocomplete.blade.php | 70 ++ src/Form.php | 2 + src/Form/Field/Autocomplete.php | 136 +++ src/Layout/Asset.php | 3 + 6 files changed, 1227 insertions(+) create mode 100644 resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.js create mode 100644 resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.min.js create mode 100644 resources/views/form/autocomplete.blade.php create mode 100644 src/Form/Field/Autocomplete.php diff --git a/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.js b/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.js new file mode 100644 index 000000000..c061ca5b3 --- /dev/null +++ b/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.js @@ -0,0 +1,1008 @@ +/** +* Ajax Autocomplete for jQuery, version 1.4.11 +* (c) 2017 Tomas Kirda +* +* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. +* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete +*/ + +/*jslint browser: true, white: true, single: true, this: true, multivar: true */ +/*global define, window, document, jQuery, exports, require */ + +// Expose plugin as an AMD module if AMD loader is present: +(function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object' && typeof require === 'function') { + // Browserify + factory(require('jquery')); + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + 'use strict'; + + var + utils = (function () { + return { + escapeRegExChars: function (value) { + return value.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"); + }, + createNode: function (containerClass) { + var div = document.createElement('div'); + div.className = containerClass; + div.style.position = 'absolute'; + div.style.display = 'none'; + return div; + } + }; + }()), + + keys = { + ESC: 27, + TAB: 9, + RETURN: 13, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40 + }, + + noop = $.noop; + + function Autocomplete(el, options) { + var that = this; + + // Shared variables: + that.element = el; + that.el = $(el); + that.suggestions = []; + that.badQueries = []; + that.selectedIndex = -1; + that.currentValue = that.element.value; + that.timeoutId = null; + that.cachedResponse = {}; + that.onChangeTimeout = null; + that.onChange = null; + that.isLocal = false; + that.suggestionsContainer = null; + that.noSuggestionsContainer = null; + that.options = $.extend(true, {}, Autocomplete.defaults, options); + that.classes = { + selected: 'autocomplete-selected', + suggestion: 'autocomplete-suggestion' + }; + that.hint = null; + that.hintValue = ''; + that.selection = null; + + // Initialize and set options: + that.initialize(); + that.setOptions(options); + } + + Autocomplete.utils = utils; + + $.Autocomplete = Autocomplete; + + Autocomplete.defaults = { + ajaxSettings: {}, + autoSelectFirst: false, + appendTo: 'body', + serviceUrl: null, + lookup: null, + onSelect: null, + width: 'auto', + minChars: 1, + maxHeight: 300, + deferRequestBy: 0, + params: {}, + formatResult: _formatResult, + formatGroup: _formatGroup, + delimiter: null, + zIndex: 9999, + type: 'GET', + noCache: false, + onSearchStart: noop, + onSearchComplete: noop, + onSearchError: noop, + preserveInput: false, + containerClass: 'autocomplete-suggestions', + tabDisabled: false, + dataType: 'text', + currentRequest: null, + triggerSelectOnValidInput: true, + preventBadQueries: true, + lookupFilter: _lookupFilter, + paramName: 'query', + transformResult: _transformResult, + showNoSuggestionNotice: false, + noSuggestionNotice: 'No results', + orientation: 'bottom', + forceFixPosition: false + }; + + function _lookupFilter(suggestion, originalQuery, queryLowerCase) { + return suggestion.value.toLowerCase().indexOf(queryLowerCase) !== -1; + }; + + function _transformResult(response) { + return typeof response === 'string' ? $.parseJSON(response) : response; + }; + + function _formatResult(suggestion, currentValue) { + // Do not replace anything if the current value is empty + if (!currentValue) { + return suggestion.value; + } + + var pattern = '(' + utils.escapeRegExChars(currentValue) + ')'; + + return suggestion.value + .replace(new RegExp(pattern, 'gi'), '$1<\/strong>') + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/<(\/?strong)>/g, '<$1>'); + }; + + function _formatGroup(suggestion, category) { + return '
' + category + '
'; + }; + + Autocomplete.prototype = { + + initialize: function () { + var that = this, + suggestionSelector = '.' + that.classes.suggestion, + selected = that.classes.selected, + options = that.options, + container; + + that.element.setAttribute('autocomplete', 'off'); + + // html() deals with many types: htmlString or Element or Array or jQuery + that.noSuggestionsContainer = $('
') + .html(this.options.noSuggestionNotice).get(0); + + that.suggestionsContainer = Autocomplete.utils.createNode(options.containerClass); + + container = $(that.suggestionsContainer); + + container.appendTo(options.appendTo || 'body'); + + // Only set width if it was provided: + if (options.width !== 'auto') { + container.css('width', options.width); + } + + // Listen for mouse over event on suggestions list: + container.on('mouseover.autocomplete', suggestionSelector, function () { + that.activate($(this).data('index')); + }); + + // Deselect active element when mouse leaves suggestions container: + container.on('mouseout.autocomplete', function () { + that.selectedIndex = -1; + container.children('.' + selected).removeClass(selected); + }); + + // Listen for click event on suggestions list: + container.on('click.autocomplete', suggestionSelector, function () { + that.select($(this).data('index')); + }); + + container.on('click.autocomplete', function () { + clearTimeout(that.blurTimeoutId); + }) + + that.fixPositionCapture = function () { + if (that.visible) { + that.fixPosition(); + } + }; + + $(window).on('resize.autocomplete', that.fixPositionCapture); + + that.el.on('keydown.autocomplete', function (e) { that.onKeyPress(e); }); + that.el.on('keyup.autocomplete', function (e) { that.onKeyUp(e); }); + that.el.on('blur.autocomplete', function () { that.onBlur(); }); + that.el.on('focus.autocomplete', function () { that.onFocus(); }); + that.el.on('change.autocomplete', function (e) { that.onKeyUp(e); }); + that.el.on('input.autocomplete', function (e) { that.onKeyUp(e); }); + }, + + onFocus: function () { + var that = this; + + if (that.disabled) { + return; + } + + that.fixPosition(); + + if (that.el.val().length >= that.options.minChars) { + that.onValueChange(); + } + }, + + onBlur: function () { + var that = this, + options = that.options, + value = that.el.val(), + query = that.getQuery(value); + + // If user clicked on a suggestion, hide() will + // be canceled, otherwise close suggestions + that.blurTimeoutId = setTimeout(function () { + that.hide(); + + if (that.selection && that.currentValue !== query) { + (options.onInvalidateSelection || $.noop).call(that.element); + } + }, 200); + }, + + abortAjax: function () { + var that = this; + if (that.currentRequest) { + that.currentRequest.abort(); + that.currentRequest = null; + } + }, + + setOptions: function (suppliedOptions) { + var that = this, + options = $.extend({}, that.options, suppliedOptions); + + that.isLocal = Array.isArray(options.lookup); + + if (that.isLocal) { + options.lookup = that.verifySuggestionsFormat(options.lookup); + } + + options.orientation = that.validateOrientation(options.orientation, 'bottom'); + + // Adjust height, width and z-index: + $(that.suggestionsContainer).css({ + 'max-height': options.maxHeight + 'px', + 'width': options.width + 'px', + 'z-index': options.zIndex + }); + + this.options = options; + }, + + + clearCache: function () { + this.cachedResponse = {}; + this.badQueries = []; + }, + + clear: function () { + this.clearCache(); + this.currentValue = ''; + this.suggestions = []; + }, + + disable: function () { + var that = this; + that.disabled = true; + clearTimeout(that.onChangeTimeout); + that.abortAjax(); + }, + + enable: function () { + this.disabled = false; + }, + + fixPosition: function () { + // Use only when container has already its content + + var that = this, + $container = $(that.suggestionsContainer), + containerParent = $container.parent().get(0); + // Fix position automatically when appended to body. + // In other cases force parameter must be given. + if (containerParent !== document.body && !that.options.forceFixPosition) { + return; + } + + // Choose orientation + var orientation = that.options.orientation, + containerHeight = $container.outerHeight(), + height = that.el.outerHeight(), + offset = that.el.offset(), + styles = { 'top': offset.top, 'left': offset.left }; + + if (orientation === 'auto') { + var viewPortHeight = $(window).height(), + scrollTop = $(window).scrollTop(), + topOverflow = -scrollTop + offset.top - containerHeight, + bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight); + + orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom'; + } + + if (orientation === 'top') { + styles.top += -containerHeight; + } else { + styles.top += height; + } + + // If container is not positioned to body, + // correct its position using offset parent offset + if(containerParent !== document.body) { + var opacity = $container.css('opacity'), + parentOffsetDiff; + + if (!that.visible){ + $container.css('opacity', 0).show(); + } + + parentOffsetDiff = $container.offsetParent().offset(); + styles.top -= parentOffsetDiff.top; + styles.top += containerParent.scrollTop; + styles.left -= parentOffsetDiff.left; + + if (!that.visible){ + $container.css('opacity', opacity).hide(); + } + } + + if (that.options.width === 'auto') { + styles.width = that.el.outerWidth() + 'px'; + } + + $container.css(styles); + }, + + isCursorAtEnd: function () { + var that = this, + valLength = that.el.val().length, + selectionStart = that.element.selectionStart, + range; + + if (typeof selectionStart === 'number') { + return selectionStart === valLength; + } + if (document.selection) { + range = document.selection.createRange(); + range.moveStart('character', -valLength); + return valLength === range.text.length; + } + return true; + }, + + onKeyPress: function (e) { + var that = this; + + // If suggestions are hidden and user presses arrow down, display suggestions: + if (!that.disabled && !that.visible && e.which === keys.DOWN && that.currentValue) { + that.suggest(); + return; + } + + if (that.disabled || !that.visible) { + return; + } + + switch (e.which) { + case keys.ESC: + that.el.val(that.currentValue); + that.hide(); + break; + case keys.RIGHT: + if (that.hint && that.options.onHint && that.isCursorAtEnd()) { + that.selectHint(); + break; + } + return; + case keys.TAB: + if (that.hint && that.options.onHint) { + that.selectHint(); + return; + } + if (that.selectedIndex === -1) { + that.hide(); + return; + } + that.select(that.selectedIndex); + if (that.options.tabDisabled === false) { + return; + } + break; + case keys.RETURN: + if (that.selectedIndex === -1) { + that.hide(); + return; + } + that.select(that.selectedIndex); + break; + case keys.UP: + that.moveUp(); + break; + case keys.DOWN: + that.moveDown(); + break; + default: + return; + } + + // Cancel event if function did not return: + e.stopImmediatePropagation(); + e.preventDefault(); + }, + + onKeyUp: function (e) { + var that = this; + + if (that.disabled) { + return; + } + + switch (e.which) { + case keys.UP: + case keys.DOWN: + return; + } + + clearTimeout(that.onChangeTimeout); + + if (that.currentValue !== that.el.val()) { + that.findBestHint(); + if (that.options.deferRequestBy > 0) { + // Defer lookup in case when value changes very quickly: + that.onChangeTimeout = setTimeout(function () { + that.onValueChange(); + }, that.options.deferRequestBy); + } else { + that.onValueChange(); + } + } + }, + + onValueChange: function () { + if (this.ignoreValueChange) { + this.ignoreValueChange = false; + return; + } + + var that = this, + options = that.options, + value = that.el.val(), + query = that.getQuery(value); + + if (that.selection && that.currentValue !== query) { + that.selection = null; + (options.onInvalidateSelection || $.noop).call(that.element); + } + + clearTimeout(that.onChangeTimeout); + that.currentValue = value; + that.selectedIndex = -1; + + // Check existing suggestion for the match before proceeding: + if (options.triggerSelectOnValidInput && that.isExactMatch(query)) { + that.select(0); + return; + } + + if (query.length < options.minChars) { + that.hide(); + } else { + that.getSuggestions(query); + } + }, + + isExactMatch: function (query) { + var suggestions = this.suggestions; + + return (suggestions.length === 1 && suggestions[0].value.toLowerCase() === query.toLowerCase()); + }, + + getQuery: function (value) { + var delimiter = this.options.delimiter, + parts; + + if (!delimiter) { + return value; + } + parts = value.split(delimiter); + return $.trim(parts[parts.length - 1]); + }, + + getSuggestionsLocal: function (query) { + var that = this, + options = that.options, + queryLowerCase = query.toLowerCase(), + filter = options.lookupFilter, + limit = parseInt(options.lookupLimit, 10), + data; + + data = { + suggestions: $.grep(options.lookup, function (suggestion) { + return filter(suggestion, query, queryLowerCase); + }) + }; + + if (limit && data.suggestions.length > limit) { + data.suggestions = data.suggestions.slice(0, limit); + } + + return data; + }, + + getSuggestions: function (q) { + var response, + that = this, + options = that.options, + serviceUrl = options.serviceUrl, + params, + cacheKey, + ajaxSettings; + + options.params[options.paramName] = q; + + if (options.onSearchStart.call(that.element, options.params) === false) { + return; + } + + params = options.ignoreParams ? null : options.params; + + if ($.isFunction(options.lookup)){ + options.lookup(q, function (data) { + that.suggestions = data.suggestions; + that.suggest(); + options.onSearchComplete.call(that.element, q, data.suggestions); + }); + return; + } + + if (that.isLocal) { + response = that.getSuggestionsLocal(q); + } else { + if ($.isFunction(serviceUrl)) { + serviceUrl = serviceUrl.call(that.element, q); + } + cacheKey = serviceUrl + '?' + $.param(params || {}); + response = that.cachedResponse[cacheKey]; + } + + if (response && Array.isArray(response.suggestions)) { + that.suggestions = response.suggestions; + that.suggest(); + options.onSearchComplete.call(that.element, q, response.suggestions); + } else if (!that.isBadQuery(q)) { + that.abortAjax(); + + ajaxSettings = { + url: serviceUrl, + data: params, + type: options.type, + dataType: options.dataType + }; + + $.extend(ajaxSettings, options.ajaxSettings); + + that.currentRequest = $.ajax(ajaxSettings).done(function (data) { + var result; + that.currentRequest = null; + result = options.transformResult(data, q); + that.processResponse(result, q, cacheKey); + options.onSearchComplete.call(that.element, q, result.suggestions); + }).fail(function (jqXHR, textStatus, errorThrown) { + options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown); + }); + } else { + options.onSearchComplete.call(that.element, q, []); + } + }, + + isBadQuery: function (q) { + if (!this.options.preventBadQueries){ + return false; + } + + var badQueries = this.badQueries, + i = badQueries.length; + + while (i--) { + if (q.indexOf(badQueries[i]) === 0) { + return true; + } + } + + return false; + }, + + hide: function () { + var that = this, + container = $(that.suggestionsContainer); + + if ($.isFunction(that.options.onHide) && that.visible) { + that.options.onHide.call(that.element, container); + } + + that.visible = false; + that.selectedIndex = -1; + clearTimeout(that.onChangeTimeout); + $(that.suggestionsContainer).hide(); + that.signalHint(null); + }, + + suggest: function () { + if (!this.suggestions.length) { + if (this.options.showNoSuggestionNotice) { + this.noSuggestions(); + } else { + this.hide(); + } + return; + } + + var that = this, + options = that.options, + groupBy = options.groupBy, + formatResult = options.formatResult, + value = that.getQuery(that.currentValue), + className = that.classes.suggestion, + classSelected = that.classes.selected, + container = $(that.suggestionsContainer), + noSuggestionsContainer = $(that.noSuggestionsContainer), + beforeRender = options.beforeRender, + html = '', + category, + formatGroup = function (suggestion, index) { + var currentCategory = suggestion.data[groupBy]; + + if (category === currentCategory){ + return ''; + } + + category = currentCategory; + + return options.formatGroup(suggestion, category); + }; + + if (options.triggerSelectOnValidInput && that.isExactMatch(value)) { + that.select(0); + return; + } + + // Build suggestions inner HTML: + $.each(that.suggestions, function (i, suggestion) { + if (groupBy){ + html += formatGroup(suggestion, value, i); + } + + html += '
' + formatResult(suggestion, value, i) + '
'; + }); + + this.adjustContainerWidth(); + + noSuggestionsContainer.detach(); + container.html(html); + + if ($.isFunction(beforeRender)) { + beforeRender.call(that.element, container, that.suggestions); + } + + that.fixPosition(); + container.show(); + + // Select first value by default: + if (options.autoSelectFirst) { + that.selectedIndex = 0; + container.scrollTop(0); + container.children('.' + className).first().addClass(classSelected); + } + + that.visible = true; + that.findBestHint(); + }, + + noSuggestions: function() { + var that = this, + beforeRender = that.options.beforeRender, + container = $(that.suggestionsContainer), + noSuggestionsContainer = $(that.noSuggestionsContainer); + + this.adjustContainerWidth(); + + // Some explicit steps. Be careful here as it easy to get + // noSuggestionsContainer removed from DOM if not detached properly. + noSuggestionsContainer.detach(); + + // clean suggestions if any + container.empty(); + container.append(noSuggestionsContainer); + + if ($.isFunction(beforeRender)) { + beforeRender.call(that.element, container, that.suggestions); + } + + that.fixPosition(); + + container.show(); + that.visible = true; + }, + + adjustContainerWidth: function() { + var that = this, + options = that.options, + width, + container = $(that.suggestionsContainer); + + // If width is auto, adjust width before displaying suggestions, + // because if instance was created before input had width, it will be zero. + // Also it adjusts if input width has changed. + if (options.width === 'auto') { + width = that.el.outerWidth(); + container.css('width', width > 0 ? width : 300); + } else if(options.width === 'flex') { + // Trust the source! Unset the width property so it will be the max length + // the containing elements. + container.css('width', ''); + } + }, + + findBestHint: function () { + var that = this, + value = that.el.val().toLowerCase(), + bestMatch = null; + + if (!value) { + return; + } + + $.each(that.suggestions, function (i, suggestion) { + var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0; + if (foundMatch) { + bestMatch = suggestion; + } + return !foundMatch; + }); + + that.signalHint(bestMatch); + }, + + signalHint: function (suggestion) { + var hintValue = '', + that = this; + if (suggestion) { + hintValue = that.currentValue + suggestion.value.substr(that.currentValue.length); + } + if (that.hintValue !== hintValue) { + that.hintValue = hintValue; + that.hint = suggestion; + (this.options.onHint || $.noop)(hintValue); + } + }, + + verifySuggestionsFormat: function (suggestions) { + // If suggestions is string array, convert them to supported format: + if (suggestions.length && typeof suggestions[0] === 'string') { + return $.map(suggestions, function (value) { + return { value: value, data: null }; + }); + } + + return suggestions; + }, + + validateOrientation: function(orientation, fallback) { + orientation = $.trim(orientation || '').toLowerCase(); + + if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){ + orientation = fallback; + } + + return orientation; + }, + + processResponse: function (result, originalQuery, cacheKey) { + var that = this, + options = that.options; + + result.suggestions = that.verifySuggestionsFormat(result.suggestions); + + // Cache results if cache is not disabled: + if (!options.noCache) { + that.cachedResponse[cacheKey] = result; + if (options.preventBadQueries && !result.suggestions.length) { + that.badQueries.push(originalQuery); + } + } + + // Return if originalQuery is not matching current query: + if (originalQuery !== that.getQuery(that.currentValue)) { + return; + } + + that.suggestions = result.suggestions; + that.suggest(); + }, + + activate: function (index) { + var that = this, + activeItem, + selected = that.classes.selected, + container = $(that.suggestionsContainer), + children = container.find('.' + that.classes.suggestion); + + container.find('.' + selected).removeClass(selected); + + that.selectedIndex = index; + + if (that.selectedIndex !== -1 && children.length > that.selectedIndex) { + activeItem = children.get(that.selectedIndex); + $(activeItem).addClass(selected); + return activeItem; + } + + return null; + }, + + selectHint: function () { + var that = this, + i = $.inArray(that.hint, that.suggestions); + + that.select(i); + }, + + select: function (i) { + var that = this; + that.hide(); + that.onSelect(i); + }, + + moveUp: function () { + var that = this; + + if (that.selectedIndex === -1) { + return; + } + + if (that.selectedIndex === 0) { + $(that.suggestionsContainer).children('.' + that.classes.suggestion).first().removeClass(that.classes.selected); + that.selectedIndex = -1; + that.ignoreValueChange = false; + that.el.val(that.currentValue); + that.findBestHint(); + return; + } + + that.adjustScroll(that.selectedIndex - 1); + }, + + moveDown: function () { + var that = this; + + if (that.selectedIndex === (that.suggestions.length - 1)) { + return; + } + + that.adjustScroll(that.selectedIndex + 1); + }, + + adjustScroll: function (index) { + var that = this, + activeItem = that.activate(index); + + if (!activeItem) { + return; + } + + var offsetTop, + upperBound, + lowerBound, + heightDelta = $(activeItem).outerHeight(); + + offsetTop = activeItem.offsetTop; + upperBound = $(that.suggestionsContainer).scrollTop(); + lowerBound = upperBound + that.options.maxHeight - heightDelta; + + if (offsetTop < upperBound) { + $(that.suggestionsContainer).scrollTop(offsetTop); + } else if (offsetTop > lowerBound) { + $(that.suggestionsContainer).scrollTop(offsetTop - that.options.maxHeight + heightDelta); + } + + if (!that.options.preserveInput) { + // During onBlur event, browser will trigger "change" event, + // because value has changed, to avoid side effect ignore, + // that event, so that correct suggestion can be selected + // when clicking on suggestion with a mouse + that.ignoreValueChange = true; + that.el.val(that.getValue(that.suggestions[index].value)); + } + + that.signalHint(null); + }, + + onSelect: function (index) { + var that = this, + onSelectCallback = that.options.onSelect, + suggestion = that.suggestions[index]; + + that.currentValue = that.getValue(suggestion.value); + + if (that.currentValue !== that.el.val() && !that.options.preserveInput) { + that.el.val(that.currentValue); + } + + that.signalHint(null); + that.suggestions = []; + that.selection = suggestion; + + if ($.isFunction(onSelectCallback)) { + onSelectCallback.call(that.element, suggestion); + } + }, + + getValue: function (value) { + var that = this, + delimiter = that.options.delimiter, + currentValue, + parts; + + if (!delimiter) { + return value; + } + + currentValue = that.currentValue; + parts = currentValue.split(delimiter); + + if (parts.length === 1) { + return value; + } + + return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value; + }, + + dispose: function () { + var that = this; + that.el.off('.autocomplete').removeData('autocomplete'); + $(window).off('resize.autocomplete', that.fixPositionCapture); + $(that.suggestionsContainer).remove(); + } + }; + + // Create chainable jQuery plugin: + $.fn.devbridgeAutocomplete = function (options, args) { + var dataKey = 'autocomplete'; + // If function invoked without argument return + // instance of the first matched element: + if (!arguments.length) { + return this.first().data(dataKey); + } + + return this.each(function () { + var inputElement = $(this), + instance = inputElement.data(dataKey); + + if (typeof options === 'string') { + if (instance && typeof instance[options] === 'function') { + instance[options](args); + } + } else { + // If instance already exists, destroy it: + if (instance && instance.dispose) { + instance.dispose(); + } + instance = new Autocomplete(this, options); + inputElement.data(dataKey, instance); + } + }); + }; + + // Don't overwrite if it already exists + if (!$.fn.autocomplete) { + $.fn.autocomplete = $.fn.devbridgeAutocomplete; + } +})); diff --git a/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.min.js b/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.min.js new file mode 100644 index 000000000..fec7fe540 --- /dev/null +++ b/resources/dist/dcat/plugins/autocomplete/jquery.autocomplete.min.js @@ -0,0 +1,8 @@ +/** +* Ajax Autocomplete for jQuery, version 1.4.11 +* (c) 2017 Tomas Kirda +* +* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. +* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete +*/ +!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}(function(a){"use strict";function b(c,d){var e=this;e.element=c,e.el=a(c),e.suggestions=[],e.badQueries=[],e.selectedIndex=-1,e.currentValue=e.element.value,e.timeoutId=null,e.cachedResponse={},e.onChangeTimeout=null,e.onChange=null,e.isLocal=!1,e.suggestionsContainer=null,e.noSuggestionsContainer=null,e.options=a.extend(!0,{},b.defaults,d),e.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},e.hint=null,e.hintValue="",e.selection=null,e.initialize(),e.setOptions(d)}function c(a,b,c){return a.value.toLowerCase().indexOf(c)!==-1}function d(b){return"string"==typeof b?a.parseJSON(b):b}function e(a,b){if(!b)return a.value;var c="("+g.escapeRegExChars(b)+")";return a.value.replace(new RegExp(c,"gi"),"$1").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")}function f(a,b){return'
'+b+"
"}var g=function(){return{escapeRegExChars:function(a){return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");return b.className=a,b.style.position="absolute",b.style.display="none",b}}}(),h={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40},i=a.noop;b.utils=g,a.Autocomplete=b,b.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:e,formatGroup:f,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:i,onSearchComplete:i,onSearchError:i,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:c,paramName:"query",transformResult:d,showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},b.prototype={initialize:function(){var c,d=this,e="."+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute("autocomplete","off"),d.noSuggestionsContainer=a('
').html(this.options.noSuggestionNotice).get(0),d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo||"body"),"auto"!==g.width&&c.css("width",g.width),c.on("mouseover.autocomplete",e,function(){d.activate(a(this).data("index"))}),c.on("mouseout.autocomplete",function(){d.selectedIndex=-1,c.children("."+f).removeClass(f)}),c.on("click.autocomplete",e,function(){d.select(a(this).data("index"))}),c.on("click.autocomplete",function(){clearTimeout(d.blurTimeoutId)}),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on("resize.autocomplete",d.fixPositionCapture),d.el.on("keydown.autocomplete",function(a){d.onKeyPress(a)}),d.el.on("keyup.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("blur.autocomplete",function(){d.onBlur()}),d.el.on("focus.autocomplete",function(){d.onFocus()}),d.el.on("change.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("input.autocomplete",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.disabled||(a.fixPosition(),a.el.val().length>=a.options.minChars&&a.onValueChange())},onBlur:function(){var b=this,c=b.options,d=b.el.val(),e=b.getQuery(d);b.blurTimeoutId=setTimeout(function(){b.hide(),b.selection&&b.currentValue!==e&&(c.onInvalidateSelection||a.noop).call(b.element)},200)},abortAjax:function(){var a=this;a.currentRequest&&(a.currentRequest.abort(),a.currentRequest=null)},setOptions:function(b){var c=this,d=a.extend({},c.options,b);c.isLocal=Array.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),d.orientation=c.validateOrientation(d.orientation,"bottom"),a(c.suggestionsContainer).css({"max-height":d.maxHeight+"px",width:d.width+"px","z-index":d.zIndex}),this.options=d},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,clearTimeout(a.onChangeTimeout),a.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var b=this,c=a(b.suggestionsContainer),d=c.parent().get(0);if(d===document.body||b.options.forceFixPosition){var e=b.options.orientation,f=c.outerHeight(),g=b.el.outerHeight(),h=b.el.offset(),i={top:h.top,left:h.left};if("auto"===e){var j=a(window).height(),k=a(window).scrollTop(),l=-k+h.top-f,m=k+j-(h.top+g+f);e=Math.max(l,m)===l?"top":"bottom"}if("top"===e?i.top+=-f:i.top+=g,d!==document.body){var n,o=c.css("opacity");b.visible||c.css("opacity",0).show(),n=c.offsetParent().offset(),i.top-=n.top,i.top+=d.scrollTop,i.left-=n.left,b.visible||c.css("opacity",o).hide()}"auto"===b.options.width&&(i.width=b.el.outerWidth()+"px"),c.css(i)}},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return"number"==typeof d?d===c:!document.selection||(a=document.selection.createRange(),a.moveStart("character",-c),c===a.text.length)},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===h.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case h.ESC:b.el.val(b.currentValue),b.hide();break;case h.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd()){b.selectHint();break}return;case h.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();if(b.selectedIndex===-1)return void b.hide();if(b.select(b.selectedIndex),b.options.tabDisabled===!1)return;break;case h.RETURN:if(b.selectedIndex===-1)return void b.hide();b.select(b.selectedIndex);break;case h.UP:b.moveUp();break;case h.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case h.UP:case h.DOWN:return}clearTimeout(b.onChangeTimeout),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeTimeout=setTimeout(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)return void(this.ignoreValueChange=!1);var b=this,c=b.options,d=b.el.val(),e=b.getQuery(d);return b.selection&&b.currentValue!==e&&(b.selection=null,(c.onInvalidateSelection||a.noop).call(b.element)),clearTimeout(b.onChangeTimeout),b.currentValue=d,b.selectedIndex=-1,c.triggerSelectOnValidInput&&b.isExactMatch(e)?void b.select(0):void(e.lengthh&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f,g=this,h=g.options,i=h.serviceUrl;if(h.params[h.paramName]=b,h.onSearchStart.call(g.element,h.params)!==!1){if(d=h.ignoreParams?null:h.params,a.isFunction(h.lookup))return void h.lookup(b,function(a){g.suggestions=a.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,a.suggestions)});g.isLocal?c=g.getSuggestionsLocal(b):(a.isFunction(i)&&(i=i.call(g.element,b)),e=i+"?"+a.param(d||{}),c=g.cachedResponse[e]),c&&Array.isArray(c.suggestions)?(g.suggestions=c.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,c.suggestions)):g.isBadQuery(b)?h.onSearchComplete.call(g.element,b,[]):(g.abortAjax(),f={url:i,data:d,type:h.type,dataType:h.dataType},a.extend(f,h.ajaxSettings),g.currentRequest=a.ajax(f).done(function(a){var c;g.currentRequest=null,c=h.transformResult(a,b),g.processResponse(c,b,e),h.onSearchComplete.call(g.element,b,c.suggestions)}).fail(function(a,c,d){h.onSearchError.call(g.element,b,a,c,d)}))}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this,c=a(b.suggestionsContainer);a.isFunction(b.options.onHide)&&b.visible&&b.options.onHide.call(b.element,c),b.visible=!1,b.selectedIndex=-1,clearTimeout(b.onChangeTimeout),a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(!this.suggestions.length)return void(this.options.showNoSuggestionNotice?this.noSuggestions():this.hide());var b,c=this,d=c.options,e=d.groupBy,f=d.formatResult,g=c.getQuery(c.currentValue),h=c.classes.suggestion,i=c.classes.selected,j=a(c.suggestionsContainer),k=a(c.noSuggestionsContainer),l=d.beforeRender,m="",n=function(a,c){var f=a.data[e];return b===f?"":(b=f,d.formatGroup(a,b))};return d.triggerSelectOnValidInput&&c.isExactMatch(g)?void c.select(0):(a.each(c.suggestions,function(a,b){e&&(m+=n(b,g,a)),m+='
'+f(b,g,a)+"
"}),this.adjustContainerWidth(),k.detach(),j.html(m),a.isFunction(l)&&l.call(c.element,j,c.suggestions),c.fixPosition(),j.show(),d.autoSelectFirst&&(c.selectedIndex=0,j.scrollTop(0),j.children("."+h).first().addClass(i)),c.visible=!0,void c.findBestHint())},noSuggestions:function(){var b=this,c=b.options.beforeRender,d=a(b.suggestionsContainer),e=a(b.noSuggestionsContainer);this.adjustContainerWidth(),e.detach(),d.empty(),d.append(e),a.isFunction(c)&&c.call(b.element,d,b.suggestions),b.fixPosition(),d.show(),b.visible=!0},adjustContainerWidth:function(){var b,c=this,d=c.options,e=a(c.suggestionsContainer);"auto"===d.width?(b=c.el.outerWidth(),e.css("width",b>0?b:300)):"flex"===d.width&&e.css("width","")},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c="",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&"string"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},validateOrientation:function(b,c){return b=a.trim(b||"").toLowerCase(),a.inArray(b,["auto","bottom","top"])===-1&&(b=c),b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&!a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.find("."+d.classes.suggestion);return f.find("."+e).removeClass(e),d.selectedIndex=b,d.selectedIndex!==-1&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a)},moveUp:function(){var b=this;if(b.selectedIndex!==-1)return 0===b.selectedIndex?(a(b.suggestionsContainer).children("."+b.classes.suggestion).first().removeClass(b.classes.selected),b.selectedIndex=-1,b.ignoreValueChange=!1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c=this,d=c.activate(b);if(d){var e,f,g,h=a(d).outerHeight();e=d.offsetTop,f=a(c.suggestionsContainer).scrollTop(),g=f+c.options.maxHeight-h,eg&&a(c.suggestionsContainer).scrollTop(e-c.options.maxHeight+h),c.options.preserveInput||(c.ignoreValueChange=!0,c.el.val(c.getValue(c.suggestions[b].value))),c.signalHint(null)}},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue===c.el.val()||c.options.preserveInput||c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(".autocomplete").removeData("autocomplete"),a(window).off("resize.autocomplete",b.fixPositionCapture),a(b.suggestionsContainer).remove()}},a.fn.devbridgeAutocomplete=function(c,d){var e="autocomplete";return arguments.length?this.each(function(){var f=a(this),g=f.data(e);"string"==typeof c?g&&"function"==typeof g[c]&&g[c](d):(g&&g.dispose&&g.dispose(),g=new b(this,c),f.data(e,g))}):this.first().data(e)},a.fn.autocomplete||(a.fn.autocomplete=a.fn.devbridgeAutocomplete)}); \ No newline at end of file diff --git a/resources/views/form/autocomplete.blade.php b/resources/views/form/autocomplete.blade.php new file mode 100644 index 000000000..bae98d29c --- /dev/null +++ b/resources/views/form/autocomplete.blade.php @@ -0,0 +1,70 @@ + + +
+ +
+ {!! $label !!} +
+ +
+ + @include('admin::form.error') + +
+ + @if ($prepend) + {!! $prepend !!} + @endif + + + @if ($append) + {!! $append !!} + @endif +
+ + @include('admin::form.help-block') + +
+
+ + diff --git a/src/Form.php b/src/Form.php index 231768b8f..0c5aaf88f 100755 --- a/src/Form.php +++ b/src/Form.php @@ -87,6 +87,7 @@ * @method Field\SelectTable selectTable($column, $label = '') * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') * @method Field\Button button(string $html = null) + * @method Field\Autocomplete autocomplete($column, $label = '') */ class Form implements Renderable { @@ -170,6 +171,7 @@ class Form implements Renderable 'array' => Field\ArrayField::class, 'selectTable' => Field\SelectTable::class, 'multipleSelectTable' => Field\MultipleSelectTable::class, + 'autocomplete' =>Field\Autocomplete::class, ]; /** diff --git a/src/Form/Field/Autocomplete.php b/src/Form/Field/Autocomplete.php new file mode 100644 index 000000000..81034cbcd --- /dev/null +++ b/src/Form/Field/Autocomplete.php @@ -0,0 +1,136 @@ + 'group', + ]; + + public function datalist($entries = []) + { + return $this->options($entries); + } + + /** + * Set option groups. + * + * eg: $group = [ + * [ + * 'label' => 'xxxx', + * 'options' => [ + * 'foo', + * 'bar', + * ... + * ], + * ... + * ] + * + * @param array $groups + * @return $this + */ + public function groups(array $groups) + { + $this->groups = $groups; + + return $this; + } + + public function options($options = []) + { + if ($options instanceof \Closure) { + $options = $options->call($this->data(), $this->value()); + } + + $options = array_map(function ($opt) { + if (is_array($opt)) { + if (! array_key_exists('value', $opt)) { + return null; + } + + return $opt; + } + + if (is_string($opt)) { + return ['value' => $opt, 'data' => []]; + } + + return null; + }, Helper::array($options)); + + $this->options = array_merge($this->options, array_filter($options)); + + return $this; + } + + /** + * Set config for autocomplete. + * + * all configurations see https://github.com/devbridge/jQuery-Autocomplete + * + * @param array $configs + * @return $this + */ + public function configs($configs = []) + { + if ($configs instanceof \Closure) { + $configs = $configs->call($this->data(), $this->value()); + } + + $this->configs = array_merge($this->configs, Helper::array($configs)); + + return $this; + } + + /** + * Load options from ajax results. + * + * @param string $url + * @param string $valueField + * @param string|null $groupField + * @return $this + */ + public function ajax(string $url, string $valueField = '', string $groupField = '') + { + $url = admin_url($url); + + return $this->addVariables(['ajax' => compact('url', 'valueField', 'groupField')]); + } + + public function render() + { + $this->formatGroupOptions(); + + $this->addVariables([ + 'options' => json_encode($this->options), + 'configs' => JavaScript::format($this->configs), + ]); + + return parent::render(); + } + + protected function formatGroupOptions() + { + foreach ($this->group as $group) { + if (! array_key_exists('options', $group) || ! array_key_exists('label', $group)) { + continue; + } + + $this->options(array_map(function ($str) use ($group) { + return ['value' => $str, 'data' => ['group' => $group['label']]]; + }, $group['options'])); + } + + $this->group = []; + + return $this; + } +} diff --git a/src/Layout/Asset.php b/src/Layout/Asset.php index 1421055df..651f3fcf7 100644 --- a/src/Layout/Asset.php +++ b/src/Layout/Asset.php @@ -177,6 +177,9 @@ class Asset '@sortable' => [ 'js' => '@admin/dcat/plugins/sortable/Sortable.min.js', ], + '@autocomplete' => [ + 'js' => '@admin/dcat/plugins/autocomplete/jquery.autocomplete.min.js', + ], ]; /** From 55008fff1a1f371f8ef353e44eb367648ddfaae4 Mon Sep 17 00:00:00 2001 From: Jiang qinghua <841324345@qq.com> Date: Wed, 29 Sep 2021 09:46:47 +0800 Subject: [PATCH 005/170] =?UTF-8?q?=E5=8D=95=E6=B5=8B=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E7=89=88=E6=9C=AC=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/bin/install-admin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bin/install-admin.sh b/tests/bin/install-admin.sh index d9d46a40b..6671b152f 100644 --- a/tests/bin/install-admin.sh +++ b/tests/bin/install-admin.sh @@ -4,6 +4,6 @@ cd ./laravel-tests php artisan admin:publish --force php artisan admin:install php artisan migrate:rollback -php artisan dusk:chrome-driver +php artisan dusk:chrome-driver 94 cp -f ./tests/routes.php ./app/Admin/ cp -rf ./tests/resources/config ./config/ From fbe43d00a9338bcf1776f4e7ed6a72e92e219817 Mon Sep 17 00:00:00 2001 From: Jiang qinghua <841324345@qq.com> Date: Wed, 29 Sep 2021 09:50:41 +0800 Subject: [PATCH 006/170] =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/bin/install-admin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bin/install-admin.sh b/tests/bin/install-admin.sh index 6671b152f..8135b3483 100644 --- a/tests/bin/install-admin.sh +++ b/tests/bin/install-admin.sh @@ -4,6 +4,6 @@ cd ./laravel-tests php artisan admin:publish --force php artisan admin:install php artisan migrate:rollback -php artisan dusk:chrome-driver 94 +php artisan dusk:chrome-driver 93 cp -f ./tests/routes.php ./app/Admin/ cp -rf ./tests/resources/config ./config/ From dce1de3d5b3035be8da051213c56cc14a675e93c Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Sep 2021 11:03:52 +0800 Subject: [PATCH 007/170] =?UTF-8?q?groups=20=E6=94=AF=E6=8C=81=E9=97=AD?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Field/Autocomplete.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Form/Field/Autocomplete.php b/src/Form/Field/Autocomplete.php index 81034cbcd..ead0fbe3a 100644 --- a/src/Form/Field/Autocomplete.php +++ b/src/Form/Field/Autocomplete.php @@ -34,12 +34,16 @@ public function datalist($entries = []) * ... * ] * - * @param array $groups + * @param array|\Closure $groups * @return $this */ - public function groups(array $groups) + public function groups($groups = []) { - $this->groups = $groups; + if ($groups instanceof \Closure) { + $groups = $groups->call($this->data(), $this->value()); + } + + $this->groups = array_merge($this->groups, $groups); return $this; } From 30e9953d2eaaed215908429c0470f7a0d0ef86f4 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Sep 2021 12:01:06 +0800 Subject: [PATCH 008/170] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=AC=AC=E4=B8=80=E4=B8=AAoption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Field/Autocomplete.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Form/Field/Autocomplete.php b/src/Form/Field/Autocomplete.php index ead0fbe3a..184e9b67a 100644 --- a/src/Form/Field/Autocomplete.php +++ b/src/Form/Field/Autocomplete.php @@ -13,6 +13,7 @@ class Autocomplete extends Text protected $configs = [ 'groupBy' => 'group', + 'autoSelectFirst' => true, ]; public function datalist($entries = []) From 8d399541d263dedf84428afe36e109b6e0089c4c Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Sep 2021 12:45:53 +0800 Subject: [PATCH 009/170] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form.php b/src/Form.php index 0c5aaf88f..9672b7124 100755 --- a/src/Form.php +++ b/src/Form.php @@ -171,7 +171,7 @@ class Form implements Renderable 'array' => Field\ArrayField::class, 'selectTable' => Field\SelectTable::class, 'multipleSelectTable' => Field\MultipleSelectTable::class, - 'autocomplete' =>Field\Autocomplete::class, + 'autocomplete' => Field\Autocomplete::class, ]; /** From ea3cf6cb66c800aba5eabd6828d001649a036437 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Sep 2021 16:08:42 +0800 Subject: [PATCH 010/170] add prepend --- src/Form/Field/Autocomplete.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Form/Field/Autocomplete.php b/src/Form/Field/Autocomplete.php index 184e9b67a..2397f684a 100644 --- a/src/Form/Field/Autocomplete.php +++ b/src/Form/Field/Autocomplete.php @@ -16,6 +16,13 @@ class Autocomplete extends Text 'autoSelectFirst' => true, ]; + public function __construct($column, $arguments = []) + { + $this->prepend(''); + + parent::__construct($column, $arguments); + } + public function datalist($entries = []) { return $this->options($entries); From f7d8545be304702c928f912c94c0a3b32b9254ad Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Sep 2021 20:29:23 +0800 Subject: [PATCH 011/170] include input blade --- resources/views/form/autocomplete.blade.php | 27 +-------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/resources/views/form/autocomplete.blade.php b/resources/views/form/autocomplete.blade.php index bae98d29c..7ed8ad024 100644 --- a/resources/views/form/autocomplete.blade.php +++ b/resources/views/form/autocomplete.blade.php @@ -7,32 +7,7 @@ .autocomplete-group { padding: 2px 5px; font-weight: bold; font-size: 16px; color: #000; display: block; border-bottom: 1px solid #000; } -
- -
- {!! $label !!} -
- -
- - @include('admin::form.error') - -
- - @if ($prepend) - {!! $prepend !!} - @endif - - - @if ($append) - {!! $append !!} - @endif -
- - @include('admin::form.help-block') - -
-
+@include('admin::form.input') diff --git a/src/Form.php b/src/Form.php index 231768b8f..9672b7124 100755 --- a/src/Form.php +++ b/src/Form.php @@ -87,6 +87,7 @@ * @method Field\SelectTable selectTable($column, $label = '') * @method Field\MultipleSelectTable multipleSelectTable($column, $label = '') * @method Field\Button button(string $html = null) + * @method Field\Autocomplete autocomplete($column, $label = '') */ class Form implements Renderable { @@ -170,6 +171,7 @@ class Form implements Renderable 'array' => Field\ArrayField::class, 'selectTable' => Field\SelectTable::class, 'multipleSelectTable' => Field\MultipleSelectTable::class, + 'autocomplete' => Field\Autocomplete::class, ]; /** diff --git a/src/Form/Field/Autocomplete.php b/src/Form/Field/Autocomplete.php new file mode 100644 index 000000000..3bb5ee250 --- /dev/null +++ b/src/Form/Field/Autocomplete.php @@ -0,0 +1,167 @@ + true, + ]; + + public function __construct($column, $arguments = []) + { + $this->prepend(''); + + parent::__construct($column, $arguments); + } + + public function datalist($entries = []) + { + return $this->options($entries); + } + + /** + * Set option groups. + * + * eg: $group = [ + * [ + * 'label' => 'xxxx', + * 'options' => [ + * 'foo', + * 'bar', + * ... + * ], + * ... + * ] + * + * @param array|\Closure $groups + * @return $this + */ + public function groups($groups = []) + { + if ($groups instanceof \Closure) { + $groups = $groups->call($this->data(), $this->value()); + } + + $this->groups = array_merge($this->groups, $groups); + + return $this; + } + + /** + * @param array|\Closure $options + * @return $this|Autocomplete + */ + public function options($options = []) + { + if ($options instanceof \Closure) { + $options = $options->call($this->data(), $this->value()); + } + + $this->options = array_merge($this->options, $this->formatOptions($options)); + + return $this; + } + + /** + * Set config for autocomplete. + * + * all configurations see https://github.com/devbridge/jQuery-Autocomplete + * + * @param array|\Closure $configs + * @return $this + */ + public function configs($configs = []) + { + if ($configs instanceof \Closure) { + $configs = $configs->call($this->data(), $this->value()); + } + + $this->configs = array_merge($this->configs, Helper::array($configs)); + + return $this; + } + + public function groupBy(string $groupBy) + { + $this->groupBy = $groupBy; + + return $this; + } + + /** + * Load options from ajax results. + * + * @param string $url + * @param string|null $valueField + * @param string|null $groupField + * @return $this + */ + public function ajax(string $url, string $valueField = '', string $groupField = '') + { + $url = admin_url($url); + + return $this->addVariables(['ajax' => compact('url', 'valueField', 'groupField')]); + } + + public function render() + { + $this->formatGroupOptions(); + + $this->addVariables([ + 'options' => json_encode($this->options, \JSON_UNESCAPED_UNICODE), + 'configs' => JavaScript::format($this->configs), + ]); + + $this->configs([ + 'groupBy' => $this->groupBy, + ]); + + return parent::render(); + } + + protected function formatGroupOptions() + { + foreach ($this->groups as $group) { + if (! array_key_exists('options', $group) || ! array_key_exists('label', $group)) { + continue; + } + + $this->options = array_merge($this->options, $this->formatOptions($group['options'], $group['label'])); + } + + $this->groups = []; + + return $this; + } + + protected function formatOptions($options, string $group = ''): array + { + return array_filter(array_map(function ($opt) use ($group) { + if (! is_array($opt)) { + $opt = ['value' => $opt, 'data' => []]; + } + + if (! array_key_exists('value', $opt)) { + return null; + } + + if ($group) { + $opt['data'][$this->groupBy] = $group; + } + + return $opt; + }, Helper::array($options))); + } +} diff --git a/src/Form/Field/HasDepends.php b/src/Form/Field/HasDepends.php new file mode 100644 index 000000000..0cc6d548a --- /dev/null +++ b/src/Form/Field/HasDepends.php @@ -0,0 +1,27 @@ +formatName($field); + }, (array) $fields); + + return $this->addVariables([ + 'depends' => [ + 'fields' => json_encode($fields, \JSON_UNESCAPED_UNICODE), + 'clear' => $clear, + ], + ]); + } +} diff --git a/src/Layout/Asset.php b/src/Layout/Asset.php index 1421055df..651f3fcf7 100644 --- a/src/Layout/Asset.php +++ b/src/Layout/Asset.php @@ -177,6 +177,9 @@ class Asset '@sortable' => [ 'js' => '@admin/dcat/plugins/sortable/Sortable.min.js', ], + '@autocomplete' => [ + 'js' => '@admin/dcat/plugins/autocomplete/jquery.autocomplete.min.js', + ], ]; /** From df688e98bd70212a13990acebcc47b48716e709f Mon Sep 17 00:00:00 2001 From: attentive20 <71190913+attentive20@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:13:57 +0300 Subject: [PATCH 018/170] Add files via upload --- Between.php | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 Between.php diff --git a/Between.php b/Between.php new file mode 100644 index 000000000..add79e822 --- /dev/null +++ b/Between.php @@ -0,0 +1,205 @@ +class = [ + 'start' => uniqid('column-filter-start-'), + 'end' => uniqid('column-filter-end-'), + ]; + } + + /** + * Convert the datetime into unix timestamp. + * + * @return $this + */ + public function toTimestamp() + { + $this->timestamp = true; + + return $this; + } + + /** + * Date filter. + * + * @return $this + */ + public function date() + { + return $this->setDateFormat('YYYY-MM-DD'); + } + + /** + * Time filter. + * + * @return $this + */ + public function time() + { + return $this->setDateFormat('HH:mm:ss'); + } + + /** + * Datetime filter. + * + * @return $this + */ + public function datetime() + { + return $this->setDateFormat('YYYY-MM-DD HH:mm:ss'); + } + + /** + * @param string $format + * @return $this + */ + protected function setDateFormat($format) + { + $this->dateFormat = $format; + + $this->requireAssets(); + + return $this; + } + + /** + * Add a binding to the query. + * + * @param mixed $value + * @param Model $model + */ + public function addBinding($value, Model $model) + { + $value = array_filter((array) $value); + + if (empty($value)) { + return; + } + + if ($this->timestamp) { + $value = array_map(function ($v) { + if ($v) { + return strtotime($v); + } + }, $value); + } + + if (! isset($value['start'])) { + $this->withQuery($model, 'where', ['<=', $value['end']]); + + return; + } + + if (! isset($value['end'])) { + $this->withQuery($model, 'where', ['>=', $value['start']]); + + return; + } + + $this->withQuery($model, 'whereBetween', [array_values($value)]); + } + + protected function addScript() + { + if (! $this->dateFormat) { + return; + } + + $options = [ + 'locale' => config('app.locale'), + 'allowInputToggle' => true, + 'format' => $this->dateFormat, + 'extraFormats' => ['DD-MM-YYYY', 'DD/MM/YYYY', 'DD.MM.YYYY', 'DD,MM,YYYY'], + ]; + + $options = json_encode($options); + + Admin::script(<<class['start']}').datetimepicker($options); + $('.{$this->class['end']}').datetimepicker($options); +JS + ); +// $('.{$this->class['start']}').on("dp.change", function (e) { +// $('.{$this->class['end']}').data("DateTimePicker").minDate(e.date); +// }); +// $('.{$this->class['end']}').on("dp.change", function (e) { +// $('.{$this->class['start']}').data("DateTimePicker").maxDate(e.date); +// }); + } + + /** + * Render this filter. + * + * @return string + */ + public function render() + { + if (! $this->shouldDisplay()) { + return; + } + + $script = <<<'JS' +$('.dropdown-menu input').on('click', function(e) { + e.stopPropagation(); +}); +JS; + + Admin::script($script); + + $this->addScript(); + + $value = $this->value(['start' => '', 'end' => '']); + $active = empty(array_filter($value)) ? '' : 'active'; + + return << +
+ + + + +
+ +EOT; + } + + protected function requireAssets() + { + Admin::requireAssets(['moment', 'bootstrap-datetimepicker']); + } +} From 1e19e5ee687e294b2d82b1d7fc28ed3fc3714815 Mon Sep 17 00:00:00 2001 From: attentive20 <71190913+attentive20@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:43:25 +0300 Subject: [PATCH 019/170] Delete Between.php --- Between.php | 205 ---------------------------------------------------- 1 file changed, 205 deletions(-) delete mode 100644 Between.php diff --git a/Between.php b/Between.php deleted file mode 100644 index add79e822..000000000 --- a/Between.php +++ /dev/null @@ -1,205 +0,0 @@ -class = [ - 'start' => uniqid('column-filter-start-'), - 'end' => uniqid('column-filter-end-'), - ]; - } - - /** - * Convert the datetime into unix timestamp. - * - * @return $this - */ - public function toTimestamp() - { - $this->timestamp = true; - - return $this; - } - - /** - * Date filter. - * - * @return $this - */ - public function date() - { - return $this->setDateFormat('YYYY-MM-DD'); - } - - /** - * Time filter. - * - * @return $this - */ - public function time() - { - return $this->setDateFormat('HH:mm:ss'); - } - - /** - * Datetime filter. - * - * @return $this - */ - public function datetime() - { - return $this->setDateFormat('YYYY-MM-DD HH:mm:ss'); - } - - /** - * @param string $format - * @return $this - */ - protected function setDateFormat($format) - { - $this->dateFormat = $format; - - $this->requireAssets(); - - return $this; - } - - /** - * Add a binding to the query. - * - * @param mixed $value - * @param Model $model - */ - public function addBinding($value, Model $model) - { - $value = array_filter((array) $value); - - if (empty($value)) { - return; - } - - if ($this->timestamp) { - $value = array_map(function ($v) { - if ($v) { - return strtotime($v); - } - }, $value); - } - - if (! isset($value['start'])) { - $this->withQuery($model, 'where', ['<=', $value['end']]); - - return; - } - - if (! isset($value['end'])) { - $this->withQuery($model, 'where', ['>=', $value['start']]); - - return; - } - - $this->withQuery($model, 'whereBetween', [array_values($value)]); - } - - protected function addScript() - { - if (! $this->dateFormat) { - return; - } - - $options = [ - 'locale' => config('app.locale'), - 'allowInputToggle' => true, - 'format' => $this->dateFormat, - 'extraFormats' => ['DD-MM-YYYY', 'DD/MM/YYYY', 'DD.MM.YYYY', 'DD,MM,YYYY'], - ]; - - $options = json_encode($options); - - Admin::script(<<class['start']}').datetimepicker($options); - $('.{$this->class['end']}').datetimepicker($options); -JS - ); -// $('.{$this->class['start']}').on("dp.change", function (e) { -// $('.{$this->class['end']}').data("DateTimePicker").minDate(e.date); -// }); -// $('.{$this->class['end']}').on("dp.change", function (e) { -// $('.{$this->class['start']}').data("DateTimePicker").maxDate(e.date); -// }); - } - - /** - * Render this filter. - * - * @return string - */ - public function render() - { - if (! $this->shouldDisplay()) { - return; - } - - $script = <<<'JS' -$('.dropdown-menu input').on('click', function(e) { - e.stopPropagation(); -}); -JS; - - Admin::script($script); - - $this->addScript(); - - $value = $this->value(['start' => '', 'end' => '']); - $active = empty(array_filter($value)) ? '' : 'active'; - - return << -
- - - - -
- -EOT; - } - - protected function requireAssets() - { - Admin::requireAssets(['moment', 'bootstrap-datetimepicker']); - } -} From 06a596b306c382fb173e2cec6ab1c9479c8ade58 Mon Sep 17 00:00:00 2001 From: attentive20 <71190913+attentive20@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:47:11 +0300 Subject: [PATCH 020/170] Update Between.php --- src/Grid/Column/Filter/Between.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Grid/Column/Filter/Between.php b/src/Grid/Column/Filter/Between.php index 56be80254..010d396a2 100644 --- a/src/Grid/Column/Filter/Between.php +++ b/src/Grid/Column/Filter/Between.php @@ -125,6 +125,7 @@ protected function addScript() 'locale' => config('app.locale'), 'allowInputToggle' => true, 'format' => $this->dateFormat, + 'extraFormats' => ['DD-MM-YYYY', 'DD/MM/YYYY', 'DD.MM.YYYY', 'DD,MM,YYYY'], ]; $options = json_encode($options); From 4a3f26b37d69757fdd51d539e4a1d6d6a39adb58 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Tue, 5 Oct 2021 11:13:02 +0800 Subject: [PATCH 021/170] =?UTF-8?q?select=E5=AD=97=E6=AE=B5focus=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/scripts/select.blade.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/resources/views/scripts/select.blade.php b/resources/views/scripts/select.blade.php index 3e951f0f9..5097854d5 100644 --- a/resources/views/scripts/select.blade.php +++ b/resources/views/scripts/select.blade.php @@ -59,3 +59,18 @@ @endif + From 51c3a7389f1cf6e0a993c062f97ca89247aeefde Mon Sep 17 00:00:00 2001 From: khaki Date: Fri, 8 Oct 2021 15:12:04 +0800 Subject: [PATCH 022/170] =?UTF-8?q?session=5Fpath=E5=9C=A8=E7=89=B9?= =?UTF-8?q?=E5=AE=9A=E5=9C=BA=E6=99=AF=E4=B8=8B=E5=AD=98=E5=9C=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 存在一种场景:laravel项目为主域名下二级目录(如:https://www.dcatadmin.com/sub/admin),不能直接指定"location /"到项目public目录,而是配置 "alias /sub ..."。此时session_path的值为 "/admin" 会有问题。 --- src/Http/Middleware/Session.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Http/Middleware/Session.php b/src/Http/Middleware/Session.php index f84e46639..6f34bd0ea 100644 --- a/src/Http/Middleware/Session.php +++ b/src/Http/Middleware/Session.php @@ -12,7 +12,14 @@ public function handle(Request $request, \Closure $next) return $next($request); } - $path = '/'.trim(config('admin.route.prefix'), '/'); + $path_prefix = ''; + $path_arr = parse_url(config('app.url')); + + if (array_key_exists('path', $path_arr) && !empty($path_arr['path'])) { + $path_prefix = rtrim($path_arr['path'], '/'); + } + + $path = $path_prefix . '/' . trim(config('admin.route.prefix'), '/'); config(['session.path' => $path]); From c1c3f680501d6392dcfaa898f62ad841d9a235a2 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Sun, 10 Oct 2021 10:49:55 +0800 Subject: [PATCH 023/170] =?UTF-8?q?=E6=89=A9=E5=B1=95=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=BC=95=E5=85=A5CDN=E7=9A=84JS,=20CSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extend/ServiceProvider.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Extend/ServiceProvider.php b/src/Extend/ServiceProvider.php index a92ad3c4d..8bd0146ff 100644 --- a/src/Extend/ServiceProvider.php +++ b/src/Extend/ServiceProvider.php @@ -6,6 +6,7 @@ use Dcat\Admin\Exception\RuntimeException; use Dcat\Admin\Support\ComposerProperty; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider as LaravelServiceProvider; use Symfony\Component\Console\Output\NullOutput; @@ -568,6 +569,10 @@ protected function formatAssetFiles($files) return array_map([$this, 'formatAssetFiles'], $files); } + if(URL::isValidUrl($files)){ + return $files; + } + return '@'.$this->getName().'.path/'.trim($files, '/'); } From 8a6295ba2f303f051a1ae961a2d9c7d15a567e45 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Sun, 10 Oct 2021 10:53:18 +0800 Subject: [PATCH 024/170] fix style ci --- src/Extend/ServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extend/ServiceProvider.php b/src/Extend/ServiceProvider.php index 8bd0146ff..d6676e880 100644 --- a/src/Extend/ServiceProvider.php +++ b/src/Extend/ServiceProvider.php @@ -569,7 +569,7 @@ protected function formatAssetFiles($files) return array_map([$this, 'formatAssetFiles'], $files); } - if(URL::isValidUrl($files)){ + if (URL::isValidUrl($files)) { return $files; } From b91bd634aec9b455bd0b1588f563987434950a43 Mon Sep 17 00:00:00 2001 From: "Jonathan.Liu" <62255465+Jonathan-Up@users.noreply.github.com> Date: Tue, 12 Oct 2021 22:20:17 +0800 Subject: [PATCH 025/170] =?UTF-8?q?phpstorm=E6=9B=B4=E5=A5=BD=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如果传入$label参数闭包函数中的内容在ide的显示不会有高亮显示,其他地方应该也会出现这种情况 --- src/Widgets/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widgets/Form.php b/src/Widgets/Form.php index c330e9eef..5af92c534 100755 --- a/src/Widgets/Form.php +++ b/src/Widgets/Form.php @@ -64,7 +64,7 @@ * @method Field\Html html($html, $label = '') * @method Field\Tags tags($column, $label = '') * @method Field\Icon icon($column, $label = '') - * @method Field\Embeds embeds($column, $label = '') + * @method Field\Embeds embeds($column, $label = '', $callback = null) * @method Field\Captcha captcha($column, $label = '') * @method Field\Listbox listbox($column, $label = '') * @method Field\File file($column, $label = '') From 3bd44566e141553f5c540870495a7974db2152f5 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Sun, 17 Oct 2021 11:53:24 +0800 Subject: [PATCH 026/170] =?UTF-8?q?=E5=8F=AF=E7=8B=AC=E7=AB=8B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20Row=20=E7=9A=84=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Row.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Form/Row.php b/src/Form/Row.php index f90463e68..d2b881e97 100755 --- a/src/Form/Row.php +++ b/src/Form/Row.php @@ -91,6 +91,13 @@ class Row implements Renderable */ protected $defaultFieldWidth = 12; + /** + * field width for appended field. + * + * @var int + */ + protected $fieldWidth; + /** * @var bool */ @@ -168,7 +175,7 @@ public function model() */ public function width($width = 12) { - $this->defaultFieldWidth = $width; + $this->fieldWidth = $width; return $this; } @@ -197,10 +204,12 @@ public function __call($method, $arguments) $field->horizontal($this->horizontal); $this->fields->push([ - 'width' => $this->defaultFieldWidth, + 'width' => $this->fieldWidth ?: $this->defaultFieldWidth, 'element' => $field, ]); + unset($this->fieldWidth); // unset field width for next field + return $field; } } From 42968792104dcd14af307e5b206e4bd507c21d56 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Sun, 17 Oct 2021 12:08:19 +0800 Subject: [PATCH 027/170] =?UTF-8?q?=E9=87=8D=E7=BD=AE=20field=20width=20?= =?UTF-8?q?=E4=B8=BA=E9=BB=98=E8=AE=A4=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Row.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Form/Row.php b/src/Form/Row.php index d2b881e97..0a19dbc74 100755 --- a/src/Form/Row.php +++ b/src/Form/Row.php @@ -96,7 +96,7 @@ class Row implements Renderable * * @var int */ - protected $fieldWidth; + protected $fieldWidth = 12; /** * @var bool @@ -204,11 +204,11 @@ public function __call($method, $arguments) $field->horizontal($this->horizontal); $this->fields->push([ - 'width' => $this->fieldWidth ?: $this->defaultFieldWidth, + 'width' => $this->fieldWidth, 'element' => $field, ]); - unset($this->fieldWidth); // unset field width for next field + $this->fieldWidth = $this->defaultFieldWidth; // reset field width for next field return $field; } From d9f9070f1e622bd31debf0716ff43348d4cea68a Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Sun, 17 Oct 2021 18:39:58 +0800 Subject: [PATCH 028/170] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20defaultWidth=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Row.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Form/Row.php b/src/Form/Row.php index 0a19dbc74..a0c87b189 100755 --- a/src/Form/Row.php +++ b/src/Form/Row.php @@ -167,6 +167,19 @@ public function model() return $this->form->model(); } + /** + * Set default width for field. + * + * @param int $width + * @return $this + */ + public function defaultWidth(int $width = 12) + { + $this->defaultFieldWidth = $width; + + return $this; + } + /** * Set width for a incomming field. * From 110120a82f8e6d0cf055593a38128f67c4b0d615 Mon Sep 17 00:00:00 2001 From: Jiang qinghua <841324345@qq.com> Date: Wed, 27 Oct 2021 10:48:40 +0800 Subject: [PATCH 029/170] fix #1516 --- src/Form/Concerns/HasFieldValidator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Concerns/HasFieldValidator.php b/src/Form/Concerns/HasFieldValidator.php index 26d96eb95..4b009216e 100644 --- a/src/Form/Concerns/HasFieldValidator.php +++ b/src/Form/Concerns/HasFieldValidator.php @@ -368,8 +368,8 @@ public function getValidator(array $input) $input = $this->sanitizeInput($input, $this->column); - Arr::set($rules, $this->column, $fieldRules); - Arr::set($attributes, $this->column, $this->label); + $rules[$this->column] = $fieldRules; + $attributes[$this->column] = $this->label; } if (is_array($this->column)) { From 6dca0e390452d8b730019469b506de2c8dfcc78e Mon Sep 17 00:00:00 2001 From: ReedSun Date: Fri, 29 Oct 2021 15:42:49 +0800 Subject: [PATCH 030/170] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=8B=A5=E5=B7=B2=E6=B7=BB=E5=8A=A0=E8=BF=87=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=99=E6=97=A0=E6=B3=95=E7=BB=A7=E7=BB=AD=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/form/file.blade.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/views/form/file.blade.php b/resources/views/form/file.blade.php index 928499f17..0ec6ba066 100755 --- a/resources/views/form/file.blade.php +++ b/resources/views/form/file.blade.php @@ -11,6 +11,14 @@ .web-uploader .filelist li p.upload-progress span { background: @primary(-8); } + + .web-uploader .dnd-area.webuploader-dnd-over { + border: 3px dashed #999 !important; + } + .web-uploader .dnd-area.webuploader-dnd-over .placeholder { + border: none; + } +
@@ -24,8 +32,8 @@
-
-
+
+

{{trans('admin.uploader.drag_file')}}

From d451a0332c32e93270c93601f3008eb31c8cb24c Mon Sep 17 00:00:00 2001 From: weiwait Date: Sat, 6 Nov 2021 18:01:13 +0800 Subject: [PATCH 031/170] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Traits/ModelTree.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Traits/ModelTree.php b/src/Traits/ModelTree.php index eadfa4183..77316aa30 100755 --- a/src/Traits/ModelTree.php +++ b/src/Traits/ModelTree.php @@ -15,6 +15,7 @@ * @property string $parentColumn * @property string $titleColumn * @property string $orderColumn + * @property string $depthColumn * @property string $defaultParentId * @property array $sortable */ @@ -60,6 +61,16 @@ public function getOrderColumn() return empty($this->orderColumn) ? 'order' : $this->orderColumn; } + /** + * Get depth column name. + * + * @return string + */ + public function getDepthColumn() + { + return $this->depthColumn ?: ''; + } + /** * @return string */ @@ -148,7 +159,7 @@ protected static function setBranchOrder(array $order) * @param array $tree * @param int $parentId */ - public static function saveOrder($tree = [], $parentId = 0) + public static function saveOrder($tree = [], $parentId = 0, $depth = 1) { if (empty(static::$branchOrder)) { static::setBranchOrder($tree); @@ -159,10 +170,11 @@ public static function saveOrder($tree = [], $parentId = 0) $node->{$node->getParentColumn()} = $parentId; $node->{$node->getOrderColumn()} = static::$branchOrder[$branch['id']]; + $node->getDepthColumn() && $node->{$node->getDepthColumn()} = $depth; $node->save(); if (isset($branch['children'])) { - static::saveOrder($branch['children'], $branch['id']); + static::saveOrder($branch['children'], $branch['id'], $depth + 1); } } } From addadac1b79415137e9baba782b3f9649c56115a Mon Sep 17 00:00:00 2001 From: Dog <296404875@qq.com> Date: Tue, 9 Nov 2021 18:17:45 +0800 Subject: [PATCH 032/170] Update Model.php --- src/Grid/Model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index d39584dca..b9592392b 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -535,7 +535,9 @@ public function getPerPage() return; } - return $this->request->get($this->getPerPageName()) ?: $this->perPage; + $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage; + if($perPage) return (int)$perPage; + return null; } /** From 7610989d5e5e4f280a0a556fb58df5e7abd12616 Mon Sep 17 00:00:00 2001 From: Dog <296404875@qq.com> Date: Tue, 9 Nov 2021 18:25:55 +0800 Subject: [PATCH 033/170] Update Model.php --- src/Grid/Model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index b9592392b..58dfd5d60 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -536,7 +536,10 @@ public function getPerPage() } $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage; - if($perPage) return (int)$perPage; + if($perPage){ + return (int) $perPage; + } + return null; } From 1ea46e2cf115eb780bde153c110d6bd5ddb0048e Mon Sep 17 00:00:00 2001 From: Dog <296404875@qq.com> Date: Tue, 9 Nov 2021 18:27:31 +0800 Subject: [PATCH 034/170] Update Model.php --- src/Grid/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index 58dfd5d60..cb6f1228f 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -536,7 +536,7 @@ public function getPerPage() } $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage; - if($perPage){ + if ($perPage) { return (int) $perPage; } From 827644ed67e1faad1c665458a15f91e600709dc9 Mon Sep 17 00:00:00 2001 From: Dog <296404875@qq.com> Date: Tue, 9 Nov 2021 18:29:36 +0800 Subject: [PATCH 035/170] Update Model.php --- src/Grid/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index cb6f1228f..bb7a55e0b 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -535,7 +535,7 @@ public function getPerPage() return; } - $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage; + $perPage = $this->request->get($this->getPerPageName()) ?: $this->perPage; if ($perPage) { return (int) $perPage; } From 8d213f478fb91c92e9ca56eedf3c3f5ebb5669da Mon Sep 17 00:00:00 2001 From: Dog <296404875@qq.com> Date: Tue, 9 Nov 2021 18:30:37 +0800 Subject: [PATCH 036/170] Update Model.php --- src/Grid/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Model.php b/src/Grid/Model.php index bb7a55e0b..1586078cf 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -539,7 +539,7 @@ public function getPerPage() if ($perPage) { return (int) $perPage; } - + return null; } From fb7fe423d9978f829bc32ec9090b9293187a508e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bukowski?= Date: Tue, 9 Nov 2021 18:15:20 +0100 Subject: [PATCH 037/170] fix phpdoc of form field setLabelClass method --- src/Form/Field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Field.php b/src/Form/Field.php index 79567c6e8..5f0b9edce 100755 --- a/src/Form/Field.php +++ b/src/Form/Field.php @@ -1065,7 +1065,7 @@ public function removeElementClass($class) /** * @param array|string $labelClass * @param bool $append - * @return $this|string + * @return $this */ public function setLabelClass($labelClass, bool $append = true) { From fc75dd23014f1f83756782af1d1cad6983a0c28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bukowski?= Date: Wed, 10 Nov 2021 10:00:23 +0100 Subject: [PATCH 038/170] fix Form Field label&value phpdoc --- src/Form/Field.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Field.php b/src/Form/Field.php index 5f0b9edce..fd163ce86 100755 --- a/src/Form/Field.php +++ b/src/Form/Field.php @@ -537,7 +537,7 @@ public function getErrorKey() /** * Set or get value of the field. * - * @param null $value + * @param mixed|null $value * @return mixed|$this */ public function value($value = null) @@ -640,7 +640,7 @@ public function column() /** * Get or set label of the field. * - * @param null $label + * @param mixed|null $label * @return $this|string */ public function label($label = null) From 09708df3636121a8726202659a2b804de044da6e Mon Sep 17 00:00:00 2001 From: Jiang Qinghua Date: Tue, 16 Nov 2021 03:26:10 +0000 Subject: [PATCH 039/170] Apply fixes from StyleCI --- src/Http/Middleware/Session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Middleware/Session.php b/src/Http/Middleware/Session.php index 6f34bd0ea..4b08f8ce6 100644 --- a/src/Http/Middleware/Session.php +++ b/src/Http/Middleware/Session.php @@ -15,11 +15,11 @@ public function handle(Request $request, \Closure $next) $path_prefix = ''; $path_arr = parse_url(config('app.url')); - if (array_key_exists('path', $path_arr) && !empty($path_arr['path'])) { + if (array_key_exists('path', $path_arr) && ! empty($path_arr['path'])) { $path_prefix = rtrim($path_arr['path'], '/'); } - $path = $path_prefix . '/' . trim(config('admin.route.prefix'), '/'); + $path = $path_prefix.'/'.trim(config('admin.route.prefix'), '/'); config(['session.path' => $path]); From 942118e2619d04f4aa2fcd125456e2ab561c96ed Mon Sep 17 00:00:00 2001 From: Jiang qinghua <841324345@qq.com> Date: Tue, 16 Nov 2021 11:29:49 +0800 Subject: [PATCH 040/170] chrome version --- tests/bin/install-admin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bin/install-admin.sh b/tests/bin/install-admin.sh index 8135b3483..238bd5249 100644 --- a/tests/bin/install-admin.sh +++ b/tests/bin/install-admin.sh @@ -4,6 +4,6 @@ cd ./laravel-tests php artisan admin:publish --force php artisan admin:install php artisan migrate:rollback -php artisan dusk:chrome-driver 93 +php artisan dusk:chrome-driver 95 cp -f ./tests/routes.php ./app/Admin/ cp -rf ./tests/resources/config ./config/ From 9dcedc3b9bee4fbe109dc06c1eb967f81b61bdde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bukowski?= Date: Tue, 16 Nov 2021 18:50:08 +0100 Subject: [PATCH 041/170] multipleSelect filter accepts Closure and Arrayable objects --- src/Grid/Filter/AbstractFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php index 2de379a63..214386a59 100755 --- a/src/Grid/Filter/AbstractFilter.php +++ b/src/Grid/Filter/AbstractFilter.php @@ -318,7 +318,7 @@ public function select($options = []) } /** - * @param array $options + * @param array|\Illuminate\Contracts\Support\Arrayable|\Closure $options * @return MultipleSelect */ public function multipleSelect($options = []) From ab209f60c3aadf3c5d2e1dedabff2ab4f1378bf0 Mon Sep 17 00:00:00 2001 From: elanshan <403557690@qq.com> Date: Wed, 1 Dec 2021 15:13:27 +0800 Subject: [PATCH 042/170] =?UTF-8?q?fix=20issues=201576=20pjax=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=8A=A0=E8=BD=BD=E5=90=8E=EF=BC=8Cpjax-container?= =?UTF-8?q?=E5=AE=B9=E5=99=A8a=E5=85=83=E7=B4=A0=E6=9C=AA=E6=8C=82?= =?UTF-8?q?=E8=BD=BDpjax=20click=E4=BA=8B=E4=BB=B6=20=E7=A7=BB=E5=88=B0=20?= =?UTF-8?q?bootingEveryRequest=20=E9=87=8D=E6=96=B0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96Pjax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/dcat/js/dcat-app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/dcat/js/dcat-app.js b/resources/assets/dcat/js/dcat-app.js index b46e3fa6a..d9cfb9153 100644 --- a/resources/assets/dcat/js/dcat-app.js +++ b/resources/assets/dcat/js/dcat-app.js @@ -95,8 +95,6 @@ function listen(Dcat) { new Footer(Dcat); // data-action 动作绑定(包括删除、批量删除等操作) new DataActions(Dcat); - // pjax初始化功能 - new Pjax(Dcat); }); // 每个请求都初始化 @@ -109,6 +107,8 @@ function listen(Dcat) { 'X-CSRF-TOKEN': Dcat.token } }); + // pjax初始化功能 + new Pjax(Dcat); }); } From deadf269238f276391992da3a48e33d3ff52678e Mon Sep 17 00:00:00 2001 From: elanshan <403557690@qq.com> Date: Wed, 1 Dec 2021 15:18:28 +0800 Subject: [PATCH 043/170] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/dcat/js/dcat-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/dcat/js/dcat-app.js b/resources/assets/dcat/js/dcat-app.js index d9cfb9153..a0aab31d5 100644 --- a/resources/assets/dcat/js/dcat-app.js +++ b/resources/assets/dcat/js/dcat-app.js @@ -107,7 +107,7 @@ function listen(Dcat) { 'X-CSRF-TOKEN': Dcat.token } }); - // pjax初始化功能 + // pjax初始化功能 new Pjax(Dcat); }); } From 3f135222f442a990ef8bfbd195234f93e42e395e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=9C?= <2429960@qq.com> Date: Fri, 3 Dec 2021 14:08:49 +0800 Subject: [PATCH 044/170] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=A0=E6=A8=A1=E5=9E=8B=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E5=99=A8=E9=97=AE=E9=A2=98,=E5=AF=BC=E5=87=BA=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E9=9B=86=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Grid/Exporters/AbstractExporter.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Grid/Exporters/AbstractExporter.php b/src/Grid/Exporters/AbstractExporter.php index a61b8c34c..5ae40f86e 100755 --- a/src/Grid/Exporters/AbstractExporter.php +++ b/src/Grid/Exporters/AbstractExporter.php @@ -4,6 +4,7 @@ use Dcat\Admin\Grid; use Illuminate\Support\Arr; +use Illuminate\Support\Collection; use Illuminate\Support\Str; /** @@ -206,7 +207,7 @@ public function buildData(?int $page = null, ?int $perPage = null) $model->forPage($page, $perPage); } - $array = $this->grid->processFilter()->toArray(); + $array = $this->grid->processFilter(); $model->reset(); @@ -219,7 +220,7 @@ public function buildData(?int $page = null, ?int $perPage = null) * @param array $data * @return array */ - protected function normalize(array $data) + protected function normalize(Collection $data) { foreach ($data as &$row) { $row = Arr::dot($row); @@ -256,7 +257,7 @@ protected function getGridModel() * @param array $data * @return array */ - protected function callBuilder(array &$data) + protected function callBuilder(Collection &$data) { if ($data && $this->builder) { return ($this->builder)($data); From 3a95269419bb0c67061c4fd8202420266347287d Mon Sep 17 00:00:00 2001 From: XuTongle Date: Tue, 7 Dec 2021 16:23:33 +0800 Subject: [PATCH 045/170] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=87=A0=E5=A4=84?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Traits/ModelTree.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Traits/ModelTree.php b/src/Traits/ModelTree.php index 77316aa30..e355da542 100755 --- a/src/Traits/ModelTree.php +++ b/src/Traits/ModelTree.php @@ -38,7 +38,7 @@ trait ModelTree */ public function getParentColumn() { - return empty($this->parentColumn) ? 'parent_id' : $this->parentColumn; + return property_exists($this,'parentColumn') ? $this->parentColumn : 'parent_id'; } /** @@ -48,7 +48,7 @@ public function getParentColumn() */ public function getTitleColumn() { - return empty($this->titleColumn) ? 'title' : $this->titleColumn; + return property_exists($this,'titleColumn') ? $this->titleColumn : 'title'; } /** @@ -58,7 +58,7 @@ public function getTitleColumn() */ public function getOrderColumn() { - return empty($this->orderColumn) ? 'order' : $this->orderColumn; + return property_exists($this,'orderColumn') ? $this->orderColumn : 'order'; } /** @@ -68,7 +68,7 @@ public function getOrderColumn() */ public function getDepthColumn() { - return $this->depthColumn ?: ''; + return property_exists($this,'depthColumn') ? $this->depthColumn : ''; } /** @@ -76,7 +76,7 @@ public function getDepthColumn() */ public function getDefaultParentId() { - return isset($this->defaultParentId) ? $this->defaultParentId : '0'; + return property_exists($this,'defaultParentId') ? $this->defaultParentId : '0'; } /** From dff8886100cc572fb4f439f7431848b021e86de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bukowski?= Date: Tue, 7 Dec 2021 20:09:12 +0100 Subject: [PATCH 046/170] fix styleci --- src/Grid/Filter/AbstractFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php index 214386a59..878d7f7cf 100755 --- a/src/Grid/Filter/AbstractFilter.php +++ b/src/Grid/Filter/AbstractFilter.php @@ -318,7 +318,7 @@ public function select($options = []) } /** - * @param array|\Illuminate\Contracts\Support\Arrayable|\Closure $options + * @param array|\Illuminate\Contracts\Support\Arrayable|\Closure $options * @return MultipleSelect */ public function multipleSelect($options = []) From 65165ce8afa16fa7d70a83a99f04e2ec593b435f Mon Sep 17 00:00:00 2001 From: Abbotton Date: Thu, 9 Dec 2021 21:35:54 +0800 Subject: [PATCH 047/170] =?UTF-8?q?:sparkles:=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=A4=9A=E5=BA=94=E7=94=A8=E6=A8=A1=E5=BC=8F=E4=B8=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=98=E5=82=A8=E4=BD=8D=E7=BD=AE=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/helpers/scaffold.blade.php | 8 ++++---- src/Http/Controllers/ScaffoldController.php | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/views/helpers/scaffold.blade.php b/resources/views/helpers/scaffold.blade.php index 3d7210d47..7b01765ec 100755 --- a/resources/views/helpers/scaffold.blade.php +++ b/resources/views/helpers/scaffold.blade.php @@ -77,7 +77,7 @@ {{(trans('admin.scaffold.controller'))}}
- +
@@ -86,7 +86,7 @@ {{(trans('admin.scaffold.repository'))}}
- +
@@ -302,8 +302,8 @@ class="form-control" $fieldsBody = $('#table-fields tbody'), tpl = $('#table-field-tpl').html(), modelNamespace = 'App\\Models\\', - repositoryNamespace = 'App\\Admin\\Repositories\\', - controllerNamespace = 'App\\Admin\\Controllers\\', + repositoryNamespace = 'App\\{{$app}}\\Repositories\\', + controllerNamespace = 'App\\{{$app}}\\Controllers\\', dataTypeMap = {!! json_encode($dataTypeMap) !!}, helpers = Dcat.helpers; diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index 5ed5cdad8..18be92f00 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -78,6 +78,7 @@ public function index(Content $content) $dbTypes = static::$dbTypes; $dataTypeMap = static::$dataTypeMap; $action = URL::current(); + $app = ucfirst(mb_substr(request()->path(), 0, mb_stripos(request()->path(), '/'))); $tables = collect($this->getDatabaseColumns())->map(function ($v) { return array_keys($v); })->toArray(); @@ -87,7 +88,7 @@ public function index(Content $content) ->description(' ') ->body(view( 'admin::helpers.scaffold', - compact('dbTypes', 'action', 'tables', 'dataTypeMap') + compact('dbTypes', 'action', 'tables', 'dataTypeMap', 'app') )); } From b9e5d5cef40c64e0ad41b7dd409e82a2b2063938 Mon Sep 17 00:00:00 2001 From: WxAmd <15729498+wxfjamdc@users.noreply.github.com> Date: Fri, 10 Dec 2021 15:54:50 +0800 Subject: [PATCH 048/170] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20switch.blade.php?= =?UTF-8?q?=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/grid/displayer/switch.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/grid/displayer/switch.blade.php b/resources/views/grid/displayer/switch.blade.php index 9674df80c..4e821ec0b 100644 --- a/resources/views/grid/displayer/switch.blade.php +++ b/resources/views/grid/displayer/switch.blade.php @@ -1,4 +1,4 @@ - + "); - } - - return redirect()->guest($loginPage); + return admin_redirect('auth/login', 401); } /** diff --git a/src/Support/Helper.php b/src/Support/Helper.php index 63e3c8215..a355f7158 100755 --- a/src/Support/Helper.php +++ b/src/Support/Helper.php @@ -12,6 +12,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\URL; use Illuminate\Support\Str; use Symfony\Component\Process\Process; @@ -969,4 +970,34 @@ public static function keyExists($key, $arrayOrObject) return array_key_exists($key, $arrayOrObject); } + + /** + * 跳转. + * + * @param string $to + * @param int $statusCode + * @param Request $request + * + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Routing\Redirector + */ + public static function redirect($to, int $statusCode = 302, $request = null) + { + $request = $request ?: request(); + + if (! URL::isValidUrl($to)) { + $to = admin_base_path($to); + } + + if ($request->ajax() && ! $request->pjax()) { + return response()->json(['redirect' => $to], $statusCode); + } + + if ($request->pjax()) { + return response(""); + } + + $redirectCodes = [201, 301, 302, 303, 307, 308]; + + return redirect($to, in_array($statusCode, $redirectCodes, true) ? $statusCode : 302); + } } diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 1d698bc9a..a2e30dbf9 100755 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -2,6 +2,7 @@ use Dcat\Admin\Admin; use Dcat\Admin\Support\Helper; +use Illuminate\Http\Request; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\Support\Renderable; use Illuminate\Support\MessageBag; @@ -555,3 +556,19 @@ function admin_exit($response = '') Admin::exit($response); } } + +if (! function_exists('admin_redirect')) { + /** + * 跳转. + * + * @param string $to + * @param int $statusCode + * @param Request $request + * + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Routing\Redirector + */ + function admin_redirect($to, int $statusCode = 302, Request $request = null) + { + return Helper::redirect($to, $statusCode, $request); + } +} From dbbe11a4504dd17245b72bd372e42791723d6f36 Mon Sep 17 00:00:00 2001 From: jqh <841324345@qq.com> Date: Sat, 25 Dec 2021 14:22:01 +0800 Subject: [PATCH 057/170] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93hasMany/arra?= =?UTF-8?q?y/table=E8=A1=A8=E5=8D=95=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=8E?= =?UTF-8?q?=E5=AD=90=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=80=E6=A0=B7=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4=E8=A1=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form.php b/src/Form.php index 9672b7124..b6cb6cb9d 100755 --- a/src/Form.php +++ b/src/Form.php @@ -998,7 +998,7 @@ public function prepareUpdate(array $updates) $columns = $field->column(); // If column not in input array data, then continue. - if (! Arr::has($updates, $columns)) { + if (! Arr::has($updates, $columns) || Arr::has($prepared, $columns)) { continue; } From 1c6bb73f381f665bb5b14e3bd75d28b82f4c926f Mon Sep 17 00:00:00 2001 From: Jiang Qinghua Date: Sat, 25 Dec 2021 12:33:23 +0000 Subject: [PATCH 058/170] Apply fixes from StyleCI --- src/Support/Helper.php | 7 +++---- src/Support/helpers.php | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Support/Helper.php b/src/Support/Helper.php index a355f7158..98892f5df 100755 --- a/src/Support/Helper.php +++ b/src/Support/Helper.php @@ -974,10 +974,9 @@ public static function keyExists($key, $arrayOrObject) /** * 跳转. * - * @param string $to - * @param int $statusCode - * @param Request $request - * + * @param string $to + * @param int $statusCode + * @param Request $request * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Routing\Redirector */ public static function redirect($to, int $statusCode = 302, $request = null) diff --git a/src/Support/helpers.php b/src/Support/helpers.php index a2e30dbf9..b79178bee 100755 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -2,9 +2,9 @@ use Dcat\Admin\Admin; use Dcat\Admin\Support\Helper; -use Illuminate\Http\Request; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\Support\Renderable; +use Illuminate\Http\Request; use Illuminate\Support\MessageBag; use Symfony\Component\HttpFoundation\Response; @@ -561,10 +561,9 @@ function admin_exit($response = '') /** * 跳转. * - * @param string $to - * @param int $statusCode - * @param Request $request - * + * @param string $to + * @param int $statusCode + * @param Request $request * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Routing\Redirector */ function admin_redirect($to, int $statusCode = 302, Request $request = null) From e6f7de46d177f90eccd4835c2b23f5c8a29fe8d4 Mon Sep 17 00:00:00 2001 From: jiangqh <841324345@qq.com> Date: Sat, 25 Dec 2021 23:39:17 +0800 Subject: [PATCH 059/170] v2.1.7-beta --- src/Admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Admin.php b/src/Admin.php index 5bbb8e5f9..635d9d39a 100755 --- a/src/Admin.php +++ b/src/Admin.php @@ -31,7 +31,7 @@ class Admin use HasAssets; use HasHtml; - const VERSION = '2.1.6-beta'; + const VERSION = '2.1.7-beta'; const SECTION = [ // 往 标签内输入内容 From 8ea3981d63bf5d852d6e7e2b6bec0e278b2c619a Mon Sep 17 00:00:00 2001 From: jcbt Date: Sun, 26 Dec 2021 13:04:57 +0800 Subject: [PATCH 060/170] =?UTF-8?q?=E4=BD=BFtab=E6=94=AF=E6=8C=81=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E8=87=AA=E5=AE=9A=E4=B9=89id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Form/Concerns/HasTabs.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Form/Concerns/HasTabs.php b/src/Form/Concerns/HasTabs.php index 0159d292e..b308afd44 100644 --- a/src/Form/Concerns/HasTabs.php +++ b/src/Form/Concerns/HasTabs.php @@ -17,11 +17,13 @@ trait HasTabs * * @param string $title * @param Closure $content + * @param bool $active + * @param string|null $id * @return $this */ - public function tab($title, Closure $content, $active = false) + public function tab($title, Closure $content, $active = false, ?string $id = null) { - $this->getTab()->append($title, $content, $active); + $this->getTab()->append($title, $content, $active, $id); return $this; } From df425d49f82c42f0533b9af2898fdb22d280f2a1 Mon Sep 17 00:00:00 2001 From: jcbt Date: Sun, 26 Dec 2021 13:27:41 +0800 Subject: [PATCH 061/170] =?UTF-8?q?=E4=BD=BF$form->table(...)->help('xxx')?= =?UTF-8?q?=E6=9C=89=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/form/hasmanytable.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/form/hasmanytable.blade.php b/resources/views/form/hasmanytable.blade.php index d1ed2c004..4e62577f8 100755 --- a/resources/views/form/hasmanytable.blade.php +++ b/resources/views/form/hasmanytable.blade.php @@ -75,6 +75,7 @@
@endif
+ @include('admin::form.help-block')
From 3f6a709008041d6ee6564e847928bd22d3db2bcc Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Wed, 29 Dec 2021 09:30:18 +0800 Subject: [PATCH 062/170] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=85=8D=E7=BD=AE=E9=87=8C=E7=9A=84=20Except?= =?UTF-8?q?ion=20stub=20=E7=9A=84=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Console/stubs/config.stub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/stubs/config.stub b/src/Console/stubs/config.stub index c9524a9fd..b4cb353e9 100644 --- a/src/Console/stubs/config.stub +++ b/src/Console/stubs/config.stub @@ -341,7 +341,7 @@ return [ |-------------------------------------------------------------------------- | */ - 'exception_handler' => Dcat\Admin\Http\Exception\Handler::class, + 'exception_handler' => Dcat\Admin\Exception\Handler::class, /* |-------------------------------------------------------------------------- From 22a31df3cb6e97a715fafdd8782a634b0028f804 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Mon, 3 Jan 2022 18:57:53 +0800 Subject: [PATCH 063/170] =?UTF-8?q?fix=20#1593=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=20namespace=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/Controllers/ScaffoldController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index 18be92f00..2cc6cba60 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -78,7 +78,7 @@ public function index(Content $content) $dbTypes = static::$dbTypes; $dataTypeMap = static::$dataTypeMap; $action = URL::current(); - $app = ucfirst(mb_substr(request()->path(), 0, mb_stripos(request()->path(), '/'))); + $app = ltrim(config('admin.directory'), app_path().DIRECTORY_SEPARATOR); $tables = collect($this->getDatabaseColumns())->map(function ($v) { return array_keys($v); })->toArray(); From 38fd40a4d03f91606fd35861411eee5fcf139853 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Mon, 3 Jan 2022 20:40:38 +0800 Subject: [PATCH 064/170] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=86=99=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E9=80=82=E5=BA=94=E5=A4=9A=E5=B1=82=20namesp?= =?UTF-8?q?ace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/helpers/scaffold.blade.php | 1074 +++++++++---------- src/Http/Controllers/ScaffoldController.php | 6 +- 2 files changed, 541 insertions(+), 539 deletions(-) diff --git a/resources/views/helpers/scaffold.blade.php b/resources/views/helpers/scaffold.blade.php index 7b01765ec..1d4c1eeea 100755 --- a/resources/views/helpers/scaffold.blade.php +++ b/resources/views/helpers/scaffold.blade.php @@ -1,538 +1,538 @@ -@php - $timestamps = Dcat\Admin\Widgets\Checkbox::make('timestamps')->inline(); - $timestamps->options([1 => 'Created_at & Updated_at'])->check(1); - - $soft = Dcat\Admin\Widgets\Checkbox::make('soft_deletes')->inline(); - $soft->options([1 => (trans('admin.scaffold.soft_delete'))]); - - $actionCreators = Dcat\Admin\Widgets\Checkbox::make('create[]')->inline(); - $actionCreators->options([ - 'migration' => (trans('admin.scaffold.create_migration')), - 'model' => (trans('admin.scaffold.create_model')), - 'repository' => (trans('admin.scaffold.create_repository')), - 'controller' => (trans('admin.scaffold.create_controller')), - 'migrate' => (trans('admin.scaffold.run_migrate')), - 'lang' => (trans('admin.scaffold.create_lang')), - ])->checkAll(['migrate', 'migration']); -@endphp - -
-
- -
- -
- -
- -
- -{{-- --}} - -
- {{(trans('admin.scaffold.table'))}} -
- -
-
- - -
-
- -
- -
- - - -
-
- {{(trans('admin.scaffold.model'))}} - -
- -
-
- -
- {{(trans('admin.scaffold.controller'))}} - -
- -
-
- - -
- {{(trans('admin.scaffold.repository'))}} - -
- -
-
- - -
-
- {!! $actionCreators->render(); !!} -
-
- -
- - - - - - - - - - - - - - - - @if(old('fields')) - @foreach(old('fields') as $index => $field) - - - - - - - - - - - @endforeach - @else - - - - - - - - - - @endif - -
{{trans('admin.scaffold.field_name')}}{{trans('admin.scaffold.translation')}}{{trans('admin.scaffold.type')}}{{trans('admin.scaffold.nullable')}}{{trans('admin.scaffold.key')}}{{trans('admin.scaffold.default')}}{{trans('admin.scaffold.comment')}}{{trans('admin.action')}}
- - - - - - -
- - - - - - -
-
- - - - -
- - - - - - -
- - - - - - -
-
- - - - -
- -
- -
- -
- - -
- -
-
- {{(trans('admin.scaffold.translate_title'))}}   - -
- -
- {{(trans('admin.scaffold.pk'))}}   - -
- -
- {!! $timestamps->render() !!} - {!! $soft->render() !!} -
- -
-
- - - - - {{ csrf_field() }} - -
- -
- -
- - - - \ No newline at end of file diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index 2cc6cba60..cc48ea85d 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -78,7 +78,9 @@ public function index(Content $content) $dbTypes = static::$dbTypes; $dataTypeMap = static::$dataTypeMap; $action = URL::current(); - $app = ltrim(config('admin.directory'), app_path().DIRECTORY_SEPARATOR); + $appNamespace = 'App\\' . implode('\\', array_map(function($name){ + return Str::studly($name); + }, explode(DIRECTORY_SEPARATOR, ltrim(config('admin.directory'), app_path().DIRECTORY_SEPARATOR)))); $tables = collect($this->getDatabaseColumns())->map(function ($v) { return array_keys($v); })->toArray(); @@ -88,7 +90,7 @@ public function index(Content $content) ->description(' ') ->body(view( 'admin::helpers.scaffold', - compact('dbTypes', 'action', 'tables', 'dataTypeMap', 'app') + compact('dbTypes', 'action', 'tables', 'dataTypeMap', 'appNamespace') )); } From 298f24e9260dfb0e6055487fa66459e7f9738996 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 3 Jan 2022 12:41:04 +0000 Subject: [PATCH 065/170] Apply fixes from StyleCI [ci skip] [skip ci] --- src/Http/Controllers/ScaffoldController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index cc48ea85d..d9b0dd879 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -78,7 +78,7 @@ public function index(Content $content) $dbTypes = static::$dbTypes; $dataTypeMap = static::$dataTypeMap; $action = URL::current(); - $appNamespace = 'App\\' . implode('\\', array_map(function($name){ + $appNamespace = 'App\\'.implode('\\', array_map(function ($name) { return Str::studly($name); }, explode(DIRECTORY_SEPARATOR, ltrim(config('admin.directory'), app_path().DIRECTORY_SEPARATOR)))); $tables = collect($this->getDatabaseColumns())->map(function ($v) { From 4186107dd5427c90458539e7097677e22553d603 Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Mon, 3 Jan 2022 21:02:45 +0800 Subject: [PATCH 066/170] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20editorconfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..1671c9b9d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[docker-compose.yml] +indent_size = 4 From b2343be38382227c6a091d3bc19e8d8c35bb7f4c Mon Sep 17 00:00:00 2001 From: Edwin Xu Date: Tue, 4 Jan 2022 09:44:48 +0800 Subject: [PATCH 067/170] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/helpers/scaffold.blade.php | 8 ++++---- src/Http/Controllers/ScaffoldController.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/helpers/scaffold.blade.php b/resources/views/helpers/scaffold.blade.php index 1d4c1eeea..e60610059 100755 --- a/resources/views/helpers/scaffold.blade.php +++ b/resources/views/helpers/scaffold.blade.php @@ -77,7 +77,7 @@ {{(trans('admin.scaffold.controller'))}}
- +
@@ -86,7 +86,7 @@ {{(trans('admin.scaffold.repository'))}}
- +
@@ -302,8 +302,8 @@ class="form-control" $fieldsBody = $('#table-fields tbody'), tpl = $('#table-field-tpl').html(), modelNamespace = 'App\\Models\\', - repositoryNamespace = '{{$appNamespace}}\\Repositories\\', - controllerNamespace = '{{$appNamespace}}\\Controllers\\', + repositoryNamespace = '{{ $namespaceBase }}\\Repositories\\', + controllerNamespace = '{{ $namespaceBase }}\\Controllers\\', dataTypeMap = {!! json_encode($dataTypeMap) !!}, helpers = Dcat.helpers; diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index d9b0dd879..cad6b123a 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -78,7 +78,7 @@ public function index(Content $content) $dbTypes = static::$dbTypes; $dataTypeMap = static::$dataTypeMap; $action = URL::current(); - $appNamespace = 'App\\'.implode('\\', array_map(function ($name) { + $namespaceBase = 'App\\'.implode('\\', array_map(function ($name) { return Str::studly($name); }, explode(DIRECTORY_SEPARATOR, ltrim(config('admin.directory'), app_path().DIRECTORY_SEPARATOR)))); $tables = collect($this->getDatabaseColumns())->map(function ($v) { @@ -90,7 +90,7 @@ public function index(Content $content) ->description(' ') ->body(view( 'admin::helpers.scaffold', - compact('dbTypes', 'action', 'tables', 'dataTypeMap', 'appNamespace') + compact('dbTypes', 'action', 'tables', 'dataTypeMap', 'namespaceBase') )); } From 77948143fb6c146ff2c4b08c8c415825a7f6b2d3 Mon Sep 17 00:00:00 2001 From: jqh <841324345@qq.com> Date: Tue, 4 Jan 2022 10:47:20 +0800 Subject: [PATCH 068/170] =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E9=87=8D=E7=BD=AEmodal=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E8=AE=BE=E7=BD=AE=E7=9A=84padding=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/dcat/js/bootstrappers/Pjax.js | 9 ++++++++- resources/dist/dcat/js/dcat-app.js | 2 +- resources/dist/dcat/js/dcat-app.js.map | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/assets/dcat/js/bootstrappers/Pjax.js b/resources/assets/dcat/js/bootstrappers/Pjax.js index c9942d446..3e05de0a7 100644 --- a/resources/assets/dcat/js/bootstrappers/Pjax.js +++ b/resources/assets/dcat/js/bootstrappers/Pjax.js @@ -46,9 +46,16 @@ export default class Pjax { $(formContainer).find('[type="submit"],.submit').buttonLoading(false) } + var $body = $('body'); + // 移除遮罩层 $(".modal-backdrop").remove(); - $("body").removeClass("modal-open"); + $body.removeClass("modal-open"); + + // 刷新页面后需要重置modal弹窗设置的间隔 + if ($body.css('padding-right')) { + $body.css('padding-right', ''); + } }); $d.on('pjax:loaded', () => { diff --git a/resources/dist/dcat/js/dcat-app.js b/resources/dist/dcat/js/dcat-app.js index c906ff7e5..8d8ceb58c 100644 --- a/resources/dist/dcat/js/dcat-app.js +++ b/resources/dist/dcat/js/dcat-app.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(module,exports){eval(function(e,t,n,r,o,a){if(o=function(e){return(e<62?"":o(parseInt(e/62)))+((e%=62)>35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('!14(t,e){"4o"==1A ac&&"3d"!=1A a7?a7.ac=e():"14"==1A 83&&83.ep?83(e):t.7V=e()}(1d,14(){"8G eo";14 f(t){17(f="14"==1A 5i&&"ag"==1A 5i.en?14(t){17 1A t}:14(t){17 t&&"14"==1A 5i&&t.5Q===5i&&t!==5i.3b?"ag":1A t})(t)}14 o(t,e){1w(!(t 7P e))7K 2M 8i("ek 4A a 1j as a 14")}14 i(t,e){2g(18 n=0;n\\n <1H 1j="\').1n(k.4O,\'">\\n \\n <1H 1j="\').1n(k.1r," ").1n(B.2n,\'">\\n <34 1j="13-x-2V"><34 1j="13-x-2V-1o-1g"><34 1j="13-x-2V-1o-1k">\\n \\n <1H 1j="\').1n(k.1r," ").1n(B.4q,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.5J,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.5I,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.1f,\'">\\n <1H 1j="13-1f-35-1o-1g">\\n <34 1j="13-1f-1o-3h"> <34 1j="13-1f-1o-3c">\\n <1H 1j="13-1f-6G"> <1H 1j="13-1f-6F">\\n <1H 1j="13-1f-35-1o-1k">\\n \\n \\n <8k 1j="\').1n(k.2I,\'" 55="\').1n(k.2I,\'">\\n <3y 1U="3y" 1j="\').1n(k.3e,\'">&d3;\\n \\n <1H 1j="\').1n(k.1z,\'">\\n <1H 55="\').1n(k.1z,\'">\\n <1i 1j="\').1n(k.1i,\'" />\\n <1i 1U="2l" 1j="\').1n(k.2l,\'" />\\n <1H 1j="\').1n(k.2s,\'">\\n <1i 1U="2s" />\\n <46>\\n \\n <2b 1j="\').1n(k.2b,\'">\\n <1H 1j="\').1n(k.2v,\'">\\n <3E 2g="\').1n(k.2A,\'" 1j="\').1n(k.2A,\'">\\n <1i 1U="2A" />\\n <34 1j="\').1n(k.3E,\'">\\n \\n <2h 1j="\').1n(k.2h,\'">\\n <1H 1j="\').1n(k["4h-4l"],\'" 55="\').1n(k["4h-4l"],\'">\\n \\n <1H 1j="\').1n(k.2F,\'">\\n <3y 1U="3y" 1j="\').1n(k.4n,\'">8t\\n <3y 1U="3y" 1j="\').1n(k.3N,\'">8x\\n \\n <1H 1j="\').1n(k.3C,\'">\\n \\n \\n\').d2(/(^|\\n)\\s*/g,""),ct=14(t){1w(14(){18 t=q();t&&(t.3I.7D(t),3U([1m.5a,1m.1e],[k["26-1P"],k["1b-1q"],k["d1-1R"]]))}(),X())g("6Y 7H 1m 3S d0");3m{18 e=1m.3A("1H");e.4F=k.1h,e.38=9T;18 n=14(t){17"3a"==1A t?1m.2T(t):t}(t.29);n.37(e),14(t){18 e=2K();e.2P("cZ",t.1b?"cY":"9e"),e.2P("2o-cX",t.1b?"cW":"cV"),t.1b||e.2P("2o-3M","4M")}(t),14(t){"6M"===22.4U(t).4k&&1V(q(),k.6M)}(n),14(){18 t=U(),e=2y(t,k.1i),n=2y(t,k.2l),o=t.2T(".".1n(k.2s," 1i")),i=t.2T(".".1n(k.2s," 46")),r=2y(t,k.2b),a=t.2T(".".1n(k.2A," 1i")),s=2y(t,k.2h);e.7N=G,n.5R=G,r.5R=G,a.5R=G,s.7N=G,o.7N=14(t){G(t),i.1K=o.1K},o.5R=14(t){G(t),o.cU.1K=o.1K}}()}},9w=14(t,e){1w(t.38="",0 2O e)2g(18 n=0;n 2O e;n++)t.37(e[n].9B(!0));3m t.37(e.9B(!0))},dt=14(){1w(X())17!1;18 t=1m.3A("1H"),e={cT:"cS",cR:"cQ cP",1L:"cO"};2g(18 n 2O e)1w(e.6I(n)&&3l 0!==t.1I[n])17 e[n];17!1}();14 7R(t,e,n){M(t,n["cN"+e.cM(1)+"ad"],"6t-4b"),t.38=n[e+"cL"],t.2P("2o-3E",n[e+"cK"]),t.4F=k[e],b(t,n.2i,e+"ad"),1V(t,n[e+"cJ"])}14 8c(t,e){18 n=Z(),o=K(),i=F();e.5f||e.5e?T(n):O(n),b(n,e.2i,"2F"),7R(o,"4n",e),7R(i,"3N",e),e.7X?14(t,e,n){1V([t,e],k.2J),n.5N&&(t.1I.5E=n.5N),n.6N&&(e.1I.5E=n.6N);18 o=22.4U(t).4v("1J-1u");t.1I.82=o,t.1I.7Z=o}(o,i,e):(3U([o,i],k.2J),o.1I.5E=o.1I.82=o.1I.7Z="",i.1I.5E=i.1I.82=i.1I.7Z="")}14 8C(t,e){18 n=q();n&&(14(t,e){"3a"==1A e?t.1I.1J=e:e||1V([1m.5a,1m.1e],k["26-1P"])}(n,e.1P),!e.1P&&e.5y&&y(\'"5y" 42 7H `1P` 42 3S be 43 3S `4M`\'),14(t,e){e 2O k?1V(t,k[e]):(y(\'8H "2G" 42 53 1M 8K, 8L 3S "1l"\'),1V(t,k.1l))}(n,e.2G),14(t,e){1w(e&&"3a"==1A e){18 n="1Y-"+e;n 2O k&&1V(t,k[n])}}(n,e.1Y),b(n,e.2i,"1h"),e.6j&&1V(n,e.6j))}14 6m(t,e){t.2E&&!e.4Y||(t.2E=e.4Y)}18 bb={5g:2M 5h,3k:2M 5h,3R:2M 5h},96=14(t,e){18 n=P(U(),t);1w(n)2g(18 o 2O 14(t){2g(18 e=0;e=i.2W.23&&y("6E 56 42, 2y a9 be cG cF 2W.23 (56 cE cD cC cA 86 0)"),i.2W.2S(14(t,e){18 n=14(t){18 e=1m.3A("7z");17 1V(e,k["25-2D"]),e.38=t,e}(t);1w(r.37(n),e===a&&1V(n,k["3V-25-2D"]),e!==i.2W.23-1){18 o=14(t){18 e=1m.3A("7z");17 1V(e,k["25-2D-1o"]),t.7y&&(e.1I.1c=t.7y),e}(t);r.37(o)}})}14 8a(t,e){18 n=Q();b(n,e.2i,"4O"),7E(0,e),14(t,e){18 n=bb.3k.2k(t);1w(n&&e.1U===n.1U&&N())b(N(),e.2i,"1r");3m 1w(bc(),e.1U)1w(8b(),-1!==2d.57(B).3t(e.1U)){18 o=H(".".1n(k.1r,".").1n(B[e.1U]));T(o),b(o,e.2i,"1r"),L(o,"13-1Q-".1n(e.1U,"-1r"),e.1L)}3m g(\'8e 1U! 5k "1f", "2n", "5J", "5I" 5l "4q", 5m "\'.1n(e.1U,\'"\'))}(t,e),14(t,e){18 n=4L();1w(!e.5P)17 O(n);T(n),n.2P("8h",e.5P),n.2P("cz",e.7w),E(n,"1c",e.7u),E(n,"1E",e.8l),n.4F=k.4e,b(n,e.2i,"4e"),e.5u&&1V(n,e.5u)}(0,e),14(t,e){18 n=D();M(n,e.2I||e.5v),e.2I&&5W(e.2I,n),e.5v&&(n.8q=e.5v),b(n,e.2i,"2I")}(0,e),14(t,e){18 n=$();b(n,e.2i,"7s"),M(n,e.5U),n.2P("2o-3E",e.8u)}(0,e)}14 7r(t,e){!14(t,e){18 n=2K();E(n,"1c",e.1c),E(n,"2e",e.2e),e.1J&&(n.1I.1J=e.1J),n.4F=k.1t,e.1b?(1V([1m.5a,1m.1e],k["1b-1q"]),1V(n,k.1b)):1V(n,k.3M),b(n,e.2i,"1t"),"3a"==1A e.2i&&1V(n,e.2i),L(n,k.6Q,!e.1L)}(0,e),8C(0,e),8a(t,e),9K(t,e),8c(0,e),14(t,e){18 n=Y();M(n,e.3C),e.3C&&5W(e.3C,n),b(n,e.2i,"3C")}(0,e)}18 bc=14(){2g(18 t=R(),e=0;e22.bW&&(x.4B=4C(22.4U(1m.1e).4v("2e-1k")),1m.1e.1I.8y=x.4B+14(){1w("8z"2O 22||8A.bV)17 0;18 t=1m.3A("1H");t.1I.1c="8B",t.1I.1E="8B",t.1I.3T="8D",1m.1e.37(t);18 e=t.8m-t.bU;17 1m.1e.7D(t),e}()+"6y")}14 73(){17!!22.bT&&!!1m.bS}14 6r(){18 t=q(),e=2K();t.1I.aa("1S-2f"),e.bR<0&&(t.1I.bQ="1C-1O")}18 be=14(){1B!==x.4B&&(1m.1e.1I.8y=x.4B+"6y",x.4B=1B)},8M=14(){18 e,n=q();n.8z=14(t){e=t.29===n||!14(t){17!!(t.8w>t.bP)}(n)&&"bO"!==t.29.bN},n.bM=14(t){e&&(t.6h(),t.7d())}},8S=14(){1w(S(1m.1e,k.5L)){18 t=4C(1m.1e.1I.19,10);3U(1m.1e,k.5L),1m.1e.1I.19="",1m.1e.6g=-1*t}},8U=14(){"3d"!=1A 22&&73()&&22.6f("8W",6r)},8X=14(){m(1m.1e.8Y).2S(14(t){t.6V("3D-6e-2o-2L")?(t.2P("2o-2L",t.4W("3D-6e-2o-2L")),t.3O("3D-6e-2o-2L")):t.3O("2o-2L")})},6c={7i:2M 5h};14 7j(t,e,n){e?$t(n):(8N().3G(14(){17 $t(n)}),1y.4G.6f("7l",1y.5A,{7n:1y.41}),1y.64=!1),5z 1y.5A,5z 1y.4G,t.3I&&t.3I.7D(t),3U([1m.5a,1m.1e],[k.1q,k["1E-1D"],k["26-1P"],k["1b-1q"],k["1b-1R"]]),at()&&(be(),8S(),8U(),8X())}14 5c(t){18 e=q(),n=2K();1w(n&&!S(n,k.30)){18 o=bb.3k.2k(1d),i=6c.7i.2k(1d),r=o.9q,a=o.9o;3U(n,k.31),1V(n,k.30),dt&&j(n)?n.60(dt,14(t){t.29===n&&14(t,e,n,o){S(t,k.30)&&7j(e,n,o),bf(bb),bf(6c)}(n,e,5p(),a)}):7j(e,5p(),a),1B!==r&&"14"==1A r&&r(n),i(t||{}),5z 1d.49}}18 bf=14(t){2g(18 e 2O t)t[e]=2M 5h},$t=14(t){1B!==t&&"14"==1A t&&59(14(){t()})};14 5w(t,e,n){18 o=bb.3R.2k(t);e.2S(14(t){o[t].2Q=n})}14 7t(t,e){1w(!t)17!1;1w("2v"===t.1U)2g(18 n=t.3I.3I.4w("1i"),o=0;o"));18 t=2K(),n="3a"==1A e.29?1m.2T(e.29):e.29;(!t||t&&n&&t.3I!==n.3I)&&ct(e)}(l),2d.5F(l),1y.2U&&(1y.2U.4X(),5z 1y.2U),9j(1y.8P);18 d={1t:2K(),1h:q(),1z:U(),2F:Z(),2N:K(),3o:F(),7s:$(),3j:W(),2W:z()};bb.3R.43(1d,d),7r(1d,l),bb.3k.43(1d,l);18 p=1d.5Q;17 2M 36(14(t){14 n(t){c.7S({1K:t})}14 s(t){c.7S({6T:t})}6c.7i.43(c,t),l.4H&&(1y.2U=2M bg(14(){s("4H"),5z 1y.2U},l.4H));l.1i&&59(14(){18 t=c.3x();t&&A(t)},0);2g(18 u=14(e){(l.6l&&p.8f(),l.4T)?(c.5Z(),36.4y().3G(14(){17 l.4T(e,l.3j)}).3G(14(t){V(d.3j)||!1===t?c.4D():n(3l 0===t?e:t)})):n(e)},e=14(t){18 e=t.29,n=d.2N,o=d.3o,i=n&&(n===e||n.3X(e)),r=o&&(o===e||o.3X(e));5H(t.1U){3i"75":1w(i)1w(c.7U(),l.1i){18 a=14(){18 t=c.3x();1w(!t)17 1B;5H(l.1i){3i"2A":17 t.5G?1:0;3i"2v":17 t.5G?t.1K:1B;3i"2l":17 t.ae.23?t.ae[0]:1B;4r:17 l.9k?t.1K.aw():t.1K}}();1w(l.5D)c.9W(),36.4y().3G(14(){17 l.5D(a,l.3j)}).3G(14(t){c.6H(),c.9V(),t?c.7W(t):u(a)});3m c.3x().ax()?u(a):(c.6H(),c.7W(l.3j))}3m u(!0);3m r&&(c.7U(),s(p.4S.3N))}},o=d.1t.4w("3y"),i=0;i.13-3M{2r-3H:0 0 d6 3B(0,0,0,.4)}1e.13-26-1P .13-1q.13-19{19:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-19-1g,1e.13-26-1P .13-1q.13-19-1O{19:0;1g:0}1e.13-26-1P .13-1q.13-19-27,1e.13-26-1P .13-1q.13-19-1k{19:0;1k:0}1e.13-26-1P .13-1q.13-1l{19:50%;1g:50%;-1a-16:6w(-50%,-50%);16:6w(-50%,-50%)}1e.13-26-1P .13-1q.13-1l-1g,1e.13-26-1P .13-1q.13-1l-1O{19:50%;1g:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1l-27,1e.13-26-1P .13-1q.13-1l-1k{19:50%;1k:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1v{1v:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-1v-1g,1e.13-26-1P .13-1q.13-1v-1O{1v:0;1g:0}1e.13-26-1P .13-1q.13-1v-27,1e.13-26-1P .13-1q.13-1v-1k{1k:0;1v:0}.13-1h{2B:1C;2G:d7;z-3Z:d9;19:0;1k:0;1v:0;1g:0;1C-4k:5M;1S-2f:1l;2p-1z:1l;2e:.1W;3T-x:2L;1J-1u:3v;-1a-3T-da:db}.13-1h.13-19{1S-2f:1C-1O}.13-1h.13-19-1g,.13-1h.13-19-1O{1S-2f:1C-1O;2p-1z:1C-1O}.13-1h.13-19-27,.13-1h.13-19-1k{1S-2f:1C-1O;2p-1z:1C-27}.13-1h.13-1l{1S-2f:1l}.13-1h.13-1l-1g,.13-1h.13-1l-1O{1S-2f:1l;2p-1z:1C-1O}.13-1h.13-1l-27,.13-1h.13-1l-1k{1S-2f:1l;2p-1z:1C-27}.13-1h.13-1v{1S-2f:1C-27}.13-1h.13-1v-1g,.13-1h.13-1v-1O{1S-2f:1C-27;2p-1z:1C-1O}.13-1h.13-1v-27,.13-1h.13-1v-1k{1S-2f:1C-27;2p-1z:1C-27}.13-1h.13-1v-27>:4P-4Q,.13-1h.13-1v-1g>:4P-4Q,.13-1h.13-1v-1k>:4P-4Q,.13-1h.13-1v-1O>:4P-4Q,.13-1h.13-1v>:4P-4Q{1N-19:1D}.13-1h.13-1Y-6S>.13-3M{2B:1C!3f;1C:1;1S-9M:72;2p-1z:1l}.13-1h.13-1Y-5M>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h.13-1Y-1R{1C:1;1C-4k:1R}.13-1h.13-1Y-1R.13-1v,.13-1h.13-1Y-1R.13-1l,.13-1h.13-1Y-1R.13-19{1S-2f:1l}.13-1h.13-1Y-1R.13-1v-1g,.13-1h.13-1Y-1R.13-1v-1O,.13-1h.13-1Y-1R.13-1l-1g,.13-1h.13-1Y-1R.13-1l-1O,.13-1h.13-1Y-1R.13-19-1g,.13-1h.13-1Y-1R.13-19-1O{1S-2f:1C-1O}.13-1h.13-1Y-1R.13-1v-27,.13-1h.13-1Y-1R.13-1v-1k,.13-1h.13-1Y-1R.13-1l-27,.13-1h.13-1Y-1R.13-1l-1k,.13-1h.13-1Y-1R.13-19-27,.13-1h.13-1Y-1R.13-19-1k{1S-2f:1C-27}.13-1h.13-1Y-1R>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h:1M(.13-19):1M(.13-19-1O):1M(.13-19-27):1M(.13-19-1g):1M(.13-19-1k):1M(.13-1l-1O):1M(.13-1l-27):1M(.13-1l-1g):1M(.13-1l-1k):1M(.13-1v):1M(.13-1v-1O):1M(.13-1v-27):1M(.13-1v-1g):1M(.13-1v-1k):1M(.13-1Y-6S)>.13-3M{1N:1D}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-1h .13-3M{1N:0!3f}}.13-1h.13-6R{6u:1J-1u .1s}.13-1h.13-1q{1J-1u:3B(0,0,0,.4)}.13-1t{2B:1Z;2G:5o;2r-5r:1x-2r;1C-4k:1R;2p-1z:1l;1c:de;4K-1c:1F%;2e:1.2x;1x:1Z;1x-2w:.2C;1J:#3Q;1T-8Z:3z;1T-2j:dh}.13-1t:2c{5B:0}.13-1t.13-2u{3T-y:2L}.13-4O{2B:1C;1C-4k:1R;1S-2f:1l}.13-2I{2G:5o;4K-1c:1F%;1N:0 0 .4u;2e:0;1u:#dj;1T-2j:1.3p;1T-3Y:69;3g-1S:1l;3g-16:1Z;6a-6d:4I-6a}.13-2F{z-3Z:1;1C-6d:6d;1S-2f:1l;2p-1z:1l;1c:1F%;1N:1.2x 1D 0}.13-2F:1M(.13-2u) .13-2J[2Q]{2z:.4}.13-2F:1M(.13-2u) .13-2J:8j{1J-4e:4R-8s(3B(0,0,0,.1),3B(0,0,0,.1))}.13-2F:1M(.13-2u) .13-2J:3V{1J-4e:4R-8s(3B(0,0,0,.2),3B(0,0,0,.2))}.13-2F.13-2u .13-2J.13-4n{2r-5r:1x-2r;1c:2.21;1E:2.21;1N:.dq;2e:0;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:.2x 44 3v;1x-2w:1F%;1x-1u:3v;1J-1u:3v!3f;1u:3v;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-2F.13-2u .13-2J.13-3N{1N-1k:9R;1N-1g:9R}.13-2F.13-2u :1M(.13-2J).13-4n::dA{1z:\\"\\";2B:6t-4b;1c:9L;1E:9L;1N-1g:dC;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:9m 44 #dE;1x-2w:50%;1x-1k-1u:3v;2r-3H:3K 3K 3K #3Q}.13-2J{1N:.2C;2e:.1W 2q;2r-3H:1Z;1T-3Y:dG}.13-2J:1M([2Q]){6s:8g}.13-2J.13-4n{1x:0;1x-2w:.2x;1J:77;1J-1u:#6k;1u:#3Q;1T-2j:1.32}.13-2J.13-3N{1x:0;1x-2w:.2x;1J:77;1J-1u:#dK;1u:#3Q;1T-2j:1.32}.13-2J:2c{5B:0;2r-3H:0 0 0 79 #3Q,0 0 0 dM 3B(50,1F,7T,.4)}.13-2J::-4s-2c-dN{1x:0}.13-3C{2p-1z:1l;1N:1.2x 0 0;2e:3w 0 0;1x-19:3K 44 #dO;1u:#9X;1T-2j:3w}.13-4e{4K-1c:1F%;1N:1.2x 1D}.13-3e{2G:4p;19:0;1k:0;2p-1z:1l;1c:1.2q;1E:1.2q;2e:0;3T:2L;6u:1u .1s 7g-dR;1x:1Z;1x-2w:0;5B:77;1J:0 0;1u:#4V;1T-8Z:dT;1T-2j:2.21;1o-1E:1.2;6s:8g}.13-3e:8j{-1a-16:1Z;16:1Z;1J:0 0;1u:#5b}.13-1z{z-3Z:1;2p-1z:1l;1N:0;2e:0;1u:#9X;1T-2j:1.2m;1T-3Y:87;1o-1E:4x;6a-6d:4I-6a}#13-1z{3g-1S:1l}.13-2A,.13-2l,.13-1i,.13-2v,.13-2b,.13-2h{1N:3w 1D}.13-2l,.13-1i,.13-2h{2r-5r:1x-2r;1c:1F%;6u:1x-1u .3s,2r-3H .3s;1x:3K 44 #9t;1x-2w:.39;1J:3z;2r-3H:dX 0 3K 3K 3B(0,0,0,.dY);1u:3z;1T-2j:1.2m}.13-2l.13-4N,.13-1i.13-4N,.13-2h.13-4N{1x-1u:#5b!3f;2r-3H:0 0 79 #5b!3f}.13-2l:2c,.13-1i:2c,.13-2h:2c{1x:3K 44 #dZ;5B:0;2r-3H:0 0 9m #e0}.13-2l::-1a-1i-2E,.13-1i::-1a-1i-2E,.13-2h::-1a-1i-2E{1u:#4V}.13-2l::-4s-2E,.13-1i::-4s-2E,.13-2h::-4s-2E{1u:#4V}.13-2l:-2Z-1i-2E,.13-1i:-2Z-1i-2E,.13-2h:-2Z-1i-2E{1u:#4V}.13-2l::-2Z-1i-2E,.13-1i::-2Z-1i-2E,.13-2h::-2Z-1i-2E{1u:#4V}.13-2l::2E,.13-1i::2E,.13-2h::2E{1u:#4V}.13-2s{1N:3w 1D;1J:3z}.13-2s 1i{1c:80%}.13-2s 46{1c:20%;1u:3z;1T-3Y:69;3g-1S:1l}.13-2s 1i,.13-2s 46{1E:2.1W;2e:0;1T-2j:1.2m;1o-1E:2.1W}.13-1i{1E:2.1W;2e:0 .2X}.13-1i[1U=4d]{4K-1c:e2}.13-2l{1J:3z;1T-2j:1.2m}.13-2h{1E:6.2X;2e:.2X}.13-2b{7m-1c:50%;4K-1c:1F%;2e:.2H .1W;1J:3z;1u:3z;1T-2j:1.2m}.13-2A,.13-2v{1S-2f:1l;2p-1z:1l;1J:3z;1u:3z}.13-2A 3E,.13-2v 3E{1N:0 .78;1T-2j:1.2m}.13-2A 1i,.13-2v 1i{1N:0 .4u}.13-4h-4l{2B:1Z;1S-2f:1l;2p-1z:1l;2e:.1W;3T:2L;1J:#e3;1u:#e4;1T-2j:3w;1T-3Y:87}.13-4h-4l::4j{1z:\\"!\\";2B:6t-4b;1c:1.21;7m-1c:1.21;1E:1.21;1N:0 .1W;8T:4x;1x-2w:50%;1J-1u:#5b;1u:#3Q;1T-3Y:69;1o-1E:1.21;3g-1S:1l}@e5 (-2Z-e6:4M){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@-4s-1m 62-e7(){.13-3e:2c{5B:79 44 3B(50,1F,7T,.4)}}.13-1r{2G:5o;2r-5r:1z-2r;2p-1z:1l;1c:21;1E:21;1N:1.2x 1D 1.3p;8T:4x;1x:.2x 44 3v;1x-2w:50%;1o-1E:21;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-1r::4j{2B:1C;1S-2f:1l;1E:92%;1T-2j:3.2X}.13-1r.13-2n{1x-1u:#5b}.13-1r.13-2n .13-x-2V{2G:5o;1C-1Y:1}.13-1r.13-2n [1j^=13-x-2V-1o]{2B:4b;2G:4p;19:2.2C;1c:2.3q;1E:.2C;1x-2w:.2m;1J-1u:#5b}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1g]{1g:1.32;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1k]{1k:3w;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-5J{1x-1u:#e8;1u:#e9}.13-1r.13-5J::4j{1z:\\"!\\"}.13-1r.13-5I{1x-1u:#ea;1u:#eb}.13-1r.13-5I::4j{1z:\\"i\\"}.13-1r.13-4q{1x-1u:#ec;1u:#ed}.13-1r.13-4q::4j{1z:\\"?\\"}.13-1r.13-4q.13-ef-4q-2V::4j{1z:\\"؟\\"}.13-1r.13-1f{1x-1u:#7Q}.13-1r.13-1f [1j^=13-1f-35-1o]{2G:4p;1c:3.2X;1E:7.21;-1a-16:1p(1X);16:1p(1X);1x-2w:50%}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1g]{19:-.4J;1g:-2.eg;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:3.2X 3.2X;16-4m:3.2X 3.2X;1x-2w:7.21 0 0 7.21}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1k]{19:-.9H;1g:1.3p;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:0 3.2X;16-4m:0 3.2X;1x-2w:0 7.21 7.21 0}.13-1r.13-1f .13-1f-6G{2G:4p;z-3Z:2;19:-.2x;1g:-.2x;2r-5r:1z-2r;1c:1F%;1E:1F%;1x:.2x 44 3B(eh,ei,ej,.3);1x-2w:50%}.13-1r.13-1f .13-1f-6F{2G:4p;z-3Z:1;19:.21;1g:1.1W;1c:.4J;1E:5.1W;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-1f [1j^=13-1f-1o]{2B:4b;2G:4p;z-3Z:2;1E:.2C;1x-2w:.2m;1J-1u:#7Q}.13-1r.13-1f [1j^=13-1f-1o][1j$=3h]{19:2.3p;1g:.3p;1c:1.5K;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-1f [1j^=13-1f-1o][1j$=3c]{19:2.2H;1k:.21;1c:2.3q;-1a-16:1p(-1X);16:1p(-1X)}.13-25-3F{1S-2f:1l;1N:0 0 1.2x;2e:0;1J:3z;1T-3Y:69}.13-25-3F 7z{2B:6t-4b;2G:5o}.13-25-3F .13-25-2D{z-3Z:20;1c:2q;1E:2q;1x-2w:2q;1J:#6k;1u:#3Q;1o-1E:2q;3g-1S:1l}.13-25-3F .13-25-2D.13-3V-25-2D{1J:#6k}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D{1J:#8E;1u:#3Q}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D-1o{1J:#8E}.13-25-3F .13-25-2D-1o{z-3Z:10;1c:2.21;1E:.4u;1N:0 -3K;1J:#6k}[1j^=13]{-1a-el-em-1u:3v}.13-31{-1a-1L:13-31 .3s;1L:13-31 .3s}.13-31.13-6Q{-1a-1L:1Z;1L:1Z}.13-30{-1a-1L:13-30 .88 67;1L:13-30 .88 67}.13-30.13-6Q{-1a-1L:1Z;1L:1Z}.13-6M .13-3e{1k:1D;1g:0}.13-1Q-1f-1r .13-1f-1o-3h{-1a-1L:13-1Q-1f-1o-3h .4g;1L:13-1Q-1f-1o-3h .4g}.13-1Q-1f-1r .13-1f-1o-3c{-1a-1L:13-1Q-1f-1o-3c .4g;1L:13-1Q-1f-1o-3c .4g}.13-1Q-1f-1r .13-1f-35-1o-1k{-1a-1L:13-1p-1f-35-1o 4.8I 7g-2O;1L:13-1p-1f-35-1o 4.8I 7g-2O}.13-1Q-2n-1r{-1a-1L:13-1Q-2n-1r .5s;1L:13-1Q-2n-1r .5s}.13-1Q-2n-1r .13-x-2V{-1a-1L:13-1Q-2n-x-2V .5s;1L:13-1Q-2n-x-2V .5s}@-1a-2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@6J eq{1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q){3T-y:8D!3f}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q)>[2o-2L=4M]{2B:1Z}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q) .13-1h{2G:8O!3f}}");',0,895,"|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||swal2|function||transform|return|var|top|webkit|toast|width|this|body|success|left|container|input|class|right|center|document|concat|line|rotate|shown|icon||popup|color|bottom|if|border|Tt|content|typeof|null|flex|auto|height|100|scale|div|style|background|value|animation|not|margin|start|backdrop|animate|column|align|font|type|nt|625em|45deg|grow|none||5em|window|length||progress|no|end|translateY|target|keyframes|select|focus|Object|padding|items|for|textarea|customClass|size|get|file|125em|error|aria|justify|2em|box|range|rotateZ|loading|radio|radius|25em|it|opacity|checkbox|display|3125em|step|placeholder|actions|position|375em|title|styled|rt|hidden|new|confirmButton|in|setAttribute|disabled|inputValue|forEach|querySelector|timeout|mark|progressSteps|75em|yt|ms|hide|show|0625em||span|circular|Promise|appendChild|innerHTML|1875em|string|prototype|long|undefined|close|important|text|tip|case|validationMessage|innerParams|void|else|2deg|cancelButton|875em|9375em|key||indexOf|arguments|transparent|1em|getInput|button|inherit|createElement|rgba|footer|data|label|steps|then|shadow|parentNode|Swal|1px|running|modal|cancel|removeAttribute|ue|fff|domCache|to|overflow|ot|active|classList|contains|weight|index|tabindex|keydownListenerCapture|parameter|set|solid||output|Reflect|remaining|params|user|block|translateX|number|image|rotateX|75s|validation|405deg|before|direction|message|origin|confirm|object|absolute|question|default|moz|push|4em|getPropertyValue|querySelectorAll|normal|resolve|inputOptions|call|previousBodyPadding|parseInt|hideLoading|activeElement|className|keydownTarget|timer|break|4375em|max|_|true|inputerror|header|first|child|linear|DismissReason|preConfirm|getComputedStyle|ccc|getAttribute|stop|inputPlaceholder|apply||high|contrast|is||id|currentProgressStep|keys|previousActiveElement|setTimeout|documentElement|f27474|Qt|sweetalert2|showCancelButton|showConfirmButton|promise|WeakMap|Symbol|email|Expected|or|got|html|relative|st|Z0|sizing||zA|imageClass|titleText|Jt|toString|allowOutsideClick|delete|keydownHandler|outline|focusCancel|inputValidator|backgroundColor|freeze|checked|switch|info|warning|5625em|iosfix|row|confirmButtonColor|360deg|imageUrl|constructor|onchange|Date|inputClass|showCloseButton|onclick|tt|Pt|fire|resetValidationMessage|addEventListener|Lt|url||keydownHandlerAdded|||forwards|Unexpected|600|word|8em|Ft|wrap|previous|removeEventListener|scrollTop|preventDefault|of|customContainerClass|3085d6|showLoaderOnConfirm|gt|onmouseup|onBeforeOpen|onOpen|and|Dt|cursor|inline|transition|infinite|translate|enumerable|px|0s|writable|100deg|filter|1deg|Invalid|fix|ring|enableButtons|hasOwnProperty|media|_main|queue|rtl|cancelButtonColor|05|construct|noanimation|fade|fullscreen|dismiss|esc|hasAttribute|It|getConfirmButton|SweetAlert2|3em||remove|stretch|Nt|parseFloat|click|Array|initial|6em|2px|focusConfirm|reverseButtons|cancelButtonClass|stopPropagation|confirmButtonClass|allowEnterKey|ease|heightAuto|swalPromiseResolve|Zt|catch|keydown|min|capture|Mt|At|getTimerLeft|Bt|closeButton|Xt|imageWidth|te|imageAlt|childNodes|progressStepsDistance|li|test|https|all|removeChild|Ct|configurable|overflowY|requires|styleSheet|tel|throw|ie|Map|oninput|se|instanceof|a5dc86|pt|closePopup|150|disableButtons|Sweetalert2|showValidationMessage|buttonsStyling|update|borderRightColor||onmousedown|borderLeftColor|define||github|from|300|15s|try|kt|St|ft|splice|Unknown|showLoading|pointer|src|TypeError|hover|h2|imageHeight|offsetWidth|href|8125em|increase|innerText|isRunning|gradient|OK|closeButtonAriaLabel|Rt|scrollHeight|Cancel|paddingRight|ontouchstart|navigator|50px|mt|scroll|add8e6|busy|use|The|25s|jt|valid|defaulting|_t|Ot|static|restoreFocusTimeout|console|allowEscapeKey|zt|zoom|Wt|controls|resize|Kt|children|family|bind|duration||stopKeydownPropagation|setPrototypeOf||vt|confirmButtonText|confirmButtonAriaLabel|attributes|cancelButtonText|cancelButtonAriaLabel|name|isVisible|dialog|getPrototypeOf|__proto__|callback|started|clearTimeout|inputAutoTrim|password|3px|split|onAfterClose|hasn|onClose|scrollbarPadding|Vt|d9d9d9|qt|Ht|lt|isUpdatableParameter|ne|Boolean|argsToParams|cloneNode|finally|SweetAlert|clickConfirm|add|re|6875em|option|selected|wt|15px|self|been|defineProperties|com|inputAttributes|30px|enableConfirmButton|ut|disableConfirmButton|enableInput|disableInput|545454|blur|outerHTML|invalid|describedBy|getProgressSteps|const|swalInstance|getQueueStep|setProgressSteps|module|insertBefore|should|removeProperty|with|exports|Button|files|ul|symbol|isDeprecatedParameter|together|usage|example|nhttps|used|nshowLoaderOnConfirm|io|ajax|request|Target|||join|defined|trim|checkValidity|but|toasts|onmouseover|onmouseout|incompatible|hideProgressSteps|showProgressSteps|Enter|isComposing|Tab|shiftKey|ArrowLeft|ArrowRight|ArrowUp|ArrowDown|Left|Right|Up|Down|Escape|Esc|marginRight|Error|marginLeft|Updatable|are|listed|here|closeToast|blob|master|utils|js|closeModal|disableLoading|This|package|library|||||||||||please|include|shim|enable|browser|See|wiki||Migration||MSStream|support|userAgent|version|iPod|swal|sweetAlert|getElementsByTagName|head|iPhone|cssText|charset|UTF|iPad|URL|256|www|address|ontouchmove|tagName|INPUT|clientHeight|alignItems|offsetTop|documentMode|MSInputMethodContext|clientWidth|msMaxTouchPoints|innerHeight|isTimerRunning|increaseTimer|toggleTimer|resumeTimer|stopTimer|enableLoading|deleteQueueStep|insertQueueStep|create|either|must|expression|Super|mixin|isLoading|getValidationMessage|getFocusableElements|getFooter|getHeader|getCancelButton|getActions|getCloseButton|getIcons|getIcon|getImage|getContent|getTitle|getPopup|getContainer|clickCancel|see|isValidParameter||imageHeigth|Close|scrollTo|scrollY|scrollX|alt|starts|700|arrays|JS|like|than|less|textContent|basis|ButtonClass|ButtonAriaLabel|ButtonText|substring|showC|animationend|oanimationend|oAnimationEnd|OAnimation|webkitAnimationEnd|WebkitAnimation|nextSibling|assertive|polite|live|alert|role|initialize|has|replace|times|img|calc|10px|fixed|describedby|1060|scrolling|touch|labelledby|HTMLElement|32em|video|audio|1rem|contenteditable|595959|embed|iframe|area|sort|getClientRects|offsetHeight|46875em|warn|instead||Please|release|major|next|the|removed|after|will|5px|deprecated|999|slice|500|map|getOwnPropertyDescriptor|called|aaa|super|4px|inner|eee|initialised|ReferenceError|out|Function|serif|Proxy|sham|assign|inset|06|b4dbed|c4e6f5|defineProperty|10em|f0f0f0|666|supports|accelerator|prefix|facea8|f8bb86|9de0f6|3fc3ee|c9dae1|87adbd||arabic|0635em|165|220|134|Cannot|tap|highlight|iterator|strict|amd|print".split("|"),0,{}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('(4(k,l){"4"===G V&&V.1Z?V(l):"21"===G 1z?2c.1z=l():k.2f=l()})(x,4(){4 k(a,b,d){7 ad?d:a}4 l(a,b,d){a="Q"===e.B?{W:"Q("+D*(-1+a)+"%,0,0)"}:"Y"===e.B?{W:"Y("+D*(-1+a)+"%,0)"}:{"1u-2b":D*(-1+a)+"%"};a.P="U "+b+"A "+d;7 a}4 q(a,b){7 0<=("2a"==G a?a:n(a)).24(" "+b+" ")}4 r(a,b){6 d=n(a),c=d+b;q(d,b)||(a.10=c.1o(1))}4 t(a,b){6 c=n(a);q(a,b)&&(b=c.H(" "+b+" "," "),a.10=b.1o(1,b.J-1))}4 n(a){7(" "+(a.10||"")+" ").H(/\\s+/1C," ")}6 c={1W:"0.2.0"},e=c.1V={1b:.1U,1e:"1Q",B:"",1g:1P,N:!0,1n:.1O,1p:1N,1t:!0,16:\'[S="11"]\',1B:\'[S="T"]\',C:"I",19:\'\'};c.1H=4(a){6 b;X(b 9 a){6 c=a[b];1h 0!==c&&a.1i(b)&&(e[b]=c)}7 x};c.j=1k;c.E=4(a){6 b=c.1m();a=k(a,e.1b,1);c.j=1===a?1k:a;6 d=c.1l(!b),p=d.F(e.16),h=e.1g,v=e.1e;d.1r;w(4(b){""===e.B&&(e.B=c.1s());m(p,l(a,h,v));1===a?(m(d,{P:"1D",1v:1}),d.1r,R(4(){m(d,{P:"U "+h+"A 1w",1v:0});R(4(){c.1x();b()},h)},h)):R(b,h)});7 x};c.1m=4(){7"1y"===G c.j};c.14=4(){c.j||c.E(0);6 a=4(){R(4(){c.j&&(c.N(),a())},e.1p)};e.N&&a();7 x};c.1A=4(a){7 a||c.j?c.15(.3+.5*13.12()).E(1):x};c.15=4(a){6 b=c.j;7 b?("1y"!==G a&&(a=(1-b)*k(13.12()*b,.1,.1E)),b=k(b+a,0,.1F),c.E(b)):c.14()};c.N=4(){7 c.15(13.12()*e.1n)};(4(){6 a=0,b=0;c.1G=4(d){y(!d||"1I"===d.1J())7 x;0===b&&c.14();a++;b++;d.1K(4(){b--;0===b?(a=0,c.1A()):c.E((a-b)/a)});7 x}})();c.1l=4(a){y(c.1d())7 8.Z("o");r(8.1j,"o-1f");6 b=8.1R("i");b.1S="o";b.1T=e.19;6 d=b.F(e.16),p=a?"-D":D*(-1+(c.j||0));a=8.F(e.C);m(d,{P:"U 0 1w",W:"Q("+p+"%,0,0)"});e.1t||(d=b.F(e.1B))&&d&&d.M&&d.M.1a(d);a!=8.I&&r(a,"o-17-C");a.1X(b);7 b};c.1x=4(){t(8.1j,"o-1f");t(8.F(e.C),"o-17-C");6 a=8.Z("o");a&&a&&a.M&&a.M.1a(a)};c.1d=4(){7!!8.Z("o")};c.1s=4(){6 a=8.I.L,b="1Y"9 a?"1c":"20"9 a?"18":"22"9 a?"A":"23"9 a?"O":"";7 b+"25"9 a?"Q":b+"26"9 a?"Y":"1u"};6 w=4(){4 a(){6 c=b.27();c&&c(a)}6 b=[];7 4(c){b.28(c);1==b.J&&a()}}(),m=4(){4 a(a){7 a.H(/^-A-/,"A-").H(/-([\\29-z])/1C,4(a,b){7 b.1q()})}4 b(b){b=a(b);6 d;y(!(d=e[b])){d=b;a:{6 u=8.I.L;y(!(b 9 u))X(6 h=c.J,f=b.2d(0).1q()+b.2e(1),g;h--;)y(g=c[h]+f,g 9 u){b=g;2g a}}d=e[d]=b}7 d}6 c=["1c","O","18","A"],e={};7 4(a,c){6 d=2h;y(2==d.J)X(g 9 c){6 e=c[g];y(1h 0!==e&&c.1i(g)){d=a;6 f=g;f=b(f);d.L[f]=e}}2i{6 g=a;f=d[1];d=d[2];f=b(f);g.L[f]=d}}}();7 c});',0,143,"||||function||var|return|document|in|||||||||div|status|||||nprogress|||||||||this|if||ms|positionUsing|parent|100|set|querySelector|typeof|replace|body|length|class|style|parentNode|trickle||transition|translate3d|setTimeout|role|spinner|all|define|transform|for|translate|getElementById|className|bar|random|Math|start|inc|barSelector|custom|Moz|template|removeChild|minimum|Webkit|isRendered|easing|busy|speed|void|hasOwnProperty|documentElement|null|render|isStarted|trickleRate|substring|trickleSpeed|toUpperCase|offsetWidth|getPositioningCSS|showSpinner|margin|opacity|linear|remove|number|exports|done|spinnerSelector|gi|none|95|994|promise|configure|resolved|state|always|icon|peg|800|02|200|ease|createElement|id|innerHTML|08|settings|version|appendChild|WebkitTransform|amd|MozTransform|object|msTransform|OTransform|indexOf|Perspective|Transform|shift|push|da|string|left|module|charAt|slice|NProgress|break|arguments|else".split("|"),0,{}))},function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n"));r.error(s.join("
"))}catch(e){}return}case 0:return}r.error(a||e.status+" "+n)}},{key:"handleJsonResponse",value:function handleJsonResponse(response,options){var Dcat=this.dcat,data=response.data;if(response){if("object"!==_typeof(response))return Dcat.error("error","Oops!");var then=function then(_then){switch(_then.action){case"refresh":Dcat.reload();break;case"download":window.open(_then.value,"_blank");break;case"redirect":Dcat.reload(_then.value||null);break;case"location":setTimeout((function(){_then.value?window.location=_then.value:window.location.reload()}),1e3);break;case"script":!function(){eval(_then.value)}()}};"string"==typeof response.html&&response.html&&options.target&&("function"==typeof options.html?options.html(options.target,response.html,response):$(target).html(response.html));var message=data.message||response.message;data.type||(data.type=response.status?"success":"error"),"string"==typeof message&&data.type&&message&&(data.alert?Dcat.swal[data.type](message,data.detail):Dcat[data.type](message,null,data.timeout?{timeOut:1e3*data.timeout}:{})),data.then&&then(data.then)}}}]),Ajax}()},,function(e,t,n){e.exports=n(13)},function(module,exports){var module={};eval(function(e,t,n,r,o,a){if(o=function(e){return(e<62?"":o(parseInt(e/62)))+((e%=62)>35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('!5(e){"5"==W 2y&&2y.6g?2y(["1Z"],e):"44"==W 2E&&2E.3W?2E.3W=5(t,r){6 R 0===r&&(r="6f"!=W Z?3F("1Z"):3F("1Z")(t)),e(r),r}:e(6e)}(5(e){"6d 6a";5 t(t){4 r=t.P;t.67()||(t.5Q(),e(t.1p).30("z").1a(r))}5 r(t){4 r=t.1p,a=e(r);7(!a.3I("[8=U],[8=1N]")){4 n=a.30("[8=U]");7(0===n.B)6;r=n[0]}4 i=r.z;7(i.1n=r,"1N"===r.8)7(R 0!==t.3G)i.1q=t.3G,i.1x=t.5O;16 7("5"==W e.J.42){4 o=a.42();i.1q=t.3g-o.3j,i.1x=t.3l-o.3p}16 i.1q=t.3g-r.5N,i.1x=t.3l-r.5L;1C(5(){i.1n=i.1q=i.1x=Q},2X)}5 a(){7(e.J.1a.3M){4 t="[1Z.z] "+1X.5K.5J.1h(1D,"");Z.2W&&Z.2W.33?Z.2W.33(t):Z.20&&Z.20.3i&&Z.20.3i(t)}}4 n=/\\r?\\n/g,i={};i.2V=R 0!==e(\'<1c 8="29">\').1Q(0).3A,i.3C=R 0!==Z.3E;4 o=!!e.J.2Q;e.J.1s=5(){7(!o)6 3.11.1f(3,1D);4 e=3.2Q.1f(3,1D);6 e&&e.1Z||"1J"==W e?e:3.11.1f(3,1D)},e.J.1a=5(t,r,n,s){5 u(r){4 a,n,i=e.1K(r,t.2O).32("&"),o=i.B,s=[];Y(a=0;a\',k).1z(f.I[c].G).2B(w)[0]):u.H(e(\'<1c 8="2C" 9="\'+c+\'">\',k).1z(f.I[c]).2B(w)[0]));f.2a||h.2B(D),v.34?v.34("35",s):v.36("38",s,!1),1C(t,15);1l{w.U()}1A(e){19.5w("z").U.1f(w)}}5r{w.1F("2c",i),w.1F("2d",o),r?w.1F("1p",r):p.3d("1p"),e(u).3e()}}5 s(t){7(!x.1b&&!X){7((O=n(v))||(a("2N 5q 5p 19"),t=L),t===A&&x)6 x.1m("1k"),R S.1P(x,"1k");7(t===L&&x)6 x.1m("3s 1m"),R S.1P(x,"V","3s 1m");7(O&&O.2A.2z!==f.1T||T){v.3B?v.3B("35",s):v.5o("38",s,!1);4 r,i="K";1l{7(T)5l"1k";4 o="1I"===f.1B||O.2u||e.5h(O);7(a("5g="+o),!o&&Z.20&&(Q===O.1G||!O.1G.3O)&&--C)6 a("49 5e 2t, 2r 2q 5d"),R 1C(s,5c);4 u=O.1G?O.1G:O.2k;x.18=u?u.3O:Q,x.1H=O.2u?O.2u:O,o&&(f.1B="1I"),x.2p=5(e){6{"2n-8":f.1B}[e.1u()]},u&&(x.17=37(u.2h("17"))||x.17,x.1j=u.2h("1j")||x.1j);4 c=(f.1B||"").1u(),l=/(2s|3b|2f)/.1o(c);7(l||f.1w){4 p=O.28("1w")[0];7(p)x.18=p.G,x.17=37(p.2h("17"))||x.17,x.1j=p.2h("1j")||x.1j;16 7(l){4 m=O.28("2w")[0],g=O.28("1G")[0];m?x.18=m.26?m.26:m.3Y:g&&(x.18=g.26?g.26:g.3Y)}}16"1I"===c&&!x.1H&&x.18&&(x.1H=q(x.18));1l{M=N(x,c,f)}1A(e){i="23",x.V=r=e||i}}1A(e){a("V 5a: ",e),i="V",x.V=r=e||i}x.1b&&(a("2g 1b"),i=Q),x.17&&(i=x.17>=58&&x.17<57||4Z===x.17?"K":"V"),"K"===i?(f.K&&f.K.1h(f.12,M,"K",x),S.4Y(x.18,"K",x),d&&e.1v.13("4U",[x,f])):i&&(R 0===r&&(r=x.1j),f.V&&f.V.1h(f.12,x,i,r),S.1P(x,"V",r),d&&e.1v.13("3v",[x,f,r])),d&&e.1v.13("4T",[x,f]),d&&!--e.2F&&e.1v.13("4P"),f.1t&&f.1t.1h(f.12,x,i),X=!0,f.1k&&31(j),1C(5(){f.2a?h.11("2o",f.1T):h.3e(),x.1H=Q},2X)}}}4 u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.4N();7(S.1m=5(e){x.1m(e)},r)Y(c=0;c\',k)).4D({3N:"4C",3p:"-3P",3j:"-3P"}),v=h[0],x={1b:0,18:Q,1H:Q,17:0,1j:"n/a",4z:5(){},2p:5(){},4y:5(){},1m:5(t){4 r="1k"===t?"1k":"1b";a("4x 2g... "+r),3.1b=1;1l{v.1R.19.3R&&v.1R.19.3R("4w")}1A(e){}h.11("2o",f.1T),x.V=r,f.V&&f.V.1h(f.12,x,r,t),d&&e.1v.13("3v",[x,f,r]),f.1t&&f.1t.1h(f.12,x,r)}},(d=f.3T)&&0==e.2F++&&e.1v.13("4v"),d&&e.1v.13("4u",[x,f]),f.2e&&!1===f.2e.1h(f.12,x,f))6 f.3T&&e.2F--,S.1P(),S;7(x.1b)6 S.1P(),S;(y=w.1n)&&(b=y.9)&&!y.1g&&(f.I=f.I||{},f.I[b]=y.G,"1N"===y.8&&(f.I[b+".x"]=w.1q,f.I[b+".y"]=w.1x));4 A=1,L=2,F=e("3Z[9=40-4j]").11("2n"),E=e("3Z[9=40-1K]").11("2n");E&&F&&(f.I=f.I||{},f.I[E]=F),f.4i?i():1C(i,10);4 M,O,X,C=50,q=e.4f||5(e,t){6 Z.46?((t=21 46("4e.5f")).4a="48",t.4b(e)):t=(21 4c).4d(e,"2f/1I"),t&&t.2k&&"23"!==t.2k.47?t:Q},45=e.4g||5(e){6 Z.4h("("+e+")")},N=5(t,r,a){4 n=t.2p("2n-8")||"",i=("1I"===r||!r)&&n.2b("1I")>=0,o=i?t.1H:t.18;6 i&&"23"===o.2k.47&&e.V&&e.V("23"),a&&a.43&&(o=a.43(o,r)),"1J"==W o&&(("2s"===r||!r)&&n.2b("2s")>=0?o=45(o):("3b"===r||!r)&&n.2b("41")>=0&&e.4k(o)),o};6 S}7(!3.B)6 a("1a: 4l U 4m - 4n 4o 1y"),3;4 l,f,d,p=3;"5"==W t?t={K:t}:"1J"==W t||!1===t&&1D.B>0?(t={1d:t,P:r,1B:n},"5"==W s&&(t.K=s)):R 0===t&&(t={}),l=t.2G||t.8||3.1s("2G"),(d=(d="1J"==W(f=t.1d||3.1s("2c"))?e.4p(f):"")||Z.2A.2z||"")&&(d=(d.4q(/^([^#]+)/)||[])[1]),t=e.2M(!0,{1d:d,K:e.1O.K,8:l||e.1O.8,1T:/^4r/i.1o(Z.2A.2z||"")?"41:48":"4s:4t"},t);4 m={};7(3.13("z-2w-3V",[3,t,m]),m.3U)6 a("1a: U 3S 25 z-2w-3V 13"),3;7(t.2U&&!1===t.2U(3,t))6 a("1a: U 1b 25 2U 2t"),3;4 h=t.2O;R 0===h&&(h=e.1O.2O);4 v,g=[],x=3.2T(t.4A,g,t.4B);7(t.P){4 y=e.2S(t.P)?t.P(x):t.P;t.I=y,v=e.1K(y,h)}7(t.2R&&!1===t.2R(x,3,t))6 a("1a: U 1b 25 2R 2t"),3;7(3.13("z-U-3L",[x,3,t,m]),m.3U)6 a("1a: U 3S 25 z-U-3L 13"),3;4 b=e.1K(x,h);v&&(b=b?b+"&"+v:v),"4F"===t.8.4G()?(t.1d+=(t.1d.2b("?")>=0?"&":"?")+b,t.P=Q):t.P=b;4 T=[];7(t.1E&&T.H(5(){p.1E()}),t.2P&&T.H(5(){p.2P(t.4J)}),!t.1B&&t.1p){4 j=t.K||5(){};T.H(5(r,a,n){4 i=1D,o=t.4K?"3H":"4M";e(t.1p)[o](r).1i(5(){j.1f(3,i)})})}16 t.K&&(e.4O(t.K)?e.3y(T,t.K):T.H(t.K));7(t.K=5(e,r,a){Y(4 n=t.12||3,i=0,o=T.B;i0,D="2j/z-P",A=p.11("2d")===D||p.11("2I")===D,L=i.2V&&i.3C;a("4S :"+L);4 F,E=(k||A)&&!L;!1!==t.1U&&(t.1U||E)?t.3w?e.1Q(t.3w,5(){F=c(x)}):F=c(x):F=(k||A)&&L?5(r){Y(4 a=21 3E,n=0;n0)&&(n={1d:n,P:i,1B:o},"5"==W s&&(n.K=s)),n=n||{},n.2i=n.2i&&e.2S(e.J.1V),!n.2i&&0===3.B){4 u={s:3.1M,c:3.12};6!e.3K&&u.s?(a("2r 2q 3J, 5i 2H"),e(5(){e(u.s,u.c).2H(n)}),3):(a("5j; 5k 2v 5m 5n 1M"+(e.3K?"":" (2r 2q 3J)")),3)}6 n.2i?(e(19).2x("U.z-1e",3.1M,t).2x("2l.z-1e",3.1M,r).1V("U.z-1e",3.1M,n,t).1V("2l.z-1e",3.1M,n,r),3):3.3c().1V("U.z-1e",n,t).1V("2l.z-1e",n,r)},e.J.3c=5(){6 3.2x("U.z-1e 2l.z-1e")},e.J.2T=5(t,r,a){4 n=[];7(0===3.B)6 n;4 o,s=3[0],u=3.11("5s"),c=t||R 0===s.2v?s.28("*"):s.2v;7(c&&(c=e.5t(c)),u&&(t||/(5u|5v)\\//.1o(3a.39))&&(o=e(\':1c[z="\'+u+\'"]\').1Q()).B&&(c=(c||[]).5x(o)),!c||!c.B)6 n;e.2S(a)&&(c=e.5y(c,a));4 l,f,d,p,m,h,v;Y(l=0,h=c.B;l=t||n<0||b&&e-f>=i}function k(){var e=Date.now();if(y(e))return w(e);c=g(k,function(e){var n=e-f,r=t-(e-l);return b?Math.min(r,i-n):r}(e))}function w(e){return c=void 0,h&&o?m(e):(o=a=void 0,s)}function x(){var e=Date.now(),n=y(e);if(o=arguments,a=this,l=e,n){if(void 0===c)return v(l);if(b)return c=g(k,t),m(l)}return void 0===c&&(c=g(k,t)),s}return t=+t||0,d=r(u=n),null==u||"object"!==d&&"function"!==d||(p=!!n.leading,i=(b="maxWait"in n)?Math.max(+n.maxWait||0,t):t,h="trailing"in n?!!n.trailing:h),x.cancel=function(){void 0!==c&&clearTimeout(c),f=0,o=l=a=c=void 0},x.flush=function(){return void 0===c?s:w(Date.now())},x.pending=function(){return void 0!==c},x};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;ni?i:t,l=Math.ceil(c*(a/t));l=l>s?s:l,(n=n||e.split("/").pop()).length>50&&(n=n.substr(0,50)+"..."),layer.open({type:1,shade:.2,title:!1,maxmin:!1,shadeClose:!0,closeBtn:2,content:$(o),area:[c+"px",l+"px"],skin:"layui-layer-nobg",end:function(){document.body.removeChild(o)}})},o.onerror=function(){r.loading(!1),r.error(r.lang.trans("no_preview"))}}},{key:"asyncRender",value:function(e,t,n){var r=this.dcat;$.ajax(e).then((function(e){t(r.assets.resolveHtml(e,r.triggerReady).render())}),(function(e,t,o){if(n&&!1===n(e,t,o))return!1;r.handleAjaxError(e,t,o)}))}},{key:"loadFields",value:function(e,t){var n=[],r=[];t.values?"string"==typeof(r=t.values)&&(r=[r]):$(e).find("option:selected").each((function(){("0"===String(this.value)||this.value)&&r.push(this.value)})),r.length&&(t.fields.forEach((function(o,a){var i=$(e).closest(t.group).find("."+t.fields[a]);r.length&&n.push(function(e,n){Dcat.loading(),$.ajax(e).then((function(e){Dcat.loading(!1),n.find("option").remove(),$.map(e,(function(e){n.append(new Option(e[t.textField],e[t.idField],!1,!1))})),$(n).val(String(n.data("value")).split(",")).trigger("change")}))}(t.urls[a]+(t.urls[a].match(/\?/)?"&":"?")+"q="+r.join(","),i))})),$.when(n).then((function(){})))}}])&&i(t.prototype,n),r&&i(t,r),e}();function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n {message}
',redirect:!0,autoRemoveError:!0,before:function(){},after:function(){},success:function(){},error:function(){}},t),this.originalValues={},this.$form=$(this.options.form).first(),this._errColumns={},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e=this,t=e.options.confirm;if(!t.title)return e.submit();Dcat.confirm(t.title,t.content,(function(){e.submit()}))}},{key:"submit",value:function(){var e=this,t=e.$form,n=e.options,r=t.find('[type="submit"],.submit');e.removeErrors(),t.ajaxSubmit({data:{_token:Dcat.token},beforeSubmit:function(o,a,i){return!1!==n.before(o,a,i,e)&&!1!==U(H.before,o,a,i,e)&&!(n.validate&&(t.validator("validate"),t.find("."+n.errorClass).length>0))&&void r.buttonLoading()},success:function(t){setTimeout((function(){r.buttonLoading(!1)}),700),!1!==n.after(!0,t,e)&&!1!==n.success(t,e)&&!1!==U(H.success,t,e)&&(!1!==t.redirect&&n.redirect||t.data&&t.data.then&&(delete t.data.then,delete t.data.then,delete t.data.then),Dcat.handleJsonResponse(t))},error:function(o){if(r.buttonLoading(!1),!1!==n.after(!1,o,e)&&!1!==n.error(o,e)&&!1!==U(H.error,o,e))try{var a,i=JSON.parse(o.responseText);if(422!=o.status||!i||!Dcat.helpers.isset(i,"errors")){var s=o.responseJSON;return s&&s.message?Dcat.error(s.message):Dcat.error(o.status+" "+o.statusText)}for(a in i=i.errors,i)e._errColumns[a]=e.showError(t,a,i[a])}catch(e){return Dcat.error(o.status+" "+o.statusText)}}})}},{key:"showError",value:function(e,t,n){var r=this,o=r.queryFieldByName(e,t),a=o.closest(r.options.groupSelector);if(G(r,o).removeClass("d-none"),r.originalValues[t]=r.getFieldValue(o),o)return function(e){for(var t in a.addClass(r.options.errorClass),"string"==typeof e&&(e=[e]),e)a.find(r.options.errorContainerSelector).first().append(r.options.errorTemplate.replace("{message}",e[t]));r.options.validationErrorToastr&&Dcat.error(e.join("
"))}(n),r.options.autoRemoveError&&function(e,t,n){var r=function(){e.removeError(t,n)};t.one("change",r),t.off("blur",r).on("blur",(function(){e.isValueChanged(t,n)&&r()})),function o(){setTimeout((function(){if(t.length)return e.isValueChanged(t,n)?r():void o()}),500)}()}(r,o,t),o;Dcat.helpers.len(n)&&n.length&&Dcat.error(n.join(" \n "))}},{key:"getFieldValue",value:function(e){var t,n=[],r=e.attr("type"),o="checkbox"===r||"radio"===r;for(t=0;t")}function G(e,t){return N(e,t).find(".has-tab-error")}function U(e){var t,n,r,o=arguments,a=[];for(n in delete o[0],o=o||[])a.push(o[n]);for(t in e)if(!1===(r=e[t].apply(e[t],a)))return r}F.submitting=function(e){return"function"==typeof e&&H.before.push(e),this},F.submitted=function(e,t){return"function"==typeof e&&H.success.push(e),"function"==typeof t&&H.error.push(t),this},$.fn.form=function(e){var t=$(this);e=$.extend(e,{form:t}),t.on("submit",(function(){return!1})),t.find('[type="submit"],.submit').click((function(t){return Dcat.Form(e),!1}))};var J=F;function K(e,t){for(var n=0;n0)return!1;e.submitting=1,r.buttonLoading()},after:function(o,a){if(r.buttonLoading(!1),e.submitting=0,!1===t.saved(o,a))return!1;if(!o)return t.error(o,a);if(a.status){var i=t.success(o,a);return e._destroy(n),i}return t.error(o,a)}}),!1}}])&&K(t.prototype,n),r&&K(t,r),e}();function Q(e,t){for(var n=0;n'],X=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=$.extend({container:t.config.pjax_container_selector,zIndex:100,width:"52px",color:t.color.dark60,background:"#fff",style:"",svg:W[0]},n);this.$container=$(n.container),$('
{svg}
'.replace("{svg}",n.svg).replace("{color}",n.color).replace("{color}",n.color).replace("{width}",n.width).replace("{style}","".concat("position:absolute;","background:").concat(n.background,";z-index:").concat(n.zIndex,";").concat(n.style))).appendTo(this.$container)}var t,n,r;return t=e,(n=[{key:"destroy",value:function(){this.$container.find(".dcat-loading").remove()}}])&&Q(t.prototype,n),r&&Q(t,r),e}();function Y(){$(".dcat-loading").remove()}var Z=function(e){e.loading=function(e){if(!1===e)return setTimeout(Y,70);e=$.extend({zIndex:999991014,width:"58px",shade:"rgba(255, 255, 255, 0.1)",background:"transparent",top:200,svg:W[0]},e);var t=$(window),n=$('
'),r=$('
');function o(){n.css({left:(t.width()-300)/2,top:(t.height()-e.top)/2})}n.appendTo("body"),e.shade&&r.appendTo("body"),t.on("resize",o),o(),n.loading(e)},$.fn.loading=function(t){return!1===t?$(this).find(".dcat-loading").remove():((t=t||{}).container=$(this),new X(e,t))},$.fn.buttonLoading=function(t){var n,r=$(this),o=r.attr("data-loading");if(!1===t)return o?(r.find(".waves-ripple").remove(),r.removeClass("disabled btn-loading waves-effect").removeAttr("disabled").removeAttr("data-loading").html(r.find("."+o).html())):r;if(o)return r;n=r.html(),o="ld-"+e.helpers.random();var a='',i=["btn","layui-layer-btn0","layui-layer-btn1"];for(var s in i)r.hasClass(i[s])&&(a=W[0].replace("{color}","currentColor").replace("{width}","50px;height:11px;"));return r.addClass("disabled btn-loading").attr("disabled",!0).attr("data-loading",o).html('\n\n").concat(a,"\n"))}};function ee(e,t){for(var n=0;n\n
\n'.replace("{id}",r.id).replace("{class}",r.options.class||"")),r.$container.appendTo("body"),r.$container.find(".slider-content").append(r.$target),new PerfectScrollbar("#".concat(r.id," .slider-content")),r.options.autoDestory&&t.onPjaxComplete((function(){r.destroy()}))}var t,n,r;return t=e,(n=[{key:"open",value:function(){this.$container.addClass("open")}},{key:"close",value:function(){this.$container.removeClass("open")}},{key:"toggle",value:function(){this.$container.toggleClass("open")}},{key:"destroy",value:function(){this.$container.remove()}}])&&ne(t.prototype,n),r&&ne(t,r),e}();function oe(e,t){for(var n=0;n255?255:e<0?0:e};t=t||0;var r=parseInt(e,16);return[n((r>>16)+t),n((r>>8&255)+t),n((255&r)+t)]}}])&&oe(t.prototype,n),r&&oe(t,r),e}();function ie(e,t){for(var n=0;n400?$(".scroll-top").fadeIn():$(".scroll-top").fadeOut()})),$(".scroll-top").click((function(){$("html, body").animate({scrollTop:0},1e3)}))}}])&&fe(t.prototype,n),r&&fe(t,r),e}();function be(e,t){for(var n=0;n35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('!14(t,e){"4o"==1A ac&&"3d"!=1A a7?a7.ac=e():"14"==1A 83&&83.ep?83(e):t.7V=e()}(1d,14(){"8G eo";14 f(t){17(f="14"==1A 5i&&"ag"==1A 5i.en?14(t){17 1A t}:14(t){17 t&&"14"==1A 5i&&t.5Q===5i&&t!==5i.3b?"ag":1A t})(t)}14 o(t,e){1w(!(t 7P e))7K 2M 8i("ek 4A a 1j as a 14")}14 i(t,e){2g(18 n=0;n\\n <1H 1j="\').1n(k.4O,\'">\\n \\n <1H 1j="\').1n(k.1r," ").1n(B.2n,\'">\\n <34 1j="13-x-2V"><34 1j="13-x-2V-1o-1g"><34 1j="13-x-2V-1o-1k">\\n \\n <1H 1j="\').1n(k.1r," ").1n(B.4q,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.5J,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.5I,\'">\\n <1H 1j="\').1n(k.1r," ").1n(B.1f,\'">\\n <1H 1j="13-1f-35-1o-1g">\\n <34 1j="13-1f-1o-3h"> <34 1j="13-1f-1o-3c">\\n <1H 1j="13-1f-6G"> <1H 1j="13-1f-6F">\\n <1H 1j="13-1f-35-1o-1k">\\n \\n \\n <8k 1j="\').1n(k.2I,\'" 55="\').1n(k.2I,\'">\\n <3y 1U="3y" 1j="\').1n(k.3e,\'">&d3;\\n \\n <1H 1j="\').1n(k.1z,\'">\\n <1H 55="\').1n(k.1z,\'">\\n <1i 1j="\').1n(k.1i,\'" />\\n <1i 1U="2l" 1j="\').1n(k.2l,\'" />\\n <1H 1j="\').1n(k.2s,\'">\\n <1i 1U="2s" />\\n <46>\\n \\n <2b 1j="\').1n(k.2b,\'">\\n <1H 1j="\').1n(k.2v,\'">\\n <3E 2g="\').1n(k.2A,\'" 1j="\').1n(k.2A,\'">\\n <1i 1U="2A" />\\n <34 1j="\').1n(k.3E,\'">\\n \\n <2h 1j="\').1n(k.2h,\'">\\n <1H 1j="\').1n(k["4h-4l"],\'" 55="\').1n(k["4h-4l"],\'">\\n \\n <1H 1j="\').1n(k.2F,\'">\\n <3y 1U="3y" 1j="\').1n(k.4n,\'">8t\\n <3y 1U="3y" 1j="\').1n(k.3N,\'">8x\\n \\n <1H 1j="\').1n(k.3C,\'">\\n \\n \\n\').d2(/(^|\\n)\\s*/g,""),ct=14(t){1w(14(){18 t=q();t&&(t.3I.7D(t),3U([1m.5a,1m.1e],[k["26-1P"],k["1b-1q"],k["d1-1R"]]))}(),X())g("6Y 7H 1m 3S d0");3m{18 e=1m.3A("1H");e.4F=k.1h,e.38=9T;18 n=14(t){17"3a"==1A t?1m.2T(t):t}(t.29);n.37(e),14(t){18 e=2K();e.2P("cZ",t.1b?"cY":"9e"),e.2P("2o-cX",t.1b?"cW":"cV"),t.1b||e.2P("2o-3M","4M")}(t),14(t){"6M"===22.4U(t).4k&&1V(q(),k.6M)}(n),14(){18 t=U(),e=2y(t,k.1i),n=2y(t,k.2l),o=t.2T(".".1n(k.2s," 1i")),i=t.2T(".".1n(k.2s," 46")),r=2y(t,k.2b),a=t.2T(".".1n(k.2A," 1i")),s=2y(t,k.2h);e.7N=G,n.5R=G,r.5R=G,a.5R=G,s.7N=G,o.7N=14(t){G(t),i.1K=o.1K},o.5R=14(t){G(t),o.cU.1K=o.1K}}()}},9w=14(t,e){1w(t.38="",0 2O e)2g(18 n=0;n 2O e;n++)t.37(e[n].9B(!0));3m t.37(e.9B(!0))},dt=14(){1w(X())17!1;18 t=1m.3A("1H"),e={cT:"cS",cR:"cQ cP",1L:"cO"};2g(18 n 2O e)1w(e.6I(n)&&3l 0!==t.1I[n])17 e[n];17!1}();14 7R(t,e,n){M(t,n["cN"+e.cM(1)+"ad"],"6t-4b"),t.38=n[e+"cL"],t.2P("2o-3E",n[e+"cK"]),t.4F=k[e],b(t,n.2i,e+"ad"),1V(t,n[e+"cJ"])}14 8c(t,e){18 n=Z(),o=K(),i=F();e.5f||e.5e?T(n):O(n),b(n,e.2i,"2F"),7R(o,"4n",e),7R(i,"3N",e),e.7X?14(t,e,n){1V([t,e],k.2J),n.5N&&(t.1I.5E=n.5N),n.6N&&(e.1I.5E=n.6N);18 o=22.4U(t).4v("1J-1u");t.1I.82=o,t.1I.7Z=o}(o,i,e):(3U([o,i],k.2J),o.1I.5E=o.1I.82=o.1I.7Z="",i.1I.5E=i.1I.82=i.1I.7Z="")}14 8C(t,e){18 n=q();n&&(14(t,e){"3a"==1A e?t.1I.1J=e:e||1V([1m.5a,1m.1e],k["26-1P"])}(n,e.1P),!e.1P&&e.5y&&y(\'"5y" 42 7H `1P` 42 3S be 43 3S `4M`\'),14(t,e){e 2O k?1V(t,k[e]):(y(\'8H "2G" 42 53 1M 8K, 8L 3S "1l"\'),1V(t,k.1l))}(n,e.2G),14(t,e){1w(e&&"3a"==1A e){18 n="1Y-"+e;n 2O k&&1V(t,k[n])}}(n,e.1Y),b(n,e.2i,"1h"),e.6j&&1V(n,e.6j))}14 6m(t,e){t.2E&&!e.4Y||(t.2E=e.4Y)}18 bb={5g:2M 5h,3k:2M 5h,3R:2M 5h},96=14(t,e){18 n=P(U(),t);1w(n)2g(18 o 2O 14(t){2g(18 e=0;e=i.2W.23&&y("6E 56 42, 2y a9 be cG cF 2W.23 (56 cE cD cC cA 86 0)"),i.2W.2S(14(t,e){18 n=14(t){18 e=1m.3A("7z");17 1V(e,k["25-2D"]),e.38=t,e}(t);1w(r.37(n),e===a&&1V(n,k["3V-25-2D"]),e!==i.2W.23-1){18 o=14(t){18 e=1m.3A("7z");17 1V(e,k["25-2D-1o"]),t.7y&&(e.1I.1c=t.7y),e}(t);r.37(o)}})}14 8a(t,e){18 n=Q();b(n,e.2i,"4O"),7E(0,e),14(t,e){18 n=bb.3k.2k(t);1w(n&&e.1U===n.1U&&N())b(N(),e.2i,"1r");3m 1w(bc(),e.1U)1w(8b(),-1!==2d.57(B).3t(e.1U)){18 o=H(".".1n(k.1r,".").1n(B[e.1U]));T(o),b(o,e.2i,"1r"),L(o,"13-1Q-".1n(e.1U,"-1r"),e.1L)}3m g(\'8e 1U! 5k "1f", "2n", "5J", "5I" 5l "4q", 5m "\'.1n(e.1U,\'"\'))}(t,e),14(t,e){18 n=4L();1w(!e.5P)17 O(n);T(n),n.2P("8h",e.5P),n.2P("cz",e.7w),E(n,"1c",e.7u),E(n,"1E",e.8l),n.4F=k.4e,b(n,e.2i,"4e"),e.5u&&1V(n,e.5u)}(0,e),14(t,e){18 n=D();M(n,e.2I||e.5v),e.2I&&5W(e.2I,n),e.5v&&(n.8q=e.5v),b(n,e.2i,"2I")}(0,e),14(t,e){18 n=$();b(n,e.2i,"7s"),M(n,e.5U),n.2P("2o-3E",e.8u)}(0,e)}14 7r(t,e){!14(t,e){18 n=2K();E(n,"1c",e.1c),E(n,"2e",e.2e),e.1J&&(n.1I.1J=e.1J),n.4F=k.1t,e.1b?(1V([1m.5a,1m.1e],k["1b-1q"]),1V(n,k.1b)):1V(n,k.3M),b(n,e.2i,"1t"),"3a"==1A e.2i&&1V(n,e.2i),L(n,k.6Q,!e.1L)}(0,e),8C(0,e),8a(t,e),9K(t,e),8c(0,e),14(t,e){18 n=Y();M(n,e.3C),e.3C&&5W(e.3C,n),b(n,e.2i,"3C")}(0,e)}18 bc=14(){2g(18 t=R(),e=0;e22.bW&&(x.4B=4C(22.4U(1m.1e).4v("2e-1k")),1m.1e.1I.8y=x.4B+14(){1w("8z"2O 22||8A.bV)17 0;18 t=1m.3A("1H");t.1I.1c="8B",t.1I.1E="8B",t.1I.3T="8D",1m.1e.37(t);18 e=t.8m-t.bU;17 1m.1e.7D(t),e}()+"6y")}14 73(){17!!22.bT&&!!1m.bS}14 6r(){18 t=q(),e=2K();t.1I.aa("1S-2f"),e.bR<0&&(t.1I.bQ="1C-1O")}18 be=14(){1B!==x.4B&&(1m.1e.1I.8y=x.4B+"6y",x.4B=1B)},8M=14(){18 e,n=q();n.8z=14(t){e=t.29===n||!14(t){17!!(t.8w>t.bP)}(n)&&"bO"!==t.29.bN},n.bM=14(t){e&&(t.6h(),t.7d())}},8S=14(){1w(S(1m.1e,k.5L)){18 t=4C(1m.1e.1I.19,10);3U(1m.1e,k.5L),1m.1e.1I.19="",1m.1e.6g=-1*t}},8U=14(){"3d"!=1A 22&&73()&&22.6f("8W",6r)},8X=14(){m(1m.1e.8Y).2S(14(t){t.6V("3D-6e-2o-2L")?(t.2P("2o-2L",t.4W("3D-6e-2o-2L")),t.3O("3D-6e-2o-2L")):t.3O("2o-2L")})},6c={7i:2M 5h};14 7j(t,e,n){e?$t(n):(8N().3G(14(){17 $t(n)}),1y.4G.6f("7l",1y.5A,{7n:1y.41}),1y.64=!1),5z 1y.5A,5z 1y.4G,t.3I&&t.3I.7D(t),3U([1m.5a,1m.1e],[k.1q,k["1E-1D"],k["26-1P"],k["1b-1q"],k["1b-1R"]]),at()&&(be(),8S(),8U(),8X())}14 5c(t){18 e=q(),n=2K();1w(n&&!S(n,k.30)){18 o=bb.3k.2k(1d),i=6c.7i.2k(1d),r=o.9q,a=o.9o;3U(n,k.31),1V(n,k.30),dt&&j(n)?n.60(dt,14(t){t.29===n&&14(t,e,n,o){S(t,k.30)&&7j(e,n,o),bf(bb),bf(6c)}(n,e,5p(),a)}):7j(e,5p(),a),1B!==r&&"14"==1A r&&r(n),i(t||{}),5z 1d.49}}18 bf=14(t){2g(18 e 2O t)t[e]=2M 5h},$t=14(t){1B!==t&&"14"==1A t&&59(14(){t()})};14 5w(t,e,n){18 o=bb.3R.2k(t);e.2S(14(t){o[t].2Q=n})}14 7t(t,e){1w(!t)17!1;1w("2v"===t.1U)2g(18 n=t.3I.3I.4w("1i"),o=0;o"));18 t=2K(),n="3a"==1A e.29?1m.2T(e.29):e.29;(!t||t&&n&&t.3I!==n.3I)&&ct(e)}(l),2d.5F(l),1y.2U&&(1y.2U.4X(),5z 1y.2U),9j(1y.8P);18 d={1t:2K(),1h:q(),1z:U(),2F:Z(),2N:K(),3o:F(),7s:$(),3j:W(),2W:z()};bb.3R.43(1d,d),7r(1d,l),bb.3k.43(1d,l);18 p=1d.5Q;17 2M 36(14(t){14 n(t){c.7S({1K:t})}14 s(t){c.7S({6T:t})}6c.7i.43(c,t),l.4H&&(1y.2U=2M bg(14(){s("4H"),5z 1y.2U},l.4H));l.1i&&59(14(){18 t=c.3x();t&&A(t)},0);2g(18 u=14(e){(l.6l&&p.8f(),l.4T)?(c.5Z(),36.4y().3G(14(){17 l.4T(e,l.3j)}).3G(14(t){V(d.3j)||!1===t?c.4D():n(3l 0===t?e:t)})):n(e)},e=14(t){18 e=t.29,n=d.2N,o=d.3o,i=n&&(n===e||n.3X(e)),r=o&&(o===e||o.3X(e));5H(t.1U){3i"75":1w(i)1w(c.7U(),l.1i){18 a=14(){18 t=c.3x();1w(!t)17 1B;5H(l.1i){3i"2A":17 t.5G?1:0;3i"2v":17 t.5G?t.1K:1B;3i"2l":17 t.ae.23?t.ae[0]:1B;4r:17 l.9k?t.1K.aw():t.1K}}();1w(l.5D)c.9W(),36.4y().3G(14(){17 l.5D(a,l.3j)}).3G(14(t){c.6H(),c.9V(),t?c.7W(t):u(a)});3m c.3x().ax()?u(a):(c.6H(),c.7W(l.3j))}3m u(!0);3m r&&(c.7U(),s(p.4S.3N))}},o=d.1t.4w("3y"),i=0;i.13-3M{2r-3H:0 0 d6 3B(0,0,0,.4)}1e.13-26-1P .13-1q.13-19{19:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-19-1g,1e.13-26-1P .13-1q.13-19-1O{19:0;1g:0}1e.13-26-1P .13-1q.13-19-27,1e.13-26-1P .13-1q.13-19-1k{19:0;1k:0}1e.13-26-1P .13-1q.13-1l{19:50%;1g:50%;-1a-16:6w(-50%,-50%);16:6w(-50%,-50%)}1e.13-26-1P .13-1q.13-1l-1g,1e.13-26-1P .13-1q.13-1l-1O{19:50%;1g:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1l-27,1e.13-26-1P .13-1q.13-1l-1k{19:50%;1k:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1v{1v:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-1v-1g,1e.13-26-1P .13-1q.13-1v-1O{1v:0;1g:0}1e.13-26-1P .13-1q.13-1v-27,1e.13-26-1P .13-1q.13-1v-1k{1k:0;1v:0}.13-1h{2B:1C;2G:d7;z-3Z:d9;19:0;1k:0;1v:0;1g:0;1C-4k:5M;1S-2f:1l;2p-1z:1l;2e:.1W;3T-x:2L;1J-1u:3v;-1a-3T-da:db}.13-1h.13-19{1S-2f:1C-1O}.13-1h.13-19-1g,.13-1h.13-19-1O{1S-2f:1C-1O;2p-1z:1C-1O}.13-1h.13-19-27,.13-1h.13-19-1k{1S-2f:1C-1O;2p-1z:1C-27}.13-1h.13-1l{1S-2f:1l}.13-1h.13-1l-1g,.13-1h.13-1l-1O{1S-2f:1l;2p-1z:1C-1O}.13-1h.13-1l-27,.13-1h.13-1l-1k{1S-2f:1l;2p-1z:1C-27}.13-1h.13-1v{1S-2f:1C-27}.13-1h.13-1v-1g,.13-1h.13-1v-1O{1S-2f:1C-27;2p-1z:1C-1O}.13-1h.13-1v-27,.13-1h.13-1v-1k{1S-2f:1C-27;2p-1z:1C-27}.13-1h.13-1v-27>:4P-4Q,.13-1h.13-1v-1g>:4P-4Q,.13-1h.13-1v-1k>:4P-4Q,.13-1h.13-1v-1O>:4P-4Q,.13-1h.13-1v>:4P-4Q{1N-19:1D}.13-1h.13-1Y-6S>.13-3M{2B:1C!3f;1C:1;1S-9M:72;2p-1z:1l}.13-1h.13-1Y-5M>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h.13-1Y-1R{1C:1;1C-4k:1R}.13-1h.13-1Y-1R.13-1v,.13-1h.13-1Y-1R.13-1l,.13-1h.13-1Y-1R.13-19{1S-2f:1l}.13-1h.13-1Y-1R.13-1v-1g,.13-1h.13-1Y-1R.13-1v-1O,.13-1h.13-1Y-1R.13-1l-1g,.13-1h.13-1Y-1R.13-1l-1O,.13-1h.13-1Y-1R.13-19-1g,.13-1h.13-1Y-1R.13-19-1O{1S-2f:1C-1O}.13-1h.13-1Y-1R.13-1v-27,.13-1h.13-1Y-1R.13-1v-1k,.13-1h.13-1Y-1R.13-1l-27,.13-1h.13-1Y-1R.13-1l-1k,.13-1h.13-1Y-1R.13-19-27,.13-1h.13-1Y-1R.13-19-1k{1S-2f:1C-27}.13-1h.13-1Y-1R>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h:1M(.13-19):1M(.13-19-1O):1M(.13-19-27):1M(.13-19-1g):1M(.13-19-1k):1M(.13-1l-1O):1M(.13-1l-27):1M(.13-1l-1g):1M(.13-1l-1k):1M(.13-1v):1M(.13-1v-1O):1M(.13-1v-27):1M(.13-1v-1g):1M(.13-1v-1k):1M(.13-1Y-6S)>.13-3M{1N:1D}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-1h .13-3M{1N:0!3f}}.13-1h.13-6R{6u:1J-1u .1s}.13-1h.13-1q{1J-1u:3B(0,0,0,.4)}.13-1t{2B:1Z;2G:5o;2r-5r:1x-2r;1C-4k:1R;2p-1z:1l;1c:de;4K-1c:1F%;2e:1.2x;1x:1Z;1x-2w:.2C;1J:#3Q;1T-8Z:3z;1T-2j:dh}.13-1t:2c{5B:0}.13-1t.13-2u{3T-y:2L}.13-4O{2B:1C;1C-4k:1R;1S-2f:1l}.13-2I{2G:5o;4K-1c:1F%;1N:0 0 .4u;2e:0;1u:#dj;1T-2j:1.3p;1T-3Y:69;3g-1S:1l;3g-16:1Z;6a-6d:4I-6a}.13-2F{z-3Z:1;1C-6d:6d;1S-2f:1l;2p-1z:1l;1c:1F%;1N:1.2x 1D 0}.13-2F:1M(.13-2u) .13-2J[2Q]{2z:.4}.13-2F:1M(.13-2u) .13-2J:8j{1J-4e:4R-8s(3B(0,0,0,.1),3B(0,0,0,.1))}.13-2F:1M(.13-2u) .13-2J:3V{1J-4e:4R-8s(3B(0,0,0,.2),3B(0,0,0,.2))}.13-2F.13-2u .13-2J.13-4n{2r-5r:1x-2r;1c:2.21;1E:2.21;1N:.dq;2e:0;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:.2x 44 3v;1x-2w:1F%;1x-1u:3v;1J-1u:3v!3f;1u:3v;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-2F.13-2u .13-2J.13-3N{1N-1k:9R;1N-1g:9R}.13-2F.13-2u :1M(.13-2J).13-4n::dA{1z:\\"\\";2B:6t-4b;1c:9L;1E:9L;1N-1g:dC;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:9m 44 #dE;1x-2w:50%;1x-1k-1u:3v;2r-3H:3K 3K 3K #3Q}.13-2J{1N:.2C;2e:.1W 2q;2r-3H:1Z;1T-3Y:dG}.13-2J:1M([2Q]){6s:8g}.13-2J.13-4n{1x:0;1x-2w:.2x;1J:77;1J-1u:#6k;1u:#3Q;1T-2j:1.32}.13-2J.13-3N{1x:0;1x-2w:.2x;1J:77;1J-1u:#dK;1u:#3Q;1T-2j:1.32}.13-2J:2c{5B:0;2r-3H:0 0 0 79 #3Q,0 0 0 dM 3B(50,1F,7T,.4)}.13-2J::-4s-2c-dN{1x:0}.13-3C{2p-1z:1l;1N:1.2x 0 0;2e:3w 0 0;1x-19:3K 44 #dO;1u:#9X;1T-2j:3w}.13-4e{4K-1c:1F%;1N:1.2x 1D}.13-3e{2G:4p;19:0;1k:0;2p-1z:1l;1c:1.2q;1E:1.2q;2e:0;3T:2L;6u:1u .1s 7g-dR;1x:1Z;1x-2w:0;5B:77;1J:0 0;1u:#4V;1T-8Z:dT;1T-2j:2.21;1o-1E:1.2;6s:8g}.13-3e:8j{-1a-16:1Z;16:1Z;1J:0 0;1u:#5b}.13-1z{z-3Z:1;2p-1z:1l;1N:0;2e:0;1u:#9X;1T-2j:1.2m;1T-3Y:87;1o-1E:4x;6a-6d:4I-6a}#13-1z{3g-1S:1l}.13-2A,.13-2l,.13-1i,.13-2v,.13-2b,.13-2h{1N:3w 1D}.13-2l,.13-1i,.13-2h{2r-5r:1x-2r;1c:1F%;6u:1x-1u .3s,2r-3H .3s;1x:3K 44 #9t;1x-2w:.39;1J:3z;2r-3H:dX 0 3K 3K 3B(0,0,0,.dY);1u:3z;1T-2j:1.2m}.13-2l.13-4N,.13-1i.13-4N,.13-2h.13-4N{1x-1u:#5b!3f;2r-3H:0 0 79 #5b!3f}.13-2l:2c,.13-1i:2c,.13-2h:2c{1x:3K 44 #dZ;5B:0;2r-3H:0 0 9m #e0}.13-2l::-1a-1i-2E,.13-1i::-1a-1i-2E,.13-2h::-1a-1i-2E{1u:#4V}.13-2l::-4s-2E,.13-1i::-4s-2E,.13-2h::-4s-2E{1u:#4V}.13-2l:-2Z-1i-2E,.13-1i:-2Z-1i-2E,.13-2h:-2Z-1i-2E{1u:#4V}.13-2l::-2Z-1i-2E,.13-1i::-2Z-1i-2E,.13-2h::-2Z-1i-2E{1u:#4V}.13-2l::2E,.13-1i::2E,.13-2h::2E{1u:#4V}.13-2s{1N:3w 1D;1J:3z}.13-2s 1i{1c:80%}.13-2s 46{1c:20%;1u:3z;1T-3Y:69;3g-1S:1l}.13-2s 1i,.13-2s 46{1E:2.1W;2e:0;1T-2j:1.2m;1o-1E:2.1W}.13-1i{1E:2.1W;2e:0 .2X}.13-1i[1U=4d]{4K-1c:e2}.13-2l{1J:3z;1T-2j:1.2m}.13-2h{1E:6.2X;2e:.2X}.13-2b{7m-1c:50%;4K-1c:1F%;2e:.2H .1W;1J:3z;1u:3z;1T-2j:1.2m}.13-2A,.13-2v{1S-2f:1l;2p-1z:1l;1J:3z;1u:3z}.13-2A 3E,.13-2v 3E{1N:0 .78;1T-2j:1.2m}.13-2A 1i,.13-2v 1i{1N:0 .4u}.13-4h-4l{2B:1Z;1S-2f:1l;2p-1z:1l;2e:.1W;3T:2L;1J:#e3;1u:#e4;1T-2j:3w;1T-3Y:87}.13-4h-4l::4j{1z:\\"!\\";2B:6t-4b;1c:1.21;7m-1c:1.21;1E:1.21;1N:0 .1W;8T:4x;1x-2w:50%;1J-1u:#5b;1u:#3Q;1T-3Y:69;1o-1E:1.21;3g-1S:1l}@e5 (-2Z-e6:4M){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@-4s-1m 62-e7(){.13-3e:2c{5B:79 44 3B(50,1F,7T,.4)}}.13-1r{2G:5o;2r-5r:1z-2r;2p-1z:1l;1c:21;1E:21;1N:1.2x 1D 1.3p;8T:4x;1x:.2x 44 3v;1x-2w:50%;1o-1E:21;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-1r::4j{2B:1C;1S-2f:1l;1E:92%;1T-2j:3.2X}.13-1r.13-2n{1x-1u:#5b}.13-1r.13-2n .13-x-2V{2G:5o;1C-1Y:1}.13-1r.13-2n [1j^=13-x-2V-1o]{2B:4b;2G:4p;19:2.2C;1c:2.3q;1E:.2C;1x-2w:.2m;1J-1u:#5b}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1g]{1g:1.32;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1k]{1k:3w;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-5J{1x-1u:#e8;1u:#e9}.13-1r.13-5J::4j{1z:\\"!\\"}.13-1r.13-5I{1x-1u:#ea;1u:#eb}.13-1r.13-5I::4j{1z:\\"i\\"}.13-1r.13-4q{1x-1u:#ec;1u:#ed}.13-1r.13-4q::4j{1z:\\"?\\"}.13-1r.13-4q.13-ef-4q-2V::4j{1z:\\"؟\\"}.13-1r.13-1f{1x-1u:#7Q}.13-1r.13-1f [1j^=13-1f-35-1o]{2G:4p;1c:3.2X;1E:7.21;-1a-16:1p(1X);16:1p(1X);1x-2w:50%}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1g]{19:-.4J;1g:-2.eg;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:3.2X 3.2X;16-4m:3.2X 3.2X;1x-2w:7.21 0 0 7.21}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1k]{19:-.9H;1g:1.3p;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:0 3.2X;16-4m:0 3.2X;1x-2w:0 7.21 7.21 0}.13-1r.13-1f .13-1f-6G{2G:4p;z-3Z:2;19:-.2x;1g:-.2x;2r-5r:1z-2r;1c:1F%;1E:1F%;1x:.2x 44 3B(eh,ei,ej,.3);1x-2w:50%}.13-1r.13-1f .13-1f-6F{2G:4p;z-3Z:1;19:.21;1g:1.1W;1c:.4J;1E:5.1W;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-1f [1j^=13-1f-1o]{2B:4b;2G:4p;z-3Z:2;1E:.2C;1x-2w:.2m;1J-1u:#7Q}.13-1r.13-1f [1j^=13-1f-1o][1j$=3h]{19:2.3p;1g:.3p;1c:1.5K;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-1f [1j^=13-1f-1o][1j$=3c]{19:2.2H;1k:.21;1c:2.3q;-1a-16:1p(-1X);16:1p(-1X)}.13-25-3F{1S-2f:1l;1N:0 0 1.2x;2e:0;1J:3z;1T-3Y:69}.13-25-3F 7z{2B:6t-4b;2G:5o}.13-25-3F .13-25-2D{z-3Z:20;1c:2q;1E:2q;1x-2w:2q;1J:#6k;1u:#3Q;1o-1E:2q;3g-1S:1l}.13-25-3F .13-25-2D.13-3V-25-2D{1J:#6k}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D{1J:#8E;1u:#3Q}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D-1o{1J:#8E}.13-25-3F .13-25-2D-1o{z-3Z:10;1c:2.21;1E:.4u;1N:0 -3K;1J:#6k}[1j^=13]{-1a-el-em-1u:3v}.13-31{-1a-1L:13-31 .3s;1L:13-31 .3s}.13-31.13-6Q{-1a-1L:1Z;1L:1Z}.13-30{-1a-1L:13-30 .88 67;1L:13-30 .88 67}.13-30.13-6Q{-1a-1L:1Z;1L:1Z}.13-6M .13-3e{1k:1D;1g:0}.13-1Q-1f-1r .13-1f-1o-3h{-1a-1L:13-1Q-1f-1o-3h .4g;1L:13-1Q-1f-1o-3h .4g}.13-1Q-1f-1r .13-1f-1o-3c{-1a-1L:13-1Q-1f-1o-3c .4g;1L:13-1Q-1f-1o-3c .4g}.13-1Q-1f-1r .13-1f-35-1o-1k{-1a-1L:13-1p-1f-35-1o 4.8I 7g-2O;1L:13-1p-1f-35-1o 4.8I 7g-2O}.13-1Q-2n-1r{-1a-1L:13-1Q-2n-1r .5s;1L:13-1Q-2n-1r .5s}.13-1Q-2n-1r .13-x-2V{-1a-1L:13-1Q-2n-x-2V .5s;1L:13-1Q-2n-x-2V .5s}@-1a-2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@6J eq{1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q){3T-y:8D!3f}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q)>[2o-2L=4M]{2B:1Z}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q) .13-1h{2G:8O!3f}}");',0,895,"|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||swal2|function||transform|return|var|top|webkit|toast|width|this|body|success|left|container|input|class|right|center|document|concat|line|rotate|shown|icon||popup|color|bottom|if|border|Tt|content|typeof|null|flex|auto|height|100|scale|div|style|background|value|animation|not|margin|start|backdrop|animate|column|align|font|type|nt|625em|45deg|grow|none||5em|window|length||progress|no|end|translateY|target|keyframes|select|focus|Object|padding|items|for|textarea|customClass|size|get|file|125em|error|aria|justify|2em|box|range|rotateZ|loading|radio|radius|25em|it|opacity|checkbox|display|3125em|step|placeholder|actions|position|375em|title|styled|rt|hidden|new|confirmButton|in|setAttribute|disabled|inputValue|forEach|querySelector|timeout|mark|progressSteps|75em|yt|ms|hide|show|0625em||span|circular|Promise|appendChild|innerHTML|1875em|string|prototype|long|undefined|close|important|text|tip|case|validationMessage|innerParams|void|else|2deg|cancelButton|875em|9375em|key||indexOf|arguments|transparent|1em|getInput|button|inherit|createElement|rgba|footer|data|label|steps|then|shadow|parentNode|Swal|1px|running|modal|cancel|removeAttribute|ue|fff|domCache|to|overflow|ot|active|classList|contains|weight|index|tabindex|keydownListenerCapture|parameter|set|solid||output|Reflect|remaining|params|user|block|translateX|number|image|rotateX|75s|validation|405deg|before|direction|message|origin|confirm|object|absolute|question|default|moz|push|4em|getPropertyValue|querySelectorAll|normal|resolve|inputOptions|call|previousBodyPadding|parseInt|hideLoading|activeElement|className|keydownTarget|timer|break|4375em|max|_|true|inputerror|header|first|child|linear|DismissReason|preConfirm|getComputedStyle|ccc|getAttribute|stop|inputPlaceholder|apply||high|contrast|is||id|currentProgressStep|keys|previousActiveElement|setTimeout|documentElement|f27474|Qt|sweetalert2|showCancelButton|showConfirmButton|promise|WeakMap|Symbol|email|Expected|or|got|html|relative|st|Z0|sizing||zA|imageClass|titleText|Jt|toString|allowOutsideClick|delete|keydownHandler|outline|focusCancel|inputValidator|backgroundColor|freeze|checked|switch|info|warning|5625em|iosfix|row|confirmButtonColor|360deg|imageUrl|constructor|onchange|Date|inputClass|showCloseButton|onclick|tt|Pt|fire|resetValidationMessage|addEventListener|Lt|url||keydownHandlerAdded|||forwards|Unexpected|600|word|8em|Ft|wrap|previous|removeEventListener|scrollTop|preventDefault|of|customContainerClass|3085d6|showLoaderOnConfirm|gt|onmouseup|onBeforeOpen|onOpen|and|Dt|cursor|inline|transition|infinite|translate|enumerable|px|0s|writable|100deg|filter|1deg|Invalid|fix|ring|enableButtons|hasOwnProperty|media|_main|queue|rtl|cancelButtonColor|05|construct|noanimation|fade|fullscreen|dismiss|esc|hasAttribute|It|getConfirmButton|SweetAlert2|3em||remove|stretch|Nt|parseFloat|click|Array|initial|6em|2px|focusConfirm|reverseButtons|cancelButtonClass|stopPropagation|confirmButtonClass|allowEnterKey|ease|heightAuto|swalPromiseResolve|Zt|catch|keydown|min|capture|Mt|At|getTimerLeft|Bt|closeButton|Xt|imageWidth|te|imageAlt|childNodes|progressStepsDistance|li|test|https|all|removeChild|Ct|configurable|overflowY|requires|styleSheet|tel|throw|ie|Map|oninput|se|instanceof|a5dc86|pt|closePopup|150|disableButtons|Sweetalert2|showValidationMessage|buttonsStyling|update|borderRightColor||onmousedown|borderLeftColor|define||github|from|300|15s|try|kt|St|ft|splice|Unknown|showLoading|pointer|src|TypeError|hover|h2|imageHeight|offsetWidth|href|8125em|increase|innerText|isRunning|gradient|OK|closeButtonAriaLabel|Rt|scrollHeight|Cancel|paddingRight|ontouchstart|navigator|50px|mt|scroll|add8e6|busy|use|The|25s|jt|valid|defaulting|_t|Ot|static|restoreFocusTimeout|console|allowEscapeKey|zt|zoom|Wt|controls|resize|Kt|children|family|bind|duration||stopKeydownPropagation|setPrototypeOf||vt|confirmButtonText|confirmButtonAriaLabel|attributes|cancelButtonText|cancelButtonAriaLabel|name|isVisible|dialog|getPrototypeOf|__proto__|callback|started|clearTimeout|inputAutoTrim|password|3px|split|onAfterClose|hasn|onClose|scrollbarPadding|Vt|d9d9d9|qt|Ht|lt|isUpdatableParameter|ne|Boolean|argsToParams|cloneNode|finally|SweetAlert|clickConfirm|add|re|6875em|option|selected|wt|15px|self|been|defineProperties|com|inputAttributes|30px|enableConfirmButton|ut|disableConfirmButton|enableInput|disableInput|545454|blur|outerHTML|invalid|describedBy|getProgressSteps|const|swalInstance|getQueueStep|setProgressSteps|module|insertBefore|should|removeProperty|with|exports|Button|files|ul|symbol|isDeprecatedParameter|together|usage|example|nhttps|used|nshowLoaderOnConfirm|io|ajax|request|Target|||join|defined|trim|checkValidity|but|toasts|onmouseover|onmouseout|incompatible|hideProgressSteps|showProgressSteps|Enter|isComposing|Tab|shiftKey|ArrowLeft|ArrowRight|ArrowUp|ArrowDown|Left|Right|Up|Down|Escape|Esc|marginRight|Error|marginLeft|Updatable|are|listed|here|closeToast|blob|master|utils|js|closeModal|disableLoading|This|package|library|||||||||||please|include|shim|enable|browser|See|wiki||Migration||MSStream|support|userAgent|version|iPod|swal|sweetAlert|getElementsByTagName|head|iPhone|cssText|charset|UTF|iPad|URL|256|www|address|ontouchmove|tagName|INPUT|clientHeight|alignItems|offsetTop|documentMode|MSInputMethodContext|clientWidth|msMaxTouchPoints|innerHeight|isTimerRunning|increaseTimer|toggleTimer|resumeTimer|stopTimer|enableLoading|deleteQueueStep|insertQueueStep|create|either|must|expression|Super|mixin|isLoading|getValidationMessage|getFocusableElements|getFooter|getHeader|getCancelButton|getActions|getCloseButton|getIcons|getIcon|getImage|getContent|getTitle|getPopup|getContainer|clickCancel|see|isValidParameter||imageHeigth|Close|scrollTo|scrollY|scrollX|alt|starts|700|arrays|JS|like|than|less|textContent|basis|ButtonClass|ButtonAriaLabel|ButtonText|substring|showC|animationend|oanimationend|oAnimationEnd|OAnimation|webkitAnimationEnd|WebkitAnimation|nextSibling|assertive|polite|live|alert|role|initialize|has|replace|times|img|calc|10px|fixed|describedby|1060|scrolling|touch|labelledby|HTMLElement|32em|video|audio|1rem|contenteditable|595959|embed|iframe|area|sort|getClientRects|offsetHeight|46875em|warn|instead||Please|release|major|next|the|removed|after|will|5px|deprecated|999|slice|500|map|getOwnPropertyDescriptor|called|aaa|super|4px|inner|eee|initialised|ReferenceError|out|Function|serif|Proxy|sham|assign|inset|06|b4dbed|c4e6f5|defineProperty|10em|f0f0f0|666|supports|accelerator|prefix|facea8|f8bb86|9de0f6|3fc3ee|c9dae1|87adbd||arabic|0635em|165|220|134|Cannot|tap|highlight|iterator|strict|amd|print".split("|"),0,{}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('(4(k,l){"4"===G V&&V.1Z?V(l):"21"===G 1z?2c.1z=l():k.2f=l()})(x,4(){4 k(a,b,d){7 ad?d:a}4 l(a,b,d){a="Q"===e.B?{W:"Q("+D*(-1+a)+"%,0,0)"}:"Y"===e.B?{W:"Y("+D*(-1+a)+"%,0)"}:{"1u-2b":D*(-1+a)+"%"};a.P="U "+b+"A "+d;7 a}4 q(a,b){7 0<=("2a"==G a?a:n(a)).24(" "+b+" ")}4 r(a,b){6 d=n(a),c=d+b;q(d,b)||(a.10=c.1o(1))}4 t(a,b){6 c=n(a);q(a,b)&&(b=c.H(" "+b+" "," "),a.10=b.1o(1,b.J-1))}4 n(a){7(" "+(a.10||"")+" ").H(/\\s+/1C," ")}6 c={1W:"0.2.0"},e=c.1V={1b:.1U,1e:"1Q",B:"",1g:1P,N:!0,1n:.1O,1p:1N,1t:!0,16:\'[S="11"]\',1B:\'[S="T"]\',C:"I",19:\'\'};c.1H=4(a){6 b;X(b 9 a){6 c=a[b];1h 0!==c&&a.1i(b)&&(e[b]=c)}7 x};c.j=1k;c.E=4(a){6 b=c.1m();a=k(a,e.1b,1);c.j=1===a?1k:a;6 d=c.1l(!b),p=d.F(e.16),h=e.1g,v=e.1e;d.1r;w(4(b){""===e.B&&(e.B=c.1s());m(p,l(a,h,v));1===a?(m(d,{P:"1D",1v:1}),d.1r,R(4(){m(d,{P:"U "+h+"A 1w",1v:0});R(4(){c.1x();b()},h)},h)):R(b,h)});7 x};c.1m=4(){7"1y"===G c.j};c.14=4(){c.j||c.E(0);6 a=4(){R(4(){c.j&&(c.N(),a())},e.1p)};e.N&&a();7 x};c.1A=4(a){7 a||c.j?c.15(.3+.5*13.12()).E(1):x};c.15=4(a){6 b=c.j;7 b?("1y"!==G a&&(a=(1-b)*k(13.12()*b,.1,.1E)),b=k(b+a,0,.1F),c.E(b)):c.14()};c.N=4(){7 c.15(13.12()*e.1n)};(4(){6 a=0,b=0;c.1G=4(d){y(!d||"1I"===d.1J())7 x;0===b&&c.14();a++;b++;d.1K(4(){b--;0===b?(a=0,c.1A()):c.E((a-b)/a)});7 x}})();c.1l=4(a){y(c.1d())7 8.Z("o");r(8.1j,"o-1f");6 b=8.1R("i");b.1S="o";b.1T=e.19;6 d=b.F(e.16),p=a?"-D":D*(-1+(c.j||0));a=8.F(e.C);m(d,{P:"U 0 1w",W:"Q("+p+"%,0,0)"});e.1t||(d=b.F(e.1B))&&d&&d.M&&d.M.1a(d);a!=8.I&&r(a,"o-17-C");a.1X(b);7 b};c.1x=4(){t(8.1j,"o-1f");t(8.F(e.C),"o-17-C");6 a=8.Z("o");a&&a&&a.M&&a.M.1a(a)};c.1d=4(){7!!8.Z("o")};c.1s=4(){6 a=8.I.L,b="1Y"9 a?"1c":"20"9 a?"18":"22"9 a?"A":"23"9 a?"O":"";7 b+"25"9 a?"Q":b+"26"9 a?"Y":"1u"};6 w=4(){4 a(){6 c=b.27();c&&c(a)}6 b=[];7 4(c){b.28(c);1==b.J&&a()}}(),m=4(){4 a(a){7 a.H(/^-A-/,"A-").H(/-([\\29-z])/1C,4(a,b){7 b.1q()})}4 b(b){b=a(b);6 d;y(!(d=e[b])){d=b;a:{6 u=8.I.L;y(!(b 9 u))X(6 h=c.J,f=b.2d(0).1q()+b.2e(1),g;h--;)y(g=c[h]+f,g 9 u){b=g;2g a}}d=e[d]=b}7 d}6 c=["1c","O","18","A"],e={};7 4(a,c){6 d=2h;y(2==d.J)X(g 9 c){6 e=c[g];y(1h 0!==e&&c.1i(g)){d=a;6 f=g;f=b(f);d.L[f]=e}}2i{6 g=a;f=d[1];d=d[2];f=b(f);g.L[f]=d}}}();7 c});',0,143,"||||function||var|return|document|in|||||||||div|status|||||nprogress|||||||||this|if||ms|positionUsing|parent|100|set|querySelector|typeof|replace|body|length|class|style|parentNode|trickle||transition|translate3d|setTimeout|role|spinner|all|define|transform|for|translate|getElementById|className|bar|random|Math|start|inc|barSelector|custom|Moz|template|removeChild|minimum|Webkit|isRendered|easing|busy|speed|void|hasOwnProperty|documentElement|null|render|isStarted|trickleRate|substring|trickleSpeed|toUpperCase|offsetWidth|getPositioningCSS|showSpinner|margin|opacity|linear|remove|number|exports|done|spinnerSelector|gi|none|95|994|promise|configure|resolved|state|always|icon|peg|800|02|200|ease|createElement|id|innerHTML|08|settings|version|appendChild|WebkitTransform|amd|MozTransform|object|msTransform|OTransform|indexOf|Perspective|Transform|shift|push|da|string|left|module|charAt|slice|NProgress|break|arguments|else".split("|"),0,{}))},function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n"));r.error(s.join("
"))}catch(e){}return}case 0:return}r.error(a||e.status+" "+n)}},{key:"handleJsonResponse",value:function handleJsonResponse(response,options){var Dcat=this.dcat,data=response.data;if(response){if("object"!==_typeof(response))return Dcat.error("error","Oops!");var then=function then(_then){switch(_then.action){case"refresh":Dcat.reload();break;case"download":window.open(_then.value,"_blank");break;case"redirect":Dcat.reload(_then.value||null);break;case"location":setTimeout((function(){_then.value?window.location=_then.value:window.location.reload()}),1e3);break;case"script":!function(){eval(_then.value)}()}};"string"==typeof response.html&&response.html&&options.target&&("function"==typeof options.html?options.html(options.target,response.html,response):$(target).html(response.html));var message=data.message||response.message;data.type||(data.type=response.status?"success":"error"),"string"==typeof message&&data.type&&message&&(data.alert?Dcat.swal[data.type](message,data.detail):Dcat[data.type](message,null,data.timeout?{timeOut:1e3*data.timeout}:{})),data.then&&then(data.then)}}}]),Ajax}()},,function(e,t,n){e.exports=n(13)},function(module,exports){var module={};eval(function(e,t,n,r,o,a){if(o=function(e){return(e<62?"":o(parseInt(e/62)))+((e%=62)>35?String.fromCharCode(e+29):e.toString(36))},!"".replace(/^/,String)){for(;n--;)a[o(n)]=r[n]||o(n);r=[function(e){return a[e]}],o=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(e=e.replace(new RegExp("\\b"+o(n)+"\\b","g"),r[n]));return e}('!5(e){"5"==W 2y&&2y.6g?2y(["1Z"],e):"44"==W 2E&&2E.3W?2E.3W=5(t,r){6 R 0===r&&(r="6f"!=W Z?3F("1Z"):3F("1Z")(t)),e(r),r}:e(6e)}(5(e){"6d 6a";5 t(t){4 r=t.P;t.67()||(t.5Q(),e(t.1p).30("z").1a(r))}5 r(t){4 r=t.1p,a=e(r);7(!a.3I("[8=U],[8=1N]")){4 n=a.30("[8=U]");7(0===n.B)6;r=n[0]}4 i=r.z;7(i.1n=r,"1N"===r.8)7(R 0!==t.3G)i.1q=t.3G,i.1x=t.5O;16 7("5"==W e.J.42){4 o=a.42();i.1q=t.3g-o.3j,i.1x=t.3l-o.3p}16 i.1q=t.3g-r.5N,i.1x=t.3l-r.5L;1C(5(){i.1n=i.1q=i.1x=Q},2X)}5 a(){7(e.J.1a.3M){4 t="[1Z.z] "+1X.5K.5J.1h(1D,"");Z.2W&&Z.2W.33?Z.2W.33(t):Z.20&&Z.20.3i&&Z.20.3i(t)}}4 n=/\\r?\\n/g,i={};i.2V=R 0!==e(\'<1c 8="29">\').1Q(0).3A,i.3C=R 0!==Z.3E;4 o=!!e.J.2Q;e.J.1s=5(){7(!o)6 3.11.1f(3,1D);4 e=3.2Q.1f(3,1D);6 e&&e.1Z||"1J"==W e?e:3.11.1f(3,1D)},e.J.1a=5(t,r,n,s){5 u(r){4 a,n,i=e.1K(r,t.2O).32("&"),o=i.B,s=[];Y(a=0;a\',k).1z(f.I[c].G).2B(w)[0]):u.H(e(\'<1c 8="2C" 9="\'+c+\'">\',k).1z(f.I[c]).2B(w)[0]));f.2a||h.2B(D),v.34?v.34("35",s):v.36("38",s,!1),1C(t,15);1l{w.U()}1A(e){19.5w("z").U.1f(w)}}5r{w.1F("2c",i),w.1F("2d",o),r?w.1F("1p",r):p.3d("1p"),e(u).3e()}}5 s(t){7(!x.1b&&!X){7((O=n(v))||(a("2N 5q 5p 19"),t=L),t===A&&x)6 x.1m("1k"),R S.1P(x,"1k");7(t===L&&x)6 x.1m("3s 1m"),R S.1P(x,"V","3s 1m");7(O&&O.2A.2z!==f.1T||T){v.3B?v.3B("35",s):v.5o("38",s,!1);4 r,i="K";1l{7(T)5l"1k";4 o="1I"===f.1B||O.2u||e.5h(O);7(a("5g="+o),!o&&Z.20&&(Q===O.1G||!O.1G.3O)&&--C)6 a("49 5e 2t, 2r 2q 5d"),R 1C(s,5c);4 u=O.1G?O.1G:O.2k;x.18=u?u.3O:Q,x.1H=O.2u?O.2u:O,o&&(f.1B="1I"),x.2p=5(e){6{"2n-8":f.1B}[e.1u()]},u&&(x.17=37(u.2h("17"))||x.17,x.1j=u.2h("1j")||x.1j);4 c=(f.1B||"").1u(),l=/(2s|3b|2f)/.1o(c);7(l||f.1w){4 p=O.28("1w")[0];7(p)x.18=p.G,x.17=37(p.2h("17"))||x.17,x.1j=p.2h("1j")||x.1j;16 7(l){4 m=O.28("2w")[0],g=O.28("1G")[0];m?x.18=m.26?m.26:m.3Y:g&&(x.18=g.26?g.26:g.3Y)}}16"1I"===c&&!x.1H&&x.18&&(x.1H=q(x.18));1l{M=N(x,c,f)}1A(e){i="23",x.V=r=e||i}}1A(e){a("V 5a: ",e),i="V",x.V=r=e||i}x.1b&&(a("2g 1b"),i=Q),x.17&&(i=x.17>=58&&x.17<57||4Z===x.17?"K":"V"),"K"===i?(f.K&&f.K.1h(f.12,M,"K",x),S.4Y(x.18,"K",x),d&&e.1v.13("4U",[x,f])):i&&(R 0===r&&(r=x.1j),f.V&&f.V.1h(f.12,x,i,r),S.1P(x,"V",r),d&&e.1v.13("3v",[x,f,r])),d&&e.1v.13("4T",[x,f]),d&&!--e.2F&&e.1v.13("4P"),f.1t&&f.1t.1h(f.12,x,i),X=!0,f.1k&&31(j),1C(5(){f.2a?h.11("2o",f.1T):h.3e(),x.1H=Q},2X)}}}4 u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.4N();7(S.1m=5(e){x.1m(e)},r)Y(c=0;c\',k)).4D({3N:"4C",3p:"-3P",3j:"-3P"}),v=h[0],x={1b:0,18:Q,1H:Q,17:0,1j:"n/a",4z:5(){},2p:5(){},4y:5(){},1m:5(t){4 r="1k"===t?"1k":"1b";a("4x 2g... "+r),3.1b=1;1l{v.1R.19.3R&&v.1R.19.3R("4w")}1A(e){}h.11("2o",f.1T),x.V=r,f.V&&f.V.1h(f.12,x,r,t),d&&e.1v.13("3v",[x,f,r]),f.1t&&f.1t.1h(f.12,x,r)}},(d=f.3T)&&0==e.2F++&&e.1v.13("4v"),d&&e.1v.13("4u",[x,f]),f.2e&&!1===f.2e.1h(f.12,x,f))6 f.3T&&e.2F--,S.1P(),S;7(x.1b)6 S.1P(),S;(y=w.1n)&&(b=y.9)&&!y.1g&&(f.I=f.I||{},f.I[b]=y.G,"1N"===y.8&&(f.I[b+".x"]=w.1q,f.I[b+".y"]=w.1x));4 A=1,L=2,F=e("3Z[9=40-4j]").11("2n"),E=e("3Z[9=40-1K]").11("2n");E&&F&&(f.I=f.I||{},f.I[E]=F),f.4i?i():1C(i,10);4 M,O,X,C=50,q=e.4f||5(e,t){6 Z.46?((t=21 46("4e.5f")).4a="48",t.4b(e)):t=(21 4c).4d(e,"2f/1I"),t&&t.2k&&"23"!==t.2k.47?t:Q},45=e.4g||5(e){6 Z.4h("("+e+")")},N=5(t,r,a){4 n=t.2p("2n-8")||"",i=("1I"===r||!r)&&n.2b("1I")>=0,o=i?t.1H:t.18;6 i&&"23"===o.2k.47&&e.V&&e.V("23"),a&&a.43&&(o=a.43(o,r)),"1J"==W o&&(("2s"===r||!r)&&n.2b("2s")>=0?o=45(o):("3b"===r||!r)&&n.2b("41")>=0&&e.4k(o)),o};6 S}7(!3.B)6 a("1a: 4l U 4m - 4n 4o 1y"),3;4 l,f,d,p=3;"5"==W t?t={K:t}:"1J"==W t||!1===t&&1D.B>0?(t={1d:t,P:r,1B:n},"5"==W s&&(t.K=s)):R 0===t&&(t={}),l=t.2G||t.8||3.1s("2G"),(d=(d="1J"==W(f=t.1d||3.1s("2c"))?e.4p(f):"")||Z.2A.2z||"")&&(d=(d.4q(/^([^#]+)/)||[])[1]),t=e.2M(!0,{1d:d,K:e.1O.K,8:l||e.1O.8,1T:/^4r/i.1o(Z.2A.2z||"")?"41:48":"4s:4t"},t);4 m={};7(3.13("z-2w-3V",[3,t,m]),m.3U)6 a("1a: U 3S 25 z-2w-3V 13"),3;7(t.2U&&!1===t.2U(3,t))6 a("1a: U 1b 25 2U 2t"),3;4 h=t.2O;R 0===h&&(h=e.1O.2O);4 v,g=[],x=3.2T(t.4A,g,t.4B);7(t.P){4 y=e.2S(t.P)?t.P(x):t.P;t.I=y,v=e.1K(y,h)}7(t.2R&&!1===t.2R(x,3,t))6 a("1a: U 1b 25 2R 2t"),3;7(3.13("z-U-3L",[x,3,t,m]),m.3U)6 a("1a: U 3S 25 z-U-3L 13"),3;4 b=e.1K(x,h);v&&(b=b?b+"&"+v:v),"4F"===t.8.4G()?(t.1d+=(t.1d.2b("?")>=0?"&":"?")+b,t.P=Q):t.P=b;4 T=[];7(t.1E&&T.H(5(){p.1E()}),t.2P&&T.H(5(){p.2P(t.4J)}),!t.1B&&t.1p){4 j=t.K||5(){};T.H(5(r,a,n){4 i=1D,o=t.4K?"3H":"4M";e(t.1p)[o](r).1i(5(){j.1f(3,i)})})}16 t.K&&(e.4O(t.K)?e.3y(T,t.K):T.H(t.K));7(t.K=5(e,r,a){Y(4 n=t.12||3,i=0,o=T.B;i0,D="2j/z-P",A=p.11("2d")===D||p.11("2I")===D,L=i.2V&&i.3C;a("4S :"+L);4 F,E=(k||A)&&!L;!1!==t.1U&&(t.1U||E)?t.3w?e.1Q(t.3w,5(){F=c(x)}):F=c(x):F=(k||A)&&L?5(r){Y(4 a=21 3E,n=0;n0)&&(n={1d:n,P:i,1B:o},"5"==W s&&(n.K=s)),n=n||{},n.2i=n.2i&&e.2S(e.J.1V),!n.2i&&0===3.B){4 u={s:3.1M,c:3.12};6!e.3K&&u.s?(a("2r 2q 3J, 5i 2H"),e(5(){e(u.s,u.c).2H(n)}),3):(a("5j; 5k 2v 5m 5n 1M"+(e.3K?"":" (2r 2q 3J)")),3)}6 n.2i?(e(19).2x("U.z-1e",3.1M,t).2x("2l.z-1e",3.1M,r).1V("U.z-1e",3.1M,n,t).1V("2l.z-1e",3.1M,n,r),3):3.3c().1V("U.z-1e",n,t).1V("2l.z-1e",n,r)},e.J.3c=5(){6 3.2x("U.z-1e 2l.z-1e")},e.J.2T=5(t,r,a){4 n=[];7(0===3.B)6 n;4 o,s=3[0],u=3.11("5s"),c=t||R 0===s.2v?s.28("*"):s.2v;7(c&&(c=e.5t(c)),u&&(t||/(5u|5v)\\//.1o(3a.39))&&(o=e(\':1c[z="\'+u+\'"]\').1Q()).B&&(c=(c||[]).5x(o)),!c||!c.B)6 n;e.2S(a)&&(c=e.5y(c,a));4 l,f,d,p,m,h,v;Y(l=0,h=c.B;l=t||n<0||b&&e-f>=i}function k(){var e=Date.now();if(y(e))return w(e);c=g(k,function(e){var n=e-f,r=t-(e-l);return b?Math.min(r,i-n):r}(e))}function w(e){return c=void 0,h&&o?m(e):(o=a=void 0,s)}function x(){var e=Date.now(),n=y(e);if(o=arguments,a=this,l=e,n){if(void 0===c)return v(l);if(b)return c=g(k,t),m(l)}return void 0===c&&(c=g(k,t)),s}return t=+t||0,d=r(u=n),null==u||"object"!==d&&"function"!==d||(p=!!n.leading,i=(b="maxWait"in n)?Math.max(+n.maxWait||0,t):t,h="trailing"in n?!!n.trailing:h),x.cancel=function(){void 0!==c&&clearTimeout(c),f=0,o=l=a=c=void 0},x.flush=function(){return void 0===c?s:w(Date.now())},x.pending=function(){return void 0!==c},x};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;ni?i:t,l=Math.ceil(c*(a/t));l=l>s?s:l,(n=n||e.split("/").pop()).length>50&&(n=n.substr(0,50)+"..."),layer.open({type:1,shade:.2,title:!1,maxmin:!1,shadeClose:!0,closeBtn:2,content:$(o),area:[c+"px",l+"px"],skin:"layui-layer-nobg",end:function(){document.body.removeChild(o)}})},o.onerror=function(){r.loading(!1),r.error(r.lang.trans("no_preview"))}}},{key:"asyncRender",value:function(e,t,n){var r=this.dcat;$.ajax(e).then((function(e){t(r.assets.resolveHtml(e,r.triggerReady).render())}),(function(e,t,o){if(n&&!1===n(e,t,o))return!1;r.handleAjaxError(e,t,o)}))}},{key:"loadFields",value:function(e,t){var n=[],r=[];t.values?"string"==typeof(r=t.values)&&(r=[r]):$(e).find("option:selected").each((function(){("0"===String(this.value)||this.value)&&r.push(this.value)})),r.length&&(t.fields.forEach((function(o,a){var i=$(e).closest(t.group).find("."+t.fields[a]);r.length&&n.push(function(e,n){Dcat.loading(),$.ajax(e).then((function(e){Dcat.loading(!1),n.find("option").remove(),$.map(e,(function(e){n.append(new Option(e[t.textField],e[t.idField],!1,!1))})),$(n).val(String(n.data("value")).split(",")).trigger("change")}))}(t.urls[a]+(t.urls[a].match(/\?/)?"&":"?")+"q="+r.join(","),i))})),$.when(n).then((function(){})))}}])&&i(t.prototype,n),r&&i(t,r),e}();function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n {message}
',redirect:!0,autoRemoveError:!0,before:function(){},after:function(){},success:function(){},error:function(){}},t),this.originalValues={},this.$form=$(this.options.form).first(),this._errColumns={},this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e=this,t=e.options.confirm;if(!t.title)return e.submit();Dcat.confirm(t.title,t.content,(function(){e.submit()}))}},{key:"submit",value:function(){var e=this,t=e.$form,n=e.options,r=t.find('[type="submit"],.submit');e.removeErrors(),t.ajaxSubmit({data:{_token:Dcat.token},beforeSubmit:function(o,a,i){return!1!==n.before(o,a,i,e)&&!1!==U(H.before,o,a,i,e)&&!(n.validate&&(t.validator("validate"),t.find("."+n.errorClass).length>0))&&void r.buttonLoading()},success:function(t){setTimeout((function(){r.buttonLoading(!1)}),700),!1!==n.after(!0,t,e)&&!1!==n.success(t,e)&&!1!==U(H.success,t,e)&&(!1!==t.redirect&&n.redirect||t.data&&t.data.then&&(delete t.data.then,delete t.data.then,delete t.data.then),Dcat.handleJsonResponse(t))},error:function(o){if(r.buttonLoading(!1),!1!==n.after(!1,o,e)&&!1!==n.error(o,e)&&!1!==U(H.error,o,e))try{var a,i=JSON.parse(o.responseText);if(422!=o.status||!i||!Dcat.helpers.isset(i,"errors")){var s=o.responseJSON;return s&&s.message?Dcat.error(s.message):Dcat.error(o.status+" "+o.statusText)}for(a in i=i.errors,i)e._errColumns[a]=e.showError(t,a,i[a])}catch(e){return Dcat.error(o.status+" "+o.statusText)}}})}},{key:"showError",value:function(e,t,n){var r=this,o=r.queryFieldByName(e,t),a=o.closest(r.options.groupSelector);if(G(r,o).removeClass("d-none"),r.originalValues[t]=r.getFieldValue(o),o)return function(e){for(var t in a.addClass(r.options.errorClass),"string"==typeof e&&(e=[e]),e)a.find(r.options.errorContainerSelector).first().append(r.options.errorTemplate.replace("{message}",e[t]));r.options.validationErrorToastr&&Dcat.error(e.join("
"))}(n),r.options.autoRemoveError&&function(e,t,n){var r=function(){e.removeError(t,n)};t.one("change",r),t.off("blur",r).on("blur",(function(){e.isValueChanged(t,n)&&r()})),function o(){setTimeout((function(){if(t.length)return e.isValueChanged(t,n)?r():void o()}),500)}()}(r,o,t),o;Dcat.helpers.len(n)&&n.length&&Dcat.error(n.join(" \n "))}},{key:"getFieldValue",value:function(e){var t,n=[],r=e.attr("type"),o="checkbox"===r||"radio"===r;for(t=0;t")}function G(e,t){return N(e,t).find(".has-tab-error")}function U(e){var t,n,r,o=arguments,a=[];for(n in delete o[0],o=o||[])a.push(o[n]);for(t in e)if(!1===(r=e[t].apply(e[t],a)))return r}F.submitting=function(e){return"function"==typeof e&&H.before.push(e),this},F.submitted=function(e,t){return"function"==typeof e&&H.success.push(e),"function"==typeof t&&H.error.push(t),this},$.fn.form=function(e){var t=$(this);e=$.extend(e,{form:t}),t.on("submit",(function(){return!1})),t.find('[type="submit"],.submit').click((function(t){return Dcat.Form(e),!1}))};var J=F;function K(e,t){for(var n=0;n0)return!1;e.submitting=1,r.buttonLoading()},after:function(o,a){if(r.buttonLoading(!1),e.submitting=0,!1===t.saved(o,a))return!1;if(!o)return t.error(o,a);if(a.status){var i=t.success(o,a);return e._destroy(n),i}return t.error(o,a)}}),!1}}])&&K(t.prototype,n),r&&K(t,r),e}();function Q(e,t){for(var n=0;n'],X=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=$.extend({container:t.config.pjax_container_selector,zIndex:100,width:"52px",color:t.color.dark60,background:"#fff",style:"",svg:W[0]},n);this.$container=$(n.container),$('
{svg}
'.replace("{svg}",n.svg).replace("{color}",n.color).replace("{color}",n.color).replace("{width}",n.width).replace("{style}","".concat("position:absolute;","background:").concat(n.background,";z-index:").concat(n.zIndex,";").concat(n.style))).appendTo(this.$container)}var t,n,r;return t=e,(n=[{key:"destroy",value:function(){this.$container.find(".dcat-loading").remove()}}])&&Q(t.prototype,n),r&&Q(t,r),e}();function Y(){$(".dcat-loading").remove()}var Z=function(e){e.loading=function(e){if(!1===e)return setTimeout(Y,70);e=$.extend({zIndex:999991014,width:"58px",shade:"rgba(255, 255, 255, 0.1)",background:"transparent",top:200,svg:W[0]},e);var t=$(window),n=$('
'),r=$('
');function o(){n.css({left:(t.width()-300)/2,top:(t.height()-e.top)/2})}n.appendTo("body"),e.shade&&r.appendTo("body"),t.on("resize",o),o(),n.loading(e)},$.fn.loading=function(t){return!1===t?$(this).find(".dcat-loading").remove():((t=t||{}).container=$(this),new X(e,t))},$.fn.buttonLoading=function(t){var n,r=$(this),o=r.attr("data-loading");if(!1===t)return o?(r.find(".waves-ripple").remove(),r.removeClass("disabled btn-loading waves-effect").removeAttr("disabled").removeAttr("data-loading").html(r.find("."+o).html())):r;if(o)return r;n=r.html(),o="ld-"+e.helpers.random();var a='',i=["btn","layui-layer-btn0","layui-layer-btn1"];for(var s in i)r.hasClass(i[s])&&(a=W[0].replace("{color}","currentColor").replace("{width}","50px;height:11px;"));return r.addClass("disabled btn-loading").attr("disabled",!0).attr("data-loading",o).html('\n\n").concat(a,"\n"))}};function ee(e,t){for(var n=0;n\n
\n'.replace("{id}",r.id).replace("{class}",r.options.class||"")),r.$container.appendTo("body"),r.$container.find(".slider-content").append(r.$target),new PerfectScrollbar("#".concat(r.id," .slider-content")),r.options.autoDestory&&t.onPjaxComplete((function(){r.destroy()}))}var t,n,r;return t=e,(n=[{key:"open",value:function(){this.$container.addClass("open")}},{key:"close",value:function(){this.$container.removeClass("open")}},{key:"toggle",value:function(){this.$container.toggleClass("open")}},{key:"destroy",value:function(){this.$container.remove()}}])&&ne(t.prototype,n),r&&ne(t,r),e}();function oe(e,t){for(var n=0;n255?255:e<0?0:e};t=t||0;var r=parseInt(e,16);return[n((r>>16)+t),n((r>>8&255)+t),n((255&r)+t)]}}])&&oe(t.prototype,n),r&&oe(t,r),e}();function ie(e,t){for(var n=0;n400?$(".scroll-top").fadeIn():$(".scroll-top").fadeOut()})),$(".scroll-top").click((function(){$("html, body").animate({scrollTop:0},1e3)}))}}])&&fe(t.prototype,n),r&&fe(t,r),e}();function be(e,t){for(var n=0;n35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('!14(t,e){\"4o\"==1A ac&&\"3d\"!=1A a7?a7.ac=e():\"14\"==1A 83&&83.ep?83(e):t.7V=e()}(1d,14(){\"8G eo\";14 f(t){17(f=\"14\"==1A 5i&&\"ag\"==1A 5i.en?14(t){17 1A t}:14(t){17 t&&\"14\"==1A 5i&&t.5Q===5i&&t!==5i.3b?\"ag\":1A t})(t)}14 o(t,e){1w(!(t 7P e))7K 2M 8i(\"ek 4A a 1j as a 14\")}14 i(t,e){2g(18 n=0;n\\\\n <1H 1j=\"\\').1n(k.4O,\\'\">\\\\n \\\\n <1H 1j=\"\\').1n(k.1r,\" \").1n(B.2n,\\'\">\\\\n <34 1j=\"13-x-2V\"><34 1j=\"13-x-2V-1o-1g\"><34 1j=\"13-x-2V-1o-1k\">\\\\n \\\\n <1H 1j=\"\\').1n(k.1r,\" \").1n(B.4q,\\'\">\\\\n <1H 1j=\"\\').1n(k.1r,\" \").1n(B.5J,\\'\">\\\\n <1H 1j=\"\\').1n(k.1r,\" \").1n(B.5I,\\'\">\\\\n <1H 1j=\"\\').1n(k.1r,\" \").1n(B.1f,\\'\">\\\\n <1H 1j=\"13-1f-35-1o-1g\">\\\\n <34 1j=\"13-1f-1o-3h\"> <34 1j=\"13-1f-1o-3c\">\\\\n <1H 1j=\"13-1f-6G\"> <1H 1j=\"13-1f-6F\">\\\\n <1H 1j=\"13-1f-35-1o-1k\">\\\\n \\\\n \\\\n <8k 1j=\"\\').1n(k.2I,\\'\" 55=\"\\').1n(k.2I,\\'\">\\\\n <3y 1U=\"3y\" 1j=\"\\').1n(k.3e,\\'\">&d3;\\\\n \\\\n <1H 1j=\"\\').1n(k.1z,\\'\">\\\\n <1H 55=\"\\').1n(k.1z,\\'\">\\\\n <1i 1j=\"\\').1n(k.1i,\\'\" />\\\\n <1i 1U=\"2l\" 1j=\"\\').1n(k.2l,\\'\" />\\\\n <1H 1j=\"\\').1n(k.2s,\\'\">\\\\n <1i 1U=\"2s\" />\\\\n <46>\\\\n \\\\n <2b 1j=\"\\').1n(k.2b,\\'\">\\\\n <1H 1j=\"\\').1n(k.2v,\\'\">\\\\n <3E 2g=\"\\').1n(k.2A,\\'\" 1j=\"\\').1n(k.2A,\\'\">\\\\n <1i 1U=\"2A\" />\\\\n <34 1j=\"\\').1n(k.3E,\\'\">\\\\n \\\\n <2h 1j=\"\\').1n(k.2h,\\'\">\\\\n <1H 1j=\"\\').1n(k[\"4h-4l\"],\\'\" 55=\"\\').1n(k[\"4h-4l\"],\\'\">\\\\n \\\\n <1H 1j=\"\\').1n(k.2F,\\'\">\\\\n <3y 1U=\"3y\" 1j=\"\\').1n(k.4n,\\'\">8t\\\\n <3y 1U=\"3y\" 1j=\"\\').1n(k.3N,\\'\">8x\\\\n \\\\n <1H 1j=\"\\').1n(k.3C,\\'\">\\\\n \\\\n \\\\n\\').d2(/(^|\\\\n)\\\\s*/g,\"\"),ct=14(t){1w(14(){18 t=q();t&&(t.3I.7D(t),3U([1m.5a,1m.1e],[k[\"26-1P\"],k[\"1b-1q\"],k[\"d1-1R\"]]))}(),X())g(\"6Y 7H 1m 3S d0\");3m{18 e=1m.3A(\"1H\");e.4F=k.1h,e.38=9T;18 n=14(t){17\"3a\"==1A t?1m.2T(t):t}(t.29);n.37(e),14(t){18 e=2K();e.2P(\"cZ\",t.1b?\"cY\":\"9e\"),e.2P(\"2o-cX\",t.1b?\"cW\":\"cV\"),t.1b||e.2P(\"2o-3M\",\"4M\")}(t),14(t){\"6M\"===22.4U(t).4k&&1V(q(),k.6M)}(n),14(){18 t=U(),e=2y(t,k.1i),n=2y(t,k.2l),o=t.2T(\".\".1n(k.2s,\" 1i\")),i=t.2T(\".\".1n(k.2s,\" 46\")),r=2y(t,k.2b),a=t.2T(\".\".1n(k.2A,\" 1i\")),s=2y(t,k.2h);e.7N=G,n.5R=G,r.5R=G,a.5R=G,s.7N=G,o.7N=14(t){G(t),i.1K=o.1K},o.5R=14(t){G(t),o.cU.1K=o.1K}}()}},9w=14(t,e){1w(t.38=\"\",0 2O e)2g(18 n=0;n 2O e;n++)t.37(e[n].9B(!0));3m t.37(e.9B(!0))},dt=14(){1w(X())17!1;18 t=1m.3A(\"1H\"),e={cT:\"cS\",cR:\"cQ cP\",1L:\"cO\"};2g(18 n 2O e)1w(e.6I(n)&&3l 0!==t.1I[n])17 e[n];17!1}();14 7R(t,e,n){M(t,n[\"cN\"+e.cM(1)+\"ad\"],\"6t-4b\"),t.38=n[e+\"cL\"],t.2P(\"2o-3E\",n[e+\"cK\"]),t.4F=k[e],b(t,n.2i,e+\"ad\"),1V(t,n[e+\"cJ\"])}14 8c(t,e){18 n=Z(),o=K(),i=F();e.5f||e.5e?T(n):O(n),b(n,e.2i,\"2F\"),7R(o,\"4n\",e),7R(i,\"3N\",e),e.7X?14(t,e,n){1V([t,e],k.2J),n.5N&&(t.1I.5E=n.5N),n.6N&&(e.1I.5E=n.6N);18 o=22.4U(t).4v(\"1J-1u\");t.1I.82=o,t.1I.7Z=o}(o,i,e):(3U([o,i],k.2J),o.1I.5E=o.1I.82=o.1I.7Z=\"\",i.1I.5E=i.1I.82=i.1I.7Z=\"\")}14 8C(t,e){18 n=q();n&&(14(t,e){\"3a\"==1A e?t.1I.1J=e:e||1V([1m.5a,1m.1e],k[\"26-1P\"])}(n,e.1P),!e.1P&&e.5y&&y(\\'\"5y\" 42 7H `1P` 42 3S be 43 3S `4M`\\'),14(t,e){e 2O k?1V(t,k[e]):(y(\\'8H \"2G\" 42 53 1M 8K, 8L 3S \"1l\"\\'),1V(t,k.1l))}(n,e.2G),14(t,e){1w(e&&\"3a\"==1A e){18 n=\"1Y-\"+e;n 2O k&&1V(t,k[n])}}(n,e.1Y),b(n,e.2i,\"1h\"),e.6j&&1V(n,e.6j))}14 6m(t,e){t.2E&&!e.4Y||(t.2E=e.4Y)}18 bb={5g:2M 5h,3k:2M 5h,3R:2M 5h},96=14(t,e){18 n=P(U(),t);1w(n)2g(18 o 2O 14(t){2g(18 e=0;e=i.2W.23&&y(\"6E 56 42, 2y a9 be cG cF 2W.23 (56 cE cD cC cA 86 0)\"),i.2W.2S(14(t,e){18 n=14(t){18 e=1m.3A(\"7z\");17 1V(e,k[\"25-2D\"]),e.38=t,e}(t);1w(r.37(n),e===a&&1V(n,k[\"3V-25-2D\"]),e!==i.2W.23-1){18 o=14(t){18 e=1m.3A(\"7z\");17 1V(e,k[\"25-2D-1o\"]),t.7y&&(e.1I.1c=t.7y),e}(t);r.37(o)}})}14 8a(t,e){18 n=Q();b(n,e.2i,\"4O\"),7E(0,e),14(t,e){18 n=bb.3k.2k(t);1w(n&&e.1U===n.1U&&N())b(N(),e.2i,\"1r\");3m 1w(bc(),e.1U)1w(8b(),-1!==2d.57(B).3t(e.1U)){18 o=H(\".\".1n(k.1r,\".\").1n(B[e.1U]));T(o),b(o,e.2i,\"1r\"),L(o,\"13-1Q-\".1n(e.1U,\"-1r\"),e.1L)}3m g(\\'8e 1U! 5k \"1f\", \"2n\", \"5J\", \"5I\" 5l \"4q\", 5m \"\\'.1n(e.1U,\\'\"\\'))}(t,e),14(t,e){18 n=4L();1w(!e.5P)17 O(n);T(n),n.2P(\"8h\",e.5P),n.2P(\"cz\",e.7w),E(n,\"1c\",e.7u),E(n,\"1E\",e.8l),n.4F=k.4e,b(n,e.2i,\"4e\"),e.5u&&1V(n,e.5u)}(0,e),14(t,e){18 n=D();M(n,e.2I||e.5v),e.2I&&5W(e.2I,n),e.5v&&(n.8q=e.5v),b(n,e.2i,\"2I\")}(0,e),14(t,e){18 n=$();b(n,e.2i,\"7s\"),M(n,e.5U),n.2P(\"2o-3E\",e.8u)}(0,e)}14 7r(t,e){!14(t,e){18 n=2K();E(n,\"1c\",e.1c),E(n,\"2e\",e.2e),e.1J&&(n.1I.1J=e.1J),n.4F=k.1t,e.1b?(1V([1m.5a,1m.1e],k[\"1b-1q\"]),1V(n,k.1b)):1V(n,k.3M),b(n,e.2i,\"1t\"),\"3a\"==1A e.2i&&1V(n,e.2i),L(n,k.6Q,!e.1L)}(0,e),8C(0,e),8a(t,e),9K(t,e),8c(0,e),14(t,e){18 n=Y();M(n,e.3C),e.3C&&5W(e.3C,n),b(n,e.2i,\"3C\")}(0,e)}18 bc=14(){2g(18 t=R(),e=0;e22.bW&&(x.4B=4C(22.4U(1m.1e).4v(\"2e-1k\")),1m.1e.1I.8y=x.4B+14(){1w(\"8z\"2O 22||8A.bV)17 0;18 t=1m.3A(\"1H\");t.1I.1c=\"8B\",t.1I.1E=\"8B\",t.1I.3T=\"8D\",1m.1e.37(t);18 e=t.8m-t.bU;17 1m.1e.7D(t),e}()+\"6y\")}14 73(){17!!22.bT&&!!1m.bS}14 6r(){18 t=q(),e=2K();t.1I.aa(\"1S-2f\"),e.bR<0&&(t.1I.bQ=\"1C-1O\")}18 be=14(){1B!==x.4B&&(1m.1e.1I.8y=x.4B+\"6y\",x.4B=1B)},8M=14(){18 e,n=q();n.8z=14(t){e=t.29===n||!14(t){17!!(t.8w>t.bP)}(n)&&\"bO\"!==t.29.bN},n.bM=14(t){e&&(t.6h(),t.7d())}},8S=14(){1w(S(1m.1e,k.5L)){18 t=4C(1m.1e.1I.19,10);3U(1m.1e,k.5L),1m.1e.1I.19=\"\",1m.1e.6g=-1*t}},8U=14(){\"3d\"!=1A 22&&73()&&22.6f(\"8W\",6r)},8X=14(){m(1m.1e.8Y).2S(14(t){t.6V(\"3D-6e-2o-2L\")?(t.2P(\"2o-2L\",t.4W(\"3D-6e-2o-2L\")),t.3O(\"3D-6e-2o-2L\")):t.3O(\"2o-2L\")})},6c={7i:2M 5h};14 7j(t,e,n){e?$t(n):(8N().3G(14(){17 $t(n)}),1y.4G.6f(\"7l\",1y.5A,{7n:1y.41}),1y.64=!1),5z 1y.5A,5z 1y.4G,t.3I&&t.3I.7D(t),3U([1m.5a,1m.1e],[k.1q,k[\"1E-1D\"],k[\"26-1P\"],k[\"1b-1q\"],k[\"1b-1R\"]]),at()&&(be(),8S(),8U(),8X())}14 5c(t){18 e=q(),n=2K();1w(n&&!S(n,k.30)){18 o=bb.3k.2k(1d),i=6c.7i.2k(1d),r=o.9q,a=o.9o;3U(n,k.31),1V(n,k.30),dt&&j(n)?n.60(dt,14(t){t.29===n&&14(t,e,n,o){S(t,k.30)&&7j(e,n,o),bf(bb),bf(6c)}(n,e,5p(),a)}):7j(e,5p(),a),1B!==r&&\"14\"==1A r&&r(n),i(t||{}),5z 1d.49}}18 bf=14(t){2g(18 e 2O t)t[e]=2M 5h},$t=14(t){1B!==t&&\"14\"==1A t&&59(14(){t()})};14 5w(t,e,n){18 o=bb.3R.2k(t);e.2S(14(t){o[t].2Q=n})}14 7t(t,e){1w(!t)17!1;1w(\"2v\"===t.1U)2g(18 n=t.3I.3I.4w(\"1i\"),o=0;o\"));18 t=2K(),n=\"3a\"==1A e.29?1m.2T(e.29):e.29;(!t||t&&n&&t.3I!==n.3I)&&ct(e)}(l),2d.5F(l),1y.2U&&(1y.2U.4X(),5z 1y.2U),9j(1y.8P);18 d={1t:2K(),1h:q(),1z:U(),2F:Z(),2N:K(),3o:F(),7s:$(),3j:W(),2W:z()};bb.3R.43(1d,d),7r(1d,l),bb.3k.43(1d,l);18 p=1d.5Q;17 2M 36(14(t){14 n(t){c.7S({1K:t})}14 s(t){c.7S({6T:t})}6c.7i.43(c,t),l.4H&&(1y.2U=2M bg(14(){s(\"4H\"),5z 1y.2U},l.4H));l.1i&&59(14(){18 t=c.3x();t&&A(t)},0);2g(18 u=14(e){(l.6l&&p.8f(),l.4T)?(c.5Z(),36.4y().3G(14(){17 l.4T(e,l.3j)}).3G(14(t){V(d.3j)||!1===t?c.4D():n(3l 0===t?e:t)})):n(e)},e=14(t){18 e=t.29,n=d.2N,o=d.3o,i=n&&(n===e||n.3X(e)),r=o&&(o===e||o.3X(e));5H(t.1U){3i\"75\":1w(i)1w(c.7U(),l.1i){18 a=14(){18 t=c.3x();1w(!t)17 1B;5H(l.1i){3i\"2A\":17 t.5G?1:0;3i\"2v\":17 t.5G?t.1K:1B;3i\"2l\":17 t.ae.23?t.ae[0]:1B;4r:17 l.9k?t.1K.aw():t.1K}}();1w(l.5D)c.9W(),36.4y().3G(14(){17 l.5D(a,l.3j)}).3G(14(t){c.6H(),c.9V(),t?c.7W(t):u(a)});3m c.3x().ax()?u(a):(c.6H(),c.7W(l.3j))}3m u(!0);3m r&&(c.7U(),s(p.4S.3N))}},o=d.1t.4w(\"3y\"),i=0;i.13-3M{2r-3H:0 0 d6 3B(0,0,0,.4)}1e.13-26-1P .13-1q.13-19{19:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-19-1g,1e.13-26-1P .13-1q.13-19-1O{19:0;1g:0}1e.13-26-1P .13-1q.13-19-27,1e.13-26-1P .13-1q.13-19-1k{19:0;1k:0}1e.13-26-1P .13-1q.13-1l{19:50%;1g:50%;-1a-16:6w(-50%,-50%);16:6w(-50%,-50%)}1e.13-26-1P .13-1q.13-1l-1g,1e.13-26-1P .13-1q.13-1l-1O{19:50%;1g:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1l-27,1e.13-26-1P .13-1q.13-1l-1k{19:50%;1k:0;-1a-16:28(-50%);16:28(-50%)}1e.13-26-1P .13-1q.13-1v{1v:0;1g:50%;-1a-16:4c(-50%);16:4c(-50%)}1e.13-26-1P .13-1q.13-1v-1g,1e.13-26-1P .13-1q.13-1v-1O{1v:0;1g:0}1e.13-26-1P .13-1q.13-1v-27,1e.13-26-1P .13-1q.13-1v-1k{1k:0;1v:0}.13-1h{2B:1C;2G:d7;z-3Z:d9;19:0;1k:0;1v:0;1g:0;1C-4k:5M;1S-2f:1l;2p-1z:1l;2e:.1W;3T-x:2L;1J-1u:3v;-1a-3T-da:db}.13-1h.13-19{1S-2f:1C-1O}.13-1h.13-19-1g,.13-1h.13-19-1O{1S-2f:1C-1O;2p-1z:1C-1O}.13-1h.13-19-27,.13-1h.13-19-1k{1S-2f:1C-1O;2p-1z:1C-27}.13-1h.13-1l{1S-2f:1l}.13-1h.13-1l-1g,.13-1h.13-1l-1O{1S-2f:1l;2p-1z:1C-1O}.13-1h.13-1l-27,.13-1h.13-1l-1k{1S-2f:1l;2p-1z:1C-27}.13-1h.13-1v{1S-2f:1C-27}.13-1h.13-1v-1g,.13-1h.13-1v-1O{1S-2f:1C-27;2p-1z:1C-1O}.13-1h.13-1v-27,.13-1h.13-1v-1k{1S-2f:1C-27;2p-1z:1C-27}.13-1h.13-1v-27>:4P-4Q,.13-1h.13-1v-1g>:4P-4Q,.13-1h.13-1v-1k>:4P-4Q,.13-1h.13-1v-1O>:4P-4Q,.13-1h.13-1v>:4P-4Q{1N-19:1D}.13-1h.13-1Y-6S>.13-3M{2B:1C!3f;1C:1;1S-9M:72;2p-1z:1l}.13-1h.13-1Y-5M>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h.13-1Y-1R{1C:1;1C-4k:1R}.13-1h.13-1Y-1R.13-1v,.13-1h.13-1Y-1R.13-1l,.13-1h.13-1Y-1R.13-19{1S-2f:1l}.13-1h.13-1Y-1R.13-1v-1g,.13-1h.13-1Y-1R.13-1v-1O,.13-1h.13-1Y-1R.13-1l-1g,.13-1h.13-1Y-1R.13-1l-1O,.13-1h.13-1Y-1R.13-19-1g,.13-1h.13-1Y-1R.13-19-1O{1S-2f:1C-1O}.13-1h.13-1Y-1R.13-1v-27,.13-1h.13-1Y-1R.13-1v-1k,.13-1h.13-1Y-1R.13-1l-27,.13-1h.13-1Y-1R.13-1l-1k,.13-1h.13-1Y-1R.13-19-27,.13-1h.13-1Y-1R.13-19-1k{1S-2f:1C-27}.13-1h.13-1Y-1R>.13-3M{2B:1C!3f;1C:1;1S-1z:1l;2p-1z:1l}.13-1h:1M(.13-19):1M(.13-19-1O):1M(.13-19-27):1M(.13-19-1g):1M(.13-19-1k):1M(.13-1l-1O):1M(.13-1l-27):1M(.13-1l-1g):1M(.13-1l-1k):1M(.13-1v):1M(.13-1v-1O):1M(.13-1v-27):1M(.13-1v-1g):1M(.13-1v-1k):1M(.13-1Y-6S)>.13-3M{1N:1D}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-1h .13-3M{1N:0!3f}}.13-1h.13-6R{6u:1J-1u .1s}.13-1h.13-1q{1J-1u:3B(0,0,0,.4)}.13-1t{2B:1Z;2G:5o;2r-5r:1x-2r;1C-4k:1R;2p-1z:1l;1c:de;4K-1c:1F%;2e:1.2x;1x:1Z;1x-2w:.2C;1J:#3Q;1T-8Z:3z;1T-2j:dh}.13-1t:2c{5B:0}.13-1t.13-2u{3T-y:2L}.13-4O{2B:1C;1C-4k:1R;1S-2f:1l}.13-2I{2G:5o;4K-1c:1F%;1N:0 0 .4u;2e:0;1u:#dj;1T-2j:1.3p;1T-3Y:69;3g-1S:1l;3g-16:1Z;6a-6d:4I-6a}.13-2F{z-3Z:1;1C-6d:6d;1S-2f:1l;2p-1z:1l;1c:1F%;1N:1.2x 1D 0}.13-2F:1M(.13-2u) .13-2J[2Q]{2z:.4}.13-2F:1M(.13-2u) .13-2J:8j{1J-4e:4R-8s(3B(0,0,0,.1),3B(0,0,0,.1))}.13-2F:1M(.13-2u) .13-2J:3V{1J-4e:4R-8s(3B(0,0,0,.2),3B(0,0,0,.2))}.13-2F.13-2u .13-2J.13-4n{2r-5r:1x-2r;1c:2.21;1E:2.21;1N:.dq;2e:0;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:.2x 44 3v;1x-2w:1F%;1x-1u:3v;1J-1u:3v!3f;1u:3v;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-2F.13-2u .13-2J.13-3N{1N-1k:9R;1N-1g:9R}.13-2F.13-2u :1M(.13-2J).13-4n::dA{1z:\\\\\"\\\\\";2B:6t-4b;1c:9L;1E:9L;1N-1g:dC;-1a-1L:13-1p-2u 1.5s 4R 6z 6v 4x;1L:13-1p-2u 1.5s 4R 6z 6v 4x;1x:9m 44 #dE;1x-2w:50%;1x-1k-1u:3v;2r-3H:3K 3K 3K #3Q}.13-2J{1N:.2C;2e:.1W 2q;2r-3H:1Z;1T-3Y:dG}.13-2J:1M([2Q]){6s:8g}.13-2J.13-4n{1x:0;1x-2w:.2x;1J:77;1J-1u:#6k;1u:#3Q;1T-2j:1.32}.13-2J.13-3N{1x:0;1x-2w:.2x;1J:77;1J-1u:#dK;1u:#3Q;1T-2j:1.32}.13-2J:2c{5B:0;2r-3H:0 0 0 79 #3Q,0 0 0 dM 3B(50,1F,7T,.4)}.13-2J::-4s-2c-dN{1x:0}.13-3C{2p-1z:1l;1N:1.2x 0 0;2e:3w 0 0;1x-19:3K 44 #dO;1u:#9X;1T-2j:3w}.13-4e{4K-1c:1F%;1N:1.2x 1D}.13-3e{2G:4p;19:0;1k:0;2p-1z:1l;1c:1.2q;1E:1.2q;2e:0;3T:2L;6u:1u .1s 7g-dR;1x:1Z;1x-2w:0;5B:77;1J:0 0;1u:#4V;1T-8Z:dT;1T-2j:2.21;1o-1E:1.2;6s:8g}.13-3e:8j{-1a-16:1Z;16:1Z;1J:0 0;1u:#5b}.13-1z{z-3Z:1;2p-1z:1l;1N:0;2e:0;1u:#9X;1T-2j:1.2m;1T-3Y:87;1o-1E:4x;6a-6d:4I-6a}#13-1z{3g-1S:1l}.13-2A,.13-2l,.13-1i,.13-2v,.13-2b,.13-2h{1N:3w 1D}.13-2l,.13-1i,.13-2h{2r-5r:1x-2r;1c:1F%;6u:1x-1u .3s,2r-3H .3s;1x:3K 44 #9t;1x-2w:.39;1J:3z;2r-3H:dX 0 3K 3K 3B(0,0,0,.dY);1u:3z;1T-2j:1.2m}.13-2l.13-4N,.13-1i.13-4N,.13-2h.13-4N{1x-1u:#5b!3f;2r-3H:0 0 79 #5b!3f}.13-2l:2c,.13-1i:2c,.13-2h:2c{1x:3K 44 #dZ;5B:0;2r-3H:0 0 9m #e0}.13-2l::-1a-1i-2E,.13-1i::-1a-1i-2E,.13-2h::-1a-1i-2E{1u:#4V}.13-2l::-4s-2E,.13-1i::-4s-2E,.13-2h::-4s-2E{1u:#4V}.13-2l:-2Z-1i-2E,.13-1i:-2Z-1i-2E,.13-2h:-2Z-1i-2E{1u:#4V}.13-2l::-2Z-1i-2E,.13-1i::-2Z-1i-2E,.13-2h::-2Z-1i-2E{1u:#4V}.13-2l::2E,.13-1i::2E,.13-2h::2E{1u:#4V}.13-2s{1N:3w 1D;1J:3z}.13-2s 1i{1c:80%}.13-2s 46{1c:20%;1u:3z;1T-3Y:69;3g-1S:1l}.13-2s 1i,.13-2s 46{1E:2.1W;2e:0;1T-2j:1.2m;1o-1E:2.1W}.13-1i{1E:2.1W;2e:0 .2X}.13-1i[1U=4d]{4K-1c:e2}.13-2l{1J:3z;1T-2j:1.2m}.13-2h{1E:6.2X;2e:.2X}.13-2b{7m-1c:50%;4K-1c:1F%;2e:.2H .1W;1J:3z;1u:3z;1T-2j:1.2m}.13-2A,.13-2v{1S-2f:1l;2p-1z:1l;1J:3z;1u:3z}.13-2A 3E,.13-2v 3E{1N:0 .78;1T-2j:1.2m}.13-2A 1i,.13-2v 1i{1N:0 .4u}.13-4h-4l{2B:1Z;1S-2f:1l;2p-1z:1l;2e:.1W;3T:2L;1J:#e3;1u:#e4;1T-2j:3w;1T-3Y:87}.13-4h-4l::4j{1z:\\\\\"!\\\\\";2B:6t-4b;1c:1.21;7m-1c:1.21;1E:1.21;1N:0 .1W;8T:4x;1x-2w:50%;1J-1u:#5b;1u:#3Q;1T-3Y:69;1o-1E:1.21;3g-1S:1l}@e5 (-2Z-e6:4M){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@6J 7C 6q (-2Z-51-52:1Z),(-2Z-51-52:3V){.13-2s 1i{1c:1F%!3f}.13-2s 46{2B:1Z}}@-4s-1m 62-e7(){.13-3e:2c{5B:79 44 3B(50,1F,7T,.4)}}.13-1r{2G:5o;2r-5r:1z-2r;2p-1z:1l;1c:21;1E:21;1N:1.2x 1D 1.3p;8T:4x;1x:.2x 44 3v;1x-2w:50%;1o-1E:21;6s:4r;-1a-4a-2b:1Z;-4s-4a-2b:1Z;-2Z-4a-2b:1Z;4a-2b:1Z}.13-1r::4j{2B:1C;1S-2f:1l;1E:92%;1T-2j:3.2X}.13-1r.13-2n{1x-1u:#5b}.13-1r.13-2n .13-x-2V{2G:5o;1C-1Y:1}.13-1r.13-2n [1j^=13-x-2V-1o]{2B:4b;2G:4p;19:2.2C;1c:2.3q;1E:.2C;1x-2w:.2m;1J-1u:#5b}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1g]{1g:1.32;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-2n [1j^=13-x-2V-1o][1j$=1k]{1k:3w;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-5J{1x-1u:#e8;1u:#e9}.13-1r.13-5J::4j{1z:\\\\\"!\\\\\"}.13-1r.13-5I{1x-1u:#ea;1u:#eb}.13-1r.13-5I::4j{1z:\\\\\"i\\\\\"}.13-1r.13-4q{1x-1u:#ec;1u:#ed}.13-1r.13-4q::4j{1z:\\\\\"?\\\\\"}.13-1r.13-4q.13-ef-4q-2V::4j{1z:\\\\\"؟\\\\\"}.13-1r.13-1f{1x-1u:#7Q}.13-1r.13-1f [1j^=13-1f-35-1o]{2G:4p;1c:3.2X;1E:7.21;-1a-16:1p(1X);16:1p(1X);1x-2w:50%}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1g]{19:-.4J;1g:-2.eg;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:3.2X 3.2X;16-4m:3.2X 3.2X;1x-2w:7.21 0 0 7.21}.13-1r.13-1f [1j^=13-1f-35-1o][1j$=1k]{19:-.9H;1g:1.3p;-1a-16:1p(-1X);16:1p(-1X);-1a-16-4m:0 3.2X;16-4m:0 3.2X;1x-2w:0 7.21 7.21 0}.13-1r.13-1f .13-1f-6G{2G:4p;z-3Z:2;19:-.2x;1g:-.2x;2r-5r:1z-2r;1c:1F%;1E:1F%;1x:.2x 44 3B(eh,ei,ej,.3);1x-2w:50%}.13-1r.13-1f .13-1f-6F{2G:4p;z-3Z:1;19:.21;1g:1.1W;1c:.4J;1E:5.1W;-1a-16:1p(-1X);16:1p(-1X)}.13-1r.13-1f [1j^=13-1f-1o]{2B:4b;2G:4p;z-3Z:2;1E:.2C;1x-2w:.2m;1J-1u:#7Q}.13-1r.13-1f [1j^=13-1f-1o][1j$=3h]{19:2.3p;1g:.3p;1c:1.5K;-1a-16:1p(1X);16:1p(1X)}.13-1r.13-1f [1j^=13-1f-1o][1j$=3c]{19:2.2H;1k:.21;1c:2.3q;-1a-16:1p(-1X);16:1p(-1X)}.13-25-3F{1S-2f:1l;1N:0 0 1.2x;2e:0;1J:3z;1T-3Y:69}.13-25-3F 7z{2B:6t-4b;2G:5o}.13-25-3F .13-25-2D{z-3Z:20;1c:2q;1E:2q;1x-2w:2q;1J:#6k;1u:#3Q;1o-1E:2q;3g-1S:1l}.13-25-3F .13-25-2D.13-3V-25-2D{1J:#6k}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D{1J:#8E;1u:#3Q}.13-25-3F .13-25-2D.13-3V-25-2D~.13-25-2D-1o{1J:#8E}.13-25-3F .13-25-2D-1o{z-3Z:10;1c:2.21;1E:.4u;1N:0 -3K;1J:#6k}[1j^=13]{-1a-el-em-1u:3v}.13-31{-1a-1L:13-31 .3s;1L:13-31 .3s}.13-31.13-6Q{-1a-1L:1Z;1L:1Z}.13-30{-1a-1L:13-30 .88 67;1L:13-30 .88 67}.13-30.13-6Q{-1a-1L:1Z;1L:1Z}.13-6M .13-3e{1k:1D;1g:0}.13-1Q-1f-1r .13-1f-1o-3h{-1a-1L:13-1Q-1f-1o-3h .4g;1L:13-1Q-1f-1o-3h .4g}.13-1Q-1f-1r .13-1f-1o-3c{-1a-1L:13-1Q-1f-1o-3c .4g;1L:13-1Q-1f-1o-3c .4g}.13-1Q-1f-1r .13-1f-35-1o-1k{-1a-1L:13-1p-1f-35-1o 4.8I 7g-2O;1L:13-1p-1f-35-1o 4.8I 7g-2O}.13-1Q-2n-1r{-1a-1L:13-1Q-2n-1r .5s;1L:13-1Q-2n-1r .5s}.13-1Q-2n-1r .13-x-2V{-1a-1L:13-1Q-2n-x-2V .5s;1L:13-1Q-2n-x-2V .5s}@-1a-2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@2a 13-1p-2u{0%{-1a-16:1p(0);16:1p(0)}1F%{-1a-16:1p(5O);16:1p(5O)}}@6J eq{1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q){3T-y:8D!3f}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q)>[2o-2L=4M]{2B:1Z}1e.13-1q:1M(.13-26-1P):1M(.13-1b-1q) .13-1h{2G:8O!3f}}\");',62,895,'|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||swal2|function||transform|return|var|top|webkit|toast|width|this|body|success|left|container|input|class|right|center|document|concat|line|rotate|shown|icon||popup|color|bottom|if|border|Tt|content|typeof|null|flex|auto|height|100|scale|div|style|background|value|animation|not|margin|start|backdrop|animate|column|align|font|type|nt|625em|45deg|grow|none||5em|window|length||progress|no|end|translateY|target|keyframes|select|focus|Object|padding|items|for|textarea|customClass|size|get|file|125em|error|aria|justify|2em|box|range|rotateZ|loading|radio|radius|25em|it|opacity|checkbox|display|3125em|step|placeholder|actions|position|375em|title|styled|rt|hidden|new|confirmButton|in|setAttribute|disabled|inputValue|forEach|querySelector|timeout|mark|progressSteps|75em|yt|ms|hide|show|0625em||span|circular|Promise|appendChild|innerHTML|1875em|string|prototype|long|undefined|close|important|text|tip|case|validationMessage|innerParams|void|else|2deg|cancelButton|875em|9375em|key||indexOf|arguments|transparent|1em|getInput|button|inherit|createElement|rgba|footer|data|label|steps|then|shadow|parentNode|Swal|1px|running|modal|cancel|removeAttribute|ue|fff|domCache|to|overflow|ot|active|classList|contains|weight|index|tabindex|keydownListenerCapture|parameter|set|solid||output|Reflect|remaining|params|user|block|translateX|number|image|rotateX|75s|validation|405deg|before|direction|message|origin|confirm|object|absolute|question|default|moz|push|4em|getPropertyValue|querySelectorAll|normal|resolve|inputOptions|call|previousBodyPadding|parseInt|hideLoading|activeElement|className|keydownTarget|timer|break|4375em|max|_|true|inputerror|header|first|child|linear|DismissReason|preConfirm|getComputedStyle|ccc|getAttribute|stop|inputPlaceholder|apply||high|contrast|is||id|currentProgressStep|keys|previousActiveElement|setTimeout|documentElement|f27474|Qt|sweetalert2|showCancelButton|showConfirmButton|promise|WeakMap|Symbol|email|Expected|or|got|html|relative|st|Z0|sizing||zA|imageClass|titleText|Jt|toString|allowOutsideClick|delete|keydownHandler|outline|focusCancel|inputValidator|backgroundColor|freeze|checked|switch|info|warning|5625em|iosfix|row|confirmButtonColor|360deg|imageUrl|constructor|onchange|Date|inputClass|showCloseButton|onclick|tt|Pt|fire|resetValidationMessage|addEventListener|Lt|url||keydownHandlerAdded|||forwards|Unexpected|600|word|8em|Ft|wrap|previous|removeEventListener|scrollTop|preventDefault|of|customContainerClass|3085d6|showLoaderOnConfirm|gt|onmouseup|onBeforeOpen|onOpen|and|Dt|cursor|inline|transition|infinite|translate|enumerable|px|0s|writable|100deg|filter|1deg|Invalid|fix|ring|enableButtons|hasOwnProperty|media|_main|queue|rtl|cancelButtonColor|05|construct|noanimation|fade|fullscreen|dismiss|esc|hasAttribute|It|getConfirmButton|SweetAlert2|3em||remove|stretch|Nt|parseFloat|click|Array|initial|6em|2px|focusConfirm|reverseButtons|cancelButtonClass|stopPropagation|confirmButtonClass|allowEnterKey|ease|heightAuto|swalPromiseResolve|Zt|catch|keydown|min|capture|Mt|At|getTimerLeft|Bt|closeButton|Xt|imageWidth|te|imageAlt|childNodes|progressStepsDistance|li|test|https|all|removeChild|Ct|configurable|overflowY|requires|styleSheet|tel|throw|ie|Map|oninput|se|instanceof|a5dc86|pt|closePopup|150|disableButtons|Sweetalert2|showValidationMessage|buttonsStyling|update|borderRightColor||onmousedown|borderLeftColor|define||github|from|300|15s|try|kt|St|ft|splice|Unknown|showLoading|pointer|src|TypeError|hover|h2|imageHeight|offsetWidth|href|8125em|increase|innerText|isRunning|gradient|OK|closeButtonAriaLabel|Rt|scrollHeight|Cancel|paddingRight|ontouchstart|navigator|50px|mt|scroll|add8e6|busy|use|The|25s|jt|valid|defaulting|_t|Ot|static|restoreFocusTimeout|console|allowEscapeKey|zt|zoom|Wt|controls|resize|Kt|children|family|bind|duration||stopKeydownPropagation|setPrototypeOf||vt|confirmButtonText|confirmButtonAriaLabel|attributes|cancelButtonText|cancelButtonAriaLabel|name|isVisible|dialog|getPrototypeOf|__proto__|callback|started|clearTimeout|inputAutoTrim|password|3px|split|onAfterClose|hasn|onClose|scrollbarPadding|Vt|d9d9d9|qt|Ht|lt|isUpdatableParameter|ne|Boolean|argsToParams|cloneNode|finally|SweetAlert|clickConfirm|add|re|6875em|option|selected|wt|15px|self|been|defineProperties|com|inputAttributes|30px|enableConfirmButton|ut|disableConfirmButton|enableInput|disableInput|545454|blur|outerHTML|invalid|describedBy|getProgressSteps|const|swalInstance|getQueueStep|setProgressSteps|module|insertBefore|should|removeProperty|with|exports|Button|files|ul|symbol|isDeprecatedParameter|together|usage|example|nhttps|used|nshowLoaderOnConfirm|io|ajax|request|Target|||join|defined|trim|checkValidity|but|toasts|onmouseover|onmouseout|incompatible|hideProgressSteps|showProgressSteps|Enter|isComposing|Tab|shiftKey|ArrowLeft|ArrowRight|ArrowUp|ArrowDown|Left|Right|Up|Down|Escape|Esc|marginRight|Error|marginLeft|Updatable|are|listed|here|closeToast|blob|master|utils|js|closeModal|disableLoading|This|package|library|||||||||||please|include|shim|enable|browser|See|wiki||Migration||MSStream|support|userAgent|version|iPod|swal|sweetAlert|getElementsByTagName|head|iPhone|cssText|charset|UTF|iPad|URL|256|www|address|ontouchmove|tagName|INPUT|clientHeight|alignItems|offsetTop|documentMode|MSInputMethodContext|clientWidth|msMaxTouchPoints|innerHeight|isTimerRunning|increaseTimer|toggleTimer|resumeTimer|stopTimer|enableLoading|deleteQueueStep|insertQueueStep|create|either|must|expression|Super|mixin|isLoading|getValidationMessage|getFocusableElements|getFooter|getHeader|getCancelButton|getActions|getCloseButton|getIcons|getIcon|getImage|getContent|getTitle|getPopup|getContainer|clickCancel|see|isValidParameter||imageHeigth|Close|scrollTo|scrollY|scrollX|alt|starts|700|arrays|JS|like|than|less|textContent|basis|ButtonClass|ButtonAriaLabel|ButtonText|substring|showC|animationend|oanimationend|oAnimationEnd|OAnimation|webkitAnimationEnd|WebkitAnimation|nextSibling|assertive|polite|live|alert|role|initialize|has|replace|times|img|calc|10px|fixed|describedby|1060|scrolling|touch|labelledby|HTMLElement|32em|video|audio|1rem|contenteditable|595959|embed|iframe|area|sort|getClientRects|offsetHeight|46875em|warn|instead||Please|release|major|next|the|removed|after|will|5px|deprecated|999|slice|500|map|getOwnPropertyDescriptor|called|aaa|super|4px|inner|eee|initialised|ReferenceError|out|Function|serif|Proxy|sham|assign|inset|06|b4dbed|c4e6f5|defineProperty|10em|f0f0f0|666|supports|accelerator|prefix|facea8|f8bb86|9de0f6|3fc3ee|c9dae1|87adbd||arabic|0635em|165|220|134|Cannot|tap|highlight|iterator|strict|amd|print'.split('|'),0,{}))","/**\n * --------------------------------------------\n * AdminLTE Dropdown.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Dropdown = (($) => {\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Dropdown'\n const DATA_KEY = 'lte.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Selector = {\n NAVBAR: '.navbar',\n DROPDOWN_MENU: '.dropdown-menu',\n DROPDOWN_MENU_ACTIVE: '.dropdown-menu.show',\n DROPDOWN_TOGGLE: '[data-toggle=\"dropdown\"]',\n }\n\n const ClassName = {\n DROPDOWN_HOVER: 'dropdown-hover',\n DROPDOWN_RIGHT: 'dropdown-menu-right'\n }\n\n const Default = {\n }\n\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class Dropdown {\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n toggleSubmenu() {\n this._element.siblings().toggleClass(\"show\")\n\n if (! this._element.next().hasClass('show')) {\n this._element.parents('.dropdown-menu').first().find('.show').removeClass(\"show\")\n }\n\n this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {\n $('.dropdown-submenu .show').removeClass(\"show\")\n })\n }\n\n fixPosition() {\n let elm = $(Selector.DROPDOWN_MENU_ACTIVE)\n\n if (elm.length !== 0) {\n if (elm.hasClass(ClassName.DROPDOWN_RIGHT)) {\n elm.css('left', 'inherit')\n elm.css('right', 0)\n } else {\n elm.css('left', 0)\n elm.css('right', 'inherit')\n }\n\n let offset = elm.offset()\n let width = elm.width()\n let windowWidth = $(window).width()\n let visiblePart = windowWidth - offset.left\n\n if (offset.left < 0) {\n elm.css('left', 'inherit')\n elm.css('right', (offset.left - 5))\n } else {\n if (visiblePart < width) {\n elm.css('left', 'inherit')\n elm.css('right', 0)\n }\n }\n } \n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Dropdown($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'toggleSubmenu' || config == 'fixPosition') {\n data[config]()\n }\n })\n }\n }\n\n /**\n * Data API\n * ====================================================\n */\n // $(Selector.DROPDOWN_TOGGLE).on(\"click\", function(event) {\n // event.preventDefault()\n // event.stopPropagation()\n //\n // Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')\n // });\n //\n // $(Selector.DROPDOWN_TOGGLE).on(\"click\", function(event) {\n // event.preventDefault()\n //\n // setTimeout(function() {\n // Dropdown._jQueryInterface.call($(this), 'fixPosition')\n // }, 1)\n // });\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n})(jQuery)\n\nexport default Dropdown\n","/*NProgress*/eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('(4(k,l){\"4\"===G V&&V.1Z?V(l):\"21\"===G 1z?2c.1z=l():k.2f=l()})(x,4(){4 k(a,b,d){7 ad?d:a}4 l(a,b,d){a=\"Q\"===e.B?{W:\"Q(\"+D*(-1+a)+\"%,0,0)\"}:\"Y\"===e.B?{W:\"Y(\"+D*(-1+a)+\"%,0)\"}:{\"1u-2b\":D*(-1+a)+\"%\"};a.P=\"U \"+b+\"A \"+d;7 a}4 q(a,b){7 0<=(\"2a\"==G a?a:n(a)).24(\" \"+b+\" \")}4 r(a,b){6 d=n(a),c=d+b;q(d,b)||(a.10=c.1o(1))}4 t(a,b){6 c=n(a);q(a,b)&&(b=c.H(\" \"+b+\" \",\" \"),a.10=b.1o(1,b.J-1))}4 n(a){7(\" \"+(a.10||\"\")+\" \").H(/\\\\s+/1C,\" \")}6 c={1W:\"0.2.0\"},e=c.1V={1b:.1U,1e:\"1Q\",B:\"\",1g:1P,N:!0,1n:.1O,1p:1N,1t:!0,16:\\'[S=\"11\"]\\',1B:\\'[S=\"T\"]\\',C:\"I\",19:\\'\\'};c.1H=4(a){6 b;X(b 9 a){6 c=a[b];1h 0!==c&&a.1i(b)&&(e[b]=c)}7 x};c.j=1k;c.E=4(a){6 b=c.1m();a=k(a,e.1b,1);c.j=1===a?1k:a;6 d=c.1l(!b),p=d.F(e.16),h=e.1g,v=e.1e;d.1r;w(4(b){\"\"===e.B&&(e.B=c.1s());m(p,l(a,h,v));1===a?(m(d,{P:\"1D\",1v:1}),d.1r,R(4(){m(d,{P:\"U \"+h+\"A 1w\",1v:0});R(4(){c.1x();b()},h)},h)):R(b,h)});7 x};c.1m=4(){7\"1y\"===G c.j};c.14=4(){c.j||c.E(0);6 a=4(){R(4(){c.j&&(c.N(),a())},e.1p)};e.N&&a();7 x};c.1A=4(a){7 a||c.j?c.15(.3+.5*13.12()).E(1):x};c.15=4(a){6 b=c.j;7 b?(\"1y\"!==G a&&(a=(1-b)*k(13.12()*b,.1,.1E)),b=k(b+a,0,.1F),c.E(b)):c.14()};c.N=4(){7 c.15(13.12()*e.1n)};(4(){6 a=0,b=0;c.1G=4(d){y(!d||\"1I\"===d.1J())7 x;0===b&&c.14();a++;b++;d.1K(4(){b--;0===b?(a=0,c.1A()):c.E((a-b)/a)});7 x}})();c.1l=4(a){y(c.1d())7 8.Z(\"o\");r(8.1j,\"o-1f\");6 b=8.1R(\"i\");b.1S=\"o\";b.1T=e.19;6 d=b.F(e.16),p=a?\"-D\":D*(-1+(c.j||0));a=8.F(e.C);m(d,{P:\"U 0 1w\",W:\"Q(\"+p+\"%,0,0)\"});e.1t||(d=b.F(e.1B))&&d&&d.M&&d.M.1a(d);a!=8.I&&r(a,\"o-17-C\");a.1X(b);7 b};c.1x=4(){t(8.1j,\"o-1f\");t(8.F(e.C),\"o-17-C\");6 a=8.Z(\"o\");a&&a&&a.M&&a.M.1a(a)};c.1d=4(){7!!8.Z(\"o\")};c.1s=4(){6 a=8.I.L,b=\"1Y\"9 a?\"1c\":\"20\"9 a?\"18\":\"22\"9 a?\"A\":\"23\"9 a?\"O\":\"\";7 b+\"25\"9 a?\"Q\":b+\"26\"9 a?\"Y\":\"1u\"};6 w=4(){4 a(){6 c=b.27();c&&c(a)}6 b=[];7 4(c){b.28(c);1==b.J&&a()}}(),m=4(){4 a(a){7 a.H(/^-A-/,\"A-\").H(/-([\\\\29-z])/1C,4(a,b){7 b.1q()})}4 b(b){b=a(b);6 d;y(!(d=e[b])){d=b;a:{6 u=8.I.L;y(!(b 9 u))X(6 h=c.J,f=b.2d(0).1q()+b.2e(1),g;h--;)y(g=c[h]+f,g 9 u){b=g;2g a}}d=e[d]=b}7 d}6 c=[\"1c\",\"O\",\"18\",\"A\"],e={};7 4(a,c){6 d=2h;y(2==d.J)X(g 9 c){6 e=c[g];y(1h 0!==e&&c.1i(g)){d=a;6 f=g;f=b(f);d.L[f]=e}}2i{6 g=a;f=d[1];d=d[2];f=b(f);g.L[f]=d}}}();7 c});',62,143,'||||function||var|return|document|in|||||||||div|status|||||nprogress|||||||||this|if||ms|positionUsing|parent|100|set|querySelector|typeof|replace|body|length|class|style|parentNode|trickle||transition|translate3d|setTimeout|role|spinner|all|define|transform|for|translate|getElementById|className|bar|random|Math|start|inc|barSelector|custom|Moz|template|removeChild|minimum|Webkit|isRendered|easing|busy|speed|void|hasOwnProperty|documentElement|null|render|isStarted|trickleRate|substring|trickleSpeed|toUpperCase|offsetWidth|getPositioningCSS|showSpinner|margin|opacity|linear|remove|number|exports|done|spinnerSelector|gi|none|95|994|promise|configure|resolved|state|always|icon|peg|800|02|200|ease|createElement|id|innerHTML|08|settings|version|appendChild|WebkitTransform|amd|MozTransform|object|msTransform|OTransform|indexOf|Perspective|Transform|shift|push|da|string|left|module|charAt|slice|NProgress|break|arguments|else'.split('|'),0,{}));\r\n","\nexport default class Ajax {\n constructor(Dcat) {\n this.dcat = Dcat;\n\n Dcat.handleAjaxError = this.handleAjaxError.bind(this);\n Dcat.handleJsonResponse = this.handleJsonResponse.bind(this);\n\n this.init(Dcat)\n }\n\n init(Dcat) {\n $.get = function (url, data, success, dataType) {\n let options = {\n type: 'GET',\n url: url,\n };\n\n if (typeof data === 'function') {\n dataType = success;\n success = data;\n data = null\n }\n\n if (typeof success === 'function') {\n options.success = success;\n }\n\n if (typeof data === 'object') {\n options.data = data\n }\n\n if (dataType) {\n options.dataType = dataType;\n }\n\n return $.ajax(options)\n };\n\n $.post = function (options) {\n options.type = 'POST';\n Object.assign(options.data, {_token: Dcat.token});\n\n return $.ajax(options);\n };\n\n $.delete = function (options) {\n options.type = 'POST';\n options.data = {_method: 'DELETE', _token: Dcat.token};\n\n return $.ajax(options);\n };\n\n $.put = function (options) {\n options.type = 'POST';\n Object.assign(options.data, {_method: 'PUT', _token: Dcat.token});\n\n return $.ajax(options);\n };\n }\n\n handleAjaxError(xhr, text, msg) {\n let Dcat = this.dcat,\n json = xhr.responseJSON || {},\n _msg = json.message;\n\n Dcat.NP.done();\n Dcat.loading(false);// 关闭所有loading效果\n $('.btn-loading').buttonLoading(false);\n\n switch (xhr.status) {\n case 500:\n return Dcat.error(_msg || (Dcat.lang['500'] || 'Server internal error.'));\n case 403:\n return Dcat.error(_msg || (Dcat.lang['403'] || 'Permission deny!'));\n case 401:\n if (json.redirect) {\n return location.href = json.redirect;\n }\n return Dcat.error(Dcat.lang['401'] || 'Unauthorized.');\n case 301:\n case 302:\n console.log('admin redirect', json);\n if (json.redirect) {\n return location.href = json.redirect;\n }\n return;\n case 419:\n return Dcat.error(Dcat.lang['419'] || 'Sorry, your page has expired.');\n\n case 422:\n if (json.errors) {\n try {\n var err = [], i;\n for (i in json.errors) {\n err.push(json.errors[i].join('
'));\n }\n Dcat.error(err.join('
'));\n } catch (e) {}\n return;\n }\n case 0:\n return;\n }\n\n Dcat.error(_msg || (xhr.status + ' ' + msg));\n }\n\n // 处理接口返回数据\n handleJsonResponse(response, options) {\n let Dcat = this.dcat,\n data = response.data;\n\n if (! response) {\n return;\n }\n\n if (typeof response !== 'object') {\n return Dcat.error('error', 'Oops!');\n }\n\n var then = function (then) {\n switch (then.action) {\n case 'refresh':\n Dcat.reload();\n break;\n case 'download':\n window.open(then.value, '_blank');\n break;\n case 'redirect':\n Dcat.reload(then.value || null);\n break;\n case 'location':\n setTimeout(function () {\n if (then.value) {\n window.location = then.value;\n } else {\n window.location.reload();\n }\n }, 1000);\n break;\n case 'script':\n (function () {\n eval(then.value);\n })();\n break;\n }\n };\n\n if (typeof response.html === 'string' && response.html && options.target) {\n if (typeof options.html === 'function') {\n // 处理api返回的HTML代码\n options.html(options.target, response.html, response);\n } else {\n $(target).html(response.html);\n }\n }\n\n let message = data.message || response.message;\n\n // 判断默认弹窗类型.\n if (! data.type) {\n data.type = response.status ? 'success' : 'error';\n }\n\n if (typeof message === 'string' && data.type && message) {\n if (data.alert) {\n Dcat.swal[data.type](message, data.detail);\n } else {\n Dcat[data.type](message, null, data.timeout ? {timeOut: data.timeout*1000} : {});\n }\n }\n\n if (data.then) {\n then(data.then);\n }\n }\n}\n","/*!\n * jQuery Form Plugin\n * version: 4.2.2\n * Project repository: https://github.com/jquery-form/form\n */\nlet module = {};\n\neval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('!5(e){\"5\"==W 2y&&2y.6g?2y([\"1Z\"],e):\"44\"==W 2E&&2E.3W?2E.3W=5(t,r){6 R 0===r&&(r=\"6f\"!=W Z?3F(\"1Z\"):3F(\"1Z\")(t)),e(r),r}:e(6e)}(5(e){\"6d 6a\";5 t(t){4 r=t.P;t.67()||(t.5Q(),e(t.1p).30(\"z\").1a(r))}5 r(t){4 r=t.1p,a=e(r);7(!a.3I(\"[8=U],[8=1N]\")){4 n=a.30(\"[8=U]\");7(0===n.B)6;r=n[0]}4 i=r.z;7(i.1n=r,\"1N\"===r.8)7(R 0!==t.3G)i.1q=t.3G,i.1x=t.5O;16 7(\"5\"==W e.J.42){4 o=a.42();i.1q=t.3g-o.3j,i.1x=t.3l-o.3p}16 i.1q=t.3g-r.5N,i.1x=t.3l-r.5L;1C(5(){i.1n=i.1q=i.1x=Q},2X)}5 a(){7(e.J.1a.3M){4 t=\"[1Z.z] \"+1X.5K.5J.1h(1D,\"\");Z.2W&&Z.2W.33?Z.2W.33(t):Z.20&&Z.20.3i&&Z.20.3i(t)}}4 n=/\\\\r?\\\\n/g,i={};i.2V=R 0!==e(\\'<1c 8=\"29\">\\').1Q(0).3A,i.3C=R 0!==Z.3E;4 o=!!e.J.2Q;e.J.1s=5(){7(!o)6 3.11.1f(3,1D);4 e=3.2Q.1f(3,1D);6 e&&e.1Z||\"1J\"==W e?e:3.11.1f(3,1D)},e.J.1a=5(t,r,n,s){5 u(r){4 a,n,i=e.1K(r,t.2O).32(\"&\"),o=i.B,s=[];Y(a=0;a\\',k).1z(f.I[c].G).2B(w)[0]):u.H(e(\\'<1c 8=\"2C\" 9=\"\\'+c+\\'\">\\',k).1z(f.I[c]).2B(w)[0]));f.2a||h.2B(D),v.34?v.34(\"35\",s):v.36(\"38\",s,!1),1C(t,15);1l{w.U()}1A(e){19.5w(\"z\").U.1f(w)}}5r{w.1F(\"2c\",i),w.1F(\"2d\",o),r?w.1F(\"1p\",r):p.3d(\"1p\"),e(u).3e()}}5 s(t){7(!x.1b&&!X){7((O=n(v))||(a(\"2N 5q 5p 19\"),t=L),t===A&&x)6 x.1m(\"1k\"),R S.1P(x,\"1k\");7(t===L&&x)6 x.1m(\"3s 1m\"),R S.1P(x,\"V\",\"3s 1m\");7(O&&O.2A.2z!==f.1T||T){v.3B?v.3B(\"35\",s):v.5o(\"38\",s,!1);4 r,i=\"K\";1l{7(T)5l\"1k\";4 o=\"1I\"===f.1B||O.2u||e.5h(O);7(a(\"5g=\"+o),!o&&Z.20&&(Q===O.1G||!O.1G.3O)&&--C)6 a(\"49 5e 2t, 2r 2q 5d\"),R 1C(s,5c);4 u=O.1G?O.1G:O.2k;x.18=u?u.3O:Q,x.1H=O.2u?O.2u:O,o&&(f.1B=\"1I\"),x.2p=5(e){6{\"2n-8\":f.1B}[e.1u()]},u&&(x.17=37(u.2h(\"17\"))||x.17,x.1j=u.2h(\"1j\")||x.1j);4 c=(f.1B||\"\").1u(),l=/(2s|3b|2f)/.1o(c);7(l||f.1w){4 p=O.28(\"1w\")[0];7(p)x.18=p.G,x.17=37(p.2h(\"17\"))||x.17,x.1j=p.2h(\"1j\")||x.1j;16 7(l){4 m=O.28(\"2w\")[0],g=O.28(\"1G\")[0];m?x.18=m.26?m.26:m.3Y:g&&(x.18=g.26?g.26:g.3Y)}}16\"1I\"===c&&!x.1H&&x.18&&(x.1H=q(x.18));1l{M=N(x,c,f)}1A(e){i=\"23\",x.V=r=e||i}}1A(e){a(\"V 5a: \",e),i=\"V\",x.V=r=e||i}x.1b&&(a(\"2g 1b\"),i=Q),x.17&&(i=x.17>=58&&x.17<57||4Z===x.17?\"K\":\"V\"),\"K\"===i?(f.K&&f.K.1h(f.12,M,\"K\",x),S.4Y(x.18,\"K\",x),d&&e.1v.13(\"4U\",[x,f])):i&&(R 0===r&&(r=x.1j),f.V&&f.V.1h(f.12,x,i,r),S.1P(x,\"V\",r),d&&e.1v.13(\"3v\",[x,f,r])),d&&e.1v.13(\"4T\",[x,f]),d&&!--e.2F&&e.1v.13(\"4P\"),f.1t&&f.1t.1h(f.12,x,i),X=!0,f.1k&&31(j),1C(5(){f.2a?h.11(\"2o\",f.1T):h.3e(),x.1H=Q},2X)}}}4 u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.4N();7(S.1m=5(e){x.1m(e)},r)Y(c=0;c\\',k)).4D({3N:\"4C\",3p:\"-3P\",3j:\"-3P\"}),v=h[0],x={1b:0,18:Q,1H:Q,17:0,1j:\"n/a\",4z:5(){},2p:5(){},4y:5(){},1m:5(t){4 r=\"1k\"===t?\"1k\":\"1b\";a(\"4x 2g... \"+r),3.1b=1;1l{v.1R.19.3R&&v.1R.19.3R(\"4w\")}1A(e){}h.11(\"2o\",f.1T),x.V=r,f.V&&f.V.1h(f.12,x,r,t),d&&e.1v.13(\"3v\",[x,f,r]),f.1t&&f.1t.1h(f.12,x,r)}},(d=f.3T)&&0==e.2F++&&e.1v.13(\"4v\"),d&&e.1v.13(\"4u\",[x,f]),f.2e&&!1===f.2e.1h(f.12,x,f))6 f.3T&&e.2F--,S.1P(),S;7(x.1b)6 S.1P(),S;(y=w.1n)&&(b=y.9)&&!y.1g&&(f.I=f.I||{},f.I[b]=y.G,\"1N\"===y.8&&(f.I[b+\".x\"]=w.1q,f.I[b+\".y\"]=w.1x));4 A=1,L=2,F=e(\"3Z[9=40-4j]\").11(\"2n\"),E=e(\"3Z[9=40-1K]\").11(\"2n\");E&&F&&(f.I=f.I||{},f.I[E]=F),f.4i?i():1C(i,10);4 M,O,X,C=50,q=e.4f||5(e,t){6 Z.46?((t=21 46(\"4e.5f\")).4a=\"48\",t.4b(e)):t=(21 4c).4d(e,\"2f/1I\"),t&&t.2k&&\"23\"!==t.2k.47?t:Q},45=e.4g||5(e){6 Z.4h(\"(\"+e+\")\")},N=5(t,r,a){4 n=t.2p(\"2n-8\")||\"\",i=(\"1I\"===r||!r)&&n.2b(\"1I\")>=0,o=i?t.1H:t.18;6 i&&\"23\"===o.2k.47&&e.V&&e.V(\"23\"),a&&a.43&&(o=a.43(o,r)),\"1J\"==W o&&((\"2s\"===r||!r)&&n.2b(\"2s\")>=0?o=45(o):(\"3b\"===r||!r)&&n.2b(\"41\")>=0&&e.4k(o)),o};6 S}7(!3.B)6 a(\"1a: 4l U 4m - 4n 4o 1y\"),3;4 l,f,d,p=3;\"5\"==W t?t={K:t}:\"1J\"==W t||!1===t&&1D.B>0?(t={1d:t,P:r,1B:n},\"5\"==W s&&(t.K=s)):R 0===t&&(t={}),l=t.2G||t.8||3.1s(\"2G\"),(d=(d=\"1J\"==W(f=t.1d||3.1s(\"2c\"))?e.4p(f):\"\")||Z.2A.2z||\"\")&&(d=(d.4q(/^([^#]+)/)||[])[1]),t=e.2M(!0,{1d:d,K:e.1O.K,8:l||e.1O.8,1T:/^4r/i.1o(Z.2A.2z||\"\")?\"41:48\":\"4s:4t\"},t);4 m={};7(3.13(\"z-2w-3V\",[3,t,m]),m.3U)6 a(\"1a: U 3S 25 z-2w-3V 13\"),3;7(t.2U&&!1===t.2U(3,t))6 a(\"1a: U 1b 25 2U 2t\"),3;4 h=t.2O;R 0===h&&(h=e.1O.2O);4 v,g=[],x=3.2T(t.4A,g,t.4B);7(t.P){4 y=e.2S(t.P)?t.P(x):t.P;t.I=y,v=e.1K(y,h)}7(t.2R&&!1===t.2R(x,3,t))6 a(\"1a: U 1b 25 2R 2t\"),3;7(3.13(\"z-U-3L\",[x,3,t,m]),m.3U)6 a(\"1a: U 3S 25 z-U-3L 13\"),3;4 b=e.1K(x,h);v&&(b=b?b+\"&\"+v:v),\"4F\"===t.8.4G()?(t.1d+=(t.1d.2b(\"?\")>=0?\"&\":\"?\")+b,t.P=Q):t.P=b;4 T=[];7(t.1E&&T.H(5(){p.1E()}),t.2P&&T.H(5(){p.2P(t.4J)}),!t.1B&&t.1p){4 j=t.K||5(){};T.H(5(r,a,n){4 i=1D,o=t.4K?\"3H\":\"4M\";e(t.1p)[o](r).1i(5(){j.1f(3,i)})})}16 t.K&&(e.4O(t.K)?e.3y(T,t.K):T.H(t.K));7(t.K=5(e,r,a){Y(4 n=t.12||3,i=0,o=T.B;i0,D=\"2j/z-P\",A=p.11(\"2d\")===D||p.11(\"2I\")===D,L=i.2V&&i.3C;a(\"4S :\"+L);4 F,E=(k||A)&&!L;!1!==t.1U&&(t.1U||E)?t.3w?e.1Q(t.3w,5(){F=c(x)}):F=c(x):F=(k||A)&&L?5(r){Y(4 a=21 3E,n=0;n0)&&(n={1d:n,P:i,1B:o},\"5\"==W s&&(n.K=s)),n=n||{},n.2i=n.2i&&e.2S(e.J.1V),!n.2i&&0===3.B){4 u={s:3.1M,c:3.12};6!e.3K&&u.s?(a(\"2r 2q 3J, 5i 2H\"),e(5(){e(u.s,u.c).2H(n)}),3):(a(\"5j; 5k 2v 5m 5n 1M\"+(e.3K?\"\":\" (2r 2q 3J)\")),3)}6 n.2i?(e(19).2x(\"U.z-1e\",3.1M,t).2x(\"2l.z-1e\",3.1M,r).1V(\"U.z-1e\",3.1M,n,t).1V(\"2l.z-1e\",3.1M,n,r),3):3.3c().1V(\"U.z-1e\",n,t).1V(\"2l.z-1e\",n,r)},e.J.3c=5(){6 3.2x(\"U.z-1e 2l.z-1e\")},e.J.2T=5(t,r,a){4 n=[];7(0===3.B)6 n;4 o,s=3[0],u=3.11(\"5s\"),c=t||R 0===s.2v?s.28(\"*\"):s.2v;7(c&&(c=e.5t(c)),u&&(t||/(5u|5v)\\\\//.1o(3a.39))&&(o=e(\\':1c[z=\"\\'+u+\\'\"]\\').1Q()).B&&(c=(c||[]).5x(o)),!c||!c.B)6 n;e.2S(a)&&(c=e.5y(c,a));4 l,f,d,p,m,h,v;Y(l=0,h=c.B;l= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))\r\n }\r\n\r\n function timerExpired() {\r\n var time = Date.now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time)\r\n }\r\n // Restart the timer.\r\n timerId = startTimer(timerExpired, remainingWait(time))\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time)\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n cancelTimer(timerId)\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(Date.now())\r\n }\r\n\r\n function pending() {\r\n return timerId !== undefined\r\n }\r\n\r\n function debounced() {\r\n var time = Date.now();\r\n var isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime)\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n timerId = startTimer(timerExpired, wait);\r\n return invokeFunc(lastCallTime)\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = startTimer(timerExpired, wait)\r\n }\r\n return result\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n debounced.pending = pending;\r\n return debounced\r\n}\r\n\r\nexport default debounce\r\n","\nimport debounce from './Debounce'\n\nexport default class Helpers {\n constructor(Dcat) {\n Dcat.helpers = this;\n\n this.dcat = Dcat;\n\n // 延迟触发,消除重复触发\n this.debounce = debounce;\n }\n\n /**\n * 获取json对象或数组的长度\n *\n * @param obj\n * @returns {number}\n */\n len(obj) {\n if (typeof obj !== 'object') {\n return 0;\n }\n let i, len = 0;\n\n for(i in obj) {\n len += 1;\n }\n\n return len;\n }\n\n /**\n * 判断变量或key是否存在\n *\n * @param _var\n * @param key\n * @returns {boolean}\n */\n isset(_var, key) {\n let isset = (typeof _var !== 'undefined' && _var !== null);\n\n if (typeof key === 'undefined') {\n return isset;\n }\n\n return isset && typeof _var[key] !== 'undefined';\n };\n\n empty(obj, key) {\n return !(this.isset(obj, key) && obj[key]);\n };\n\n /**\n * 根据key获取对象的值,支持获取多维数据\n *\n * @param arr\n * @param key\n * @param def\n * @returns {null|*}\n */\n get(arr, key, def) {\n def = null;\n\n if (this.len(arr) < 1) {\n return def;\n }\n\n key = String(key).split('.');\n\n for (var i = 0; i < key.length; i++) {\n if (this.isset(arr, key[i])) {\n arr = arr[key[i]];\n } else {\n return def;\n }\n }\n\n return arr;\n }\n\n /**\n * 判断key是否存在\n *\n * @param arr\n * @param key\n * @returns {def|boolean}\n */\n has(arr, key) {\n if (this.len(arr) < 1) return def;\n key = String(key).split('.');\n\n for (var i = 0; i < key.length; i++) {\n if (this.isset(arr, key[i])) {\n arr = arr[key[i]];\n } else {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * 判断元素是否在对象中存在\n *\n * @param arr\n * @param val\n * @param strict\n * @returns {boolean}\n */\n inObject(arr, val, strict) {\n if (this.len(arr) < 1) {\n return false;\n }\n\n for (var i in arr) {\n if (strict) {\n if (val === arr[i]) {\n return true;\n }\n continue\n }\n\n if (val == arr[i]) {\n return true;\n }\n }\n return false;\n }\n\n // 判断对象是否相等\n equal(array, array2, strict) {\n if (!array || !array2) {\n return false;\n }\n\n let len1 = this.len(array),\n len2 = this.len(array2), i;\n\n if (len1 !== len2) {\n return false;\n }\n\n for (i in array) {\n if (! this.isset(array2, i)) {\n return false;\n }\n\n if (array[i] === null && array2[i] === null) {\n return true;\n }\n\n if (typeof array[i] === 'object' && typeof array2[i] === 'object') {\n if (! this.equal(array[i], array2[i], strict)) {\n return false;\n }\n continue;\n }\n\n if (strict) {\n if (array[i] !== array2[i]) {\n return false;\n }\n } else {\n if (array[i] != array2[i]) {\n return false;\n }\n }\n\n }\n return true;\n }\n\n // 字符串替换\n replace(str, replace, subject) {\n if (!str) {\n return str;\n }\n\n return str.replace(\n new RegExp(replace, \"g\"),\n subject\n );\n }\n\n /**\n * 生成随机字符串\n *\n * @returns {string}\n */\n random(len) {\n return Math.random().toString(12).substr(2, len || 16)\n }\n\n // 预览图片\n previewImage(src, width, title) {\n let Dcat = this.dcat,\n img = new Image(),\n win = this.isset(window.top) ? top : window,\n clientWidth = Math.ceil(win.screen.width * 0.6),\n clientHeight = Math.ceil(win.screen.height * 0.8);\n\n img.style.display = 'none';\n img.style.height = 'auto';\n img.style.width = width || '100%';\n img.src = src;\n\n document.body.appendChild(img);\n\n Dcat.loading();\n img.onload = function () {\n Dcat.loading(false);\n let srcw = this.width,\n srch = this.height,\n width = srcw > clientWidth ? clientWidth : srcw,\n height = Math.ceil(width * (srch/srcw));\n\n height = height > clientHeight ? clientHeight : height;\n\n title = title || src.split('/').pop();\n\n if (title.length > 50) {\n title = title.substr(0, 50) + '...';\n }\n\n layer.open({\n type: 1,\n shade: 0.2,\n title: false,\n maxmin: false,\n shadeClose: true,\n closeBtn: 2,\n content: $(img),\n area: [width+'px', (height) + 'px'],\n skin: 'layui-layer-nobg',\n end: function () {\n document.body.removeChild(img);\n }\n });\n };\n img.onerror = function () {\n Dcat.loading(false);\n Dcat.error(Dcat.lang.trans('no_preview'))\n };\n }\n\n // 异步加载\n asyncRender(url, done, error) {\n let Dcat = this.dcat;\n\n $.ajax(url).then(function (data) {\n done(\n Dcat.assets.resolveHtml(data, Dcat.triggerReady).render()\n );\n }, function (a, b, c) {\n if (error) {\n if (error(a, b, c) === false) {\n return false;\n }\n }\n\n Dcat.handleAjaxError(a, b, c);\n })\n }\n\n /**\n * 联动多个字段.\n *\n * @param _this\n * @param options\n */\n loadFields(_this, options) {\n let refreshOptions = function(url, target) {\n Dcat.loading();\n\n $.ajax(url).then(function(data) {\n Dcat.loading(false);\n target.find(\"option\").remove();\n\n $.map(data, function (d) {\n target.append(new Option(d[options.textField], d[options.idField], false, false));\n });\n\n $(target).val(String(target.data('value')).split(',')).trigger('change');\n });\n };\n\n let promises = [],\n values = [];\n\n if (! options.values) {\n $(_this).find('option:selected').each(function () {\n if (String(this.value) === '0' || this.value) {\n values.push(this.value)\n }\n });\n } else {\n values = options.values;\n if (typeof values === 'string') {\n values = [values];\n }\n }\n\n if (! values.length) {\n return;\n }\n\n options.fields.forEach(function(field, index){\n var target = $(_this).closest(options.group).find('.' + options.fields[index]);\n\n if (! values.length) {\n return;\n }\n promises.push(refreshOptions(options.urls[index] + (options.urls[index].match(/\\?/)?'&':'?') + \"q=\"+ values.join(','), target));\n });\n\n $.when(promises).then(function() {});\n }\n}\n","\r\nexport default class Translator{\r\n constructor(Dcat, lang) {\r\n this.dcat = Dcat;\r\n this.lang = lang;\r\n\r\n for (let i in lang) {\r\n if (! Dcat.helpers.isset(this, i)) {\r\n this[i] = lang[i];\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 翻译\r\n *\r\n * @example\r\n * this.trans('name')\r\n * this.trans('selected_options', {':num': 18}) // :num options selected\r\n *\r\n * @param {string} label\r\n * @param {object} replace\r\n * @returns {*}\r\n */\r\n trans(label, replace) {\r\n let _this = this,\r\n helpers = _this.dcat.helpers;\r\n\r\n if (typeof _this.lang !== 'object') {\r\n return label;\r\n }\r\n\r\n var text = helpers.get(_this.lang, label), i;\r\n if (! helpers.isset(text)) {\r\n return label;\r\n }\r\n\r\n if (! replace) {\r\n return text;\r\n }\r\n\r\n for (i in replace) {\r\n text = helpers.replace(text, ':'+i, replace[i]);\r\n }\r\n\r\n return text;\r\n }\r\n}\r\n","\nimport Helpers from './extensions/Helpers'\nimport Translator from './extensions/Translator'\n\nlet $ = jQuery,\n $document = $(document),\n waiting = false,\n bootingCallbacks = [],\n actions = {},\n initialized = {},\n defaultOptions = {\n pjax_container_selector: '#pjax-container',\n };\n\nexport default class Dcat {\n constructor(config) {\n this.token = null;\n this.lang = null;\n\n // 工具函数\n new Helpers(this);\n\n this.withConfig(config);\n }\n\n /**\n * 初始化事件监听方法\n *\n * @param callback\n * @param once\n * @returns {Dcat}\n */\n booting(callback, once) {\n once = once === undefined ? true : once;\n\n bootingCallbacks.push([callback, once]);\n\n return this\n }\n\n /**\n * 初始化事件监听方法,每个请求都会触发\n *\n * @param callback\n * @returns {Dcat}\n */\n bootingEveryRequest(callback) {\n return this.booting(callback, false)\n }\n\n /**\n * 初始化\n */\n boot() {\n let _this = this,\n callbacks = bootingCallbacks;\n\n bootingCallbacks = [];\n\n callbacks.forEach(data => {\n data[0](this);\n\n if (data[1] === false) {\n bootingCallbacks.push(data)\n }\n });\n\n // 脚本加载完毕后重新触发\n _this.onPjaxLoaded(_this.boot.bind(this))\n }\n\n /**\n * 监听所有js脚本加载完毕事件,需要用此方法代替 $.ready 方法\n * 此方法允许在iframe中监听父窗口的事件\n *\n * @param callback\n * @param _window\n * @returns {*|jQuery|*|jQuery.fn.init|jQuery|HTMLElement}\n */\n ready(callback, _window) {\n let _this = this;\n\n if (! _window || _window === window) {\n if (! waiting) {\n return $(callback);\n }\n\n return _this.onPjaxLoaded(callback);\n }\n\n function run(e) {\n _window.$(_this.config.pjax_container_selector).one('pjax:loaded', run);\n\n callback(e);\n }\n\n _window.Dcat.ready(run);\n }\n\n /**\n * 监听动态生成元素.\n *\n * @param selector\n * @param callback\n * @param options\n */\n init(selector, callback, options) {\n let self = this,\n clear = function () {\n if (initialized[selector]) {\n initialized[selector].disconnect();\n }\n };\n\n $document.one('pjax:complete', clear);\n\n clear();\n\n setTimeout(function () {\n initialized[selector] = $.initialize(selector, function () {\n let $this = $(this),\n id = $this.attr('id');\n\n if ($this.attr('initialized')) {\n return;\n }\n $this.attr('initialized', '1');\n\n // 如果没有ID,则自动生成\n if (! id) {\n id = \"_\"+self.helpers.random();\n $this.attr('id', id);\n }\n\n callback.call(this, $this, id)\n }, options);\n });\n }\n\n /**\n * 清理注册过的init回调.\n *\n * @param selector\n */\n offInit(selector) {\n if (initialized[selector]) {\n initialized[selector].disconnect();\n }\n\n $(document).trigger('dcat:init:off', selector, initialized[selector])\n\n initialized[selector] = null;\n }\n\n /**\n * 主动触发 ready 事件\n */\n triggerReady() {\n if (! waiting) {\n return;\n }\n\n $(() => {\n $document.trigger('pjax:loaded');\n });\n }\n\n /**\n * 等待JS脚本加载完成\n *\n * @returns {Dcat}\n */\n wait(value) {\n waiting = value !== false;\n\n $document.trigger('dcat:waiting');\n\n return this\n }\n\n /**\n * 使用pjax重载页面\n *\n * @param url\n */\n reload(url) {\n let container = this.config.pjax_container_selector,\n opt = {container: container};\n\n if ($(container).length) {\n url && (opt.url = url);\n\n $.pjax.reload(opt);\n\n return;\n }\n\n if (url) {\n location.href = url;\n } else {\n location.reload();\n }\n }\n\n /**\n * 监听pjax加载js脚本完毕事件方法,此事件在 pjax:complete 事件之后触发\n *\n * @param callback\n * @param once 默认true\n *\n * @returns {*|jQuery}\n */\n onPjaxLoaded(callback, once) {\n once = once === undefined ? true : once;\n\n if (once) {\n return $document.one('pjax:loaded', callback);\n }\n\n return $document.on('pjax:loaded', callback);\n }\n\n /**\n * 监听pjax加载完毕完毕事件方法\n *\n * @param callback\n * @param once 默认true\n * @returns {*|jQuery}\n */\n onPjaxComplete(callback, once) {\n once = once === undefined ? true : once;\n\n if (once) {\n return $document.one('pjax:complete', callback);\n }\n\n return $document.on('pjax:complete', callback);\n }\n\n withConfig(config) {\n this.config = $.extend(defaultOptions, config);\n this.withLang(config.lang);\n this.withToken(config.token);\n\n delete config.lang;\n delete config.token;\n\n return this\n }\n\n withToken(token) {\n token && (this.token = token);\n\n return this\n }\n\n withLang(lang) {\n if (lang && typeof lang === 'object') {\n this.lang = this.Translator(lang);\n }\n\n return this\n }\n\n // 语言包\n Translator(lang) {\n return new Translator(this, lang);\n }\n\n // 注册动作\n addAction(name, callback) {\n if (typeof callback === 'function') {\n actions[name] = callback;\n }\n }\n\n // 获取动作\n actions() {\n return actions\n }\n}\n","\r\nexport default class Toastr {\r\n constructor(Dcat) {\r\n let _this = this;\r\n\r\n Dcat.success = _this.success;\r\n Dcat.error = _this.error;\r\n Dcat.info = _this.info;\r\n Dcat.warning = _this.warning;\r\n }\r\n\r\n success(message, title, options) {\r\n toastr.success(message, title, options);\r\n }\r\n\r\n error(message, title, options) {\r\n toastr.error(message, title, options);\r\n }\r\n\r\n info(message, title, options) {\r\n toastr.info(message, title, options);\r\n }\r\n\r\n warning(message, title, options) {\r\n toastr.warning(message, title, options);\r\n }\r\n}\r\n","\r\nimport Swal from '../sweetalert/sweetalert2'\r\n\r\nlet w = window;\r\n\r\nexport default class SweetAlert2 {\r\n constructor(Dcat) {\r\n let _this = this;\r\n\r\n Swal.success = _this.success.bind(_this);\r\n Swal.error = _this.error.bind(_this);\r\n Swal.info = _this.info.bind(_this);\r\n Swal.warning = _this.warning.bind(_this);\r\n Swal.confirm = _this.confirm.bind(_this);\r\n\r\n w.swal = w.Swal = _this.swal = Dcat.swal = Swal;\r\n \r\n Dcat.confirm = Swal.confirm;\r\n }\r\n\r\n success(title, message, options) {\r\n return this.fire(title, message, 'success', options)\r\n }\r\n\r\n error(title, message, options) {\r\n return this.fire(title, message, 'error', options)\r\n }\r\n\r\n info(title, message, options) {\r\n return this.fire(title, message, 'info', options)\r\n }\r\n\r\n warning(title, message, options) {\r\n return this.fire(title, message, 'warning', options)\r\n }\r\n\r\n confirm(title, message, success, fail, options) {\r\n let lang = Dcat.lang;\r\n\r\n options = $.extend({\r\n showCancelButton: true,\r\n showLoaderOnConfirm: true,\r\n confirmButtonText: lang['confirm'],\r\n cancelButtonText: lang['cancel'],\r\n confirmButtonClass: 'btn btn-primary',\r\n cancelButtonClass: 'btn btn-white ml-1',\r\n buttonsStyling: false,\r\n }, options);\r\n\r\n this.fire(title, message, 'question', options).then(function (result) {\r\n if (result.value) {\r\n return success && success()\r\n }\r\n\r\n fail && fail()\r\n })\r\n }\r\n\r\n fire(title, message, type, options) {\r\n options = $.extend({\r\n title: title,\r\n type: type,\r\n html: message,\r\n }, options);\r\n\r\n return this.swal.fire(options);\r\n }\r\n}\r\n","\nexport default class RowSelector {\n constructor(options) {\n let _this = this;\n\n _this.options = $.extend({\n // checkbox css选择器\n checkboxSelector: '',\n // 全选checkbox css选择器\n selectAllSelector: '',\n // 选中效果颜色\n background: 'rgba(255, 255,213,0.4)',\n // 点击行事件\n clickRow: false,\n // 表格选择器\n container: 'table',\n }, options);\n\n _this.init()\n }\n\n init() {\n let options = this.options,\n checkboxSelector = options.checkboxSelector,\n $document = $(document),\n selectAll = options.selectAllSelector;\n\n $(selectAll).on('change', function() {\n let checked = this.checked;\n\n $.each($(this).parents(options.container).find(checkboxSelector), function (_, checkbox) {\n let $this = $(checkbox);\n\n if (! $this.attr('disabled')) {\n $this.prop('checked', checked).trigger('change');\n }\n });\n });\n if (options.clickRow) {\n $document.off('click', checkboxSelector).on('click', checkboxSelector, function (e) {\n if (typeof e.cancelBubble != \"undefined\") {\n e.cancelBubble = true;\n }\n if (typeof e.stopPropagation != \"undefined\") {\n e.stopPropagation();\n }\n });\n\n $document.off('click', options.container+' tr').on('click', options.container+' tr', function () {\n $(this).find(checkboxSelector).click();\n });\n }\n\n $document.off('change', checkboxSelector).on('change', checkboxSelector, function () {\n var tr = $(this).closest('tr');\n if (this.checked) {\n tr.css('background-color', options.background);\n\n if ($(checkboxSelector + ':checked').length === $(checkboxSelector).length) {\n $(selectAll).prop('checked', true)\n }\n } else {\n tr.css('background-color', '');\n }\n });\n }\n\n /**\n * 获取选中的主键数组\n *\n * @returns {Array}\n */\n getSelectedKeys() {\n let selected = [];\n\n $(this.options.checkboxSelector+':checked').each(function() {\n var id = $(this).data('id');\n if (selected.indexOf(id) === -1) {\n selected.push(id);\n }\n });\n\n return selected;\n }\n\n /**\n * 获取选中的行数组\n *\n * @returns {Array}\n */\n getSelectedRows() {\n let selected = [];\n\n $(this.options.checkboxSelector+':checked').each(function() {\n var id = $(this).data('id'), i, exist;\n\n for (i in selected) {\n if (selected[i].id === id) {\n exist = true\n }\n }\n\n exist || selected.push({'id': id, 'label': $(this).data('label')})\n });\n\n return selected;\n }\n}\n","\nlet defaultName = '_def_';\n\nexport default class Grid {\n constructor(Dcat) {\n Dcat.grid = this;\n\n this.selectors = {};\n }\n\n // 添加行选择器对象\n addSelector(selector, name) {\n this.selectors[name || defaultName] = selector\n }\n\n // 获取行选择器选中的ID字符串\n selected(name) {\n return this.selectors[name || defaultName].getSelectedKeys()\n }\n\n // 获取行选择器选中的行\n selectedRows(name) {\n return this.selectors[name || defaultName].getSelectedRows()\n }\n\n async(options) {\n return new AsyncGrid(options);\n }\n}\n\nclass AsyncGrid {\n constructor(options) {\n let nullFun = function () {};\n\n options = $.extend({\n selector: null,\n bodySelector: '.async-body',\n tableSelector: '.async-table',\n queryName: null,\n url: null,\n loadingStyle: 'height:240px;',\n before: nullFun,\n after: nullFun,\n }, options);\n\n var self = this,\n $box = $(options.selector),\n $body = $box.find(options.bodySelector);\n\n self.options = options;\n self.$box = $box;\n self.$body = $body;\n self.loading = false;\n }\n\n render(url, callback) {\n let self = this, options = self.options;\n\n url = url || options.url;\n\n if (self.loading || url.indexOf('javascript:') !== -1) {\n return;\n }\n self.loading = true;\n\n let $box = self.$box,\n $body = self.$body,\n reqName = options.queryName,\n tableSelector = options.tableSelector,\n $table = $body.find(tableSelector),\n events = {0: 'grid:rendering', 1: 'grid:render', 2: 'grid:rendered'},\n before = options.before,\n after = options.after;\n\n // 开始渲染前事件\n before($box, url);\n $box.trigger(events[0], [url]);\n $body.trigger(events[0], [url]);\n\n // loading效果\n let loadingOptions = {background: 'transparent'}\n if ($body.find(`${tableSelector} tbody tr`).length <= 2) {\n loadingOptions['style'] = options.loadingStyle;\n }\n $table.loading(loadingOptions);\n Dcat.NP.start();\n\n if (url.indexOf('?') === -1) {\n url += '?';\n }\n\n if (url.indexOf(reqName) === -1) {\n url += '&'+reqName+'=1';\n }\n\n history.pushState({}, '', url.replace(reqName+'=1', ''));\n\n $box.data('current', url);\n\n Dcat.helpers.asyncRender(url, function (html) {\n self.loading = false;\n Dcat.NP.done();\n\n $body.html(html);\n\n let refresh = function () {\n self.render($box.data('current'));\n };\n\n // 表格渲染事件\n $box.off(events[1]).on(events[1], refresh);\n $body.off(events[1]).on(events[1], refresh);\n $table.on(events[1], refresh);\n\n // 刷新按钮\n $box.find('.grid-refresh').off('click').on('click', function () {\n refresh();\n\n return false;\n });\n\n // 分页\n $box.find('.pagination .page-link').on('click', loadLink);\n // 页选择器\n $box.find('.per-pages-selector .dropdown-item a').on('click', loadLink);\n // 表头url\n $box.find('.grid-column-header a').on('click', loadLink);\n\n // 快捷搜索、表头搜索以及过滤器筛选\n $box.find('form').off('submit').on('submit', function () {\n var action = $(this).attr('action');\n\n if ($(this).attr('method') === 'post') {\n return;\n }\n\n if (action.indexOf('?') === -1) {\n action += '?';\n }\n\n self.render(action+'&'+$(this).serialize());\n\n return false;\n });\n\n $box.find('.filter-box .reset').on('click', loadLink);\n\n // 规格选择器\n $box.find('.grid-selector a').on('click', loadLink);\n\n // 渲染完成后事件\n $box.trigger(events[2], [url, html]);\n $body.trigger(events[2], [url, html]);\n $table.trigger(events[2], [url, html]);\n\n after($box, url, html);\n\n callback && callback($box, url, html);\n });\n\n function loadLink() {\n self.render($(this).attr('href'));\n\n return false;\n }\n }\n}\n","\nimport '../jquery-form/jquery.form.min';\n\nlet formCallbacks = {\n before: [], success: [], error: []\n };\n\nclass Form {\n constructor(options) {\n let _this = this;\n\n _this.options = $.extend({\n // 表单的 jquery 对象或者css选择器\n form: null,\n // 开启表单验证\n validate: false,\n // 确认弹窗\n confirm: {title: null, content: null},\n // 是否使用Toastr展示字段验证错误信息\n validationErrorToastr: false,\n // 表单错误信息class\n errorClass: 'has-error',\n // 表单错误信息容器选择器\n errorContainerSelector: '.with-errors',\n // 表单组css选择器\n groupSelector: '.form-group,.form-label-group,.form-field',\n // tab表单css选择器\n tabSelector: '.tab-pane',\n // 错误信息模板\n errorTemplate: '
',\n // 是否允许跳转\n redirect: true,\n // 自动移除表单错误信息\n autoRemoveError: true,\n // 表单提交之前事件监听,返回false可以中止表单继续提交\n before: function () {},\n // 表单提交之后事件监听,返回false可以中止后续逻辑\n after: function () {},\n // 成功事件,返回false可以中止后续逻辑\n success: function () {},\n // 失败事件,返回false可以中止后续逻辑\n error: function () {},\n }, options);\n\n _this.originalValues = {};\n _this.$form = $(_this.options.form).first();\n _this._errColumns = {};\n\n _this.init();\n }\n\n init() {\n let _this = this;\n let confirm = _this.options.confirm;\n\n if (! confirm.title) {\n return _this.submit();\n }\n\n Dcat.confirm(confirm.title, confirm.content, function () {\n _this.submit();\n });\n }\n\n submit() {\n let _this = this,\n $form = _this.$form,\n options = _this.options,\n $submitButton = $form.find('[type=\"submit\"],.submit');\n\n // 移除所有错误信息\n _this.removeErrors();\n\n $form.ajaxSubmit({\n data: {_token: Dcat.token},\n beforeSubmit: function (fields, form, _opt) {\n if (options.before(fields, form, _opt, _this) === false) {\n return false;\n }\n\n // 触发全局事件\n if (fire(formCallbacks.before, fields, form, _opt, _this) === false) {\n return false;\n }\n\n // 开启表单验证\n if (options.validate) {\n $form.validator('validate');\n\n if ($form.find('.' + options.errorClass).length > 0) {\n return false;\n }\n }\n\n $submitButton.buttonLoading();\n },\n success: function (response) {\n setTimeout(function () {\n $submitButton.buttonLoading(false);\n }, 700);\n\n if (options.after(true, response, _this) === false) {\n return;\n }\n\n if (options.success(response, _this) === false) {\n return;\n }\n\n if (fire(formCallbacks.success, response, _this) === false) {\n return;\n }\n\n if (response.redirect === false || ! options.redirect) {\n if (response.data && response.data.then) {\n delete response.data['then'];\n delete response.data['then'];\n delete response.data['then'];\n }\n }\n\n Dcat.handleJsonResponse(response);\n },\n error: function (response) {\n $submitButton.buttonLoading(false);\n\n if (options.after(false, response, _this) === false) {\n return;\n }\n\n if (options.error(response, _this) === false) {\n return;\n }\n\n if (fire(formCallbacks.error, response, _this) === false) {\n return;\n }\n\n try {\n var error = JSON.parse(response.responseText),\n key;\n\n if (response.status != 422 || ! error || ! Dcat.helpers.isset(error, 'errors')) {\n let json = response.responseJSON;\n if (json && json.message) {\n return Dcat.error(json.message);\n }\n\n return Dcat.error(response.status + ' ' + response.statusText);\n }\n error = error.errors;\n\n for (key in error) {\n // 显示错误信息\n _this._errColumns[key] = _this.showError($form, key, error[key]);\n }\n\n } catch (e) {\n return Dcat.error(response.status + ' ' + response.statusText);\n }\n }\n });\n }\n\n // 显示错误信息\n showError($form, column, errors) {\n let _this = this,\n $field = _this.queryFieldByName($form, column),\n $group = $field.closest(_this.options.groupSelector),\n render = function (msg) {\n $group.addClass(_this.options.errorClass);\n\n if (typeof msg === 'string') {\n msg = [msg];\n }\n\n for (let j in msg) {\n $group.find(_this.options.errorContainerSelector).first().append(\n _this.options.errorTemplate.replace('{message}', msg[j])\n );\n }\n\n if (_this.options.validationErrorToastr) {\n Dcat.error(msg.join('
'));\n }\n };\n\n queryTabTitleError(_this, $field).removeClass('d-none');\n\n // 保存字段原始数据\n _this.originalValues[column] = _this.getFieldValue($field);\n\n if (! $field) {\n if (Dcat.helpers.len(errors) && errors.length) {\n Dcat.error(errors.join(\" \\n \"));\n }\n return;\n }\n\n render(errors);\n\n if (_this.options.autoRemoveError) {\n removeErrorWhenValChanged(_this, $field, column);\n }\n\n return $field;\n }\n\n // 获取字段值\n getFieldValue($field) {\n let vals = [],\n type = $field.attr('type'),\n checker = type === 'checkbox' || type === 'radio',\n i;\n\n for (i = 0; i < $field.length; i++) {\n if (checker) {\n vals.push($($field[i]).prop('checked'));\n continue;\n }\n\n vals.push($($field[i]).val());\n }\n\n return vals;\n }\n\n // 判断值是否改变\n isValueChanged($field, column) {\n return ! Dcat.helpers.equal(this.originalValues[column], this.getFieldValue($field));\n }\n\n // 获取字段jq对象\n queryFieldByName($form, column) {\n if (column.indexOf('.') !== -1) {\n column = column.split('.');\n\n let first = column.shift(),\n i,\n sub = '';\n\n for (i in column) {\n sub += '[' + column[i] + ']';\n }\n column = first + sub;\n }\n\n var $c = $form.find('[name=\"' + column + '\"]');\n\n if (!$c.length) $c = $form.find('[name=\"' + column + '[]\"]');\n\n if (!$c.length) {\n $c = $form.find('[name=\"' + column.replace(/start$/, '') + '\"]');\n }\n if (!$c.length) {\n $c = $form.find('[name=\"' + column.replace(/end$/, '') + '\"]');\n }\n\n if (!$c.length) {\n $c = $form.find('[name=\"' + column.replace(/start\\]$/, ']') + '\"]');\n }\n if (!$c.length) {\n $c = $form.find('[name=\"' + column.replace(/end\\]$/, ']') + '\"]');\n }\n\n return $c;\n }\n\n // 移除给定字段的错误信息\n removeError($field, column) {\n let options = this.options,\n parent = $field.parents(options.groupSelector),\n errorClass = this.errorClass;\n\n parent.removeClass(errorClass);\n parent.find(options.errorContainerSelector).html('');\n\n // tab页下没有错误信息了,隐藏title的错误图标\n let tab;\n\n if (! queryTabByField(this, $field).find('.'+errorClass).length) {\n tab = queryTabTitleError(this, $field);\n if (! tab.hasClass('d-none')) {\n tab.addClass('d-none');\n }\n }\n\n delete this._errColumns[column];\n }\n\n // 删除所有错误信息\n removeErrors() {\n let _this = this,\n column,\n tab;\n\n // 移除所有字段的错误信息\n _this.$form.find(_this.options.errorContainerSelector).each(function (_, $err) {\n $($err).parents(_this.options.groupSelector).removeClass(_this.options.errorClass);\n $($err).html('');\n });\n\n // 移除tab表单tab标题错误信息\n for (column in _this._errColumns) {\n tab = queryTabTitleError(_this._errColumns[column]);\n if (! tab.hasClass('d-none')) {\n tab.addClass('d-none');\n }\n }\n\n // 重置\n _this._errColumns = {};\n }\n}\n\n// 监听表单提交事件\nForm.submitting = function (callback) {\n typeof callback == 'function' && (formCallbacks.before.push(callback));\n\n return this\n};\n\n// 监听表单提交完毕事件\nForm.submitted = function (success, error) {\n typeof success == 'function' && (formCallbacks.success.push(success));\n typeof error == 'function' && (formCallbacks.error.push(error));\n\n return this\n};\n\n// 当字段值变化时移除错误信息\nfunction removeErrorWhenValChanged(form, $field, column) {\n let remove = function () {\n form.removeError($field, column)\n };\n\n $field.one('change', remove);\n $field.off('blur', remove).on('blur', function () {\n if (form.isValueChanged($field, column)) {\n remove();\n }\n });\n\n // 表单值发生变化就移除错误信息\n let interval = function () {\n setTimeout(function () {\n if (! $field.length) {\n return;\n }\n if (form.isValueChanged($field, column)) {\n return remove();\n }\n\n interval();\n }, 500);\n };\n\n interval();\n}\n\n\nfunction getTabId(form, $field) {\n return $field.parents(form.options.tabSelector).attr('id');\n}\n\nfunction queryTabByField(form, $field)\n{\n let tabId = getTabId(form, $field);\n\n if (! tabId) {\n return $('');\n }\n\n return $(`a[href=\"#${tabId}\"]`);\n}\n\nfunction queryTabTitleError(form, $field) {\n return queryTabByField(form, $field).find('.has-tab-error');\n}\n\n// 触发钩子事件\nfunction fire(callbacks) {\n let i, j,\n result,\n args = arguments,\n argsArr = [];\n\n delete args[0];\n\n args = args || [];\n\n for (j in args) {\n argsArr.push(args[j]);\n }\n\n for (i in callbacks) {\n result = callbacks[i].apply(callbacks[i], argsArr);\n\n if (result === false) {\n return result; // 返回 false 会代码阻止继续执行\n }\n }\n}\n\n\n// 开启form表单模式\n$.fn.form = function (options) {\n let $this = $(this);\n\n options = $.extend(options, {\n form: $this,\n });\n\n $this.on('submit', function () {\n return false;\n });\n\n $this.find('[type=\"submit\"],.submit').click(function (e) {\n Dcat.Form(options);\n\n return false;\n });\n};\n\nexport default Form\n","\r\nlet w = window;\r\n\r\nif (top && w.layer) {\r\n w = top;\r\n}\r\n\r\nexport default class DialogForm {\r\n constructor(Dcat, options) {\r\n let self = this, nullFun = function () {};\r\n\r\n self.options = $.extend({\r\n // 弹窗标题\r\n title: '',\r\n // 默认地址\r\n defaultUrl: '',\r\n // 需要绑定的按钮选择器\r\n buttonSelector: '',\r\n // 弹窗大小\r\n area: [],\r\n // 语言包\r\n lang: {\r\n submit: Dcat.lang['submit'] || 'Submit',\r\n reset: Dcat.lang['reset'] || 'Reset',\r\n },\r\n\r\n // get参数名称\r\n query: '',\r\n\r\n // 保存成功后是否刷新页面\r\n forceRefresh: false,\r\n resetButton: true,\r\n\r\n // 执行保存操作后回调\r\n saved: nullFun,\r\n // 保存成功回调\r\n success: nullFun,\r\n // 保存失败回调\r\n error: nullFun,\r\n }, options);\r\n\r\n // 表单\r\n self.$form = null;\r\n // 目标按钮\r\n self.$target = null;\r\n self._dialog = w.layer;\r\n self._counter = 1;\r\n self._idx = {};\r\n self._dialogs = {};\r\n self.rendering = 0;\r\n self.submitting = 0;\r\n\r\n self.init(options)\r\n }\r\n\r\n init(options) {\r\n let self = this,\r\n defUrl = options.defaultUrl,\r\n selector = options.buttonSelector;\r\n\r\n selector && $(selector).off('click').click(function () {\r\n self.$target = $(this);\r\n\r\n let counter = self.$target.attr('counter'), url;\r\n\r\n if (! counter) {\r\n counter = self._counter;\r\n\r\n self.$target.attr('counter', counter);\r\n\r\n self._counter++;\r\n }\r\n\r\n url = self.$target.data('url') || defUrl; // 给弹窗页面链接追加参数\r\n\r\n if (url.indexOf('?') === -1) {\r\n url += '?' + options.query + '=1'\r\n } else if (url.indexOf(options.query) === -1) {\r\n url += '&' + options.query + '=1'\r\n }\r\n\r\n self._build(url, counter);\r\n });\r\n\r\n selector || setTimeout(function () {\r\n self._build(defUrl, self._counter)\r\n }, 400);\r\n }\r\n\r\n // 构建表单\r\n _build(url, counter) {\r\n let self = this,\r\n $btn = self.$target;\r\n\r\n if (! url || self.rendering) {\r\n return;\r\n }\r\n\r\n if (self._dialogs[counter]) { // 阻止同个类型的弹窗弹出多个\r\n self._dialogs[counter].show();\r\n\r\n try {\r\n self._dialog.restore(self._idx[counter]);\r\n } catch (e) {\r\n }\r\n\r\n return;\r\n }\r\n\r\n // 刷新或跳转页面时移除弹窗\r\n Dcat.onPjaxComplete(() => {\r\n self._destroy(counter);\r\n });\r\n\r\n self.rendering = 1;\r\n\r\n $btn && $btn.buttonLoading();\r\n\r\n Dcat.NP.start();\r\n\r\n // 请求表单内容\r\n $.ajax({\r\n url: url,\r\n success: function (template) {\r\n self.rendering = 0;\r\n Dcat.NP.done();\r\n\r\n if ($btn) {\r\n $btn.buttonLoading(false);\r\n\r\n setTimeout(function () {\r\n $btn.find('.waves-ripple').remove();\r\n }, 50);\r\n }\r\n\r\n self._popup(template, counter);\r\n }\r\n });\r\n }\r\n\r\n // 弹出弹窗\r\n _popup(template, counter) {\r\n let self = this,\r\n options = self.options;\r\n\r\n // 加载js代码\r\n template = Dcat.assets.resolveHtml(template).render();\r\n \r\n let btns = [options.lang.submit],\r\n dialogOpts = {\r\n type: 1,\r\n area: (function (v) {\r\n // 屏幕小于800则最大化展示\r\n if (w.screen.width <= 800) {\r\n return ['100%', '100%',];\r\n }\r\n \r\n return v;\r\n })(options.area),\r\n content: template,\r\n title: options.title,\r\n yes: function () {\r\n self.submit()\r\n },\r\n cancel: function () {\r\n if (options.forceRefresh) { // 是否强制刷新\r\n self._dialogs[counter] = self._idx[counter] = null;\r\n } else {\r\n self._dialogs[counter].hide();\r\n return false;\r\n }\r\n }\r\n };\r\n\r\n if (options.resetButton) {\r\n btns.push(options.lang.reset);\r\n\r\n dialogOpts.btn2 = function () { // 重置按钮\r\n self.$form.trigger('reset');\r\n \r\n return false;\r\n };\r\n }\r\n\r\n dialogOpts.btn = btns;\r\n\r\n self._idx[counter] = self._dialog.open(dialogOpts);\r\n self._dialogs[counter] = w.$('#layui-layer' + self._idx[counter]);\r\n self.$form = self._dialogs[counter].find('form').first();\r\n }\r\n\r\n // 销毁弹窗\r\n _destroy(counter) {\r\n let dialogs = this._dialogs;\r\n\r\n this._dialog.close(this._idx[counter]);\r\n\r\n dialogs[counter] && dialogs[counter].remove();\r\n\r\n dialogs[counter] = null;\r\n }\r\n\r\n // 提交表单\r\n submit() {\r\n let self = this, \r\n options = self.options,\r\n counter = self.$target.attr('counter'),\r\n $submitBtn = self._dialogs[counter].find('.layui-layer-btn0');\r\n\r\n if (self.submitting) {\r\n return;\r\n }\r\n\r\n Dcat.Form({\r\n form: self.$form,\r\n redirect: false,\r\n confirm: Dcat.FormConfirm,\r\n before: function () {\r\n // 验证表单\r\n self.$form.validator('validate');\r\n\r\n if (self.$form.find('.has-error').length > 0) {\r\n return false;\r\n }\r\n\r\n self.submitting = 1;\r\n\r\n $submitBtn.buttonLoading();\r\n },\r\n after: function (status, response) {\r\n $submitBtn.buttonLoading(false);\r\n\r\n self.submitting = 0;\r\n\r\n if (options.saved(status, response) === false) {\r\n return false;\r\n }\r\n\r\n if (! status) {\r\n return options.error(status, response);\r\n }\r\n if (response.status) {\r\n let r = options.success(status, response);\r\n\r\n self._destroy(counter);\r\n\r\n return r;\r\n }\r\n\r\n return options.error(status, response);\r\n }\r\n });\r\n\r\n return false;\r\n }\r\n}\r\n","\nlet tpl = '
{svg}
',\n loading = '.dcat-loading',\n LOADING_SVG = [\n '',\n ];\n\nclass Loading {\n constructor(Dcat, options) {\n options = $.extend({\n container: Dcat.config.pjax_container_selector,\n zIndex: 100,\n width: '52px',\n color: Dcat.color.dark60,\n background: '#fff',\n style: '',\n svg: LOADING_SVG[0]\n }, options);\n\n let _this = this,\n defStyle = 'position:absolute;',\n content;\n\n _this.$container = $(options.container);\n\n content = $(\n tpl\n .replace('{svg}', options.svg)\n .replace('{color}', options.color)\n .replace('{color}', options.color)\n .replace('{width}', options.width)\n .replace('{style}', `${defStyle}background:${options.background};z-index:${options.zIndex};${options.style}`)\n );\n content.appendTo(_this.$container);\n }\n\n destroy() {\n this.$container.find(loading).remove();\n }\n}\n\nfunction destroyAll() {\n $(loading).remove();\n}\n\nfunction extend(Dcat) {\n // 全屏居中loading\n Dcat.loading = function (options) {\n if (options === false) {\n // 关闭loading\n return setTimeout(destroyAll, 70);\n }\n // 配置参数\n options = $.extend({\n zIndex: 999991014,\n width: '58px',\n shade: 'rgba(255, 255, 255, 0.1)',\n background: 'transparent',\n top: 200,\n svg: LOADING_SVG[0],\n }, options);\n\n var win = $(window),\n // 容器\n $container = $('
'),\n // 遮罩层直接沿用layer\n shadow = $('
');\n\n $container.appendTo('body');\n\n if (options.shade) {\n shadow.appendTo('body');\n }\n\n function resize() {\n $container.css({\n left: (win.width() - 300)/2,\n top: (win.height() - options.top)/2\n });\n }\n // 自适应窗口大小\n win.on('resize', resize);\n resize();\n\n $container.loading(options);\n };\n\n // 给元素附加加载状态\n $.fn.loading = function (opt) {\n if (opt === false) {\n return $(this).find(loading).remove();\n }\n\n opt = opt || {};\n opt.container = $(this);\n\n return new Loading(Dcat, opt);\n };\n\n // 按钮加载状态\n $.fn.buttonLoading = function (start) {\n let $this = $(this),\n loadingId = $this.attr('data-loading'),\n content;\n\n if (start === false) {\n if (! loadingId) {\n return $this;\n }\n\n $this.find('.waves-ripple').remove();\n\n return $this\n .removeClass('disabled btn-loading waves-effect')\n .removeAttr('disabled')\n .removeAttr('data-loading')\n .html(\n $this.find('.' + loadingId).html()\n );\n }\n\n if (loadingId) {\n return $this;\n }\n\n content = $this.html();\n\n loadingId = 'ld-'+Dcat.helpers.random();\n\n let loading = ``;\n let btnClass = ['btn', 'layui-layer-btn0', 'layui-layer-btn1'];\n\n for (let i in btnClass) {\n if ($this.hasClass(btnClass[i])) {\n loading = LOADING_SVG[0].replace('{color}', 'currentColor').replace('{width}', '50px;height:11px;');\n }\n }\n\n return $this\n .addClass('disabled btn-loading')\n .attr('disabled', true)\n .attr('data-loading', loadingId)\n .html(`\n
${content}
\n${loading}\n`);\n }\n\n}\n\nexport default extend\n","\nexport default class AssetsLoader {\n constructor(Dcat) {\n let _this = this;\n\n _this.dcat = Dcat;\n\n Dcat.assets = {\n // 加载js脚本,并触发 ready 事件\n load: _this.load.bind(_this),\n\n // 从给定的内容中过滤\" \ No newline at end of file + From 451a35bbf5d16c001d44a2ea2c27cd98b4637852 Mon Sep 17 00:00:00 2001 From: jiangqh <841324345@qq.com> Date: Fri, 11 Feb 2022 23:59:59 +0800 Subject: [PATCH 077/170] =?UTF-8?q?hasMany=E4=BB=A5=E5=8F=8Aarray=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=94=AF=E6=8C=81=E5=B5=8C=E5=A5=97table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/form/hasmany.blade.php | 26 ++++++++++----------- resources/views/form/hasmanytable.blade.php | 24 ++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/resources/views/form/hasmany.blade.php b/resources/views/form/hasmany.blade.php index 1974cd304..e49f4e094 100755 --- a/resources/views/form/hasmany.blade.php +++ b/resources/views/form/hasmany.blade.php @@ -17,12 +17,12 @@ {!! $form->render() !!} @if($options['allowDelete']) -
- -
-
 {{ trans('admin.remove') }}
+
+ +
+
 {{ trans('admin.remove') }}
+
-
@endif
@@ -39,7 +39,7 @@
-
 {{ trans('admin.remove') }}
+
 {{ trans('admin.remove') }}

@@ -47,12 +47,12 @@ @if($options['allowCreate']) -
- -
-
 {{ trans('admin.new') }}
+
+ +
+
 {{ trans('admin.new') }}
+
-
@endif
@@ -66,7 +66,7 @@ function replaceNestedFormIndex(value) { return String(value).replace(/{{ Dcat\Admin\Form\NestedForm::DEFAULT_KEY_NAME }}/g, nestedIndex); } - $(container).on('click', '.add', function () { + $(container).on('click', '.{{$columnClass}}-add', function () { var tpl = $('template.{{ $columnClass }}-tpl'); @@ -76,7 +76,7 @@ function replaceNestedFormIndex(value) { $(forms).append(template); }); - $(container).on('click', '.remove', function () { + $(container).on('click', '.{{$columnClass}}-remove', function () { var $form = $(this).closest('.has-many-{{ $columnClass }}-form'); $form.hide(); $form.find('.{{ Dcat\Admin\Form\NestedForm::REMOVE_FLAG_CLASS }}').val(1); diff --git a/resources/views/form/hasmanytable.blade.php b/resources/views/form/hasmanytable.blade.php index 4e62577f8..04a625bd9 100755 --- a/resources/views/form/hasmanytable.blade.php +++ b/resources/views/form/hasmanytable.blade.php @@ -9,8 +9,8 @@ {{-- 用于显示错误信息 --}} -
- +
+
@foreach($headers as $header) @@ -24,9 +24,9 @@ @endif - + @foreach($forms as $pk => $form) - + @@ -55,7 +55,7 @@