From ce3d9665ea9d819cb0038cda5a55aa95b8cf7006 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 9 Dec 2021 14:13:33 +0800 Subject: [PATCH] chore(app): update template --- .../lib/template/__uniappchooselocation.js | 2182 +-- .../lib/template/__uniappopenlocation.js | 1171 +- .../lib/template/__uniapppicker.js | 1897 +-- .../lib/template/__uniappquill.js | 12154 +--------------- .../lib/template/__uniappquillimageresize.js | 1678 +-- .../uni-app-vite/lib/template/__uniappscan.js | 1263 +- 6 files changed, 7 insertions(+), 20338 deletions(-) diff --git a/packages/uni-app-vite/lib/template/__uniappchooselocation.js b/packages/uni-app-vite/lib/template/__uniappchooselocation.js index 38db8a2672..bd11f4b214 100644 --- a/packages/uni-app-vite/lib/template/__uniappchooselocation.js +++ b/packages/uni-app-vite/lib/template/__uniappchooselocation.js @@ -1,2181 +1 @@ -!(function (e) { - var t = {} - function A(a) { - if (t[a]) return t[a].exports - var i = (t[a] = { i: a, l: !1, exports: {} }) - return e[a].call(i.exports, i, i.exports, A), (i.l = !0), i.exports - } - ;(A.m = e), - (A.c = t), - (A.d = function (e, t, a) { - A.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: a }) - }), - (A.r = function (e) { - 'undefined' != typeof Symbol && - Symbol.toStringTag && - Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }), - Object.defineProperty(e, '__esModule', { value: !0 }) - }), - (A.t = function (e, t) { - if ((1 & t && (e = A(e)), 8 & t)) return e - if (4 & t && 'object' == typeof e && e && e.__esModule) return e - var a = Object.create(null) - if ( - (A.r(a), - Object.defineProperty(a, 'default', { enumerable: !0, value: e }), - 2 & t && 'string' != typeof e) - ) - for (var i in e) - A.d( - a, - i, - function (t) { - return e[t] - }.bind(null, i) - ) - return a - }), - (A.n = function (e) { - var t = - e && e.__esModule - ? function () { - return e.default - } - : function () { - return e - } - return A.d(t, 'a', t), t - }), - (A.o = function (e, t) { - return Object.prototype.hasOwnProperty.call(e, t) - }), - (A.p = ''), - A((A.s = 41)) -})([ - function (e, t) { - e.exports = {} - }, - function (e, t, A) { - 'use strict' - function a(e, t, A, a, i, n, o, s, r, c) { - var l, - u = 'function' == typeof e ? e.options : e - if (r) { - u.components || (u.components = {}) - var d = Object.prototype.hasOwnProperty - for (var h in r) - d.call(r, h) && !d.call(u.components, h) && (u.components[h] = r[h]) - } - if ( - (c && - ((c.beforeCreate || (c.beforeCreate = [])).unshift(function () { - this[c.__module] = this - }), - (u.mixins || (u.mixins = [])).push(c)), - t && ((u.render = t), (u.staticRenderFns = A), (u._compiled = !0)), - a && (u.functional = !0), - n && (u._scopeId = 'data-v-' + n), - o - ? ((l = function (e) { - ;(e = - e || - (this.$vnode && this.$vnode.ssrContext) || - (this.parent && - this.parent.$vnode && - this.parent.$vnode.ssrContext)) || - 'undefined' == typeof __VUE_SSR_CONTEXT__ || - (e = __VUE_SSR_CONTEXT__), - i && i.call(this, e), - e && e._registeredComponents && e._registeredComponents.add(o) - }), - (u._ssrRegister = l)) - : i && - (l = s - ? function () { - i.call(this, this.$root.$options.shadowRoot) - } - : i), - l) - ) - if (u.functional) { - u._injectStyles = l - var f = u.render - u.render = function (e, t) { - return l.call(t), f(e, t) - } - } else { - var g = u.beforeCreate - u.beforeCreate = g ? [].concat(g, l) : [l] - } - return { exports: e, options: u } - } - A.d(t, 'a', function () { - return a - }) - }, - function (e, t, A) { - 'use strict' - var a - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.weexPlus = t.default = void 0), - (a = - 'function' == typeof getUni - ? getUni - : function () { - var e = function (e) { - return 'function' == typeof e - }, - t = function (e) { - return e - .then(function (e) { - return [null, e] - }) - .catch(function (e) { - return [e] - }) - }, - A = /^\$|^on|^create|Sync$|Manager$|^pause/, - a = [ - 'os', - 'getCurrentSubNVue', - 'getSubNVueById', - 'stopRecord', - 'stopVoice', - 'stopBackgroundAudio', - 'stopPullDownRefresh', - 'hideKeyboard', - 'hideToast', - 'hideLoading', - 'showNavigationBarLoading', - 'hideNavigationBarLoading', - 'canIUse', - 'navigateBack', - 'closeSocket', - 'pageScrollTo', - 'drawCanvas', - ], - n = function (e) { - return ( - (!A.test(e) || 'createBLEConnection' === e) && - !~a.indexOf(e) - ) - }, - o = function (A) { - return function () { - for ( - var a = arguments.length, - i = Array(a > 1 ? a - 1 : 0), - n = 1; - n < a; - n++ - ) - i[n - 1] = arguments[n] - var o = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {} - return e(o.success) || e(o.fail) || e(o.complete) - ? A.apply(void 0, [o].concat(i)) - : t( - new Promise(function (e, t) { - A.apply( - void 0, - [ - Object.assign({}, o, { success: e, fail: t }), - ].concat(i) - ), - (Promise.prototype.finally = function (e) { - var t = this.constructor - return this.then( - function (A) { - return t.resolve(e()).then(function () { - return A - }) - }, - function (A) { - return t.resolve(e()).then(function () { - throw A - }) - } - ) - }) - }) - ) - } - }, - s = [], - r = void 0 - function c(e) { - s.forEach(function (t) { - return t({ origin: r, data: e }) - }) - } - var l = i.webview.currentWebview().id, - u = new BroadcastChannel('UNI-APP-SUBNVUE') - function d(e) { - var t = i.webview.getWebviewById(e) - return ( - t && - !t.$processed && - (function (e) { - e.$processed = !0 - var t = i.webview.currentWebview().id === e.id, - A = - 'uniNView' === e.__uniapp_origin_type && - e.__uniapp_origin_id, - a = e.id - if ( - ((e.postMessage = function (e) { - A - ? u.postMessage({ data: e, to: t ? A : a }) - : w({ type: 'UniAppSubNVue', data: e }) - }), - (e.onMessage = function (e) { - s.push(e) - }), - e.__uniapp_mask_id) - ) { - r = e.__uniapp_host - var n = e.__uniapp_mask, - o = i.webview.getWebviewById(e.__uniapp_mask_id) - o = o.parent() || o - var c = e.show, - l = e.hide, - d = e.close, - h = function () { - o.setStyle({ mask: n }) - }, - f = function () { - o.setStyle({ mask: 'none' }) - } - ;(e.show = function () { - h() - for ( - var t = arguments.length, A = Array(t), a = 0; - a < t; - a++ - ) - A[a] = arguments[a] - return c.apply(e, A) - }), - (e.hide = function () { - f() - for ( - var t = arguments.length, A = Array(t), a = 0; - a < t; - a++ - ) - A[a] = arguments[a] - return l.apply(e, A) - }), - (e.close = function () { - f() - for ( - var t = arguments.length, A = Array(t), a = 0; - a < t; - a++ - ) - A[a] = arguments[a] - return d.apply(e, A) - }) - } - })(t), - t - ) - } - u.onmessage = function (e) { - e.data.to === l && c(e.data.data) - } - var h = weex.requireModule('plus'), - f = weex.requireModule('globalEvent'), - g = 0, - p = {} - f.addEventListener('plusMessage', function (e) { - 'UniAppJsApi' === e.data.type - ? v(e.data.id, e.data.data) - : 'UniAppSubNVue' === e.data.type - ? c(e.data.data, e.data.options) - : 'onNavigationBarButtonTap' === e.data.type - ? 'function' == typeof _ && _(e.data.data) - : 'onNavigationBarSearchInputChanged' === e.data.type - ? 'function' == typeof y && y(e.data.data) - : 'onNavigationBarSearchInputConfirmed' === e.data.type - ? 'function' == typeof B && B(e.data.data) - : 'onNavigationBarSearchInputClicked' === e.data.type && - 'function' == typeof x && - x(e.data.data) - }) - var v = function (e, t) { - var A = p[e] - A - ? (A(t), A.keepAlive || delete p[e]) - : console.error('callback[' + e + '] is undefined') - }, - m = function (t) { - var A, - a, - i = t.id, - n = t.type, - o = t.params - ;(p[i] = - ((a = function (t) { - e(A) - ? A(t) - : A && - (~t.errMsg.indexOf(':ok') - ? e(A.success) && A.success(t) - : ~t.errMsg.indexOf(':fail') && - e(A.fail) && - A.fail(t), - e(A.complete) && A.complete(t)) - }), - (e((A = o)) || (A && e(A.callback))) && (a.keepAlive = !0), - a)), - h.postMessage( - { id: i, type: n, params: o }, - '__uniapp__service' - ) - } - function w(e) { - h.postMessage(e, '__uniapp__service') - } - var b = function (e) { - return function (t) { - m({ id: g++, type: e, params: t }) - } - }, - _ = void 0, - y = void 0, - B = void 0, - x = void 0 - function S(e) { - _ = e - } - function C(e) { - y = e - } - function D(e) { - B = e - } - function L(e) { - x = e - } - function I(e) { - return weex.requireModule(e) - } - var E = weex.requireModule('dom'), - k = weex.requireModule('globalEvent'), - M = [] - function N(e) { - 'function' == typeof e && (this.isUniAppReady ? e() : M.push(e)) - } - k.addEventListener('plusMessage', function (e) { - 'UniAppReady' === e.data.type && - ((N.isUniAppReady = !0), - M.length && - (M.forEach(function (e) { - return e() - }), - (M = []))) - }) - var j = - '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 - }, - O = weex.requireModule('stream'), - P = function (e) { - var t = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 'GET', - A = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : 'application/x-www-form-urlencoded' - return 'object' === (void 0 === e ? 'undefined' : j(e)) - ? 'POST' === t.toUpperCase() && - 'application/json' === A.toLowerCase() - ? JSON.stringify(e) - : Object.keys(e) - .map(function (t) { - return ( - encodeURIComponent(t) + - '=' + - encodeURIComponent(e[t]) - ) - }) - .join('&') - : e - }, - G = weex.requireModule('plusstorage'), - T = weex.requireModule('clipboard'), - Q = (function () { - if ('function' == typeof getUniEmitter) return getUniEmitter - var e = { - $on: function () { - console.warn('uni.$on failed') - }, - $off: function () { - console.warn('uni.$off failed') - }, - $once: function () { - console.warn('uni.$once failed') - }, - $emit: function () { - console.warn('uni.$emit failed') - }, - } - return function () { - return e - } - })() - function U(e, t, A) { - return e[t].apply(e, A) - } - var F = Object.freeze({ - loadFontFace: function (t) { - var A = t.family, - a = t.source, - i = (t.desc, t.success), - n = (t.fail, t.complete) - E.addRule('fontFace', { - fontFamily: A, - src: a.replace(/"/g, "'"), - }) - var o = { errMsg: 'loadFontFace:ok', status: 'loaded' } - e(i) && i(o), e(n) && n(o) - }, - ready: N, - request: function (t) { - var A = t.url, - a = t.data, - i = t.header, - n = t.method, - o = void 0 === n ? 'GET' : n, - s = t.dataType, - r = void 0 === s ? 'json' : s, - c = (t.responseType, t.success), - l = t.fail, - u = t.complete, - d = !1, - h = !1, - f = {} - if (i) - for (var g in i) - h || 'content-type' !== g.toLowerCase() - ? (f[g] = i[g]) - : ((h = !0), (f['Content-Type'] = i[g])) - return ( - 'GET' === o && - a && - (A = - A + - (~A.indexOf('?') - ? '&' === A.substr(-1) || '?' === A.substr(-1) - ? '' - : '&' - : '?') + - P(a)), - O.fetch( - { - url: A, - method: o, - headers: f, - type: 'json' === r ? 'json' : 'text', - body: 'GET' !== o ? P(a, o, f['Content-Type']) : '', - }, - function (t) { - var A = t.status, - a = (t.ok, t.statusText, t.data), - i = t.headers, - n = {} - !A || -1 === A || d - ? ((n.errMsg = 'request:fail'), e(l) && l(n)) - : ((n.data = a), - (n.statusCode = A), - (n.header = i), - e(c) && c(n)), - e(u) && u(n) - } - ), - { - abort: function () { - d = !0 - }, - } - ) - }, - getStorage: function (t) { - var A = t.key, - a = (t.data, t.success), - i = t.fail, - n = t.complete - G.getItem(A + '__TYPE', function (t) { - if ('success' === t.result) { - var o = t.data - G.getItem(A, function (t) { - if ('success' === t.result) { - var A = t.data - o && A - ? ('String' !== o && (A = JSON.parse(A)), - e(a) && a({ errMsg: 'getStorage:ok', data: A })) - : ((t.errMsg = 'setStorage:fail'), e(i) && i(t)) - } else (t.errMsg = 'setStorage:fail'), e(i) && i(t) - e(n) && n(t) - }) - } else - (t.errMsg = 'setStorage:fail'), - e(i) && i(t), - e(n) && n(t) - }) - }, - setStorage: function (t) { - var A = t.key, - a = t.data, - i = t.success, - n = t.fail, - o = t.complete, - s = 'String' - 'object' === (void 0 === a ? 'undefined' : j(a)) && - ((s = 'Object'), (a = JSON.stringify(a))), - G.setItem(A, a, function (t) { - 'success' === t.result - ? G.setItem(A + '__TYPE', s, function (t) { - 'success' === t.result - ? e(i) && i({ errMsg: 'setStorage:ok' }) - : ((t.errMsg = 'setStorage:fail'), e(n) && n(t)) - }) - : ((t.errMsg = 'setStorage:fail'), e(n) && n(t)), - e(o) && o(t) - }) - }, - removeStorage: function (t) { - var A = t.key, - a = (t.data, t.success), - i = t.fail, - n = t.complete - G.removeItem(A, function (t) { - 'success' === t.result - ? e(a) && a({ errMsg: 'removeStorage:ok' }) - : ((t.errMsg = 'removeStorage:fail'), e(i) && i(t)), - e(n) && n(t) - }), - G.removeItem(A + '__TYPE') - }, - clearStorage: function (e) { - e.key, e.data, e.success, e.fail, e.complete - }, - getClipboardData: function (t) { - var A = t.success, - a = (t.fail, t.complete) - T.getString(function (t) { - var i = { errMsg: 'getClipboardData:ok', data: t.data } - e(A) && A(i), e(a) && a(i) - }) - }, - setClipboardData: function (t) { - var A = t.data, - a = t.success, - i = (t.fail, t.complete), - n = { errMsg: 'setClipboardData:ok' } - T.setString(A), e(a) && a(n), e(i) && i(n) - }, - onSubNVueMessage: c, - getSubNVueById: d, - getCurrentSubNVue: function () { - return d(i.webview.currentWebview().id) - }, - $on: function () { - return U( - Q(), - '$on', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $off: function () { - return U( - Q(), - '$off', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $once: function () { - return U( - Q(), - '$once', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $emit: function () { - return U( - Q(), - '$emit', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - }), - R = { os: { nvue: !0 } }, - V = {} - return ( - 'undefined' != typeof Proxy - ? (V = new Proxy( - {}, - { - get: function (e, t) { - if ('os' === t) return { nvue: !0 } - if ('postMessage' === t) return w - if ('requireNativePlugin' === t) return I - if ('onNavigationBarButtonTap' === t) return S - if ('onNavigationBarSearchInputChanged' === t) - return C - if ('onNavigationBarSearchInputConfirmed' === t) - return D - if ('onNavigationBarSearchInputClicked' === t) - return L - var A = F[t] - return A || (A = b(t)), n(t) ? o(A) : A - }, - } - )) - : (Object.keys(R).forEach(function (e) { - V[e] = R[e] - }), - (V.postMessage = w), - (V.requireNativePlugin = I), - (V.onNavigationBarButtonTap = S), - (V.onNavigationBarSearchInputChanged = C), - (V.onNavigationBarSearchInputConfirmed = D), - (V.onNavigationBarSearchInputClicked = L), - Object.keys({ - uploadFile: !0, - downloadFile: !0, - chooseImage: !0, - previewImage: !0, - getImageInfo: !0, - saveImageToPhotosAlbum: !0, - chooseVideo: !0, - saveVideoToPhotosAlbum: !0, - saveFile: !0, - getSavedFileList: !0, - getSavedFileInfo: !0, - removeSavedFile: !0, - openDocument: !0, - setStorage: !0, - getStorage: !0, - getStorageInfo: !0, - removeStorage: !0, - clearStorage: !0, - getLocation: !0, - chooseLocation: !0, - openLocation: !0, - getSystemInfo: !0, - getNetworkType: !0, - makePhoneCall: !0, - scanCode: !0, - setScreenBrightness: !0, - getScreenBrightness: !0, - setKeepScreenOn: !0, - vibrateLong: !0, - vibrateShort: !0, - addPhoneContact: !0, - showToast: !0, - showLoading: !0, - hideToast: !0, - hideLoading: !0, - showModal: !0, - showActionSheet: !0, - setNavigationBarTitle: !0, - setNavigationBarColor: !0, - navigateTo: !0, - redirectTo: !0, - reLaunch: !0, - switchTab: !0, - navigateBack: !0, - getProvider: !0, - login: !0, - getUserInfo: !0, - share: !0, - requestPayment: !0, - subscribePush: !0, - unsubscribePush: !0, - onPush: !0, - offPush: !0, - }).forEach(function (e) { - var t = F[e] - t || (t = b(e)), n(e) ? (V[e] = o(t)) : (V[e] = t) - })), - V - ) - }) - var i = new WeexPlus(weex) - t.weexPlus = i - var n = a(weex, i, BroadcastChannel) - t.default = n - }, - function (e, t, A) { - ;(Vue.prototype.__$appStyle__ = {}), - Vue.prototype.__merge_style && - Vue.prototype.__merge_style(A(4).default, Vue.prototype.__$appStyle__) - }, - function (e, t, A) { - 'use strict' - A.r(t) - var a = A(0), - i = A.n(a) - for (var n in a) - 'default' !== n && - (function (e) { - A.d(t, e, function () { - return a[e] - }) - })(n) - t.default = i.a - }, - function (e, t, A) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var A = { - onLoad: function () { - this.initMessage() - }, - methods: { - initMessage: function () { - var t = this, - A = e.webview.currentWebview().extras || {}, - a = A.from, - i = (A.callback, A.runtime), - n = A.data, - o = void 0 === n ? {} : n, - s = A.useGlobalEvent - ;(this.__from = a), - (this.__runtime = i), - (this.__page = e.webview.currentWebview().id), - (this.__useGlobalEvent = s), - (this.data = JSON.parse(JSON.stringify(o))), - e.key.addEventListener('backbutton', function () { - 'function' == typeof t.onClose - ? t.onClose() - : e.webview.currentWebview().close('auto') - }) - var r = this, - c = function (e) { - var t = e.data && e.data.__message - t && r.__onMessageCallback && r.__onMessageCallback(t.data) - } - this.__useGlobalEvent - ? weex - .requireModule('globalEvent') - .addEventListener('plusMessage', c) - : (new BroadcastChannel(this.__page).onmessage = c) - }, - postMessage: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {}, - A = - arguments.length > 1 && void 0 !== arguments[1] && arguments[1], - a = JSON.parse( - JSON.stringify({ - __message: { __page: this.__page, data: t, keep: A }, - }) - ), - i = this.__from - if ('v8' === this.__runtime) - if (this.__useGlobalEvent) e.webview.postMessageToUniNView(a, i) - else { - var n = new BroadcastChannel(i) - n.postMessage(a) - } - else { - var o = e.webview.getWebviewById(i) - o && - o.evalJS( - '__plusMessage&&__plusMessage('.concat( - JSON.stringify({ data: a }), - ')' - ) - ) - } - }, - onMessage: function (e) { - this.__onMessageCallback = e - }, - }, - } - t.default = A - }.call(this, A(2).weexPlus)) - }, - function (e, t, A) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var A = { - data: function () { - return { - locale: 'en', - fallbackLocale: 'en', - localization: { - en: { done: 'OK', cancel: 'Cancel' }, - zh: { done: '完成', cancel: '取消' }, - 'zh-hans': {}, - 'zh-hant': {}, - messages: {}, - }, - } - }, - onLoad: function () { - this.initLocale() - }, - created: function () { - this.initLocale() - }, - methods: { - initLocale: function () { - if (!this.__initLocale) { - this.__initLocale = !0 - var t = (e.webview.currentWebview().extras || {}).data || {} - if ( - (t.messages && (this.localization.messages = t.messages), - t.locale) - ) - this.locale = t.locale.toLowerCase() - else { - var A = e.os.language - .toLowerCase() - .split('/')[0] - .replace('_', '-') - .split('-'), - a = A[1] - a && - (A[1] = - { - chs: 'hans', - cn: 'hans', - sg: 'hans', - cht: 'hant', - tw: 'hant', - hk: 'hant', - mo: 'hant', - }[a] || a), - (A.length = A.length > 2 ? 2 : A.length), - (this.locale = A.join('-')) - } - } - }, - localize: function (e) { - var t = this.locale, - A = t.split('-')[0], - a = this.fallbackLocale, - i = this.localization - function n(e) { - return i[e] || {} - } - return n('messages')[e] || n(t)[e] || n(A)[e] || n(a)[e] || e - }, - }, - } - t.default = A - }.call(this, A(2).weexPlus)) - }, - function (e, t, A) { - 'use strict' - var a = A(29), - i = A(12), - n = A(1) - var o = Object(n.a)( - i.default, - a.b, - a.c, - !1, - null, - null, - '14d2bcf2', - !1, - a.a, - void 0 - ) - ;(function (e) { - this.options.style || (this.options.style = {}), - Vue.prototype.__merge_style && - Vue.prototype.__$appStyle__ && - Vue.prototype.__merge_style( - Vue.prototype.__$appStyle__, - this.options.style - ), - Vue.prototype.__merge_style - ? Vue.prototype.__merge_style(A(36).default, this.options.style) - : Object.assign(this.options.style, A(36).default) - }.call(o), - (t.default = o.exports)) - }, - , - , - , - , - function (e, t, A) { - 'use strict' - var a = A(13), - i = A.n(a) - t.default = i.a - }, - function (e, t, A) { - 'use strict' - ;(function (e, a) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var i = o(A(5)), - n = o(A(6)) - function o(e) { - return e && e.__esModule ? e : { default: e } - } - function s(e, t) { - var A = Object.keys(e) - if (Object.getOwnPropertySymbols) { - var a = Object.getOwnPropertySymbols(e) - t && - (a = a.filter(function (t) { - return Object.getOwnPropertyDescriptor(e, t).enumerable - })), - A.push.apply(A, a) - } - return A - } - function r(e, t, A) { - return ( - t in e - ? Object.defineProperty(e, t, { - value: A, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (e[t] = A), - e - ) - } - weex - .requireModule('dom') - .addRule('fontFace', { - fontFamily: 'unichooselocation', - src: "url('data:font/truetype;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8gE4kAAABfAAAAFZjbWFw4nGd6QAAAegAAAGyZ2x5Zn61L/EAAAOoAAACJGhlYWQXJ/zZAAAA4AAAADZoaGVhB94DhgAAALwAAAAkaG10eBQAAAAAAAHUAAAAFGxvY2EBUAGyAAADnAAAAAxtYXhwARMAZgAAARgAAAAgbmFtZWs+cdAAAAXMAAAC2XBvc3SV1XYLAAAIqAAAAE4AAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAUAAQAAAAEAAFP+qyxfDzz1AAsEAAAAAADaBFxuAAAAANoEXG4AAP+gBAADYAAAAAgAAgAAAAAAAAABAAAABQBaAAQAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5grsMgOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAFAAAAAwAAACwAAAAEAAABcgABAAAAAABsAAMAAQAAACwAAwAKAAABcgAEAEAAAAAKAAgAAgAC5grmHOZR7DL//wAA5grmHOZR7DL//wAAAAAAAAAAAAEACgAKAAoACgAAAAQAAwACAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAEAAAAAAAAAABAAA5goAAOYKAAAABAAA5hwAAOYcAAAAAwAA5lEAAOZRAAAAAgAA7DIAAOwyAAAAAQAAAAAAAAB+AKAA0gESAAQAAP+gA+ADYAAAAAkAMQBZAAABIx4BMjY0JiIGBSMuASc1NCYiBh0BDgEHIyIGFBY7AR4BFxUUFjI2PQE+ATczMjY0JgE1NCYiBh0BLgEnMzI2NCYrAT4BNxUUFjI2PQEeARcjIgYUFjsBDgECAFABLUQtLUQtAg8iD9OcEhwSnNMPIg4SEg4iD9OcEhwSnNMPIg4SEv5SEhwSga8OPg4SEg4+Dq+BEhwSga8OPg4SEg4+Dq8BgCItLUQtLQKc0w8iDhISDiIP05wSHBKc0w8iDhISDiIP05wSHBL+gj4OEhIOPg6vgRIcEoGvDj4OEhIOPg6vgRIcEoGvAAEAAAAAA4ECgQAQAAABPgEeAQcBDgEvASY0NhYfAQM2DCIbAgz+TA0kDfcMGiIN1wJyDQIZIg3+IQ4BDf4NIhoBDd0AAQAAAAADAgKCAB0AAAE3PgEuAgYPAScmIgYUHwEHBhQWMj8BFxYyNjQnAjy4CAYGEBcWCLe3DSIaDLi4DBkjDbe3DSMZDAGAtwgWFxAGBgi4uAwaIg23tw0jGQy4uAwZIw0AAAIAAP/fA6EDHgAVACYAACUnPgE3LgEnDgEHHgEXMjY3FxYyNjQlBiIuAjQ+AjIeAhQOAQOX2CcsAQTCkpLCAwPCkj5uLdkJGRH+ijV0Z08rK09ndGdPLCxPE9MtckGSwgQEwpKSwgMoJdQIEhi3FixOaHNnTywsT2dzaE4AAAAAAAASAN4AAQAAAAAAAAAVAAAAAQAAAAAAAQARABUAAQAAAAAAAgAHACYAAQAAAAAAAwARAC0AAQAAAAAABAARAD4AAQAAAAAABQALAE8AAQAAAAAABgARAFoAAQAAAAAACgArAGsAAQAAAAAACwATAJYAAwABBAkAAAAqAKkAAwABBAkAAQAiANMAAwABBAkAAgAOAPUAAwABBAkAAwAiAQMAAwABBAkABAAiASUAAwABBAkABQAWAUcAAwABBAkABgAiAV0AAwABBAkACgBWAX8AAwABBAkACwAmAdUKQ3JlYXRlZCBieSBpY29uZm9udAp1bmljaG9vc2Vsb2NhdGlvblJlZ3VsYXJ1bmljaG9vc2Vsb2NhdGlvbnVuaWNob29zZWxvY2F0aW9uVmVyc2lvbiAxLjB1bmljaG9vc2Vsb2NhdGlvbkdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgBSAGUAZwB1AGwAYQByAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgB1AG4AaQBjAGgAbwBvAHMAZQBsAG8AYwBhAHQAaQBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAQIBAwEEAQUBBgAKbXlsb2NhdGlvbgZ4dWFuemUFY2xvc2UGc291c3VvAAAAAA==')", - }) - var c = weex.requireModule('mapSearch'), - l = - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACcCAMAAAC3Fl5oAAAB3VBMVEVMaXH/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/EhL/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/Dw//AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/GRn/NTX/Dw//Fhb/AAD/AAD/AAD/GRn/GRn/Y2P/AAD/AAD/ExP/Ghr/AAD/AAD/MzP/GRn/AAD/Hh7/AAD/RUX/AAD/AAD/AAD/AAD/AAD/AAD/Dg7/AAD/HR3/Dw//FRX/SUn/AAD/////kJD/DQ3/Zmb/+/v/wMD/mJj/6en/vb3/1NT//Pz/ODj/+fn/3Nz/nJz/j4//9/f/7e3/9vb/7Oz/2Nj/x8f/Ozv/+Pj/3d3/nZ3/2dn//f3/6Oj/2tr/v7//09P/vr7/mZn/l5cdSvP3AAAAe3RSTlMAAhLiZgTb/vztB/JMRhlp6lQW86g8mQ4KFPs3UCH5U8huwlesWtTYGI7RsdVeJGfTW5rxnutLsvXWF8vQNdo6qQbuz7D4hgVIx2xtw8GC1TtZaIw0i84P98tU0/fsj7PKaAgiZZxeVfo8Z52eg1P0nESrENnjXVPUgw/uuSmDAAADsUlEQVR42u3aZ3cTRxgF4GtbYleSLdnGcsENG2ODjbExEHrvhAQCIb1Bem+QdkeuuFMNBBJIfmuOckzZI8/srHYmH3Lm+QNXK632LTvQ03Tu/IWeU/tTGTKT2n+q58L5c00wpXJd47DHEt5w47pKxLbhdLdPKb/7dBYxVLxw1GcI/2h1BcpzKNFHLX2JQ4gumaiitqpEEhEdOMJI9h5AFC3feYzI+7IF2tpSLEOqDXpObPRYFm/jCWho/4Ble7MdoT7fzhhq9yHEz28wltU1UPrJZ0wd66HwicfYvEFIfePTAP8tSLTupBHvtGJFH9bSkNrNWEHzERrT34xSH9Ogr1CijkbVAUH1KRqVqkdQAw07iIAaGlcTqI+/0LjeJJ5J0IIEnkpXMdzs4sTtW9dnZq7fuj2xOMtwVWk88RHDjBYejYvnjD8qjOpfQsUqhvj7oSjxcJIhVj3pyKqpNjYvVjQ/RrXq5YABKi3MCYm5BSrtWO5v11DlmlC4RpU1WRS9SJU7QukOVbpQ9JLu549+Dd0AUOlTbkGEuk85vxLAK5QbuytC3R2j3HoAjZSbFxrmKTcCoJdSk0LLJKV6gSaPMqNTQsvUKGW8JrxKqUWhaZFSeWyh1LTQNE2pHF6mzOy40DQ+S5mLimJcENoKlOnBWsr8KbRNUGYt5LXgd6HtD3lNQIoyN4S2G5RJIUOZm0LbTcqsBqVmhLYZSlkPsP4VWf+Rrd+m1v9o9h8Vv5p42C1R5qL1x7WRglOgVN52yfwNOBu76P+lLPoYidu23KPciIHGa07ZeIW1jvcNtI7q5vexCPGYCmf+m/Y9a3sAwQ5bI9T7ukPgPcn9GToEao+xk1OixJT+GIsvNAbx6eAgPq0xiF+KtkpYKhRXCQ8eFFcJhSWGu3rZ8jJkCM8kz9K4TUnrC6mAgzTsB9tLwQ2W15qfosQ2GrQNpZr7aczbzVjBZsvLcaC1g0bsbIVEnU8DOr6H1KDH2LwtUBi0/JII6Dxm9zUXkH+XMWzfh1Dte1i2Pe3QkC77Zel7aehpO8wyHG6Dtt0NjKxhN6I4uSli/TqJiJJDUQ4NDCURXTrXRy1XcumyD24M+AzhD1RXIIZsl/LoyZmurJHDM7s8lvB2FQ/PmPJ6PseAXP5HGMYAAC7ABbgAF+ACXIALcAEuwAW4ABfgAlyAC3ABLsAFuID/d8Cx4NEt8/byOf0wLnis8zjMq9/Kp7bWw4JOj8u8TlhRl+G/Mp2wpOX48GffvvZ1CyL4B53LAS6zb08EAAAAAElFTkSuQmCC' - var u = { - mixins: [i.default, n.default], - data: function () { - return { - positionIcon: l, - mapScale: 16, - userKeyword: '', - showLocation: !0, - latitude: 39.908692, - longitude: 116.397477, - nearList: [], - nearSelectedIndex: -1, - nearLoading: !1, - nearLoadingEnd: !1, - noNearData: !1, - isUserLocation: !1, - statusBarHeight: 20, - mapHeight: 250, - markers: [ - { - id: 'location', - latitude: 39.908692, - longitude: 116.397477, - zIndex: '1', - iconPath: l, - width: 26, - height: 36, - }, - ], - showSearch: !1, - searchList: [], - searchSelectedIndex: -1, - searchLoading: !1, - searchEnd: !1, - noSearchData: !1, - localization: { - en: { - search_tips: 'Search for a place', - no_found: 'No results found', - nearby: 'Nearby', - more: 'More', - }, - zh: { - search_tips: '搜索地点', - no_found: '对不起,没有搜索到相关数据', - nearby: '附近', - more: '更多', - }, - }, - searchNearFlag: !0, - searchMethod: 'poiSearchNearBy', - } - }, - computed: { - disableOK: function () { - return this.nearSelectedIndex < 0 && this.searchSelectedIndex < 0 - }, - searchMethods: function () { - return [ - { title: this.localize('nearby'), method: 'poiSearchNearBy' }, - { title: this.localize('more'), method: 'poiKeywordsSearch' }, - ] - }, - }, - filters: { - distance: function (e) { - return e > 100 - ? ''.concat( - e > 1e3 ? (e / 1e3).toFixed(1) + 'k' : e.toFixed(0), - 'm | ' - ) - : e > 0 - ? '100m内 | ' - : '' - }, - }, - watch: { - searchMethod: function () { - ;(this._searchPageIndex = 1), - (this.searchEnd = !1), - (this.searchList = []), - this._searchKeyword && this.search() - }, - }, - onLoad: function () { - ;(this.statusBarHeight = e.navigator.getStatusbarHeight()), - (this.mapHeight = e.screen.resolutionHeight / 2) - var t = this.data - ;(this.userKeyword = t.keyword || ''), - (this._searchInputTimer = null), - (this._searchPageIndex = 1), - (this._searchKeyword = ''), - (this._nearPageIndex = 1), - (this._hasUserLocation = !1), - (this._userLatitude = 0), - (this._userLongitude = 0) - }, - onReady: function () { - ;(this.mapContext = this.$refs.map1), - this.data.latitude && this.data.longitude - ? ((this._hasUserLocation = !0), - this.moveToCenter({ - latitude: this.data.latitude, - longitude: this.data.longitude, - })) - : this.getUserLocation() - }, - onUnload: function () { - this.clearSearchTimer() - }, - methods: { - cancelClick: function () { - this.postMessage({ event: 'cancel' }) - }, - doneClick: function () { - if (!this.disableOK) { - var e = - this.showSearch && this.searchSelectedIndex >= 0 - ? this.searchList[this.searchSelectedIndex] - : this.nearList[this.nearSelectedIndex], - t = { - name: e.name, - address: e.address, - latitude: e.location.latitude, - longitude: e.location.longitude, - } - this.postMessage({ event: 'selected', detail: t }) - } - }, - getUserLocation: function () { - var t = this - e.geolocation.getCurrentPosition( - function (e) { - var A = e.coordsType, - a = e.coords - 'wgs84' === A.toLowerCase() - ? t.wgs84togcjo2(a, function (e) { - t.getUserLocationSuccess(e) - }) - : t.getUserLocationSuccess(a) - }, - function (e) { - ;(t._hasUserLocation = !0), - a( - 'log', - 'Gelocation Error: code - ' + - e.code + - '; message - ' + - e.message, - ' at template/__uniappchooselocation.nvue:292' - ) - }, - { geocode: !1 } - ) - }, - getUserLocationSuccess: function (e) { - ;(this._userLatitude = e.latitude), - (this._userLongitude = e.longitude), - (this._hasUserLocation = !0), - this.moveToCenter({ - latitude: e.latitude, - longitude: e.longitude, - }) - }, - searchclick: function (t) { - ;(this.showSearch = t), !1 === t && e.key.hideSoftKeybord() - }, - showSearchView: function () { - ;(this.searchList = []), (this.showSearch = !0) - }, - hideSearchView: function () { - ;(this.showSearch = !1), - e.key.hideSoftKeybord(), - (this.noSearchData = !1), - (this.searchSelectedIndex = -1), - (this._searchKeyword = '') - }, - onregionchange: function (e) { - var t = this, - A = e.detail, - a = A.type || e.type - 'drag' === (A.causedBy || e.causedBy) && - 'end' === a && - this.mapContext.getCenterLocation(function (e) { - t.searchNearFlag - ? t.moveToCenter({ - latitude: e.latitude, - longitude: e.longitude, - }) - : (t.searchNearFlag = !t.searchNearFlag) - }) - }, - onItemClick: function (e, t) { - ;(this.searchNearFlag = !1), - t.stopPropagation && t.stopPropagation(), - this.nearSelectedIndex !== e && (this.nearSelectedIndex = e), - this.moveToLocation(this.nearList[e] && this.nearList[e].location) - }, - moveToCenter: function (e) { - ;(this.latitude === e.latitude && this.longitude === e.longitude) || - ((this.latitude = e.latitude), - (this.longitude = e.longitude), - this.updateCenter(e), - this.moveToLocation(e), - (this.isUserLocation = - this._userLatitude === e.latitude && - this._userLongitude === e.longitude)) - }, - updateCenter: function (e) { - var t = this - ;(this.nearSelectedIndex = -1), - (this.nearList = []), - this._hasUserLocation && - ((this._nearPageIndex = 1), - (this.nearLoadingEnd = !1), - this.reverseGeocode(e), - this.searchNearByPoint(e), - this.onItemClick(0, { - stopPropagation: function () { - t.searchNearFlag = !0 - }, - }), - this.$refs.nearListLoadmore.resetLoadmore()) - }, - searchNear: function () { - this.nearLoadingEnd || - this.searchNearByPoint({ - latitude: this.latitude, - longitude: this.longitude, - }) - }, - searchNearByPoint: function (e) { - var t = this - ;(this.noNearData = !1), - (this.nearLoading = !0), - c.poiSearchNearBy( - { - point: { latitude: e.latitude, longitude: e.longitude }, - key: this.userKeyword, - sortrule: 1, - index: this._nearPageIndex, - radius: 1e3, - }, - function (e) { - ;(t.nearLoading = !1), - (t._nearPageIndex = e.pageIndex + 1), - (t.nearLoadingEnd = e.pageIndex === e.pageNumber), - e.poiList && e.poiList.length - ? (t.fixPois(e.poiList), - (t.nearList = t.nearList.concat(e.poiList)), - t.fixNearList()) - : (t.noNearData = 0 === t.nearList.length) - } - ) - }, - moveToLocation: function (e) { - e && - this.mapContext.moveToLocation( - (function (e) { - for (var t = 1; t < arguments.length; t++) { - var A = null != arguments[t] ? arguments[t] : {} - t % 2 - ? s(Object(A), !0).forEach(function (t) { - r(e, t, A[t]) - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - e, - Object.getOwnPropertyDescriptors(A) - ) - : s(Object(A)).forEach(function (t) { - Object.defineProperty( - e, - t, - Object.getOwnPropertyDescriptor(A, t) - ) - }) - } - return e - })({}, e, { - fail: function (e) { - a( - 'error', - 'chooseLocation_moveToLocation', - e, - ' at template/__uniappchooselocation.nvue:419' - ) - }, - }) - ) - }, - reverseGeocode: function (e) { - var t = this - c.reverseGeocode({ point: e }, function (A) { - 'success' === A.type && - t._nearPageIndex <= 2 && - (t.nearList.splice(0, 0, { - code: A.code, - location: e, - name: '地图位置', - address: A.address || '', - }), - t.fixNearList()) - }) - }, - fixNearList: function () { - var e = this.nearList - if (e.length >= 2 && '地图位置' === e[0].name) { - var t = this.getAddressStart(e[1]), - A = e[0].address - A.startsWith(t) && (e[0].name = A.substring(t.length)) - } - }, - onsearchinput: function (e) { - var t = this, - A = e.detail.value.replace(/^\s+|\s+$/g, '') - this.clearSearchTimer(), - (this._searchInputTimer = setTimeout(function () { - clearTimeout(t._searchInputTimer), - (t._searchPageIndex = 1), - (t.searchEnd = !1), - (t._searchKeyword = A), - (t.searchList = []), - t.search() - }, 300)) - }, - clearSearchTimer: function () { - this._searchInputTimer && clearTimeout(this._searchInputTimer) - }, - search: function () { - var e = this - 0 === this._searchKeyword.length || - this._searchEnd || - this.searchLoading || - ((this.searchLoading = !0), - (this.noSearchData = !1), - c[this.searchMethod]( - { - point: { latitude: this.latitude, longitude: this.longitude }, - key: this._searchKeyword, - sortrule: 1, - index: this._searchPageIndex, - radius: 5e4, - }, - function (t) { - ;(e.searchLoading = !1), - (e._searchPageIndex = t.pageIndex + 1), - (e.searchEnd = t.pageIndex === t.pageNumber), - t.poiList && t.poiList.length - ? (e.fixPois(t.poiList), - (e.searchList = e.searchList.concat(t.poiList))) - : (e.noSearchData = 0 === e.searchList.length) - } - )) - }, - onSearchListTouchStart: function () { - e.key.hideSoftKeybord() - }, - onSearchItemClick: function (e, t) { - t.stopPropagation(), - this.searchSelectedIndex !== e && (this.searchSelectedIndex = e), - this.moveToLocation( - this.searchList[e] && this.searchList[e].location - ) - }, - getAddressStart: function (e) { - var t = e.addressOrigin || e.address - return ( - e.province + - (e.province === e.city ? '' : e.city) + - (/^\d+$/.test(e.district) - ? '' - : t.startsWith(e.district) - ? '' - : e.district) - ) - }, - fixPois: function (e) { - for (var t = 0; t < e.length; t++) { - var A = e[t] - ;(A.name = A.name.replace(/\\/g, '')), - (A.addressOrigin = A.address.replace(/\\/g, '')), - (A.address = this.getAddressStart(A) + A.addressOrigin) - } - }, - wgs84togcjo2: function (e, t) { - var A = weex.requireModule('stream'), - a = 'https://apis.map.qq.com/jsapi?qt=translate&type=1&points=' - .concat(e.longitude, ',') - .concat( - e.latitude, - '&key=MAP_KEY&output=json&pf=jsapi&ref=jsapi' - ) - A.fetch({ method: 'GET', url: a, type: 'json' }, function (e) { - if (e.ok) { - var A = e.data.detail.points[0] - t({ latitude: A.lat, longitude: A.lng }) - } - }) - }, - }, - } - t.default = u - }.call(this, A(2).weexPlus, A(35).default)) - }, - function (e, t) { - e.exports = { - map_center_marker_container: { - alignItems: 'flex-start', - width: '22', - height: '70', - }, - map_center_marker: { width: '22', height: '35' }, - 'unichooselocation-icons': { - fontFamily: 'unichooselocation', - textDecoration: 'none', - textAlign: 'center', - }, - page: { flex: 1, position: 'relative' }, - 'flex-r': { flexDirection: 'row', flexWrap: 'nowrap' }, - 'flex-c': { flexDirection: 'column', flexWrap: 'nowrap' }, - 'flex-fill': { flex: 1 }, - 'a-i-c': { alignItems: 'center' }, - 'j-c-c': { justifyContent: 'center' }, - 'nav-cover': { - position: 'absolute', - left: 0, - top: 0, - right: 0, - height: '100', - backgroundImage: - 'linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0))', - }, - statusbar: { height: '22' }, - 'title-view': { - paddingTop: '5', - paddingRight: '15', - paddingBottom: '5', - paddingLeft: '15', - }, - 'btn-cancel': { - paddingTop: 0, - paddingRight: 0, - paddingBottom: 0, - paddingLeft: 0, - }, - 'btn-cancel-text': { fontSize: '30', color: '#ffffff' }, - 'btn-done': { - backgroundColor: '#007AFF', - borderRadius: '3', - paddingTop: '5', - paddingRight: '12', - paddingBottom: '5', - paddingLeft: '12', - }, - 'btn-done-disabled': { backgroundColor: '#62abfb' }, - 'text-done': { - color: '#ffffff', - fontSize: '15', - fontWeight: 'bold', - lineHeight: '15', - height: '15', - }, - 'text-done-disabled': { color: '#c0ddfe' }, - 'map-view': { flex: 2, position: 'relative' }, - map: { width: '750rpx', justifyContent: 'center', alignItems: 'center' }, - 'map-location': { - position: 'absolute', - right: '20', - bottom: '25', - width: '44', - height: '44', - backgroundColor: '#ffffff', - borderRadius: '40', - boxShadow: '0 2px 4px rgba(100, 100, 100, 0.2)', - }, - 'map-location-text': { fontSize: '20' }, - 'map-location-text-active': { color: '#007AFF' }, - 'result-area': { flex: 2, position: 'relative' }, - 'search-bar': { - paddingTop: '12', - paddingRight: '15', - paddingBottom: '12', - paddingLeft: '15', - backgroundColor: '#ffffff', - }, - 'search-area': { - backgroundColor: '#ebebeb', - borderRadius: '5', - height: '30', - paddingLeft: '8', - }, - 'search-text': { fontSize: '14', lineHeight: '16', color: '#b4b4b4' }, - 'search-icon': { fontSize: '16', color: '#b4b4b4', marginRight: '4' }, - 'search-tab': { - flexDirection: 'row', - paddingTop: '2', - paddingRight: '16', - paddingBottom: '2', - paddingLeft: '16', - marginTop: '-10', - backgroundColor: '#FFFFFF', - }, - 'search-tab-item': { - marginTop: 0, - marginRight: '5', - marginBottom: 0, - marginLeft: '5', - textAlign: 'center', - fontSize: '14', - lineHeight: '32', - color: '#333333', - borderBottomStyle: 'solid', - borderBottomWidth: '2', - borderBottomColor: 'rgba(0,0,0,0)', - }, - 'search-tab-item-active': { borderBottomColor: '#0079FF' }, - 'no-data': { color: '#808080' }, - 'no-data-search': { marginTop: '50' }, - 'list-item': { - position: 'relative', - paddingTop: '12', - paddingRight: '15', - paddingBottom: '12', - paddingLeft: '15', - }, - 'list-line': { - position: 'absolute', - left: '15', - right: 0, - bottom: 0, - height: '.5', - backgroundColor: '#d3d3d3', - }, - 'list-name': { fontSize: '14', lines: 1, textOverflow: 'ellipsis' }, - 'list-address': { - fontSize: '12', - color: '#808080', - lines: 1, - textOverflow: 'ellipsis', - marginTop: '5', - }, - 'list-icon-area': { paddingLeft: '10', paddingRight: '10' }, - 'list-selected-icon': { fontSize: '20', color: '#007AFF' }, - 'search-view': { - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - backgroundColor: '#f6f6f6', - }, - 'searching-area': { flex: 5 }, - 'search-input': { fontSize: '14', height: '30', paddingLeft: '6' }, - 'search-cancel': { color: '#0079FF', marginLeft: '10' }, - 'loading-view': { - paddingTop: '15', - paddingRight: '15', - paddingBottom: '15', - paddingLeft: '15', - }, - 'loading-icon': { width: '28', height: '28', color: '#808080' }, - } - }, - , - , - , - , - , - , - , - , - , - , - , - , - , - , - function (e, t, A) { - 'use strict' - var a = function () { - var e = this, - t = e.$createElement, - A = e._self._c || t - return A( - 'scroll-view', - { - staticStyle: { flexDirection: 'column' }, - attrs: { scrollY: !0, enableBackToTop: !0, bubble: 'true' }, - }, - [ - A('view', { staticClass: ['page', 'flex-c'] }, [ - A( - 'view', - { staticClass: ['flex-r', 'map-view'] }, - [ - A( - 'map', - { - ref: 'map1', - staticClass: ['map', 'flex-fill'], - style: 'height:' + e.mapHeight + 'px', - attrs: { - scale: e.mapScale, - showLocation: e.showLocation, - longitude: e.longitude, - latitude: e.latitude, - }, - on: { regionchange: e.onregionchange }, - }, - [ - A( - 'div', - { staticClass: ['map_center_marker_container'] }, - [ - A('u-image', { - staticClass: ['map_center_marker'], - attrs: { src: e.positionIcon }, - }), - ], - 1 - ), - ] - ), - A( - 'view', - { - staticClass: ['map-location', 'flex-c', 'a-i-c', 'j-c-c'], - on: { - click: function (t) { - e.getUserLocation() - }, - }, - }, - [ - A( - 'u-text', - { - staticClass: [ - 'unichooselocation-icons', - 'map-location-text', - ], - class: { - 'map-location-text-active': e.isUserLocation, - }, - }, - [e._v('')] - ), - ] - ), - A('view', { staticClass: ['nav-cover'] }, [ - A('view', { - staticClass: ['statusbar'], - style: 'height:' + e.statusBarHeight + 'px', - }), - A('view', { staticClass: ['title-view', 'flex-r'] }, [ - A( - 'view', - { - staticClass: ['btn-cancel'], - on: { click: e.cancelClick }, - }, - [ - A( - 'u-text', - { - staticClass: [ - 'unichooselocation-icons', - 'btn-cancel-text', - ], - }, - [e._v('')] - ), - ] - ), - A('view', { staticClass: ['flex-fill'] }), - A( - 'view', - { - staticClass: ['btn-done', 'flex-r', 'a-i-c', 'j-c-c'], - class: { 'btn-done-disabled': e.disableOK }, - on: { click: e.doneClick }, - }, - [ - A( - 'u-text', - { - staticClass: ['text-done'], - class: { 'text-done-disabled': e.disableOK }, - }, - [e._v(e._s(e.localize('done')))] - ), - ] - ), - ]), - ]), - ], - 1 - ), - A( - 'view', - { - staticClass: ['flex-c', 'result-area'], - class: { 'searching-area': e.showSearch }, - }, - [ - A('view', { staticClass: ['search-bar'] }, [ - A( - 'view', - { - staticClass: ['search-area', 'flex-r', 'a-i-c'], - on: { click: e.showSearchView }, - }, - [ - A( - 'u-text', - { - staticClass: [ - 'search-icon', - 'unichooselocation-icons', - ], - }, - [e._v('')] - ), - A('u-text', { staticClass: ['search-text'] }, [ - e._v(e._s(e.localize('search_tips'))), - ]), - ] - ), - ]), - e.noNearData - ? e._e() - : A( - 'list', - { - ref: 'nearListLoadmore', - staticClass: ['flex-fill', 'list-view'], - attrs: { loadmoreoffset: '5', scrollY: !0 }, - on: { - loadmore: function (t) { - e.searchNear() - }, - }, - }, - [ - e._l(e.nearList, function (t, a) { - return A( - 'cell', - { - key: t.uid, - appendAsTree: !0, - attrs: { append: 'tree' }, - }, - [ - A( - 'view', - { - staticClass: ['list-item'], - on: { - click: function (t) { - e.onItemClick(a, t) - }, - }, - }, - [ - A('view', { staticClass: ['flex-r'] }, [ - A( - 'view', - { - staticClass: [ - 'list-text-area', - 'flex-fill', - 'flex-c', - ], - }, - [ - A( - 'u-text', - { staticClass: ['list-name'] }, - [e._v(e._s(t.name))] - ), - A( - 'u-text', - { staticClass: ['list-address'] }, - [ - e._v( - e._s( - e._f('distance')(t.distance) - ) + e._s(t.address) - ), - ] - ), - ] - ), - a === e.nearSelectedIndex - ? A( - 'view', - { - staticClass: [ - 'list-icon-area', - 'flex-r', - 'a-i-c', - 'j-c-c', - ], - }, - [ - A( - 'u-text', - { - staticClass: [ - 'unichooselocation-icons', - 'list-selected-icon', - ], - }, - [e._v('')] - ), - ] - ) - : e._e(), - ]), - A('view', { staticClass: ['list-line'] }), - ] - ), - ] - ) - }), - e.nearLoading - ? A( - 'cell', - { appendAsTree: !0, attrs: { append: 'tree' } }, - [ - A( - 'view', - { - staticClass: [ - 'loading-view', - 'flex-c', - 'a-i-c', - 'j-c-c', - ], - }, - [ - A('loading-indicator', { - staticClass: ['loading-icon'], - attrs: { - animating: !0, - arrow: 'false', - }, - }), - ] - ), - ] - ) - : e._e(), - ], - 2 - ), - e.noNearData - ? A( - 'view', - { - staticClass: [ - 'flex-fill', - 'flex-r', - 'a-i-c', - 'j-c-c', - ], - }, - [ - A('u-text', { staticClass: ['no-data'] }, [ - e._v(e._s(e.localize('no_found'))), - ]), - ] - ) - : e._e(), - e.showSearch - ? A('view', { staticClass: ['search-view', 'flex-c'] }, [ - A( - 'view', - { staticClass: ['search-bar', 'flex-r', 'a-i-c'] }, - [ - A( - 'view', - { - staticClass: [ - 'search-area', - 'flex-fill', - 'flex-r', - ], - }, - [ - A('u-input', { - staticClass: ['search-input', 'flex-fill'], - attrs: { - focus: !0, - placeholder: e.localize('search_tips'), - }, - on: { input: e.onsearchinput }, - }), - ], - 1 - ), - A( - 'u-text', - { - staticClass: ['search-cancel'], - on: { click: e.hideSearchView }, - }, - [e._v(e._s(e.localize('cancel')))] - ), - ] - ), - A( - 'view', - { staticClass: ['search-tab'] }, - e._l(e.searchMethods, function (t, a) { - return A( - 'u-text', - { - key: a, - staticClass: ['search-tab-item'], - class: { - 'search-tab-item-active': - t.method === e.searchMethod, - }, - on: { - click: function (A) { - e.searchMethod = e.searchLoading - ? e.searchMethod - : t.method - }, - }, - }, - [e._v(e._s(t.title))] - ) - }), - 0 - ), - e.noSearchData - ? e._e() - : A( - 'list', - { - staticClass: ['flex-fill', 'list-view'], - attrs: { enableBackToTop: !0, scrollY: !0 }, - on: { - loadmore: function (t) { - e.search() - }, - touchstart: e.onSearchListTouchStart, - }, - }, - [ - e._l(e.searchList, function (t, a) { - return A( - 'cell', - { - key: t.uid, - appendAsTree: !0, - attrs: { append: 'tree' }, - }, - [ - A( - 'view', - { - staticClass: ['list-item'], - on: { - click: function (t) { - e.onSearchItemClick(a, t) - }, - }, - }, - [ - A( - 'view', - { staticClass: ['flex-r'] }, - [ - A( - 'view', - { - staticClass: [ - 'list-text-area', - 'flex-fill', - 'flex-c', - ], - }, - [ - A( - 'u-text', - { - staticClass: [ - 'list-name', - ], - }, - [e._v(e._s(t.name))] - ), - A( - 'u-text', - { - staticClass: [ - 'list-address', - ], - }, - [ - e._v( - e._s( - e._f('distance')( - t.distance - ) - ) + e._s(t.address) - ), - ] - ), - ] - ), - a === e.searchSelectedIndex - ? A( - 'view', - { - staticClass: [ - 'list-icon-area', - 'flex-r', - 'a-i-c', - 'j-c-c', - ], - }, - [ - A( - 'u-text', - { - staticClass: [ - 'unichooselocation-icons', - 'list-selected-icon', - ], - }, - [e._v('')] - ), - ] - ) - : e._e(), - ] - ), - A('view', { - staticClass: ['list-line'], - }), - ] - ), - ] - ) - }), - e.searchLoading - ? A( - 'cell', - { - appendAsTree: !0, - attrs: { append: 'tree' }, - }, - [ - A( - 'view', - { - staticClass: [ - 'loading-view', - 'flex-c', - 'a-i-c', - 'j-c-c', - ], - }, - [ - A('loading-indicator', { - staticClass: ['loading-icon'], - attrs: { animating: !0 }, - }), - ] - ), - ] - ) - : e._e(), - ], - 2 - ), - e.noSearchData - ? A( - 'view', - { staticClass: ['flex-fill', 'flex-r', 'j-c-c'] }, - [ - A( - 'u-text', - { - staticClass: ['no-data', 'no-data-search'], - }, - [e._v(e._s(e.localize('no_found')))] - ), - ] - ) - : e._e(), - ]) - : e._e(), - ] - ), - ]), - ] - ) - }, - i = [] - A.d(t, 'b', function () { - return a - }), - A.d(t, 'c', function () { - return i - }), - A.d(t, 'a', function () {}) - }, - , - , - , - , - , - function (e, t, A) { - 'use strict' - function a(e) { - var t = Object.prototype.toString.call(e) - return t.substring(8, t.length - 1) - } - function i() { - return 'string' == typeof __channelId__ && __channelId__ - } - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.log = function (e) { - for ( - var t = arguments.length, A = new Array(t > 1 ? t - 1 : 0), a = 1; - a < t; - a++ - ) - A[a - 1] = arguments[a] - console[e].apply(console, A) - }), - (t.default = function () { - for (var e = arguments.length, t = new Array(e), A = 0; A < e; A++) - t[A] = arguments[A] - var n = t.shift() - if (i()) - return ( - t.push(t.pop().replace('at ', 'uni-app:///')), - console[n].apply(console, t) - ) - var o = t.map(function (e) { - var t = Object.prototype.toString.call(e).toLowerCase() - if ('[object object]' === t || '[object array]' === t) - try { - e = '---BEGIN:JSON---' + JSON.stringify(e) + '---END:JSON---' - } catch (t) { - e = '[object object]' - } - else if (null === e) e = '---NULL---' - else if (void 0 === e) e = '---UNDEFINED---' - else { - var A = a(e).toUpperCase() - e = - 'NUMBER' === A || 'BOOLEAN' === A - ? '---BEGIN:' + A + '---' + e + '---END:' + A + '---' - : String(e) - } - return e - }), - s = '' - if (o.length > 1) { - var r = o.pop() - ;(s = o.join('---COMMA---')), - 0 === r.indexOf(' at ') ? (s += r) : (s += '---COMMA---' + r) - } else s = o[0] - console[n](s) - }) - }, - function (e, t, A) { - 'use strict' - A.r(t) - var a = A(14), - i = A.n(a) - for (var n in a) - 'default' !== n && - (function (e) { - A.d(t, e, function () { - return a[e] - }) - })(n) - t.default = i.a - }, - , - , - , - , - function (e, t, A) { - 'use strict' - A.r(t) - A(3) - var a = A(7) - ;(a.default.mpType = 'page'), - (a.default.route = 'template/__uniappchooselocation'), - (a.default.el = '#root'), - new Vue(a.default) - }, -]) +!function(e){var t={};function A(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,A),i.l=!0,i.exports}A.m=e,A.c=t,A.d=function(e,t,a){A.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},A.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},A.t=function(e,t){if(1&t&&(e=A(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(A.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)A.d(a,i,function(t){return e[t]}.bind(null,i));return a},A.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return A.d(t,"a",t),t},A.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},A.p="",A(A.s=41)}([function(e,t){e.exports={}},function(e,t,A){"use strict";function a(e,t,A,a,i,n,o,s,r,c){var l,u="function"==typeof e?e.options:e;if(r){u.components||(u.components={});var d=Object.prototype.hasOwnProperty;for(var h in r)d.call(r,h)&&!d.call(u.components,h)&&(u.components[h]=r[h])}if(c&&((c.beforeCreate||(c.beforeCreate=[])).unshift((function(){this[c.__module]=this})),(u.mixins||(u.mixins=[])).push(c)),t&&(u.render=t,u.staticRenderFns=A,u._compiled=!0),a&&(u.functional=!0),n&&(u._scopeId="data-v-"+n),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(u.functional){u._injectStyles=l;var f=u.render;u.render=function(e,t){return l.call(t),f(e,t)}}else{var g=u.beforeCreate;u.beforeCreate=g?[].concat(g,l):[l]}return{exports:e,options:u}}A.d(t,"a",(function(){return a}))},function(e,t,A){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.weexPlus=t.default=void 0,a="function"==typeof getUni?getUni:function(){var e=function(e){return"function"==typeof e},t=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e]}))},A=/^\$|^on|^create|Sync$|Manager$|^pause/,a=["os","getCurrentSubNVue","getSubNVueById","stopRecord","stopVoice","stopBackgroundAudio","stopPullDownRefresh","hideKeyboard","hideToast","hideLoading","showNavigationBarLoading","hideNavigationBarLoading","canIUse","navigateBack","closeSocket","pageScrollTo","drawCanvas"],n=function(e){return(!A.test(e)||"createBLEConnection"===e)&&!~a.indexOf(e)},o=function(A){return function(){for(var a=arguments.length,i=Array(a>1?a-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};return e(o.success)||e(o.fail)||e(o.complete)?A.apply(void 0,[o].concat(i)):t(new Promise((function(e,t){A.apply(void 0,[Object.assign({},o,{success:e,fail:t})].concat(i)),Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(A){return t.resolve(e()).then((function(){return A}))}),(function(A){return t.resolve(e()).then((function(){throw A}))}))}})))}},s=[],r=void 0;function c(e){s.forEach((function(t){return t({origin:r,data:e})}))}var l=i.webview.currentWebview().id,u=new BroadcastChannel("UNI-APP-SUBNVUE");function d(e){var t=i.webview.getWebviewById(e);return t&&!t.$processed&&function(e){e.$processed=!0;var t=i.webview.currentWebview().id===e.id,A="uniNView"===e.__uniapp_origin_type&&e.__uniapp_origin_id,a=e.id;if(e.postMessage=function(e){A?u.postMessage({data:e,to:t?A:a}):w({type:"UniAppSubNVue",data:e})},e.onMessage=function(e){s.push(e)},e.__uniapp_mask_id){r=e.__uniapp_host;var n=e.__uniapp_mask,o=i.webview.getWebviewById(e.__uniapp_mask_id);o=o.parent()||o;var c=e.show,l=e.hide,d=e.close,h=function(){o.setStyle({mask:n})},f=function(){o.setStyle({mask:"none"})};e.show=function(){h();for(var t=arguments.length,A=Array(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:"GET",A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/x-www-form-urlencoded";return"object"===(void 0===e?"undefined":j(e))?"POST"===t.toUpperCase()&&"application/json"===A.toLowerCase()?JSON.stringify(e):Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&"):e},G=weex.requireModule("plusstorage"),T=weex.requireModule("clipboard"),Q=function(){if("function"==typeof getUniEmitter)return getUniEmitter;var e={$on:function(){console.warn("uni.$on failed")},$off:function(){console.warn("uni.$off failed")},$once:function(){console.warn("uni.$once failed")},$emit:function(){console.warn("uni.$emit failed")}};return function(){return e}}();function U(e,t,A){return e[t].apply(e,A)}var F=Object.freeze({loadFontFace:function(t){var A=t.family,a=t.source,i=(t.desc,t.success),n=(t.fail,t.complete);E.addRule("fontFace",{fontFamily:A,src:a.replace(/"/g,"'")});var o={errMsg:"loadFontFace:ok",status:"loaded"};e(i)&&i(o),e(n)&&n(o)},ready:N,request:function(t){var A=t.url,a=t.data,i=t.header,n=t.method,o=void 0===n?"GET":n,s=t.dataType,r=void 0===s?"json":s,c=(t.responseType,t.success),l=t.fail,u=t.complete,d=!1,h=!1,f={};if(i)for(var g in i)h||"content-type"!==g.toLowerCase()?f[g]=i[g]:(h=!0,f["Content-Type"]=i[g]);return"GET"===o&&a&&(A=A+(~A.indexOf("?")?"&"===A.substr(-1)||"?"===A.substr(-1)?"":"&":"?")+P(a)),O.fetch({url:A,method:o,headers:f,type:"json"===r?"json":"text",body:"GET"!==o?P(a,o,f["Content-Type"]):""},(function(t){var A=t.status,a=(t.ok,t.statusText,t.data),i=t.headers,n={};!A||-1===A||d?(n.errMsg="request:fail",e(l)&&l(n)):(n.data=a,n.statusCode=A,n.header=i,e(c)&&c(n)),e(u)&&u(n)})),{abort:function(){d=!0}}},getStorage:function(t){var A=t.key,a=(t.data,t.success),i=t.fail,n=t.complete;G.getItem(A+"__TYPE",(function(t){if("success"===t.result){var o=t.data;G.getItem(A,(function(t){if("success"===t.result){var A=t.data;o&&A?("String"!==o&&(A=JSON.parse(A)),e(a)&&a({errMsg:"getStorage:ok",data:A})):(t.errMsg="setStorage:fail",e(i)&&i(t))}else t.errMsg="setStorage:fail",e(i)&&i(t);e(n)&&n(t)}))}else t.errMsg="setStorage:fail",e(i)&&i(t),e(n)&&n(t)}))},setStorage:function(t){var A=t.key,a=t.data,i=t.success,n=t.fail,o=t.complete,s="String";"object"===(void 0===a?"undefined":j(a))&&(s="Object",a=JSON.stringify(a)),G.setItem(A,a,(function(t){"success"===t.result?G.setItem(A+"__TYPE",s,(function(t){"success"===t.result?e(i)&&i({errMsg:"setStorage:ok"}):(t.errMsg="setStorage:fail",e(n)&&n(t))})):(t.errMsg="setStorage:fail",e(n)&&n(t)),e(o)&&o(t)}))},removeStorage:function(t){var A=t.key,a=(t.data,t.success),i=t.fail,n=t.complete;G.removeItem(A,(function(t){"success"===t.result?e(a)&&a({errMsg:"removeStorage:ok"}):(t.errMsg="removeStorage:fail",e(i)&&i(t)),e(n)&&n(t)})),G.removeItem(A+"__TYPE")},clearStorage:function(e){e.key,e.data,e.success,e.fail,e.complete},getClipboardData:function(t){var A=t.success,a=(t.fail,t.complete);T.getString((function(t){var i={errMsg:"getClipboardData:ok",data:t.data};e(A)&&A(i),e(a)&&a(i)}))},setClipboardData:function(t){var A=t.data,a=t.success,i=(t.fail,t.complete),n={errMsg:"setClipboardData:ok"};T.setString(A),e(a)&&a(n),e(i)&&i(n)},onSubNVueMessage:c,getSubNVueById:d,getCurrentSubNVue:function(){return d(i.webview.currentWebview().id)},$on:function(){return U(Q(),"$on",[].concat(Array.prototype.slice.call(arguments)))},$off:function(){return U(Q(),"$off",[].concat(Array.prototype.slice.call(arguments)))},$once:function(){return U(Q(),"$once",[].concat(Array.prototype.slice.call(arguments)))},$emit:function(){return U(Q(),"$emit",[].concat(Array.prototype.slice.call(arguments)))}}),R={os:{nvue:!0}},V={};return"undefined"!=typeof Proxy?V=new Proxy({},{get:function(e,t){if("os"===t)return{nvue:!0};if("postMessage"===t)return w;if("requireNativePlugin"===t)return I;if("onNavigationBarButtonTap"===t)return S;if("onNavigationBarSearchInputChanged"===t)return C;if("onNavigationBarSearchInputConfirmed"===t)return D;if("onNavigationBarSearchInputClicked"===t)return L;var A=F[t];return A||(A=b(t)),n(t)?o(A):A}}):(Object.keys(R).forEach((function(e){V[e]=R[e]})),V.postMessage=w,V.requireNativePlugin=I,V.onNavigationBarButtonTap=S,V.onNavigationBarSearchInputChanged=C,V.onNavigationBarSearchInputConfirmed=D,V.onNavigationBarSearchInputClicked=L,Object.keys({uploadFile:!0,downloadFile:!0,chooseImage:!0,previewImage:!0,getImageInfo:!0,saveImageToPhotosAlbum:!0,chooseVideo:!0,saveVideoToPhotosAlbum:!0,saveFile:!0,getSavedFileList:!0,getSavedFileInfo:!0,removeSavedFile:!0,openDocument:!0,setStorage:!0,getStorage:!0,getStorageInfo:!0,removeStorage:!0,clearStorage:!0,getLocation:!0,chooseLocation:!0,openLocation:!0,getSystemInfo:!0,getNetworkType:!0,makePhoneCall:!0,scanCode:!0,setScreenBrightness:!0,getScreenBrightness:!0,setKeepScreenOn:!0,vibrateLong:!0,vibrateShort:!0,addPhoneContact:!0,showToast:!0,showLoading:!0,hideToast:!0,hideLoading:!0,showModal:!0,showActionSheet:!0,setNavigationBarTitle:!0,setNavigationBarColor:!0,navigateTo:!0,redirectTo:!0,reLaunch:!0,switchTab:!0,navigateBack:!0,getProvider:!0,login:!0,getUserInfo:!0,share:!0,requestPayment:!0,subscribePush:!0,unsubscribePush:!0,onPush:!0,offPush:!0}).forEach((function(e){var t=F[e];t||(t=b(e)),n(e)?V[e]=o(t):V[e]=t}))),V};var i=new WeexPlus(weex);t.weexPlus=i;var n=a(weex,i,BroadcastChannel);t.default=n},function(e,t,A){Vue.prototype.__$appStyle__={},Vue.prototype.__merge_style&&Vue.prototype.__merge_style(A(4).default,Vue.prototype.__$appStyle__)},function(e,t,A){"use strict";A.r(t);var a=A(0),i=A.n(a);for(var n in a)"default"!==n&&function(e){A.d(t,e,(function(){return a[e]}))}(n);t.default=i.a},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var A={onLoad:function(){this.initMessage()},methods:{initMessage:function(){var t=this,A=e.webview.currentWebview().extras||{},a=A.from,i=(A.callback,A.runtime),n=A.data,o=void 0===n?{}:n,s=A.useGlobalEvent;this.__from=a,this.__runtime=i,this.__page=e.webview.currentWebview().id,this.__useGlobalEvent=s,this.data=JSON.parse(JSON.stringify(o)),e.key.addEventListener("backbutton",(function(){"function"==typeof t.onClose?t.onClose():e.webview.currentWebview().close("auto")}));var r=this,c=function(e){var t=e.data&&e.data.__message;t&&r.__onMessageCallback&&r.__onMessageCallback(t.data)};this.__useGlobalEvent?weex.requireModule("globalEvent").addEventListener("plusMessage",c):new BroadcastChannel(this.__page).onmessage=c},postMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=JSON.parse(JSON.stringify({__message:{__page:this.__page,data:t,keep:A}})),i=this.__from;if("v8"===this.__runtime)if(this.__useGlobalEvent)e.webview.postMessageToUniNView(a,i);else{var n=new BroadcastChannel(i);n.postMessage(a)}else{var o=e.webview.getWebviewById(i);o&&o.evalJS("__plusMessage&&__plusMessage(".concat(JSON.stringify({data:a}),")"))}},onMessage:function(e){this.__onMessageCallback=e}}};t.default=A}).call(this,A(2).weexPlus)},function(e,t,A){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var A={data:function(){return{locale:"en",fallbackLocale:"en",localization:{en:{done:"OK",cancel:"Cancel"},zh:{done:"完成",cancel:"取消"},"zh-hans":{},"zh-hant":{},messages:{}}}},onLoad:function(){this.initLocale()},created:function(){this.initLocale()},methods:{initLocale:function(){if(!this.__initLocale){this.__initLocale=!0;var t=(e.webview.currentWebview().extras||{}).data||{};if(t.messages&&(this.localization.messages=t.messages),t.locale)this.locale=t.locale.toLowerCase();else{var A=e.os.language.toLowerCase().split("/")[0].replace("_","-").split("-"),a=A[1];a&&(A[1]={chs:"hans",cn:"hans",sg:"hans",cht:"hant",tw:"hant",hk:"hant",mo:"hant"}[a]||a),A.length=A.length>2?2:A.length,this.locale=A.join("-")}}},localize:function(e){var t=this.locale,A=t.split("-")[0],a=this.fallbackLocale,i=this.localization;function n(e){return i[e]||{}}return n("messages")[e]||n(t)[e]||n(A)[e]||n(a)[e]||e}}};t.default=A}).call(this,A(2).weexPlus)},function(e,t,A){"use strict";var a=A(29),i=A(12),n=A(1);var o=Object(n.a)(i.default,a.b,a.c,!1,null,null,"14d2bcf2",!1,a.a,void 0);(function(e){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(A(36).default,this.options.style):Object.assign(this.options.style,A(36).default)}).call(o),t.default=o.exports},,,,,function(e,t,A){"use strict";var a=A(13),i=A.n(a);t.default=i.a},function(e,t,A){"use strict";(function(e,a){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(A(5)),n=o(A(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var A=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),A.push.apply(A,a)}return A}function r(e,t,A){return t in e?Object.defineProperty(e,t,{value:A,enumerable:!0,configurable:!0,writable:!0}):e[t]=A,e}weex.requireModule("dom").addRule("fontFace",{fontFamily:"unichooselocation",src:"url('data:font/truetype;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8gE4kAAABfAAAAFZjbWFw4nGd6QAAAegAAAGyZ2x5Zn61L/EAAAOoAAACJGhlYWQXJ/zZAAAA4AAAADZoaGVhB94DhgAAALwAAAAkaG10eBQAAAAAAAHUAAAAFGxvY2EBUAGyAAADnAAAAAxtYXhwARMAZgAAARgAAAAgbmFtZWs+cdAAAAXMAAAC2XBvc3SV1XYLAAAIqAAAAE4AAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAUAAQAAAAEAAFP+qyxfDzz1AAsEAAAAAADaBFxuAAAAANoEXG4AAP+gBAADYAAAAAgAAgAAAAAAAAABAAAABQBaAAQAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5grsMgOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAFAAAAAwAAACwAAAAEAAABcgABAAAAAABsAAMAAQAAACwAAwAKAAABcgAEAEAAAAAKAAgAAgAC5grmHOZR7DL//wAA5grmHOZR7DL//wAAAAAAAAAAAAEACgAKAAoACgAAAAQAAwACAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAEAAAAAAAAAABAAA5goAAOYKAAAABAAA5hwAAOYcAAAAAwAA5lEAAOZRAAAAAgAA7DIAAOwyAAAAAQAAAAAAAAB+AKAA0gESAAQAAP+gA+ADYAAAAAkAMQBZAAABIx4BMjY0JiIGBSMuASc1NCYiBh0BDgEHIyIGFBY7AR4BFxUUFjI2PQE+ATczMjY0JgE1NCYiBh0BLgEnMzI2NCYrAT4BNxUUFjI2PQEeARcjIgYUFjsBDgECAFABLUQtLUQtAg8iD9OcEhwSnNMPIg4SEg4iD9OcEhwSnNMPIg4SEv5SEhwSga8OPg4SEg4+Dq+BEhwSga8OPg4SEg4+Dq8BgCItLUQtLQKc0w8iDhISDiIP05wSHBKc0w8iDhISDiIP05wSHBL+gj4OEhIOPg6vgRIcEoGvDj4OEhIOPg6vgRIcEoGvAAEAAAAAA4ECgQAQAAABPgEeAQcBDgEvASY0NhYfAQM2DCIbAgz+TA0kDfcMGiIN1wJyDQIZIg3+IQ4BDf4NIhoBDd0AAQAAAAADAgKCAB0AAAE3PgEuAgYPAScmIgYUHwEHBhQWMj8BFxYyNjQnAjy4CAYGEBcWCLe3DSIaDLi4DBkjDbe3DSMZDAGAtwgWFxAGBgi4uAwaIg23tw0jGQy4uAwZIw0AAAIAAP/fA6EDHgAVACYAACUnPgE3LgEnDgEHHgEXMjY3FxYyNjQlBiIuAjQ+AjIeAhQOAQOX2CcsAQTCkpLCAwPCkj5uLdkJGRH+ijV0Z08rK09ndGdPLCxPE9MtckGSwgQEwpKSwgMoJdQIEhi3FixOaHNnTywsT2dzaE4AAAAAAAASAN4AAQAAAAAAAAAVAAAAAQAAAAAAAQARABUAAQAAAAAAAgAHACYAAQAAAAAAAwARAC0AAQAAAAAABAARAD4AAQAAAAAABQALAE8AAQAAAAAABgARAFoAAQAAAAAACgArAGsAAQAAAAAACwATAJYAAwABBAkAAAAqAKkAAwABBAkAAQAiANMAAwABBAkAAgAOAPUAAwABBAkAAwAiAQMAAwABBAkABAAiASUAAwABBAkABQAWAUcAAwABBAkABgAiAV0AAwABBAkACgBWAX8AAwABBAkACwAmAdUKQ3JlYXRlZCBieSBpY29uZm9udAp1bmljaG9vc2Vsb2NhdGlvblJlZ3VsYXJ1bmljaG9vc2Vsb2NhdGlvbnVuaWNob29zZWxvY2F0aW9uVmVyc2lvbiAxLjB1bmljaG9vc2Vsb2NhdGlvbkdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgBSAGUAZwB1AGwAYQByAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgB1AG4AaQBjAGgAbwBvAHMAZQBsAG8AYwBhAHQAaQBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAHUAbgBpAGMAaABvAG8AcwBlAGwAbwBjAGEAdABpAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAQIBAwEEAQUBBgAKbXlsb2NhdGlvbgZ4dWFuemUFY2xvc2UGc291c3VvAAAAAA==')"});var c=weex.requireModule("mapSearch"),l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACcCAMAAAC3Fl5oAAAB3VBMVEVMaXH/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/EhL/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/Dw//AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/GRn/NTX/Dw//Fhb/AAD/AAD/AAD/GRn/GRn/Y2P/AAD/AAD/ExP/Ghr/AAD/AAD/MzP/GRn/AAD/Hh7/AAD/RUX/AAD/AAD/AAD/AAD/AAD/AAD/Dg7/AAD/HR3/Dw//FRX/SUn/AAD/////kJD/DQ3/Zmb/+/v/wMD/mJj/6en/vb3/1NT//Pz/ODj/+fn/3Nz/nJz/j4//9/f/7e3/9vb/7Oz/2Nj/x8f/Ozv/+Pj/3d3/nZ3/2dn//f3/6Oj/2tr/v7//09P/vr7/mZn/l5cdSvP3AAAAe3RSTlMAAhLiZgTb/vztB/JMRhlp6lQW86g8mQ4KFPs3UCH5U8huwlesWtTYGI7RsdVeJGfTW5rxnutLsvXWF8vQNdo6qQbuz7D4hgVIx2xtw8GC1TtZaIw0i84P98tU0/fsj7PKaAgiZZxeVfo8Z52eg1P0nESrENnjXVPUgw/uuSmDAAADsUlEQVR42u3aZ3cTRxgF4GtbYleSLdnGcsENG2ODjbExEHrvhAQCIb1Bem+QdkeuuFMNBBJIfmuOckzZI8/srHYmH3Lm+QNXK632LTvQ03Tu/IWeU/tTGTKT2n+q58L5c00wpXJd47DHEt5w47pKxLbhdLdPKb/7dBYxVLxw1GcI/2h1BcpzKNFHLX2JQ4gumaiitqpEEhEdOMJI9h5AFC3feYzI+7IF2tpSLEOqDXpObPRYFm/jCWho/4Ble7MdoT7fzhhq9yHEz28wltU1UPrJZ0wd66HwicfYvEFIfePTAP8tSLTupBHvtGJFH9bSkNrNWEHzERrT34xSH9Ogr1CijkbVAUH1KRqVqkdQAw07iIAaGlcTqI+/0LjeJJ5J0IIEnkpXMdzs4sTtW9dnZq7fuj2xOMtwVWk88RHDjBYejYvnjD8qjOpfQsUqhvj7oSjxcJIhVj3pyKqpNjYvVjQ/RrXq5YABKi3MCYm5BSrtWO5v11DlmlC4RpU1WRS9SJU7QukOVbpQ9JLu549+Dd0AUOlTbkGEuk85vxLAK5QbuytC3R2j3HoAjZSbFxrmKTcCoJdSk0LLJKV6gSaPMqNTQsvUKGW8JrxKqUWhaZFSeWyh1LTQNE2pHF6mzOy40DQ+S5mLimJcENoKlOnBWsr8KbRNUGYt5LXgd6HtD3lNQIoyN4S2G5RJIUOZm0LbTcqsBqVmhLYZSlkPsP4VWf+Rrd+m1v9o9h8Vv5p42C1R5qL1x7WRglOgVN52yfwNOBu76P+lLPoYidu23KPciIHGa07ZeIW1jvcNtI7q5vexCPGYCmf+m/Y9a3sAwQ5bI9T7ukPgPcn9GToEao+xk1OixJT+GIsvNAbx6eAgPq0xiF+KtkpYKhRXCQ8eFFcJhSWGu3rZ8jJkCM8kz9K4TUnrC6mAgzTsB9tLwQ2W15qfosQ2GrQNpZr7aczbzVjBZsvLcaC1g0bsbIVEnU8DOr6H1KDH2LwtUBi0/JII6Dxm9zUXkH+XMWzfh1Dte1i2Pe3QkC77Zel7aehpO8wyHG6Dtt0NjKxhN6I4uSli/TqJiJJDUQ4NDCURXTrXRy1XcumyD24M+AzhD1RXIIZsl/LoyZmurJHDM7s8lvB2FQ/PmPJ6PseAXP5HGMYAAC7ABbgAF+ACXIALcAEuwAW4ABfgAlyAC3ABLsAFuID/d8Cx4NEt8/byOf0wLnis8zjMq9/Kp7bWw4JOj8u8TlhRl+G/Mp2wpOX48GffvvZ1CyL4B53LAS6zb08EAAAAAElFTkSuQmCC";var u={mixins:[i.default,n.default],data:function(){return{positionIcon:l,mapScale:16,userKeyword:"",showLocation:!0,latitude:39.908692,longitude:116.397477,nearList:[],nearSelectedIndex:-1,nearLoading:!1,nearLoadingEnd:!1,noNearData:!1,isUserLocation:!1,statusBarHeight:20,mapHeight:250,markers:[{id:"location",latitude:39.908692,longitude:116.397477,zIndex:"1",iconPath:l,width:26,height:36}],showSearch:!1,searchList:[],searchSelectedIndex:-1,searchLoading:!1,searchEnd:!1,noSearchData:!1,localization:{en:{search_tips:"Search for a place",no_found:"No results found",nearby:"Nearby",more:"More"},zh:{search_tips:"搜索地点",no_found:"对不起,没有搜索到相关数据",nearby:"附近",more:"更多"}},searchNearFlag:!0,searchMethod:"poiSearchNearBy"}},computed:{disableOK:function(){return this.nearSelectedIndex<0&&this.searchSelectedIndex<0},searchMethods:function(){return[{title:this.localize("nearby"),method:"poiSearchNearBy"},{title:this.localize("more"),method:"poiKeywordsSearch"}]}},filters:{distance:function(e){return e>100?"".concat(e>1e3?(e/1e3).toFixed(1)+"k":e.toFixed(0),"m | "):e>0?"100m内 | ":""}},watch:{searchMethod:function(){this._searchPageIndex=1,this.searchEnd=!1,this.searchList=[],this._searchKeyword&&this.search()}},onLoad:function(){this.statusBarHeight=e.navigator.getStatusbarHeight(),this.mapHeight=e.screen.resolutionHeight/2;var t=this.data;this.userKeyword=t.keyword||"",this._searchInputTimer=null,this._searchPageIndex=1,this._searchKeyword="",this._nearPageIndex=1,this._hasUserLocation=!1,this._userLatitude=0,this._userLongitude=0},onReady:function(){this.mapContext=this.$refs.map1,this.data.latitude&&this.data.longitude?(this._hasUserLocation=!0,this.moveToCenter({latitude:this.data.latitude,longitude:this.data.longitude})):this.getUserLocation()},onUnload:function(){this.clearSearchTimer()},methods:{cancelClick:function(){this.postMessage({event:"cancel"})},doneClick:function(){if(!this.disableOK){var e=this.showSearch&&this.searchSelectedIndex>=0?this.searchList[this.searchSelectedIndex]:this.nearList[this.nearSelectedIndex],t={name:e.name,address:e.address,latitude:e.location.latitude,longitude:e.location.longitude};this.postMessage({event:"selected",detail:t})}},getUserLocation:function(){var t=this;e.geolocation.getCurrentPosition((function(e){var A=e.coordsType,a=e.coords;"wgs84"===A.toLowerCase()?t.wgs84togcjo2(a,(function(e){t.getUserLocationSuccess(e)})):t.getUserLocationSuccess(a)}),(function(e){t._hasUserLocation=!0,a("log","Gelocation Error: code - "+e.code+"; message - "+e.message," at template/__uniappchooselocation.nvue:292")}),{geocode:!1})},getUserLocationSuccess:function(e){this._userLatitude=e.latitude,this._userLongitude=e.longitude,this._hasUserLocation=!0,this.moveToCenter({latitude:e.latitude,longitude:e.longitude})},searchclick:function(t){this.showSearch=t,!1===t&&e.key.hideSoftKeybord()},showSearchView:function(){this.searchList=[],this.showSearch=!0},hideSearchView:function(){this.showSearch=!1,e.key.hideSoftKeybord(),this.noSearchData=!1,this.searchSelectedIndex=-1,this._searchKeyword=""},onregionchange:function(e){var t=this,A=e.detail,a=A.type||e.type;"drag"===(A.causedBy||e.causedBy)&&"end"===a&&this.mapContext.getCenterLocation((function(e){t.searchNearFlag?t.moveToCenter({latitude:e.latitude,longitude:e.longitude}):t.searchNearFlag=!t.searchNearFlag}))},onItemClick:function(e,t){this.searchNearFlag=!1,t.stopPropagation&&t.stopPropagation(),this.nearSelectedIndex!==e&&(this.nearSelectedIndex=e),this.moveToLocation(this.nearList[e]&&this.nearList[e].location)},moveToCenter:function(e){this.latitude===e.latitude&&this.longitude===e.longitude||(this.latitude=e.latitude,this.longitude=e.longitude,this.updateCenter(e),this.moveToLocation(e),this.isUserLocation=this._userLatitude===e.latitude&&this._userLongitude===e.longitude)},updateCenter:function(e){var t=this;this.nearSelectedIndex=-1,this.nearList=[],this._hasUserLocation&&(this._nearPageIndex=1,this.nearLoadingEnd=!1,this.reverseGeocode(e),this.searchNearByPoint(e),this.onItemClick(0,{stopPropagation:function(){t.searchNearFlag=!0}}),this.$refs.nearListLoadmore.resetLoadmore())},searchNear:function(){this.nearLoadingEnd||this.searchNearByPoint({latitude:this.latitude,longitude:this.longitude})},searchNearByPoint:function(e){var t=this;this.noNearData=!1,this.nearLoading=!0,c.poiSearchNearBy({point:{latitude:e.latitude,longitude:e.longitude},key:this.userKeyword,sortrule:1,index:this._nearPageIndex,radius:1e3},(function(e){t.nearLoading=!1,t._nearPageIndex=e.pageIndex+1,t.nearLoadingEnd=e.pageIndex===e.pageNumber,e.poiList&&e.poiList.length?(t.fixPois(e.poiList),t.nearList=t.nearList.concat(e.poiList),t.fixNearList()):t.noNearData=0===t.nearList.length}))},moveToLocation:function(e){e&&this.mapContext.moveToLocation(function(e){for(var t=1;t=2&&"地图位置"===e[0].name){var t=this.getAddressStart(e[1]),A=e[0].address;A.startsWith(t)&&(e[0].name=A.substring(t.length))}},onsearchinput:function(e){var t=this,A=e.detail.value.replace(/^\s+|\s+$/g,"");this.clearSearchTimer(),this._searchInputTimer=setTimeout((function(){clearTimeout(t._searchInputTimer),t._searchPageIndex=1,t.searchEnd=!1,t._searchKeyword=A,t.searchList=[],t.search()}),300)},clearSearchTimer:function(){this._searchInputTimer&&clearTimeout(this._searchInputTimer)},search:function(){var e=this;0===this._searchKeyword.length||this._searchEnd||this.searchLoading||(this.searchLoading=!0,this.noSearchData=!1,c[this.searchMethod]({point:{latitude:this.latitude,longitude:this.longitude},key:this._searchKeyword,sortrule:1,index:this._searchPageIndex,radius:5e4},(function(t){e.searchLoading=!1,e._searchPageIndex=t.pageIndex+1,e.searchEnd=t.pageIndex===t.pageNumber,t.poiList&&t.poiList.length?(e.fixPois(t.poiList),e.searchList=e.searchList.concat(t.poiList)):e.noSearchData=0===e.searchList.length})))},onSearchListTouchStart:function(){e.key.hideSoftKeybord()},onSearchItemClick:function(e,t){t.stopPropagation(),this.searchSelectedIndex!==e&&(this.searchSelectedIndex=e),this.moveToLocation(this.searchList[e]&&this.searchList[e].location)},getAddressStart:function(e){var t=e.addressOrigin||e.address;return e.province+(e.province===e.city?"":e.city)+(/^\d+$/.test(e.district)?"":t.startsWith(e.district)?"":e.district)},fixPois:function(e){for(var t=0;t1?t-1:0),a=1;a1){var r=o.pop();s=o.join("---COMMA---"),0===r.indexOf(" at ")?s+=r:s+="---COMMA---"+r}else s=o[0];console[n](s)}},function(e,t,A){"use strict";A.r(t);var a=A(14),i=A.n(a);for(var n in a)"default"!==n&&function(e){A.d(t,e,(function(){return a[e]}))}(n);t.default=i.a},,,,,function(e,t,A){"use strict";A.r(t);A(3);var a=A(7);a.default.mpType="page",a.default.route="template/__uniappchooselocation",a.default.el="#root",new Vue(a.default)}]); \ No newline at end of file diff --git a/packages/uni-app-vite/lib/template/__uniappopenlocation.js b/packages/uni-app-vite/lib/template/__uniappopenlocation.js index 8158b07135..afbbf3fede 100644 --- a/packages/uni-app-vite/lib/template/__uniappopenlocation.js +++ b/packages/uni-app-vite/lib/template/__uniappopenlocation.js @@ -1,1170 +1 @@ -!(function (e) { - var t = {} - function n(a) { - if (t[a]) return t[a].exports - var o = (t[a] = { i: a, l: !1, exports: {} }) - return e[a].call(o.exports, o, o.exports, n), (o.l = !0), o.exports - } - ;(n.m = e), - (n.c = t), - (n.d = function (e, t, a) { - n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: a }) - }), - (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 a = Object.create(null) - if ( - (n.r(a), - Object.defineProperty(a, 'default', { enumerable: !0, value: e }), - 2 & t && 'string' != typeof e) - ) - for (var o in e) - n.d( - a, - o, - function (t) { - return e[t] - }.bind(null, o) - ) - return a - }), - (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 = 42)) -})([ - function (e, t) { - e.exports = {} - }, - function (e, t, n) { - 'use strict' - function a(e, t, n, a, o, i, r, s, u, c) { - var l, - f = 'function' == typeof e ? e.options : e - if (u) { - f.components || (f.components = {}) - var d = Object.prototype.hasOwnProperty - for (var p in u) - d.call(u, p) && !d.call(f.components, p) && (f.components[p] = u[p]) - } - if ( - (c && - ((c.beforeCreate || (c.beforeCreate = [])).unshift(function () { - this[c.__module] = this - }), - (f.mixins || (f.mixins = [])).push(c)), - t && ((f.render = t), (f.staticRenderFns = n), (f._compiled = !0)), - a && (f.functional = !0), - i && (f._scopeId = 'data-v-' + i), - r - ? ((l = function (e) { - ;(e = - e || - (this.$vnode && this.$vnode.ssrContext) || - (this.parent && - this.parent.$vnode && - this.parent.$vnode.ssrContext)) || - 'undefined' == typeof __VUE_SSR_CONTEXT__ || - (e = __VUE_SSR_CONTEXT__), - o && o.call(this, e), - e && e._registeredComponents && e._registeredComponents.add(r) - }), - (f._ssrRegister = l)) - : o && - (l = s - ? function () { - o.call(this, this.$root.$options.shadowRoot) - } - : o), - l) - ) - if (f.functional) { - f._injectStyles = l - var v = f.render - f.render = function (e, t) { - return l.call(t), v(e, t) - } - } else { - var g = f.beforeCreate - f.beforeCreate = g ? [].concat(g, l) : [l] - } - return { exports: e, options: f } - } - n.d(t, 'a', function () { - return a - }) - }, - function (e, t, n) { - 'use strict' - var a - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.weexPlus = t.default = void 0), - (a = - 'function' == typeof getUni - ? getUni - : function () { - var e = function (e) { - return 'function' == typeof e - }, - t = function (e) { - return e - .then(function (e) { - return [null, e] - }) - .catch(function (e) { - return [e] - }) - }, - n = /^\$|^on|^create|Sync$|Manager$|^pause/, - a = [ - 'os', - 'getCurrentSubNVue', - 'getSubNVueById', - 'stopRecord', - 'stopVoice', - 'stopBackgroundAudio', - 'stopPullDownRefresh', - 'hideKeyboard', - 'hideToast', - 'hideLoading', - 'showNavigationBarLoading', - 'hideNavigationBarLoading', - 'canIUse', - 'navigateBack', - 'closeSocket', - 'pageScrollTo', - 'drawCanvas', - ], - i = function (e) { - return ( - (!n.test(e) || 'createBLEConnection' === e) && - !~a.indexOf(e) - ) - }, - r = function (n) { - return function () { - for ( - var a = arguments.length, - o = Array(a > 1 ? a - 1 : 0), - i = 1; - i < a; - i++ - ) - o[i - 1] = arguments[i] - var r = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {} - return e(r.success) || e(r.fail) || e(r.complete) - ? n.apply(void 0, [r].concat(o)) - : t( - new Promise(function (e, t) { - n.apply( - void 0, - [ - Object.assign({}, r, { success: e, fail: t }), - ].concat(o) - ), - (Promise.prototype.finally = function (e) { - var t = this.constructor - return this.then( - function (n) { - return t.resolve(e()).then(function () { - return n - }) - }, - function (n) { - return t.resolve(e()).then(function () { - throw n - }) - } - ) - }) - }) - ) - } - }, - s = [], - u = void 0 - function c(e) { - s.forEach(function (t) { - return t({ origin: u, data: e }) - }) - } - var l = o.webview.currentWebview().id, - f = new BroadcastChannel('UNI-APP-SUBNVUE') - function d(e) { - var t = o.webview.getWebviewById(e) - return ( - t && - !t.$processed && - (function (e) { - e.$processed = !0 - var t = o.webview.currentWebview().id === e.id, - n = - 'uniNView' === e.__uniapp_origin_type && - e.__uniapp_origin_id, - a = e.id - if ( - ((e.postMessage = function (e) { - n - ? f.postMessage({ data: e, to: t ? n : a }) - : A({ type: 'UniAppSubNVue', data: e }) - }), - (e.onMessage = function (e) { - s.push(e) - }), - e.__uniapp_mask_id) - ) { - u = e.__uniapp_host - var i = e.__uniapp_mask, - r = o.webview.getWebviewById(e.__uniapp_mask_id) - r = r.parent() || r - var c = e.show, - l = e.hide, - d = e.close, - p = function () { - r.setStyle({ mask: i }) - }, - v = function () { - r.setStyle({ mask: 'none' }) - } - ;(e.show = function () { - p() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return c.apply(e, n) - }), - (e.hide = function () { - v() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return l.apply(e, n) - }), - (e.close = function () { - v() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return d.apply(e, n) - }) - } - })(t), - t - ) - } - f.onmessage = function (e) { - e.data.to === l && c(e.data.data) - } - var p = weex.requireModule('plus'), - v = weex.requireModule('globalEvent'), - g = 0, - m = {} - v.addEventListener('plusMessage', function (e) { - 'UniAppJsApi' === e.data.type - ? y(e.data.id, e.data.data) - : 'UniAppSubNVue' === e.data.type - ? c(e.data.data, e.data.options) - : 'onNavigationBarButtonTap' === e.data.type - ? 'function' == typeof P && P(e.data.data) - : 'onNavigationBarSearchInputChanged' === e.data.type - ? 'function' == typeof S && S(e.data.data) - : 'onNavigationBarSearchInputConfirmed' === e.data.type - ? 'function' == typeof w && w(e.data.data) - : 'onNavigationBarSearchInputClicked' === e.data.type && - 'function' == typeof _ && - _(e.data.data) - }) - var y = function (e, t) { - var n = m[e] - n - ? (n(t), n.keepAlive || delete m[e]) - : console.error('callback[' + e + '] is undefined') - }, - h = function (t) { - var n, - a, - o = t.id, - i = t.type, - r = t.params - ;(m[o] = - ((a = function (t) { - e(n) - ? n(t) - : n && - (~t.errMsg.indexOf(':ok') - ? e(n.success) && n.success(t) - : ~t.errMsg.indexOf(':fail') && - e(n.fail) && - n.fail(t), - e(n.complete) && n.complete(t)) - }), - (e((n = r)) || (n && e(n.callback))) && (a.keepAlive = !0), - a)), - p.postMessage( - { id: o, type: i, params: r }, - '__uniapp__service' - ) - } - function A(e) { - p.postMessage(e, '__uniapp__service') - } - var b = function (e) { - return function (t) { - h({ id: g++, type: e, params: t }) - } - }, - P = void 0, - S = void 0, - w = void 0, - _ = void 0 - function x(e) { - P = e - } - function C(e) { - S = e - } - function M(e) { - w = e - } - function I(e) { - _ = e - } - function k(e) { - return weex.requireModule(e) - } - var B = weex.requireModule('dom'), - O = weex.requireModule('globalEvent'), - T = [] - function E(e) { - 'function' == typeof e && (this.isUniAppReady ? e() : T.push(e)) - } - O.addEventListener('plusMessage', function (e) { - 'UniAppReady' === e.data.type && - ((E.isUniAppReady = !0), - T.length && - (T.forEach(function (e) { - return e() - }), - (T = []))) - }) - var j = - '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 - }, - N = weex.requireModule('stream'), - L = function (e) { - var t = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 'GET', - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : 'application/x-www-form-urlencoded' - return 'object' === (void 0 === e ? 'undefined' : j(e)) - ? 'POST' === t.toUpperCase() && - 'application/json' === n.toLowerCase() - ? JSON.stringify(e) - : Object.keys(e) - .map(function (t) { - return ( - encodeURIComponent(t) + - '=' + - encodeURIComponent(e[t]) - ) - }) - .join('&') - : e - }, - U = weex.requireModule('plusstorage'), - R = weex.requireModule('clipboard'), - V = (function () { - if ('function' == typeof getUniEmitter) return getUniEmitter - var e = { - $on: function () { - console.warn('uni.$on failed') - }, - $off: function () { - console.warn('uni.$off failed') - }, - $once: function () { - console.warn('uni.$once failed') - }, - $emit: function () { - console.warn('uni.$emit failed') - }, - } - return function () { - return e - } - })() - function q(e, t, n) { - return e[t].apply(e, n) - } - var z = Object.freeze({ - loadFontFace: function (t) { - var n = t.family, - a = t.source, - o = (t.desc, t.success), - i = (t.fail, t.complete) - B.addRule('fontFace', { - fontFamily: n, - src: a.replace(/"/g, "'"), - }) - var r = { errMsg: 'loadFontFace:ok', status: 'loaded' } - e(o) && o(r), e(i) && i(r) - }, - ready: E, - request: function (t) { - var n = t.url, - a = t.data, - o = t.header, - i = t.method, - r = void 0 === i ? 'GET' : i, - s = t.dataType, - u = void 0 === s ? 'json' : s, - c = (t.responseType, t.success), - l = t.fail, - f = t.complete, - d = !1, - p = !1, - v = {} - if (o) - for (var g in o) - p || 'content-type' !== g.toLowerCase() - ? (v[g] = o[g]) - : ((p = !0), (v['Content-Type'] = o[g])) - return ( - 'GET' === r && - a && - (n = - n + - (~n.indexOf('?') - ? '&' === n.substr(-1) || '?' === n.substr(-1) - ? '' - : '&' - : '?') + - L(a)), - N.fetch( - { - url: n, - method: r, - headers: v, - type: 'json' === u ? 'json' : 'text', - body: 'GET' !== r ? L(a, r, v['Content-Type']) : '', - }, - function (t) { - var n = t.status, - a = (t.ok, t.statusText, t.data), - o = t.headers, - i = {} - !n || -1 === n || d - ? ((i.errMsg = 'request:fail'), e(l) && l(i)) - : ((i.data = a), - (i.statusCode = n), - (i.header = o), - e(c) && c(i)), - e(f) && f(i) - } - ), - { - abort: function () { - d = !0 - }, - } - ) - }, - getStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - o = t.fail, - i = t.complete - U.getItem(n + '__TYPE', function (t) { - if ('success' === t.result) { - var r = t.data - U.getItem(n, function (t) { - if ('success' === t.result) { - var n = t.data - r && n - ? ('String' !== r && (n = JSON.parse(n)), - e(a) && a({ errMsg: 'getStorage:ok', data: n })) - : ((t.errMsg = 'setStorage:fail'), e(o) && o(t)) - } else (t.errMsg = 'setStorage:fail'), e(o) && o(t) - e(i) && i(t) - }) - } else - (t.errMsg = 'setStorage:fail'), - e(o) && o(t), - e(i) && i(t) - }) - }, - setStorage: function (t) { - var n = t.key, - a = t.data, - o = t.success, - i = t.fail, - r = t.complete, - s = 'String' - 'object' === (void 0 === a ? 'undefined' : j(a)) && - ((s = 'Object'), (a = JSON.stringify(a))), - U.setItem(n, a, function (t) { - 'success' === t.result - ? U.setItem(n + '__TYPE', s, function (t) { - 'success' === t.result - ? e(o) && o({ errMsg: 'setStorage:ok' }) - : ((t.errMsg = 'setStorage:fail'), e(i) && i(t)) - }) - : ((t.errMsg = 'setStorage:fail'), e(i) && i(t)), - e(r) && r(t) - }) - }, - removeStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - o = t.fail, - i = t.complete - U.removeItem(n, function (t) { - 'success' === t.result - ? e(a) && a({ errMsg: 'removeStorage:ok' }) - : ((t.errMsg = 'removeStorage:fail'), e(o) && o(t)), - e(i) && i(t) - }), - U.removeItem(n + '__TYPE') - }, - clearStorage: function (e) { - e.key, e.data, e.success, e.fail, e.complete - }, - getClipboardData: function (t) { - var n = t.success, - a = (t.fail, t.complete) - R.getString(function (t) { - var o = { errMsg: 'getClipboardData:ok', data: t.data } - e(n) && n(o), e(a) && a(o) - }) - }, - setClipboardData: function (t) { - var n = t.data, - a = t.success, - o = (t.fail, t.complete), - i = { errMsg: 'setClipboardData:ok' } - R.setString(n), e(a) && a(i), e(o) && o(i) - }, - onSubNVueMessage: c, - getSubNVueById: d, - getCurrentSubNVue: function () { - return d(o.webview.currentWebview().id) - }, - $on: function () { - return q( - V(), - '$on', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $off: function () { - return q( - V(), - '$off', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $once: function () { - return q( - V(), - '$once', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $emit: function () { - return q( - V(), - '$emit', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - }), - F = { os: { nvue: !0 } }, - D = {} - return ( - 'undefined' != typeof Proxy - ? (D = new Proxy( - {}, - { - get: function (e, t) { - if ('os' === t) return { nvue: !0 } - if ('postMessage' === t) return A - if ('requireNativePlugin' === t) return k - if ('onNavigationBarButtonTap' === t) return x - if ('onNavigationBarSearchInputChanged' === t) - return C - if ('onNavigationBarSearchInputConfirmed' === t) - return M - if ('onNavigationBarSearchInputClicked' === t) - return I - var n = z[t] - return n || (n = b(t)), i(t) ? r(n) : n - }, - } - )) - : (Object.keys(F).forEach(function (e) { - D[e] = F[e] - }), - (D.postMessage = A), - (D.requireNativePlugin = k), - (D.onNavigationBarButtonTap = x), - (D.onNavigationBarSearchInputChanged = C), - (D.onNavigationBarSearchInputConfirmed = M), - (D.onNavigationBarSearchInputClicked = I), - Object.keys({ - uploadFile: !0, - downloadFile: !0, - chooseImage: !0, - previewImage: !0, - getImageInfo: !0, - saveImageToPhotosAlbum: !0, - chooseVideo: !0, - saveVideoToPhotosAlbum: !0, - saveFile: !0, - getSavedFileList: !0, - getSavedFileInfo: !0, - removeSavedFile: !0, - openDocument: !0, - setStorage: !0, - getStorage: !0, - getStorageInfo: !0, - removeStorage: !0, - clearStorage: !0, - getLocation: !0, - chooseLocation: !0, - openLocation: !0, - getSystemInfo: !0, - getNetworkType: !0, - makePhoneCall: !0, - scanCode: !0, - setScreenBrightness: !0, - getScreenBrightness: !0, - setKeepScreenOn: !0, - vibrateLong: !0, - vibrateShort: !0, - addPhoneContact: !0, - showToast: !0, - showLoading: !0, - hideToast: !0, - hideLoading: !0, - showModal: !0, - showActionSheet: !0, - setNavigationBarTitle: !0, - setNavigationBarColor: !0, - navigateTo: !0, - redirectTo: !0, - reLaunch: !0, - switchTab: !0, - navigateBack: !0, - getProvider: !0, - login: !0, - getUserInfo: !0, - share: !0, - requestPayment: !0, - subscribePush: !0, - unsubscribePush: !0, - onPush: !0, - offPush: !0, - }).forEach(function (e) { - var t = z[e] - t || (t = b(e)), i(e) ? (D[e] = r(t)) : (D[e] = t) - })), - D - ) - }) - var o = new WeexPlus(weex) - t.weexPlus = o - var i = a(weex, o, BroadcastChannel) - t.default = i - }, - function (e, t, n) { - ;(Vue.prototype.__$appStyle__ = {}), - Vue.prototype.__merge_style && - Vue.prototype.__merge_style(n(4).default, Vue.prototype.__$appStyle__) - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(0), - o = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = o.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - onLoad: function () { - this.initMessage() - }, - methods: { - initMessage: function () { - var t = this, - n = e.webview.currentWebview().extras || {}, - a = n.from, - o = (n.callback, n.runtime), - i = n.data, - r = void 0 === i ? {} : i, - s = n.useGlobalEvent - ;(this.__from = a), - (this.__runtime = o), - (this.__page = e.webview.currentWebview().id), - (this.__useGlobalEvent = s), - (this.data = JSON.parse(JSON.stringify(r))), - e.key.addEventListener('backbutton', function () { - 'function' == typeof t.onClose - ? t.onClose() - : e.webview.currentWebview().close('auto') - }) - var u = this, - c = function (e) { - var t = e.data && e.data.__message - t && u.__onMessageCallback && u.__onMessageCallback(t.data) - } - this.__useGlobalEvent - ? weex - .requireModule('globalEvent') - .addEventListener('plusMessage', c) - : (new BroadcastChannel(this.__page).onmessage = c) - }, - postMessage: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {}, - n = - arguments.length > 1 && void 0 !== arguments[1] && arguments[1], - a = JSON.parse( - JSON.stringify({ - __message: { __page: this.__page, data: t, keep: n }, - }) - ), - o = this.__from - if ('v8' === this.__runtime) - if (this.__useGlobalEvent) e.webview.postMessageToUniNView(a, o) - else { - var i = new BroadcastChannel(o) - i.postMessage(a) - } - else { - var r = e.webview.getWebviewById(o) - r && - r.evalJS( - '__plusMessage&&__plusMessage('.concat( - JSON.stringify({ data: a }), - ')' - ) - ) - } - }, - onMessage: function (e) { - this.__onMessageCallback = e - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, - , - function (e, t, n) { - 'use strict' - var a = n(29), - o = n(14), - i = n(1) - var r = Object(i.a)( - o.default, - a.b, - a.c, - !1, - null, - null, - 'fd96f2da', - !1, - a.a, - void 0 - ) - ;(function (e) { - this.options.style || (this.options.style = {}), - Vue.prototype.__merge_style && - Vue.prototype.__$appStyle__ && - Vue.prototype.__merge_style( - Vue.prototype.__$appStyle__, - this.options.style - ), - Vue.prototype.__merge_style - ? Vue.prototype.__merge_style(n(37).default, this.options.style) - : Object.assign(this.options.style, n(37).default) - }.call(r), - (t.default = r.exports)) - }, - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - var a = n(15), - o = n.n(a) - t.default = o.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var a, - o = (a = n(5)) && a.__esModule ? a : { default: a } - var i = weex.requireModule('mapSearch') - var r = { - mixins: [o.default], - data: function () { - return { - longitude: '', - latitude: '', - markers: [], - name: '', - address: '', - } - }, - onLoad: function () { - var e = this.data - ;(this.latitude = e.latitude), - (this.longitude = e.longitude), - (this.name = e.name || ''), - (this.address = e.address || '') - }, - onReady: function () { - ;(this.mapContext = this.$refs.map1), - (this.markers = [ - { - id: 'location', - latitude: this.latitude, - longitude: this.longitude, - title: this.name, - zIndex: '1', - iconPath: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABICAMAAACORiZjAAAByFBMVEUAAAD/PyL/PyL/PyL/PyL/PyL/PyL/PyL/PyL/PiL/PyL/PyL/PyP/PyL/PyL/PyL/PyL/PiL/PyL8PiP/PyL4OyP/PyL3OyX9Pyb0RUP0RkPzOiXsPj3YLi7TKSnQJiX0RkTgMCj0QjvkNC3vPDPwOy/9PyXsNSTyRUTgNDPdMjHrPTzuQD7iNTTxQ0HTJyTZKyf1RULlNjDZKyTfLSLeLSX0Qzz3Qzv8PSTMJCTmOjnPJSXLIiLzRkXWLCvgNDPZLyzVKijRJSTtPzvcMS7jNjPZLCnyREHpOzjiNDDtPzvzQz/VKSXkNTDsPDXyQjz2RT7pMyTxOinjMST5QjTmOjnPJSLdLyr0RD//YF7/////R0b/Tk3/XVv/WFb/VVP/S0v/Pz//W1n/UVD/REP/Xlz/Ojr/QUH/Skn/U1L/ODf7VlX5UU/oOzrqNzf/+/v5UlHvQUD2TEv0SUj3Tk3/2dn8W1r6TEv7R0b7REPvPTzzPDvwNjXkMjLnMDDjLS3dKir/xcX/vr7/qqn/pqX/mZn/fn7/ZWT/8PD/4eH/3t3/zs7/ra3/kpL/iIj/e3r5PDz4NjbxMTHsMTDlLCz/9vb/6ej/ubjhOGVRAAAAWXRSTlMABQ4TFgoIHhApI0RAGhgzJi89Ozg2LVEg4s5c/v366tmZiYl2X0pE/vn08eTe1sWvqqiOgXVlUE399/b08u3n4tzZ1dTKyMTDvLmzqqKal35taFxH6sC3oms+ongAAAOtSURBVEjHjZV3W9pQGMXJzQACQRARxVF3HdVW26od7q111NqhdbRSbQVElnvvbV1tv25Jgpr3kpCcP+/7/J5z8p57QScr4l46jSJohEhKEGlANKGBYBA1NFDpyklPz3FV5tWwHKnGEbShprIuFPAujEW14A2E6nqqWYshEcYYqnNC3mEgbyh9wMgZGCUbZHZFFobjtODLKWQpRMgyhrxiiQtwK/6SqpczY/QdvqlhJflcZpZk4hiryzecQIH0IitFY0xaBWDkqCEr9CLIDsDIJqywswbpNlB/ZEpVkZ4kPZKEqwmOTakrXGCk6IdwFYExDfI+SX4ISBeExjQp0m/jUMyIeuLVBo2Xma0kIRpVhyc1Kpxn42hxdd2BuOnv3Z2d3YO4Y29LCitcQiItcxxH5kcEncRhmc5UiofowuJxqPO5kZjm9rFROC9JWAXqC8HBgciI1AWcRbqj+fgX0emDg+MRif5OglmgJdlIEvzCJ8D5xQjQORhOlJlTKR4qmwD6B6FtOJ012yyMjrHMwuNTCM1jUG2SHDQPoWMMciZxdBR6PQOOtyF0ikEmEfrom5FqH0J7YOh+LUAE1bbolmrqj5SZOwTDxXJTdBFRqCrsBtoHRnAW7hRXThYE3VA7koVjo2CfUK4O2WdHodx7c7FsZ25sNDtotxp4SF++OIrpcHf+6Ojk7BA/X2wwOfRIeLj5wVGNClYJF4K/sY4SrVBJhj323hHXG/ymScEu091PH0HaS5e0MEslGeLuBCt9fqYWKLNXNIpZGcuXfqlqqaHWLhrFrLpWvqpqpU1ixFs9Ll1WY5ZLo19ECUb3X+VXg/y5wEj4qtYVlXCtRdIvErtyZi0nDJc1aLZxCPtrZ3P9PxLIX2Vy8P8zQAxla1xVZlYba6NbYAAi7KIwSxnKKjDHtoAHfOb/qSD/Z1OKEA4XbXHUr8ozq/XOZKOFxgkx4Mv177Jaz4fhQFnWdr8c4283pVhBRSDg4+zLeOYyu9CcCsIBK5T2fF0mXK7JkYaAEaAoY9Mazqw1FdnBRcWFuA/ZGDOd/R7eH7my3m1MA208k60I3ibHozUps/bICe+PQllbUmjrBaxIqaynG5JwT5UrgmW9ubpjrt5kJMOKlMvavIM2o08cVqRcVvONyNw0Y088YVmvPIJeqVUEy9rkmU31imBZ1x7PNV6RelkeD16Relmfbm81VQTLevs2A74iDWXpXzznwwEj9YCszcbCcOqiSY4jYTh1Jx1B04o+/wH6/wOSPFj1xgAAAABJRU5ErkJggg==', - width: 26, - height: 36, - }, - ]), - this.updateMarker() - }, - methods: { - goto: function () { - var t = 'iOS' === weex.config.env.platform - !(function (t, n, a, o) { - var r = [ - { - title: '腾讯地图网页版', - getUrl: function () { - return ( - 'https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=' + - encodeURIComponent(a) + - '&tocoord=' + - encodeURIComponent(t + ',' + n) + - '&referer=APP' - ) - }, - }, - ], - s = [] - ;[ - { - title: '高德地图', - pname: 'com.autonavi.minimap', - action: o ? 'iosamap://' : 'amapuri://', - getUrl: function () { - var e - return ( - (e = o ? 'iosamap://path' : 'amapuri://route/plan/'), - (e += - '?sourceApplication=APP&dname=' + - encodeURIComponent(a) + - '&dlat=' + - t + - '&dlon=' + - n + - '&dev=0') - ) - }, - }, - { - title: '百度地图', - pname: 'com.baidu.BaiduMap', - action: 'baidumap://', - getUrl: function () { - return ( - 'baidumap://map/direction?destination=' + - encodeURIComponent( - 'latlng:' + t + ',' + n + '|name:' + a - ) + - '&mode=driving&src=APP&coord_type=gcj02' - ) - }, - }, - { - title: '腾讯地图', - pname: 'com.tencent.map', - action: 'qqmap://', - getUrl: function () { - return ( - 'qqmap://map/routeplan?type=drive' + - (o ? '&from=' + encodeURIComponent('我的位置') : '') + - '&to=' + - encodeURIComponent(a) + - '&tocoord=' + - encodeURIComponent(t + ',' + n) + - '&referer=APP' - ) - }, - }, - ].forEach(function (t) { - e.runtime.isApplicationExist({ - pname: t.pname, - action: t.action, - }) && s.push(t) - }), - o && - s.unshift({ - title: 'Apple 地图', - navigateTo: function () { - i.openSystemMapNavigation({ - longitude: n, - latitude: t, - name: a, - }) - }, - }), - 0 === s.length && (s = s.concat(r)), - e.nativeUI.actionSheet( - { title: '导航方式', cancel: '取消', buttons: s }, - function (t) { - var n, - a = t.index - a > 0 && - ((n = s[a - 1]).navigateTo - ? n.navigateTo() - : e.runtime.openURL( - n.getUrl(), - function () {}, - n.pname - )) - } - ) - })(this.latitude, this.longitude, this.name, t) - }, - updateMarker: function () { - this.mapContext.moveToLocation(), - this.mapContext.translateMarker( - { - markerId: 'location', - destination: { - latitude: this.latitude, - longitude: this.longitude, - }, - duration: 0, - }, - function (e) {} - ) - }, - }, - } - t.default = r - }.call(this, n(2).weexPlus)) - }, - function (e, t) { - e.exports = { - page: { flex: 1 }, - 'flex-r': { flexDirection: 'row', flexWrap: 'nowrap' }, - 'flex-c': { flexDirection: 'column', flexWrap: 'nowrap' }, - 'flex-fill': { flex: 1 }, - 'a-i-c': { alignItems: 'center' }, - 'j-c-c': { justifyContent: 'center' }, - target: { paddingTop: '10', paddingBottom: '10' }, - 'text-area': { paddingLeft: '10', paddingRight: '10', flex: 1 }, - name: { fontSize: '16', lines: 1, textOverflow: 'ellipsis' }, - address: { - fontSize: '14', - color: '#808080', - lines: 1, - textOverflow: 'ellipsis', - marginTop: '2', - }, - 'goto-area': { - paddingTop: 0, - paddingRight: '15', - paddingBottom: 0, - paddingLeft: '15', - }, - 'goto-icon': { width: '50', height: '50' }, - 'goto-text': { fontSize: '14', color: '#FFFFFF' }, - } - }, - , - , - , - , - , - , - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - var a = function () { - var e = this, - t = e.$createElement, - n = e._self._c || t - return n( - 'scroll-view', - { - staticStyle: { flexDirection: 'column' }, - attrs: { scrollY: !0, enableBackToTop: !0, bubble: 'true' }, - }, - [ - n( - 'view', - { staticClass: ['page', 'flex-c'] }, - [ - n('map', { - ref: 'map1', - staticClass: ['flex-fill', 'map'], - attrs: { - longitude: e.longitude, - latitude: e.latitude, - markers: e.markers, - }, - }), - n('view', { staticClass: ['flex-r', 'a-i-c', 'target'] }, [ - n('view', { staticClass: ['text-area'] }, [ - n('u-text', { staticClass: ['name'] }, [ - e._v(e._s(e.name)), - ]), - n('u-text', { staticClass: ['address'] }, [ - e._v(e._s(e.address)), - ]), - ]), - n( - 'view', - { staticClass: ['goto-area'], on: { click: e.goto } }, - [ - n('u-image', { - staticClass: ['goto-icon'], - attrs: { - src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAACnVBMVEUAAAA9avA+avA9avA/bPE8afA+avM9afA9avA9au9Ac/I+bPQ9avA8a/E8au8+avY9avA9avBAgP88avA9au9AbfFAgP89avA9avBJbf89au88afA8ae88afA8ae9AbO88afA/avE9ae88avBHcfFCcfY+a/H///89afE8afA8avA9afA8afA9a/E9afA9avA8avA8avA9ae////88ae8/a+/+/v77/P5Cbu9jh/I9au9Te/CIo/XY4fuasfbH1PpJc/Dl6/xHce9Cbe9Eb+9FcO/3+f5SevC0xfjh6PygtvdLdPD4+f7e5fytwPj9/f7y9f1agPG6yvlsjvNIcvC8y/lXfvFNdvBZf/HR3PtBbe+DoPTT3fvg5/xWffGyxPh/nPTo7f32+P65yfnBz/n6+/6xw/i+zfmwwvj5+v6Np/WetPdPd/BMdfBOd/BdgvGkufdGce9ghfKnu/deg/F4l/NqjPKAnfS3x/lAbO+KpfVPePBmifKqvviZsPait/fS3PtUe/F6mfT8/f7s8P2Xr/bX4PuWrvbI1fqdtPfq7/3t8f3E0vqCn/RRefCzxPjK1vpwkfPP2vtVfPHR2/tDbu+BnvTr8P3G0/qLpvXW3/uOqPXL1/rf5vyht/eDn/Rzk/OPqfWQqfXZ4vuGovX19/67y/nm7Pymuvc+au9hhfKluvfU3vt3lvO3yPlpjPJykvN2lfNQePB7mfSsv/ju8v18mvTO2fvv8/22x/nr7/2cs/aMpvXn7P3D0fp+nPR5mPTE0frj6fyftfdcgfFfhPHN2Prx9P1ihvJ2lvO/zvm9zPl0lPOHo/VsjvKovPeQqvX09v6TrPZ1lfOUrfZnivKVrfbM2PrAzvmuwfi1xvjC0Pri6fzz9v59m/T8d63OAAAAM3RSTlMA7GNUSf4p38bFFC3nN7Id75oI/eI4BIv7B9Kl9fnCQLs1ossSG2sBS/p7rJlYuLmYrcSkuUTkAAAGJElEQVR4XsWbVXvbShBAJbumJE0abp0mbdI23KS9M4YgM0ORmZmZmZkZLjMzMzPDb7m2NvJnx8p6pVjd86J18nA+raSFmVlBNXGRxtyMApvdIqamiha7rSAj1xgZJ+iLOTPPEo8KxFvyMs06SSMMKVFIJSrFEBFu6zBjdA4ykBNtHBZGbfq4IcjMkHHpYdKOGIkqGTkiDNpBNtSAbdAAtYNHoUZGDRa0MzrWhJoxxY7WqM0yiDggREOWFm9MGg6YtBj13mwRw4CYrVKblGzCsGBKTlLjHWPFsGEdw+41J2AYSWCePRJFDCtiIuNYNRzDzHCmcWzsUAw7Q8cy3C/xhtsc8p4T1fbz7TUXmXo7xHM2i6iSb2Hus8iAaKZ+vwmoXgzwYQnLV0X5npOsqEkM9QcdGBJr/2NYMmoUA9zswZAk9zsvmLSJCc+txBCYspW9MSIORAyd7xQjHVFxlsxKQ+1iwrUipJOmtDIw4IDF0PFKNVIxKKyvWDu68vbEQ2+5OnxAAAc2Iw0xeB0Wi0zsnb8f6NyYghRig9axJmSguHkhhGRh8zTKm9131cu0fq6uAAY6tyGFUX3mJGTAXQYMvLkSqQTOUzZk4GsGbdsmDMEjAfsyZGAbEFrbz253FMuUgh/zDjOM2f47Opb9YO1xIqjY3u93vKABGRgp+EhHBnYRQWMx9iN+/EVkI90nzkcG2iTBMw5UFi+85UZG8mXvMJb9/iQi2IHK4s+6kJkhcrTCyD4mlyn//fglVINRIEQjA29L4t1K4o72CaiKaOKNyEEGlkjibQriQ0WokpwIFfNhtyQOnnteXkaZ/umzY4pWsXZSJHHUwxdHeb1mfPhiNHvEmTzEmR7xeB7iPI/YwkNsEYS4eB7i+DghEnmIMVIw8hEbhVw+4lwhg484QyjkIy4UrHzEVsHOR2wXLHzEFkHkIxaFVD7iVG5i5q4u2ujlpfB1tQW5YBHsyAW7YEMu2IQC5EKBkIFcyBBykQu5ghG5YGRZ+qzasmUV+uFYhzJfrrmKmohkWexNAfAPmk17b+kHcns9fIQ+znf2ZSVlsSdY1IonnIP9pUjY4f+vWdCXyZTlrZBHCeQRugC6epuSYOt8gIO4eo6Hza2waI6XvUTcs8FDBVR4L99QxHnULcwmCOIplGiEN1YsB3+mS2Ji6oZulH9StjBmDeInZ3+K12fKuODyzI3E9HyXhytwxXt5gSI2U7epdUWEfQD7eptuDKbLCatVPuMosjFnerkUOLq8mAQp2lAWz3vUgwtc3ku9JKZszA0qxa894WEZ4kaAI5WILa1QTsTsz9ggB19UiWeDh6mIeM8F7xZhObhKVIpzIqjhpi0ze6kCqJLbpxHn7Nx5RhJjz6uwdNkBaEefuPyehzIo814+7lccTQ+wvQ4KnJEU04kYG8oAoH6V2gHESA8p/lwq0Q7QXOrjToAY3XsA7tcgYfJjhLkwt7dVTQ8p0oOoe4jk7NNICBAf7gCAG7XoQ37GNMYxhY3fJ4HTdU54ECSumQ8w9SjADHJnjl4mwkS5SQsb0wPllcdgsdRYBPWfBIpr71YBLK7BcoD7LYhYAsGUUALl9NTAYmidJDUuNkGb21+863MAkPq/GeDmCnbxCJZkyF3w9fAXLliChOLZ0LT1N3B+tU6elafWITom9XICTshNhb62saR/TjrhNBIcpxrB+R1pLgCAc5O/X40yP9Sxv1yDQie8HGuc8OPVn3YvWnChqRO8NEk5tFuwtLwKqn75taFyba17Wk1ddcupLqy8RyADiMxa5YQXPcW3AvyY9/i1iv2wHBF7OuABVl6AAI7hFFDifFCKjyWpeeT3PxrXl18/eaeoQXqv/oS/EHHD5QrvlHzp73/+dYJMN5bMUGI7JanJnsZt+Y8MjbNQZqu7du0ELzXIhDiakrjWEwMlVa8naVmU4gQdEWMo5Rg6YsqmFKDoSTKt5EZHrEnUIiPdSBjDUFalA6KZoZBMB4Yn8iqd41UsyKs8kldBKK8SWF5Fv7zKnHkVdvMvZedfvM//uAL/Axr8j6TwP4RDSM9Xc+woP53TQStOR8v0wZw5XvfDdPTjg4VW+figtVDb8cH/AZ+Eg+9jqX0NAAAAAElFTkSuQmCC', - }, - }), - ], - 1 - ), - ]), - ], - 1 - ), - ] - ) - }, - o = [] - n.d(t, 'b', function () { - return a - }), - n.d(t, 'c', function () { - return o - }), - n.d(t, 'a', function () {}) - }, - , - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(16), - o = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = o.a - }, - , - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - n(3) - var a = n(7) - ;(a.default.mpType = 'page'), - (a.default.route = 'template/__uniappopenlocation'), - (a.default.el = '#root'), - new Vue(a.default) - }, -]) +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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=42)}([function(e,t){e.exports={}},function(e,t,n){"use strict";function a(e,t,n,a,o,i,r,s,u,c){var l,f="function"==typeof e?e.options:e;if(u){f.components||(f.components={});var d=Object.prototype.hasOwnProperty;for(var p in u)d.call(u,p)&&!d.call(f.components,p)&&(f.components[p]=u[p])}if(c&&((c.beforeCreate||(c.beforeCreate=[])).unshift((function(){this[c.__module]=this})),(f.mixins||(f.mixins=[])).push(c)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),a&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},f._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(f.functional){f._injectStyles=l;var v=f.render;f.render=function(e,t){return l.call(t),v(e,t)}}else{var g=f.beforeCreate;f.beforeCreate=g?[].concat(g,l):[l]}return{exports:e,options:f}}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.weexPlus=t.default=void 0,a="function"==typeof getUni?getUni:function(){var e=function(e){return"function"==typeof e},t=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e]}))},n=/^\$|^on|^create|Sync$|Manager$|^pause/,a=["os","getCurrentSubNVue","getSubNVueById","stopRecord","stopVoice","stopBackgroundAudio","stopPullDownRefresh","hideKeyboard","hideToast","hideLoading","showNavigationBarLoading","hideNavigationBarLoading","canIUse","navigateBack","closeSocket","pageScrollTo","drawCanvas"],i=function(e){return(!n.test(e)||"createBLEConnection"===e)&&!~a.indexOf(e)},r=function(n){return function(){for(var a=arguments.length,o=Array(a>1?a-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return e(r.success)||e(r.fail)||e(r.complete)?n.apply(void 0,[r].concat(o)):t(new Promise((function(e,t){n.apply(void 0,[Object.assign({},r,{success:e,fail:t})].concat(o)),Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))}})))}},s=[],u=void 0;function c(e){s.forEach((function(t){return t({origin:u,data:e})}))}var l=o.webview.currentWebview().id,f=new BroadcastChannel("UNI-APP-SUBNVUE");function d(e){var t=o.webview.getWebviewById(e);return t&&!t.$processed&&function(e){e.$processed=!0;var t=o.webview.currentWebview().id===e.id,n="uniNView"===e.__uniapp_origin_type&&e.__uniapp_origin_id,a=e.id;if(e.postMessage=function(e){n?f.postMessage({data:e,to:t?n:a}):A({type:"UniAppSubNVue",data:e})},e.onMessage=function(e){s.push(e)},e.__uniapp_mask_id){u=e.__uniapp_host;var i=e.__uniapp_mask,r=o.webview.getWebviewById(e.__uniapp_mask_id);r=r.parent()||r;var c=e.show,l=e.hide,d=e.close,p=function(){r.setStyle({mask:i})},v=function(){r.setStyle({mask:"none"})};e.show=function(){p();for(var t=arguments.length,n=Array(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/x-www-form-urlencoded";return"object"===(void 0===e?"undefined":j(e))?"POST"===t.toUpperCase()&&"application/json"===n.toLowerCase()?JSON.stringify(e):Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&"):e},U=weex.requireModule("plusstorage"),R=weex.requireModule("clipboard"),V=function(){if("function"==typeof getUniEmitter)return getUniEmitter;var e={$on:function(){console.warn("uni.$on failed")},$off:function(){console.warn("uni.$off failed")},$once:function(){console.warn("uni.$once failed")},$emit:function(){console.warn("uni.$emit failed")}};return function(){return e}}();function q(e,t,n){return e[t].apply(e,n)}var z=Object.freeze({loadFontFace:function(t){var n=t.family,a=t.source,o=(t.desc,t.success),i=(t.fail,t.complete);B.addRule("fontFace",{fontFamily:n,src:a.replace(/"/g,"'")});var r={errMsg:"loadFontFace:ok",status:"loaded"};e(o)&&o(r),e(i)&&i(r)},ready:E,request:function(t){var n=t.url,a=t.data,o=t.header,i=t.method,r=void 0===i?"GET":i,s=t.dataType,u=void 0===s?"json":s,c=(t.responseType,t.success),l=t.fail,f=t.complete,d=!1,p=!1,v={};if(o)for(var g in o)p||"content-type"!==g.toLowerCase()?v[g]=o[g]:(p=!0,v["Content-Type"]=o[g]);return"GET"===r&&a&&(n=n+(~n.indexOf("?")?"&"===n.substr(-1)||"?"===n.substr(-1)?"":"&":"?")+L(a)),N.fetch({url:n,method:r,headers:v,type:"json"===u?"json":"text",body:"GET"!==r?L(a,r,v["Content-Type"]):""},(function(t){var n=t.status,a=(t.ok,t.statusText,t.data),o=t.headers,i={};!n||-1===n||d?(i.errMsg="request:fail",e(l)&&l(i)):(i.data=a,i.statusCode=n,i.header=o,e(c)&&c(i)),e(f)&&f(i)})),{abort:function(){d=!0}}},getStorage:function(t){var n=t.key,a=(t.data,t.success),o=t.fail,i=t.complete;U.getItem(n+"__TYPE",(function(t){if("success"===t.result){var r=t.data;U.getItem(n,(function(t){if("success"===t.result){var n=t.data;r&&n?("String"!==r&&(n=JSON.parse(n)),e(a)&&a({errMsg:"getStorage:ok",data:n})):(t.errMsg="setStorage:fail",e(o)&&o(t))}else t.errMsg="setStorage:fail",e(o)&&o(t);e(i)&&i(t)}))}else t.errMsg="setStorage:fail",e(o)&&o(t),e(i)&&i(t)}))},setStorage:function(t){var n=t.key,a=t.data,o=t.success,i=t.fail,r=t.complete,s="String";"object"===(void 0===a?"undefined":j(a))&&(s="Object",a=JSON.stringify(a)),U.setItem(n,a,(function(t){"success"===t.result?U.setItem(n+"__TYPE",s,(function(t){"success"===t.result?e(o)&&o({errMsg:"setStorage:ok"}):(t.errMsg="setStorage:fail",e(i)&&i(t))})):(t.errMsg="setStorage:fail",e(i)&&i(t)),e(r)&&r(t)}))},removeStorage:function(t){var n=t.key,a=(t.data,t.success),o=t.fail,i=t.complete;U.removeItem(n,(function(t){"success"===t.result?e(a)&&a({errMsg:"removeStorage:ok"}):(t.errMsg="removeStorage:fail",e(o)&&o(t)),e(i)&&i(t)})),U.removeItem(n+"__TYPE")},clearStorage:function(e){e.key,e.data,e.success,e.fail,e.complete},getClipboardData:function(t){var n=t.success,a=(t.fail,t.complete);R.getString((function(t){var o={errMsg:"getClipboardData:ok",data:t.data};e(n)&&n(o),e(a)&&a(o)}))},setClipboardData:function(t){var n=t.data,a=t.success,o=(t.fail,t.complete),i={errMsg:"setClipboardData:ok"};R.setString(n),e(a)&&a(i),e(o)&&o(i)},onSubNVueMessage:c,getSubNVueById:d,getCurrentSubNVue:function(){return d(o.webview.currentWebview().id)},$on:function(){return q(V(),"$on",[].concat(Array.prototype.slice.call(arguments)))},$off:function(){return q(V(),"$off",[].concat(Array.prototype.slice.call(arguments)))},$once:function(){return q(V(),"$once",[].concat(Array.prototype.slice.call(arguments)))},$emit:function(){return q(V(),"$emit",[].concat(Array.prototype.slice.call(arguments)))}}),F={os:{nvue:!0}},D={};return"undefined"!=typeof Proxy?D=new Proxy({},{get:function(e,t){if("os"===t)return{nvue:!0};if("postMessage"===t)return A;if("requireNativePlugin"===t)return k;if("onNavigationBarButtonTap"===t)return x;if("onNavigationBarSearchInputChanged"===t)return C;if("onNavigationBarSearchInputConfirmed"===t)return M;if("onNavigationBarSearchInputClicked"===t)return I;var n=z[t];return n||(n=b(t)),i(t)?r(n):n}}):(Object.keys(F).forEach((function(e){D[e]=F[e]})),D.postMessage=A,D.requireNativePlugin=k,D.onNavigationBarButtonTap=x,D.onNavigationBarSearchInputChanged=C,D.onNavigationBarSearchInputConfirmed=M,D.onNavigationBarSearchInputClicked=I,Object.keys({uploadFile:!0,downloadFile:!0,chooseImage:!0,previewImage:!0,getImageInfo:!0,saveImageToPhotosAlbum:!0,chooseVideo:!0,saveVideoToPhotosAlbum:!0,saveFile:!0,getSavedFileList:!0,getSavedFileInfo:!0,removeSavedFile:!0,openDocument:!0,setStorage:!0,getStorage:!0,getStorageInfo:!0,removeStorage:!0,clearStorage:!0,getLocation:!0,chooseLocation:!0,openLocation:!0,getSystemInfo:!0,getNetworkType:!0,makePhoneCall:!0,scanCode:!0,setScreenBrightness:!0,getScreenBrightness:!0,setKeepScreenOn:!0,vibrateLong:!0,vibrateShort:!0,addPhoneContact:!0,showToast:!0,showLoading:!0,hideToast:!0,hideLoading:!0,showModal:!0,showActionSheet:!0,setNavigationBarTitle:!0,setNavigationBarColor:!0,navigateTo:!0,redirectTo:!0,reLaunch:!0,switchTab:!0,navigateBack:!0,getProvider:!0,login:!0,getUserInfo:!0,share:!0,requestPayment:!0,subscribePush:!0,unsubscribePush:!0,onPush:!0,offPush:!0}).forEach((function(e){var t=z[e];t||(t=b(e)),i(e)?D[e]=r(t):D[e]=t}))),D};var o=new WeexPlus(weex);t.weexPlus=o;var i=a(weex,o,BroadcastChannel);t.default=i},function(e,t,n){Vue.prototype.__$appStyle__={},Vue.prototype.__merge_style&&Vue.prototype.__merge_style(n(4).default,Vue.prototype.__$appStyle__)},function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=o.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={onLoad:function(){this.initMessage()},methods:{initMessage:function(){var t=this,n=e.webview.currentWebview().extras||{},a=n.from,o=(n.callback,n.runtime),i=n.data,r=void 0===i?{}:i,s=n.useGlobalEvent;this.__from=a,this.__runtime=o,this.__page=e.webview.currentWebview().id,this.__useGlobalEvent=s,this.data=JSON.parse(JSON.stringify(r)),e.key.addEventListener("backbutton",(function(){"function"==typeof t.onClose?t.onClose():e.webview.currentWebview().close("auto")}));var u=this,c=function(e){var t=e.data&&e.data.__message;t&&u.__onMessageCallback&&u.__onMessageCallback(t.data)};this.__useGlobalEvent?weex.requireModule("globalEvent").addEventListener("plusMessage",c):new BroadcastChannel(this.__page).onmessage=c},postMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=JSON.parse(JSON.stringify({__message:{__page:this.__page,data:t,keep:n}})),o=this.__from;if("v8"===this.__runtime)if(this.__useGlobalEvent)e.webview.postMessageToUniNView(a,o);else{var i=new BroadcastChannel(o);i.postMessage(a)}else{var r=e.webview.getWebviewById(o);r&&r.evalJS("__plusMessage&&__plusMessage(".concat(JSON.stringify({data:a}),")"))}},onMessage:function(e){this.__onMessageCallback=e}}};t.default=n}).call(this,n(2).weexPlus)},,function(e,t,n){"use strict";var a=n(29),o=n(14),i=n(1);var r=Object(i.a)(o.default,a.b,a.c,!1,null,null,"fd96f2da",!1,a.a,void 0);(function(e){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(n(37).default,this.options.style):Object.assign(this.options.style,n(37).default)}).call(r),t.default=r.exports},,,,,,,function(e,t,n){"use strict";var a=n(15),o=n.n(a);t.default=o.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,o=(a=n(5))&&a.__esModule?a:{default:a};var i=weex.requireModule("mapSearch");var r={mixins:[o.default],data:function(){return{longitude:"",latitude:"",markers:[],name:"",address:""}},onLoad:function(){var e=this.data;this.latitude=e.latitude,this.longitude=e.longitude,this.name=e.name||"",this.address=e.address||""},onReady:function(){this.mapContext=this.$refs.map1,this.markers=[{id:"location",latitude:this.latitude,longitude:this.longitude,title:this.name,zIndex:"1",iconPath:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABICAMAAACORiZjAAAByFBMVEUAAAD/PyL/PyL/PyL/PyL/PyL/PyL/PyL/PyL/PiL/PyL/PyL/PyP/PyL/PyL/PyL/PyL/PiL/PyL8PiP/PyL4OyP/PyL3OyX9Pyb0RUP0RkPzOiXsPj3YLi7TKSnQJiX0RkTgMCj0QjvkNC3vPDPwOy/9PyXsNSTyRUTgNDPdMjHrPTzuQD7iNTTxQ0HTJyTZKyf1RULlNjDZKyTfLSLeLSX0Qzz3Qzv8PSTMJCTmOjnPJSXLIiLzRkXWLCvgNDPZLyzVKijRJSTtPzvcMS7jNjPZLCnyREHpOzjiNDDtPzvzQz/VKSXkNTDsPDXyQjz2RT7pMyTxOinjMST5QjTmOjnPJSLdLyr0RD//YF7/////R0b/Tk3/XVv/WFb/VVP/S0v/Pz//W1n/UVD/REP/Xlz/Ojr/QUH/Skn/U1L/ODf7VlX5UU/oOzrqNzf/+/v5UlHvQUD2TEv0SUj3Tk3/2dn8W1r6TEv7R0b7REPvPTzzPDvwNjXkMjLnMDDjLS3dKir/xcX/vr7/qqn/pqX/mZn/fn7/ZWT/8PD/4eH/3t3/zs7/ra3/kpL/iIj/e3r5PDz4NjbxMTHsMTDlLCz/9vb/6ej/ubjhOGVRAAAAWXRSTlMABQ4TFgoIHhApI0RAGhgzJi89Ozg2LVEg4s5c/v366tmZiYl2X0pE/vn08eTe1sWvqqiOgXVlUE399/b08u3n4tzZ1dTKyMTDvLmzqqKal35taFxH6sC3oms+ongAAAOtSURBVEjHjZV3W9pQGMXJzQACQRARxVF3HdVW26od7q111NqhdbRSbQVElnvvbV1tv25Jgpr3kpCcP+/7/J5z8p57QScr4l46jSJohEhKEGlANKGBYBA1NFDpyklPz3FV5tWwHKnGEbShprIuFPAujEW14A2E6nqqWYshEcYYqnNC3mEgbyh9wMgZGCUbZHZFFobjtODLKWQpRMgyhrxiiQtwK/6SqpczY/QdvqlhJflcZpZk4hiryzecQIH0IitFY0xaBWDkqCEr9CLIDsDIJqywswbpNlB/ZEpVkZ4kPZKEqwmOTakrXGCk6IdwFYExDfI+SX4ISBeExjQp0m/jUMyIeuLVBo2Xma0kIRpVhyc1Kpxn42hxdd2BuOnv3Z2d3YO4Y29LCitcQiItcxxH5kcEncRhmc5UiofowuJxqPO5kZjm9rFROC9JWAXqC8HBgciI1AWcRbqj+fgX0emDg+MRif5OglmgJdlIEvzCJ8D5xQjQORhOlJlTKR4qmwD6B6FtOJ012yyMjrHMwuNTCM1jUG2SHDQPoWMMciZxdBR6PQOOtyF0ikEmEfrom5FqH0J7YOh+LUAE1bbolmrqj5SZOwTDxXJTdBFRqCrsBtoHRnAW7hRXThYE3VA7koVjo2CfUK4O2WdHodx7c7FsZ25sNDtotxp4SF++OIrpcHf+6Ojk7BA/X2wwOfRIeLj5wVGNClYJF4K/sY4SrVBJhj323hHXG/ymScEu091PH0HaS5e0MEslGeLuBCt9fqYWKLNXNIpZGcuXfqlqqaHWLhrFrLpWvqpqpU1ixFs9Ll1WY5ZLo19ECUb3X+VXg/y5wEj4qtYVlXCtRdIvErtyZi0nDJc1aLZxCPtrZ3P9PxLIX2Vy8P8zQAxla1xVZlYba6NbYAAi7KIwSxnKKjDHtoAHfOb/qSD/Z1OKEA4XbXHUr8ozq/XOZKOFxgkx4Mv177Jaz4fhQFnWdr8c4283pVhBRSDg4+zLeOYyu9CcCsIBK5T2fF0mXK7JkYaAEaAoY9Mazqw1FdnBRcWFuA/ZGDOd/R7eH7my3m1MA208k60I3ibHozUps/bICe+PQllbUmjrBaxIqaynG5JwT5UrgmW9ubpjrt5kJMOKlMvavIM2o08cVqRcVvONyNw0Y088YVmvPIJeqVUEy9rkmU31imBZ1x7PNV6RelkeD16Relmfbm81VQTLevs2A74iDWXpXzznwwEj9YCszcbCcOqiSY4jYTh1Jx1B04o+/wH6/wOSPFj1xgAAAABJRU5ErkJggg==",width:26,height:36}],this.updateMarker()},methods:{goto:function(){var t="iOS"===weex.config.env.platform;!function(t,n,a,o){var r=[{title:"腾讯地图网页版",getUrl:function(){return"https://apis.map.qq.com/uri/v1/routeplan?type=drive&to="+encodeURIComponent(a)+"&tocoord="+encodeURIComponent(t+","+n)+"&referer=APP"}}],s=[];[{title:"高德地图",pname:"com.autonavi.minimap",action:o?"iosamap://":"amapuri://",getUrl:function(){var e;return e=o?"iosamap://path":"amapuri://route/plan/",e+="?sourceApplication=APP&dname="+encodeURIComponent(a)+"&dlat="+t+"&dlon="+n+"&dev=0"}},{title:"百度地图",pname:"com.baidu.BaiduMap",action:"baidumap://",getUrl:function(){return"baidumap://map/direction?destination="+encodeURIComponent("latlng:"+t+","+n+"|name:"+a)+"&mode=driving&src=APP&coord_type=gcj02"}},{title:"腾讯地图",pname:"com.tencent.map",action:"qqmap://",getUrl:function(){return"qqmap://map/routeplan?type=drive"+(o?"&from="+encodeURIComponent("我的位置"):"")+"&to="+encodeURIComponent(a)+"&tocoord="+encodeURIComponent(t+","+n)+"&referer=APP"}}].forEach((function(t){e.runtime.isApplicationExist({pname:t.pname,action:t.action})&&s.push(t)})),o&&s.unshift({title:"Apple 地图",navigateTo:function(){i.openSystemMapNavigation({longitude:n,latitude:t,name:a})}}),0===s.length&&(s=s.concat(r)),e.nativeUI.actionSheet({title:"导航方式",cancel:"取消",buttons:s},(function(t){var n,a=t.index;a>0&&((n=s[a-1]).navigateTo?n.navigateTo():e.runtime.openURL(n.getUrl(),(function(){}),n.pname))}))}(this.latitude,this.longitude,this.name,t)},updateMarker:function(){this.mapContext.moveToLocation(),this.mapContext.translateMarker({markerId:"location",destination:{latitude:this.latitude,longitude:this.longitude},duration:0},(function(e){}))}}};t.default=r}).call(this,n(2).weexPlus)},function(e,t){e.exports={page:{flex:1},"flex-r":{flexDirection:"row",flexWrap:"nowrap"},"flex-c":{flexDirection:"column",flexWrap:"nowrap"},"flex-fill":{flex:1},"a-i-c":{alignItems:"center"},"j-c-c":{justifyContent:"center"},target:{paddingTop:"10",paddingBottom:"10"},"text-area":{paddingLeft:"10",paddingRight:"10",flex:1},name:{fontSize:"16",lines:1,textOverflow:"ellipsis"},address:{fontSize:"14",color:"#808080",lines:1,textOverflow:"ellipsis",marginTop:"2"},"goto-area":{paddingTop:0,paddingRight:"15",paddingBottom:0,paddingLeft:"15"},"goto-icon":{width:"50",height:"50"},"goto-text":{fontSize:"14",color:"#FFFFFF"}}},,,,,,,,,,,,,function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("scroll-view",{staticStyle:{flexDirection:"column"},attrs:{scrollY:!0,enableBackToTop:!0,bubble:"true"}},[n("view",{staticClass:["page","flex-c"]},[n("map",{ref:"map1",staticClass:["flex-fill","map"],attrs:{longitude:e.longitude,latitude:e.latitude,markers:e.markers}}),n("view",{staticClass:["flex-r","a-i-c","target"]},[n("view",{staticClass:["text-area"]},[n("u-text",{staticClass:["name"]},[e._v(e._s(e.name))]),n("u-text",{staticClass:["address"]},[e._v(e._s(e.address))])]),n("view",{staticClass:["goto-area"],on:{click:e.goto}},[n("u-image",{staticClass:["goto-icon"],attrs:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAACnVBMVEUAAAA9avA+avA9avA/bPE8afA+avM9afA9avA9au9Ac/I+bPQ9avA8a/E8au8+avY9avA9avBAgP88avA9au9AbfFAgP89avA9avBJbf89au88afA8ae88afA8ae9AbO88afA/avE9ae88avBHcfFCcfY+a/H///89afE8afA8avA9afA8afA9a/E9afA9avA8avA8avA9ae////88ae8/a+/+/v77/P5Cbu9jh/I9au9Te/CIo/XY4fuasfbH1PpJc/Dl6/xHce9Cbe9Eb+9FcO/3+f5SevC0xfjh6PygtvdLdPD4+f7e5fytwPj9/f7y9f1agPG6yvlsjvNIcvC8y/lXfvFNdvBZf/HR3PtBbe+DoPTT3fvg5/xWffGyxPh/nPTo7f32+P65yfnBz/n6+/6xw/i+zfmwwvj5+v6Np/WetPdPd/BMdfBOd/BdgvGkufdGce9ghfKnu/deg/F4l/NqjPKAnfS3x/lAbO+KpfVPePBmifKqvviZsPait/fS3PtUe/F6mfT8/f7s8P2Xr/bX4PuWrvbI1fqdtPfq7/3t8f3E0vqCn/RRefCzxPjK1vpwkfPP2vtVfPHR2/tDbu+BnvTr8P3G0/qLpvXW3/uOqPXL1/rf5vyht/eDn/Rzk/OPqfWQqfXZ4vuGovX19/67y/nm7Pymuvc+au9hhfKluvfU3vt3lvO3yPlpjPJykvN2lfNQePB7mfSsv/ju8v18mvTO2fvv8/22x/nr7/2cs/aMpvXn7P3D0fp+nPR5mPTE0frj6fyftfdcgfFfhPHN2Prx9P1ihvJ2lvO/zvm9zPl0lPOHo/VsjvKovPeQqvX09v6TrPZ1lfOUrfZnivKVrfbM2PrAzvmuwfi1xvjC0Pri6fzz9v59m/T8d63OAAAAM3RSTlMA7GNUSf4p38bFFC3nN7Id75oI/eI4BIv7B9Kl9fnCQLs1ossSG2sBS/p7rJlYuLmYrcSkuUTkAAAGJElEQVR4XsWbVXvbShBAJbumJE0abp0mbdI23KS9M4YgM0ORmZmZmZkZLjMzMzPDb7m2NvJnx8p6pVjd86J18nA+raSFmVlBNXGRxtyMApvdIqamiha7rSAj1xgZJ+iLOTPPEo8KxFvyMs06SSMMKVFIJSrFEBFu6zBjdA4ykBNtHBZGbfq4IcjMkHHpYdKOGIkqGTkiDNpBNtSAbdAAtYNHoUZGDRa0MzrWhJoxxY7WqM0yiDggREOWFm9MGg6YtBj13mwRw4CYrVKblGzCsGBKTlLjHWPFsGEdw+41J2AYSWCePRJFDCtiIuNYNRzDzHCmcWzsUAw7Q8cy3C/xhtsc8p4T1fbz7TUXmXo7xHM2i6iSb2Hus8iAaKZ+vwmoXgzwYQnLV0X5npOsqEkM9QcdGBJr/2NYMmoUA9zswZAk9zsvmLSJCc+txBCYspW9MSIORAyd7xQjHVFxlsxKQ+1iwrUipJOmtDIw4IDF0PFKNVIxKKyvWDu68vbEQ2+5OnxAAAc2Iw0xeB0Wi0zsnb8f6NyYghRig9axJmSguHkhhGRh8zTKm9131cu0fq6uAAY6tyGFUX3mJGTAXQYMvLkSqQTOUzZk4GsGbdsmDMEjAfsyZGAbEFrbz253FMuUgh/zDjOM2f47Opb9YO1xIqjY3u93vKABGRgp+EhHBnYRQWMx9iN+/EVkI90nzkcG2iTBMw5UFi+85UZG8mXvMJb9/iQi2IHK4s+6kJkhcrTCyD4mlyn//fglVINRIEQjA29L4t1K4o72CaiKaOKNyEEGlkjibQriQ0WokpwIFfNhtyQOnnteXkaZ/umzY4pWsXZSJHHUwxdHeb1mfPhiNHvEmTzEmR7xeB7iPI/YwkNsEYS4eB7i+DghEnmIMVIw8hEbhVw+4lwhg484QyjkIy4UrHzEVsHOR2wXLHzEFkHkIxaFVD7iVG5i5q4u2ujlpfB1tQW5YBHsyAW7YEMu2IQC5EKBkIFcyBBykQu5ghG5YGRZ+qzasmUV+uFYhzJfrrmKmohkWexNAfAPmk17b+kHcns9fIQ+znf2ZSVlsSdY1IonnIP9pUjY4f+vWdCXyZTlrZBHCeQRugC6epuSYOt8gIO4eo6Hza2waI6XvUTcs8FDBVR4L99QxHnULcwmCOIplGiEN1YsB3+mS2Ji6oZulH9StjBmDeInZ3+K12fKuODyzI3E9HyXhytwxXt5gSI2U7epdUWEfQD7eptuDKbLCatVPuMosjFnerkUOLq8mAQp2lAWz3vUgwtc3ku9JKZszA0qxa894WEZ4kaAI5WILa1QTsTsz9ggB19UiWeDh6mIeM8F7xZhObhKVIpzIqjhpi0ze6kCqJLbpxHn7Nx5RhJjz6uwdNkBaEefuPyehzIo814+7lccTQ+wvQ4KnJEU04kYG8oAoH6V2gHESA8p/lwq0Q7QXOrjToAY3XsA7tcgYfJjhLkwt7dVTQ8p0oOoe4jk7NNICBAf7gCAG7XoQ37GNMYxhY3fJ4HTdU54ECSumQ8w9SjADHJnjl4mwkS5SQsb0wPllcdgsdRYBPWfBIpr71YBLK7BcoD7LYhYAsGUUALl9NTAYmidJDUuNkGb21+863MAkPq/GeDmCnbxCJZkyF3w9fAXLliChOLZ0LT1N3B+tU6elafWITom9XICTshNhb62saR/TjrhNBIcpxrB+R1pLgCAc5O/X40yP9Sxv1yDQie8HGuc8OPVn3YvWnChqRO8NEk5tFuwtLwKqn75taFyba17Wk1ddcupLqy8RyADiMxa5YQXPcW3AvyY9/i1iv2wHBF7OuABVl6AAI7hFFDifFCKjyWpeeT3PxrXl18/eaeoQXqv/oS/EHHD5QrvlHzp73/+dYJMN5bMUGI7JanJnsZt+Y8MjbNQZqu7du0ELzXIhDiakrjWEwMlVa8naVmU4gQdEWMo5Rg6YsqmFKDoSTKt5EZHrEnUIiPdSBjDUFalA6KZoZBMB4Yn8iqd41UsyKs8kldBKK8SWF5Fv7zKnHkVdvMvZedfvM//uAL/Axr8j6TwP4RDSM9Xc+woP53TQStOR8v0wZw5XvfDdPTjg4VW+figtVDb8cH/AZ+Eg+9jqX0NAAAAAElFTkSuQmCC"}})],1)])],1)])},o=[];n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){}))},,,,,,,,function(e,t,n){"use strict";n.r(t);var a=n(16),o=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=o.a},,,,,function(e,t,n){"use strict";n.r(t);n(3);var a=n(7);a.default.mpType="page",a.default.route="template/__uniappopenlocation",a.default.el="#root",new Vue(a.default)}]); \ No newline at end of file diff --git a/packages/uni-app-vite/lib/template/__uniapppicker.js b/packages/uni-app-vite/lib/template/__uniapppicker.js index 9c967fc8d0..ac4e48c0d0 100644 --- a/packages/uni-app-vite/lib/template/__uniapppicker.js +++ b/packages/uni-app-vite/lib/template/__uniapppicker.js @@ -1,1896 +1 @@ -!(function (e) { - var t = {} - function n(a) { - if (t[a]) return t[a].exports - var r = (t[a] = { i: a, l: !1, exports: {} }) - return e[a].call(r.exports, r, r.exports, n), (r.l = !0), r.exports - } - ;(n.m = e), - (n.c = t), - (n.d = function (e, t, a) { - n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: a }) - }), - (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 a = Object.create(null) - if ( - (n.r(a), - Object.defineProperty(a, 'default', { enumerable: !0, value: e }), - 2 & t && 'string' != typeof e) - ) - for (var r in e) - n.d( - a, - r, - function (t) { - return e[t] - }.bind(null, r) - ) - return a - }), - (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 = 44)) -})([ - function (e, t) { - e.exports = {} - }, - function (e, t, n) { - 'use strict' - function a(e, t, n, a, r, i, o, s, u, c) { - var l, - f = 'function' == typeof e ? e.options : e - if (u) { - f.components || (f.components = {}) - var d = Object.prototype.hasOwnProperty - for (var p in u) - d.call(u, p) && !d.call(f.components, p) && (f.components[p] = u[p]) - } - if ( - (c && - ((c.beforeCreate || (c.beforeCreate = [])).unshift(function () { - this[c.__module] = this - }), - (f.mixins || (f.mixins = [])).push(c)), - t && ((f.render = t), (f.staticRenderFns = n), (f._compiled = !0)), - a && (f.functional = !0), - i && (f._scopeId = 'data-v-' + i), - o - ? ((l = function (e) { - ;(e = - e || - (this.$vnode && this.$vnode.ssrContext) || - (this.parent && - this.parent.$vnode && - this.parent.$vnode.ssrContext)) || - 'undefined' == typeof __VUE_SSR_CONTEXT__ || - (e = __VUE_SSR_CONTEXT__), - r && r.call(this, e), - e && e._registeredComponents && e._registeredComponents.add(o) - }), - (f._ssrRegister = l)) - : r && - (l = s - ? function () { - r.call(this, this.$root.$options.shadowRoot) - } - : r), - l) - ) - if (f.functional) { - f._injectStyles = l - var h = f.render - f.render = function (e, t) { - return l.call(t), h(e, t) - } - } else { - var v = f.beforeCreate - f.beforeCreate = v ? [].concat(v, l) : [l] - } - return { exports: e, options: f } - } - n.d(t, 'a', function () { - return a - }) - }, - function (e, t, n) { - 'use strict' - var a - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.weexPlus = t.default = void 0), - (a = - 'function' == typeof getUni - ? getUni - : function () { - var e = function (e) { - return 'function' == typeof e - }, - t = function (e) { - return e - .then(function (e) { - return [null, e] - }) - .catch(function (e) { - return [e] - }) - }, - n = /^\$|^on|^create|Sync$|Manager$|^pause/, - a = [ - 'os', - 'getCurrentSubNVue', - 'getSubNVueById', - 'stopRecord', - 'stopVoice', - 'stopBackgroundAudio', - 'stopPullDownRefresh', - 'hideKeyboard', - 'hideToast', - 'hideLoading', - 'showNavigationBarLoading', - 'hideNavigationBarLoading', - 'canIUse', - 'navigateBack', - 'closeSocket', - 'pageScrollTo', - 'drawCanvas', - ], - i = function (e) { - return ( - (!n.test(e) || 'createBLEConnection' === e) && - !~a.indexOf(e) - ) - }, - o = function (n) { - return function () { - for ( - var a = arguments.length, - r = Array(a > 1 ? a - 1 : 0), - i = 1; - i < a; - i++ - ) - r[i - 1] = arguments[i] - var o = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {} - return e(o.success) || e(o.fail) || e(o.complete) - ? n.apply(void 0, [o].concat(r)) - : t( - new Promise(function (e, t) { - n.apply( - void 0, - [ - Object.assign({}, o, { success: e, fail: t }), - ].concat(r) - ), - (Promise.prototype.finally = function (e) { - var t = this.constructor - return this.then( - function (n) { - return t.resolve(e()).then(function () { - return n - }) - }, - function (n) { - return t.resolve(e()).then(function () { - throw n - }) - } - ) - }) - }) - ) - } - }, - s = [], - u = void 0 - function c(e) { - s.forEach(function (t) { - return t({ origin: u, data: e }) - }) - } - var l = r.webview.currentWebview().id, - f = new BroadcastChannel('UNI-APP-SUBNVUE') - function d(e) { - var t = r.webview.getWebviewById(e) - return ( - t && - !t.$processed && - (function (e) { - e.$processed = !0 - var t = r.webview.currentWebview().id === e.id, - n = - 'uniNView' === e.__uniapp_origin_type && - e.__uniapp_origin_id, - a = e.id - if ( - ((e.postMessage = function (e) { - n - ? f.postMessage({ data: e, to: t ? n : a }) - : _({ type: 'UniAppSubNVue', data: e }) - }), - (e.onMessage = function (e) { - s.push(e) - }), - e.__uniapp_mask_id) - ) { - u = e.__uniapp_host - var i = e.__uniapp_mask, - o = r.webview.getWebviewById(e.__uniapp_mask_id) - o = o.parent() || o - var c = e.show, - l = e.hide, - d = e.close, - p = function () { - o.setStyle({ mask: i }) - }, - h = function () { - o.setStyle({ mask: 'none' }) - } - ;(e.show = function () { - p() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return c.apply(e, n) - }), - (e.hide = function () { - h() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return l.apply(e, n) - }), - (e.close = function () { - h() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return d.apply(e, n) - }) - } - })(t), - t - ) - } - f.onmessage = function (e) { - e.data.to === l && c(e.data.data) - } - var p = weex.requireModule('plus'), - h = weex.requireModule('globalEvent'), - v = 0, - g = {} - h.addEventListener('plusMessage', function (e) { - 'UniAppJsApi' === e.data.type - ? y(e.data.id, e.data.data) - : 'UniAppSubNVue' === e.data.type - ? c(e.data.data, e.data.options) - : 'onNavigationBarButtonTap' === e.data.type - ? 'function' == typeof S && S(e.data.data) - : 'onNavigationBarSearchInputChanged' === e.data.type - ? 'function' == typeof w && w(e.data.data) - : 'onNavigationBarSearchInputConfirmed' === e.data.type - ? 'function' == typeof A && A(e.data.data) - : 'onNavigationBarSearchInputClicked' === e.data.type && - 'function' == typeof T && - T(e.data.data) - }) - var y = function (e, t) { - var n = g[e] - n - ? (n(t), n.keepAlive || delete g[e]) - : console.error('callback[' + e + '] is undefined') - }, - m = function (t) { - var n, - a, - r = t.id, - i = t.type, - o = t.params - ;(g[r] = - ((a = function (t) { - e(n) - ? n(t) - : n && - (~t.errMsg.indexOf(':ok') - ? e(n.success) && n.success(t) - : ~t.errMsg.indexOf(':fail') && - e(n.fail) && - n.fail(t), - e(n.complete) && n.complete(t)) - }), - (e((n = o)) || (n && e(n.callback))) && (a.keepAlive = !0), - a)), - p.postMessage( - { id: r, type: i, params: o }, - '__uniapp__service' - ) - } - function _(e) { - p.postMessage(e, '__uniapp__service') - } - var b = function (e) { - return function (t) { - m({ id: v++, type: e, params: t }) - } - }, - S = void 0, - w = void 0, - A = void 0, - T = void 0 - function k(e) { - S = e - } - function M(e) { - w = e - } - function E(e) { - A = e - } - function C(e) { - T = e - } - function x(e) { - return weex.requireModule(e) - } - var I = weex.requireModule('dom'), - O = weex.requireModule('globalEvent'), - N = [] - function V(e) { - 'function' == typeof e && (this.isUniAppReady ? e() : N.push(e)) - } - O.addEventListener('plusMessage', function (e) { - 'UniAppReady' === e.data.type && - ((V.isUniAppReady = !0), - N.length && - (N.forEach(function (e) { - return e() - }), - (N = []))) - }) - var L = - '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 - }, - j = weex.requireModule('stream'), - P = function (e) { - var t = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 'GET', - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : 'application/x-www-form-urlencoded' - return 'object' === (void 0 === e ? 'undefined' : L(e)) - ? 'POST' === t.toUpperCase() && - 'application/json' === n.toLowerCase() - ? JSON.stringify(e) - : Object.keys(e) - .map(function (t) { - return ( - encodeURIComponent(t) + - '=' + - encodeURIComponent(e[t]) - ) - }) - .join('&') - : e - }, - D = weex.requireModule('plusstorage'), - $ = weex.requireModule('clipboard'), - B = (function () { - if ('function' == typeof getUniEmitter) return getUniEmitter - var e = { - $on: function () { - console.warn('uni.$on failed') - }, - $off: function () { - console.warn('uni.$off failed') - }, - $once: function () { - console.warn('uni.$once failed') - }, - $emit: function () { - console.warn('uni.$emit failed') - }, - } - return function () { - return e - } - })() - function R(e, t, n) { - return e[t].apply(e, n) - } - var U = Object.freeze({ - loadFontFace: function (t) { - var n = t.family, - a = t.source, - r = (t.desc, t.success), - i = (t.fail, t.complete) - I.addRule('fontFace', { - fontFamily: n, - src: a.replace(/"/g, "'"), - }) - var o = { errMsg: 'loadFontFace:ok', status: 'loaded' } - e(r) && r(o), e(i) && i(o) - }, - ready: V, - request: function (t) { - var n = t.url, - a = t.data, - r = t.header, - i = t.method, - o = void 0 === i ? 'GET' : i, - s = t.dataType, - u = void 0 === s ? 'json' : s, - c = (t.responseType, t.success), - l = t.fail, - f = t.complete, - d = !1, - p = !1, - h = {} - if (r) - for (var v in r) - p || 'content-type' !== v.toLowerCase() - ? (h[v] = r[v]) - : ((p = !0), (h['Content-Type'] = r[v])) - return ( - 'GET' === o && - a && - (n = - n + - (~n.indexOf('?') - ? '&' === n.substr(-1) || '?' === n.substr(-1) - ? '' - : '&' - : '?') + - P(a)), - j.fetch( - { - url: n, - method: o, - headers: h, - type: 'json' === u ? 'json' : 'text', - body: 'GET' !== o ? P(a, o, h['Content-Type']) : '', - }, - function (t) { - var n = t.status, - a = (t.ok, t.statusText, t.data), - r = t.headers, - i = {} - !n || -1 === n || d - ? ((i.errMsg = 'request:fail'), e(l) && l(i)) - : ((i.data = a), - (i.statusCode = n), - (i.header = r), - e(c) && c(i)), - e(f) && f(i) - } - ), - { - abort: function () { - d = !0 - }, - } - ) - }, - getStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - r = t.fail, - i = t.complete - D.getItem(n + '__TYPE', function (t) { - if ('success' === t.result) { - var o = t.data - D.getItem(n, function (t) { - if ('success' === t.result) { - var n = t.data - o && n - ? ('String' !== o && (n = JSON.parse(n)), - e(a) && a({ errMsg: 'getStorage:ok', data: n })) - : ((t.errMsg = 'setStorage:fail'), e(r) && r(t)) - } else (t.errMsg = 'setStorage:fail'), e(r) && r(t) - e(i) && i(t) - }) - } else - (t.errMsg = 'setStorage:fail'), - e(r) && r(t), - e(i) && i(t) - }) - }, - setStorage: function (t) { - var n = t.key, - a = t.data, - r = t.success, - i = t.fail, - o = t.complete, - s = 'String' - 'object' === (void 0 === a ? 'undefined' : L(a)) && - ((s = 'Object'), (a = JSON.stringify(a))), - D.setItem(n, a, function (t) { - 'success' === t.result - ? D.setItem(n + '__TYPE', s, function (t) { - 'success' === t.result - ? e(r) && r({ errMsg: 'setStorage:ok' }) - : ((t.errMsg = 'setStorage:fail'), e(i) && i(t)) - }) - : ((t.errMsg = 'setStorage:fail'), e(i) && i(t)), - e(o) && o(t) - }) - }, - removeStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - r = t.fail, - i = t.complete - D.removeItem(n, function (t) { - 'success' === t.result - ? e(a) && a({ errMsg: 'removeStorage:ok' }) - : ((t.errMsg = 'removeStorage:fail'), e(r) && r(t)), - e(i) && i(t) - }), - D.removeItem(n + '__TYPE') - }, - clearStorage: function (e) { - e.key, e.data, e.success, e.fail, e.complete - }, - getClipboardData: function (t) { - var n = t.success, - a = (t.fail, t.complete) - $.getString(function (t) { - var r = { errMsg: 'getClipboardData:ok', data: t.data } - e(n) && n(r), e(a) && a(r) - }) - }, - setClipboardData: function (t) { - var n = t.data, - a = t.success, - r = (t.fail, t.complete), - i = { errMsg: 'setClipboardData:ok' } - $.setString(n), e(a) && a(i), e(r) && r(i) - }, - onSubNVueMessage: c, - getSubNVueById: d, - getCurrentSubNVue: function () { - return d(r.webview.currentWebview().id) - }, - $on: function () { - return R( - B(), - '$on', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $off: function () { - return R( - B(), - '$off', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $once: function () { - return R( - B(), - '$once', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $emit: function () { - return R( - B(), - '$emit', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - }), - z = { os: { nvue: !0 } }, - F = {} - return ( - 'undefined' != typeof Proxy - ? (F = new Proxy( - {}, - { - get: function (e, t) { - if ('os' === t) return { nvue: !0 } - if ('postMessage' === t) return _ - if ('requireNativePlugin' === t) return x - if ('onNavigationBarButtonTap' === t) return k - if ('onNavigationBarSearchInputChanged' === t) - return M - if ('onNavigationBarSearchInputConfirmed' === t) - return E - if ('onNavigationBarSearchInputClicked' === t) - return C - var n = U[t] - return n || (n = b(t)), i(t) ? o(n) : n - }, - } - )) - : (Object.keys(z).forEach(function (e) { - F[e] = z[e] - }), - (F.postMessage = _), - (F.requireNativePlugin = x), - (F.onNavigationBarButtonTap = k), - (F.onNavigationBarSearchInputChanged = M), - (F.onNavigationBarSearchInputConfirmed = E), - (F.onNavigationBarSearchInputClicked = C), - Object.keys({ - uploadFile: !0, - downloadFile: !0, - chooseImage: !0, - previewImage: !0, - getImageInfo: !0, - saveImageToPhotosAlbum: !0, - chooseVideo: !0, - saveVideoToPhotosAlbum: !0, - saveFile: !0, - getSavedFileList: !0, - getSavedFileInfo: !0, - removeSavedFile: !0, - openDocument: !0, - setStorage: !0, - getStorage: !0, - getStorageInfo: !0, - removeStorage: !0, - clearStorage: !0, - getLocation: !0, - chooseLocation: !0, - openLocation: !0, - getSystemInfo: !0, - getNetworkType: !0, - makePhoneCall: !0, - scanCode: !0, - setScreenBrightness: !0, - getScreenBrightness: !0, - setKeepScreenOn: !0, - vibrateLong: !0, - vibrateShort: !0, - addPhoneContact: !0, - showToast: !0, - showLoading: !0, - hideToast: !0, - hideLoading: !0, - showModal: !0, - showActionSheet: !0, - setNavigationBarTitle: !0, - setNavigationBarColor: !0, - navigateTo: !0, - redirectTo: !0, - reLaunch: !0, - switchTab: !0, - navigateBack: !0, - getProvider: !0, - login: !0, - getUserInfo: !0, - share: !0, - requestPayment: !0, - subscribePush: !0, - unsubscribePush: !0, - onPush: !0, - offPush: !0, - }).forEach(function (e) { - var t = U[e] - t || (t = b(e)), i(e) ? (F[e] = o(t)) : (F[e] = t) - })), - F - ) - }) - var r = new WeexPlus(weex) - t.weexPlus = r - var i = a(weex, r, BroadcastChannel) - t.default = i - }, - function (e, t, n) { - ;(Vue.prototype.__$appStyle__ = {}), - Vue.prototype.__merge_style && - Vue.prototype.__merge_style(n(4).default, Vue.prototype.__$appStyle__) - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(0), - r = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = r.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - onLoad: function () { - this.initMessage() - }, - methods: { - initMessage: function () { - var t = this, - n = e.webview.currentWebview().extras || {}, - a = n.from, - r = (n.callback, n.runtime), - i = n.data, - o = void 0 === i ? {} : i, - s = n.useGlobalEvent - ;(this.__from = a), - (this.__runtime = r), - (this.__page = e.webview.currentWebview().id), - (this.__useGlobalEvent = s), - (this.data = JSON.parse(JSON.stringify(o))), - e.key.addEventListener('backbutton', function () { - 'function' == typeof t.onClose - ? t.onClose() - : e.webview.currentWebview().close('auto') - }) - var u = this, - c = function (e) { - var t = e.data && e.data.__message - t && u.__onMessageCallback && u.__onMessageCallback(t.data) - } - this.__useGlobalEvent - ? weex - .requireModule('globalEvent') - .addEventListener('plusMessage', c) - : (new BroadcastChannel(this.__page).onmessage = c) - }, - postMessage: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {}, - n = - arguments.length > 1 && void 0 !== arguments[1] && arguments[1], - a = JSON.parse( - JSON.stringify({ - __message: { __page: this.__page, data: t, keep: n }, - }) - ), - r = this.__from - if ('v8' === this.__runtime) - if (this.__useGlobalEvent) e.webview.postMessageToUniNView(a, r) - else { - var i = new BroadcastChannel(r) - i.postMessage(a) - } - else { - var o = e.webview.getWebviewById(r) - o && - o.evalJS( - '__plusMessage&&__plusMessage('.concat( - JSON.stringify({ data: a }), - ')' - ) - ) - } - }, - onMessage: function (e) { - this.__onMessageCallback = e - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - data: function () { - return { - locale: 'en', - fallbackLocale: 'en', - localization: { - en: { done: 'OK', cancel: 'Cancel' }, - zh: { done: '完成', cancel: '取消' }, - 'zh-hans': {}, - 'zh-hant': {}, - messages: {}, - }, - } - }, - onLoad: function () { - this.initLocale() - }, - created: function () { - this.initLocale() - }, - methods: { - initLocale: function () { - if (!this.__initLocale) { - this.__initLocale = !0 - var t = (e.webview.currentWebview().extras || {}).data || {} - if ( - (t.messages && (this.localization.messages = t.messages), - t.locale) - ) - this.locale = t.locale.toLowerCase() - else { - var n = e.os.language - .toLowerCase() - .split('/')[0] - .replace('_', '-') - .split('-'), - a = n[1] - a && - (n[1] = - { - chs: 'hans', - cn: 'hans', - sg: 'hans', - cht: 'hant', - tw: 'hant', - hk: 'hant', - mo: 'hant', - }[a] || a), - (n.length = n.length > 2 ? 2 : n.length), - (this.locale = n.join('-')) - } - } - }, - localize: function (e) { - var t = this.locale, - n = t.split('-')[0], - a = this.fallbackLocale, - r = this.localization - function i(e) { - return r[e] || {} - } - return i('messages')[e] || i(t)[e] || i(n)[e] || i(a)[e] || e - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, - , - , - , - function (e, t, n) { - 'use strict' - var a = n(31), - r = n(21), - i = n(1) - var o = Object(i.a)( - r.default, - a.b, - a.c, - !1, - null, - null, - 'ff831df6', - !1, - a.a, - void 0 - ) - ;(function (e) { - this.options.style || (this.options.style = {}), - Vue.prototype.__merge_style && - Vue.prototype.__$appStyle__ && - Vue.prototype.__merge_style( - Vue.prototype.__$appStyle__, - this.options.style - ), - Vue.prototype.__merge_style - ? Vue.prototype.__merge_style(n(40).default, this.options.style) - : Object.assign(this.options.style, n(40).default) - }.call(o), - (t.default = o.exports)) - }, - , - , - , - , - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - var a = n(22), - r = n.n(a) - t.default = r.a - }, - function (e, t, n) { - 'use strict' - Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0) - var a = r(n(45)) - function r(e) { - return e && e.__esModule ? e : { default: e } - } - var i = { - mixins: [r(n(5)).default], - components: { picker: a.default }, - data: function () { - return { - range: [], - rangeKey: '', - value: 0, - mode: 'selector', - fields: 'day', - start: '', - end: '', - disabled: !1, - visible: !1, - } - }, - onLoad: function () { - var e = this - null === this.data - ? this.postMessage({ event: 'created' }, !0) - : this.showPicker(this.data), - this.onMessage(function (t) { - e.showPicker(t) - }) - }, - onReady: function () { - var e = this - this.$nextTick(function () { - e.visible = !0 - }) - }, - methods: { - showPicker: function () { - var e = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {}, - t = e.column - for (var n in e) - 'column' !== n && - ('number' == typeof t - ? this.$set(this.$data[n], t, e[n]) - : (this.$data[n] = e[n])) - }, - close: function (e) { - var t = this, - n = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {}, - a = n.value, - r = void 0 === a ? -1 : a - ;(this.visible = !1), - setTimeout(function () { - t.postMessage({ event: e, value: r }) - }, 210) - }, - onClose: function () { - this.close('cancel') - }, - columnchange: function (e) { - var t = e.column, - n = e.value - Array.isArray(this.value) && this.$set(this.value, t, n), - this.postMessage({ event: 'columnchange', column: t, value: n }, !0) - }, - }, - } - t.default = i - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(24), - r = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = r.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var a = n(46), - r = o(n(6)), - i = o(n(47)) - function o(e) { - return e && e.__esModule ? e : { default: e } - } - function s(e) { - return ( - (function (e) { - if (Array.isArray(e)) return u(e) - })(e) || - (function (e) { - if ('undefined' != typeof Symbol && Symbol.iterator in Object(e)) - return Array.from(e) - })(e) || - (function (e, t) { - if (!e) return - if ('string' == typeof e) return u(e, t) - var n = Object.prototype.toString.call(e).slice(8, -1) - 'Object' === n && e.constructor && (n = e.constructor.name) - if ('Map' === n || 'Set' === n) return Array.from(n) - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return u(e, t) - })(e) || - (function () { - throw new TypeError( - 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ) - })() - ) - } - function u(e, t) { - ;(null == t || t > e.length) && (t = e.length) - for (var n = 0, a = new Array(t); n < t; n++) a[n] = e[n] - return a - } - function c() { - if (this.mode === d.TIME) return '00:00' - if (this.mode === d.DATE) { - var e = new Date().getFullYear() - 61 - switch (this.fields) { - case p.YEAR: - return e - case p.MONTH: - return e + '-01' - default: - return e + '-01-01' - } - } - return '' - } - function l() { - if (this.mode === d.TIME) return '23:59' - if (this.mode === d.DATE) { - var e = new Date().getFullYear() + 61 - switch (this.fields) { - case p.YEAR: - return e - case p.MONTH: - return e + '-12' - default: - return e + '-12-31' - } - } - return '' - } - var f = weex.requireModule('animation'), - d = { - SELECTOR: 'selector', - MULTISELECTOR: 'multiSelector', - TIME: 'time', - DATE: 'date', - REGION: 'region', - }, - p = { YEAR: 'year', MONTH: 'month', DAY: 'day' }, - h = { - name: 'Picker', - mixins: [r.default, i.default], - props: { - pageId: { type: Number, default: 0 }, - range: { - type: Array, - default: function () { - return [] - }, - }, - rangeKey: { type: String, default: '' }, - value: { type: [Number, String, Array], default: 0 }, - mode: { type: String, default: d.SELECTOR }, - fields: { type: String, default: p.DAY }, - start: { type: [String, Number], default: c }, - end: { type: [String, Number], default: l }, - disabled: { type: [Boolean, String], default: !1 }, - visible: { type: Boolean, default: !1 }, - }, - data: function () { - return { - valueSync: null, - timeArray: [], - dateArray: [], - valueArray: [], - oldValueArray: [], - fontSize: 16, - height: 261, - android: 'android' === weex.config.env.platform.toLowerCase(), - } - }, - computed: { - rangeArray: function () { - var e = this.range - switch (this.mode) { - case d.SELECTOR: - return [e] - case d.MULTISELECTOR: - return e - case d.TIME: - return this.timeArray - case d.DATE: - var t = this.dateArray - switch (this.fields) { - case p.YEAR: - return [t[0]] - case p.MONTH: - return [t[0], t[1]] - default: - return [t[0], t[1], t[2]] - } - } - return [] - }, - startArray: function () { - return this._getDateValueArray(this.start, c.bind(this)()) - }, - endArray: function () { - return this._getDateValueArray(this.end, l.bind(this)()) - }, - textMaxLength: function () { - return Math.floor( - Math.min( - weex.config.env.deviceWidth, - weex.config.env.deviceHeight - ) / - (this.fontSize * weex.config.env.scale + 1) / - this.rangeArray.length - ) - }, - }, - watch: { - value: function () { - this._setValueSync() - }, - mode: function () { - this._setValueSync() - }, - range: function () { - this._setValueSync() - }, - valueSync: function () { - this._setValueArray() - }, - valueArray: function (e) { - var t = this - if (this.mode === d.TIME || this.mode === d.DATE) { - var n = - this.mode === d.TIME - ? this._getTimeValue - : this._getDateValue, - a = this.valueArray, - r = this.startArray, - i = this.endArray - if (this.mode === d.DATE) { - var o = this.dateArray, - s = o[2].length, - u = Number(o[2][a[2]]) || 1, - c = new Date( - '' - .concat(o[0][a[0]], '/') - .concat(o[1][a[1]], '/') - .concat(u) - ).getDate() - c < u && (a[2] -= c + s - u) - } - n(a) < n(r) - ? this._cloneArray(a, r) - : n(a) > n(i) && this._cloneArray(a, i) - } - e.forEach(function (e, n) { - e !== t.oldValueArray[n] && - ((t.oldValueArray[n] = e), - t.mode === d.MULTISELECTOR && - t.$emit('columnchange', { column: n, value: e })) - }) - }, - visible: function (e) { - var t = this - e - ? setTimeout(function () { - f.transition(t.$refs.picker, { - styles: { transform: 'translateY(0)' }, - duration: 200, - }) - }, 20) - : f.transition(this.$refs.picker, { - styles: { - transform: 'translateY('.concat( - 283 + this.safeAreaInsets.bottom, - 'px)' - ), - }, - duration: 200, - }) - }, - }, - created: function () { - this._createTime(), - this._createDate(), - this._setValueSync(), - (e.webview.currentWebview().picker = this) - }, - methods: { - getTexts: function (e, t) { - var n = this, - a = this.textMaxLength - return e - .map(function (e) { - var r = String( - 'object' == typeof e - ? e[n.rangeKey] || '' - : n._l10nItem(e, t) - ) - if (a > 0 && r.length > a) - for (var i = 0, o = 0, s = 0; s < r.length; s++) { - var u = r.charCodeAt(s) - if ( - ((i += u > 127 || 94 === u ? 1 : 0.65) <= a - 1 && - (o = s), - i >= a) - ) - return s === r.length - 1 ? r : r.substr(0, o + 1) + '…' - } - return r || ' ' - }) - .join('\n') - }, - _createTime: function () { - var e = [], - t = [] - e.splice(0, e.length) - for (var n = 0; n < 24; n++) e.push((n < 10 ? '0' : '') + n) - t.splice(0, t.length) - for (var a = 0; a < 60; a++) t.push((a < 10 ? '0' : '') + a) - this.timeArray.push(e, t) - }, - _createDate: function () { - for ( - var e = [], - t = new Date().getFullYear(), - n = t - 61, - a = t + 61; - n <= a; - n++ - ) - e.push(String(n)) - for (var r = [], i = 1; i <= 12; i++) - r.push((i < 10 ? '0' : '') + i) - for (var o = [], s = 1; s <= 31; s++) - o.push((s < 10 ? '0' : '') + s) - this.dateArray.push(e, r, o) - }, - _getTimeValue: function (e) { - return 60 * e[0] + e[1] - }, - _getDateValue: function (e) { - return 31 * e[0] * 12 + 31 * (e[1] || 0) + (e[2] || 0) - }, - _cloneArray: function (e, t) { - for (var n = 0; n < e.length && n < t.length; n++) e[n] = t[n] - }, - _setValueSync: function () { - var e = this.value - switch (this.mode) { - case d.MULTISELECTOR: - Array.isArray(e) || (e = []), - Array.isArray(this.valueSync) || (this.valueSync = []) - for ( - var t = (this.valueSync.length = Math.max( - e.length, - this.range.length - )), - n = 0; - n < t; - n++ - ) { - var a = Number(e[n]), - r = Number(this.valueSync[n]), - i = isNaN(a) ? (isNaN(r) ? 0 : r) : a, - o = this.range[n] ? this.range[n].length - 1 : 0 - this.valueSync.splice(n, 1, i < 0 || i > o ? 0 : i) - } - break - case d.TIME: - case d.DATE: - this.valueSync = String(e) - break - default: - var s = Number(e) - this.valueSync = s < 0 ? 0 : s - } - }, - _setValueArray: function () { - var e, - t = this.valueSync - switch (this.mode) { - case d.MULTISELECTOR: - e = s(t) - break - case d.TIME: - e = this._getDateValueArray( - t, - (0, a.formatDateTime)({ mode: d.TIME }) - ) - break - case d.DATE: - e = this._getDateValueArray( - t, - (0, a.formatDateTime)({ mode: d.DATE }) - ) - break - default: - e = [t] - } - ;(this.oldValueArray = s(e)), (this.valueArray = s(e)) - }, - _getValue: function () { - var e = this, - t = this.valueArray - switch (this.mode) { - case d.SELECTOR: - return t[0] - case d.MULTISELECTOR: - return t.map(function (e) { - return e - }) - case d.TIME: - return this.valueArray - .map(function (t, n) { - return e.timeArray[n][t] - }) - .join(':') - case d.DATE: - return this.valueArray - .map(function (t, n) { - return e.dateArray[n][t] - }) - .join('-') - } - }, - _getDateValueArray: function (e, t) { - var n = this.mode === d.DATE ? '-' : ':', - a = this.mode === d.DATE ? this.dateArray : this.timeArray, - r = 3 - switch (this.fields) { - case p.YEAR: - r = 1 - break - case p.MONTH: - r = 2 - } - for (var i = String(e).split(n), o = [], s = 0; s < r; s++) { - var u = i[s] - o.push(a[s].indexOf(u)) - } - return ( - o.indexOf(-1) >= 0 && - (o = t - ? this._getDateValueArray(t) - : o.map(function () { - return 0 - })), - o - ) - }, - _change: function () { - this.$emit('change', { value: this._getValue() }) - }, - _cancel: function () { - this.$emit('cancel') - }, - _pickerViewChange: function (e) { - this.valueArray = this._l10nColumn(e.detail.value, !0) - }, - _l10nColumn: function (e, t) { - if (this.mode === d.DATE) { - var n = this.locale - if (!n.startsWith('zh')) - switch (this.fields) { - case p.YEAR: - return e - case p.MONTH: - return [e[1], e[0]] - default: - switch (n) { - case 'es': - case 'fr': - return [e[2], e[1], e[0]] - default: - return t ? [e[2], e[0], e[1]] : [e[1], e[2], e[0]] - } - } - } - return e - }, - _l10nItem: function (e, t) { - if (this.mode === d.DATE) { - var n = this.locale - if (n.startsWith('zh')) { - return e + ['年', '月', '日'][t] - } - if ( - this.fields !== p.YEAR && - t === - (this.fields === p.MONTH || ('es' !== n && 'fr' !== n) - ? 0 - : 1) - ) { - var a - switch (n) { - case 'es': - a = [ - 'enero', - 'febrero', - 'marzo', - 'abril', - 'mayo', - 'junio', - '​​julio', - 'agosto', - 'septiembre', - 'octubre', - 'noviembre', - 'diciembre', - ] - break - case 'fr': - a = [ - 'janvier', - 'février', - 'mars', - 'avril', - 'mai', - 'juin', - 'juillet', - 'août', - 'septembre', - 'octobre', - 'novembre', - 'décembre', - ] - break - default: - a = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ] - } - return a[Number(e) - 1] - } - } - return e - }, - }, - } - t.default = h - }.call(this, n(2).weexPlus)) - }, - function (e, t) { - e.exports = { - content: { position: 'absolute', top: 0, left: 0, bottom: 0, right: 0 }, - 'uni-mask': { - position: 'absolute', - top: 0, - left: 0, - bottom: 0, - right: 0, - backgroundColor: 'rgba(0,0,0,0.4)', - opacity: 0, - transitionProperty: 'opacity', - transitionDuration: 200, - transitionTimingFunction: 'linear', - }, - '@TRANSITION': { - 'uni-mask': { - property: 'opacity', - duration: 200, - timingFunction: 'linear', - }, - }, - 'uni-mask-android': { backgroundColor: 'rgba(0,0,0,0.6)' }, - 'uni-mask-visible': { opacity: 1 }, - 'uni-picker': { - position: 'absolute', - left: 0, - bottom: 0, - right: 0, - backgroundColor: '#ffffff', - color: '#000000', - flexDirection: 'column', - transform: 'translateY(295px)', - }, - 'uni-picker-header': { - height: '45', - borderBottomWidth: 0, - backgroundColor: '#E6E6E6', - fontSize: '20', - }, - 'uni-picker-action': { - position: 'absolute', - textAlign: 'center', - top: 0, - height: '45', - paddingTop: 0, - paddingRight: '14', - paddingBottom: 0, - paddingLeft: '14', - fontSize: '17', - lineHeight: '45', - }, - 'uni-picker-action-cancel': { left: 0, color: '#888888' }, - 'uni-picker-action-confirm': { right: 0, color: '#007aff' }, - 'uni-picker-content': { flex: 1 }, - 'uni-picker-item': { - lineHeight: '34', - textAlign: 'center', - color: '#000000', - }, - } - }, - function (e, t) { - e.exports = { page: { flex: 1 } } - }, - , - , - , - , - function (e, t, n) { - 'use strict' - var a = function () { - var e = this, - t = e.$createElement, - n = e._self._c || t - return n( - 'scroll-view', - { - staticStyle: { flexDirection: 'column' }, - attrs: { scrollY: !0, enableBackToTop: !0, bubble: 'true' }, - }, - [ - n( - 'view', - { staticClass: ['page'] }, - [ - n('picker', { - attrs: { - range: e.range, - rangeKey: e.rangeKey, - value: e.value, - mode: e.mode, - fields: e.fields, - start: e.start, - end: e.end, - disabled: e.disabled, - visible: e.visible, - }, - on: { - change: function (t) { - e.close('change', t) - }, - cancel: function (t) { - e.close('cancel', t) - }, - columnchange: e.columnchange, - }, - }), - ], - 1 - ), - ] - ) - }, - r = [] - n.d(t, 'b', function () { - return a - }), - n.d(t, 'c', function () { - return r - }), - n.d(t, 'a', function () {}) - }, - , - , - function (e, t, n) { - 'use strict' - var a = function () { - var e = this, - t = e.$createElement, - n = e._self._c || t - return n('div', { staticClass: ['content'] }, [ - n('div', { - ref: 'mask', - staticClass: ['uni-mask'], - class: { - 'uni-mask-visible': e.visible, - 'uni-mask-android': e.android, - }, - on: { click: e._cancel }, - }), - n( - 'div', - { - ref: 'picker', - staticClass: ['uni-picker'], - class: { 'uni-picker-visible': e.visible }, - style: - 'padding-bottom:' + - e.safeAreaInsets.bottom + - 'px;height:' + - (e.height + e.safeAreaInsets.bottom) + - 'px;', - }, - [ - n('div', { staticClass: ['uni-picker-header'] }, [ - n( - 'u-text', - { - staticClass: [ - 'uni-picker-action', - 'uni-picker-action-cancel', - ], - style: 'left:' + e.safeAreaInsets.left + 'px', - on: { click: e._cancel }, - }, - [e._v(e._s(e.localize('cancel')))] - ), - n( - 'u-text', - { - staticClass: [ - 'uni-picker-action', - 'uni-picker-action-confirm', - ], - style: 'right:' + e.safeAreaInsets.right + 'px', - on: { click: e._change }, - }, - [e._v(e._s(e.localize('done')))] - ), - ]), - e.visible - ? n( - 'picker-view', - { - staticClass: ['uni-picker-content'], - style: 'margin-left:' + e.safeAreaInsets.left + 'px', - attrs: { - height: '216', - indicatorStyle: - 'height: 34px;border-color:#C8C9C9;border-top-width:0.5px;border-bottom-width:0.5px;', - value: e._l10nColumn(e.valueArray), - }, - on: { change: e._pickerViewChange }, - }, - e._l(e._l10nColumn(e.rangeArray), function (t, a) { - return n( - 'picker-view-column', - { key: a, attrs: { length: t.length } }, - [ - n( - 'u-text', - { - staticClass: ['uni-picker-item'], - style: { fontSize: e.fontSize + 'px' }, - }, - [e._v(e._s(e.getTexts(t, a)))] - ), - ] - ) - }), - 1 - ) - : e._e(), - ], - 1 - ), - ]) - }, - r = [] - n.d(t, 'b', function () { - return a - }), - n.d(t, 'c', function () { - return r - }), - n.d(t, 'a', function () {}) - }, - , - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(25), - r = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = r.a - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(26), - r = n.n(a) - for (var i in a) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(i) - t.default = r.a - }, - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - n(3) - var a = n(10) - ;(a.default.mpType = 'page'), - (a.default.route = 'template/__uniapppicker'), - (a.default.el = '#root'), - new Vue(a.default) - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(34), - r = n(23) - for (var i in r) - 'default' !== i && - (function (e) { - n.d(t, e, function () { - return r[e] - }) - })(i) - var o = n(1) - var s = Object(o.a)( - r.default, - a.b, - a.c, - !1, - null, - null, - '980cd0c2', - !1, - a.a, - void 0 - ) - ;(function (e) { - this.options.style || (this.options.style = {}), - Vue.prototype.__merge_style && - Vue.prototype.__$appStyle__ && - Vue.prototype.__merge_style( - Vue.prototype.__$appStyle__, - this.options.style - ), - Vue.prototype.__merge_style - ? Vue.prototype.__merge_style(n(39).default, this.options.style) - : Object.assign(this.options.style, n(39).default) - }.call(s), - (t.default = s.exports)) - }, - function (e, t, n) { - 'use strict' - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.formatDateTime = function (e) { - var t = e.date, - n = void 0 === t ? new Date() : t, - r = e.mode - return 'time' === (void 0 === r ? 'date' : r) - ? a(n.getHours()) + ':' + a(n.getMinutes()) - : n.getFullYear() + '-' + a(n.getMonth() + 1) + '-' + a(n.getDate()) - }) - var a = function (e) { - return e > 9 ? e : '0' + e - } - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - data: function () { - return { safeAreaInsets: { left: 0, right: 0, top: 0, bottom: 0 } } - }, - onLoad: function () { - this.initSafeAreaInsets() - }, - created: function () { - this.initSafeAreaInsets() - }, - methods: { - initSafeAreaInsets: function () { - var t = this - if (!this.__initSafeAreaInsets) { - this.__initSafeAreaInsets = !0 - var n = e.webview.currentWebview() - n.addEventListener('resize', function () { - setTimeout(function () { - t.updateSafeAreaInsets(n) - }, 20) - }), - this.updateSafeAreaInsets(n) - } - }, - updateSafeAreaInsets: function (e) { - var t = e.getSafeAreaInsets(), - n = this.safeAreaInsets - Object.keys(n).forEach(function (e) { - n[e] = t[e] - }) - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, -]) +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},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=44)}([function(e,t){e.exports={}},function(e,t,n){"use strict";function a(e,t,n,a,r,i,o,s,u,c){var l,f="function"==typeof e?e.options:e;if(u){f.components||(f.components={});var d=Object.prototype.hasOwnProperty;for(var p in u)d.call(u,p)&&!d.call(f.components,p)&&(f.components[p]=u[p])}if(c&&((c.beforeCreate||(c.beforeCreate=[])).unshift((function(){this[c.__module]=this})),(f.mixins||(f.mixins=[])).push(c)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),a&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},f._ssrRegister=l):r&&(l=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(f.functional){f._injectStyles=l;var h=f.render;f.render=function(e,t){return l.call(t),h(e,t)}}else{var v=f.beforeCreate;f.beforeCreate=v?[].concat(v,l):[l]}return{exports:e,options:f}}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.weexPlus=t.default=void 0,a="function"==typeof getUni?getUni:function(){var e=function(e){return"function"==typeof e},t=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e]}))},n=/^\$|^on|^create|Sync$|Manager$|^pause/,a=["os","getCurrentSubNVue","getSubNVueById","stopRecord","stopVoice","stopBackgroundAudio","stopPullDownRefresh","hideKeyboard","hideToast","hideLoading","showNavigationBarLoading","hideNavigationBarLoading","canIUse","navigateBack","closeSocket","pageScrollTo","drawCanvas"],i=function(e){return(!n.test(e)||"createBLEConnection"===e)&&!~a.indexOf(e)},o=function(n){return function(){for(var a=arguments.length,r=Array(a>1?a-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return e(o.success)||e(o.fail)||e(o.complete)?n.apply(void 0,[o].concat(r)):t(new Promise((function(e,t){n.apply(void 0,[Object.assign({},o,{success:e,fail:t})].concat(r)),Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))}})))}},s=[],u=void 0;function c(e){s.forEach((function(t){return t({origin:u,data:e})}))}var l=r.webview.currentWebview().id,f=new BroadcastChannel("UNI-APP-SUBNVUE");function d(e){var t=r.webview.getWebviewById(e);return t&&!t.$processed&&function(e){e.$processed=!0;var t=r.webview.currentWebview().id===e.id,n="uniNView"===e.__uniapp_origin_type&&e.__uniapp_origin_id,a=e.id;if(e.postMessage=function(e){n?f.postMessage({data:e,to:t?n:a}):_({type:"UniAppSubNVue",data:e})},e.onMessage=function(e){s.push(e)},e.__uniapp_mask_id){u=e.__uniapp_host;var i=e.__uniapp_mask,o=r.webview.getWebviewById(e.__uniapp_mask_id);o=o.parent()||o;var c=e.show,l=e.hide,d=e.close,p=function(){o.setStyle({mask:i})},h=function(){o.setStyle({mask:"none"})};e.show=function(){p();for(var t=arguments.length,n=Array(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/x-www-form-urlencoded";return"object"===(void 0===e?"undefined":L(e))?"POST"===t.toUpperCase()&&"application/json"===n.toLowerCase()?JSON.stringify(e):Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&"):e},D=weex.requireModule("plusstorage"),$=weex.requireModule("clipboard"),B=function(){if("function"==typeof getUniEmitter)return getUniEmitter;var e={$on:function(){console.warn("uni.$on failed")},$off:function(){console.warn("uni.$off failed")},$once:function(){console.warn("uni.$once failed")},$emit:function(){console.warn("uni.$emit failed")}};return function(){return e}}();function R(e,t,n){return e[t].apply(e,n)}var U=Object.freeze({loadFontFace:function(t){var n=t.family,a=t.source,r=(t.desc,t.success),i=(t.fail,t.complete);I.addRule("fontFace",{fontFamily:n,src:a.replace(/"/g,"'")});var o={errMsg:"loadFontFace:ok",status:"loaded"};e(r)&&r(o),e(i)&&i(o)},ready:V,request:function(t){var n=t.url,a=t.data,r=t.header,i=t.method,o=void 0===i?"GET":i,s=t.dataType,u=void 0===s?"json":s,c=(t.responseType,t.success),l=t.fail,f=t.complete,d=!1,p=!1,h={};if(r)for(var v in r)p||"content-type"!==v.toLowerCase()?h[v]=r[v]:(p=!0,h["Content-Type"]=r[v]);return"GET"===o&&a&&(n=n+(~n.indexOf("?")?"&"===n.substr(-1)||"?"===n.substr(-1)?"":"&":"?")+P(a)),j.fetch({url:n,method:o,headers:h,type:"json"===u?"json":"text",body:"GET"!==o?P(a,o,h["Content-Type"]):""},(function(t){var n=t.status,a=(t.ok,t.statusText,t.data),r=t.headers,i={};!n||-1===n||d?(i.errMsg="request:fail",e(l)&&l(i)):(i.data=a,i.statusCode=n,i.header=r,e(c)&&c(i)),e(f)&&f(i)})),{abort:function(){d=!0}}},getStorage:function(t){var n=t.key,a=(t.data,t.success),r=t.fail,i=t.complete;D.getItem(n+"__TYPE",(function(t){if("success"===t.result){var o=t.data;D.getItem(n,(function(t){if("success"===t.result){var n=t.data;o&&n?("String"!==o&&(n=JSON.parse(n)),e(a)&&a({errMsg:"getStorage:ok",data:n})):(t.errMsg="setStorage:fail",e(r)&&r(t))}else t.errMsg="setStorage:fail",e(r)&&r(t);e(i)&&i(t)}))}else t.errMsg="setStorage:fail",e(r)&&r(t),e(i)&&i(t)}))},setStorage:function(t){var n=t.key,a=t.data,r=t.success,i=t.fail,o=t.complete,s="String";"object"===(void 0===a?"undefined":L(a))&&(s="Object",a=JSON.stringify(a)),D.setItem(n,a,(function(t){"success"===t.result?D.setItem(n+"__TYPE",s,(function(t){"success"===t.result?e(r)&&r({errMsg:"setStorage:ok"}):(t.errMsg="setStorage:fail",e(i)&&i(t))})):(t.errMsg="setStorage:fail",e(i)&&i(t)),e(o)&&o(t)}))},removeStorage:function(t){var n=t.key,a=(t.data,t.success),r=t.fail,i=t.complete;D.removeItem(n,(function(t){"success"===t.result?e(a)&&a({errMsg:"removeStorage:ok"}):(t.errMsg="removeStorage:fail",e(r)&&r(t)),e(i)&&i(t)})),D.removeItem(n+"__TYPE")},clearStorage:function(e){e.key,e.data,e.success,e.fail,e.complete},getClipboardData:function(t){var n=t.success,a=(t.fail,t.complete);$.getString((function(t){var r={errMsg:"getClipboardData:ok",data:t.data};e(n)&&n(r),e(a)&&a(r)}))},setClipboardData:function(t){var n=t.data,a=t.success,r=(t.fail,t.complete),i={errMsg:"setClipboardData:ok"};$.setString(n),e(a)&&a(i),e(r)&&r(i)},onSubNVueMessage:c,getSubNVueById:d,getCurrentSubNVue:function(){return d(r.webview.currentWebview().id)},$on:function(){return R(B(),"$on",[].concat(Array.prototype.slice.call(arguments)))},$off:function(){return R(B(),"$off",[].concat(Array.prototype.slice.call(arguments)))},$once:function(){return R(B(),"$once",[].concat(Array.prototype.slice.call(arguments)))},$emit:function(){return R(B(),"$emit",[].concat(Array.prototype.slice.call(arguments)))}}),z={os:{nvue:!0}},F={};return"undefined"!=typeof Proxy?F=new Proxy({},{get:function(e,t){if("os"===t)return{nvue:!0};if("postMessage"===t)return _;if("requireNativePlugin"===t)return x;if("onNavigationBarButtonTap"===t)return k;if("onNavigationBarSearchInputChanged"===t)return M;if("onNavigationBarSearchInputConfirmed"===t)return E;if("onNavigationBarSearchInputClicked"===t)return C;var n=U[t];return n||(n=b(t)),i(t)?o(n):n}}):(Object.keys(z).forEach((function(e){F[e]=z[e]})),F.postMessage=_,F.requireNativePlugin=x,F.onNavigationBarButtonTap=k,F.onNavigationBarSearchInputChanged=M,F.onNavigationBarSearchInputConfirmed=E,F.onNavigationBarSearchInputClicked=C,Object.keys({uploadFile:!0,downloadFile:!0,chooseImage:!0,previewImage:!0,getImageInfo:!0,saveImageToPhotosAlbum:!0,chooseVideo:!0,saveVideoToPhotosAlbum:!0,saveFile:!0,getSavedFileList:!0,getSavedFileInfo:!0,removeSavedFile:!0,openDocument:!0,setStorage:!0,getStorage:!0,getStorageInfo:!0,removeStorage:!0,clearStorage:!0,getLocation:!0,chooseLocation:!0,openLocation:!0,getSystemInfo:!0,getNetworkType:!0,makePhoneCall:!0,scanCode:!0,setScreenBrightness:!0,getScreenBrightness:!0,setKeepScreenOn:!0,vibrateLong:!0,vibrateShort:!0,addPhoneContact:!0,showToast:!0,showLoading:!0,hideToast:!0,hideLoading:!0,showModal:!0,showActionSheet:!0,setNavigationBarTitle:!0,setNavigationBarColor:!0,navigateTo:!0,redirectTo:!0,reLaunch:!0,switchTab:!0,navigateBack:!0,getProvider:!0,login:!0,getUserInfo:!0,share:!0,requestPayment:!0,subscribePush:!0,unsubscribePush:!0,onPush:!0,offPush:!0}).forEach((function(e){var t=U[e];t||(t=b(e)),i(e)?F[e]=o(t):F[e]=t}))),F};var r=new WeexPlus(weex);t.weexPlus=r;var i=a(weex,r,BroadcastChannel);t.default=i},function(e,t,n){Vue.prototype.__$appStyle__={},Vue.prototype.__merge_style&&Vue.prototype.__merge_style(n(4).default,Vue.prototype.__$appStyle__)},function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={onLoad:function(){this.initMessage()},methods:{initMessage:function(){var t=this,n=e.webview.currentWebview().extras||{},a=n.from,r=(n.callback,n.runtime),i=n.data,o=void 0===i?{}:i,s=n.useGlobalEvent;this.__from=a,this.__runtime=r,this.__page=e.webview.currentWebview().id,this.__useGlobalEvent=s,this.data=JSON.parse(JSON.stringify(o)),e.key.addEventListener("backbutton",(function(){"function"==typeof t.onClose?t.onClose():e.webview.currentWebview().close("auto")}));var u=this,c=function(e){var t=e.data&&e.data.__message;t&&u.__onMessageCallback&&u.__onMessageCallback(t.data)};this.__useGlobalEvent?weex.requireModule("globalEvent").addEventListener("plusMessage",c):new BroadcastChannel(this.__page).onmessage=c},postMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=JSON.parse(JSON.stringify({__message:{__page:this.__page,data:t,keep:n}})),r=this.__from;if("v8"===this.__runtime)if(this.__useGlobalEvent)e.webview.postMessageToUniNView(a,r);else{var i=new BroadcastChannel(r);i.postMessage(a)}else{var o=e.webview.getWebviewById(r);o&&o.evalJS("__plusMessage&&__plusMessage(".concat(JSON.stringify({data:a}),")"))}},onMessage:function(e){this.__onMessageCallback=e}}};t.default=n}).call(this,n(2).weexPlus)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{locale:"en",fallbackLocale:"en",localization:{en:{done:"OK",cancel:"Cancel"},zh:{done:"完成",cancel:"取消"},"zh-hans":{},"zh-hant":{},messages:{}}}},onLoad:function(){this.initLocale()},created:function(){this.initLocale()},methods:{initLocale:function(){if(!this.__initLocale){this.__initLocale=!0;var t=(e.webview.currentWebview().extras||{}).data||{};if(t.messages&&(this.localization.messages=t.messages),t.locale)this.locale=t.locale.toLowerCase();else{var n=e.os.language.toLowerCase().split("/")[0].replace("_","-").split("-"),a=n[1];a&&(n[1]={chs:"hans",cn:"hans",sg:"hans",cht:"hant",tw:"hant",hk:"hant",mo:"hant"}[a]||a),n.length=n.length>2?2:n.length,this.locale=n.join("-")}}},localize:function(e){var t=this.locale,n=t.split("-")[0],a=this.fallbackLocale,r=this.localization;function i(e){return r[e]||{}}return i("messages")[e]||i(t)[e]||i(n)[e]||i(a)[e]||e}}};t.default=n}).call(this,n(2).weexPlus)},,,,function(e,t,n){"use strict";var a=n(31),r=n(21),i=n(1);var o=Object(i.a)(r.default,a.b,a.c,!1,null,null,"ff831df6",!1,a.a,void 0);(function(e){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(n(40).default,this.options.style):Object.assign(this.options.style,n(40).default)}).call(o),t.default=o.exports},,,,,,,,,,,function(e,t,n){"use strict";var a=n(22),r=n.n(a);t.default=r.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(45));function r(e){return e&&e.__esModule?e:{default:e}}var i={mixins:[r(n(5)).default],components:{picker:a.default},data:function(){return{range:[],rangeKey:"",value:0,mode:"selector",fields:"day",start:"",end:"",disabled:!1,visible:!1}},onLoad:function(){var e=this;null===this.data?this.postMessage({event:"created"},!0):this.showPicker(this.data),this.onMessage((function(t){e.showPicker(t)}))},onReady:function(){var e=this;this.$nextTick((function(){e.visible=!0}))},methods:{showPicker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.column;for(var n in e)"column"!==n&&("number"==typeof t?this.$set(this.$data[n],t,e[n]):this.$data[n]=e[n])},close:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.value,r=void 0===a?-1:a;this.visible=!1,setTimeout((function(){t.postMessage({event:e,value:r})}),210)},onClose:function(){this.close("cancel")},columnchange:function(e){var t=e.column,n=e.value;Array.isArray(this.value)&&this.$set(this.value,t,n),this.postMessage({event:"columnchange",column:t,value:n},!0)}}};t.default=i},function(e,t,n){"use strict";n.r(t);var a=n(24),r=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(46),r=o(n(6)),i=o(n(47));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nn(i)&&this._cloneArray(a,i)}e.forEach((function(e,n){e!==t.oldValueArray[n]&&(t.oldValueArray[n]=e,t.mode===d.MULTISELECTOR&&t.$emit("columnchange",{column:n,value:e}))}))},visible:function(e){var t=this;e?setTimeout((function(){f.transition(t.$refs.picker,{styles:{transform:"translateY(0)"},duration:200})}),20):f.transition(this.$refs.picker,{styles:{transform:"translateY(".concat(283+this.safeAreaInsets.bottom,"px)")},duration:200})}},created:function(){this._createTime(),this._createDate(),this._setValueSync(),e.webview.currentWebview().picker=this},methods:{getTexts:function(e,t){var n=this,a=this.textMaxLength;return e.map((function(e){var r=String("object"==typeof e?e[n.rangeKey]||"":n._l10nItem(e,t));if(a>0&&r.length>a)for(var i=0,o=0,s=0;s127||94===u?1:.65)<=a-1&&(o=s),i>=a)return s===r.length-1?r:r.substr(0,o+1)+"…"}return r||" "})).join("\n")},_createTime:function(){var e=[],t=[];e.splice(0,e.length);for(var n=0;n<24;n++)e.push((n<10?"0":"")+n);t.splice(0,t.length);for(var a=0;a<60;a++)t.push((a<10?"0":"")+a);this.timeArray.push(e,t)},_createDate:function(){for(var e=[],t=(new Date).getFullYear(),n=t-61,a=t+61;n<=a;n++)e.push(String(n));for(var r=[],i=1;i<=12;i++)r.push((i<10?"0":"")+i);for(var o=[],s=1;s<=31;s++)o.push((s<10?"0":"")+s);this.dateArray.push(e,r,o)},_getTimeValue:function(e){return 60*e[0]+e[1]},_getDateValue:function(e){return 31*e[0]*12+31*(e[1]||0)+(e[2]||0)},_cloneArray:function(e,t){for(var n=0;no?0:i)}break;case d.TIME:case d.DATE:this.valueSync=String(e);break;default:var s=Number(e);this.valueSync=s<0?0:s}},_setValueArray:function(){var e,t=this.valueSync;switch(this.mode){case d.MULTISELECTOR:e=s(t);break;case d.TIME:e=this._getDateValueArray(t,(0,a.formatDateTime)({mode:d.TIME}));break;case d.DATE:e=this._getDateValueArray(t,(0,a.formatDateTime)({mode:d.DATE}));break;default:e=[t]}this.oldValueArray=s(e),this.valueArray=s(e)},_getValue:function(){var e=this,t=this.valueArray;switch(this.mode){case d.SELECTOR:return t[0];case d.MULTISELECTOR:return t.map((function(e){return e}));case d.TIME:return this.valueArray.map((function(t,n){return e.timeArray[n][t]})).join(":");case d.DATE:return this.valueArray.map((function(t,n){return e.dateArray[n][t]})).join("-")}},_getDateValueArray:function(e,t){var n=this.mode===d.DATE?"-":":",a=this.mode===d.DATE?this.dateArray:this.timeArray,r=3;switch(this.fields){case p.YEAR:r=1;break;case p.MONTH:r=2}for(var i=String(e).split(n),o=[],s=0;s=0&&(o=t?this._getDateValueArray(t):o.map((function(){return 0}))),o},_change:function(){this.$emit("change",{value:this._getValue()})},_cancel:function(){this.$emit("cancel")},_pickerViewChange:function(e){this.valueArray=this._l10nColumn(e.detail.value,!0)},_l10nColumn:function(e,t){if(this.mode===d.DATE){var n=this.locale;if(!n.startsWith("zh"))switch(this.fields){case p.YEAR:return e;case p.MONTH:return[e[1],e[0]];default:switch(n){case"es":case"fr":return[e[2],e[1],e[0]];default:return t?[e[2],e[0],e[1]]:[e[1],e[2],e[0]]}}}return e},_l10nItem:function(e,t){if(this.mode===d.DATE){var n=this.locale;if(n.startsWith("zh")){return e+["年","月","日"][t]}if(this.fields!==p.YEAR&&t===(this.fields===p.MONTH||"es"!==n&&"fr"!==n?0:1)){var a;switch(n){case"es":a=["enero","febrero","marzo","abril","mayo","junio","​​julio","agosto","septiembre","octubre","noviembre","diciembre"];break;case"fr":a=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"];break;default:a=["January","February","March","April","May","June","July","August","September","October","November","December"]}return a[Number(e)-1]}}return e}}};t.default=h}).call(this,n(2).weexPlus)},function(e,t){e.exports={content:{position:"absolute",top:0,left:0,bottom:0,right:0},"uni-mask":{position:"absolute",top:0,left:0,bottom:0,right:0,backgroundColor:"rgba(0,0,0,0.4)",opacity:0,transitionProperty:"opacity",transitionDuration:200,transitionTimingFunction:"linear"},"@TRANSITION":{"uni-mask":{property:"opacity",duration:200,timingFunction:"linear"}},"uni-mask-android":{backgroundColor:"rgba(0,0,0,0.6)"},"uni-mask-visible":{opacity:1},"uni-picker":{position:"absolute",left:0,bottom:0,right:0,backgroundColor:"#ffffff",color:"#000000",flexDirection:"column",transform:"translateY(295px)"},"uni-picker-header":{height:"45",borderBottomWidth:0,backgroundColor:"#E6E6E6",fontSize:"20"},"uni-picker-action":{position:"absolute",textAlign:"center",top:0,height:"45",paddingTop:0,paddingRight:"14",paddingBottom:0,paddingLeft:"14",fontSize:"17",lineHeight:"45"},"uni-picker-action-cancel":{left:0,color:"#888888"},"uni-picker-action-confirm":{right:0,color:"#007aff"},"uni-picker-content":{flex:1},"uni-picker-item":{lineHeight:"34",textAlign:"center",color:"#000000"}}},function(e,t){e.exports={page:{flex:1}}},,,,,function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("scroll-view",{staticStyle:{flexDirection:"column"},attrs:{scrollY:!0,enableBackToTop:!0,bubble:"true"}},[n("view",{staticClass:["page"]},[n("picker",{attrs:{range:e.range,rangeKey:e.rangeKey,value:e.value,mode:e.mode,fields:e.fields,start:e.start,end:e.end,disabled:e.disabled,visible:e.visible},on:{change:function(t){e.close("change",t)},cancel:function(t){e.close("cancel",t)},columnchange:e.columnchange}})],1)])},r=[];n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){}))},,,function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:["content"]},[n("div",{ref:"mask",staticClass:["uni-mask"],class:{"uni-mask-visible":e.visible,"uni-mask-android":e.android},on:{click:e._cancel}}),n("div",{ref:"picker",staticClass:["uni-picker"],class:{"uni-picker-visible":e.visible},style:"padding-bottom:"+e.safeAreaInsets.bottom+"px;height:"+(e.height+e.safeAreaInsets.bottom)+"px;"},[n("div",{staticClass:["uni-picker-header"]},[n("u-text",{staticClass:["uni-picker-action","uni-picker-action-cancel"],style:"left:"+e.safeAreaInsets.left+"px",on:{click:e._cancel}},[e._v(e._s(e.localize("cancel")))]),n("u-text",{staticClass:["uni-picker-action","uni-picker-action-confirm"],style:"right:"+e.safeAreaInsets.right+"px",on:{click:e._change}},[e._v(e._s(e.localize("done")))])]),e.visible?n("picker-view",{staticClass:["uni-picker-content"],style:"margin-left:"+e.safeAreaInsets.left+"px",attrs:{height:"216",indicatorStyle:"height: 34px;border-color:#C8C9C9;border-top-width:0.5px;border-bottom-width:0.5px;",value:e._l10nColumn(e.valueArray)},on:{change:e._pickerViewChange}},e._l(e._l10nColumn(e.rangeArray),(function(t,a){return n("picker-view-column",{key:a,attrs:{length:t.length}},[n("u-text",{staticClass:["uni-picker-item"],style:{fontSize:e.fontSize+"px"}},[e._v(e._s(e.getTexts(t,a)))])])})),1):e._e()],1)])},r=[];n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){}))},,,,,function(e,t,n){"use strict";n.r(t);var a=n(25),r=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=r.a},function(e,t,n){"use strict";n.r(t);var a=n(26),r=n.n(a);for(var i in a)"default"!==i&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t.default=r.a},,,,function(e,t,n){"use strict";n.r(t);n(3);var a=n(10);a.default.mpType="page",a.default.route="template/__uniapppicker",a.default.el="#root",new Vue(a.default)},function(e,t,n){"use strict";n.r(t);var a=n(34),r=n(23);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);var o=n(1);var s=Object(o.a)(r.default,a.b,a.c,!1,null,null,"980cd0c2",!1,a.a,void 0);(function(e){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(n(39).default,this.options.style):Object.assign(this.options.style,n(39).default)}).call(s),t.default=s.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDateTime=function(e){var t=e.date,n=void 0===t?new Date:t,r=e.mode;return"time"===(void 0===r?"date":r)?a(n.getHours())+":"+a(n.getMinutes()):n.getFullYear()+"-"+a(n.getMonth()+1)+"-"+a(n.getDate())};var a=function(e){return e>9?e:"0"+e}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{safeAreaInsets:{left:0,right:0,top:0,bottom:0}}},onLoad:function(){this.initSafeAreaInsets()},created:function(){this.initSafeAreaInsets()},methods:{initSafeAreaInsets:function(){var t=this;if(!this.__initSafeAreaInsets){this.__initSafeAreaInsets=!0;var n=e.webview.currentWebview();n.addEventListener("resize",(function(){setTimeout((function(){t.updateSafeAreaInsets(n)}),20)})),this.updateSafeAreaInsets(n)}},updateSafeAreaInsets:function(e){var t=e.getSafeAreaInsets(),n=this.safeAreaInsets;Object.keys(n).forEach((function(e){n[e]=t[e]}))}}};t.default=n}).call(this,n(2).weexPlus)}]); \ No newline at end of file diff --git a/packages/uni-app-vite/lib/template/__uniappquill.js b/packages/uni-app-vite/lib/template/__uniappquill.js index 7b12444966..d9f46b8d9c 100644 --- a/packages/uni-app-vite/lib/template/__uniappquill.js +++ b/packages/uni-app-vite/lib/template/__uniappquill.js @@ -4,12155 +4,5 @@ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */ -!(function (t, e) { - 'object' == typeof exports && 'object' == typeof module - ? (module.exports = e()) - : 'function' == typeof define && define.amd - ? define([], e) - : 'object' == typeof exports - ? (exports.Quill = e()) - : (t.Quill = e()) -})('undefined' != typeof self ? self : this, function () { - return (function (t) { - function e(r) { - if (n[r]) return n[r].exports - var o = (n[r] = { i: r, l: !1, exports: {} }) - return t[r].call(o.exports, o, o.exports, e), (o.l = !0), o.exports - } - var n = {} - return ( - (e.m = t), - (e.c = n), - (e.d = function (t, n, r) { - e.o(t, n) || - Object.defineProperty(t, n, { - configurable: !1, - enumerable: !0, - get: r, - }) - }), - (e.n = function (t) { - var n = - t && t.__esModule - ? function () { - return t.default - } - : function () { - return t - } - return e.d(n, 'a', n), n - }), - (e.o = function (t, e) { - return Object.prototype.hasOwnProperty.call(t, e) - }), - (e.p = ''), - e((e.s = 45)) - ) - })([ - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = n(17), - o = n(18), - i = n(19), - l = n(48), - a = n(49), - s = n(50), - u = n(51), - c = n(52), - f = n(11), - h = n(29), - p = n(30), - d = n(28), - y = n(1), - v = { - Scope: y.Scope, - create: y.create, - find: y.find, - query: y.query, - register: y.register, - Container: r.default, - Format: o.default, - Leaf: i.default, - Embed: u.default, - Scroll: l.default, - Block: s.default, - Inline: a.default, - Text: c.default, - Attributor: { - Attribute: f.default, - Class: h.default, - Style: p.default, - Store: d.default, - }, - } - e.default = v - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - var n = i(t) - if (null == n) throw new s('Unable to create ' + t + ' blot') - var r = n - return new r( - t instanceof Node || t.nodeType === Node.TEXT_NODE ? t : r.create(e), - e - ) - } - function o(t, n) { - return ( - void 0 === n && (n = !1), - null == t - ? null - : null != t[e.DATA_KEY] - ? t[e.DATA_KEY].blot - : n - ? o(t.parentNode, n) - : null - ) - } - function i(t, e) { - void 0 === e && (e = p.ANY) - var n - if ('string' == typeof t) n = h[t] || u[t] - else if (t instanceof Text || t.nodeType === Node.TEXT_NODE) n = h.text - else if ('number' == typeof t) - t & p.LEVEL & p.BLOCK - ? (n = h.block) - : t & p.LEVEL & p.INLINE && (n = h.inline) - else if (t instanceof HTMLElement) { - var r = (t.getAttribute('class') || '').split(/\s+/) - for (var o in r) if ((n = c[r[o]])) break - n = n || f[t.tagName] - } - return null == n - ? null - : e & p.LEVEL & n.scope && e & p.TYPE & n.scope - ? n - : null - } - function l() { - for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e] - if (t.length > 1) - return t.map(function (t) { - return l(t) - }) - var n = t[0] - if ('string' != typeof n.blotName && 'string' != typeof n.attrName) - throw new s('Invalid definition') - if ('abstract' === n.blotName) - throw new s('Cannot register abstract class') - if (((h[n.blotName || n.attrName] = n), 'string' == typeof n.keyName)) - u[n.keyName] = n - else if ( - (null != n.className && (c[n.className] = n), null != n.tagName) - ) { - Array.isArray(n.tagName) - ? (n.tagName = n.tagName.map(function (t) { - return t.toUpperCase() - })) - : (n.tagName = n.tagName.toUpperCase()) - var r = Array.isArray(n.tagName) ? n.tagName : [n.tagName] - r.forEach(function (t) { - ;(null != f[t] && null != n.className) || (f[t] = n) - }) - } - return n - } - var a = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var s = (function (t) { - function e(e) { - var n = this - return ( - (e = '[Parchment] ' + e), - (n = t.call(this, e) || this), - (n.message = e), - (n.name = n.constructor.name), - n - ) - } - return a(e, t), e - })(Error) - e.ParchmentError = s - var u = {}, - c = {}, - f = {}, - h = {} - e.DATA_KEY = '__blot' - var p - !(function (t) { - ;(t[(t.TYPE = 3)] = 'TYPE'), - (t[(t.LEVEL = 12)] = 'LEVEL'), - (t[(t.ATTRIBUTE = 13)] = 'ATTRIBUTE'), - (t[(t.BLOT = 14)] = 'BLOT'), - (t[(t.INLINE = 7)] = 'INLINE'), - (t[(t.BLOCK = 11)] = 'BLOCK'), - (t[(t.BLOCK_BLOT = 10)] = 'BLOCK_BLOT'), - (t[(t.INLINE_BLOT = 6)] = 'INLINE_BLOT'), - (t[(t.BLOCK_ATTRIBUTE = 9)] = 'BLOCK_ATTRIBUTE'), - (t[(t.INLINE_ATTRIBUTE = 5)] = 'INLINE_ATTRIBUTE'), - (t[(t.ANY = 15)] = 'ANY') - })((p = e.Scope || (e.Scope = {}))), - (e.create = r), - (e.find = o), - (e.query = i), - (e.register = l) - }, - function (t, e) { - 'use strict' - var n = Object.prototype.hasOwnProperty, - r = Object.prototype.toString, - o = Object.defineProperty, - i = Object.getOwnPropertyDescriptor, - l = function (t) { - return 'function' == typeof Array.isArray - ? Array.isArray(t) - : '[object Array]' === r.call(t) - }, - a = function (t) { - if (!t || '[object Object]' !== r.call(t)) return !1 - var e = n.call(t, 'constructor'), - o = - t.constructor && - t.constructor.prototype && - n.call(t.constructor.prototype, 'isPrototypeOf') - if (t.constructor && !e && !o) return !1 - var i - for (i in t); - return void 0 === i || n.call(t, i) - }, - s = function (t, e) { - o && '__proto__' === e.name - ? o(t, e.name, { - enumerable: !0, - configurable: !0, - value: e.newValue, - writable: !0, - }) - : (t[e.name] = e.newValue) - }, - u = function (t, e) { - if ('__proto__' === e) { - if (!n.call(t, e)) return - if (i) return i(t, e).value - } - return t[e] - } - t.exports = function t() { - var e, - n, - r, - o, - i, - c, - f = arguments[0], - h = 1, - p = arguments.length, - d = !1 - for ( - 'boolean' == typeof f && ((d = f), (f = arguments[1] || {}), (h = 2)), - (null == f || ('object' != typeof f && 'function' != typeof f)) && - (f = {}); - h < p; - ++h - ) - if (null != (e = arguments[h])) - for (n in e) - (r = u(f, n)), - (o = u(e, n)), - f !== o && - (d && o && (a(o) || (i = l(o))) - ? (i - ? ((i = !1), (c = r && l(r) ? r : [])) - : (c = r && a(r) ? r : {}), - s(f, { name: n, newValue: t(d, c, o) })) - : void 0 !== o && s(f, { name: n, newValue: o })) - return f - } - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function a(t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} - return null == t - ? e - : ('function' == typeof t.formats && - (e = (0, f.default)(e, t.formats())), - null == t.parent || - 'scroll' == t.parent.blotName || - t.parent.statics.scope !== t.statics.scope - ? e - : a(t.parent, e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.BlockEmbed = e.bubbleFormats = void 0) - var s = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - u = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - c = n(2), - f = r(c), - h = n(4), - p = r(h), - d = n(0), - y = r(d), - v = n(14), - b = r(v), - g = n(5), - m = r(g), - _ = n(8), - O = r(_), - w = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - l(e, t), - s(e, [ - { - key: 'attach', - value: function () { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'attach', - this - ).call(this), - (this.attributes = new y.default.Attributor.Store( - this.domNode - )) - }, - }, - { - key: 'delta', - value: function () { - return new p.default().insert( - this.value(), - (0, f.default)(this.formats(), this.attributes.values()) - ) - }, - }, - { - key: 'format', - value: function (t, e) { - var n = y.default.query(t, y.default.Scope.BLOCK_ATTRIBUTE) - null != n && this.attributes.attribute(n, e) - }, - }, - { - key: 'formatAt', - value: function (t, e, n, r) { - this.format(n, r) - }, - }, - { - key: 'insertAt', - value: function (t, n, r) { - if ('string' == typeof n && n.endsWith('\n')) { - var o = y.default.create(x.blotName) - this.parent.insertBefore(o, 0 === t ? this : this.next), - o.insertAt(0, n.slice(0, -1)) - } else - u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'insertAt', - this - ).call(this, t, n, r) - }, - }, - ]), - e - ) - })(y.default.Embed) - w.scope = y.default.Scope.BLOCK_BLOT - var x = (function (t) { - function e(t) { - o(this, e) - var n = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return (n.cache = {}), n - } - return ( - l(e, t), - s(e, [ - { - key: 'delta', - value: function () { - return ( - null == this.cache.delta && - (this.cache.delta = this.descendants(y.default.Leaf) - .reduce(function (t, e) { - return 0 === e.length() ? t : t.insert(e.value(), a(e)) - }, new p.default()) - .insert('\n', a(this))), - this.cache.delta - ) - }, - }, - { - key: 'deleteAt', - value: function (t, n) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'deleteAt', - this - ).call(this, t, n), - (this.cache = {}) - }, - }, - { - key: 'formatAt', - value: function (t, n, r, o) { - n <= 0 || - (y.default.query(r, y.default.Scope.BLOCK) - ? t + n === this.length() && this.format(r, o) - : u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'formatAt', - this - ).call(this, t, Math.min(n, this.length() - t - 1), r, o), - (this.cache = {})) - }, - }, - { - key: 'insertAt', - value: function (t, n, r) { - if (null != r) - return u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'insertAt', - this - ).call(this, t, n, r) - if (0 !== n.length) { - var o = n.split('\n'), - i = o.shift() - i.length > 0 && - (t < this.length() - 1 || null == this.children.tail - ? u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'insertAt', - this - ).call(this, Math.min(t, this.length() - 1), i) - : this.children.tail.insertAt( - this.children.tail.length(), - i - ), - (this.cache = {})) - var l = this - o.reduce(function (t, e) { - return (l = l.split(t, !0)), l.insertAt(0, e), e.length - }, t + i.length) - } - }, - }, - { - key: 'insertBefore', - value: function (t, n) { - var r = this.children.head - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'insertBefore', - this - ).call(this, t, n), - r instanceof b.default && r.remove(), - (this.cache = {}) - }, - }, - { - key: 'length', - value: function () { - return ( - null == this.cache.length && - (this.cache.length = - u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'length', - this - ).call(this) + 1), - this.cache.length - ) - }, - }, - { - key: 'moveChildren', - value: function (t, n) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'moveChildren', - this - ).call(this, t, n), - (this.cache = {}) - }, - }, - { - key: 'optimize', - value: function (t) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t), - (this.cache = {}) - }, - }, - { - key: 'path', - value: function (t) { - return u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'path', - this - ).call(this, t, !0) - }, - }, - { - key: 'removeChild', - value: function (t) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'removeChild', - this - ).call(this, t), - (this.cache = {}) - }, - }, - { - key: 'split', - value: function (t) { - var n = - arguments.length > 1 && - void 0 !== arguments[1] && - arguments[1] - if (n && (0 === t || t >= this.length() - 1)) { - var r = this.clone() - return 0 === t - ? (this.parent.insertBefore(r, this), this) - : (this.parent.insertBefore(r, this.next), r) - } - var o = u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'split', - this - ).call(this, t, n) - return (this.cache = {}), o - }, - }, - ]), - e - ) - })(y.default.Block) - ;(x.blotName = 'block'), - (x.tagName = 'P'), - (x.defaultChild = 'break'), - (x.allowedChildren = [m.default, y.default.Embed, O.default]), - (e.bubbleFormats = a), - (e.BlockEmbed = w), - (e.default = x) - }, - function (t, e, n) { - var r = n(54), - o = n(12), - i = n(2), - l = n(20), - a = String.fromCharCode(0), - s = function (t) { - Array.isArray(t) - ? (this.ops = t) - : null != t && Array.isArray(t.ops) - ? (this.ops = t.ops) - : (this.ops = []) - } - ;(s.prototype.insert = function (t, e) { - var n = {} - return 0 === t.length - ? this - : ((n.insert = t), - null != e && - 'object' == typeof e && - Object.keys(e).length > 0 && - (n.attributes = e), - this.push(n)) - }), - (s.prototype.delete = function (t) { - return t <= 0 ? this : this.push({ delete: t }) - }), - (s.prototype.retain = function (t, e) { - if (t <= 0) return this - var n = { retain: t } - return ( - null != e && - 'object' == typeof e && - Object.keys(e).length > 0 && - (n.attributes = e), - this.push(n) - ) - }), - (s.prototype.push = function (t) { - var e = this.ops.length, - n = this.ops[e - 1] - if (((t = i(!0, {}, t)), 'object' == typeof n)) { - if ('number' == typeof t.delete && 'number' == typeof n.delete) - return (this.ops[e - 1] = { delete: n.delete + t.delete }), this - if ( - 'number' == typeof n.delete && - null != t.insert && - ((e -= 1), 'object' != typeof (n = this.ops[e - 1])) - ) - return this.ops.unshift(t), this - if (o(t.attributes, n.attributes)) { - if ('string' == typeof t.insert && 'string' == typeof n.insert) - return ( - (this.ops[e - 1] = { insert: n.insert + t.insert }), - 'object' == typeof t.attributes && - (this.ops[e - 1].attributes = t.attributes), - this - ) - if ('number' == typeof t.retain && 'number' == typeof n.retain) - return ( - (this.ops[e - 1] = { retain: n.retain + t.retain }), - 'object' == typeof t.attributes && - (this.ops[e - 1].attributes = t.attributes), - this - ) - } - } - return ( - e === this.ops.length ? this.ops.push(t) : this.ops.splice(e, 0, t), - this - ) - }), - (s.prototype.chop = function () { - var t = this.ops[this.ops.length - 1] - return t && t.retain && !t.attributes && this.ops.pop(), this - }), - (s.prototype.filter = function (t) { - return this.ops.filter(t) - }), - (s.prototype.forEach = function (t) { - this.ops.forEach(t) - }), - (s.prototype.map = function (t) { - return this.ops.map(t) - }), - (s.prototype.partition = function (t) { - var e = [], - n = [] - return ( - this.forEach(function (r) { - ;(t(r) ? e : n).push(r) - }), - [e, n] - ) - }), - (s.prototype.reduce = function (t, e) { - return this.ops.reduce(t, e) - }), - (s.prototype.changeLength = function () { - return this.reduce(function (t, e) { - return e.insert ? t + l.length(e) : e.delete ? t - e.delete : t - }, 0) - }), - (s.prototype.length = function () { - return this.reduce(function (t, e) { - return t + l.length(e) - }, 0) - }), - (s.prototype.slice = function (t, e) { - ;(t = t || 0), 'number' != typeof e && (e = 1 / 0) - for ( - var n = [], r = l.iterator(this.ops), o = 0; - o < e && r.hasNext(); - - ) { - var i - o < t ? (i = r.next(t - o)) : ((i = r.next(e - o)), n.push(i)), - (o += l.length(i)) - } - return new s(n) - }), - (s.prototype.compose = function (t) { - var e = l.iterator(this.ops), - n = l.iterator(t.ops), - r = [], - i = n.peek() - if ( - null != i && - 'number' == typeof i.retain && - null == i.attributes - ) { - for ( - var a = i.retain; - 'insert' === e.peekType() && e.peekLength() <= a; - - ) - (a -= e.peekLength()), r.push(e.next()) - i.retain - a > 0 && n.next(i.retain - a) - } - for (var u = new s(r); e.hasNext() || n.hasNext(); ) - if ('insert' === n.peekType()) u.push(n.next()) - else if ('delete' === e.peekType()) u.push(e.next()) - else { - var c = Math.min(e.peekLength(), n.peekLength()), - f = e.next(c), - h = n.next(c) - if ('number' == typeof h.retain) { - var p = {} - 'number' == typeof f.retain - ? (p.retain = c) - : (p.insert = f.insert) - var d = l.attributes.compose( - f.attributes, - h.attributes, - 'number' == typeof f.retain - ) - if ( - (d && (p.attributes = d), - u.push(p), - !n.hasNext() && o(u.ops[u.ops.length - 1], p)) - ) { - var y = new s(e.rest()) - return u.concat(y).chop() - } - } else - 'number' == typeof h.delete && - 'number' == typeof f.retain && - u.push(h) - } - return u.chop() - }), - (s.prototype.concat = function (t) { - var e = new s(this.ops.slice()) - return ( - t.ops.length > 0 && - (e.push(t.ops[0]), (e.ops = e.ops.concat(t.ops.slice(1)))), - e - ) - }), - (s.prototype.diff = function (t, e) { - if (this.ops === t.ops) return new s() - var n = [this, t].map(function (e) { - return e - .map(function (n) { - if (null != n.insert) - return 'string' == typeof n.insert ? n.insert : a - var r = e === t ? 'on' : 'with' - throw new Error('diff() called ' + r + ' non-document') - }) - .join('') - }), - i = new s(), - u = r(n[0], n[1], e), - c = l.iterator(this.ops), - f = l.iterator(t.ops) - return ( - u.forEach(function (t) { - for (var e = t[1].length; e > 0; ) { - var n = 0 - switch (t[0]) { - case r.INSERT: - ;(n = Math.min(f.peekLength(), e)), i.push(f.next(n)) - break - case r.DELETE: - ;(n = Math.min(e, c.peekLength())), c.next(n), i.delete(n) - break - case r.EQUAL: - n = Math.min(c.peekLength(), f.peekLength(), e) - var a = c.next(n), - s = f.next(n) - o(a.insert, s.insert) - ? i.retain( - n, - l.attributes.diff(a.attributes, s.attributes) - ) - : i.push(s).delete(n) - } - e -= n - } - }), - i.chop() - ) - }), - (s.prototype.eachLine = function (t, e) { - e = e || '\n' - for ( - var n = l.iterator(this.ops), r = new s(), o = 0; - n.hasNext(); - - ) { - if ('insert' !== n.peekType()) return - var i = n.peek(), - a = l.length(i) - n.peekLength(), - u = 'string' == typeof i.insert ? i.insert.indexOf(e, a) - a : -1 - if (u < 0) r.push(n.next()) - else if (u > 0) r.push(n.next(u)) - else { - if (!1 === t(r, n.next(1).attributes || {}, o)) return - ;(o += 1), (r = new s()) - } - } - r.length() > 0 && t(r, {}, o) - }), - (s.prototype.transform = function (t, e) { - if (((e = !!e), 'number' == typeof t)) - return this.transformPosition(t, e) - for ( - var n = l.iterator(this.ops), r = l.iterator(t.ops), o = new s(); - n.hasNext() || r.hasNext(); - - ) - if ('insert' !== n.peekType() || (!e && 'insert' === r.peekType())) - if ('insert' === r.peekType()) o.push(r.next()) - else { - var i = Math.min(n.peekLength(), r.peekLength()), - a = n.next(i), - u = r.next(i) - if (a.delete) continue - u.delete - ? o.push(u) - : o.retain( - i, - l.attributes.transform(a.attributes, u.attributes, e) - ) - } - else o.retain(l.length(n.next())) - return o.chop() - }), - (s.prototype.transformPosition = function (t, e) { - e = !!e - for (var n = l.iterator(this.ops), r = 0; n.hasNext() && r <= t; ) { - var o = n.peekLength(), - i = n.peekType() - n.next(), - 'delete' !== i - ? ('insert' === i && (r < t || !e) && (t += o), (r += o)) - : (t -= Math.min(o, t - r)) - } - return t - }), - (t.exports = s) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(8), - c = r(u), - f = n(0), - h = r(f), - p = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - l(e, t), - a( - e, - [ - { - key: 'formatAt', - value: function (t, n, r, o) { - if ( - e.compare(this.statics.blotName, r) < 0 && - h.default.query(r, h.default.Scope.BLOT) - ) { - var i = this.isolate(t, n) - o && i.wrap(r, o) - } else - s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'formatAt', - this - ).call(this, t, n, r, o) - }, - }, - { - key: 'optimize', - value: function (t) { - if ( - (s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t), - this.parent instanceof e && - e.compare( - this.statics.blotName, - this.parent.statics.blotName - ) > 0) - ) { - var n = this.parent.isolate(this.offset(), this.length()) - this.moveChildren(n), n.wrap(this) - } - }, - }, - ], - [ - { - key: 'compare', - value: function (t, n) { - var r = e.order.indexOf(t), - o = e.order.indexOf(n) - return r >= 0 || o >= 0 - ? r - o - : t === n - ? 0 - : t < n - ? -1 - : 1 - }, - }, - ] - ), - e - ) - })(h.default.Inline) - ;(p.allowedChildren = [p, h.default.Embed, c.default]), - (p.order = [ - 'cursor', - 'inline', - 'underline', - 'strike', - 'italic', - 'bold', - 'script', - 'link', - 'code', - ]), - (e.default = p) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - if ( - ((e = (0, N.default)( - !0, - { - container: t, - modules: { clipboard: !0, keyboard: !0, history: !0 }, - }, - e - )), - e.theme && e.theme !== S.DEFAULTS.theme) - ) { - if (((e.theme = S.import('themes/' + e.theme)), null == e.theme)) - throw new Error( - 'Invalid theme ' + e.theme + '. Did you register it?' - ) - } else e.theme = T.default - var n = (0, N.default)(!0, {}, e.theme.DEFAULTS) - ;[n, e].forEach(function (t) { - ;(t.modules = t.modules || {}), - Object.keys(t.modules).forEach(function (e) { - !0 === t.modules[e] && (t.modules[e] = {}) - }) - }) - var r = Object.keys(n.modules).concat(Object.keys(e.modules)), - o = r.reduce(function (t, e) { - var n = S.import('modules/' + e) - return ( - null == n - ? P.error( - 'Cannot load ' + - e + - ' module. Are you sure you registered it?' - ) - : (t[e] = n.DEFAULTS || {}), - t - ) - }, {}) - return ( - null != e.modules && - e.modules.toolbar && - e.modules.toolbar.constructor !== Object && - (e.modules.toolbar = { container: e.modules.toolbar }), - (e = (0, N.default)(!0, {}, S.DEFAULTS, { modules: o }, n, e)), - ['bounds', 'container', 'scrollingContainer'].forEach(function (t) { - 'string' == typeof e[t] && (e[t] = document.querySelector(e[t])) - }), - (e.modules = Object.keys(e.modules).reduce(function (t, n) { - return e.modules[n] && (t[n] = e.modules[n]), t - }, {})), - e - ) - } - function a(t, e, n, r) { - if ( - this.options.strict && - !this.isEnabled() && - e === g.default.sources.USER - ) - return new d.default() - var o = null == n ? null : this.getSelection(), - i = this.editor.delta, - l = t() - if ( - (null != o && - (!0 === n && (n = o.index), - null == r ? (o = u(o, l, e)) : 0 !== r && (o = u(o, n, r, e)), - this.setSelection(o, g.default.sources.SILENT)), - l.length() > 0) - ) { - var a, - s = [g.default.events.TEXT_CHANGE, l, i, e] - if ( - ((a = this.emitter).emit.apply( - a, - [g.default.events.EDITOR_CHANGE].concat(s) - ), - e !== g.default.sources.SILENT) - ) { - var c - ;(c = this.emitter).emit.apply(c, s) - } - } - return l - } - function s(t, e, n, r, o) { - var i = {} - return ( - 'number' == typeof t.index && 'number' == typeof t.length - ? 'number' != typeof e - ? ((o = r), (r = n), (n = e), (e = t.length), (t = t.index)) - : ((e = t.length), (t = t.index)) - : 'number' != typeof e && ((o = r), (r = n), (n = e), (e = 0)), - 'object' === (void 0 === n ? 'undefined' : c(n)) - ? ((i = n), (o = r)) - : 'string' == typeof n && (null != r ? (i[n] = r) : (o = n)), - (o = o || g.default.sources.API), - [t, e, i, o] - ) - } - function u(t, e, n, r) { - if (null == t) return null - var o = void 0, - i = void 0 - if (e instanceof d.default) { - var l = [t.index, t.index + t.length].map(function (t) { - return e.transformPosition(t, r !== g.default.sources.USER) - }), - a = f(l, 2) - ;(o = a[0]), (i = a[1]) - } else { - var s = [t.index, t.index + t.length].map(function (t) { - return t < e || (t === e && r === g.default.sources.USER) - ? t - : n >= 0 - ? t + n - : Math.max(e, t + n) - }), - u = f(s, 2) - ;(o = u[0]), (i = u[1]) - } - return new x.Range(o, i - o) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.overload = e.expandConfig = void 0) - var c = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (t) { - return typeof t - } - : function (t) { - return t && - 'function' == typeof Symbol && - t.constructor === Symbol && - t !== Symbol.prototype - ? 'symbol' - : typeof t - }, - f = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - h = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })() - n(53) - var p = n(4), - d = r(p), - y = n(57), - v = r(y), - b = n(9), - g = r(b), - m = n(7), - _ = r(m), - O = n(0), - w = r(O), - x = n(22), - k = r(x), - E = n(2), - N = r(E), - j = n(10), - A = r(j), - q = n(32), - T = r(q), - P = (0, A.default)('quill'), - S = (function () { - function t(e) { - var n = this, - r = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {} - if ( - (i(this, t), - (this.options = l(e, r)), - (this.container = this.options.container), - null == this.container) - ) - return P.error('Invalid Quill container', e) - this.options.debug && t.debug(this.options.debug) - var o = this.container.innerHTML.trim() - this.container.classList.add('ql-container'), - (this.container.innerHTML = ''), - (this.container.__quill = this), - (this.root = this.addContainer('ql-editor')), - this.root.classList.add('ql-blank'), - this.root.setAttribute('data-gramm', !1), - (this.scrollingContainer = - this.options.scrollingContainer || this.root), - (this.emitter = new g.default()), - (this.scroll = w.default.create(this.root, { - emitter: this.emitter, - whitelist: this.options.formats, - })), - (this.editor = new v.default(this.scroll)), - (this.selection = new k.default(this.scroll, this.emitter)), - (this.theme = new this.options.theme(this, this.options)), - (this.keyboard = this.theme.addModule('keyboard')), - (this.clipboard = this.theme.addModule('clipboard')), - (this.history = this.theme.addModule('history')), - this.theme.init(), - this.emitter.on(g.default.events.EDITOR_CHANGE, function (t) { - t === g.default.events.TEXT_CHANGE && - n.root.classList.toggle('ql-blank', n.editor.isBlank()) - }), - this.emitter.on(g.default.events.SCROLL_UPDATE, function (t, e) { - var r = n.selection.lastRange, - o = r && 0 === r.length ? r.index : void 0 - a.call( - n, - function () { - return n.editor.update(null, e, o) - }, - t - ) - }) - var s = this.clipboard.convert( - '
' + - o + - '


' - ) - this.setContents(s), - this.history.clear(), - this.options.placeholder && - this.root.setAttribute( - 'data-placeholder', - this.options.placeholder - ), - this.options.readOnly && this.disable() - } - return ( - h(t, null, [ - { - key: 'debug', - value: function (t) { - !0 === t && (t = 'log'), A.default.level(t) - }, - }, - { - key: 'find', - value: function (t) { - return t.__quill || w.default.find(t) - }, - }, - { - key: 'import', - value: function (t) { - return ( - null == this.imports[t] && - P.error( - 'Cannot import ' + - t + - '. Are you sure it was registered?' - ), - this.imports[t] - ) - }, - }, - { - key: 'register', - value: function (t, e) { - var n = this, - r = - arguments.length > 2 && - void 0 !== arguments[2] && - arguments[2] - if ('string' != typeof t) { - var o = t.attrName || t.blotName - 'string' == typeof o - ? this.register('formats/' + o, t, e) - : Object.keys(t).forEach(function (r) { - n.register(r, t[r], e) - }) - } else - null == this.imports[t] || - r || - P.warn('Overwriting ' + t + ' with', e), - (this.imports[t] = e), - (t.startsWith('blots/') || t.startsWith('formats/')) && - 'abstract' !== e.blotName - ? w.default.register(e) - : t.startsWith('modules') && - 'function' == typeof e.register && - e.register() - }, - }, - ]), - h(t, [ - { - key: 'addContainer', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : null - if ('string' == typeof t) { - var n = t - ;(t = document.createElement('div')), t.classList.add(n) - } - return this.container.insertBefore(t, e), t - }, - }, - { - key: 'blur', - value: function () { - this.selection.setRange(null) - }, - }, - { - key: 'deleteText', - value: function (t, e, n) { - var r = this, - o = s(t, e, n), - i = f(o, 4) - return ( - (t = i[0]), - (e = i[1]), - (n = i[3]), - a.call( - this, - function () { - return r.editor.deleteText(t, e) - }, - n, - t, - -1 * e - ) - ) - }, - }, - { - key: 'disable', - value: function () { - this.enable(!1) - }, - }, - { - key: 'enable', - value: function () { - var t = - !(arguments.length > 0 && void 0 !== arguments[0]) || - arguments[0] - this.scroll.enable(t), - this.container.classList.toggle('ql-disabled', !t) - }, - }, - { - key: 'focus', - value: function () { - var t = this.scrollingContainer.scrollTop - this.selection.focus(), - (this.scrollingContainer.scrollTop = t), - this.scrollIntoView() - }, - }, - { - key: 'format', - value: function (t, e) { - var n = this, - r = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : g.default.sources.API - return a.call( - this, - function () { - var r = n.getSelection(!0), - i = new d.default() - if (null == r) return i - if (w.default.query(t, w.default.Scope.BLOCK)) - i = n.editor.formatLine(r.index, r.length, o({}, t, e)) - else { - if (0 === r.length) return n.selection.format(t, e), i - i = n.editor.formatText(r.index, r.length, o({}, t, e)) - } - return n.setSelection(r, g.default.sources.SILENT), i - }, - r - ) - }, - }, - { - key: 'formatLine', - value: function (t, e, n, r, o) { - var i = this, - l = void 0, - u = s(t, e, n, r, o), - c = f(u, 4) - return ( - (t = c[0]), - (e = c[1]), - (l = c[2]), - (o = c[3]), - a.call( - this, - function () { - return i.editor.formatLine(t, e, l) - }, - o, - t, - 0 - ) - ) - }, - }, - { - key: 'formatText', - value: function (t, e, n, r, o) { - var i = this, - l = void 0, - u = s(t, e, n, r, o), - c = f(u, 4) - return ( - (t = c[0]), - (e = c[1]), - (l = c[2]), - (o = c[3]), - a.call( - this, - function () { - return i.editor.formatText(t, e, l) - }, - o, - t, - 0 - ) - ) - }, - }, - { - key: 'getBounds', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 0, - n = void 0 - n = - 'number' == typeof t - ? this.selection.getBounds(t, e) - : this.selection.getBounds(t.index, t.length) - var r = this.container.getBoundingClientRect() - return { - bottom: n.bottom - r.top, - height: n.height, - left: n.left - r.left, - right: n.right - r.left, - top: n.top - r.top, - width: n.width, - } - }, - }, - { - key: 'getContents', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 0, - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : this.getLength() - t, - n = s(t, e), - r = f(n, 2) - return (t = r[0]), (e = r[1]), this.editor.getContents(t, e) - }, - }, - { - key: 'getFormat', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : this.getSelection(!0), - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 0 - return 'number' == typeof t - ? this.editor.getFormat(t, e) - : this.editor.getFormat(t.index, t.length) - }, - }, - { - key: 'getIndex', - value: function (t) { - return t.offset(this.scroll) - }, - }, - { - key: 'getLength', - value: function () { - return this.scroll.length() - }, - }, - { - key: 'getLeaf', - value: function (t) { - return this.scroll.leaf(t) - }, - }, - { - key: 'getLine', - value: function (t) { - return this.scroll.line(t) - }, - }, - { - key: 'getLines', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 0, - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : Number.MAX_VALUE - return 'number' != typeof t - ? this.scroll.lines(t.index, t.length) - : this.scroll.lines(t, e) - }, - }, - { - key: 'getModule', - value: function (t) { - return this.theme.modules[t] - }, - }, - { - key: 'getSelection', - value: function () { - return ( - arguments.length > 0 && - void 0 !== arguments[0] && - arguments[0] && - this.focus(), - this.update(), - this.selection.getRange()[0] - ) - }, - }, - { - key: 'getText', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 0, - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : this.getLength() - t, - n = s(t, e), - r = f(n, 2) - return (t = r[0]), (e = r[1]), this.editor.getText(t, e) - }, - }, - { - key: 'hasFocus', - value: function () { - return this.selection.hasFocus() - }, - }, - { - key: 'insertEmbed', - value: function (e, n, r) { - var o = this, - i = - arguments.length > 3 && void 0 !== arguments[3] - ? arguments[3] - : t.sources.API - return a.call( - this, - function () { - return o.editor.insertEmbed(e, n, r) - }, - i, - e - ) - }, - }, - { - key: 'insertText', - value: function (t, e, n, r, o) { - var i = this, - l = void 0, - u = s(t, 0, n, r, o), - c = f(u, 4) - return ( - (t = c[0]), - (l = c[2]), - (o = c[3]), - a.call( - this, - function () { - return i.editor.insertText(t, e, l) - }, - o, - t, - e.length - ) - ) - }, - }, - { - key: 'isEnabled', - value: function () { - return !this.container.classList.contains('ql-disabled') - }, - }, - { - key: 'off', - value: function () { - return this.emitter.off.apply(this.emitter, arguments) - }, - }, - { - key: 'on', - value: function () { - return this.emitter.on.apply(this.emitter, arguments) - }, - }, - { - key: 'once', - value: function () { - return this.emitter.once.apply(this.emitter, arguments) - }, - }, - { - key: 'pasteHTML', - value: function (t, e, n) { - this.clipboard.dangerouslyPasteHTML(t, e, n) - }, - }, - { - key: 'removeFormat', - value: function (t, e, n) { - var r = this, - o = s(t, e, n), - i = f(o, 4) - return ( - (t = i[0]), - (e = i[1]), - (n = i[3]), - a.call( - this, - function () { - return r.editor.removeFormat(t, e) - }, - n, - t - ) - ) - }, - }, - { - key: 'scrollIntoView', - value: function () { - this.selection.scrollIntoView(this.scrollingContainer) - }, - }, - { - key: 'setContents', - value: function (t) { - var e = this, - n = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : g.default.sources.API - return a.call( - this, - function () { - t = new d.default(t) - var n = e.getLength(), - r = e.editor.deleteText(0, n), - o = e.editor.applyDelta(t), - i = o.ops[o.ops.length - 1] - return ( - null != i && - 'string' == typeof i.insert && - '\n' === i.insert[i.insert.length - 1] && - (e.editor.deleteText(e.getLength() - 1, 1), - o.delete(1)), - r.compose(o) - ) - }, - n - ) - }, - }, - { - key: 'setSelection', - value: function (e, n, r) { - if (null == e) - this.selection.setRange(null, n || t.sources.API) - else { - var o = s(e, n, r), - i = f(o, 4) - ;(e = i[0]), - (n = i[1]), - (r = i[3]), - this.selection.setRange(new x.Range(e, n), r), - r !== g.default.sources.SILENT && - this.selection.scrollIntoView(this.scrollingContainer) - } - }, - }, - { - key: 'setText', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : g.default.sources.API, - n = new d.default().insert(t) - return this.setContents(n, e) - }, - }, - { - key: 'update', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : g.default.sources.USER, - e = this.scroll.update(t) - return this.selection.update(t), e - }, - }, - { - key: 'updateContents', - value: function (t) { - var e = this, - n = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : g.default.sources.API - return a.call( - this, - function () { - return (t = new d.default(t)), e.editor.applyDelta(t, n) - }, - n, - !0 - ) - }, - }, - ]), - t - ) - })() - ;(S.DEFAULTS = { - bounds: null, - formats: null, - modules: {}, - placeholder: '', - readOnly: !1, - scrollingContainer: null, - strict: !0, - theme: 'default', - }), - (S.events = g.default.events), - (S.sources = g.default.sources), - (S.version = '1.3.7'), - (S.imports = { - delta: d.default, - parchment: w.default, - 'core/module': _.default, - 'core/theme': T.default, - }), - (e.expandConfig = l), - (e.overload = s), - (e.default = S) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = function t(e) { - var n = - arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} - r(this, t), (this.quill = e), (this.options = n) - } - ;(o.DEFAULTS = {}), (e.default = o) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = n(0), - a = (function (t) { - return t && t.__esModule ? t : { default: t } - })(l), - s = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return i(e, t), e - })(a.default.Text) - e.default = s - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(58), - c = r(u), - f = n(10), - h = r(f), - p = (0, h.default)('quill:events') - ;['selectionchange', 'mousedown', 'mouseup', 'click'].forEach(function ( - t - ) { - document.addEventListener(t, function () { - for (var t = arguments.length, e = Array(t), n = 0; n < t; n++) - e[n] = arguments[n] - ;[].slice - .call(document.querySelectorAll('.ql-container')) - .forEach(function (t) { - if (t.__quill && t.__quill.emitter) { - var n - ;(n = t.__quill.emitter).handleDOM.apply(n, e) - } - }) - }) - }) - var d = (function (t) { - function e() { - o(this, e) - var t = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)) - return (t.listeners = {}), t.on('error', p.error), t - } - return ( - l(e, t), - a(e, [ - { - key: 'emit', - value: function () { - p.log.apply(p, arguments), - s( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'emit', - this - ).apply(this, arguments) - }, - }, - { - key: 'handleDOM', - value: function (t) { - for ( - var e = arguments.length, n = Array(e > 1 ? e - 1 : 0), r = 1; - r < e; - r++ - ) - n[r - 1] = arguments[r] - ;(this.listeners[t.type] || []).forEach(function (e) { - var r = e.node, - o = e.handler - ;(t.target === r || r.contains(t.target)) && - o.apply(void 0, [t].concat(n)) - }) - }, - }, - { - key: 'listenDOM', - value: function (t, e, n) { - this.listeners[t] || (this.listeners[t] = []), - this.listeners[t].push({ node: e, handler: n }) - }, - }, - ]), - e - ) - })(c.default) - ;(d.events = { - EDITOR_CHANGE: 'editor-change', - SCROLL_BEFORE_UPDATE: 'scroll-before-update', - SCROLL_OPTIMIZE: 'scroll-optimize', - SCROLL_UPDATE: 'scroll-update', - SELECTION_CHANGE: 'selection-change', - TEXT_CHANGE: 'text-change', - }), - (d.sources = { API: 'api', SILENT: 'silent', USER: 'user' }), - (e.default = d) - }, - function (t, e, n) { - 'use strict' - function r(t) { - if (i.indexOf(t) <= i.indexOf(l)) { - for ( - var e, n = arguments.length, r = Array(n > 1 ? n - 1 : 0), o = 1; - o < n; - o++ - ) - r[o - 1] = arguments[o] - ;(e = console)[t].apply(e, r) - } - } - function o(t) { - return i.reduce(function (e, n) { - return (e[n] = r.bind(console, n, t)), e - }, {}) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var i = ['error', 'warn', 'log', 'info'], - l = 'warn' - ;(r.level = o.level = - function (t) { - l = t - }), - (e.default = o) - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = n(1), - o = (function () { - function t(t, e, n) { - void 0 === n && (n = {}), (this.attrName = t), (this.keyName = e) - var o = r.Scope.TYPE & r.Scope.ATTRIBUTE - null != n.scope - ? (this.scope = (n.scope & r.Scope.LEVEL) | o) - : (this.scope = r.Scope.ATTRIBUTE), - null != n.whitelist && (this.whitelist = n.whitelist) - } - return ( - (t.keys = function (t) { - return [].map.call(t.attributes, function (t) { - return t.name - }) - }), - (t.prototype.add = function (t, e) { - return ( - !!this.canAdd(t, e) && (t.setAttribute(this.keyName, e), !0) - ) - }), - (t.prototype.canAdd = function (t, e) { - return ( - null != - r.query(t, r.Scope.BLOT & (this.scope | r.Scope.TYPE)) && - (null == this.whitelist || - ('string' == typeof e - ? this.whitelist.indexOf(e.replace(/["']/g, '')) > -1 - : this.whitelist.indexOf(e) > -1)) - ) - }), - (t.prototype.remove = function (t) { - t.removeAttribute(this.keyName) - }), - (t.prototype.value = function (t) { - var e = t.getAttribute(this.keyName) - return this.canAdd(t, e) && e ? e : '' - }), - t - ) - })() - e.default = o - }, - function (t, e, n) { - function r(t) { - return null === t || void 0 === t - } - function o(t) { - return ( - !(!t || 'object' != typeof t || 'number' != typeof t.length) && - 'function' == typeof t.copy && - 'function' == typeof t.slice && - !(t.length > 0 && 'number' != typeof t[0]) - ) - } - function i(t, e, n) { - var i, c - if (r(t) || r(e)) return !1 - if (t.prototype !== e.prototype) return !1 - if (s(t)) - return !!s(e) && ((t = l.call(t)), (e = l.call(e)), u(t, e, n)) - if (o(t)) { - if (!o(e)) return !1 - if (t.length !== e.length) return !1 - for (i = 0; i < t.length; i++) if (t[i] !== e[i]) return !1 - return !0 - } - try { - var f = a(t), - h = a(e) - } catch (t) { - return !1 - } - if (f.length != h.length) return !1 - for (f.sort(), h.sort(), i = f.length - 1; i >= 0; i--) - if (f[i] != h[i]) return !1 - for (i = f.length - 1; i >= 0; i--) - if (((c = f[i]), !u(t[c], e[c], n))) return !1 - return typeof t == typeof e - } - var l = Array.prototype.slice, - a = n(55), - s = n(56), - u = (t.exports = function (t, e, n) { - return ( - n || (n = {}), - t === e || - (t instanceof Date && e instanceof Date - ? t.getTime() === e.getTime() - : !t || !e || ('object' != typeof t && 'object' != typeof e) - ? n.strict - ? t === e - : t == e - : i(t, e, n)) - ) - }) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.Code = void 0) - var a = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - s = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - u = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - c = n(4), - f = r(c), - h = n(0), - p = r(h), - d = n(3), - y = r(d), - v = n(5), - b = r(v), - g = n(8), - m = r(g), - _ = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return l(e, t), e - })(b.default) - ;(_.blotName = 'code'), (_.tagName = 'CODE') - var O = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - l(e, t), - s( - e, - [ - { - key: 'delta', - value: function () { - var t = this, - e = this.domNode.textContent - return ( - e.endsWith('\n') && (e = e.slice(0, -1)), - e.split('\n').reduce(function (e, n) { - return e.insert(n).insert('\n', t.formats()) - }, new f.default()) - ) - }, - }, - { - key: 'format', - value: function (t, n) { - if (t !== this.statics.blotName || !n) { - var r = this.descendant(m.default, this.length() - 1), - o = a(r, 1), - i = o[0] - null != i && i.deleteAt(i.length() - 1, 1), - u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - } - }, - }, - { - key: 'formatAt', - value: function (t, n, r, o) { - if ( - 0 !== n && - null != p.default.query(r, p.default.Scope.BLOCK) && - (r !== this.statics.blotName || - o !== this.statics.formats(this.domNode)) - ) { - var i = this.newlineIndex(t) - if (!(i < 0 || i >= t + n)) { - var l = this.newlineIndex(t, !0) + 1, - a = i - l + 1, - s = this.isolate(l, a), - u = s.next - s.format(r, o), - u instanceof e && u.formatAt(0, t - l + n - a, r, o) - } - } - }, - }, - { - key: 'insertAt', - value: function (t, e, n) { - if (null == n) { - var r = this.descendant(m.default, t), - o = a(r, 2), - i = o[0], - l = o[1] - i.insertAt(l, e) - } - }, - }, - { - key: 'length', - value: function () { - var t = this.domNode.textContent.length - return this.domNode.textContent.endsWith('\n') ? t : t + 1 - }, - }, - { - key: 'newlineIndex', - value: function (t) { - if ( - arguments.length > 1 && - void 0 !== arguments[1] && - arguments[1] - ) - return this.domNode.textContent - .slice(0, t) - .lastIndexOf('\n') - var e = this.domNode.textContent.slice(t).indexOf('\n') - return e > -1 ? t + e : -1 - }, - }, - { - key: 'optimize', - value: function (t) { - this.domNode.textContent.endsWith('\n') || - this.appendChild(p.default.create('text', '\n')), - u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t) - var n = this.next - null != n && - n.prev === this && - n.statics.blotName === this.statics.blotName && - this.statics.formats(this.domNode) === - n.statics.formats(n.domNode) && - (n.optimize(t), n.moveChildren(this), n.remove()) - }, - }, - { - key: 'replace', - value: function (t) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'replace', - this - ).call(this, t), - [].slice - .call(this.domNode.querySelectorAll('*')) - .forEach(function (t) { - var e = p.default.find(t) - null == e - ? t.parentNode.removeChild(t) - : e instanceof p.default.Embed - ? e.remove() - : e.unwrap() - }) - }, - }, - ], - [ - { - key: 'create', - value: function (t) { - var n = u( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - return n.setAttribute('spellcheck', !1), n - }, - }, - { - key: 'formats', - value: function () { - return !0 - }, - }, - ] - ), - e - ) - })(y.default) - ;(O.blotName = 'code-block'), - (O.tagName = 'PRE'), - (O.TAB = ' '), - (e.Code = _), - (e.default = O) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(0), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l( - e, - [ - { - key: 'insertInto', - value: function (t, n) { - 0 === t.children.length - ? a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'insertInto', - this - ).call(this, t, n) - : this.remove() - }, - }, - { - key: 'length', - value: function () { - return 0 - }, - }, - { - key: 'value', - value: function () { - return '' - }, - }, - ], - [{ key: 'value', value: function () {} }] - ), - e - ) - })(u.default.Embed) - ;(c.blotName = 'break'), (c.tagName = 'BR'), (e.default = c) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function l(t, e) { - var n = document.createElement('a') - n.href = t - var r = n.href.slice(0, n.href.indexOf(':')) - return e.indexOf(r) > -1 - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.sanitize = e.default = void 0) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(5), - c = (function (t) { - return t && t.__esModule ? t : { default: t } - })(u), - f = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - a( - e, - [ - { - key: 'format', - value: function (t, n) { - if (t !== this.statics.blotName || !n) - return s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - ;(n = this.constructor.sanitize(n)), - this.domNode.setAttribute('href', n) - }, - }, - ], - [ - { - key: 'create', - value: function (t) { - var n = s( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - return ( - (t = this.sanitize(t)), - n.setAttribute('href', t), - n.setAttribute('rel', 'noopener noreferrer'), - n.setAttribute('target', '_blank'), - n - ) - }, - }, - { - key: 'formats', - value: function (t) { - return t.getAttribute('href') - }, - }, - { - key: 'sanitize', - value: function (t) { - return l(t, this.PROTOCOL_WHITELIST) - ? t - : this.SANITIZED_URL - }, - }, - ] - ), - e - ) - })(c.default) - ;(f.blotName = 'link'), - (f.tagName = 'A'), - (f.SANITIZED_URL = 'about:blank'), - (f.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel']), - (e.default = f), - (e.sanitize = l) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - t.setAttribute(e, !('true' === t.getAttribute(e))) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (t) { - return typeof t - } - : function (t) { - return t && - 'function' == typeof Symbol && - t.constructor === Symbol && - t !== Symbol.prototype - ? 'symbol' - : typeof t - }, - a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = n(25), - u = r(s), - c = n(106), - f = r(c), - h = 0, - p = (function () { - function t(e) { - var n = this - o(this, t), - (this.select = e), - (this.container = document.createElement('span')), - this.buildPicker(), - (this.select.style.display = 'none'), - this.select.parentNode.insertBefore(this.container, this.select), - this.label.addEventListener('mousedown', function () { - n.togglePicker() - }), - this.label.addEventListener('keydown', function (t) { - switch (t.keyCode) { - case u.default.keys.ENTER: - n.togglePicker() - break - case u.default.keys.ESCAPE: - n.escape(), t.preventDefault() - } - }), - this.select.addEventListener('change', this.update.bind(this)) - } - return ( - a(t, [ - { - key: 'togglePicker', - value: function () { - this.container.classList.toggle('ql-expanded'), - i(this.label, 'aria-expanded'), - i(this.options, 'aria-hidden') - }, - }, - { - key: 'buildItem', - value: function (t) { - var e = this, - n = document.createElement('span') - return ( - (n.tabIndex = '0'), - n.setAttribute('role', 'button'), - n.classList.add('ql-picker-item'), - t.hasAttribute('value') && - n.setAttribute('data-value', t.getAttribute('value')), - t.textContent && - n.setAttribute('data-label', t.textContent), - n.addEventListener('click', function () { - e.selectItem(n, !0) - }), - n.addEventListener('keydown', function (t) { - switch (t.keyCode) { - case u.default.keys.ENTER: - e.selectItem(n, !0), t.preventDefault() - break - case u.default.keys.ESCAPE: - e.escape(), t.preventDefault() - } - }), - n - ) - }, - }, - { - key: 'buildLabel', - value: function () { - var t = document.createElement('span') - return ( - t.classList.add('ql-picker-label'), - (t.innerHTML = f.default), - (t.tabIndex = '0'), - t.setAttribute('role', 'button'), - t.setAttribute('aria-expanded', 'false'), - this.container.appendChild(t), - t - ) - }, - }, - { - key: 'buildOptions', - value: function () { - var t = this, - e = document.createElement('span') - e.classList.add('ql-picker-options'), - e.setAttribute('aria-hidden', 'true'), - (e.tabIndex = '-1'), - (e.id = 'ql-picker-options-' + h), - (h += 1), - this.label.setAttribute('aria-controls', e.id), - (this.options = e), - [].slice.call(this.select.options).forEach(function (n) { - var r = t.buildItem(n) - e.appendChild(r), !0 === n.selected && t.selectItem(r) - }), - this.container.appendChild(e) - }, - }, - { - key: 'buildPicker', - value: function () { - var t = this - ;[].slice.call(this.select.attributes).forEach(function (e) { - t.container.setAttribute(e.name, e.value) - }), - this.container.classList.add('ql-picker'), - (this.label = this.buildLabel()), - this.buildOptions() - }, - }, - { - key: 'escape', - value: function () { - var t = this - this.close(), - setTimeout(function () { - return t.label.focus() - }, 1) - }, - }, - { - key: 'close', - value: function () { - this.container.classList.remove('ql-expanded'), - this.label.setAttribute('aria-expanded', 'false'), - this.options.setAttribute('aria-hidden', 'true') - }, - }, - { - key: 'selectItem', - value: function (t) { - var e = - arguments.length > 1 && - void 0 !== arguments[1] && - arguments[1], - n = this.container.querySelector('.ql-selected') - if ( - t !== n && - (null != n && n.classList.remove('ql-selected'), - null != t && - (t.classList.add('ql-selected'), - (this.select.selectedIndex = [].indexOf.call( - t.parentNode.children, - t - )), - t.hasAttribute('data-value') - ? this.label.setAttribute( - 'data-value', - t.getAttribute('data-value') - ) - : this.label.removeAttribute('data-value'), - t.hasAttribute('data-label') - ? this.label.setAttribute( - 'data-label', - t.getAttribute('data-label') - ) - : this.label.removeAttribute('data-label'), - e)) - ) { - if ('function' == typeof Event) - this.select.dispatchEvent(new Event('change')) - else if ( - 'object' === - ('undefined' == typeof Event ? 'undefined' : l(Event)) - ) { - var r = document.createEvent('Event') - r.initEvent('change', !0, !0), - this.select.dispatchEvent(r) - } - this.close() - } - }, - }, - { - key: 'update', - value: function () { - var t = void 0 - if (this.select.selectedIndex > -1) { - var e = - this.container.querySelector('.ql-picker-options') - .children[this.select.selectedIndex] - ;(t = this.select.options[this.select.selectedIndex]), - this.selectItem(e) - } else this.selectItem(null) - var n = - null != t && - t !== this.select.querySelector('option[selected]') - this.label.classList.toggle('ql-active', n) - }, - }, - ]), - t - ) - })() - e.default = p - }, - function (t, e, n) { - 'use strict' - function r(t) { - var e = a.find(t) - if (null == e) - try { - e = a.create(t) - } catch (n) { - ;(e = a.create(a.Scope.INLINE)), - [].slice.call(t.childNodes).forEach(function (t) { - e.domNode.appendChild(t) - }), - t.parentNode && t.parentNode.replaceChild(e.domNode, t), - e.attach() - } - return e - } - var o = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var i = n(47), - l = n(27), - a = n(1), - s = (function (t) { - function e(e) { - var n = t.call(this, e) || this - return n.build(), n - } - return ( - o(e, t), - (e.prototype.appendChild = function (t) { - this.insertBefore(t) - }), - (e.prototype.attach = function () { - t.prototype.attach.call(this), - this.children.forEach(function (t) { - t.attach() - }) - }), - (e.prototype.build = function () { - var t = this - ;(this.children = new i.default()), - [].slice - .call(this.domNode.childNodes) - .reverse() - .forEach(function (e) { - try { - var n = r(e) - t.insertBefore(n, t.children.head || void 0) - } catch (t) { - if (t instanceof a.ParchmentError) return - throw t - } - }) - }), - (e.prototype.deleteAt = function (t, e) { - if (0 === t && e === this.length()) return this.remove() - this.children.forEachAt(t, e, function (t, e, n) { - t.deleteAt(e, n) - }) - }), - (e.prototype.descendant = function (t, n) { - var r = this.children.find(n), - o = r[0], - i = r[1] - return (null == t.blotName && t(o)) || - (null != t.blotName && o instanceof t) - ? [o, i] - : o instanceof e - ? o.descendant(t, i) - : [null, -1] - }), - (e.prototype.descendants = function (t, n, r) { - void 0 === n && (n = 0), void 0 === r && (r = Number.MAX_VALUE) - var o = [], - i = r - return ( - this.children.forEachAt(n, r, function (n, r, l) { - ;((null == t.blotName && t(n)) || - (null != t.blotName && n instanceof t)) && - o.push(n), - n instanceof e && (o = o.concat(n.descendants(t, r, i))), - (i -= l) - }), - o - ) - }), - (e.prototype.detach = function () { - this.children.forEach(function (t) { - t.detach() - }), - t.prototype.detach.call(this) - }), - (e.prototype.formatAt = function (t, e, n, r) { - this.children.forEachAt(t, e, function (t, e, o) { - t.formatAt(e, o, n, r) - }) - }), - (e.prototype.insertAt = function (t, e, n) { - var r = this.children.find(t), - o = r[0], - i = r[1] - if (o) o.insertAt(i, e, n) - else { - var l = null == n ? a.create('text', e) : a.create(e, n) - this.appendChild(l) - } - }), - (e.prototype.insertBefore = function (t, e) { - if ( - null != this.statics.allowedChildren && - !this.statics.allowedChildren.some(function (e) { - return t instanceof e - }) - ) - throw new a.ParchmentError( - 'Cannot insert ' + - t.statics.blotName + - ' into ' + - this.statics.blotName - ) - t.insertInto(this, e) - }), - (e.prototype.length = function () { - return this.children.reduce(function (t, e) { - return t + e.length() - }, 0) - }), - (e.prototype.moveChildren = function (t, e) { - this.children.forEach(function (n) { - t.insertBefore(n, e) - }) - }), - (e.prototype.optimize = function (e) { - if ( - (t.prototype.optimize.call(this, e), 0 === this.children.length) - ) - if (null != this.statics.defaultChild) { - var n = a.create(this.statics.defaultChild) - this.appendChild(n), n.optimize(e) - } else this.remove() - }), - (e.prototype.path = function (t, n) { - void 0 === n && (n = !1) - var r = this.children.find(t, n), - o = r[0], - i = r[1], - l = [[this, t]] - return o instanceof e - ? l.concat(o.path(i, n)) - : (null != o && l.push([o, i]), l) - }), - (e.prototype.removeChild = function (t) { - this.children.remove(t) - }), - (e.prototype.replace = function (n) { - n instanceof e && n.moveChildren(this), - t.prototype.replace.call(this, n) - }), - (e.prototype.split = function (t, e) { - if ((void 0 === e && (e = !1), !e)) { - if (0 === t) return this - if (t === this.length()) return this.next - } - var n = this.clone() - return ( - this.parent.insertBefore(n, this.next), - this.children.forEachAt(t, this.length(), function (t, r, o) { - ;(t = t.split(r, e)), n.appendChild(t) - }), - n - ) - }), - (e.prototype.unwrap = function () { - this.moveChildren(this.parent, this.next), this.remove() - }), - (e.prototype.update = function (t, e) { - var n = this, - o = [], - i = [] - t.forEach(function (t) { - t.target === n.domNode && - 'childList' === t.type && - (o.push.apply(o, t.addedNodes), - i.push.apply(i, t.removedNodes)) - }), - i.forEach(function (t) { - if ( - !( - null != t.parentNode && - 'IFRAME' !== t.tagName && - document.body.compareDocumentPosition(t) & - Node.DOCUMENT_POSITION_CONTAINED_BY - ) - ) { - var e = a.find(t) - null != e && - ((null != e.domNode.parentNode && - e.domNode.parentNode !== n.domNode) || - e.detach()) - } - }), - o - .filter(function (t) { - return t.parentNode == n.domNode - }) - .sort(function (t, e) { - return t === e - ? 0 - : t.compareDocumentPosition(e) & - Node.DOCUMENT_POSITION_FOLLOWING - ? 1 - : -1 - }) - .forEach(function (t) { - var e = null - null != t.nextSibling && (e = a.find(t.nextSibling)) - var o = r(t) - ;(o.next == e && null != o.next) || - (null != o.parent && o.parent.removeChild(n), - n.insertBefore(o, e || void 0)) - }) - }), - e - ) - })(l.default) - e.default = s - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(11), - i = n(28), - l = n(17), - a = n(1), - s = (function (t) { - function e(e) { - var n = t.call(this, e) || this - return (n.attributes = new i.default(n.domNode)), n - } - return ( - r(e, t), - (e.formats = function (t) { - return ( - 'string' == typeof this.tagName || - (Array.isArray(this.tagName) ? t.tagName.toLowerCase() : void 0) - ) - }), - (e.prototype.format = function (t, e) { - var n = a.query(t) - n instanceof o.default - ? this.attributes.attribute(n, e) - : e && - (null == n || - (t === this.statics.blotName && this.formats()[t] === e) || - this.replaceWith(t, e)) - }), - (e.prototype.formats = function () { - var t = this.attributes.values(), - e = this.statics.formats(this.domNode) - return null != e && (t[this.statics.blotName] = e), t - }), - (e.prototype.replaceWith = function (e, n) { - var r = t.prototype.replaceWith.call(this, e, n) - return this.attributes.copy(r), r - }), - (e.prototype.update = function (e, n) { - var r = this - t.prototype.update.call(this, e, n), - e.some(function (t) { - return t.target === r.domNode && 'attributes' === t.type - }) && this.attributes.build() - }), - (e.prototype.wrap = function (n, r) { - var o = t.prototype.wrap.call(this, n, r) - return ( - o instanceof e && - o.statics.scope === this.statics.scope && - this.attributes.move(o), - o - ) - }), - e - ) - })(l.default) - e.default = s - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(27), - i = n(1), - l = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - r(e, t), - (e.value = function (t) { - return !0 - }), - (e.prototype.index = function (t, e) { - return this.domNode === t || - this.domNode.compareDocumentPosition(t) & - Node.DOCUMENT_POSITION_CONTAINED_BY - ? Math.min(e, 1) - : -1 - }), - (e.prototype.position = function (t, e) { - var n = [].indexOf.call( - this.parent.domNode.childNodes, - this.domNode - ) - return t > 0 && (n += 1), [this.parent.domNode, n] - }), - (e.prototype.value = function () { - var t - return ( - (t = {}), - (t[this.statics.blotName] = - this.statics.value(this.domNode) || !0), - t - ) - }), - (e.scope = i.Scope.INLINE_BLOT), - e - ) - })(o.default) - e.default = l - }, - function (t, e, n) { - function r(t) { - ;(this.ops = t), (this.index = 0), (this.offset = 0) - } - var o = n(12), - i = n(2), - l = { - attributes: { - compose: function (t, e, n) { - 'object' != typeof t && (t = {}), 'object' != typeof e && (e = {}) - var r = i(!0, {}, e) - n || - (r = Object.keys(r).reduce(function (t, e) { - return null != r[e] && (t[e] = r[e]), t - }, {})) - for (var o in t) - void 0 !== t[o] && void 0 === e[o] && (r[o] = t[o]) - return Object.keys(r).length > 0 ? r : void 0 - }, - diff: function (t, e) { - 'object' != typeof t && (t = {}), 'object' != typeof e && (e = {}) - var n = Object.keys(t) - .concat(Object.keys(e)) - .reduce(function (n, r) { - return ( - o(t[r], e[r]) || (n[r] = void 0 === e[r] ? null : e[r]), n - ) - }, {}) - return Object.keys(n).length > 0 ? n : void 0 - }, - transform: function (t, e, n) { - if ('object' != typeof t) return e - if ('object' == typeof e) { - if (!n) return e - var r = Object.keys(e).reduce(function (n, r) { - return void 0 === t[r] && (n[r] = e[r]), n - }, {}) - return Object.keys(r).length > 0 ? r : void 0 - } - }, - }, - iterator: function (t) { - return new r(t) - }, - length: function (t) { - return 'number' == typeof t.delete - ? t.delete - : 'number' == typeof t.retain - ? t.retain - : 'string' == typeof t.insert - ? t.insert.length - : 1 - }, - } - ;(r.prototype.hasNext = function () { - return this.peekLength() < 1 / 0 - }), - (r.prototype.next = function (t) { - t || (t = 1 / 0) - var e = this.ops[this.index] - if (e) { - var n = this.offset, - r = l.length(e) - if ( - (t >= r - n - ? ((t = r - n), (this.index += 1), (this.offset = 0)) - : (this.offset += t), - 'number' == typeof e.delete) - ) - return { delete: t } - var o = {} - return ( - e.attributes && (o.attributes = e.attributes), - 'number' == typeof e.retain - ? (o.retain = t) - : 'string' == typeof e.insert - ? (o.insert = e.insert.substr(n, t)) - : (o.insert = e.insert), - o - ) - } - return { retain: 1 / 0 } - }), - (r.prototype.peek = function () { - return this.ops[this.index] - }), - (r.prototype.peekLength = function () { - return this.ops[this.index] - ? l.length(this.ops[this.index]) - this.offset - : 1 / 0 - }), - (r.prototype.peekType = function () { - return this.ops[this.index] - ? 'number' == typeof this.ops[this.index].delete - ? 'delete' - : 'number' == typeof this.ops[this.index].retain - ? 'retain' - : 'insert' - : 'retain' - }), - (r.prototype.rest = function () { - if (this.hasNext()) { - if (0 === this.offset) return this.ops.slice(this.index) - var t = this.offset, - e = this.index, - n = this.next(), - r = this.ops.slice(this.index) - return (this.offset = t), (this.index = e), [n].concat(r) - } - return [] - }), - (t.exports = l) - }, - function (t, e) { - var n = (function () { - 'use strict' - function t(t, e) { - return null != e && t instanceof e - } - function e(n, r, o, i, c) { - function f(n, o) { - if (null === n) return null - if (0 === o) return n - var y, v - if ('object' != typeof n) return n - if (t(n, a)) y = new a() - else if (t(n, s)) y = new s() - else if (t(n, u)) - y = new u(function (t, e) { - n.then( - function (e) { - t(f(e, o - 1)) - }, - function (t) { - e(f(t, o - 1)) - } - ) - }) - else if (e.__isArray(n)) y = [] - else if (e.__isRegExp(n)) - (y = new RegExp(n.source, l(n))), - n.lastIndex && (y.lastIndex = n.lastIndex) - else if (e.__isDate(n)) y = new Date(n.getTime()) - else { - if (d && Buffer.isBuffer(n)) - return ( - (y = Buffer.allocUnsafe - ? Buffer.allocUnsafe(n.length) - : new Buffer(n.length)), - n.copy(y), - y - ) - t(n, Error) - ? (y = Object.create(n)) - : void 0 === i - ? ((v = Object.getPrototypeOf(n)), (y = Object.create(v))) - : ((y = Object.create(i)), (v = i)) - } - if (r) { - var b = h.indexOf(n) - if (-1 != b) return p[b] - h.push(n), p.push(y) - } - t(n, a) && - n.forEach(function (t, e) { - var n = f(e, o - 1), - r = f(t, o - 1) - y.set(n, r) - }), - t(n, s) && - n.forEach(function (t) { - var e = f(t, o - 1) - y.add(e) - }) - for (var g in n) { - var m - v && (m = Object.getOwnPropertyDescriptor(v, g)), - (m && null == m.set) || (y[g] = f(n[g], o - 1)) - } - if (Object.getOwnPropertySymbols) - for ( - var _ = Object.getOwnPropertySymbols(n), g = 0; - g < _.length; - g++ - ) { - var O = _[g], - w = Object.getOwnPropertyDescriptor(n, O) - ;(!w || w.enumerable || c) && - ((y[O] = f(n[O], o - 1)), - w.enumerable || - Object.defineProperty(y, O, { enumerable: !1 })) - } - if (c) - for ( - var x = Object.getOwnPropertyNames(n), g = 0; - g < x.length; - g++ - ) { - var k = x[g], - w = Object.getOwnPropertyDescriptor(n, k) - ;(w && w.enumerable) || - ((y[k] = f(n[k], o - 1)), - Object.defineProperty(y, k, { enumerable: !1 })) - } - return y - } - 'object' == typeof r && - ((o = r.depth), - (i = r.prototype), - (c = r.includeNonEnumerable), - (r = r.circular)) - var h = [], - p = [], - d = 'undefined' != typeof Buffer - return void 0 === r && (r = !0), void 0 === o && (o = 1 / 0), f(n, o) - } - function n(t) { - return Object.prototype.toString.call(t) - } - function r(t) { - return 'object' == typeof t && '[object Date]' === n(t) - } - function o(t) { - return 'object' == typeof t && '[object Array]' === n(t) - } - function i(t) { - return 'object' == typeof t && '[object RegExp]' === n(t) - } - function l(t) { - var e = '' - return ( - t.global && (e += 'g'), - t.ignoreCase && (e += 'i'), - t.multiline && (e += 'm'), - e - ) - } - var a - try { - a = Map - } catch (t) { - a = function () {} - } - var s - try { - s = Set - } catch (t) { - s = function () {} - } - var u - try { - u = Promise - } catch (t) { - u = function () {} - } - return ( - (e.clonePrototype = function (t) { - if (null === t) return null - var e = function () {} - return (e.prototype = t), new e() - }), - (e.__objToStr = n), - (e.__isDate = r), - (e.__isArray = o), - (e.__isRegExp = i), - (e.__getRegExpFlags = l), - e - ) - })() - 'object' == typeof t && t.exports && (t.exports = n) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t) { - if (Array.isArray(t)) { - for (var e = 0, n = Array(t.length); e < t.length; e++) n[e] = t[e] - return n - } - return Array.from(t) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - try { - e.parentNode - } catch (t) { - return !1 - } - return e instanceof Text && (e = e.parentNode), t.contains(e) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.Range = void 0) - var a = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - s = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - u = n(0), - c = r(u), - f = n(21), - h = r(f), - p = n(12), - d = r(p), - y = n(9), - v = r(y), - b = n(10), - g = r(b), - m = (0, g.default)('quill:selection'), - _ = function t(e) { - var n = - arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0 - i(this, t), (this.index = e), (this.length = n) - }, - O = (function () { - function t(e, n) { - var r = this - i(this, t), - (this.emitter = n), - (this.scroll = e), - (this.composing = !1), - (this.mouseDown = !1), - (this.root = this.scroll.domNode), - (this.cursor = c.default.create('cursor', this)), - (this.lastRange = this.savedRange = new _(0, 0)), - this.handleComposition(), - this.handleDragging(), - this.emitter.listenDOM('selectionchange', document, function () { - r.mouseDown || - setTimeout(r.update.bind(r, v.default.sources.USER), 1) - }), - this.emitter.on(v.default.events.EDITOR_CHANGE, function (t, e) { - t === v.default.events.TEXT_CHANGE && - e.length() > 0 && - r.update(v.default.sources.SILENT) - }), - this.emitter.on( - v.default.events.SCROLL_BEFORE_UPDATE, - function () { - if (r.hasFocus()) { - var t = r.getNativeRange() - null != t && - t.start.node !== r.cursor.textNode && - r.emitter.once( - v.default.events.SCROLL_UPDATE, - function () { - try { - r.setNativeRange( - t.start.node, - t.start.offset, - t.end.node, - t.end.offset - ) - } catch (t) {} - } - ) - } - } - ), - this.emitter.on( - v.default.events.SCROLL_OPTIMIZE, - function (t, e) { - if (e.range) { - var n = e.range, - o = n.startNode, - i = n.startOffset, - l = n.endNode, - a = n.endOffset - r.setNativeRange(o, i, l, a) - } - } - ), - this.update(v.default.sources.SILENT) - } - return ( - s(t, [ - { - key: 'handleComposition', - value: function () { - var t = this - this.root.addEventListener('compositionstart', function () { - t.composing = !0 - }), - this.root.addEventListener('compositionend', function () { - if (((t.composing = !1), t.cursor.parent)) { - var e = t.cursor.restore() - if (!e) return - setTimeout(function () { - t.setNativeRange( - e.startNode, - e.startOffset, - e.endNode, - e.endOffset - ) - }, 1) - } - }) - }, - }, - { - key: 'handleDragging', - value: function () { - var t = this - this.emitter.listenDOM( - 'mousedown', - document.body, - function () { - t.mouseDown = !0 - } - ), - this.emitter.listenDOM( - 'mouseup', - document.body, - function () { - ;(t.mouseDown = !1), t.update(v.default.sources.USER) - } - ) - }, - }, - { - key: 'focus', - value: function () { - this.hasFocus() || - (this.root.focus(), this.setRange(this.savedRange)) - }, - }, - { - key: 'format', - value: function (t, e) { - if ( - null == this.scroll.whitelist || - this.scroll.whitelist[t] - ) { - this.scroll.update() - var n = this.getNativeRange() - if ( - null != n && - n.native.collapsed && - !c.default.query(t, c.default.Scope.BLOCK) - ) { - if (n.start.node !== this.cursor.textNode) { - var r = c.default.find(n.start.node, !1) - if (null == r) return - if (r instanceof c.default.Leaf) { - var o = r.split(n.start.offset) - r.parent.insertBefore(this.cursor, o) - } else r.insertBefore(this.cursor, n.start.node) - this.cursor.attach() - } - this.cursor.format(t, e), - this.scroll.optimize(), - this.setNativeRange( - this.cursor.textNode, - this.cursor.textNode.data.length - ), - this.update() - } - } - }, - }, - { - key: 'getBounds', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 0, - n = this.scroll.length() - ;(t = Math.min(t, n - 1)), (e = Math.min(t + e, n - 1) - t) - var r = void 0, - o = this.scroll.leaf(t), - i = a(o, 2), - l = i[0], - s = i[1] - if (null == l) return null - var u = l.position(s, !0), - c = a(u, 2) - ;(r = c[0]), (s = c[1]) - var f = document.createRange() - if (e > 0) { - f.setStart(r, s) - var h = this.scroll.leaf(t + e), - p = a(h, 2) - if (((l = p[0]), (s = p[1]), null == l)) return null - var d = l.position(s, !0), - y = a(d, 2) - return ( - (r = y[0]), - (s = y[1]), - f.setEnd(r, s), - f.getBoundingClientRect() - ) - } - var v = 'left', - b = void 0 - return ( - r instanceof Text - ? (s < r.data.length - ? (f.setStart(r, s), f.setEnd(r, s + 1)) - : (f.setStart(r, s - 1), - f.setEnd(r, s), - (v = 'right')), - (b = f.getBoundingClientRect())) - : ((b = l.domNode.getBoundingClientRect()), - s > 0 && (v = 'right')), - { - bottom: b.top + b.height, - height: b.height, - left: b[v], - right: b[v], - top: b.top, - width: 0, - } - ) - }, - }, - { - key: 'getNativeRange', - value: function () { - var t = document.getSelection() - if (null == t || t.rangeCount <= 0) return null - var e = t.getRangeAt(0) - if (null == e) return null - var n = this.normalizeNative(e) - return m.info('getNativeRange', n), n - }, - }, - { - key: 'getRange', - value: function () { - var t = this.getNativeRange() - return null == t - ? [null, null] - : [this.normalizedToRange(t), t] - }, - }, - { - key: 'hasFocus', - value: function () { - return document.activeElement === this.root - }, - }, - { - key: 'normalizedToRange', - value: function (t) { - var e = this, - n = [[t.start.node, t.start.offset]] - t.native.collapsed || n.push([t.end.node, t.end.offset]) - var r = n.map(function (t) { - var n = a(t, 2), - r = n[0], - o = n[1], - i = c.default.find(r, !0), - l = i.offset(e.scroll) - return 0 === o - ? l - : i instanceof c.default.Container - ? l + i.length() - : l + i.index(r, o) - }), - i = Math.min( - Math.max.apply(Math, o(r)), - this.scroll.length() - 1 - ), - l = Math.min.apply(Math, [i].concat(o(r))) - return new _(l, i - l) - }, - }, - { - key: 'normalizeNative', - value: function (t) { - if ( - !l(this.root, t.startContainer) || - (!t.collapsed && !l(this.root, t.endContainer)) - ) - return null - var e = { - start: { node: t.startContainer, offset: t.startOffset }, - end: { node: t.endContainer, offset: t.endOffset }, - native: t, - } - return ( - [e.start, e.end].forEach(function (t) { - for ( - var e = t.node, n = t.offset; - !(e instanceof Text) && e.childNodes.length > 0; - - ) - if (e.childNodes.length > n) - (e = e.childNodes[n]), (n = 0) - else { - if (e.childNodes.length !== n) break - ;(e = e.lastChild), - (n = - e instanceof Text - ? e.data.length - : e.childNodes.length + 1) - } - ;(t.node = e), (t.offset = n) - }), - e - ) - }, - }, - { - key: 'rangeToNative', - value: function (t) { - var e = this, - n = t.collapsed ? [t.index] : [t.index, t.index + t.length], - r = [], - o = this.scroll.length() - return ( - n.forEach(function (t, n) { - t = Math.min(o - 1, t) - var i = void 0, - l = e.scroll.leaf(t), - s = a(l, 2), - u = s[0], - c = s[1], - f = u.position(c, 0 !== n), - h = a(f, 2) - ;(i = h[0]), (c = h[1]), r.push(i, c) - }), - r.length < 2 && (r = r.concat(r)), - r - ) - }, - }, - { - key: 'scrollIntoView', - value: function (t) { - var e = this.lastRange - if (null != e) { - var n = this.getBounds(e.index, e.length) - if (null != n) { - var r = this.scroll.length() - 1, - o = this.scroll.line(Math.min(e.index, r)), - i = a(o, 1), - l = i[0], - s = l - if (e.length > 0) { - var u = this.scroll.line( - Math.min(e.index + e.length, r) - ) - s = a(u, 1)[0] - } - if (null != l && null != s) { - var c = t.getBoundingClientRect() - n.top < c.top - ? (t.scrollTop -= c.top - n.top) - : n.bottom > c.bottom && - (t.scrollTop += n.bottom - c.bottom) - } - } - } - }, - }, - { - key: 'setNativeRange', - value: function (t, e) { - var n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : t, - r = - arguments.length > 3 && void 0 !== arguments[3] - ? arguments[3] - : e, - o = - arguments.length > 4 && - void 0 !== arguments[4] && - arguments[4] - if ( - (m.info('setNativeRange', t, e, n, r), - null == t || - (null != this.root.parentNode && - null != t.parentNode && - null != n.parentNode)) - ) { - var i = document.getSelection() - if (null != i) - if (null != t) { - this.hasFocus() || this.root.focus() - var l = (this.getNativeRange() || {}).native - if ( - null == l || - o || - t !== l.startContainer || - e !== l.startOffset || - n !== l.endContainer || - r !== l.endOffset - ) { - 'BR' == t.tagName && - ((e = [].indexOf.call(t.parentNode.childNodes, t)), - (t = t.parentNode)), - 'BR' == n.tagName && - ((r = [].indexOf.call( - n.parentNode.childNodes, - n - )), - (n = n.parentNode)) - var a = document.createRange() - a.setStart(t, e), - a.setEnd(n, r), - i.removeAllRanges(), - i.addRange(a) - } - } else - i.removeAllRanges(), - this.root.blur(), - document.body.focus() - } - }, - }, - { - key: 'setRange', - value: function (t) { - var e = - arguments.length > 1 && - void 0 !== arguments[1] && - arguments[1], - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : v.default.sources.API - if ( - ('string' == typeof e && ((n = e), (e = !1)), - m.info('setRange', t), - null != t) - ) { - var r = this.rangeToNative(t) - this.setNativeRange.apply(this, o(r).concat([e])) - } else this.setNativeRange(null) - this.update(n) - }, - }, - { - key: 'update', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : v.default.sources.USER, - e = this.lastRange, - n = this.getRange(), - r = a(n, 2), - o = r[0], - i = r[1] - if ( - ((this.lastRange = o), - null != this.lastRange && - (this.savedRange = this.lastRange), - !(0, d.default)(e, this.lastRange)) - ) { - var l - !this.composing && - null != i && - i.native.collapsed && - i.start.node !== this.cursor.textNode && - this.cursor.restore() - var s = [ - v.default.events.SELECTION_CHANGE, - (0, h.default)(this.lastRange), - (0, h.default)(e), - t, - ] - if ( - ((l = this.emitter).emit.apply( - l, - [v.default.events.EDITOR_CHANGE].concat(s) - ), - t !== v.default.sources.SILENT) - ) { - var u - ;(u = this.emitter).emit.apply(u, s) - } - } - }, - }, - ]), - t - ) - })() - ;(e.Range = _), (e.default = O) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = n(0), - s = r(a), - u = n(3), - c = r(u), - f = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return l(e, t), e - })(s.default.Container) - ;(f.allowedChildren = [c.default, u.BlockEmbed, f]), (e.default = f) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.ColorStyle = e.ColorClass = e.ColorAttributor = void 0) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(0), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l(e, [ - { - key: 'value', - value: function (t) { - var n = a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'value', - this - ).call(this, t) - return n.startsWith('rgb(') - ? ((n = n.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '')), - '#' + - n - .split(',') - .map(function (t) { - return ('00' + parseInt(t).toString(16)).slice(-2) - }) - .join('')) - : n - }, - }, - ]), - e - ) - })(u.default.Attributor.Style), - f = new u.default.Attributor.Class('color', 'ql-color', { - scope: u.default.Scope.INLINE, - }), - h = new c('color', 'color', { scope: u.default.Scope.INLINE }) - ;(e.ColorAttributor = c), (e.ColorClass = f), (e.ColorStyle = h) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function a(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function s(t, e) { - var n, - r = t === D.keys.LEFT ? 'prefix' : 'suffix' - return ( - (n = { key: t, shiftKey: e, altKey: null }), - o(n, r, /^$/), - o(n, 'handler', function (n) { - var r = n.index - t === D.keys.RIGHT && (r += n.length + 1) - var o = this.quill.getLeaf(r) - return ( - !(b(o, 1)[0] instanceof T.default.Embed) || - (t === D.keys.LEFT - ? e - ? this.quill.setSelection( - n.index - 1, - n.length + 1, - S.default.sources.USER - ) - : this.quill.setSelection(n.index - 1, S.default.sources.USER) - : e - ? this.quill.setSelection( - n.index, - n.length + 1, - S.default.sources.USER - ) - : this.quill.setSelection( - n.index + n.length + 1, - S.default.sources.USER - ), - !1) - ) - }), - n - ) - } - function u(t, e) { - if (!(0 === t.index || this.quill.getLength() <= 1)) { - var n = this.quill.getLine(t.index), - r = b(n, 1), - o = r[0], - i = {} - if (0 === e.offset) { - var l = this.quill.getLine(t.index - 1), - a = b(l, 1), - s = a[0] - if (null != s && s.length() > 1) { - var u = o.formats(), - c = this.quill.getFormat(t.index - 1, 1) - i = A.default.attributes.diff(u, c) || {} - } - } - var f = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix) ? 2 : 1 - this.quill.deleteText(t.index - f, f, S.default.sources.USER), - Object.keys(i).length > 0 && - this.quill.formatLine(t.index - f, f, i, S.default.sources.USER), - this.quill.focus() - } - } - function c(t, e) { - var n = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix) ? 2 : 1 - if (!(t.index >= this.quill.getLength() - n)) { - var r = {}, - o = 0, - i = this.quill.getLine(t.index), - l = b(i, 1), - a = l[0] - if (e.offset >= a.length() - 1) { - var s = this.quill.getLine(t.index + 1), - u = b(s, 1), - c = u[0] - if (c) { - var f = a.formats(), - h = this.quill.getFormat(t.index, 1) - ;(r = A.default.attributes.diff(f, h) || {}), (o = c.length()) - } - } - this.quill.deleteText(t.index, n, S.default.sources.USER), - Object.keys(r).length > 0 && - this.quill.formatLine( - t.index + o - 1, - n, - r, - S.default.sources.USER - ) - } - } - function f(t) { - var e = this.quill.getLines(t), - n = {} - if (e.length > 1) { - var r = e[0].formats(), - o = e[e.length - 1].formats() - n = A.default.attributes.diff(o, r) || {} - } - this.quill.deleteText(t, S.default.sources.USER), - Object.keys(n).length > 0 && - this.quill.formatLine(t.index, 1, n, S.default.sources.USER), - this.quill.setSelection(t.index, S.default.sources.SILENT), - this.quill.focus() - } - function h(t, e) { - var n = this - t.length > 0 && this.quill.scroll.deleteAt(t.index, t.length) - var r = Object.keys(e.format).reduce(function (t, n) { - return ( - T.default.query(n, T.default.Scope.BLOCK) && - !Array.isArray(e.format[n]) && - (t[n] = e.format[n]), - t - ) - }, {}) - this.quill.insertText(t.index, '\n', r, S.default.sources.USER), - this.quill.setSelection(t.index + 1, S.default.sources.SILENT), - this.quill.focus(), - Object.keys(e.format).forEach(function (t) { - null == r[t] && - (Array.isArray(e.format[t]) || - ('link' !== t && - n.quill.format(t, e.format[t], S.default.sources.USER))) - }) - } - function p(t) { - return { - key: D.keys.TAB, - shiftKey: !t, - format: { 'code-block': !0 }, - handler: function (e) { - var n = T.default.query('code-block'), - r = e.index, - o = e.length, - i = this.quill.scroll.descendant(n, r), - l = b(i, 2), - a = l[0], - s = l[1] - if (null != a) { - var u = this.quill.getIndex(a), - c = a.newlineIndex(s, !0) + 1, - f = a.newlineIndex(u + s + o), - h = a.domNode.textContent.slice(c, f).split('\n') - ;(s = 0), - h.forEach(function (e, i) { - t - ? (a.insertAt(c + s, n.TAB), - (s += n.TAB.length), - 0 === i ? (r += n.TAB.length) : (o += n.TAB.length)) - : e.startsWith(n.TAB) && - (a.deleteAt(c + s, n.TAB.length), - (s -= n.TAB.length), - 0 === i ? (r -= n.TAB.length) : (o -= n.TAB.length)), - (s += e.length + 1) - }), - this.quill.update(S.default.sources.USER), - this.quill.setSelection(r, o, S.default.sources.SILENT) - } - }, - } - } - function d(t) { - return { - key: t[0].toUpperCase(), - shortKey: !0, - handler: function (e, n) { - this.quill.format(t, !n.format[t], S.default.sources.USER) - }, - } - } - function y(t) { - if ('string' == typeof t || 'number' == typeof t) return y({ key: t }) - if ( - ('object' === (void 0 === t ? 'undefined' : v(t)) && - (t = (0, _.default)(t, !1)), - 'string' == typeof t.key) - ) - if (null != D.keys[t.key.toUpperCase()]) - t.key = D.keys[t.key.toUpperCase()] - else { - if (1 !== t.key.length) return null - t.key = t.key.toUpperCase().charCodeAt(0) - } - return t.shortKey && ((t[B] = t.shortKey), delete t.shortKey), t - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.SHORTKEY = e.default = void 0) - var v = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (t) { - return typeof t - } - : function (t) { - return t && - 'function' == typeof Symbol && - t.constructor === Symbol && - t !== Symbol.prototype - ? 'symbol' - : typeof t - }, - b = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - g = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - m = n(21), - _ = r(m), - O = n(12), - w = r(O), - x = n(2), - k = r(x), - E = n(4), - N = r(E), - j = n(20), - A = r(j), - q = n(0), - T = r(q), - P = n(6), - S = r(P), - C = n(10), - L = r(C), - M = n(7), - R = r(M), - I = (0, L.default)('quill:keyboard'), - B = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey', - D = (function (t) { - function e(t, n) { - i(this, e) - var r = l( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return ( - (r.bindings = {}), - Object.keys(r.options.bindings).forEach(function (e) { - ;('list autofill' !== e || - null == t.scroll.whitelist || - t.scroll.whitelist.list) && - r.options.bindings[e] && - r.addBinding(r.options.bindings[e]) - }), - r.addBinding({ key: e.keys.ENTER, shiftKey: null }, h), - r.addBinding( - { - key: e.keys.ENTER, - metaKey: null, - ctrlKey: null, - altKey: null, - }, - function () {} - ), - /Firefox/i.test(navigator.userAgent) - ? (r.addBinding( - { key: e.keys.BACKSPACE }, - { collapsed: !0 }, - u - ), - r.addBinding({ key: e.keys.DELETE }, { collapsed: !0 }, c)) - : (r.addBinding( - { key: e.keys.BACKSPACE }, - { collapsed: !0, prefix: /^.?$/ }, - u - ), - r.addBinding( - { key: e.keys.DELETE }, - { collapsed: !0, suffix: /^.?$/ }, - c - )), - r.addBinding({ key: e.keys.BACKSPACE }, { collapsed: !1 }, f), - r.addBinding({ key: e.keys.DELETE }, { collapsed: !1 }, f), - r.addBinding( - { - key: e.keys.BACKSPACE, - altKey: null, - ctrlKey: null, - metaKey: null, - shiftKey: null, - }, - { collapsed: !0, offset: 0 }, - u - ), - r.listen(), - r - ) - } - return ( - a(e, t), - g(e, null, [ - { - key: 'match', - value: function (t, e) { - return ( - (e = y(e)), - !['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some( - function (n) { - return !!e[n] !== t[n] && null !== e[n] - } - ) && e.key === (t.which || t.keyCode) - ) - }, - }, - ]), - g(e, [ - { - key: 'addBinding', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {}, - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : {}, - r = y(t) - if (null == r || null == r.key) - return I.warn( - 'Attempted to add invalid keyboard binding', - r - ) - 'function' == typeof e && (e = { handler: e }), - 'function' == typeof n && (n = { handler: n }), - (r = (0, k.default)(r, e, n)), - (this.bindings[r.key] = this.bindings[r.key] || []), - this.bindings[r.key].push(r) - }, - }, - { - key: 'listen', - value: function () { - var t = this - this.quill.root.addEventListener('keydown', function (n) { - if (!n.defaultPrevented) { - var r = n.which || n.keyCode, - o = (t.bindings[r] || []).filter(function (t) { - return e.match(n, t) - }) - if (0 !== o.length) { - var i = t.quill.getSelection() - if (null != i && t.quill.hasFocus()) { - var l = t.quill.getLine(i.index), - a = b(l, 2), - s = a[0], - u = a[1], - c = t.quill.getLeaf(i.index), - f = b(c, 2), - h = f[0], - p = f[1], - d = - 0 === i.length - ? [h, p] - : t.quill.getLeaf(i.index + i.length), - y = b(d, 2), - g = y[0], - m = y[1], - _ = - h instanceof T.default.Text - ? h.value().slice(0, p) - : '', - O = - g instanceof T.default.Text - ? g.value().slice(m) - : '', - x = { - collapsed: 0 === i.length, - empty: 0 === i.length && s.length() <= 1, - format: t.quill.getFormat(i), - offset: u, - prefix: _, - suffix: O, - } - o.some(function (e) { - if ( - null != e.collapsed && - e.collapsed !== x.collapsed - ) - return !1 - if (null != e.empty && e.empty !== x.empty) - return !1 - if (null != e.offset && e.offset !== x.offset) - return !1 - if (Array.isArray(e.format)) { - if ( - e.format.every(function (t) { - return null == x.format[t] - }) - ) - return !1 - } else if ( - 'object' === v(e.format) && - !Object.keys(e.format).every(function (t) { - return !0 === e.format[t] - ? null != x.format[t] - : !1 === e.format[t] - ? null == x.format[t] - : (0, w.default)(e.format[t], x.format[t]) - }) - ) - return !1 - return ( - !(null != e.prefix && !e.prefix.test(x.prefix)) && - !(null != e.suffix && !e.suffix.test(x.suffix)) && - !0 !== e.handler.call(t, i, x) - ) - }) && n.preventDefault() - } - } - } - }) - }, - }, - ]), - e - ) - })(R.default) - ;(D.keys = { - BACKSPACE: 8, - TAB: 9, - ENTER: 13, - ESCAPE: 27, - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - DELETE: 46, - }), - (D.DEFAULTS = { - bindings: { - bold: d('bold'), - italic: d('italic'), - underline: d('underline'), - indent: { - key: D.keys.TAB, - format: ['blockquote', 'indent', 'list'], - handler: function (t, e) { - if (e.collapsed && 0 !== e.offset) return !0 - this.quill.format('indent', '+1', S.default.sources.USER) - }, - }, - outdent: { - key: D.keys.TAB, - shiftKey: !0, - format: ['blockquote', 'indent', 'list'], - handler: function (t, e) { - if (e.collapsed && 0 !== e.offset) return !0 - this.quill.format('indent', '-1', S.default.sources.USER) - }, - }, - 'outdent backspace': { - key: D.keys.BACKSPACE, - collapsed: !0, - shiftKey: null, - metaKey: null, - ctrlKey: null, - altKey: null, - format: ['indent', 'list'], - offset: 0, - handler: function (t, e) { - null != e.format.indent - ? this.quill.format('indent', '-1', S.default.sources.USER) - : null != e.format.list && - this.quill.format('list', !1, S.default.sources.USER) - }, - }, - 'indent code-block': p(!0), - 'outdent code-block': p(!1), - 'remove tab': { - key: D.keys.TAB, - shiftKey: !0, - collapsed: !0, - prefix: /\t$/, - handler: function (t) { - this.quill.deleteText(t.index - 1, 1, S.default.sources.USER) - }, - }, - tab: { - key: D.keys.TAB, - handler: function (t) { - this.quill.history.cutoff() - var e = new N.default() - .retain(t.index) - .delete(t.length) - .insert('\t') - this.quill.updateContents(e, S.default.sources.USER), - this.quill.history.cutoff(), - this.quill.setSelection(t.index + 1, S.default.sources.SILENT) - }, - }, - 'list empty enter': { - key: D.keys.ENTER, - collapsed: !0, - format: ['list'], - empty: !0, - handler: function (t, e) { - this.quill.format('list', !1, S.default.sources.USER), - e.format.indent && - this.quill.format('indent', !1, S.default.sources.USER) - }, - }, - 'checklist enter': { - key: D.keys.ENTER, - collapsed: !0, - format: { list: 'checked' }, - handler: function (t) { - var e = this.quill.getLine(t.index), - n = b(e, 2), - r = n[0], - o = n[1], - i = (0, k.default)({}, r.formats(), { list: 'checked' }), - l = new N.default() - .retain(t.index) - .insert('\n', i) - .retain(r.length() - o - 1) - .retain(1, { list: 'unchecked' }) - this.quill.updateContents(l, S.default.sources.USER), - this.quill.setSelection( - t.index + 1, - S.default.sources.SILENT - ), - this.quill.scrollIntoView() - }, - }, - 'header enter': { - key: D.keys.ENTER, - collapsed: !0, - format: ['header'], - suffix: /^$/, - handler: function (t, e) { - var n = this.quill.getLine(t.index), - r = b(n, 2), - o = r[0], - i = r[1], - l = new N.default() - .retain(t.index) - .insert('\n', e.format) - .retain(o.length() - i - 1) - .retain(1, { header: null }) - this.quill.updateContents(l, S.default.sources.USER), - this.quill.setSelection( - t.index + 1, - S.default.sources.SILENT - ), - this.quill.scrollIntoView() - }, - }, - 'list autofill': { - key: ' ', - collapsed: !0, - format: { list: !1 }, - prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/, - handler: function (t, e) { - var n = e.prefix.length, - r = this.quill.getLine(t.index), - o = b(r, 2), - i = o[0], - l = o[1] - if (l > n) return !0 - var a = void 0 - switch (e.prefix.trim()) { - case '[]': - case '[ ]': - a = 'unchecked' - break - case '[x]': - a = 'checked' - break - case '-': - case '*': - a = 'bullet' - break - default: - a = 'ordered' - } - this.quill.insertText(t.index, ' ', S.default.sources.USER), - this.quill.history.cutoff() - var s = new N.default() - .retain(t.index - l) - .delete(n + 1) - .retain(i.length() - 2 - l) - .retain(1, { list: a }) - this.quill.updateContents(s, S.default.sources.USER), - this.quill.history.cutoff(), - this.quill.setSelection(t.index - n, S.default.sources.SILENT) - }, - }, - 'code exit': { - key: D.keys.ENTER, - collapsed: !0, - format: ['code-block'], - prefix: /\n\n$/, - suffix: /^\s+$/, - handler: function (t) { - var e = this.quill.getLine(t.index), - n = b(e, 2), - r = n[0], - o = n[1], - i = new N.default() - .retain(t.index + r.length() - o - 2) - .retain(1, { 'code-block': null }) - .delete(1) - this.quill.updateContents(i, S.default.sources.USER) - }, - }, - 'embed left': s(D.keys.LEFT, !1), - 'embed left shift': s(D.keys.LEFT, !0), - 'embed right': s(D.keys.RIGHT, !1), - 'embed right shift': s(D.keys.RIGHT, !0), - }, - }), - (e.default = D), - (e.SHORTKEY = B) - }, - function (t, e, n) { - 'use strict' - t.exports = { - align: { '': n(75), center: n(76), right: n(77), justify: n(78) }, - background: n(79), - blockquote: n(80), - bold: n(81), - clean: n(82), - code: n(40), - 'code-block': n(40), - color: n(83), - direction: { '': n(84), rtl: n(85) }, - float: { center: n(86), full: n(87), left: n(88), right: n(89) }, - formula: n(90), - header: { 1: n(91), 2: n(92) }, - italic: n(93), - image: n(94), - indent: { '+1': n(95), '-1': n(96) }, - link: n(97), - list: { ordered: n(98), bullet: n(99), check: n(100) }, - script: { sub: n(101), super: n(102) }, - strike: n(103), - underline: n(104), - video: n(105), - } - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = n(1), - o = (function () { - function t(t) { - ;(this.domNode = t), (this.domNode[r.DATA_KEY] = { blot: this }) - } - return ( - Object.defineProperty(t.prototype, 'statics', { - get: function () { - return this.constructor - }, - enumerable: !0, - configurable: !0, - }), - (t.create = function (t) { - if (null == this.tagName) - throw new r.ParchmentError('Blot definition missing tagName') - var e - return ( - Array.isArray(this.tagName) - ? ('string' == typeof t && - ((t = t.toUpperCase()), - parseInt(t).toString() === t && (t = parseInt(t))), - (e = - 'number' == typeof t - ? document.createElement(this.tagName[t - 1]) - : this.tagName.indexOf(t) > -1 - ? document.createElement(t) - : document.createElement(this.tagName[0]))) - : (e = document.createElement(this.tagName)), - this.className && e.classList.add(this.className), - e - ) - }), - (t.prototype.attach = function () { - null != this.parent && (this.scroll = this.parent.scroll) - }), - (t.prototype.clone = function () { - var t = this.domNode.cloneNode(!1) - return r.create(t) - }), - (t.prototype.detach = function () { - null != this.parent && this.parent.removeChild(this), - delete this.domNode[r.DATA_KEY] - }), - (t.prototype.deleteAt = function (t, e) { - this.isolate(t, e).remove() - }), - (t.prototype.formatAt = function (t, e, n, o) { - var i = this.isolate(t, e) - if (null != r.query(n, r.Scope.BLOT) && o) i.wrap(n, o) - else if (null != r.query(n, r.Scope.ATTRIBUTE)) { - var l = r.create(this.statics.scope) - i.wrap(l), l.format(n, o) - } - }), - (t.prototype.insertAt = function (t, e, n) { - var o = null == n ? r.create('text', e) : r.create(e, n), - i = this.split(t) - this.parent.insertBefore(o, i) - }), - (t.prototype.insertInto = function (t, e) { - void 0 === e && (e = null), - null != this.parent && this.parent.children.remove(this) - var n = null - t.children.insertBefore(this, e), - null != e && (n = e.domNode), - (this.domNode.parentNode == t.domNode && - this.domNode.nextSibling == n) || - t.domNode.insertBefore(this.domNode, n), - (this.parent = t), - this.attach() - }), - (t.prototype.isolate = function (t, e) { - var n = this.split(t) - return n.split(e), n - }), - (t.prototype.length = function () { - return 1 - }), - (t.prototype.offset = function (t) { - return ( - void 0 === t && (t = this.parent), - null == this.parent || this == t - ? 0 - : this.parent.children.offset(this) + this.parent.offset(t) - ) - }), - (t.prototype.optimize = function (t) { - null != this.domNode[r.DATA_KEY] && - delete this.domNode[r.DATA_KEY].mutations - }), - (t.prototype.remove = function () { - null != this.domNode.parentNode && - this.domNode.parentNode.removeChild(this.domNode), - this.detach() - }), - (t.prototype.replace = function (t) { - null != t.parent && - (t.parent.insertBefore(this, t.next), t.remove()) - }), - (t.prototype.replaceWith = function (t, e) { - var n = 'string' == typeof t ? r.create(t, e) : t - return n.replace(this), n - }), - (t.prototype.split = function (t, e) { - return 0 === t ? this : this.next - }), - (t.prototype.update = function (t, e) {}), - (t.prototype.wrap = function (t, e) { - var n = 'string' == typeof t ? r.create(t, e) : t - return ( - null != this.parent && this.parent.insertBefore(n, this.next), - n.appendChild(this), - n - ) - }), - (t.blotName = 'abstract'), - t - ) - })() - e.default = o - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = n(11), - o = n(29), - i = n(30), - l = n(1), - a = (function () { - function t(t) { - ;(this.attributes = {}), (this.domNode = t), this.build() - } - return ( - (t.prototype.attribute = function (t, e) { - e - ? t.add(this.domNode, e) && - (null != t.value(this.domNode) - ? (this.attributes[t.attrName] = t) - : delete this.attributes[t.attrName]) - : (t.remove(this.domNode), delete this.attributes[t.attrName]) - }), - (t.prototype.build = function () { - var t = this - this.attributes = {} - var e = r.default.keys(this.domNode), - n = o.default.keys(this.domNode), - a = i.default.keys(this.domNode) - e.concat(n) - .concat(a) - .forEach(function (e) { - var n = l.query(e, l.Scope.ATTRIBUTE) - n instanceof r.default && (t.attributes[n.attrName] = n) - }) - }), - (t.prototype.copy = function (t) { - var e = this - Object.keys(this.attributes).forEach(function (n) { - var r = e.attributes[n].value(e.domNode) - t.format(n, r) - }) - }), - (t.prototype.move = function (t) { - var e = this - this.copy(t), - Object.keys(this.attributes).forEach(function (t) { - e.attributes[t].remove(e.domNode) - }), - (this.attributes = {}) - }), - (t.prototype.values = function () { - var t = this - return Object.keys(this.attributes).reduce(function (e, n) { - return (e[n] = t.attributes[n].value(t.domNode)), e - }, {}) - }), - t - ) - })() - e.default = a - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - return (t.getAttribute('class') || '') - .split(/\s+/) - .filter(function (t) { - return 0 === t.indexOf(e + '-') - }) - } - var o = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var i = n(11), - l = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - o(e, t), - (e.keys = function (t) { - return (t.getAttribute('class') || '') - .split(/\s+/) - .map(function (t) { - return t.split('-').slice(0, -1).join('-') - }) - }), - (e.prototype.add = function (t, e) { - return ( - !!this.canAdd(t, e) && - (this.remove(t), t.classList.add(this.keyName + '-' + e), !0) - ) - }), - (e.prototype.remove = function (t) { - r(t, this.keyName).forEach(function (e) { - t.classList.remove(e) - }), - 0 === t.classList.length && t.removeAttribute('class') - }), - (e.prototype.value = function (t) { - var e = r(t, this.keyName)[0] || '', - n = e.slice(this.keyName.length + 1) - return this.canAdd(t, n) ? n : '' - }), - e - ) - })(i.default) - e.default = l - }, - function (t, e, n) { - 'use strict' - function r(t) { - var e = t.split('-'), - n = e - .slice(1) - .map(function (t) { - return t[0].toUpperCase() + t.slice(1) - }) - .join('') - return e[0] + n - } - var o = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var i = n(11), - l = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - o(e, t), - (e.keys = function (t) { - return (t.getAttribute('style') || '') - .split(';') - .map(function (t) { - return t.split(':')[0].trim() - }) - }), - (e.prototype.add = function (t, e) { - return !!this.canAdd(t, e) && ((t.style[r(this.keyName)] = e), !0) - }), - (e.prototype.remove = function (t) { - ;(t.style[r(this.keyName)] = ''), - t.getAttribute('style') || t.removeAttribute('style') - }), - (e.prototype.value = function (t) { - var e = t.style[r(this.keyName)] - return this.canAdd(t, e) ? e : '' - }), - e - ) - })(i.default) - e.default = l - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - c = n(0), - f = r(c), - h = n(8), - p = r(h), - d = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return ( - (r.selection = n), - (r.textNode = document.createTextNode(e.CONTENTS)), - r.domNode.appendChild(r.textNode), - (r._length = 0), - r - ) - } - return ( - l(e, t), - u(e, null, [{ key: 'value', value: function () {} }]), - u(e, [ - { - key: 'detach', - value: function () { - null != this.parent && this.parent.removeChild(this) - }, - }, - { - key: 'format', - value: function (t, n) { - if (0 !== this._length) - return s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - for ( - var r = this, o = 0; - null != r && r.statics.scope !== f.default.Scope.BLOCK_BLOT; - - ) - (o += r.offset(r.parent)), (r = r.parent) - null != r && - ((this._length = e.CONTENTS.length), - r.optimize(), - r.formatAt(o, e.CONTENTS.length, t, n), - (this._length = 0)) - }, - }, - { - key: 'index', - value: function (t, n) { - return t === this.textNode - ? 0 - : s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'index', - this - ).call(this, t, n) - }, - }, - { - key: 'length', - value: function () { - return this._length - }, - }, - { - key: 'position', - value: function () { - return [this.textNode, this.textNode.data.length] - }, - }, - { - key: 'remove', - value: function () { - s( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'remove', - this - ).call(this), - (this.parent = null) - }, - }, - { - key: 'restore', - value: function () { - if (!this.selection.composing && null != this.parent) { - var t = this.textNode, - n = this.selection.getNativeRange(), - r = void 0, - o = void 0, - i = void 0 - if (null != n && n.start.node === t && n.end.node === t) { - var l = [t, n.start.offset, n.end.offset] - ;(r = l[0]), (o = l[1]), (i = l[2]) - } - for ( - ; - null != this.domNode.lastChild && - this.domNode.lastChild !== this.textNode; - - ) - this.domNode.parentNode.insertBefore( - this.domNode.lastChild, - this.domNode - ) - if (this.textNode.data !== e.CONTENTS) { - var s = this.textNode.data.split(e.CONTENTS).join('') - this.next instanceof p.default - ? ((r = this.next.domNode), - this.next.insertAt(0, s), - (this.textNode.data = e.CONTENTS)) - : ((this.textNode.data = s), - this.parent.insertBefore( - f.default.create(this.textNode), - this - ), - (this.textNode = document.createTextNode(e.CONTENTS)), - this.domNode.appendChild(this.textNode)) - } - if ((this.remove(), null != o)) { - var u = [o, i].map(function (t) { - return Math.max(0, Math.min(r.data.length, t - 1)) - }), - c = a(u, 2) - return ( - (o = c[0]), - (i = c[1]), - { - startNode: r, - startOffset: o, - endNode: r, - endOffset: i, - } - ) - } - } - }, - }, - { - key: 'update', - value: function (t, e) { - var n = this - if ( - t.some(function (t) { - return ( - 'characterData' === t.type && t.target === n.textNode - ) - }) - ) { - var r = this.restore() - r && (e.range = r) - } - }, - }, - { - key: 'value', - value: function () { - return '' - }, - }, - ]), - e - ) - })(f.default.Embed) - ;(d.blotName = 'cursor'), - (d.className = 'ql-cursor'), - (d.tagName = 'span'), - (d.CONTENTS = '\ufeff'), - (e.default = d) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - i = (function () { - function t(e, n) { - r(this, t), - (this.quill = e), - (this.options = n), - (this.modules = {}) - } - return ( - o(t, [ - { - key: 'init', - value: function () { - var t = this - Object.keys(this.options.modules).forEach(function (e) { - null == t.modules[e] && t.addModule(e) - }) - }, - }, - { - key: 'addModule', - value: function (t) { - var e = this.quill.constructor.import('modules/' + t) - return ( - (this.modules[t] = new e( - this.quill, - this.options.modules[t] || {} - )), - this.modules[t] - ) - }, - }, - ]), - t - ) - })() - ;(i.DEFAULTS = { modules: {} }), - (i.themes = { default: i }), - (e.default = i) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(0), - c = r(u), - f = n(8), - h = r(f), - p = '\ufeff', - d = (function (t) { - function e(t) { - o(this, e) - var n = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return ( - (n.contentNode = document.createElement('span')), - n.contentNode.setAttribute('contenteditable', !1), - [].slice.call(n.domNode.childNodes).forEach(function (t) { - n.contentNode.appendChild(t) - }), - (n.leftGuard = document.createTextNode(p)), - (n.rightGuard = document.createTextNode(p)), - n.domNode.appendChild(n.leftGuard), - n.domNode.appendChild(n.contentNode), - n.domNode.appendChild(n.rightGuard), - n - ) - } - return ( - l(e, t), - a(e, [ - { - key: 'index', - value: function (t, n) { - return t === this.leftGuard - ? 0 - : t === this.rightGuard - ? 1 - : s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'index', - this - ).call(this, t, n) - }, - }, - { - key: 'restore', - value: function (t) { - var e = void 0, - n = void 0, - r = t.data.split(p).join('') - if (t === this.leftGuard) - if (this.prev instanceof h.default) { - var o = this.prev.length() - this.prev.insertAt(o, r), - (e = { - startNode: this.prev.domNode, - startOffset: o + r.length, - }) - } else - (n = document.createTextNode(r)), - this.parent.insertBefore(c.default.create(n), this), - (e = { startNode: n, startOffset: r.length }) - else - t === this.rightGuard && - (this.next instanceof h.default - ? (this.next.insertAt(0, r), - (e = { - startNode: this.next.domNode, - startOffset: r.length, - })) - : ((n = document.createTextNode(r)), - this.parent.insertBefore( - c.default.create(n), - this.next - ), - (e = { startNode: n, startOffset: r.length }))) - return (t.data = p), e - }, - }, - { - key: 'update', - value: function (t, e) { - var n = this - t.forEach(function (t) { - if ( - 'characterData' === t.type && - (t.target === n.leftGuard || t.target === n.rightGuard) - ) { - var r = n.restore(t.target) - r && (e.range = r) - } - }) - }, - }, - ]), - e - ) - })(c.default.Embed) - e.default = d - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.AlignStyle = e.AlignClass = e.AlignAttribute = void 0) - var r = n(0), - o = (function (t) { - return t && t.__esModule ? t : { default: t } - })(r), - i = { - scope: o.default.Scope.BLOCK, - whitelist: ['right', 'center', 'justify'], - }, - l = new o.default.Attributor.Attribute('align', 'align', i), - a = new o.default.Attributor.Class('align', 'ql-align', i), - s = new o.default.Attributor.Style('align', 'text-align', i) - ;(e.AlignAttribute = l), (e.AlignClass = a), (e.AlignStyle = s) - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.BackgroundStyle = e.BackgroundClass = void 0) - var r = n(0), - o = (function (t) { - return t && t.__esModule ? t : { default: t } - })(r), - i = n(24), - l = new o.default.Attributor.Class('background', 'ql-bg', { - scope: o.default.Scope.INLINE, - }), - a = new i.ColorAttributor('background', 'background-color', { - scope: o.default.Scope.INLINE, - }) - ;(e.BackgroundClass = l), (e.BackgroundStyle = a) - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.DirectionStyle = e.DirectionClass = e.DirectionAttribute = void 0) - var r = n(0), - o = (function (t) { - return t && t.__esModule ? t : { default: t } - })(r), - i = { scope: o.default.Scope.BLOCK, whitelist: ['rtl'] }, - l = new o.default.Attributor.Attribute('direction', 'dir', i), - a = new o.default.Attributor.Class('direction', 'ql-direction', i), - s = new o.default.Attributor.Style('direction', 'direction', i) - ;(e.DirectionAttribute = l), - (e.DirectionClass = a), - (e.DirectionStyle = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.FontClass = e.FontStyle = void 0) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(0), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = { - scope: u.default.Scope.INLINE, - whitelist: ['serif', 'monospace'], - }, - f = new u.default.Attributor.Class('font', 'ql-font', c), - h = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l(e, [ - { - key: 'value', - value: function (t) { - return a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'value', - this - ) - .call(this, t) - .replace(/["']/g, '') - }, - }, - ]), - e - ) - })(u.default.Attributor.Style), - p = new h('font', 'font-family', c) - ;(e.FontStyle = p), (e.FontClass = f) - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.SizeStyle = e.SizeClass = void 0) - var r = n(0), - o = (function (t) { - return t && t.__esModule ? t : { default: t } - })(r), - i = new o.default.Attributor.Class('size', 'ql-size', { - scope: o.default.Scope.INLINE, - whitelist: ['small', 'large', 'huge'], - }), - l = new o.default.Attributor.Style('size', 'font-size', { - scope: o.default.Scope.INLINE, - whitelist: ['10px', '18px', '32px'], - }) - ;(e.SizeClass = i), (e.SizeStyle = l) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(5), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l( - e, - [ - { - key: 'optimize', - value: function (t) { - a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t), - this.domNode.tagName !== this.statics.tagName[0] && - this.replaceWith(this.statics.blotName) - }, - }, - ], - [ - { - key: 'create', - value: function () { - return a( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this) - }, - }, - { - key: 'formats', - value: function () { - return !0 - }, - }, - ] - ), - e - ) - })(u.default) - ;(c.blotName = 'bold'), (c.tagName = ['STRONG', 'B']), (e.default = c) - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(16), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e(t, n) { - r(this, e) - var i = o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return ( - (i.label.innerHTML = n), - i.container.classList.add('ql-color-picker'), - [].slice - .call(i.container.querySelectorAll('.ql-picker-item'), 0, 7) - .forEach(function (t) { - t.classList.add('ql-primary') - }), - i - ) - } - return ( - i(e, t), - l(e, [ - { - key: 'buildItem', - value: function (t) { - var n = a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'buildItem', - this - ).call(this, t) - return ( - (n.style.backgroundColor = t.getAttribute('value') || ''), n - ) - }, - }, - { - key: 'selectItem', - value: function (t, n) { - a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'selectItem', - this - ).call(this, t, n) - var r = this.label.querySelector('.ql-color-label'), - o = t ? t.getAttribute('data-value') || '' : '' - r && - ('line' === r.tagName - ? (r.style.stroke = o) - : (r.style.fill = o)) - }, - }, - ]), - e - ) - })(u.default) - e.default = c - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(16), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e(t, n) { - r(this, e) - var i = o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return ( - i.container.classList.add('ql-icon-picker'), - [].forEach.call( - i.container.querySelectorAll('.ql-picker-item'), - function (t) { - t.innerHTML = n[t.getAttribute('data-value') || ''] - } - ), - (i.defaultItem = i.container.querySelector('.ql-selected')), - i.selectItem(i.defaultItem), - i - ) - } - return ( - i(e, t), - l(e, [ - { - key: 'selectItem', - value: function (t, n) { - a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'selectItem', - this - ).call(this, t, n), - (t = t || this.defaultItem), - (this.label.innerHTML = t.innerHTML) - }, - }, - ]), - e - ) - })(u.default) - e.default = c - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - i = (function () { - function t(e, n) { - var o = this - r(this, t), - (this.quill = e), - (this.boundsContainer = n || document.body), - (this.root = e.addContainer('ql-tooltip')), - (this.root.innerHTML = this.constructor.TEMPLATE), - this.quill.root === this.quill.scrollingContainer && - this.quill.root.addEventListener('scroll', function () { - o.root.style.marginTop = -1 * o.quill.root.scrollTop + 'px' - }), - this.hide() - } - return ( - o(t, [ - { - key: 'hide', - value: function () { - this.root.classList.add('ql-hidden') - }, - }, - { - key: 'position', - value: function (t) { - var e = t.left + t.width / 2 - this.root.offsetWidth / 2, - n = t.bottom + this.quill.root.scrollTop - ;(this.root.style.left = e + 'px'), - (this.root.style.top = n + 'px'), - this.root.classList.remove('ql-flip') - var r = this.boundsContainer.getBoundingClientRect(), - o = this.root.getBoundingClientRect(), - i = 0 - if ( - (o.right > r.right && - ((i = r.right - o.right), - (this.root.style.left = e + i + 'px')), - o.left < r.left && - ((i = r.left - o.left), - (this.root.style.left = e + i + 'px')), - o.bottom > r.bottom) - ) { - var l = o.bottom - o.top, - a = t.bottom - t.top + l - ;(this.root.style.top = n - a + 'px'), - this.root.classList.add('ql-flip') - } - return i - }, - }, - { - key: 'show', - value: function () { - this.root.classList.remove('ql-editing'), - this.root.classList.remove('ql-hidden') - }, - }, - ]), - t - ) - })() - e.default = i - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function a(t) { - var e = - t.match( - /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/ - ) || - t.match( - /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/ - ) - return e - ? (e[1] || 'https') + - '://www.youtube.com/embed/' + - e[2] + - '?showinfo=0' - : (e = t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) - ? (e[1] || 'https') + '://player.vimeo.com/video/' + e[2] + '/' - : t - } - function s(t, e) { - var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] - e.forEach(function (e) { - var r = document.createElement('option') - e === n - ? r.setAttribute('selected', 'selected') - : r.setAttribute('value', e), - t.appendChild(r) - }) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.BaseTooltip = void 0) - var u = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - c = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - f = n(2), - h = r(f), - p = n(4), - d = r(p), - y = n(9), - v = r(y), - b = n(25), - g = r(b), - m = n(32), - _ = r(m), - O = n(41), - w = r(O), - x = n(42), - k = r(x), - E = n(16), - N = r(E), - j = n(43), - A = r(j), - q = [!1, 'center', 'right', 'justify'], - T = [ - '#000000', - '#e60000', - '#ff9900', - '#ffff00', - '#008a00', - '#0066cc', - '#9933ff', - '#ffffff', - '#facccc', - '#ffebcc', - '#ffffcc', - '#cce8cc', - '#cce0f5', - '#ebd6ff', - '#bbbbbb', - '#f06666', - '#ffc266', - '#ffff66', - '#66b966', - '#66a3e0', - '#c285ff', - '#888888', - '#a10000', - '#b26b00', - '#b2b200', - '#006100', - '#0047b2', - '#6b24b2', - '#444444', - '#5c0000', - '#663d00', - '#666600', - '#003700', - '#002966', - '#3d1466', - ], - P = [!1, 'serif', 'monospace'], - S = ['1', '2', '3', !1], - C = ['small', !1, 'large', 'huge'], - L = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ), - l = function e(n) { - if (!document.body.contains(t.root)) - return document.body.removeEventListener('click', e) - null == r.tooltip || - r.tooltip.root.contains(n.target) || - document.activeElement === r.tooltip.textbox || - r.quill.hasFocus() || - r.tooltip.hide(), - null != r.pickers && - r.pickers.forEach(function (t) { - t.container.contains(n.target) || t.close() - }) - } - return t.emitter.listenDOM('click', document.body, l), r - } - return ( - l(e, t), - u(e, [ - { - key: 'addModule', - value: function (t) { - var n = c( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'addModule', - this - ).call(this, t) - return 'toolbar' === t && this.extendToolbar(n), n - }, - }, - { - key: 'buildButtons', - value: function (t, e) { - t.forEach(function (t) { - ;(t.getAttribute('class') || '') - .split(/\s+/) - .forEach(function (n) { - if ( - n.startsWith('ql-') && - ((n = n.slice('ql-'.length)), null != e[n]) - ) - if ('direction' === n) - t.innerHTML = e[n][''] + e[n].rtl - else if ('string' == typeof e[n]) t.innerHTML = e[n] - else { - var r = t.value || '' - null != r && e[n][r] && (t.innerHTML = e[n][r]) - } - }) - }) - }, - }, - { - key: 'buildPickers', - value: function (t, e) { - var n = this - this.pickers = t.map(function (t) { - if (t.classList.contains('ql-align')) - return ( - null == t.querySelector('option') && s(t, q), - new k.default(t, e.align) - ) - if ( - t.classList.contains('ql-background') || - t.classList.contains('ql-color') - ) { - var n = t.classList.contains('ql-background') - ? 'background' - : 'color' - return ( - null == t.querySelector('option') && - s(t, T, 'background' === n ? '#ffffff' : '#000000'), - new w.default(t, e[n]) - ) - } - return ( - null == t.querySelector('option') && - (t.classList.contains('ql-font') - ? s(t, P) - : t.classList.contains('ql-header') - ? s(t, S) - : t.classList.contains('ql-size') && s(t, C)), - new N.default(t) - ) - }) - var r = function () { - n.pickers.forEach(function (t) { - t.update() - }) - } - this.quill.on(v.default.events.EDITOR_CHANGE, r) - }, - }, - ]), - e - ) - })(_.default) - L.DEFAULTS = (0, h.default)(!0, {}, _.default.DEFAULTS, { - modules: { - toolbar: { - handlers: { - formula: function () { - this.quill.theme.tooltip.edit('formula') - }, - image: function () { - var t = this, - e = this.container.querySelector('input.ql-image[type=file]') - null == e && - ((e = document.createElement('input')), - e.setAttribute('type', 'file'), - e.setAttribute( - 'accept', - 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon' - ), - e.classList.add('ql-image'), - e.addEventListener('change', function () { - if (null != e.files && null != e.files[0]) { - var n = new FileReader() - ;(n.onload = function (n) { - var r = t.quill.getSelection(!0) - t.quill.updateContents( - new d.default() - .retain(r.index) - .delete(r.length) - .insert({ image: n.target.result }), - v.default.sources.USER - ), - t.quill.setSelection( - r.index + 1, - v.default.sources.SILENT - ), - (e.value = '') - }), - n.readAsDataURL(e.files[0]) - } - }), - this.container.appendChild(e)), - e.click() - }, - video: function () { - this.quill.theme.tooltip.edit('video') - }, - }, - }, - }, - }) - var M = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return ( - (r.textbox = r.root.querySelector('input[type="text"]')), - r.listen(), - r - ) - } - return ( - l(e, t), - u(e, [ - { - key: 'listen', - value: function () { - var t = this - this.textbox.addEventListener('keydown', function (e) { - g.default.match(e, 'enter') - ? (t.save(), e.preventDefault()) - : g.default.match(e, 'escape') && - (t.cancel(), e.preventDefault()) - }) - }, - }, - { - key: 'cancel', - value: function () { - this.hide() - }, - }, - { - key: 'edit', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 'link', - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : null - this.root.classList.remove('ql-hidden'), - this.root.classList.add('ql-editing'), - null != e - ? (this.textbox.value = e) - : t !== this.root.getAttribute('data-mode') && - (this.textbox.value = ''), - this.position( - this.quill.getBounds(this.quill.selection.savedRange) - ), - this.textbox.select(), - this.textbox.setAttribute( - 'placeholder', - this.textbox.getAttribute('data-' + t) || '' - ), - this.root.setAttribute('data-mode', t) - }, - }, - { - key: 'restoreFocus', - value: function () { - var t = this.quill.scrollingContainer.scrollTop - this.quill.focus(), - (this.quill.scrollingContainer.scrollTop = t) - }, - }, - { - key: 'save', - value: function () { - var t = this.textbox.value - switch (this.root.getAttribute('data-mode')) { - case 'link': - var e = this.quill.root.scrollTop - this.linkRange - ? (this.quill.formatText( - this.linkRange, - 'link', - t, - v.default.sources.USER - ), - delete this.linkRange) - : (this.restoreFocus(), - this.quill.format('link', t, v.default.sources.USER)), - (this.quill.root.scrollTop = e) - break - case 'video': - t = a(t) - case 'formula': - if (!t) break - var n = this.quill.getSelection(!0) - if (null != n) { - var r = n.index + n.length - this.quill.insertEmbed( - r, - this.root.getAttribute('data-mode'), - t, - v.default.sources.USER - ), - 'formula' === this.root.getAttribute('data-mode') && - this.quill.insertText( - r + 1, - ' ', - v.default.sources.USER - ), - this.quill.setSelection(r + 2, v.default.sources.USER) - } - } - ;(this.textbox.value = ''), this.hide() - }, - }, - ]), - e - ) - })(A.default) - ;(e.BaseTooltip = M), (e.default = L) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(46), - i = r(o), - l = n(34), - a = n(36), - s = n(62), - u = n(63), - c = r(u), - f = n(64), - h = r(f), - p = n(65), - d = r(p), - y = n(35), - v = n(24), - b = n(37), - g = n(38), - m = n(39), - _ = r(m), - O = n(66), - w = r(O), - x = n(15), - k = r(x), - E = n(67), - N = r(E), - j = n(68), - A = r(j), - q = n(69), - T = r(q), - P = n(70), - S = r(P), - C = n(71), - L = r(C), - M = n(13), - R = r(M), - I = n(72), - B = r(I), - D = n(73), - U = r(D), - F = n(74), - H = r(F), - K = n(26), - z = r(K), - V = n(16), - Z = r(V), - W = n(41), - G = r(W), - Y = n(42), - X = r(Y), - $ = n(43), - Q = r($), - J = n(107), - tt = r(J), - et = n(108), - nt = r(et) - i.default.register( - { - 'attributors/attribute/direction': a.DirectionAttribute, - 'attributors/class/align': l.AlignClass, - 'attributors/class/background': y.BackgroundClass, - 'attributors/class/color': v.ColorClass, - 'attributors/class/direction': a.DirectionClass, - 'attributors/class/font': b.FontClass, - 'attributors/class/size': g.SizeClass, - 'attributors/style/align': l.AlignStyle, - 'attributors/style/background': y.BackgroundStyle, - 'attributors/style/color': v.ColorStyle, - 'attributors/style/direction': a.DirectionStyle, - 'attributors/style/font': b.FontStyle, - 'attributors/style/size': g.SizeStyle, - }, - !0 - ), - i.default.register( - { - 'formats/align': l.AlignClass, - 'formats/direction': a.DirectionClass, - 'formats/indent': s.IndentClass, - 'formats/background': y.BackgroundStyle, - 'formats/color': v.ColorStyle, - 'formats/font': b.FontClass, - 'formats/size': g.SizeClass, - 'formats/blockquote': c.default, - 'formats/code-block': R.default, - 'formats/header': h.default, - 'formats/list': d.default, - 'formats/bold': _.default, - 'formats/code': M.Code, - 'formats/italic': w.default, - 'formats/link': k.default, - 'formats/script': N.default, - 'formats/strike': A.default, - 'formats/underline': T.default, - 'formats/image': S.default, - 'formats/video': L.default, - 'formats/list/item': p.ListItem, - 'modules/formula': B.default, - 'modules/syntax': U.default, - 'modules/toolbar': H.default, - 'themes/bubble': tt.default, - 'themes/snow': nt.default, - 'ui/icons': z.default, - 'ui/picker': Z.default, - 'ui/icon-picker': X.default, - 'ui/color-picker': G.default, - 'ui/tooltip': Q.default, - }, - !0 - ), - (e.default = i.default) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(0), - i = r(o), - l = n(6), - a = r(l), - s = n(3), - u = r(s), - c = n(14), - f = r(c), - h = n(23), - p = r(h), - d = n(31), - y = r(d), - v = n(33), - b = r(v), - g = n(5), - m = r(g), - _ = n(59), - O = r(_), - w = n(8), - x = r(w), - k = n(60), - E = r(k), - N = n(61), - j = r(N), - A = n(25), - q = r(A) - a.default.register({ - 'blots/block': u.default, - 'blots/block/embed': s.BlockEmbed, - 'blots/break': f.default, - 'blots/container': p.default, - 'blots/cursor': y.default, - 'blots/embed': b.default, - 'blots/inline': m.default, - 'blots/scroll': O.default, - 'blots/text': x.default, - 'modules/clipboard': E.default, - 'modules/history': j.default, - 'modules/keyboard': q.default, - }), - i.default.register( - u.default, - f.default, - y.default, - m.default, - O.default, - x.default - ), - (e.default = a.default) - }, - function (t, e, n) { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = (function () { - function t() { - ;(this.head = this.tail = null), (this.length = 0) - } - return ( - (t.prototype.append = function () { - for (var t = [], e = 0; e < arguments.length; e++) - t[e] = arguments[e] - this.insertBefore(t[0], null), - t.length > 1 && this.append.apply(this, t.slice(1)) - }), - (t.prototype.contains = function (t) { - for (var e, n = this.iterator(); (e = n()); ) if (e === t) return !0 - return !1 - }), - (t.prototype.insertBefore = function (t, e) { - t && - ((t.next = e), - null != e - ? ((t.prev = e.prev), - null != e.prev && (e.prev.next = t), - (e.prev = t), - e === this.head && (this.head = t)) - : null != this.tail - ? ((this.tail.next = t), (t.prev = this.tail), (this.tail = t)) - : ((t.prev = null), (this.head = this.tail = t)), - (this.length += 1)) - }), - (t.prototype.offset = function (t) { - for (var e = 0, n = this.head; null != n; ) { - if (n === t) return e - ;(e += n.length()), (n = n.next) - } - return -1 - }), - (t.prototype.remove = function (t) { - this.contains(t) && - (null != t.prev && (t.prev.next = t.next), - null != t.next && (t.next.prev = t.prev), - t === this.head && (this.head = t.next), - t === this.tail && (this.tail = t.prev), - (this.length -= 1)) - }), - (t.prototype.iterator = function (t) { - return ( - void 0 === t && (t = this.head), - function () { - var e = t - return null != t && (t = t.next), e - } - ) - }), - (t.prototype.find = function (t, e) { - void 0 === e && (e = !1) - for (var n, r = this.iterator(); (n = r()); ) { - var o = n.length() - if ( - t < o || - (e && t === o && (null == n.next || 0 !== n.next.length())) - ) - return [n, t] - t -= o - } - return [null, 0] - }), - (t.prototype.forEach = function (t) { - for (var e, n = this.iterator(); (e = n()); ) t(e) - }), - (t.prototype.forEachAt = function (t, e, n) { - if (!(e <= 0)) - for ( - var r, - o = this.find(t), - i = o[0], - l = o[1], - a = t - l, - s = this.iterator(i); - (r = s()) && a < t + e; - - ) { - var u = r.length() - t > a - ? n(r, t - a, Math.min(e, a + u - t)) - : n(r, 0, Math.min(u, t + e - a)), - (a += u) - } - }), - (t.prototype.map = function (t) { - return this.reduce(function (e, n) { - return e.push(t(n)), e - }, []) - }), - (t.prototype.reduce = function (t, e) { - for (var n, r = this.iterator(); (n = r()); ) e = t(e, n) - return e - }), - t - ) - })() - e.default = r - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(17), - i = n(1), - l = { - attributes: !0, - characterData: !0, - characterDataOldValue: !0, - childList: !0, - subtree: !0, - }, - a = (function (t) { - function e(e) { - var n = t.call(this, e) || this - return ( - (n.scroll = n), - (n.observer = new MutationObserver(function (t) { - n.update(t) - })), - n.observer.observe(n.domNode, l), - n.attach(), - n - ) - } - return ( - r(e, t), - (e.prototype.detach = function () { - t.prototype.detach.call(this), this.observer.disconnect() - }), - (e.prototype.deleteAt = function (e, n) { - this.update(), - 0 === e && n === this.length() - ? this.children.forEach(function (t) { - t.remove() - }) - : t.prototype.deleteAt.call(this, e, n) - }), - (e.prototype.formatAt = function (e, n, r, o) { - this.update(), t.prototype.formatAt.call(this, e, n, r, o) - }), - (e.prototype.insertAt = function (e, n, r) { - this.update(), t.prototype.insertAt.call(this, e, n, r) - }), - (e.prototype.optimize = function (e, n) { - var r = this - void 0 === e && (e = []), - void 0 === n && (n = {}), - t.prototype.optimize.call(this, n) - for ( - var l = [].slice.call(this.observer.takeRecords()); - l.length > 0; - - ) - e.push(l.pop()) - for ( - var a = function (t, e) { - void 0 === e && (e = !0), - null != t && - t !== r && - null != t.domNode.parentNode && - (null == t.domNode[i.DATA_KEY].mutations && - (t.domNode[i.DATA_KEY].mutations = []), - e && a(t.parent)) - }, - s = function (t) { - null != t.domNode[i.DATA_KEY] && - null != t.domNode[i.DATA_KEY].mutations && - (t instanceof o.default && t.children.forEach(s), - t.optimize(n)) - }, - u = e, - c = 0; - u.length > 0; - c += 1 - ) { - if (c >= 100) - throw new Error( - '[Parchment] Maximum optimize iterations reached' - ) - for ( - u.forEach(function (t) { - var e = i.find(t.target, !0) - null != e && - (e.domNode === t.target && - ('childList' === t.type - ? (a(i.find(t.previousSibling, !1)), - [].forEach.call(t.addedNodes, function (t) { - var e = i.find(t, !1) - a(e, !1), - e instanceof o.default && - e.children.forEach(function (t) { - a(t, !1) - }) - })) - : 'attributes' === t.type && a(e.prev)), - a(e)) - }), - this.children.forEach(s), - u = [].slice.call(this.observer.takeRecords()), - l = u.slice(); - l.length > 0; - - ) - e.push(l.pop()) - } - }), - (e.prototype.update = function (e, n) { - var r = this - void 0 === n && (n = {}), - (e = e || this.observer.takeRecords()), - e - .map(function (t) { - var e = i.find(t.target, !0) - return null == e - ? null - : null == e.domNode[i.DATA_KEY].mutations - ? ((e.domNode[i.DATA_KEY].mutations = [t]), e) - : (e.domNode[i.DATA_KEY].mutations.push(t), null) - }) - .forEach(function (t) { - null != t && - t !== r && - null != t.domNode[i.DATA_KEY] && - t.update(t.domNode[i.DATA_KEY].mutations || [], n) - }), - null != this.domNode[i.DATA_KEY].mutations && - t.prototype.update.call( - this, - this.domNode[i.DATA_KEY].mutations, - n - ), - this.optimize(e, n) - }), - (e.blotName = 'scroll'), - (e.defaultChild = 'block'), - (e.scope = i.Scope.BLOCK_BLOT), - (e.tagName = 'DIV'), - e - ) - })(o.default) - e.default = a - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (Object.keys(t).length !== Object.keys(e).length) return !1 - for (var n in t) if (t[n] !== e[n]) return !1 - return !0 - } - var o = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var i = n(18), - l = n(1), - a = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - o(e, t), - (e.formats = function (n) { - if (n.tagName !== e.tagName) return t.formats.call(this, n) - }), - (e.prototype.format = function (n, r) { - var o = this - n !== this.statics.blotName || r - ? t.prototype.format.call(this, n, r) - : (this.children.forEach(function (t) { - t instanceof i.default || (t = t.wrap(e.blotName, !0)), - o.attributes.copy(t) - }), - this.unwrap()) - }), - (e.prototype.formatAt = function (e, n, r, o) { - if (null != this.formats()[r] || l.query(r, l.Scope.ATTRIBUTE)) { - this.isolate(e, n).format(r, o) - } else t.prototype.formatAt.call(this, e, n, r, o) - }), - (e.prototype.optimize = function (n) { - t.prototype.optimize.call(this, n) - var o = this.formats() - if (0 === Object.keys(o).length) return this.unwrap() - var i = this.next - i instanceof e && - i.prev === this && - r(o, i.formats()) && - (i.moveChildren(this), i.remove()) - }), - (e.blotName = 'inline'), - (e.scope = l.Scope.INLINE_BLOT), - (e.tagName = 'SPAN'), - e - ) - })(i.default) - e.default = a - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(18), - i = n(1), - l = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - r(e, t), - (e.formats = function (n) { - var r = i.query(e.blotName).tagName - if (n.tagName !== r) return t.formats.call(this, n) - }), - (e.prototype.format = function (n, r) { - null != i.query(n, i.Scope.BLOCK) && - (n !== this.statics.blotName || r - ? t.prototype.format.call(this, n, r) - : this.replaceWith(e.blotName)) - }), - (e.prototype.formatAt = function (e, n, r, o) { - null != i.query(r, i.Scope.BLOCK) - ? this.format(r, o) - : t.prototype.formatAt.call(this, e, n, r, o) - }), - (e.prototype.insertAt = function (e, n, r) { - if (null == r || null != i.query(n, i.Scope.INLINE)) - t.prototype.insertAt.call(this, e, n, r) - else { - var o = this.split(e), - l = i.create(n, r) - o.parent.insertBefore(l, o) - } - }), - (e.prototype.update = function (e, n) { - navigator.userAgent.match(/Trident/) - ? this.build() - : t.prototype.update.call(this, e, n) - }), - (e.blotName = 'block'), - (e.scope = i.Scope.BLOCK_BLOT), - (e.tagName = 'P'), - e - ) - })(o.default) - e.default = l - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(19), - i = (function (t) { - function e() { - return (null !== t && t.apply(this, arguments)) || this - } - return ( - r(e, t), - (e.formats = function (t) {}), - (e.prototype.format = function (e, n) { - t.prototype.formatAt.call(this, 0, this.length(), e, n) - }), - (e.prototype.formatAt = function (e, n, r, o) { - 0 === e && n === this.length() - ? this.format(r, o) - : t.prototype.formatAt.call(this, e, n, r, o) - }), - (e.prototype.formats = function () { - return this.statics.formats(this.domNode) - }), - e - ) - })(o.default) - e.default = i - }, - function (t, e, n) { - 'use strict' - var r = - (this && this.__extends) || - (function () { - var t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e - }) || - function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]) - } - return function (e, n) { - function r() { - this.constructor = e - } - t(e, n), - (e.prototype = - null === n - ? Object.create(n) - : ((r.prototype = n.prototype), new r())) - } - })() - Object.defineProperty(e, '__esModule', { value: !0 }) - var o = n(19), - i = n(1), - l = (function (t) { - function e(e) { - var n = t.call(this, e) || this - return (n.text = n.statics.value(n.domNode)), n - } - return ( - r(e, t), - (e.create = function (t) { - return document.createTextNode(t) - }), - (e.value = function (t) { - var e = t.data - return e.normalize && (e = e.normalize()), e - }), - (e.prototype.deleteAt = function (t, e) { - this.domNode.data = this.text = - this.text.slice(0, t) + this.text.slice(t + e) - }), - (e.prototype.index = function (t, e) { - return this.domNode === t ? e : -1 - }), - (e.prototype.insertAt = function (e, n, r) { - null == r - ? ((this.text = this.text.slice(0, e) + n + this.text.slice(e)), - (this.domNode.data = this.text)) - : t.prototype.insertAt.call(this, e, n, r) - }), - (e.prototype.length = function () { - return this.text.length - }), - (e.prototype.optimize = function (n) { - t.prototype.optimize.call(this, n), - (this.text = this.statics.value(this.domNode)), - 0 === this.text.length - ? this.remove() - : this.next instanceof e && - this.next.prev === this && - (this.insertAt(this.length(), this.next.value()), - this.next.remove()) - }), - (e.prototype.position = function (t, e) { - return void 0 === e && (e = !1), [this.domNode, t] - }), - (e.prototype.split = function (t, e) { - if ((void 0 === e && (e = !1), !e)) { - if (0 === t) return this - if (t === this.length()) return this.next - } - var n = i.create(this.domNode.splitText(t)) - return ( - this.parent.insertBefore(n, this.next), - (this.text = this.statics.value(this.domNode)), - n - ) - }), - (e.prototype.update = function (t, e) { - var n = this - t.some(function (t) { - return 'characterData' === t.type && t.target === n.domNode - }) && (this.text = this.statics.value(this.domNode)) - }), - (e.prototype.value = function () { - return this.text - }), - (e.blotName = 'text'), - (e.scope = i.Scope.INLINE_BLOT), - e - ) - })(o.default) - e.default = l - }, - function (t, e, n) { - 'use strict' - var r = document.createElement('div') - if ( - (r.classList.toggle('test-class', !1), - r.classList.contains('test-class')) - ) { - var o = DOMTokenList.prototype.toggle - DOMTokenList.prototype.toggle = function (t, e) { - return arguments.length > 1 && !this.contains(t) == !e - ? e - : o.call(this, t) - } - } - String.prototype.startsWith || - (String.prototype.startsWith = function (t, e) { - return (e = e || 0), this.substr(e, t.length) === t - }), - String.prototype.endsWith || - (String.prototype.endsWith = function (t, e) { - var n = this.toString() - ;('number' != typeof e || - !isFinite(e) || - Math.floor(e) !== e || - e > n.length) && - (e = n.length), - (e -= t.length) - var r = n.indexOf(t, e) - return -1 !== r && r === e - }), - Array.prototype.find || - Object.defineProperty(Array.prototype, 'find', { - value: function (t) { - if (null === this) - throw new TypeError( - 'Array.prototype.find called on null or undefined' - ) - if ('function' != typeof t) - throw new TypeError('predicate must be a function') - for ( - var e, - n = Object(this), - r = n.length >>> 0, - o = arguments[1], - i = 0; - i < r; - i++ - ) - if (((e = n[i]), t.call(o, e, i, n))) return e - }, - }), - document.addEventListener('DOMContentLoaded', function () { - document.execCommand('enableObjectResizing', !1, !1), - document.execCommand('autoUrlDetect', !1, !1) - }) - }, - function (t, e) { - function n(t, e, n) { - if (t == e) return t ? [[v, t]] : [] - ;(n < 0 || t.length < n) && (n = null) - var o = l(t, e), - i = t.substring(0, o) - ;(t = t.substring(o)), (e = e.substring(o)), (o = a(t, e)) - var s = t.substring(t.length - o) - ;(t = t.substring(0, t.length - o)), (e = e.substring(0, e.length - o)) - var c = r(t, e) - return ( - i && c.unshift([v, i]), - s && c.push([v, s]), - u(c), - null != n && (c = f(c, n)), - (c = h(c)) - ) - } - function r(t, e) { - var r - if (!t) return [[y, e]] - if (!e) return [[d, t]] - var i = t.length > e.length ? t : e, - l = t.length > e.length ? e : t, - a = i.indexOf(l) - if (-1 != a) - return ( - (r = [ - [y, i.substring(0, a)], - [v, l], - [y, i.substring(a + l.length)], - ]), - t.length > e.length && (r[0][0] = r[2][0] = d), - r - ) - if (1 == l.length) - return [ - [d, t], - [y, e], - ] - var u = s(t, e) - if (u) { - var c = u[0], - f = u[1], - h = u[2], - p = u[3], - b = u[4], - g = n(c, h), - m = n(f, p) - return g.concat([[v, b]], m) - } - return o(t, e) - } - function o(t, e) { - for ( - var n = t.length, - r = e.length, - o = Math.ceil((n + r) / 2), - l = o, - a = 2 * o, - s = new Array(a), - u = new Array(a), - c = 0; - c < a; - c++ - ) - (s[c] = -1), (u[c] = -1) - ;(s[l + 1] = 0), (u[l + 1] = 0) - for ( - var f = n - r, h = f % 2 != 0, p = 0, v = 0, b = 0, g = 0, m = 0; - m < o; - m++ - ) { - for (var _ = -m + p; _ <= m - v; _ += 2) { - var O, - w = l + _ - O = - _ == -m || (_ != m && s[w - 1] < s[w + 1]) - ? s[w + 1] - : s[w - 1] + 1 - for (var x = O - _; O < n && x < r && t.charAt(O) == e.charAt(x); ) - O++, x++ - if (((s[w] = O), O > n)) v += 2 - else if (x > r) p += 2 - else if (h) { - var k = l + f - _ - if (k >= 0 && k < a && -1 != u[k]) { - var E = n - u[k] - if (O >= E) return i(t, e, O, x) - } - } - } - for (var N = -m + b; N <= m - g; N += 2) { - var E, - k = l + N - E = - N == -m || (N != m && u[k - 1] < u[k + 1]) - ? u[k + 1] - : u[k - 1] + 1 - for ( - var j = E - N; - E < n && j < r && t.charAt(n - E - 1) == e.charAt(r - j - 1); - - ) - E++, j++ - if (((u[k] = E), E > n)) g += 2 - else if (j > r) b += 2 - else if (!h) { - var w = l + f - N - if (w >= 0 && w < a && -1 != s[w]) { - var O = s[w], - x = l + O - w - if (((E = n - E), O >= E)) return i(t, e, O, x) - } - } - } - } - return [ - [d, t], - [y, e], - ] - } - function i(t, e, r, o) { - var i = t.substring(0, r), - l = e.substring(0, o), - a = t.substring(r), - s = e.substring(o), - u = n(i, l), - c = n(a, s) - return u.concat(c) - } - function l(t, e) { - if (!t || !e || t.charAt(0) != e.charAt(0)) return 0 - for (var n = 0, r = Math.min(t.length, e.length), o = r, i = 0; n < o; ) - t.substring(i, o) == e.substring(i, o) ? ((n = o), (i = n)) : (r = o), - (o = Math.floor((r - n) / 2 + n)) - return o - } - function a(t, e) { - if (!t || !e || t.charAt(t.length - 1) != e.charAt(e.length - 1)) - return 0 - for (var n = 0, r = Math.min(t.length, e.length), o = r, i = 0; n < o; ) - t.substring(t.length - o, t.length - i) == - e.substring(e.length - o, e.length - i) - ? ((n = o), (i = n)) - : (r = o), - (o = Math.floor((r - n) / 2 + n)) - return o - } - function s(t, e) { - function n(t, e, n) { - for ( - var r, - o, - i, - s, - u = t.substring(n, n + Math.floor(t.length / 4)), - c = -1, - f = ''; - -1 != (c = e.indexOf(u, c + 1)); - - ) { - var h = l(t.substring(n), e.substring(c)), - p = a(t.substring(0, n), e.substring(0, c)) - f.length < p + h && - ((f = e.substring(c - p, c) + e.substring(c, c + h)), - (r = t.substring(0, n - p)), - (o = t.substring(n + h)), - (i = e.substring(0, c - p)), - (s = e.substring(c + h))) - } - return 2 * f.length >= t.length ? [r, o, i, s, f] : null - } - var r = t.length > e.length ? t : e, - o = t.length > e.length ? e : t - if (r.length < 4 || 2 * o.length < r.length) return null - var i, - s = n(r, o, Math.ceil(r.length / 4)), - u = n(r, o, Math.ceil(r.length / 2)) - if (!s && !u) return null - i = u ? (s && s[4].length > u[4].length ? s : u) : s - var c, f, h, p - return ( - t.length > e.length - ? ((c = i[0]), (f = i[1]), (h = i[2]), (p = i[3])) - : ((h = i[0]), (p = i[1]), (c = i[2]), (f = i[3])), - [c, f, h, p, i[4]] - ) - } - function u(t) { - t.push([v, '']) - for (var e, n = 0, r = 0, o = 0, i = '', s = ''; n < t.length; ) - switch (t[n][0]) { - case y: - o++, (s += t[n][1]), n++ - break - case d: - r++, (i += t[n][1]), n++ - break - case v: - r + o > 1 - ? (0 !== r && - 0 !== o && - ((e = l(s, i)), - 0 !== e && - (n - r - o > 0 && t[n - r - o - 1][0] == v - ? (t[n - r - o - 1][1] += s.substring(0, e)) - : (t.splice(0, 0, [v, s.substring(0, e)]), n++), - (s = s.substring(e)), - (i = i.substring(e))), - 0 !== (e = a(s, i)) && - ((t[n][1] = s.substring(s.length - e) + t[n][1]), - (s = s.substring(0, s.length - e)), - (i = i.substring(0, i.length - e)))), - 0 === r - ? t.splice(n - o, r + o, [y, s]) - : 0 === o - ? t.splice(n - r, r + o, [d, i]) - : t.splice(n - r - o, r + o, [d, i], [y, s]), - (n = n - r - o + (r ? 1 : 0) + (o ? 1 : 0) + 1)) - : 0 !== n && t[n - 1][0] == v - ? ((t[n - 1][1] += t[n][1]), t.splice(n, 1)) - : n++, - (o = 0), - (r = 0), - (i = ''), - (s = '') - } - '' === t[t.length - 1][1] && t.pop() - var c = !1 - for (n = 1; n < t.length - 1; ) - t[n - 1][0] == v && - t[n + 1][0] == v && - (t[n][1].substring(t[n][1].length - t[n - 1][1].length) == - t[n - 1][1] - ? ((t[n][1] = - t[n - 1][1] + - t[n][1].substring(0, t[n][1].length - t[n - 1][1].length)), - (t[n + 1][1] = t[n - 1][1] + t[n + 1][1]), - t.splice(n - 1, 1), - (c = !0)) - : t[n][1].substring(0, t[n + 1][1].length) == t[n + 1][1] && - ((t[n - 1][1] += t[n + 1][1]), - (t[n][1] = t[n][1].substring(t[n + 1][1].length) + t[n + 1][1]), - t.splice(n + 1, 1), - (c = !0))), - n++ - c && u(t) - } - function c(t, e) { - if (0 === e) return [v, t] - for (var n = 0, r = 0; r < t.length; r++) { - var o = t[r] - if (o[0] === d || o[0] === v) { - var i = n + o[1].length - if (e === i) return [r + 1, t] - if (e < i) { - t = t.slice() - var l = e - n, - a = [o[0], o[1].slice(0, l)], - s = [o[0], o[1].slice(l)] - return t.splice(r, 1, a, s), [r + 1, t] - } - n = i - } - } - throw new Error('cursor_pos is out of bounds!') - } - function f(t, e) { - var n = c(t, e), - r = n[1], - o = n[0], - i = r[o], - l = r[o + 1] - if (null == i) return t - if (i[0] !== v) return t - if (null != l && i[1] + l[1] === l[1] + i[1]) - return r.splice(o, 2, l, i), p(r, o, 2) - if (null != l && 0 === l[1].indexOf(i[1])) { - r.splice(o, 2, [l[0], i[1]], [0, i[1]]) - var a = l[1].slice(i[1].length) - return a.length > 0 && r.splice(o + 2, 0, [l[0], a]), p(r, o, 3) - } - return t - } - function h(t) { - for ( - var e = !1, - n = function (t) { - return t.charCodeAt(0) >= 56320 && t.charCodeAt(0) <= 57343 - }, - r = 2; - r < t.length; - r += 1 - ) - t[r - 2][0] === v && - (function (t) { - return ( - t.charCodeAt(t.length - 1) >= 55296 && - t.charCodeAt(t.length - 1) <= 56319 - ) - })(t[r - 2][1]) && - t[r - 1][0] === d && - n(t[r - 1][1]) && - t[r][0] === y && - n(t[r][1]) && - ((e = !0), - (t[r - 1][1] = t[r - 2][1].slice(-1) + t[r - 1][1]), - (t[r][1] = t[r - 2][1].slice(-1) + t[r][1]), - (t[r - 2][1] = t[r - 2][1].slice(0, -1))) - if (!e) return t - for (var o = [], r = 0; r < t.length; r += 1) - t[r][1].length > 0 && o.push(t[r]) - return o - } - function p(t, e, n) { - for (var r = e + n - 1; r >= 0 && r >= e - 1; r--) - if (r + 1 < t.length) { - var o = t[r], - i = t[r + 1] - o[0] === i[1] && t.splice(r, 2, [o[0], o[1] + i[1]]) - } - return t - } - var d = -1, - y = 1, - v = 0, - b = n - ;(b.INSERT = y), (b.DELETE = d), (b.EQUAL = v), (t.exports = b) - }, - function (t, e) { - function n(t) { - var e = [] - for (var n in t) e.push(n) - return e - } - ;(e = t.exports = 'function' == typeof Object.keys ? Object.keys : n), - (e.shim = n) - }, - function (t, e) { - function n(t) { - return '[object Arguments]' == Object.prototype.toString.call(t) - } - function r(t) { - return ( - (t && - 'object' == typeof t && - 'number' == typeof t.length && - Object.prototype.hasOwnProperty.call(t, 'callee') && - !Object.prototype.propertyIsEnumerable.call(t, 'callee')) || - !1 - ) - } - var o = - '[object Arguments]' == - (function () { - return Object.prototype.toString.call(arguments) - })() - ;(e = t.exports = o ? n : r), (e.supported = n), (e.unsupported = r) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - return Object.keys(e).reduce(function (n, r) { - return null == t[r] - ? n - : (e[r] === t[r] - ? (n[r] = e[r]) - : Array.isArray(e[r]) - ? e[r].indexOf(t[r]) < 0 && (n[r] = e[r].concat([t[r]])) - : (n[r] = [e[r], t[r]]), - n) - }, {}) - } - function a(t) { - return t.reduce(function (t, e) { - if (1 === e.insert) { - var n = (0, N.default)(e.attributes) - return delete n.image, t.insert({ image: e.attributes.image }, n) - } - if ( - (null == e.attributes || - (!0 !== e.attributes.list && !0 !== e.attributes.bullet) || - ((e = (0, N.default)(e)), - e.attributes.list - ? (e.attributes.list = 'ordered') - : ((e.attributes.list = 'bullet'), delete e.attributes.bullet)), - 'string' == typeof e.insert) - ) { - var r = e.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n') - return t.insert(r, e.attributes) - } - return t.push(e) - }, new h.default()) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var s = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (t) { - return typeof t - } - : function (t) { - return t && - 'function' == typeof Symbol && - t.constructor === Symbol && - t !== Symbol.prototype - ? 'symbol' - : typeof t - }, - u = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - c = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - f = n(4), - h = r(f), - p = n(20), - d = r(p), - y = n(0), - v = r(y), - b = n(13), - g = r(b), - m = n(31), - _ = r(m), - O = n(3), - w = r(O), - x = n(14), - k = r(x), - E = n(21), - N = r(E), - j = n(12), - A = r(j), - q = n(2), - T = r(q), - P = /^[ -~]*$/, - S = (function () { - function t(e) { - i(this, t), (this.scroll = e), (this.delta = this.getDelta()) - } - return ( - c(t, [ - { - key: 'applyDelta', - value: function (t) { - var e = this, - n = !1 - this.scroll.update() - var r = this.scroll.length() - return ( - this.scroll.batchStart(), - (t = a(t)), - t.reduce(function (t, o) { - var i = o.retain || o.delete || o.insert.length || 1, - l = o.attributes || {} - if (null != o.insert) { - if ('string' == typeof o.insert) { - var a = o.insert - a.endsWith('\n') && - n && - ((n = !1), (a = a.slice(0, -1))), - t >= r && !a.endsWith('\n') && (n = !0), - e.scroll.insertAt(t, a) - var c = e.scroll.line(t), - f = u(c, 2), - h = f[0], - p = f[1], - y = (0, T.default)({}, (0, O.bubbleFormats)(h)) - if (h instanceof w.default) { - var b = h.descendant(v.default.Leaf, p), - g = u(b, 1), - m = g[0] - y = (0, T.default)(y, (0, O.bubbleFormats)(m)) - } - l = d.default.attributes.diff(y, l) || {} - } else if ('object' === s(o.insert)) { - var _ = Object.keys(o.insert)[0] - if (null == _) return t - e.scroll.insertAt(t, _, o.insert[_]) - } - r += i - } - return ( - Object.keys(l).forEach(function (n) { - e.scroll.formatAt(t, i, n, l[n]) - }), - t + i - ) - }, 0), - t.reduce(function (t, n) { - return 'number' == typeof n.delete - ? (e.scroll.deleteAt(t, n.delete), t) - : t + (n.retain || n.insert.length || 1) - }, 0), - this.scroll.batchEnd(), - this.update(t) - ) - }, - }, - { - key: 'deleteText', - value: function (t, e) { - return ( - this.scroll.deleteAt(t, e), - this.update(new h.default().retain(t).delete(e)) - ) - }, - }, - { - key: 'formatLine', - value: function (t, e) { - var n = this, - r = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : {} - return ( - this.scroll.update(), - Object.keys(r).forEach(function (o) { - if (null == n.scroll.whitelist || n.scroll.whitelist[o]) { - var i = n.scroll.lines(t, Math.max(e, 1)), - l = e - i.forEach(function (e) { - var i = e.length() - if (e instanceof g.default) { - var a = t - e.offset(n.scroll), - s = e.newlineIndex(a + l) - a + 1 - e.formatAt(a, s, o, r[o]) - } else e.format(o, r[o]) - l -= i - }) - } - }), - this.scroll.optimize(), - this.update( - new h.default().retain(t).retain(e, (0, N.default)(r)) - ) - ) - }, - }, - { - key: 'formatText', - value: function (t, e) { - var n = this, - r = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : {} - return ( - Object.keys(r).forEach(function (o) { - n.scroll.formatAt(t, e, o, r[o]) - }), - this.update( - new h.default().retain(t).retain(e, (0, N.default)(r)) - ) - ) - }, - }, - { - key: 'getContents', - value: function (t, e) { - return this.delta.slice(t, t + e) - }, - }, - { - key: 'getDelta', - value: function () { - return this.scroll.lines().reduce(function (t, e) { - return t.concat(e.delta()) - }, new h.default()) - }, - }, - { - key: 'getFormat', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 0, - n = [], - r = [] - 0 === e - ? this.scroll.path(t).forEach(function (t) { - var e = u(t, 1), - o = e[0] - o instanceof w.default - ? n.push(o) - : o instanceof v.default.Leaf && r.push(o) - }) - : ((n = this.scroll.lines(t, e)), - (r = this.scroll.descendants(v.default.Leaf, t, e))) - var o = [n, r].map(function (t) { - if (0 === t.length) return {} - for ( - var e = (0, O.bubbleFormats)(t.shift()); - Object.keys(e).length > 0; - - ) { - var n = t.shift() - if (null == n) return e - e = l((0, O.bubbleFormats)(n), e) - } - return e - }) - return T.default.apply(T.default, o) - }, - }, - { - key: 'getText', - value: function (t, e) { - return this.getContents(t, e) - .filter(function (t) { - return 'string' == typeof t.insert - }) - .map(function (t) { - return t.insert - }) - .join('') - }, - }, - { - key: 'insertEmbed', - value: function (t, e, n) { - return ( - this.scroll.insertAt(t, e, n), - this.update(new h.default().retain(t).insert(o({}, e, n))) - ) - }, - }, - { - key: 'insertText', - value: function (t, e) { - var n = this, - r = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : {} - return ( - (e = e.replace(/\r\n/g, '\n').replace(/\r/g, '\n')), - this.scroll.insertAt(t, e), - Object.keys(r).forEach(function (o) { - n.scroll.formatAt(t, e.length, o, r[o]) - }), - this.update( - new h.default().retain(t).insert(e, (0, N.default)(r)) - ) - ) - }, - }, - { - key: 'isBlank', - value: function () { - if (0 == this.scroll.children.length) return !0 - if (this.scroll.children.length > 1) return !1 - var t = this.scroll.children.head - return ( - t.statics.blotName === w.default.blotName && - !(t.children.length > 1) && - t.children.head instanceof k.default - ) - }, - }, - { - key: 'removeFormat', - value: function (t, e) { - var n = this.getText(t, e), - r = this.scroll.line(t + e), - o = u(r, 2), - i = o[0], - l = o[1], - a = 0, - s = new h.default() - null != i && - ((a = - i instanceof g.default - ? i.newlineIndex(l) - l + 1 - : i.length() - l), - (s = i - .delta() - .slice(l, l + a - 1) - .insert('\n'))) - var c = this.getContents(t, e + a), - f = c.diff(new h.default().insert(n).concat(s)), - p = new h.default().retain(t).concat(f) - return this.applyDelta(p) - }, - }, - { - key: 'update', - value: function (t) { - var e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : [], - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : void 0, - r = this.delta - if ( - 1 === e.length && - 'characterData' === e[0].type && - e[0].target.data.match(P) && - v.default.find(e[0].target) - ) { - var o = v.default.find(e[0].target), - i = (0, O.bubbleFormats)(o), - l = o.offset(this.scroll), - a = e[0].oldValue.replace(_.default.CONTENTS, ''), - s = new h.default().insert(a), - u = new h.default().insert(o.value()) - ;(t = new h.default() - .retain(l) - .concat(s.diff(u, n)) - .reduce(function (t, e) { - return e.insert ? t.insert(e.insert, i) : t.push(e) - }, new h.default())), - (this.delta = r.compose(t)) - } else - (this.delta = this.getDelta()), - (t && (0, A.default)(r.compose(t), this.delta)) || - (t = r.diff(this.delta, n)) - return t - }, - }, - ]), - t - ) - })() - e.default = S - }, - function (t, e) { - 'use strict' - function n() {} - function r(t, e, n) { - ;(this.fn = t), (this.context = e), (this.once = n || !1) - } - function o() { - ;(this._events = new n()), (this._eventsCount = 0) - } - var i = Object.prototype.hasOwnProperty, - l = '~' - Object.create && - ((n.prototype = Object.create(null)), new n().__proto__ || (l = !1)), - (o.prototype.eventNames = function () { - var t, - e, - n = [] - if (0 === this._eventsCount) return n - for (e in (t = this._events)) - i.call(t, e) && n.push(l ? e.slice(1) : e) - return Object.getOwnPropertySymbols - ? n.concat(Object.getOwnPropertySymbols(t)) - : n - }), - (o.prototype.listeners = function (t, e) { - var n = l ? l + t : t, - r = this._events[n] - if (e) return !!r - if (!r) return [] - if (r.fn) return [r.fn] - for (var o = 0, i = r.length, a = new Array(i); o < i; o++) - a[o] = r[o].fn - return a - }), - (o.prototype.emit = function (t, e, n, r, o, i) { - var a = l ? l + t : t - if (!this._events[a]) return !1 - var s, - u, - c = this._events[a], - f = arguments.length - if (c.fn) { - switch ((c.once && this.removeListener(t, c.fn, void 0, !0), f)) { - case 1: - return c.fn.call(c.context), !0 - case 2: - return c.fn.call(c.context, e), !0 - case 3: - return c.fn.call(c.context, e, n), !0 - case 4: - return c.fn.call(c.context, e, n, r), !0 - case 5: - return c.fn.call(c.context, e, n, r, o), !0 - case 6: - return c.fn.call(c.context, e, n, r, o, i), !0 - } - for (u = 1, s = new Array(f - 1); u < f; u++) - s[u - 1] = arguments[u] - c.fn.apply(c.context, s) - } else { - var h, - p = c.length - for (u = 0; u < p; u++) - switch ( - (c[u].once && this.removeListener(t, c[u].fn, void 0, !0), f) - ) { - case 1: - c[u].fn.call(c[u].context) - break - case 2: - c[u].fn.call(c[u].context, e) - break - case 3: - c[u].fn.call(c[u].context, e, n) - break - case 4: - c[u].fn.call(c[u].context, e, n, r) - break - default: - if (!s) - for (h = 1, s = new Array(f - 1); h < f; h++) - s[h - 1] = arguments[h] - c[u].fn.apply(c[u].context, s) - } - } - return !0 - }), - (o.prototype.on = function (t, e, n) { - var o = new r(e, n || this), - i = l ? l + t : t - return ( - this._events[i] - ? this._events[i].fn - ? (this._events[i] = [this._events[i], o]) - : this._events[i].push(o) - : ((this._events[i] = o), this._eventsCount++), - this - ) - }), - (o.prototype.once = function (t, e, n) { - var o = new r(e, n || this, !0), - i = l ? l + t : t - return ( - this._events[i] - ? this._events[i].fn - ? (this._events[i] = [this._events[i], o]) - : this._events[i].push(o) - : ((this._events[i] = o), this._eventsCount++), - this - ) - }), - (o.prototype.removeListener = function (t, e, r, o) { - var i = l ? l + t : t - if (!this._events[i]) return this - if (!e) - return ( - 0 == --this._eventsCount - ? (this._events = new n()) - : delete this._events[i], - this - ) - var a = this._events[i] - if (a.fn) - a.fn !== e || - (o && !a.once) || - (r && a.context !== r) || - (0 == --this._eventsCount - ? (this._events = new n()) - : delete this._events[i]) - else { - for (var s = 0, u = [], c = a.length; s < c; s++) - (a[s].fn !== e || - (o && !a[s].once) || - (r && a[s].context !== r)) && - u.push(a[s]) - u.length - ? (this._events[i] = 1 === u.length ? u[0] : u) - : 0 == --this._eventsCount - ? (this._events = new n()) - : delete this._events[i] - } - return this - }), - (o.prototype.removeAllListeners = function (t) { - var e - return ( - t - ? ((e = l ? l + t : t), - this._events[e] && - (0 == --this._eventsCount - ? (this._events = new n()) - : delete this._events[e])) - : ((this._events = new n()), (this._eventsCount = 0)), - this - ) - }), - (o.prototype.off = o.prototype.removeListener), - (o.prototype.addListener = o.prototype.on), - (o.prototype.setMaxListeners = function () { - return this - }), - (o.prefixed = l), - (o.EventEmitter = o), - void 0 !== t && (t.exports = o) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function a(t) { - return t instanceof v.default || t instanceof y.BlockEmbed - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var s = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - u = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - c = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - f = n(0), - h = r(f), - p = n(9), - d = r(p), - y = n(3), - v = r(y), - b = n(14), - g = r(b), - m = n(13), - _ = r(m), - O = n(23), - w = r(O), - x = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ) - return ( - (r.emitter = n.emitter), - Array.isArray(n.whitelist) && - (r.whitelist = n.whitelist.reduce(function (t, e) { - return (t[e] = !0), t - }, {})), - r.domNode.addEventListener('DOMNodeInserted', function () {}), - r.optimize(), - r.enable(), - r - ) - } - return ( - l(e, t), - u(e, [ - { - key: 'batchStart', - value: function () { - this.batch = !0 - }, - }, - { - key: 'batchEnd', - value: function () { - ;(this.batch = !1), this.optimize() - }, - }, - { - key: 'deleteAt', - value: function (t, n) { - var r = this.line(t), - o = s(r, 2), - i = o[0], - l = o[1], - a = this.line(t + n), - u = s(a, 1), - f = u[0] - if ( - (c( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'deleteAt', - this - ).call(this, t, n), - null != f && i !== f && l > 0) - ) { - if (i instanceof y.BlockEmbed || f instanceof y.BlockEmbed) - return void this.optimize() - if (i instanceof _.default) { - var h = i.newlineIndex(i.length(), !0) - if (h > -1 && (i = i.split(h + 1)) === f) - return void this.optimize() - } else if (f instanceof _.default) { - var p = f.newlineIndex(0) - p > -1 && f.split(p + 1) - } - var d = - f.children.head instanceof g.default - ? null - : f.children.head - i.moveChildren(f, d), i.remove() - } - this.optimize() - }, - }, - { - key: 'enable', - value: function () { - var t = - !(arguments.length > 0 && void 0 !== arguments[0]) || - arguments[0] - this.domNode.setAttribute('contenteditable', t) - }, - }, - { - key: 'formatAt', - value: function (t, n, r, o) { - ;(null == this.whitelist || this.whitelist[r]) && - (c( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'formatAt', - this - ).call(this, t, n, r, o), - this.optimize()) - }, - }, - { - key: 'insertAt', - value: function (t, n, r) { - if ( - null == r || - null == this.whitelist || - this.whitelist[n] - ) { - if (t >= this.length()) - if ( - null == r || - null == h.default.query(n, h.default.Scope.BLOCK) - ) { - var o = h.default.create(this.statics.defaultChild) - this.appendChild(o), - null == r && n.endsWith('\n') && (n = n.slice(0, -1)), - o.insertAt(0, n, r) - } else { - var i = h.default.create(n, r) - this.appendChild(i) - } - else - c( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'insertAt', - this - ).call(this, t, n, r) - this.optimize() - } - }, - }, - { - key: 'insertBefore', - value: function (t, n) { - if (t.statics.scope === h.default.Scope.INLINE_BLOT) { - var r = h.default.create(this.statics.defaultChild) - r.appendChild(t), (t = r) - } - c( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'insertBefore', - this - ).call(this, t, n) - }, - }, - { - key: 'leaf', - value: function (t) { - return this.path(t).pop() || [null, -1] - }, - }, - { - key: 'line', - value: function (t) { - return t === this.length() - ? this.line(t - 1) - : this.descendant(a, t) - }, - }, - { - key: 'lines', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 0, - e = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : Number.MAX_VALUE - return (function t(e, n, r) { - var o = [], - i = r - return ( - e.children.forEachAt(n, r, function (e, n, r) { - a(e) - ? o.push(e) - : e instanceof h.default.Container && - (o = o.concat(t(e, n, i))), - (i -= r) - }), - o - ) - })(this, t, e) - }, - }, - { - key: 'optimize', - value: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : [], - n = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {} - !0 !== this.batch && - (c( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t, n), - t.length > 0 && - this.emitter.emit(d.default.events.SCROLL_OPTIMIZE, t, n)) - }, - }, - { - key: 'path', - value: function (t) { - return c( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'path', - this - ) - .call(this, t) - .slice(1) - }, - }, - { - key: 'update', - value: function (t) { - if (!0 !== this.batch) { - var n = d.default.sources.USER - 'string' == typeof t && (n = t), - Array.isArray(t) || (t = this.observer.takeRecords()), - t.length > 0 && - this.emitter.emit( - d.default.events.SCROLL_BEFORE_UPDATE, - n, - t - ), - c( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'update', - this - ).call(this, t.concat([])), - t.length > 0 && - this.emitter.emit(d.default.events.SCROLL_UPDATE, n, t) - } - }, - }, - ]), - e - ) - })(h.default.Scroll) - ;(x.blotName = 'scroll'), - (x.className = 'ql-editor'), - (x.tagName = 'DIV'), - (x.defaultChild = 'block'), - (x.allowedChildren = [v.default, y.BlockEmbed, w.default]), - (e.default = x) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function a(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function s(t, e, n) { - return 'object' === (void 0 === e ? 'undefined' : x(e)) - ? Object.keys(e).reduce(function (t, n) { - return s(t, n, e[n]) - }, t) - : t.reduce(function (t, r) { - return r.attributes && r.attributes[e] - ? t.push(r) - : t.insert( - r.insert, - (0, j.default)({}, o({}, e, n), r.attributes) - ) - }, new q.default()) - } - function u(t) { - if (t.nodeType !== Node.ELEMENT_NODE) return {} - return ( - t['__ql-computed-style'] || - (t['__ql-computed-style'] = window.getComputedStyle(t)) - ) - } - function c(t, e) { - for ( - var n = '', r = t.ops.length - 1; - r >= 0 && n.length < e.length; - --r - ) { - var o = t.ops[r] - if ('string' != typeof o.insert) break - n = o.insert + n - } - return n.slice(-1 * e.length) === e - } - function f(t) { - return ( - 0 !== t.childNodes.length && - ['block', 'list-item'].indexOf(u(t).display) > -1 - ) - } - function h(t, e, n) { - return t.nodeType === t.TEXT_NODE - ? n.reduce(function (e, n) { - return n(t, e) - }, new q.default()) - : t.nodeType === t.ELEMENT_NODE - ? [].reduce.call( - t.childNodes || [], - function (r, o) { - var i = h(o, e, n) - return ( - o.nodeType === t.ELEMENT_NODE && - ((i = e.reduce(function (t, e) { - return e(o, t) - }, i)), - (i = (o[W] || []).reduce(function (t, e) { - return e(o, t) - }, i))), - r.concat(i) - ) - }, - new q.default() - ) - : new q.default() - } - function p(t, e, n) { - return s(n, t, !0) - } - function d(t, e) { - var n = P.default.Attributor.Attribute.keys(t), - r = P.default.Attributor.Class.keys(t), - o = P.default.Attributor.Style.keys(t), - i = {} - return ( - n - .concat(r) - .concat(o) - .forEach(function (e) { - var n = P.default.query(e, P.default.Scope.ATTRIBUTE) - ;(null != n && ((i[n.attrName] = n.value(t)), i[n.attrName])) || - ((n = Y[e]), - null == n || - (n.attrName !== e && n.keyName !== e) || - (i[n.attrName] = n.value(t) || void 0), - null == (n = X[e]) || - (n.attrName !== e && n.keyName !== e) || - ((n = X[e]), (i[n.attrName] = n.value(t) || void 0))) - }), - Object.keys(i).length > 0 && (e = s(e, i)), - e - ) - } - function y(t, e) { - var n = P.default.query(t) - if (null == n) return e - if (n.prototype instanceof P.default.Embed) { - var r = {}, - o = n.value(t) - null != o && - ((r[n.blotName] = o), (e = new q.default().insert(r, n.formats(t)))) - } else - 'function' == typeof n.formats && (e = s(e, n.blotName, n.formats(t))) - return e - } - function v(t, e) { - return c(e, '\n') || e.insert('\n'), e - } - function b() { - return new q.default() - } - function g(t, e) { - var n = P.default.query(t) - if (null == n || 'list-item' !== n.blotName || !c(e, '\n')) return e - for ( - var r = -1, o = t.parentNode; - !o.classList.contains('ql-clipboard'); - - ) - 'list' === (P.default.query(o) || {}).blotName && (r += 1), - (o = o.parentNode) - return r <= 0 - ? e - : e.compose( - new q.default().retain(e.length() - 1).retain(1, { indent: r }) - ) - } - function m(t, e) { - return ( - c(e, '\n') || - ((f(t) || (e.length() > 0 && t.nextSibling && f(t.nextSibling))) && - e.insert('\n')), - e - ) - } - function _(t, e) { - if (f(t) && null != t.nextElementSibling && !c(e, '\n\n')) { - var n = - t.offsetHeight + - parseFloat(u(t).marginTop) + - parseFloat(u(t).marginBottom) - t.nextElementSibling.offsetTop > t.offsetTop + 1.5 * n && - e.insert('\n') - } - return e - } - function O(t, e) { - var n = {}, - r = t.style || {} - return ( - r.fontStyle && 'italic' === u(t).fontStyle && (n.italic = !0), - r.fontWeight && - (u(t).fontWeight.startsWith('bold') || - parseInt(u(t).fontWeight) >= 700) && - (n.bold = !0), - Object.keys(n).length > 0 && (e = s(e, n)), - parseFloat(r.textIndent || 0) > 0 && - (e = new q.default().insert('\t').concat(e)), - e - ) - } - function w(t, e) { - var n = t.data - if ('O:P' === t.parentNode.tagName) return e.insert(n.trim()) - if ( - 0 === n.trim().length && - t.parentNode.classList.contains('ql-clipboard') - ) - return e - if (!u(t.parentNode).whiteSpace.startsWith('pre')) { - var r = function (t, e) { - return ( - (e = e.replace(/[^\u00a0]/g, '')), e.length < 1 && t ? ' ' : e - ) - } - ;(n = n.replace(/\r\n/g, ' ').replace(/\n/g, ' ')), - (n = n.replace(/\s\s+/g, r.bind(r, !0))), - ((null == t.previousSibling && f(t.parentNode)) || - (null != t.previousSibling && f(t.previousSibling))) && - (n = n.replace(/^\s+/, r.bind(r, !1))), - ((null == t.nextSibling && f(t.parentNode)) || - (null != t.nextSibling && f(t.nextSibling))) && - (n = n.replace(/\s+$/, r.bind(r, !1))) - } - return e.insert(n) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.matchText = - e.matchSpacing = - e.matchNewline = - e.matchBlot = - e.matchAttributor = - e.default = - void 0) - var x = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (t) { - return typeof t - } - : function (t) { - return t && - 'function' == typeof Symbol && - t.constructor === Symbol && - t !== Symbol.prototype - ? 'symbol' - : typeof t - }, - k = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - E = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - N = n(2), - j = r(N), - A = n(4), - q = r(A), - T = n(0), - P = r(T), - S = n(6), - C = r(S), - L = n(10), - M = r(L), - R = n(7), - I = r(R), - B = n(34), - D = n(35), - U = n(13), - F = r(U), - H = n(24), - K = n(36), - z = n(37), - V = n(38), - Z = (0, M.default)('quill:clipboard'), - W = '__ql-matcher', - G = [ - [Node.TEXT_NODE, w], - [Node.TEXT_NODE, m], - ['br', v], - [Node.ELEMENT_NODE, m], - [Node.ELEMENT_NODE, y], - [Node.ELEMENT_NODE, _], - [Node.ELEMENT_NODE, d], - [Node.ELEMENT_NODE, O], - ['li', g], - ['b', p.bind(p, 'bold')], - ['i', p.bind(p, 'italic')], - ['style', b], - ], - Y = [B.AlignAttribute, K.DirectionAttribute].reduce(function (t, e) { - return (t[e.keyName] = e), t - }, {}), - X = [ - B.AlignStyle, - D.BackgroundStyle, - H.ColorStyle, - K.DirectionStyle, - z.FontStyle, - V.SizeStyle, - ].reduce(function (t, e) { - return (t[e.keyName] = e), t - }, {}), - $ = (function (t) { - function e(t, n) { - i(this, e) - var r = l( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return ( - r.quill.root.addEventListener('paste', r.onPaste.bind(r)), - (r.container = r.quill.addContainer('ql-clipboard')), - r.container.setAttribute('contenteditable', !0), - r.container.setAttribute('tabindex', -1), - (r.matchers = []), - G.concat(r.options.matchers).forEach(function (t) { - var e = k(t, 2), - o = e[0], - i = e[1] - ;(n.matchVisual || i !== _) && r.addMatcher(o, i) - }), - r - ) - } - return ( - a(e, t), - E(e, [ - { - key: 'addMatcher', - value: function (t, e) { - this.matchers.push([t, e]) - }, - }, - { - key: 'convert', - value: function (t) { - if ('string' == typeof t) - return ( - (this.container.innerHTML = t.replace( - /\>\r?\n +\<' - )), - this.convert() - ) - var e = this.quill.getFormat( - this.quill.selection.savedRange.index - ) - if (e[F.default.blotName]) { - var n = this.container.innerText - return ( - (this.container.innerHTML = ''), - new q.default().insert( - n, - o({}, F.default.blotName, e[F.default.blotName]) - ) - ) - } - var r = this.prepareMatching(), - i = k(r, 2), - l = i[0], - a = i[1], - s = h(this.container, l, a) - return ( - c(s, '\n') && - null == s.ops[s.ops.length - 1].attributes && - (s = s.compose( - new q.default().retain(s.length() - 1).delete(1) - )), - Z.log('convert', this.container.innerHTML, s), - (this.container.innerHTML = ''), - s - ) - }, - }, - { - key: 'dangerouslyPasteHTML', - value: function (t, e) { - var n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : C.default.sources.API - if ('string' == typeof t) - this.quill.setContents(this.convert(t), e), - this.quill.setSelection(0, C.default.sources.SILENT) - else { - var r = this.convert(e) - this.quill.updateContents( - new q.default().retain(t).concat(r), - n - ), - this.quill.setSelection( - t + r.length(), - C.default.sources.SILENT - ) - } - }, - }, - { - key: 'onPaste', - value: function (t) { - var e = this - if (!t.defaultPrevented && this.quill.isEnabled()) { - var n = this.quill.getSelection(), - r = new q.default().retain(n.index), - o = this.quill.scrollingContainer.scrollTop - this.container.focus(), - this.quill.selection.update(C.default.sources.SILENT), - setTimeout(function () { - ;(r = r.concat(e.convert()).delete(n.length)), - e.quill.updateContents(r, C.default.sources.USER), - e.quill.setSelection( - r.length() - n.length, - C.default.sources.SILENT - ), - (e.quill.scrollingContainer.scrollTop = o), - e.quill.focus() - }, 1) - } - }, - }, - { - key: 'prepareMatching', - value: function () { - var t = this, - e = [], - n = [] - return ( - this.matchers.forEach(function (r) { - var o = k(r, 2), - i = o[0], - l = o[1] - switch (i) { - case Node.TEXT_NODE: - n.push(l) - break - case Node.ELEMENT_NODE: - e.push(l) - break - default: - ;[].forEach.call( - t.container.querySelectorAll(i), - function (t) { - ;(t[W] = t[W] || []), t[W].push(l) - } - ) - } - }), - [e, n] - ) - }, - }, - ]), - e - ) - })(I.default) - ;($.DEFAULTS = { matchers: [], matchVisual: !0 }), - (e.default = $), - (e.matchAttributor = d), - (e.matchBlot = y), - (e.matchNewline = m), - (e.matchSpacing = _), - (e.matchText = w) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function a(t) { - var e = t.ops[t.ops.length - 1] - return ( - null != e && - (null != e.insert - ? 'string' == typeof e.insert && e.insert.endsWith('\n') - : null != e.attributes && - Object.keys(e.attributes).some(function (t) { - return null != f.default.query(t, f.default.Scope.BLOCK) - })) - ) - } - function s(t) { - var e = t.reduce(function (t, e) { - return (t += e.delete || 0) - }, 0), - n = t.length() - e - return a(t) && (n -= 1), n - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.getLastChangeIndex = e.default = void 0) - var u = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - c = n(0), - f = r(c), - h = n(6), - p = r(h), - d = n(7), - y = r(d), - v = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return ( - (r.lastRecorded = 0), - (r.ignoreChange = !1), - r.clear(), - r.quill.on(p.default.events.EDITOR_CHANGE, function (t, e, n, o) { - t !== p.default.events.TEXT_CHANGE || - r.ignoreChange || - (r.options.userOnly && o !== p.default.sources.USER - ? r.transform(e) - : r.record(e, n)) - }), - r.quill.keyboard.addBinding( - { key: 'Z', shortKey: !0 }, - r.undo.bind(r) - ), - r.quill.keyboard.addBinding( - { key: 'Z', shortKey: !0, shiftKey: !0 }, - r.redo.bind(r) - ), - /Win/i.test(navigator.platform) && - r.quill.keyboard.addBinding( - { key: 'Y', shortKey: !0 }, - r.redo.bind(r) - ), - r - ) - } - return ( - l(e, t), - u(e, [ - { - key: 'change', - value: function (t, e) { - if (0 !== this.stack[t].length) { - var n = this.stack[t].pop() - this.stack[e].push(n), - (this.lastRecorded = 0), - (this.ignoreChange = !0), - this.quill.updateContents(n[t], p.default.sources.USER), - (this.ignoreChange = !1) - var r = s(n[t]) - this.quill.setSelection(r) - } - }, - }, - { - key: 'clear', - value: function () { - this.stack = { undo: [], redo: [] } - }, - }, - { - key: 'cutoff', - value: function () { - this.lastRecorded = 0 - }, - }, - { - key: 'record', - value: function (t, e) { - if (0 !== t.ops.length) { - this.stack.redo = [] - var n = this.quill.getContents().diff(e), - r = Date.now() - if ( - this.lastRecorded + this.options.delay > r && - this.stack.undo.length > 0 - ) { - var o = this.stack.undo.pop() - ;(n = n.compose(o.undo)), (t = o.redo.compose(t)) - } else this.lastRecorded = r - this.stack.undo.push({ redo: t, undo: n }), - this.stack.undo.length > this.options.maxStack && - this.stack.undo.shift() - } - }, - }, - { - key: 'redo', - value: function () { - this.change('redo', 'undo') - }, - }, - { - key: 'transform', - value: function (t) { - this.stack.undo.forEach(function (e) { - ;(e.undo = t.transform(e.undo, !0)), - (e.redo = t.transform(e.redo, !0)) - }), - this.stack.redo.forEach(function (e) { - ;(e.undo = t.transform(e.undo, !0)), - (e.redo = t.transform(e.redo, !0)) - }) - }, - }, - { - key: 'undo', - value: function () { - this.change('undo', 'redo') - }, - }, - ]), - e - ) - })(y.default) - ;(v.DEFAULTS = { delay: 1e3, maxStack: 100, userOnly: !1 }), - (e.default = v), - (e.getLastChangeIndex = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.IndentClass = void 0) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(0), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l(e, [ - { - key: 'add', - value: function (t, n) { - if ('+1' === n || '-1' === n) { - var r = this.value(t) || 0 - n = '+1' === n ? r + 1 : r - 1 - } - return 0 === n - ? (this.remove(t), !0) - : a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'add', - this - ).call(this, t, n) - }, - }, - { - key: 'canAdd', - value: function (t, n) { - return ( - a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'canAdd', - this - ).call(this, t, n) || - a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'canAdd', - this - ).call(this, t, parseInt(n)) - ) - }, - }, - { - key: 'value', - value: function (t) { - return ( - parseInt( - a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'value', - this - ).call(this, t) - ) || void 0 - ) - }, - }, - ]), - e - ) - })(u.default.Attributor.Class), - f = new c('indent', 'ql-indent', { - scope: u.default.Scope.BLOCK, - whitelist: [1, 2, 3, 4, 5, 6, 7, 8], - }) - e.IndentClass = f - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = n(3), - a = (function (t) { - return t && t.__esModule ? t : { default: t } - })(l), - s = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return i(e, t), e - })(a.default) - ;(s.blotName = 'blockquote'), (s.tagName = 'blockquote'), (e.default = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = n(3), - s = (function (t) { - return t && t.__esModule ? t : { default: t } - })(a), - u = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l(e, null, [ - { - key: 'formats', - value: function (t) { - return this.tagName.indexOf(t.tagName) + 1 - }, - }, - ]), - e - ) - })(s.default) - ;(u.blotName = 'header'), - (u.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']), - (e.default = u) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function a(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.ListItem = void 0) - var s = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - u = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - c = n(0), - f = r(c), - h = n(3), - p = r(h), - d = n(23), - y = r(d), - v = (function (t) { - function e() { - return ( - i(this, e), - l( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - a(e, t), - s( - e, - [ - { - key: 'format', - value: function (t, n) { - t !== b.blotName || n - ? u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - : this.replaceWith(f.default.create(this.statics.scope)) - }, - }, - { - key: 'remove', - value: function () { - null == this.prev && null == this.next - ? this.parent.remove() - : u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'remove', - this - ).call(this) - }, - }, - { - key: 'replaceWith', - value: function (t, n) { - return ( - this.parent.isolate( - this.offset(this.parent), - this.length() - ), - t === this.parent.statics.blotName - ? (this.parent.replaceWith(t, n), this) - : (this.parent.unwrap(), - u( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'replaceWith', - this - ).call(this, t, n)) - ) - }, - }, - ], - [ - { - key: 'formats', - value: function (t) { - return t.tagName === this.tagName - ? void 0 - : u( - e.__proto__ || Object.getPrototypeOf(e), - 'formats', - this - ).call(this, t) - }, - }, - ] - ), - e - ) - })(p.default) - ;(v.blotName = 'list-item'), (v.tagName = 'LI') - var b = (function (t) { - function e(t) { - i(this, e) - var n = l( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t) - ), - r = function (e) { - if (e.target.parentNode === t) { - var r = n.statics.formats(t), - o = f.default.find(e.target) - 'checked' === r - ? o.format('list', 'unchecked') - : 'unchecked' === r && o.format('list', 'checked') - } - } - return ( - t.addEventListener('touchstart', r), - t.addEventListener('mousedown', r), - n - ) - } - return ( - a(e, t), - s(e, null, [ - { - key: 'create', - value: function (t) { - var n = 'ordered' === t ? 'OL' : 'UL', - r = u( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, n) - return ( - ('checked' !== t && 'unchecked' !== t) || - r.setAttribute('data-checked', 'checked' === t), - r - ) - }, - }, - { - key: 'formats', - value: function (t) { - return 'OL' === t.tagName - ? 'ordered' - : 'UL' === t.tagName - ? t.hasAttribute('data-checked') - ? 'true' === t.getAttribute('data-checked') - ? 'checked' - : 'unchecked' - : 'bullet' - : void 0 - }, - }, - ]), - s(e, [ - { - key: 'format', - value: function (t, e) { - this.children.length > 0 && this.children.tail.format(t, e) - }, - }, - { - key: 'formats', - value: function () { - return o( - {}, - this.statics.blotName, - this.statics.formats(this.domNode) - ) - }, - }, - { - key: 'insertBefore', - value: function (t, n) { - if (t instanceof v) - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'insertBefore', - this - ).call(this, t, n) - else { - var r = null == n ? this.length() : n.offset(this), - o = this.split(r) - o.parent.insertBefore(t, o) - } - }, - }, - { - key: 'optimize', - value: function (t) { - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'optimize', - this - ).call(this, t) - var n = this.next - null != n && - n.prev === this && - n.statics.blotName === this.statics.blotName && - n.domNode.tagName === this.domNode.tagName && - n.domNode.getAttribute('data-checked') === - this.domNode.getAttribute('data-checked') && - (n.moveChildren(this), n.remove()) - }, - }, - { - key: 'replace', - value: function (t) { - if (t.statics.blotName !== this.statics.blotName) { - var n = f.default.create(this.statics.defaultChild) - t.moveChildren(n), this.appendChild(n) - } - u( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'replace', - this - ).call(this, t) - }, - }, - ]), - e - ) - })(y.default) - ;(b.blotName = 'list'), - (b.scope = f.default.Scope.BLOCK_BLOT), - (b.tagName = ['OL', 'UL']), - (b.defaultChild = 'list-item'), - (b.allowedChildren = [v]), - (e.ListItem = v), - (e.default = b) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = n(39), - a = (function (t) { - return t && t.__esModule ? t : { default: t } - })(l), - s = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return i(e, t), e - })(a.default) - ;(s.blotName = 'italic'), (s.tagName = ['EM', 'I']), (e.default = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(5), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l(e, null, [ - { - key: 'create', - value: function (t) { - return 'super' === t - ? document.createElement('sup') - : 'sub' === t - ? document.createElement('sub') - : a( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - }, - }, - { - key: 'formats', - value: function (t) { - return 'SUB' === t.tagName - ? 'sub' - : 'SUP' === t.tagName - ? 'super' - : void 0 - }, - }, - ]), - e - ) - })(u.default) - ;(c.blotName = 'script'), (c.tagName = ['SUB', 'SUP']), (e.default = c) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = n(5), - a = (function (t) { - return t && t.__esModule ? t : { default: t } - })(l), - s = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return i(e, t), e - })(a.default) - ;(s.blotName = 'strike'), (s.tagName = 'S'), (e.default = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = n(5), - a = (function (t) { - return t && t.__esModule ? t : { default: t } - })(l), - s = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return i(e, t), e - })(a.default) - ;(s.blotName = 'underline'), (s.tagName = 'U'), (e.default = s) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(0), - u = (function (t) { - return t && t.__esModule ? t : { default: t } - })(s), - c = n(15), - f = ['alt', 'height', 'width'], - h = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l( - e, - [ - { - key: 'format', - value: function (t, n) { - f.indexOf(t) > -1 - ? n - ? this.domNode.setAttribute(t, n) - : this.domNode.removeAttribute(t) - : a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - }, - }, - ], - [ - { - key: 'create', - value: function (t) { - var n = a( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - return ( - 'string' == typeof t && - n.setAttribute('src', this.sanitize(t)), - n - ) - }, - }, - { - key: 'formats', - value: function (t) { - return f.reduce(function (e, n) { - return t.hasAttribute(n) && (e[n] = t.getAttribute(n)), e - }, {}) - }, - }, - { - key: 'match', - value: function (t) { - return ( - /\.(jpe?g|gif|png)$/.test(t) || - /^data:image\/.+;base64/.test(t) - ) - }, - }, - { - key: 'sanitize', - value: function (t) { - return (0, c.sanitize)(t, ['http', 'https', 'data']) - ? t - : '//:0' - }, - }, - { - key: 'value', - value: function (t) { - return t.getAttribute('src') - }, - }, - ] - ), - e - ) - })(u.default.Embed) - ;(h.blotName = 'image'), (h.tagName = 'IMG'), (e.default = h) - }, - function (t, e, n) { - 'use strict' - function r(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function o(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var l = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = n(3), - u = n(15), - c = (function (t) { - return t && t.__esModule ? t : { default: t } - })(u), - f = ['height', 'width'], - h = (function (t) { - function e() { - return ( - r(this, e), - o( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - i(e, t), - l( - e, - [ - { - key: 'format', - value: function (t, n) { - f.indexOf(t) > -1 - ? n - ? this.domNode.setAttribute(t, n) - : this.domNode.removeAttribute(t) - : a( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'format', - this - ).call(this, t, n) - }, - }, - ], - [ - { - key: 'create', - value: function (t) { - var n = a( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - return ( - n.setAttribute('frameborder', '0'), - n.setAttribute('allowfullscreen', !0), - n.setAttribute('src', this.sanitize(t)), - n - ) - }, - }, - { - key: 'formats', - value: function (t) { - return f.reduce(function (e, n) { - return t.hasAttribute(n) && (e[n] = t.getAttribute(n)), e - }, {}) - }, - }, - { - key: 'sanitize', - value: function (t) { - return c.default.sanitize(t) - }, - }, - { - key: 'value', - value: function (t) { - return t.getAttribute('src') - }, - }, - ] - ), - e - ) - })(s.BlockEmbed) - ;(h.blotName = 'video'), - (h.className = 'ql-video'), - (h.tagName = 'IFRAME'), - (e.default = h) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.FormulaBlot = void 0) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(33), - c = r(u), - f = n(6), - h = r(f), - p = n(7), - d = r(p), - y = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - l(e, t), - a(e, null, [ - { - key: 'create', - value: function (t) { - var n = s( - e.__proto__ || Object.getPrototypeOf(e), - 'create', - this - ).call(this, t) - return ( - 'string' == typeof t && - (window.katex.render(t, n, { - throwOnError: !1, - errorColor: '#f00', - }), - n.setAttribute('data-value', t)), - n - ) - }, - }, - { - key: 'value', - value: function (t) { - return t.getAttribute('data-value') - }, - }, - ]), - e - ) - })(c.default) - ;(y.blotName = 'formula'), - (y.className = 'ql-formula'), - (y.tagName = 'SPAN') - var v = (function (t) { - function e() { - o(this, e) - var t = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)) - if (null == window.katex) - throw new Error('Formula module requires KaTeX.') - return t - } - return ( - l(e, t), - a(e, null, [ - { - key: 'register', - value: function () { - h.default.register(y, !0) - }, - }, - ]), - e - ) - })(d.default) - ;(e.FormulaBlot = y), (e.default = v) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.CodeToken = e.CodeBlock = void 0) - var a = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = n(0), - c = r(u), - f = n(6), - h = r(f), - p = n(7), - d = r(p), - y = n(13), - v = r(y), - b = (function (t) { - function e() { - return ( - o(this, e), - i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments) - ) - ) - } - return ( - l(e, t), - a(e, [ - { - key: 'replaceWith', - value: function (t) { - ;(this.domNode.textContent = this.domNode.textContent), - this.attach(), - s( - e.prototype.__proto__ || - Object.getPrototypeOf(e.prototype), - 'replaceWith', - this - ).call(this, t) - }, - }, - { - key: 'highlight', - value: function (t) { - var e = this.domNode.textContent - this.cachedText !== e && - ((e.trim().length > 0 || null == this.cachedText) && - ((this.domNode.innerHTML = t(e)), - this.domNode.normalize(), - this.attach()), - (this.cachedText = e)) - }, - }, - ]), - e - ) - })(v.default) - b.className = 'ql-syntax' - var g = new c.default.Attributor.Class('token', 'hljs', { - scope: c.default.Scope.INLINE, - }), - m = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - if ('function' != typeof r.options.highlight) - throw new Error( - 'Syntax module requires highlight.js. Please include the library on the page before Quill.' - ) - var l = null - return ( - r.quill.on(h.default.events.SCROLL_OPTIMIZE, function () { - clearTimeout(l), - (l = setTimeout(function () { - r.highlight(), (l = null) - }, r.options.interval)) - }), - r.highlight(), - r - ) - } - return ( - l(e, t), - a(e, null, [ - { - key: 'register', - value: function () { - h.default.register(g, !0), h.default.register(b, !0) - }, - }, - ]), - a(e, [ - { - key: 'highlight', - value: function () { - var t = this - if (!this.quill.selection.composing) { - this.quill.update(h.default.sources.USER) - var e = this.quill.getSelection() - this.quill.scroll.descendants(b).forEach(function (e) { - e.highlight(t.options.highlight) - }), - this.quill.update(h.default.sources.SILENT), - null != e && - this.quill.setSelection(e, h.default.sources.SILENT) - } - }, - }, - ]), - e - ) - })(d.default) - ;(m.DEFAULTS = { - highlight: (function () { - return null == window.hljs - ? null - : function (t) { - return window.hljs.highlightAuto(t).value - } - })(), - interval: 1e3, - }), - (e.CodeBlock = b), - (e.CodeToken = g), - (e.default = m) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e, n) { - return ( - e in t - ? Object.defineProperty(t, e, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (t[e] = n), - t - ) - } - function i(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function l(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function a(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - function s(t, e, n) { - var r = document.createElement('button') - r.setAttribute('type', 'button'), - r.classList.add('ql-' + e), - null != n && (r.value = n), - t.appendChild(r) - } - function u(t, e) { - Array.isArray(e[0]) || (e = [e]), - e.forEach(function (e) { - var n = document.createElement('span') - n.classList.add('ql-formats'), - e.forEach(function (t) { - if ('string' == typeof t) s(n, t) - else { - var e = Object.keys(t)[0], - r = t[e] - Array.isArray(r) ? c(n, e, r) : s(n, e, r) - } - }), - t.appendChild(n) - }) - } - function c(t, e, n) { - var r = document.createElement('select') - r.classList.add('ql-' + e), - n.forEach(function (t) { - var e = document.createElement('option') - !1 !== t - ? e.setAttribute('value', t) - : e.setAttribute('selected', 'selected'), - r.appendChild(e) - }), - t.appendChild(r) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.addControls = e.default = void 0) - var f = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - h = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - p = n(4), - d = r(p), - y = n(0), - v = r(y), - b = n(6), - g = r(b), - m = n(10), - _ = r(m), - O = n(7), - w = r(O), - x = (0, _.default)('quill:toolbar'), - k = (function (t) { - function e(t, n) { - i(this, e) - var r = l( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - if (Array.isArray(r.options.container)) { - var o = document.createElement('div') - u(o, r.options.container), - t.container.parentNode.insertBefore(o, t.container), - (r.container = o) - } else - 'string' == typeof r.options.container - ? (r.container = document.querySelector(r.options.container)) - : (r.container = r.options.container) - if (!(r.container instanceof HTMLElement)) { - var a - return ( - (a = x.error('Container required for toolbar', r.options)), - l(r, a) - ) - } - return ( - r.container.classList.add('ql-toolbar'), - (r.controls = []), - (r.handlers = {}), - Object.keys(r.options.handlers).forEach(function (t) { - r.addHandler(t, r.options.handlers[t]) - }), - [].forEach.call( - r.container.querySelectorAll('button, select'), - function (t) { - r.attach(t) - } - ), - r.quill.on(g.default.events.EDITOR_CHANGE, function (t, e) { - t === g.default.events.SELECTION_CHANGE && r.update(e) - }), - r.quill.on(g.default.events.SCROLL_OPTIMIZE, function () { - var t = r.quill.selection.getRange(), - e = f(t, 1), - n = e[0] - r.update(n) - }), - r - ) - } - return ( - a(e, t), - h(e, [ - { - key: 'addHandler', - value: function (t, e) { - this.handlers[t] = e - }, - }, - { - key: 'attach', - value: function (t) { - var e = this, - n = [].find.call(t.classList, function (t) { - return 0 === t.indexOf('ql-') - }) - if (n) { - if ( - ((n = n.slice('ql-'.length)), - 'BUTTON' === t.tagName && - t.setAttribute('type', 'button'), - null == this.handlers[n]) - ) { - if ( - null != this.quill.scroll.whitelist && - null == this.quill.scroll.whitelist[n] - ) - return void x.warn( - 'ignoring attaching to disabled format', - n, - t - ) - if (null == v.default.query(n)) - return void x.warn( - 'ignoring attaching to nonexistent format', - n, - t - ) - } - var r = 'SELECT' === t.tagName ? 'change' : 'click' - t.addEventListener(r, function (r) { - var i = void 0 - if ('SELECT' === t.tagName) { - if (t.selectedIndex < 0) return - var l = t.options[t.selectedIndex] - i = !l.hasAttribute('selected') && (l.value || !1) - } else (i = !t.classList.contains('ql-active') && (t.value || !t.hasAttribute('value'))), r.preventDefault() - e.quill.focus() - var a = e.quill.selection.getRange(), - s = f(a, 1), - u = s[0] - if (null != e.handlers[n]) e.handlers[n].call(e, i) - else if ( - v.default.query(n).prototype instanceof v.default.Embed - ) { - if (!(i = prompt('Enter ' + n))) return - e.quill.updateContents( - new d.default() - .retain(u.index) - .delete(u.length) - .insert(o({}, n, i)), - g.default.sources.USER - ) - } else e.quill.format(n, i, g.default.sources.USER) - e.update(u) - }), - this.controls.push([n, t]) - } - }, - }, - { - key: 'update', - value: function (t) { - var e = null == t ? {} : this.quill.getFormat(t) - this.controls.forEach(function (n) { - var r = f(n, 2), - o = r[0], - i = r[1] - if ('SELECT' === i.tagName) { - var l = void 0 - if (null == t) l = null - else if (null == e[o]) - l = i.querySelector('option[selected]') - else if (!Array.isArray(e[o])) { - var a = e[o] - 'string' == typeof a && (a = a.replace(/\"/g, '\\"')), - (l = i.querySelector('option[value="' + a + '"]')) - } - null == l - ? ((i.value = ''), (i.selectedIndex = -1)) - : (l.selected = !0) - } else if (null == t) i.classList.remove('ql-active') - else if (i.hasAttribute('value')) { - var s = - e[o] === i.getAttribute('value') || - (null != e[o] && - e[o].toString() === i.getAttribute('value')) || - (null == e[o] && !i.getAttribute('value')) - i.classList.toggle('ql-active', s) - } else i.classList.toggle('ql-active', null != e[o]) - }) - }, - }, - ]), - e - ) - })(w.default) - ;(k.DEFAULTS = {}), - (k.DEFAULTS = { - container: null, - handlers: { - clean: function () { - var t = this, - e = this.quill.getSelection() - if (null != e) - if (0 == e.length) { - var n = this.quill.getFormat() - Object.keys(n).forEach(function (e) { - null != v.default.query(e, v.default.Scope.INLINE) && - t.quill.format(e, !1) - }) - } else this.quill.removeFormat(e, g.default.sources.USER) - }, - direction: function (t) { - var e = this.quill.getFormat().align - 'rtl' === t && null == e - ? this.quill.format('align', 'right', g.default.sources.USER) - : t || - 'right' !== e || - this.quill.format('align', !1, g.default.sources.USER), - this.quill.format('direction', t, g.default.sources.USER) - }, - indent: function (t) { - var e = this.quill.getSelection(), - n = this.quill.getFormat(e), - r = parseInt(n.indent || 0) - if ('+1' === t || '-1' === t) { - var o = '+1' === t ? 1 : -1 - 'rtl' === n.direction && (o *= -1), - this.quill.format('indent', r + o, g.default.sources.USER) - } - }, - link: function (t) { - !0 === t && (t = prompt('Enter link URL:')), - this.quill.format('link', t, g.default.sources.USER) - }, - list: function (t) { - var e = this.quill.getSelection(), - n = this.quill.getFormat(e) - 'check' === t - ? 'checked' === n.list || 'unchecked' === n.list - ? this.quill.format('list', !1, g.default.sources.USER) - : this.quill.format( - 'list', - 'unchecked', - g.default.sources.USER - ) - : this.quill.format('list', t, g.default.sources.USER) - }, - }, - }), - (e.default = k), - (e.addControls = u) - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e) { - t.exports = - ' ' - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.default = e.BubbleTooltip = void 0) - var a = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - s = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - u = n(2), - c = r(u), - f = n(9), - h = r(f), - p = n(44), - d = r(p), - y = n(22), - v = n(26), - b = r(v), - g = [ - ['bold', 'italic', 'link'], - [{ header: 1 }, { header: 2 }, 'blockquote'], - ], - m = (function (t) { - function e(t, n) { - o(this, e), - null != n.modules.toolbar && - null == n.modules.toolbar.container && - (n.modules.toolbar.container = g) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return r.quill.container.classList.add('ql-bubble'), r - } - return ( - l(e, t), - s(e, [ - { - key: 'extendToolbar', - value: function (t) { - ;(this.tooltip = new _(this.quill, this.options.bounds)), - this.tooltip.root.appendChild(t.container), - this.buildButtons( - [].slice.call(t.container.querySelectorAll('button')), - b.default - ), - this.buildPickers( - [].slice.call(t.container.querySelectorAll('select')), - b.default - ) - }, - }, - ]), - e - ) - })(d.default) - m.DEFAULTS = (0, c.default)(!0, {}, d.default.DEFAULTS, { - modules: { - toolbar: { - handlers: { - link: function (t) { - t - ? this.quill.theme.tooltip.edit() - : this.quill.format('link', !1) - }, - }, - }, - }, - }) - var _ = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return ( - r.quill.on(h.default.events.EDITOR_CHANGE, function (t, e, n, o) { - if (t === h.default.events.SELECTION_CHANGE) - if (null != e && e.length > 0 && o === h.default.sources.USER) { - r.show(), - (r.root.style.left = '0px'), - (r.root.style.width = ''), - (r.root.style.width = r.root.offsetWidth + 'px') - var i = r.quill.getLines(e.index, e.length) - if (1 === i.length) r.position(r.quill.getBounds(e)) - else { - var l = i[i.length - 1], - a = r.quill.getIndex(l), - s = Math.min(l.length() - 1, e.index + e.length - a), - u = r.quill.getBounds(new y.Range(a, s)) - r.position(u) - } - } else - document.activeElement !== r.textbox && - r.quill.hasFocus() && - r.hide() - }), - r - ) - } - return ( - l(e, t), - s(e, [ - { - key: 'listen', - value: function () { - var t = this - a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'listen', - this - ).call(this), - this.root - .querySelector('.ql-close') - .addEventListener('click', function () { - t.root.classList.remove('ql-editing') - }), - this.quill.on(h.default.events.SCROLL_OPTIMIZE, function () { - setTimeout(function () { - if (!t.root.classList.contains('ql-hidden')) { - var e = t.quill.getSelection() - null != e && t.position(t.quill.getBounds(e)) - } - }, 1) - }) - }, - }, - { - key: 'cancel', - value: function () { - this.show() - }, - }, - { - key: 'position', - value: function (t) { - var n = a( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'position', - this - ).call(this, t), - r = this.root.querySelector('.ql-tooltip-arrow') - if (((r.style.marginLeft = ''), 0 === n)) return n - r.style.marginLeft = -1 * n - r.offsetWidth / 2 + 'px' - }, - }, - ]), - e - ) - })(p.BaseTooltip) - ;(_.TEMPLATE = [ - '', - '
', - '', - '', - '
', - ].join('')), - (e.BubbleTooltip = _), - (e.default = m) - }, - function (t, e, n) { - 'use strict' - function r(t) { - return t && t.__esModule ? t : { default: t } - } - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function i(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function l(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var a = (function () { - function t(t, e) { - var n = [], - r = !0, - o = !1, - i = void 0 - try { - for ( - var l, a = t[Symbol.iterator](); - !(r = (l = a.next()).done) && - (n.push(l.value), !e || n.length !== e); - r = !0 - ); - } catch (t) { - ;(o = !0), (i = t) - } finally { - try { - !r && a.return && a.return() - } finally { - if (o) throw i - } - } - return n - } - return function (e, n) { - if (Array.isArray(e)) return e - if (Symbol.iterator in Object(e)) return t(e, n) - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance' - ) - } - })(), - s = function t(e, n, r) { - null === e && (e = Function.prototype) - var o = Object.getOwnPropertyDescriptor(e, n) - if (void 0 === o) { - var i = Object.getPrototypeOf(e) - return null === i ? void 0 : t(i, n, r) - } - if ('value' in o) return o.value - var l = o.get - if (void 0 !== l) return l.call(r) - }, - u = (function () { - function t(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n] - ;(r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r) - } - } - return function (e, n, r) { - return n && t(e.prototype, n), r && t(e, r), e - } - })(), - c = n(2), - f = r(c), - h = n(9), - p = r(h), - d = n(44), - y = r(d), - v = n(15), - b = r(v), - g = n(22), - m = n(26), - _ = r(m), - O = [ - [{ header: ['1', '2', '3', !1] }], - ['bold', 'italic', 'underline', 'link'], - [{ list: 'ordered' }, { list: 'bullet' }], - ['clean'], - ], - w = (function (t) { - function e(t, n) { - o(this, e), - null != n.modules.toolbar && - null == n.modules.toolbar.container && - (n.modules.toolbar.container = O) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return r.quill.container.classList.add('ql-snow'), r - } - return ( - l(e, t), - u(e, [ - { - key: 'extendToolbar', - value: function (t) { - t.container.classList.add('ql-snow'), - this.buildButtons( - [].slice.call(t.container.querySelectorAll('button')), - _.default - ), - this.buildPickers( - [].slice.call(t.container.querySelectorAll('select')), - _.default - ), - (this.tooltip = new x(this.quill, this.options.bounds)), - t.container.querySelector('.ql-link') && - this.quill.keyboard.addBinding( - { key: 'K', shortKey: !0 }, - function (e, n) { - t.handlers.link.call(t, !n.format.link) - } - ) - }, - }, - ]), - e - ) - })(y.default) - w.DEFAULTS = (0, f.default)(!0, {}, y.default.DEFAULTS, { - modules: { - toolbar: { - handlers: { - link: function (t) { - if (t) { - var e = this.quill.getSelection() - if (null == e || 0 == e.length) return - var n = this.quill.getText(e) - ;/^\S+@\S+\.\S+$/.test(n) && - 0 !== n.indexOf('mailto:') && - (n = 'mailto:' + n) - this.quill.theme.tooltip.edit('link', n) - } else this.quill.format('link', !1) - }, - }, - }, - }, - }) - var x = (function (t) { - function e(t, n) { - o(this, e) - var r = i( - this, - (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n) - ) - return (r.preview = r.root.querySelector('a.ql-preview')), r - } - return ( - l(e, t), - u(e, [ - { - key: 'listen', - value: function () { - var t = this - s( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'listen', - this - ).call(this), - this.root - .querySelector('a.ql-action') - .addEventListener('click', function (e) { - t.root.classList.contains('ql-editing') - ? t.save() - : t.edit('link', t.preview.textContent), - e.preventDefault() - }), - this.root - .querySelector('a.ql-remove') - .addEventListener('click', function (e) { - if (null != t.linkRange) { - var n = t.linkRange - t.restoreFocus(), - t.quill.formatText( - n, - 'link', - !1, - p.default.sources.USER - ), - delete t.linkRange - } - e.preventDefault(), t.hide() - }), - this.quill.on( - p.default.events.SELECTION_CHANGE, - function (e, n, r) { - if (null != e) { - if (0 === e.length && r === p.default.sources.USER) { - var o = t.quill.scroll.descendant(b.default, e.index), - i = a(o, 2), - l = i[0], - s = i[1] - if (null != l) { - t.linkRange = new g.Range(e.index - s, l.length()) - var u = b.default.formats(l.domNode) - return ( - (t.preview.textContent = u), - t.preview.setAttribute('href', u), - t.show(), - void t.position(t.quill.getBounds(t.linkRange)) - ) - } - } else delete t.linkRange - t.hide() - } - } - ) - }, - }, - { - key: 'show', - value: function () { - s( - e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), - 'show', - this - ).call(this), - this.root.removeAttribute('data-mode') - }, - }, - ]), - e - ) - })(d.BaseTooltip) - ;(x.TEMPLATE = [ - '', - '', - '', - '', - ].join('')), - (e.default = w) - }, - ]).default -}) -//# sourceMappingURL=quill.min.js.map +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=45)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),l=n(48),a=n(49),s=n(50),u=n(51),c=n(52),f=n(11),h=n(29),p=n(30),d=n(28),y=n(1),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=v},function(t,e,n){"use strict";function r(t,e){var n=i(t);if(null==n)throw new s("Unable to create "+t+" blot");var r=n;return new r(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e),e)}function o(t,n){return void 0===n&&(n=!1),null==t?null:null!=t[e.DATA_KEY]?t[e.DATA_KEY].blot:n?o(t.parentNode,n):null}function i(t,e){void 0===e&&(e=p.ANY);var n;if("string"==typeof t)n=h[t]||u[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=h.text;else if("number"==typeof t)t&p.LEVEL&p.BLOCK?n=h.block:t&p.LEVEL&p.INLINE&&(n=h.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=c[r[o]])break;n=n||f[t.tagName]}return null==n?null:e&p.LEVEL&n.scope&&e&p.TYPE&n.scope?n:null}function l(){for(var t=[],e=0;e1)return t.map(function(t){return l(t)});var n=t[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new s("Invalid definition");if("abstract"===n.blotName)throw new s("Cannot register abstract class");if(h[n.blotName||n.attrName]=n,"string"==typeof n.keyName)u[n.keyName]=n;else if(null!=n.className&&(c[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(t){return t.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach(function(t){null!=f[t]&&null!=n.className||(f[t]=n)})}return n}var a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=this;return e="[Parchment] "+e,n=t.call(this,e)||this,n.message=e,n.name=n.constructor.name,n}return a(e,t),e}(Error);e.ParchmentError=s;var u={},c={},f={},h={};e.DATA_KEY="__blot";var p;!function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(p=e.Scope||(e.Scope={})),e.create=r,e.find=o,e.query=i,e.register=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},a=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return void 0===i||n.call(t,i)},s=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(i)return i(t,e).value}return t[e]};t.exports=function t(){var e,n,r,o,i,c,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,f.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var s=function(){function t(t,e){for(var n=0;n0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(y.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[m.default,y.default.Embed,O.default],e.bubbleFormats=a,e.BlockEmbed=w,e.default=x},function(t,e,n){var r=n(54),o=n(12),i=n(2),l=n(20),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){(t(r)?e:n).push(r)}),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+l.length(e):e.delete?t-e.delete:t},0)},s.prototype.length=function(){return this.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o0&&n.next(i.retain-a)}for(var u=new s(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var d=l.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(d&&(p.attributes=d),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var y=new s(e.rest());return u.concat(y).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&u.push(h)}return u.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;var r=e===t?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}}),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t0){var a,s=[g.default.events.TEXT_CHANGE,l,i,e];if((a=this.emitter).emit.apply(a,[g.default.events.EDITOR_CHANGE].concat(s)),e!==g.default.sources.SILENT){var c;(c=this.emitter).emit.apply(c,s)}}return l}function s(t,e,n,r,o){var i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":c(n))?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),o=o||g.default.sources.API,[t,e,i,o]}function u(t,e,n,r){if(null==t)return null;var o=void 0,i=void 0;if(e instanceof d.default){var l=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r!==g.default.sources.USER)}),a=f(l,2);o=a[0],i=a[1]}else{var s=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),u=f(s,2);o=u[0],i=u[1]}return new x.Range(o,i-o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),this.options=l(e,r),this.container=this.options.container,null==this.container)return P.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new g.default,this.scroll=w.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new v.default(this.scroll),this.selection=new k.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(g.default.events.EDITOR_CHANGE,function(t){t===g.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(g.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;a.call(n,function(){return n.editor.update(null,e,o)},t)});var s=this.clipboard.convert("
"+o+"


");this.setContents(s),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return h(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),A.default.level(t)}},{key:"find",value:function(t){return t.__quill||w.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&P.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||P.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?w.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),h(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;return a.call(this,function(){var r=n.getSelection(!0),i=new d.default;if(null==r)return i;if(w.default.query(t,w.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,o({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,o({},t,e))}return n.setSelection(r,g.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatLine(t,e,l)},o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,e,n,r,o),c=f(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,function(){return i.editor.formatText(t,e,l)},o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=f(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return a.call(this,function(){return o.editor.insertEmbed(e,n,r)},i,e)}},{key:"insertText",value:function(t,e,n,r,o){var i=this,l=void 0,u=s(t,0,n,r,o),c=f(u,4);return t=c[0],l=c[2],o=c[3],a.call(this,function(){return i.editor.insertText(t,e,l)},o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=s(t,e,n),i=f(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){t=new d.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=s(e,n,r),i=f(o,4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new x.Range(e,n),r),r!==g.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API,n=(new d.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,function(){return t=new d.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();S.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},S.events=g.default.events,S.sources=g.default.sources,S.version="1.3.7",S.imports={delta:d.default,parchment:w.default,"core/module":_.default,"core/theme":T.default},e.expandConfig=l,e.overload=s,e.default=S},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(l),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),e}(a.default.Text);e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n1?e-1:0),r=1;r1?n-1:0),o=1;o-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){function r(t){return null===t||void 0===t}function o(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}function i(t,e,n){var i,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return!!s(e)&&(t=l.call(t),e=l.call(e),u(t,e,n));if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(f[i]!=h[i])return!1;for(i=f.length-1;i>=0;i--)if(c=f[i],!u(t[c],e[c],n))return!1;return typeof t==typeof e}var l=Array.prototype.slice,a=n(55),s=n(56),u=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:i(t,e,n))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var n=0;n=t+n)){var l=this.newlineIndex(t,!0)+1,a=i-l+1,s=this.isolate(l,a),u=s.next;s.format(r,o),u instanceof e&&u.formatAt(0,t-l+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(m.default,t),o=a(r,2),i=o[0],l=o[1];i.insertAt(l,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(p.default.create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=p.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof p.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(y.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",e.Code=_,e.default=O},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var a=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":l(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=p},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(47),l=n(27),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=r(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof a.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,o=[],i=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(o.push.apply(o,t.addedNodes),i.push.apply(i,t.removedNodes))}),i.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),o.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var o=r(t);o.next==e&&null!=o.next||(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,e||void 0))})},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),i=n(28),l=n(17),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new i.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===r.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(27),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=i.Scope.INLINE_BLOT,e}(o.default);e.default=l},function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var o=n(12),i=n(2),l={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=i(!0,{},e);n||(r=Object.keys(r).reduce(function(t,e){return null!=r[e]&&(t[e]=r[e]),t},{}));for(var o in t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=l.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=l},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}function e(n,r,o,i,c){function f(n,o){if(null===n)return null;if(0===o)return n;var y,v;if("object"!=typeof n)return n;if(t(n,a))y=new a;else if(t(n,s))y=new s;else if(t(n,u))y=new u(function(t,e){n.then(function(e){t(f(e,o-1))},function(t){e(f(t,o-1))})});else if(e.__isArray(n))y=[];else if(e.__isRegExp(n))y=new RegExp(n.source,l(n)),n.lastIndex&&(y.lastIndex=n.lastIndex);else if(e.__isDate(n))y=new Date(n.getTime());else{if(d&&Buffer.isBuffer(n))return y=Buffer.allocUnsafe?Buffer.allocUnsafe(n.length):new Buffer(n.length),n.copy(y),y;t(n,Error)?y=Object.create(n):void 0===i?(v=Object.getPrototypeOf(n),y=Object.create(v)):(y=Object.create(i),v=i)}if(r){var b=h.indexOf(n);if(-1!=b)return p[b];h.push(n),p.push(y)}t(n,a)&&n.forEach(function(t,e){var n=f(e,o-1),r=f(t,o-1);y.set(n,r)}),t(n,s)&&n.forEach(function(t){var e=f(t,o-1);y.add(e)});for(var g in n){var m;v&&(m=Object.getOwnPropertyDescriptor(v,g)),m&&null==m.set||(y[g]=f(n[g],o-1))}if(Object.getOwnPropertySymbols)for(var _=Object.getOwnPropertySymbols(n),g=0;g<_.length;g++){var O=_[g],w=Object.getOwnPropertyDescriptor(n,O);(!w||w.enumerable||c)&&(y[O]=f(n[O],o-1),w.enumerable||Object.defineProperty(y,O,{enumerable:!1}))}if(c)for(var x=Object.getOwnPropertyNames(n),g=0;g1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.index=e,this.length=n},O=function(){function t(e,n){var r=this;i(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,v.default.sources.USER),1)}),this.emitter.on(v.default.events.EDITOR_CHANGE,function(t,e){t===v.default.events.TEXT_CHANGE&&e.length()>0&&r.update(v.default.sources.SILENT)}),this.emitter.on(v.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(v.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}}),this.emitter.on(v.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;r.setNativeRange(o,i,l,a)}}),this.update(v.default.sources.SILENT)}return s(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(v.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!c.default.query(t,c.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c.default.find(n.start.node,!1);if(null==r)return;if(r instanceof c.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),i=a(o,2),l=i[0],s=i[1];if(null==l)return null;var u=l.position(s,!0),c=a(u,2);r=c[0],s=c[1];var f=document.createRange();if(e>0){f.setStart(r,s);var h=this.scroll.leaf(t+e),p=a(h,2);if(l=p[0],s=p[1],null==l)return null;var d=l.position(s,!0),y=a(d,2);return r=y[0],s=y[1],f.setEnd(r,s),f.getBoundingClientRect()}var v="left",b=void 0;return r instanceof Text?(s0&&(v="right")),{bottom:b.top+b.height,height:b.height,left:b[v],right:b[v],top:b.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return m.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map(function(t){var n=a(t,2),r=n[0],o=n[1],i=c.default.find(r,!0),l=i.offset(e.scroll);return 0===o?l:i instanceof c.default.Container?l+i.length():l+i.index(r,o)}),i=Math.min(Math.max.apply(Math,o(r)),this.scroll.length()-1),l=Math.min.apply(Math,[i].concat(o(r)));return new _(l,i-l)}},{key:"normalizeNative",value:function(t){if(!l(this.root,t.startContainer)||!t.collapsed&&!l(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach(function(t,n){t=Math.min(o-1,t);var i=void 0,l=e.scroll.leaf(t),s=a(l,2),u=s[0],c=s[1],f=u.position(c,0!==n),h=a(f,2);i=h[0],c=h[1],r.push(i,c)}),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),i=a(o,1),l=i[0],s=l;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,r));s=a(u,1)[0]}if(null!=l&&null!=s){var c=t.getBoundingClientRect();n.topc.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(m.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.default.sources.API;if("string"==typeof e&&(n=e,e=!1),m.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,o(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.default.sources.USER,e=this.lastRange,n=this.getRange(),r=a(n,2),o=r[0],i=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,d.default)(e,this.lastRange)){var l;!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode&&this.cursor.restore();var s=[v.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(e),t];if((l=this.emitter).emit.apply(l,[v.default.events.EDITOR_CHANGE].concat(s)),t!==v.default.sources.SILENT){var u;(u=this.emitter).emit.apply(u,s)}}}}]),t}();e.Range=_,e.default=O},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),s=r(a),u=n(3),c=r(u),f=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,t),e}(s.default.Container);f.allowedChildren=[c.default,u.BlockEmbed,f],e.default=f},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var l=function(){function t(t,e){for(var n=0;n1){var u=o.formats(),c=this.quill.getFormat(t.index-1,1);i=A.default.attributes.diff(u,c)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,S.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,S.default.sources.USER),this.quill.focus()}}function c(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,i=this.quill.getLine(t.index),l=b(i,1),a=l[0];if(e.offset>=a.length()-1){var s=this.quill.getLine(t.index+1),u=b(s,1),c=u[0];if(c){var f=a.formats(),h=this.quill.getFormat(t.index,1);r=A.default.attributes.diff(f,h)||{},o=c.length()}}this.quill.deleteText(t.index,n,S.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,S.default.sources.USER)}}function f(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=A.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,S.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,S.default.sources.USER),this.quill.setSelection(t.index,S.default.sources.SILENT),this.quill.focus()}function h(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return T.default.query(n,T.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],S.default.sources.USER))})}function p(t){return{key:D.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=T.default.query("code-block"),r=e.index,o=e.length,i=this.quill.scroll.descendant(n,r),l=b(i,2),a=l[0],s=l[1];if(null!=a){var u=this.quill.getIndex(a),c=a.newlineIndex(s,!0)+1,f=a.newlineIndex(u+s+o),h=a.domNode.textContent.slice(c,f).split("\n");s=0,h.forEach(function(e,i){t?(a.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=e.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(r,o,S.default.sources.SILENT)}}}}function d(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],S.default.sources.USER)}}}function y(t){if("string"==typeof t||"number"==typeof t)return y({key:t});if("object"===(void 0===t?"undefined":v(t))&&(t=(0,_.default)(t,!1)),"string"==typeof t.key)if(null!=D.keys[t.key.toUpperCase()])t.key=D.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[B]=t.shortKey,delete t.shortKey),t}Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=y(t);if(null==r||null==r.key)return I.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,k.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,o=(t.bindings[r]||[]).filter(function(t){return e.match(n,t)});if(0!==o.length){var i=t.quill.getSelection();if(null!=i&&t.quill.hasFocus()){var l=t.quill.getLine(i.index),a=b(l,2),s=a[0],u=a[1],c=t.quill.getLeaf(i.index),f=b(c,2),h=f[0],p=f[1],d=0===i.length?[h,p]:t.quill.getLeaf(i.index+i.length),y=b(d,2),g=y[0],m=y[1],_=h instanceof T.default.Text?h.value().slice(0,p):"",O=g instanceof T.default.Text?g.value().slice(m):"",x={collapsed:0===i.length,empty:0===i.length&&s.length()<=1,format:t.quill.getFormat(i),offset:u,prefix:_,suffix:O};o.some(function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==x.format[t]}))return!1}else if("object"===v(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,w.default)(e.format[t],x.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix))&&(!(null!=e.suffix&&!e.suffix.test(x.suffix))&&!0!==e.handler.call(t,i,x))})&&n.preventDefault()}}}})}}]),e}(R.default);D.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},D.DEFAULTS={bindings:{bold:d("bold"),italic:d("italic"),underline:d("underline"),indent:{key:D.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:D.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",S.default.sources.USER)}},"outdent backspace":{key:D.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",S.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":p(!0),"outdent code-block":p(!1),"remove tab":{key:D.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,S.default.sources.USER)}},tab:{key:D.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new N.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,S.default.sources.SILENT)}},"list empty enter":{key:D.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,S.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:D.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=b(e,2),r=n[0],o=n[1],i=(0,k.default)({},r.formats(),{list:"checked"}),l=(new N.default).retain(t.index).insert("\n",i).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:D.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=b(n,2),o=r[0],i=r[1],l=(new N.default).retain(t.index).insert("\n",e.format).retain(o.length()-i-1).retain(1,{header:null});this.quill.updateContents(l,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=b(r,2),i=o[0],l=o[1];if(l>n)return!0;var a=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(t.index," ",S.default.sources.USER),this.quill.history.cutoff();var s=(new N.default).retain(t.index-l).delete(n+1).retain(i.length()-2-l).retain(1,{list:a});this.quill.updateContents(s,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,S.default.sources.SILENT)}},"code exit":{key:D.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=b(e,2),r=n[0],o=n[1],i=(new N.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(i,S.default.sources.USER)}},"embed left":s(D.keys.LEFT,!1),"embed left shift":s(D.keys.LEFT,!0),"embed right":s(D.keys.RIGHT,!1),"embed right shift":s(D.keys.RIGHT,!0)}},e.default=D,e.SHORTKEY=B},function(t,e,n){"use strict";t.exports={align:{"":n(75),center:n(76),right:n(77),justify:n(78)},background:n(79),blockquote:n(80),bold:n(81),clean:n(82),code:n(40),"code-block":n(40),color:n(83),direction:{"":n(84),rtl:n(85)},float:{center:n(86),full:n(87),left:n(88),right:n(89)},formula:n(90),header:{1:n(91),2:n(92)},italic:n(93),image:n(94),indent:{"+1":n(95),"-1":n(96)},link:n(97),list:{ordered:n(98),bullet:n(99),check:n(100)},script:{sub:n(101),super:n(102)},strike:n(103),underline:n(104),video:n(105)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=n(29),i=n(30),l=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=a},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=r(t,this.keyName)[0]||"",n=e.slice(this.keyName.length+1);return this.canAdd(t,n)?n:""},e}(i.default);e.default=l},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(i.default);e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;nr.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.leftr.bottom){var l=o.bottom-o.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var u=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,v.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,v.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=a(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,v.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",v.default.sources.USER),this.quill.setSelection(r+2,v.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(A.default);e.BaseTooltip=M,e.default=L},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(46),i=r(o),l=n(34),a=n(36),s=n(62),u=n(63),c=r(u),f=n(64),h=r(f),p=n(65),d=r(p),y=n(35),v=n(24),b=n(37),g=n(38),m=n(39),_=r(m),O=n(66),w=r(O),x=n(15),k=r(x),E=n(67),N=r(E),j=n(68),A=r(j),q=n(69),T=r(q),P=n(70),S=r(P),C=n(71),L=r(C),M=n(13),R=r(M),I=n(72),B=r(I),D=n(73),U=r(D),F=n(74),H=r(F),K=n(26),z=r(K),V=n(16),Z=r(V),W=n(41),G=r(W),Y=n(42),X=r(Y),$=n(43),Q=r($),J=n(107),tt=r(J),et=n(108),nt=r(et);i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":g.SizeStyle},!0),i.default.register({"formats/align":l.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":b.FontClass,"formats/size":g.SizeClass,"formats/blockquote":c.default,"formats/code-block":R.default,"formats/header":h.default,"formats/list":d.default,"formats/bold":_.default,"formats/code":M.Code,"formats/italic":w.default,"formats/link":k.default,"formats/script":N.default,"formats/strike":A.default,"formats/underline":T.default,"formats/image":S.default,"formats/video":L.default,"formats/list/item":p.ListItem,"modules/formula":B.default,"modules/syntax":U.default,"modules/toolbar":H.default,"themes/bubble":tt.default,"themes/snow":nt.default,"ui/icons":z.default,"ui/picker":Z.default,"ui/icon-picker":X.default,"ui/color-picker":G.default,"ui/tooltip":Q.default},!0),e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=r(o),l=n(6),a=r(l),s=n(3),u=r(s),c=n(14),f=r(c),h=n(23),p=r(h),d=n(31),y=r(d),v=n(33),b=r(v),g=n(5),m=r(g),_=n(59),O=r(_),w=n(8),x=r(w),k=n(60),E=r(k),N=n(61),j=r(N),A=n(25),q=r(A);a.default.register({"blots/block":u.default,"blots/block/embed":s.BlockEmbed,"blots/break":f.default,"blots/container":p.default,"blots/cursor":y.default,"blots/embed":b.default,"blots/inline":m.default,"blots/scroll":O.default,"blots/text":x.default,"modules/clipboard":E.default,"modules/history":j.default,"modules/keyboard":q.default}),i.default.register(u.default,f.default,y.default,m.default,O.default,x.default),e.default=a.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),i=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,l),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)e.push(l.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&a(t.parent))},s=function(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(s),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=i.find(t,!1);a(e,!1),e instanceof o.default&&e.children.forEach(function(t){a(t,!1)})})):"attributes"===t.type&&a(e.prev)),a(e))}),this.children.forEach(s),u=[].slice.call(this.observer.takeRecords()),l=u.slice();l.length>0;)e.push(l.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),e=e||this.observer.takeRecords(),e.map(function(t){var e=i.find(t.target,!0);return null==e?null:null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==r&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[],n)}),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=a},function(t,e,n){"use strict";function r(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){if(null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)){this.isolate(e,n).format(r,o)}else t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&r(o,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=l.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=i.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),l=i.create(n,r);o.parent.insertBefore(l,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(o.default);e.default=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),i=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=i.Scope.INLINE_BLOT,e}(o.default);e.default=l},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;ie.length?t:e,l=t.length>e.length?e:t,a=i.indexOf(l);if(-1!=a)return r=[[y,i.substring(0,a)],[v,l],[y,i.substring(a+l.length)]],t.length>e.length&&(r[0][0]=r[2][0]=d),r;if(1==l.length)return[[d,t],[y,e]];var u=s(t,e);if(u){var c=u[0],f=u[1],h=u[2],p=u[3],b=u[4],g=n(c,h),m=n(f,p);return g.concat([[v,b]],m)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,o=Math.ceil((n+r)/2),l=o,a=2*o,s=new Array(a),u=new Array(a),c=0;cn)v+=2;else if(x>r)p+=2;else if(h){var k=l+f-_;if(k>=0&&k=E)return i(t,e,O,x)}}}for(var N=-m+b;N<=m-g;N+=2){var E,k=l+N;E=N==-m||N!=m&&u[k-1]n)g+=2;else if(j>r)b+=2;else if(!h){var w=l+f-N;if(w>=0&&w=E)return i(t,e,O,x)}}}}return[[d,t],[y,e]]}function i(t,e,r,o){var i=t.substring(0,r),l=e.substring(0,o),a=t.substring(r),s=e.substring(o),u=n(i,l),c=n(a,s);return u.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n=t.length?[r,o,i,s,f]:null}var r=t.length>e.length?t:e,o=t.length>e.length?e:t;if(r.length<4||2*o.lengthu[4].length?s:u:s;var c,f,h,p;return t.length>e.length?(c=i[0],f=i[1],h=i[2],p=i[3]):(h=i[0],p=i[1],c=i[2],f=i[3]),[c,f,h,p,i[4]]}function u(t){t.push([v,""]);for(var e,n=0,r=0,o=0,i="",s="";n1?(0!==r&&0!==o&&(e=l(s,i),0!==e&&(n-r-o>0&&t[n-r-o-1][0]==v?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,[v,s.substring(0,e)]),n++),s=s.substring(e),i=i.substring(e)),0!==(e=a(s,i))&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),i=i.substring(0,i.length-e))),0===r?t.splice(n-o,r+o,[y,s]):0===o?t.splice(n-r,r+o,[d,i]):t.splice(n-r-o,r+o,[d,i],[y,s]),n=n-r-o+(r?1:0)+(o?1:0)+1):0!==n&&t[n-1][0]==v?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(n=1;n0&&r.splice(o+2,0,[l[0],a]),p(r,o,3)}return t}function h(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=2;r=55296&&t.charCodeAt(t.length-1)<=56319}(t[r-2][1])&&t[r-1][0]===d&&n(t[r-1][1])&&t[r][0]===y&&n(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));if(!e)return t;for(var o=[],r=0;r0&&o.push(t[r]);return o}function p(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1=r&&!a.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,a);var c=e.scroll.line(t),f=u(c,2),h=f[0],p=f[1],y=(0,T.default)({},(0,O.bubbleFormats)(h));if(h instanceof w.default){var b=h.descendant(v.default.Leaf,p),g=u(b,1),m=g[0];y=(0,T.default)(y,(0,O.bubbleFormats)(m))}l=d.default.attributes.diff(y,l)||{}}else if("object"===s(o.insert)){var _=Object.keys(o.insert)[0];if(null==_)return t;e.scroll.insertAt(t,_,o.insert[_])}r+=i}return Object.keys(l).forEach(function(n){e.scroll.formatAt(t,i,n,l[n])}),t+i},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new h.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e){var i=e.length();if(e instanceof g.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i})}}),this.scroll.optimize(),this.update((new h.default).retain(t).retain(e,(0,N.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new h.default).retain(t).retain(e,(0,N.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new h.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=u(t,1),o=e[0];o instanceof w.default?n.push(o):o instanceof v.default.Leaf&&r.push(o)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(v.default.Leaf,t,e));var o=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,O.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=l((0,O.bubbleFormats)(n),e)}return e});return T.default.apply(T.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new h.default).retain(t).insert(o({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new h.default).retain(t).insert(e,(0,N.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===w.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof k.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=u(r,2),i=o[0],l=o[1],a=0,s=new h.default;null!=i&&(a=i instanceof g.default?i.newlineIndex(l)-l+1:i.length()-l,s=i.delta().slice(l,l+a-1).insert("\n"));var c=this.getContents(t,e+a),f=c.diff((new h.default).insert(n).concat(s)),p=(new h.default).retain(t).concat(f);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(P)&&v.default.find(e[0].target)){var o=v.default.find(e[0].target),i=(0,O.bubbleFormats)(o),l=o.offset(this.scroll),a=e[0].oldValue.replace(_.default.CONTENTS,""),s=(new h.default).insert(a),u=(new h.default).insert(o.value());t=(new h.default).retain(l).concat(s.diff(u,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new h.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,A.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();e.default=S},function(t,e){"use strict";function n(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new n,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,l="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(l=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(l?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=l?l+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o0){if(i instanceof y.BlockEmbed||f instanceof y.BlockEmbed)return void this.optimize();if(i instanceof _.default){var h=i.newlineIndex(i.length(),!0);if(h>-1&&(i=i.split(h+1))===f)return void this.optimize()}else if(f instanceof _.default){var p=f.newlineIndex(0);p>-1&&f.split(p+1)}var d=f.children.head instanceof g.default?null:f.children.head;i.moveChildren(f,d),i.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==h.default.query(n,h.default.Scope.BLOCK)){var o=h.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var i=h.default.create(n,r);this.appendChild(i)}else c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===h.default.Scope.INLINE_BLOT){var r=h.default.create(this.statics.defaultChild);r.appendChild(t),t=r}c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(a,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,function(e,n,r){a(e)?o.push(e):e instanceof h.default.Container&&(o=o.concat(t(e,n,i))),i-=r}),o}(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(d.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=d.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE,n,t),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(d.default.events.SCROLL_UPDATE,n,t)}}}]),e}(h.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[v.default,y.BlockEmbed,w.default],e.default=x},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e,n){return"object"===(void 0===e?"undefined":x(e))?Object.keys(e).reduce(function(t,n){return s(t,n,e[n])},t):t.reduce(function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,j.default)({},o({},e,n),r.attributes))},new q.default)}function u(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function c(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function h(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce(function(e,n){return n(t,e)},new q.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(r,o){var i=h(o,e,n);return o.nodeType===t.ELEMENT_NODE&&(i=e.reduce(function(t,e){return e(o,t)},i),i=(o[W]||[]).reduce(function(t,e){return e(o,t)},i)),r.concat(i)},new q.default):new q.default}function p(t,e,n){return s(n,t,!0)}function d(t,e){var n=P.default.Attributor.Attribute.keys(t),r=P.default.Attributor.Class.keys(t),o=P.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=P.default.query(e,P.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(n=Y[e],null==n||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=X[e])||n.attrName!==e&&n.keyName!==e||(n=X[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=s(e,i)),e}function y(t,e){var n=P.default.query(t);if(null==n)return e;if(n.prototype instanceof P.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new q.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=s(e,n.blotName,n.formats(t)));return e}function v(t,e){return c(e,"\n")||e.insert("\n"),e}function b(){return new q.default}function g(t,e){var n=P.default.query(t);if(null==n||"list-item"!==n.blotName||!c(e,"\n"))return e;for(var r=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(P.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new q.default).retain(e.length()-1).retain(1,{indent:r}))}function m(t,e){return c(e,"\n")||(f(t)||e.length()>0&&t.nextSibling&&f(t.nextSibling))&&e.insert("\n"),e}function _(t,e){if(f(t)&&null!=t.nextElementSibling&&!c(e,"\n\n")){var n=t.offsetHeight+parseFloat(u(t).marginTop)+parseFloat(u(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function O(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===u(t).fontStyle&&(n.italic=!0),r.fontWeight&&(u(t).fontWeight.startsWith("bold")||parseInt(u(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=s(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new q.default).insert("\t").concat(e)),e}function w(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!u(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return e=e.replace(/[^\u00a0]/g,""),e.length<1&&t?" ":e};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&f(t.parentNode)||null!=t.previousSibling&&f(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&f(t.parentNode)||null!=t.nextSibling&&f(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(){function t(t,e){for(var n=0;n\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[F.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new q.default).insert(n,o({},F.default.blotName,e[F.default.blotName]))}var r=this.prepareMatching(),i=k(r,2),l=i[0],a=i[1],s=h(this.container,l,a);return c(s,"\n")&&null==s.ops[s.ops.length-1].attributes&&(s=s.compose((new q.default).retain(s.length()-1).delete(1))),Z.log("convert",this.container.innerHTML,s),this.container.innerHTML="",s}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,C.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new q.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),C.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new q.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(C.default.sources.SILENT),setTimeout(function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,C.default.sources.USER),e.quill.setSelection(r.length()-n.length,C.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var o=k(r,2),i=o[0],l=o[1];switch(i){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(i),function(t){t[W]=t[W]||[],t[W].push(l)})}}),[e,n]}}]),e}(I.default);$.DEFAULTS={matchers:[],matchVisual:!0},e.default=$,e.matchAttributor=d,e.matchBlot=y,e.matchNewline=m,e.matchSpacing=_,e.matchText=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=f.default.query(t,f.default.Scope.BLOCK)}))}function s(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return a(t)&&(n-=1),n}Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var u=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(y.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=v,e.getLastChangeIndex=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var l=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return o({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof v)u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=f.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(y.default);b.blotName="list",b.scope=f.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[v],e.ListItem=v,e.default=b},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(39),a=function(t){return t&&t.__esModule?t:{default:t}}(l),s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),e}(a.default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,c.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(u.default.Embed);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return c.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var a=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(v.default);b.className="ql-syntax";var g=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),m=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var l=null;return r.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(l),l=setTimeout(function(){r.highlight(),l=null},r.options.interval)}),r.highlight(),r}return l(e,t),a(e,null,[{key:"register",value:function(){h.default.register(g,!0),h.default.register(b,!0)}}]),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(h.default.sources.SILENT),null!=e&&this.quill.setSelection(e,h.default.sources.SILENT)}}}]),e}(d.default);m.DEFAULTS={highlight:function(){return null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value}}(),interval:1e3},e.CodeBlock=b,e.CodeToken=g,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function u(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)s(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?c(n,e,r):s(n,e,r)}}),t.appendChild(n)})}function c(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var f=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;n '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var a=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},s=function(){function t(t,e){for(var n=0;n0&&o===h.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var l=i[i.length-1],a=r.quill.getIndex(l),s=Math.min(l.length()-1,e.index+e.length-a),u=r.quill.getBounds(new y.Range(a,s));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(p.BaseTooltip);_.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=_,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)},u=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=w}]).default}); +//# sourceMappingURL=quill.min.js.map \ No newline at end of file diff --git a/packages/uni-app-vite/lib/template/__uniappquillimageresize.js b/packages/uni-app-vite/lib/template/__uniappquillimageresize.js index 9abab8783f..7c788a5a89 100644 --- a/packages/uni-app-vite/lib/template/__uniappquillimageresize.js +++ b/packages/uni-app-vite/lib/template/__uniappquillimageresize.js @@ -1,1677 +1 @@ -!(function (t, e) { - 'object' == typeof exports && 'object' == typeof module - ? (module.exports = e()) - : 'function' == typeof define && define.amd - ? define([], e) - : 'object' == typeof exports - ? (exports.ImageResize = e()) - : (t.ImageResize = e()) -})(this, function () { - return (function (t) { - function e(o) { - if (n[o]) return n[o].exports - var r = (n[o] = { i: o, l: !1, exports: {} }) - return t[o].call(r.exports, r, r.exports, e), (r.l = !0), r.exports - } - var n = {} - return ( - (e.m = t), - (e.c = n), - (e.i = function (t) { - return t - }), - (e.d = function (t, n, o) { - e.o(t, n) || - Object.defineProperty(t, n, { - configurable: !1, - enumerable: !0, - get: o, - }) - }), - (e.n = function (t) { - var n = - t && t.__esModule - ? function () { - return t.default - } - : function () { - return t - } - return e.d(n, 'a', n), n - }), - (e.o = function (t, e) { - return Object.prototype.hasOwnProperty.call(t, e) - }), - (e.p = ''), - e((e.s = 39)) - ) - })([ - function (t, e) { - function n(t) { - var e = typeof t - return null != t && ('object' == e || 'function' == e) - } - t.exports = n - }, - function (t, e, n) { - var o = n(22), - r = 'object' == typeof self && self && self.Object === Object && self, - i = o || r || Function('return this')() - t.exports = i - }, - function (t, e) { - function n(t) { - return null != t && 'object' == typeof t - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - var e = -1, - n = null == t ? 0 : t.length - for (this.clear(); ++e < n; ) { - var o = t[e] - this.set(o[0], o[1]) - } - } - var r = n(76), - i = n(77), - u = n(78), - c = n(79), - a = n(80) - ;(o.prototype.clear = r), - (o.prototype.delete = i), - (o.prototype.get = u), - (o.prototype.has = c), - (o.prototype.set = a), - (t.exports = o) - }, - function (t, e, n) { - function o(t, e) { - for (var n = t.length; n--; ) if (r(t[n][0], e)) return n - return -1 - } - var r = n(8) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return null == t - ? void 0 === t - ? a - : c - : s && s in Object(t) - ? i(t) - : u(t) - } - var r = n(16), - i = n(65), - u = n(88), - c = '[object Null]', - a = '[object Undefined]', - s = r ? r.toStringTag : void 0 - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - var n = t.__data__ - return r(e) ? n['string' == typeof e ? 'string' : 'hash'] : n.map - } - var r = n(74) - t.exports = o - }, - function (t, e, n) { - var o = n(11), - r = o(Object, 'create') - t.exports = r - }, - function (t, e) { - function n(t, e) { - return t === e || (t !== t && e !== e) - } - t.exports = n - }, - function (t, e, n) { - 'use strict' - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - n.d(e, 'a', function () { - return r - }) - var r = function t(e) { - o(this, t), - (this.onCreate = function () {}), - (this.onDestroy = function () {}), - (this.onUpdate = function () {}), - (this.overlay = e.overlay), - (this.img = e.img), - (this.options = e.options), - (this.requestUpdate = e.onUpdate) - } - }, - function (t, e, n) { - function o(t, e, n) { - '__proto__' == e && r - ? r(t, e, { - configurable: !0, - enumerable: !0, - value: n, - writable: !0, - }) - : (t[e] = n) - } - var r = n(21) - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - var n = i(t, e) - return r(n) ? n : void 0 - } - var r = n(49), - i = n(66) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return null != t && i(t.length) && !r(t) - } - var r = n(13), - i = n(31) - t.exports = o - }, - function (t, e, n) { - function o(t) { - if (!i(t)) return !1 - var e = r(t) - return e == c || e == a || e == u || e == s - } - var r = n(5), - i = n(0), - u = '[object AsyncFunction]', - c = '[object Function]', - a = '[object GeneratorFunction]', - s = '[object Proxy]' - t.exports = o - }, - function (t, e) { - t.exports = function (t) { - return ( - t.webpackPolyfill || - ((t.deprecate = function () {}), - (t.paths = []), - t.children || (t.children = []), - Object.defineProperty(t, 'loaded', { - enumerable: !0, - get: function () { - return t.l - }, - }), - Object.defineProperty(t, 'id', { - enumerable: !0, - get: function () { - return t.i - }, - }), - (t.webpackPolyfill = 1)), - t - ) - } - }, - function (t, e, n) { - var o = n(11), - r = n(1), - i = o(r, 'Map') - t.exports = i - }, - function (t, e, n) { - var o = n(1), - r = o.Symbol - t.exports = r - }, - function (t, e) { - function n(t, e, n) { - switch (n.length) { - case 0: - return t.call(e) - case 1: - return t.call(e, n[0]) - case 2: - return t.call(e, n[0], n[1]) - case 3: - return t.call(e, n[0], n[1], n[2]) - } - return t.apply(e, n) - } - t.exports = n - }, - function (t, e, n) { - function o(t, e, n) { - ;((void 0 === n || i(t[e], n)) && (void 0 !== n || e in t)) || - r(t, e, n) - } - var r = n(10), - i = n(8) - t.exports = o - }, - function (t, e, n) { - function o(t, e, n, p, l) { - t !== e && - u( - e, - function (u, s) { - if ((l || (l = new r()), a(u))) c(t, e, s, n, o, p, l) - else { - var d = p ? p(f(t, s), u, s + '', t, e, l) : void 0 - void 0 === d && (d = u), i(t, s, d) - } - }, - s - ) - } - var r = n(42), - i = n(18), - u = n(47), - c = n(52), - a = n(0), - s = n(33), - f = n(26) - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - return u(i(t, e, r), t + '') - } - var r = n(27), - i = n(90), - u = n(91) - t.exports = o - }, - function (t, e, n) { - var o = n(11), - r = (function () { - try { - var t = o(Object, 'defineProperty') - return t({}, '', {}), t - } catch (t) {} - })() - t.exports = r - }, - function (t, e, n) { - ;(function (e) { - var n = 'object' == typeof e && e && e.Object === Object && e - t.exports = n - }.call(e, n(105))) - }, - function (t, e, n) { - var o = n(89), - r = o(Object.getPrototypeOf, Object) - t.exports = r - }, - function (t, e) { - function n(t, e) { - var n = typeof t - return ( - !!(e = null == e ? o : e) && - ('number' == n || ('symbol' != n && r.test(t))) && - t > -1 && - t % 1 == 0 && - t < e - ) - } - var o = 9007199254740991, - r = /^(?:0|[1-9]\d*)$/ - t.exports = n - }, - function (t, e) { - function n(t) { - var e = t && t.constructor - return t === (('function' == typeof e && e.prototype) || o) - } - var o = Object.prototype - t.exports = n - }, - function (t, e) { - function n(t, e) { - if ( - ('constructor' !== e || 'function' != typeof t[e]) && - '__proto__' != e - ) - return t[e] - } - t.exports = n - }, - function (t, e) { - function n(t) { - return t - } - t.exports = n - }, - function (t, e, n) { - var o = n(48), - r = n(2), - i = Object.prototype, - u = i.hasOwnProperty, - c = i.propertyIsEnumerable, - a = o( - (function () { - return arguments - })() - ) - ? o - : function (t) { - return r(t) && u.call(t, 'callee') && !c.call(t, 'callee') - } - t.exports = a - }, - function (t, e) { - var n = Array.isArray - t.exports = n - }, - function (t, e, n) { - ;(function (t) { - var o = n(1), - r = n(103), - i = 'object' == typeof e && e && !e.nodeType && e, - u = i && 'object' == typeof t && t && !t.nodeType && t, - c = u && u.exports === i, - a = c ? o.Buffer : void 0, - s = a ? a.isBuffer : void 0, - f = s || r - t.exports = f - }.call(e, n(14)(t))) - }, - function (t, e) { - function n(t) { - return 'number' == typeof t && t > -1 && t % 1 == 0 && t <= o - } - var o = 9007199254740991 - t.exports = n - }, - function (t, e, n) { - var o = n(50), - r = n(55), - i = n(87), - u = i && i.isTypedArray, - c = u ? r(u) : o - t.exports = c - }, - function (t, e, n) { - function o(t) { - return u(t) ? r(t, !0) : i(t) - } - var r = n(44), - i = n(51), - u = n(12) - t.exports = o - }, - function (t, e, n) { - 'use strict' - e.a = { modules: ['DisplaySize', 'Toolbar', 'Resize'] } - }, - function (t, e, n) { - 'use strict' - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function r(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - n.d(e, 'a', function () { - return c - }) - var u = n(9), - c = (function (t) { - function e() { - var t, n, i, u - o(this, e) - for (var c = arguments.length, a = Array(c), s = 0; s < c; s++) - a[s] = arguments[s] - return ( - (n = i = - r( - this, - (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply( - t, - [this].concat(a) - ) - )), - (i.onCreate = function () { - ;(i.display = document.createElement('div')), - i.display.classList.add('ql-image-size'), - i.overlay.appendChild(i.display) - }), - (i.onDestroy = function () {}), - (i.onUpdate = function () { - if (i.display && i.img) { - var t = i.getCurrentSize() - ;(i.display.innerHTML = t.join(' × ')), - Object.assign(i.display.style, { - right: '4px', - top: '4px', - left: 'auto', - }) - } - }), - (i.getCurrentSize = function () { - return [ - i.img.width, - Math.round( - (i.img.width / i.img.naturalWidth) * i.img.naturalHeight - ), - ] - }), - (u = n), - r(i, u) - ) - } - return i(e, t), e - })(u.a) - }, - function (t, e, n) { - 'use strict' - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function r(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - n.d(e, 'a', function () { - return f - }) - var u = n(9), - c = navigator.maxTouchPoints, - a = !1 - try { - var s = Object.defineProperty({}, 'passive', { - get: function () { - a = { passive: !1 } - }, - }) - window.addEventListener('test', null, s) - } catch (t) {} - var f = (function (t) { - function e() { - var t, n, i, u - o(this, e) - for (var s = arguments.length, f = Array(s), p = 0; p < s; p++) - f[p] = arguments[p] - return ( - (n = i = - r( - this, - (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply( - t, - [this].concat(f) - ) - )), - (i.onCreate = function () { - ;(i.boxes = []), - i.addBox('nwse-resize'), - i.addBox('nesw-resize'), - i.addBox('nwse-resize'), - i.addBox('nesw-resize'), - i.positionBoxes() - }), - (i.onDestroy = function () { - i.setCursor('') - }), - (i.positionBoxes = function () { - ;[ - { left: '-6px', top: '-6px' }, - { right: '-6px', top: '-6px' }, - { right: '-6px', bottom: '-6px' }, - { left: '-6px', bottom: '-6px' }, - ].forEach(function (t, e) { - Object.assign(i.boxes[e].style, t) - }) - }), - (i.addBox = function (t) { - var e = document.createElement('div') - e.classList.add('ql-image-handle'), - (e.style.cursor = t), - e.addEventListener( - c ? 'touchstart' : 'mousedown', - i.handleMousedown, - !1 - ), - i.overlay.appendChild(e), - i.boxes.push(e) - }), - (i.handleMousedown = function (t) { - i.dragBox = t.target - var e = c ? t.changedTouches[0] : t - ;(i.dragStartX = e.clientX), - (i.preDragWidth = i.img.width || i.img.naturalWidth), - i.setCursor(i.dragBox.style.cursor), - document.addEventListener( - c ? 'touchmove' : 'mousemove', - i.handleDrag, - a - ), - document.addEventListener( - c ? 'touchend' : 'mouseup', - i.handleMouseup, - !1 - ) - }), - (i.handleMouseup = function () { - i.setCursor(''), - document.removeEventListener( - c ? 'touchmove' : 'mousemove', - i.handleDrag - ), - document.removeEventListener( - c ? 'touchend' : 'mouseup', - i.handleMouseup - ) - }), - (i.handleDrag = function (t) { - if (i.img) { - var e = c ? t.changedTouches[0] : t, - n = e.clientX - i.dragStartX - i.dragBox === i.boxes[0] || i.dragBox === i.boxes[3] - ? (i.img.width = Math.round(i.preDragWidth - n)) - : (i.img.width = Math.round(i.preDragWidth + n)), - i.requestUpdate(), - t.preventDefault() - } - }), - (i.setCursor = function (t) { - ;[document.body, i.img].forEach(function (e) { - e.style.cursor = t - }) - }), - (u = n), - r(i, u) - ) - } - return i(e, t), e - })(u.a) - }, - function (t, e, n) { - 'use strict' - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - function r(t, e) { - if (!t) - throw new ReferenceError( - "this hasn't been initialised - super() hasn't been called" - ) - return !e || ('object' != typeof e && 'function' != typeof e) ? t : e - } - function i(t, e) { - if ('function' != typeof e && null !== e) - throw new TypeError( - 'Super expression must either be null or a function, not ' + - typeof e - ) - ;(t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - e && - (Object.setPrototypeOf - ? Object.setPrototypeOf(t, e) - : (t.__proto__ = e)) - } - n.d(e, 'a', function () { - return c - }) - var u = n(9), - c = (function (t) { - function e() { - var t, n, i, u - o(this, e) - for (var c = arguments.length, a = Array(c), s = 0; s < c; s++) - a[s] = arguments[s] - return ( - (n = i = - r( - this, - (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply( - t, - [this].concat(a) - ) - )), - (i.onCreate = function () { - ;(i.toolbar = document.createElement('div')), - i.toolbar.classList.add('ql-image-toolbar'), - i.overlay.appendChild(i.toolbar), - i._addToolbarButtons() - }), - (i.onDestroy = function () {}), - (i.onUpdate = function () {}), - (i._addToolbarButtons = function () { - var t = document.createElement('span') - t.classList.add('triangle-up'), i.toolbar.appendChild(t) - var e = document.createElement('span') - ;(e.innerText = '删除'), - e.addEventListener('click', function () { - var t = new CustomEvent('keyup') - ;(t.keyCode = 46), document.dispatchEvent(t) - }), - i.toolbar.appendChild(e) - }), - (u = n), - r(i, u) - ) - } - return i(e, t), e - })(u.a) - }, - function (t, e, n) { - var o = n(17), - r = n(20), - i = n(64), - u = n(102), - c = r(function (t) { - return t.push(void 0, i), o(u, void 0, t) - }) - t.exports = c - }, - function (t, e, n) { - 'use strict' - function o(t, e) { - if (!(t instanceof e)) - throw new TypeError('Cannot call a class as a function') - } - Object.defineProperty(e, '__esModule', { value: !0 }) - var r = n(38), - i = n.n(r), - u = n(34), - c = n(35), - a = n(37), - s = n(36), - f = { DisplaySize: c.a, Toolbar: a.a, Resize: s.a }, - p = function t(e) { - var n = this, - r = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {} - o(this, t), - (this.initializeModules = function () { - n.removeModules(), - (n.modules = n.moduleClasses.map(function (t) { - return new (f[t] || t)(n) - })), - n.modules.forEach(function (t) { - t.onCreate() - }), - n.onUpdate() - }), - (this.onUpdate = function () { - n.repositionElements(), - n.modules.forEach(function (t) { - t.onUpdate() - }) - }), - (this.removeModules = function () { - n.modules.forEach(function (t) { - t.onDestroy() - }), - (n.modules = []) - }), - (this.handleClick = function (t) { - if ( - t.target && - t.target.tagName && - 'IMG' === t.target.tagName.toUpperCase() - ) { - if (n.img === t.target) return - n.img && n.hide(), n.show(t.target) - } else n.img && n.hide() - }), - (this.show = function (t) { - ;(n.img = t), n.showOverlay(), n.initializeModules() - }), - (this.showOverlay = function () { - n.overlay && n.hideOverlay(), - n.quill.setSelection(null), - n.setUserSelect('none'), - document.addEventListener('keyup', n.checkImage, !0), - n.quill.root.addEventListener('input', n.checkImage, !0), - (n.overlay = document.createElement('div')), - n.overlay.classList.add('ql-image-overlay'), - n.quill.root.parentNode.appendChild(n.overlay), - n.repositionElements() - }), - (this.hideOverlay = function () { - n.overlay && - (n.quill.root.parentNode.removeChild(n.overlay), - (n.overlay = void 0), - document.removeEventListener('keyup', n.checkImage), - n.quill.root.removeEventListener('input', n.checkImage), - n.setUserSelect('')) - }), - (this.repositionElements = function () { - if (n.overlay && n.img) { - var t = n.quill.root.parentNode, - e = n.img.getBoundingClientRect(), - o = t.getBoundingClientRect() - Object.assign(n.overlay.style, { - left: e.left - o.left - 1 + t.scrollLeft + 'px', - top: e.top - o.top + t.scrollTop + 'px', - width: e.width + 'px', - height: e.height + 'px', - }) - } - }), - (this.hide = function () { - n.hideOverlay(), n.removeModules(), (n.img = void 0) - }), - (this.setUserSelect = function (t) { - ;[ - 'userSelect', - 'mozUserSelect', - 'webkitUserSelect', - 'msUserSelect', - ].forEach(function (e) { - ;(n.quill.root.style[e] = t), - (document.documentElement.style[e] = t) - }) - }), - (this.checkImage = function (t) { - n.img && - ((46 != t.keyCode && 8 != t.keyCode) || - window.Quill.find(n.img).deleteAt(0), - n.hide()) - }), - (this.quill = e) - var c = !1 - r.modules && (c = r.modules.slice()), - (this.options = i()({}, r, u.a)), - !1 !== c && (this.options.modules = c), - document.execCommand('enableObjectResizing', !1, 'false'), - this.quill.root.addEventListener('click', this.handleClick, !1), - (this.quill.root.parentNode.style.position = - this.quill.root.parentNode.style.position || 'relative'), - (this.moduleClasses = this.options.modules), - (this.modules = []) - } - ;(e.default = p), - window.Quill && window.Quill.register('modules/imageResize', p) - }, - function (t, e, n) { - function o(t) { - var e = -1, - n = null == t ? 0 : t.length - for (this.clear(); ++e < n; ) { - var o = t[e] - this.set(o[0], o[1]) - } - } - var r = n(67), - i = n(68), - u = n(69), - c = n(70), - a = n(71) - ;(o.prototype.clear = r), - (o.prototype.delete = i), - (o.prototype.get = u), - (o.prototype.has = c), - (o.prototype.set = a), - (t.exports = o) - }, - function (t, e, n) { - function o(t) { - var e = -1, - n = null == t ? 0 : t.length - for (this.clear(); ++e < n; ) { - var o = t[e] - this.set(o[0], o[1]) - } - } - var r = n(81), - i = n(82), - u = n(83), - c = n(84), - a = n(85) - ;(o.prototype.clear = r), - (o.prototype.delete = i), - (o.prototype.get = u), - (o.prototype.has = c), - (o.prototype.set = a), - (t.exports = o) - }, - function (t, e, n) { - function o(t) { - var e = (this.__data__ = new r(t)) - this.size = e.size - } - var r = n(3), - i = n(93), - u = n(94), - c = n(95), - a = n(96), - s = n(97) - ;(o.prototype.clear = i), - (o.prototype.delete = u), - (o.prototype.get = c), - (o.prototype.has = a), - (o.prototype.set = s), - (t.exports = o) - }, - function (t, e, n) { - var o = n(1), - r = o.Uint8Array - t.exports = r - }, - function (t, e, n) { - function o(t, e) { - var n = u(t), - o = !n && i(t), - f = !n && !o && c(t), - l = !n && !o && !f && s(t), - d = n || o || f || l, - h = d ? r(t.length, String) : [], - v = h.length - for (var y in t) - (!e && !p.call(t, y)) || - (d && - ('length' == y || - (f && ('offset' == y || 'parent' == y)) || - (l && - ('buffer' == y || 'byteLength' == y || 'byteOffset' == y)) || - a(y, v))) || - h.push(y) - return h - } - var r = n(54), - i = n(28), - u = n(29), - c = n(30), - a = n(24), - s = n(32), - f = Object.prototype, - p = f.hasOwnProperty - t.exports = o - }, - function (t, e, n) { - function o(t, e, n) { - var o = t[e] - ;(c.call(t, e) && i(o, n) && (void 0 !== n || e in t)) || r(t, e, n) - } - var r = n(10), - i = n(8), - u = Object.prototype, - c = u.hasOwnProperty - t.exports = o - }, - function (t, e, n) { - var o = n(0), - r = Object.create, - i = (function () { - function t() {} - return function (e) { - if (!o(e)) return {} - if (r) return r(e) - t.prototype = e - var n = new t() - return (t.prototype = void 0), n - } - })() - t.exports = i - }, - function (t, e, n) { - var o = n(63), - r = o() - t.exports = r - }, - function (t, e, n) { - function o(t) { - return i(t) && r(t) == u - } - var r = n(5), - i = n(2), - u = '[object Arguments]' - t.exports = o - }, - function (t, e, n) { - function o(t) { - return !(!u(t) || i(t)) && (r(t) ? h : s).test(c(t)) - } - var r = n(13), - i = n(75), - u = n(0), - c = n(98), - a = /[\\^$.*+?()[\]{}|]/g, - s = /^\[object .+?Constructor\]$/, - f = Function.prototype, - p = Object.prototype, - l = f.toString, - d = p.hasOwnProperty, - h = RegExp( - '^' + - l - .call(d) - .replace(a, '\\$&') - .replace( - /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, - '$1.*?' - ) + - '$' - ) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return u(t) && i(t.length) && !!c[r(t)] - } - var r = n(5), - i = n(31), - u = n(2), - c = {} - ;(c['[object Float32Array]'] = - c['[object Float64Array]'] = - c['[object Int8Array]'] = - c['[object Int16Array]'] = - c['[object Int32Array]'] = - c['[object Uint8Array]'] = - c['[object Uint8ClampedArray]'] = - c['[object Uint16Array]'] = - c['[object Uint32Array]'] = - !0), - (c['[object Arguments]'] = - c['[object Array]'] = - c['[object ArrayBuffer]'] = - c['[object Boolean]'] = - c['[object DataView]'] = - c['[object Date]'] = - c['[object Error]'] = - c['[object Function]'] = - c['[object Map]'] = - c['[object Number]'] = - c['[object Object]'] = - c['[object RegExp]'] = - c['[object Set]'] = - c['[object String]'] = - c['[object WeakMap]'] = - !1), - (t.exports = o) - }, - function (t, e, n) { - function o(t) { - if (!r(t)) return u(t) - var e = i(t), - n = [] - for (var o in t) - ('constructor' != o || (!e && a.call(t, o))) && n.push(o) - return n - } - var r = n(0), - i = n(25), - u = n(86), - c = Object.prototype, - a = c.hasOwnProperty - t.exports = o - }, - function (t, e, n) { - function o(t, e, n, o, g, _, m) { - var j = b(t, n), - w = b(e, n), - O = m.get(w) - if (O) return void r(t, n, O) - var E = _ ? _(j, w, n + '', t, e, m) : void 0, - z = void 0 === E - if (z) { - var C = f(w), - P = !C && l(w), - S = !C && !P && y(w) - ;(E = w), - C || P || S - ? f(j) - ? (E = j) - : p(j) - ? (E = c(j)) - : P - ? ((z = !1), (E = i(w, !0))) - : S - ? ((z = !1), (E = u(w, !0))) - : (E = []) - : v(w) || s(w) - ? ((E = j), s(j) ? (E = x(j)) : (h(j) && !d(j)) || (E = a(w))) - : (z = !1) - } - z && (m.set(w, E), g(E, w, o, _, m), m.delete(w)), r(t, n, E) - } - var r = n(18), - i = n(57), - u = n(58), - c = n(59), - a = n(72), - s = n(28), - f = n(29), - p = n(100), - l = n(30), - d = n(13), - h = n(0), - v = n(101), - y = n(32), - b = n(26), - x = n(104) - t.exports = o - }, - function (t, e, n) { - var o = n(99), - r = n(21), - i = n(27), - u = r - ? function (t, e) { - return r(t, 'toString', { - configurable: !0, - enumerable: !1, - value: o(e), - writable: !0, - }) - } - : i - t.exports = u - }, - function (t, e) { - function n(t, e) { - for (var n = -1, o = Array(t); ++n < t; ) o[n] = e(n) - return o - } - t.exports = n - }, - function (t, e) { - function n(t) { - return function (e) { - return t(e) - } - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - var e = new t.constructor(t.byteLength) - return new r(e).set(new r(t)), e - } - var r = n(43) - t.exports = o - }, - function (t, e, n) { - ;(function (t) { - function o(t, e) { - if (e) return t.slice() - var n = t.length, - o = s ? s(n) : new t.constructor(n) - return t.copy(o), o - } - var r = n(1), - i = 'object' == typeof e && e && !e.nodeType && e, - u = i && 'object' == typeof t && t && !t.nodeType && t, - c = u && u.exports === i, - a = c ? r.Buffer : void 0, - s = a ? a.allocUnsafe : void 0 - t.exports = o - }.call(e, n(14)(t))) - }, - function (t, e, n) { - function o(t, e) { - var n = e ? r(t.buffer) : t.buffer - return new t.constructor(n, t.byteOffset, t.length) - } - var r = n(56) - t.exports = o - }, - function (t, e) { - function n(t, e) { - var n = -1, - o = t.length - for (e || (e = Array(o)); ++n < o; ) e[n] = t[n] - return e - } - t.exports = n - }, - function (t, e, n) { - function o(t, e, n, o) { - var u = !n - n || (n = {}) - for (var c = -1, a = e.length; ++c < a; ) { - var s = e[c], - f = o ? o(n[s], t[s], s, n, t) : void 0 - void 0 === f && (f = t[s]), u ? i(n, s, f) : r(n, s, f) - } - return n - } - var r = n(45), - i = n(10) - t.exports = o - }, - function (t, e, n) { - var o = n(1), - r = o['__core-js_shared__'] - t.exports = r - }, - function (t, e, n) { - function o(t) { - return r(function (e, n) { - var o = -1, - r = n.length, - u = r > 1 ? n[r - 1] : void 0, - c = r > 2 ? n[2] : void 0 - for ( - u = t.length > 3 && 'function' == typeof u ? (r--, u) : void 0, - c && i(n[0], n[1], c) && ((u = r < 3 ? void 0 : u), (r = 1)), - e = Object(e); - ++o < r; - - ) { - var a = n[o] - a && t(e, a, o, u) - } - return e - }) - } - var r = n(20), - i = n(73) - t.exports = o - }, - function (t, e) { - function n(t) { - return function (e, n, o) { - for (var r = -1, i = Object(e), u = o(e), c = u.length; c--; ) { - var a = u[t ? c : ++r] - if (!1 === n(i[a], a, i)) break - } - return e - } - } - t.exports = n - }, - function (t, e, n) { - function o(t, e, n, u, c, a) { - return ( - i(t) && i(e) && (a.set(e, t), r(t, e, void 0, o, a), a.delete(e)), t - ) - } - var r = n(19), - i = n(0) - t.exports = o - }, - function (t, e, n) { - function o(t) { - var e = u.call(t, a), - n = t[a] - try { - t[a] = void 0 - var o = !0 - } catch (t) {} - var r = c.call(t) - return o && (e ? (t[a] = n) : delete t[a]), r - } - var r = n(16), - i = Object.prototype, - u = i.hasOwnProperty, - c = i.toString, - a = r ? r.toStringTag : void 0 - t.exports = o - }, - function (t, e) { - function n(t, e) { - return null == t ? void 0 : t[e] - } - t.exports = n - }, - function (t, e, n) { - function o() { - ;(this.__data__ = r ? r(null) : {}), (this.size = 0) - } - var r = n(7) - t.exports = o - }, - function (t, e) { - function n(t) { - var e = this.has(t) && delete this.__data__[t] - return (this.size -= e ? 1 : 0), e - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - var e = this.__data__ - if (r) { - var n = e[t] - return n === i ? void 0 : n - } - return c.call(e, t) ? e[t] : void 0 - } - var r = n(7), - i = '__lodash_hash_undefined__', - u = Object.prototype, - c = u.hasOwnProperty - t.exports = o - }, - function (t, e, n) { - function o(t) { - var e = this.__data__ - return r ? void 0 !== e[t] : u.call(e, t) - } - var r = n(7), - i = Object.prototype, - u = i.hasOwnProperty - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - var n = this.__data__ - return ( - (this.size += this.has(t) ? 0 : 1), - (n[t] = r && void 0 === e ? i : e), - this - ) - } - var r = n(7), - i = '__lodash_hash_undefined__' - t.exports = o - }, - function (t, e, n) { - function o(t) { - return 'function' != typeof t.constructor || u(t) ? {} : r(i(t)) - } - var r = n(46), - i = n(23), - u = n(25) - t.exports = o - }, - function (t, e, n) { - function o(t, e, n) { - if (!c(n)) return !1 - var o = typeof e - return ( - !!('number' == o - ? i(n) && u(e, n.length) - : 'string' == o && e in n) && r(n[e], t) - ) - } - var r = n(8), - i = n(12), - u = n(24), - c = n(0) - t.exports = o - }, - function (t, e) { - function n(t) { - var e = typeof t - return 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e - ? '__proto__' !== t - : null === t - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - return !!i && i in t - } - var r = n(61), - i = (function () { - var t = /[^.]+$/.exec((r && r.keys && r.keys.IE_PROTO) || '') - return t ? 'Symbol(src)_1.' + t : '' - })() - t.exports = o - }, - function (t, e) { - function n() { - ;(this.__data__ = []), (this.size = 0) - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - var e = this.__data__, - n = r(e, t) - return ( - !(n < 0) && - (n == e.length - 1 ? e.pop() : u.call(e, n, 1), --this.size, !0) - ) - } - var r = n(4), - i = Array.prototype, - u = i.splice - t.exports = o - }, - function (t, e, n) { - function o(t) { - var e = this.__data__, - n = r(e, t) - return n < 0 ? void 0 : e[n][1] - } - var r = n(4) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return r(this.__data__, t) > -1 - } - var r = n(4) - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - var n = this.__data__, - o = r(n, t) - return o < 0 ? (++this.size, n.push([t, e])) : (n[o][1] = e), this - } - var r = n(4) - t.exports = o - }, - function (t, e, n) { - function o() { - ;(this.size = 0), - (this.__data__ = { - hash: new r(), - map: new (u || i)(), - string: new r(), - }) - } - var r = n(40), - i = n(3), - u = n(15) - t.exports = o - }, - function (t, e, n) { - function o(t) { - var e = r(this, t).delete(t) - return (this.size -= e ? 1 : 0), e - } - var r = n(6) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return r(this, t).get(t) - } - var r = n(6) - t.exports = o - }, - function (t, e, n) { - function o(t) { - return r(this, t).has(t) - } - var r = n(6) - t.exports = o - }, - function (t, e, n) { - function o(t, e) { - var n = r(this, t), - o = n.size - return n.set(t, e), (this.size += n.size == o ? 0 : 1), this - } - var r = n(6) - t.exports = o - }, - function (t, e) { - function n(t) { - var e = [] - if (null != t) for (var n in Object(t)) e.push(n) - return e - } - t.exports = n - }, - function (t, e, n) { - ;(function (t) { - var o = n(22), - r = 'object' == typeof e && e && !e.nodeType && e, - i = r && 'object' == typeof t && t && !t.nodeType && t, - u = i && i.exports === r, - c = u && o.process, - a = (function () { - try { - var t = i && i.require && i.require('util').types - return t || (c && c.binding && c.binding('util')) - } catch (t) {} - })() - t.exports = a - }.call(e, n(14)(t))) - }, - function (t, e) { - function n(t) { - return r.call(t) - } - var o = Object.prototype, - r = o.toString - t.exports = n - }, - function (t, e) { - function n(t, e) { - return function (n) { - return t(e(n)) - } - } - t.exports = n - }, - function (t, e, n) { - function o(t, e, n) { - return ( - (e = i(void 0 === e ? t.length - 1 : e, 0)), - function () { - for ( - var o = arguments, u = -1, c = i(o.length - e, 0), a = Array(c); - ++u < c; - - ) - a[u] = o[e + u] - u = -1 - for (var s = Array(e + 1); ++u < e; ) s[u] = o[u] - return (s[e] = n(a)), r(t, this, s) - } - ) - } - var r = n(17), - i = Math.max - t.exports = o - }, - function (t, e, n) { - var o = n(53), - r = n(92), - i = r(o) - t.exports = i - }, - function (t, e) { - function n(t) { - var e = 0, - n = 0 - return function () { - var u = i(), - c = r - (u - n) - if (((n = u), c > 0)) { - if (++e >= o) return arguments[0] - } else e = 0 - return t.apply(void 0, arguments) - } - } - var o = 800, - r = 16, - i = Date.now - t.exports = n - }, - function (t, e, n) { - function o() { - ;(this.__data__ = new r()), (this.size = 0) - } - var r = n(3) - t.exports = o - }, - function (t, e) { - function n(t) { - var e = this.__data__, - n = e.delete(t) - return (this.size = e.size), n - } - t.exports = n - }, - function (t, e) { - function n(t) { - return this.__data__.get(t) - } - t.exports = n - }, - function (t, e) { - function n(t) { - return this.__data__.has(t) - } - t.exports = n - }, - function (t, e, n) { - function o(t, e) { - var n = this.__data__ - if (n instanceof r) { - var o = n.__data__ - if (!i || o.length < c - 1) - return o.push([t, e]), (this.size = ++n.size), this - n = this.__data__ = new u(o) - } - return n.set(t, e), (this.size = n.size), this - } - var r = n(3), - i = n(15), - u = n(41), - c = 200 - t.exports = o - }, - function (t, e) { - function n(t) { - if (null != t) { - try { - return r.call(t) - } catch (t) {} - try { - return t + '' - } catch (t) {} - } - return '' - } - var o = Function.prototype, - r = o.toString - t.exports = n - }, - function (t, e) { - function n(t) { - return function () { - return t - } - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - return i(t) && r(t) - } - var r = n(12), - i = n(2) - t.exports = o - }, - function (t, e, n) { - function o(t) { - if (!u(t) || r(t) != c) return !1 - var e = i(t) - if (null === e) return !0 - var n = p.call(e, 'constructor') && e.constructor - return 'function' == typeof n && n instanceof n && f.call(n) == l - } - var r = n(5), - i = n(23), - u = n(2), - c = '[object Object]', - a = Function.prototype, - s = Object.prototype, - f = a.toString, - p = s.hasOwnProperty, - l = f.call(Object) - t.exports = o - }, - function (t, e, n) { - var o = n(19), - r = n(62), - i = r(function (t, e, n, r) { - o(t, e, n, r) - }) - t.exports = i - }, - function (t, e) { - function n() { - return !1 - } - t.exports = n - }, - function (t, e, n) { - function o(t) { - return r(t, i(t)) - } - var r = n(60), - i = n(33) - t.exports = o - }, - function (t, e) { - var n - n = (function () { - return this - })() - try { - n = n || Function('return this')() || (0, eval)('this') - } catch (t) { - 'object' == typeof window && (n = window) - } - t.exports = n - }, - ]) -}) +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ImageResize=e():t.ImageResize=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){var o=n(22),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();t.exports=i},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e,n){var o=n(50),r=n(55),i=n(87),u=i&&i.isTypedArray,c=u?r(u):o;t.exports=c},function(t,e,n){function o(t){return u(t)?r(t,!0):i(t)}var r=n(44),i=n(51),u=n(12);t.exports=o},function(t,e,n){"use strict";e.a={modules:["DisplaySize","Toolbar","Resize"]}},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return c});var u=n(9),c=function(t){function e(){var t,n,i,u;o(this,e);for(var c=arguments.length,a=Array(c),s=0;s1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.initializeModules=function(){n.removeModules(),n.modules=n.moduleClasses.map(function(t){return new(f[t]||t)(n)}),n.modules.forEach(function(t){t.onCreate()}),n.onUpdate()},this.onUpdate=function(){n.repositionElements(),n.modules.forEach(function(t){t.onUpdate()})},this.removeModules=function(){n.modules.forEach(function(t){t.onDestroy()}),n.modules=[]},this.handleClick=function(t){if(t.target&&t.target.tagName&&"IMG"===t.target.tagName.toUpperCase()){if(n.img===t.target)return;n.img&&n.hide(),n.show(t.target)}else n.img&&n.hide()},this.show=function(t){n.img=t,n.showOverlay(),n.initializeModules()},this.showOverlay=function(){n.overlay&&n.hideOverlay(),n.quill.setSelection(null),n.setUserSelect("none"),document.addEventListener("keyup",n.checkImage,!0),n.quill.root.addEventListener("input",n.checkImage,!0),n.overlay=document.createElement("div"),n.overlay.classList.add("ql-image-overlay"),n.quill.root.parentNode.appendChild(n.overlay),n.repositionElements()},this.hideOverlay=function(){n.overlay&&(n.quill.root.parentNode.removeChild(n.overlay),n.overlay=void 0,document.removeEventListener("keyup",n.checkImage),n.quill.root.removeEventListener("input",n.checkImage),n.setUserSelect(""))},this.repositionElements=function(){if(n.overlay&&n.img){var t=n.quill.root.parentNode,e=n.img.getBoundingClientRect(),o=t.getBoundingClientRect();Object.assign(n.overlay.style,{left:e.left-o.left-1+t.scrollLeft+"px",top:e.top-o.top+t.scrollTop+"px",width:e.width+"px",height:e.height+"px"})}},this.hide=function(){n.hideOverlay(),n.removeModules(),n.img=void 0},this.setUserSelect=function(t){["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(function(e){n.quill.root.style[e]=t,document.documentElement.style[e]=t})},this.checkImage=function(t){n.img&&(46!=t.keyCode&&8!=t.keyCode||window.Quill.find(n.img).deleteAt(0),n.hide())},this.quill=e;var c=!1;r.modules&&(c=r.modules.slice()),this.options=i()({},r,u.a),!1!==c&&(this.options.modules=c),document.execCommand("enableObjectResizing",!1,"false"),this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative",this.moduleClasses=this.options.modules,this.modules=[]};e.default=p,window.Quill&&window.Quill.register("modules/imageResize",p)},function(t,e,n){function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e1?n[r-1]:void 0,c=r>2?n[2]:void 0;for(u=t.length>3&&"function"==typeof u?(r--,u):void 0,c&&i(n[0],n[1],c)&&(u=r<3?void 0:u,r=1),e=Object(e);++o-1}var r=n(4);t.exports=o},function(t,e,n){function o(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var r=n(4);t.exports=o},function(t,e,n){function o(){this.size=0,this.__data__={hash:new r,map:new(u||i),string:new r}}var r=n(40),i=n(3),u=n(15);t.exports=o},function(t,e,n){function o(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}var r=n(6);t.exports=o},function(t,e,n){function o(t){return r(this,t).get(t)}var r=n(6);t.exports=o},function(t,e,n){function o(t){return r(this,t).has(t)}var r=n(6);t.exports=o},function(t,e,n){function o(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}var r=n(6);t.exports=o},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var o=n(22),r="object"==typeof e&&e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===r,c=u&&o.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=a}).call(e,n(14)(t))},function(t,e){function n(t){return r.call(t)}var o=Object.prototype,r=o.toString;t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e,n){function o(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,u=-1,c=i(o.length-e,0),a=Array(c);++u0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o=800,r=16,i=Date.now;t.exports=n},function(t,e,n){function o(){this.__data__=new r,this.size=0}var r=n(3);t.exports=o},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function o(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length 1 ? a - 1 : 0), - r = 1; - r < a; - r++ - ) - o[r - 1] = arguments[r] - var i = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {} - return e(i.success) || e(i.fail) || e(i.complete) - ? n.apply(void 0, [i].concat(o)) - : t( - new Promise(function (e, t) { - n.apply( - void 0, - [ - Object.assign({}, i, { success: e, fail: t }), - ].concat(o) - ), - (Promise.prototype.finally = function (e) { - var t = this.constructor - return this.then( - function (n) { - return t.resolve(e()).then(function () { - return n - }) - }, - function (n) { - return t.resolve(e()).then(function () { - throw n - }) - } - ) - }) - }) - ) - } - }, - s = [], - c = void 0 - function u(e) { - s.forEach(function (t) { - return t({ origin: c, data: e }) - }) - } - var l = o.webview.currentWebview().id, - f = new BroadcastChannel('UNI-APP-SUBNVUE') - function d(e) { - var t = o.webview.getWebviewById(e) - return ( - t && - !t.$processed && - (function (e) { - e.$processed = !0 - var t = o.webview.currentWebview().id === e.id, - n = - 'uniNView' === e.__uniapp_origin_type && - e.__uniapp_origin_id, - a = e.id - if ( - ((e.postMessage = function (e) { - n - ? f.postMessage({ data: e, to: t ? n : a }) - : _({ type: 'UniAppSubNVue', data: e }) - }), - (e.onMessage = function (e) { - s.push(e) - }), - e.__uniapp_mask_id) - ) { - c = e.__uniapp_host - var r = e.__uniapp_mask, - i = o.webview.getWebviewById(e.__uniapp_mask_id) - i = i.parent() || i - var u = e.show, - l = e.hide, - d = e.close, - p = function () { - i.setStyle({ mask: r }) - }, - g = function () { - i.setStyle({ mask: 'none' }) - } - ;(e.show = function () { - p() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return u.apply(e, n) - }), - (e.hide = function () { - g() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return l.apply(e, n) - }), - (e.close = function () { - g() - for ( - var t = arguments.length, n = Array(t), a = 0; - a < t; - a++ - ) - n[a] = arguments[a] - return d.apply(e, n) - }) - } - })(t), - t - ) - } - f.onmessage = function (e) { - e.data.to === l && u(e.data.data) - } - var p = weex.requireModule('plus'), - g = weex.requireModule('globalEvent'), - h = 0, - v = {} - g.addEventListener('plusMessage', function (e) { - 'UniAppJsApi' === e.data.type - ? y(e.data.id, e.data.data) - : 'UniAppSubNVue' === e.data.type - ? u(e.data.data, e.data.options) - : 'onNavigationBarButtonTap' === e.data.type - ? 'function' == typeof b && b(e.data.data) - : 'onNavigationBarSearchInputChanged' === e.data.type - ? 'function' == typeof S && S(e.data.data) - : 'onNavigationBarSearchInputConfirmed' === e.data.type - ? 'function' == typeof C && C(e.data.data) - : 'onNavigationBarSearchInputClicked' === e.data.type && - 'function' == typeof w && - w(e.data.data) - }) - var y = function (e, t) { - var n = v[e] - n - ? (n(t), n.keepAlive || delete v[e]) - : console.error('callback[' + e + '] is undefined') - }, - m = function (t) { - var n, - a, - o = t.id, - r = t.type, - i = t.params - ;(v[o] = - ((a = function (t) { - e(n) - ? n(t) - : n && - (~t.errMsg.indexOf(':ok') - ? e(n.success) && n.success(t) - : ~t.errMsg.indexOf(':fail') && - e(n.fail) && - n.fail(t), - e(n.complete) && n.complete(t)) - }), - (e((n = i)) || (n && e(n.callback))) && (a.keepAlive = !0), - a)), - p.postMessage( - { id: o, type: r, params: i }, - '__uniapp__service' - ) - } - function _(e) { - p.postMessage(e, '__uniapp__service') - } - var A = function (e) { - return function (t) { - m({ id: h++, type: e, params: t }) - } - }, - b = void 0, - S = void 0, - C = void 0, - w = void 0 - function E(e) { - b = e - } - function M(e) { - S = e - } - function k(e) { - C = e - } - function O(e) { - w = e - } - function B(e) { - return weex.requireModule(e) - } - var I = weex.requireModule('dom'), - P = weex.requireModule('globalEvent'), - T = [] - function D(e) { - 'function' == typeof e && (this.isUniAppReady ? e() : T.push(e)) - } - P.addEventListener('plusMessage', function (e) { - 'UniAppReady' === e.data.type && - ((D.isUniAppReady = !0), - T.length && - (T.forEach(function (e) { - return e() - }), - (T = []))) - }) - var N = - '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 - }, - x = weex.requireModule('stream'), - U = function (e) { - var t = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 'GET', - n = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : 'application/x-www-form-urlencoded' - return 'object' === (void 0 === e ? 'undefined' : N(e)) - ? 'POST' === t.toUpperCase() && - 'application/json' === n.toLowerCase() - ? JSON.stringify(e) - : Object.keys(e) - .map(function (t) { - return ( - encodeURIComponent(t) + - '=' + - encodeURIComponent(e[t]) - ) - }) - .join('&') - : e - }, - R = weex.requireModule('plusstorage'), - V = weex.requireModule('clipboard'), - F = (function () { - if ('function' == typeof getUniEmitter) return getUniEmitter - var e = { - $on: function () { - console.warn('uni.$on failed') - }, - $off: function () { - console.warn('uni.$off failed') - }, - $once: function () { - console.warn('uni.$once failed') - }, - $emit: function () { - console.warn('uni.$emit failed') - }, - } - return function () { - return e - } - })() - function L(e, t, n) { - return e[t].apply(e, n) - } - var j = Object.freeze({ - loadFontFace: function (t) { - var n = t.family, - a = t.source, - o = (t.desc, t.success), - r = (t.fail, t.complete) - I.addRule('fontFace', { - fontFamily: n, - src: a.replace(/"/g, "'"), - }) - var i = { errMsg: 'loadFontFace:ok', status: 'loaded' } - e(o) && o(i), e(r) && r(i) - }, - ready: D, - request: function (t) { - var n = t.url, - a = t.data, - o = t.header, - r = t.method, - i = void 0 === r ? 'GET' : r, - s = t.dataType, - c = void 0 === s ? 'json' : s, - u = (t.responseType, t.success), - l = t.fail, - f = t.complete, - d = !1, - p = !1, - g = {} - if (o) - for (var h in o) - p || 'content-type' !== h.toLowerCase() - ? (g[h] = o[h]) - : ((p = !0), (g['Content-Type'] = o[h])) - return ( - 'GET' === i && - a && - (n = - n + - (~n.indexOf('?') - ? '&' === n.substr(-1) || '?' === n.substr(-1) - ? '' - : '&' - : '?') + - U(a)), - x.fetch( - { - url: n, - method: i, - headers: g, - type: 'json' === c ? 'json' : 'text', - body: 'GET' !== i ? U(a, i, g['Content-Type']) : '', - }, - function (t) { - var n = t.status, - a = (t.ok, t.statusText, t.data), - o = t.headers, - r = {} - !n || -1 === n || d - ? ((r.errMsg = 'request:fail'), e(l) && l(r)) - : ((r.data = a), - (r.statusCode = n), - (r.header = o), - e(u) && u(r)), - e(f) && f(r) - } - ), - { - abort: function () { - d = !0 - }, - } - ) - }, - getStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - o = t.fail, - r = t.complete - R.getItem(n + '__TYPE', function (t) { - if ('success' === t.result) { - var i = t.data - R.getItem(n, function (t) { - if ('success' === t.result) { - var n = t.data - i && n - ? ('String' !== i && (n = JSON.parse(n)), - e(a) && a({ errMsg: 'getStorage:ok', data: n })) - : ((t.errMsg = 'setStorage:fail'), e(o) && o(t)) - } else (t.errMsg = 'setStorage:fail'), e(o) && o(t) - e(r) && r(t) - }) - } else - (t.errMsg = 'setStorage:fail'), - e(o) && o(t), - e(r) && r(t) - }) - }, - setStorage: function (t) { - var n = t.key, - a = t.data, - o = t.success, - r = t.fail, - i = t.complete, - s = 'String' - 'object' === (void 0 === a ? 'undefined' : N(a)) && - ((s = 'Object'), (a = JSON.stringify(a))), - R.setItem(n, a, function (t) { - 'success' === t.result - ? R.setItem(n + '__TYPE', s, function (t) { - 'success' === t.result - ? e(o) && o({ errMsg: 'setStorage:ok' }) - : ((t.errMsg = 'setStorage:fail'), e(r) && r(t)) - }) - : ((t.errMsg = 'setStorage:fail'), e(r) && r(t)), - e(i) && i(t) - }) - }, - removeStorage: function (t) { - var n = t.key, - a = (t.data, t.success), - o = t.fail, - r = t.complete - R.removeItem(n, function (t) { - 'success' === t.result - ? e(a) && a({ errMsg: 'removeStorage:ok' }) - : ((t.errMsg = 'removeStorage:fail'), e(o) && o(t)), - e(r) && r(t) - }), - R.removeItem(n + '__TYPE') - }, - clearStorage: function (e) { - e.key, e.data, e.success, e.fail, e.complete - }, - getClipboardData: function (t) { - var n = t.success, - a = (t.fail, t.complete) - V.getString(function (t) { - var o = { errMsg: 'getClipboardData:ok', data: t.data } - e(n) && n(o), e(a) && a(o) - }) - }, - setClipboardData: function (t) { - var n = t.data, - a = t.success, - o = (t.fail, t.complete), - r = { errMsg: 'setClipboardData:ok' } - V.setString(n), e(a) && a(r), e(o) && o(r) - }, - onSubNVueMessage: u, - getSubNVueById: d, - getCurrentSubNVue: function () { - return d(o.webview.currentWebview().id) - }, - $on: function () { - return L( - F(), - '$on', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $off: function () { - return L( - F(), - '$off', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $once: function () { - return L( - F(), - '$once', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - $emit: function () { - return L( - F(), - '$emit', - [].concat(Array.prototype.slice.call(arguments)) - ) - }, - }), - $ = { os: { nvue: !0 } }, - J = {} - return ( - 'undefined' != typeof Proxy - ? (J = new Proxy( - {}, - { - get: function (e, t) { - if ('os' === t) return { nvue: !0 } - if ('postMessage' === t) return _ - if ('requireNativePlugin' === t) return B - if ('onNavigationBarButtonTap' === t) return E - if ('onNavigationBarSearchInputChanged' === t) - return M - if ('onNavigationBarSearchInputConfirmed' === t) - return k - if ('onNavigationBarSearchInputClicked' === t) - return O - var n = j[t] - return n || (n = A(t)), r(t) ? i(n) : n - }, - } - )) - : (Object.keys($).forEach(function (e) { - J[e] = $[e] - }), - (J.postMessage = _), - (J.requireNativePlugin = B), - (J.onNavigationBarButtonTap = E), - (J.onNavigationBarSearchInputChanged = M), - (J.onNavigationBarSearchInputConfirmed = k), - (J.onNavigationBarSearchInputClicked = O), - Object.keys({ - uploadFile: !0, - downloadFile: !0, - chooseImage: !0, - previewImage: !0, - getImageInfo: !0, - saveImageToPhotosAlbum: !0, - chooseVideo: !0, - saveVideoToPhotosAlbum: !0, - saveFile: !0, - getSavedFileList: !0, - getSavedFileInfo: !0, - removeSavedFile: !0, - openDocument: !0, - setStorage: !0, - getStorage: !0, - getStorageInfo: !0, - removeStorage: !0, - clearStorage: !0, - getLocation: !0, - chooseLocation: !0, - openLocation: !0, - getSystemInfo: !0, - getNetworkType: !0, - makePhoneCall: !0, - scanCode: !0, - setScreenBrightness: !0, - getScreenBrightness: !0, - setKeepScreenOn: !0, - vibrateLong: !0, - vibrateShort: !0, - addPhoneContact: !0, - showToast: !0, - showLoading: !0, - hideToast: !0, - hideLoading: !0, - showModal: !0, - showActionSheet: !0, - setNavigationBarTitle: !0, - setNavigationBarColor: !0, - navigateTo: !0, - redirectTo: !0, - reLaunch: !0, - switchTab: !0, - navigateBack: !0, - getProvider: !0, - login: !0, - getUserInfo: !0, - share: !0, - requestPayment: !0, - subscribePush: !0, - unsubscribePush: !0, - onPush: !0, - offPush: !0, - }).forEach(function (e) { - var t = j[e] - t || (t = A(e)), r(e) ? (J[e] = i(t)) : (J[e] = t) - })), - J - ) - }) - var o = new WeexPlus(weex) - t.weexPlus = o - var r = a(weex, o, BroadcastChannel) - t.default = r - }, - function (e, t, n) { - ;(Vue.prototype.__$appStyle__ = {}), - Vue.prototype.__merge_style && - Vue.prototype.__merge_style(n(4).default, Vue.prototype.__$appStyle__) - }, - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(0), - o = n.n(a) - for (var r in a) - 'default' !== r && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(r) - t.default = o.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - onLoad: function () { - this.initMessage() - }, - methods: { - initMessage: function () { - var t = this, - n = e.webview.currentWebview().extras || {}, - a = n.from, - o = (n.callback, n.runtime), - r = n.data, - i = void 0 === r ? {} : r, - s = n.useGlobalEvent - ;(this.__from = a), - (this.__runtime = o), - (this.__page = e.webview.currentWebview().id), - (this.__useGlobalEvent = s), - (this.data = JSON.parse(JSON.stringify(i))), - e.key.addEventListener('backbutton', function () { - 'function' == typeof t.onClose - ? t.onClose() - : e.webview.currentWebview().close('auto') - }) - var c = this, - u = function (e) { - var t = e.data && e.data.__message - t && c.__onMessageCallback && c.__onMessageCallback(t.data) - } - this.__useGlobalEvent - ? weex - .requireModule('globalEvent') - .addEventListener('plusMessage', u) - : (new BroadcastChannel(this.__page).onmessage = u) - }, - postMessage: function () { - var t = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : {}, - n = - arguments.length > 1 && void 0 !== arguments[1] && arguments[1], - a = JSON.parse( - JSON.stringify({ - __message: { __page: this.__page, data: t, keep: n }, - }) - ), - o = this.__from - if ('v8' === this.__runtime) - if (this.__useGlobalEvent) e.webview.postMessageToUniNView(a, o) - else { - var r = new BroadcastChannel(o) - r.postMessage(a) - } - else { - var i = e.webview.getWebviewById(o) - i && - i.evalJS( - '__plusMessage&&__plusMessage('.concat( - JSON.stringify({ data: a }), - ')' - ) - ) - } - }, - onMessage: function (e) { - this.__onMessageCallback = e - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var n = { - data: function () { - return { - locale: 'en', - fallbackLocale: 'en', - localization: { - en: { done: 'OK', cancel: 'Cancel' }, - zh: { done: '完成', cancel: '取消' }, - 'zh-hans': {}, - 'zh-hant': {}, - messages: {}, - }, - } - }, - onLoad: function () { - this.initLocale() - }, - created: function () { - this.initLocale() - }, - methods: { - initLocale: function () { - if (!this.__initLocale) { - this.__initLocale = !0 - var t = (e.webview.currentWebview().extras || {}).data || {} - if ( - (t.messages && (this.localization.messages = t.messages), - t.locale) - ) - this.locale = t.locale.toLowerCase() - else { - var n = e.os.language - .toLowerCase() - .split('/')[0] - .replace('_', '-') - .split('-'), - a = n[1] - a && - (n[1] = - { - chs: 'hans', - cn: 'hans', - sg: 'hans', - cht: 'hant', - tw: 'hant', - hk: 'hant', - mo: 'hant', - }[a] || a), - (n.length = n.length > 2 ? 2 : n.length), - (this.locale = n.join('-')) - } - } - }, - localize: function (e) { - var t = this.locale, - n = t.split('-')[0], - a = this.fallbackLocale, - o = this.localization - function r(e) { - return o[e] || {} - } - return r('messages')[e] || r(t)[e] || r(n)[e] || r(a)[e] || e - }, - }, - } - t.default = n - }.call(this, n(2).weexPlus)) - }, - , - , - function (e, t, n) { - 'use strict' - var a = n(33), - o = n(18), - r = n(1) - var i = Object(r.a)( - o.default, - a.b, - a.c, - !1, - null, - null, - '6af04a36', - !1, - a.a, - void 0 - ) - ;(function (e) { - this.options.style || (this.options.style = {}), - Vue.prototype.__merge_style && - Vue.prototype.__$appStyle__ && - Vue.prototype.__merge_style( - Vue.prototype.__$appStyle__, - this.options.style - ), - Vue.prototype.__merge_style - ? Vue.prototype.__merge_style(n(38).default, this.options.style) - : Object.assign(this.options.style, n(38).default) - }.call(i), - (t.default = i.exports)) - }, - , - , - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - var a = n(19), - o = n.n(a) - t.default = o.a - }, - function (e, t, n) { - 'use strict' - ;(function (e) { - Object.defineProperty(t, '__esModule', { value: !0 }), - (t.default = void 0) - var a, - o = i(n(5)), - r = i(n(6)) - function i(e) { - return e && e.__esModule ? e : { default: e } - } - function s(e, t, n) { - return ( - t in e - ? Object.defineProperty(e, t, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0, - }) - : (e[t] = n), - e - ) - } - var c = e.barcode, - u = { - qrCode: [c.QR, c.AZTEC, c.MAXICODE], - barCode: [ - c.EAN13, - c.EAN8, - c.UPCA, - c.UPCE, - c.CODABAR, - c.CODE128, - c.CODE39, - c.CODE93, - c.ITF, - c.RSS14, - c.RSSEXPANDED, - ], - datamatrix: [c.DATAMATRIX], - pdf417: [c.PDF417], - }, - l = - (s((a = {}), c.QR, 'QR_CODE'), - s(a, c.EAN13, 'EAN_13'), - s(a, c.EAN8, 'EAN_8'), - s(a, c.DATAMATRIX, 'DATA_MATRIX'), - s(a, c.UPCA, 'UPC_A'), - s(a, c.UPCE, 'UPC_E'), - s(a, c.CODABAR, 'CODABAR'), - s(a, c.CODE39, 'CODE_39'), - s(a, c.CODE93, 'CODE_93'), - s(a, c.CODE128, 'CODE_128'), - s(a, c.ITF, 'CODE_25'), - s(a, c.PDF417, 'PDF_417'), - s(a, c.AZTEC, 'AZTEC'), - s(a, c.RSS14, 'RSS_14'), - s(a, c.RSSEXPANDED, 'RSSEXPANDED'), - a), - f = { - mixins: [o.default, r.default], - data: { - filters: [0, 2, 1], - backgroud: '#000000', - frameColor: '#118ce9', - scanbarColor: '#118ce9', - enabledFlash: !1, - flashImage0: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABjklEQVRoQ+1ZbVHEQAx9TwE4ABTcOQAknANQAKcAUAAOAAXgAHAACsDCKQiTmbYDzJZtNt2bFrJ/m6+Xl2yyU2LmhzOPH/8PgIjcADirxNyapNoffMwMiMgzgMPBHmyCLySPLCoBwJKtAbJbYaBmD1yRvBwAtBMxl5DF+DZkiwCIyBLAzsgBbki+Wm2WAlCaL6zOMvKnJO+sNksB7ALQbO1ZHfbIv5FUVs2nCIB6EZETALdmj2mFY5I6X8ynGEADQllYmL1+VzBfnV/VvQB0aj45ARyQ/Ci14QLQsOBZLe5JaikWnzEA7AN4L4hgA2Dpyb76dANwsOCq/TZhASAYKGie0a7R1lDPI0ebtF0NUi+4yfdAtxr3PEMnD6BbD0QkNfACQO05EAwMuaBqDrIVycdmTpwDuP4R0OR7QFftVRP0g+49cwOQq4DJMxAAchmofY3m/EcJBQOZbTRKKJeBKKEoIePvpFRJ1VzmciUccyCa+C81cerBkuuB7sGTE/zt+yhN7AnAqxsAvBn06n8CkyPwMZKwm+UAAAAASUVORK5CYII=', - flashImage1: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUAAAA3kvI3lfY2k/VAl+43k/U3k/Q4k/M3kvI3k/M4k/Q4lPU2lPU2k/Vdq843k/WWSpNKAAAAD3RSTlMAwD+QINCAcPBgUDDgoBAE044kAAAAdklEQVQ4y2OgOrD/DwffUSTkERIfyZXAtOMbca7iVoKDDSgSbAijJqBI8J2HiX9FM2s+TOITmgQrTEIATYIJJuEA5mJ68S+Gg/0hEi0YEoxQK2gs0WyPQyKBGYeEAhPtJRaw45AIccXpwVEJekuwQyQWMFAfAACeDBJY9aXa3QAAAABJRU5ErkJggg==', - autoDecodeCharSet: !1, - localization: { - en: { - fail: 'Recognition failure', - 'flash.on': 'Tap to turn light on', - 'flash.off': 'Tap to turn light off', - }, - zh: { - fail: '识别失败', - 'flash.on': '轻触照亮', - 'flash.off': '轻触关闭', - }, - }, - }, - onLoad: function () { - var e = this, - t = this.data, - n = t.scanType - this.autoDecodeCharSet = t.autoDecodeCharSet - var a = [] - Array.isArray(n) && - n.length && - n.forEach(function (e) { - var t = u[e] - t && (a = a.concat(t)) - }), - a.length || - (a = a - .concat(u.qrCode) - .concat(u.barCode) - .concat(u.datamatrix) - .concat(u.pdf417)), - (this.filters = a), - this.onMessage(function (t) { - e.gallery() - }) - }, - onUnload: function () { - this.cancel() - }, - methods: { - start: function () { - this.$refs.barcode.start({ - conserve: !0, - filename: '_doc/barcode/', - }) - }, - scan: function (t) { - var n = this - c.scan( - t, - function (e, t, a, o) { - n.scanSuccess(e, t, a, o) - }, - function () { - e.nativeUI.toast(n.localize('fail')) - }, - this.filters, - this.autoDecodeCharSet - ) - }, - cancel: function () { - this.$refs.barcode.cancel() - }, - gallery: function () { - var t = this - e.gallery.pick( - function (e) { - t.scan(e) - }, - function (n) { - n.code !== - ('android' === weex.config.env.platform.toLowerCase() - ? 12 - : -2) && e.nativeUI.toast(t.localize('fail')) - }, - { - multiple: !1, - system: !1, - filename: '_doc/uniapp_temp/gallery/', - permissionAlert: !0, - } - ) - }, - onmarked: function (e) { - var t = e.detail - this.scanSuccess(t.code, t.message, t.file, t.charSet) - }, - scanSuccess: function (e, t, n, a) { - this.postMessage({ - event: 'marked', - detail: { - scanType: l[e], - result: t, - charSet: a || 'utf8', - path: n || '', - }, - }) - }, - onerror: function (e) { - this.postMessage({ event: 'fail', message: JSON.stringify(e) }) - }, - setFlash: function () { - ;(this.enabledFlash = !this.enabledFlash), - this.$refs.barcode.setFlash(this.enabledFlash) - }, - }, - } - t.default = f - }.call(this, n(2).weexPlus)) - }, - function (e, t) { - e.exports = { - content: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: '#000000', - }, - barcode: { - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - zIndex: 1, - }, - 'set-flash': { - alignItems: 'center', - justifyContent: 'center', - transform: 'translateY(80px)', - zIndex: 2, - }, - 'image-flash': { width: '26', height: '26', marginBottom: '2' }, - 'image-flash-text': { fontSize: '10', color: '#FFFFFF' }, - } - }, - , - , - , - , - , - , - , - , - , - , - , - , - function (e, t, n) { - 'use strict' - var a = function () { - var e = this, - t = e.$createElement, - n = e._self._c || t - return n( - 'scroll-view', - { - staticStyle: { flexDirection: 'column' }, - attrs: { scrollY: !0, enableBackToTop: !0, bubble: 'true' }, - }, - [ - n( - 'view', - { staticClass: ['content'] }, - [ - n('barcode', { - ref: 'barcode', - staticClass: ['barcode'], - attrs: { - autostart: 'true', - backgroud: e.backgroud, - frameColor: e.frameColor, - scanbarColor: e.scanbarColor, - filters: e.filters, - autoDecodeCharset: e.autoDecodeCharSet, - }, - on: { marked: e.onmarked, error: e.onerror }, - }), - n( - 'view', - { staticClass: ['set-flash'], on: { click: e.setFlash } }, - [ - n('u-image', { - staticClass: ['image-flash'], - attrs: { - src: e.enabledFlash ? e.flashImage1 : e.flashImage0, - resize: 'stretch', - }, - }), - n('u-text', { staticClass: ['image-flash-text'] }, [ - e._v( - e._s( - e.enabledFlash - ? e.localize('flash.off') - : e.localize('flash.on') - ) - ), - ]), - ], - 1 - ), - ], - 1 - ), - ] - ) - }, - o = [] - n.d(t, 'b', function () { - return a - }), - n.d(t, 'c', function () { - return o - }), - n.d(t, 'a', function () {}) - }, - , - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - var a = n(20), - o = n.n(a) - for (var r in a) - 'default' !== r && - (function (e) { - n.d(t, e, function () { - return a[e] - }) - })(r) - t.default = o.a - }, - , - , - , - , - function (e, t, n) { - 'use strict' - n.r(t) - n(3) - var a = n(9) - ;(a.default.mpType = 'page'), - (a.default.route = 'template/__uniappscan'), - (a.default.el = '#root'), - new Vue(a.default) - }, -]) +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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=43)}([function(e,t){e.exports={}},function(e,t,n){"use strict";function a(e,t,n,a,o,r,i,s,c,u){var l,f="function"==typeof e?e.options:e;if(c){f.components||(f.components={});var d=Object.prototype.hasOwnProperty;for(var p in c)d.call(c,p)&&!d.call(f.components,p)&&(f.components[p]=c[p])}if(u&&((u.beforeCreate||(u.beforeCreate=[])).unshift((function(){this[u.__module]=this})),(f.mixins||(f.mixins=[])).push(u)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),a&&(f.functional=!0),r&&(f._scopeId="data-v-"+r),i?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},f._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(f.functional){f._injectStyles=l;var g=f.render;f.render=function(e,t){return l.call(t),g(e,t)}}else{var h=f.beforeCreate;f.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:f}}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.weexPlus=t.default=void 0,a="function"==typeof getUni?getUni:function(){var e=function(e){return"function"==typeof e},t=function(e){return e.then((function(e){return[null,e]})).catch((function(e){return[e]}))},n=/^\$|^on|^create|Sync$|Manager$|^pause/,a=["os","getCurrentSubNVue","getSubNVueById","stopRecord","stopVoice","stopBackgroundAudio","stopPullDownRefresh","hideKeyboard","hideToast","hideLoading","showNavigationBarLoading","hideNavigationBarLoading","canIUse","navigateBack","closeSocket","pageScrollTo","drawCanvas"],r=function(e){return(!n.test(e)||"createBLEConnection"===e)&&!~a.indexOf(e)},i=function(n){return function(){for(var a=arguments.length,o=Array(a>1?a-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return e(i.success)||e(i.fail)||e(i.complete)?n.apply(void 0,[i].concat(o)):t(new Promise((function(e,t){n.apply(void 0,[Object.assign({},i,{success:e,fail:t})].concat(o)),Promise.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))}})))}},s=[],c=void 0;function u(e){s.forEach((function(t){return t({origin:c,data:e})}))}var l=o.webview.currentWebview().id,f=new BroadcastChannel("UNI-APP-SUBNVUE");function d(e){var t=o.webview.getWebviewById(e);return t&&!t.$processed&&function(e){e.$processed=!0;var t=o.webview.currentWebview().id===e.id,n="uniNView"===e.__uniapp_origin_type&&e.__uniapp_origin_id,a=e.id;if(e.postMessage=function(e){n?f.postMessage({data:e,to:t?n:a}):_({type:"UniAppSubNVue",data:e})},e.onMessage=function(e){s.push(e)},e.__uniapp_mask_id){c=e.__uniapp_host;var r=e.__uniapp_mask,i=o.webview.getWebviewById(e.__uniapp_mask_id);i=i.parent()||i;var u=e.show,l=e.hide,d=e.close,p=function(){i.setStyle({mask:r})},g=function(){i.setStyle({mask:"none"})};e.show=function(){p();for(var t=arguments.length,n=Array(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/x-www-form-urlencoded";return"object"===(void 0===e?"undefined":N(e))?"POST"===t.toUpperCase()&&"application/json"===n.toLowerCase()?JSON.stringify(e):Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&"):e},R=weex.requireModule("plusstorage"),V=weex.requireModule("clipboard"),F=function(){if("function"==typeof getUniEmitter)return getUniEmitter;var e={$on:function(){console.warn("uni.$on failed")},$off:function(){console.warn("uni.$off failed")},$once:function(){console.warn("uni.$once failed")},$emit:function(){console.warn("uni.$emit failed")}};return function(){return e}}();function L(e,t,n){return e[t].apply(e,n)}var j=Object.freeze({loadFontFace:function(t){var n=t.family,a=t.source,o=(t.desc,t.success),r=(t.fail,t.complete);I.addRule("fontFace",{fontFamily:n,src:a.replace(/"/g,"'")});var i={errMsg:"loadFontFace:ok",status:"loaded"};e(o)&&o(i),e(r)&&r(i)},ready:D,request:function(t){var n=t.url,a=t.data,o=t.header,r=t.method,i=void 0===r?"GET":r,s=t.dataType,c=void 0===s?"json":s,u=(t.responseType,t.success),l=t.fail,f=t.complete,d=!1,p=!1,g={};if(o)for(var h in o)p||"content-type"!==h.toLowerCase()?g[h]=o[h]:(p=!0,g["Content-Type"]=o[h]);return"GET"===i&&a&&(n=n+(~n.indexOf("?")?"&"===n.substr(-1)||"?"===n.substr(-1)?"":"&":"?")+U(a)),x.fetch({url:n,method:i,headers:g,type:"json"===c?"json":"text",body:"GET"!==i?U(a,i,g["Content-Type"]):""},(function(t){var n=t.status,a=(t.ok,t.statusText,t.data),o=t.headers,r={};!n||-1===n||d?(r.errMsg="request:fail",e(l)&&l(r)):(r.data=a,r.statusCode=n,r.header=o,e(u)&&u(r)),e(f)&&f(r)})),{abort:function(){d=!0}}},getStorage:function(t){var n=t.key,a=(t.data,t.success),o=t.fail,r=t.complete;R.getItem(n+"__TYPE",(function(t){if("success"===t.result){var i=t.data;R.getItem(n,(function(t){if("success"===t.result){var n=t.data;i&&n?("String"!==i&&(n=JSON.parse(n)),e(a)&&a({errMsg:"getStorage:ok",data:n})):(t.errMsg="setStorage:fail",e(o)&&o(t))}else t.errMsg="setStorage:fail",e(o)&&o(t);e(r)&&r(t)}))}else t.errMsg="setStorage:fail",e(o)&&o(t),e(r)&&r(t)}))},setStorage:function(t){var n=t.key,a=t.data,o=t.success,r=t.fail,i=t.complete,s="String";"object"===(void 0===a?"undefined":N(a))&&(s="Object",a=JSON.stringify(a)),R.setItem(n,a,(function(t){"success"===t.result?R.setItem(n+"__TYPE",s,(function(t){"success"===t.result?e(o)&&o({errMsg:"setStorage:ok"}):(t.errMsg="setStorage:fail",e(r)&&r(t))})):(t.errMsg="setStorage:fail",e(r)&&r(t)),e(i)&&i(t)}))},removeStorage:function(t){var n=t.key,a=(t.data,t.success),o=t.fail,r=t.complete;R.removeItem(n,(function(t){"success"===t.result?e(a)&&a({errMsg:"removeStorage:ok"}):(t.errMsg="removeStorage:fail",e(o)&&o(t)),e(r)&&r(t)})),R.removeItem(n+"__TYPE")},clearStorage:function(e){e.key,e.data,e.success,e.fail,e.complete},getClipboardData:function(t){var n=t.success,a=(t.fail,t.complete);V.getString((function(t){var o={errMsg:"getClipboardData:ok",data:t.data};e(n)&&n(o),e(a)&&a(o)}))},setClipboardData:function(t){var n=t.data,a=t.success,o=(t.fail,t.complete),r={errMsg:"setClipboardData:ok"};V.setString(n),e(a)&&a(r),e(o)&&o(r)},onSubNVueMessage:u,getSubNVueById:d,getCurrentSubNVue:function(){return d(o.webview.currentWebview().id)},$on:function(){return L(F(),"$on",[].concat(Array.prototype.slice.call(arguments)))},$off:function(){return L(F(),"$off",[].concat(Array.prototype.slice.call(arguments)))},$once:function(){return L(F(),"$once",[].concat(Array.prototype.slice.call(arguments)))},$emit:function(){return L(F(),"$emit",[].concat(Array.prototype.slice.call(arguments)))}}),$={os:{nvue:!0}},J={};return"undefined"!=typeof Proxy?J=new Proxy({},{get:function(e,t){if("os"===t)return{nvue:!0};if("postMessage"===t)return _;if("requireNativePlugin"===t)return B;if("onNavigationBarButtonTap"===t)return E;if("onNavigationBarSearchInputChanged"===t)return M;if("onNavigationBarSearchInputConfirmed"===t)return k;if("onNavigationBarSearchInputClicked"===t)return O;var n=j[t];return n||(n=A(t)),r(t)?i(n):n}}):(Object.keys($).forEach((function(e){J[e]=$[e]})),J.postMessage=_,J.requireNativePlugin=B,J.onNavigationBarButtonTap=E,J.onNavigationBarSearchInputChanged=M,J.onNavigationBarSearchInputConfirmed=k,J.onNavigationBarSearchInputClicked=O,Object.keys({uploadFile:!0,downloadFile:!0,chooseImage:!0,previewImage:!0,getImageInfo:!0,saveImageToPhotosAlbum:!0,chooseVideo:!0,saveVideoToPhotosAlbum:!0,saveFile:!0,getSavedFileList:!0,getSavedFileInfo:!0,removeSavedFile:!0,openDocument:!0,setStorage:!0,getStorage:!0,getStorageInfo:!0,removeStorage:!0,clearStorage:!0,getLocation:!0,chooseLocation:!0,openLocation:!0,getSystemInfo:!0,getNetworkType:!0,makePhoneCall:!0,scanCode:!0,setScreenBrightness:!0,getScreenBrightness:!0,setKeepScreenOn:!0,vibrateLong:!0,vibrateShort:!0,addPhoneContact:!0,showToast:!0,showLoading:!0,hideToast:!0,hideLoading:!0,showModal:!0,showActionSheet:!0,setNavigationBarTitle:!0,setNavigationBarColor:!0,navigateTo:!0,redirectTo:!0,reLaunch:!0,switchTab:!0,navigateBack:!0,getProvider:!0,login:!0,getUserInfo:!0,share:!0,requestPayment:!0,subscribePush:!0,unsubscribePush:!0,onPush:!0,offPush:!0}).forEach((function(e){var t=j[e];t||(t=A(e)),r(e)?J[e]=i(t):J[e]=t}))),J};var o=new WeexPlus(weex);t.weexPlus=o;var r=a(weex,o,BroadcastChannel);t.default=r},function(e,t,n){Vue.prototype.__$appStyle__={},Vue.prototype.__merge_style&&Vue.prototype.__merge_style(n(4).default,Vue.prototype.__$appStyle__)},function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t.default=o.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={onLoad:function(){this.initMessage()},methods:{initMessage:function(){var t=this,n=e.webview.currentWebview().extras||{},a=n.from,o=(n.callback,n.runtime),r=n.data,i=void 0===r?{}:r,s=n.useGlobalEvent;this.__from=a,this.__runtime=o,this.__page=e.webview.currentWebview().id,this.__useGlobalEvent=s,this.data=JSON.parse(JSON.stringify(i)),e.key.addEventListener("backbutton",(function(){"function"==typeof t.onClose?t.onClose():e.webview.currentWebview().close("auto")}));var c=this,u=function(e){var t=e.data&&e.data.__message;t&&c.__onMessageCallback&&c.__onMessageCallback(t.data)};this.__useGlobalEvent?weex.requireModule("globalEvent").addEventListener("plusMessage",u):new BroadcastChannel(this.__page).onmessage=u},postMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=JSON.parse(JSON.stringify({__message:{__page:this.__page,data:t,keep:n}})),o=this.__from;if("v8"===this.__runtime)if(this.__useGlobalEvent)e.webview.postMessageToUniNView(a,o);else{var r=new BroadcastChannel(o);r.postMessage(a)}else{var i=e.webview.getWebviewById(o);i&&i.evalJS("__plusMessage&&__plusMessage(".concat(JSON.stringify({data:a}),")"))}},onMessage:function(e){this.__onMessageCallback=e}}};t.default=n}).call(this,n(2).weexPlus)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{locale:"en",fallbackLocale:"en",localization:{en:{done:"OK",cancel:"Cancel"},zh:{done:"完成",cancel:"取消"},"zh-hans":{},"zh-hant":{},messages:{}}}},onLoad:function(){this.initLocale()},created:function(){this.initLocale()},methods:{initLocale:function(){if(!this.__initLocale){this.__initLocale=!0;var t=(e.webview.currentWebview().extras||{}).data||{};if(t.messages&&(this.localization.messages=t.messages),t.locale)this.locale=t.locale.toLowerCase();else{var n=e.os.language.toLowerCase().split("/")[0].replace("_","-").split("-"),a=n[1];a&&(n[1]={chs:"hans",cn:"hans",sg:"hans",cht:"hant",tw:"hant",hk:"hant",mo:"hant"}[a]||a),n.length=n.length>2?2:n.length,this.locale=n.join("-")}}},localize:function(e){var t=this.locale,n=t.split("-")[0],a=this.fallbackLocale,o=this.localization;function r(e){return o[e]||{}}return r("messages")[e]||r(t)[e]||r(n)[e]||r(a)[e]||e}}};t.default=n}).call(this,n(2).weexPlus)},,,function(e,t,n){"use strict";var a=n(33),o=n(18),r=n(1);var i=Object(r.a)(o.default,a.b,a.c,!1,null,null,"6af04a36",!1,a.a,void 0);(function(e){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(n(38).default,this.options.style):Object.assign(this.options.style,n(38).default)}).call(i),t.default=i.exports},,,,,,,,,function(e,t,n){"use strict";var a=n(19),o=n.n(a);t.default=o.a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,o=i(n(5)),r=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=e.barcode,u={qrCode:[c.QR,c.AZTEC,c.MAXICODE],barCode:[c.EAN13,c.EAN8,c.UPCA,c.UPCE,c.CODABAR,c.CODE128,c.CODE39,c.CODE93,c.ITF,c.RSS14,c.RSSEXPANDED],datamatrix:[c.DATAMATRIX],pdf417:[c.PDF417]},l=(s(a={},c.QR,"QR_CODE"),s(a,c.EAN13,"EAN_13"),s(a,c.EAN8,"EAN_8"),s(a,c.DATAMATRIX,"DATA_MATRIX"),s(a,c.UPCA,"UPC_A"),s(a,c.UPCE,"UPC_E"),s(a,c.CODABAR,"CODABAR"),s(a,c.CODE39,"CODE_39"),s(a,c.CODE93,"CODE_93"),s(a,c.CODE128,"CODE_128"),s(a,c.ITF,"CODE_25"),s(a,c.PDF417,"PDF_417"),s(a,c.AZTEC,"AZTEC"),s(a,c.RSS14,"RSS_14"),s(a,c.RSSEXPANDED,"RSSEXPANDED"),a),f={mixins:[o.default,r.default],data:{filters:[0,2,1],backgroud:"#000000",frameColor:"#118ce9",scanbarColor:"#118ce9",enabledFlash:!1,flashImage0:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABjklEQVRoQ+1ZbVHEQAx9TwE4ABTcOQAknANQAKcAUAAOAAXgAHAACsDCKQiTmbYDzJZtNt2bFrJ/m6+Xl2yyU2LmhzOPH/8PgIjcADirxNyapNoffMwMiMgzgMPBHmyCLySPLCoBwJKtAbJbYaBmD1yRvBwAtBMxl5DF+DZkiwCIyBLAzsgBbki+Wm2WAlCaL6zOMvKnJO+sNksB7ALQbO1ZHfbIv5FUVs2nCIB6EZETALdmj2mFY5I6X8ynGEADQllYmL1+VzBfnV/VvQB0aj45ARyQ/Ci14QLQsOBZLe5JaikWnzEA7AN4L4hgA2Dpyb76dANwsOCq/TZhASAYKGie0a7R1lDPI0ebtF0NUi+4yfdAtxr3PEMnD6BbD0QkNfACQO05EAwMuaBqDrIVycdmTpwDuP4R0OR7QFftVRP0g+49cwOQq4DJMxAAchmofY3m/EcJBQOZbTRKKJeBKKEoIePvpFRJ1VzmciUccyCa+C81cerBkuuB7sGTE/zt+yhN7AnAqxsAvBn06n8CkyPwMZKwm+UAAAAASUVORK5CYII=",flashImage1:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUAAAA3kvI3lfY2k/VAl+43k/U3k/Q4k/M3kvI3k/M4k/Q4lPU2lPU2k/Vdq843k/WWSpNKAAAAD3RSTlMAwD+QINCAcPBgUDDgoBAE044kAAAAdklEQVQ4y2OgOrD/DwffUSTkERIfyZXAtOMbca7iVoKDDSgSbAijJqBI8J2HiX9FM2s+TOITmgQrTEIATYIJJuEA5mJ68S+Gg/0hEi0YEoxQK2gs0WyPQyKBGYeEAhPtJRaw45AIccXpwVEJekuwQyQWMFAfAACeDBJY9aXa3QAAAABJRU5ErkJggg==",autoDecodeCharSet:!1,localization:{en:{fail:"Recognition failure","flash.on":"Tap to turn light on","flash.off":"Tap to turn light off"},zh:{fail:"识别失败","flash.on":"轻触照亮","flash.off":"轻触关闭"}}},onLoad:function(){var e=this,t=this.data,n=t.scanType;this.autoDecodeCharSet=t.autoDecodeCharSet;var a=[];Array.isArray(n)&&n.length&&n.forEach((function(e){var t=u[e];t&&(a=a.concat(t))})),a.length||(a=a.concat(u.qrCode).concat(u.barCode).concat(u.datamatrix).concat(u.pdf417)),this.filters=a,this.onMessage((function(t){e.gallery()}))},onUnload:function(){this.cancel()},methods:{start:function(){this.$refs.barcode.start({conserve:!0,filename:"_doc/barcode/"})},scan:function(t){var n=this;c.scan(t,(function(e,t,a,o){n.scanSuccess(e,t,a,o)}),(function(){e.nativeUI.toast(n.localize("fail"))}),this.filters,this.autoDecodeCharSet)},cancel:function(){this.$refs.barcode.cancel()},gallery:function(){var t=this;e.gallery.pick((function(e){t.scan(e)}),(function(n){n.code!==("android"===weex.config.env.platform.toLowerCase()?12:-2)&&e.nativeUI.toast(t.localize("fail"))}),{multiple:!1,system:!1,filename:"_doc/uniapp_temp/gallery/",permissionAlert:!0})},onmarked:function(e){var t=e.detail;this.scanSuccess(t.code,t.message,t.file,t.charSet)},scanSuccess:function(e,t,n,a){this.postMessage({event:"marked",detail:{scanType:l[e],result:t,charSet:a||"utf8",path:n||""}})},onerror:function(e){this.postMessage({event:"fail",message:JSON.stringify(e)})},setFlash:function(){this.enabledFlash=!this.enabledFlash,this.$refs.barcode.setFlash(this.enabledFlash)}}};t.default=f}).call(this,n(2).weexPlus)},function(e,t){e.exports={content:{flex:1,alignItems:"center",justifyContent:"center",backgroundColor:"#000000"},barcode:{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:1},"set-flash":{alignItems:"center",justifyContent:"center",transform:"translateY(80px)",zIndex:2},"image-flash":{width:"26",height:"26",marginBottom:"2"},"image-flash-text":{fontSize:"10",color:"#FFFFFF"}}},,,,,,,,,,,,,function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("scroll-view",{staticStyle:{flexDirection:"column"},attrs:{scrollY:!0,enableBackToTop:!0,bubble:"true"}},[n("view",{staticClass:["content"]},[n("barcode",{ref:"barcode",staticClass:["barcode"],attrs:{autostart:"true",backgroud:e.backgroud,frameColor:e.frameColor,scanbarColor:e.scanbarColor,filters:e.filters,autoDecodeCharset:e.autoDecodeCharSet},on:{marked:e.onmarked,error:e.onerror}}),n("view",{staticClass:["set-flash"],on:{click:e.setFlash}},[n("u-image",{staticClass:["image-flash"],attrs:{src:e.enabledFlash?e.flashImage1:e.flashImage0,resize:"stretch"}}),n("u-text",{staticClass:["image-flash-text"]},[e._v(e._s(e.enabledFlash?e.localize("flash.off"):e.localize("flash.on")))])],1)],1)])},o=[];n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){}))},,,,,function(e,t,n){"use strict";n.r(t);var a=n(20),o=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t.default=o.a},,,,,function(e,t,n){"use strict";n.r(t);n(3);var a=n(9);a.default.mpType="page",a.default.route="template/__uniappscan",a.default.el="#root",new Vue(a.default)}]); \ No newline at end of file -- GitLab