ecinc-cloud-wappaio 9.7.16 → 9.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33214,7 +33214,7 @@ var TextRecognition_PDFInjector = PDFInjector;
33214
33214
 
33215
33215
  /***/ }),
33216
33216
 
33217
- /***/ 89013:
33217
+ /***/ 41412:
33218
33218
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
33219
33219
 
33220
33220
  "use strict";
@@ -33247,7 +33247,7 @@ __webpack_require__.d(__webpack_exports__, {
33247
33247
  WriteToReadIdea: function() { return /* binding */ Wflowform_WriteToReadIdea; }
33248
33248
  });
33249
33249
 
33250
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=template&id=820fd3ea&scoped=true
33250
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=template&id=401bf7fa&scoped=true
33251
33251
  var render = function render() {
33252
33252
  var _vm = this,
33253
33253
  _c = _vm._self._c;
@@ -33728,14 +33728,18 @@ var render = function render() {
33728
33728
  attrs: {
33729
33729
  "colspan": attach.colspan
33730
33730
  }
33731
- }, [!attach.file.message && attach.file.progress > 0 ? _c('el-progress', {
33731
+ }, [!attach.file.message && attach.file.progress > 0 ? _c('div', {
33732
+ staticStyle: {
33733
+ "width": "100%"
33734
+ }
33735
+ }, [_c('el-progress', {
33732
33736
  attrs: {
33733
33737
  "text-inside": true,
33734
33738
  "stroke-width": 20,
33735
33739
  "percentage": attach.file.progress,
33736
33740
  "status": "success"
33737
33741
  }
33738
- }) : !attach.file.message && attach.file.progress === 0 ? _c('div', {
33742
+ })], 1) : !attach.file.message && attach.file.progress === 0 ? _c('div', {
33739
33743
  directives: [{
33740
33744
  name: "text-lbl",
33741
33745
  rawName: "v-text-lbl",
@@ -33747,7 +33751,7 @@ var render = function render() {
33747
33751
  }
33748
33752
  }, [_vm._v("待上传")]) : _vm._e(), attach.file.message ? _c('div', {
33749
33753
  staticClass: "upload-err-desc"
33750
- }, [_vm._v(" " + _vm._s(attach.file.message) + " ")]) : _vm._e()], 1)], 2);
33754
+ }, [_vm._v(" " + _vm._s(attach.file.message) + " ")]) : _vm._e()])], 2);
33751
33755
  }), !_vm.hasAttachment ? _c('tr', [_c('td', {
33752
33756
  staticClass: "el-table__cell",
33753
33757
  staticStyle: {
@@ -36631,9 +36635,9 @@ var _this = null;
36631
36635
  });
36632
36636
  ;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=script&lang=js
36633
36637
  /* harmony default export */ var src_Attachmentvue_type_script_lang_js = (Attachmentvue_type_script_lang_js);
36634
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=820fd3ea&prod&scoped=true&lang=scss
36635
- var Attachmentvue_type_style_index_0_id_820fd3ea_prod_scoped_true_lang_scss = __webpack_require__(1753);
36636
- ;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=820fd3ea&prod&scoped=true&lang=scss
36638
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=401bf7fa&prod&scoped=true&lang=scss
36639
+ var Attachmentvue_type_style_index_0_id_401bf7fa_prod_scoped_true_lang_scss = __webpack_require__(54659);
36640
+ ;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=401bf7fa&prod&scoped=true&lang=scss
36637
36641
 
36638
36642
  // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
36639
36643
  var componentNormalizer = __webpack_require__(81656);
@@ -36652,7 +36656,7 @@ var component = (0,componentNormalizer/* default */.A)(
36652
36656
  staticRenderFns,
36653
36657
  false,
36654
36658
  null,
36655
- "820fd3ea",
36659
+ "401bf7fa",
36656
36660
  null
36657
36661
 
36658
36662
  )
@@ -51495,15 +51499,347 @@ module.exports = {
51495
51499
 
51496
51500
  /***/ }),
51497
51501
 
51498
- /***/ 99932:
51502
+ /***/ 86322:
51499
51503
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
51500
51504
 
51501
51505
  "use strict";
51506
+ // ESM COMPAT FLAG
51502
51507
  __webpack_require__.r(__webpack_exports__);
51503
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55373);
51504
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
51505
- /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12215);
51506
- /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_0__);
51508
+
51509
+ // EXPORTS
51510
+ __webpack_require__.d(__webpack_exports__, {
51511
+ "default": function() { return /* binding */ wfengine; }
51512
+ });
51513
+
51514
+ // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
51515
+ var lib = __webpack_require__(55373);
51516
+ var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
51517
+ // EXTERNAL MODULE: ./node_modules/js-cookie/src/js.cookie.js
51518
+ var js_cookie = __webpack_require__(12215);
51519
+ var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);
51520
+ // EXTERNAL MODULE: ./node_modules/spark-md5/spark-md5.js
51521
+ var spark_md5 = __webpack_require__(75735);
51522
+ var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
51523
+ ;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/chunkUpload.js
51524
+ /**
51525
+ * 分片上传核心模块
51526
+ * 封装大文件分片上传、断点续传全流程逻辑
51527
+ */
51528
+
51529
+
51530
+ // ========== 配置 ==========
51531
+ var DEFAULT_CHUNK_SIZE = 5; // 默认分片大小(MB)
51532
+ var MAX_RETRY = 3; // 单分片最大重试次数
51533
+ var RETRY_DELAYS = [1000, 2000, 4000]; // 指数退避延迟(ms)
51534
+ var STORAGE_PREFIX = 'chunk_upload_'; // localStorage key 前缀
51535
+
51536
+ /**
51537
+ * 获取分片大小(字节)
51538
+ */
51539
+ function getChunkSize() {
51540
+ return (window.chunkUploadSize || DEFAULT_CHUNK_SIZE) * 1024 * 1024;
51541
+ }
51542
+
51543
+ // ========== MD5 计算 ==========
51544
+
51545
+ /**
51546
+ * 使用 spark-md5 增量计算文件 MD5(避免大文件一次性读入内存)
51547
+ * @param {File} file 文件对象
51548
+ * @param {number} chunkSize 切片大小(字节)
51549
+ * @returns {Promise<string>} 文件 MD5 值(32位小写)
51550
+ */
51551
+ function computeFileMD5(file, chunkSize) {
51552
+ return new Promise(function (resolve, reject) {
51553
+ var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
51554
+ var chunks = Math.ceil(file.size / chunkSize);
51555
+ var currentChunk = 0;
51556
+ var spark = new (spark_md5_default()).ArrayBuffer();
51557
+ var reader = new FileReader();
51558
+ reader.onload = function (e) {
51559
+ spark.append(e.target.result);
51560
+ currentChunk++;
51561
+ if (currentChunk < chunks) {
51562
+ loadNext();
51563
+ } else {
51564
+ resolve(spark.end());
51565
+ }
51566
+ };
51567
+ reader.onerror = function () {
51568
+ reject(new Error('文件读取失败'));
51569
+ };
51570
+ function loadNext() {
51571
+ var start = currentChunk * chunkSize;
51572
+ var end = Math.min(start + chunkSize, file.size);
51573
+ var chunk = blobSlice.call(file, start, end);
51574
+ reader.readAsArrayBuffer(chunk);
51575
+ }
51576
+ loadNext();
51577
+ });
51578
+ }
51579
+
51580
+ // ========== localStorage 断点进度管理 ==========
51581
+
51582
+ /**
51583
+ * 保存上传进度
51584
+ */
51585
+ function saveUploadProgress(fileMd5, data) {
51586
+ try {
51587
+ localStorage.setItem(STORAGE_PREFIX + fileMd5, JSON.stringify(data));
51588
+ } catch (e) {
51589
+ // localStorage 满或不可用,静默忽略
51590
+ }
51591
+ }
51592
+
51593
+ /**
51594
+ * 获取上传进度
51595
+ */
51596
+ function getUploadProgress(fileMd5) {
51597
+ try {
51598
+ var raw = localStorage.getItem(STORAGE_PREFIX + fileMd5);
51599
+ return raw ? JSON.parse(raw) : null;
51600
+ } catch (e) {
51601
+ return null;
51602
+ }
51603
+ }
51604
+
51605
+ /**
51606
+ * 清除上传进度
51607
+ */
51608
+ function clearUploadProgress(fileMd5) {
51609
+ try {
51610
+ localStorage.removeItem(STORAGE_PREFIX + fileMd5);
51611
+ } catch (e) {
51612
+ // 静默忽略
51613
+ }
51614
+ }
51615
+
51616
+ // ========== 后端接口调用 ==========
51617
+
51618
+ /**
51619
+ * 检查已上传分片
51620
+ * @param {Vue} $scope Vue 实例
51621
+ * @param {string} baseUrl 基础 URL(如 workflow/wfBusiAttach)
51622
+ * @param {string} fileMd5 文件 MD5
51623
+ * @param {number} totalChunks 总分片数
51624
+ * @returns {Promise<number[]>} 已上传分片索引列表
51625
+ */
51626
+ function checkChunkStatus($scope, baseUrl, fileMd5, totalChunks) {
51627
+ var formData = new FormData();
51628
+ formData.append('fileMd5', fileMd5);
51629
+ formData.append('totalChunks', totalChunks);
51630
+ return $scope.$http({
51631
+ url: baseUrl + '/uploadChunkCheck',
51632
+ method: 'post',
51633
+ data: formData
51634
+ }).then(function (res) {
51635
+ if (res.code === 'success' && res.body) {
51636
+ return res.body.uploadedChunks || [];
51637
+ }
51638
+ return [];
51639
+ }).catch(function () {
51640
+ return [];
51641
+ });
51642
+ }
51643
+
51644
+ /**
51645
+ * 上传单个分片(含重试)
51646
+ * @param {Vue} $scope Vue 实例
51647
+ * @param {string} baseUrl 基础 URL
51648
+ * @param {File} file 完整文件对象
51649
+ * @param {number} chunkIndex 分片索引
51650
+ * @param {string} fileMd5 文件 MD5
51651
+ * @param {number} totalChunks 总分片数
51652
+ * @param {string} fileName 文件名
51653
+ * @param {number} fileSize 文件大小
51654
+ * @returns {Promise}
51655
+ */
51656
+ function uploadSingleChunk($scope, baseUrl, file, chunkIndex, fileMd5, totalChunks, fileName, fileSize) {
51657
+ var chunkSize = getChunkSize();
51658
+ var start = chunkIndex * chunkSize;
51659
+ var end = Math.min(start + chunkSize, file.size);
51660
+ var chunk = file.slice(start, end);
51661
+ var formData = new FormData();
51662
+ formData.append('chunkFile', chunk, 'chunk_' + chunkIndex);
51663
+ formData.append('fileMd5', fileMd5);
51664
+ formData.append('chunkIndex', chunkIndex);
51665
+ formData.append('totalChunks', totalChunks);
51666
+ formData.append('fileName', fileName);
51667
+ formData.append('fileSize', fileSize);
51668
+ return doUploadWithRetry($scope, baseUrl + '/uploadChunk', formData, 0, chunkIndex);
51669
+ }
51670
+
51671
+ /**
51672
+ * 带重试的上传请求
51673
+ */
51674
+ function doUploadWithRetry($scope, url, formData, retryCount, chunkIdx) {
51675
+ return $scope.$http({
51676
+ url: url,
51677
+ method: 'post',
51678
+ data: formData
51679
+ }).then(function (res) {
51680
+ if (res.code !== 'success') {
51681
+ console.error('[chunkUpload] chunk_' + chunkIdx + ' failed:', res.message);
51682
+ throw new Error(res.message || 'chunk upload failed');
51683
+ }
51684
+ console.log('[chunkUpload] chunk_' + chunkIdx + ' success');
51685
+ return res;
51686
+ }).catch(function (err) {
51687
+ if (retryCount < MAX_RETRY) {
51688
+ console.warn('[chunkUpload] chunk_' + chunkIdx + ' retry ' + (retryCount + 1) + ':', err.message || err);
51689
+ var delay = RETRY_DELAYS[retryCount] || RETRY_DELAYS[RETRY_DELAYS.length - 1];
51690
+ return new Promise(function (resolve) {
51691
+ setTimeout(resolve, delay);
51692
+ }).then(function () {
51693
+ return doUploadWithRetry($scope, url, formData, retryCount + 1, chunkIdx);
51694
+ });
51695
+ }
51696
+ throw err;
51697
+ });
51698
+ }
51699
+
51700
+ /**
51701
+ * 合并分片
51702
+ * @param {Vue} $scope Vue 实例
51703
+ * @param {string} baseUrl 基础 URL
51704
+ * @param {string} fileMd5 文件 MD5
51705
+ * @param {string} fileName 文件名
51706
+ * @param {number} fileSize 文件大小
51707
+ * @param {number} totalChunks 总分片数
51708
+ * @param {Object} reqData 业务参数(module, busiDataId 等)
51709
+ * @returns {Promise}
51710
+ */
51711
+ function mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData) {
51712
+ var formData = new FormData();
51713
+ formData.append('fileMd5', fileMd5);
51714
+ formData.append('fileName', fileName);
51715
+ formData.append('fileSize', fileSize);
51716
+ formData.append('totalChunks', totalChunks);
51717
+ if (reqData) {
51718
+ for (var key in reqData) {
51719
+ if (reqData.hasOwnProperty(key) && reqData[key] !== undefined && reqData[key] !== null) {
51720
+ formData.append(key, reqData[key]);
51721
+ }
51722
+ }
51723
+ }
51724
+ return $scope.$http({
51725
+ url: baseUrl + '/uploadChunkMerge',
51726
+ method: 'post',
51727
+ data: formData
51728
+ });
51729
+ }
51730
+
51731
+ // ========== 主编排函数 ==========
51732
+
51733
+ /**
51734
+ * 分片上传主流程
51735
+ * @param {Vue} $scope Vue 实例
51736
+ * @param {string} uploadUrl 上传 URL(如 workflow/wfBusiAttach/upload)
51737
+ * @param {File} file 文件对象
51738
+ * @param {Object} reqData 业务参数
51739
+ * @param {Object} config 配置(含 onUploadProgress 回调)
51740
+ * @returns {Promise} 合并后的响应,与原 upload 接口返回格式一致
51741
+ */
51742
+ function chunkedUpload($scope, uploadUrl, file, reqData, config) {
51743
+ var chunkSize = getChunkSize();
51744
+ var totalChunks = Math.ceil(file.size / chunkSize);
51745
+ var fileName = file.name || 'unknown';
51746
+ var fileSize = file.size;
51747
+
51748
+ // 从 uploadUrl 中提取 baseUrl(去掉末尾的 /upload)
51749
+ var baseUrl = uploadUrl.replace(/\/upload\/?$/, '');
51750
+ var onProgress = config && config.onUploadProgress || null;
51751
+ return new Promise(function (resolve, reject) {
51752
+ // Step 1: 计算文件 MD5
51753
+ computeFileMD5(file, chunkSize).then(function (fileMd5) {
51754
+ // Step 2: 检查断点续传进度
51755
+ var savedProgress = getUploadProgress(fileMd5);
51756
+ var uploadedBytes = savedProgress ? savedProgress.uploadedBytes || 0 : 0;
51757
+ return checkChunkStatus($scope, baseUrl, fileMd5, totalChunks).then(function (uploadedChunks) {
51758
+ // Step 3: 逐片上传未完成的分片
51759
+ var completedChunks = uploadedChunks.length;
51760
+ var uploadedBytesFromServer = 0;
51761
+ for (var i = 0; i < uploadedChunks.length; i++) {
51762
+ var idx = uploadedChunks[i];
51763
+ var cStart = idx * chunkSize;
51764
+ var cEnd = Math.min(cStart + chunkSize, fileSize);
51765
+ uploadedBytesFromServer += cEnd - cStart;
51766
+ }
51767
+ uploadedBytes = uploadedBytesFromServer;
51768
+
51769
+ // 模拟初始进度回调
51770
+ if (onProgress) {
51771
+ onProgress({
51772
+ loaded: uploadedBytes,
51773
+ total: fileSize
51774
+ });
51775
+ }
51776
+ return uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, function (chunkBytes) {
51777
+ completedChunks++;
51778
+ uploadedBytes += chunkBytes;
51779
+ if (onProgress) {
51780
+ onProgress({
51781
+ loaded: uploadedBytes,
51782
+ total: fileSize
51783
+ });
51784
+ }
51785
+ // 保存进度到 localStorage
51786
+ saveUploadProgress(fileMd5, {
51787
+ completedChunks: completedChunks,
51788
+ uploadedBytes: uploadedBytes,
51789
+ totalChunks: totalChunks,
51790
+ fileName: fileName,
51791
+ fileSize: fileSize,
51792
+ timestamp: Date.now()
51793
+ });
51794
+ }).then(function () {
51795
+ // Step 4: 合并分片
51796
+ return mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData);
51797
+ }).then(function (mergeResult) {
51798
+ // Step 5: 合并成功,清除进度记录
51799
+ clearUploadProgress(fileMd5);
51800
+ resolve(mergeResult);
51801
+ });
51802
+ });
51803
+ }).catch(function (err) {
51804
+ reject(err);
51805
+ });
51806
+ });
51807
+ }
51808
+
51809
+ /**
51810
+ * 逐片串行上传
51811
+ * 使用 Array.reduce 链式调用,reduce 回调参数 cIdx 天然为每次迭代创建独立闭包,
51812
+ * 避免 for + var 共享变量导致所有分片使用同一个 chunkIndex 的问题。
51813
+ */
51814
+ function uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, onChunkDone) {
51815
+ var uploadedSet = {};
51816
+ for (var i = 0; i < uploadedChunks.length; i++) {
51817
+ uploadedSet[uploadedChunks[i]] = true;
51818
+ }
51819
+
51820
+ // 构建待上传分片索引数组
51821
+ var chunkIndices = [];
51822
+ for (var chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) {
51823
+ if (!uploadedSet[chunkIndex]) {
51824
+ chunkIndices.push(chunkIndex);
51825
+ }
51826
+ }
51827
+
51828
+ // reduce 的 cIdx 参数每次迭代都是独立的值,无闭包共享问题
51829
+ return chunkIndices.reduce(function (chain, cIdx) {
51830
+ return chain.then(function () {
51831
+ return uploadSingleChunk($scope, baseUrl, file, cIdx, fileMd5, totalChunks, fileName, fileSize).then(function () {
51832
+ var cStart = cIdx * chunkSize;
51833
+ var cEnd = Math.min(cStart + chunkSize, fileSize);
51834
+ var cBytes = cEnd - cStart;
51835
+ if (onChunkDone) {
51836
+ onChunkDone(cBytes);
51837
+ }
51838
+ });
51839
+ });
51840
+ }, Promise.resolve());
51841
+ }
51842
+ ;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/index.js
51507
51843
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
51508
51844
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
51509
51845
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -51518,6 +51854,7 @@ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(
51518
51854
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
51519
51855
 
51520
51856
 
51857
+
51521
51858
  var install = function install(Vue) {
51522
51859
  var WfEngine = new Vue({
51523
51860
  methods: {
@@ -51735,7 +52072,7 @@ var install = function install(Vue) {
51735
52072
  }
51736
52073
  }
51737
52074
  if ($scope.wfJsonData && $scope.wfJsonData.routes) {
51738
- var rindex = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('route-index-' + $scope.wfInstance.id);
52075
+ var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
51739
52076
  if (rindex !== undefined && rindex !== null) {
51740
52077
  rindex = parseInt(rindex);
51741
52078
  if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
@@ -52183,7 +52520,7 @@ var install = function install(Vue) {
52183
52520
  $scope.$http({
52184
52521
  method: 'POST',
52185
52522
  contentType: 'application/x-www-form-urlencoded',
52186
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
52523
+ data: lib_default().stringify(saveData),
52187
52524
  params: params,
52188
52525
  url: wfEngineUrl
52189
52526
  }).then(function (res) {
@@ -52229,7 +52566,7 @@ var install = function install(Vue) {
52229
52566
  });
52230
52567
  }
52231
52568
  if ($scope.wfJsonData && $scope.wfJsonData.routes) {
52232
- var rindex = js_cookie__WEBPACK_IMPORTED_MODULE_0___default().get('route-index-' + $scope.wfInstance.id);
52569
+ var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
52233
52570
  if (rindex !== undefined && rindex !== null) {
52234
52571
  rindex = parseInt(rindex);
52235
52572
  if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
@@ -52304,7 +52641,7 @@ var install = function install(Vue) {
52304
52641
  }
52305
52642
  var submitHandle = JSON.parse(JSON.stringify($scope.submitHandle));
52306
52643
  if (submitType.indexOf('Save') !== -1) {
52307
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-index-' + $scope.wfInstance.id, submitHandle.route.index);
52644
+ js_cookie_default().set('route-index-' + $scope.wfInstance.id, submitHandle.route.index);
52308
52645
  var route = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
52309
52646
  taskNodes: []
52310
52647
  } : $scope.wfJsonData.routes[submitHandle.route.index];
@@ -52315,14 +52652,14 @@ var install = function install(Vue) {
52315
52652
  if (nextUsers !== '') nextUsers += ';';
52316
52653
  nextUsers += user.id;
52317
52654
  });
52318
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, nextUsers);
52655
+ js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, nextUsers);
52319
52656
  }
52320
52657
  });
52321
52658
  delete submitHandle.submitRoute;
52322
52659
  delete submitHandle.nextTNProp;
52323
52660
  delete submitHandle.nextTNUser;
52324
52661
  } else {
52325
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-index-' + $scope.wfInstance.id, '', {
52662
+ js_cookie_default().set('route-index-' + $scope.wfInstance.id, '', {
52326
52663
  expires: 0
52327
52664
  });
52328
52665
  var selRoute = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
@@ -52365,7 +52702,7 @@ var install = function install(Vue) {
52365
52702
  delete wfNode.users;
52366
52703
  submitHandle.nextTNProp.push(wfNode);
52367
52704
  submitHandle.nextTNUser.push(nextUsers);
52368
- js_cookie__WEBPACK_IMPORTED_MODULE_0___default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, '', {
52705
+ js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, '', {
52369
52706
  expires: 0
52370
52707
  });
52371
52708
  }
@@ -52398,7 +52735,7 @@ var install = function install(Vue) {
52398
52735
  headers: {
52399
52736
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
52400
52737
  },
52401
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
52738
+ data: lib_default().stringify(saveData),
52402
52739
  url: (params.wfEngineUrl || $scope.wfEngineUrl || 'workflow/wfInstance') + '/saveWfInstance'
52403
52740
  }).then(function (res) {
52404
52741
  if (res.code === 'success') {
@@ -52671,7 +53008,7 @@ var install = function install(Vue) {
52671
53008
  _this4.$http({
52672
53009
  method: 'POST',
52673
53010
  contentType: 'application/x-www-form-urlencoded',
52674
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(saveData),
53011
+ data: lib_default().stringify(saveData),
52675
53012
  params: $scope.$vnode.context.wfParams,
52676
53013
  url: 'workflow/wfInstance/getUdmNodeUsers'
52677
53014
  }).then(function (res) {
@@ -52721,7 +53058,7 @@ var install = function install(Vue) {
52721
53058
  headers: {
52722
53059
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
52723
53060
  },
52724
- data: qs__WEBPACK_IMPORTED_MODULE_1___default().stringify({
53061
+ data: lib_default().stringify({
52725
53062
  wfInstance: JSON.stringify($scope.wfInstance),
52726
53063
  nextTNUsers: JSON.stringify(nextTNUsers)
52727
53064
  }),
@@ -52879,6 +53216,11 @@ var install = function install(Vue) {
52879
53216
  }
52880
53217
  },
52881
53218
  upload: function upload($scope, uploadUrl, file, params, config) {
53219
+ // 分片上传分流判断:chunkFileSizeThreshold > 0 且文件大小超过阈值
53220
+ var chunkThreshold = window.chunkFileSizeThreshold;
53221
+ if (chunkThreshold > 0 && file && file.size > chunkThreshold * 1024 * 1024) {
53222
+ return chunkedUpload($scope, uploadUrl, file, params, config);
53223
+ }
52882
53224
  var formData = new FormData();
52883
53225
  if (params != null) {
52884
53226
  for (var key in params) {
@@ -52977,7 +53319,7 @@ var install = function install(Vue) {
52977
53319
  });
52978
53320
  Vue.prototype.$wfEngine = WfEngine;
52979
53321
  };
52980
- /* harmony default export */ __webpack_exports__["default"] = (install);
53322
+ /* harmony default export */ var wfengine = (install);
52981
53323
 
52982
53324
  /***/ }),
52983
53325
 
@@ -166114,7 +166456,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-4ff4cf75] .wf-names-checkbox .
166114
166456
 
166115
166457
  /***/ }),
166116
166458
 
166117
- /***/ 59046:
166459
+ /***/ 74360:
166118
166460
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
166119
166461
 
166120
166462
  "use strict";
@@ -166128,7 +166470,7 @@ __webpack_require__.r(__webpack_exports__);
166128
166470
 
166129
166471
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
166130
166472
  // Module
166131
- ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-820fd3ea]:export{stdMenuBgcolor:var(--lmBgColor);stdMenuHover:var(--lmBgColorActive)!important;stdMenuText:var(--lmTextColor)!important;stdMenuAcitveText:var(--lmTextColorActive)!important;stdSubMenuBgcolor:var(--lmBgColor);stdSubMenuHover:hsla(193,8%,67%,.42);stdSubMenuActiveText:var(--lmTextColorActive)!important;darkMenuBgcolor:#304156;darkMenuHover:#263445;darkMenuText:#bfcbd9;darkMenuAcitveText:#ffd04b;darkSubMenuBgcolor:#384b63;darkSubMenuHover:#263445;darkSubMenuActiveText:#ffd04b;sideBarWidth:210px;formLabelWidth:133px;lightBlue:var(--subjectColor)}.el-form[data-v-820fd3ea]{margin-top:20px}.el-form .svg-icon[data-v-820fd3ea]{margin:0 5px}.el-form .el-button[data-v-820fd3ea]{padding:7px 5px}.el-form .el-button[data-v-820fd3ea]:active{color:#606266}.el-form .el-button+.el-button[data-v-820fd3ea]{margin-left:0}.el-form .el-link[data-v-820fd3ea]{line-height:20px;color:var(--subjectColor);cursor:pointer!important}.el-form .is-disabled[data-v-820fd3ea]{color:#c4c5c7!important}.el-form .fileHovering[data-v-820fd3ea]{background:#a5c45d;opacity:.5}.el-form .fileHovering table[data-v-820fd3ea]{opacity:.5}.el-form[data-v-820fd3ea] .attach-name{max-width:100%}.el-form[data-v-820fd3ea] .attach-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attach-row[data-v-820fd3ea]{padding-top:5px;padding-bottom:5px;line-height:21px}.no-attachments[data-v-820fd3ea]{height:50px;line-height:20px}.drag-handler[data-v-820fd3ea]{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.attach-sorting[data-v-820fd3ea]{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}[data-v-820fd3ea] .atach-draggable .sortable-chosen{background:#f5f7fa}[data-v-820fd3ea] .el-progress-bar{padding-right:40px!important;margin-right:-47px!important}[data-v-820fd3ea] .el-progress__text{float:right}.attach-row[data-v-820fd3ea]:last-child{border-bottom:0!important}.docform-attach-container[data-v-820fd3ea]{padding:20px;margin:0!important;background-color:#fff;height:calc(100vh - 70px)}.attachment-sidebar .sidebar-area[data-v-820fd3ea]{border-bottom:1px solid #eee}.attachment-sidebar .sidebar-area .sidebar-area-title[data-v-820fd3ea]{font-weight:600;line-height:24px;padding:10px}.attachment-sidebar .sidebar-area .sidebar-area-title .el-button--primary[data-v-820fd3ea]{width:6px;padding:0;margin-right:6px;margin-top:5px;border-radius:1px;height:14px;cursor:default;vertical-align:top;display:inline-block}.attachment-sidebar .sidebar-area .sidebar-area-title div[data-v-820fd3ea]{display:inline-block;vertical-align:top}.attachment-sidebar .sidebar-area .sidebar-area-content[data-v-820fd3ea]{padding-left:20px;padding-right:10px;padding-bottom:10px}.attachment-sidebar .sidebar-area .sidebar-area-content .attach-row[data-v-820fd3ea]{border-bottom:1px solid #f3f3f3}.attachment-sidebar .sidebar-area .sidebar-area-content .attach-row .attach-name[data-v-820fd3ea]{margin-top:-3px;width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.attachment-sidebar .sidebar-area[data-v-820fd3ea]:last-child{border-bottom:0}.tb-row-attach-container .el-button--mini[data-v-820fd3ea]{font-size:12px;margin-right:6px}.drag-upload[data-v-820fd3ea]{display:-webkit-box;display:-ms-flexbox;display:flex;height:36px}.drag-upload[data-v-820fd3ea] .el-upload,.drag-upload[data-v-820fd3ea] .el-upload-dragger{width:100%!important;height:100%!important}.drag-upload[data-v-820fd3ea] .el-upload-dragger .drag-upload-box{height:100%;background:#f9fbff}.upload-view .up-btn[data-v-820fd3ea]{text-align:end}.upload-view .up-btn .down[data-v-820fd3ea]{font-size:16px;color:#999;cursor:pointer}.upload-view .upload-box[data-v-820fd3ea]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.upload-view .upload-box .upload-box-left[data-v-820fd3ea]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:40%}.upload-view .upload-box .upload-box-left .upload-label[data-v-820fd3ea]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.upload-view .upload-box .upload-box-left .upload-label .label-l[data-v-820fd3ea]{width:12px;height:15px;line-height:20px;margin-left:6px}.upload-view .upload-box .upload-box-left .upload-label .label-l img[data-v-820fd3ea]{width:100%;height:100%}.upload-view .upload-box .upload-box-left .upload-label .label-r[data-v-820fd3ea]{font-size:14px;color:#333;margin-left:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.upload-view .upload-box .upload-box-right[data-v-820fd3ea]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.upload-view .upload-box .upload-box-right .up-text[data-v-820fd3ea]{font-size:12px;color:#999}.upload-view .upload-box .upload-box-right .up-person[data-v-820fd3ea]{text-align:end;margin-right:60px;margin-left:15px}.upload-view .upload-box .upload-box-right .up-person .upload-name[data-v-820fd3ea]{margin-right:15px}@media (max-width:1740px){.up-person .upload-name[data-v-820fd3ea]{margin-right:5px!important}}.upload-err-desc[data-v-820fd3ea]{color:red;width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:left}", ""]);
166473
+ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-401bf7fa]:export{stdMenuBgcolor:var(--lmBgColor);stdMenuHover:var(--lmBgColorActive)!important;stdMenuText:var(--lmTextColor)!important;stdMenuAcitveText:var(--lmTextColorActive)!important;stdSubMenuBgcolor:var(--lmBgColor);stdSubMenuHover:hsla(193,8%,67%,.42);stdSubMenuActiveText:var(--lmTextColorActive)!important;darkMenuBgcolor:#304156;darkMenuHover:#263445;darkMenuText:#bfcbd9;darkMenuAcitveText:#ffd04b;darkSubMenuBgcolor:#384b63;darkSubMenuHover:#263445;darkSubMenuActiveText:#ffd04b;sideBarWidth:210px;formLabelWidth:133px;lightBlue:var(--subjectColor)}.el-form[data-v-401bf7fa]{margin-top:20px}.el-form .svg-icon[data-v-401bf7fa]{margin:0 5px}.el-form .el-button[data-v-401bf7fa]{padding:7px 5px}.el-form .el-button[data-v-401bf7fa]:active{color:#606266}.el-form .el-button+.el-button[data-v-401bf7fa]{margin-left:0}.el-form .el-link[data-v-401bf7fa]{line-height:20px;color:var(--subjectColor);cursor:pointer!important}.el-form .is-disabled[data-v-401bf7fa]{color:#c4c5c7!important}.el-form .fileHovering[data-v-401bf7fa]{background:#a5c45d;opacity:.5}.el-form .fileHovering table[data-v-401bf7fa]{opacity:.5}.el-form[data-v-401bf7fa] .attach-name{max-width:100%}.el-form[data-v-401bf7fa] .attach-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attach-row[data-v-401bf7fa]{padding-top:5px;padding-bottom:5px;line-height:21px}.no-attachments[data-v-401bf7fa]{height:50px;line-height:20px}.drag-handler[data-v-401bf7fa]{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body.attach-sorting[data-v-401bf7fa]{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}[data-v-401bf7fa] .atach-draggable .sortable-chosen{background:#f5f7fa}[data-v-401bf7fa] .el-progress-bar{padding-right:40px!important;margin-right:-47px!important}[data-v-401bf7fa] .el-progress__text{float:right}.attach-row[data-v-401bf7fa]:last-child{border-bottom:0!important}.docform-attach-container[data-v-401bf7fa]{padding:20px;margin:0!important;background-color:#fff;height:calc(100vh - 70px)}.attachment-sidebar .sidebar-area[data-v-401bf7fa]{border-bottom:1px solid #eee}.attachment-sidebar .sidebar-area .sidebar-area-title[data-v-401bf7fa]{font-weight:600;line-height:24px;padding:10px}.attachment-sidebar .sidebar-area .sidebar-area-title .el-button--primary[data-v-401bf7fa]{width:6px;padding:0;margin-right:6px;margin-top:5px;border-radius:1px;height:14px;cursor:default;vertical-align:top;display:inline-block}.attachment-sidebar .sidebar-area .sidebar-area-title div[data-v-401bf7fa]{display:inline-block;vertical-align:top}.attachment-sidebar .sidebar-area .sidebar-area-content[data-v-401bf7fa]{padding-left:20px;padding-right:10px;padding-bottom:10px}.attachment-sidebar .sidebar-area .sidebar-area-content .attach-row[data-v-401bf7fa]{border-bottom:1px solid #f3f3f3}.attachment-sidebar .sidebar-area .sidebar-area-content .attach-row .attach-name[data-v-401bf7fa]{margin-top:-3px;width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.attachment-sidebar .sidebar-area[data-v-401bf7fa]:last-child{border-bottom:0}.tb-row-attach-container .el-button--mini[data-v-401bf7fa]{font-size:12px;margin-right:6px}.drag-upload[data-v-401bf7fa]{display:-webkit-box;display:-ms-flexbox;display:flex;height:36px}.drag-upload[data-v-401bf7fa] .el-upload,.drag-upload[data-v-401bf7fa] .el-upload-dragger{width:100%!important;height:100%!important}.drag-upload[data-v-401bf7fa] .el-upload-dragger .drag-upload-box{height:100%;background:#f9fbff}.upload-view .up-btn[data-v-401bf7fa]{text-align:end}.upload-view .up-btn .down[data-v-401bf7fa]{font-size:16px;color:#999;cursor:pointer}.upload-view .upload-box[data-v-401bf7fa]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.upload-view .upload-box .upload-box-left[data-v-401bf7fa]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:40%}.upload-view .upload-box .upload-box-left .upload-label[data-v-401bf7fa]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.upload-view .upload-box .upload-box-left .upload-label .label-l[data-v-401bf7fa]{width:12px;height:15px;line-height:20px;margin-left:6px}.upload-view .upload-box .upload-box-left .upload-label .label-l img[data-v-401bf7fa]{width:100%;height:100%}.upload-view .upload-box .upload-box-left .upload-label .label-r[data-v-401bf7fa]{font-size:14px;color:#333;margin-left:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.upload-view .upload-box .upload-box-right[data-v-401bf7fa]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.upload-view .upload-box .upload-box-right .up-text[data-v-401bf7fa]{font-size:12px;color:#999}.upload-view .upload-box .upload-box-right .up-person[data-v-401bf7fa]{text-align:end;margin-right:60px;margin-left:15px}.upload-view .upload-box .upload-box-right .up-person .upload-name[data-v-401bf7fa]{margin-right:15px}@media (max-width:1740px){.up-person .upload-name[data-v-401bf7fa]{margin-right:5px!important}}.upload-err-desc[data-v-401bf7fa]{color:red;width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:left}", ""]);
166132
166474
  // Exports
166133
166475
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
166134
166476
 
@@ -239448,6 +239790,750 @@ Sortable.mount(Remove, Revert);
239448
239790
 
239449
239791
 
239450
239792
 
239793
+ /***/ }),
239794
+
239795
+ /***/ 75735:
239796
+ /***/ (function(module) {
239797
+
239798
+ (function (factory) {
239799
+ if (true) {
239800
+ // Node/CommonJS
239801
+ module.exports = factory();
239802
+ } else { var glob; }
239803
+ }(function (undefined) {
239804
+
239805
+ 'use strict';
239806
+
239807
+ /*
239808
+ * Fastest md5 implementation around (JKM md5).
239809
+ * Credits: Joseph Myers
239810
+ *
239811
+ * @see http://www.myersdaily.org/joseph/javascript/md5-text.html
239812
+ * @see http://jsperf.com/md5-shootout/7
239813
+ */
239814
+
239815
+ /* this function is much faster,
239816
+ so if possible we use it. Some IEs
239817
+ are the only ones I know of that
239818
+ need the idiotic second function,
239819
+ generated by an if clause. */
239820
+ var add32 = function (a, b) {
239821
+ return (a + b) & 0xFFFFFFFF;
239822
+ },
239823
+ hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
239824
+
239825
+
239826
+ function cmn(q, a, b, x, s, t) {
239827
+ a = add32(add32(a, q), add32(x, t));
239828
+ return add32((a << s) | (a >>> (32 - s)), b);
239829
+ }
239830
+
239831
+ function md5cycle(x, k) {
239832
+ var a = x[0],
239833
+ b = x[1],
239834
+ c = x[2],
239835
+ d = x[3];
239836
+
239837
+ a += (b & c | ~b & d) + k[0] - 680876936 | 0;
239838
+ a = (a << 7 | a >>> 25) + b | 0;
239839
+ d += (a & b | ~a & c) + k[1] - 389564586 | 0;
239840
+ d = (d << 12 | d >>> 20) + a | 0;
239841
+ c += (d & a | ~d & b) + k[2] + 606105819 | 0;
239842
+ c = (c << 17 | c >>> 15) + d | 0;
239843
+ b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
239844
+ b = (b << 22 | b >>> 10) + c | 0;
239845
+ a += (b & c | ~b & d) + k[4] - 176418897 | 0;
239846
+ a = (a << 7 | a >>> 25) + b | 0;
239847
+ d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
239848
+ d = (d << 12 | d >>> 20) + a | 0;
239849
+ c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
239850
+ c = (c << 17 | c >>> 15) + d | 0;
239851
+ b += (c & d | ~c & a) + k[7] - 45705983 | 0;
239852
+ b = (b << 22 | b >>> 10) + c | 0;
239853
+ a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
239854
+ a = (a << 7 | a >>> 25) + b | 0;
239855
+ d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
239856
+ d = (d << 12 | d >>> 20) + a | 0;
239857
+ c += (d & a | ~d & b) + k[10] - 42063 | 0;
239858
+ c = (c << 17 | c >>> 15) + d | 0;
239859
+ b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
239860
+ b = (b << 22 | b >>> 10) + c | 0;
239861
+ a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
239862
+ a = (a << 7 | a >>> 25) + b | 0;
239863
+ d += (a & b | ~a & c) + k[13] - 40341101 | 0;
239864
+ d = (d << 12 | d >>> 20) + a | 0;
239865
+ c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
239866
+ c = (c << 17 | c >>> 15) + d | 0;
239867
+ b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
239868
+ b = (b << 22 | b >>> 10) + c | 0;
239869
+
239870
+ a += (b & d | c & ~d) + k[1] - 165796510 | 0;
239871
+ a = (a << 5 | a >>> 27) + b | 0;
239872
+ d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
239873
+ d = (d << 9 | d >>> 23) + a | 0;
239874
+ c += (d & b | a & ~b) + k[11] + 643717713 | 0;
239875
+ c = (c << 14 | c >>> 18) + d | 0;
239876
+ b += (c & a | d & ~a) + k[0] - 373897302 | 0;
239877
+ b = (b << 20 | b >>> 12) + c | 0;
239878
+ a += (b & d | c & ~d) + k[5] - 701558691 | 0;
239879
+ a = (a << 5 | a >>> 27) + b | 0;
239880
+ d += (a & c | b & ~c) + k[10] + 38016083 | 0;
239881
+ d = (d << 9 | d >>> 23) + a | 0;
239882
+ c += (d & b | a & ~b) + k[15] - 660478335 | 0;
239883
+ c = (c << 14 | c >>> 18) + d | 0;
239884
+ b += (c & a | d & ~a) + k[4] - 405537848 | 0;
239885
+ b = (b << 20 | b >>> 12) + c | 0;
239886
+ a += (b & d | c & ~d) + k[9] + 568446438 | 0;
239887
+ a = (a << 5 | a >>> 27) + b | 0;
239888
+ d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
239889
+ d = (d << 9 | d >>> 23) + a | 0;
239890
+ c += (d & b | a & ~b) + k[3] - 187363961 | 0;
239891
+ c = (c << 14 | c >>> 18) + d | 0;
239892
+ b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
239893
+ b = (b << 20 | b >>> 12) + c | 0;
239894
+ a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
239895
+ a = (a << 5 | a >>> 27) + b | 0;
239896
+ d += (a & c | b & ~c) + k[2] - 51403784 | 0;
239897
+ d = (d << 9 | d >>> 23) + a | 0;
239898
+ c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
239899
+ c = (c << 14 | c >>> 18) + d | 0;
239900
+ b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
239901
+ b = (b << 20 | b >>> 12) + c | 0;
239902
+
239903
+ a += (b ^ c ^ d) + k[5] - 378558 | 0;
239904
+ a = (a << 4 | a >>> 28) + b | 0;
239905
+ d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
239906
+ d = (d << 11 | d >>> 21) + a | 0;
239907
+ c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
239908
+ c = (c << 16 | c >>> 16) + d | 0;
239909
+ b += (c ^ d ^ a) + k[14] - 35309556 | 0;
239910
+ b = (b << 23 | b >>> 9) + c | 0;
239911
+ a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
239912
+ a = (a << 4 | a >>> 28) + b | 0;
239913
+ d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
239914
+ d = (d << 11 | d >>> 21) + a | 0;
239915
+ c += (d ^ a ^ b) + k[7] - 155497632 | 0;
239916
+ c = (c << 16 | c >>> 16) + d | 0;
239917
+ b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
239918
+ b = (b << 23 | b >>> 9) + c | 0;
239919
+ a += (b ^ c ^ d) + k[13] + 681279174 | 0;
239920
+ a = (a << 4 | a >>> 28) + b | 0;
239921
+ d += (a ^ b ^ c) + k[0] - 358537222 | 0;
239922
+ d = (d << 11 | d >>> 21) + a | 0;
239923
+ c += (d ^ a ^ b) + k[3] - 722521979 | 0;
239924
+ c = (c << 16 | c >>> 16) + d | 0;
239925
+ b += (c ^ d ^ a) + k[6] + 76029189 | 0;
239926
+ b = (b << 23 | b >>> 9) + c | 0;
239927
+ a += (b ^ c ^ d) + k[9] - 640364487 | 0;
239928
+ a = (a << 4 | a >>> 28) + b | 0;
239929
+ d += (a ^ b ^ c) + k[12] - 421815835 | 0;
239930
+ d = (d << 11 | d >>> 21) + a | 0;
239931
+ c += (d ^ a ^ b) + k[15] + 530742520 | 0;
239932
+ c = (c << 16 | c >>> 16) + d | 0;
239933
+ b += (c ^ d ^ a) + k[2] - 995338651 | 0;
239934
+ b = (b << 23 | b >>> 9) + c | 0;
239935
+
239936
+ a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
239937
+ a = (a << 6 | a >>> 26) + b | 0;
239938
+ d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
239939
+ d = (d << 10 | d >>> 22) + a | 0;
239940
+ c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
239941
+ c = (c << 15 | c >>> 17) + d | 0;
239942
+ b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
239943
+ b = (b << 21 |b >>> 11) + c | 0;
239944
+ a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
239945
+ a = (a << 6 | a >>> 26) + b | 0;
239946
+ d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
239947
+ d = (d << 10 | d >>> 22) + a | 0;
239948
+ c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
239949
+ c = (c << 15 | c >>> 17) + d | 0;
239950
+ b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
239951
+ b = (b << 21 |b >>> 11) + c | 0;
239952
+ a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
239953
+ a = (a << 6 | a >>> 26) + b | 0;
239954
+ d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
239955
+ d = (d << 10 | d >>> 22) + a | 0;
239956
+ c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
239957
+ c = (c << 15 | c >>> 17) + d | 0;
239958
+ b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
239959
+ b = (b << 21 |b >>> 11) + c | 0;
239960
+ a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
239961
+ a = (a << 6 | a >>> 26) + b | 0;
239962
+ d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
239963
+ d = (d << 10 | d >>> 22) + a | 0;
239964
+ c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
239965
+ c = (c << 15 | c >>> 17) + d | 0;
239966
+ b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
239967
+ b = (b << 21 | b >>> 11) + c | 0;
239968
+
239969
+ x[0] = a + x[0] | 0;
239970
+ x[1] = b + x[1] | 0;
239971
+ x[2] = c + x[2] | 0;
239972
+ x[3] = d + x[3] | 0;
239973
+ }
239974
+
239975
+ function md5blk(s) {
239976
+ var md5blks = [],
239977
+ i; /* Andy King said do it this way. */
239978
+
239979
+ for (i = 0; i < 64; i += 4) {
239980
+ md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
239981
+ }
239982
+ return md5blks;
239983
+ }
239984
+
239985
+ function md5blk_array(a) {
239986
+ var md5blks = [],
239987
+ i; /* Andy King said do it this way. */
239988
+
239989
+ for (i = 0; i < 64; i += 4) {
239990
+ md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
239991
+ }
239992
+ return md5blks;
239993
+ }
239994
+
239995
+ function md51(s) {
239996
+ var n = s.length,
239997
+ state = [1732584193, -271733879, -1732584194, 271733878],
239998
+ i,
239999
+ length,
240000
+ tail,
240001
+ tmp,
240002
+ lo,
240003
+ hi;
240004
+
240005
+ for (i = 64; i <= n; i += 64) {
240006
+ md5cycle(state, md5blk(s.substring(i - 64, i)));
240007
+ }
240008
+ s = s.substring(i - 64);
240009
+ length = s.length;
240010
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
240011
+ for (i = 0; i < length; i += 1) {
240012
+ tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
240013
+ }
240014
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240015
+ if (i > 55) {
240016
+ md5cycle(state, tail);
240017
+ for (i = 0; i < 16; i += 1) {
240018
+ tail[i] = 0;
240019
+ }
240020
+ }
240021
+
240022
+ // Beware that the final length might not fit in 32 bits so we take care of that
240023
+ tmp = n * 8;
240024
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240025
+ lo = parseInt(tmp[2], 16);
240026
+ hi = parseInt(tmp[1], 16) || 0;
240027
+
240028
+ tail[14] = lo;
240029
+ tail[15] = hi;
240030
+
240031
+ md5cycle(state, tail);
240032
+ return state;
240033
+ }
240034
+
240035
+ function md51_array(a) {
240036
+ var n = a.length,
240037
+ state = [1732584193, -271733879, -1732584194, 271733878],
240038
+ i,
240039
+ length,
240040
+ tail,
240041
+ tmp,
240042
+ lo,
240043
+ hi;
240044
+
240045
+ for (i = 64; i <= n; i += 64) {
240046
+ md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
240047
+ }
240048
+
240049
+ // Not sure if it is a bug, however IE10 will always produce a sub array of length 1
240050
+ // containing the last element of the parent array if the sub array specified starts
240051
+ // beyond the length of the parent array - weird.
240052
+ // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
240053
+ a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
240054
+
240055
+ length = a.length;
240056
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
240057
+ for (i = 0; i < length; i += 1) {
240058
+ tail[i >> 2] |= a[i] << ((i % 4) << 3);
240059
+ }
240060
+
240061
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240062
+ if (i > 55) {
240063
+ md5cycle(state, tail);
240064
+ for (i = 0; i < 16; i += 1) {
240065
+ tail[i] = 0;
240066
+ }
240067
+ }
240068
+
240069
+ // Beware that the final length might not fit in 32 bits so we take care of that
240070
+ tmp = n * 8;
240071
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240072
+ lo = parseInt(tmp[2], 16);
240073
+ hi = parseInt(tmp[1], 16) || 0;
240074
+
240075
+ tail[14] = lo;
240076
+ tail[15] = hi;
240077
+
240078
+ md5cycle(state, tail);
240079
+
240080
+ return state;
240081
+ }
240082
+
240083
+ function rhex(n) {
240084
+ var s = '',
240085
+ j;
240086
+ for (j = 0; j < 4; j += 1) {
240087
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
240088
+ }
240089
+ return s;
240090
+ }
240091
+
240092
+ function hex(x) {
240093
+ var i;
240094
+ for (i = 0; i < x.length; i += 1) {
240095
+ x[i] = rhex(x[i]);
240096
+ }
240097
+ return x.join('');
240098
+ }
240099
+
240100
+ // In some cases the fast add32 function cannot be used..
240101
+ if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {
240102
+ add32 = function (x, y) {
240103
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF),
240104
+ msw = (x >> 16) + (y >> 16) + (lsw >> 16);
240105
+ return (msw << 16) | (lsw & 0xFFFF);
240106
+ };
240107
+ }
240108
+
240109
+ // ---------------------------------------------------
240110
+
240111
+ /**
240112
+ * ArrayBuffer slice polyfill.
240113
+ *
240114
+ * @see https://github.com/ttaubert/node-arraybuffer-slice
240115
+ */
240116
+
240117
+ if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
240118
+ (function () {
240119
+ function clamp(val, length) {
240120
+ val = (val | 0) || 0;
240121
+
240122
+ if (val < 0) {
240123
+ return Math.max(val + length, 0);
240124
+ }
240125
+
240126
+ return Math.min(val, length);
240127
+ }
240128
+
240129
+ ArrayBuffer.prototype.slice = function (from, to) {
240130
+ var length = this.byteLength,
240131
+ begin = clamp(from, length),
240132
+ end = length,
240133
+ num,
240134
+ target,
240135
+ targetArray,
240136
+ sourceArray;
240137
+
240138
+ if (to !== undefined) {
240139
+ end = clamp(to, length);
240140
+ }
240141
+
240142
+ if (begin > end) {
240143
+ return new ArrayBuffer(0);
240144
+ }
240145
+
240146
+ num = end - begin;
240147
+ target = new ArrayBuffer(num);
240148
+ targetArray = new Uint8Array(target);
240149
+
240150
+ sourceArray = new Uint8Array(this, begin, num);
240151
+ targetArray.set(sourceArray);
240152
+
240153
+ return target;
240154
+ };
240155
+ })();
240156
+ }
240157
+
240158
+ // ---------------------------------------------------
240159
+
240160
+ /**
240161
+ * Helpers.
240162
+ */
240163
+
240164
+ function toUtf8(str) {
240165
+ if (/[\u0080-\uFFFF]/.test(str)) {
240166
+ str = unescape(encodeURIComponent(str));
240167
+ }
240168
+
240169
+ return str;
240170
+ }
240171
+
240172
+ function utf8Str2ArrayBuffer(str, returnUInt8Array) {
240173
+ var length = str.length,
240174
+ buff = new ArrayBuffer(length),
240175
+ arr = new Uint8Array(buff),
240176
+ i;
240177
+
240178
+ for (i = 0; i < length; i += 1) {
240179
+ arr[i] = str.charCodeAt(i);
240180
+ }
240181
+
240182
+ return returnUInt8Array ? arr : buff;
240183
+ }
240184
+
240185
+ function arrayBuffer2Utf8Str(buff) {
240186
+ return String.fromCharCode.apply(null, new Uint8Array(buff));
240187
+ }
240188
+
240189
+ function concatenateArrayBuffers(first, second, returnUInt8Array) {
240190
+ var result = new Uint8Array(first.byteLength + second.byteLength);
240191
+
240192
+ result.set(new Uint8Array(first));
240193
+ result.set(new Uint8Array(second), first.byteLength);
240194
+
240195
+ return returnUInt8Array ? result : result.buffer;
240196
+ }
240197
+
240198
+ function hexToBinaryString(hex) {
240199
+ var bytes = [],
240200
+ length = hex.length,
240201
+ x;
240202
+
240203
+ for (x = 0; x < length - 1; x += 2) {
240204
+ bytes.push(parseInt(hex.substr(x, 2), 16));
240205
+ }
240206
+
240207
+ return String.fromCharCode.apply(String, bytes);
240208
+ }
240209
+
240210
+ // ---------------------------------------------------
240211
+
240212
+ /**
240213
+ * SparkMD5 OOP implementation.
240214
+ *
240215
+ * Use this class to perform an incremental md5, otherwise use the
240216
+ * static methods instead.
240217
+ */
240218
+
240219
+ function SparkMD5() {
240220
+ // call reset to init the instance
240221
+ this.reset();
240222
+ }
240223
+
240224
+ /**
240225
+ * Appends a string.
240226
+ * A conversion will be applied if an utf8 string is detected.
240227
+ *
240228
+ * @param {String} str The string to be appended
240229
+ *
240230
+ * @return {SparkMD5} The instance itself
240231
+ */
240232
+ SparkMD5.prototype.append = function (str) {
240233
+ // Converts the string to utf8 bytes if necessary
240234
+ // Then append as binary
240235
+ this.appendBinary(toUtf8(str));
240236
+
240237
+ return this;
240238
+ };
240239
+
240240
+ /**
240241
+ * Appends a binary string.
240242
+ *
240243
+ * @param {String} contents The binary string to be appended
240244
+ *
240245
+ * @return {SparkMD5} The instance itself
240246
+ */
240247
+ SparkMD5.prototype.appendBinary = function (contents) {
240248
+ this._buff += contents;
240249
+ this._length += contents.length;
240250
+
240251
+ var length = this._buff.length,
240252
+ i;
240253
+
240254
+ for (i = 64; i <= length; i += 64) {
240255
+ md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
240256
+ }
240257
+
240258
+ this._buff = this._buff.substring(i - 64);
240259
+
240260
+ return this;
240261
+ };
240262
+
240263
+ /**
240264
+ * Finishes the incremental computation, reseting the internal state and
240265
+ * returning the result.
240266
+ *
240267
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
240268
+ *
240269
+ * @return {String} The result
240270
+ */
240271
+ SparkMD5.prototype.end = function (raw) {
240272
+ var buff = this._buff,
240273
+ length = buff.length,
240274
+ i,
240275
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
240276
+ ret;
240277
+
240278
+ for (i = 0; i < length; i += 1) {
240279
+ tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
240280
+ }
240281
+
240282
+ this._finish(tail, length);
240283
+ ret = hex(this._hash);
240284
+
240285
+ if (raw) {
240286
+ ret = hexToBinaryString(ret);
240287
+ }
240288
+
240289
+ this.reset();
240290
+
240291
+ return ret;
240292
+ };
240293
+
240294
+ /**
240295
+ * Resets the internal state of the computation.
240296
+ *
240297
+ * @return {SparkMD5} The instance itself
240298
+ */
240299
+ SparkMD5.prototype.reset = function () {
240300
+ this._buff = '';
240301
+ this._length = 0;
240302
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
240303
+
240304
+ return this;
240305
+ };
240306
+
240307
+ /**
240308
+ * Gets the internal state of the computation.
240309
+ *
240310
+ * @return {Object} The state
240311
+ */
240312
+ SparkMD5.prototype.getState = function () {
240313
+ return {
240314
+ buff: this._buff,
240315
+ length: this._length,
240316
+ hash: this._hash.slice()
240317
+ };
240318
+ };
240319
+
240320
+ /**
240321
+ * Gets the internal state of the computation.
240322
+ *
240323
+ * @param {Object} state The state
240324
+ *
240325
+ * @return {SparkMD5} The instance itself
240326
+ */
240327
+ SparkMD5.prototype.setState = function (state) {
240328
+ this._buff = state.buff;
240329
+ this._length = state.length;
240330
+ this._hash = state.hash;
240331
+
240332
+ return this;
240333
+ };
240334
+
240335
+ /**
240336
+ * Releases memory used by the incremental buffer and other additional
240337
+ * resources. If you plan to use the instance again, use reset instead.
240338
+ */
240339
+ SparkMD5.prototype.destroy = function () {
240340
+ delete this._hash;
240341
+ delete this._buff;
240342
+ delete this._length;
240343
+ };
240344
+
240345
+ /**
240346
+ * Finish the final calculation based on the tail.
240347
+ *
240348
+ * @param {Array} tail The tail (will be modified)
240349
+ * @param {Number} length The length of the remaining buffer
240350
+ */
240351
+ SparkMD5.prototype._finish = function (tail, length) {
240352
+ var i = length,
240353
+ tmp,
240354
+ lo,
240355
+ hi;
240356
+
240357
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
240358
+ if (i > 55) {
240359
+ md5cycle(this._hash, tail);
240360
+ for (i = 0; i < 16; i += 1) {
240361
+ tail[i] = 0;
240362
+ }
240363
+ }
240364
+
240365
+ // Do the final computation based on the tail and length
240366
+ // Beware that the final length may not fit in 32 bits so we take care of that
240367
+ tmp = this._length * 8;
240368
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
240369
+ lo = parseInt(tmp[2], 16);
240370
+ hi = parseInt(tmp[1], 16) || 0;
240371
+
240372
+ tail[14] = lo;
240373
+ tail[15] = hi;
240374
+ md5cycle(this._hash, tail);
240375
+ };
240376
+
240377
+ /**
240378
+ * Performs the md5 hash on a string.
240379
+ * A conversion will be applied if utf8 string is detected.
240380
+ *
240381
+ * @param {String} str The string
240382
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
240383
+ *
240384
+ * @return {String} The result
240385
+ */
240386
+ SparkMD5.hash = function (str, raw) {
240387
+ // Converts the string to utf8 bytes if necessary
240388
+ // Then compute it using the binary function
240389
+ return SparkMD5.hashBinary(toUtf8(str), raw);
240390
+ };
240391
+
240392
+ /**
240393
+ * Performs the md5 hash on a binary string.
240394
+ *
240395
+ * @param {String} content The binary string
240396
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
240397
+ *
240398
+ * @return {String} The result
240399
+ */
240400
+ SparkMD5.hashBinary = function (content, raw) {
240401
+ var hash = md51(content),
240402
+ ret = hex(hash);
240403
+
240404
+ return raw ? hexToBinaryString(ret) : ret;
240405
+ };
240406
+
240407
+ // ---------------------------------------------------
240408
+
240409
+ /**
240410
+ * SparkMD5 OOP implementation for array buffers.
240411
+ *
240412
+ * Use this class to perform an incremental md5 ONLY for array buffers.
240413
+ */
240414
+ SparkMD5.ArrayBuffer = function () {
240415
+ // call reset to init the instance
240416
+ this.reset();
240417
+ };
240418
+
240419
+ /**
240420
+ * Appends an array buffer.
240421
+ *
240422
+ * @param {ArrayBuffer} arr The array to be appended
240423
+ *
240424
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240425
+ */
240426
+ SparkMD5.ArrayBuffer.prototype.append = function (arr) {
240427
+ var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),
240428
+ length = buff.length,
240429
+ i;
240430
+
240431
+ this._length += arr.byteLength;
240432
+
240433
+ for (i = 64; i <= length; i += 64) {
240434
+ md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
240435
+ }
240436
+
240437
+ this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
240438
+
240439
+ return this;
240440
+ };
240441
+
240442
+ /**
240443
+ * Finishes the incremental computation, reseting the internal state and
240444
+ * returning the result.
240445
+ *
240446
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
240447
+ *
240448
+ * @return {String} The result
240449
+ */
240450
+ SparkMD5.ArrayBuffer.prototype.end = function (raw) {
240451
+ var buff = this._buff,
240452
+ length = buff.length,
240453
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
240454
+ i,
240455
+ ret;
240456
+
240457
+ for (i = 0; i < length; i += 1) {
240458
+ tail[i >> 2] |= buff[i] << ((i % 4) << 3);
240459
+ }
240460
+
240461
+ this._finish(tail, length);
240462
+ ret = hex(this._hash);
240463
+
240464
+ if (raw) {
240465
+ ret = hexToBinaryString(ret);
240466
+ }
240467
+
240468
+ this.reset();
240469
+
240470
+ return ret;
240471
+ };
240472
+
240473
+ /**
240474
+ * Resets the internal state of the computation.
240475
+ *
240476
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240477
+ */
240478
+ SparkMD5.ArrayBuffer.prototype.reset = function () {
240479
+ this._buff = new Uint8Array(0);
240480
+ this._length = 0;
240481
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
240482
+
240483
+ return this;
240484
+ };
240485
+
240486
+ /**
240487
+ * Gets the internal state of the computation.
240488
+ *
240489
+ * @return {Object} The state
240490
+ */
240491
+ SparkMD5.ArrayBuffer.prototype.getState = function () {
240492
+ var state = SparkMD5.prototype.getState.call(this);
240493
+
240494
+ // Convert buffer to a string
240495
+ state.buff = arrayBuffer2Utf8Str(state.buff);
240496
+
240497
+ return state;
240498
+ };
240499
+
240500
+ /**
240501
+ * Gets the internal state of the computation.
240502
+ *
240503
+ * @param {Object} state The state
240504
+ *
240505
+ * @return {SparkMD5.ArrayBuffer} The instance itself
240506
+ */
240507
+ SparkMD5.ArrayBuffer.prototype.setState = function (state) {
240508
+ // Convert string to buffer
240509
+ state.buff = utf8Str2ArrayBuffer(state.buff, true);
240510
+
240511
+ return SparkMD5.prototype.setState.call(this, state);
240512
+ };
240513
+
240514
+ SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
240515
+
240516
+ SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
240517
+
240518
+ /**
240519
+ * Performs the md5 hash on an array buffer.
240520
+ *
240521
+ * @param {ArrayBuffer} arr The array buffer
240522
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex one
240523
+ *
240524
+ * @return {String} The result
240525
+ */
240526
+ SparkMD5.ArrayBuffer.hash = function (arr, raw) {
240527
+ var hash = md51_array(new Uint8Array(arr)),
240528
+ ret = hex(hash);
240529
+
240530
+ return raw ? hexToBinaryString(ret) : ret;
240531
+ };
240532
+
240533
+ return SparkMD5;
240534
+ }));
240535
+
240536
+
239451
240537
  /***/ }),
239452
240538
 
239453
240539
  /***/ 88310:
@@ -262420,19 +263506,19 @@ var update = add("19c93270", content, true, {"sourceMap":false,"shadowMode":fals
262420
263506
 
262421
263507
  /***/ }),
262422
263508
 
262423
- /***/ 1753:
263509
+ /***/ 54659:
262424
263510
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
262425
263511
 
262426
263512
  // style-loader: Adds some css to the DOM by adding a <style> tag
262427
263513
 
262428
263514
  // load the styles
262429
- var content = __webpack_require__(59046);
263515
+ var content = __webpack_require__(74360);
262430
263516
  if(content.__esModule) content = content.default;
262431
263517
  if(typeof content === 'string') content = [[module.id, content, '']];
262432
263518
  if(content.locals) module.exports = content.locals;
262433
263519
  // add the styles to the DOM
262434
263520
  var add = (__webpack_require__(99548)/* ["default"] */ .A)
262435
- var update = add("62dd250a", content, true, {"sourceMap":false,"shadowMode":false});
263521
+ var update = add("43cac908", content, true, {"sourceMap":false,"shadowMode":false});
262436
263522
 
262437
263523
  /***/ }),
