image-resize-3.0.1.min.js 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236
  1. ! function (t, e) {
  2. "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()
  3. }(this, function () {
  4. return function (t) {
  5. function e(o) {
  6. if (n[o]) return n[o].exports;
  7. var r = n[o] = {
  8. i: o,
  9. l: !1,
  10. exports: {}
  11. };
  12. return t[o].call(r.exports, r, r.exports, e), r.l = !0, r.exports
  13. }
  14. var n = {};
  15. return e.m = t, e.c = n, e.i = function (t) {
  16. return t
  17. }, e.d = function (t, n, o) {
  18. e.o(t, n) || Object.defineProperty(t, n, {
  19. configurable: !1,
  20. enumerable: !0,
  21. get: o
  22. })
  23. }, e.n = function (t) {
  24. var n = t && t.__esModule ? function () {
  25. return t.default
  26. } : function () {
  27. return t
  28. };
  29. return e.d(n, "a", n), n
  30. }, e.o = function (t, e) {
  31. return Object.prototype.hasOwnProperty.call(t, e)
  32. }, e.p = "", e(e.s = 39)
  33. }([function (t, e) {
  34. function n(t) {
  35. var e = typeof t;
  36. return null != t && ("object" == e || "function" == e)
  37. }
  38. t.exports = n
  39. }, function (t, e, n) {
  40. var o = n(22),
  41. r = "object" == typeof self && self && self.Object === Object && self,
  42. i = o || r || Function("return this")();
  43. t.exports = i
  44. }, function (t, e) {
  45. function n(t) {
  46. return null != t && "object" == typeof t
  47. }
  48. t.exports = n
  49. }, function (t, e, n) {
  50. function o(t) {
  51. var e = -1,
  52. n = null == t ? 0 : t.length;
  53. for (this.clear(); ++e < n;) {
  54. var o = t[e];
  55. this.set(o[0], o[1])
  56. }
  57. }
  58. var r = n(76),
  59. i = n(77),
  60. u = n(78),
  61. c = n(79),
  62. a = n(80);
  63. o.prototype.clear = r, o.prototype.delete = i, o.prototype.get = u, o.prototype.has = c, o.prototype.set = a, t.exports = o
  64. }, function (t, e, n) {
  65. function o(t, e) {
  66. for (var n = t.length; n--;)
  67. if (r(t[n][0], e)) return n;
  68. return -1
  69. }
  70. var r = n(8);
  71. t.exports = o
  72. }, function (t, e, n) {
  73. function o(t) {
  74. return null == t ? void 0 === t ? a : c : s && s in Object(t) ? i(t) : u(t)
  75. }
  76. var r = n(16),
  77. i = n(65),
  78. u = n(88),
  79. c = "[object Null]",
  80. a = "[object Undefined]",
  81. s = r ? r.toStringTag : void 0;
  82. t.exports = o
  83. }, function (t, e, n) {
  84. function o(t, e) {
  85. var n = t.__data__;
  86. return r(e) ? n["string" == typeof e ? "string" : "hash"] : n.map
  87. }
  88. var r = n(74);
  89. t.exports = o
  90. }, function (t, e, n) {
  91. var o = n(11),
  92. r = o(Object, "create");
  93. t.exports = r
  94. }, function (t, e) {
  95. function n(t, e) {
  96. return t === e || t !== t && e !== e
  97. }
  98. t.exports = n
  99. }, function (t, e, n) {
  100. "use strict";
  101. function o(t, e) {
  102. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  103. }
  104. n.d(e, "a", function () {
  105. return r
  106. });
  107. var r = function t(e) {
  108. 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
  109. }
  110. }, function (t, e, n) {
  111. function o(t, e, n) {
  112. "__proto__" == e && r ? r(t, e, {
  113. configurable: !0,
  114. enumerable: !0,
  115. value: n,
  116. writable: !0
  117. }) : t[e] = n
  118. }
  119. var r = n(21);
  120. t.exports = o
  121. }, function (t, e, n) {
  122. function o(t, e) {
  123. var n = i(t, e);
  124. return r(n) ? n : void 0
  125. }
  126. var r = n(49),
  127. i = n(66);
  128. t.exports = o
  129. }, function (t, e, n) {
  130. function o(t) {
  131. return null != t && i(t.length) && !r(t)
  132. }
  133. var r = n(13),
  134. i = n(31);
  135. t.exports = o
  136. }, function (t, e, n) {
  137. function o(t) {
  138. if (!i(t)) return !1;
  139. var e = r(t);
  140. return e == c || e == a || e == u || e == s
  141. }
  142. var r = n(5),
  143. i = n(0),
  144. u = "[object AsyncFunction]",
  145. c = "[object Function]",
  146. a = "[object GeneratorFunction]",
  147. s = "[object Proxy]";
  148. t.exports = o
  149. }, function (t, e) {
  150. t.exports = function (t) {
  151. return t.webpackPolyfill || (t.deprecate = function () {}, t.paths = [], t.children || (t.children = []), Object.defineProperty(t, "loaded", {
  152. enumerable: !0,
  153. get: function () {
  154. return t.l
  155. }
  156. }), Object.defineProperty(t, "id", {
  157. enumerable: !0,
  158. get: function () {
  159. return t.i
  160. }
  161. }), t.webpackPolyfill = 1), t
  162. }
  163. }, function (t, e, n) {
  164. var o = n(11),
  165. r = n(1),
  166. i = o(r, "Map");
  167. t.exports = i
  168. }, function (t, e, n) {
  169. var o = n(1),
  170. r = o.Symbol;
  171. t.exports = r
  172. }, function (t, e) {
  173. function n(t, e, n) {
  174. switch (n.length) {
  175. case 0:
  176. return t.call(e);
  177. case 1:
  178. return t.call(e, n[0]);
  179. case 2:
  180. return t.call(e, n[0], n[1]);
  181. case 3:
  182. return t.call(e, n[0], n[1], n[2])
  183. }
  184. return t.apply(e, n)
  185. }
  186. t.exports = n
  187. }, function (t, e, n) {
  188. function o(t, e, n) {
  189. (void 0 === n || i(t[e], n)) && (void 0 !== n || e in t) || r(t, e, n)
  190. }
  191. var r = n(10),
  192. i = n(8);
  193. t.exports = o
  194. }, function (t, e, n) {
  195. function o(t, e, n, p, l) {
  196. t !== e && u(e, function (u, s) {
  197. if (l || (l = new r), a(u)) c(t, e, s, n, o, p, l);
  198. else {
  199. var d = p ? p(f(t, s), u, s + "", t, e, l) : void 0;
  200. void 0 === d && (d = u), i(t, s, d)
  201. }
  202. }, s)
  203. }
  204. var r = n(42),
  205. i = n(18),
  206. u = n(47),
  207. c = n(52),
  208. a = n(0),
  209. s = n(33),
  210. f = n(26);
  211. t.exports = o
  212. }, function (t, e, n) {
  213. function o(t, e) {
  214. return u(i(t, e, r), t + "")
  215. }
  216. var r = n(27),
  217. i = n(90),
  218. u = n(91);
  219. t.exports = o
  220. }, function (t, e, n) {
  221. var o = n(11),
  222. r = function () {
  223. try {
  224. var t = o(Object, "defineProperty");
  225. return t({}, "", {}), t
  226. } catch (t) {}
  227. }();
  228. t.exports = r
  229. }, function (t, e, n) {
  230. (function (e) {
  231. var n = "object" == typeof e && e && e.Object === Object && e;
  232. t.exports = n
  233. }).call(e, n(105))
  234. }, function (t, e, n) {
  235. var o = n(89),
  236. r = o(Object.getPrototypeOf, Object);
  237. t.exports = r
  238. }, function (t, e) {
  239. function n(t, e) {
  240. var n = typeof t;
  241. return !!(e = null == e ? o : e) && ("number" == n || "symbol" != n && r.test(t)) && t > -1 && t % 1 == 0 && t < e
  242. }
  243. var o = 9007199254740991,
  244. r = /^(?:0|[1-9]\d*)$/;
  245. t.exports = n
  246. }, function (t, e) {
  247. function n(t) {
  248. var e = t && t.constructor;
  249. return t === ("function" == typeof e && e.prototype || o)
  250. }
  251. var o = Object.prototype;
  252. t.exports = n
  253. }, function (t, e) {
  254. function n(t, e) {
  255. if (("constructor" !== e || "function" != typeof t[e]) && "__proto__" != e) return t[e]
  256. }
  257. t.exports = n
  258. }, function (t, e) {
  259. function n(t) {
  260. return t
  261. }
  262. t.exports = n
  263. }, function (t, e, n) {
  264. var o = n(48),
  265. r = n(2),
  266. i = Object.prototype,
  267. u = i.hasOwnProperty,
  268. c = i.propertyIsEnumerable,
  269. a = o(function () {
  270. return arguments
  271. }()) ? o : function (t) {
  272. return r(t) && u.call(t, "callee") && !c.call(t, "callee")
  273. };
  274. t.exports = a
  275. }, function (t, e) {
  276. var n = Array.isArray;
  277. t.exports = n
  278. }, function (t, e, n) {
  279. (function (t) {
  280. var o = n(1),
  281. r = n(103),
  282. i = "object" == typeof e && e && !e.nodeType && e,
  283. u = i && "object" == typeof t && t && !t.nodeType && t,
  284. c = u && u.exports === i,
  285. a = c ? o.Buffer : void 0,
  286. s = a ? a.isBuffer : void 0,
  287. f = s || r;
  288. t.exports = f
  289. }).call(e, n(14)(t))
  290. }, function (t, e) {
  291. function n(t) {
  292. return "number" == typeof t && t > -1 && t % 1 == 0 && t <= o
  293. }
  294. var o = 9007199254740991;
  295. t.exports = n
  296. }, function (t, e, n) {
  297. var o = n(50),
  298. r = n(55),
  299. i = n(87),
  300. u = i && i.isTypedArray,
  301. c = u ? r(u) : o;
  302. t.exports = c
  303. }, function (t, e, n) {
  304. function o(t) {
  305. return u(t) ? r(t, !0) : i(t)
  306. }
  307. var r = n(44),
  308. i = n(51),
  309. u = n(12);
  310. t.exports = o
  311. }, function (t, e, n) {
  312. "use strict";
  313. e.a = {
  314. modules: ["DisplaySize", "Toolbar", "Resize"]
  315. }
  316. }, function (t, e, n) {
  317. "use strict";
  318. function o(t, e) {
  319. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  320. }
  321. function r(t, e) {
  322. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  323. return !e || "object" != typeof e && "function" != typeof e ? t : e
  324. }
  325. function i(t, e) {
  326. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  327. t.prototype = Object.create(e && e.prototype, {
  328. constructor: {
  329. value: t,
  330. enumerable: !1,
  331. writable: !0,
  332. configurable: !0
  333. }
  334. }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
  335. }
  336. n.d(e, "a", function () {
  337. return c
  338. });
  339. var u = n(9),
  340. c = function (t) {
  341. function e() {
  342. var t, n, i, u;
  343. o(this, e);
  344. for (var c = arguments.length, a = Array(c), s = 0; s < c; s++) a[s] = arguments[s];
  345. return n = i = r(this, (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply(t, [this].concat(a))), i.onCreate = function () {
  346. i.display = document.createElement("div"), i.display.classList.add("ql-image-size"), i.overlay.appendChild(i.display)
  347. }, i.onDestroy = function () {}, i.onUpdate = function () {
  348. if (i.display && i.img) {
  349. var t = i.getCurrentSize();
  350. i.display.innerHTML = t.join(" &times; "), Object.assign(i.display.style, {
  351. right: "4px",
  352. top: "4px",
  353. left: "auto"
  354. })
  355. }
  356. }, i.getCurrentSize = function () {
  357. return [i.img.width, Math.round(i.img.width / i.img.naturalWidth * i.img.naturalHeight)]
  358. }, u = n, r(i, u)
  359. }
  360. return i(e, t), e
  361. }(u.a)
  362. }, function (t, e, n) {
  363. "use strict";
  364. function o(t, e) {
  365. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  366. }
  367. function r(t, e) {
  368. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  369. return !e || "object" != typeof e && "function" != typeof e ? t : e
  370. }
  371. function i(t, e) {
  372. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  373. t.prototype = Object.create(e && e.prototype, {
  374. constructor: {
  375. value: t,
  376. enumerable: !1,
  377. writable: !0,
  378. configurable: !0
  379. }
  380. }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
  381. }
  382. n.d(e, "a", function () {
  383. return f
  384. });
  385. var u = n(9),
  386. c = navigator.maxTouchPoints,
  387. a = !1;
  388. try {
  389. var s = Object.defineProperty({}, "passive", {
  390. get: function () {
  391. a = {
  392. passive: !1
  393. }
  394. }
  395. });
  396. window.addEventListener("test", null, s)
  397. } catch (t) {}
  398. var f = function (t) {
  399. function e() {
  400. var t, n, i, u;
  401. o(this, e);
  402. for (var s = arguments.length, f = Array(s), p = 0; p < s; p++) f[p] = arguments[p];
  403. return n = i = r(this, (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply(t, [this].concat(f))), i.onCreate = function () {
  404. i.boxes = [], i.addBox("nwse-resize"), i.addBox("nesw-resize"), i.addBox("nwse-resize"), i.addBox("nesw-resize"), i.positionBoxes()
  405. }, i.onDestroy = function () {
  406. i.setCursor("")
  407. }, i.positionBoxes = function () {
  408. [{
  409. left: "-6px",
  410. top: "-6px"
  411. }, {
  412. right: "-6px",
  413. top: "-6px"
  414. }, {
  415. right: "-6px",
  416. bottom: "-6px"
  417. }, {
  418. left: "-6px",
  419. bottom: "-6px"
  420. }].forEach(function (t, e) {
  421. Object.assign(i.boxes[e].style, t)
  422. })
  423. }, i.addBox = function (t) {
  424. var e = document.createElement("div");
  425. 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)
  426. }, i.handleMousedown = function (t) {
  427. i.dragBox = t.target;
  428. var e = c ? t.changedTouches[0] : t;
  429. 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)
  430. }, i.handleMouseup = function () {
  431. i.setCursor(""), document.removeEventListener(c ? "touchmove" : "mousemove", i.handleDrag), document.removeEventListener(c ? "touchend" : "mouseup", i.handleMouseup)
  432. }, i.handleDrag = function (t) {
  433. if (i.img) {
  434. var e = c ? t.changedTouches[0] : t,
  435. n = e.clientX - i.dragStartX;
  436. 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()
  437. }
  438. }, i.setCursor = function (t) {
  439. [document.body, i.img].forEach(function (e) {
  440. e.style.cursor = t
  441. })
  442. }, u = n, r(i, u)
  443. }
  444. return i(e, t), e
  445. }(u.a)
  446. }, function (t, e, n) {
  447. "use strict";
  448. function o(t, e) {
  449. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  450. }
  451. function r(t, e) {
  452. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  453. return !e || "object" != typeof e && "function" != typeof e ? t : e
  454. }
  455. function i(t, e) {
  456. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  457. t.prototype = Object.create(e && e.prototype, {
  458. constructor: {
  459. value: t,
  460. enumerable: !1,
  461. writable: !0,
  462. configurable: !0
  463. }
  464. }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
  465. }
  466. n.d(e, "a", function () {
  467. return c
  468. });
  469. var u = n(9),
  470. c = function (t) {
  471. function e() {
  472. var t, n, i, u;
  473. o(this, e);
  474. for (var c = arguments.length, a = Array(c), s = 0; s < c; s++) a[s] = arguments[s];
  475. return n = i = r(this, (t = e.__proto__ || Object.getPrototypeOf(e)).call.apply(t, [this].concat(a))), i.onCreate = function () {
  476. i.toolbar = document.createElement("div"), i.toolbar.classList.add("ql-image-toolbar"), i.overlay.appendChild(i.toolbar), i._addToolbarButtons()
  477. }, i.onDestroy = function () {}, i.onUpdate = function () {}, i._addToolbarButtons = function () {
  478. var t = document.createElement("span");
  479. t.classList.add("triangle-up"), i.toolbar.appendChild(t);
  480. var e = document.createElement("span");
  481. e.innerText = "删除", e.addEventListener("click", function () {
  482. var t = new CustomEvent("keyup");
  483. t.keyCode = 46, document.dispatchEvent(t)
  484. }), i.toolbar.appendChild(e)
  485. }, u = n, r(i, u)
  486. }
  487. return i(e, t), e
  488. }(u.a)
  489. }, function (t, e, n) {
  490. var o = n(17),
  491. r = n(20),
  492. i = n(64),
  493. u = n(102),
  494. c = r(function (t) {
  495. return t.push(void 0, i), o(u, void 0, t)
  496. });
  497. t.exports = c
  498. }, function (t, e, n) {
  499. "use strict";
  500. function o(t, e) {
  501. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  502. }
  503. Object.defineProperty(e, "__esModule", {
  504. value: !0
  505. });
  506. var r = n(38),
  507. i = n.n(r),
  508. u = n(34),
  509. c = n(35),
  510. a = n(37),
  511. s = n(36),
  512. f = {
  513. DisplaySize: c.a,
  514. Toolbar: a.a,
  515. Resize: s.a
  516. },
  517. p = function t(e) {
  518. var n = this,
  519. r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
  520. o(this, t), this.initializeModules = function () {
  521. n.removeModules(), n.modules = n.moduleClasses.map(function (t) {
  522. return new(f[t] || t)(n)
  523. }), n.modules.forEach(function (t) {
  524. t.onCreate()
  525. }), n.onUpdate()
  526. }, this.onUpdate = function () {
  527. n.repositionElements(), n.modules.forEach(function (t) {
  528. t.onUpdate()
  529. })
  530. }, this.removeModules = function () {
  531. n.modules.forEach(function (t) {
  532. t.onDestroy()
  533. }), n.modules = []
  534. }, this.handleClick = function (t) {
  535. if (t.target && t.target.tagName && "IMG" === t.target.tagName.toUpperCase()) {
  536. if (n.img === t.target) return;
  537. n.img && n.hide(), n.show(t.target)
  538. } else n.img && n.hide()
  539. }, this.show = function (t) {
  540. n.img = t, n.showOverlay(), n.initializeModules()
  541. }, this.showOverlay = function () {
  542. 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()
  543. }, this.hideOverlay = function () {
  544. 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(""))
  545. }, this.repositionElements = function () {
  546. if (n.overlay && n.img) {
  547. var t = n.quill.root.parentNode,
  548. e = n.img.getBoundingClientRect(),
  549. o = t.getBoundingClientRect();
  550. Object.assign(n.overlay.style, {
  551. left: e.left - o.left - 1 + t.scrollLeft + "px",
  552. top: e.top - o.top + t.scrollTop + "px",
  553. width: e.width + "px",
  554. height: e.height + "px"
  555. })
  556. }
  557. }, this.hide = function () {
  558. n.hideOverlay(), n.removeModules(), n.img = void 0
  559. }, this.setUserSelect = function (t) {
  560. ["userSelect", "mozUserSelect", "webkitUserSelect", "msUserSelect"].forEach(function (e) {
  561. n.quill.root.style[e] = t, document.documentElement.style[e] = t
  562. })
  563. }, this.checkImage = function (t) {
  564. n.img && (46 != t.keyCode && 8 != t.keyCode || window.Quill.find(n.img).deleteAt(0), n.hide())
  565. }, this.quill = e;
  566. var c = !1;
  567. 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 = []
  568. };
  569. e.default = p, window.Quill && window.Quill.register("modules/imageResize", p)
  570. }, function (t, e, n) {
  571. function o(t) {
  572. var e = -1,
  573. n = null == t ? 0 : t.length;
  574. for (this.clear(); ++e < n;) {
  575. var o = t[e];
  576. this.set(o[0], o[1])
  577. }
  578. }
  579. var r = n(67),
  580. i = n(68),
  581. u = n(69),
  582. c = n(70),
  583. a = n(71);
  584. o.prototype.clear = r, o.prototype.delete = i, o.prototype.get = u, o.prototype.has = c, o.prototype.set = a, t.exports = o
  585. }, function (t, e, n) {
  586. function o(t) {
  587. var e = -1,
  588. n = null == t ? 0 : t.length;
  589. for (this.clear(); ++e < n;) {
  590. var o = t[e];
  591. this.set(o[0], o[1])
  592. }
  593. }
  594. var r = n(81),
  595. i = n(82),
  596. u = n(83),
  597. c = n(84),
  598. a = n(85);
  599. o.prototype.clear = r, o.prototype.delete = i, o.prototype.get = u, o.prototype.has = c, o.prototype.set = a, t.exports = o
  600. }, function (t, e, n) {
  601. function o(t) {
  602. var e = this.__data__ = new r(t);
  603. this.size = e.size
  604. }
  605. var r = n(3),
  606. i = n(93),
  607. u = n(94),
  608. c = n(95),
  609. a = n(96),
  610. s = n(97);
  611. o.prototype.clear = i, o.prototype.delete = u, o.prototype.get = c, o.prototype.has = a, o.prototype.set = s, t.exports = o
  612. }, function (t, e, n) {
  613. var o = n(1),
  614. r = o.Uint8Array;
  615. t.exports = r
  616. }, function (t, e, n) {
  617. function o(t, e) {
  618. var n = u(t),
  619. o = !n && i(t),
  620. f = !n && !o && c(t),
  621. l = !n && !o && !f && s(t),
  622. d = n || o || f || l,
  623. h = d ? r(t.length, String) : [],
  624. v = h.length;
  625. 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);
  626. return h
  627. }
  628. var r = n(54),
  629. i = n(28),
  630. u = n(29),
  631. c = n(30),
  632. a = n(24),
  633. s = n(32),
  634. f = Object.prototype,
  635. p = f.hasOwnProperty;
  636. t.exports = o
  637. }, function (t, e, n) {
  638. function o(t, e, n) {
  639. var o = t[e];
  640. c.call(t, e) && i(o, n) && (void 0 !== n || e in t) || r(t, e, n)
  641. }
  642. var r = n(10),
  643. i = n(8),
  644. u = Object.prototype,
  645. c = u.hasOwnProperty;
  646. t.exports = o
  647. }, function (t, e, n) {
  648. var o = n(0),
  649. r = Object.create,
  650. i = function () {
  651. function t() {}
  652. return function (e) {
  653. if (!o(e)) return {};
  654. if (r) return r(e);
  655. t.prototype = e;
  656. var n = new t;
  657. return t.prototype = void 0, n
  658. }
  659. }();
  660. t.exports = i
  661. }, function (t, e, n) {
  662. var o = n(63),
  663. r = o();
  664. t.exports = r
  665. }, function (t, e, n) {
  666. function o(t) {
  667. return i(t) && r(t) == u
  668. }
  669. var r = n(5),
  670. i = n(2),
  671. u = "[object Arguments]";
  672. t.exports = o
  673. }, function (t, e, n) {
  674. function o(t) {
  675. return !(!u(t) || i(t)) && (r(t) ? h : s).test(c(t))
  676. }
  677. var r = n(13),
  678. i = n(75),
  679. u = n(0),
  680. c = n(98),
  681. a = /[\\^$.*+?()[\]{}|]/g,
  682. s = /^\[object .+?Constructor\]$/,
  683. f = Function.prototype,
  684. p = Object.prototype,
  685. l = f.toString,
  686. d = p.hasOwnProperty,
  687. h = RegExp("^" + l.call(d).replace(a, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  688. t.exports = o
  689. }, function (t, e, n) {
  690. function o(t) {
  691. return u(t) && i(t.length) && !!c[r(t)]
  692. }
  693. var r = n(5),
  694. i = n(31),
  695. u = n(2),
  696. c = {};
  697. 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
  698. }, function (t, e, n) {
  699. function o(t) {
  700. if (!r(t)) return u(t);
  701. var e = i(t),
  702. n = [];
  703. for (var o in t)("constructor" != o || !e && a.call(t, o)) && n.push(o);
  704. return n
  705. }
  706. var r = n(0),
  707. i = n(25),
  708. u = n(86),
  709. c = Object.prototype,
  710. a = c.hasOwnProperty;
  711. t.exports = o
  712. }, function (t, e, n) {
  713. function o(t, e, n, o, g, _, m) {
  714. var j = b(t, n),
  715. w = b(e, n),
  716. O = m.get(w);
  717. if (O) return void r(t, n, O);
  718. var E = _ ? _(j, w, n + "", t, e, m) : void 0,
  719. z = void 0 === E;
  720. if (z) {
  721. var C = f(w),
  722. P = !C && l(w),
  723. S = !C && !P && y(w);
  724. 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
  725. }
  726. z && (m.set(w, E), g(E, w, o, _, m), m.delete(w)), r(t, n, E)
  727. }
  728. var r = n(18),
  729. i = n(57),
  730. u = n(58),
  731. c = n(59),
  732. a = n(72),
  733. s = n(28),
  734. f = n(29),
  735. p = n(100),
  736. l = n(30),
  737. d = n(13),
  738. h = n(0),
  739. v = n(101),
  740. y = n(32),
  741. b = n(26),
  742. x = n(104);
  743. t.exports = o
  744. }, function (t, e, n) {
  745. var o = n(99),
  746. r = n(21),
  747. i = n(27),
  748. u = r ? function (t, e) {
  749. return r(t, "toString", {
  750. configurable: !0,
  751. enumerable: !1,
  752. value: o(e),
  753. writable: !0
  754. })
  755. } : i;
  756. t.exports = u
  757. }, function (t, e) {
  758. function n(t, e) {
  759. for (var n = -1, o = Array(t); ++n < t;) o[n] = e(n);
  760. return o
  761. }
  762. t.exports = n
  763. }, function (t, e) {
  764. function n(t) {
  765. return function (e) {
  766. return t(e)
  767. }
  768. }
  769. t.exports = n
  770. }, function (t, e, n) {
  771. function o(t) {
  772. var e = new t.constructor(t.byteLength);
  773. return new r(e).set(new r(t)), e
  774. }
  775. var r = n(43);
  776. t.exports = o
  777. }, function (t, e, n) {
  778. (function (t) {
  779. function o(t, e) {
  780. if (e) return t.slice();
  781. var n = t.length,
  782. o = s ? s(n) : new t.constructor(n);
  783. return t.copy(o), o
  784. }
  785. var r = n(1),
  786. i = "object" == typeof e && e && !e.nodeType && e,
  787. u = i && "object" == typeof t && t && !t.nodeType && t,
  788. c = u && u.exports === i,
  789. a = c ? r.Buffer : void 0,
  790. s = a ? a.allocUnsafe : void 0;
  791. t.exports = o
  792. }).call(e, n(14)(t))
  793. }, function (t, e, n) {
  794. function o(t, e) {
  795. var n = e ? r(t.buffer) : t.buffer;
  796. return new t.constructor(n, t.byteOffset, t.length)
  797. }
  798. var r = n(56);
  799. t.exports = o
  800. }, function (t, e) {
  801. function n(t, e) {
  802. var n = -1,
  803. o = t.length;
  804. for (e || (e = Array(o)); ++n < o;) e[n] = t[n];
  805. return e
  806. }
  807. t.exports = n
  808. }, function (t, e, n) {
  809. function o(t, e, n, o) {
  810. var u = !n;
  811. n || (n = {});
  812. for (var c = -1, a = e.length; ++c < a;) {
  813. var s = e[c],
  814. f = o ? o(n[s], t[s], s, n, t) : void 0;
  815. void 0 === f && (f = t[s]), u ? i(n, s, f) : r(n, s, f)
  816. }
  817. return n
  818. }
  819. var r = n(45),
  820. i = n(10);
  821. t.exports = o
  822. }, function (t, e, n) {
  823. var o = n(1),
  824. r = o["__core-js_shared__"];
  825. t.exports = r
  826. }, function (t, e, n) {
  827. function o(t) {
  828. return r(function (e, n) {
  829. var o = -1,
  830. r = n.length,
  831. u = r > 1 ? n[r - 1] : void 0,
  832. c = r > 2 ? n[2] : void 0;
  833. 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;) {
  834. var a = n[o];
  835. a && t(e, a, o, u)
  836. }
  837. return e
  838. })
  839. }
  840. var r = n(20),
  841. i = n(73);
  842. t.exports = o
  843. }, function (t, e) {
  844. function n(t) {
  845. return function (e, n, o) {
  846. for (var r = -1, i = Object(e), u = o(e), c = u.length; c--;) {
  847. var a = u[t ? c : ++r];
  848. if (!1 === n(i[a], a, i)) break
  849. }
  850. return e
  851. }
  852. }
  853. t.exports = n
  854. }, function (t, e, n) {
  855. function o(t, e, n, u, c, a) {
  856. return i(t) && i(e) && (a.set(e, t), r(t, e, void 0, o, a), a.delete(e)), t
  857. }
  858. var r = n(19),
  859. i = n(0);
  860. t.exports = o
  861. }, function (t, e, n) {
  862. function o(t) {
  863. var e = u.call(t, a),
  864. n = t[a];
  865. try {
  866. t[a] = void 0;
  867. var o = !0
  868. } catch (t) {}
  869. var r = c.call(t);
  870. return o && (e ? t[a] = n : delete t[a]), r
  871. }
  872. var r = n(16),
  873. i = Object.prototype,
  874. u = i.hasOwnProperty,
  875. c = i.toString,
  876. a = r ? r.toStringTag : void 0;
  877. t.exports = o
  878. }, function (t, e) {
  879. function n(t, e) {
  880. return null == t ? void 0 : t[e]
  881. }
  882. t.exports = n
  883. }, function (t, e, n) {
  884. function o() {
  885. this.__data__ = r ? r(null) : {}, this.size = 0
  886. }
  887. var r = n(7);
  888. t.exports = o
  889. }, function (t, e) {
  890. function n(t) {
  891. var e = this.has(t) && delete this.__data__[t];
  892. return this.size -= e ? 1 : 0, e
  893. }
  894. t.exports = n
  895. }, function (t, e, n) {
  896. function o(t) {
  897. var e = this.__data__;
  898. if (r) {
  899. var n = e[t];
  900. return n === i ? void 0 : n
  901. }
  902. return c.call(e, t) ? e[t] : void 0
  903. }
  904. var r = n(7),
  905. i = "__lodash_hash_undefined__",
  906. u = Object.prototype,
  907. c = u.hasOwnProperty;
  908. t.exports = o
  909. }, function (t, e, n) {
  910. function o(t) {
  911. var e = this.__data__;
  912. return r ? void 0 !== e[t] : u.call(e, t)
  913. }
  914. var r = n(7),
  915. i = Object.prototype,
  916. u = i.hasOwnProperty;
  917. t.exports = o
  918. }, function (t, e, n) {
  919. function o(t, e) {
  920. var n = this.__data__;
  921. return this.size += this.has(t) ? 0 : 1, n[t] = r && void 0 === e ? i : e, this
  922. }
  923. var r = n(7),
  924. i = "__lodash_hash_undefined__";
  925. t.exports = o
  926. }, function (t, e, n) {
  927. function o(t) {
  928. return "function" != typeof t.constructor || u(t) ? {} : r(i(t))
  929. }
  930. var r = n(46),
  931. i = n(23),
  932. u = n(25);
  933. t.exports = o
  934. }, function (t, e, n) {
  935. function o(t, e, n) {
  936. if (!c(n)) return !1;
  937. var o = typeof e;
  938. return !!("number" == o ? i(n) && u(e, n.length) : "string" == o && e in n) && r(n[e], t)
  939. }
  940. var r = n(8),
  941. i = n(12),
  942. u = n(24),
  943. c = n(0);
  944. t.exports = o
  945. }, function (t, e) {
  946. function n(t) {
  947. var e = typeof t;
  948. return "string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t
  949. }
  950. t.exports = n
  951. }, function (t, e, n) {
  952. function o(t) {
  953. return !!i && i in t
  954. }
  955. var r = n(61),
  956. i = function () {
  957. var t = /[^.]+$/.exec(r && r.keys && r.keys.IE_PROTO || "");
  958. return t ? "Symbol(src)_1." + t : ""
  959. }();
  960. t.exports = o
  961. }, function (t, e) {
  962. function n() {
  963. this.__data__ = [], this.size = 0
  964. }
  965. t.exports = n
  966. }, function (t, e, n) {
  967. function o(t) {
  968. var e = this.__data__,
  969. n = r(e, t);
  970. return !(n < 0) && (n == e.length - 1 ? e.pop() : u.call(e, n, 1), --this.size, !0)
  971. }
  972. var r = n(4),
  973. i = Array.prototype,
  974. u = i.splice;
  975. t.exports = o
  976. }, function (t, e, n) {
  977. function o(t) {
  978. var e = this.__data__,
  979. n = r(e, t);
  980. return n < 0 ? void 0 : e[n][1]
  981. }
  982. var r = n(4);
  983. t.exports = o
  984. }, function (t, e, n) {
  985. function o(t) {
  986. return r(this.__data__, t) > -1
  987. }
  988. var r = n(4);
  989. t.exports = o
  990. }, function (t, e, n) {
  991. function o(t, e) {
  992. var n = this.__data__,
  993. o = r(n, t);
  994. return o < 0 ? (++this.size, n.push([t, e])) : n[o][1] = e, this
  995. }
  996. var r = n(4);
  997. t.exports = o
  998. }, function (t, e, n) {
  999. function o() {
  1000. this.size = 0, this.__data__ = {
  1001. hash: new r,
  1002. map: new(u || i),
  1003. string: new r
  1004. }
  1005. }
  1006. var r = n(40),
  1007. i = n(3),
  1008. u = n(15);
  1009. t.exports = o
  1010. }, function (t, e, n) {
  1011. function o(t) {
  1012. var e = r(this, t).delete(t);
  1013. return this.size -= e ? 1 : 0, e
  1014. }
  1015. var r = n(6);
  1016. t.exports = o
  1017. }, function (t, e, n) {
  1018. function o(t) {
  1019. return r(this, t).get(t)
  1020. }
  1021. var r = n(6);
  1022. t.exports = o
  1023. }, function (t, e, n) {
  1024. function o(t) {
  1025. return r(this, t).has(t)
  1026. }
  1027. var r = n(6);
  1028. t.exports = o
  1029. }, function (t, e, n) {
  1030. function o(t, e) {
  1031. var n = r(this, t),
  1032. o = n.size;
  1033. return n.set(t, e), this.size += n.size == o ? 0 : 1, this
  1034. }
  1035. var r = n(6);
  1036. t.exports = o
  1037. }, function (t, e) {
  1038. function n(t) {
  1039. var e = [];
  1040. if (null != t)
  1041. for (var n in Object(t)) e.push(n);
  1042. return e
  1043. }
  1044. t.exports = n
  1045. }, function (t, e, n) {
  1046. (function (t) {
  1047. var o = n(22),
  1048. r = "object" == typeof e && e && !e.nodeType && e,
  1049. i = r && "object" == typeof t && t && !t.nodeType && t,
  1050. u = i && i.exports === r,
  1051. c = u && o.process,
  1052. a = function () {
  1053. try {
  1054. var t = i && i.require && i.require("util").types;
  1055. return t || c && c.binding && c.binding("util")
  1056. } catch (t) {}
  1057. }();
  1058. t.exports = a
  1059. }).call(e, n(14)(t))
  1060. }, function (t, e) {
  1061. function n(t) {
  1062. return r.call(t)
  1063. }
  1064. var o = Object.prototype,
  1065. r = o.toString;
  1066. t.exports = n
  1067. }, function (t, e) {
  1068. function n(t, e) {
  1069. return function (n) {
  1070. return t(e(n))
  1071. }
  1072. }
  1073. t.exports = n
  1074. }, function (t, e, n) {
  1075. function o(t, e, n) {
  1076. return e = i(void 0 === e ? t.length - 1 : e, 0),
  1077. function () {
  1078. for (var o = arguments, u = -1, c = i(o.length - e, 0), a = Array(c); ++u < c;) a[u] = o[e + u];
  1079. u = -1;
  1080. for (var s = Array(e + 1); ++u < e;) s[u] = o[u];
  1081. return s[e] = n(a), r(t, this, s)
  1082. }
  1083. }
  1084. var r = n(17),
  1085. i = Math.max;
  1086. t.exports = o
  1087. }, function (t, e, n) {
  1088. var o = n(53),
  1089. r = n(92),
  1090. i = r(o);
  1091. t.exports = i
  1092. }, function (t, e) {
  1093. function n(t) {
  1094. var e = 0,
  1095. n = 0;
  1096. return function () {
  1097. var u = i(),
  1098. c = r - (u - n);
  1099. if (n = u, c > 0) {
  1100. if (++e >= o) return arguments[0]
  1101. } else e = 0;
  1102. return t.apply(void 0, arguments)
  1103. }
  1104. }
  1105. var o = 800,
  1106. r = 16,
  1107. i = Date.now;
  1108. t.exports = n
  1109. }, function (t, e, n) {
  1110. function o() {
  1111. this.__data__ = new r, this.size = 0
  1112. }
  1113. var r = n(3);
  1114. t.exports = o
  1115. }, function (t, e) {
  1116. function n(t) {
  1117. var e = this.__data__,
  1118. n = e.delete(t);
  1119. return this.size = e.size, n
  1120. }
  1121. t.exports = n
  1122. }, function (t, e) {
  1123. function n(t) {
  1124. return this.__data__.get(t)
  1125. }
  1126. t.exports = n
  1127. }, function (t, e) {
  1128. function n(t) {
  1129. return this.__data__.has(t)
  1130. }
  1131. t.exports = n
  1132. }, function (t, e, n) {
  1133. function o(t, e) {
  1134. var n = this.__data__;
  1135. if (n instanceof r) {
  1136. var o = n.__data__;
  1137. if (!i || o.length < c - 1) return o.push([t, e]), this.size = ++n.size, this;
  1138. n = this.__data__ = new u(o)
  1139. }
  1140. return n.set(t, e), this.size = n.size, this
  1141. }
  1142. var r = n(3),
  1143. i = n(15),
  1144. u = n(41),
  1145. c = 200;
  1146. t.exports = o
  1147. }, function (t, e) {
  1148. function n(t) {
  1149. if (null != t) {
  1150. try {
  1151. return r.call(t)
  1152. } catch (t) {}
  1153. try {
  1154. return t + ""
  1155. } catch (t) {}
  1156. }
  1157. return ""
  1158. }
  1159. var o = Function.prototype,
  1160. r = o.toString;
  1161. t.exports = n
  1162. }, function (t, e) {
  1163. function n(t) {
  1164. return function () {
  1165. return t
  1166. }
  1167. }
  1168. t.exports = n
  1169. }, function (t, e, n) {
  1170. function o(t) {
  1171. return i(t) && r(t)
  1172. }
  1173. var r = n(12),
  1174. i = n(2);
  1175. t.exports = o
  1176. }, function (t, e, n) {
  1177. function o(t) {
  1178. if (!u(t) || r(t) != c) return !1;
  1179. var e = i(t);
  1180. if (null === e) return !0;
  1181. var n = p.call(e, "constructor") && e.constructor;
  1182. return "function" == typeof n && n instanceof n && f.call(n) == l
  1183. }
  1184. var r = n(5),
  1185. i = n(23),
  1186. u = n(2),
  1187. c = "[object Object]",
  1188. a = Function.prototype,
  1189. s = Object.prototype,
  1190. f = a.toString,
  1191. p = s.hasOwnProperty,
  1192. l = f.call(Object);
  1193. t.exports = o
  1194. }, function (t, e, n) {
  1195. var o = n(19),
  1196. r = n(62),
  1197. i = r(function (t, e, n, r) {
  1198. o(t, e, n, r)
  1199. });
  1200. t.exports = i
  1201. }, function (t, e) {
  1202. function n() {
  1203. return !1
  1204. }
  1205. t.exports = n
  1206. }, function (t, e, n) {
  1207. function o(t) {
  1208. return r(t, i(t))
  1209. }
  1210. var r = n(60),
  1211. i = n(33);
  1212. t.exports = o
  1213. }, function (t, e) {
  1214. var n;
  1215. n = function () {
  1216. return this
  1217. }();
  1218. try {
  1219. n = n || Function("return this")() || (0, eval)("this")
  1220. } catch (t) {
  1221. "object" == typeof window && (n = window)
  1222. }
  1223. t.exports = n
  1224. }])
  1225. });