From 57a9dc78ab0a75933c1d893c6c7f33f234c404d5 Mon Sep 17 00:00:00 2001 From: gaoxiongzaq Date: Thu, 20 Apr 2023 16:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20drawio=20=E7=BB=98?= =?UTF-8?q?=E5=9B=BE=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.cn.md | 1 + README.md | 1 + .../main/java/cn/keking/model/FileType.java | 7 +- .../java/cn/keking/service/FilePreview.java | 1 + .../service/impl/DrawioFilePreviewImpl.java | 25 + .../main/resources/static/drawio/index.html | 313 + .../static/drawio/js/Dropbox-sdk.min.js | 10 + .../resources/static/drawio/js/PostConfig.js | 8 + .../resources/static/drawio/js/PreConfig.js | 13 + .../resources/static/drawio/js/app.min.js | 114721 +++++++++++++++ .../static/drawio/js/extensions.min.js | 3050 + .../static/drawio/js/shapes-14-6-5.min.js | 3057 + .../resources/static/drawio/js/startup.js | 1 + .../static/drawio/js/stencils.min.js | 216 + .../static/drawio/mxgraph/css/common.css | 146 + .../static/drawio/mxgraph/css/explorer.css | 18 + .../static/drawio/mxgraph/images/button.gif | Bin 0 -> 137 bytes .../static/drawio/mxgraph/images/close.gif | Bin 0 -> 70 bytes .../drawio/mxgraph/images/collapsed.gif | Bin 0 -> 877 bytes .../static/drawio/mxgraph/images/error.gif | Bin 0 -> 907 bytes .../static/drawio/mxgraph/images/expanded.gif | Bin 0 -> 878 bytes .../static/drawio/mxgraph/images/maximize.gif | Bin 0 -> 843 bytes .../static/drawio/mxgraph/images/minimize.gif | Bin 0 -> 64 bytes .../drawio/mxgraph/images/normalize.gif | Bin 0 -> 845 bytes .../static/drawio/mxgraph/images/point.gif | Bin 0 -> 55 bytes .../static/drawio/mxgraph/images/resize.gif | Bin 0 -> 74 bytes .../drawio/mxgraph/images/separator.gif | Bin 0 -> 146 bytes .../static/drawio/mxgraph/images/submenu.gif | Bin 0 -> 56 bytes .../drawio/mxgraph/images/transparent.gif | Bin 0 -> 90 bytes .../static/drawio/mxgraph/images/warning.gif | Bin 0 -> 276 bytes .../static/drawio/mxgraph/images/warning.png | Bin 0 -> 425 bytes .../drawio/mxgraph/images/window-title.gif | Bin 0 -> 275 bytes .../static/drawio/mxgraph/images/window.gif | Bin 0 -> 75 bytes .../static/drawio/mxgraph/mxClient.js | 1810 + .../resources/static/drawio/resources/dia.txt | 1247 + .../static/drawio/resources/dia_am.txt | 1247 + .../static/drawio/resources/dia_ar.txt | 1247 + .../static/drawio/resources/dia_bg.txt | 1247 + .../static/drawio/resources/dia_bn.txt | 1247 + .../static/drawio/resources/dia_bs.txt | 1247 + .../static/drawio/resources/dia_ca.txt | 1247 + .../static/drawio/resources/dia_cs.txt | 1247 + .../static/drawio/resources/dia_da.txt | 1247 + .../static/drawio/resources/dia_de.txt | 1247 + .../static/drawio/resources/dia_el.txt | 1247 + .../static/drawio/resources/dia_eo.txt | 1247 + .../static/drawio/resources/dia_es.txt | 1247 + .../static/drawio/resources/dia_et.txt | 1247 + .../static/drawio/resources/dia_eu.txt | 1247 + .../static/drawio/resources/dia_fa.txt | 1247 + .../static/drawio/resources/dia_fi.txt | 1247 + .../static/drawio/resources/dia_fil.txt | 1247 + .../static/drawio/resources/dia_fr.txt | 1247 + .../static/drawio/resources/dia_gl.txt | 1247 + .../static/drawio/resources/dia_gu.txt | 1247 + .../static/drawio/resources/dia_he.txt | 1247 + .../static/drawio/resources/dia_hi.txt | 1247 + .../static/drawio/resources/dia_hr.txt | 1247 + .../static/drawio/resources/dia_hu.txt | 1247 + .../static/drawio/resources/dia_i18n.txt | 1247 + .../static/drawio/resources/dia_id.txt | 1247 + .../static/drawio/resources/dia_it.txt | 1247 + .../static/drawio/resources/dia_ja.txt | 1247 + .../static/drawio/resources/dia_kn.txt | 1247 + .../static/drawio/resources/dia_ko.txt | 1247 + .../static/drawio/resources/dia_lt.txt | 1247 + .../static/drawio/resources/dia_lv.txt | 1247 + .../static/drawio/resources/dia_ml.txt | 1247 + .../static/drawio/resources/dia_mr.txt | 1247 + .../static/drawio/resources/dia_ms.txt | 1247 + .../static/drawio/resources/dia_my.txt | 1247 + .../static/drawio/resources/dia_nl.txt | 1247 + .../static/drawio/resources/dia_no.txt | 1247 + .../static/drawio/resources/dia_pl.txt | 1247 + .../static/drawio/resources/dia_pt-br.txt | 1247 + .../static/drawio/resources/dia_pt.txt | 1247 + .../static/drawio/resources/dia_ro.txt | 1247 + .../static/drawio/resources/dia_ru.txt | 1247 + .../static/drawio/resources/dia_si.txt | 1247 + .../static/drawio/resources/dia_sk.txt | 1247 + .../static/drawio/resources/dia_sl.txt | 1247 + .../static/drawio/resources/dia_sr.txt | 1247 + .../static/drawio/resources/dia_sv.txt | 1247 + .../static/drawio/resources/dia_sw.txt | 1247 + .../static/drawio/resources/dia_ta.txt | 1247 + .../static/drawio/resources/dia_te.txt | 1247 + .../static/drawio/resources/dia_th.txt | 1247 + .../static/drawio/resources/dia_tr.txt | 1247 + .../static/drawio/resources/dia_uk.txt | 1247 + .../static/drawio/resources/dia_vi.txt | 1247 + .../static/drawio/resources/dia_zh-tw.txt | 1247 + .../static/drawio/resources/dia_zh.txt | 1247 + .../resources/static/drawio/styles/atlas.css | 215 + .../static/drawio/styles/dark-default.xml | 109 + .../resources/static/drawio/styles/dark.css | 281 + .../static/drawio/styles/default-old.xml | 109 + .../static/drawio/styles/default.xml | 203 + .../fonts/ArchitectsDaughter-Regular.ttf | Bin 0 -> 37632 bytes .../static/drawio/styles/grapheditor.css | 2091 + .../static/drawio/styles/thumb_horz.png | Bin 0 -> 113 bytes .../static/drawio/styles/thumb_vertical.png | Bin 0 -> 122 bytes server/src/main/resources/web/drawio.ftl | 41 + server/src/main/resources/web/main/index.ftl | 1 + server/src/main/resources/web/main/record.ftl | 1 + 104 files changed, 198774 insertions(+), 1 deletion(-) create mode 100644 server/src/main/java/cn/keking/service/impl/DrawioFilePreviewImpl.java create mode 100644 server/src/main/resources/static/drawio/index.html create mode 100644 server/src/main/resources/static/drawio/js/Dropbox-sdk.min.js create mode 100644 server/src/main/resources/static/drawio/js/PostConfig.js create mode 100644 server/src/main/resources/static/drawio/js/PreConfig.js create mode 100644 server/src/main/resources/static/drawio/js/app.min.js create mode 100644 server/src/main/resources/static/drawio/js/extensions.min.js create mode 100644 server/src/main/resources/static/drawio/js/shapes-14-6-5.min.js create mode 100644 server/src/main/resources/static/drawio/js/startup.js create mode 100644 server/src/main/resources/static/drawio/js/stencils.min.js create mode 100644 server/src/main/resources/static/drawio/mxgraph/css/common.css create mode 100644 server/src/main/resources/static/drawio/mxgraph/css/explorer.css create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/button.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/close.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/collapsed.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/error.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/expanded.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/maximize.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/minimize.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/normalize.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/point.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/resize.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/separator.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/submenu.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/transparent.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/warning.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/warning.png create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/window-title.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/images/window.gif create mode 100644 server/src/main/resources/static/drawio/mxgraph/mxClient.js create mode 100644 server/src/main/resources/static/drawio/resources/dia.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_am.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ar.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_bg.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_bn.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_bs.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ca.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_cs.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_da.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_de.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_el.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_eo.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_es.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_et.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_eu.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_fa.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_fi.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_fil.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_fr.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_gl.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_gu.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_he.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_hi.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_hr.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_hu.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_i18n.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_id.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_it.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ja.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_kn.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ko.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_lt.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_lv.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ml.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_mr.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ms.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_my.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_nl.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_no.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_pl.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_pt-br.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_pt.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ro.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ru.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_si.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_sk.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_sl.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_sr.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_sv.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_sw.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_ta.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_te.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_th.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_tr.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_uk.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_vi.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_zh-tw.txt create mode 100644 server/src/main/resources/static/drawio/resources/dia_zh.txt create mode 100644 server/src/main/resources/static/drawio/styles/atlas.css create mode 100644 server/src/main/resources/static/drawio/styles/dark-default.xml create mode 100644 server/src/main/resources/static/drawio/styles/dark.css create mode 100644 server/src/main/resources/static/drawio/styles/default-old.xml create mode 100644 server/src/main/resources/static/drawio/styles/default.xml create mode 100644 server/src/main/resources/static/drawio/styles/fonts/ArchitectsDaughter-Regular.ttf create mode 100644 server/src/main/resources/static/drawio/styles/grapheditor.css create mode 100644 server/src/main/resources/static/drawio/styles/thumb_horz.png create mode 100644 server/src/main/resources/static/drawio/styles/thumb_vertical.png create mode 100644 server/src/main/resources/web/drawio.ftl diff --git a/README.cn.md b/README.cn.md index c7922b60..cd40d77e 100644 --- a/README.cn.md +++ b/README.cn.md @@ -22,6 +22,7 @@ 20. 支持 mp3,wav,mp4,flv 等音视频格式文件 21. 支持 avi,mov,rm,webm,ts,rm,mkv,mpeg,ogg,mpg,rmvb,wmv,3gp,ts,swf 等视频格式转码预览 22. 支持 dcm 等医疗数位影像预览 +23. 支持 drawio 绘图预览 > 基于当前良好的架构模式,支持的文件类型在进一步丰富中 ### 项目特性 diff --git a/README.md b/README.md index 592cc5af..d952816f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Document online preview project solution, built using the popular Spring Boot fr 20. Supports `mp3`,`wav`,`mp4`,`flv` . 21. Supports many audio and video format files such as `avi`, `mov`, `wmv`, `mkv`, `3gp`, and `rm`. 22. Supports for `dcm` . +23. Supports for `drawio` . ### Features - Build with the popular frame spring boot diff --git a/server/src/main/java/cn/keking/model/FileType.java b/server/src/main/java/cn/keking/model/FileType.java index e1349b42..50cabde4 100644 --- a/server/src/main/java/cn/keking/model/FileType.java +++ b/server/src/main/java/cn/keking/model/FileType.java @@ -31,7 +31,8 @@ public enum FileType { SVG("svgFilePreviewImpl"), Epub("epubFilePreviewImpl"), BPMN("bpmnFilePreviewImpl"), - DCM("dcmFilePreviewImpl"); + DCM("dcmFilePreviewImpl"), + DRAWUI("drawioFilePreviewImpl"); private static final String[] OFFICE_TYPES = {"docx", "wps", "doc", "docm", "xls", "xlsx", "csv" ,"xlsm", "ppt", "pptx", "vsd", "rtf", "odt", "wmf", "emf", "dps", "et", "ods", "ots", "tsv", "odp", "otp", "sxi", "ott", "vsdx", "fodt", "fods", "xltx","tga","psd","dotm","ett","xlt","xltm","wpt","dot","xlam","dotx","xla"}; private static final String[] PICTURE_TYPES = {"jpg", "jpeg", "png", "gif", "bmp", "ico", "jfif", "webp"}; @@ -41,6 +42,7 @@ public enum FileType { private static final String[] XMIND_TYPES = {"xmind"}; private static final String[] Epub_TYPES = {"epub"}; private static final String[] DCM_TYPES = {"dcm"}; + private static final String[] DRAWUI_TYPES = {"drawio"}; private static final String[] TIFF_TYPES = {"tif", "tiff"}; private static final String[] OFD_TYPES = {"ofd"}; private static final String[] SVG_TYPES = {"svg"}; @@ -100,6 +102,9 @@ public enum FileType { for (String dcm : DCM_TYPES) { FILE_TYPE_MAPPER.put(dcm, FileType.DCM); } + for (String drawio : DRAWUI_TYPES) { + FILE_TYPE_MAPPER.put(drawio, FileType.DRAWUI); + } FILE_TYPE_MAPPER.put("md", FileType.MARKDOWN); FILE_TYPE_MAPPER.put("xml", FileType.XML); FILE_TYPE_MAPPER.put("pdf", FileType.PDF); diff --git a/server/src/main/java/cn/keking/service/FilePreview.java b/server/src/main/java/cn/keking/service/FilePreview.java index 6c7098c0..fbb5adad 100644 --- a/server/src/main/java/cn/keking/service/FilePreview.java +++ b/server/src/main/java/cn/keking/service/FilePreview.java @@ -30,6 +30,7 @@ public interface FilePreview { String MARKDOWN_FILE_PREVIEW_PAGE = "markdown"; String BPMN_FILE_PREVIEW_PAGE = "bpmn"; String DCM_FILE_PREVIEW_PAGE = "dcm"; + String DRAWUI_FILE_PREVIEW_PAGE = "drawio"; String NOT_SUPPORTED_FILE_PAGE = "fileNotSupported"; String filePreviewHandle(String url, Model model, FileAttribute fileAttribute); diff --git a/server/src/main/java/cn/keking/service/impl/DrawioFilePreviewImpl.java b/server/src/main/java/cn/keking/service/impl/DrawioFilePreviewImpl.java new file mode 100644 index 00000000..a6f5ce4a --- /dev/null +++ b/server/src/main/java/cn/keking/service/impl/DrawioFilePreviewImpl.java @@ -0,0 +1,25 @@ +package cn.keking.service.impl; + +import cn.keking.model.FileAttribute; +import cn.keking.service.FilePreview; +import org.springframework.stereotype.Service; +import org.springframework.ui.Model; + +/** + * Drawio 文件处理 + */ +@Service +public class DrawioFilePreviewImpl implements FilePreview { + + private final CommonPreviewImpl commonPreview; + + public DrawioFilePreviewImpl(CommonPreviewImpl commonPreview) { + this.commonPreview = commonPreview; + } + + @Override + public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) { + commonPreview.filePreviewHandle(url,model,fileAttribute); + return DRAWUI_FILE_PREVIEW_PAGE; + } +} diff --git a/server/src/main/resources/static/drawio/index.html b/server/src/main/resources/static/drawio/index.html new file mode 100644 index 00000000..c38c2267 --- /dev/null +++ b/server/src/main/resources/static/drawio/index.html @@ -0,0 +1,313 @@ + + + + + drawio文件预览 + + + + + + + + + + + + + + + + + diff --git a/server/src/main/resources/static/drawio/js/Dropbox-sdk.min.js b/server/src/main/resources/static/drawio/js/Dropbox-sdk.min.js new file mode 100644 index 00000000..b750e1d4 --- /dev/null +++ b/server/src/main/resources/static/drawio/js/Dropbox-sdk.min.js @@ -0,0 +1,10 @@ +// From https://unpkg.com/dropbox@2.5.13/dist/Dropbox-sdk.min.js +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Dropbox=t():e.Dropbox=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n=r(14);e.exports=n},function(e,t,r){(function(t,n){/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version 4.1.1 + */ +!function(t,r){e.exports=r()}(this,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function i(e){return"function"==typeof e}function s(e){Q=e}function o(e){V=e}function u(){return function(){return t.nextTick(h)}}function a(){return"undefined"!=typeof W?function(){W(h)}:l()}function c(){var e=0,t=new Z(h),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=h,function(){return e.port2.postMessage(0)}}function l(){var e=setTimeout;return function(){return e(h,1)}}function h(){for(var e=0;e<$;e+=2){var t=re[e],r=re[e+1];t(r),re[e]=void 0,re[e+1]=void 0}$=0}function f(){try{var e=r(20);return W=e.runOnLoop||e.runOnContext,a()}catch(e){return l()}}function d(e,t){var r=arguments,n=this,i=new this.constructor(m);void 0===i[ie]&&U(i);var s=n._state;return s?!function(){var e=r[s-1];V(function(){return S(s,i,e,n._result)})}():C(n,i,e,t),i}function _(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(m);return x(r,e),r}function m(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function g(e){try{return e.then}catch(e){return ae.error=e,ae}}function b(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}function q(e,t,r){V(function(e){var n=!1,i=b(r,t,function(r){n||(n=!0,t!==r?x(e,r):A(e,r))},function(t){n||(n=!0,E(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&i&&(n=!0,E(e,i))},e)}function w(e,t){t._state===oe?A(e,t._result):t._state===ue?E(e,t._result):C(t,void 0,function(t){return x(e,t)},function(t){return E(e,t)})}function T(e,t,r){t.constructor===e.constructor&&r===d&&t.constructor.resolve===_?w(e,t):r===ae?(E(e,ae.error),ae.error=null):void 0===r?A(e,t):i(r)?q(e,t,r):A(e,t)}function x(t,r){t===r?E(t,y()):e(r)?T(t,r,g(r)):A(t,r)}function k(e){e._onerror&&e._onerror(e._result),R(e)}function A(e,t){e._state===se&&(e._result=t,e._state=oe,0!==e._subscribers.length&&V(R,e))}function E(e,t){e._state===se&&(e._state=ue,e._result=t,V(k,e))}function C(e,t,r,n){var i=e._subscribers,s=i.length;e._onerror=null,i[s]=t,i[s+oe]=r,i[s+ue]=n,0===s&&e._state&&V(R,e)}function R(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,i=void 0,s=e._result,o=0;o=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var n;try{n=t.status}catch(e){n=0}if(!n){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var n=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=n.bind(null,"download"),t.upload&&(t.upload.onprogress=n.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],s=this._serializer||v.serialize[i?i.split(";")[0]:""];!s&&a(i)&&(s=v.serialize["application/json"]),s&&(r=s(r))}for(var o in this.header)null!=this.header[o]&&this.header.hasOwnProperty(o)&&t.setRequestHeader(o,this.header[o]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send("undefined"!=typeof r?r:null),this},v.agent=function(){return new y},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){y.prototype[e.toLowerCase()]=function(t,r){var n=new v.Request(e,t);return this._setDefaults(n),r&&n.end(r),n}}),y.prototype.del=y.prototype.delete,v.get=function(e,t,r){var n=v("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},v.head=function(e,t,r){var n=v("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},v.options=function(e,t,r){var n=v("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},v.del=l,v.delete=l,v.patch=function(e,t,r){var n=v("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},v.post=function(e,t,r){var n=v("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},v.put=function(e,t,r){var n=v("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},function(e,t){function r(e){return"https://"+e+".dropboxapi.com/2/"}e.exports=r},function(e,t){"use strict";function r(e){return null!==e&&"object"==typeof e}e.exports=r},function(e,t){function r(e){return JSON.stringify(e).replace(n,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}var n=/[\u007f-\uffff]/g;e.exports=r},function(e,t,r){var n,i=r(16);r(15),n=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser},n.prototype.setAccessToken=function(e){this.accessToken=e},n.prototype.getAccessToken=function(){return this.accessToken},n.prototype.setClientId=function(e){this.clientId=e},n.prototype.getClientId=function(){return this.clientId},n.prototype.getAuthenticationUrl=function(e,t){var r,n="https://www.dropbox.com/oauth2/authorize",i=this.getClientId();if(!i)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return r=n+"?response_type=token&client_id="+i,e&&(r=r+"&redirect_uri="+e),t&&(r=r+"&state="+t),r},n.prototype.authenticateWithCordova=function(e,t){var r="https://www.dropbox.com/1/oauth2/redirect_receiver",n=this.getAuthenticationUrl(r),i=window.open(n,"_blank"),s=!1,o=function(e){window.setTimeout(function(){i.close()},10),t()},u=function(r){var n="&error=",s=r.url.indexOf(n);if(s>-1)window.setTimeout(function(){i.close()},10),t();else{var o="#access_token=",u=r.url.indexOf(o),a=r.url.indexOf("&token_type=");if(u>-1){u+=o.length,window.setTimeout(function(){i.close()},10);var c=r.url.substring(u,a);e(c)}}},a=function(e){s||(i.removeEventListener("loaderror",o),i.removeEventListener("loadstop",u),i.removeEventListener("exit",a),s=!0)};i.addEventListener("loaderror",o),i.addEventListener("loadstop",u),i.addEventListener("exit",a)},n.prototype.request=function(e,t,r,n,s){var o=null;switch(s){case i.RPC:o=this.getRpcRequest();break;case i.DOWNLOAD:o=this.getDownloadRequest();break;case i.UPLOAD:o=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+s)}return o(e,t,r,n,this.getAccessToken(),this.selectUser)},n.prototype.setRpcRequest=function(e){n.prototype.rpcRequest=e},n.prototype.getRpcRequest=function(){return void 0===n.prototype.rpcRequest&&(n.prototype.rpcRequest=r(18)),n.prototype.rpcRequest},n.prototype.setDownloadRequest=function(e){n.prototype.downloadRequest=e},n.prototype.getDownloadRequest=function(){return void 0===n.prototype.downloadRequest&&(n.prototype.downloadRequest=r(13)),n.prototype.downloadRequest},n.prototype.setUploadRequest=function(e){n.prototype.uploadRequest=e},n.prototype.getUploadRequest=function(){return void 0===n.prototype.uploadRequest&&(n.prototype.uploadRequest=r(19)),n.prototype.uploadRequest},e.exports=n},function(e,t,r){function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,i=0;i1)for(var r=1;r=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(r===!0)return!0;if(r===!1)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~o.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},n.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},n.prototype.then=function(e,t){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){r.end(function(r,n){r?t(r):e(n)})})}return this._fullfilledPromise.then(e,t)},n.prototype.catch=function(e){return this.then(void 0,e)},n.prototype.use=function(e){return e(this),this},n.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},n.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},n.prototype.get=function(e){return this._header[e.toLowerCase()]},n.prototype.getHeader=n.prototype.get,n.prototype.set=function(e,t){if(s(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},n.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},n.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),s(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var n in t)this.field(e,t[n]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},n.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},n.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},n.prototype.redirects=function(e){return this._maxRedirects=e,this},n.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},n.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n.prototype.send=function(e){var t=s(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&s(this._data))for(var n in e)this._data[n]=e[n];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)},n.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},n.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},n.prototype._appendQueryString=function(){console.trace("Unsupported")},n.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error(e+t+"ms exceeded");n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},n.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,r){"use strict";function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}var s=r(12);e.exports=n,n.prototype.get=function(e){return this.header[e.toLowerCase()]},n.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=s.type(t);var r=s.params(t);for(var n in r)this[n]=r[n];this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},n.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(e[n]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var r=t.split(/ *; */),n=r[0].slice(1,-1),i=r[1].split(/ *= */)[1].slice(1,-1);return e[i]=n,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t,r){var n,i,s,o=r(2),u=r(1).Promise,a=r(3),c=r(5);o.parse["application/octect-stream"]=function(e){return e},n=function(e,t){return{status:e.status,error:(t?t.text:null)||e.toString(),response:t}},s=function(e,t){e.text="",e.setEncoding("binary"),e.on("data",function(t){e.text+=t}),e.on("end",function(){t()})},i=function(e,t,r,i,p,l){if("user"!==r)throw new Error("Unexpected auth type: "+r);var h=function(r,u){function h(e){r&&r(e)}function f(e){u&&u(e)}function d(e,t){var r;e?f(n(e,t)):(r=JSON.parse(t.headers["dropbox-api-result"]),t.xhr?r.fileBlob=t.xhr.response:r.fileBinary=t.res.text,h(r))}var _;_=o.post(a(i)+e).set("Authorization","Bearer "+p).set("Dropbox-API-Arg",c(t)).on("request",function(){this.xhr&&(this.xhr.responseType="blob")}),l&&(_=_.set("Dropbox-API-Select-User",l)),"undefined"==typeof window?_.buffer(!0).parse(s).end(d):_.end(d)};return new u(h)},e.exports=i},function(e,t,r){var n,i=r(6),s=r(17);n=function(e){i.call(this,e)},n.prototype=Object.create(i.prototype),n.prototype.constructor=n,n.prototype=Object.assign(n.prototype,s),n.prototype.filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=n},function(e,t){"function"!=typeof Object.assign&&!function(){Object.assign=function(e){"use strict";var t,r,n,i;if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(t=Object(e),r=1;r b; b++) + a.appendChild(arguments[b]); + return a + } + function c(a, b, c, d) { + var e = ["opacity", b, ~~(100 * a), c, d].join("-") + , f = .01 + c / d * 100 + , g = Math.max(1 - (1 - a) / b * (100 - f), a) + , h = j.substring(0, j.indexOf("Animation")).toLowerCase() + , i = h && "-" + h + "-" || ""; + return l[e] || (m.insertRule("@" + i + "keyframes " + e + "{0%{opacity:" + g + "}" + f + "%{opacity:" + a + "}" + (f + .01) + "%{opacity:1}" + (f + b) % 100 + "%{opacity:" + a + "}100%{opacity:" + g + "}}", m.cssRules.length), + l[e] = 1), + e + } + function d(a, b) { + var c, d, e = a.style; + for (b = b.charAt(0).toUpperCase() + b.slice(1), + d = 0; d < k.length; d++) + if (c = k[d] + b, + void 0 !== e[c]) + return c; + return void 0 !== e[b] ? b : void 0 + } + function e(a, b) { + for (var c in b) + a.style[d(a, c) || c] = b[c]; + return a + } + function f(a) { + for (var b = 1; b < arguments.length; b++) { + var c = arguments[b]; + for (var d in c) + void 0 === a[d] && (a[d] = c[d]) + } + return a + } + function g(a, b) { + return "string" == typeof a ? a : a[b % a.length] + } + function h(a) { + this.opts = f(a || {}, h.defaults, n) + } + function i() { + function c(b, c) { + return a("<" + b + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', c) + } + m.addRule(".spin-vml", "behavior:url(#default#VML)"), + h.prototype.lines = function(a, d) { + function f() { + return e(c("group", { + coordsize: k + " " + k, + coordorigin: -j + " " + -j + }), { + width: k, + height: k + }) + } + function h(a, h, i) { + b(m, b(e(f(), { + rotation: 360 / d.lines * a + "deg", + left: ~~h + }), b(e(c("roundrect", { + arcsize: d.corners + }), { + width: j, + height: d.width, + left: d.radius, + top: -d.width >> 1, + filter: i + }), c("fill", { + color: g(d.color, a), + opacity: d.opacity + }), c("stroke", { + opacity: 0 + })))) + } + var i, j = d.length + d.width, k = 2 * j, l = 2 * -(d.width + d.length) + "px", m = e(f(), { + position: "absolute", + top: l, + left: l + }); + if (d.shadow) + for (i = 1; i <= d.lines; i++) + h(i, -2, "progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)"); + for (i = 1; i <= d.lines; i++) + h(i); + return b(a, m) + } + , + h.prototype.opacity = function(a, b, c, d) { + var e = a.firstChild; + d = d.shadow && d.lines || 0, + e && b + d < e.childNodes.length && (e = e.childNodes[b + d], + e = e && e.firstChild, + e = e && e.firstChild, + e && (e.opacity = c)) + } + } + var j, k = ["webkit", "Moz", "ms", "O"], l = {}, m = function() { + var c = a("style", { + type: "text/css" + }); + return b(document.getElementsByTagName("head")[0], c), + c.sheet || c.styleSheet + }(), n = { + lines: 12, + length: 7, + width: 5, + radius: 10, + rotate: 0, + corners: 1, + color: "#000", + direction: 1, + speed: 1, + trail: 100, + opacity: .25, + fps: 20, + zIndex: 2e9, + className: "spinner", + top: "50%", + left: "50%", + position: "absolute" + }; + h.defaults = {}, + f(h.prototype, { + spin: function(b) { + this.stop(); + { + var c = this + , d = c.opts + , f = c.el = e(a(0, { + className: d.className + }), { + position: d.position, + width: 0, + zIndex: d.zIndex + }); + d.radius + d.length + d.width + } + if (b && (b.insertBefore(f, b.firstChild || null), + e(f, { + left: d.left, + top: d.top + })), + f.setAttribute("role", "progressbar"), + c.lines(f, c.opts), + !j) { + var g, h = 0, i = (d.lines - 1) * (1 - d.direction) / 2, k = d.fps, l = k / d.speed, m = (1 - d.opacity) / (l * d.trail / 100), n = l / d.lines; + !function o() { + h++; + for (var a = 0; a < d.lines; a++) + g = Math.max(1 - (h + (d.lines - a) * n) % l * m, d.opacity), + c.opacity(f, a * d.direction + i, g, d); + c.timeout = c.el && setTimeout(o, ~~(1e3 / k)) + }() + } + return c + }, + stop: function() { + var a = this.el; + return a && (clearTimeout(this.timeout), + a.parentNode && a.parentNode.removeChild(a), + this.el = void 0), + this + }, + lines: function(d, f) { + function h(b, c) { + return e(a(), { + position: "absolute", + width: f.length + f.width + "px", + height: f.width + "px", + background: b, + boxShadow: c, + transformOrigin: "left", + transform: "rotate(" + ~~(360 / f.lines * k + f.rotate) + "deg) translate(" + f.radius + "px,0)", + borderRadius: (f.corners * f.width >> 1) + "px" + }) + } + for (var i, k = 0, l = (f.lines - 1) * (1 - f.direction) / 2; k < f.lines; k++) + i = e(a(), { + position: "absolute", + top: 1 + ~(f.width / 2) + "px", + transform: f.hwaccel ? "translate3d(0,0,0)" : "", + opacity: f.opacity, + animation: j && c(f.opacity, f.trail, l + k * f.direction, f.lines) + " " + 1 / f.speed + "s linear infinite" + }), + f.shadow && b(i, e(h("#000", "0 0 4px #000"), { + top: "2px" + })), + b(d, b(i, h(g(f.color, k), "0 0 1px rgba(0,0,0,.1)"))); + return d + }, + opacity: function(a, b, c) { + b < a.childNodes.length && (a.childNodes[b].style.opacity = c) + } + }); + var o = e(a("group"), { + behavior: "url(#default#VML)" + }); + return !d(o, "transform") && o.adj ? i() : j = d(o, "animation"), + h +}); +/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */ +!function(e, t) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).DOMPurify = t() +}(this, (function() { + "use strict"; + function e(t) { + return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return typeof e + } + : function(e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + } + , + e(t) + } + function t(e, n) { + return t = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, + e + } + , + t(e, n) + } + function n() { + if ("undefined" == typeof Reflect || !Reflect.construct) + return !1; + if (Reflect.construct.sham) + return !1; + if ("function" == typeof Proxy) + return !0; + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {} + ))), + !0 + } catch (e) { + return !1 + } + } + function r(e, o, a) { + return r = n() ? Reflect.construct : function(e, n, r) { + var o = [null]; + o.push.apply(o, n); + var a = new (Function.bind.apply(e, o)); + return r && t(a, r.prototype), + a + } + , + r.apply(null, arguments) + } + function o(e) { + return function(e) { + if (Array.isArray(e)) + return a(e) + }(e) || function(e) { + if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) + return Array.from(e) + }(e) || function(e, t) { + if (!e) + return; + if ("string" == typeof e) + return a(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(e); + if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return a(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 a(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var n = 0, r = new Array(t); n < t; n++) + r[n] = e[n]; + return r + } + var i = Object.hasOwnProperty + , l = Object.setPrototypeOf + , c = Object.isFrozen + , u = Object.getPrototypeOf + , s = Object.getOwnPropertyDescriptor + , m = Object.freeze + , f = Object.seal + , p = Object.create + , d = "undefined" != typeof Reflect && Reflect + , h = d.apply + , g = d.construct; + h || (h = function(e, t, n) { + return e.apply(t, n) + } + ), + m || (m = function(e) { + return e + } + ), + f || (f = function(e) { + return e + } + ), + g || (g = function(e, t) { + return r(e, o(t)) + } + ); + var y, b = O(Array.prototype.forEach), v = O(Array.prototype.pop), T = O(Array.prototype.push), N = O(String.prototype.toLowerCase), A = O(String.prototype.toString), E = O(String.prototype.match), w = O(String.prototype.replace), S = O(String.prototype.indexOf), x = O(String.prototype.trim), _ = O(RegExp.prototype.test), k = (y = TypeError, + function() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return g(y, t) + } + ); + function O(e) { + return function(t) { + for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) + r[o - 1] = arguments[o]; + return h(e, t, r) + } + } + function D(e, t, n) { + n = n || N, + l && l(e, null); + for (var r = t.length; r--; ) { + var o = t[r]; + if ("string" == typeof o) { + var a = n(o); + a !== o && (c(t) || (t[r] = a), + o = a) + } + e[o] = !0 + } + return e + } + function L(e) { + var t, n = p(null); + for (t in e) + !0 === h(i, e, [t]) && (n[t] = e[t]); + return n + } + function R(e, t) { + for (; null !== e; ) { + var n = s(e, t); + if (n) { + if (n.get) + return O(n.get); + if ("function" == typeof n.value) + return O(n.value) + } + e = u(e) + } + return function(e) { + return console.warn("fallback value for", e), + null + } + } + var M = m(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]) + , C = m(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]) + , I = m(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]) + , F = m(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]) + , U = m(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]) + , H = m(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]) + , z = m(["#text"]) + , P = m(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]) + , j = m(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]) + , B = m(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]) + , G = m(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]) + , W = f(/\{\{[\w\W]*|[\w\W]*\}\}/gm) + , q = f(/<%[\w\W]*|[\w\W]*%>/gm) + , Y = f(/\${[\w\W]*}/gm) + , $ = f(/^data-[\-\w.\u00B7-\uFFFF]/) + , K = f(/^aria-[\-\w]+$/) + , V = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i) + , X = f(/^(?:\w+script|data):/i) + , Z = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g) + , J = f(/^html$/i) + , Q = function() { + return "undefined" == typeof window ? null : window + } + , ee = function(t, n) { + if ("object" !== e(t) || "function" != typeof t.createPolicy) + return null; + var r = null + , o = "data-tt-policy-suffix"; + n.currentScript && n.currentScript.hasAttribute(o) && (r = n.currentScript.getAttribute(o)); + var a = "dompurify" + (r ? "#" + r : ""); + try { + return t.createPolicy(a, { + createHTML: function(e) { + return e + }, + createScriptURL: function(e) { + return e + } + }) + } catch (e) { + return console.warn("TrustedTypes policy " + a + " could not be created."), + null + } + }; + var te = function t() { + var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Q() + , r = function(e) { + return t(e) + }; + if (r.version = "2.4.3", + r.removed = [], + !n || !n.document || 9 !== n.document.nodeType) + return r.isSupported = !1, + r; + var a = n.document + , i = n.document + , l = n.DocumentFragment + , c = n.HTMLTemplateElement + , u = n.Node + , s = n.Element + , f = n.NodeFilter + , p = n.NamedNodeMap + , d = void 0 === p ? n.NamedNodeMap || n.MozNamedAttrMap : p + , h = n.HTMLFormElement + , g = n.DOMParser + , y = n.trustedTypes + , O = s.prototype + , te = R(O, "cloneNode") + , ne = R(O, "nextSibling") + , re = R(O, "childNodes") + , oe = R(O, "parentNode"); + if ("function" == typeof c) { + var ae = i.createElement("template"); + ae.content && ae.content.ownerDocument && (i = ae.content.ownerDocument) + } + var ie = ee(y, a) + , le = ie ? ie.createHTML("") : "" + , ce = i + , ue = ce.implementation + , se = ce.createNodeIterator + , me = ce.createDocumentFragment + , fe = ce.getElementsByTagName + , pe = a.importNode + , de = {}; + try { + de = L(i).documentMode ? i.documentMode : {} + } catch (e) {} + var he = {}; + r.isSupported = "function" == typeof oe && ue && void 0 !== ue.createHTMLDocument && 9 !== de; + var ge, ye, be = W, ve = q, Te = Y, Ne = $, Ae = K, Ee = X, we = Z, Se = V, xe = null, _e = D({}, [].concat(o(M), o(C), o(I), o(U), o(z))), ke = null, Oe = D({}, [].concat(o(P), o(j), o(B), o(G))), De = Object.seal(Object.create(null, { + tagNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + attributeNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + allowCustomizedBuiltInElements: { + writable: !0, + configurable: !1, + enumerable: !0, + value: !1 + } + })), Le = null, Re = null, Me = !0, Ce = !0, Ie = !1, Fe = !1, Ue = !1, He = !1, ze = !1, Pe = !1, je = !1, Be = !1, Ge = !0, We = !1, qe = "user-content-", Ye = !0, $e = !1, Ke = {}, Ve = null, Xe = D({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), Ze = null, Je = D({}, ["audio", "video", "img", "source", "image", "track"]), Qe = null, et = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), tt = "http://www.w3.org/1998/Math/MathML", nt = "http://www.w3.org/2000/svg", rt = "http://www.w3.org/1999/xhtml", ot = rt, at = !1, it = null, lt = D({}, [tt, nt, rt], A), ct = ["application/xhtml+xml", "text/html"], ut = "text/html", st = null, mt = i.createElement("form"), ft = function(e) { + return e instanceof RegExp || e instanceof Function + }, pt = function(t) { + st && st === t || (t && "object" === e(t) || (t = {}), + t = L(t), + ge = ge = -1 === ct.indexOf(t.PARSER_MEDIA_TYPE) ? ut : t.PARSER_MEDIA_TYPE, + ye = "application/xhtml+xml" === ge ? A : N, + xe = "ALLOWED_TAGS"in t ? D({}, t.ALLOWED_TAGS, ye) : _e, + ke = "ALLOWED_ATTR"in t ? D({}, t.ALLOWED_ATTR, ye) : Oe, + it = "ALLOWED_NAMESPACES"in t ? D({}, t.ALLOWED_NAMESPACES, A) : lt, + Qe = "ADD_URI_SAFE_ATTR"in t ? D(L(et), t.ADD_URI_SAFE_ATTR, ye) : et, + Ze = "ADD_DATA_URI_TAGS"in t ? D(L(Je), t.ADD_DATA_URI_TAGS, ye) : Je, + Ve = "FORBID_CONTENTS"in t ? D({}, t.FORBID_CONTENTS, ye) : Xe, + Le = "FORBID_TAGS"in t ? D({}, t.FORBID_TAGS, ye) : {}, + Re = "FORBID_ATTR"in t ? D({}, t.FORBID_ATTR, ye) : {}, + Ke = "USE_PROFILES"in t && t.USE_PROFILES, + Me = !1 !== t.ALLOW_ARIA_ATTR, + Ce = !1 !== t.ALLOW_DATA_ATTR, + Ie = t.ALLOW_UNKNOWN_PROTOCOLS || !1, + Fe = t.SAFE_FOR_TEMPLATES || !1, + Ue = t.WHOLE_DOCUMENT || !1, + Pe = t.RETURN_DOM || !1, + je = t.RETURN_DOM_FRAGMENT || !1, + Be = t.RETURN_TRUSTED_TYPE || !1, + ze = t.FORCE_BODY || !1, + Ge = !1 !== t.SANITIZE_DOM, + We = t.SANITIZE_NAMED_PROPS || !1, + Ye = !1 !== t.KEEP_CONTENT, + $e = t.IN_PLACE || !1, + Se = t.ALLOWED_URI_REGEXP || Se, + ot = t.NAMESPACE || rt, + t.CUSTOM_ELEMENT_HANDLING && ft(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (De.tagNameCheck = t.CUSTOM_ELEMENT_HANDLING.tagNameCheck), + t.CUSTOM_ELEMENT_HANDLING && ft(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (De.attributeNameCheck = t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), + t.CUSTOM_ELEMENT_HANDLING && "boolean" == typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (De.allowCustomizedBuiltInElements = t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), + Fe && (Ce = !1), + je && (Pe = !0), + Ke && (xe = D({}, o(z)), + ke = [], + !0 === Ke.html && (D(xe, M), + D(ke, P)), + !0 === Ke.svg && (D(xe, C), + D(ke, j), + D(ke, G)), + !0 === Ke.svgFilters && (D(xe, I), + D(ke, j), + D(ke, G)), + !0 === Ke.mathMl && (D(xe, U), + D(ke, B), + D(ke, G))), + t.ADD_TAGS && (xe === _e && (xe = L(xe)), + D(xe, t.ADD_TAGS, ye)), + t.ADD_ATTR && (ke === Oe && (ke = L(ke)), + D(ke, t.ADD_ATTR, ye)), + t.ADD_URI_SAFE_ATTR && D(Qe, t.ADD_URI_SAFE_ATTR, ye), + t.FORBID_CONTENTS && (Ve === Xe && (Ve = L(Ve)), + D(Ve, t.FORBID_CONTENTS, ye)), + Ye && (xe["#text"] = !0), + Ue && D(xe, ["html", "head", "body"]), + xe.table && (D(xe, ["tbody"]), + delete Le.tbody), + m && m(t), + st = t) + }, dt = D({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = D({}, ["foreignobject", "desc", "title", "annotation-xml"]), gt = D({}, ["title", "style", "font", "a", "script"]), yt = D({}, C); + D(yt, I), + D(yt, F); + var bt = D({}, U); + D(bt, H); + var vt = function(e) { + var t = oe(e); + t && t.tagName || (t = { + namespaceURI: ot, + tagName: "template" + }); + var n = N(e.tagName) + , r = N(t.tagName); + return !!it[e.namespaceURI] && (e.namespaceURI === nt ? t.namespaceURI === rt ? "svg" === n : t.namespaceURI === tt ? "svg" === n && ("annotation-xml" === r || dt[r]) : Boolean(yt[n]) : e.namespaceURI === tt ? t.namespaceURI === rt ? "math" === n : t.namespaceURI === nt ? "math" === n && ht[r] : Boolean(bt[n]) : e.namespaceURI === rt ? !(t.namespaceURI === nt && !ht[r]) && (!(t.namespaceURI === tt && !dt[r]) && (!bt[n] && (gt[n] || !yt[n]))) : !("application/xhtml+xml" !== ge || !it[e.namespaceURI])) + } + , Tt = function(e) { + T(r.removed, { + element: e + }); + try { + e.parentNode.removeChild(e) + } catch (t) { + try { + e.outerHTML = le + } catch (t) { + e.remove() + } + } + } + , Nt = function(e, t) { + try { + T(r.removed, { + attribute: t.getAttributeNode(e), + from: t + }) + } catch (e) { + T(r.removed, { + attribute: null, + from: t + }) + } + if (t.removeAttribute(e), + "is" === e && !ke[e]) + if (Pe || je) + try { + Tt(t) + } catch (e) {} + else + try { + t.setAttribute(e, "") + } catch (e) {} + } + , At = function(e) { + var t, n; + if (ze) + e = "" + e; + else { + var r = E(e, /^[\r\n\t ]+/); + n = r && r[0] + } + "application/xhtml+xml" === ge && ot === rt && (e = '' + e + ""); + var o = ie ? ie.createHTML(e) : e; + if (ot === rt) + try { + t = (new g).parseFromString(o, ge) + } catch (e) {} + if (!t || !t.documentElement) { + t = ue.createDocument(ot, "template", null); + try { + t.documentElement.innerHTML = at ? le : o + } catch (e) {} + } + var a = t.body || t.documentElement; + return e && n && a.insertBefore(i.createTextNode(n), a.childNodes[0] || null), + ot === rt ? fe.call(t, Ue ? "html" : "body")[0] : Ue ? t.documentElement : a + } + , Et = function(e) { + return se.call(e.ownerDocument || e, e, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT, null, !1) + } + , wt = function(e) { + return e instanceof h && ("string" != typeof e.nodeName || "string" != typeof e.textContent || "function" != typeof e.removeChild || !(e.attributes instanceof d) || "function" != typeof e.removeAttribute || "function" != typeof e.setAttribute || "string" != typeof e.namespaceURI || "function" != typeof e.insertBefore || "function" != typeof e.hasChildNodes) + } + , St = function(t) { + return "object" === e(u) ? t instanceof u : t && "object" === e(t) && "number" == typeof t.nodeType && "string" == typeof t.nodeName + } + , xt = function(e, t, n) { + he[e] && b(he[e], (function(e) { + e.call(r, t, n, st) + } + )) + } + , _t = function(e) { + var t; + if (xt("beforeSanitizeElements", e, null), + wt(e)) + return Tt(e), + !0; + if (_(/[\u0080-\uFFFF]/, e.nodeName)) + return Tt(e), + !0; + var n = ye(e.nodeName); + if (xt("uponSanitizeElement", e, { + tagName: n, + allowedTags: xe + }), + e.hasChildNodes() && !St(e.firstElementChild) && (!St(e.content) || !St(e.content.firstElementChild)) && _(/<[/\w]/g, e.innerHTML) && _(/<[/\w]/g, e.textContent)) + return Tt(e), + !0; + if ("select" === n && _(/