262438
263524
 
@@ -286378,87 +287464,87 @@ var asyncComponents = [
286378
287464
  }],
286379
287465
  // ========== ecwapp/Wflowform 工作流表单子组件 → chunk: wflow-form ==========
286380
287466
  ['Attachment', function () {
286381
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287467
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286382
287468
  return m.Attachment;
286383
287469
  });
286384
287470
  }], ['BodyFile', function () {
286385
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287471
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286386
287472
  return m.BodyFile;
286387
287473
  });
286388
287474
  }], ['CommandBar', function () {
286389
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287475
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286390
287476
  return m.CommandBar;
286391
287477
  });
286392
287478
  }], ['HandleIdea', function () {
286393
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287479
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286394
287480
  return m.HandleIdea;
286395
287481
  });
286396
287482
  }], ['IdeaInputBox', function () {
286397
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287483
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286398
287484
  return m.IdeaInputBox;
286399
287485
  });
286400
287486
  }], ['ModifyWflogAddUser', function () {
286401
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287487
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286402
287488
  return m.ModifyWflogAddUser;
286403
287489
  });
286404
287490
  }], ['ModifyWflogIdea', function () {
286405
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287491
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286406
287492
  return m.ModifyWflogIdea;
286407
287493
  });
286408
287494
  }], ['WriteToReadIdea', function () {
286409
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287495
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286410
287496
  return m.WriteToReadIdea;
286411
287497
  });
286412
287498
  }], ['ModifyWflogSubmitFile', function () {
286413
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287499
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286414
287500
  return m.ModifyWflogSubmitFile;
286415
287501
  });
286416
287502
  }], ['ModifyWfNodelog', function () {
286417
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287503
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286418
287504
  return m.ModifyWfNodelog;
286419
287505
  });
286420
287506
  }], ['SelectOuterDeputy', function () {
286421
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287507
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286422
287508
  return m.SelectOuterDeputy;
286423
287509
  });
286424
287510
  }], ['SubmitHandle', function () {
286425
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287511
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286426
287512
  return m.SubmitHandle;
286427
287513
  });
286428
287514
  }], ['SubmitDialog', function () {
286429
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287515
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286430
287516
  return m.SubmitDialog;
286431
287517
  });
286432
287518
  }], ['WfNodelogList', function () {
286433
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287519
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286434
287520
  return m.WfNodelogList;
286435
287521
  });
286436
287522
  }], ['WflogAddReader', function () {
286437
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287523
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286438
287524
  return m.WflogAddReader;
286439
287525
  });
286440
287526
  }], ['WflowView', function () {
286441
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287527
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286442
287528
  return m.WflowView;
286443
287529
  });
286444
287530
  }], ['ImgView', function () {
286445
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287531
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286446
287532
  return m.ImgView;
286447
287533
  });
286448
287534
  }], ['IdeaSignature', function () {
286449
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287535
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286450
287536
  return m.IdeaSignature;
286451
287537
  });
286452
287538
  }], ['ReplaceFile', function () {
286453
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287539
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286454
287540
  return m.ReplaceFile;
286455
287541
  });
286456
287542
  }], ['ViewBodyFile', function () {
286457
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287543
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286458
287544
  return m.ViewBodyFile;
286459
287545
  });
286460
287546
  }], ['WformLayout', function () {
286461
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013)).then(function (m) {
287547
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412)).then(function (m) {
286462
287548
  return m.WformLayout;
286463
287549
  });
286464
287550
  }],
@@ -286702,7 +287788,7 @@ var wappaio_install = function install(Vue) {
286702
287788
  });
286703
287789
 
286704
287790
  // 3. 异步加载工作流引擎插件(独立 chunk)
286705
- Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 99932)).then(function (m) {
287791
+ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 86322)).then(function (m) {
286706
287792
  Vue.use(m.default || m);
286707
287793
  });
286708
287794
  };
@@ -286740,10 +287826,10 @@ var webSocket = websocket/* default */.A;
286740
287826
 
286741
287827
  // ---------- 工作流相关 ----------
286742
287828
  var WfengineModule = function WfengineModule() {
286743
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 99932));
287829
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 86322));
286744
287830
  };
286745
287831
  var WflowformModule = function WflowformModule() {
286746
- return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 89013));
287832
+ return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 41412));
286747
287833
  };
286748
287834
  var WflowDesignerModule = function WflowDesignerModule() {
286749
287835
  return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 94714));