diff --git a/.gitignore b/.gitignore index 96c84a7..0bdc3f3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,10 @@ vueuse /temp packages/**/es packages/**/lib +**/es +**/lib +**/**/es +**/**/lib /es /lib pnpm-lock.yaml diff --git a/packages/biz/es/BigImageModal/BigImageModal.js b/packages/biz/es/BigImageModal/BigImageModal.js deleted file mode 100644 index 6d99f22..0000000 --- a/packages/biz/es/BigImageModal/BigImageModal.js +++ /dev/null @@ -1,270 +0,0 @@ -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); } -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; } -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; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -// @ts-nocheck -import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react'; -import { ConfigProvider, Descriptions, Modal, Tabs, CropperImage, AttachImage, VideoPlayer, BtnGroup, RelatedImage } from '@zhst/meta'; -import classNames from 'classnames'; -import { get, isEmpty, pick } from '@zhst/func'; -import Navigation from "./components/navigation"; -import CombineImage from "./components/CombineImage"; -import "./index.less"; -import { jsx as _jsx } from "react/jsx-runtime"; -import { Fragment as _Fragment } from "react/jsx-runtime"; -import { jsxs as _jsxs } from "react/jsx-runtime"; -var DescriptionsItem = Descriptions.Item; -export var componentPrefix = 'zhst-image'; - -// 对比图模式、场景图模式、视频模式 - -var initialStyle = { - fontSize: '12px' -}; -var BigImageModal = /*#__PURE__*/forwardRef(function (props, ref) { - var _props$title = props.title, - title = _props$title === void 0 ? '-' : _props$title, - width = props.width, - open = props.open, - children = props.children, - onCancel = props.onCancel, - activeTab = props.activeTab, - _props$attributeList = props.attributeList, - attributeList = _props$attributeList === void 0 ? [] : _props$attributeList, - _props$isRelated = props.isRelated, - isRelated = _props$isRelated === void 0 ? false : _props$isRelated, - _props$tabs = props.tabs, - tabs = _props$tabs === void 0 ? {} : _props$tabs, - _props$footer = props.footer, - footer = _props$footer === void 0 ? null : _props$footer, - _props$dataSource = props.dataSource, - dataSource = _props$dataSource === void 0 ? {} : _props$dataSource, - onTabChange = props.onTabChange, - compareImageProps = props.compareImageProps, - showNavigation = props.showNavigation, - modalProps = props.modalProps, - cropperImageProps = props.cropperImageProps, - prevButtonProps = props.prevButtonProps, - onPrevButtonClick = props.onPrevButtonClick, - onNextButtonClick = props.onNextButtonClick, - nextButtonProps = props.nextButtonProps, - tabsProps = props.tabsProps, - btnGroupProps = props.btnGroupProps, - descriptionsProps = props.descriptionsProps, - relatedImageProps = props.relatedImageProps, - theme = props.theme; - var combineImageRef = useRef(null); - var videoPlayerRef = useRef(null); - var modalRef = useRef(null); - - // ========================== 头切换 ========================= - var _useState = useState(activeTab || get(tabsProps, 'data[0].key')), - _useState2 = _slicedToArray(_useState, 2), - tab = _useState2[0], - setTab = _useState2[1]; - var _useState3 = useState('related'), - _useState4 = _slicedToArray(_useState3, 2), - activeKey = _useState4[0], - setActiveKey = _useState4[1]; - - // ========================= 预览切换下标 ========================= - var _useState5 = useState('auto'), - _useState6 = _slicedToArray(_useState5, 2), - cropType = _useState6[0], - setCropType = _useState6[1]; - var cropBtnDataSource = [{ - key: 'close', - icon: 'icon-danchuangguanbi', - title: '退出' - }, { - key: 'auto', - icon: 'icon-zidong', - title: '智能框选' - }, { - key: 'custom', - icon: 'icon-shoudong', - title: '手动框选' - }]; - var handleCropBtnClick = function handleCropBtnClick(v) { - setCropType(v); - }; - var defaultTabsProps = !isEmpty(tabs) ? tabs : { - items: [{ - label: '对比图模式', - key: 'COMPATER', - children: /*#__PURE__*/_jsx(CombineImage, _objectSpread({ - ref: combineImageRef, - data: pick(dataSource, 'compaterImage', 'imgSummary', 'imageKey', 'score') - }, compareImageProps)) - }, { - label: '场景图模式', - key: 'NORMAL', - children: /*#__PURE__*/_jsx("div", { - style: { - display: 'flex', - justifyContent: 'center', - width: '100%' - }, - children: /*#__PURE__*/_jsx("div", { - style: { - width: '85%', - height: '500px' - }, - children: /*#__PURE__*/_jsxs(CropperImage, _objectSpread(_objectSpread({ - type: "rect", - odList: get(dataSource, 'odRect', []) - }, cropperImageProps), {}, { - children: [!(cropperImageProps !== null && cropperImageProps !== void 0 && cropperImageProps.editAble) && /*#__PURE__*/_jsxs(_Fragment, { - children: [/*#__PURE__*/_jsx(AttachImage, { - data: [{ - label: '测试', - url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' - }] - }), /*#__PURE__*/_jsx("div", { - style: { - position: 'absolute', - right: '24px', - bottom: '24px', - fontSize: '18px', - color: 'red', - cursor: 'default' - }, - children: "\u4EBA\u8138\u8D28\u91CF\u5206\uFF1A".concat(Number(cropperImageProps === null || cropperImageProps === void 0 ? void 0 : cropperImageProps.score).toFixed(2)) - })] - }), (cropperImageProps === null || cropperImageProps === void 0 ? void 0 : cropperImageProps.showEditTools) && /*#__PURE__*/_jsx(BtnGroup, _objectSpread({ - circle: true, - style: { - position: 'absolute', - top: 0, - right: 0 - }, - dataSource: cropBtnDataSource, - onClick: handleCropBtnClick, - selectKey: cropType - }, btnGroupProps))] - })) - }) - }) - }] - }; - - // 暴露 ref 实例 - useImperativeHandle(ref, function () { - return { - ref: ref, - tab: tab, - setTab: setTab, - modalRef: modalRef, - activeKey: activeKey, - setActiveKey: setActiveKey, - videoPlayerRef: videoPlayerRef, - combineImageRef: combineImageRef - }; - }); - return /*#__PURE__*/_jsxs(Modal, _objectSpread(_objectSpread({ - destroyOnClose: true, - width: width, - open: open, - ref: modalRef, - footer: footer, - className: componentPrefix, - title: title, - onCancel: onCancel - }, modalProps), {}, { - children: [/*#__PURE__*/_jsxs("div", { - style: { - marginTop: '16px' - }, - children: [/*#__PURE__*/_jsx(ConfigProvider, { - theme: _objectSpread({ - token: { - colorTextSecondary: 'rgba(0,0,0,0.45)' - }, - components: { - Descriptions: { - titleMarginBottom: '20px', - viewBg: '#f6f6f6', - titleColor: 'rgba(0,0,0,0.45)', - colorTextLabel: 'rgba(0,0,0,0.45)', - contentColor: 'rgba(0,0,0,0.88)' - } - } - }, theme), - children: attributeList.map(function (descriptions) { - var _descriptions$childre; - return /*#__PURE__*/_jsx(Descriptions, _objectSpread(_objectSpread({ - title: /*#__PURE__*/_jsx("p", { - style: { - margin: '12px 0 0', - fontSize: initialStyle.fontSize - }, - children: descriptions.title - }), - column: 8, - style: { - padding: '0 64px' - } - }, descriptionsProps), {}, { - children: descriptions === null || descriptions === void 0 || (_descriptions$childre = descriptions.children) === null || _descriptions$childre === void 0 ? void 0 : _descriptions$childre.map(function (item) { - return /*#__PURE__*/_jsx(DescriptionsItem, { - label: item.label, - span: 1, - contentStyle: { - fontSize: initialStyle.fontSize - }, - labelStyle: { - fontSize: initialStyle.fontSize - }, - children: item.children - }, item.key); - }) - }), descriptions.title); - }) - }), /*#__PURE__*/_jsxs("div", { - className: classNames("".concat(componentPrefix, "-view-container")), - children: [/*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({ - activeKey: tab, - centered: true, - destroyInactiveTabPane: true, - onChange: function onChange(v) { - setTab(function (pre) { - onTabChange === null || onTabChange === void 0 || onTabChange(v, pre); - return v; - }); - }, - tabBarStyle: { - fontSize: '18px', - fontWeight: 'bold' - } - }, defaultTabsProps), tabsProps)), tab === 'VIDEO' && /*#__PURE__*/_jsx(VideoPlayer, { - ref: videoPlayerRef, - url: dataSource === null || dataSource === void 0 ? void 0 : dataSource.flvUrl - }), /*#__PURE__*/_jsx(Navigation, _objectSpread({ - className: classNames("".concat(componentPrefix, "-view-container__nav"), (prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.disabled) && "".concat(componentPrefix, "-view-container__nav--disabled"), "".concat(componentPrefix, "-view-container__nav--left")), - prev: true, - show: showNavigation, - onClick: onPrevButtonClick - }, prevButtonProps)), /*#__PURE__*/_jsx(Navigation, _objectSpread({ - className: classNames("".concat(componentPrefix, "-view-container__nav"), (nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.disabled) && "".concat(componentPrefix, "-view-container__nav--disabled"), "".concat(componentPrefix, "-view-container__nav--right")), - next: true, - show: showNavigation, - onClick: onNextButtonClick - }, nextButtonProps)), isRelated && /*#__PURE__*/_jsx("div", { - style: { - margin: '24px 0' - }, - children: /*#__PURE__*/_jsx(RelatedImage, _objectSpread({}, relatedImageProps)) - })] - })] - }), children] - })); -}); -export default BigImageModal; \ No newline at end of file diff --git a/packages/constants/es/base/index.js b/packages/constants/es/base/index.js deleted file mode 100644 index 1ad86ba..0000000 --- a/packages/constants/es/base/index.js +++ /dev/null @@ -1,30 +0,0 @@ -export var OBJECT_GRNER_THRESHOLD = 0.8; //目标图判断性别阈值 -export var OBJECT_AGE_TYPE_THRESHOLD = 0.5; //目标图判断年龄段阈值 -export var MODE_KEY = 'test_mode'; -//业务约定 -export var SEARCH_IMG_COUNT = 10; //检索图片的最大个数 -export var GLOBAL_IS_ITEM_NUMBER_SHOW = false; //是否展示索引 -export var publicPath = 'hummingbird'; -export var ENTER_CIRCLE = 'MONITORTYPE_ENTER_CIRCLE'; -export var OUT_CIRCLE = 'MONITORTYPE_OUT_CIRCLE'; -export var TEMP = 'MONITORTYPE_TEMP'; -export var GLOBAL_IS_BOX_VMS_SHOW = true; //是否展示盒子vms - -export var BODY_SEARCH_THRESHOID = 0.45; //形体检索阈值 -export var RECORD_VERSION = '3.0.0'; //保存记录的版本号 - -export var DeviceTab = { - EMPTY: 0, - REAL_CAMERA: 1, - PREPROCESS_CAMERA: 2, - //摄像头列表 - TAG_CAMERA: 3, - //预案列表 - HISTORY_VIDEO_GROUP: 4, - //录像回放 - VIRTUAL_CAMERA: 5, - //离线视频 - REAL_CAMERA_NOFACE: 6, - REAL_CAMERA_ONLYFACE: 7, - REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: 8 // 只有普通摄像头,没有人脸、没有盒子、直连 -}; \ No newline at end of file diff --git a/packages/constants/es/camera/index.js b/packages/constants/es/camera/index.js deleted file mode 100644 index cc5d960..0000000 --- a/packages/constants/es/camera/index.js +++ /dev/null @@ -1 +0,0 @@ -export var TYPE = ''; \ No newline at end of file diff --git a/packages/constants/es/index.js b/packages/constants/es/index.js deleted file mode 100644 index 443eb9c..0000000 --- a/packages/constants/es/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./camera"; -export * from "./base"; -export * from "./user"; \ No newline at end of file diff --git a/packages/constants/es/user/index.js b/packages/constants/es/user/index.js deleted file mode 100644 index 7c645e4..0000000 --- a/packages/constants/es/user/index.js +++ /dev/null @@ -1 +0,0 @@ -export default {}; \ No newline at end of file diff --git a/packages/func/dist/func.min.js b/packages/func/dist/func.min.js deleted file mode 100644 index d9a86a4..0000000 --- a/packages/func/dist/func.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={665:function(e,t,n){var r;e=n.nmd(e);var i=n(123).default;!function(o){var a="object"==i(t)&&t,u="object"==i(e)&&e&&e.exports==a&&e,l="object"==(void 0===n.g?"undefined":i(n.g))&&n.g;l.global!==l&&l.window!==l||(o=l);var s=function(e){this.message=e};(s.prototype=new Error).name="InvalidCharacterError";var c=function(e){throw new s(e)},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,h={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&c("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,a="",u=-1,l=e.length-o;++u>18&63)+f.charAt(i>>12&63)+f.charAt(i>>6&63)+f.charAt(63&i);return 2==o?(t=e.charCodeAt(u)<<8,n=e.charCodeAt(++u),a+=f.charAt((i=t+n)>>10)+f.charAt(i>>4&63)+f.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(u),a+=f.charAt(i>>2)+f.charAt(i<<4&63)+"=="),a},decode:function(e){var t=(e=String(e).replace(d,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a>(-2*i&6)));return o},version:"1.0.0"};if("object"==i(n.amdO)&&n.amdO)void 0===(r=function(){return h}.call(t,n,t,e))||(e.exports=r);else if(a&&!a.nodeType)if(u)u.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(a[p]=h[p]);else o.base64=h}(this)},26:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=l(e),a=o[0],u=o[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),c=0,f=u>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,s[c++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,u=0,l=r-i;ul?l:u+a));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function s(e,t,r){for(var i,o,a=[],u=t;u>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},208:function(e,t,n){"use strict";var r=n(123).default,i=n(26),o=n(900),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=s,t.h2=50;var u=2147483647;function l(e){if(e>u)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|m(e,t),r=l(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e));if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return s.from(i,t,n);var o=function(e){if(s.isBuffer(e)){var t=0|v(e.length),n=l(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?l(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e))}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return f(e),l(e<0?0:0|v(e))}function h(e){for(var t=e.length<0?0:0|v(e.length),n=l(t),r=0;r=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|e}function m(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+r(e));var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(o)return i?-1:B(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),$(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){var o,a=1,u=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,l/=2,n/=2}function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;ou&&(n=u-l),o=n;o>=0;o--){for(var f=!0,d=0;di&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:s>223?3:s>191?2:1;if(i+f<=n)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&s)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&s)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],u=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(l=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?s.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,n,i,o){if(W(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+r(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),u=(n>>>=0)-(t>>>=0),l=Math.min(a,u),c=this.slice(i,o),f=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},588:function(e,t,n){var r,i,o,a=n(123).default;o=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",i="minute",o="hour",u="day",l="week",s="month",c="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;_[u]=t,i=u}return!r&&i&&(b=i),i||!r&&b},S=function(e,t){if(k(e))return e.clone();var n="object"==a(t)?t:{};return n.date=e,n.args=arguments,new C(n)},E=y;E.l=x,E.i=k,E.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function a(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var m=a.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return E},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return S(e)=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var u="object"==("undefined"==typeof window?"undefined":a(window))&&window.window===window?window:"object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self?self:"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g?n.g:void 0,l=u.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=u.saveAs||("object"!=("undefined"==typeof window?"undefined":a(window))||window!==u?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,n){var a=u.URL||u.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):i(l.href)?r(e,t,n):o(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(i(e))r(e,n,a);else{var u=document.createElement("a");u.href=e,u.target="_blank",setTimeout((function(){o(u)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var o="application/octet-stream"===e.type,a=/constructor/i.test(u.HTMLElement)||u.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||o&&a||l)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var f=u.URL||u.webkitURL,d=f.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){f.revokeObjectURL(d)}),4e4)}});u.saveAs=s.saveAs=s,e.exports=s})?r.apply(t,i):r)||(e.exports=o)},900:function(e,t){t.read=function(e,t,n,r,i){var o,a,u=8*i-r-1,l=(1<>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=u;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-s;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=s}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,u,l,s=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(u=0,a=c):a+f>=1?(u=(t*l-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&u,h+=p,u/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,s-=8);e[n+h-p]|=128*v}},984:function(e,t,n){var r,i,o,a,u=n(208).lW,l=n(618),s=n(123).default;a=function(){return function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var s=n[a]={exports:{}};t[a][0].call(s.exports,(function(e){return i(t[a][1][e]||e)}),s,s.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a>2,u=(3&t)<<4|n>>4,l=1>6:64,s=2>4,n=(15&a)<<4|(u=o.indexOf(e.charAt(s++)))>>2,r=(3&u)<<6|(l=o.indexOf(e.charAt(s++))),d[c++]=t,64!==u&&(d[c++]=n),64!==l&&(d[c++]=r);return d}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function u(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}u.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=0+n;e^=-1;for(var u=0;u>>8^o[255&(e^t[u])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var o=i,a=0+n;e^=-1;for(var u=0;u>>8^o[255&(e^t.charCodeAt(u))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),u=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(u,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n>>=8;return r}function i(e,t,n,i,a,c){var f,d,h=e.file,p=e.compression,v=c!==u.utf8encode,m=o.transformTo("string",c(h.name)),g=o.transformTo("string",u.utf8encode(h.name)),y=h.comment,b=o.transformTo("string",c(y)),_=o.transformTo("string",u.utf8encode(y)),w=g.length!==h.name.length,k=_.length!==y.length,x="",S="",E="",C=h.dir,A=h.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),v||!w&&!k||(T|=2048);var z=0,I=0;C&&(z|=16),"UNIX"===a?(I=798,z|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(h.unixPermissions,C)):(I=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),f=A.getUTCHours(),f<<=6,f|=A.getUTCMinutes(),f<<=5,f|=A.getUTCSeconds()/2,d=A.getUTCFullYear()-1980,d<<=4,d|=A.getUTCMonth()+1,d<<=5,d|=A.getUTCDate(),w&&(S=r(1,1)+r(l(m),4)+g,x+="up"+r(S.length,2)+S),k&&(E=r(1,1)+r(l(b),4)+_,x+="uc"+r(E.length,2)+E);var R="";return R+="\n\0",R+=r(T,2),R+=p.magic,R+=r(f,2),R+=r(d,2),R+=r(O.crc32,4),R+=r(O.compressedSize,4),R+=r(O.uncompressedSize,4),R+=r(m.length,2),R+=r(x.length,2),{fileRecord:s.LOCAL_FILE_HEADER+R+m+x,dirRecord:s.CENTRAL_FILE_HEADER+r(I,2)+R+r(b.length,2)+"\0\0\0\0"+r(z,4)+r(i,4)+m+x+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),u=e("../utf8"),l=e("../crc32"),s=e("../signature");function c(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,a),c.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return s.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),u=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new u(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),l=e("../support"),s=e("../external"),c=null;if(l.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function f(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,r.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return function(e,t){return new s.Promise((function(n,i){var o=[],l=e._internalType,s=e._outputType,c=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(s,function(e,t){var n,r=0,i=null,o=0;for(n=0;n>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,l=new Array(2*a);for(t=n=0;t>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(s,a),s.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+u[e[n]]>t?n:t}(t),l=t;a!==t.length&&(i.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},s.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=s,r.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function u(e){return e}function l(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,s[r++]=56320|1023&i)}return l(s,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var u=i;u>>8^o[255&(e^t[u])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),u=e("./crc32"),l=e("./messages"),s=-2,c=258,f=262,d=113;function h(e,t){return e.msg=l[t],t}function p(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function g(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,s=e.window,d=e.w_mask,h=e.prev,p=e.strstart+c,v=s[o+a-1],m=s[o+a];e.prev_length>=e.good_match&&(i>>=2),u>e.lookahead&&(u=e.lookahead);do{if(s[(n=t)+a]===m&&s[n+a-1]===v&&s[n]===s[o]&&s[++n]===s[o+1]){o+=2,n++;do{}while(s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&s[++o]===s[++n]&&ol&&0!=--i);return a<=e.lookahead?a:e.lookahead}function w(e){var t,n,r,o,l,s,c,d,h,p,v=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=v+(v-f)){for(i.arraySet(e.window,e.window,v,v,0),e.match_start-=v,e.strstart-=v,e.block_start-=v,t=n=e.hash_size;r=e.head[--t],e.head[t]=v<=r?r-v:0,--n;);for(t=n=v;r=e.prev[--t],e.prev[t]=v<=r?r-v:0,--n;);o+=v}if(0===e.strm.avail_in)break;if(s=e.strm,c=e.window,d=e.strstart+e.lookahead,p=void 0,(h=o)<(p=s.avail_in)&&(p=h),n=0===p?0:(s.avail_in-=p,i.arraySet(c,s.input,s.next_in,p,d),1===s.state.wrap?s.adler=a(s.adler,c,p,d):2===s.state.wrap&&(s.adler=u(s.adler,c,p,d)),s.next_in+=p,s.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(w(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,g(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(g(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,k),new S(4,5,16,8,k),new S(4,6,32,32,k),new S(4,4,16,16,x),new S(8,16,32,32,x),new S(8,16,128,128,x),new S(8,32,128,256,x),new S(32,128,258,1024,x),new S(32,258,258,4096,x)],n.deflateInit=function(e,t){return O(e,t,8,15,8,0)},n.deflateInit2=O,n.deflateReset=A,n.deflateResetKeep=C,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},n.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||5>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=u(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=d);else{var f=8+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=d,b(i,f),0!==i.strstart&&(b(i,e.adler>>>16),b(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),m(e),a=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),m(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),m(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=u(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&m(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=d)):i.status=d),0!==i.pending){if(m(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(n)&&4!==t)return h(e,-5);if(666===i.status&&0!==e.avail_in)return h(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var _=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(w(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,u=e.window;;){if(e.lookahead<=c){if(w(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==_&&4!==_||(i.status=666),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),m(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(b(i,e.adler>>>16),b(i,65535&e.adler)),m(e),0=n.w_size&&(0===u&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new i.Buf8(n.w_size),i.arraySet(d,t,h-n.w_size,n.w_size,0),t=d,h=n.w_size),l=e.avail_in,c=e.next_in,f=e.input,e.avail_in=h,e.next_in=0,e.input=t,w(n);n.lookahead>=3;){for(r=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=_=b>>>24,p-=_,0==(_=b>>>16&255))C[o++]=65535&b;else{if(!(16&_)){if(0==(64&_)){b=v[(65535&b)+(h&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&b,(_&=15)&&(p<_&&(h+=E[r++]<>>=_,p-=_),p<15&&(h+=E[r++]<>>=_=b>>>24,p-=_,!(16&(_=b>>>16&255))){if(0==(64&_)){b=m[(65535&b)+(h&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&b,p<(_&=15)&&(h+=E[r++]<>>=_,p-=_,(_=o-a)>3,h&=(1<<(p-=w<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):l}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):l}function h(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,L,2,0),g=m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,I=8+(15&(m>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(L[0]=255&m,L[1]=m>>>8&255,n.check=o(n.check,L,2,0)),g=m=0,n.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>8&255,L[2]=m>>>16&255,L[3]=m>>>24&255,n.check=o(n.check,L,4,0)),g=m=0,n.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>8),512&n.flags&&(L[0]=255&m,L[1]=m>>>8&255,n.check=o(n.check,L,2,0)),g=m=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>>8&255,n.check=o(n.check,L,2,0)),g=m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(p<(k=n.length)&&(k=p),k&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,c,d,k,I)),512&n.flags&&(n.check=o(n.check,c,k,d)),p-=k,d+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break e;for(k=0;I=c[d+k++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I)),I&&k>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===p)break e;p--,m+=c[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6!==t)break;m>>>=2,g-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,m+=c[d++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,g=m=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(p>>=5,g-=5,n.ndist=1+(31&m),m>>>=5,g-=5,n.ncode=4+(15&m),m>>>=4,g-=4,286>>=3,g-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},R=u(0,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,A=65535&M,!((E=M>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=E,g-=E,n.lens[n.have++]=A;else{if(16===A){for(P=E+2;g>>=E,g-=E,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],k=3+(3&m),m>>>=2,g-=2}else if(17===A){for(P=E+3;g>>=E)),m>>>=3,g-=3}else{for(P=E+7;g>>=E)),m>>>=7,g-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;k--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j={bits:n.lenbits},R=u(1,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},R=u(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,R){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=p&&258<=v){e.next_out=h,e.avail_out=v,e.next_in=d,e.avail_in=p,n.hold=m,n.bits=g,a(e,w),h=e.next_out,f=e.output,v=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;C=(M=n.lencode[m&(1<>>16&255,A=65535&M,!((E=M>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>O)])>>>16&255,A=65535&M,!(O+(E=M>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=O,g-=O,n.back+=O}if(m>>>=E,g-=E,n.back+=E,n.length=A,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=12;break}if(64&C){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(P=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(M=n.distcode[m&(1<>>16&255,A=65535&M,!((E=M>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>O)])>>>16&255,A=65535&M,!(O+(E=M>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=O,g-=O,n.back+=O}if(m>>>=E,g-=E,n.back+=E,64&C){e.msg="invalid distance code",n.mode=30;break}n.offset=A,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(P=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===v)break e;if(k=w-v,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}x=k>n.wnext?(k-=n.wnext,n.wsize-k):n.wnext-k,k>n.length&&(k=n.length),S=n.window}else S=f,x=h-n.offset,k=n.length;for(vy?(_=N[D+f[S]],j[P+f[S]]):(_=96,0),h=1<>T)+(p-=h)]=b<<24|_<<16|w|0,0!==p;);for(h=1<>=1;if(0!==h?(R&=h-1,R+=h):R=0,S++,0==--M[x]){if(x===C)break;x=t[n+f[S]]}if(A>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function C(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function T(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=l;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var u=e[2*i+1];0!==u&&(e[2*i]=O(o[u]++,u))}}function z(e){var t;for(t=0;t>1;1<=n;n--)j(e,o,n);for(i=s;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,j(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,u,s=t.dyn_tree,c=t.max_code,f=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,v=t.stat_desc.max_length,m=0;for(o=0;o<=l;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)v<(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)&&(o=v,m++),s[2*r+1]=o,c>=7;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?B(e,t,n,r):4===e.strategy||a===i?(C(e,2+(r?1:0),3),P(e,h,p)):(C(e,4+(r?1:0),3),function(e,t,n,r){var i;for(C(e,t-257,5),C(e,n-1,5),C(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+o+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){C(e,2,3),A(e,256,h),function(e){16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,i,o,a=1,u={},s=!1,c=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,n="[object process]"==={}.toString.call(e.process)?function(e){l.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",p,!1):e.attachEvent("onmessage",p),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(h,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r1)for(var n=1;nt}return!1}function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0!==i.type:r||!(2--l||o[u]!==a[l]){var s="\n"+o[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}}while(1<=u&&0<=l);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function $(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1);case 11:return e=W(e.type.render,!1);case 1:return e=W(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case S:return"Portal";case A:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case R:return"SuspenseList"}if("object"===r(e))switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case z:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return V(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Z(e){switch(r(e)){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Z(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ee(e,t){J(e,t);var n=Z(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ne(e,t.type,n):t.hasOwnProperty("defaultValue")&&ne(e,t.type,Z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function te(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ne(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var re=Array.isArray;function ie(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return de(e,t)}))}:de);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ve).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var be=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _e(e,t){if(t){if(be[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==r(t.dangerouslySetInnerHTML)||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==r(t.style))throw Error(a(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ke=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ee=null,Ce=null;function Ae(e){if(e=wi(e)){if("function"!=typeof Se)throw Error(a(280));var t=e.stateNode;t&&(t=xi(t),Se(e.stateNode,e.type,t))}}function Oe(e){Ee?Ce?Ce.push(e):Ce=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=Ce;if(Ce=Ee=null,Ae(e),t)for(e=0;e>>=0,0===e?32:31-(st(e)/ct|0)|0},st=Math.log,ct=Math.LN2;var ft=64,dt=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var u=a&~i;0!==u?r=ht(u):0!==(o&=a)&&(r=ht(o))}else 0!==(a=n&~i)?r=ht(a):0!==o&&(r=ht(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function bt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-lt(t)]=n}function _t(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lt(n),i=1<=Nn),Fn=String.fromCharCode(32),Un=!1;function Wn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return e=e.detail,"object"===r(e)&&"data"in e?e.data:null}var Vn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Yn(e,t,n,r){Oe(r),0<(t=Gr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,qn=null;function Kn(e){Fr(e,0)}function Qn(e){if(q(ki(e)))return e}function Xn(e,t){if("change"===e)return t}var Jn=!1;if(f){var er;if(f){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&vr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dr(n,o);var a=dr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,yr=null,br=null,_r=null,wr=!1;function kr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;wr||null==yr||yr!==K(r)||("selectionStart"in(r=yr)&&vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},_r&&cr(_r,r)||(_r=r,0<(r=Gr(br,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Er={},Cr={};function Ar(e){if(Er[e])return Er[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return Er[e]=n[t];return e}f&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Or=Ar("animationend"),Tr=Ar("animationiteration"),zr=Ar("animationstart"),Ir=Ar("transitionend"),Rr=new Map,jr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Rr.set(e,t),s(t,[e])}for(var Mr=0;MrEi||(e.current=Si[Ei],Si[Ei]=null,Ei--)}function Oi(e,t){Ei++,Si[Ei]=e.current,e.current=t}var Ti={},zi=Ci(Ti),Ii=Ci(!1),Ri=Ti;function ji(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pi(e){return null!=(e=e.childContextTypes)}function Mi(){Ai(Ii),Ai(zi)}function Li(e,t,n){if(zi.current!==Ti)throw Error(a(168));Oi(zi,t),Oi(Ii,n)}function Ni(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,H(e)||"Unknown",i));return B({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ri=zi.current,Oi(zi,e),Oi(Ii,Ii.current),!0}function Bi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ni(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,Ai(Ii),Ai(zi),Oi(zi,e)):Ai(Ii),Oi(Ii,n)}var Fi=null,Ui=!1,Wi=!1;function $i(e){null===Fi?Fi=[e]:Fi.push(e)}function Vi(){if(!Wi&&null!==Fi){Wi=!0;var e=0,t=wt;try{var n=Fi;for(wt=1;e>=a,i-=a,Xi=1<<32-lt(t)+i|n<d?(m=f,f=null):m=f.sibling;var g=p(r,f,a[d],l);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(r,f),o=u(g,o,d),null===c?s=g:c.sibling=g,c=g,f=m}if(d===a.length)return n(r,f),ao&&eo(r,d),s;if(null===f){for(;dm?(g=d,d=null):g=d.sibling;var b=p(r,d,y.value,s);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(r,d),o=u(b,o,m),null===f?c=b:f.sibling=b,f=b,d=g}if(y.done)return n(r,d),ao&&eo(r,m),c;if(null===d){for(;!y.done;m++,y=l.next())null!==(y=h(r,y.value,s))&&(o=u(y,o,m),null===f?c=y:f.sibling=y,f=y);return ao&&eo(r,m),c}for(d=i(r,d);!y.done;m++,y=l.next())null!==(y=v(d,r,m,y.value,s))&&(e&&null!==y.alternate&&d.delete(null===y.key?m:y.key),o=u(y,o,m),null===f?c=y:f.sibling=y,f=y);return e&&d.forEach((function(e){return t(r,e)})),ao&&eo(r,m),c}return function e(i,a,u,s){if("object"===r(u)&&null!==u&&u.type===E&&null===u.key&&(u=u.props.children),"object"===r(u)&&null!==u){switch(u.$$typeof){case x:e:{for(var c=u.key,f=a;null!==f;){if(f.key===c){if((c=u.type)===E){if(7===f.tag){n(i,f.sibling),(a=o(f,u.props.children)).return=i,i=a;break e}}else if(f.elementType===c||"object"===r(c)&&null!==c&&c.$$typeof===P&&Qo(c)===f.type){n(i,f.sibling),(a=o(f,u.props)).ref=qo(i,f,u),a.return=i,i=a;break e}n(i,f);break}t(i,f),f=f.sibling}u.type===E?((a=Ns(u.props.children,i.mode,s,u.key)).return=i,i=a):((s=Ls(u.type,u.key,u.props,null,i.mode,s)).ref=qo(i,a,u),s.return=i,i=s)}return l(i);case S:e:{for(f=u.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===u.containerInfo&&a.stateNode.implementation===u.implementation){n(i,a.sibling),(a=o(a,u.children||[])).return=i,i=a;break e}n(i,a);break}t(i,a),a=a.sibling}(a=Fs(u,i.mode,s)).return=i,i=a}return l(i);case P:return e(i,a,(f=u._init)(u._payload),s)}if(re(u))return m(i,a,u,s);if(N(u))return g(i,a,u,s);Ko(i,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==a&&6===a.tag?(n(i,a.sibling),(a=o(a,u)).return=i,i=a):(n(i,a),(a=Bs(u,i.mode,s)).return=i,i=a),l(i)):n(i,a)}}var Jo=Xo(!0),ea=Xo(!1),ta={},na=Ci(ta),ra=Ci(ta),ia=Ci(ta);function oa(e){if(e===ta)throw Error(a(174));return e}function aa(e,t){switch(Oi(ia,t),Oi(ra,e),Oi(na,ta),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ai(na),Oi(na,t)}function ua(){Ai(na),Ai(ra),Ai(ia)}function la(e){oa(ia.current);var t=oa(na.current),n=ce(t,e.type);t!==n&&(Oi(ra,e),Oi(na,n))}function sa(e){ra.current===e&&(Ai(na),Ai(ra))}var ca=Ci(0);function fa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var da=[];function ha(){for(var e=0;en?n:4,e(!0);var r=va.transition;va.transition={};try{e(!1),t()}finally{wt=n,va.transition=r}}function nu(){return Ta().memoizedState}function ru(e,t,n){var r=rs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ou(e))au(t,n);else if(null!==(n=Io(e,t,n,r))){is(n,e,r,ns()),uu(n,t,r)}}function iu(e,t,n){var r=rs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ou(e))au(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,sr(u,a)){var l=t.interleaved;return null===l?(i.next=i,zo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Io(e,t,i,r))&&(is(n,e,r,i=ns()),uu(n,t,r))}}function ou(e){var t=e.alternate;return e===ga||null!==t&&t===ga}function au(e,t){wa=_a=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uu(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,_t(e,n)}}var lu={readContext:Oo,useCallback:Sa,useContext:Sa,useEffect:Sa,useImperativeHandle:Sa,useInsertionEffect:Sa,useLayoutEffect:Sa,useMemo:Sa,useReducer:Sa,useRef:Sa,useState:Sa,useDebugValue:Sa,useDeferredValue:Sa,useTransition:Sa,useMutableSource:Sa,useSyncExternalStore:Sa,useId:Sa,unstable_isNewReconciler:!1},su={readContext:Oo,useCallback:function(e,t){return Oa().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Ha,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,$a(4194308,4,qa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $a(4194308,4,e,t)},useInsertionEffect:function(e,t){return $a(4,2,e,t)},useMemo:function(e,t){var n=Oa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Oa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ru.bind(null,ga,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Oa().memoizedState=e},useState:Fa,useDebugValue:Qa,useDeferredValue:function(e){return Oa().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=tu.bind(null,e[1]),Oa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ga,i=Oa();if(ao){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Il)throw Error(a(349));0!=(30&ma)||Ma(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ha(Na.bind(null,r,o,e),[e]),r.flags|=2048,Ua(9,La.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Oa(),t=Il.identifierPrefix;if(ao){var n=Ji;t=":"+t+"R"+(n=(Xi&~(1<<32-lt(Xi)-1)).toString(32)+n),0<(n=ka++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cu={readContext:Oo,useCallback:Xa,useContext:Oo,useEffect:Za,useImperativeHandle:Ka,useInsertionEffect:Ya,useLayoutEffect:Ga,useMemo:Ja,useReducer:Ia,useRef:Wa,useState:function(){return Ia(za)},useDebugValue:Qa,useDeferredValue:function(e){return eu(Ta(),ya.memoizedState,e)},useTransition:function(){return[Ia(za)[0],Ta().memoizedState]},useMutableSource:ja,useSyncExternalStore:Pa,useId:nu,unstable_isNewReconciler:!1},fu={readContext:Oo,useCallback:Xa,useContext:Oo,useEffect:Za,useImperativeHandle:Ka,useInsertionEffect:Ya,useLayoutEffect:Ga,useMemo:Ja,useReducer:Ra,useRef:Wa,useState:function(){return Ra(za)},useDebugValue:Qa,useDeferredValue:function(e){var t=Ta();return null===ya?t.memoizedState=e:eu(t,ya.memoizedState,e)},useTransition:function(){return[Ra(za)[0],Ta().memoizedState]},useMutableSource:ja,useSyncExternalStore:Pa,useId:nu,unstable_isNewReconciler:!1};function du(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function hu(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function pu(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var vu="function"==typeof WeakMap?WeakMap:Map;function mu(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zl||(Zl=!0,Yl=r),pu(0,t)},n}function gu(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pu(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){pu(0,t),"function"!=typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function yu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new vu;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=As.bind(null,e,t,n),t.then(e,e))}function bu(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function _u(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,No(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var wu=k.ReactCurrentOwner,ku=!1;function xu(e,t,n,r){t.child=null===e?ea(t,null,n,r):Jo(t,e.child,n,r)}function Su(e,t,n,r,i){n=n.render;var o=t.ref;return Ao(t,i),r=Ca(e,t,n,r,o,i),n=Aa(),null===e||ku?(ao&&n&&no(t),t.flags|=1,xu(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zu(e,t,i))}function Eu(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ps(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ls(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Cu(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(a,r)&&e.ref===t.ref)return Zu(e,t,i)}return t.flags|=1,(e=Ms(o,r)).ref=t.ref,e.return=t,t.child=e}function Cu(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(cr(o,r)&&e.ref===t.ref){if(ku=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Zu(e,t,i);0!=(131072&e.flags)&&(ku=!0)}}return Tu(e,t,n,r,i)}function Au(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(Ml,Pl),Pl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(Ml,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Oi(Ml,Pl),Pl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Oi(Ml,Pl),Pl|=r;return xu(e,t,i,n),t.child}function Ou(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tu(e,t,n,r,i){var o=Pi(n)?Ri:zi.current;return o=ji(t,o),Ao(t,i),n=Ca(e,t,n,r,o,i),r=Aa(),null===e||ku?(ao&&r&&no(t),t.flags|=1,xu(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zu(e,t,i))}function zu(e,t,n,i,o){if(Pi(n)){var a=!0;Di(t)}else a=!1;if(Ao(t,o),null===t.stateNode)Hu(e,t),Zo(t,n,i),Go(t,n,i,o),i=!0;else if(null===e){var u=t.stateNode,l=t.memoizedProps;u.props=l;var s=u.context,c=n.contextType;"object"===r(c)&&null!==c?c=Oo(c):c=ji(t,c=Pi(n)?Ri:zi.current);var f=n.getDerivedStateFromProps,d="function"==typeof f||"function"==typeof u.getSnapshotBeforeUpdate;d||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(l!==i||s!==c)&&Yo(t,u,i,c),jo=!1;var h=t.memoizedState;u.state=h,Fo(t,i,u,o),s=t.memoizedState,l!==i||h!==s||Ii.current||jo?("function"==typeof f&&($o(t,n,f,i),s=t.memoizedState),(l=jo||Ho(t,n,l,i,h,s,c))?(d||"function"!=typeof u.UNSAFE_componentWillMount&&"function"!=typeof u.componentWillMount||("function"==typeof u.componentWillMount&&u.componentWillMount(),"function"==typeof u.UNSAFE_componentWillMount&&u.UNSAFE_componentWillMount()),"function"==typeof u.componentDidMount&&(t.flags|=4194308)):("function"==typeof u.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=s),u.props=i,u.state=s,u.context=c,i=l):("function"==typeof u.componentDidMount&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,Mo(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:bo(t.type,l),u.props=c,d=t.pendingProps,h=u.context,s=n.contextType,"object"===r(s)&&null!==s?s=Oo(s):s=ji(t,s=Pi(n)?Ri:zi.current);var p=n.getDerivedStateFromProps;(f="function"==typeof p||"function"==typeof u.getSnapshotBeforeUpdate)||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(l!==d||h!==s)&&Yo(t,u,i,s),jo=!1,h=t.memoizedState,u.state=h,Fo(t,i,u,o);var v=t.memoizedState;l!==d||h!==v||Ii.current||jo?("function"==typeof p&&($o(t,n,p,i),v=t.memoizedState),(c=jo||Ho(t,n,c,i,h,v,s)||!1)?(f||"function"!=typeof u.UNSAFE_componentWillUpdate&&"function"!=typeof u.componentWillUpdate||("function"==typeof u.componentWillUpdate&&u.componentWillUpdate(i,v,s),"function"==typeof u.UNSAFE_componentWillUpdate&&u.UNSAFE_componentWillUpdate(i,v,s)),"function"==typeof u.componentDidUpdate&&(t.flags|=4),"function"==typeof u.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof u.componentDidUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=v),u.props=i,u.state=v,u.context=s,i=c):("function"!=typeof u.componentDidUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Iu(e,t,n,i,a,o)}function Iu(e,t,n,r,i,o){Ou(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&Bi(t,n,!1),Zu(e,t,o);r=t.stateNode,wu.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Jo(t,e.child,null,o),t.child=Jo(t,null,u,o)):xu(e,t,u,o),t.memoizedState=r.state,i&&Bi(t,n,!0),t.child}function Ru(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),aa(e,t.containerInfo)}function ju(e,t,n,r,i){return mo(),go(i),t.flags|=256,xu(e,t,n,r),t.child}var Pu,Mu,Lu,Nu={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bu(e,t,n){var r,i=t.pendingProps,o=ca.current,u=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(u=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Oi(ca,1&o),null===e)return fo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,u?(i=t.mode,u=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==u?(u.childLanes=0,u.pendingProps=l):u=Ds(l,i,0,null),e=Ns(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Du(n),t.memoizedState=Nu,e):Fu(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,u){if(n)return 256&t.flags?(t.flags&=-257,Uu(e,t,u,r=hu(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ds({mode:"visible",children:r.children},i,0,null),(o=Ns(o,i,u,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&Jo(t,e.child,null,u),t.child.memoizedState=Du(u),t.memoizedState=Nu,o);if(0==(1&t.mode))return Uu(e,t,u,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Uu(e,t,u,r=hu(o=Error(a(419)),r,void 0))}if(l=0!=(u&e.childLanes),ku||l){if(null!==(r=Il)){switch(u&-u){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|u))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ro(e,i),is(r,e,i,-1))}return gs(),Uu(e,t,u,r=hu(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ts.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,oo=fi(i.nextSibling),io=t,ao=!0,uo=null,null!==e&&(qi[Ki++]=Xi,qi[Ki++]=Ji,qi[Ki++]=Qi,Xi=e.id,Ji=e.overflow,Qi=t),t=Fu(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,o,n);if(u){u=i.fallback,l=t.mode,r=(o=e.child).sibling;var s={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=s,t.deletions=null):(i=Ms(o,s)).subtreeFlags=14680064&o.subtreeFlags,null!==r?u=Ms(r,u):(u=Ns(u,l,n,null)).flags|=2,u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,l=null===(l=e.child.memoizedState)?Du(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},u.memoizedState=l,u.childLanes=e.childLanes&~n,t.memoizedState=Nu,i}return e=(u=e.child).sibling,i=Ms(u,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fu(e,t){return(t=Ds({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Uu(e,t,n,r){return null!==r&&go(r),Jo(t,e.child,null,n),(e=Fu(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Wu(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Co(e.return,t,n)}function $u(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Vu(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xu(e,t,r.children,n),0!=(2&(r=ca.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wu(e,n,t);else if(19===e.tag)Wu(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(ca,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===fa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$u(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===fa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$u(t,!0,n,null,o);break;case"together":$u(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hu(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ms(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ms(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Yu(e,t){if(!ao)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qu(e,t,n){var r=t.pendingProps;switch(ro(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gu(t),null;case 1:case 17:return Pi(t.type)&&Mi(),Gu(t),null;case 3:return r=t.stateNode,ua(),Ai(Ii),Ai(zi),ha(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==uo&&(ls(uo),uo=null))),Gu(t),null;case 5:sa(t);var i=oa(ia.current);if(n=t.type,null!==e&&null!=t.stateNode)Mu(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Gu(t),null}if(e=oa(na.current),po(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[pi]=t,r[vi]=o,e=0!=(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[pi]=t,e[vi]=r,Pu(e,t),t.stateNode=e;e:{switch(u=we(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;iVl&&(t.flags|=128,r=!0,Yu(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=fa(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Yu(o,!0),null===o.tail&&"hidden"===o.tailMode&&!u.alternate&&!ao)return Gu(t),null}else 2*Je()-o.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Yu(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=o.last)?n.sibling=u:t.child=u,o.last=u)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Je(),t.sibling=null,n=ca.current,Oi(ca,r?1&n|2:1&n),t):(Gu(t),null);case 22:case 23:return hs(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Pl)&&(Gu(t),6&t.subtreeFlags&&(t.flags|=8192)):Gu(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ku(e,t){switch(ro(t),t.tag){case 1:return Pi(t.type)&&Mi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ua(),Ai(Ii),Ai(zi),ha(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(Ai(ca),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ai(ca),null;case 4:return ua(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return hs(),null;default:return null}}Pu=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Mu=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,oa(na.current);var o,a=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),a=[];break;case"select":i=B({},i,{value:void 0}),r=B({},r,{value:void 0}),a=[];break;case"textarea":i=oe(e,i),r=oe(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=ti)}for(c in _e(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var u=i[c];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var s=r[c];if(u=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(null!=s||null!=u))if("style"===c)if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(a||(a=[]),a.push(c,n)),n=s;else"dangerouslySetInnerHTML"===c?(s=s?s.__html:void 0,u=u?u.__html:void 0,null!=s&&u!==s&&(a=a||[]).push(c,s)):"children"===c?"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(c,""+s):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=s&&"onScroll"===c&&Ur("scroll",e),a||u===s||(a=[])):(a=a||[]).push(c,s))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Lu=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qu=!1,Xu=!1,Ju="function"==typeof WeakSet?WeakSet:Set,el=null;function tl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Cs(e,t,n)}else n.current=null}function nl(e,t,n){try{n()}catch(n){Cs(e,t,n)}}var rl=!1;function il(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&nl(t,n,o)}i=i.next}while(i!==r)}}function ol(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ul(e){var t=e.alternate;null!==t&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pi],delete t[vi],delete t[gi],delete t[yi],delete t[bi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ll(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ll(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ti));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function fl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(fl(e,t,n),e=e.sibling;null!==e;)fl(e,t,n),e=e.sibling}var dl=null,hl=!1;function pl(e,t,n){for(n=n.child;null!==n;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(ut&&"function"==typeof ut.onCommitFiberUnmount)try{ut.onCommitFiberUnmount(at,n)}catch(e){}switch(n.tag){case 5:Xu||tl(n,t);case 6:var r=dl,i=hl;dl=null,pl(e,t,n),hl=i,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?ci(e.parentNode,n):1===e.nodeType&&ci(e,n),Vt(e)):ci(dl,n.stateNode));break;case 4:r=dl,i=hl,dl=n.stateNode.containerInfo,hl=!0,pl(e,t,n),dl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Xu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&nl(n,t,a),i=i.next}while(i!==r)}pl(e,t,n);break;case 1:if(!Xu&&(tl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Cs(n,t,e)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Xu=(r=Xu)||null!==n.memoizedState,pl(e,t,n),Xu=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ju),t.forEach((function(t){var r=zs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=u),r&=~o}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=oi(xs.bind(null,e,Wl,Hl),r);break}xs(e,Wl,Hl);break;default:throw Error(a(329))}}}return os(e,Je()),e.callbackNode===n?as.bind(null,e):null}function us(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(ps(e,t).flags|=256),2!==(e=ys(e,t))&&(t=Wl,Wl=n,null!==t&&ls(t)),e}function ls(e){null===Wl?Wl=e:Wl.push.apply(Wl,e)}function ss(e,t){for(t&=~Fl,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,Ql=0,0!=(6&zl))throw Error(a(331));var i=zl;for(zl|=4,el=e.current;null!==el;){var o=el,u=o.child;if(0!=(16&el.flags)){var l=o.deletions;if(null!==l){for(var s=0;sJe()-$l?ps(e,0):Fl|=n),os(e,t)}function Os(e,t){0===t&&(0==(1&e.mode)?t=1:(t=dt,0==(130023424&(dt<<=1))&&(dt=4194304)));var n=ns();null!==(e=Ro(e,t))&&(bt(e,t,n),os(e,n))}function Ts(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Os(e,n)}function zs(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Os(e,n)}function Is(e,t){return qe(e,t)}function Rs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function js(e,t,n,r){return new Rs(e,t,n,r)}function Ps(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ms(e,t){var n=e.alternate;return null===n?((n=js(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ls(e,t,n,i,o,u){var l=2;if(i=e,"function"==typeof e)Ps(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case E:return Ns(n.children,o,u,t);case C:l=8,o|=8;break;case A:return(e=js(12,n,t,2|o)).elementType=A,e.lanes=u,e;case I:return(e=js(13,n,t,o)).elementType=I,e.lanes=u,e;case R:return(e=js(19,n,t,o)).elementType=R,e.lanes=u,e;case M:return Ds(n,o,u,t);default:if("object"===r(e)&&null!==e)switch(e.$$typeof){case O:l=10;break e;case T:l=9;break e;case z:l=11;break e;case j:l=14;break e;case P:l=16,i=null;break e}throw Error(a(130,null==e?e:r(e),""))}return(t=js(l,n,t,o)).elementType=e,t.type=i,t.lanes=u,t}function Ns(e,t,n,r){return(e=js(7,e,r,t)).lanes=n,e}function Ds(e,t,n,r){return(e=js(22,e,r,t)).elementType=M,e.lanes=n,e.stateNode={isHidden:!1},e}function Bs(e,t,n){return(e=js(6,e,null,t)).lanes=n,e}function Fs(e,t,n){return(t=js(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Us(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yt(0),this.expirationTimes=yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ws(e,t,n,r,i,o,a,u,l){return e=new Us(e,t,n,u,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=js(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Po(o),e}function $s(e,t,n){var r=3>>1,i=e[r];if(!(0>>1;ru(l,n))su(c,l)?(e[r]=c,e[s]=n,r=s):(e[r]=l,e[a]=n,r=a);else{if(!(su(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===("undefined"==typeof performance?"undefined":r(performance))&&"function"==typeof performance.now){var l=performance;t.unstable_now=function(){return l.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var f=[],d=[],h=1,p=null,v=3,m=!1,g=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=o(d);null!==t;){if(null===t.callback)a(d);else{if(!(t.startTime<=e))break;a(d),t.sortIndex=t.expirationTime,i(f,t)}t=o(d)}}function x(e){if(y=!1,k(e),!g)if(null!==o(f))g=!0,M(S);else{var t=o(d);null!==t&&L(x,t.startTime-e)}}function S(e,n){g=!1,y&&(y=!1,_(O),O=-1),m=!0;var r=v;try{for(k(n),p=o(f);null!==p&&(!(p.expirationTime>n)||e&&!I());){var i=p.callback;if("function"==typeof i){p.callback=null,v=p.priorityLevel;var u=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?p.callback=u:p===o(f)&&a(f),k(n)}else a(f);p=o(f)}if(null!==p)var l=!0;else{var s=o(d);null!==s&&L(x,s.startTime-n),l=!1}return l}finally{p=null,v=r,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,C=!1,A=null,O=-1,T=5,z=-1;function I(){return!(t.unstable_now()-ze||125u?(e.sortIndex=a,i(d,e),null===o(f)&&e===o(d)&&(y?(_(O),O=-1):y=!0,L(x,a-u))):(e.sortIndex=l,i(f,e),g||m||(g=!0,M(S))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=v;return function(){var n=v;v=t;try{return e.apply(this,arguments)}finally{v=n}}}},475:function(e,t,n){"use strict";e.exports=n(157)},146:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),s=a.call(o,"finallyLoc");if(l&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:j(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},492:function(e,t,n){var r=n(415),i=n(189),o=n(27),a=n(528);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},909:function(e,t,n){var r=n(415),i=n(577),o=n(27),a=n(528);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},827:function(e,t,n){var r=n(366),i=n(577),o=n(27),a=n(564);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},178:function(e,t,n){var r=n(123).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},307:function(e,t,n){var r=n(123).default,i=n(178);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},123:function(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},27:function(e,t,n){var r=n(146);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var r={};return function(){"use strict";n.r(r),n.d(r,{ALGORITHM_VERSION:function(){return Nm},add:function(){return E},addEventListenerWrapper:function(){return Uv},after:function(){return B},algorithmVersions:function(){return Dm},ary:function(){return mt},assign:function(){return un},assignIn:function(){return dn},assignInWith:function(){return hn},assignWith:function(){return pn},at:function(){return dr},attempt:function(){return wr},base64DecodeImageKey:function(){return Vv},base64toBlob:function(){return Kv},before:function(){return kr},bind:function(){return Sr},bindAll:function(){return Er},bindKey:function(){return Ar},camelCase:function(){return ji},capitalize:function(){return qr},castArray:function(){return Pi},ceil:function(){return Di},chain:function(){return Bi},chunk:function(){return Wi},clamp:function(){return Vi},clone:function(){return ra},cloneDeep:function(){return ia},cloneDeepWith:function(){return oa},cloneWith:function(){return aa},commit:function(){return ua},compact:function(){return la},concat:function(){return sa},cond:function(){return $a},conforms:function(){return Za},conformsTo:function(){return Ya},constant:function(){return Ue},countBy:function(){return iu},create:function(){return ou},curry:function(){return uu},curryRight:function(){return su},cutStr:function(){return um},dataURLToBlob:function(){return Jv},debounce:function(){return hu},deburr:function(){return ti},defaultTo:function(){return pu},defaults:function(){return gu},defaultsDeep:function(){return Cu},defer:function(){return Ou},delay:function(){return Tu},deviceIDToDeviceKey:function(){return Em},deviceKeyToDeviceId:function(){return Am},deviceToDeviceKey:function(){return Cm},difference:function(){return ju},differenceBy:function(){return Lu},differenceWith:function(){return Du},divide:function(){return Bu},downloadPackageImages:function(){return Qv},drop:function(){return Fu},dropRight:function(){return Uu},dropRightWhile:function(){return $u},dropWhile:function(){return Vu},each:function(){return Zu},eachRight:function(){return Qu},endsWith:function(){return Xu},entries:function(){return nl},entriesIn:function(){return rl},eq:function(){return yt},escape:function(){return ul},escapeRegExp:function(){return cl},every:function(){return hl},extend:function(){return dn},extendWith:function(){return hn},fileToBase64:function(){return Zv},fill:function(){return ml},filter:function(){return yl},find:function(){return kl},findCamerasByInDeviceTree:function(){return Tm},findIndex:function(){return wl},findKey:function(){return Sl},findLast:function(){return Ol},findLastIndex:function(){return Al},findLastKey:function(){return Tl},first:function(){return zl},fixedLngLat:function(){return rm},flatMap:function(){return jl},flatMapDeep:function(){return Pl},flatMapDepth:function(){return Ml},flatten:function(){return cr},flattenDeep:function(){return Ll},flattenDepth:function(){return Nl},flip:function(){return Dl},floor:function(){return Bl},flow:function(){return Ul},flowRight:function(){return Wl},forEach:function(){return Zu},forEachRight:function(){return Qu},forIn:function(){return $l},forInRight:function(){return Vl},forOwn:function(){return Hl},forOwnRight:function(){return Zl},formatDurationTime:function(){return pm},formateDuration:function(){return dm},fromPairs:function(){return Yl},functions:function(){return ql},functionsIn:function(){return Kl},generateImg:function(){return em},generateTime:function(){return hm},get:function(){return ir},getBase64ByImage:function(){return Gv},getBase64ByUrl:function(){return Hv},getBase64Image:function(){return Yv},getBikeExtendRect:function(){return Bm},getChromeVersion:function(){return Dv},getDeviceType:function(){return Sm},getExtendRect:function(){return Wm},getFileByRect:function(){return nm},getFileSize:function(){return Xv},getFileSuffix:function(){return Lv},getImageKey:function(){return tm},getImageSuffixByFileType:function(){return Nv},getNormalization:function(){return Um},getOdRect:function(){return Hm},getOdRectV2:function(){return Zm},getOtherExtendRect:function(){return Fm},getRotateImg:function(){return Vm},getStrLength:function(){return am},getTransformRect:function(){return $m},getTransforms:function(){return Wv},getVmsIdByDeviceId:function(){return Om},groupBy:function(){return Jl},gt:function(){return ns},gte:function(){return rs},has:function(){return as},hasIn:function(){return Na},head:function(){return zl},identity:function(){return F},inRange:function(){return cs},includes:function(){return vs},indexOf:function(){return gs},initial:function(){return ys},intersection:function(){return ks},intersectionBy:function(){return Ss},intersectionWith:function(){return Es},invert:function(){return zs},invertBy:function(){return Ms},invoke:function(){return Ds},invokeMap:function(){return Fs},isArguments:function(){return Nt},isArray:function(){return _},isArrayBuffer:function(){return $s},isArrayLike:function(){return Ct},isArrayLikeObject:function(){return bu},isBoolean:function(){return Vs},isBuffer:function(){return Wt},isChrome:function(){return Pv},isDate:function(){return Ys},isElement:function(){return Gs},isEmpty:function(){return Ks},isEqual:function(){return Qs},isEqualWith:function(){return Xs},isError:function(){return _r},isFaceCamera:function(){return xm},isFinite:function(){return ec},isFunction:function(){return W},isInteger:function(){return tc},isLength:function(){return Et},isMap:function(){return Go},isMatch:function(){return nc},isMatchWith:function(){return rc},isNaN:function(){return oc},isNative:function(){return uc},isNil:function(){return lc},isNull:function(){return sc},isNumber:function(){return ic},isObject:function(){return z},isObjectLike:function(){return m},isPlainObject:function(){return br},isRegExp:function(){return dc},isSafeInteger:function(){return pc},isSet:function(){return Qo},isString:function(){return fs},isSymbol:function(){return g},isTypedArray:function(){return Qt},isUndefined:function(){return vc},isWeakMap:function(){return mc},isWeakSet:function(){return gc},iteratee:function(){return yc},join:function(){return _c},kebabCase:function(){return kc},keyBy:function(){return Sc},keys:function(){return on},keysIn:function(){return fn},last:function(){return Pu},lastIndexOf:function(){return Oc},lodash:function(){return Ie},loop:function(){return Fv},lowerCase:function(){return zc},lowerFirst:function(){return Ic},lt:function(){return jc},lte:function(){return Pc},map:function(){return Rl},mapKeys:function(){return Mc},mapValues:function(){return Lc},matchS3Prefix:function(){return Mv},matches:function(){return Nc},matchesProperty:function(){return Dc},max:function(){return Fc},maxBy:function(){return Uc},mean:function(){return Vc},meanBy:function(){return Hc},memoize:function(){return Gn},merge:function(){return Zc},mergeWith:function(){return Eu},method:function(){return Yc},methodOf:function(){return Gc},min:function(){return qc},minBy:function(){return Kc},mixin:function(){return Qc},multiply:function(){return Xc},negate:function(){return Jc},next:function(){return rf},nextTick:function(){return Bv},noop:function(){return _e},now:function(){return cu},nth:function(){return af},nthArg:function(){return uf},omit:function(){return ff},omitBy:function(){return vf},once:function(){return mf},orderBy:function(){return wf},over:function(){return xf},overArgs:function(){return Cf},overEvery:function(){return Af},overSome:function(){return Of},pad:function(){return Kf},padEnd:function(){return Qf},padStart:function(){return Xf},parseInt:function(){return td},partial:function(){return rd},partialRight:function(){return od},partition:function(){return ud},pick:function(){return sd},pickBy:function(){return pf},plant:function(){return cd},property:function(){return Ua},propertyOf:function(){return fd},pull:function(){return md},pullAll:function(){return vd},pullAllBy:function(){return gd},pullAllWith:function(){return yd},pullAt:function(){return kd},random:function(){return Td},range:function(){return Pd},rangeRight:function(){return Md},rearg:function(){return Ld},reduce:function(){return Dd},reduceRight:function(){return Fd},reject:function(){return Ud},remove:function(){return Wd},repeat:function(){return $d},replace:function(){return Vd},rest:function(){return Hd},result:function(){return Zd},reverse:function(){return Gd},round:function(){return qd},sample:function(){return Xd},sampleSize:function(){return nh},set:function(){return rh},setNumberAccuracy:function(){return lm},setWith:function(){return ih},shuffle:function(){return uh},size:function(){return lh},slice:function(){return sh},snakeCase:function(){return fh},some:function(){return hh},sortBy:function(){return ph},sortedIndex:function(){return bh},sortedIndexBy:function(){return _h},sortedIndexOf:function(){return wh},sortedLastIndex:function(){return kh},sortedLastIndexBy:function(){return xh},sortedLastIndexOf:function(){return Sh},sortedUniq:function(){return Ch},sortedUniqBy:function(){return Ah},speedConvert:function(){return om},split:function(){return Oh},spread:function(){return zh},startCase:function(){return Rh},startsWith:function(){return jh},stubArray:function(){return ao},stubFalse:function(){return Dt},stubObject:function(){return Ph},stubString:function(){return Mh},stubTrue:function(){return Lh},subtract:function(){return Nh},sum:function(){return Dh},sumBy:function(){return Bh},tail:function(){return Fh},take:function(){return Uh},takeRight:function(){return Wh},takeRightWhile:function(){return $h},takeWhile:function(){return Vh},tap:function(){return Hh},template:function(){return up},templateSettings:function(){return Xh},throttle:function(){return lp},thru:function(){return sp},times:function(){return dp},toArray:function(){return nf},toFinite:function(){return N},toInteger:function(){return D},toIterator:function(){return hp},toJSON:function(){return vp},toLength:function(){return pl},toLower:function(){return mp},toNumber:function(){return M},toPairs:function(){return nl},toPairsIn:function(){return rl},toPath:function(){return gp},toPlainObject:function(){return wu},toRealNumber:function(){return sm},toSafeInteger:function(){return bp},toString:function(){return er},toUpper:function(){return _p},transform:function(){return wp},transformLngLat:function(){return im},trim:function(){return Sp},trimEnd:function(){return Ep},trimStart:function(){return Ap},truncate:function(){return Tp},unary:function(){return zp},unescape:function(){return Pp},union:function(){return Dp},unionBy:function(){return Fp},unionWith:function(){return Up},uniq:function(){return Wp},uniqBy:function(){return $p},uniqWith:function(){return Vp},uniqueId:function(){return Zp},unset:function(){return Yp},unzip:function(){return qp},unzipWith:function(){return Kp},update:function(){return Xp},updateWith:function(){return Jp},upperCase:function(){return tv},upperFirst:function(){return Gr},urlToBase64V2:function(){return qv},urlToImg:function(){return $v},value:function(){return vp},valueOf:function(){return vp},values:function(){return hs},valuesIn:function(){return nv},without:function(){return iv},words:function(){return Ti},wrap:function(){return ov},wrapperAt:function(){return av},wrapperChain:function(){return uv},wrapperCommit:function(){return ua},wrapperLodash:function(){return Ie},wrapperNext:function(){return rf},wrapperPlant:function(){return cd},wrapperReverse:function(){return lv},wrapperToIterator:function(){return hp},wrapperValue:function(){return vp},xor:function(){return cv},xorBy:function(){return dv},xorWith:function(){return hv},zip:function(){return pv},zipObject:function(){return mv},zipObjectDeep:function(){return gv},zipWith:function(){return bv}});var e=n(123),t="object"==("undefined"==typeof global?"undefined":e(global))&&global&&global.Object===Object&&global,i="object"==("undefined"==typeof self?"undefined":e(self))&&self&&self.Object===Object&&self,o=t||i||Function("return this")(),a=o.Symbol,u=Object.prototype,l=u.hasOwnProperty,s=u.toString,c=a?a.toStringTag:void 0;var f=function(e){var t=l.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[c]=n:delete e[c]),i},d=Object.prototype.toString;var h=function(e){return d.call(e)},p=a?a.toStringTag:void 0;var v=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":p&&p in Object(e)?f(e):h(e)};var m=function(t){return null!=t&&"object"==e(t)};var g=function(t){return"symbol"==e(t)||m(t)&&"[object Symbol]"==v(t)};var y=function(e){return"number"==typeof e?e:g(e)?NaN:+e};var b=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Me=Pe(oe),Le=/\{\n\/\* \[wrapped with (.+)\] \*/,Ne=/,? & /;var De=function(e){var t=e.match(Le);return t?t[1].split(Ne):[]},Be=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var Fe=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Be,"{\n/* [wrapped with "+t+"] */\n")};var Ue=function(e){return function(){return e}},We=function(){try{var e=ne(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$e=Pe(We?function(e,t){return We(e,"toString",{configurable:!0,enumerable:!1,value:Ue(t),writable:!0})}:F);var Ve=function(e,t){for(var n=-1,r=null==e?0:e.length;++n-1},Ke=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var Qe=function(e,t){return Ve(Ke,(function(n){var r="_."+n[0];t&n[1]&&!qe(e,r)&&e.push(r)})),e.sort()};var Xe=function(e,t,n){var r=t+"";return $e(e,Fe(r,Qe(De(r),n)))};var Je=function(e,t,n,r,i,o,a,u,l,s){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var f=[e,t,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,u,l,s],d=n.apply(void 0,f);return Re(e)&&Me(d,f),d.placeholder=r,Xe(d,e,t)};var et=function(e){return e.placeholder},tt=/^(?:0|[1-9]\d*)$/;var nt=function(t,n){var r=e(t);return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&tt.test(t))&&t>-1&&t%1==0&&t1&&_.reverse(),d&&c-1&&e%1==0&&e<=9007199254740991};var Ct=function(e){return null!=e&&Et(e.length)&&!W(e)};var At=function(t,n,r){if(!z(r))return!1;var i=e(n);return!!("number"==i?Ct(r)&&nt(n,r.length):"string"==i&&n in r)&&yt(r[n],t)};var Ot=function(e){return St((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&At(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1};var Pn=function(e,t){var n=this.__data__,r=Tn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&r(l)?n>1?e(l,n-1,r,i,o):ar(o,l):i||(o[o.length]=l)}return o};var cr=function(e){return(null==e?0:e.length)?sr(e,1):[]};var fr=function(e){return $e(xt(e,void 0,cr),e+"")},dr=fr(or),hr=en(Object.getPrototypeOf,Object),pr=Function.prototype,vr=Object.prototype,mr=pr.toString,gr=vr.hasOwnProperty,yr=mr.call(Object);var br=function(e){if(!m(e)||"[object Object]"!=v(e))return!1;var t=hr(e);if(null===t)return!0;var n=gr.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&mr.call(n)==yr};var _r=function(e){if(!m(e))return!1;var t=v(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!br(e)},wr=St((function(e,t){try{return fe(e,void 0,t)}catch(e){return _r(e)?e:new Error(e)}}));var kr=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=D(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}},xr=St((function(e,t,n){var r=1;if(n.length){var i=at(n,et(xr));r|=32}return vt(e,r,t,n,i)}));xr.placeholder={};var Sr=xr,Er=fr((function(e,t){return Ve(t,(function(t){t=nr(t),gt(e,t,Sr(e[t],e))})),e})),Cr=St((function(e,t,n){var r=3;if(n.length){var i=at(n,et(Cr));r|=32}return vt(t,r,e,n,i)}));Cr.placeholder={};var Ar=Cr;var Or=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Or(e,t,n)},zr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Ir=function(e){return zr.test(e)};var Rr=function(e){return e.split("")},jr="\\ud800-\\udfff",Pr="["+jr+"]",Mr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Lr="\\ud83c[\\udffb-\\udfff]",Nr="[^"+jr+"]",Dr="(?:\\ud83c[\\udde6-\\uddff]){2}",Br="[\\ud800-\\udbff][\\udc00-\\udfff]",Fr="(?:"+Mr+"|"+Lr+")"+"?",Ur="[\\ufe0e\\ufe0f]?",Wr=Ur+Fr+("(?:\\u200d(?:"+[Nr,Dr,Br].join("|")+")"+Ur+Fr+")*"),$r="(?:"+[Nr+Mr+"?",Mr,Dr,Br,Pr].join("|")+")",Vr=RegExp(Lr+"(?="+Lr+")|"+$r+Wr,"g");var Hr=function(e){return e.match(Vr)||[]};var Zr=function(e){return Ir(e)?Hr(e):Rr(e)};var Yr=function(e){return function(t){t=er(t);var n=Ir(t)?Zr(t):void 0,r=n?n[0]:t.charAt(0),i=n?Tr(n,1).join(""):t.slice(1);return r[e]()+i}},Gr=Yr("toUpperCase");var qr=function(e){return Gr(er(e).toLowerCase())};var Kr=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i=t?e:t)),e};var Vi=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=M(n))==n?n:0),void 0!==t&&(t=(t=M(t))==t?t:0),$i(M(e),t,n)};var Hi=function(){this.__data__=new Ln,this.size=0};var Zi=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Yi=function(e){return this.__data__.get(e)};var Gi=function(e){return this.__data__.has(e)};var qi=function(e,t){var n=this.__data__;if(n instanceof Ln){var r=n.__data__;if(!Nn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zn(r)}return n.set(e,t),this.size=n.size,this};function Ki(e){var t=this.__data__=new Ln(e);this.size=t.size}Ki.prototype.clear=Hi,Ki.prototype.delete=Zi,Ki.prototype.get=Yi,Ki.prototype.has=Gi,Ki.prototype.set=qi;var Qi=Ki;var Xi=function(e,t){return e&&wt(t,on(t),e)};var Ji=function(e,t){return e&&wt(t,fn(t),e)},eo="object"==("undefined"==typeof exports?"undefined":e(exports))&&exports&&!exports.nodeType&&exports,to=eo&&"object"==("undefined"==typeof module?"undefined":e(module))&&module&&!module.nodeType&&module,no=to&&to.exports===eo?o.Buffer:void 0,ro=no?no.allocUnsafe:void 0;var io=function(e,t){if(t)return e.slice();var n=e.length,r=ro?ro(n):new e.constructor(n);return e.copy(r),r};var oo=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++nu))return!1;var s=o.get(e),c=o.get(t);if(s&&c)return s==t&&c==e;var f=-1,d=!0,h=2&n?new ha:void 0;for(o.set(e,t),o.set(t,e);++f=t||n<0||f&&e-s>=o}function m(){var e=cu();if(v(e))return g(e);u=setTimeout(m,function(e){var n=t-(e-l);return f?du(n,o-(e-s)):n}(e))}function g(e){return u=void 0,d&&r?h(e):(r=i=void 0,a)}function y(){var e=cu(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return p(l);if(f)return clearTimeout(u),u=setTimeout(m,t),h(l)}return void 0===u&&(u=setTimeout(m,t)),a}return t=M(t)||0,z(n)&&(c=!!n.leading,o=(f="maxWait"in n)?fu(M(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=l=i=u=void 0},y.flush=function(){return void 0===u?a:g(cu())},y};var pu=function(e,t){return null==e||e!=e?t:e},vu=Object.prototype,mu=vu.hasOwnProperty,gu=St((function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&At(t[0],t[1],i)&&(r=1);++n=200&&(o=va,a=!1,t=new ha(t));e:for(;++i=0&&e.slice(n,i)==t};var Ju=function(e,t){return b(t,(function(t){return[t,e[t]]}))};var el=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n};var tl=function(e){return function(t){var n=Ro(t);return"[object Map]"==n?ga(t):"[object Set]"==n?el(t):Ju(t,e(t))}},nl=tl(on),rl=tl(fn),il=Qr({"&":"&","<":"<",">":">",'"':""","'":"'"}),ol=/[&<>"']/g,al=RegExp(ol.source);var ul=function(e){return(e=er(e))&&al.test(e)?e.replace(ol,il):e},ll=/[\\^$.*+?()[\]{}|]/g,sl=RegExp(ll.source);var cl=function(e){return(e=er(e))&&sl.test(e)?e.replace(ll,"\\$&"):e};var fl=function(e,t){for(var n=-1,r=null==e?0:e.length;++ni?0:i+n),(r=void 0===r||r>i?i:D(r))<0&&(r+=i),r=n>r?0:pl(r);n-1?i[o?t[a]:a]:void 0}},_l=Math.max;var wl=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:D(n);return i<0&&(i=_l(r+i,0)),He(e,Wa(t,3),i)},kl=bl(wl);var xl=function(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r};var Sl=function(e,t){return xl(e,Wa(t,3),Qa)},El=Math.max,Cl=Math.min;var Al=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=D(n),i=n<0?El(r+i,0):Cl(i,r-1)),He(e,Wa(t,3),i,!0)},Ol=bl(Al);var Tl=function(e,t){return xl(e,Wa(t,3),qu)};var zl=function(e){return e&&e.length?e[0]:void 0};var Il=function(e,t){var n=-1,r=Ct(e)?Array(e.length):[];return Ja(e,(function(e,i,o){r[++n]=t(e,i,o)})),r};var Rl=function(e,t){return(_(e)?b:Il)(e,Wa(t,3))};var jl=function(e,t){return sr(Rl(e,t),1)};var Pl=function(e,t){return sr(Rl(e,t),Infinity)};var Ml=function(e,t,n){return n=void 0===n?1:D(n),sr(Rl(e,t),n)};var Ll=function(e){return(null==e?0:e.length)?sr(e,Infinity):[]};var Nl=function(e,t){return(null==e?0:e.length)?(t=void 0===t?1:D(t),sr(e,t)):[]};var Dl=function(e){return vt(e,512)},Bl=Ni("floor");var Fl=function(e){return fr((function(t){var n=t.length,r=n,i=Ce.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new TypeError("Expected a function");if(i&&!a&&"wrapper"==Se(o))var a=new Ce([],!0)}for(r=a?r:n;++rt};var ts=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=M(t),n=M(n)),e(t,n)}},ns=ts(es),rs=ts((function(e,t){return e>=t})),is=Object.prototype.hasOwnProperty;var os=function(e,t){return null!=e&&is.call(e,t)};var as=function(e,t){return null!=e&&La(e,t,os)},us=Math.max,ls=Math.min;var ss=function(e,t,n){return e>=ls(t,n)&&e-1:!!i&&Ge(e,t,n)>-1},ms=Math.max;var gs=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:D(n);return i<0&&(i=ms(r+i,0)),Ge(e,t,i)};var ys=function(e){return(null==e?0:e.length)?Or(e,0,-1):[]},bs=Math.min;var _s=function(e,t,n){for(var r=n?zu:qe,i=e[0].length,o=e.length,a=o,u=Array(o),l=1/0,s=[];a--;){var c=e[a];a&&t&&(c=b(c,Ht(t))),l=bs(c.length,l),u[a]=!n&&(t||i>=120&&c.length>=120)?new ha(a&&c):void 0}c=e[0];var f=-1,d=u[0];e:for(;++f=-9007199254740991&&e<=hc};var vc=function(e){return void 0===e};var mc=function(e){return m(e)&&"[object WeakMap]"==Ro(e)};var gc=function(e){return m(e)&&"[object WeakSet]"==v(e)};var yc=function(e){return Wa("function"==typeof e?e:na(e,1))},bc=Array.prototype.join;var _c=function(e,t){return null==e?"":bc.call(e,t)},wc=Ii((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),kc=wc,xc=tu((function(e,t,n){gt(e,n,t)})),Sc=xc;var Ec=function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r},Cc=Math.max,Ac=Math.min;var Oc=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=D(n))<0?Cc(r+i,0):Ac(i,r-1)),t==t?Ec(e,t,i):He(e,Ze,i,!0)},Tc=Ii((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),zc=Tc,Ic=Yr("toLowerCase");var Rc=function(e,t){return e=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}};var of=function(e,t){var n=e.length;if(n)return nt(t+=t<0?n:0,n)?e[t]:void 0};var af=function(e,t){return e&&e.length?of(e,D(t)):void 0};var uf=function(e){return e=D(e),St((function(t){return of(t,e)}))};var lf=function(e,t){return t=tr(t,e),null==(e=Ls(e,t))||delete e[nr(Pu(t))]};var sf=function(e){return br(e)?void 0:e},cf=fr((function(e,t){var n={};if(null==e)return n;var r=!1;t=b(t,(function(t){return t=tr(t,e),r||(r=t.length>1),t})),wt(e,go(e),n),r&&(n=na(n,7,sf));for(var i=t.length;i--;)lf(n,t[i]);return n})),ff=cf;var df=function(e,t,n,r){if(!z(e))return e;for(var i=-1,o=(t=tr(t,e)).length,a=o-1,u=e;null!=u&&++it||o&&a&&l&&!u&&!s||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!s&&e=u?l:l*("desc"==n[r]?-1:1)}return e.index-t.index};var _f=function(e,t,n){t=t.length?b(t,(function(e){return _(e)?function(t){return rr(t,1===e.length?e[0]:e)}:e})):[F];var r=-1;t=b(t,Ht(Wa));var i=Il(e,(function(e,n,i){var o=b(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return gf(i,(function(e,t){return bf(e,t,n)}))};var wf=function(e,t,n,r){return null==e?[]:(_(t)||(t=null==t?[]:[t]),_(n=r?void 0:n)||(n=null==n?[]:[n]),_f(e,t,n))};var kf=function(e){return fr((function(t){return t=b(t,Ht(Wa)),St((function(n){var r=this;return e(t,(function(e){return fe(e,r,n)}))}))}))},xf=kf(b),Sf=St,Ef=Math.min,Cf=Sf((function(e,t){var n=(t=1==t.length&&_(t[0])?b(t[0],Ht(Wa)):b(sr(t,1),Ht(Wa))).length;return St((function(r){for(var i=-1,o=Ef(r.length,n);++i9007199254740991)return n;do{t%2&&(n+=e),(t=Tf(t/2))&&(e+=e)}while(t);return n},If=Ba("length"),Rf="\\ud800-\\udfff",jf="["+Rf+"]",Pf="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Mf="\\ud83c[\\udffb-\\udfff]",Lf="[^"+Rf+"]",Nf="(?:\\ud83c[\\udde6-\\uddff]){2}",Df="[\\ud800-\\udbff][\\udc00-\\udfff]",Bf="(?:"+Pf+"|"+Mf+")"+"?",Ff="[\\ufe0e\\ufe0f]?",Uf=Ff+Bf+("(?:\\u200d(?:"+[Lf,Nf,Df].join("|")+")"+Ff+Bf+")*"),Wf="(?:"+[Lf+Pf+"?",Pf,Nf,Df,jf].join("|")+")",$f=RegExp(Mf+"(?="+Mf+")|"+Wf+Uf,"g");var Vf=function(e){for(var t=$f.lastIndex=0;$f.test(e);)++t;return t};var Hf=function(e){return Ir(e)?Vf(e):If(e)},Zf=Math.ceil;var Yf=function(e,t){var n=(t=void 0===t?" ":x(t)).length;if(n<2)return n?zf(t,e):t;var r=zf(t,Zf(e/Hf(t)));return Ir(t)?Tr(Zr(r),0,e).join(""):r.slice(0,e)},Gf=Math.ceil,qf=Math.floor;var Kf=function(e,t,n){e=er(e);var r=(t=D(t))?Hf(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Yf(qf(i),n)+e+Yf(Gf(i),n)};var Qf=function(e,t,n){e=er(e);var r=(t=D(t))?Hf(e):0;return t&&r-1;)u!==e&&hd.call(u,l,1),hd.call(e,l,1);return e};var vd=function(e,t){return e&&e.length&&t&&t.length?pd(e,t):e},md=St(vd);var gd=function(e,t,n){return e&&e.length&&t&&t.length?pd(e,t,Wa(n,2)):e};var yd=function(e,t,n){return e&&e.length&&t&&t.length?pd(e,t,void 0,n):e},bd=Array.prototype.splice;var _d=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;nt(i)?bd.call(e,i,1):lf(e,i)}}return e},wd=fr((function(e,t){var n=null==e?0:e.length,r=or(e,t);return _d(e,b(t,(function(e){return nt(e,n)?+e:e})).sort(yf)),r})),kd=wd,xd=Math.floor,Sd=Math.random;var Ed=function(e,t){return e+xd(Sd()*(t-e+1))},Cd=parseFloat,Ad=Math.min,Od=Math.random;var Td=function(e,t,n){if(n&&"boolean"!=typeof n&&At(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=N(e),void 0===t?(t=e,e=0):t=N(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Od();return Ad(e+i*(t-e+Cd("1e-"+((i+"").length-1))),t)}return Ed(e,t)},zd=Math.ceil,Id=Math.max;var Rd=function(e,t,n,r){for(var i=-1,o=Id(zd((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a};var jd=function(e){return function(t,n,r){return r&&"number"!=typeof r&&At(t,n,r)&&(n=r=void 0),t=N(t),void 0===n?(n=t,t=0):n=N(n),r=void 0===r?t1&&At(e,t[0],t[1])?t=[]:n>2&&At(t[0],t[1],t[2])&&(t=[t[0]]),_f(e,sr(t,1),[])})),vh=Math.floor,mh=Math.min;var gh=function(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=g(t),s=void 0===t;i>>1,a=e[o];null!==a&&!g(a)&&(n?a<=t:a>>0)?(e=er(e))&&("string"==typeof t||null!=t&&!dc(t))&&!(t=x(t))&&Ir(e)?Tr(Zr(e),0,n):e.split(t,n):[]},Th=Math.max;var zh=function(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:Th(D(t),0),St((function(n){var r=n[t],i=Tr(n,0,t);return r&&ar(i,r),fe(e,this,i)}))},Ih=Ii((function(e,t,n){return e+(n?" ":"")+Gr(t)})),Rh=Ih;var jh=function(e,t,n){return e=er(e),n=null==n?0:$i(D(n),0,e.length),t=x(t),e.slice(n,n+t.length)==t};var Ph=function(){return{}};var Mh=function(){return""};var Lh=function(){return!0},Nh=S((function(e,t){return e-t}),0);var Dh=function(e){return e&&e.length?Wc(e,F):0};var Bh=function(e,t){return e&&e.length?Wc(e,Wa(t,2)):0};var Fh=function(e){var t=null==e?0:e.length;return t?Or(e,1,t):[]};var Uh=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:D(t),Or(e,0,t<0?0:t)):[]};var Wh=function(e,t,n){var r=null==e?0:e.length;return r?(t=n||void 0===t?1:D(t),Or(e,(t=r-t)<0?0:t,r)):[]};var $h=function(e,t){return e&&e.length?Wu(e,Wa(t,3),!1,!0):[]};var Vh=function(e,t){return e&&e.length?Wu(e,Wa(t,3)):[]};var Hh=function(e,t){return t(e),e},Zh=Object.prototype,Yh=Zh.hasOwnProperty;var Gh=function(e,t,n,r){return void 0===e||yt(e,Zh[n])&&!Yh.call(r,n)?t:e},qh={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var Kh=function(e){return"\\"+qh[e]},Qh=/<%=([\s\S]+?)%>/g,Xh={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Qh,variable:"",imports:{_:{escape:ul}}},Jh=/\b__p \+= '';/g,ep=/\b(__p \+=) '' \+/g,tp=/(__e\(.*?\)|\b__t\)) \+\n'';/g,np=/[()=,{}\[\]\/\s]/,rp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ip=/($^)/,op=/['\n\r\u2028\u2029\\]/g,ap=Object.prototype.hasOwnProperty;var up=function(e,t,n){var r=Xh.imports._.templateSettings||Xh;n&&At(e,t,n)&&(t=void 0),e=er(e),t=hn({},t,r,Gh);var i,o,a=hn({},t.imports,r.imports,Gh),u=on(a),l=ds(a,u),s=0,c=t.interpolate||ip,f="__p += '",d=RegExp((t.escape||ip).source+"|"+c.source+"|"+(c===Qh?rp:ip).source+"|"+(t.evaluate||ip).source+"|$","g"),h=ap.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(d,(function(t,n,r,a,u,l){return r||(r=a),f+=e.slice(s,l).replace(op,Kh),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),u&&(o=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=l+t.length,t})),f+="';\n";var p=ap.call(t,"variable")&&t.variable;if(p){if(np.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(Jh,""):f).replace(ep,"$1").replace(tp,"$1;"),f="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=wr((function(){return Function(u,h+"return "+f).apply(void 0,l)}));if(v.source=f,_r(v))throw v;return v};var lp=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return z(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hu(e,t,{leading:r,maxWait:t,trailing:i})};var sp=function(e,t){return t(e)},cp=4294967295,fp=Math.min;var dp=function(e,t){if((e=D(e))<1||e>9007199254740991)return[];var n=cp,r=fp(e,cp);t=Hu(t),e-=cp;for(var i=It(r,t);++n-1;);return n};var xp=function(e,t){for(var n=-1,r=e.length;++n-1;);return n};var Sp=function(e,t,n){if((e=er(e))&&(n||void 0===t))return T(e);if(!e||!(t=x(t)))return e;var r=Zr(e),i=Zr(t),o=xp(r,i),a=kp(r,i)+1;return Tr(r,o,a).join("")};var Ep=function(e,t,n){if((e=er(e))&&(n||void 0===t))return e.slice(0,A(e)+1);if(!e||!(t=x(t)))return e;var r=Zr(e),i=kp(r,Zr(t))+1;return Tr(r,0,i).join("")},Cp=/^\s+/;var Ap=function(e,t,n){if((e=er(e))&&(n||void 0===t))return e.replace(Cp,"");if(!e||!(t=x(t)))return e;var r=Zr(e),i=xp(r,Zr(t));return Tr(r,i).join("")},Op=/\w*$/;var Tp=function(e,t){var n=30,r="...";if(z(t)){var i="separator"in t?t.separator:i;n="length"in t?D(t.length):n,r="omission"in t?x(t.omission):r}var o=(e=er(e)).length;if(Ir(e)){var a=Zr(e);o=a.length}if(n>=o)return e;var u=n-Hf(r);if(u<1)return r;var l=a?Tr(a,0,u).join(""):e.slice(0,u);if(void 0===i)return l+r;if(a&&(u+=l.length-u),dc(i)){if(e.slice(u).search(i)){var s,c=l;for(i.global||(i=RegExp(i.source,er(Op.exec(i))+"g")),i.lastIndex=0;s=i.exec(c);)var f=s.index;l=l.slice(0,void 0===f?u:f)}}else if(e.indexOf(x(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r};var zp=function(e){return mt(e,1)},Ip=Qr({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Rp=/&(?:amp|lt|gt|quot|#39);/g,jp=RegExp(Rp.source);var Pp=function(e){return(e=er(e))&&jp.test(e)?e.replace(Rp,Ip):e},Mp=_o&&1/ya(new _o([,-0]))[1]==1/0?function(e){return new _o(e)}:_e,Lp=Mp;var Np=function(e,t,n){var r=-1,i=qe,o=e.length,a=!0,u=[],l=u;if(n)a=!1,i=zu;else if(o>=200){var s=t?null:Lp(e);if(s)return ya(s);a=!1,i=va,l=new ha}else l=t?[]:u;e:for(;++r1||this.__actions__.length)&&r instanceof be&&nt(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:sp,args:[i],thisArg:void 0}),new Ce(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var uv=function(){return Bi(this)};var lv=function(){var e=this.__wrapped__;if(e instanceof be){var t=e;return this.__actions__.length&&(t=new be(this)),(t=t.reverse()).__actions__.push({func:sp,args:[Gd],thisArg:void 0}),new Ce(t,this.__chain__)}return this.thru(Gd)};var sv=function(e,t,n){var r=e.length;if(r<2)return r?Np(e[0]):[];for(var i=-1,o=Array(r);++i1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Kp(e,n)})),bv=yv,_v=n(603),wv=n.n(_v),kv=n(732),xv=n.n(kv),Sv=n(909),Ev=n.n(Sv),Cv=n(665),Av=n.n(Cv),Ov=n(984),Tv=n.n(Ov),zv=n(439),Iv=n.n(zv),Rv=n(993),jv=!("undefined"==typeof window||!window.document||!window.document.createElement),Pv=function(){var e=jv&&window.navigator,t=e&&(null==e?void 0:e.vendor),n=e&&e.userAgent,r=jv&&"undefined"!=typeof chrome,i=jv&&"undefined"!=typeof opr,o=n&&n.indexOf("Edge")>-1;return!(!n||!n.match("CriOS"))||r&&"Google Inc."===t&&!i&&!o},Mv=function(e){return/^v[0-9]_/.test(e)},Lv=function(e){var t=e.split(".");return t.length<2?"":t[t.length-1]},Nv=function(e){var t="";switch(e){case"jpeg":t=".jpg";break;case"gif":t=".gif";break;case"png":t=".png";break;case"vnd.wap.wbmp":t=".wbmp";break;case"x-up-wpng":t=".wpng";break;case"nbmp":t=".nbmp"}return t};function Dv(){for(var e=navigator.userAgent.split(" "),t="",n=0;n1&&void 0!==arguments[1]?arguments[1]:"image/png";return new Promise((function(n,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(e){if(200===Number(i.status)){for(var o=new Uint8Array(i.response),a=o.length,u=new Array(a);a--;)u[a]=String.fromCharCode(o[a]);var l=u.join(""),s=window.btoa(l);n("data:"+(t||"image/png")+";base64,"+s)}else r(e)},i.onerror=function(e){r(e)},i.send()}))},Zv=function(e){return new Promise((function(t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(e){t(null==e?void 0:e.target.result)},r.onerror=function(e){n(e)}}))},Yv=function(e,t,n){var r=document.createElement("canvas");r.width=void 0!==t?t:e.width,r.height=void 0!==n?n:e.height;var i=r.getContext("2d");null==i||i.drawImage(e,0,0,r.width,r.height);var o=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return r.toDataURL("image/"+o)},Gv=function(e){return new Promise((function(t,n){var r=new Image,i=(new Date).getTime(),o=e+"?"+i;r.src=o,r.onload=function(){var e=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height;var n=t.getContext("2d");null==n||n.drawImage(e,0,0,e.width,e.height);var r=e.src.substring(e.src.lastIndexOf(".")+1).toLowerCase();return t.toDataURL("image/"+r)}(r);t(e)},r.onerror=function(e){n(e)}}))},qv=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){var e,n=document.createElement("canvas");n.width=r.naturalWidth,n.height=r.naturalHeight,null==n||null===(e=n.getContext("2d"))||void 0===e||e.drawImage(r,0,0);var i=n.toDataURL("image/png");t(i)};var i=e;r.setAttribute("crossOrigin","Anonymous"),r.src=i,r.onerror=function(){n(new Error("Images fail to load"))}})).catch((function(e){throw new Error(e)}))};function Kv(e){if(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,o=new Uint8Array(i);i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}}var Qv=function(){var e=xv()(wv()().mark((function e(t,n){var r,i,o,a,u,l,s,c,f,d,h;return wv()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],i=[],o=[],a=new(Tv()),u=a.folder(n),e.prev=5,l=0;case 7:if(!(l0)for(h=0;h1&&void 0!==arguments[1]?arguments[1]:"http://10.0.0.120",n=e,r="";if(!n)return"";if(/(http|https):\/\/([\w.]+\/?)\S*/gi.test(n))return n;try{if(Mv(n)&&(n=Vv(n)).endsWith("/")){var i=n.substring(0,n.length-1);n=i}r="".concat(t,"/file/").concat(n),e.includes("v3")&&(r="".concat(t,"/minio/").concat(n))}catch(e){console.error(e),r=""}return r},tm=function(e,t){var n=t||"v1_";return e.startsWith(n)?window.atob(e.split(n)[1]).replace("_","/"):e},nm=function(){var e=xv()(wv()().mark((function e(t,n){var r,i,o,a,u,l,s,c;return wv()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!fs(t)){e.next=7;break}return o=em(t),e.next=4,$v(o);case 4:i=e.sent,e.next=8;break;case 7:i=t;case 8:return(a=document.createElement("canvas")).width=n.w*i.width,a.height=n.h*i.height,a.style.display="none",document.body.appendChild(a),null==(u=a.getContext("2d"))||u.translate(-n.x*i.width,-n.y*i.height),null==u||u.drawImage(i,0,0),l=a.toDataURL("image/jpeg"),s=Jv(l),null===(r=a.parentNode)||void 0===r||r.removeChild(a),c=new window.File([s],"".concat((new Date).getTime()),{type:"image/jpeg"}),e.abrupt("return",c);case 21:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),rm=function(e){if(!e)return"";var t=e.split(","),n=Number(t[0]).toFixed(6),r=Number(t[1]).toFixed(6);return t.length<2?"":"".concat(n,",").concat(r)},im=function(e){if(e){var t=e?e.split(","):[],n=Number(t[0]),r=Number(t[1]);return t.length<2?null:{longitude:n,latitude:r}}return null},om=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if(void 0===e)return"0KB/s";var n=e/t;return e>1073741824?"".concat((n/1024/1024/1024).toFixed(2),"GB/s"):n>1048576?"".concat((n/1024/1024).toFixed(2),"MB/s"):"".concat(n>1024?(n/1024).toFixed(2):n,"KB/s")},am=function(e){for(var t=0,n=e.length,r=-1,i=0;i=0&&r<=128?1:2;return t},um=function(e,t){var n,r=0,i=new String;n=e.length;for(var o=0;o4&&r++,i=i.concat(a),r>=t)return i=i.concat("...")}if(r1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(0===e)return 0;var r=0;return r=n?Math.ceil(e/Math.pow(10,t))*Math.pow(10,t):Math.floor(e/Math.pow(10,t))*Math.pow(10,t),r=Number(t<0?r.toFixed(-t):r.toFixed(0))},sm=function(e){return isNaN(e)||e===1/0?0:e},cm=n(588),fm=n.n(cm),dm=function(e){var t=Math.floor(e/864e5),n=e%864e5,r=Math.floor(n/36e5),i=n%36e5,o=Math.floor(i/6e4),a=i%6e4,u=Math.round(a/1e3)+"秒";return o>0&&(u=o+"分"),r>0&&(u=r+"小时"),t>0&&(u=t+"天"),u};function hm(){var e=fm()().endOf("day").unix();return{startDateTime:fm()().startOf("day").unix(),endDateTime:e}}function pm(e){var t=Math.floor(e/60)||0,n=Math.floor(e%60);return(t<10?"0".concat(t):t)+":"+(n<10?"0":"")+n}var vm=n(492),mm=n.n(vm),gm="vms",ym="dir",bm="camera",_m=function(e){return e[e.VMSPLATFORMOPT_ID=0]="VMSPLATFORMOPT_ID",e[e.VMSPLATFORMOPT_PLATFORMNAME=1]="VMSPLATFORMOPT_PLATFORMNAME",e[e.VMSPLATFORMOPT_PLUGINNAME=2]="VMSPLATFORMOPT_PLUGINNAME",e[e.VMSPLATFORMOPT_IP=3]="VMSPLATFORMOPT_IP",e[e.VMSPLATFORMOPT_PORT=4]="VMSPLATFORMOPT_PORT",e[e.VMSPLATFORMOPT_USERNAME=5]="VMSPLATFORMOPT_USERNAME",e[e.VMSPLATFORMOPT_PASSWORD=6]="VMSPLATFORMOPT_PASSWORD",e}({}),wm=function(e){return e[e.OR=0]="OR",e[e.AND=1]="AND",e[e.ORNOT=2]="ORNOT",e[e.ANDNOT=3]="ANDNOT",e}({}),km=function(e){return e[e.DEVICEMANAGER_CAMERA_TYPE_DEFAULT=0]="DEVICEMANAGER_CAMERA_TYPE_DEFAULT",e[e.DEVICEMANAGER_CAMERA_TYPE_NORMAL=1]="DEVICEMANAGER_CAMERA_TYPE_NORMAL",e[e.DEVICEMANAGER_CAMERA_TYPE_1400=97]="DEVICEMANAGER_CAMERA_TYPE_1400",e[e.DEVICEMANAGER_CAMERA_TYPE_DHGRABBER=98]="DEVICEMANAGER_CAMERA_TYPE_DHGRABBER",e[e.DEVICEMANAGER_CAMERA_TYPE_HKGRABBER=99]="DEVICEMANAGER_CAMERA_TYPE_HKGRABBER",e[e.DEVICEMANAGER_CAMERA_TYPE_LOCAL=100]="DEVICEMANAGER_CAMERA_TYPE_LOCAL",e}({}),xm=(wm.OR,_m.VMSPLATFORMOPT_PLATFORMNAME,wm.OR,_m.VMSPLATFORMOPT_PLATFORMNAME,function(e){return[km.DEVICEMANAGER_CAMERA_TYPE_1400,km.DEVICEMANAGER_CAMERA_TYPE_HKGRABBER,km.DEVICEMANAGER_CAMERA_TYPE_DHGRABBER].includes(e)});function Sm(e){var t;return fs(e)?t=e.split("_")[0]:(as(e,"longitude")&&(t=bm),as(e,"ip")&&(t=gm),t||(t=ym)),t}function Em(e,t,n){return t==ym?"".concat(t,"_").concat(e,"_").concat(n):"".concat(t,"_").concat(e)}function Cm(e){var t="",n=Sm(e);switch(n||console.error("device type is null!"),n){case ym:var r=e.dirid||e.dirId;r||0===r||console.error("dirId type is null!");var i=ir(e,"extendInfo.vmsPlatformId");i||0===i||console.error("vmsId type is null!"),t="".concat(n,"_").concat(r,"_").concat(i);break;case gm:t="".concat(n,"_").concat(e.id);break;case bm:var o=ir(e,"extendInfo.vmsPlatformId");o||0===o||console.error("vmsId type is null!"),t="".concat(n,"_").concat(e.id)}return t}function Am(e){var t=e.split("_"),n=mm()(t,2),r=n[0],i=n[1];return r===ym?i:Number(i)}var Om=function(e){var t="";switch(Sm(e)){case bm:case ym:t=e.split("_")[2];break;case gm:t=e.split("_")[1]}return t||console.error("vmsid is null!"),t},Tm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id",r=[],i=e.map((function(e){return String(e)}));return Fv(t,(function(e){var t=Sm(ir(e,"key",""))===bm,o="key"===n?i.includes(ir(e,"key")):i.includes("".concat(ir(e,"origin.id")));t&&o&&r.push(e)})),r},zm=n(854),Im=n.n(zm),Rm=n(827),jm=n.n(Rm),Pm=n(896),Mm=n.n(Pm),Lm={AlgorithmVersion:{VERSION_REID_HEAD_ATTR:"形体",VERSION_FACE:"人脸",VERSION_NON_MOTOR_VEHICLE:"非机动车"}},Nm=Mm()(Mm()(Mm()({},"7","形体"),"4","人脸"),"6","非机动车"),Dm=jm()(Object.keys(Nm)),Bm=function(e,t){var n=Im()({},e),r=ia(e.y);n.y=n.y-n.h<0?0:n.y-n.h,n.h+=r-n.y;var i=Math.round(n.x-.15*n.w);i<0&&(i=0);var o=n.x-i+n.w+Math.round(.15*n.w);return i+o>t&&(o=t-i),n.x=i,n.w=o,n},Fm=function(e,t,n,r){var i=0,o=0;(i=e.x-Math.round(.25*e.w))<0&&(i=0),i+(o=e.x-i+e.w+Math.round(.25*e.w))>t&&(o=t-i);var a=0,u=0;(a=e.y-Math.round(.25*e.h))<0&&(a=0),a+(u=e.y-a+e.h+Math.round(.25*e.h))>n&&(u=n-a);var l={x:i,y:a,w:o,h:u};if(r===Lm.AlgorithmVersion.VERSION_REID_HEAD_ATTR||r===Lm.AlgorithmVersion.VERSION_FACE){var s=Math.round(.75*u);if(ot&&(f=t-c),l={x:c,y:a,w:f,h:u}}else if(o>s){var d=Math.round(1.333*o),h=a+Math.round(u/2-.5*d);h<0&&(h=0);var p=d;h+p>n&&(p=n-h),l={x:i,y:h,w:o,h:p}}}return l},Um=function(e,t,n){var r=Im()({},e);return r.x=e.x/t,r.y=e.y/n,r.w=e.w/t,r.h=e.h/n,r.x+r.w>1&&(r.w=1-r.x),r.y+r.h>1&&(r.h=1-r.y),r},Wm=function(e,t,n,r){var i,o={x:e.x*t,y:e.y*n,w:e.w*t,h:e.h*n};return i=r===Lm.AlgorithmVersion.VERSION_NON_MOTOR_VEHICLE?Bm(o,t):Fm(o,t,n,r),i=Um(i,t,n)},$m=function(e,t,n){var r=n.x,i=n.y,o=n.x+n.w,a=n.h+n.y,u=t.translateX,l=t.translateY,s=t.scale,c=t.rotate,f={x:(r-u)/s,y:(i-l)/s,x2:(o-u)/s,y2:(a-l)/s},d=f;if(c%180!=0){var h=-(e.height-e.width)/2,p=-(e.width-e.height)/2;d={x:f.x-h,y:f.y-p,x2:f.x2-h,y2:f.y2-p}}var v=e.width,m=e.height;if(c%180!=0){var g=[m,v];v=g[0],m=g[1]}d.x=Math.min(v,Math.max(d.x,0)),d.y=Math.min(m,Math.max(d.y,0)),d.x2=Math.min(v,Math.max(d.x2,0)),d.y2=Math.min(m,Math.max(d.y2,0));var y={x:d.x2>d.x?d.x:d.x2,y:d.y2>d.y?d.y:d.y2,w:Math.abs(d.x2-d.x),h:Math.abs(d.y2-d.y)};return Um(y,v,m)},Vm=function(e,t){var n,r=e.width,i=e.height;if(t%180!=0){var o=[i,r];r=o[0],i=o[1]}var a=document.createElement("canvas");a.width=r,a.height=i,a.style.display="none",document.body.appendChild(a);var u=a.getContext("2d");null==u||u.save(),t%180!=0&&(null==u||u.translate((e.height-e.width)/2,(e.width-e.height)/2)),null==u||u.translate(e.width/2,e.height/2),null==u||u.rotate(t/180*Math.PI),null==u||u.translate(-e.width/2,-e.height/2),null==u||u.drawImage(e,0,0),null==u||u.restore();var l=a.toDataURL("image/jpeg"),s=Jv(l),c=new window.File([s],"".concat((new Date).getTime()),{type:"image/jpeg"});return null===(n=a.parentNode)||void 0===n||n.removeChild(a),c},Hm=function(e){var t=ir(e,"objects",[]).filter((function(e){return!sc(ir(e,"infoOnSource.bboxInFrame.bboxRatio"))})).map((function(e,t){var n=ir(e,"infoOnSource.bboxInFrame.bboxRatio"),r=ir(e,"infoOnSource.bboxInFrame.extendBoxRatio"),i=ir(e,"timestamp"),o=ir(e,"qualityScore"),a="OBJECT_TYPE_PEDESTRAIN"===ir(e,"objectType")?"VERSION_REID_HEAD_ATTR":"OBJECT_TYPE_FACE"===ir(e,"objectType")?"VERSION_FACE":"VERSION_REID_HEAD_ATTR",u=ir(e,"feature",[]).filter((function(e){return"FEATURE_TYPE_BYTE"===e.type})),l="VERSION_FACE"===a?0:1,s=ir(e,"objectType"),c=ir(e,"objectIndex.objectId"),f=ir(e,"sourceObjectId");return{x:n.x,y:n.y,w:n.w,h:n.h,id:t,qualityScore:o,algorithmVersion:a,featureData:ir(u,"0.featureByte"),objectRectIndex:l,objectType:s,objectId:c,frameTimestamp:i,sourceObjectId:f,extendBox:r}}));if(!(t.length>0))throw new Error("empty");return t=t.filter((function(e){return"0"!==e.objectId}))},Zm=function(e){var t=e.odv2Result[0],n=[],r=ir(t,"objects",[]).filter((function(e){return!sc(ir(e,"subObjects[0].infoOnSource.bboxInFrame.bboxRatio"))})).map((function(e,t){var r=ir(e,"infoOnSource.bboxInFrame.bboxRatio"),i=ir(e,"qualityScore"),o=ir(e,"objectType"),a=ir(e,"feature",[]).filter((function(e){return"feature-body"===e.name||"feature-face"===e.name})),u="OBJECT_TYPE_FACE"===o?0:1,l=ir(e,"objectType"),s=ir(e,"objectIndex.objectId");return ir(e,"subObjects",[]).length&&ir(e,"subObjects",[]).forEach((function(e){var r=ir(e,"infoOnSource.bboxInFrame.bboxRatio"),i=ir(e,"qualityScore"),o=ir(e,"objectType"),a=ir(e,"feature",[]).filter((function(e){return"feature-body"===e.name||"feature-face"===e.name})),u="OBJECT_TYPE_FACE"===o?0:1,l=ir(e,"objectType"),s=ir(e,"objectIndex.objectId");n.push({x:r.x,y:r.y,w:r.w,h:r.h,id:t,qualityScore:i,algorithmVersion:o,featrueData:a.length?a[0].featureByte:"",objectRectIndex:u,objectType:l,objectId:s})})),{x:r.x,y:r.y,w:r.w,h:r.h,id:t,qualityScore:i,algorithmVersion:o,featrueData:a[0].featureByte,objectRectIndex:u,objectType:l,objectId:s}})).concat(n).map((function(e,t){return String(e.id)&&(e.id=t),e}));if(!(r.length>0))throw new Error("empty");return console.log(r,"data111"),console.log(r),r}}(),r}()})); \ No newline at end of file diff --git a/packages/func/es/camera/constants.d.ts b/packages/func/es/camera/constants.d.ts deleted file mode 100644 index 0658bd8..0000000 --- a/packages/func/es/camera/constants.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 设备类型枚举 - */ -export declare const DeviceType: { - VMS: string; - DIR: string; - CAMERA: string; -}; -export declare const LOCAL_KEY = "local"; -export declare const DIRE_CONNECT_KEY = "direconnect"; -export declare const BOX_LIST_KEY = "boxlist"; -export declare enum VmsplatformOpt { - VMSPLATFORMOPT_ID = 0, - VMSPLATFORMOPT_PLATFORMNAME = 1, - VMSPLATFORMOPT_PLUGINNAME = 2, - VMSPLATFORMOPT_IP = 3, - VMSPLATFORMOPT_PORT = 4, - VMSPLATFORMOPT_USERNAME = 5, - VMSPLATFORMOPT_PASSWORD = 6 -} -export declare enum OPT { - OR = 0, - AND = 1, - ORNOT = 2, - ANDNOT = 3 -} -export declare enum DevicemanagerCameraType { - DEVICEMANAGER_CAMERA_TYPE_DEFAULT = 0, - DEVICEMANAGER_CAMERA_TYPE_NORMAL = 1, - DEVICEMANAGER_CAMERA_TYPE_1400 = 97, - DEVICEMANAGER_CAMERA_TYPE_DHGRABBER = 98, - DEVICEMANAGER_CAMERA_TYPE_HKGRABBER = 99, - DEVICEMANAGER_CAMERA_TYPE_LOCAL = 100 -} -export declare const BOX_DIRECONNECT_PLATFORM_FILTER: { - filtervmsplatformList: { - opt: OPT; - vmsplatformOpt: VmsplatformOpt; - value: string; - }[]; -}; diff --git a/packages/func/es/camera/constants.js b/packages/func/es/camera/constants.js deleted file mode 100644 index 1a313b4..0000000 --- a/packages/func/es/camera/constants.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 设备类型枚举 - */ -export var DeviceType = { - VMS: 'vms', - DIR: 'dir', - CAMERA: 'camera' -}; -export var LOCAL_KEY = 'local'; //离线摄像头key 约定 -export var DIRE_CONNECT_KEY = 'direconnect'; -export var BOX_LIST_KEY = 'boxlist'; -export var VmsplatformOpt = /*#__PURE__*/function (VmsplatformOpt) { - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_ID"] = 0] = "VMSPLATFORMOPT_ID"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_PLATFORMNAME"] = 1] = "VMSPLATFORMOPT_PLATFORMNAME"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_PLUGINNAME"] = 2] = "VMSPLATFORMOPT_PLUGINNAME"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_IP"] = 3] = "VMSPLATFORMOPT_IP"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_PORT"] = 4] = "VMSPLATFORMOPT_PORT"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_USERNAME"] = 5] = "VMSPLATFORMOPT_USERNAME"; - VmsplatformOpt[VmsplatformOpt["VMSPLATFORMOPT_PASSWORD"] = 6] = "VMSPLATFORMOPT_PASSWORD"; - return VmsplatformOpt; -}({}); -export var OPT = /*#__PURE__*/function (OPT) { - OPT[OPT["OR"] = 0] = "OR"; - OPT[OPT["AND"] = 1] = "AND"; - OPT[OPT["ORNOT"] = 2] = "ORNOT"; - OPT[OPT["ANDNOT"] = 3] = "ANDNOT"; - return OPT; -}({}); -export var DevicemanagerCameraType = /*#__PURE__*/function (DevicemanagerCameraType) { - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_DEFAULT"] = 0] = "DEVICEMANAGER_CAMERA_TYPE_DEFAULT"; - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_NORMAL"] = 1] = "DEVICEMANAGER_CAMERA_TYPE_NORMAL"; - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_1400"] = 97] = "DEVICEMANAGER_CAMERA_TYPE_1400"; - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_DHGRABBER"] = 98] = "DEVICEMANAGER_CAMERA_TYPE_DHGRABBER"; - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_HKGRABBER"] = 99] = "DEVICEMANAGER_CAMERA_TYPE_HKGRABBER"; - DevicemanagerCameraType[DevicemanagerCameraType["DEVICEMANAGER_CAMERA_TYPE_LOCAL"] = 100] = "DEVICEMANAGER_CAMERA_TYPE_LOCAL"; - return DevicemanagerCameraType; -}({}); - -// 盒子 直连 平台 -export var BOX_DIRECONNECT_PLATFORM_FILTER = { - filtervmsplatformList: [{ - opt: OPT.OR, - vmsplatformOpt: VmsplatformOpt.VMSPLATFORMOPT_PLATFORMNAME, - value: 'direconnect' - }, { - opt: OPT.OR, - vmsplatformOpt: VmsplatformOpt.VMSPLATFORMOPT_PLATFORMNAME, - value: 'boxlist' - }] -}; \ No newline at end of file diff --git a/packages/func/es/camera/index.d.ts b/packages/func/es/camera/index.d.ts deleted file mode 100644 index c47dcdd..0000000 --- a/packages/func/es/camera/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { DevicemanagerCameraType } from './constants'; -export declare const isFaceCamera: (type: DevicemanagerCameraType) => boolean; -/** - * - * @param value 传入的数据 可以是 item(camera/vms/dirs)/ deviceID - * @param isId - */ -export declare function getDeviceType(value: { - [x: string]: any; - id: any; -} | string): any; -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param id 设备id - * @param type 设备类型 - */ -export declare function deviceIDToDeviceKey(id: any, type: string, vmsId?: any): string; -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param item camera/vms/dirs - */ -export declare function deviceToDeviceKey(item: { - [x: string]: any; - id: any; -}): string; -/** - * 设备树key 转 后端设备原始id dirid是string/vms&camera 是number 和后端保持一致 - * @param deviceKey 设备树的id - */ -export declare function deviceKeyToDeviceId(deviceKey: { - split: (arg0: string) => [any, any]; -}): any; -export declare const getVmsIdByDeviceId: (key: string) => string; -/** - * 通过设备id或设备key在树里面找摄像头 - * @param ids cameraId - * @param deviceTree 树 - * @param type "id" | "key" - */ -export declare const findCamerasByInDeviceTree: (ids: never[] | undefined, deviceTree: any, type?: string) => any[]; diff --git a/packages/func/es/camera/index.js b/packages/func/es/camera/index.js deleted file mode 100644 index 9184f3f..0000000 --- a/packages/func/es/camera/index.js +++ /dev/null @@ -1,142 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import { get, has, isString } from 'lodash-es'; -import { loop } from "../utils"; -import { DevicemanagerCameraType, DeviceType } from "./constants"; -export var isFaceCamera = function isFaceCamera(type) { - return [DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_1400, DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_HKGRABBER, DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_DHGRABBER].includes(type); -}; - -/** - * - * @param value 传入的数据 可以是 item(camera/vms/dirs)/ deviceID - * @param isId - */ -export function getDeviceType(value) { - var type; - var isDeviceKey = isString(value); - if (isDeviceKey) { - type = value.split('_')[0]; - } else { - if (has(value, 'longitude')) { - type = DeviceType['CAMERA']; - } - if (has(value, 'ip')) { - type = DeviceType['VMS']; - } - if (!type) { - type = DeviceType['DIR']; - } - } - return type; -} - -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param id 设备id - * @param type 设备类型 - */ -export function deviceIDToDeviceKey(id, type, vmsId) { - if (type == DeviceType['DIR']) { - return "".concat(type, "_").concat(id, "_").concat(vmsId); - } else { - return "".concat(type, "_").concat(id); - } -} - -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param item camera/vms/dirs - */ -export function deviceToDeviceKey(item) { - var deviceKey = ''; - var type = getDeviceType(item); - if (!type) { - console.error('device type is null!'); - } - switch (type) { - case DeviceType['DIR']: - { - var dirId = item['dirid'] || item['dirId']; - if (!dirId && dirId !== 0) { - console.error('dirId type is null!'); - } - var vmsId = get(item, 'extendInfo.vmsPlatformId'); - if (!vmsId && vmsId !== 0) { - console.error('vmsId type is null!'); - } - deviceKey = "".concat(type, "_").concat(dirId, "_").concat(vmsId); - } - break; - case DeviceType['VMS']: - deviceKey = "".concat(type, "_").concat(item['id']); - break; - case DeviceType['CAMERA']: - { - var _vmsId = get(item, 'extendInfo.vmsPlatformId'); - if (!_vmsId && _vmsId !== 0) { - console.error('vmsId type is null!'); - } - deviceKey = "".concat(type, "_").concat(item.id); - } - break; - } - return deviceKey; -} - -/** - * 设备树key 转 后端设备原始id dirid是string/vms&camera 是number 和后端保持一致 - * @param deviceKey 设备树的id - */ -export function deviceKeyToDeviceId(deviceKey) { - var _deviceKey$split = deviceKey.split('_'), - _deviceKey$split2 = _slicedToArray(_deviceKey$split, 2), - type = _deviceKey$split2[0], - id = _deviceKey$split2[1]; - return type === DeviceType['DIR'] ? id : Number(id); -} -export var getVmsIdByDeviceId = function getVmsIdByDeviceId(key) { - var type = getDeviceType(key); - var vmsId = ''; - switch (type) { - case DeviceType['CAMERA']: - case DeviceType['DIR']: - vmsId = key.split('_')[2]; - break; - case DeviceType['VMS']: - vmsId = key.split('_')[1]; - break; - } - if (!vmsId) { - console.error('vmsid is null!'); - } - return vmsId; -}; - -/** - * 通过设备id或设备key在树里面找摄像头 - * @param ids cameraId - * @param deviceTree 树 - * @param type "id" | "key" - */ -export var findCamerasByInDeviceTree = function findCamerasByInDeviceTree() { - var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var deviceTree = arguments.length > 1 ? arguments[1] : undefined; - var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'id'; - var cameraInfoList = []; - var _ids = ids.map(function (v) { - return String(v); - }); //都转string在做判断 保证格式一致 - loop(deviceTree, function (item) { - var isCamera = getDeviceType(get(item, 'key', '')) === DeviceType['CAMERA']; - var isMatch = type === 'key' ? _ids.includes(get(item, 'key')) : _ids.includes("".concat(get(item, 'origin.id'))); - if (isCamera && isMatch) { - cameraInfoList.push(item); - } - }); - return cameraInfoList; -}; \ No newline at end of file diff --git a/packages/func/es/file/index.d.ts b/packages/func/es/file/index.d.ts deleted file mode 100644 index dabc536..0000000 --- a/packages/func/es/file/index.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export declare type Rect = { - x: number; - y: number; - w: number; - h: number; -}; -/** - * - * @param url 需要转为图片的链接 - * @returns 图片的 dom - */ -export declare const urlToImg: (url: string) => Promise; -export declare const base64DecodeImageKey: (base64ImgKey: string) => string; -/** - * 通过url获取图片的base64字符串 - * @param src 图片链接 - * @param outputFormat 图片格式 - * @returns base64 @string - */ -export declare const getBase64ByUrl: (src: string | URL, outputFormat?: string) => Promise; -/** - * 把文件转base64 - * @param file @file 文件 - * @returns @string - */ -export declare const fileToBase64: (file: any) => Promise; -/** - * - * @param image @file 图片文件 - * @param width @number 宽度 - * @param height @number 高度 - * @returns @string base64 - */ -export declare const getBase64Image: (image: any, width?: any, height?: any) => string; -/** - * 通过图片获取base64 - * @param src 图片地址 - * @returns @string - */ -export declare const getBase64ByImage: (src: string) => Promise; -/** - * url转base64 - * @param {String} url - url地址 - */ -export declare const urlToBase64V2: (url: string) => Promise; -/** - * base64转Blob - * @param {String} base64 - base64 - */ -export declare function base64toBlob(base64: string): Blob | undefined; -/** - * 图片集打包压缩下载 - * 1. url -> base64 -> blob - * 2. 将blob加入jsZip文件夹内,用file-saver保存 - * @param {Array<{url:string,name:string}>} imgDataList - * @param {string} zipName - */ -export declare const downloadPackageImages: (imgDataList: string | any[], zipName: string) => Promise; -export declare function getFileSize(size: number): string; -export declare const dataURLToBlob: (dataurl: string) => Blob; -/** - * key 转 http 链接 - * @param originImgkey 图片的值 ,可以是 base64 也可以是 http链接 - * @param host 图片的域值 - * @returns {string} - */ -export declare const generateImg: (imgKey: string, host?: string) => string; -/** - * 获取指定字符串后面的部分 - * @param imageKey v1_开头的字符串 - * @returns - */ -export declare const getImageKey: (imageKey: string, preFix?: string) => string; -/** - * 获取图片 - * @param img 图片的url链接 - * @param odRect - * @returns file - */ -export declare const getFileByRect: (img: string, odRect: Rect) => Promise; diff --git a/packages/func/es/file/index.js b/packages/func/es/file/index.js deleted file mode 100644 index 27580b7..0000000 --- a/packages/func/es/file/index.js +++ /dev/null @@ -1,412 +0,0 @@ -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); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import Base64 from 'base-64'; -import JSZip from 'jszip'; -import FileSaver from 'file-saver'; -import { matchS3Prefix } from "../utils"; -import { get, isString } from 'lodash-es'; -/** - * - * @param url 需要转为图片的链接 - * @returns 图片的 dom - */ -export var urlToImg = function urlToImg(url) { - var resImage = new Promise(function (resolve) { - var image = new Image(); - image.crossOrigin = ''; - image.src = url; - image.onload = function () { - resolve(image); - }; - }); - return resImage; -}; -export var base64DecodeImageKey = function base64DecodeImageKey(base64ImgKey) { - var tempStr = base64ImgKey; - if (matchS3Prefix(tempStr)) { - tempStr = tempStr.replace(/^v[0-9]_/, ''); - tempStr = Base64.decode(tempStr); - } - //分离bucket - var _tempStr$split = tempStr.split('_'), - _tempStr$split2 = _toArray(_tempStr$split), - bucket = _tempStr$split2[0], - pathArr = _tempStr$split2.slice(1); - return tempStr = "".concat(bucket, "/").concat(pathArr.join('_')); -}; - -/** - * 通过url获取图片的base64字符串 - * @param src 图片链接 - * @param outputFormat 图片格式 - * @returns base64 @string - */ -export var getBase64ByUrl = function getBase64ByUrl(src) { - var outputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'image/png'; - return new Promise(function (resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', src, true); - xhr.responseType = 'arraybuffer'; - xhr.onload = function (e) { - if (Number(xhr.status) === 200) { - var uInt8Array = new Uint8Array(xhr.response); - var i = uInt8Array.length; - var binaryString = new Array(i); - while (i--) { - binaryString[i] = String.fromCharCode(uInt8Array[i]); - } - var data = binaryString.join(''); - var base64 = window.btoa(data); - var dataUrl = 'data:' + (outputFormat || 'image/png') + ';base64,' + base64; - resolve(dataUrl); - } else { - reject(e); - } - }; - xhr.onerror = function (e) { - reject(e); - }; - xhr.send(); - }); -}; - -/** - * 把文件转base64 - * @param file @file 文件 - * @returns @string - */ -export var fileToBase64 = function fileToBase64(file) { - return new Promise(function (resolve, reject) { - var reader = new FileReader(); - // 传入一个参数对象即可得到基于该参数对象的文本内容 - reader.readAsDataURL(file); - reader.onload = function (e) { - // target.result 该属性表示目标对象的DataURL - resolve(e === null || e === void 0 ? void 0 : e.target.result); - }; - reader.onerror = function (e) { - reject(e); - }; - }); -}; - -/** - * - * @param image @file 图片文件 - * @param width @number 宽度 - * @param height @number 高度 - * @returns @string base64 - */ -export var getBase64Image = function getBase64Image(image, width, height) { - // width、height调用时传入具体像素值,控制大小 ,不传则默认图像大小 - var canvas = document.createElement('canvas'); - canvas.width = width !== undefined ? width : image.width; - canvas.height = height !== undefined ? height : image.height; - var ctx = canvas.getContext('2d'); - ctx === null || ctx === void 0 || ctx.drawImage(image, 0, 0, canvas.width, canvas.height); - var ext = image.src.substring(image.src.lastIndexOf('.') + 1).toLowerCase(); - var dataURL = canvas.toDataURL('image/' + ext); - return dataURL; -}; - -/** - * 通过图片获取base64 - * @param src 图片地址 - * @returns @string - */ -export var getBase64ByImage = function getBase64ByImage(src) { - return new Promise(function (resolve, reject) { - var image = new Image(); - var timestamp = new Date().getTime(); - var imgUrl = src + '?' + timestamp; - image.src = imgUrl; - image.onload = function () { - function getBase64Image(img) { - var canvas = document.createElement('canvas'); - canvas.width = img.width; - canvas.height = img.height; - var ctx = canvas.getContext('2d'); - ctx === null || ctx === void 0 || ctx.drawImage(img, 0, 0, img.width, img.height); - var ext = img.src.substring(img.src.lastIndexOf('.') + 1).toLowerCase(); - var dataURL = canvas.toDataURL('image/' + ext); - return dataURL; - } - var base64 = getBase64Image(image); - resolve(base64); - }; - image.onerror = function (e) { - reject(e); - }; - }); -}; - -/** - * url转base64 - * @param {String} url - url地址 - */ -export var urlToBase64V2 = function urlToBase64V2(url) { - return new Promise(function (resolve, reject) { - var image = new Image(); - image.onload = function () { - var _canvas$getContext; - var canvas = document.createElement('canvas'); - canvas.width = image.naturalWidth; - canvas.height = image.naturalHeight; - // 将图片插入画布并开始绘制 - canvas === null || canvas === void 0 || (_canvas$getContext = canvas.getContext('2d')) === null || _canvas$getContext === void 0 || _canvas$getContext.drawImage(image, 0, 0); - // result - var result = canvas.toDataURL('image/png'); - resolve(result); - }; - // CORS 策略,会存在跨域问题https://stackoverflow.com/questions/20424279/canvas-todataurl-securityerror - var imgUrl = url; - image.setAttribute('crossOrigin', 'Anonymous'); - image.src = imgUrl; - // 图片加载失败的错误处理 - image.onerror = function () { - reject(new Error('Images fail to load')); - }; - }).catch(function (error) { - throw new Error(error); - }); -}; - -/** - * base64转Blob - * @param {String} base64 - base64 - */ -export function base64toBlob(base64) { - if (!base64) return; - var arr = base64.split(','), - // @ts-ignore - mime = arr[0].match(/:(.*?);/)[1], - bstr = atob(arr[1]), - n = bstr.length, - u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { - type: mime - }); -} - -/** - * 图片集打包压缩下载 - * 1. url -> base64 -> blob - * 2. 将blob加入jsZip文件夹内,用file-saver保存 - * @param {Array<{url:string,name:string}>} imgDataList - * @param {string} zipName - */ -export var downloadPackageImages = /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(imgDataList, zipName) { - var imgDataDownLoadList, imgBlobList, imageSuffix, zip, img, _i, src, suffix, base64ByUrl, blob, i; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - imgDataDownLoadList = []; // 传入列表中可下载图片的集合 - imgBlobList = []; // 图片转blob的集合 - imageSuffix = []; // 图片后缀集 - zip = new JSZip(); - img = zip.folder(zipName); - _context.prev = 5; - _i = 0; - case 7: - if (!(_i < imgDataList.length)) { - _context.next = 22; - break; - } - src = imgDataList[_i].url; - suffix = src.substring(src.lastIndexOf('.')); - _context.next = 12; - return urlToBase64V2(imgDataList[_i].url); - case 12: - base64ByUrl = _context.sent; - if (base64ByUrl) { - _context.next = 15; - break; - } - return _context.abrupt("continue", 19); - case 15: - // @ts-ignore - blob = base64toBlob(base64ByUrl); - imgDataDownLoadList.push(imgDataList[_i]); - imgBlobList.push(blob); - imageSuffix.push(suffix); - case 19: - _i++; - _context.next = 7; - break; - case 22: - if (!(imgBlobList.length === 0)) { - _context.next = 24; - break; - } - throw new Error('The number of pictures is zero !'); - case 24: - if (imgBlobList.length > 0) { - for (i = 0; i < imgBlobList.length; i++) { - img === null || img === void 0 || img.file(imgDataDownLoadList[i].name + get(imageSuffix, ".".concat(i), imageSuffix[0]), - // @ts-ignore - imgBlobList[i], { - base64: true - }); - } - } - zip.generateAsync({ - type: 'blob' - }).then(function (content) { - FileSaver.saveAs(content, zipName + '.zip'); // 利用file-saver保存文件 - }); - _context.next = 31; - break; - case 28: - _context.prev = 28; - _context.t0 = _context["catch"](5); - throw new Error(_context.t0); - case 31: - case "end": - return _context.stop(); - } - }, _callee, null, [[5, 28]]); - })); - return function downloadPackageImages(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); - -//文件size转单位 -export function getFileSize(size) { - if (!size) return ''; - var num = 1024.0; //byte - - if (size < num) return size + 'B'; - if (size < Math.pow(num, 2)) return (size / num).toFixed(2) + 'K'; //kb - if (size < Math.pow(num, 3)) return (size / Math.pow(num, 2)).toFixed(2) + 'M'; //M - if (size < Math.pow(num, 4)) return (size / Math.pow(num, 3)).toFixed(2) + 'G'; //G - return (size / Math.pow(num, 4)).toFixed(2) + 'T'; //T -} - -// Base64转Blob -export var dataURLToBlob = function dataURLToBlob(dataurl) { - var arr = dataurl.split(','); - var mime = arr[0].match(/:(.*?);/)[1]; - var bstr = atob(arr[1]); - var n = bstr.length; - var u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { - type: mime - }); -}; - -/** - * key 转 http 链接 - * @param originImgkey 图片的值 ,可以是 base64 也可以是 http链接 - * @param host 图片的域值 - * @returns {string} - */ -export var generateImg = function generateImg(_imgKey) { - var host = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'http://10.0.0.120'; - var imgKey = _imgKey; - var imgUrl = ''; - //判空 - if (!imgKey) return ''; - if (/(http|https):\/\/([\w.]+\/?)\S*/ig.test(imgKey)) { - return imgKey; - } - try { - if (matchS3Prefix(imgKey)) { - imgKey = base64DecodeImageKey(imgKey); - if (imgKey.endsWith('/')) { - var i = imgKey.substring(0, imgKey.length - 1); - imgKey = i; - } - } - imgUrl = "".concat(host, "/file/").concat(imgKey); - if (_imgKey.includes('v3')) { - imgUrl = "".concat(host, "/minio/").concat(imgKey); - } - } catch (error) { - console.error(error); - imgUrl = ''; - } - return imgUrl; -}; - -/** - * 获取指定字符串后面的部分 - * @param imageKey v1_开头的字符串 - * @returns - */ -export var getImageKey = function getImageKey(imageKey, preFix) { - var splitIndex = preFix || 'v1_'; - if (imageKey.startsWith(splitIndex)) { - return window.atob(imageKey.split(splitIndex)[1]).replace('_', '/'); - } else { - return imageKey; - } -}; - -/** - * 获取图片 - * @param img 图片的url链接 - * @param odRect - * @returns file - */ -export var getFileByRect = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(img, odRect) { - var _commonCanvas$parentN; - var image, url, commonCanvas, commonCtx, base64, blobData, file; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - if (!isString(img)) { - _context2.next = 7; - break; - } - url = generateImg(img); - _context2.next = 4; - return urlToImg(url); - case 4: - image = _context2.sent; - _context2.next = 8; - break; - case 7: - image = img; - case 8: - commonCanvas = document.createElement('canvas'); - commonCanvas.width = odRect.w * image.width; - commonCanvas.height = odRect.h * image.height; - commonCanvas.style.display = 'none'; - document.body.appendChild(commonCanvas); - commonCtx = commonCanvas.getContext('2d'); - commonCtx === null || commonCtx === void 0 || commonCtx.translate(-odRect.x * image.width, -odRect.y * image.height); - commonCtx === null || commonCtx === void 0 || commonCtx.drawImage(image, 0, 0); - base64 = commonCanvas.toDataURL('image/jpeg'); - blobData = dataURLToBlob(base64); - (_commonCanvas$parentN = commonCanvas.parentNode) === null || _commonCanvas$parentN === void 0 || _commonCanvas$parentN.removeChild(commonCanvas); - file = new window.File([blobData], "".concat(new Date().getTime()), { - type: 'image/jpeg' - }); - return _context2.abrupt("return", file); - case 21: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - return function getFileByRect(_x3, _x4) { - return _ref2.apply(this, arguments); - }; -}(); \ No newline at end of file diff --git a/packages/func/es/index.d.ts b/packages/func/es/index.d.ts deleted file mode 100644 index 39ccf20..0000000 --- a/packages/func/es/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from 'lodash-es'; -export * from './file'; -export * from './map'; -export * from './performance'; -export * from './string'; -export * from './number'; -export * from './time'; -export * from './utils'; -export * from './camera'; -export * from './math'; diff --git a/packages/func/es/index.js b/packages/func/es/index.js deleted file mode 100644 index 598dbef..0000000 --- a/packages/func/es/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export * from 'lodash-es'; -export * from "./file"; -export * from "./map"; -export * from "./performance"; -export * from "./string"; -export * from "./number"; -export * from "./time"; -export * from "./utils"; -export * from "./camera"; -export * from "./math"; \ No newline at end of file diff --git a/packages/func/es/map/index.d.ts b/packages/func/es/map/index.d.ts deleted file mode 100644 index 08fa4a2..0000000 --- a/packages/func/es/map/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 获取经纬信息 - * @param lngLat 位置信息 - * @returns @object { long, lat } - */ -export declare const fixedLngLat: (lngLat?: string) => string; -export declare const transformLngLat: (lngLat?: string) => { - longitude: number; - latitude: number; -} | null; diff --git a/packages/func/es/map/index.js b/packages/func/es/map/index.js deleted file mode 100644 index c71177d..0000000 --- a/packages/func/es/map/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 获取经纬信息 - * @param lngLat 位置信息 - * @returns @object { long, lat } - */ -export var fixedLngLat = function fixedLngLat(lngLat) { - if (!lngLat) { - return ''; - } - var lngLatArr = lngLat.split(','); - var longitude = Number(lngLatArr[0]).toFixed(6); - var latitude = Number(lngLatArr[1]).toFixed(6); - if (lngLatArr.length < 2) { - return ''; - } - return "".concat(longitude, ",").concat(latitude); -}; -export var transformLngLat = function transformLngLat(lngLat) { - if (lngLat) { - var lngLatArr = lngLat ? lngLat.split(',') : []; - var longitude = Number(lngLatArr[0]); - var latitude = Number(lngLatArr[1]); - if (lngLatArr.length < 2) { - return null; - } - return { - longitude: longitude, - latitude: latitude - }; - } - return null; -}; \ No newline at end of file diff --git a/packages/func/es/math/index.d.ts b/packages/func/es/math/index.d.ts deleted file mode 100644 index d87c485..0000000 --- a/packages/func/es/math/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: {}; -export default _default; diff --git a/packages/func/es/math/index.js b/packages/func/es/math/index.js deleted file mode 100644 index 7c645e4..0000000 --- a/packages/func/es/math/index.js +++ /dev/null @@ -1 +0,0 @@ -export default {}; \ No newline at end of file diff --git a/packages/func/es/number/index.d.ts b/packages/func/es/number/index.d.ts deleted file mode 100644 index b8e65be..0000000 --- a/packages/func/es/number/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * 设置数据的精度 - * @param originNumber - * @param accuracy 精度 以原点为中心向左为正,向右为负, - * @param isCeil 是否为向上取整 - * @returns number - */ -export declare const setNumberAccuracy: (originNumber: number, accuracy?: number, isCeil?: boolean) => number; -/** - * 获取数字 - * @param number 需要校验的数值 - * @returns @number - */ -export declare const toRealNumber: (number: any) => any; diff --git a/packages/func/es/number/index.js b/packages/func/es/number/index.js deleted file mode 100644 index 2d44a2a..0000000 --- a/packages/func/es/number/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * 设置数据的精度 - * @param originNumber - * @param accuracy 精度 以原点为中心向左为正,向右为负, - * @param isCeil 是否为向上取整 - * @returns number - */ -export var setNumberAccuracy = function setNumberAccuracy(originNumber) { - var accuracy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var isCeil = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - if (originNumber === 0) { - return 0; - } - var returnData = 0; - if (isCeil) { - returnData = Math.ceil(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } else { - returnData = Math.floor(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } - //设置精度 - if (accuracy < 0) { - returnData = Number(returnData.toFixed(-accuracy)); - } else { - returnData = Number(returnData.toFixed(0)); - } - return returnData; -}; - -/** - * 获取数字 - * @param number 需要校验的数值 - * @returns @number - */ -export var toRealNumber = function toRealNumber(number) { - if (isNaN(number) || number === Infinity) { - return 0; - } else return number; -}; \ No newline at end of file diff --git a/packages/func/es/performance/index.d.ts b/packages/func/es/performance/index.d.ts deleted file mode 100644 index 22dd838..0000000 --- a/packages/func/es/performance/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const speedConvert: (bps: number, contertUnit?: number) => string; diff --git a/packages/func/es/performance/index.js b/packages/func/es/performance/index.js deleted file mode 100644 index 72d1c5f..0000000 --- a/packages/func/es/performance/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// 1.bps KB/s or MB/s or GB/s 2.保留两位小数 3.默认是bps -export var speedConvert = function speedConvert(bps) { - var contertUnit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 8; - if (bps === undefined) return "0KB/s"; - var byte = bps / contertUnit; - if (bps > 1024 * 1024 * 1024) { - return "".concat((byte / 1024 / 1024 / 1024).toFixed(2), "GB/s"); - } else if (byte > 1024 * 1024) { - return "".concat((byte / 1024 / 1024).toFixed(2), "MB/s"); - } else if (byte > 1024) { - return "".concat((byte / 1024).toFixed(2), "KB/s"); - } - return "".concat(byte, "KB/s"); -}; \ No newline at end of file diff --git a/packages/func/es/string/index.js b/packages/func/es/string/index.js deleted file mode 100644 index f8ed1cd..0000000 --- a/packages/func/es/string/index.js +++ /dev/null @@ -1,105 +0,0 @@ -///获得字符串实际长度,中文2,英文1 -///要获得长度的字符串 -export var getStrLength = function getStrLength(str) { - var realLength = 0, - len = str.length, - charCode = -1; - for (var i = 0; i < len; i++) { - charCode = str.charCodeAt(i); - if (charCode >= 0 && charCode <= 128) realLength += 1;else realLength += 2; - } - return realLength; -}; - -//js截取字符串,中英文都能用 -//如果给定的字符串大于指定长度,截取指定长度返回,否者返回源字符串。 -//字符串,长度 - -/** - * js截取字符串,中英文都能用 - * @param str:需要截取的字符串 - * @param len: 需要截取的长度 - */ -export var cutStr = function cutstr(str, len) { - var str_length = 0; - var str_len = 0; - var str_cut = new String(); - str_len = str.length; - for (var i = 0; i < str_len; i++) { - var a = str.charAt(i); - str_length++; - if (escape(a).length > 4) { - //中文字符的长度经编码之后大于4 - str_length++; - } - str_cut = str_cut.concat(a); - if (str_length >= len) { - str_cut = str_cut.concat('...'); - return str_cut; - } - } - //如果给定字符串小于指定长度,则返回源字符串; - if (str_length < len) { - return str; - } -}; - -/** - * 查看字符串是否为可访问链接 - * @param str 待检查链接 - * @returns - */ -export var isUrl = function isUrl(str) { - try { - new URL(str); - return true; - } catch (err) { - return false; - } -}; - -/** - * 通过url获取值 - * @param key 想要获取的值 - * @param url 需要截取的链接 - */ -export var getValueByUrl = function getValueByUrl(key, str) { - var result = null; - if (isUrl(str)) { - result = new URL(str).searchParams.get(key); - } else { - result = new URLSearchParams(str.indexOf('?') > -1 ? str : "?".concat(str)).get(key); - } - return result; -}; - -/** - * 行内px 转 rem - * @param value px像素 - * @param rootFontSize 根元素大小: 默认16px - */ -export var pxToRem = function pxToRem(value, rootFontSize) { - var fontSize = rootFontSize || 80 || parseFloat(document.documentElement.style.fontSize); - var valueArr = value.split(' '); - return valueArr.filter(function (o) { - return o; - }).map(function (val) { - return parseFloat(val) / fontSize + 'rem'; - }).join(' '); -}; - -/** - * 跳转到指定URL - * @param to 跳转的url - * @returns URL - */ -export var jumpTo = function jumpTo(to) { - var from = location.origin + location.pathname; - // 检查是否为url,并且跑出错误 - if (!isUrl(to)) { - throw Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\uFF0C\u4EE5http(s)://\u5F00\u5934\uFF01'"); - } - var _targetUrl = new URL(to); - _targetUrl.searchParams.set('from', from); - return _targetUrl; -}; \ No newline at end of file diff --git a/packages/func/es/time/index.d.ts b/packages/func/es/time/index.d.ts deleted file mode 100644 index 28b4d03..0000000 --- a/packages/func/es/time/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare const formateDuration: (diff: number) => string; -export declare function generateTime(): { - startDateTime: number; - endDateTime: number; -}; -/** - * 格式化时间为 00:00 - * @param seconds 时间,单位秒 - * @returns - */ -export declare function formatDurationTime(seconds: number): string; diff --git a/packages/func/es/time/index.js b/packages/func/es/time/index.js deleted file mode 100644 index 2ea21b7..0000000 --- a/packages/func/es/time/index.js +++ /dev/null @@ -1,57 +0,0 @@ -//时间差计算 - -import dayjs from "dayjs"; - -/* - * startDate==>开始时间 - * endDate==>结束时间 - * 事例:diffTime(data.createTime,new Date()) - * - * */ -export var formateDuration = function formateDuration(diff) { - //计算出相差天数 - var days = Math.floor(diff / (24 * 3600 * 1000)); - - //计算出小时数 - var leave1 = diff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数 - var hours = Math.floor(leave1 / (3600 * 1000)); - //计算相差分钟数 - var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数 - var minutes = Math.floor(leave2 / (60 * 1000)); - - //计算相差秒数 - var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数 - var seconds = Math.round(leave3 / 1000); - var returnStr = seconds + '秒'; - if (minutes > 0) { - returnStr = minutes + '分'; //+ returnStr; - } - if (hours > 0) { - returnStr = hours + '小时'; // + returnStr; - } - if (days > 0) { - returnStr = days + '天'; //+ returnStr; - } - return returnStr; -}; - -//检索默认时间 -export function generateTime() { - var endDateTime = dayjs().endOf('day').unix(); - var startDateTime = dayjs().startOf('day').unix(); - return { - startDateTime: startDateTime, - endDateTime: endDateTime - }; -} - -/** - * 格式化时间为 00:00 - * @param seconds 时间,单位秒 - * @returns - */ -export function formatDurationTime(seconds) { - var minutes = Math.floor(seconds / 60) || 0; - var remainingSeconds = Math.floor(seconds % 60); - return (minutes < 10 ? "0".concat(minutes) : minutes) + ":" + (remainingSeconds < 10 ? "0" : "") + remainingSeconds; -} \ No newline at end of file diff --git a/packages/func/es/utils/index.d.ts b/packages/func/es/utils/index.d.ts deleted file mode 100644 index 4a5e574..0000000 --- a/packages/func/es/utils/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export { default as isChrome } from './isChrome'; -export declare const matchS3Prefix: (str: string) => boolean; -/** - * 通过文件名获取文件类型 - * @param fileName 文件名称 - * @returns 文件类型 - */ -export declare const getFileSuffix: (fileName: string) => string; -/** - * 通过类型获取文件名 - * @param type 类型 - * @returns - */ -export declare const getImageSuffixByFileType: (type: string) => string; -export declare function getChromeVersion(): number | false; -export declare const nextTick: (func: (value: void) => void | PromiseLike) => void; -export declare const loop: (items: string | any[], callback: (arg0: any) => any) => void; -export declare const addEventListenerWrapper: (target: any, eventType: string, cb: any, option?: any) => { - remove: () => void; -}; -/** - * Get transforms base on the given object. - * @param {Object} obj - The target object. - * @returns {string} A string contains transform values. - */ -export declare function getTransforms({ rotate, scaleX, scaleY, translateX, translateY, }: { - rotate?: number; - scaleX?: number; - scaleY?: number; - translateX?: number; - translateY?: number; -}): { - WebkitTransform: string; - msTransform: string; - transform: string; -}; diff --git a/packages/func/es/utils/index.js b/packages/func/es/utils/index.js deleted file mode 100644 index a463b52..0000000 --- a/packages/func/es/utils/index.js +++ /dev/null @@ -1,144 +0,0 @@ -import { isNumber } from 'lodash-es'; -import ReactDOM from 'react-dom'; -export { default as isChrome } from "./isChrome"; -export var matchS3Prefix = function matchS3Prefix(str) { - return /^v[0-9]_/.test(str); -}; - -/** - * 通过文件名获取文件类型 - * @param fileName 文件名称 - * @returns 文件类型 - */ -export var getFileSuffix = function getFileSuffix(fileName) { - var splitArr = fileName.split('.'); - return splitArr.length < 2 ? '' : splitArr[splitArr.length - 1]; -}; - -/** - * 通过类型获取文件名 - * @param type 类型 - * @returns - */ -export var getImageSuffixByFileType = function getImageSuffixByFileType(type) { - var imageSuffix = ''; - switch (type) { - case 'jpeg': - { - imageSuffix = '.jpg'; - break; - } - case 'gif': - { - imageSuffix = '.gif'; - break; - } - case 'png': - { - imageSuffix = '.png'; - break; - } - case 'vnd.wap.wbmp': - { - imageSuffix = '.wbmp'; - break; - } - case 'x-up-wpng': - { - imageSuffix = '.wpng'; - break; - } - case 'nbmp': - { - imageSuffix = '.nbmp'; - break; - } - } - return imageSuffix; -}; - -// 获取谷歌浏览器版本 -export function getChromeVersion() { - var arr = navigator.userAgent.split(' '); - var chromeVersion = ''; - for (var i = 0; i < arr.length; i++) { - if (/chrome/i.test(arr[i])) chromeVersion = arr[i]; - } - if (chromeVersion) { - return Number(chromeVersion.split('/')[1].split('.')[0]); - } else { - return false; - } -} -export var nextTick = function nextTick(func) { - if (queueMicrotask) { - queueMicrotask(func); - return; - } - Promise.resolve().then(func); -}; -export var loop = function loop(items, callback) { - for (var i = 0; i < items.length; i++) { - var element = items[i]; - var isBreak = callback(element); - if (isBreak) { - return; - } - if (element['children']) { - loop(element['children'], callback); - } - } -}; -export var addEventListenerWrapper = function addEventListenerWrapper(target, eventType, cb, option) { - /* eslint camelcase: 2 */ - var callback = ReactDOM.unstable_batchedUpdates ? function run(e) { - ReactDOM.unstable_batchedUpdates(cb, e); - } : cb; - if (target.addEventListener) { - target.addEventListener(eventType, callback, option); - } - return { - remove: function remove() { - if (target.removeEventListener) { - target.removeEventListener(eventType, callback); - } - } - }; -}; - -/** - * Get transforms base on the given object. - * @param {Object} obj - The target object. - * @returns {string} A string contains transform values. - */ -export function getTransforms(_ref) { - var rotate = _ref.rotate, - scaleX = _ref.scaleX, - scaleY = _ref.scaleY, - translateX = _ref.translateX, - translateY = _ref.translateY; - var values = []; - if (isNumber(translateX) && translateX !== 0) { - values.push("translateX(".concat(translateX, "px)")); - } - if (isNumber(translateY) && translateY !== 0) { - values.push("translateY(".concat(translateY, "px)")); - } - - // Rotate should come first before scale to match orientation transform - if (isNumber(rotate) && rotate !== 0) { - values.push("rotate(".concat(rotate, "deg)")); - } - if (isNumber(scaleX) && scaleX !== 1) { - values.push("scaleX(".concat(scaleX, ")")); - } - if (isNumber(scaleY) && scaleY !== 1) { - values.push("scaleY(".concat(scaleY, ")")); - } - var transform = values.length ? values.join(' ') : 'none'; - return { - WebkitTransform: transform, - msTransform: transform, - transform: transform - }; -} \ No newline at end of file diff --git a/packages/func/es/utils/isChrome.d.ts b/packages/func/es/utils/isChrome.d.ts deleted file mode 100644 index 2d07ceb..0000000 --- a/packages/func/es/utils/isChrome.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const isBrowser: boolean; -declare const isChrome: () => boolean; -export default isChrome; diff --git a/packages/func/es/utils/isChrome.js b/packages/func/es/utils/isChrome.js deleted file mode 100644 index 6c1ad42..0000000 --- a/packages/func/es/utils/isChrome.js +++ /dev/null @@ -1,17 +0,0 @@ -export var isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -var isChrome = function isChrome() { - var winNav = isBrowser && window.navigator; - var vendorName = winNav && (winNav === null || winNav === void 0 ? void 0 : winNav.vendor); - var userAgent = winNav && winNav.userAgent; - - //@ts-ignore - var isChromium = isBrowser && typeof chrome !== 'undefined'; - - //@ts-ignore - var isOpera = isBrowser && typeof opr !== 'undefined'; - var isIEedge = userAgent && userAgent.indexOf('Edge') > -1; - var isIOSChrome = !!(userAgent && userAgent.match('CriOS')); - var isDesktopChrome = isChromium && vendorName === 'Google Inc.' && !isOpera && !isIEedge; - return isIOSChrome || isDesktopChrome; -}; -export default isChrome; \ No newline at end of file diff --git a/packages/func/lib/camera/constants.d.ts b/packages/func/lib/camera/constants.d.ts deleted file mode 100644 index 0658bd8..0000000 --- a/packages/func/lib/camera/constants.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 设备类型枚举 - */ -export declare const DeviceType: { - VMS: string; - DIR: string; - CAMERA: string; -}; -export declare const LOCAL_KEY = "local"; -export declare const DIRE_CONNECT_KEY = "direconnect"; -export declare const BOX_LIST_KEY = "boxlist"; -export declare enum VmsplatformOpt { - VMSPLATFORMOPT_ID = 0, - VMSPLATFORMOPT_PLATFORMNAME = 1, - VMSPLATFORMOPT_PLUGINNAME = 2, - VMSPLATFORMOPT_IP = 3, - VMSPLATFORMOPT_PORT = 4, - VMSPLATFORMOPT_USERNAME = 5, - VMSPLATFORMOPT_PASSWORD = 6 -} -export declare enum OPT { - OR = 0, - AND = 1, - ORNOT = 2, - ANDNOT = 3 -} -export declare enum DevicemanagerCameraType { - DEVICEMANAGER_CAMERA_TYPE_DEFAULT = 0, - DEVICEMANAGER_CAMERA_TYPE_NORMAL = 1, - DEVICEMANAGER_CAMERA_TYPE_1400 = 97, - DEVICEMANAGER_CAMERA_TYPE_DHGRABBER = 98, - DEVICEMANAGER_CAMERA_TYPE_HKGRABBER = 99, - DEVICEMANAGER_CAMERA_TYPE_LOCAL = 100 -} -export declare const BOX_DIRECONNECT_PLATFORM_FILTER: { - filtervmsplatformList: { - opt: OPT; - vmsplatformOpt: VmsplatformOpt; - value: string; - }[]; -}; diff --git a/packages/func/lib/camera/constants.js b/packages/func/lib/camera/constants.js deleted file mode 100644 index efd28fa..0000000 --- a/packages/func/lib/camera/constants.js +++ /dev/null @@ -1,90 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/camera/constants.ts -var constants_exports = {}; -__export(constants_exports, { - BOX_DIRECONNECT_PLATFORM_FILTER: () => BOX_DIRECONNECT_PLATFORM_FILTER, - BOX_LIST_KEY: () => BOX_LIST_KEY, - DIRE_CONNECT_KEY: () => DIRE_CONNECT_KEY, - DeviceType: () => DeviceType, - DevicemanagerCameraType: () => DevicemanagerCameraType, - LOCAL_KEY: () => LOCAL_KEY, - OPT: () => OPT, - VmsplatformOpt: () => VmsplatformOpt -}); -module.exports = __toCommonJS(constants_exports); -var DeviceType = { - VMS: "vms", - DIR: "dir", - CAMERA: "camera" -}; -var LOCAL_KEY = "local"; -var DIRE_CONNECT_KEY = "direconnect"; -var BOX_LIST_KEY = "boxlist"; -var VmsplatformOpt = /* @__PURE__ */ ((VmsplatformOpt2) => { - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_ID"] = 0] = "VMSPLATFORMOPT_ID"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_PLATFORMNAME"] = 1] = "VMSPLATFORMOPT_PLATFORMNAME"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_PLUGINNAME"] = 2] = "VMSPLATFORMOPT_PLUGINNAME"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_IP"] = 3] = "VMSPLATFORMOPT_IP"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_PORT"] = 4] = "VMSPLATFORMOPT_PORT"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_USERNAME"] = 5] = "VMSPLATFORMOPT_USERNAME"; - VmsplatformOpt2[VmsplatformOpt2["VMSPLATFORMOPT_PASSWORD"] = 6] = "VMSPLATFORMOPT_PASSWORD"; - return VmsplatformOpt2; -})(VmsplatformOpt || {}); -var OPT = /* @__PURE__ */ ((OPT2) => { - OPT2[OPT2["OR"] = 0] = "OR"; - OPT2[OPT2["AND"] = 1] = "AND"; - OPT2[OPT2["ORNOT"] = 2] = "ORNOT"; - OPT2[OPT2["ANDNOT"] = 3] = "ANDNOT"; - return OPT2; -})(OPT || {}); -var DevicemanagerCameraType = /* @__PURE__ */ ((DevicemanagerCameraType2) => { - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_DEFAULT"] = 0] = "DEVICEMANAGER_CAMERA_TYPE_DEFAULT"; - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_NORMAL"] = 1] = "DEVICEMANAGER_CAMERA_TYPE_NORMAL"; - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_1400"] = 97] = "DEVICEMANAGER_CAMERA_TYPE_1400"; - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_DHGRABBER"] = 98] = "DEVICEMANAGER_CAMERA_TYPE_DHGRABBER"; - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_HKGRABBER"] = 99] = "DEVICEMANAGER_CAMERA_TYPE_HKGRABBER"; - DevicemanagerCameraType2[DevicemanagerCameraType2["DEVICEMANAGER_CAMERA_TYPE_LOCAL"] = 100] = "DEVICEMANAGER_CAMERA_TYPE_LOCAL"; - return DevicemanagerCameraType2; -})(DevicemanagerCameraType || {}); -var BOX_DIRECONNECT_PLATFORM_FILTER = { - filtervmsplatformList: [ - { - opt: 0 /* OR */, - vmsplatformOpt: 1 /* VMSPLATFORMOPT_PLATFORMNAME */, - value: "direconnect" - }, - { - opt: 0 /* OR */, - vmsplatformOpt: 1 /* VMSPLATFORMOPT_PLATFORMNAME */, - value: "boxlist" - } - ] -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BOX_DIRECONNECT_PLATFORM_FILTER, - BOX_LIST_KEY, - DIRE_CONNECT_KEY, - DeviceType, - DevicemanagerCameraType, - LOCAL_KEY, - OPT, - VmsplatformOpt -}); diff --git a/packages/func/lib/camera/index.d.ts b/packages/func/lib/camera/index.d.ts deleted file mode 100644 index c47dcdd..0000000 --- a/packages/func/lib/camera/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { DevicemanagerCameraType } from './constants'; -export declare const isFaceCamera: (type: DevicemanagerCameraType) => boolean; -/** - * - * @param value 传入的数据 可以是 item(camera/vms/dirs)/ deviceID - * @param isId - */ -export declare function getDeviceType(value: { - [x: string]: any; - id: any; -} | string): any; -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param id 设备id - * @param type 设备类型 - */ -export declare function deviceIDToDeviceKey(id: any, type: string, vmsId?: any): string; -/** - * 后端设备id/vmsid/dirid是三张表 合并在一起不保证唯一 前端生成唯一key - * @param item camera/vms/dirs - */ -export declare function deviceToDeviceKey(item: { - [x: string]: any; - id: any; -}): string; -/** - * 设备树key 转 后端设备原始id dirid是string/vms&camera 是number 和后端保持一致 - * @param deviceKey 设备树的id - */ -export declare function deviceKeyToDeviceId(deviceKey: { - split: (arg0: string) => [any, any]; -}): any; -export declare const getVmsIdByDeviceId: (key: string) => string; -/** - * 通过设备id或设备key在树里面找摄像头 - * @param ids cameraId - * @param deviceTree 树 - * @param type "id" | "key" - */ -export declare const findCamerasByInDeviceTree: (ids: never[] | undefined, deviceTree: any, type?: string) => any[]; diff --git a/packages/func/lib/camera/index.js b/packages/func/lib/camera/index.js deleted file mode 100644 index b7ae6f1..0000000 --- a/packages/func/lib/camera/index.js +++ /dev/null @@ -1,143 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/camera/index.ts -var camera_exports = {}; -__export(camera_exports, { - deviceIDToDeviceKey: () => deviceIDToDeviceKey, - deviceKeyToDeviceId: () => deviceKeyToDeviceId, - deviceToDeviceKey: () => deviceToDeviceKey, - findCamerasByInDeviceTree: () => findCamerasByInDeviceTree, - getDeviceType: () => getDeviceType, - getVmsIdByDeviceId: () => getVmsIdByDeviceId, - isFaceCamera: () => isFaceCamera -}); -module.exports = __toCommonJS(camera_exports); -var import_lodash_es = require("lodash-es"); -var import_utils = require("../utils"); -var import_constants = require("./constants"); -var isFaceCamera = (type) => { - return [ - import_constants.DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_1400, - import_constants.DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_HKGRABBER, - import_constants.DevicemanagerCameraType.DEVICEMANAGER_CAMERA_TYPE_DHGRABBER - ].includes(type); -}; -function getDeviceType(value) { - let type; - let isDeviceKey = (0, import_lodash_es.isString)(value); - if (isDeviceKey) { - type = value.split("_")[0]; - } else { - if ((0, import_lodash_es.has)(value, "longitude")) { - type = import_constants.DeviceType["CAMERA"]; - } - if ((0, import_lodash_es.has)(value, "ip")) { - type = import_constants.DeviceType["VMS"]; - } - if (!type) { - type = import_constants.DeviceType["DIR"]; - } - } - return type; -} -function deviceIDToDeviceKey(id, type, vmsId) { - if (type == import_constants.DeviceType["DIR"]) { - return `${type}_${id}_${vmsId}`; - } else { - return `${type}_${id}`; - } -} -function deviceToDeviceKey(item) { - let deviceKey = ""; - let type = getDeviceType(item); - if (!type) { - console.error("device type is null!"); - } - switch (type) { - case import_constants.DeviceType["DIR"]: - { - let dirId = item["dirid"] || item["dirId"]; - if (!dirId && dirId !== 0) { - console.error("dirId type is null!"); - } - let vmsId = (0, import_lodash_es.get)(item, "extendInfo.vmsPlatformId"); - if (!vmsId && vmsId !== 0) { - console.error("vmsId type is null!"); - } - deviceKey = `${type}_${dirId}_${vmsId}`; - } - break; - case import_constants.DeviceType["VMS"]: - deviceKey = `${type}_${item["id"]}`; - break; - case import_constants.DeviceType["CAMERA"]: - { - let vmsId = (0, import_lodash_es.get)(item, "extendInfo.vmsPlatformId"); - if (!vmsId && vmsId !== 0) { - console.error("vmsId type is null!"); - } - deviceKey = `${type}_${item.id}`; - } - break; - } - return deviceKey; -} -function deviceKeyToDeviceId(deviceKey) { - let [type, id] = deviceKey.split("_"); - return type === import_constants.DeviceType["DIR"] ? id : Number(id); -} -var getVmsIdByDeviceId = (key) => { - const type = getDeviceType(key); - let vmsId = ""; - switch (type) { - case import_constants.DeviceType["CAMERA"]: - case import_constants.DeviceType["DIR"]: - vmsId = key.split("_")[2]; - break; - case import_constants.DeviceType["VMS"]: - vmsId = key.split("_")[1]; - break; - } - if (!vmsId) { - console.error("vmsid is null!"); - } - return vmsId; -}; -var findCamerasByInDeviceTree = (ids = [], deviceTree, type = "id") => { - let cameraInfoList = []; - let _ids = ids.map((v) => String(v)); - (0, import_utils.loop)(deviceTree, (item) => { - let isCamera = getDeviceType((0, import_lodash_es.get)(item, "key", "")) === import_constants.DeviceType["CAMERA"]; - let isMatch = type === "key" ? _ids.includes((0, import_lodash_es.get)(item, "key")) : _ids.includes(`${(0, import_lodash_es.get)(item, "origin.id")}`); - if (isCamera && isMatch) { - cameraInfoList.push(item); - } - }); - return cameraInfoList; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - deviceIDToDeviceKey, - deviceKeyToDeviceId, - deviceToDeviceKey, - findCamerasByInDeviceTree, - getDeviceType, - getVmsIdByDeviceId, - isFaceCamera -}); diff --git a/packages/func/lib/file/index.d.ts b/packages/func/lib/file/index.d.ts deleted file mode 100644 index dabc536..0000000 --- a/packages/func/lib/file/index.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export declare type Rect = { - x: number; - y: number; - w: number; - h: number; -}; -/** - * - * @param url 需要转为图片的链接 - * @returns 图片的 dom - */ -export declare const urlToImg: (url: string) => Promise; -export declare const base64DecodeImageKey: (base64ImgKey: string) => string; -/** - * 通过url获取图片的base64字符串 - * @param src 图片链接 - * @param outputFormat 图片格式 - * @returns base64 @string - */ -export declare const getBase64ByUrl: (src: string | URL, outputFormat?: string) => Promise; -/** - * 把文件转base64 - * @param file @file 文件 - * @returns @string - */ -export declare const fileToBase64: (file: any) => Promise; -/** - * - * @param image @file 图片文件 - * @param width @number 宽度 - * @param height @number 高度 - * @returns @string base64 - */ -export declare const getBase64Image: (image: any, width?: any, height?: any) => string; -/** - * 通过图片获取base64 - * @param src 图片地址 - * @returns @string - */ -export declare const getBase64ByImage: (src: string) => Promise; -/** - * url转base64 - * @param {String} url - url地址 - */ -export declare const urlToBase64V2: (url: string) => Promise; -/** - * base64转Blob - * @param {String} base64 - base64 - */ -export declare function base64toBlob(base64: string): Blob | undefined; -/** - * 图片集打包压缩下载 - * 1. url -> base64 -> blob - * 2. 将blob加入jsZip文件夹内,用file-saver保存 - * @param {Array<{url:string,name:string}>} imgDataList - * @param {string} zipName - */ -export declare const downloadPackageImages: (imgDataList: string | any[], zipName: string) => Promise; -export declare function getFileSize(size: number): string; -export declare const dataURLToBlob: (dataurl: string) => Blob; -/** - * key 转 http 链接 - * @param originImgkey 图片的值 ,可以是 base64 也可以是 http链接 - * @param host 图片的域值 - * @returns {string} - */ -export declare const generateImg: (imgKey: string, host?: string) => string; -/** - * 获取指定字符串后面的部分 - * @param imageKey v1_开头的字符串 - * @returns - */ -export declare const getImageKey: (imageKey: string, preFix?: string) => string; -/** - * 获取图片 - * @param img 图片的url链接 - * @param odRect - * @returns file - */ -export declare const getFileByRect: (img: string, odRect: Rect) => Promise; diff --git a/packages/func/lib/file/index.js b/packages/func/lib/file/index.js deleted file mode 100644 index 059ee7e..0000000 --- a/packages/func/lib/file/index.js +++ /dev/null @@ -1,308 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/file/index.ts -var file_exports = {}; -__export(file_exports, { - base64DecodeImageKey: () => base64DecodeImageKey, - base64toBlob: () => base64toBlob, - dataURLToBlob: () => dataURLToBlob, - downloadPackageImages: () => downloadPackageImages, - fileToBase64: () => fileToBase64, - generateImg: () => generateImg, - getBase64ByImage: () => getBase64ByImage, - getBase64ByUrl: () => getBase64ByUrl, - getBase64Image: () => getBase64Image, - getFileByRect: () => getFileByRect, - getFileSize: () => getFileSize, - getImageKey: () => getImageKey, - urlToBase64V2: () => urlToBase64V2, - urlToImg: () => urlToImg -}); -module.exports = __toCommonJS(file_exports); -var import_base_64 = __toESM(require("base-64")); -var import_jszip = __toESM(require("jszip")); -var import_file_saver = __toESM(require("file-saver")); -var import_utils = require("../utils"); -var import_lodash_es = require("lodash-es"); -var urlToImg = (url) => { - const resImage = new Promise((resolve) => { - const image = new Image(); - image.crossOrigin = ""; - image.src = url; - image.onload = () => { - resolve(image); - }; - }); - return resImage; -}; -var base64DecodeImageKey = (base64ImgKey) => { - let tempStr = base64ImgKey; - if ((0, import_utils.matchS3Prefix)(tempStr)) { - tempStr = tempStr.replace(/^v[0-9]_/, ""); - tempStr = import_base_64.default.decode(tempStr); - } - const [bucket, ...pathArr] = tempStr.split("_"); - return tempStr = `${bucket}/${pathArr.join("_")}`; -}; -var getBase64ByUrl = function(src, outputFormat = "image/png") { - return new Promise((resolve, reject) => { - const xhr = new XMLHttpRequest(); - xhr.open("GET", src, true); - xhr.responseType = "arraybuffer"; - xhr.onload = function(e) { - if (Number(xhr.status) === 200) { - const uInt8Array = new Uint8Array(xhr.response); - let i = uInt8Array.length; - const binaryString = new Array(i); - while (i--) { - binaryString[i] = String.fromCharCode(uInt8Array[i]); - } - const data = binaryString.join(""); - const base64 = window.btoa(data); - const dataUrl = "data:" + (outputFormat || "image/png") + ";base64," + base64; - resolve(dataUrl); - } else { - reject(e); - } - }; - xhr.onerror = (e) => { - reject(e); - }; - xhr.send(); - }); -}; -var fileToBase64 = (file) => { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.readAsDataURL(file); - reader.onload = function(e) { - resolve(e == null ? void 0 : e.target.result); - }; - reader.onerror = function(e) { - reject(e); - }; - }); -}; -var getBase64Image = (image, width, height) => { - const canvas = document.createElement("canvas"); - canvas.width = width !== void 0 ? width : image.width; - canvas.height = height !== void 0 ? height : image.height; - const ctx = canvas.getContext("2d"); - ctx == null ? void 0 : ctx.drawImage(image, 0, 0, canvas.width, canvas.height); - const ext = image.src.substring(image.src.lastIndexOf(".") + 1).toLowerCase(); - const dataURL = canvas.toDataURL("image/" + ext); - return dataURL; -}; -var getBase64ByImage = function(src) { - return new Promise((resolve, reject) => { - const image = new Image(); - const timestamp = (/* @__PURE__ */ new Date()).getTime(); - const imgUrl = src + "?" + timestamp; - image.src = imgUrl; - image.onload = function() { - function getBase64Image2(img) { - const canvas = document.createElement("canvas"); - canvas.width = img.width; - canvas.height = img.height; - const ctx = canvas.getContext("2d"); - ctx == null ? void 0 : ctx.drawImage(img, 0, 0, img.width, img.height); - const ext = img.src.substring(img.src.lastIndexOf(".") + 1).toLowerCase(); - const dataURL = canvas.toDataURL("image/" + ext); - return dataURL; - } - const base64 = getBase64Image2(image); - resolve(base64); - }; - image.onerror = (e) => { - reject(e); - }; - }); -}; -var urlToBase64V2 = (url) => { - return new Promise((resolve, reject) => { - let image = new Image(); - image.onload = function() { - var _a; - let canvas = document.createElement("canvas"); - canvas.width = image.naturalWidth; - canvas.height = image.naturalHeight; - (_a = canvas == null ? void 0 : canvas.getContext("2d")) == null ? void 0 : _a.drawImage(image, 0, 0); - let result = canvas.toDataURL("image/png"); - resolve(result); - }; - const imgUrl = url; - image.setAttribute("crossOrigin", "Anonymous"); - image.src = imgUrl; - image.onerror = () => { - reject(new Error("Images fail to load")); - }; - }).catch((error) => { - throw new Error(error); - }); -}; -function base64toBlob(base64) { - if (!base64) return; - var arr = base64.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); -} -var downloadPackageImages = async (imgDataList, zipName) => { - let imgDataDownLoadList = []; - let imgBlobList = []; - let imageSuffix = []; - let zip = new import_jszip.default(); - let img = zip.folder(zipName); - try { - for (let i2 = 0; i2 < imgDataList.length; i2++) { - let src = imgDataList[i2].url; - let suffix = src.substring(src.lastIndexOf(".")); - let base64ByUrl = await urlToBase64V2(imgDataList[i2].url); - if (!base64ByUrl) continue; - let blob = base64toBlob(base64ByUrl); - imgDataDownLoadList.push(imgDataList[i2]); - imgBlobList.push(blob); - imageSuffix.push(suffix); - } - if (imgBlobList.length === 0) throw new Error("The number of pictures is zero !"); - if (imgBlobList.length > 0) { - for (var i = 0; i < imgBlobList.length; i++) { - img == null ? void 0 : img.file( - imgDataDownLoadList[i].name + (0, import_lodash_es.get)(imageSuffix, `.${i}`, imageSuffix[0]), - // @ts-ignore - imgBlobList[i], - { - base64: true - } - ); - } - } - zip.generateAsync({ type: "blob" }).then(function(content) { - import_file_saver.default.saveAs(content, zipName + ".zip"); - }); - } catch (error) { - throw new Error(error); - } -}; -function getFileSize(size) { - if (!size) return ""; - var num = 1024; - if (size < num) return size + "B"; - if (size < Math.pow(num, 2)) return (size / num).toFixed(2) + "K"; - if (size < Math.pow(num, 3)) return (size / Math.pow(num, 2)).toFixed(2) + "M"; - if (size < Math.pow(num, 4)) return (size / Math.pow(num, 3)).toFixed(2) + "G"; - return (size / Math.pow(num, 4)).toFixed(2) + "T"; -} -var dataURLToBlob = (dataurl) => { - const arr = dataurl.split(","); - const mime = arr[0].match(/:(.*?);/)[1]; - const bstr = atob(arr[1]); - let n = bstr.length; - const u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); -}; -var generateImg = (_imgKey, host = "http://10.0.0.120") => { - let imgKey = _imgKey; - let imgUrl = ""; - if (!imgKey) return ""; - if (/(http|https):\/\/([\w.]+\/?)\S*/ig.test(imgKey)) { - return imgKey; - } - try { - if ((0, import_utils.matchS3Prefix)(imgKey)) { - imgKey = base64DecodeImageKey(imgKey); - if (imgKey.endsWith("/")) { - const i = imgKey.substring(0, imgKey.length - 1); - imgKey = i; - } - } - imgUrl = `${host}/file/${imgKey}`; - if (_imgKey.includes("v3")) { - imgUrl = `${host}/minio/${imgKey}`; - } - } catch (error) { - console.error(error); - imgUrl = ""; - } - return imgUrl; -}; -var getImageKey = (imageKey, preFix) => { - const splitIndex = preFix || "v1_"; - if (imageKey.startsWith(splitIndex)) { - return window.atob(imageKey.split(splitIndex)[1]).replace("_", "/"); - } else { - return imageKey; - } -}; -var getFileByRect = async (img, odRect) => { - var _a; - let image; - if ((0, import_lodash_es.isString)(img)) { - const url = generateImg(img); - image = await urlToImg(url); - } else { - image = img; - } - const commonCanvas = document.createElement("canvas"); - commonCanvas.width = odRect.w * image.width; - commonCanvas.height = odRect.h * image.height; - commonCanvas.style.display = "none"; - document.body.appendChild(commonCanvas); - const commonCtx = commonCanvas.getContext("2d"); - commonCtx == null ? void 0 : commonCtx.translate(-odRect.x * image.width, -odRect.y * image.height); - commonCtx == null ? void 0 : commonCtx.drawImage(image, 0, 0); - const base64 = commonCanvas.toDataURL("image/jpeg"); - const blobData = dataURLToBlob(base64); - (_a = commonCanvas.parentNode) == null ? void 0 : _a.removeChild(commonCanvas); - const file = new window.File([blobData], `${(/* @__PURE__ */ new Date()).getTime()}`, { - type: "image/jpeg" - }); - return file; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - base64DecodeImageKey, - base64toBlob, - dataURLToBlob, - downloadPackageImages, - fileToBase64, - generateImg, - getBase64ByImage, - getBase64ByUrl, - getBase64Image, - getFileByRect, - getFileSize, - getImageKey, - urlToBase64V2, - urlToImg -}); diff --git a/packages/func/lib/index.d.ts b/packages/func/lib/index.d.ts deleted file mode 100644 index 39ccf20..0000000 --- a/packages/func/lib/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from 'lodash-es'; -export * from './file'; -export * from './map'; -export * from './performance'; -export * from './string'; -export * from './number'; -export * from './time'; -export * from './utils'; -export * from './camera'; -export * from './math'; diff --git a/packages/func/lib/index.js b/packages/func/lib/index.js deleted file mode 100644 index eb2aaa8..0000000 --- a/packages/func/lib/index.js +++ /dev/null @@ -1,41 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.tsx -var src_exports = {}; -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, require("lodash-es"), module.exports); -__reExport(src_exports, require("./file"), module.exports); -__reExport(src_exports, require("./map"), module.exports); -__reExport(src_exports, require("./performance"), module.exports); -__reExport(src_exports, require("./string"), module.exports); -__reExport(src_exports, require("./number"), module.exports); -__reExport(src_exports, require("./time"), module.exports); -__reExport(src_exports, require("./utils"), module.exports); -__reExport(src_exports, require("./camera"), module.exports); -__reExport(src_exports, require("./math"), module.exports); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ...require("lodash-es"), - ...require("./file"), - ...require("./map"), - ...require("./performance"), - ...require("./string"), - ...require("./number"), - ...require("./time"), - ...require("./utils"), - ...require("./camera"), - ...require("./math") -}); diff --git a/packages/func/lib/map/index.d.ts b/packages/func/lib/map/index.d.ts deleted file mode 100644 index 08fa4a2..0000000 --- a/packages/func/lib/map/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 获取经纬信息 - * @param lngLat 位置信息 - * @returns @object { long, lat } - */ -export declare const fixedLngLat: (lngLat?: string) => string; -export declare const transformLngLat: (lngLat?: string) => { - longitude: number; - latitude: number; -} | null; diff --git a/packages/func/lib/map/index.js b/packages/func/lib/map/index.js deleted file mode 100644 index 39c614a..0000000 --- a/packages/func/lib/map/index.js +++ /dev/null @@ -1,54 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/map/index.ts -var map_exports = {}; -__export(map_exports, { - fixedLngLat: () => fixedLngLat, - transformLngLat: () => transformLngLat -}); -module.exports = __toCommonJS(map_exports); -var fixedLngLat = (lngLat) => { - if (!lngLat) { - return ""; - } - const lngLatArr = lngLat.split(","); - const longitude = Number(lngLatArr[0]).toFixed(6); - const latitude = Number(lngLatArr[1]).toFixed(6); - if (lngLatArr.length < 2) { - return ""; - } - return `${longitude},${latitude}`; -}; -var transformLngLat = (lngLat) => { - if (lngLat) { - const lngLatArr = lngLat ? lngLat.split(",") : []; - const longitude = Number(lngLatArr[0]); - const latitude = Number(lngLatArr[1]); - if (lngLatArr.length < 2) { - return null; - } - return { longitude, latitude }; - } - return null; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - fixedLngLat, - transformLngLat -}); diff --git a/packages/func/lib/math/index.d.ts b/packages/func/lib/math/index.d.ts deleted file mode 100644 index d87c485..0000000 --- a/packages/func/lib/math/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: {}; -export default _default; diff --git a/packages/func/lib/math/index.js b/packages/func/lib/math/index.js deleted file mode 100644 index 7b14521..0000000 --- a/packages/func/lib/math/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/math/index.ts -var math_exports = {}; -__export(math_exports, { - default: () => math_default -}); -module.exports = __toCommonJS(math_exports); -var math_default = {}; diff --git a/packages/func/lib/number/index.d.ts b/packages/func/lib/number/index.d.ts deleted file mode 100644 index b8e65be..0000000 --- a/packages/func/lib/number/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * 设置数据的精度 - * @param originNumber - * @param accuracy 精度 以原点为中心向左为正,向右为负, - * @param isCeil 是否为向上取整 - * @returns number - */ -export declare const setNumberAccuracy: (originNumber: number, accuracy?: number, isCeil?: boolean) => number; -/** - * 获取数字 - * @param number 需要校验的数值 - * @returns @number - */ -export declare const toRealNumber: (number: any) => any; diff --git a/packages/func/lib/number/index.js b/packages/func/lib/number/index.js deleted file mode 100644 index af2ab79..0000000 --- a/packages/func/lib/number/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/number/index.ts -var number_exports = {}; -__export(number_exports, { - setNumberAccuracy: () => setNumberAccuracy, - toRealNumber: () => toRealNumber -}); -module.exports = __toCommonJS(number_exports); -var setNumberAccuracy = (originNumber, accuracy = 0, isCeil = true) => { - if (originNumber === 0) { - return 0; - } - let returnData = 0; - if (isCeil) { - returnData = Math.ceil(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } else { - returnData = Math.floor(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } - if (accuracy < 0) { - returnData = Number(returnData.toFixed(-accuracy)); - } else { - returnData = Number(returnData.toFixed(0)); - } - return returnData; -}; -var toRealNumber = (number) => { - if (isNaN(number) || number === Infinity) { - return 0; - } else return number; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - setNumberAccuracy, - toRealNumber -}); diff --git a/packages/func/lib/performance/index.d.ts b/packages/func/lib/performance/index.d.ts deleted file mode 100644 index 22dd838..0000000 --- a/packages/func/lib/performance/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const speedConvert: (bps: number, contertUnit?: number) => string; diff --git a/packages/func/lib/performance/index.js b/packages/func/lib/performance/index.js deleted file mode 100644 index 972dfb8..0000000 --- a/packages/func/lib/performance/index.js +++ /dev/null @@ -1,40 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/performance/index.ts -var performance_exports = {}; -__export(performance_exports, { - speedConvert: () => speedConvert -}); -module.exports = __toCommonJS(performance_exports); -var speedConvert = (bps, contertUnit = 8) => { - if (bps === void 0) return `0KB/s`; - const byte = bps / contertUnit; - if (bps > 1024 * 1024 * 1024) { - return `${(byte / 1024 / 1024 / 1024).toFixed(2)}GB/s`; - } else if (byte > 1024 * 1024) { - return `${(byte / 1024 / 1024).toFixed(2)}MB/s`; - } else if (byte > 1024) { - return `${(byte / 1024).toFixed(2)}KB/s`; - } - return `${byte}KB/s`; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - speedConvert -}); diff --git a/packages/func/lib/string/index.js b/packages/func/lib/string/index.js deleted file mode 100644 index b9118fb..0000000 --- a/packages/func/lib/string/index.js +++ /dev/null @@ -1,99 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/string/index.ts -var string_exports = {}; -__export(string_exports, { - cutStr: () => cutStr, - getStrLength: () => getStrLength, - getValueByUrl: () => getValueByUrl, - isUrl: () => isUrl, - jumpTo: () => jumpTo, - pxToRem: () => pxToRem -}); -module.exports = __toCommonJS(string_exports); -var getStrLength = function(str) { - var realLength = 0, len = str.length, charCode = -1; - for (var i = 0; i < len; i++) { - charCode = str.charCodeAt(i); - if (charCode >= 0 && charCode <= 128) realLength += 1; - else realLength += 2; - } - return realLength; -}; -var cutStr = function cutstr(str, len) { - var str_length = 0; - var str_len = 0; - let str_cut = new String(); - str_len = str.length; - for (var i = 0; i < str_len; i++) { - let a = str.charAt(i); - str_length++; - if (escape(a).length > 4) { - str_length++; - } - str_cut = str_cut.concat(a); - if (str_length >= len) { - str_cut = str_cut.concat("..."); - return str_cut; - } - } - if (str_length < len) { - return str; - } -}; -var isUrl = (str) => { - try { - new URL(str); - return true; - } catch (err) { - return false; - } -}; -var getValueByUrl = (key, str) => { - let result = null; - if (isUrl(str)) { - result = new URL(str).searchParams.get(key); - } else { - result = new URLSearchParams(str.indexOf("?") > -1 ? str : `?${str}`).get(key); - } - return result; -}; -var pxToRem = (value, rootFontSize) => { - const fontSize = rootFontSize || 80; - const valueArr = value.split(" "); - return valueArr.filter((o) => o).map((val) => parseFloat(val) / fontSize + "rem").join(" "); -}; -var jumpTo = (to) => { - const from = location.origin + location.pathname; - if (!isUrl(to)) { - throw Error(`\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\uFF0C\u4EE5http(s)://\u5F00\u5934\uFF01'`); - } - let _targetUrl = new URL(to); - _targetUrl.searchParams.set("from", from); - return _targetUrl; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - cutStr, - getStrLength, - getValueByUrl, - isUrl, - jumpTo, - pxToRem -}); diff --git a/packages/func/lib/time/index.d.ts b/packages/func/lib/time/index.d.ts deleted file mode 100644 index 28b4d03..0000000 --- a/packages/func/lib/time/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare const formateDuration: (diff: number) => string; -export declare function generateTime(): { - startDateTime: number; - endDateTime: number; -}; -/** - * 格式化时间为 00:00 - * @param seconds 时间,单位秒 - * @returns - */ -export declare function formatDurationTime(seconds: number): string; diff --git a/packages/func/lib/time/index.js b/packages/func/lib/time/index.js deleted file mode 100644 index ba4fcef..0000000 --- a/packages/func/lib/time/index.js +++ /dev/null @@ -1,73 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/time/index.ts -var time_exports = {}; -__export(time_exports, { - formatDurationTime: () => formatDurationTime, - formateDuration: () => formateDuration, - generateTime: () => generateTime -}); -module.exports = __toCommonJS(time_exports); -var import_dayjs = __toESM(require("dayjs")); -var formateDuration = (diff) => { - var days = Math.floor(diff / (24 * 3600 * 1e3)); - var leave1 = diff % (24 * 3600 * 1e3); - var hours = Math.floor(leave1 / (3600 * 1e3)); - var leave2 = leave1 % (3600 * 1e3); - var minutes = Math.floor(leave2 / (60 * 1e3)); - var leave3 = leave2 % (60 * 1e3); - var seconds = Math.round(leave3 / 1e3); - var returnStr = seconds + "\u79D2"; - if (minutes > 0) { - returnStr = minutes + "\u5206"; - } - if (hours > 0) { - returnStr = hours + "\u5C0F\u65F6"; - } - if (days > 0) { - returnStr = days + "\u5929"; - } - return returnStr; -}; -function generateTime() { - let endDateTime = (0, import_dayjs.default)().endOf("day").unix(); - let startDateTime = (0, import_dayjs.default)().startOf("day").unix(); - return { startDateTime, endDateTime }; -} -function formatDurationTime(seconds) { - var minutes = Math.floor(seconds / 60) || 0; - var remainingSeconds = Math.floor(seconds % 60); - return (minutes < 10 ? `0${minutes}` : minutes) + ":" + (remainingSeconds < 10 ? "0" : "") + remainingSeconds; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - formatDurationTime, - formateDuration, - generateTime -}); diff --git a/packages/func/lib/utils/index.d.ts b/packages/func/lib/utils/index.d.ts deleted file mode 100644 index 4a5e574..0000000 --- a/packages/func/lib/utils/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export { default as isChrome } from './isChrome'; -export declare const matchS3Prefix: (str: string) => boolean; -/** - * 通过文件名获取文件类型 - * @param fileName 文件名称 - * @returns 文件类型 - */ -export declare const getFileSuffix: (fileName: string) => string; -/** - * 通过类型获取文件名 - * @param type 类型 - * @returns - */ -export declare const getImageSuffixByFileType: (type: string) => string; -export declare function getChromeVersion(): number | false; -export declare const nextTick: (func: (value: void) => void | PromiseLike) => void; -export declare const loop: (items: string | any[], callback: (arg0: any) => any) => void; -export declare const addEventListenerWrapper: (target: any, eventType: string, cb: any, option?: any) => { - remove: () => void; -}; -/** - * Get transforms base on the given object. - * @param {Object} obj - The target object. - * @returns {string} A string contains transform values. - */ -export declare function getTransforms({ rotate, scaleX, scaleY, translateX, translateY, }: { - rotate?: number; - scaleX?: number; - scaleY?: number; - translateX?: number; - translateY?: number; -}): { - WebkitTransform: string; - msTransform: string; - transform: string; -}; diff --git a/packages/func/lib/utils/index.js b/packages/func/lib/utils/index.js deleted file mode 100644 index 09e3faa..0000000 --- a/packages/func/lib/utils/index.js +++ /dev/null @@ -1,170 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/utils/index.ts -var utils_exports = {}; -__export(utils_exports, { - addEventListenerWrapper: () => addEventListenerWrapper, - getChromeVersion: () => getChromeVersion, - getFileSuffix: () => getFileSuffix, - getImageSuffixByFileType: () => getImageSuffixByFileType, - getTransforms: () => getTransforms, - isChrome: () => import_isChrome.default, - loop: () => loop, - matchS3Prefix: () => matchS3Prefix, - nextTick: () => nextTick -}); -module.exports = __toCommonJS(utils_exports); -var import_lodash_es = require("lodash-es"); -var import_react_dom = __toESM(require("react-dom")); -var import_isChrome = __toESM(require("./isChrome")); -var matchS3Prefix = (str) => { - return /^v[0-9]_/.test(str); -}; -var getFileSuffix = (fileName) => { - const splitArr = fileName.split("."); - return splitArr.length < 2 ? "" : splitArr[splitArr.length - 1]; -}; -var getImageSuffixByFileType = (type) => { - let imageSuffix = ""; - switch (type) { - case "jpeg": { - imageSuffix = ".jpg"; - break; - } - case "gif": { - imageSuffix = ".gif"; - break; - } - case "png": { - imageSuffix = ".png"; - break; - } - case "vnd.wap.wbmp": { - imageSuffix = ".wbmp"; - break; - } - case "x-up-wpng": { - imageSuffix = ".wpng"; - break; - } - case "nbmp": { - imageSuffix = ".nbmp"; - break; - } - } - return imageSuffix; -}; -function getChromeVersion() { - const arr = navigator.userAgent.split(" "); - let chromeVersion = ""; - for (let i = 0; i < arr.length; i++) { - if (/chrome/i.test(arr[i])) chromeVersion = arr[i]; - } - if (chromeVersion) { - return Number(chromeVersion.split("/")[1].split(".")[0]); - } else { - return false; - } -} -var nextTick = (func) => { - if (queueMicrotask) { - queueMicrotask(func); - return; - } - Promise.resolve().then(func); -}; -var loop = (items, callback) => { - for (let i = 0; i < items.length; i++) { - const element = items[i]; - let isBreak = callback(element); - if (isBreak) { - return; - } - if (element["children"]) { - loop(element["children"], callback); - } - } -}; -var addEventListenerWrapper = (target, eventType, cb, option) => { - const callback = import_react_dom.default.unstable_batchedUpdates ? function run(e) { - import_react_dom.default.unstable_batchedUpdates(cb, e); - } : cb; - if (target.addEventListener) { - target.addEventListener(eventType, callback, option); - } - return { - remove: () => { - if (target.removeEventListener) { - target.removeEventListener(eventType, callback); - } - } - }; -}; -function getTransforms({ - rotate, - scaleX, - scaleY, - translateX, - translateY -}) { - const values = []; - if ((0, import_lodash_es.isNumber)(translateX) && translateX !== 0) { - values.push(`translateX(${translateX}px)`); - } - if ((0, import_lodash_es.isNumber)(translateY) && translateY !== 0) { - values.push(`translateY(${translateY}px)`); - } - if ((0, import_lodash_es.isNumber)(rotate) && rotate !== 0) { - values.push(`rotate(${rotate}deg)`); - } - if ((0, import_lodash_es.isNumber)(scaleX) && scaleX !== 1) { - values.push(`scaleX(${scaleX})`); - } - if ((0, import_lodash_es.isNumber)(scaleY) && scaleY !== 1) { - values.push(`scaleY(${scaleY})`); - } - const transform = values.length ? values.join(" ") : "none"; - return { - WebkitTransform: transform, - msTransform: transform, - transform - }; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - addEventListenerWrapper, - getChromeVersion, - getFileSuffix, - getImageSuffixByFileType, - getTransforms, - isChrome, - loop, - matchS3Prefix, - nextTick -}); diff --git a/packages/func/lib/utils/isChrome.d.ts b/packages/func/lib/utils/isChrome.d.ts deleted file mode 100644 index 2d07ceb..0000000 --- a/packages/func/lib/utils/isChrome.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const isBrowser: boolean; -declare const isChrome: () => boolean; -export default isChrome; diff --git a/packages/func/lib/utils/isChrome.js b/packages/func/lib/utils/isChrome.js deleted file mode 100644 index 4ad2681..0000000 --- a/packages/func/lib/utils/isChrome.js +++ /dev/null @@ -1,42 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/utils/isChrome.ts -var isChrome_exports = {}; -__export(isChrome_exports, { - default: () => isChrome_default, - isBrowser: () => isBrowser -}); -module.exports = __toCommonJS(isChrome_exports); -var isBrowser = !!(typeof window !== "undefined" && window.document && window.document.createElement); -var isChrome = () => { - const winNav = isBrowser && window.navigator; - const vendorName = winNav && (winNav == null ? void 0 : winNav.vendor); - const userAgent = winNav && winNav.userAgent; - const isChromium = isBrowser && typeof chrome !== "undefined"; - const isOpera = isBrowser && typeof opr !== "undefined"; - const isIEedge = userAgent && userAgent.indexOf("Edge") > -1; - const isIOSChrome = !!(userAgent && userAgent.match("CriOS")); - const isDesktopChrome = isChromium && vendorName === "Google Inc." && !isOpera && !isIEedge; - return isIOSChrome || isDesktopChrome; -}; -var isChrome_default = isChrome; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - isBrowser -}); diff --git a/packages/hooks/dist/umd/hooks.min.js b/packages/hooks/dist/umd/hooks.min.js deleted file mode 100644 index 059a5cd..0000000 --- a/packages/hooks/dist/umd/hooks.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["zhst-hooks"]=e():t["zhst-hooks"]=e()}(self,(function(){return function(){var t={408:function(t,e,n){var r,o,i,u=n(4273).default;i=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",o="minute",i="hour",c="day",a="week",s="month",f="quarter",l="year",d="date",v="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var c=e.name;w[c]=e,o=c}return!r&&o&&(b=o),o||!r&&b},x=function(t,e){if(E(t))return t.clone();var n="object"==u(e)?e:{};return n.date=t,n.args=arguments,new j(n)},O=y;O.l=S,O.i=E,O.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var j=function(){function u(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var m=u.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===v)},m.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return x(t)0}});else{var t=function(t){for(var e=window.document,n=i(e);n;)n=i(e=n.ownerDocument);return e}(),e=[],n=null,o=null;c.prototype.THROTTLE_TIMEOUT=100,c.prototype.POLL_INTERVAL=null,c.prototype.USE_MUTATION_OBSERVER=!0,c._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?d(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),n},c._resetCrossOriginUpdater=function(){n=null,o=null},c.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},c.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},c.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},c.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},c.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},c.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},c.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var r=this._checkForIntersections,o=null,u=null;this.POLL_INTERVAL?o=n.setInterval(r,this.POLL_INTERVAL):(a(n,"resize",r,!0),a(e,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(u=new n.MutationObserver(r)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(o&&t.clearInterval(o),s(t,"resize",r,!0)),s(e,"scroll",r,!0),u&&u.disconnect()}));var c=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=c){var f=i(e);f&&this._monitorIntersections(f.ownerDocument)}}},c.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||t,o=this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=r;){var o=i(n);if((n=o&&o.ownerDocument)==e)return!0}return!1}));if(!o){var u=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),u(),e!=r){var c=i(e);c&&this._unmonitorIntersections(c.ownerDocument)}}}},c.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&m>=0&&{top:a,bottom:s,left:l,right:v,width:p,height:m}||null),!g)break;y=y&&h(y)}return g}},c.prototype._getRootRect=function(){var e;if(this.root&&!p(this.root))e=f(this.root);else{var n=p(this.root)?this.root:t,r=n.documentElement,o=n.body;e={top:0,left:0,right:r.clientWidth||o.clientWidth,width:r.clientWidth||o.clientWidth,bottom:r.clientHeight||o.clientHeight,height:r.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},c.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},c.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,r=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==r)for(var o=0;of))return!1;var d=a.get(t),v=a.get(e);if(d&&v)return d==e&&v==t;var h=-1,p=!0,m=2&n?new r:void 0;for(a.set(t,e),a.set(e,t);++h-1&&t%1==0&&t-1}},4210:function(t,e,n){var r=n(9818);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},8891:function(t,e,n){var r=n(2553),o=n(3924),i=n(1768);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},8862:function(t,e,n){var r=n(2282);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},23:function(t,e,n){var r=n(2282);t.exports=function(t){return r(this,t).get(t)}},6913:function(t,e,n){var r=n(2282);t.exports=function(t){return r(this,t).has(t)}},438:function(t,e,n){var r=n(2282);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},5034:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2050:function(t,e,n){var r=n(7209)(Object,"create");t.exports=r},1051:function(t,e,n){var r=n(367)(Object.keys,Object);t.exports=r},2236:function(t,e,n){t=n.nmd(t);var r=n(4273).default,o=n(4792),i="object"==r(e)&&e&&!e.nodeType&&e,u=i&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===i&&o.process,a=function(){try{var t=u&&u.require&&u.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=a},5670:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},367:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},9566:function(t,e,n){var r=n(4273).default,o=n(4792),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,u=o||i||Function("return this")();t.exports=u},4409:function(t){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},4183:function(t){t.exports=function(t){return this.__data__.has(t)}},2477:function(t){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},3319:function(t,e,n){var r=n(3924);t.exports=function(){this.__data__=new r,this.size=0}},8611:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},1809:function(t){t.exports=function(t){return this.__data__.get(t)}},7310:function(t){t.exports=function(t){return this.__data__.has(t)}},7396:function(t,e,n){var r=n(3924),o=n(1768),i=n(1653);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var u=n.__data__;if(!o||u.length<199)return u.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(u)}return n.set(t,e),this.size=n.size,this}},485:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},1712:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},9347:function(t,e,n){var r=n(1087),o=n(8103),i=n(1864),u=Math.max,c=Math.min;t.exports=function(t,e,n){var a,s,f,l,d,v,h=0,p=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=a,r=s;return a=s=void 0,h=e,l=t.apply(r,n)}function b(t){return h=t,d=setTimeout(_,e),p?y(t):l}function w(t){var n=t-v;return void 0===v||n>=e||n<0||m&&t-h>=f}function _(){var t=o();if(w(t))return E(t);d=setTimeout(_,function(t){var n=e-(t-v);return m?c(n,f-(t-h)):n}(t))}function E(t){return d=void 0,g&&a?y(t):(a=s=void 0,l)}function S(){var t=o(),n=w(t);if(a=arguments,s=this,v=t,n){if(void 0===d)return b(v);if(m)return clearTimeout(d),d=setTimeout(_,e),y(v)}return void 0===d&&(d=setTimeout(_,e)),l}return e=i(e)||0,r(n)&&(p=!!n.leading,f=(m="maxWait"in n)?u(i(n.maxWait)||0,e):f,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==d&&clearTimeout(d),h=0,a=v=s=d=void 0},S.flush=function(){return void 0===d?l:E(o())},S}},4802:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},2971:function(t,e,n){var r=n(605),o=n(8991),i=Object.prototype,u=i.hasOwnProperty,c=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&u.call(t,"callee")&&!c.call(t,"callee")};t.exports=a},7692:function(t){var e=Array.isArray;t.exports=e},4843:function(t,e,n){var r=n(5176),o=n(3407);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},2159:function(t,e,n){t=n.nmd(t);var r=n(4273).default,o=n(9566),i=n(9728),u="object"==r(e)&&e&&!e.nodeType&&e,c=u&&"object"==r(t)&&t&&!t.nodeType&&t,a=c&&c.exports===u?o.Buffer:void 0,s=(a?a.isBuffer:void 0)||i;t.exports=s},3769:function(t,e,n){var r=n(2598);t.exports=function(t,e){return r(t,e)}},5176:function(t,e,n){var r=n(5269),o=n(1087);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},3407:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},1087:function(t,e,n){var r=n(4273).default;t.exports=function(t){var e=r(t);return null!=t&&("object"==e||"function"==e)}},8991:function(t,e,n){var r=n(4273).default;t.exports=function(t){return null!=t&&"object"==r(t)}},6752:function(t,e,n){var r=n(5269),o=n(4239),i=n(8991),u=Function.prototype,c=Object.prototype,a=u.toString,s=c.hasOwnProperty,f=a.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==f}},1384:function(t,e,n){var r=n(4273).default,o=n(5269),i=n(8991);t.exports=function(t){return"symbol"==r(t)||i(t)&&"[object Symbol]"==o(t)}},9066:function(t,e,n){var r=n(9740),o=n(1765),i=n(2236),u=i&&i.isTypedArray,c=u?o(u):r;t.exports=c},9068:function(t,e,n){var r=n(2153),o=n(6890),i=n(4843);t.exports=function(t){return i(t)?r(t):o(t)}},8103:function(t,e,n){var r=n(9566);t.exports=function(){return r.Date.now()}},5749:function(t){t.exports=function(){return[]}},9728:function(t){t.exports=function(){return!1}},1704:function(t,e,n){var r=n(9347),o=n(1087);t.exports=function(t,e,n){var i=!0,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,u="trailing"in n?!!n.trailing:u),r(t,e,{leading:i,maxWait:e,trailing:u})}},1864:function(t,e,n){var r=n(1811),o=n(1087),i=n(1384),u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=c.test(t);return n||a.test(t)?s(t.slice(2),n?2:8):u.test(t)?NaN:+t}},8558:function(t,e,n){"use strict";var r=n(4273).default,o=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),f=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function b(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||m}function w(){}function _(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(t,e){if("object"!==r(t)&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},b.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=b.prototype;var E=_.prototype=new w;E.constructor=_,g(E,b.prototype),E.isPureReactComponent=!0;var S=Array.isArray,x=Object.prototype.hasOwnProperty,O={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function T(t,e,n){var r,i={},u=null,c=null;if(null!=e)for(r in void 0!==e.ref&&e.ref,void 0!==e.key&&""+e.key,e)x.call(e,r)&&!j.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(10&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function d(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o-1&&(o=setTimeout((function(){x.delete(t)}),e)),x.set(t,u(u({},n),{timer:o}))}(t,i,e),function(t,e){T[t]&&T[t].forEach((function(t){return t(e)}))}(t,e.data)},m=function(t,e){return void 0===e&&(e=[]),f?f(e):function(t){return x.get(t)}(t)};return _((function(){if(r){var t=m(r);t&&Object.hasOwnProperty.call(t,"data")&&(e.state.data=t.data,e.state.params=t.params,(-1===a||(new Date).getTime()-t.time<=a)&&(e.state.loading=!1)),v.current=M(r,(function(t){e.setState({data:t})}))}}),[]),S((function(){var t;null===(t=v.current)||void 0===t||t.call(v)})),r?{onBefore:function(t){var e=m(r,t);return e&&Object.hasOwnProperty.call(e,"data")?-1===a||(new Date).getTime()-e.time<=a?{loading:!1,data:null==e?void 0:e.data,error:void 0,returnNow:!0}:{data:null==e?void 0:e.data,error:void 0}:{}},onRequest:function(t,e){var n=function(t){return j.get(t)}(r);return n&&n!==h.current||(n=t.apply(void 0,d([],l(e),!1)),h.current=n,function(t,e){j.set(t,e),e.then((function(e){return j.delete(t),e})).catch((function(){j.delete(t)}))}(r,n)),{servicePromise:n}},onSuccess:function(t,n){var o;r&&(null===(o=v.current)||void 0===o||o.call(v),p(r,{data:t,params:n,time:(new Date).getTime()}),v.current=M(r,(function(t){e.setState({data:t})})))},onMutate:function(t){var n;r&&(null===(n=v.current)||void 0===n||n.call(v),p(r,{data:t,params:e.state.params,time:(new Date).getTime()}),v.current=M(r,(function(t){e.setState({data:t})})))}}:{}},R=n(9347),A=n.n(R),C=function(e,n){var r=n.debounceWait,o=n.debounceLeading,i=n.debounceTrailing,u=n.debounceMaxWait,c=(0,t.useRef)(),a=(0,t.useMemo)((function(){var t={};return void 0!==o&&(t.leading=o),void 0!==i&&(t.trailing=i),void 0!==u&&(t.maxWait=u),t}),[o,i,u]);return(0,t.useEffect)((function(){if(r){var t=e.runAsync.bind(e);return c.current=A()((function(t){t()}),r,a),e.runAsync=function(){for(var e=[],n=0;n-1&&$.splice(e,1)}},q=function(e,n){var r=n.refreshOnWindowFocus,o=n.focusTimespan,i=void 0===o?5e3:o,u=(0,t.useRef)(),c=function(){var t;null===(t=u.current)||void 0===t||t.call(u)};return(0,t.useEffect)((function(){if(r){var t=(n=e.refresh.bind(e),o=i,a=!1,function(){for(var t=[],e=0;eo&&(n=Math.max(1,o));var i=l(v.params||[]),c=i[0],a=void 0===c?{}:c,s=i.slice(1);v.run.apply(v,d([u(u({},a),{current:n,pageSize:r})],l(s),!1))},S=function(t){E(t,b)};return u(u({},v),{pagination:{current:g,pageSize:b,total:w,totalPage:_,onChange:m(E),changeCurrent:m(S),changePageSize:m((function(t){E(g,t)}))}})},tt=function(e,n){var r;void 0===n&&(n={});var o=n.form,i=n.defaultType,a=void 0===i?"simple":i,s=n.defaultParams,f=n.manual,v=void 0!==f&&f,h=n.refreshDeps,p=void 0===h?[]:h,y=n.ready,b=void 0===y||y,w=c(n,["form","defaultType","defaultParams","manual","refreshDeps","ready"]),_=Q(e,u({manual:!0},w)),E=_.params,S=void 0===E?[]:E,x=_.run,O=S[2]||{},j=l((0,t.useState)((null==O?void 0:O.type)||a),2),T=j[0],M=j[1],k=(0,t.useRef)({}),R=(0,t.useRef)([]),A=!!(null==o?void 0:o.getInternalHooks),C=function(){if(!o)return{};if(A)return o.getFieldsValue(null,(function(){return!0}));var t=o.getFieldsValue(),e={};return Object.keys(t).forEach((function(n){o.getFieldInstance&&!o.getFieldInstance(n)||(e[n]=t[n])})),e},L=function(){if(o){if(A)return o.setFieldsValue(k.current);var t={};Object.keys(k.current).forEach((function(e){o.getFieldInstance&&!o.getFieldInstance(e)||(t[e]=k.current[e])})),o.setFieldsValue(t)}},D=function(t){b&&setTimeout((function(){(function(){if(!o)return Promise.resolve({});var t=C(),e=Object.keys(t);return A?o.validateFields(e):new Promise((function(t,n){o.validateFields(e,(function(e,r){e?n(e):t(r)}))}))})().then((function(e){void 0===e&&(e={});var r=t||u(u({pageSize:n.defaultPageSize||10},(null==S?void 0:S[0])||{}),{current:1});o?(k.current=u(u({},k.current),e),x(r,e,{allFormData:k.current,type:T})):x(r)})).catch((function(t){return t}))}))};(0,t.useEffect)((function(){if(S.length>0)return k.current=(null==O?void 0:O.allFormData)||{},L(),void x.apply(void 0,d([],l(S),!1));!v&&b&&(k.current=(null==s?void 0:s[1])||{},L(),D(null==s?void 0:s[0]))}),[]),g((function(){b&&L()}),[T]);var F=(0,t.useRef)(!1);return F.current=!1,g((function(){!v&&b&&(F.current=!0,o&&o.resetFields(),k.current=(null==s?void 0:s[1])||{},L(),D(null==s?void 0:s[0]))}),[b]),g((function(){F.current||b&&(v||(F.current=!0,_.pagination.changeCurrent(1)))}),d([],l(p),!1)),u(u({},_),{tableProps:{dataSource:(null===(r=_.data)||void 0===r?void 0:r.list)||R.current,loading:_.loading,onChange:m((function(t,e,n,r){var o=l(S||[]),i=o[0],c=o.slice(1);x.apply(void 0,d([u(u({},i),{current:t.current,pageSize:t.pageSize,filters:e,sorter:n,extra:r})],l(c),!1))})),pagination:{current:_.pagination.current,pageSize:_.pagination.pageSize,total:_.pagination.total}},search:{submit:m((function(t){var e;null===(e=null==t?void 0:t.preventDefault)||void 0===e||e.call(t),D()})),type:T,changeType:m((function(){var t=C();k.current=u(u({},k.current),t),M((function(t){return"simple"===t?"advance":"simple"}))})),reset:m((function(){var t,e;o&&o.resetFields(),D(u(u({},(null==s?void 0:s[0])||{}),{pageSize:n.defaultPageSize||(null===(e=null===(t=n.defaultParams)||void 0===t?void 0:t[0])||void 0===e?void 0:e.pageSize)||10,current:1}))}))}})};var et=function(e,n){(0,t.useEffect)((function(){var t=e(),n=!1;return function(){a(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:if(!v(t[Symbol.asyncIterator]))return[3,4];e.label=1;case 1:return[4,t.next()];case 2:return e.sent().done||n?[3,3]:[3,1];case 3:return[3,6];case 4:return[4,t];case 5:e.sent(),e.label=6;case 6:return[2]}}))}))}(),function(){n=!0}}),n)};var nt=function(e,n){void 0===e&&(e=!1);var r=l((0,t.useState)(e),2),o=r[0],i=r[1];return[o,(0,t.useMemo)((function(){var t=void 0===n?!e:n;return{toggle:function(){return i((function(n){return n===e?t:e}))},set:function(t){return i(t)},setLeft:function(){return i(e)},setRight:function(){return i(t)}}}),[])]};function rt(e){void 0===e&&(e=!1);var n=l(nt(!!e),2),r=n[0],o=n[1],i=o.toggle,u=o.set;return[r,(0,t.useMemo)((function(){return{toggle:i,set:function(t){return u(!!t)},setTrue:function(){return u(!0)},setFalse:function(){return u(!1)}}}),[])]}function ot(t,e){if(D)return t?v(t)?t():"current"in t?t.current:t:e}var it=function(t){if(!t||!document.getRootNode)return document;var e,n=Array.isArray(t)?t:[t];return function(t){return t.every((function(t){var e=ot(t);return!!e&&(e.getRootNode()instanceof ShadowRoot||void 0)}))}(n)&&(e=ot(n[0]))?e.getRootNode():document},ut=function(e){return function(n,r,o){var i=(0,t.useRef)(!1),u=(0,t.useRef)([]),c=(0,t.useRef)([]),a=(0,t.useRef)();e((function(){var t,e=(Array.isArray(o)?o:[o]).map((function(t){return ot(t)}));if(!i.current)return i.current=!0,u.current=e,c.current=r,void(a.current=n());e.length===u.current.length&&w(e,u.current)&&w(r,c.current)||(null===(t=a.current)||void 0===t||t.call(a),u.current=e,c.current=r,a.current=n())})),S((function(){var t;null===(t=a.current)||void 0===t||t.call(a),i.current=!1}))}},ct=ut(t.useEffect);function at(t,e,n){void 0===n&&(n="click");var r=E(t);ct((function(){var t=function(t){(Array.isArray(e)?e:[e]).some((function(e){var n=ot(e);return!n||n.contains(t.target)}))||r.current(t)},o=it(e),i=Array.isArray(n)?n:[n];return i.forEach((function(e){return o.addEventListener(e,t)})),function(){i.forEach((function(e){return o.removeEventListener(e,t)}))}}),Array.isArray(n)?n:[n],e)}var st=function(e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=n.defaultValue,o=n.defaultValuePropName,i=void 0===o?"defaultValue":o,u=n.valuePropName,c=void 0===u?"value":u,a=n.trigger,s=void 0===a?"onChange":a,f=e[c],h=e.hasOwnProperty(c),p=(0,t.useMemo)((function(){return h?f:e.hasOwnProperty(i)?e[i]:r}),[]),g=(0,t.useRef)(p);h&&(g.current=f);var y=X();return[g.current,m((function(t){for(var n=[],r=1;r0?Date.now()+r:void 0:o}),[r,o]),s=l((0,t.useState)((function(){return pt(a)})),2),f=s[0],d=s[1],v=E(c);(0,t.useEffect)((function(){if(a){d(pt(a));var t=setInterval((function(){var e,n=pt(a);d(n),0===n&&(clearInterval(t),null===(e=v.current)||void 0===e||e.call(v))}),u);return function(){return clearInterval(t)}}d(0)}),[a,u]);var h=(0,t.useMemo)((function(){return t=f,{days:Math.floor(t/864e5),hours:Math.floor(t/36e5)%24,minutes:Math.floor(t/6e4)%60,seconds:Math.floor(t/1e3)%60,milliseconds:Math.floor(t)%1e3};var t}),[f]);return[f,h]};function gt(t,e){void 0===e&&(e={});var n=e.min,r=e.max,o=t;return p(r)&&(o=Math.min(r,o)),p(n)&&(o=Math.max(n,o)),o}var yt=function(e,n){void 0===e&&(e=0),void 0===n&&(n={});var r=n.min,o=n.max,i=l((0,t.useState)((function(){return gt(e,{min:r,max:o})})),2),u=i[0],c=i[1],a=function(t){c((function(e){return gt(p(t)?t:t(e),{max:o,min:r})}))};return[u,{inc:m((function(t){void 0===t&&(t=1),a((function(e){return e+t}))})),dec:m((function(t){void 0===t&&(t=1),a((function(e){return e-t}))})),set:m((function(t){a(t)})),reset:m((function(){a(e)}))}]};var bt=function(e,n){var r,o=E(e),i=null!==(r=null==n?void 0:n.wait)&&void 0!==r?r:1e3,u=(0,t.useMemo)((function(){return A()((function(){for(var t=[],e=0;e0?t-1:e.length+t;return n>=e.length-1&&(n=e.length-1),n<0&&(n=0),n}(t,e);return{_current:e[n],_before:e.slice(0,n),_after:e.slice(n+1)}};function Xt(e,n){void 0===n&&(n=0);var r=l((0,t.useState)({present:e,past:[],future:[]}),2),o=r[0],i=r[1],u=o.present,c=o.past,a=o.future,s=(0,t.useRef)(e),f=function(t){var e=p(t)?t:Number(t);if(0!==e)return e>0?function(t){if(void 0===t&&(t=1),0!==a.length){var e=Yt(t,a),n=e._before,r=e._current,o=e._after;i({past:d(d(d([],l(c),!1),[u],!1),l(n),!1),present:r,future:o})}}(e):void function(t){if(void 0===t&&(t=-1),0!==c.length){var e=Yt(t,c),n=e._before,r=e._current,o=e._after;i({past:n,present:r,future:d(d(d([],l(o),!1),[u],!1),l(a),!1)})}}(e)};return{value:u,backLength:c.length,forwardLength:a.length,setValue:m((function(t){var e=d(d([],l(c),!1),[u],!1),r=p(n)?n:Number(n);r>0&&e.length>r&&e.splice(0,1),i({present:t,future:[],past:e})})),go:m(f),back:m((function(){f(-1)})),forward:m((function(){f(1)})),reset:m((function(){for(var t=[],e=0;e0?t[0]:s.current;s.current=n,i({present:n,future:[],past:[]})}))}}var Gt=function(t,e){var n=e||{},r=n.onEnter,o=n.onLeave,i=n.onChange,u=l(rt(!1),2),c=u[0],a=u[1],s=a.setTrue,f=a.setFalse;return Mt("mouseenter",(function(){null==r||r(),s(),null==i||i(!0)}),{target:t}),Mt("mouseleave",(function(){null==o||o(),f(),null==i||i(!1)}),{target:t}),c},Jt=function(e,n){void 0===n&&(n={});var r=n.target,o=n.isNoMore,i=n.threshold,c=void 0===i?100:i,f=n.reloadDeps,v=void 0===f?[]:f,h=n.manual,p=n.onBefore,y=n.onSuccess,b=n.onError,w=n.onFinally,_=l((0,t.useState)(),2),E=_[0],S=_[1],x=l((0,t.useState)(!1),2),O=x[0],j=x[1],T=(0,t.useMemo)((function(){return!!o&&o(E)}),[E]),M=Z((function(t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(i){switch(i.label){case 0:return[4,e(t)];case 1:return n=i.sent(),S(u(u({},n),t?{list:d(d([],l(null!==(o=t.list)&&void 0!==o?o:[]),!1),l(n.list),!1)}:{list:d([],l(null!==(r=n.list)&&void 0!==r?r:[]),!1)})),[2,n]}}))}))}),{manual:h,onFinally:function(t,e,n){j(!1),null==w||w(e,n)},onBefore:function(){return null==p?void 0:p()},onSuccess:function(t){setTimeout((function(){F()})),null==y||y(t)},onError:function(t){return null==b?void 0:b(t)}}),k=M.loading,R=M.run,A=M.runAsync,C=M.cancel,L=m((function(){T||(j(!0),R(E))})),D=m((function(){return T?Promise.reject():(j(!0),A(E))})),F=function(){var t=ot(r);if(t){var e=function(t){return t===document||t===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):t.scrollTop}(t=t===document?document.documentElement:t),n=function(t){return t.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}(t),o=function(t){return t.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)}(t);n-e<=o+c&&L()}};return Mt("scroll",(function(){k||O||F()}),{target:r}),g((function(){R()}),d([],l(v),!1)),{data:E,loading:!O&&k,loadingMore:O,noMore:T,loadMore:L,loadMoreAsync:D,reload:m((function(){return j(!1),R()})),reloadAsync:m((function(){return j(!1),A()})),mutate:S,cancel:C}},Kt=function(e,n,r){void 0===r&&(r={});var o=m(e),i=(0,t.useRef)(null),u=(0,t.useCallback)((function(){i.current&&clearInterval(i.current)}),[]);return(0,t.useEffect)((function(){if(p(n)&&!(n<0))return r.immediate&&o(),i.current=setInterval(o,n),u}),[n,r.immediate]),u};n(6934);var Zt=function(e,n){var r=l((0,t.useState)(),2),o=r[0],i=r[1],c=l((0,t.useState)(),2),a=c[0],s=c[1];return ct((function(){var t=ot(e);if(t){var r=new IntersectionObserver((function(t){var e,n;try{for(var r=f(t),o=r.next();!o.done;o=r.next()){var u=o.value;s(u.intersectionRatio),i(u.isIntersecting)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),u(u({},n),{root:ot(null==n?void 0:n.root)}));return r.observe(t),function(){r.disconnect()}}}),[null==n?void 0:n.rootMargin,null==n?void 0:n.threshold],e),[o,a]},Qt=D?t.useLayoutEffect:t.useEffect,te=function(e,n,r){var o=(0,t.useRef)(),i=(0,t.useRef)(0);xt(n,o.current)||(o.current=n,i.current+=1),ct(e,[i.current],r)},ee={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:/(mac|iphone|ipod|ipad)/i.test("undefined"!=typeof navigator?null===navigator||void 0===navigator?void 0:navigator.platform:"")?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},ne={ctrl:function(t){return t.ctrlKey},shift:function(t){return t.shiftKey},alt:function(t){return t.altKey},meta:function(t){return"keyup"===t.type?ee.meta.includes(t.keyCode):t.metaKey}};function re(t,e,n){var r,o;if(!t.key)return!1;if(p(e))return t.keyCode===e;var i=e.split("."),u=0;try{for(var c=f(i),a=c.next();!a.done;a=c.next()){var s=a.value,l=ne[s],d=ee[s.toLowerCase()];(l&&l(t)||d&&d===t.keyCode)&&u++}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return n?u===i.length&&function(t){var e=Object.keys(ne).reduce((function(e,n){return ne[n](t)?e+1:e}),0);return[16,17,18,91,92].includes(t.keyCode)?e:e+1}(t)===i.length:u===i.length}var oe=["keydown"];var ie=function(t,e,n){var r=n||{},o=r.events,i=void 0===o?oe:o,u=r.target,c=r.exactMatch,a=void 0!==c&&c,s=r.useCapture,l=void 0!==s&&s,d=E(e),m=E(t);te((function(){var t,e,n,r=ot(u,window);if(r){var o=function(t){var e,n=function(t,e){return v(t)?t:h(t)||p(t)?function(n){return re(n,t,e)}:Array.isArray(t)?function(n){return t.some((function(t){return re(n,t,e)}))}:function(){return Boolean(t)}}(m.current,a);if(n(t))return null===(e=d.current)||void 0===e?void 0:e.call(d,t)};try{for(var c=f(i),s=c.next();!s.done;s=c.next()){var g=s.value;null===(n=null==r?void 0:r.addEventListener)||void 0===n||n.call(r,g,o,l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}return function(){var t,e,n;try{for(var u=f(i),c=u.next();!c.done;c=u.next()){var a=c.value;null===(n=null==r?void 0:r.removeEventListener)||void 0===n||n.call(r,a,o,l)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}}}}),[i],u)};function ue(e){return function(n,r){var o;void 0===r&&(r={});var i=r.onError,u=void 0===i?function(t){console.error(t)}:i;try{o=e()}catch(t){u(t)}function c(){try{var t=null==o?void 0:o.getItem(n);if(t)return e=t,(null==r?void 0:r.deserializer)?null==r?void 0:r.deserializer(e):JSON.parse(e)}catch(t){u(t)}var e;return v(null==r?void 0:r.defaultValue)?null==r?void 0:r.defaultValue():null==r?void 0:r.defaultValue}var a=l((0,t.useState)((function(){return c()})),2),s=a[0],f=a[1];return g((function(){f(c())}),[n]),[s,m((function(t){var e=v(t)?t(s):t;if(f(e),function(t){return void 0===t}(e))null==o||o.removeItem(n);else try{null==o||o.setItem(n,function(t){return(null==r?void 0:r.serializer)?null==r?void 0:r.serializer(t):JSON.stringify(t)}(e))}catch(t){console.error(t)}}))]}}var ce=ue((function(){return D?localStorage:void 0}));var ae=function(e){var n=this,r=(0,t.useRef)(!1);return(0,t.useCallback)((function(){for(var t=[],o=0;o0||(null==c?void 0:c.y)&&c.y>0);ct((function(){var t=ot(n);if(null==t?void 0:t.addEventListener){var e=function(t){if(m){var e=a(t),n=e.clientX,r=e.clientY;p.current.x=n,p.current.y=r}v.current=setTimeout((function(){f.current(t),h.current=!0}),u)},r=function(t){v.current&&function(t){var e=a(t),n=e.clientX,r=e.clientY,o=Math.abs(n-p.current.x),i=Math.abs(r-p.current.y);return!!((null==c?void 0:c.x)&&o>c.x||(null==c?void 0:c.y)&&i>c.y)}(t)&&(clearInterval(v.current),v.current=void 0)},o=function(t,e){var n;void 0===e&&(e=!1),v.current&&clearTimeout(v.current),h.current&&(null===(n=d.current)||void 0===n||n.call(d,t)),e&&!h.current&&l.current&&l.current(t),h.current=!1},i=function(t){return o(t,!0)};return se?(t.addEventListener("touchstart",e),t.addEventListener("touchend",i),m&&t.addEventListener("touchmove",r)):(t.addEventListener("mousedown",e),t.addEventListener("mouseup",i),t.addEventListener("mouseleave",o),m&&t.addEventListener("mousemove",r)),function(){v.current&&(clearTimeout(v.current),h.current=!1),se?(t.removeEventListener("touchstart",e),t.removeEventListener("touchend",i),m&&t.removeEventListener("touchmove",r)):(t.removeEventListener("mousedown",e),t.removeEventListener("mouseup",i),t.removeEventListener("mouseleave",o),m&&t.removeEventListener("mousemove",r))}}function a(t){return t instanceof TouchEvent?{clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t instanceof MouseEvent?{clientX:t.clientX,clientY:t.clientY}:(console.warn("Unsupported event type"),{clientX:0,clientY:0})}}),[],n)};var le=function(e){var n=function(){return new Map(e)},r=l((0,t.useState)(n),2),o=r[0],i=r[1];return[o,{set:m((function(t,e){i((function(n){var r=new Map(n);return r.set(t,e),r}))})),setAll:m((function(t){i(new Map(t))})),remove:m((function(t){i((function(e){var n=new Map(e);return n.delete(t),n}))})),reset:m((function(){return i(n())})),get:m((function(t){return o.get(t)}))}]};var de,ve=function(e){var n=(0,t.useRef)(0),r=l((0,t.useState)(e),2),o=r[0],i=r[1],u=(0,t.useCallback)((function(t){cancelAnimationFrame(n.current),n.current=requestAnimationFrame((function(){i(t)}))}),[]);return S((function(){cancelAnimationFrame(n.current)})),[o,u]},he={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},pe=function(t){var e=l(ve(he),2),n=e[0],r=e[1];return Mt("mousemove",(function(e){var n=e.screenX,o=e.screenY,i=e.clientX,u=e.clientY,c=e.pageX,a=e.pageY,s={screenX:n,screenY:o,clientX:i,clientY:u,pageX:c,pageY:a,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},f=ot(t);if(f){var l=f.getBoundingClientRect(),d=l.left,v=l.top,h=l.width,p=l.height;s.elementPosX=d+window.pageXOffset,s.elementPosY=v+window.pageYOffset,s.elementX=c-s.elementPosX,s.elementY=a-s.elementPosY,s.elementW=h,s.elementH=p}r(s)}),{target:function(){return document}}),n};function me(){var t,e=navigator;return null===(t=e)||"object"!==i()(t)?null:e.connection||e.mozConnection||e.webkitConnection}function ge(){var t=me();return t?{rtt:t.rtt,type:t.type,saveData:t.saveData,downlink:t.downlink,downlinkMax:t.downlinkMax,effectiveType:t.effectiveType}:{}}!function(t){t.ONLINE="online",t.OFFLINE="offline",t.CHANGE="change"}(de||(de={}));var ye=function(){var e=l((0,t.useState)((function(){return u({since:void 0,online:null===navigator||void 0===navigator?void 0:navigator.onLine},ge())})),2),n=e[0],r=e[1];return(0,t.useEffect)((function(){var t=function(){r((function(t){return u(u({},t),{online:!0,since:new Date})}))},e=function(){r((function(t){return u(u({},t),{online:!1,since:new Date})}))},n=function(){r((function(t){return u(u({},t),ge())}))};window.addEventListener(de.ONLINE,t),window.addEventListener(de.OFFLINE,e);var o=me();return null==o||o.addEventListener(de.CHANGE,n),function(){window.removeEventListener(de.ONLINE,t),window.removeEventListener(de.OFFLINE,e),null==o||o.removeEventListener(de.CHANGE,n)}}),[]),n},be=function(t,e){return!Object.is(t,e)};var we=function(e,n){void 0===n&&(n=be);var r=(0,t.useRef)(),o=(0,t.useRef)();return n(o.current,e)&&(r.current=o.current,o.current=e),r.current};var _e=function(t){if(t.id,"undefined"===("undefined"==typeof cancelAnimationFrame?"undefined":i()(cancelAnimationFrame)))return clearInterval(t.id);cancelAnimationFrame(t.id)};var Ee=function(e,n,r){var o=null==r?void 0:r.immediate,u=E(e),c=(0,t.useRef)();return(0,t.useEffect)((function(){if(p(n)&&!(n<0))return o&&u.current(),c.current=function(t,e){if(void 0===e&&(e=0),"undefined"===("undefined"==typeof requestAnimationFrame?"undefined":i()(requestAnimationFrame)))return{id:setInterval(t,e)};var n=(new Date).getTime(),r={id:0};return r.id=requestAnimationFrame((function o(){(new Date).getTime()-n>=e&&(t(),n=(new Date).getTime()),r.id=requestAnimationFrame(o)})),r}((function(){u.current()}),n),function(){c.current&&_e(c.current)}}),[n]),(0,t.useCallback)((function(){c.current&&_e(c.current)}),[])};var Se=function(t){if(t.id,"undefined"===("undefined"==typeof cancelAnimationFrame?"undefined":i()(cancelAnimationFrame)))return clearTimeout(t.id);cancelAnimationFrame(t.id)};var xe=function(e,n){var r=E(e),o=(0,t.useRef)();return(0,t.useEffect)((function(){if(p(n)&&!(n<0))return o.current=function(t,e){if(void 0===e&&(e=0),"undefined"===("undefined"==typeof requestAnimationFrame?"undefined":i()(requestAnimationFrame)))return{id:setTimeout(t,e)};var n={id:0},r=(new Date).getTime();return n.id=requestAnimationFrame((function o(){(new Date).getTime()-r>=e?t():n.id=requestAnimationFrame(o)})),n}((function(){r.current()}),n),function(){o.current&&Se(o.current)}}),[n]),(0,t.useCallback)((function(){o.current&&Se(o.current)}),[])},Oe=n(6752),je=n.n(Oe),Te=new WeakMap,Me=new WeakMap;function ke(t,e){var n=Te.get(t);if(n)return n;if(Me.has(t))return t;var r=new Proxy(t,{get:function(t,n,r){var o=Reflect.get(t,n,r);return je()(o)||Array.isArray(o)?ke(o,e):o},set:function(t,n,r){var o=Reflect.set(t,n,r);return e(),o},deleteProperty:function(t,n){var r=Reflect.deleteProperty(t,n);return e(),r}});return Te.set(t,r),Me.set(r,t),r}var Re,Ae=function(e){var n=X(),r=(0,t.useRef)(e);return _((function(){return ke(r.current,(function(){n()}))}),[])},Ce=function(e){var n=l((0,t.useState)(e),2),r=n[0],o=n[1],i=m((function(){o(e)}));return[r,o,i]},Le=new Set,De={xs:0,sm:576,md:768,lg:992,xl:1200};function Fe(){var t,e,n=Re;if(Ne(),n!==Re)try{for(var r=f(Le),o=r.next();!o.done;o=r.next()){(0,o.value)()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}var Ie=!1;function Ne(){var t,e,n=window.innerWidth,r={},o=!1;try{for(var i=f(Object.keys(De)),u=i.next();!u.done;u=i.next()){var c=u.value;r[c]=n>=De[c],r[c]!==Re[c]&&(o=!0)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}o&&(Re=r)}function Pe(t){De=t,Re&&Ne()}function $e(){D&&!Ie&&(Re={},Ne(),window.addEventListener("resize",Fe),Ie=!0);var e=l((0,t.useState)(Re),2),n=e[0],r=e[1];return(0,t.useEffect)((function(){if(D){Ie||window.addEventListener("resize",Fe);var t=function(){r(Re)};return Le.add(t),function(){Le.delete(t),0===Le.size&&(window.removeEventListener("resize",Fe),Ie=!1)}}}),[]),n}var ze=function(){var e=(0,t.useRef)(!1);return(0,t.useEffect)((function(){return e.current=!1,function(){e.current=!0}}),[]),e};var He=function(e){var n=ze(),r=l((0,t.useState)(e),2),o=r[0],i=r[1];return[o,(0,t.useCallback)((function(t){n.current||i(t)}),[])]};var qe=function(t,e){void 0===e&&(e=function(){return!0});var n=l(ve(),2),r=n[0],o=n[1],i=E(e);return ct((function(){var e=ot(t,document);if(e){var n=function(){var t;t=e===document?document.scrollingElement?{left:document.scrollingElement.scrollLeft,top:document.scrollingElement.scrollTop}:{left:Math.max(window.pageXOffset,document.documentElement.scrollLeft,document.body.scrollLeft),top:Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop)}:{left:e.scrollLeft,top:e.scrollTop},i.current(t)&&o(t)};return n(),e.addEventListener("scroll",n),function(){e.removeEventListener("scroll",n)}}}),[],t),r};function Ue(e,n){void 0===n&&(n=[]);var r=l((0,t.useState)(n),2),o=r[0],i=r[1],u=(0,t.useMemo)((function(){return new Set(o)}),[o]),c=function(t){return u.has(t)},a=function(t){return u.add(t),i(Array.from(u))},s=function(t){return u.delete(t),i(Array.from(u))},f=function(){e.forEach((function(t){u.add(t)})),i(Array.from(u))},d=function(){e.forEach((function(t){u.delete(t)})),i(Array.from(u))},v=(0,t.useMemo)((function(){return e.every((function(t){return!u.has(t)}))}),[e,u]),h=(0,t.useMemo)((function(){return e.every((function(t){return u.has(t)}))&&!v}),[e,u,v]),p=(0,t.useMemo)((function(){return!v&&!h}),[v,h]);return{selected:o,noneSelected:v,allSelected:h,partiallySelected:p,setSelected:i,isSelected:c,select:m(a),unSelect:m(s),toggle:m((function(t){c(t)?s(t):a(t)})),selectAll:m(f),unSelectAll:m(d),toggleAll:m((function(){return h?d():f()}))}}var Ve=ue((function(){return D?sessionStorage:void 0}));var We=function(e){var n=function(){return new Set(e)},r=l((0,t.useState)(n),2),o=r[0],i=r[1];return[o,{add:m((function(t){o.has(t)||i((function(e){var n=new Set(e);return n.add(t),n}))})),remove:m((function(t){o.has(t)&&i((function(e){var n=new Set(e);return n.delete(t),n}))})),reset:m((function(){return i(n())}))}]},Be=function(e){var n=l((0,t.useState)(e),2),r=n[0],o=n[1];return[r,(0,t.useCallback)((function(t){o((function(e){var n=v(t)?t(e):t;return n?u(u({},e),n):e}))}),[])]},Ye=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){Xe&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ze?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Xe&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;Ke.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),tn=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),vn="undefined"!=typeof WeakMap?new WeakMap:new Ye,hn=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Qe.getInstance(),r=new dn(e,n,this);vn.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){hn.prototype[t]=function(){var e;return(e=vn.get(this))[t].apply(e,arguments)}}));var pn=void 0!==Ge.ResizeObserver?Ge.ResizeObserver:hn,mn=ut(t.useLayoutEffect),gn=D?mn:ct;var yn=function(t){var e=l(ve((function(){var e=ot(t);return e?{width:e.clientWidth,height:e.clientHeight}:void 0})),2),n=e[0],r=e[1];return gn((function(){var e=ot(t);if(e){var n=new pn((function(t){t.forEach((function(t){var e=t.target,n=e.clientWidth,o=e.clientHeight;r({width:n,height:o})}))}));return n.observe(e),function(){n.disconnect()}}}),[],t),n},bn={top:NaN,left:NaN,bottom:NaN,right:NaN,height:NaN,width:NaN},wn=u({text:""},bn);var _n=function(e){var n=l((0,t.useState)(wn),2),r=n[0],o=n[1],i=(0,t.useRef)(r),c=(0,t.useRef)(!1);return i.current=r,ct((function(){var t=ot(e,document);if(t){var n=function(){var t,e=null,n=bn;window.getSelection&&(t=(e=window.getSelection())?e.toString():"")&&c.current&&(n=function(t){if(!t)return bn;if(t.rangeCount<1)return bn;var e=t.getRangeAt(0).getBoundingClientRect();return{height:e.height,width:e.width,top:e.top,left:e.left,right:e.right,bottom:e.bottom}}(e),o(u(u(u({},r),{text:t}),n)))},a=function(e){if(window.getSelection){i.current.text&&o(u({},wn)),c.current=!1;var n=window.getSelection();n&&(n.removeAllRanges(),c.current=t.contains(e.target))}};return t.addEventListener("mouseup",n),document.addEventListener("mousedown",a),function(){t.removeEventListener("mouseup",n),document.removeEventListener("mousedown",a)}}}),[],e),r};var En=function(e,n){var r,o=E(e),i=null!==(r=null==n?void 0:n.wait)&&void 0!==r?r:1e3,u=(0,t.useMemo)((function(){return W()((function(){for(var t=[],e=0;e=0})):o?o.map((function(t,e){return e})):[]),u=r.current;return r.current=n,e(i,u,n)}),n)},Rn=e(t.useLayoutEffect),An=function(e,n){var r=n.containerTarget,o=n.wrapperTarget,i=n.itemHeight,u=n.overscan,c=void 0===u?5:u,a=E(i),s=yn(r),f=(0,t.useRef)(!1),d=l((0,t.useState)([]),2),v=d[0],h=d[1],y=l((0,t.useState)({}),2),b=y[0],w=y[1],_=function(t){return p(a.current)?t*a.current:e.slice(0,t).reduce((function(t,n,r){return t+a.current(r,e[r])}),0)},S=(0,t.useMemo)((function(){return p(a.current)?e.length*a.current:e.reduce((function(t,n,r){return t+a.current(r,e[r])}),0)}),[e]),x=function(){var t=ot(r);if(t){var n=t.scrollTop,o=t.clientHeight,i=function(t){if(p(a.current))return Math.floor(t/a.current)+1;for(var n=0,r=0,o=0;o=t){r=o;break}return r+1}(n),u=function(t,n){if(p(a.current))return Math.ceil(t/a.current);for(var r=0,o=0,i=n;i=t));i++);return o-n}(o,i),s=Math.max(0,i-c),f=Math.min(e.length,i+u+c),l=_(s);w({height:S-l+"px",marginTop:l+"px"}),h(e.slice(s,f).map((function(t,e){return{data:t,index:e+s}})))}};g((function(){var t=ot(o);t&&Object.keys(b).forEach((function(e){return t.style[e]=b[e]}))}),[b]),(0,t.useEffect)((function(){(null==s?void 0:s.width)&&(null==s?void 0:s.height)&&x()}),[null==s?void 0:s.width,null==s?void 0:s.height,e]),Mt("scroll",(function(t){f.current?f.current=!1:(t.preventDefault(),x())}),{target:r});return[v,m((function(t){var e=ot(r);e&&(f.current=!0,e.scrollTop=_(t),x())}))]};function Cn(e,n){void 0===n&&(n={});var r=n.reconnectLimit,o=void 0===r?3:r,i=n.reconnectInterval,u=void 0===i?3e3:i,c=n.manual,a=void 0!==c&&c,s=n.onOpen,f=n.onClose,d=n.onMessage,v=n.onError,h=n.protocols,p=E(s),g=E(f),y=E(d),b=E(v),w=(0,t.useRef)(0),_=(0,t.useRef)(),x=(0,t.useRef)(),O=l((0,t.useState)(),2),j=O[0],T=O[1],M=l((0,t.useState)(Tn.Closed),2),k=M[0],R=M[1],A=function(){var t;w.current1&&void 0!==arguments[1])||arguments[1],r=(0,t.useRef)(null),o=(0,t.useRef)(!1),i=(0,t.useRef)(e);i.current=e;var u=(0,t.useCallback)((function(t){o.current&&(i.current(t),r.current=requestAnimationFrame(u))}),[]),c=(0,t.useMemo)((function(){return[function(){o.current&&(o.current=!1,r.current&&cancelAnimationFrame(r.current))},function(){o.current||(o.current=!0,r.current=requestAnimationFrame(u))},function(){return o.current}]}),[]);return(0,t.useEffect)((function(){return n&&c[1](),c[0]}),[]),c}}(),r}()})); \ No newline at end of file diff --git a/packages/hooks/es/index.d.ts b/packages/hooks/es/index.d.ts deleted file mode 100644 index cf397ec..0000000 --- a/packages/hooks/es/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from 'ahooks'; -export { default as useRafLoop } from './useRafLoop'; -export { default as useActivateWrapper } from './useActivateWrapper'; -export { default as useBoolLocalStorage } from './useBoolLocalStorage'; -export { default as useCustomCompareEffect } from './useCustomCompareEffect'; -export { default as useDeepEffect } from './useDeepEffect'; -export { default as useDeepMemo } from './useDeepMemo'; -export { default as useDoubleCheck } from './useDoubleCheck'; -export { default as useIMEComposition } from './useIMEComposition'; diff --git a/packages/hooks/es/index.js b/packages/hooks/es/index.js deleted file mode 100644 index b13c8cd..0000000 --- a/packages/hooks/es/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export * from 'ahooks'; -export { default as useRafLoop } from "./useRafLoop"; -export { default as useActivateWrapper } from "./useActivateWrapper"; -export { default as useBoolLocalStorage } from "./useBoolLocalStorage"; -export { default as useCustomCompareEffect } from "./useCustomCompareEffect"; -export { default as useDeepEffect } from "./useDeepEffect"; -export { default as useDeepMemo } from "./useDeepMemo"; -export { default as useDoubleCheck } from "./useDoubleCheck"; -export { default as useIMEComposition } from "./useIMEComposition"; \ No newline at end of file diff --git a/packages/hooks/es/useActivateWrapper/index.d.ts b/packages/hooks/es/useActivateWrapper/index.d.ts deleted file mode 100644 index 8c35f0c..0000000 --- a/packages/hooks/es/useActivateWrapper/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const useUnActivateWrapper: (cb: () => void) => void; -export declare const useActivateWrapper: (cb: any) => null; -export declare const useActivateState: () => boolean; -export default useActivateWrapper; diff --git a/packages/hooks/es/useActivateWrapper/index.js b/packages/hooks/es/useActivateWrapper/index.js deleted file mode 100644 index 8083d39..0000000 --- a/packages/hooks/es/useActivateWrapper/index.js +++ /dev/null @@ -1,51 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import { useState, useRef, useCallback } from 'react'; -import { useActivate, useUnactivate } from 'react-activation'; -// @ts-ignore -import { noop, isFunction } from '@zhst/func'; -import { useLatest, useMount, useUnmount } from 'ahooks'; -export var useUnActivateWrapper = function useUnActivateWrapper(cb) { - var latestCb = useLatest(cb); - var handle = useCallback(function () { - var cb = latestCb.current ? latestCb.current : noop; - cb(); - }, []); - useUnactivate(handle); - useUnmount(handle); -}; -export var useActivateWrapper = function useActivateWrapper(cb) { - var latestCb = useLatest(cb); - var retRef = useRef(noop); - var handle = useCallback(function () { - var cb = latestCb.current ? latestCb.current : noop; - retRef.current = cb(); - }, []); - var unMountHandle = useCallback(function () { - if (isFunction(retRef.current)) { - retRef.current(); - } - }, []); - useActivate(handle); - useMount(handle); - useUnActivateWrapper(unMountHandle); - return null; -}; -export var useActivateState = function useActivateState() { - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - isActive = _useState2[0], - setIsActive = _useState2[1]; - useActivateWrapper(function () { - setIsActive(true); - return function () { - setIsActive(false); - }; - }); - return isActive; -}; -export default useActivateWrapper; \ No newline at end of file diff --git a/packages/hooks/es/useBoolLocalStorage/index.d.ts b/packages/hooks/es/useBoolLocalStorage/index.d.ts deleted file mode 100644 index 5b1aad8..0000000 --- a/packages/hooks/es/useBoolLocalStorage/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -declare const _default: (key: string, initValue?: boolean) => [boolean, import("react").Dispatch>]; -export default _default; diff --git a/packages/hooks/es/useBoolLocalStorage/index.js b/packages/hooks/es/useBoolLocalStorage/index.js deleted file mode 100644 index 7d90161..0000000 --- a/packages/hooks/es/useBoolLocalStorage/index.js +++ /dev/null @@ -1,25 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -//@ts-nocheck -import { useLocalStorageState } from 'ahooks'; -export default (function (key) { - var initValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - //弹窗显示 - var _useLocalStorageState = useLocalStorageState(key, initValue, { - raw: false, - serializer: function serializer(v) { - return v ? '1' : '0'; - }, - deserializer: function deserializer(v) { - return v === '1' ? true : false; - } - }), - _useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2), - v = _useLocalStorageState2[0], - setV = _useLocalStorageState2[1]; - return [v, setV]; -}); \ No newline at end of file diff --git a/packages/hooks/es/useCustomCompareEffect/index.d.ts b/packages/hooks/es/useCustomCompareEffect/index.d.ts deleted file mode 100644 index ec9bb85..0000000 --- a/packages/hooks/es/useCustomCompareEffect/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DependencyList, EffectCallback } from 'react'; -declare type DepsEqualFnType = (prevDeps: TDeps, nextDeps: TDeps) => boolean; -declare const useCustomCompareEffect: (effect: EffectCallback, deps: TDeps, depsEqual: DepsEqualFnType) => void; -export default useCustomCompareEffect; diff --git a/packages/hooks/es/useCustomCompareEffect/index.js b/packages/hooks/es/useCustomCompareEffect/index.js deleted file mode 100644 index 03598b0..0000000 --- a/packages/hooks/es/useCustomCompareEffect/index.js +++ /dev/null @@ -1,21 +0,0 @@ -//@ts-nocheck -//只是删除isPrimitive check - -import { useEffect, useRef } from 'react'; -var useCustomCompareEffect = function useCustomCompareEffect(effect, deps, depsEqual) { - if (process.env.NODE_ENV !== 'production') { - if (!(deps instanceof Array) || !deps.length) { - console.warn('`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead.'); - } - if (typeof depsEqual !== 'function') { - console.warn('`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list'); - } - } - var _depsEqual = depsEqual; - var ref = useRef(undefined); - if (!ref.current || !_depsEqual(deps, ref.current)) { - ref.current = deps; - } - useEffect(effect, ref.current); -}; -export default useCustomCompareEffect; \ No newline at end of file diff --git a/packages/hooks/es/useDeepEffect/index.d.ts b/packages/hooks/es/useDeepEffect/index.d.ts deleted file mode 100644 index f62c0a0..0000000 --- a/packages/hooks/es/useDeepEffect/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { DependencyList, EffectCallback } from 'react'; -declare function useDeepEffect(effect: EffectCallback, deps: DependencyList): void; -export default useDeepEffect; diff --git a/packages/hooks/es/useDeepEffect/index.js b/packages/hooks/es/useDeepEffect/index.js deleted file mode 100644 index a7fd5c3..0000000 --- a/packages/hooks/es/useDeepEffect/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { isEqual } from '@zhst/func'; -import useCustomCompareEffect from "../useCustomCompareEffect"; -function useDeepEffect(effect, deps) { - useCustomCompareEffect(effect, deps, function (pre, now) { - return isEqual(pre, now); - }); -} -export default useDeepEffect; \ No newline at end of file diff --git a/packages/hooks/es/useDeepMemo/index.d.ts b/packages/hooks/es/useDeepMemo/index.d.ts deleted file mode 100644 index ba9fabc..0000000 --- a/packages/hooks/es/useDeepMemo/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { DependencyList } from 'react'; -export default function useDeepMemo(factory: () => T, deps: DependencyList | undefined): T; diff --git a/packages/hooks/es/useDeepMemo/index.js b/packages/hooks/es/useDeepMemo/index.js deleted file mode 100644 index fcf4a0b..0000000 --- a/packages/hooks/es/useDeepMemo/index.js +++ /dev/null @@ -1,21 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -//对生成的值做深比较 -import { useState, useMemo } from 'react'; -import useDeepEffect from "../useDeepEffect"; -export default function useDeepMemo(factory, deps) { - // @ts-ignore - var value = useMemo(factory, deps); - var _useState = useState(value), - _useState2 = _slicedToArray(_useState, 2), - state = _useState2[0], - setState = _useState2[1]; - useDeepEffect(function () { - setState(value); - }, [value]); - return state; -} \ No newline at end of file diff --git a/packages/hooks/es/useDoubleCheck/index.d.ts b/packages/hooks/es/useDoubleCheck/index.d.ts deleted file mode 100644 index 172c8a7..0000000 --- a/packages/hooks/es/useDoubleCheck/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Options } from 'ahooks/lib/createUseStorageState'; -export declare const isShowDoubleCheck: (key: string) => boolean; -export default function useDoubleCheck(key: string, initialState: Options | undefined): unknown[]; diff --git a/packages/hooks/es/useDoubleCheck/index.js b/packages/hooks/es/useDoubleCheck/index.js deleted file mode 100644 index aac2dec..0000000 --- a/packages/hooks/es/useDoubleCheck/index.js +++ /dev/null @@ -1,19 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import { useLocalStorageState } from 'ahooks'; -export var isShowDoubleCheck = function isShowDoubleCheck(key) { - var v = localStorage.getItem(key); - return v === '1' ? true : false; -}; -export default function useDoubleCheck(key, initialState) { - //是否关闭二次提示 - var _useLocalStorageState = useLocalStorageState(key, initialState), - _useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2), - value = _useLocalStorageState2[0], - setValue = _useLocalStorageState2[1]; - return [value, setValue]; -} \ No newline at end of file diff --git a/packages/hooks/es/useIMEComposition/index.d.ts b/packages/hooks/es/useIMEComposition/index.d.ts deleted file mode 100644 index e7132b8..0000000 --- a/packages/hooks/es/useIMEComposition/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type CompositionEventHandler } from 'react'; -import type { IUseIMECompositionResult } from './interface'; -export default function useIMEComposition any>(propValue: string, onChangeProp?: OnChange, getEventValueProp?: (...args: any[]) => string, onCompositionStartProp?: CompositionEventHandler, onCompositionEndProp?: CompositionEventHandler): IUseIMECompositionResult; diff --git a/packages/hooks/es/useIMEComposition/index.js b/packages/hooks/es/useIMEComposition/index.js deleted file mode 100644 index eb30ad5..0000000 --- a/packages/hooks/es/useIMEComposition/index.js +++ /dev/null @@ -1,71 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -//@ts-nocheck -import { useState, useRef, useCallback } from 'react'; -import { isChrome } from '@zhst/func'; -var EMIT_CHANGE_AFTER_COMPOSITION_END = isChrome(); -var defaultGetEventValue = function defaultGetEventValue(e) { - return e.target.value; -}; -export default function useIMEComposition(propValue, onChangeProp, getEventValueProp, onCompositionStartProp, onCompositionEndProp) { - var getEventValue = getEventValueProp || defaultGetEventValue; - var isCompositionRef = useRef(false); - var _useState = useState(propValue), - _useState2 = _slicedToArray(_useState, 2), - compositionValue = _useState2[0], - setCompositionValue = _useState2[1]; - var compositionValueRef = useRef(compositionValue); - var onChangeRef = useRef(onChangeProp); - var onCompositionStartRef = useRef(onCompositionStartProp); - var onCompositionEndRef = useRef(onCompositionEndProp); - compositionValueRef.current = compositionValue; - onChangeRef.current = onChangeProp; - onCompositionStartRef.current = onCompositionStartProp; - onCompositionEndRef.current = onCompositionEndProp; - - // eslint-disable-next-line react-hooks/exhaustive-deps - var onCompositionValueChange = useCallback(function () { - var _onChangeRef$current; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - if (isCompositionRef.current) { - setCompositionValue(getEventValue.apply(void 0, args)); - // 若输入法正在输入,则不触发上层组件的事件 - return; - } - return (_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call.apply(_onChangeRef$current, [onChangeRef].concat(args)); - }, [onChangeRef]); - var onCompositionStart = useCallback(function (e) { - var _onCompositionStartRe; - isCompositionRef.current = true; - (_onCompositionStartRe = onCompositionStartRef.current) === null || _onCompositionStartRe === void 0 || _onCompositionStartRe.call(onCompositionStartRef, e); - }, [onCompositionStartRef]); - var onCompositionEnd = useCallback(function (e) { - var _onCompositionEndRef$; - isCompositionRef.current = false; - (_onCompositionEndRef$ = onCompositionEndRef.current) === null || _onCompositionEndRef$ === void 0 || _onCompositionEndRef$.call(onCompositionEndRef, e); - // chrome 的 onCompositionEnd 事件在 onChange 后触发,需要在 onCompositionEnd 后额外触发一次 onChange 事件 - if (EMIT_CHANGE_AFTER_COMPOSITION_END) { - var _onChangeRef$current2; - e.type = 'change'; - //todo: 此处优化 - (_onChangeRef$current2 = onChangeRef.current) === null || _onChangeRef$current2 === void 0 || _onChangeRef$current2.call(onChangeRef, compositionValueRef.current, e); - } - }, [onCompositionEndRef, onChangeRef]); - - // 只处理受控的组件 - var isControlled = propValue !== undefined; - var passCompositionHandler = isControlled; - var passCompositionValue = isControlled && isCompositionRef.current; - return { - value: passCompositionValue ? compositionValue : propValue, - onChange: passCompositionHandler ? onCompositionValueChange : onChangeProp, - onCompositionStart: passCompositionHandler ? onCompositionStart : onCompositionStartProp, - onCompositionEnd: passCompositionHandler ? onCompositionEnd : onCompositionEndProp - }; -} \ No newline at end of file diff --git a/packages/hooks/es/useIMEComposition/interface.d.ts b/packages/hooks/es/useIMEComposition/interface.d.ts deleted file mode 100644 index e3898d4..0000000 --- a/packages/hooks/es/useIMEComposition/interface.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -export interface IUseIMECompositionResult { - value: string; - onChange: OnChange; - getEventValue?: (...args: any[]) => string; - onCompositionStart: React.CompositionEventHandler; - onCompositionEnd: React.CompositionEventHandler; -} diff --git a/packages/hooks/es/useIMEComposition/interface.js b/packages/hooks/es/useIMEComposition/interface.js deleted file mode 100644 index 8cec2e9..0000000 --- a/packages/hooks/es/useIMEComposition/interface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; \ No newline at end of file diff --git a/packages/hooks/es/useIMEComposition/isBrowser.d.ts b/packages/hooks/es/useIMEComposition/isBrowser.d.ts deleted file mode 100644 index fc73b3e..0000000 --- a/packages/hooks/es/useIMEComposition/isBrowser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: boolean; -export default _default; diff --git a/packages/hooks/es/useIMEComposition/isBrowser.js b/packages/hooks/es/useIMEComposition/isBrowser.js deleted file mode 100644 index 5648c66..0000000 --- a/packages/hooks/es/useIMEComposition/isBrowser.js +++ /dev/null @@ -1,2 +0,0 @@ -//@ts-nocheck -export default !!(typeof window !== 'undefined' && window); \ No newline at end of file diff --git a/packages/hooks/es/useIMEComposition/isChrome.d.ts b/packages/hooks/es/useIMEComposition/isChrome.d.ts deleted file mode 100644 index 924bb4e..0000000 --- a/packages/hooks/es/useIMEComposition/isChrome.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const isChrome: boolean; -export default isChrome; diff --git a/packages/hooks/es/useIMEComposition/isChrome.js b/packages/hooks/es/useIMEComposition/isChrome.js deleted file mode 100644 index 9d50c93..0000000 --- a/packages/hooks/es/useIMEComposition/isChrome.js +++ /dev/null @@ -1,16 +0,0 @@ -//@ts-nocheck -import isBrowser from "./isBrowser"; -var winNav = isBrowser && window.navigator; -var vendorName = winNav && winNav.vendor; -var userAgent = winNav && winNav.userAgent; - -//@ts-ignore -var isChromium = isBrowser && typeof chrome !== 'undefined'; - -//@ts-ignore -var isOpera = isBrowser && typeof opr !== 'undefined'; -var isIEedge = userAgent && userAgent.indexOf('Edge') > -1; -var isIOSChrome = !!(userAgent && userAgent.match('CriOS')); -var isDesktopChrome = isChromium && vendorName === 'Google Inc.' && !isOpera && !isIEedge; -var isChrome = isIOSChrome || isDesktopChrome; -export default isChrome; \ No newline at end of file diff --git a/packages/hooks/es/useJump/constants.d.ts b/packages/hooks/es/useJump/constants.d.ts deleted file mode 100644 index 54ec0dc..0000000 --- a/packages/hooks/es/useJump/constants.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export declare const JumpKey = "ROUTER-JUMP"; -export declare const TYPE: { - OFFLINE: number; - HISTORY: number; - OFFLINE_JUMP: number; - HISTORY_JUMP: number; - MONITOR_DETAIL_JUMP: number; - VIDEOGROUP: number; - VIDEOGROUP_JUMP: number; - UNKNOW_JUMP: number; - MONITOR_MAP_JUMP: number; - SEARCH: number; - CURRENT_SEARCH: number; - TAG_CAMERA: number; - TRACK_IMAGE: number; - TRACK_CAMERA: number; - PEER_ANALYSIS: number; - BASELINE_TASKS: number; - JOINTASK: number; -}; diff --git a/packages/hooks/es/useJump/constants.js b/packages/hooks/es/useJump/constants.js deleted file mode 100644 index 6630c82..0000000 --- a/packages/hooks/es/useJump/constants.js +++ /dev/null @@ -1,30 +0,0 @@ -export var JumpKey = 'ROUTER-JUMP'; -export var TYPE = { - OFFLINE: 1, - HISTORY: 2, - OFFLINE_JUMP: 3, - HISTORY_JUMP: 4, - MONITOR_DETAIL_JUMP: 5, - VIDEOGROUP: 6, - //跳到回溯 - VIDEOGROUP_JUMP: 7, - UNKNOW_JUMP: 8, - //未实现 - MONITOR_MAP_JUMP: 9, - SEARCH: 10, - //检索界面 - CURRENT_SEARCH: 11, - // - TAG_CAMERA: 12, - //预案 - //智能追踪两种方式 - TRACK_IMAGE: 13, - //跳到追踪上传图片 - TRACK_CAMERA: 14, - //跳到追踪选择摄像头 - PEER_ANALYSIS: 15, - //同行人分析 - BASELINE_TASKS: 16, - //线索摸排 - JOINTASK: 17 //路人库任务 -}; \ No newline at end of file diff --git a/packages/hooks/es/useJump/index.d.ts b/packages/hooks/es/useJump/index.d.ts deleted file mode 100644 index c5eb1e6..0000000 --- a/packages/hooks/es/useJump/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JumpType } from './interface'; -declare const useJump: () => (path: string, data: { - [index: string]: any; - __key__: JumpType; -}) => void; -export declare const useListenJump: (handle: (data: any) => void, type: JumpType | JumpType[]) => void; -export default useJump; diff --git a/packages/hooks/es/useJump/index.js b/packages/hooks/es/useJump/index.js deleted file mode 100644 index 086b027..0000000 --- a/packages/hooks/es/useJump/index.js +++ /dev/null @@ -1,67 +0,0 @@ -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); } -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; } -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; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import { useLatest } from 'ahooks'; -import events from 'events'; -import { get, isArray } from '@zhst/func'; -import { useEffect } from 'react'; -import { useLocation, useNavigate } from 'react-router-dom'; -import { JumpKey } from "./constants"; -var emitter = new events.EventEmitter(); -var useJump = function useJump() { - var location = useLocation(); - var navigate = useNavigate(); - var jump = function jump(path, data) { - if (location.pathname !== path) { - navigate(path, { - state: { - data: data, - topic: JumpKey, - __from__: location.pathname - } - }); - } else { - emitter.emit(JumpKey, data); - } - }; - return jump; -}; -export var useListenJump = function useListenJump(handle, type) { - var latestHandle = useLatest(handle); - var navigate = useNavigate(); - var _type = isArray(type) ? type : [type]; - var location = useLocation(); - useEffect(function () { - var state = location.state, - pathname = location.pathname, - search = location.search; - if (state) { - var topic = state.topic, - _data = state.data, - __from__ = state.__from__; - if (topic === JumpKey && _type.includes(get(_data, '__key__'))) { - latestHandle.current(_objectSpread(_objectSpread({}, _data), {}, { - __from__: __from__ - })); - } - navigate("/".concat(pathname).concat(search), { - state: null - }); - } - }, [location]); - useEffect(function () { - var handleEmit = function handleEmit(data) { - if (_type.includes(get(data, '__key__'))) { - latestHandle.current(data); - } - }; - emitter.on(JumpKey, handleEmit); - return function () { - emitter.removeListener(JumpKey, handleEmit); - }; - }, []); -}; -export default useJump; \ No newline at end of file diff --git a/packages/hooks/es/useJump/interface.d.ts b/packages/hooks/es/useJump/interface.d.ts deleted file mode 100644 index 2f384b9..0000000 --- a/packages/hooks/es/useJump/interface.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare type JumpType = 'warningRecord' | 'targetSearch' | 'passerby' | 'targetDetail' | 'traceAnalysis' | 'offlineAnalysis'; diff --git a/packages/hooks/es/useJump/interface.js b/packages/hooks/es/useJump/interface.js deleted file mode 100644 index 8cec2e9..0000000 --- a/packages/hooks/es/useJump/interface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; \ No newline at end of file diff --git a/packages/hooks/es/useRafLoop.d.ts b/packages/hooks/es/useRafLoop.d.ts deleted file mode 100644 index 608583e..0000000 --- a/packages/hooks/es/useRafLoop.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare type RafLoopReturns = [() => void, () => void, () => boolean]; -export default function useRafLoop(callback: FrameRequestCallback, initiallyActive?: boolean): RafLoopReturns; diff --git a/packages/hooks/es/useRafLoop.js b/packages/hooks/es/useRafLoop.js deleted file mode 100644 index f912c2d..0000000 --- a/packages/hooks/es/useRafLoop.js +++ /dev/null @@ -1,40 +0,0 @@ -import { useCallback, useEffect, useMemo, useRef } from 'react'; -export default function useRafLoop(callback) { - var initiallyActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var raf = useRef(null); - var rafActivity = useRef(false); - var rafCallback = useRef(callback); - rafCallback.current = callback; - var step = useCallback(function (time) { - if (rafActivity.current) { - rafCallback.current(time); - raf.current = requestAnimationFrame(step); - } - }, []); - var result = useMemo(function () { - return [function () { - // stop - if (rafActivity.current) { - rafActivity.current = false; - // @ts-ignore - raf.current && cancelAnimationFrame(raf.current); - } - }, function () { - // start - if (!rafActivity.current) { - rafActivity.current = true; - raf.current = requestAnimationFrame(step); - } - }, function () { - return rafActivity.current; - } // isActive - ]; - }, []); - useEffect(function () { - if (initiallyActive) { - result[1](); - } - return result[0]; - }, []); - return result; -} \ No newline at end of file diff --git a/packages/hooks/es/useSocket/index.d.ts b/packages/hooks/es/useSocket/index.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/hooks/es/useSocket/index.js b/packages/hooks/es/useSocket/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/packages/hooks/lib/index.d.ts b/packages/hooks/lib/index.d.ts deleted file mode 100644 index cf397ec..0000000 --- a/packages/hooks/lib/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from 'ahooks'; -export { default as useRafLoop } from './useRafLoop'; -export { default as useActivateWrapper } from './useActivateWrapper'; -export { default as useBoolLocalStorage } from './useBoolLocalStorage'; -export { default as useCustomCompareEffect } from './useCustomCompareEffect'; -export { default as useDeepEffect } from './useDeepEffect'; -export { default as useDeepMemo } from './useDeepMemo'; -export { default as useDoubleCheck } from './useDoubleCheck'; -export { default as useIMEComposition } from './useIMEComposition'; diff --git a/packages/hooks/lib/index.js b/packages/hooks/lib/index.js deleted file mode 100644 index 8835be0..0000000 --- a/packages/hooks/lib/index.js +++ /dev/null @@ -1,63 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.tsx -var src_exports = {}; -__export(src_exports, { - useActivateWrapper: () => import_useActivateWrapper.default, - useBoolLocalStorage: () => import_useBoolLocalStorage.default, - useCustomCompareEffect: () => import_useCustomCompareEffect.default, - useDeepEffect: () => import_useDeepEffect.default, - useDeepMemo: () => import_useDeepMemo.default, - useDoubleCheck: () => import_useDoubleCheck.default, - useIMEComposition: () => import_useIMEComposition.default, - useRafLoop: () => import_useRafLoop.default -}); -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, require("ahooks"), module.exports); -var import_useRafLoop = __toESM(require("./useRafLoop")); -var import_useActivateWrapper = __toESM(require("./useActivateWrapper")); -var import_useBoolLocalStorage = __toESM(require("./useBoolLocalStorage")); -var import_useCustomCompareEffect = __toESM(require("./useCustomCompareEffect")); -var import_useDeepEffect = __toESM(require("./useDeepEffect")); -var import_useDeepMemo = __toESM(require("./useDeepMemo")); -var import_useDoubleCheck = __toESM(require("./useDoubleCheck")); -var import_useIMEComposition = __toESM(require("./useIMEComposition")); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - useActivateWrapper, - useBoolLocalStorage, - useCustomCompareEffect, - useDeepEffect, - useDeepMemo, - useDoubleCheck, - useIMEComposition, - useRafLoop, - ...require("ahooks") -}); diff --git a/packages/hooks/lib/useActivateWrapper/index.d.ts b/packages/hooks/lib/useActivateWrapper/index.d.ts deleted file mode 100644 index 8c35f0c..0000000 --- a/packages/hooks/lib/useActivateWrapper/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const useUnActivateWrapper: (cb: () => void) => void; -export declare const useActivateWrapper: (cb: any) => null; -export declare const useActivateState: () => boolean; -export default useActivateWrapper; diff --git a/packages/hooks/lib/useActivateWrapper/index.js b/packages/hooks/lib/useActivateWrapper/index.js deleted file mode 100644 index 6ddeeea..0000000 --- a/packages/hooks/lib/useActivateWrapper/index.js +++ /dev/null @@ -1,74 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useActivateWrapper/index.tsx -var useActivateWrapper_exports = {}; -__export(useActivateWrapper_exports, { - default: () => useActivateWrapper_default, - useActivateState: () => useActivateState, - useActivateWrapper: () => useActivateWrapper, - useUnActivateWrapper: () => useUnActivateWrapper -}); -module.exports = __toCommonJS(useActivateWrapper_exports); -var import_react = require("react"); -var import_react_activation = require("react-activation"); -var import_func = require("@zhst/func"); -var import_ahooks = require("ahooks"); -var useUnActivateWrapper = (cb) => { - const latestCb = (0, import_ahooks.useLatest)(cb); - const handle = (0, import_react.useCallback)(() => { - const cb2 = latestCb.current ? latestCb.current : import_func.noop; - cb2(); - }, []); - (0, import_react_activation.useUnactivate)(handle); - (0, import_ahooks.useUnmount)(handle); -}; -var useActivateWrapper = (cb) => { - const latestCb = (0, import_ahooks.useLatest)(cb); - let retRef = (0, import_react.useRef)(import_func.noop); - const handle = (0, import_react.useCallback)(() => { - const cb2 = latestCb.current ? latestCb.current : import_func.noop; - retRef.current = cb2(); - }, []); - const unMountHandle = (0, import_react.useCallback)(() => { - if ((0, import_func.isFunction)(retRef.current)) { - retRef.current(); - } - }, []); - (0, import_react_activation.useActivate)(handle); - (0, import_ahooks.useMount)(handle); - useUnActivateWrapper(unMountHandle); - return null; -}; -var useActivateState = () => { - const [isActive, setIsActive] = (0, import_react.useState)(false); - useActivateWrapper(() => { - setIsActive(true); - return () => { - setIsActive(false); - }; - }); - return isActive; -}; -var useActivateWrapper_default = useActivateWrapper; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - useActivateState, - useActivateWrapper, - useUnActivateWrapper -}); diff --git a/packages/hooks/lib/useBoolLocalStorage/index.d.ts b/packages/hooks/lib/useBoolLocalStorage/index.d.ts deleted file mode 100644 index 5b1aad8..0000000 --- a/packages/hooks/lib/useBoolLocalStorage/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -declare const _default: (key: string, initValue?: boolean) => [boolean, import("react").Dispatch>]; -export default _default; diff --git a/packages/hooks/lib/useBoolLocalStorage/index.js b/packages/hooks/lib/useBoolLocalStorage/index.js deleted file mode 100644 index d9b8b54..0000000 --- a/packages/hooks/lib/useBoolLocalStorage/index.js +++ /dev/null @@ -1,33 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useBoolLocalStorage/index.tsx -var useBoolLocalStorage_exports = {}; -__export(useBoolLocalStorage_exports, { - default: () => useBoolLocalStorage_default -}); -module.exports = __toCommonJS(useBoolLocalStorage_exports); -var import_ahooks = require("ahooks"); -var useBoolLocalStorage_default = (key, initValue = true) => { - const [v, setV] = (0, import_ahooks.useLocalStorageState)(key, initValue, { - raw: false, - serializer: (v2) => v2 ? "1" : "0", - deserializer: (v2) => v2 === "1" ? true : false - }); - return [v, setV]; -}; diff --git a/packages/hooks/lib/useCustomCompareEffect/index.d.ts b/packages/hooks/lib/useCustomCompareEffect/index.d.ts deleted file mode 100644 index ec9bb85..0000000 --- a/packages/hooks/lib/useCustomCompareEffect/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DependencyList, EffectCallback } from 'react'; -declare type DepsEqualFnType = (prevDeps: TDeps, nextDeps: TDeps) => boolean; -declare const useCustomCompareEffect: (effect: EffectCallback, deps: TDeps, depsEqual: DepsEqualFnType) => void; -export default useCustomCompareEffect; diff --git a/packages/hooks/lib/useCustomCompareEffect/index.js b/packages/hooks/lib/useCustomCompareEffect/index.js deleted file mode 100644 index db473b0..0000000 --- a/packages/hooks/lib/useCustomCompareEffect/index.js +++ /dev/null @@ -1,46 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useCustomCompareEffect/index.tsx -var useCustomCompareEffect_exports = {}; -__export(useCustomCompareEffect_exports, { - default: () => useCustomCompareEffect_default -}); -module.exports = __toCommonJS(useCustomCompareEffect_exports); -var import_react = require("react"); -var useCustomCompareEffect = (effect, deps, depsEqual) => { - if (process.env.NODE_ENV !== "production") { - if (!(deps instanceof Array) || !deps.length) { - console.warn( - "`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead." - ); - } - if (typeof depsEqual !== "function") { - console.warn( - "`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list" - ); - } - } - let _depsEqual = depsEqual; - const ref = (0, import_react.useRef)(void 0); - if (!ref.current || !_depsEqual(deps, ref.current)) { - ref.current = deps; - } - (0, import_react.useEffect)(effect, ref.current); -}; -var useCustomCompareEffect_default = useCustomCompareEffect; diff --git a/packages/hooks/lib/useDeepEffect/index.d.ts b/packages/hooks/lib/useDeepEffect/index.d.ts deleted file mode 100644 index f62c0a0..0000000 --- a/packages/hooks/lib/useDeepEffect/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { DependencyList, EffectCallback } from 'react'; -declare function useDeepEffect(effect: EffectCallback, deps: DependencyList): void; -export default useDeepEffect; diff --git a/packages/hooks/lib/useDeepEffect/index.js b/packages/hooks/lib/useDeepEffect/index.js deleted file mode 100644 index a62e400..0000000 --- a/packages/hooks/lib/useDeepEffect/index.js +++ /dev/null @@ -1,42 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useDeepEffect/index.tsx -var useDeepEffect_exports = {}; -__export(useDeepEffect_exports, { - default: () => useDeepEffect_default -}); -module.exports = __toCommonJS(useDeepEffect_exports); -var import_func = require("@zhst/func"); -var import_useCustomCompareEffect = __toESM(require("../useCustomCompareEffect")); -function useDeepEffect(effect, deps) { - (0, import_useCustomCompareEffect.default)(effect, deps, (pre, now) => { - return (0, import_func.isEqual)(pre, now); - }); -} -var useDeepEffect_default = useDeepEffect; diff --git a/packages/hooks/lib/useDeepMemo/index.d.ts b/packages/hooks/lib/useDeepMemo/index.d.ts deleted file mode 100644 index ba9fabc..0000000 --- a/packages/hooks/lib/useDeepMemo/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { DependencyList } from 'react'; -export default function useDeepMemo(factory: () => T, deps: DependencyList | undefined): T; diff --git a/packages/hooks/lib/useDeepMemo/index.js b/packages/hooks/lib/useDeepMemo/index.js deleted file mode 100644 index 400edb3..0000000 --- a/packages/hooks/lib/useDeepMemo/index.js +++ /dev/null @@ -1,44 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useDeepMemo/index.ts -var useDeepMemo_exports = {}; -__export(useDeepMemo_exports, { - default: () => useDeepMemo -}); -module.exports = __toCommonJS(useDeepMemo_exports); -var import_react = require("react"); -var import_useDeepEffect = __toESM(require("../useDeepEffect")); -function useDeepMemo(factory, deps) { - const value = (0, import_react.useMemo)(factory, deps); - const [state, setState] = (0, import_react.useState)(value); - (0, import_useDeepEffect.default)(() => { - setState(value); - }, [value]); - return state; -} diff --git a/packages/hooks/lib/useDoubleCheck/index.d.ts b/packages/hooks/lib/useDoubleCheck/index.d.ts deleted file mode 100644 index 172c8a7..0000000 --- a/packages/hooks/lib/useDoubleCheck/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Options } from 'ahooks/lib/createUseStorageState'; -export declare const isShowDoubleCheck: (key: string) => boolean; -export default function useDoubleCheck(key: string, initialState: Options | undefined): unknown[]; diff --git a/packages/hooks/lib/useDoubleCheck/index.js b/packages/hooks/lib/useDoubleCheck/index.js deleted file mode 100644 index 225452a..0000000 --- a/packages/hooks/lib/useDoubleCheck/index.js +++ /dev/null @@ -1,38 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useDoubleCheck/index.tsx -var useDoubleCheck_exports = {}; -__export(useDoubleCheck_exports, { - default: () => useDoubleCheck, - isShowDoubleCheck: () => isShowDoubleCheck -}); -module.exports = __toCommonJS(useDoubleCheck_exports); -var import_ahooks = require("ahooks"); -var isShowDoubleCheck = (key) => { - const v = localStorage.getItem(key); - return v === "1" ? true : false; -}; -function useDoubleCheck(key, initialState) { - const [value, setValue] = (0, import_ahooks.useLocalStorageState)(key, initialState); - return [value, setValue]; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - isShowDoubleCheck -}); diff --git a/packages/hooks/lib/useIMEComposition/index.d.ts b/packages/hooks/lib/useIMEComposition/index.d.ts deleted file mode 100644 index e7132b8..0000000 --- a/packages/hooks/lib/useIMEComposition/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type CompositionEventHandler } from 'react'; -import type { IUseIMECompositionResult } from './interface'; -export default function useIMEComposition any>(propValue: string, onChangeProp?: OnChange, getEventValueProp?: (...args: any[]) => string, onCompositionStartProp?: CompositionEventHandler, onCompositionEndProp?: CompositionEventHandler): IUseIMECompositionResult; diff --git a/packages/hooks/lib/useIMEComposition/index.js b/packages/hooks/lib/useIMEComposition/index.js deleted file mode 100644 index ed3c964..0000000 --- a/packages/hooks/lib/useIMEComposition/index.js +++ /dev/null @@ -1,81 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useIMEComposition/index.tsx -var useIMEComposition_exports = {}; -__export(useIMEComposition_exports, { - default: () => useIMEComposition -}); -module.exports = __toCommonJS(useIMEComposition_exports); -var import_react = require("react"); -var import_func = require("@zhst/func"); -var EMIT_CHANGE_AFTER_COMPOSITION_END = (0, import_func.isChrome)(); -var defaultGetEventValue = (e) => e.target.value; -function useIMEComposition(propValue, onChangeProp, getEventValueProp, onCompositionStartProp, onCompositionEndProp) { - const getEventValue = getEventValueProp || defaultGetEventValue; - const isCompositionRef = (0, import_react.useRef)(false); - const [compositionValue, setCompositionValue] = (0, import_react.useState)(propValue); - const compositionValueRef = (0, import_react.useRef)(compositionValue); - const onChangeRef = (0, import_react.useRef)(onChangeProp); - const onCompositionStartRef = (0, import_react.useRef)(onCompositionStartProp); - const onCompositionEndRef = (0, import_react.useRef)(onCompositionEndProp); - compositionValueRef.current = compositionValue; - onChangeRef.current = onChangeProp; - onCompositionStartRef.current = onCompositionStartProp; - onCompositionEndRef.current = onCompositionEndProp; - const onCompositionValueChange = (0, import_react.useCallback)( - (...args) => { - var _a; - if (isCompositionRef.current) { - setCompositionValue(getEventValue(...args)); - return; - } - return (_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, ...args); - }, - [onChangeRef] - ); - const onCompositionStart = (0, import_react.useCallback)( - (e) => { - var _a; - isCompositionRef.current = true; - (_a = onCompositionStartRef.current) == null ? void 0 : _a.call(onCompositionStartRef, e); - }, - [onCompositionStartRef] - ); - const onCompositionEnd = (0, import_react.useCallback)( - (e) => { - var _a, _b; - isCompositionRef.current = false; - (_a = onCompositionEndRef.current) == null ? void 0 : _a.call(onCompositionEndRef, e); - if (EMIT_CHANGE_AFTER_COMPOSITION_END) { - e.type = "change"; - (_b = onChangeRef.current) == null ? void 0 : _b.call(onChangeRef, compositionValueRef.current, e); - } - }, - [onCompositionEndRef, onChangeRef] - ); - const isControlled = propValue !== void 0; - const passCompositionHandler = isControlled; - const passCompositionValue = isControlled && isCompositionRef.current; - return { - value: passCompositionValue ? compositionValue : propValue, - onChange: passCompositionHandler ? onCompositionValueChange : onChangeProp, - onCompositionStart: passCompositionHandler ? onCompositionStart : onCompositionStartProp, - onCompositionEnd: passCompositionHandler ? onCompositionEnd : onCompositionEndProp - }; -} diff --git a/packages/hooks/lib/useIMEComposition/interface.d.ts b/packages/hooks/lib/useIMEComposition/interface.d.ts deleted file mode 100644 index e3898d4..0000000 --- a/packages/hooks/lib/useIMEComposition/interface.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -export interface IUseIMECompositionResult { - value: string; - onChange: OnChange; - getEventValue?: (...args: any[]) => string; - onCompositionStart: React.CompositionEventHandler; - onCompositionEnd: React.CompositionEventHandler; -} diff --git a/packages/hooks/lib/useIMEComposition/interface.js b/packages/hooks/lib/useIMEComposition/interface.js deleted file mode 100644 index b9794bb..0000000 --- a/packages/hooks/lib/useIMEComposition/interface.js +++ /dev/null @@ -1,17 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useIMEComposition/interface.ts -var interface_exports = {}; -module.exports = __toCommonJS(interface_exports); diff --git a/packages/hooks/lib/useIMEComposition/isBrowser.d.ts b/packages/hooks/lib/useIMEComposition/isBrowser.d.ts deleted file mode 100644 index fc73b3e..0000000 --- a/packages/hooks/lib/useIMEComposition/isBrowser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: boolean; -export default _default; diff --git a/packages/hooks/lib/useIMEComposition/isBrowser.js b/packages/hooks/lib/useIMEComposition/isBrowser.js deleted file mode 100644 index 6b30218..0000000 --- a/packages/hooks/lib/useIMEComposition/isBrowser.js +++ /dev/null @@ -1,25 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useIMEComposition/isBrowser.ts -var isBrowser_exports = {}; -__export(isBrowser_exports, { - default: () => isBrowser_default -}); -module.exports = __toCommonJS(isBrowser_exports); -var isBrowser_default = !!(typeof window !== "undefined" && window); diff --git a/packages/hooks/lib/useIMEComposition/isChrome.d.ts b/packages/hooks/lib/useIMEComposition/isChrome.d.ts deleted file mode 100644 index 924bb4e..0000000 --- a/packages/hooks/lib/useIMEComposition/isChrome.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const isChrome: boolean; -export default isChrome; diff --git a/packages/hooks/lib/useIMEComposition/isChrome.js b/packages/hooks/lib/useIMEComposition/isChrome.js deleted file mode 100644 index 3d1ae36..0000000 --- a/packages/hooks/lib/useIMEComposition/isChrome.js +++ /dev/null @@ -1,45 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useIMEComposition/isChrome.ts -var isChrome_exports = {}; -__export(isChrome_exports, { - default: () => isChrome_default -}); -module.exports = __toCommonJS(isChrome_exports); -var import_isBrowser = __toESM(require("./isBrowser")); -var winNav = import_isBrowser.default && window.navigator; -var vendorName = winNav && winNav.vendor; -var userAgent = winNav && winNav.userAgent; -var isChromium = import_isBrowser.default && typeof chrome !== "undefined"; -var isOpera = import_isBrowser.default && typeof opr !== "undefined"; -var isIEedge = userAgent && userAgent.indexOf("Edge") > -1; -var isIOSChrome = !!(userAgent && userAgent.match("CriOS")); -var isDesktopChrome = isChromium && vendorName === "Google Inc." && !isOpera && !isIEedge; -var isChrome = isIOSChrome || isDesktopChrome; -var isChrome_default = isChrome; diff --git a/packages/hooks/lib/useJump/constants.d.ts b/packages/hooks/lib/useJump/constants.d.ts deleted file mode 100644 index 54ec0dc..0000000 --- a/packages/hooks/lib/useJump/constants.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export declare const JumpKey = "ROUTER-JUMP"; -export declare const TYPE: { - OFFLINE: number; - HISTORY: number; - OFFLINE_JUMP: number; - HISTORY_JUMP: number; - MONITOR_DETAIL_JUMP: number; - VIDEOGROUP: number; - VIDEOGROUP_JUMP: number; - UNKNOW_JUMP: number; - MONITOR_MAP_JUMP: number; - SEARCH: number; - CURRENT_SEARCH: number; - TAG_CAMERA: number; - TRACK_IMAGE: number; - TRACK_CAMERA: number; - PEER_ANALYSIS: number; - BASELINE_TASKS: number; - JOINTASK: number; -}; diff --git a/packages/hooks/lib/useJump/constants.js b/packages/hooks/lib/useJump/constants.js deleted file mode 100644 index 7e2e5ec..0000000 --- a/packages/hooks/lib/useJump/constants.js +++ /dev/null @@ -1,61 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useJump/constants.ts -var constants_exports = {}; -__export(constants_exports, { - JumpKey: () => JumpKey, - TYPE: () => TYPE -}); -module.exports = __toCommonJS(constants_exports); -var JumpKey = "ROUTER-JUMP"; -var TYPE = { - OFFLINE: 1, - HISTORY: 2, - OFFLINE_JUMP: 3, - HISTORY_JUMP: 4, - MONITOR_DETAIL_JUMP: 5, - VIDEOGROUP: 6, - //跳到回溯 - VIDEOGROUP_JUMP: 7, - UNKNOW_JUMP: 8, - //未实现 - MONITOR_MAP_JUMP: 9, - SEARCH: 10, - //检索界面 - CURRENT_SEARCH: 11, - // - TAG_CAMERA: 12, - //预案 - //智能追踪两种方式 - TRACK_IMAGE: 13, - //跳到追踪上传图片 - TRACK_CAMERA: 14, - //跳到追踪选择摄像头 - PEER_ANALYSIS: 15, - //同行人分析 - BASELINE_TASKS: 16, - //线索摸排 - JOINTASK: 17 - //路人库任务 -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - JumpKey, - TYPE -}); diff --git a/packages/hooks/lib/useJump/index.d.ts b/packages/hooks/lib/useJump/index.d.ts deleted file mode 100644 index c5eb1e6..0000000 --- a/packages/hooks/lib/useJump/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { JumpType } from './interface'; -declare const useJump: () => (path: string, data: { - [index: string]: any; - __key__: JumpType; -}) => void; -export declare const useListenJump: (handle: (data: any) => void, type: JumpType | JumpType[]) => void; -export default useJump; diff --git a/packages/hooks/lib/useJump/index.js b/packages/hooks/lib/useJump/index.js deleted file mode 100644 index af40443..0000000 --- a/packages/hooks/lib/useJump/index.js +++ /dev/null @@ -1,90 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useJump/index.ts -var useJump_exports = {}; -__export(useJump_exports, { - default: () => useJump_default, - useListenJump: () => useListenJump -}); -module.exports = __toCommonJS(useJump_exports); -var import_ahooks = require("ahooks"); -var import_events = __toESM(require("events")); -var import_func = require("@zhst/func"); -var import_react = require("react"); -var import_react_router_dom = require("react-router-dom"); -var import_constants = require("./constants"); -var emitter = new import_events.default.EventEmitter(); -var useJump = () => { - const location = (0, import_react_router_dom.useLocation)(); - const navigate = (0, import_react_router_dom.useNavigate)(); - const jump = (path, data) => { - if (location.pathname !== path) { - navigate(path, { - state: { data, topic: import_constants.JumpKey, __from__: location.pathname } - }); - } else { - emitter.emit(import_constants.JumpKey, data); - } - }; - return jump; -}; -var useListenJump = (handle, type) => { - const latestHandle = (0, import_ahooks.useLatest)(handle); - const navigate = (0, import_react_router_dom.useNavigate)(); - const _type = (0, import_func.isArray)(type) ? type : [type]; - const location = (0, import_react_router_dom.useLocation)(); - (0, import_react.useEffect)(() => { - const { state, pathname, search } = location; - if (state) { - const { topic, data, __from__ } = state; - if (topic === import_constants.JumpKey && _type.includes((0, import_func.get)(data, "__key__"))) { - latestHandle.current({ ...data, __from__ }); - } - navigate(`/${pathname}${search}`, { - state: null - }); - } - }, [location]); - (0, import_react.useEffect)(() => { - const handleEmit = (data) => { - if (_type.includes((0, import_func.get)(data, "__key__"))) { - latestHandle.current(data); - } - }; - emitter.on(import_constants.JumpKey, handleEmit); - return () => { - emitter.removeListener(import_constants.JumpKey, handleEmit); - }; - }, []); -}; -var useJump_default = useJump; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - useListenJump -}); diff --git a/packages/hooks/lib/useJump/interface.d.ts b/packages/hooks/lib/useJump/interface.d.ts deleted file mode 100644 index 2f384b9..0000000 --- a/packages/hooks/lib/useJump/interface.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare type JumpType = 'warningRecord' | 'targetSearch' | 'passerby' | 'targetDetail' | 'traceAnalysis' | 'offlineAnalysis'; diff --git a/packages/hooks/lib/useJump/interface.js b/packages/hooks/lib/useJump/interface.js deleted file mode 100644 index ecf4552..0000000 --- a/packages/hooks/lib/useJump/interface.js +++ /dev/null @@ -1,17 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useJump/interface.ts -var interface_exports = {}; -module.exports = __toCommonJS(interface_exports); diff --git a/packages/hooks/lib/useRafLoop.d.ts b/packages/hooks/lib/useRafLoop.d.ts deleted file mode 100644 index 608583e..0000000 --- a/packages/hooks/lib/useRafLoop.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare type RafLoopReturns = [() => void, () => void, () => boolean]; -export default function useRafLoop(callback: FrameRequestCallback, initiallyActive?: boolean): RafLoopReturns; diff --git a/packages/hooks/lib/useRafLoop.js b/packages/hooks/lib/useRafLoop.js deleted file mode 100644 index 5cd985f..0000000 --- a/packages/hooks/lib/useRafLoop.js +++ /dev/null @@ -1,63 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/useRafLoop.ts -var useRafLoop_exports = {}; -__export(useRafLoop_exports, { - default: () => useRafLoop -}); -module.exports = __toCommonJS(useRafLoop_exports); -var import_react = require("react"); -function useRafLoop(callback, initiallyActive = true) { - const raf = (0, import_react.useRef)(null); - const rafActivity = (0, import_react.useRef)(false); - const rafCallback = (0, import_react.useRef)(callback); - rafCallback.current = callback; - const step = (0, import_react.useCallback)((time) => { - if (rafActivity.current) { - rafCallback.current(time); - raf.current = requestAnimationFrame(step); - } - }, []); - const result = (0, import_react.useMemo)( - () => [ - () => { - if (rafActivity.current) { - rafActivity.current = false; - raf.current && cancelAnimationFrame(raf.current); - } - }, - () => { - if (!rafActivity.current) { - rafActivity.current = true; - raf.current = requestAnimationFrame(step); - } - }, - () => rafActivity.current - // isActive - ], - [] - ); - (0, import_react.useEffect)(() => { - if (initiallyActive) { - result[1](); - } - return result[0]; - }, []); - return result; -} diff --git a/packages/hooks/lib/useSocket/index.d.ts b/packages/hooks/lib/useSocket/index.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/hooks/lib/useSocket/index.js b/packages/hooks/lib/useSocket/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/packages/icon/es/Iconfont.js b/packages/icon/es/Iconfont.js deleted file mode 100644 index 574fa37..0000000 --- a/packages/icon/es/Iconfont.js +++ /dev/null @@ -1,44 +0,0 @@ -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); } -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; } -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; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import { createFromIconfontCN } from '@ant-design/icons'; -import React from 'react'; -import { jsx as _jsx } from "react/jsx-runtime"; -var Icon = createFromIconfontCN({ - scriptUrl: require("./font/iconfont.js") -}); -var IconFont = function IconFont(props) { - var _ref = props || {}, - _ref$title = _ref.title, - title = _ref$title === void 0 ? '' : _ref$title, - _ref$styles = _ref.styles, - styles = _ref$styles === void 0 ? {} : _ref$styles, - icon = _ref.icon, - _ref$size = _ref.size, - size = _ref$size === void 0 ? 14 : _ref$size, - onIconClick = _ref.onIconClick, - children = _ref.children, - _ref$active = _ref.active, - active = _ref$active === void 0 ? false : _ref$active, - _ref$color = _ref.color, - color = _ref$color === void 0 ? '' : _ref$color; - return /*#__PURE__*/_jsx(Icon, { - title: title, - onClick: function onClick(e) { - onIconClick && onIconClick(e); - }, - style: _objectSpread(_objectSpread({}, styles), {}, { - cursor: 'pointer', - fontSize: size, - color: color - }, active ? { - color: '#09f' - } : {}), - type: icon, - children: children - }); -}; -export default IconFont; \ No newline at end of file diff --git a/packages/icon/es/font/iconfont.css b/packages/icon/es/font/iconfont.css deleted file mode 100644 index ef9f9d5..0000000 --- a/packages/icon/es/font/iconfont.css +++ /dev/null @@ -1,1743 +0,0 @@ -@font-face { - font-family: iconfont; /* Project id 1739270 */ - src: url('iconfont.woff2?t=1711094074098') format('woff2'), - url('iconfont.woff?t=1711094074098') format('woff'), - url('iconfont.ttf?t=1711094074098') format('truetype'); -} - -.iconfont { - font-family: iconfont !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-shezhi1::before { - content: "\e7fb"; -} - -.icon-bofang1::before { - content: "\e7fc"; -} - -.icon-zanting2::before { - content: "\e7fa"; -} - -.icon-bangzhu2::before { - content: "\e7f9"; -} - -.icon-daochu2::before { - content: "\e7f7"; -} - -.icon-daoru1::before { - content: "\e7f8"; -} - -.icon-jindonglogo::before { - content: "\e7f6"; -} - -.icon-guankongyujingselect::before { - content: "\e7ef"; -} - -.icon-guankongyujingnor::before { - content: "\e7f0"; -} - -.icon-guankongyuannor::before { - content: "\e7f1"; -} - -.icon-quancengyuanselectbeifen::before { - content: "\e7f2"; -} - -.icon-quancengyujingnor::before { - content: "\e7f3"; -} - -.icon-quancengyuannor::before { - content: "\e7f4"; -} - -.icon-quancengyuanselect::before { - content: "\e7f5"; -} - -.icon-guankongyuanselect::before { - content: "\e7ee"; -} - -.icon-jindong::before { - content: "\e7ed"; -} - -.icon-danganxiangqing_hangweifenxi::before { - content: "\e78d"; -} - -.icon-danganxiangqing_shujuganzhi::before { - content: "\e78e"; -} - -.icon-danganxiangqing_huodongguiji::before { - content: "\e78f"; -} - -.icon-danganxiangqing_jibenxinxi::before { - content: "\e7ea"; -} - -.icon-danganxiangqing_fushuwupin::before { - content: "\e7eb"; -} - -.icon-danganxiangqing_jizhanyingyong::before { - content: "\e7ec"; -} - -.icon-jiarudanganku::before { - content: "\e787"; -} - -.icon-dangankunor::before { - content: "\e793"; -} - -.icon-bukongrenwuselect::before { - content: "\e799"; -} - -.icon-bukongrenwunor1::before { - content: "\e79a"; -} - -.icon-dangankuselect::before { - content: "\e79b"; -} - -.icon-jizhanfanor::before { - content: "\e79c"; -} - -.icon-feijidongchechaxunnor::before { - content: "\e79d"; -} - -.icon-jidongchechaxunselect::before { - content: "\e79e"; -} - -.icon-a-lixianfenxiselect2::before { - content: "\e7a1"; -} - -.icon-huisufenxiselect::before { - content: "\e7a2"; -} - -.icon-jizhanfaselect::before { - content: "\e7a3"; -} - -.icon-mubiaojiansuonor::before { - content: "\e7ae"; -} - -.icon-lurenkuselect::before { - content: "\e7b1"; -} - -.icon-shujujiashicangselect::before { - content: "\e7b2"; -} - -.icon-shishijiexiselect::before { - content: "\e7b4"; -} - -.icon-shishijiexinor::before { - content: "\e7b9"; -} - -.icon-jidongchechaxunnor::before { - content: "\e7c1"; -} - -.icon-lurenkunor1::before { - content: "\e7cf"; -} - -.icon-mubiaotezhengchaxunnor::before { - content: "\e7e1"; -} - -.icon-yujingjiluselect::before { - content: "\e7e2"; -} - -.icon-mubiaotezhengchaxunselect::before { - content: "\e7e3"; -} - -.icon-feijidongchechaxunselect::before { - content: "\e7e4"; -} - -.icon-yujingjilunor::before { - content: "\e7e5"; -} - -.icon-lixianfenxiselect::before { - content: "\e7e6"; -} - -.icon-huisufenxinor::before { - content: "\e7e7"; -} - -.icon-shujujiashicangnor::before { - content: "\e7e8"; -} - -.icon-mubiaojiansuoselect::before { - content: "\e7e9"; -} - -.icon-kuangxuangongju::before { - content: "\e796"; -} - -.icon-fengniao::before { - content: "\e792"; -} - -.icon-zhankai::before { - content: "\e790"; -} - -.icon-shouqi::before { - content: "\e791"; -} - -.icon-shijian::before { - content: "\e786"; -} - -.icon-dingwei2::before { - content: "\e613"; -} - -.icon-renyuan::before { - content: "\e784"; -} - -.icon-houtai::before { - content: "\e785"; -} - -.icon-zuo::before { - content: "\e781"; -} - -.icon-you::before { - content: "\e783"; -} - -.icon-kakou::before { - content: "\e780"; -} - -.icon-yujing1::before { - content: "\e77e"; -} - -.icon-yuan2::before { - content: "\e77d"; -} - -.icon-moxingpengzhuang::before { - content: "\e777"; -} - -.icon-moxingpengzhuangnor::before { - content: "\e778"; -} - -.icon-lurenku::before { - content: "\e77b"; -} - -.icon-lurenkunor::before { - content: "\e77c"; -} - -.icon-shiming::before { - content: "\e776"; -} - -.icon-suoxiao2::before { - content: "\e774"; -} - -.icon-fangda1::before { - content: "\e775"; -} - -.icon-guanbi2::before { - content: "\e772"; -} - -.icon-fanhui1::before { - content: "\e773"; -} - -.icon-xiansuomopai::before { - content: "\e76f"; -} - -.icon-xiansuomopainor::before { - content: "\e76e"; -} - -.icon-zhajiyujing::before { - content: "\e770"; -} - -.icon-zhajiyujingnor::before { - content: "\e771"; -} - -.icon-zhuizongpeizhi::before { - content: "\e76c"; -} - -.icon-zhuizongpeizhinor::before { - content: "\e76d"; -} - -.icon-dapingqiehuan::before { - content: "\e76b"; -} - -.icon-xuanze::before { - content: "\e769"; -} - -.icon-shaixuan1::before { - content: "\e76a"; -} - -.icon-chekashebei::before { - content: "\e764"; -} - -.icon-imsishebei::before { - content: "\e765"; -} - -.icon-xingtishebei::before { - content: "\e766"; -} - -.icon-renlianshebei::before { - content: "\e767"; -} - -.icon-wifishebei::before { - content: "\e768"; -} - -.icon-a-miaozhun2::before { - content: "\e762"; -} - -.icon-a-bianzu19::before { - content: "\e763"; -} - -.icon-fanye::before { - content: "\e75e"; -} - -.icon-shenfenzheng::before { - content: "\e75f"; -} - -.icon-dizhi::before { - content: "\e760"; -} - -.icon-guanbi::before { - content: "\e761"; -} - -.icon-dianwei1::before { - content: "\e75b"; -} - -.icon-weikakou::before { - content: "\e757"; -} - -.icon-weikakounor::before { - content: "\e758"; -} - -.icon-changsuoma::before { - content: "\e759"; -} - -.icon-changsuomanor::before { - content: "\e75a"; -} - -.icon-yujing::before { - content: "\e756"; -} - -.icon-jiansuonor::before { - content: "\e747"; -} - -.icon-tonghangrenfenxinor1::before { - content: "\e748"; -} - -.icon-zhinengyanpannor::before { - content: "\e749"; -} - -.icon-bukongyujingnor::before { - content: "\e74a"; -} - -.icon-bukongrenwunor::before { - content: "\e74b"; -} - -.icon-dianziditunor::before { - content: "\e754"; -} - -.icon-zhuizongnor1::before { - content: "\e755"; -} - -.icon-zhuizong1::before { - content: "\e746"; -} - -.icon-bukongrenwu3::before { - content: "\e74c"; -} - -.icon-dianziditu::before { - content: "\e74d"; -} - -.icon-bukongyujing::before { - content: "\e750"; -} - -.icon-tonghangrenfenxi1::before { - content: "\e751"; -} - -.icon-zhinengyanpan::before { - content: "\e752"; -} - -.icon-jiansuo1::before { - content: "\e753"; -} - -.icon-kaiqijulei::before { - content: "\e745"; -} - -.icon-tongbu::before { - content: "\e744"; -} - -.icon-tonghangrenfenxi::before { - content: "\e743"; -} - -.icon-tonghangrenfenxinor::before { - content: "\e742"; -} - -.icon-jizhanyingyong::before { - content: "\e741"; -} - -.icon-haikangrenlianbukongnor::before { - content: "\e740"; -} - -.icon-haikangrenlianbukong::before { - content: "\e73f"; -} - -.icon-tuozhanshouduantishi::before { - content: "\e73e"; -} - -.icon-fanhuimopailiebiao::before { - content: "\e73d"; -} - -.icon-toukuijiancenor::before { - content: "\e73c"; -} - -.icon-toukuijiance::before { - content: "\e718"; -} - -.icon-zhuixing::before { - content: "\e717"; -} - -.icon-tishi4::before { - content: "\e73b"; -} - -.icon-a-shaixuanfeiji::before { - content: "\e733"; -} - -.icon-a-zidongtiaozhengfanweifeiji::before { - content: "\e73a"; -} - -.icon-heziyunwei::before { - content: "\e739"; -} - -.icon-qiehuan::before { - content: "\e738"; -} - -.icon-disanfangxiaoxinor::before { - content: "\e737"; -} - -.icon-disanfangxiaoxi::before { - content: "\e736"; -} - -.icon-daohang::before { - content: "\e735"; -} - -.icon-yonghu::before { - content: "\e734"; -} - -.icon-feiji::before { - content: "\e732"; -} - -.icon-jieshuzhuizong::before { - content: "\e730"; -} - -.icon-huisuzhoubian::before { - content: "\e731"; -} - -.icon-jixuzhuizong::before { - content: "\e72d"; -} - -.icon-tiaozhengfanwei::before { - content: "\e72e"; -} - -.icon-jiansuo::before { - content: "\e72f"; -} - -.icon-guiji::before { - content: "\e72c"; -} - -.icon-jichuxinxi::before { - content: "\e72b"; -} - -.icon-danganzhaiyao::before { - content: "\e72a"; -} - -.icon-jingzhunbukongicon_on::before { - content: "\e728"; -} - -.icon-jingzhunbukongicon_off::before { - content: "\e729"; -} - -.icon-tiaozhuan::before { - content: "\e727"; -} - -.icon-shezhi::before { - content: "\e726"; -} - -.icon-bangzhu1::before { - content: "\e725"; -} - -.icon-shuaxin1::before { - content: "\e724"; -} - -.icon-duosucaibeifen::before { - content: "\e722"; -} - -.icon-duosucai::before { - content: "\e723"; -} - -.icon-shujutongji::before { - content: "\e721"; -} - -.icon-renlian::before { - content: "\e71c"; -} - -.icon-xingti::before { - content: "\e71d"; -} - -.icon-jidongche::before { - content: "\e71e"; -} - -.icon-huisufenxi4::before { - content: "\e71f"; -} - -.icon-lixianfenxi4::before { - content: "\e720"; -} - -.icon-feijidongche::before { - content: "\e71b"; -} - -.icon-shujudaping::before { - content: "\e71a"; -} - -.icon-peizhisuanfa::before { - content: "\e719"; -} - -.icon-zhuizong::before { - content: "\e715"; -} - -.icon-zhuizongnor::before { - content: "\e716"; -} - -.icon-dianwei::before { - content: "\e714"; -} - -.icon-Container::before { - content: "\e713"; -} - -.icon-Attachment::before { - content: "\e712"; -} - -.icon-cha::before { - content: "\e711"; -} - -.icon-gou::before { - content: "\e710"; -} - -.icon-daoru::before { - content: "\e70f"; -} - -.icon-quanxijiansuo::before { - content: "\e70e"; -} - -.icon-chakanjiankong::before { - content: "\e70c"; -} - -.icon-tishi3::before { - content: "\e70d"; -} - -.icon-heiyemoshi::before { - content: "\e70b"; -} - -.icon-zhengchangmoshi::before { - content: "\e70a"; -} - -.icon-dingwei1::before { - content: "\e709"; -} - -.icon-paixu::before { - content: "\e708"; -} - -.icon-tianjiayuan::before { - content: "\e707"; -} - -.icon-juleidangankunor::before { - content: "\e705"; -} - -.icon-juleidanganku::before { - content: "\e706"; -} - -.icon-guanlian::before { - content: "\e704"; -} - -.icon-renlianbiaozhu::before { - content: "\e703"; -} - -.icon-juleijieguo::before { - content: "\e6ec"; -} - -.icon-juleirenwunor::before { - content: "\e6fb"; -} - -.icon-juleijieguonor::before { - content: "\e701"; -} - -.icon-juleirenwu::before { - content: "\e702"; -} - -.icon-zhongzhi3::before { - content: "\e8ff"; -} - -.icon-xuanzhuan1::before { - content: "\e6fd"; -} - -.icon-shuangmubiaozhu1::before { - content: "\e700"; -} - -.icon-shoudongkuangxuan::before { - content: "\e6f9"; -} - -.icon-zanting1::before { - content: "\e6fe"; -} - -.icon-zhongzhi1::before { - content: "\e6ff"; -} - -.icon-shoudong::before { - content: "\e6fa"; -} - -.icon-zidong::before { - content: "\e6fc"; -} - -.icon-zhenduan::before { - content: "\e6f8"; -} - -.icon-Check-Circle-Fill1::before { - content: "\e6f3"; -} - -.icon-Info--Circle-Fill::before { - content: "\e6f4"; -} - -.icon-Close-Circle-Fill::before { - content: "\e6f5"; -} - -.icon-Warning-Circle-Fill::before { - content: "\e6f6"; -} - -.icon-Question-Circle-Fill::before { - content: "\e6f7"; -} - -.icon-zancunjia::before { - content: "\e6f2"; -} - -.icon-Check-Circle-Fill::before { - content: "\e6f1"; -} - -.icon-tupianji::before { - content: "\e6f0"; -} - -.icon-quanping1::before { - content: "\e6ed"; -} - -.icon-yinliang::before { - content: "\e6ee"; -} - -.icon-suoxiao1::before { - content: "\e6ef"; -} - -.icon-home::before { - content: "\e6eb"; -} - -.icon-zuixiaohua::before { - content: "\e6e9"; -} - -.icon-zuidahua::before { - content: "\e6ea"; -} - -.icon-biaozhunhua::before { - content: "\e6e6"; -} - -.icon-julei::before { - content: "\e6e5"; -} - -.icon-bianzu::before { - content: "\e6e7"; -} - -.icon-bianzu3::before { - content: "\e6e8"; -} - -.icon-bianzu7::before { - content: "\e6e3"; -} - -.icon-bianzu2::before { - content: "\e6e4"; -} - -.icon-kapianqiehuan::before { - content: "\e6e2"; -} - -.icon-duobianxing1::before { - content: "\e6e0"; -} - -.icon-fang1::before { - content: "\e6e1"; -} - -.icon-yuan1::before { - content: "\e6df"; -} - -.icon-cejuli::before { - content: "\e6de"; -} - -.icon-wanggekuangxuannor::before { - content: "\e6dc"; -} - -.icon-lujingkuangxuannor::before { - content: "\e6dd"; -} - -.icon-chuansuo::before { - content: "\e6db"; -} - -.icon-bianyuanhezinor::before { - content: "\e6d8"; -} - -.icon-wujiankuhov::before { - content: "\e6d9"; -} - -.icon-caozuorizhinor::before { - content: "\e6da"; -} - -.icon-collect_dot::before { - content: "\e619"; -} - -.icon-chuxiandingweibg::before { - content: "\e6d4"; -} - -.icon-chuxiandingweiicon::before { - content: "\e6d5"; -} - -.icon-shexiangtoudingweibg::before { - content: "\e6d6"; -} - -.icon-shexiangtoudingweiicon::before { - content: "\e6d7"; -} - -.icon-xiafajieguo::before { - content: "\e6d2"; -} - -.icon-daochu1::before { - content: "\e6d3"; -} - -.icon-zuijinchuxian::before { - content: "\e6cc"; -} - -.icon-leijizhuapai::before { - content: "\e6d0"; -} - -.icon-yichangshijian::before { - content: "\e6d1"; -} - -.icon-dingwei::before { - content: "\e6cb"; -} - -.icon-tupian::before { - content: "\e6ad"; -} - -.icon-wenti::before { - content: "\e6ac"; -} - -.icon-lixian1::before { - content: "\e6ab"; -} - -.icon-yichang::before { - content: "\e6a8"; -} - -.icon-zhuixing-xiugaidianwei::before { - content: "\e6a7"; -} - -.icon-wenhao1::before { - content: "\e69e"; -} - -.icon-ditu_dingwei::before { - content: "\e69d"; -} - -.icon-ditu_fangda::before { - content: "\e689"; -} - -.icon-ditu_suoxiao::before { - content: "\e69a"; -} - -.icon-chakanbukongrenwu::before { - content: "\e688"; -} - -.icon-lietu::before { - content: "\e687"; -} - -.icon-zhongzhi::before { - content: "\e67e"; -} - -.icon-xialada::before { - content: "\e67f"; -} - -.icon-zhinengguanlian_xingti::before { - content: "\e67b"; -} - -.icon-zhinengguanlian_renlian::before { - content: "\e67c"; -} - -.icon-xiajiantou::before { - content: "\e75c"; -} - -.icon-zhinengguanlian_xiaojiantou::before { - content: "\e67d"; -} - -.icon-zhinengguanlian_jiantou::before { - content: "\e67a"; -} - -.icon-shangjiantou::before { - content: "\e75d"; -} - -.icon-banbenxinxi::before { - content: "\e679"; -} - -.icon-wenhao::before { - content: "\e61f"; -} - -.icon-bianjirenyuan::before { - content: "\e7e0"; -} - -.icon-tishi2::before { - content: "\e7df"; -} - -.icon-shexiangji2::before { - content: "\e7de"; -} - -.icon-guijizhuizong::before { - content: "\e7dd"; -} - -.icon-jiezhen1::before { - content: "\e7dc"; -} - -.icon-tianjiaguijihuisu::before { - content: "\e7db"; -} - -.icon-tingzhi::before { - content: "\e7cd"; -} - -.icon-baoweiquan::before { - content: "\e7ce"; -} - -.icon-shangchuanshipin::before { - content: "\e7d0"; -} - -.icon-yidong::before { - content: "\e7d1"; -} - -.icon-chuangjianxinbukong1::before { - content: "\e7d2"; -} - -.icon-yichu1::before { - content: "\e7d3"; -} - -.icon-tishi1::before { - content: "\e7d4"; -} - -.icon-VS::before { - content: "\e7d5"; -} - -.icon-quanjuzonglan::before { - content: "\e7d6"; -} - -.icon-chakanfenxirenwu1::before { - content: "\e7d7"; -} - -.icon-xiaoxi::before { - content: "\e7d8"; -} - -.icon-yonghuming::before { - content: "\e7d9"; -} - -.icon-tuichu::before { - content: "\e7da"; -} - -.icon-guijizhuizongnor::before { - content: "\e7cb"; -} - -.icon-guijizhuizong2::before { - content: "\e7cc"; -} - -.icon-bukongrenwu1::before { - content: "\e7b7"; -} - -.icon-shexiangji::before { - content: "\e7b8"; -} - -.icon-yujingditu::before { - content: "\e7ba"; -} - -.icon-lixianfenxi2::before { - content: "\e7bb"; -} - -.icon-yuanguanli1::before { - content: "\e7bc"; -} - -.icon-danganku::before { - content: "\e7bd"; -} - -.icon-huisufenxi2::before { - content: "\e7be"; -} - -.icon-kuneijiansuo::before { - content: "\e7bf"; -} - -.icon-jiegouhuachaxun::before { - content: "\e7c0"; -} - -.icon-bukongrenwu2::before { - content: "\e7c2"; -} - -.icon-yuanguanli2::before { - content: "\e7c3"; -} - -.icon-shexiangji1::before { - content: "\e7c4"; -} - -.icon-kuneijiansuo1::before { - content: "\e7c5"; -} - -.icon-lixianfenxi3::before { - content: "\e7c6"; -} - -.icon-danganku1::before { - content: "\e7c7"; -} - -.icon-yujingditu1::before { - content: "\e7c8"; -} - -.icon-huisufenxi3::before { - content: "\e7c9"; -} - -.icon-jiegouhuachaxunnor::before { - content: "\e7ca"; -} - -.icon-chuangjianxinbukong::before { - content: "\e7b6"; -} - -.icon-kuangxuan::before { - content: "\e77f"; -} - -.icon-gaojishaixuan::before { - content: "\e779"; -} - -.icon-gaojishaixuanshouqi::before { - content: "\e77a"; -} - -.icon-bukongrenwu::before { - content: "\e7b5"; -} - -.icon-riqi::before { - content: "\e74f"; -} - -.icon-shijianqiehuan::before { - content: "\e797"; -} - -.icon-shouquan1::before { - content: "\e7b3"; -} - -.icon-video-play::before { - content: "\e653"; -} - -.icon-shishifenxi::before { - content: "\e7af"; -} - -.icon-chakanfenxirenwu::before { - content: "\e7b0"; -} - -.icon-jiegouhuafenxi::before { - content: "\e7ad"; -} - -.icon-tianjiaguiji2::before { - content: "\e6aa"; -} - -.icon-tianjiajiansuomubiao::before { - content: "\e6b0"; -} - -.icon-add::before { - content: "\e661"; -} - -.icon-didian::before { - content: "\e798"; -} - -.icon-bofanghov::before { - content: "\e79f"; -} - -.icon-bofang3::before { - content: "\e7a0"; -} - -.icon-jinggao::before { - content: "\e788"; -} - -.icon-tishi::before { - content: "\e789"; -} - -.icon-bangzhu::before { - content: "\e78a"; -} - -.icon-guanbi1::before { - content: "\e78b"; -} - -.icon-chenggong::before { - content: "\e78c"; -} - -.icon-qianwang::before { - content: "\e7ac"; -} - -.icon-shouquan::before { - content: "\e7ab"; -} - -.icon-jingweidu::before { - content: "\e7aa"; -} - -.icon-shanchu1::before { - content: "\e74e"; -} - -.icon-daochu::before { - content: "\e782"; -} - -.icon-ziyuanguanli::before { - content: "\e7a4"; -} - -.icon-fuwuqishouquan::before { - content: "\e7a5"; -} - -.icon-xiugaimima::before { - content: "\e7a6"; -} - -.icon-zhanghaoguanli::before { - content: "\e7a7"; -} - -.icon-suanlipeie::before { - content: "\e7a8"; -} - -.icon-VMSpeizhi::before { - content: "\e7a9"; -} - -.icon-tianjia1::before { - content: "\e794"; -} - -.icon-yichu::before { - content: "\e795"; -} - -.icon-lujing::before { - content: "\e6cf"; -} - -.icon-jiankongxinxi::before { - content: "\e6c8"; -} - -.icon-fanwei::before { - content: "\e6c9"; -} - -.icon-anfadidian::before { - content: "\e6ca"; -} - -.icon-gongjuxiang::before { - content: "\e6cd"; -} - -.icon-gongjuxiangguanbi1::before { - content: "\e6ce"; -} - -.icon-jiezhen::before { - content: "\e6c2"; -} - -.icon-huisufenxi1::before { - content: "\e6c6"; -} - -.icon-huisufenxi::before { - content: "\e6c7"; -} - -.icon-tianjiashipinwenjian1::before { - content: "\e6c5"; -} - -.icon-jiazaishibai::before { - content: "\e6c3"; -} - -.icon-shuaxin::before { - content: "\e6c4"; -} - -.icon-quanping::before { - content: "\e6c0"; -} - -.icon-quxiaoquanping::before { - content: "\e6c1"; -} - -.icon-shipinbofang::before { - content: "\e6be"; -} - -.icon-shipinzanting::before { - content: "\e6bf"; -} - -.icon-lixianguiji::before { - content: "\e6bd"; -} - -.icon-lixian::before { - content: "\e6bc"; -} - -.icon-xiaojiaobiao::before { - content: "\e6bb"; -} - -.icon-shangchuan1::before { - content: "\e6ba"; -} - -.icon-tianjiaweijiansuoduixiang::before { - content: "\e6b8"; -} - -.icon-tianjiaweijiansuojilu::before { - content: "\e6b9"; -} - -.icon-lixianfenxi1::before { - content: "\e6b7"; -} - -.icon-kuaisujiansuohov::before { - content: "\e6b5"; -} - -.icon-kuaisujiansuo1::before { - content: "\e6b6"; -} - -.icon-kuaisujiansuo::before { - content: "\e6b4"; -} - -.icon-yuanguanli::before { - content: "\e6b1"; -} - -.icon-shexiangtou::before { - content: "\e6b2"; -} - -.icon-lixianfenxi::before { - content: "\e6b3"; -} - -.icon-filter::before { - content: "\e61a"; -} - -.icon-tianjiaweizhuizongduixiang2::before { - content: "\e6af"; -} - -.icon-tianjiaweizhuizongduixiang1::before { - content: "\e6ae"; -} - -.icon-baocun1::before { - content: "\e6a9"; -} - -.icon-tianjiashipinwenjianjia::before { - content: "\e6a5"; -} - -.icon-tianjiashipinwenjian::before { - content: "\e6a6"; -} - -.icon-ditu::before { - content: "\e6a4"; -} - -.icon-xinjianshexiangtou::before { - content: "\e6a3"; -} - -.icon-lishihuisu::before { - content: "\e6a2"; -} - -.icon-decoyitianjiaweiguiji::before { - content: "\e69f"; -} - -.icon-bofangqiehuan::before { - content: "\e6a0"; -} - -.icon-tianjia::before { - content: "\e6a1"; -} - -.icon-baocun::before { - content: "\e698"; -} - -.icon-gongjuxiangguanbi::before { - content: "\e699"; -} - -.icon-shangchuan::before { - content: "\e69b"; -} - -.icon-gongjuxiang1::before { - content: "\e69c"; -} - -.icon-logo::before { - content: "\e692"; -} - -.icon-setting::before { - content: "\e627"; -} - -.icon-user::before { - content: "\e628"; -} - -.icon-quit::before { - content: "\e629"; -} - -.icon-arrowzhankaimeixuanzhong::before { - content: "\e693"; -} - -.icon-arrowzhankaixuanzhong::before { - content: "\e694"; -} - -.icon-xuanzexuanzhong::before { - content: "\e695"; -} - -.icon-xuanzebanxuan::before { - content: "\e696"; -} - -.icon-xuanzenor::before { - content: "\e697"; -} - -.icon-shaixuanguanbinor::before { - content: "\e691"; -} - -.icon-gengduo::before { - content: "\e68e"; -} - -.icon-youzhankai::before { - content: "\e68f"; -} - -.icon-zuoshouqi::before { - content: "\e690"; -} - -.icon-yuan::before { - content: "\e68a"; -} - -.icon-duobianxing::before { - content: "\e68b"; -} - -.icon-fang::before { - content: "\e68c"; -} - -.icon-ceju::before { - content: "\e68d"; -} - -.icon-shishizhuizong1::before { - content: "\e683"; -} - -.icon-guijihuisu1::before { - content: "\e684"; -} - -.icon-tianjiaguiji::before { - content: "\e685"; -} - -.icon-yichuguiji::before { - content: "\e686"; -} - -.icon-fangda::before { - content: "\e680"; -} - -.icon-suoxiao::before { - content: "\e681"; -} - -.icon-xiazai::before { - content: "\e682"; -} - -.icon-fanhui::before { - content: "\e678"; -} - -.icon-sousuo::before { - content: "\e669"; -} - -.icon-quxiaoxuanzhong::before { - content: "\e66a"; -} - -.icon-piliangxuanzenor::before { - content: "\e66b"; -} - -.icon-kaiqifenxi::before { - content: "\e66c"; -} - -.icon-quxiaofenxi::before { - content: "\e66d"; -} - -.icon-shaixuan::before { - content: "\e66e"; -} - -.icon-dangan::before { - content: "\e66f"; -} - -.icon-bofang::before { - content: "\e670"; -} - -.icon-zanting::before { - content: "\e671"; -} - -.icon-shanchu::before { - content: "\e672"; -} - -.icon-tianjiaweizhuizongduixiang::before { - content: "\e673"; -} - -.icon-chakandatu::before { - content: "\e674"; -} - -.icon-jiansuojilu::before { - content: "\e675"; -} - -.icon-yuzhi::before { - content: "\e676"; -} - -.icon-chakanxiangqing::before { - content: "\e677"; -} - -.icon-guijihuisu::before { - content: "\e65c"; -} - -.icon-dianweipeizhinor::before { - content: "\e65d"; -} - -.icon-yirenyidang::before { - content: "\e65e"; -} - -.icon-tongbanfenxi::before { - content: "\e65f"; -} - -.icon-qiehuanzuo::before { - content: "\e662"; -} - -.icon-qiehuanyou::before { - content: "\e663"; -} - -.icon-tingzhidengdai::before { - content: "\e664"; -} - -.icon-yiguanbi::before { - content: "\e665"; -} - -.icon-danchuangguanbi::before { - content: "\e666"; -} - -.icon-lishijilu::before { - content: "\e64a"; -} - -.icon-xuanzhuan::before { - content: "\e648"; -} - -.icon-qingchu::before { - content: "\e649"; -} - -.icon-dangantianjia::before { - content: "\e63d"; -} - -.icon-bianji::before { - content: "\e63e"; -} - -.icon-fullscreen::before { - content: "\e63b"; -} - -.icon-cancle_fullscreen::before { - content: "\e63c"; -} - -.icon-quanyujiansuo_nor::before { - content: "\e639"; -} - -.icon-guijihuisu_nor::before { - content: "\e63a"; -} - diff --git a/packages/icon/es/font/iconfont.js b/packages/icon/es/font/iconfont.js deleted file mode 100644 index 6af13ff..0000000 --- a/packages/icon/es/font/iconfont.js +++ /dev/null @@ -1 +0,0 @@ -window._iconfont_svg_string_1739270='',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var c,_i,o,z,t,m=function m(a,l){l.parentNode.insertBefore(a,l);};if(l&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("");}catch(a){console&&console.log(a);}}c=function c(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_1739270,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?m(l,a.firstChild):a.appendChild(l));},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(_i=function i(){document.removeEventListener("DOMContentLoaded",_i,!1),c();},document.addEventListener("DOMContentLoaded",_i,!1)):document.attachEvent&&(o=c,z=h.document,t=!1,v(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,p());});}function p(){t||(t=!0,o());}function v(){try{z.documentElement.doScroll("left");}catch(a){return void setTimeout(v,50);}p();}}(window); \ No newline at end of file diff --git a/packages/icon/es/font/iconfont.json b/packages/icon/es/font/iconfont.json deleted file mode 100644 index 8466528..0000000 --- a/packages/icon/es/font/iconfont.json +++ /dev/null @@ -1,3033 +0,0 @@ -{ - "id": "1739270", - "name": "蜂鸟实时布控系统", - "font_family": "iconfont", - "css_prefix_text": "icon-", - "description": "", - "glyphs": [ - { - "icon_id": "39554305", - "name": "设置", - "font_class": "shezhi1", - "unicode": "e7fb", - "unicode_decimal": 59387 - }, - { - "icon_id": "39554304", - "name": "播放", - "font_class": "bofang1", - "unicode": "e7fc", - "unicode_decimal": 59388 - }, - { - "icon_id": "39554349", - "name": "暂停", - "font_class": "zanting2", - "unicode": "e7fa", - "unicode_decimal": 59386 - }, - { - "icon_id": "38794757", - "name": "帮助", - "font_class": "bangzhu2", - "unicode": "e7f9", - "unicode_decimal": 59385 - }, - { - "icon_id": "38736535", - "name": "导出", - "font_class": "daochu2", - "unicode": "e7f7", - "unicode_decimal": 59383 - }, - { - "icon_id": "38736534", - "name": "导入", - "font_class": "daoru1", - "unicode": "e7f8", - "unicode_decimal": 59384 - }, - { - "icon_id": "38439162", - "name": "金东logo", - "font_class": "jindonglogo", - "unicode": "e7f6", - "unicode_decimal": 59382 - }, - { - "icon_id": "38353195", - "name": "管控预警select", - "font_class": "guankongyujingselect", - "unicode": "e7ef", - "unicode_decimal": 59375 - }, - { - "icon_id": "38353194", - "name": "管控预警nor", - "font_class": "guankongyujingnor", - "unicode": "e7f0", - "unicode_decimal": 59376 - }, - { - "icon_id": "38353193", - "name": "管控预案nor", - "font_class": "guankongyuannor", - "unicode": "e7f1", - "unicode_decimal": 59377 - }, - { - "icon_id": "38353188", - "name": "圈层预案select备份", - "font_class": "quancengyuanselectbeifen", - "unicode": "e7f2", - "unicode_decimal": 59378 - }, - { - "icon_id": "38353187", - "name": "圈层预警nor", - "font_class": "quancengyujingnor", - "unicode": "e7f3", - "unicode_decimal": 59379 - }, - { - "icon_id": "38353186", - "name": "圈层预案nor", - "font_class": "quancengyuannor", - "unicode": "e7f4", - "unicode_decimal": 59380 - }, - { - "icon_id": "38353185", - "name": "圈层预案select", - "font_class": "quancengyuanselect", - "unicode": "e7f5", - "unicode_decimal": 59381 - }, - { - "icon_id": "38353196", - "name": "管控预案select", - "font_class": "guankongyuanselect", - "unicode": "e7ee", - "unicode_decimal": 59374 - }, - { - "icon_id": "37989025", - "name": "金东", - "font_class": "jindong", - "unicode": "e7ed", - "unicode_decimal": 59373 - }, - { - "icon_id": "36344792", - "name": "档案详情_行为分析", - "font_class": "danganxiangqing_hangweifenxi", - "unicode": "e78d", - "unicode_decimal": 59277 - }, - { - "icon_id": "36344793", - "name": "档案详情_数据感知", - "font_class": "danganxiangqing_shujuganzhi", - "unicode": "e78e", - "unicode_decimal": 59278 - }, - { - "icon_id": "36344794", - "name": "档案详情_活动轨迹", - "font_class": "danganxiangqing_huodongguiji", - "unicode": "e78f", - "unicode_decimal": 59279 - }, - { - "icon_id": "36344795", - "name": "档案详情_基本信息", - "font_class": "danganxiangqing_jibenxinxi", - "unicode": "e7ea", - "unicode_decimal": 59370 - }, - { - "icon_id": "36344796", - "name": "档案详情_附属物品", - "font_class": "danganxiangqing_fushuwupin", - "unicode": "e7eb", - "unicode_decimal": 59371 - }, - { - "icon_id": "36344797", - "name": "档案详情_技战应用", - "font_class": "danganxiangqing_jizhanyingyong", - "unicode": "e7ec", - "unicode_decimal": 59372 - }, - { - "icon_id": "36101866", - "name": "加入档案库", - "font_class": "jiarudanganku", - "unicode": "e787", - "unicode_decimal": 59271 - }, - { - "icon_id": "36091918", - "name": "档案库nor", - "font_class": "dangankunor", - "unicode": "e793", - "unicode_decimal": 59283 - }, - { - "icon_id": "36091919", - "name": "布控任务select", - "font_class": "bukongrenwuselect", - "unicode": "e799", - "unicode_decimal": 59289 - }, - { - "icon_id": "36091920", - "name": "布控任务nor", - "font_class": "bukongrenwunor1", - "unicode": "e79a", - "unicode_decimal": 59290 - }, - { - "icon_id": "36091921", - "name": "档案库select", - "font_class": "dangankuselect", - "unicode": "e79b", - "unicode_decimal": 59291 - }, - { - "icon_id": "36091922", - "name": "技战法nor", - "font_class": "jizhanfanor", - "unicode": "e79c", - "unicode_decimal": 59292 - }, - { - "icon_id": "36091923", - "name": "非机动车查询nor", - "font_class": "feijidongchechaxunnor", - "unicode": "e79d", - "unicode_decimal": 59293 - }, - { - "icon_id": "36091924", - "name": "机动车查询select", - "font_class": "jidongchechaxunselect", - "unicode": "e79e", - "unicode_decimal": 59294 - }, - { - "icon_id": "36091925", - "name": "离线分析select 2", - "font_class": "a-lixianfenxiselect2", - "unicode": "e7a1", - "unicode_decimal": 59297 - }, - { - "icon_id": "36091926", - "name": "回溯分析select", - "font_class": "huisufenxiselect", - "unicode": "e7a2", - "unicode_decimal": 59298 - }, - { - "icon_id": "36091927", - "name": "技战法select", - "font_class": "jizhanfaselect", - "unicode": "e7a3", - "unicode_decimal": 59299 - }, - { - "icon_id": "36091928", - "name": "目标检索nor", - "font_class": "mubiaojiansuonor", - "unicode": "e7ae", - "unicode_decimal": 59310 - }, - { - "icon_id": "36091929", - "name": "路人库select", - "font_class": "lurenkuselect", - "unicode": "e7b1", - "unicode_decimal": 59313 - }, - { - "icon_id": "36091930", - "name": "数据驾驶舱select", - "font_class": "shujujiashicangselect", - "unicode": "e7b2", - "unicode_decimal": 59314 - }, - { - "icon_id": "36091931", - "name": "实时解析select", - "font_class": "shishijiexiselect", - "unicode": "e7b4", - "unicode_decimal": 59316 - }, - { - "icon_id": "36091932", - "name": "实时解析nor", - "font_class": "shishijiexinor", - "unicode": "e7b9", - "unicode_decimal": 59321 - }, - { - "icon_id": "36091933", - "name": "机动车查询nor", - "font_class": "jidongchechaxunnor", - "unicode": "e7c1", - "unicode_decimal": 59329 - }, - { - "icon_id": "36091934", - "name": "路人库nor", - "font_class": "lurenkunor1", - "unicode": "e7cf", - "unicode_decimal": 59343 - }, - { - "icon_id": "36091935", - "name": "目标特征查询nor", - "font_class": "mubiaotezhengchaxunnor", - "unicode": "e7e1", - "unicode_decimal": 59361 - }, - { - "icon_id": "36091936", - "name": "预警记录select", - "font_class": "yujingjiluselect", - "unicode": "e7e2", - "unicode_decimal": 59362 - }, - { - "icon_id": "36091937", - "name": "目标特征查询select", - "font_class": "mubiaotezhengchaxunselect", - "unicode": "e7e3", - "unicode_decimal": 59363 - }, - { - "icon_id": "36091938", - "name": "非机动车查询select", - "font_class": "feijidongchechaxunselect", - "unicode": "e7e4", - "unicode_decimal": 59364 - }, - { - "icon_id": "36091939", - "name": "预警记录nor", - "font_class": "yujingjilunor", - "unicode": "e7e5", - "unicode_decimal": 59365 - }, - { - "icon_id": "36091940", - "name": "离线分析select", - "font_class": "lixianfenxiselect", - "unicode": "e7e6", - "unicode_decimal": 59366 - }, - { - "icon_id": "36091941", - "name": "回溯分析nor", - "font_class": "huisufenxinor", - "unicode": "e7e7", - "unicode_decimal": 59367 - }, - { - "icon_id": "36091942", - "name": "数据驾驶舱nor", - "font_class": "shujujiashicangnor", - "unicode": "e7e8", - "unicode_decimal": 59368 - }, - { - "icon_id": "36091943", - "name": "目标检索select", - "font_class": "mubiaojiansuoselect", - "unicode": "e7e9", - "unicode_decimal": 59369 - }, - { - "icon_id": "35927785", - "name": "框选工具", - "font_class": "kuangxuangongju", - "unicode": "e796", - "unicode_decimal": 59286 - }, - { - "icon_id": "35652507", - "name": "蜂鸟", - "font_class": "fengniao", - "unicode": "e792", - "unicode_decimal": 59282 - }, - { - "icon_id": "35648087", - "name": "展开", - "font_class": "zhankai", - "unicode": "e790", - "unicode_decimal": 59280 - }, - { - "icon_id": "35648088", - "name": "收起", - "font_class": "shouqi", - "unicode": "e791", - "unicode_decimal": 59281 - }, - { - "icon_id": "6056161", - "name": "时间", - "font_class": "shijian", - "unicode": "e786", - "unicode_decimal": 59270 - }, - { - "icon_id": "16105260", - "name": "定位", - "font_class": "dingwei2", - "unicode": "e613", - "unicode_decimal": 58899 - }, - { - "icon_id": "34994072", - "name": "人员", - "font_class": "renyuan", - "unicode": "e784", - "unicode_decimal": 59268 - }, - { - "icon_id": "34994073", - "name": "后台", - "font_class": "houtai", - "unicode": "e785", - "unicode_decimal": 59269 - }, - { - "icon_id": "34324424", - "name": "左", - "font_class": "zuo", - "unicode": "e781", - "unicode_decimal": 59265 - }, - { - "icon_id": "34324425", - "name": "右", - "font_class": "you", - "unicode": "e783", - "unicode_decimal": 59267 - }, - { - "icon_id": "33566924", - "name": "卡口", - "font_class": "kakou", - "unicode": "e780", - "unicode_decimal": 59264 - }, - { - "icon_id": "33541952", - "name": "预警", - "font_class": "yujing1", - "unicode": "e77e", - "unicode_decimal": 59262 - }, - { - "icon_id": "32497852", - "name": "预案", - "font_class": "yuan2", - "unicode": "e77d", - "unicode_decimal": 59261 - }, - { - "icon_id": "32189295", - "name": "模型碰撞", - "font_class": "moxingpengzhuang", - "unicode": "e777", - "unicode_decimal": 59255 - }, - { - "icon_id": "32189296", - "name": "模型碰撞nor", - "font_class": "moxingpengzhuangnor", - "unicode": "e778", - "unicode_decimal": 59256 - }, - { - "icon_id": "32189298", - "name": "路人库", - "font_class": "lurenku", - "unicode": "e77b", - "unicode_decimal": 59259 - }, - { - "icon_id": "32190455", - "name": "路人库nor", - "font_class": "lurenkunor", - "unicode": "e77c", - "unicode_decimal": 59260 - }, - { - "icon_id": "32477562", - "name": "实名", - "font_class": "shiming", - "unicode": "e776", - "unicode_decimal": 59254 - }, - { - "icon_id": "32356230", - "name": "缩小", - "font_class": "suoxiao2", - "unicode": "e774", - "unicode_decimal": 59252 - }, - { - "icon_id": "32356231", - "name": "放大", - "font_class": "fangda1", - "unicode": "e775", - "unicode_decimal": 59253 - }, - { - "icon_id": "32305021", - "name": "关闭", - "font_class": "guanbi2", - "unicode": "e772", - "unicode_decimal": 59250 - }, - { - "icon_id": "32305022", - "name": "返回", - "font_class": "fanhui1", - "unicode": "e773", - "unicode_decimal": 59251 - }, - { - "icon_id": "31879940", - "name": "线索摸排", - "font_class": "xiansuomopai", - "unicode": "e76f", - "unicode_decimal": 59247 - }, - { - "icon_id": "31879931", - "name": "线索摸排nor", - "font_class": "xiansuomopainor", - "unicode": "e76e", - "unicode_decimal": 59246 - }, - { - "icon_id": "31879839", - "name": "闸机预警", - "font_class": "zhajiyujing", - "unicode": "e770", - "unicode_decimal": 59248 - }, - { - "icon_id": "31879840", - "name": "闸机预警nor", - "font_class": "zhajiyujingnor", - "unicode": "e771", - "unicode_decimal": 59249 - }, - { - "icon_id": "31879545", - "name": "追踪配置", - "font_class": "zhuizongpeizhi", - "unicode": "e76c", - "unicode_decimal": 59244 - }, - { - "icon_id": "31879546", - "name": "追踪配置nor", - "font_class": "zhuizongpeizhinor", - "unicode": "e76d", - "unicode_decimal": 59245 - }, - { - "icon_id": "31298167", - "name": "大屏切换 ", - "font_class": "dapingqiehuan", - "unicode": "e76b", - "unicode_decimal": 59243 - }, - { - "icon_id": "31293396", - "name": "选择", - "font_class": "xuanze", - "unicode": "e769", - "unicode_decimal": 59241 - }, - { - "icon_id": "31293397", - "name": "筛选", - "font_class": "shaixuan1", - "unicode": "e76a", - "unicode_decimal": 59242 - }, - { - "icon_id": "31281773", - "name": "车卡设备", - "font_class": "chekashebei", - "unicode": "e764", - "unicode_decimal": 59236 - }, - { - "icon_id": "31281774", - "name": "imsi设备", - "font_class": "imsishebei", - "unicode": "e765", - "unicode_decimal": 59237 - }, - { - "icon_id": "31281775", - "name": "形体设备", - "font_class": "xingtishebei", - "unicode": "e766", - "unicode_decimal": 59238 - }, - { - "icon_id": "31281776", - "name": "人脸设备", - "font_class": "renlianshebei", - "unicode": "e767", - "unicode_decimal": 59239 - }, - { - "icon_id": "31281777", - "name": "wifi设备", - "font_class": "wifishebei", - "unicode": "e768", - "unicode_decimal": 59240 - }, - { - "icon_id": "31175954", - "name": "瞄准 (2)", - "font_class": "a-miaozhun2", - "unicode": "e762", - "unicode_decimal": 59234 - }, - { - "icon_id": "31175955", - "name": "编组 19", - "font_class": "a-bianzu19", - "unicode": "e763", - "unicode_decimal": 59235 - }, - { - "icon_id": "31109996", - "name": "翻页", - "font_class": "fanye", - "unicode": "e75e", - "unicode_decimal": 59230 - }, - { - "icon_id": "31109998", - "name": "身份证", - "font_class": "shenfenzheng", - "unicode": "e75f", - "unicode_decimal": 59231 - }, - { - "icon_id": "31110000", - "name": "地址", - "font_class": "dizhi", - "unicode": "e760", - "unicode_decimal": 59232 - }, - { - "icon_id": "31110045", - "name": "关闭", - "font_class": "guanbi", - "unicode": "e761", - "unicode_decimal": 59233 - }, - { - "icon_id": "31088147", - "name": "点位", - "font_class": "dianwei1", - "unicode": "e75b", - "unicode_decimal": 59227 - }, - { - "icon_id": "30952366", - "name": "微卡口", - "font_class": "weikakou", - "unicode": "e757", - "unicode_decimal": 59223 - }, - { - "icon_id": "30952367", - "name": "微卡口nor", - "font_class": "weikakounor", - "unicode": "e758", - "unicode_decimal": 59224 - }, - { - "icon_id": "30952370", - "name": "场所码", - "font_class": "changsuoma", - "unicode": "e759", - "unicode_decimal": 59225 - }, - { - "icon_id": "30952371", - "name": "场所码nor", - "font_class": "changsuomanor", - "unicode": "e75a", - "unicode_decimal": 59226 - }, - { - "icon_id": "9974390", - "name": "预警", - "font_class": "yujing", - "unicode": "e756", - "unicode_decimal": 59222 - }, - { - "icon_id": "29552660", - "name": "检索nor", - "font_class": "jiansuonor", - "unicode": "e747", - "unicode_decimal": 59207 - }, - { - "icon_id": "29552661", - "name": "同行人分析nor", - "font_class": "tonghangrenfenxinor1", - "unicode": "e748", - "unicode_decimal": 59208 - }, - { - "icon_id": "29552662", - "name": "智能研判nor", - "font_class": "zhinengyanpannor", - "unicode": "e749", - "unicode_decimal": 59209 - }, - { - "icon_id": "29552663", - "name": "布控预警nor", - "font_class": "bukongyujingnor", - "unicode": "e74a", - "unicode_decimal": 59210 - }, - { - "icon_id": "29552664", - "name": "布控任务nor", - "font_class": "bukongrenwunor", - "unicode": "e74b", - "unicode_decimal": 59211 - }, - { - "icon_id": "29552665", - "name": "电子地图nor", - "font_class": "dianziditunor", - "unicode": "e754", - "unicode_decimal": 59220 - }, - { - "icon_id": "29552666", - "name": "追踪nor", - "font_class": "zhuizongnor1", - "unicode": "e755", - "unicode_decimal": 59221 - }, - { - "icon_id": "29552487", - "name": "追踪", - "font_class": "zhuizong1", - "unicode": "e746", - "unicode_decimal": 59206 - }, - { - "icon_id": "29552240", - "name": "布控任务", - "font_class": "bukongrenwu3", - "unicode": "e74c", - "unicode_decimal": 59212 - }, - { - "icon_id": "29552241", - "name": "电子地图", - "font_class": "dianziditu", - "unicode": "e74d", - "unicode_decimal": 59213 - }, - { - "icon_id": "29552242", - "name": "布控预警", - "font_class": "bukongyujing", - "unicode": "e750", - "unicode_decimal": 59216 - }, - { - "icon_id": "29552243", - "name": "同行人分析", - "font_class": "tonghangrenfenxi1", - "unicode": "e751", - "unicode_decimal": 59217 - }, - { - "icon_id": "29552244", - "name": "智能研判", - "font_class": "zhinengyanpan", - "unicode": "e752", - "unicode_decimal": 59218 - }, - { - "icon_id": "29552245", - "name": "检索", - "font_class": "jiansuo1", - "unicode": "e753", - "unicode_decimal": 59219 - }, - { - "icon_id": "29416924", - "name": "开启聚类", - "font_class": "kaiqijulei", - "unicode": "e745", - "unicode_decimal": 59205 - }, - { - "icon_id": "29416893", - "name": "同步", - "font_class": "tongbu", - "unicode": "e744", - "unicode_decimal": 59204 - }, - { - "icon_id": "28913138", - "name": "同行人分析", - "font_class": "tonghangrenfenxi", - "unicode": "e743", - "unicode_decimal": 59203 - }, - { - "icon_id": "28913111", - "name": "同行人分析nor", - "font_class": "tonghangrenfenxinor", - "unicode": "e742", - "unicode_decimal": 59202 - }, - { - "icon_id": "28603735", - "name": "技战应用", - "font_class": "jizhanyingyong", - "unicode": "e741", - "unicode_decimal": 59201 - }, - { - "icon_id": "28122666", - "name": "海康人脸布控nor", - "font_class": "haikangrenlianbukongnor", - "unicode": "e740", - "unicode_decimal": 59200 - }, - { - "icon_id": "28122657", - "name": "海康人脸布控", - "font_class": "haikangrenlianbukong", - "unicode": "e73f", - "unicode_decimal": 59199 - }, - { - "icon_id": "28028942", - "name": "拓展手段提示", - "font_class": "tuozhanshouduantishi", - "unicode": "e73e", - "unicode_decimal": 59198 - }, - { - "icon_id": "28022750", - "name": "返回摸排列表", - "font_class": "fanhuimopailiebiao", - "unicode": "e73d", - "unicode_decimal": 59197 - }, - { - "icon_id": "26859533", - "name": "头盔检测nor", - "font_class": "toukuijiancenor", - "unicode": "e73c", - "unicode_decimal": 59196 - }, - { - "icon_id": "26859527", - "name": "头盔检测", - "font_class": "toukuijiance", - "unicode": "e718", - "unicode_decimal": 59160 - }, - { - "icon_id": "26859240", - "name": "追形", - "font_class": "zhuixing", - "unicode": "e717", - "unicode_decimal": 59159 - }, - { - "icon_id": "26840606", - "name": "提示", - "font_class": "tishi4", - "unicode": "e73b", - "unicode_decimal": 59195 - }, - { - "icon_id": "26691196", - "name": "筛选(飞机)", - "font_class": "a-shaixuanfeiji", - "unicode": "e733", - "unicode_decimal": 59187 - }, - { - "icon_id": "26690614", - "name": "自动调整范围(飞机)", - "font_class": "a-zidongtiaozhengfanweifeiji", - "unicode": "e73a", - "unicode_decimal": 59194 - }, - { - "icon_id": "26630396", - "name": "盒子运维", - "font_class": "heziyunwei", - "unicode": "e739", - "unicode_decimal": 59193 - }, - { - "icon_id": "26620389", - "name": "切换", - "font_class": "qiehuan", - "unicode": "e738", - "unicode_decimal": 59192 - }, - { - "icon_id": "26523829", - "name": "第三方消息nor", - "font_class": "disanfangxiaoxinor", - "unicode": "e737", - "unicode_decimal": 59191 - }, - { - "icon_id": "26523827", - "name": "第三方消息", - "font_class": "disanfangxiaoxi", - "unicode": "e736", - "unicode_decimal": 59190 - }, - { - "icon_id": "25930570", - "name": "导航", - "font_class": "daohang", - "unicode": "e735", - "unicode_decimal": 59189 - }, - { - "icon_id": "25930569", - "name": "用户", - "font_class": "yonghu", - "unicode": "e734", - "unicode_decimal": 59188 - }, - { - "icon_id": "25878393", - "name": "飞机", - "font_class": "feiji", - "unicode": "e732", - "unicode_decimal": 59186 - }, - { - "icon_id": "25809480", - "name": "结束追踪", - "font_class": "jieshuzhuizong", - "unicode": "e730", - "unicode_decimal": 59184 - }, - { - "icon_id": "25809481", - "name": "回溯周边", - "font_class": "huisuzhoubian", - "unicode": "e731", - "unicode_decimal": 59185 - }, - { - "icon_id": "25809477", - "name": "继续追踪", - "font_class": "jixuzhuizong", - "unicode": "e72d", - "unicode_decimal": 59181 - }, - { - "icon_id": "25809478", - "name": "调整范围", - "font_class": "tiaozhengfanwei", - "unicode": "e72e", - "unicode_decimal": 59182 - }, - { - "icon_id": "25809479", - "name": "检索", - "font_class": "jiansuo", - "unicode": "e72f", - "unicode_decimal": 59183 - }, - { - "icon_id": "25796784", - "name": "轨迹", - "font_class": "guiji", - "unicode": "e72c", - "unicode_decimal": 59180 - }, - { - "icon_id": "25796636", - "name": "基础信息", - "font_class": "jichuxinxi", - "unicode": "e72b", - "unicode_decimal": 59179 - }, - { - "icon_id": "25796635", - "name": "档案摘要", - "font_class": "danganzhaiyao", - "unicode": "e72a", - "unicode_decimal": 59178 - }, - { - "icon_id": "25778781", - "name": "精准布控icon_on", - "font_class": "jingzhunbukongicon_on", - "unicode": "e728", - "unicode_decimal": 59176 - }, - { - "icon_id": "25778782", - "name": "精准布控icon_off", - "font_class": "jingzhunbukongicon_off", - "unicode": "e729", - "unicode_decimal": 59177 - }, - { - "icon_id": "25528851", - "name": "跳转", - "font_class": "tiaozhuan", - "unicode": "e727", - "unicode_decimal": 59175 - }, - { - "icon_id": "25364398", - "name": "设置", - "font_class": "shezhi", - "unicode": "e726", - "unicode_decimal": 59174 - }, - { - "icon_id": "25364282", - "name": "帮助", - "font_class": "bangzhu1", - "unicode": "e725", - "unicode_decimal": 59173 - }, - { - "icon_id": "25156298", - "name": "刷新", - "font_class": "shuaxin1", - "unicode": "e724", - "unicode_decimal": 59172 - }, - { - "icon_id": "25011432", - "name": "多素材备份", - "font_class": "duosucaibeifen", - "unicode": "e722", - "unicode_decimal": 59170 - }, - { - "icon_id": "25011433", - "name": "多素材", - "font_class": "duosucai", - "unicode": "e723", - "unicode_decimal": 59171 - }, - { - "icon_id": "24963746", - "name": "数据统计", - "font_class": "shujutongji", - "unicode": "e721", - "unicode_decimal": 59169 - }, - { - "icon_id": "24944893", - "name": "人脸", - "font_class": "renlian", - "unicode": "e71c", - "unicode_decimal": 59164 - }, - { - "icon_id": "24944894", - "name": "形体", - "font_class": "xingti", - "unicode": "e71d", - "unicode_decimal": 59165 - }, - { - "icon_id": "24944895", - "name": "机动车", - "font_class": "jidongche", - "unicode": "e71e", - "unicode_decimal": 59166 - }, - { - "icon_id": "24944896", - "name": "回溯分析", - "font_class": "huisufenxi4", - "unicode": "e71f", - "unicode_decimal": 59167 - }, - { - "icon_id": "24944897", - "name": "离线分析", - "font_class": "lixianfenxi4", - "unicode": "e720", - "unicode_decimal": 59168 - }, - { - "icon_id": "24944892", - "name": "非机动车", - "font_class": "feijidongche", - "unicode": "e71b", - "unicode_decimal": 59163 - }, - { - "icon_id": "24936781", - "name": "数据大屏", - "font_class": "shujudaping", - "unicode": "e71a", - "unicode_decimal": 59162 - }, - { - "icon_id": "24913034", - "name": "配置算法", - "font_class": "peizhisuanfa", - "unicode": "e719", - "unicode_decimal": 59161 - }, - { - "icon_id": "24685855", - "name": "追踪", - "font_class": "zhuizong", - "unicode": "e715", - "unicode_decimal": 59157 - }, - { - "icon_id": "24685856", - "name": "追踪nor", - "font_class": "zhuizongnor", - "unicode": "e716", - "unicode_decimal": 59158 - }, - { - "icon_id": "24661441", - "name": "点位", - "font_class": "dianwei", - "unicode": "e714", - "unicode_decimal": 59156 - }, - { - "icon_id": "24661326", - "name": "Container", - "font_class": "Container", - "unicode": "e713", - "unicode_decimal": 59155 - }, - { - "icon_id": "24661126", - "name": "Attachment", - "font_class": "Attachment", - "unicode": "e712", - "unicode_decimal": 59154 - }, - { - "icon_id": "24630118", - "name": "叉", - "font_class": "cha", - "unicode": "e711", - "unicode_decimal": 59153 - }, - { - "icon_id": "24630116", - "name": "勾", - "font_class": "gou", - "unicode": "e710", - "unicode_decimal": 59152 - }, - { - "icon_id": "24630033", - "name": "导入", - "font_class": "daoru", - "unicode": "e70f", - "unicode_decimal": 59151 - }, - { - "icon_id": "24607250", - "name": "全息检索", - "font_class": "quanxijiansuo", - "unicode": "e70e", - "unicode_decimal": 59150 - }, - { - "icon_id": "24604837", - "name": "查看监控", - "font_class": "chakanjiankong", - "unicode": "e70c", - "unicode_decimal": 59148 - }, - { - "icon_id": "24604704", - "name": "提示", - "font_class": "tishi3", - "unicode": "e70d", - "unicode_decimal": 59149 - }, - { - "icon_id": "24604626", - "name": "黑夜模式", - "font_class": "heiyemoshi", - "unicode": "e70b", - "unicode_decimal": 59147 - }, - { - "icon_id": "24604623", - "name": "正常模式", - "font_class": "zhengchangmoshi", - "unicode": "e70a", - "unicode_decimal": 59146 - }, - { - "icon_id": "24554896", - "name": "定位", - "font_class": "dingwei1", - "unicode": "e709", - "unicode_decimal": 59145 - }, - { - "icon_id": "24442799", - "name": "排序", - "font_class": "paixu", - "unicode": "e708", - "unicode_decimal": 59144 - }, - { - "icon_id": "24420402", - "name": "添加预案", - "font_class": "tianjiayuan", - "unicode": "e707", - "unicode_decimal": 59143 - }, - { - "icon_id": "23916590", - "name": "聚类档案库nor", - "font_class": "juleidangankunor", - "unicode": "e705", - "unicode_decimal": 59141 - }, - { - "icon_id": "23916591", - "name": "聚类档案库", - "font_class": "juleidanganku", - "unicode": "e706", - "unicode_decimal": 59142 - }, - { - "icon_id": "23499142", - "name": "关联", - "font_class": "guanlian", - "unicode": "e704", - "unicode_decimal": 59140 - }, - { - "icon_id": "23444887", - "name": "人脸标注", - "font_class": "renlianbiaozhu", - "unicode": "e703", - "unicode_decimal": 59139 - }, - { - "icon_id": "23304285", - "name": "聚类结果", - "font_class": "juleijieguo", - "unicode": "e6ec", - "unicode_decimal": 59116 - }, - { - "icon_id": "23304286", - "name": "聚类任务nor", - "font_class": "juleirenwunor", - "unicode": "e6fb", - "unicode_decimal": 59131 - }, - { - "icon_id": "23304287", - "name": "聚类结果nor", - "font_class": "juleijieguonor", - "unicode": "e701", - "unicode_decimal": 59137 - }, - { - "icon_id": "23304288", - "name": "聚类任务", - "font_class": "juleirenwu", - "unicode": "e702", - "unicode_decimal": 59138 - }, - { - "icon_id": "20290678", - "name": "重置", - "font_class": "zhongzhi3", - "unicode": "e8ff", - "unicode_decimal": 59647 - }, - { - "icon_id": "23210742", - "name": "旋转", - "font_class": "xuanzhuan1", - "unicode": "e6fd", - "unicode_decimal": 59133 - }, - { - "icon_id": "23254545", - "name": "双目标注", - "font_class": "shuangmubiaozhu1", - "unicode": "e700", - "unicode_decimal": 59136 - }, - { - "icon_id": "23203403", - "name": "手动框选", - "font_class": "shoudongkuangxuan", - "unicode": "e6f9", - "unicode_decimal": 59129 - }, - { - "icon_id": "23234078", - "name": "暂停", - "font_class": "zanting1", - "unicode": "e6fe", - "unicode_decimal": 59134 - }, - { - "icon_id": "23234079", - "name": "中止", - "font_class": "zhongzhi1", - "unicode": "e6ff", - "unicode_decimal": 59135 - }, - { - "icon_id": "23203404", - "name": "手动", - "font_class": "shoudong", - "unicode": "e6fa", - "unicode_decimal": 59130 - }, - { - "icon_id": "23203406", - "name": "自动", - "font_class": "zidong", - "unicode": "e6fc", - "unicode_decimal": 59132 - }, - { - "icon_id": "23203224", - "name": "诊断", - "font_class": "zhenduan", - "unicode": "e6f8", - "unicode_decimal": 59128 - }, - { - "icon_id": "23203126", - "name": "Check-Circle-Fill", - "font_class": "Check-Circle-Fill1", - "unicode": "e6f3", - "unicode_decimal": 59123 - }, - { - "icon_id": "23203127", - "name": "Info--Circle-Fill", - "font_class": "Info--Circle-Fill", - "unicode": "e6f4", - "unicode_decimal": 59124 - }, - { - "icon_id": "23203128", - "name": "Close-Circle-Fill", - "font_class": "Close-Circle-Fill", - "unicode": "e6f5", - "unicode_decimal": 59125 - }, - { - "icon_id": "23203129", - "name": "Warning-Circle-Fill", - "font_class": "Warning-Circle-Fill", - "unicode": "e6f6", - "unicode_decimal": 59126 - }, - { - "icon_id": "23203130", - "name": "Question-Circle-Fill", - "font_class": "Question-Circle-Fill", - "unicode": "e6f7", - "unicode_decimal": 59127 - }, - { - "icon_id": "23071890", - "name": "暂存架", - "font_class": "zancunjia", - "unicode": "e6f2", - "unicode_decimal": 59122 - }, - { - "icon_id": "22907690", - "name": "Check-Circle-Fill", - "font_class": "Check-Circle-Fill", - "unicode": "e6f1", - "unicode_decimal": 59121 - }, - { - "icon_id": "22884339", - "name": "图片集", - "font_class": "tupianji", - "unicode": "e6f0", - "unicode_decimal": 59120 - }, - { - "icon_id": "22871348", - "name": "全屏", - "font_class": "quanping1", - "unicode": "e6ed", - "unicode_decimal": 59117 - }, - { - "icon_id": "22871349", - "name": "音量", - "font_class": "yinliang", - "unicode": "e6ee", - "unicode_decimal": 59118 - }, - { - "icon_id": "22871350", - "name": "缩小", - "font_class": "suoxiao1", - "unicode": "e6ef", - "unicode_decimal": 59119 - }, - { - "icon_id": "22658169", - "name": "home", - "font_class": "home", - "unicode": "e6eb", - "unicode_decimal": 59115 - }, - { - "icon_id": "22658130", - "name": "最小化", - "font_class": "zuixiaohua", - "unicode": "e6e9", - "unicode_decimal": 59113 - }, - { - "icon_id": "22658131", - "name": "最大化", - "font_class": "zuidahua", - "unicode": "e6ea", - "unicode_decimal": 59114 - }, - { - "icon_id": "22658054", - "name": "标准化", - "font_class": "biaozhunhua", - "unicode": "e6e6", - "unicode_decimal": 59110 - }, - { - "icon_id": "22544357", - "name": "聚类", - "font_class": "julei", - "unicode": "e6e5", - "unicode_decimal": 59109 - }, - { - "icon_id": "21829058", - "name": "密码可见", - "font_class": "bianzu", - "unicode": "e6e7", - "unicode_decimal": 59111 - }, - { - "icon_id": "21829059", - "name": "密码不可见", - "font_class": "bianzu3", - "unicode": "e6e8", - "unicode_decimal": 59112 - }, - { - "icon_id": "21780473", - "name": "编组 7", - "font_class": "bianzu7", - "unicode": "e6e3", - "unicode_decimal": 59107 - }, - { - "icon_id": "21780474", - "name": "编组 2", - "font_class": "bianzu2", - "unicode": "e6e4", - "unicode_decimal": 59108 - }, - { - "icon_id": "21738272", - "name": "卡片切换", - "font_class": "kapianqiehuan", - "unicode": "e6e2", - "unicode_decimal": 59106 - }, - { - "icon_id": "21695431", - "name": "多边形", - "font_class": "duobianxing1", - "unicode": "e6e0", - "unicode_decimal": 59104 - }, - { - "icon_id": "21695432", - "name": "方", - "font_class": "fang1", - "unicode": "e6e1", - "unicode_decimal": 59105 - }, - { - "icon_id": "21695430", - "name": "圆", - "font_class": "yuan1", - "unicode": "e6df", - "unicode_decimal": 59103 - }, - { - "icon_id": "21695426", - "name": "测距离", - "font_class": "cejuli", - "unicode": "e6de", - "unicode_decimal": 59102 - }, - { - "icon_id": "21694880", - "name": "网格框选nor", - "font_class": "wanggekuangxuannor", - "unicode": "e6dc", - "unicode_decimal": 59100 - }, - { - "icon_id": "21694881", - "name": "路径框选nor", - "font_class": "lujingkuangxuannor", - "unicode": "e6dd", - "unicode_decimal": 59101 - }, - { - "icon_id": "21600424", - "name": "穿梭", - "font_class": "chuansuo", - "unicode": "e6db", - "unicode_decimal": 59099 - }, - { - "icon_id": "21248188", - "name": "边缘盒子", - "font_class": "bianyuanhezinor", - "unicode": "e6d8", - "unicode_decimal": 59096 - }, - { - "icon_id": "21248189", - "name": "误检库", - "font_class": "wujiankuhov", - "unicode": "e6d9", - "unicode_decimal": 59097 - }, - { - "icon_id": "21248190", - "name": "操作日志", - "font_class": "caozuorizhinor", - "unicode": "e6da", - "unicode_decimal": 59098 - }, - { - "icon_id": "13838312", - "name": "collect_dot", - "font_class": "collect_dot", - "unicode": "e619", - "unicode_decimal": 58905 - }, - { - "icon_id": "20982904", - "name": "出现定位bg", - "font_class": "chuxiandingweibg", - "unicode": "e6d4", - "unicode_decimal": 59092 - }, - { - "icon_id": "20982905", - "name": "出现定位icon", - "font_class": "chuxiandingweiicon", - "unicode": "e6d5", - "unicode_decimal": 59093 - }, - { - "icon_id": "20982843", - "name": "摄像头定位bg", - "font_class": "shexiangtoudingweibg", - "unicode": "e6d6", - "unicode_decimal": 59094 - }, - { - "icon_id": "20982844", - "name": "摄像头定位icon", - "font_class": "shexiangtoudingweiicon", - "unicode": "e6d7", - "unicode_decimal": 59095 - }, - { - "icon_id": "20933994", - "name": "下发结果", - "font_class": "xiafajieguo", - "unicode": "e6d2", - "unicode_decimal": 59090 - }, - { - "icon_id": "20933996", - "name": "导出", - "font_class": "daochu1", - "unicode": "e6d3", - "unicode_decimal": 59091 - }, - { - "icon_id": "20933901", - "name": "最近出现", - "font_class": "zuijinchuxian", - "unicode": "e6cc", - "unicode_decimal": 59084 - }, - { - "icon_id": "20933902", - "name": "累计抓拍", - "font_class": "leijizhuapai", - "unicode": "e6d0", - "unicode_decimal": 59088 - }, - { - "icon_id": "20933907", - "name": "异常事件", - "font_class": "yichangshijian", - "unicode": "e6d1", - "unicode_decimal": 59089 - }, - { - "icon_id": "20925063", - "name": "定位", - "font_class": "dingwei", - "unicode": "e6cb", - "unicode_decimal": 59083 - }, - { - "icon_id": "20894407", - "name": "图片", - "font_class": "tupian", - "unicode": "e6ad", - "unicode_decimal": 59053 - }, - { - "icon_id": "20433461", - "name": "失败原因", - "font_class": "wenti", - "unicode": "e6ac", - "unicode_decimal": 59052 - }, - { - "icon_id": "20432083", - "name": "点位-已选中", - "font_class": "lixian1", - "unicode": "e6ab", - "unicode_decimal": 59051 - }, - { - "icon_id": "20415322", - "name": "异常", - "font_class": "yichang", - "unicode": "e6a8", - "unicode_decimal": 59048 - }, - { - "icon_id": "19332242", - "name": "追形-修改点位", - "font_class": "zhuixing-xiugaidianwei", - "unicode": "e6a7", - "unicode_decimal": 59047 - }, - { - "icon_id": "19049729", - "name": "问号", - "font_class": "wenhao1", - "unicode": "e69e", - "unicode_decimal": 59038 - }, - { - "icon_id": "19041610", - "name": "地图_定位", - "font_class": "ditu_dingwei", - "unicode": "e69d", - "unicode_decimal": 59037 - }, - { - "icon_id": "19041571", - "name": "地图_放大", - "font_class": "ditu_fangda", - "unicode": "e689", - "unicode_decimal": 59017 - }, - { - "icon_id": "19041572", - "name": "地图_缩小", - "font_class": "ditu_suoxiao", - "unicode": "e69a", - "unicode_decimal": 59034 - }, - { - "icon_id": "19039288", - "name": "查看布控任务", - "font_class": "chakanbukongrenwu", - "unicode": "e688", - "unicode_decimal": 59016 - }, - { - "icon_id": "18985662", - "name": "裂图", - "font_class": "lietu", - "unicode": "e687", - "unicode_decimal": 59015 - }, - { - "icon_id": "18907313", - "name": "重置", - "font_class": "zhongzhi", - "unicode": "e67e", - "unicode_decimal": 59006 - }, - { - "icon_id": "18907314", - "name": "下拉大", - "font_class": "xialada", - "unicode": "e67f", - "unicode_decimal": 59007 - }, - { - "icon_id": "18905520", - "name": "智能关联_形体", - "font_class": "zhinengguanlian_xingti", - "unicode": "e67b", - "unicode_decimal": 59003 - }, - { - "icon_id": "18905521", - "name": "智能关联_人脸", - "font_class": "zhinengguanlian_renlian", - "unicode": "e67c", - "unicode_decimal": 59004 - }, - { - "icon_id": "16018461", - "name": "下箭头", - "font_class": "xiajiantou", - "unicode": "e75c", - "unicode_decimal": 59228 - }, - { - "icon_id": "18885308", - "name": "智能关联_小箭头", - "font_class": "zhinengguanlian_xiaojiantou", - "unicode": "e67d", - "unicode_decimal": 59005 - }, - { - "icon_id": "18883781", - "name": "智能关联_箭头", - "font_class": "zhinengguanlian_jiantou", - "unicode": "e67a", - "unicode_decimal": 59002 - }, - { - "icon_id": "16018463", - "name": "上箭头", - "font_class": "shangjiantou", - "unicode": "e75d", - "unicode_decimal": 59229 - }, - { - "icon_id": "18686782", - "name": "版本信息", - "font_class": "banbenxinxi", - "unicode": "e679", - "unicode_decimal": 59001 - }, - { - "icon_id": "1330924", - "name": "问号", - "font_class": "wenhao", - "unicode": "e61f", - "unicode_decimal": 58911 - }, - { - "icon_id": "17614568", - "name": "编辑人员", - "font_class": "bianjirenyuan", - "unicode": "e7e0", - "unicode_decimal": 59360 - }, - { - "icon_id": "17416216", - "name": "提示", - "font_class": "tishi2", - "unicode": "e7df", - "unicode_decimal": 59359 - }, - { - "icon_id": "17292128", - "name": "摄像机", - "font_class": "shexiangji2", - "unicode": "e7de", - "unicode_decimal": 59358 - }, - { - "icon_id": "17255570", - "name": "轨迹追踪", - "font_class": "guijizhuizong", - "unicode": "e7dd", - "unicode_decimal": 59357 - }, - { - "icon_id": "17255389", - "name": "截帧", - "font_class": "jiezhen1", - "unicode": "e7dc", - "unicode_decimal": 59356 - }, - { - "icon_id": "17254424", - "name": "添加轨迹回溯", - "font_class": "tianjiaguijihuisu", - "unicode": "e7db", - "unicode_decimal": 59355 - }, - { - "icon_id": "17251847", - "name": "停止", - "font_class": "tingzhi", - "unicode": "e7cd", - "unicode_decimal": 59341 - }, - { - "icon_id": "17251960", - "name": "包围圈", - "font_class": "baoweiquan", - "unicode": "e7ce", - "unicode_decimal": 59342 - }, - { - "icon_id": "17252131", - "name": "上传视频", - "font_class": "shangchuanshipin", - "unicode": "e7d0", - "unicode_decimal": 59344 - }, - { - "icon_id": "17252147", - "name": "移动", - "font_class": "yidong", - "unicode": "e7d1", - "unicode_decimal": 59345 - }, - { - "icon_id": "17252288", - "name": "创建新布控", - "font_class": "chuangjianxinbukong1", - "unicode": "e7d2", - "unicode_decimal": 59346 - }, - { - "icon_id": "17253015", - "name": "移除", - "font_class": "yichu1", - "unicode": "e7d3", - "unicode_decimal": 59347 - }, - { - "icon_id": "17253033", - "name": "提示", - "font_class": "tishi1", - "unicode": "e7d4", - "unicode_decimal": 59348 - }, - { - "icon_id": "17253112", - "name": "VS", - "font_class": "VS", - "unicode": "e7d5", - "unicode_decimal": 59349 - }, - { - "icon_id": "17253139", - "name": "全局总览", - "font_class": "quanjuzonglan", - "unicode": "e7d6", - "unicode_decimal": 59350 - }, - { - "icon_id": "17253187", - "name": "查看分析任务", - "font_class": "chakanfenxirenwu1", - "unicode": "e7d7", - "unicode_decimal": 59351 - }, - { - "icon_id": "17253208", - "name": "消息", - "font_class": "xiaoxi", - "unicode": "e7d8", - "unicode_decimal": 59352 - }, - { - "icon_id": "17254065", - "name": "用户名", - "font_class": "yonghuming", - "unicode": "e7d9", - "unicode_decimal": 59353 - }, - { - "icon_id": "17254204", - "name": "退出", - "font_class": "tuichu", - "unicode": "e7da", - "unicode_decimal": 59354 - }, - { - "icon_id": "17251737", - "name": "轨迹追踪nor", - "font_class": "guijizhuizongnor", - "unicode": "e7cb", - "unicode_decimal": 59339 - }, - { - "icon_id": "17251738", - "name": "轨迹追踪", - "font_class": "guijizhuizong2", - "unicode": "e7cc", - "unicode_decimal": 59340 - }, - { - "icon_id": "17190034", - "name": "布控任务", - "font_class": "bukongrenwu1", - "unicode": "e7b7", - "unicode_decimal": 59319 - }, - { - "icon_id": "17190035", - "name": "摄像机", - "font_class": "shexiangji", - "unicode": "e7b8", - "unicode_decimal": 59320 - }, - { - "icon_id": "17190037", - "name": "预警地图", - "font_class": "yujingditu", - "unicode": "e7ba", - "unicode_decimal": 59322 - }, - { - "icon_id": "17190038", - "name": "离线分析", - "font_class": "lixianfenxi2", - "unicode": "e7bb", - "unicode_decimal": 59323 - }, - { - "icon_id": "17190039", - "name": "预案管理", - "font_class": "yuanguanli1", - "unicode": "e7bc", - "unicode_decimal": 59324 - }, - { - "icon_id": "17190040", - "name": "档案库", - "font_class": "danganku", - "unicode": "e7bd", - "unicode_decimal": 59325 - }, - { - "icon_id": "17190041", - "name": "回溯分析", - "font_class": "huisufenxi2", - "unicode": "e7be", - "unicode_decimal": 59326 - }, - { - "icon_id": "17190042", - "name": "库内检索", - "font_class": "kuneijiansuo", - "unicode": "e7bf", - "unicode_decimal": 59327 - }, - { - "icon_id": "17190043", - "name": "结构化查询", - "font_class": "jiegouhuachaxun", - "unicode": "e7c0", - "unicode_decimal": 59328 - }, - { - "icon_id": "17190062", - "name": "布控任务", - "font_class": "bukongrenwu2", - "unicode": "e7c2", - "unicode_decimal": 59330 - }, - { - "icon_id": "17190063", - "name": "预案管理", - "font_class": "yuanguanli2", - "unicode": "e7c3", - "unicode_decimal": 59331 - }, - { - "icon_id": "17190064", - "name": "摄像机", - "font_class": "shexiangji1", - "unicode": "e7c4", - "unicode_decimal": 59332 - }, - { - "icon_id": "17190065", - "name": "库内检索", - "font_class": "kuneijiansuo1", - "unicode": "e7c5", - "unicode_decimal": 59333 - }, - { - "icon_id": "17190066", - "name": "离线分析", - "font_class": "lixianfenxi3", - "unicode": "e7c6", - "unicode_decimal": 59334 - }, - { - "icon_id": "17190067", - "name": "档案库", - "font_class": "danganku1", - "unicode": "e7c7", - "unicode_decimal": 59335 - }, - { - "icon_id": "17190068", - "name": "预警地图", - "font_class": "yujingditu1", - "unicode": "e7c8", - "unicode_decimal": 59336 - }, - { - "icon_id": "17190069", - "name": "回溯分析", - "font_class": "huisufenxi3", - "unicode": "e7c9", - "unicode_decimal": 59337 - }, - { - "icon_id": "17190167", - "name": "结构化查询nor", - "font_class": "jiegouhuachaxunnor", - "unicode": "e7ca", - "unicode_decimal": 59338 - }, - { - "icon_id": "17073967", - "name": "创建新布控", - "font_class": "chuangjianxinbukong", - "unicode": "e7b6", - "unicode_decimal": 59318 - }, - { - "icon_id": "16018746", - "name": "框选", - "font_class": "kuangxuan", - "unicode": "e77f", - "unicode_decimal": 59263 - }, - { - "icon_id": "16018715", - "name": "高级筛选", - "font_class": "gaojishaixuan", - "unicode": "e779", - "unicode_decimal": 59257 - }, - { - "icon_id": "16018716", - "name": "高级筛选收起", - "font_class": "gaojishaixuanshouqi", - "unicode": "e77a", - "unicode_decimal": 59258 - }, - { - "icon_id": "16924391", - "name": "布控任务", - "font_class": "bukongrenwu", - "unicode": "e7b5", - "unicode_decimal": 59317 - }, - { - "icon_id": "16018385", - "name": "日期", - "font_class": "riqi", - "unicode": "e74f", - "unicode_decimal": 59215 - }, - { - "icon_id": "16301333", - "name": "时间切换", - "font_class": "shijianqiehuan", - "unicode": "e797", - "unicode_decimal": 59287 - }, - { - "icon_id": "16905699", - "name": "授权", - "font_class": "shouquan1", - "unicode": "e7b3", - "unicode_decimal": 59315 - }, - { - "icon_id": "647455", - "name": "播放", - "font_class": "video-play", - "unicode": "e653", - "unicode_decimal": 58963 - }, - { - "icon_id": "16611521", - "name": "实时分析", - "font_class": "shishifenxi", - "unicode": "e7af", - "unicode_decimal": 59311 - }, - { - "icon_id": "16611522", - "name": "查看分析任务", - "font_class": "chakanfenxirenwu", - "unicode": "e7b0", - "unicode_decimal": 59312 - }, - { - "icon_id": "16611335", - "name": "结构化分析", - "font_class": "jiegouhuafenxi", - "unicode": "e7ad", - "unicode_decimal": 59309 - }, - { - "icon_id": "14985809", - "name": "添加轨迹", - "font_class": "tianjiaguiji2", - "unicode": "e6aa", - "unicode_decimal": 59050 - }, - { - "icon_id": "15056394", - "name": "添加检索目标", - "font_class": "tianjiajiansuomubiao", - "unicode": "e6b0", - "unicode_decimal": 59056 - }, - { - "icon_id": "14677591", - "name": "add", - "font_class": "add", - "unicode": "e661", - "unicode_decimal": 58977 - }, - { - "icon_id": "16320529", - "name": "地点", - "font_class": "didian", - "unicode": "e798", - "unicode_decimal": 59288 - }, - { - "icon_id": "16406202", - "name": "播放hov", - "font_class": "bofanghov", - "unicode": "e79f", - "unicode_decimal": 59295 - }, - { - "icon_id": "16406205", - "name": "播放", - "font_class": "bofang3", - "unicode": "e7a0", - "unicode_decimal": 59296 - }, - { - "icon_id": "16018760", - "name": "警告", - "font_class": "jinggao", - "unicode": "e788", - "unicode_decimal": 59272 - }, - { - "icon_id": "16018761", - "name": "提示", - "font_class": "tishi", - "unicode": "e789", - "unicode_decimal": 59273 - }, - { - "icon_id": "16018772", - "name": "帮助", - "font_class": "bangzhu", - "unicode": "e78a", - "unicode_decimal": 59274 - }, - { - "icon_id": "16018774", - "name": "关闭", - "font_class": "guanbi1", - "unicode": "e78b", - "unicode_decimal": 59275 - }, - { - "icon_id": "16018783", - "name": "成功", - "font_class": "chenggong", - "unicode": "e78c", - "unicode_decimal": 59276 - }, - { - "icon_id": "16438442", - "name": "前往", - "font_class": "qianwang", - "unicode": "e7ac", - "unicode_decimal": 59308 - }, - { - "icon_id": "16437744", - "name": "授权", - "font_class": "shouquan", - "unicode": "e7ab", - "unicode_decimal": 59307 - }, - { - "icon_id": "16436820", - "name": "经纬度", - "font_class": "jingweidu", - "unicode": "e7aa", - "unicode_decimal": 59306 - }, - { - "icon_id": "16018384", - "name": "删除", - "font_class": "shanchu1", - "unicode": "e74e", - "unicode_decimal": 59214 - }, - { - "icon_id": "16018750", - "name": "导出", - "font_class": "daochu", - "unicode": "e782", - "unicode_decimal": 59266 - }, - { - "icon_id": "16436718", - "name": "资源管理", - "font_class": "ziyuanguanli", - "unicode": "e7a4", - "unicode_decimal": 59300 - }, - { - "icon_id": "16436719", - "name": "服务器授权", - "font_class": "fuwuqishouquan", - "unicode": "e7a5", - "unicode_decimal": 59301 - }, - { - "icon_id": "16436720", - "name": "修改密码", - "font_class": "xiugaimima", - "unicode": "e7a6", - "unicode_decimal": 59302 - }, - { - "icon_id": "16436721", - "name": "账号管理", - "font_class": "zhanghaoguanli", - "unicode": "e7a7", - "unicode_decimal": 59303 - }, - { - "icon_id": "16436722", - "name": "算力配额", - "font_class": "suanlipeie", - "unicode": "e7a8", - "unicode_decimal": 59304 - }, - { - "icon_id": "16436723", - "name": "VMS配置", - "font_class": "VMSpeizhi", - "unicode": "e7a9", - "unicode_decimal": 59305 - }, - { - "icon_id": "16059984", - "name": "添加", - "font_class": "tianjia1", - "unicode": "e794", - "unicode_decimal": 59284 - }, - { - "icon_id": "16059985", - "name": "移除", - "font_class": "yichu", - "unicode": "e795", - "unicode_decimal": 59285 - }, - { - "icon_id": "15809722", - "name": "路径", - "font_class": "lujing", - "unicode": "e6cf", - "unicode_decimal": 59087 - }, - { - "icon_id": "15809625", - "name": "监控信息", - "font_class": "jiankongxinxi", - "unicode": "e6c8", - "unicode_decimal": 59080 - }, - { - "icon_id": "15809627", - "name": "范围", - "font_class": "fanwei", - "unicode": "e6c9", - "unicode_decimal": 59081 - }, - { - "icon_id": "15809628", - "name": "案发地点", - "font_class": "anfadidian", - "unicode": "e6ca", - "unicode_decimal": 59082 - }, - { - "icon_id": "15809688", - "name": "工具箱", - "font_class": "gongjuxiang", - "unicode": "e6cd", - "unicode_decimal": 59085 - }, - { - "icon_id": "15809690", - "name": "工具箱关闭1", - "font_class": "gongjuxiangguanbi1", - "unicode": "e6ce", - "unicode_decimal": 59086 - }, - { - "icon_id": "15663416", - "name": "截侦", - "font_class": "jiezhen", - "unicode": "e6c2", - "unicode_decimal": 59074 - }, - { - "icon_id": "15660940", - "name": "回溯分析1", - "font_class": "huisufenxi1", - "unicode": "e6c6", - "unicode_decimal": 59078 - }, - { - "icon_id": "15660941", - "name": "回溯分析", - "font_class": "huisufenxi", - "unicode": "e6c7", - "unicode_decimal": 59079 - }, - { - "icon_id": "15492023", - "name": "添加视频文件", - "font_class": "tianjiashipinwenjian1", - "unicode": "e6c5", - "unicode_decimal": 59077 - }, - { - "icon_id": "15415140", - "name": "加载失败", - "font_class": "jiazaishibai", - "unicode": "e6c3", - "unicode_decimal": 59075 - }, - { - "icon_id": "15415141", - "name": "刷新", - "font_class": "shuaxin", - "unicode": "e6c4", - "unicode_decimal": 59076 - }, - { - "icon_id": "15340138", - "name": "全屏", - "font_class": "quanping", - "unicode": "e6c0", - "unicode_decimal": 59072 - }, - { - "icon_id": "15340139", - "name": "取消全屏", - "font_class": "quxiaoquanping", - "unicode": "e6c1", - "unicode_decimal": 59073 - }, - { - "icon_id": "15329202", - "name": "视频播放", - "font_class": "shipinbofang", - "unicode": "e6be", - "unicode_decimal": 59070 - }, - { - "icon_id": "15329203", - "name": "视频暂停", - "font_class": "shipinzanting", - "unicode": "e6bf", - "unicode_decimal": 59071 - }, - { - "icon_id": "15291283", - "name": "离线轨迹", - "font_class": "lixianguiji", - "unicode": "e6bd", - "unicode_decimal": 59069 - }, - { - "icon_id": "15291280", - "name": "离线", - "font_class": "lixian", - "unicode": "e6bc", - "unicode_decimal": 59068 - }, - { - "icon_id": "15208512", - "name": "小角标", - "font_class": "xiaojiaobiao", - "unicode": "e6bb", - "unicode_decimal": 59067 - }, - { - "icon_id": "15136409", - "name": "上传", - "font_class": "shangchuan1", - "unicode": "e6ba", - "unicode_decimal": 59066 - }, - { - "icon_id": "15136380", - "name": "添加为检索对象", - "font_class": "tianjiaweijiansuoduixiang", - "unicode": "e6b8", - "unicode_decimal": 59064 - }, - { - "icon_id": "15136381", - "name": "添加为检索记录", - "font_class": "tianjiaweijiansuojilu", - "unicode": "e6b9", - "unicode_decimal": 59065 - }, - { - "icon_id": "15085430", - "name": "离线分析", - "font_class": "lixianfenxi1", - "unicode": "e6b7", - "unicode_decimal": 59063 - }, - { - "icon_id": "15078532", - "name": "快速检索hov", - "font_class": "kuaisujiansuohov", - "unicode": "e6b5", - "unicode_decimal": 59061 - }, - { - "icon_id": "15078533", - "name": "快速检索", - "font_class": "kuaisujiansuo1", - "unicode": "e6b6", - "unicode_decimal": 59062 - }, - { - "icon_id": "15076848", - "name": "快速检索", - "font_class": "kuaisujiansuo", - "unicode": "e6b4", - "unicode_decimal": 59060 - }, - { - "icon_id": "15076727", - "name": "预案管理", - "font_class": "yuanguanli", - "unicode": "e6b1", - "unicode_decimal": 59057 - }, - { - "icon_id": "15076728", - "name": "摄像头", - "font_class": "shexiangtou", - "unicode": "e6b2", - "unicode_decimal": 59058 - }, - { - "icon_id": "15076729", - "name": "离线分析", - "font_class": "lixianfenxi", - "unicode": "e6b3", - "unicode_decimal": 59059 - }, - { - "icon_id": "13838314", - "name": "filter", - "font_class": "filter", - "unicode": "e61a", - "unicode_decimal": 58906 - }, - { - "icon_id": "15010235", - "name": "添加为追踪对象", - "font_class": "tianjiaweizhuizongduixiang2", - "unicode": "e6af", - "unicode_decimal": 59055 - }, - { - "icon_id": "14986007", - "name": "添加为追踪对象", - "font_class": "tianjiaweizhuizongduixiang1", - "unicode": "e6ae", - "unicode_decimal": 59054 - }, - { - "icon_id": "14982860", - "name": "保存", - "font_class": "baocun1", - "unicode": "e6a9", - "unicode_decimal": 59049 - }, - { - "icon_id": "14981791", - "name": "添加视频文件夹", - "font_class": "tianjiashipinwenjianjia", - "unicode": "e6a5", - "unicode_decimal": 59045 - }, - { - "icon_id": "14981792", - "name": "添加视频文件", - "font_class": "tianjiashipinwenjian", - "unicode": "e6a6", - "unicode_decimal": 59046 - }, - { - "icon_id": "14981667", - "name": "地图", - "font_class": "ditu", - "unicode": "e6a4", - "unicode_decimal": 59044 - }, - { - "icon_id": "14981619", - "name": "新建摄像头", - "font_class": "xinjianshexiangtou", - "unicode": "e6a3", - "unicode_decimal": 59043 - }, - { - "icon_id": "14981570", - "name": "历史回溯", - "font_class": "lishihuisu", - "unicode": "e6a2", - "unicode_decimal": 59042 - }, - { - "icon_id": "14796345", - "name": "deco已添加为轨迹", - "font_class": "decoyitianjiaweiguiji", - "unicode": "e69f", - "unicode_decimal": 59039 - }, - { - "icon_id": "14796466", - "name": "播放切换", - "font_class": "bofangqiehuan", - "unicode": "e6a0", - "unicode_decimal": 59040 - }, - { - "icon_id": "14796642", - "name": "添加", - "font_class": "tianjia", - "unicode": "e6a1", - "unicode_decimal": 59041 - }, - { - "icon_id": "14795587", - "name": "保存", - "font_class": "baocun", - "unicode": "e698", - "unicode_decimal": 59032 - }, - { - "icon_id": "14795971", - "name": "工具箱关闭", - "font_class": "gongjuxiangguanbi", - "unicode": "e699", - "unicode_decimal": 59033 - }, - { - "icon_id": "14795973", - "name": "上传", - "font_class": "shangchuan", - "unicode": "e69b", - "unicode_decimal": 59035 - }, - { - "icon_id": "14795974", - "name": "工具箱", - "font_class": "gongjuxiang1", - "unicode": "e69c", - "unicode_decimal": 59036 - }, - { - "icon_id": "14682024", - "name": "logo", - "font_class": "logo", - "unicode": "e692", - "unicode_decimal": 59026 - }, - { - "icon_id": "13841331", - "name": "setting", - "font_class": "setting", - "unicode": "e627", - "unicode_decimal": 58919 - }, - { - "icon_id": "13841332", - "name": "user", - "font_class": "user", - "unicode": "e628", - "unicode_decimal": 58920 - }, - { - "icon_id": "13841333", - "name": "quit", - "font_class": "quit", - "unicode": "e629", - "unicode_decimal": 58921 - }, - { - "icon_id": "14681873", - "name": "arrow展开没选中", - "font_class": "arrowzhankaimeixuanzhong", - "unicode": "e693", - "unicode_decimal": 59027 - }, - { - "icon_id": "14681874", - "name": "arrow展开选中", - "font_class": "arrowzhankaixuanzhong", - "unicode": "e694", - "unicode_decimal": 59028 - }, - { - "icon_id": "14681940", - "name": "选择选中", - "font_class": "xuanzexuanzhong", - "unicode": "e695", - "unicode_decimal": 59029 - }, - { - "icon_id": "14681960", - "name": "选择半选", - "font_class": "xuanzebanxuan", - "unicode": "e696", - "unicode_decimal": 59030 - }, - { - "icon_id": "14681963", - "name": "选择nor", - "font_class": "xuanzenor", - "unicode": "e697", - "unicode_decimal": 59031 - }, - { - "icon_id": "14681709", - "name": "筛选关闭nor", - "font_class": "shaixuanguanbinor", - "unicode": "e691", - "unicode_decimal": 59025 - }, - { - "icon_id": "14681588", - "name": "更多", - "font_class": "gengduo", - "unicode": "e68e", - "unicode_decimal": 59022 - }, - { - "icon_id": "14681594", - "name": "右展开", - "font_class": "youzhankai", - "unicode": "e68f", - "unicode_decimal": 59023 - }, - { - "icon_id": "14681599", - "name": "左收起", - "font_class": "zuoshouqi", - "unicode": "e690", - "unicode_decimal": 59024 - }, - { - "icon_id": "14681557", - "name": "圆", - "font_class": "yuan", - "unicode": "e68a", - "unicode_decimal": 59018 - }, - { - "icon_id": "14681559", - "name": "多边形", - "font_class": "duobianxing", - "unicode": "e68b", - "unicode_decimal": 59019 - }, - { - "icon_id": "14681564", - "name": "方", - "font_class": "fang", - "unicode": "e68c", - "unicode_decimal": 59020 - }, - { - "icon_id": "14681566", - "name": "测距", - "font_class": "ceju", - "unicode": "e68d", - "unicode_decimal": 59021 - }, - { - "icon_id": "14681437", - "name": "实时追踪", - "font_class": "shishizhuizong1", - "unicode": "e683", - "unicode_decimal": 59011 - }, - { - "icon_id": "14681438", - "name": "轨迹回溯", - "font_class": "guijihuisu1", - "unicode": "e684", - "unicode_decimal": 59012 - }, - { - "icon_id": "14681441", - "name": "添加轨迹", - "font_class": "tianjiaguiji", - "unicode": "e685", - "unicode_decimal": 59013 - }, - { - "icon_id": "14681442", - "name": "移除轨迹", - "font_class": "yichuguiji", - "unicode": "e686", - "unicode_decimal": 59014 - }, - { - "icon_id": "14681327", - "name": "放大", - "font_class": "fangda", - "unicode": "e680", - "unicode_decimal": 59008 - }, - { - "icon_id": "14681332", - "name": "缩小", - "font_class": "suoxiao", - "unicode": "e681", - "unicode_decimal": 59009 - }, - { - "icon_id": "14681337", - "name": "下载", - "font_class": "xiazai", - "unicode": "e682", - "unicode_decimal": 59010 - }, - { - "icon_id": "14681144", - "name": "返回", - "font_class": "fanhui", - "unicode": "e678", - "unicode_decimal": 59000 - }, - { - "icon_id": "14681046", - "name": "搜索", - "font_class": "sousuo", - "unicode": "e669", - "unicode_decimal": 58985 - }, - { - "icon_id": "14681047", - "name": "取消选中", - "font_class": "quxiaoxuanzhong", - "unicode": "e66a", - "unicode_decimal": 58986 - }, - { - "icon_id": "14681048", - "name": "批量选择nor", - "font_class": "piliangxuanzenor", - "unicode": "e66b", - "unicode_decimal": 58987 - }, - { - "icon_id": "14681051", - "name": "开启分析", - "font_class": "kaiqifenxi", - "unicode": "e66c", - "unicode_decimal": 58988 - }, - { - "icon_id": "14681060", - "name": "取消分析", - "font_class": "quxiaofenxi", - "unicode": "e66d", - "unicode_decimal": 58989 - }, - { - "icon_id": "14681062", - "name": "筛选", - "font_class": "shaixuan", - "unicode": "e66e", - "unicode_decimal": 58990 - }, - { - "icon_id": "14681067", - "name": "档案", - "font_class": "dangan", - "unicode": "e66f", - "unicode_decimal": 58991 - }, - { - "icon_id": "14681071", - "name": "播放", - "font_class": "bofang", - "unicode": "e670", - "unicode_decimal": 58992 - }, - { - "icon_id": "14681073", - "name": "暂停", - "font_class": "zanting", - "unicode": "e671", - "unicode_decimal": 58993 - }, - { - "icon_id": "14681075", - "name": "删除", - "font_class": "shanchu", - "unicode": "e672", - "unicode_decimal": 58994 - }, - { - "icon_id": "14681083", - "name": "添加为追踪对象", - "font_class": "tianjiaweizhuizongduixiang", - "unicode": "e673", - "unicode_decimal": 58995 - }, - { - "icon_id": "14681086", - "name": "查看大图", - "font_class": "chakandatu", - "unicode": "e674", - "unicode_decimal": 58996 - }, - { - "icon_id": "14681091", - "name": "检索记录", - "font_class": "jiansuojilu", - "unicode": "e675", - "unicode_decimal": 58997 - }, - { - "icon_id": "14681108", - "name": "阈值", - "font_class": "yuzhi", - "unicode": "e676", - "unicode_decimal": 58998 - }, - { - "icon_id": "14681117", - "name": "查看详情", - "font_class": "chakanxiangqing", - "unicode": "e677", - "unicode_decimal": 58999 - }, - { - "icon_id": "14677552", - "name": "轨迹回溯", - "font_class": "guijihuisu", - "unicode": "e65c", - "unicode_decimal": 58972 - }, - { - "icon_id": "14677553", - "name": "点位配置nor", - "font_class": "dianweipeizhinor", - "unicode": "e65d", - "unicode_decimal": 58973 - }, - { - "icon_id": "14677554", - "name": "一人一档", - "font_class": "yirenyidang", - "unicode": "e65e", - "unicode_decimal": 58974 - }, - { - "icon_id": "14677555", - "name": "同伴分析", - "font_class": "tongbanfenxi", - "unicode": "e65f", - "unicode_decimal": 58975 - }, - { - "icon_id": "14677595", - "name": "切换左", - "font_class": "qiehuanzuo", - "unicode": "e662", - "unicode_decimal": 58978 - }, - { - "icon_id": "14677596", - "name": "切换右", - "font_class": "qiehuanyou", - "unicode": "e663", - "unicode_decimal": 58979 - }, - { - "icon_id": "14677606", - "name": "停止等待", - "font_class": "tingzhidengdai", - "unicode": "e664", - "unicode_decimal": 58980 - }, - { - "icon_id": "14677607", - "name": "已关闭", - "font_class": "yiguanbi", - "unicode": "e665", - "unicode_decimal": 58981 - }, - { - "icon_id": "14677648", - "name": "弹窗关闭", - "font_class": "danchuangguanbi", - "unicode": "e666", - "unicode_decimal": 58982 - }, - { - "icon_id": "14071593", - "name": "历史记录", - "font_class": "lishijilu", - "unicode": "e64a", - "unicode_decimal": 58954 - }, - { - "icon_id": "14070176", - "name": "旋转", - "font_class": "xuanzhuan", - "unicode": "e648", - "unicode_decimal": 58952 - }, - { - "icon_id": "14070177", - "name": "清除", - "font_class": "qingchu", - "unicode": "e649", - "unicode_decimal": 58953 - }, - { - "icon_id": "14000087", - "name": "dangantianjia", - "font_class": "dangantianjia", - "unicode": "e63d", - "unicode_decimal": 58941 - }, - { - "icon_id": "14000088", - "name": "bianji", - "font_class": "bianji", - "unicode": "e63e", - "unicode_decimal": 58942 - }, - { - "icon_id": "13979358", - "name": "fullscreen", - "font_class": "fullscreen", - "unicode": "e63b", - "unicode_decimal": 58939 - }, - { - "icon_id": "13979359", - "name": "cancle_fullscreen", - "font_class": "cancle_fullscreen", - "unicode": "e63c", - "unicode_decimal": 58940 - }, - { - "icon_id": "13979335", - "name": "quanyujiansuo_nor", - "font_class": "quanyujiansuo_nor", - "unicode": "e639", - "unicode_decimal": 58937 - }, - { - "icon_id": "13979336", - "name": "guijihuisu_nor", - "font_class": "guijihuisu_nor", - "unicode": "e63a", - "unicode_decimal": 58938 - } - ] -} diff --git a/packages/icon/es/font/iconfont.ttf b/packages/icon/es/font/iconfont.ttf deleted file mode 100644 index c466c9f..0000000 Binary files a/packages/icon/es/font/iconfont.ttf and /dev/null differ diff --git a/packages/icon/es/font/iconfont.woff b/packages/icon/es/font/iconfont.woff deleted file mode 100644 index f5b4968..0000000 Binary files a/packages/icon/es/font/iconfont.woff and /dev/null differ diff --git a/packages/icon/es/font/iconfont.woff2 b/packages/icon/es/font/iconfont.woff2 deleted file mode 100644 index 325adce..0000000 Binary files a/packages/icon/es/font/iconfont.woff2 and /dev/null differ diff --git a/packages/icon/es/index.js b/packages/icon/es/index.js deleted file mode 100644 index 1733337..0000000 --- a/packages/icon/es/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as IconFont } from "./Iconfont"; \ No newline at end of file diff --git a/packages/map/es/index.js b/packages/map/es/index.js deleted file mode 100644 index 1ff428f..0000000 --- a/packages/map/es/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default as MapBox } from "./mapBox"; -export * from 'react-map-gl'; -export * from "./utils"; \ No newline at end of file diff --git a/packages/map/es/interface.js b/packages/map/es/interface.js deleted file mode 100644 index e69de29..0000000 diff --git a/packages/meta/es/BigImagePreview/BigImagePreview.js b/packages/meta/es/BigImagePreview/BigImagePreview.js deleted file mode 100644 index 0ea20fa..0000000 --- a/packages/meta/es/BigImagePreview/BigImagePreview.js +++ /dev/null @@ -1,549 +0,0 @@ -import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime"; -import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; -import React, { useEffect, useState, useRef, useImperativeHandle } from 'react'; -import classNames from 'classnames'; -import { get, pick, isNull, generateImg, dataURLToBlob, getTransforms, addEventListenerWrapper, getFileByRect } from '@zhst/func'; -import Align from 'rc-align'; -import { Empty, AttachImage } from '..'; -import { Cropper, Viewer, EVENT_VIEWER_TRANSFORM_CHANGE, EVENT_VIEWER_READY, EVENT_CROP_START, EVENT_CROP_END } from "../ImageEditor"; -import BtnGroup from "./components/BtnGroup"; -import "./index.less"; -import { defaultAlignOption, CROP_TYPE } from "../utils/constants"; -import { getOdRect, getExtendRect, getTransformRect, getRotateImg } from "./bigImagePreviewHelper"; -var componentName = "zhst-image__img-view"; -var cropBtnDataSource = [{ - key: 'close', - icon: 'icon-danchuangguanbi', - title: '退出' -}, { - key: 'autoCrop', - icon: 'icon-zidong', - title: '智能框选' -}, { - key: 'customCrop', - icon: 'icon-shoudong', - title: '手动框选' -}]; -var operateBtnDataSource = [{ - key: 'zoomOut', - icon: 'icon-fangda', - title: '放大' -}, { - key: 'zoomIn', - icon: 'icon-suoxiao', - title: '缩小' -}, { - key: 'reset', - icon: 'icon-zhongzhi3', - title: '重置图片' -}]; -export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref) { - var width = props.width, - height = props.height, - _props$showScore = props.showScore, - showScore = _props$showScore === void 0 ? false : _props$showScore, - data = props.data, - _props$showOpt = props.showOpt, - showOpt = _props$showOpt === void 0 ? false : _props$showOpt, - _props$showAttachImgL = props.showAttachImgLabel, - showAttachImgLabel = _props$showAttachImgL === void 0 ? true : _props$showAttachImgL, - _props$screenshotButt = props.screenshotButtonAlign, - screenshotButtonAlign = _props$screenshotButt === void 0 ? defaultAlignOption : _props$screenshotButt, - _props$screenshotButt2 = props.screenshotButtonRender, - screenshotButtonRender = _props$screenshotButt2 === void 0 ? function () { - return /*#__PURE__*/React.createElement("div", { - style: { - color: '#fff', - width: '80px', - top: 0, - fontSize: 12 - } - }, "\u56DE\u8C03DOM"); - } : _props$screenshotButt2, - _props$hideLeftTopBtn = props.hideLeftTopBtn, - hideLeftTopBtn = _props$hideLeftTopBtn === void 0 ? true : _props$hideLeftTopBtn, - onDraw = props.onDraw, - _props$viewOption = props.viewOption, - viewOption = _props$viewOption === void 0 ? {} : _props$viewOption, - type = props.type, - hideTypeBtns = props.hideTypeBtns, - customEmpty = props.customEmpty; - var imageKey = data.imageKey, - attachImg = data.attachImg, - odRect = data.odRect, - score = data.score, - _data$objects = data.objects, - objects = _data$objects === void 0 ? [] : _data$objects; - var imgContainerRef = React.useRef(null); - - // ============================= viewer ========================= - var imgInsRef = useRef(null); - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - isImgReady = _useState2[0], - setIsImgReady = _useState2[1]; - useEffect(function () { - if (!(imgContainerRef !== null && imgContainerRef !== void 0 && imgContainerRef.current)) return; - var handleReady = addEventListenerWrapper(imgContainerRef.current, EVENT_VIEWER_READY, function () { - setIsImgReady(true); - }); - var handleTransformChange = addEventListenerWrapper(imgContainerRef.current, EVENT_VIEWER_TRANSFORM_CHANGE, function () {}); - imgInsRef.current = new Viewer(imgContainerRef.current, _objectSpread(_objectSpread({}, viewOption), {}, { - fitScaleAsMinScale: true, - image: generateImg(imageKey) - })); - return function () { - var _imgInsRef$current, _imgInsRef$current$de; - handleReady === null || handleReady === void 0 || handleReady.remove(); - handleTransformChange === null || handleTransformChange === void 0 || handleTransformChange.remove(); - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current = imgInsRef.current) === null || _imgInsRef$current === void 0 || (_imgInsRef$current$de = _imgInsRef$current.destroy) === null || _imgInsRef$current$de === void 0 || _imgInsRef$current$de.call(_imgInsRef$current); - imgInsRef.current = null; - }; - }, [imageKey]); - - // ============================= viewer操作按钮 ========================= - var handleOptClick = function handleOptClick(v) { - var _imgInsRef$current2, _imgInsRef$current2$s, _imgInsRef$current3, _imgInsRef$current3$s, _imgInsRef$current4, _imgInsRef$current4$r; - switch (v) { - case 'zoomOut': - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current2 = imgInsRef.current) === null || _imgInsRef$current2 === void 0 || (_imgInsRef$current2$s = _imgInsRef$current2.scaleTo) === null || _imgInsRef$current2$s === void 0 || _imgInsRef$current2$s.call(_imgInsRef$current2, 0.1); - break; - case 'zoomIn': - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current3 = imgInsRef.current) === null || _imgInsRef$current3 === void 0 || (_imgInsRef$current3$s = _imgInsRef$current3.scaleTo) === null || _imgInsRef$current3$s === void 0 || _imgInsRef$current3$s.call(_imgInsRef$current3, -0.1); - break; - case 'reset': - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current4 = imgInsRef.current) === null || _imgInsRef$current4 === void 0 || (_imgInsRef$current4$r = _imgInsRef$current4.reset) === null || _imgInsRef$current4$r === void 0 || _imgInsRef$current4$r.call(_imgInsRef$current4, -0.1); - break; - } - }; - - // ============================= cropper ========================= - // 手动截图相关参数 - var cropInsRef = useRef(null); - var _useState3 = useState(showOpt), - _useState4 = _slicedToArray(_useState3, 2), - showCrop = _useState4[0], - setShowCrop = _useState4[1]; - var _useState5 = useState(type || CROP_TYPE['AUTO']), - _useState6 = _slicedToArray(_useState5, 2), - cropType = _useState6[0], - setCropType = _useState6[1]; - - // 自动截图相关参数 - var _useState7 = useState([]), - _useState8 = _slicedToArray(_useState7, 2), - odList = _useState8[0], - setOdList = _useState8[1]; - var _useState9 = useState([]), - _useState10 = _slicedToArray(_useState9, 2), - extendOdList = _useState10[0], - setExtendOdList = _useState10[1]; - var _useState11 = useState(null), - _useState12 = _slicedToArray(_useState11, 2), - selectRectId = _useState12[0], - setSelectRectId = _useState12[1]; - - // 定位按钮相关参数 - var alginContainerRef = useRef(null); - var alignRef = useRef(null); - var _useState13 = useState(null), - _useState14 = _slicedToArray(_useState13, 2), - cropRect = _useState14[0], - setCropRect = _useState14[1]; - - // 选中的版本号 - var _useState15 = useState(null), - _useState16 = _slicedToArray(_useState15, 2), - selectAlgorithmVersion = _useState16[0], - setSelectAlgorithmVersion = _useState16[1]; - var handlerCropStartRef = useRef(null); - var handlerCropEndRef = useRef(null); - var handleShapeSelectRef = useRef(null); - useEffect(function () { - initData(objects); - return function () { - var _imgInsRef$current5, _imgInsRef$current5$c, _handlerCropStartRef$, _handlerCropEndRef$cu, _handleShapeSelectRef, _cropInsRef$current, _cropInsRef$current$d; - (_imgInsRef$current5 = imgInsRef.current) === null || _imgInsRef$current5 === void 0 || (_imgInsRef$current5$c = _imgInsRef$current5.clearShape) === null || _imgInsRef$current5$c === void 0 || _imgInsRef$current5$c.call(_imgInsRef$current5); - (_handlerCropStartRef$ = handlerCropStartRef.current) === null || _handlerCropStartRef$ === void 0 || _handlerCropStartRef$.remove(); - (_handlerCropEndRef$cu = handlerCropEndRef.current) === null || _handlerCropEndRef$cu === void 0 || _handlerCropEndRef$cu.remove(); - (_handleShapeSelectRef = handleShapeSelectRef.current) === null || _handleShapeSelectRef === void 0 || _handleShapeSelectRef.remove(); - cropInsRef === null || cropInsRef === void 0 || (_cropInsRef$current = cropInsRef.current) === null || _cropInsRef$current === void 0 || (_cropInsRef$current$d = _cropInsRef$current.destroy) === null || _cropInsRef$current$d === void 0 || _cropInsRef$current$d.call(_cropInsRef$current); - cropInsRef.current = null; - }; - }, [isImgReady, showCrop, cropType, imageKey]); - - // 初始化页面的绘制矩形 - var initData = function initData(_objects) { - var imgIns = imgInsRef.current; - var _odRect = odRect; - //清理crop - setCropRect(null); - if (!isImgReady) return; - if (!showCrop) { - var _imgIns$addShape; - imgIns === null || imgIns === void 0 || (_imgIns$addShape = imgIns.addShape) === null || _imgIns$addShape === void 0 || _imgIns$addShape.call(imgIns, { - x: get(_odRect, 'x', 0), - y: get(_odRect, 'y', 0), - w: get(_odRect, 'w', 0), - h: get(_odRect, 'h', 0), - selectAble: false - }); - return; - } - - // 自动模式 - if (cropType === CROP_TYPE['AUTO']) { - var handleGetOD = function handleGetOD(odList) { - var imgSize = imgIns.getImgSize(); - var shapeList = odList.map(function (rect) { - return _objectSpread(_objectSpread({}, rect), {}, { - selectAble: true, - id: ['id'], - algorithmVersion: rect.algorithmVersion - }); - }); - imgIns.replaceShape(shapeList); - //顺便吧扩展框拿到 - var extendRect = shapeList.map(function (rect) { - // @ts-ignore - var _extendRect = getExtendRect(rect, imgSize.w, imgSize.h, rect.algorithmVersion); - return _objectSpread(_objectSpread({}, rect), _extendRect); - }); - setExtendOdList(extendRect); - imgIns.replaceShape(shapeList); - // 框选监听事件 - handleShapeSelectRef.current = addEventListenerWrapper(imgContainerRef.current, 'shape-select', /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { - var id, selectShape, axisRect, _rect2; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - id = e.detail; - setSelectRectId(id); - selectShape = shapeList.find(function (v) { - return v['id'] === id; - }); - console.log('selectShape', selectShape); - if (selectShape) { - setSelectAlgorithmVersion(selectShape['algorithmVersion']); - //换算成屏幕坐标 - axisRect = imgIns.imgRectAxisToCanvasAxisRect(selectShape); - _rect2 = { - x: axisRect.x2 > axisRect.x ? axisRect.x : axisRect.x2, - y: axisRect.y2 > axisRect.y ? axisRect.y : axisRect.y2, - w: Math.abs(axisRect.x2 - axisRect.x), - h: Math.abs(axisRect.y2 - axisRect.y) - }; - setCropRect(_rect2); - onDraw === null || onDraw === void 0 || onDraw({ - rectList: [_rect2], - extendRectList: [_rect2], - imgKey: imageKey, - selectIndex: id - }); - } else { - // @ts-ignore - setCropRect(null); - } - case 5: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function (_x) { - return _ref.apply(this, arguments); - }; - }()); - }; - // @ts-ignore - var rect = getOdRect({ - objects: _objects - }); - setOdList(rect); - handleGetOD(rect); - } - - // 手动模式 - if (cropType === CROP_TYPE['CUSTOM']) { - var _imgIns$clearShape; - // 手动框选状态预先清除imgIns - imgIns === null || imgIns === void 0 || (_imgIns$clearShape = imgIns.clearShape) === null || _imgIns$clearShape === void 0 || _imgIns$clearShape.call(imgIns); - handlerCropStartRef.current = addEventListenerWrapper(imgContainerRef.current, EVENT_CROP_START, function () { - setSelectAlgorithmVersion(null); - setCropRect(null); - }); - handlerCropEndRef.current = addEventListenerWrapper(imgContainerRef.current, EVENT_CROP_END, /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) { - var _alignRef$current, _alignRef$current$for; - var data, _rect, _cropData; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - data = event.detail; - setSelectAlgorithmVersion(null); - _rect = { - x: data.left, - y: data.top, - w: data.width, - h: data.height - }; - setCropRect(_rect); - _context2.next = 6; - return getCropInfo({ - type: cropType, - rect: _rect - }); - case 6: - _cropData = _context2.sent; - onDraw === null || onDraw === void 0 || onDraw(_cropData); - alignRef === null || alignRef === void 0 || (_alignRef$current = alignRef.current) === null || _alignRef$current === void 0 || (_alignRef$current$for = _alignRef$current.forceAlign) === null || _alignRef$current$for === void 0 || _alignRef$current$for.call(_alignRef$current); - case 9: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - return function (_x2) { - return _ref2.apply(this, arguments); - }; - }()); - cropInsRef.current = new Cropper(imgContainerRef.current, { - showMask: true, - type: 'arrow', - viewer: imgIns - }); - } - }; - - // 获取框选的截图框信息 - var getCropInfo = /*#__PURE__*/function () { - var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(opt) { - var type, rect, cropType, cropRect, imgIns, transform, newImgKey, rectList, extendRectList, selectIndex, shapes, shapeIds, newRect, _data, data; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - type = opt.type, rect = opt.rect; - cropType = type; - cropRect = rect; - imgIns = imgInsRef.current; - transform = imgIns.targetTransform; - newImgKey = imageKey; - rectList = []; - extendRectList = []; - selectIndex = 0; - _context5.t0 = cropType; - _context5.next = _context5.t0 === CROP_TYPE['AUTO'] ? 12 : 18; - break; - case 12: - shapes = imgIns.getSelectShape(); - shapeIds = shapes.map(function (v) { - return v['id']; - }); - rectList = odList.filter(function (v) { - return shapeIds.includes(v['id']); - }).map(function (item) { - if (item.algorithmVersion === 'OBJECT_TYPE_FACE' || item.objectType === 'OBJECT_TYPE_FACE') { - if (!isNull(item.extendBox)) { - return _objectSpread(_objectSpread({}, item), {}, { - w: get(item, 'extendBox.w'), - h: get(item, 'extendBox.h'), - x: get(item, 'extendBox.x'), - y: get(item, 'extendBox.y') - }); - } - } else { - return item; - } - }); - extendRectList = extendOdList.filter(function (v) { - return shapeIds.includes(v['id']); - }).map(function (v) { - return pick(v, ['x', 'y', 'w', 'h', 'algorithmVersion', 'id']); - }); - selectIndex = rectList.findIndex(function (v) { - return v['id'] === selectRectId; - }); - return _context5.abrupt("break", 23); - case 18: - //获取旋转过的坐标 - // @ts-ignore - newRect = getTransformRect(imgIns.image, transform, cropRect); //判断是不是旋转过 - if (get(transform, 'rotate', 0) % 360 != 0) { - _data = getRotateImg(imgIns.image, get(transform, 'rotate', 0)); //在画布上画旋转后的图片 - newImgKey = _data; - } - rectList.push(newRect); - extendRectList.push(newRect); - return _context5.abrupt("break", 23); - case 23: - _context5.next = 25; - return Promise.all(extendRectList.map( /*#__PURE__*/function () { - var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rect, index) { - var file, imgKey; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - _context3.next = 2; - return getFileByRect(imgIns.image, rect); - case 2: - file = _context3.sent; - imgKey = file; - extendRectList[index] = _objectSpread(_objectSpread({}, rect), {}, { - imgKey: imgKey - }); - case 5: - case "end": - return _context3.stop(); - } - }, _callee3); - })); - return function (_x4, _x5) { - return _ref4.apply(this, arguments); - }; - }())); - case 25: - _context5.next = 27; - return Promise.all(rectList.map( /*#__PURE__*/function () { - var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rect, index) { - var faceCorrectImage, faceCorrectImageKey, base64, blobData, file, newRect; - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - faceCorrectImage = rect['faceCorrectImage']; - if (faceCorrectImage) { - base64 = "data:image/jpg;base64,".concat(faceCorrectImage); - blobData = dataURLToBlob(base64); - file = new window.File([blobData], "".concat(new Date().getTime())); - faceCorrectImageKey = file; - } - newRect = _objectSpread(_objectSpread({}, rect), faceCorrectImageKey ? { - faceCorrectImageKey: faceCorrectImageKey - } : {}); - delete newRect['faceCorrectImage']; - rectList[index] = newRect; - case 5: - case "end": - return _context4.stop(); - } - }, _callee4); - })); - return function (_x6, _x7) { - return _ref5.apply(this, arguments); - }; - }())); - case 27: - data = { - rectList: rectList, - extendRectList: extendRectList, - selectIndex: selectIndex, - imgKey: newImgKey - }; - return _context5.abrupt("return", data); - case 29: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - return function getCropInfo(_x3) { - return _ref3.apply(this, arguments); - }; - }(); - - // 操作界面判断 - var handleCropBtnClick = function handleCropBtnClick(v) { - switch (v) { - case 'close': - setShowCrop(false); - break; - case 'autoCrop': - setCropType(CROP_TYPE['AUTO']); - break; - case 'customCrop': - setCropType(CROP_TYPE['CUSTOM']); - break; - } - }; - - // ============================== Ref =============================== - useImperativeHandle(ref, function () { - return { - imgInsRef: imgInsRef, - setShowCrop: setShowCrop, - initData: initData, - getCropInfo: getCropInfo - }; - }); - return /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName)), - style: { - height: height, - width: width - } - }, imageKey ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "-main"), cropType === CROP_TYPE['AUTO'] && "".concat(componentName, "-main--cursor")), - ref: imgContainerRef - // style={{ width: width, height: height }} - }), !hideLeftTopBtn && /*#__PURE__*/React.createElement(BtnGroup, { - className: classNames("".concat(componentName, "-opt")), - dataSource: operateBtnDataSource, - onClick: handleOptClick, - placement: "left" - }), !hideTypeBtns && showCrop && /*#__PURE__*/React.createElement(BtnGroup, { - circle: true, - className: classNames("".concat(componentName, "-crop-opt")), - dataSource: cropBtnDataSource, - onClick: handleCropBtnClick, - selectKey: cropType === CROP_TYPE['AUTO'] ? 'autoCrop' : 'customCrop' - }), showCrop && cropRect && screenshotButtonRender && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - ref: alginContainerRef, - className: classNames("".concat(componentName, "-align")), - style: Object.assign({ - width: cropRect.w, - height: cropRect.h - }, getTransforms({ - translateX: cropRect.x, - translateY: cropRect.y - })) - }), /*#__PURE__*/React.createElement(Align, { - ref: alignRef, - monitorWindowResize: true, - align: screenshotButtonAlign, - target: function target() { - return alginContainerRef.current; - } - }, screenshotButtonRender({ - model: 'IMAGE', - // @ts-ignore - getCropInfo: getCropInfo, - setShowCrop: setShowCrop, - cropType: cropType, - selectAlgorithmVersion: selectAlgorithmVersion - }))), (attachImg === null || attachImg === void 0 ? void 0 : attachImg.length) && !showCrop && /*#__PURE__*/React.createElement(AttachImage, { - showAttachImgLabel: showAttachImgLabel, - data: attachImg - }), (showScore || score) && /*#__PURE__*/React.createElement("div", { - style: { - bottom: 20 - }, - className: classNames("".concat(componentName, "__face-score")) - }, "\u4EBA\u8138\u8D28\u91CF\u5206\uFF1A".concat(Number(score).toFixed(2)))) : /*#__PURE__*/React.createElement("div", { - style: { - height: '100%', - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - } - }, customEmpty || /*#__PURE__*/React.createElement(Empty, { - style: { - margin: 0 - }, - image: Empty.PRESENTED_IMAGE_SIMPLE, - description: "\u6682\u65E0\u6570\u636E" - }))); -}); -BigImagePreview.displayName = 'BigImagePreview'; -export default BigImagePreview; \ No newline at end of file diff --git a/packages/meta/es/BigImagePreview/bigImagePreviewHelper.js b/packages/meta/es/BigImagePreview/bigImagePreviewHelper.js deleted file mode 100644 index 397fe9f..0000000 --- a/packages/meta/es/BigImagePreview/bigImagePreviewHelper.js +++ /dev/null @@ -1,261 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; -import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; -import { cloneDeep, dataURLToBlob, get, isNull } from "@zhst/func"; -var proto = { - Common: { - AlgorithmVersion: { - VERSION_REID_HEAD_ATTR: '形体', - VERSION_FACE: '人脸', - VERSION_NON_MOTOR_VEHICLE: '非机动车' - } - } -}; -export var ALGORITHM_VERSION = _defineProperty(_defineProperty(_defineProperty({}, '7', '形体'), '4', '人脸'), '6', '非机动车'); -export var algorithmVersions = _toConsumableArray(Object.keys(ALGORITHM_VERSION)); -/** - * 格式化工具 - * @param originData - * @returns - */ -export var getOdRect = function getOdRect(originData) { - var data = get(originData, 'objects', []).filter(function (v) { - return !isNull(get(v, 'bboxRatio')) || get(v, 'objectIndex.objectId') !== '0'; - }).map(function (v, index) { - var rect = get(v, 'bboxRatio'); - var extendBox = get(v, 'extendBoxRatio'); - var frameTimestamp = get(v, 'timestamp'); //时间戳创建档案的时候需要 - var qualityScore = get(v, 'qualityScore'); - var algorithmVersion = get(v, 'objectType') === 'OBJECT_TYPE_PEDESTRAIN' ? 'VERSION_REID_HEAD_ATTR' : get(v, 'objectType') === 'OBJECT_TYPE_FACE' ? 'VERSION_FACE' : 'VERSION_REID_HEAD_ATTR'; - var objectRectIndex = algorithmVersion === 'VERSION_FACE' ? 0 : 1; - var objectType = get(v, 'objectType'); - var objectId = get(v, 'objectIndex.objectId'); - var sourceObjectId = get(v, 'sourceObjectId'); - return { - x: rect.x, - y: rect.y, - w: rect.w, - h: rect.h, - id: index, - qualityScore: qualityScore, - algorithmVersion: algorithmVersion, - objectRectIndex: objectRectIndex, - objectType: objectType, - objectId: objectId, - frameTimestamp: frameTimestamp, - sourceObjectId: sourceObjectId, - extendBox: extendBox - }; - }); - return data; -}; -export var getNormalization = function getNormalization(srcRect, maxW, maxH) { - var newRect = _objectSpread({}, srcRect); - newRect.x = srcRect.x / maxW; - newRect.y = srcRect.y / maxH; - newRect.w = srcRect.w / maxW; - newRect.h = srcRect.h / maxH; - if (newRect.x + newRect.w > 1) { - newRect.w = 1 - newRect.x; - } - if (newRect.y + newRect.h > 1) { - newRect.h = 1 - newRect.y; - } - return newRect; -}; -//传入od框 穿出 od扩展框 -export var getExtendRect = function getExtendRect(normalizationRect, imgW, imgH, type) { - var rect = { - x: normalizationRect.x * imgW, - y: normalizationRect.y * imgH, - w: normalizationRect.w * imgW, - h: normalizationRect.h * imgH - }; - var newRect; - if (type === proto.Common.AlgorithmVersion.VERSION_NON_MOTOR_VEHICLE) { - newRect = getBikeExtendRect(rect, imgW); - } else { - newRect = getOtherExtendRect(rect, imgW, imgH, type); - } - newRect = getNormalization(newRect, imgW, imgH); - return newRect; -}; -export var getBikeExtendRect = function getBikeExtendRect(rect, maxW) { - var newRect = _objectSpread({}, rect); - //向上扩大一倍 - var oldY = cloneDeep(rect.y); - newRect.y = newRect.y - newRect.h < 0 ? 0 : newRect.y - newRect.h; - newRect.h += oldY - newRect.y; - var newX = Math.round(newRect.x - newRect.w * 0.15); - if (newX < 0) { - newX = 0; - } - var newW = newRect.x - newX + newRect.w + Math.round(newRect.w * 0.15); - if (newX + newW > maxW) { - newW = maxW - newX; - } - newRect.x = newX; - newRect.w = newW; - return newRect; -}; -export var getOtherExtendRect = function getOtherExtendRect(srcRect, maxW, maxH, type) { - var wExtendRadio = 0.25; - var upExtendRadio = 0.25; - var downExtendRadio = 0.25; - var fixPersonExtend = true; - var nx = 0; - var nw = 0; - nx = srcRect.x - Math.round(srcRect.w * wExtendRadio); - if (nx < 0) { - nx = 0; - } - nw = srcRect.x - nx + srcRect.w + Math.round(srcRect.w * wExtendRadio); - if (nx + nw > maxW) { - nw = maxW - nx; - } - var ny = 0; - var nh = 0; - ny = srcRect.y - Math.round(upExtendRadio * srcRect.h); - if (ny < 0) { - ny = 0; - } - nh = srcRect.y - ny + srcRect.h + Math.round(srcRect.h * downExtendRadio); - if (ny + nh > maxH) { - nh = maxH - ny; - } - var newRect = { - x: nx, - y: ny, - w: nw, - h: nh - }; - if ((type === proto.Common.AlgorithmVersion.VERSION_REID_HEAD_ATTR || type === proto.Common.AlgorithmVersion.VERSION_FACE) && fixPersonExtend) { - var fixW = Math.round(nh * 0.75); - if (nw < fixW) { - // 应该扩展宽度 - var newX = nx + Math.round(nw / 2.0 - 0.5 * fixW); - if (newX < 0) { - newX = 0; - } - var newW = fixW; - if (newW + newX > maxW) { - newW = maxW - newX; - } - newRect = { - x: newX, - y: ny, - w: newW, - h: nh - }; - } else if (nw > fixW) { - // 应该扩展高度 - var fixH = Math.round(nw * 1.333); - var newY = ny + Math.round(nh / 2.0 - 0.5 * fixH); - if (newY < 0) { - newY = 0; - } - var newH = fixH; - if (newY + newH > maxH) { - newH = maxH - newY; - } - newRect = { - x: nx, - y: newY, - w: nw, - h: newH - }; - } - } - return newRect; -}; -export var getTransformRect = function getTransformRect(image, transform, rect) { - var canvasRect = { - x: rect.x, - y: rect.y, - x2: rect.x + rect.w, - y2: rect.h + rect.y - }; - //1.转成缩放前的坐标 - var translateX = transform.translateX, - translateY = transform.translateY, - scale = transform.scale, - rotate = transform.rotate; - var originAxisRect = { - x: (canvasRect.x - translateX) / scale, - y: (canvasRect.y - translateY) / scale, - x2: (canvasRect.x2 - translateX) / scale, - y2: (canvasRect.y2 - translateY) / scale - }; - //2.转成图片坐标 - //不考虑旋转 图片原点就是坐标原点 - var imgAxisRect = originAxisRect; - //但是旋转90度后图片不在坐标原点 加上这部分diff - if (rotate % 180 !== 0) { - //90度调整偏移量 - var offsetX = -(image.height - image.width) / 2; - var offsetY = -(image.width - image.height) / 2; - imgAxisRect = { - x: originAxisRect.x - offsetX, - y: originAxisRect.y - offsetY, - x2: originAxisRect.x2 - offsetX, - y2: originAxisRect.y2 - offsetY - }; - } - //3.限制框不要超出图片 - var imgW = image.width; - var imgH = image.height; - if (rotate % 180 !== 0) { - var _ref = [imgH, imgW]; - imgW = _ref[0]; - imgH = _ref[1]; - } - imgAxisRect.x = Math.min(imgW, Math.max(imgAxisRect.x, 0)); - imgAxisRect.y = Math.min(imgH, Math.max(imgAxisRect.y, 0)); - imgAxisRect.x2 = Math.min(imgW, Math.max(imgAxisRect.x2, 0)); - imgAxisRect.y2 = Math.min(imgH, Math.max(imgAxisRect.y2, 0)); - //获取归一化坐标 - var endRect = { - x: imgAxisRect.x2 > imgAxisRect.x ? imgAxisRect.x : imgAxisRect.x2, - y: imgAxisRect.y2 > imgAxisRect.y ? imgAxisRect.y : imgAxisRect.y2, - w: Math.abs(imgAxisRect.x2 - imgAxisRect.x), - h: Math.abs(imgAxisRect.y2 - imgAxisRect.y) - }; - return getNormalization(endRect, imgW, imgH); -}; - -//旋转图片后转成file 对象 -export var getRotateImg = function getRotateImg(image, rotate) { - var _commonCanvas$parentN; - var imgW = image.width; - var imgH = image.height; - if (rotate % 180 !== 0) { - var _ref2 = [imgH, imgW]; - imgW = _ref2[0]; - imgH = _ref2[1]; - } - var commonCanvas = document.createElement('canvas'); - commonCanvas.width = imgW; - commonCanvas.height = imgH; - commonCanvas.style.display = 'none'; - document.body.appendChild(commonCanvas); - var commonCtx = commonCanvas.getContext('2d'); - //移动到图片中心 旋转 - - commonCtx === null || commonCtx === void 0 || commonCtx.save(); - if (rotate % 180 !== 0) { - //90度调整偏移量 - commonCtx === null || commonCtx === void 0 || commonCtx.translate((image.height - image.width) / 2, (image.width - image.height) / 2); - } - commonCtx === null || commonCtx === void 0 || commonCtx.translate(image.width / 2, image.height / 2); - commonCtx === null || commonCtx === void 0 || commonCtx.rotate(rotate / 180 * Math.PI); - commonCtx === null || commonCtx === void 0 || commonCtx.translate(-image.width / 2, -image.height / 2); - commonCtx === null || commonCtx === void 0 || commonCtx.drawImage(image, 0, 0); - commonCtx === null || commonCtx === void 0 || commonCtx.restore(); - var dataUrl = commonCanvas.toDataURL('image/jpeg'); - var blobData = dataURLToBlob(dataUrl); - var file = new window.File([blobData], "".concat(new Date().getTime()), { - type: 'image/jpeg' - }); - (_commonCanvas$parentN = commonCanvas.parentNode) === null || _commonCanvas$parentN === void 0 || _commonCanvas$parentN.removeChild(commonCanvas); - return file; -}; \ No newline at end of file diff --git a/packages/meta/es/BigImagePreview/components/BtnGroup/index.js b/packages/meta/es/BigImagePreview/components/BtnGroup/index.js deleted file mode 100644 index 41d740c..0000000 --- a/packages/meta/es/BigImagePreview/components/BtnGroup/index.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import classNames from 'classnames'; -import { Button, Tooltip } from "../../.."; -import { IconFont as Icon } from '@zhst/icon'; -import "./index.less"; -var componentName = "zhst-image__btn-group"; -export var BtnGroup = function BtnGroup(props) { - var dataSource = props.dataSource, - _onClick = props.onClick, - className = props.className, - circle = props.circle, - _props$selectKey = props.selectKey, - selectKey = _props$selectKey === void 0 ? '' : _props$selectKey, - _props$placement = props.placement, - placement = _props$placement === void 0 ? 'right' : _props$placement, - style = props.style; - return /*#__PURE__*/React.createElement("div", { - className: classNames(componentName, circle && "".concat(componentName, "--circle"), className), - style: style - }, dataSource.map(function (_ref) { - var key = _ref.key, - icon = _ref.icon, - title = _ref.title; - var isSelect = key === selectKey; - return /*#__PURE__*/React.createElement(Tooltip, { - key: key, - placement: placement, - title: title - }, /*#__PURE__*/React.createElement("div", { - key: key, - className: classNames("".concat(componentName, "__item"), isSelect && "".concat(componentName, "__item--active")) - }, /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick(e) { - _onClick(key, e); - } - }, /*#__PURE__*/React.createElement(Icon, { - size: 18, - icon: icon - })))); - })); -}; -BtnGroup.displayName = 'BtnGroup'; -export default BtnGroup; \ No newline at end of file diff --git a/packages/meta/es/BigImagePreview/index.js b/packages/meta/es/BigImagePreview/index.js deleted file mode 100644 index abc99c3..0000000 --- a/packages/meta/es/BigImagePreview/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import BigImagePreview from "./BigImagePreview"; -export default BigImagePreview; \ No newline at end of file diff --git a/packages/meta/es/CompareImage/CompareImage.js b/packages/meta/es/CompareImage/CompareImage.js deleted file mode 100644 index 479c247..0000000 --- a/packages/meta/es/CompareImage/CompareImage.js +++ /dev/null @@ -1,170 +0,0 @@ -import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; -import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useContext } from 'react'; -// @ts-ignore -import { generateImg, get, addEventListenerWrapper } from '@zhst/func'; -import { useUpdateEffect } from '@zhst/hooks'; -import { IconFont } from '@zhst/icon'; -import Button from "../button"; -import classNames from 'classnames'; -import Viewer from "../ImageEditor/viewer"; -import CornerScore from "./components/CornerScore"; -import "./index.less"; -import { ConfigContext } from "../config-provider"; -import { EMPTY_BASE64 } from "../utils/constants"; -// 对比图组件 -var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) { - var customizePrefixCls = props.prefixCls, - _props$label = props.label, - label = _props$label === void 0 ? '标题' : _props$label, - _props$width = props.width, - width = _props$width === void 0 ? '400' : _props$width, - height = props.height, - _props$openRoll = props.openRoll, - openRoll = _props$openRoll === void 0 ? true : _props$openRoll, - labelColor = props.labelColor, - _props$url = props.url, - url = _props$url === void 0 ? '' : _props$url, - _props$score = props.score, - score = _props$score === void 0 ? 0 : _props$score, - preDisable = props.preDisable, - nextDisable = props.nextDisable, - showScore = props.showScore, - onNext = props.onNext, - _props$showTools = props.showTools, - showTools = _props$showTools === void 0 ? true : _props$showTools, - onPre = props.onPre; - var _useContext = useContext(ConfigContext), - getPrefixCls = _useContext.getPrefixCls; - var componentName = getPrefixCls('image__compater-view', customizePrefixCls); - var imgContainerRef = useRef(null); - var containerRef = useRef(null); - var imgInsRef = useRef(null); - var _useState = useState(0), - _useState2 = _slicedToArray(_useState, 2), - scale = _useState2[0], - setScale = _useState2[1]; - - // 初始化页面 - useEffect(function () { - if (!url) return; - var handleTransformChange = addEventListenerWrapper(imgContainerRef.current, 'viewer-transform-change', function (event) { - var data = event.detail; - setScale(get(data, 'scale', 0)); - }); - if (generateImg(url)) { - console.log('containerRef', containerRef); - imgInsRef.current = new Viewer(imgContainerRef.current, { - image: generateImg(url), - height: parseInt(height) - }); - } - return function () { - var _imgInsRef$current, _imgInsRef$current$de; - handleTransformChange === null || handleTransformChange === void 0 || handleTransformChange.remove(); - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current = imgInsRef.current) === null || _imgInsRef$current === void 0 || (_imgInsRef$current$de = _imgInsRef$current.destroy) === null || _imgInsRef$current$de === void 0 || _imgInsRef$current$de.call(_imgInsRef$current); - imgInsRef.current = null; - }; - }, []); - - // 监听下标变化 - useUpdateEffect(function () { - if (imgInsRef.current) { - var _imgInsRef$current2; - (_imgInsRef$current2 = imgInsRef.current) === null || _imgInsRef$current2 === void 0 || _imgInsRef$current2.refleshImage({ - image: generateImg(url) - }); - } - }, [url]); - useImperativeHandle(ref, function () { - return { - imgInsRef: imgInsRef - }; - }); - return /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__container")), - style: { - width: "".concat(parseInt(width), "px") - } - }, label && /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__label")), - style: { - backgroundColor: labelColor - } - }, label), !url ? /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__empty")) - }, /*#__PURE__*/React.createElement("img", { - src: EMPTY_BASE64, - title: "\u6682\u65E0\u6570\u636E" - }), /*#__PURE__*/React.createElement("span", { - className: classNames("".concat(componentName, "__empty--text")) - }, "\u6682\u65E0\u5339\u914D\u6570\u636E")) : /*#__PURE__*/React.createElement("div", { - ref: imgContainerRef, - className: classNames("".concat(componentName, "__view")) - }), !!url && openRoll && /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__scoll-module")) - }, /*#__PURE__*/React.createElement(Button, { - className: classNames("".concat(componentName, "__scoll-module__btn")), - disabled: preDisable, - onClick: onPre, - type: "primary", - shape: "circle", - style: { - width: '56px' - }, - icon: /*#__PURE__*/React.createElement(IconFont, { - icon: "icon-qiehuanzuo", - size: 32, - color: "#fff" - }) - }), /*#__PURE__*/React.createElement(Button, { - className: classNames("".concat(componentName, "__scoll-module__btn")), - disabled: nextDisable, - onClick: onNext, - type: "primary", - shape: "circle", - style: { - width: '56px' - }, - icon: /*#__PURE__*/React.createElement(IconFont, { - icon: "icon-qiehuanyou", - size: 32, - color: "#fff" - }) - })), (showScore || score) && /*#__PURE__*/React.createElement(CornerScore, { - scoreTxt: score || 0 - }), showTools && /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__tool")) - }, /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - var _imgInsRef$current3, _imgInsRef$current3$s; - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current3 = imgInsRef.current) === null || _imgInsRef$current3 === void 0 || (_imgInsRef$current3$s = _imgInsRef$current3.scaleTo) === null || _imgInsRef$current3$s === void 0 || _imgInsRef$current3$s.call(_imgInsRef$current3, 0.1); - } - }, /*#__PURE__*/React.createElement(IconFont, { - size: 16, - icon: 'icon-fangda' - }), /*#__PURE__*/React.createElement("span", null, '放大')), /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - var _imgInsRef$current4, _imgInsRef$current4$s; - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current4 = imgInsRef.current) === null || _imgInsRef$current4 === void 0 || (_imgInsRef$current4$s = _imgInsRef$current4.scaleTo) === null || _imgInsRef$current4$s === void 0 || _imgInsRef$current4$s.call(_imgInsRef$current4, -0.1); - } - }, /*#__PURE__*/React.createElement(IconFont, { - size: 16, - icon: 'icon-suoxiao' - }), /*#__PURE__*/React.createElement("span", null, '缩小')), /*#__PURE__*/React.createElement("span", { - className: classNames("".concat(componentName, "__tool__scale")) - }, Math.round(scale * 100) + '%'), /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__tool__line")) - }), /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - var _imgInsRef$current5, _imgInsRef$current5$r; - imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current5 = imgInsRef.current) === null || _imgInsRef$current5 === void 0 || (_imgInsRef$current5$r = _imgInsRef$current5.reset) === null || _imgInsRef$current5$r === void 0 || _imgInsRef$current5$r.call(_imgInsRef$current5); - } - }, /*#__PURE__*/React.createElement(IconFont, { - size: 16, - icon: 'icon-zhongzhi3' - }), /*#__PURE__*/React.createElement("span", null, '重置')))); -}); -export default CompareImage; \ No newline at end of file diff --git a/packages/meta/es/CompareImage/components/CornerScore/index.js b/packages/meta/es/CompareImage/components/CornerScore/index.js deleted file mode 100644 index 0f504ed..0000000 --- a/packages/meta/es/CompareImage/components/CornerScore/index.js +++ /dev/null @@ -1,15 +0,0 @@ -//@ts-nocheck -import React, { useMemo } from 'react'; -import classNames from 'classnames'; -import "./index.less"; -var componentName = "zhst-image__CornerScore"; -export var CornerScore = function CornerScore(props) { - var scoreTxt = props.scoreTxt; - return useMemo(function () { - return /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName)) - }, /*#__PURE__*/React.createElement("span", null, ~~(scoreTxt * 100), "%")); - }, [scoreTxt]); -}; -CornerScore.displayName = componentName; -export default CornerScore; \ No newline at end of file diff --git a/packages/meta/es/CompareImage/images/emptyImage.png b/packages/meta/es/CompareImage/images/emptyImage.png deleted file mode 100644 index 9762957..0000000 Binary files a/packages/meta/es/CompareImage/images/emptyImage.png and /dev/null differ diff --git a/packages/meta/es/CompareImage/images/percent_background.png b/packages/meta/es/CompareImage/images/percent_background.png deleted file mode 100644 index ebde317..0000000 Binary files a/packages/meta/es/CompareImage/images/percent_background.png and /dev/null differ diff --git a/packages/meta/es/CompareImage/index.js b/packages/meta/es/CompareImage/index.js deleted file mode 100644 index 7922666..0000000 --- a/packages/meta/es/CompareImage/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import CompareImage from "./CompareImage"; -export default CompareImage; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/constants.js b/packages/meta/es/ImageEditor/cropper/constants.js deleted file mode 100644 index 264cca7..0000000 --- a/packages/meta/es/ImageEditor/cropper/constants.js +++ /dev/null @@ -1,40 +0,0 @@ -//@ts-nocheck -import { IS_TOUCH_DEVICE, HAS_POINTER_EVENT } from "../utils"; -export var NAMESPACE = 'zhst-cropper'; - -// Actions -export var ACTION_MOVE = 'move'; -export var ACTION_CROP = 'crop'; -export var ACTION_EAST = 'e'; -export var ACTION_WEST = 'w'; -export var ACTION_SOUTH = 's'; -export var ACTION_NORTH = 'n'; -export var ACTION_NORTH_EAST = 'ne'; -export var ACTION_NORTH_WEST = 'nw'; -export var ACTION_SOUTH_EAST = 'se'; -export var ACTION_SOUTH_WEST = 'sw'; - -// Classes -export var CLASS_HIDDEN = "".concat(NAMESPACE, "-hidden"); -export var CLASS_MASK = "".concat(NAMESPACE, "-mask"); - -// Data keys -export var DATA_ACTION = "".concat(NAMESPACE, "-action"); - -// Events -export var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown'; -export var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove'; -export var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup'; -export var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START; -export var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE; -export var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END; -export var EVENT_WHEEL = 'wheel'; - -//custom event -export var EVENT_CROP_CHANGE = 'crop-change'; -export var EVENT_CROP_START = 'crop-start'; -export var EVENT_CROP_END = 'crop-end'; - -// RegExps -export var REGEXP_SPACES = /\s\s*/; -export var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/event.js b/packages/meta/es/ImageEditor/cropper/event.js deleted file mode 100644 index faefbe1..0000000 --- a/packages/meta/es/ImageEditor/cropper/event.js +++ /dev/null @@ -1,414 +0,0 @@ -//@ts-nocheck -import { addClass, removeClass } from 'rc-util/lib/Dom/class'; -import { addEventListenerWrapper, isNumber, get } from '@zhst/func'; -import warn from 'rc-util/lib/warn'; -import { getData, getPointer, getOffset, dispatchEvent } from "../utils"; -import { -//class -CLASS_MASK, DATA_ACTION, ACTION_CROP, ACTION_MOVE, ACTION_EAST, ACTION_NORTH, ACTION_NORTH_EAST, ACTION_NORTH_WEST, ACTION_SOUTH, ACTION_SOUTH_EAST, ACTION_SOUTH_WEST, ACTION_WEST, CLASS_HIDDEN, -// event -EVENT_POINTER_DOWN, EVENT_POINTER_MOVE, EVENT_POINTER_UP, EVENT_CROP_CHANGE, EVENT_CROP_START, EVENT_CROP_END, -// 正则 -REGEXP_ACTIONS, REGEXP_SPACES } from "./constants"; -export default { - bind: function bind() { - var _this = this; - var container = this.container, - element = this.element, - _this$eventHandleList = this.eventHandleList, - eventHandleList = _this$eventHandleList === void 0 ? [] : _this$eventHandleList, - option = this.option; - var handleCropStart = addEventListenerWrapper(container, EVENT_POINTER_DOWN, this.onCropStart.bind(this)); - eventHandleList.push(handleCropStart); - var handleCropMove = addEventListenerWrapper(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove.bind(this)); - eventHandleList.push(handleCropMove); - EVENT_POINTER_UP.trim().split(REGEXP_SPACES).forEach(function (eventName) { - var handleCropEnd = addEventListenerWrapper(element.ownerDocument, eventName, _this.onCropEnd.bind(_this)); - eventHandleList.push(handleCropEnd); - }); - }, - unbind: function unbind() { - var eventHandleList = this.eventHandleList; - for (var index = eventHandleList.length; index > 0; index--) { - var handler = eventHandleList[index - 1]; - try { - handler.remove(); - } catch (error) { - warn('CROP:REMOVE_EVENT_FAIL: ', error); - } - } - }, - onCropStart: function onCropStart(event) { - var buttons = event.buttons, - button = event.button; - if (this.disabled || - // Handle mouse event and pointer event and ignore touch event - (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( - // No primary button (Usually the left button) - isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 || - // Open context menu - event.ctrlKey)) { - return; - } - var action = getData(event.target, DATA_ACTION); - this.pointer = getPointer(event); - if (!REGEXP_ACTIONS.test(action)) { - return; - } - // This line is required for preventing page zooming in iOS browsers - event.preventDefault(); - this.action = action; - this.cropping = false; - if (action === ACTION_CROP) { - this.cropping = true; - var showMask = this.options.showMask; - if (showMask) { - addClass(this.dragBox, CLASS_MASK); - } - } - var hasCrop = get(this, 'cropBoxData.width', 0) !== 0 && get(this, 'cropBoxData.height', 0) !== 0; - dispatchEvent(this.element, EVENT_CROP_START, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - dispatchEvent(this.element, EVENT_CROP_CHANGE, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - }, - onCropMove: function onCropMove(event) { - var action = this.action; - if (!action) { - return; - } - this.pointer = Object.assign({}, this.pointer, getPointer(event, true)); - event.preventDefault(); - //添加事件 - this.change(event); - }, - onCropEnd: function onCropEnd(event) { - var action = this.action; - if (!action) { - return; - } - event.preventDefault(); - this.action = null; - this.point = null; - if (this.cropping) { - this.cropping = false; - // removeClass(this.dragBox, CLASS_MASK); - } - var hasCrop = get(this, 'cropBoxData.width', 0) !== 0 && get(this, 'cropBoxData.height', 0) !== 0; - dispatchEvent(this.element, EVENT_CROP_CHANGE, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - hasCrop && dispatchEvent(this.element, EVENT_CROP_END, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - }, - change: function change(event) { - var options = this.options, - containerData = this.containerData, - _this$cropBoxData = this.cropBoxData, - cropBoxData = _this$cropBoxData === void 0 ? {} : _this$cropBoxData, - _this$pointer = this.pointer, - pointer = _this$pointer === void 0 ? {} : _this$pointer, - wrapper = this.wrapper; - var action = this.action; - //位置参数 - var left = cropBoxData.left, - top = cropBoxData.top, - width = cropBoxData.width, - height = cropBoxData.height; - var right = left + width; - var bottom = top + height; - var minLeft = 0; - var minTop = 0; - var maxWidth = containerData.width; - var maxHeight = containerData.height; - //各种转换后是否需要渲染 - var renderable = true; - var offset; - var range = { - x: pointer.endX - pointer.startX, - y: pointer.endY - pointer.startY - }; - var check = function check(side) { - switch (side) { - case ACTION_EAST: - if (right + range.x > maxWidth) { - range.x = maxWidth - right; - } - break; - case ACTION_WEST: - if (left + range.x < minLeft) { - range.x = minLeft - left; - } - break; - case ACTION_NORTH: - if (top + range.y < minTop) { - range.y = minTop - top; - } - break; - case ACTION_SOUTH: - if (bottom + range.y > maxHeight) { - range.y = maxHeight - bottom; - } - break; - default: - } - }; - switch (action) { - // Create crop box - case ACTION_CROP: - if (!range.x || !range.y) { - renderable = false; - break; - } - offset = getOffset(this.container); - left = pointer.startX - offset.left; - top = pointer.startY - offset.top; - width = cropBoxData.minWidth; - height = cropBoxData.minHeight; - if (!left) { - debugger; - } - if (range.x > 0) { - action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST; - } else if (range.x < 0) { - left -= width; - action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST; - } - if (range.y < 0) { - top -= height; - } - - // Show the crop box if is hidden - if (!this.cropped) { - removeClass(this.cropBox, CLASS_HIDDEN); - this.cropped = true; - if (this.limited) { - this.limitCropBox(true, true); - } - } - break; - // Move canvas - case ACTION_MOVE: - left += range.x; - top += range.y; - break; - - // 北n - // 东w 西e - // 南s - - // Resize crop box - case ACTION_EAST: - if (range.x >= 0 && right >= maxWidth) { - renderable = false; - break; - } - check(ACTION_EAST); - width += range.x; - if (width < 0) { - action = ACTION_WEST; - width = -width; - left -= width; - } - break; - case ACTION_NORTH: - if (range.y <= 0 && top <= minTop) { - renderable = false; - break; - } - check(ACTION_NORTH); - height -= range.y; - top += range.y; - if (height < 0) { - action = ACTION_SOUTH; - height = -height; - top -= height; - } - break; - case ACTION_WEST: - if (range.x <= 0 && left <= minLeft) { - renderable = false; - break; - } - check(ACTION_WEST); - width -= range.x; - left += range.x; - if (width < 0) { - action = ACTION_EAST; - width = -width; - left -= width; - } - break; - case ACTION_SOUTH: - if (range.y >= 0 && bottom >= maxHeight) { - renderable = false; - break; - } - check(ACTION_SOUTH); - height += range.y; - if (height < 0) { - action = ACTION_NORTH; - height = -height; - top -= height; - } - break; - case ACTION_NORTH_EAST: - check(ACTION_NORTH); - check(ACTION_EAST); - if (range.x >= 0) { - if (right < maxWidth) { - width += range.x; - } else if (range.y <= 0 && top <= minTop) { - renderable = false; - } - } else { - width += range.x; - } - if (range.y <= 0) { - if (top > minTop) { - height -= range.y; - top += range.y; - } - } else { - height -= range.y; - top += range.y; - } - if (width < 0 && height < 0) { - action = ACTION_SOUTH_WEST; - height = -height; - width = -width; - top -= height; - left -= width; - } else if (width < 0) { - action = ACTION_NORTH_WEST; - width = -width; - left -= width; - } else if (height < 0) { - action = ACTION_SOUTH_EAST; - height = -height; - top -= height; - } - break; - case ACTION_NORTH_WEST: - check(ACTION_NORTH); - check(ACTION_WEST); - if (range.x <= 0) { - if (left > minLeft) { - width -= range.x; - left += range.x; - } else if (range.y <= 0 && top <= minTop) { - renderable = false; - } - } else { - width -= range.x; - left += range.x; - } - if (range.y <= 0) { - if (top > minTop) { - height -= range.y; - top += range.y; - } - } else { - height -= range.y; - top += range.y; - } - if (width < 0 && height < 0) { - action = ACTION_SOUTH_EAST; - height = -height; - width = -width; - top -= height; - left -= width; - } else if (width < 0) { - action = ACTION_NORTH_EAST; - width = -width; - left -= width; - } else if (height < 0) { - action = ACTION_SOUTH_WEST; - height = -height; - top -= height; - } - break; - case ACTION_SOUTH_WEST: - check(ACTION_SOUTH); - check(ACTION_WEST); - if (range.x <= 0) { - if (left > minLeft) { - width -= range.x; - left += range.x; - } else if (range.y >= 0 && bottom >= maxHeight) { - renderable = false; - } - } else { - width -= range.x; - left += range.x; - } - if (range.y >= 0) { - if (bottom < maxHeight) { - height += range.y; - } - } else { - height += range.y; - } - if (width < 0 && height < 0) { - action = ACTION_NORTH_EAST; - height = -height; - width = -width; - top -= height; - left -= width; - } else if (width < 0) { - action = ACTION_SOUTH_EAST; - width = -width; - left -= width; - } else if (height < 0) { - action = ACTION_NORTH_WEST; - height = -height; - top -= height; - } - break; - case ACTION_SOUTH_EAST: - check(ACTION_SOUTH); - check(ACTION_EAST); - if (range.x >= 0) { - if (right < maxWidth) { - width += range.x; - } else if (range.y >= 0 && bottom >= maxHeight) { - renderable = false; - } - } else { - width += range.x; - } - if (range.y >= 0) { - if (bottom < maxHeight) { - height += range.y; - } - } else { - height += range.y; - } - if (width < 0 && height < 0) { - action = ACTION_NORTH_WEST; - height = -height; - width = -width; - top -= height; - left -= width; - } else if (width < 0) { - action = ACTION_SOUTH_WEST; - width = -width; - left -= width; - } else if (height < 0) { - action = ACTION_NORTH_EAST; - height = -height; - top -= height; - } - break; - default: - break; - } - if (renderable) { - cropBoxData.width = width; - cropBoxData.height = height; - cropBoxData.left = left; - cropBoxData.top = top; - this.action = action; - this.cropBoxData = cropBoxData; - this.renderCropBox(); - } - // Override - this.pointer.startX = this.pointer.endX; - this.pointer.startY = this.pointer.endY; - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/index.js b/packages/meta/es/ImageEditor/cropper/index.js deleted file mode 100644 index 31cbf38..0000000 --- a/packages/meta/es/ImageEditor/cropper/index.js +++ /dev/null @@ -1,165 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime"; -import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; -import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; -import _createClass from "@babel/runtime/helpers/esm/createClass"; -import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; -var _dec, _class; -//@ts-nocheck -import { get, isPlainObject, isString, isNil } from '@zhst/func'; -import { addClass, removeClass } from 'rc-util/lib/Dom/class'; -import { Mixin, dispatchEvent } from "../utils"; -import { NAMESPACE, CLASS_HIDDEN, CLASS_MASK, EVENT_CROP_CHANGE, EVENT_CROP_END } from "./constants"; -import TEMPLATE from "./template"; -import Render from "./render"; -import Event from "./event"; -import ViewerBridge from "./viewerBridge"; -import Preview from "./preview"; -import "./index.module.scss"; -var Cropper = (_dec = Mixin(Render, Event, ViewerBridge, Preview), _dec(_class = /*#__PURE__*/function () { - function Cropper(element, options) { - _classCallCheck(this, Cropper); - /* 容器:挂在的节点 */ - _defineProperty(this, "element", void 0); - /* 配置项 */ - _defineProperty(this, "options", void 0); - /* 是否截图 */ - _defineProperty(this, "cropped", void 0); - /* crop框是否有限制 */ - _defineProperty(this, "limited", void 0); - /* 维护图片对象 */ - _defineProperty(this, "image", void 0); - /* 所有事件 */ - // eventHandleList: Array; - _defineProperty(this, "eventHandleList", []); - /* 方便访问dom元素 */ - _defineProperty(this, "container", void 0); - _defineProperty(this, "dragBox", void 0); - _defineProperty(this, "cropBox", void 0); - _defineProperty(this, "viewBox", void 0); - this.element = element; - this.options = Object.assign({}, isPlainObject(options) && options); - this.limited = isNil(this.options.cropBoxLimited) ? false : true; - this.cropped = false; - this.init(); - } - _createClass(Cropper, [{ - key: "init", - value: function () { - var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - this.build(); - //@ts-ignore - this.bind(); - //@ts-ignore - this.render(); - //@ts-ignore - this.initPreview(); - if (this.options.viewer) { - //@ts-ignore - this.initBridge(); - } - //初始化crop - this.initDefaultCropBox(); - case 6: - case "end": - return _context.stop(); - } - }, _callee, this); - })); - function init() { - return _init.apply(this, arguments); - } - return init; - }() - }, { - key: "initDefaultCropBox", - value: function initDefaultCropBox() { - var _ref = this.options || {}, - initialCropBoxData = _ref.initialCropBoxData; - - // const initialCropBoxData = { - // height: 158.02902221679688, - // left: 410.132080078125, - // top: 133.201904296875, - // width: 211.97821044921875, - // }; - if (initialCropBoxData) { - this.cropped = true; - var showMask = this.options.showMask; - showMask && addClass(this.dragBox, CLASS_MASK); - removeClass(this.cropBox, CLASS_HIDDEN); - //@ts-ignore - this.cropBoxData = _objectSpread(_objectSpread({}, this.cropBoxData), initialCropBoxData); - //@ts-ignore - this.renderCropBox(); - var hasCrop = get(this, 'cropBoxData.width', 0) !== 0 && get(this, 'cropBoxData.height', 0) !== 0; - //@ts-ignore - dispatchEvent(this.element, EVENT_CROP_CHANGE, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - //@ts-ignore - hasCrop && dispatchEvent(this.element, EVENT_CROP_END, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null); - } - } - }, { - key: "load", - value: function load() { - var _this = this; - return new Promise(function (resolve, reject) { - var propImage = _this.options.image; - if (isString(propImage)) { - var image = new Image(); - var imgUrl = propImage; - image.crossOrigin = 'anonymous'; - image.src = imgUrl; - image.onload = function () { - _this.image = image; - resolve(image); - }; - image.onerror = function (err) { - reject(err); - }; - } else { - _this.image = propImage; - resolve(propImage); - } - }); - } - }, { - key: "build", - value: function build() { - // Create cropper elements - var template = document.createElement('div'); - template.innerHTML = TEMPLATE; - var container = template.querySelector(".".concat(NAMESPACE, "-container")); - var dragBox = container.querySelector(".".concat(NAMESPACE, "-drag-box")); - var cropBox = container.querySelector(".".concat(NAMESPACE, "-crop-box")); - var viewBox = container.querySelector(".".concat(NAMESPACE, "-view-box")); - this.element.appendChild(container); - this.container = container; - this.dragBox = dragBox; - this.cropBox = cropBox; - this.viewBox = viewBox; - - //先隐藏crop - addClass(cropBox, CLASS_HIDDEN); - } - }, { - key: "destroy", - value: function destroy() { - var _this$element, _this$element$removeC; - if (this.options.viewer) { - //@ts-ignore - this.clearBridge(); - } - //清理事件 - //@ts-ignore - this.unbind(); - //清理dom - (_this$element = this.element) === null || _this$element === void 0 || (_this$element$removeC = _this$element.removeChild) === null || _this$element$removeC === void 0 || _this$element$removeC.call(_this$element, this.container); - } - }]); - return Cropper; -}()) || _class); -export default Cropper; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/index.module.scss b/packages/meta/es/ImageEditor/cropper/index.module.scss deleted file mode 100644 index f341aee..0000000 --- a/packages/meta/es/ImageEditor/cropper/index.module.scss +++ /dev/null @@ -1,194 +0,0 @@ -$prefix: zhst; - -:global { - // .zhst-cropper-container { - // width: 100px; - // } - .zhst-cropper { - &-container { - position: relative; - direction: ltr; - font-size: 0; - line-height: 0; - touch-action: none; - user-select: none; - } - - &-container, - &-wrap-box, - &-canvas, - &-drag-box, - &-crop-box, - &-face, - &-modal { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - &-drag-box { - cursor: crosshair; - } - - &-view-box { - display: block; - overflow: hidden; - width: 100%; - height: 100%; - outline: 1px solid #39f; - outline-color: rgb(51 153 255 / 75%); - } - - //mask - &-mask { - background-color: rgb(0 0 0 / 50%); - } - - //拖拽 - &-face { - background-color: #fff; - cursor: move; - opacity: 0; - } - - //点 - &-point { - position: absolute; - width: 6px; - height: 6px; - - // background: #fff; - background-color: #39f; - border-radius: 50%; - - // border: 0.2px solid #000; - - // 北n - // 东w 西e - // 南s - - &.point-nw { - top: -3px; - left: -3px; - cursor: nwse-resize; - } - - &.point-n { - top: -3px; - left: 50%; - cursor: ns-resize; - transform: translateX(-50%); - } - - &.point-ne { - top: -3px; - right: -3px; - cursor: nesw-resize; - } - - &.point-w { - top: 50%; - left: -3px; - cursor: ew-resize; - transform: translateY(-50%); - } - - &.point-e { - top: 50%; - right: -3px; - cursor: ew-resize; - transform: translateY(-50%); - } - - &.point-sw { - bottom: -3px; - left: -3px; - cursor: nesw-resize; - } - - &.point-s { - bottom: -3px; - left: 50%; - cursor: ns-resize; - transform: translateX(-50%); - } - - &.point-se { - right: -3px; - bottom: -3px; - cursor: nwse-resize; - } - } - - //线 - &-line { - // opacity: 0.1; - position: absolute; - display: block; - width: 100%; - height: 100%; - background-color: #39f; - - &.line-e { - top: 0; - right: -1px; - width: 2px; - cursor: ew-resize; - } - - &.line-n { - top: -1px; - left: 0; - height: 2px; - cursor: ns-resize; - } - - &.line-w { - top: 0; - left: -1px; - width: 2px; - cursor: ew-resize; - } - - &.line-s { - bottom: -1px; - left: 0; - height: 2px; - cursor: ns-resize; - } - } - - //辅助class - &-invisible { - opacity: 0; - } - - &-hide { - position: absolute; - display: block; - width: 0; - height: 0; - } - - &-hidden { - display: none !important; - } - - &-move { - cursor: move; - } - - &-crop { - cursor: crosshair; - } - - &-disabled &-drag-box, - &-disabled &-face, - &-disabled &-line, - &-disabled &-point { - cursor: not-allowed; - } - } -} diff --git a/packages/meta/es/ImageEditor/cropper/preview.js b/packages/meta/es/ImageEditor/cropper/preview.js deleted file mode 100644 index 46fcebc..0000000 --- a/packages/meta/es/ImageEditor/cropper/preview.js +++ /dev/null @@ -1,54 +0,0 @@ -//@ts-nocheck -import { set } from 'rc-util/lib/Dom/css'; -import { getTransforms } from "../utils"; -export default { - //var - previewBox: null, - //method - initPreview: function initPreview() { - var _this$options = this.options, - showMask = _this$options.showMask, - img = _this$options.img, - viewer = _this$options.viewer; - if (!showMask) return; - if (viewer) { - //如果是传了一个viewer 进来 - //整一个canvas 渲染 - var canvas = document.createElement('canvas'); - canvas.width = this.containerData.width; - canvas.height = this.containerData.height; - this.viewBox.appendChild(canvas); - this.previewBox = canvas; - //设置canvas 监听 - } else { - //如果是传了图片 则渲染图片 - var image = document.createElement('img'); - image.src = img; - this.viewBox.appendChild(image); - this.previewBox = image; - } - }, - renderPreview: function renderPreview() { - var _this$options2 = this.options, - showMask = _this$options2.showMask, - img = _this$options2.img, - viewer = _this$options2.viewer; - if (!showMask) return; - var containerData = this.containerData, - cropBoxData = this.cropBoxData; - var width = containerData.width, - height = containerData.height; - var left = cropBoxData.left; - var top = cropBoxData.top; - if (!this.cropped || this.disabled) { - return; - } - set(this.previewBox, Object.assign({ - width: width, - height: height - }, getTransforms(Object.assign({ - translateX: -left, - translateY: -top - })))); - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/render.js b/packages/meta/es/ImageEditor/cropper/render.js deleted file mode 100644 index 2e462cf..0000000 --- a/packages/meta/es/ImageEditor/cropper/render.js +++ /dev/null @@ -1,132 +0,0 @@ -//@ts-nocheck -import { set, getOuterWidth, getOuterHeight } from 'rc-util/lib/Dom/css'; -import { addClass, removeClass } from 'rc-util/lib/Dom/class'; -import { getTransforms } from "../utils"; -import { CLASS_MASK, CLASS_HIDDEN } from "./constants"; -export default { - cropBoxData: null, - viewBoxImage: null, - render: function render() { - this.initContainer(); - this.initCropBox(); - this.limitCropBox(true, true); - }, - initContainer: function initContainer() { - //通过样式设置 不依赖父元素的prosition - var element = this.element, - container = this.container; - var containerData = { - width: getOuterWidth(element), - height: getOuterHeight(element) - }; - this.containerData = containerData; - set(container, containerData); - }, - initCropBox: function initCropBox() { - var containerData = this.containerData, - options = this.options; - var cropBoxData = { - // width: containerData.width, - // height: containerData.height, - width: 0, - height: 0, - left: 0, - top: 0, - minWidth: 0, - minHeight: 0, - maxWidth: containerData.width, - maxHeight: containerData.height, - minLeft: 0, - maxLeft: containerData.width, - minTop: 0, - maxTop: containerData.height, - oldLeft: 0, - oldTop: 0 - }; - this.cropBoxData = cropBoxData; - this.limitCropBox(true, true); - }, - renderCropBox: function renderCropBox() { - var cropBoxData = this.cropBoxData; - if (cropBoxData.width > cropBoxData.maxWidth || cropBoxData.width < cropBoxData.minWidth) { - cropBoxData.left = cropBoxData.oldLeft; - } - if (cropBoxData.height > cropBoxData.maxHeight || cropBoxData.height < cropBoxData.minHeight) { - cropBoxData.top = cropBoxData.oldTop; - } - cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth); - cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); - this.limitCropBox(false, true); - cropBoxData.left = Math.min(Math.max(cropBoxData.left, cropBoxData.minLeft), cropBoxData.maxLeft); - cropBoxData.top = Math.min(Math.max(cropBoxData.top, cropBoxData.minTop), cropBoxData.maxTop); - cropBoxData.oldLeft = cropBoxData.left; - cropBoxData.oldTop = cropBoxData.top; - set(this.cropBox, Object.assign({ - width: cropBoxData.width, - height: cropBoxData.height - }, getTransforms({ - translateX: cropBoxData.left, - translateY: cropBoxData.top - }))); - if (this.options.showMask) { - this.renderPreview(); - } - }, - clearCropBox: function clearCropBox() { - // Clear the crop box - if (this.cropped && !this.disabled) { - Object.assign(this.cropBoxData, { - left: 0, - top: 0, - width: 0, - height: 0 - }); - this.cropped = false; - this.renderCropBox(); - - // Render canvas after crop box rendered - // this.renderCanvas(); - removeClass(this.dragBox, CLASS_MASK); - addClass(this.cropBox, CLASS_HIDDEN); - } - return this; - }, - limitCropBox: function limitCropBox(sizeLimited, positionLimited) { - // return - var options = this.options, - containerData = this.containerData, - cropBoxData = this.cropBoxData, - limited = this.limited; - var _options$cropBoxLimit = options.cropBoxLimited, - cropBoxLimited = _options$cropBoxLimit === void 0 ? {} : _options$cropBoxLimit; - if (sizeLimited) { - var minCropBoxWidth = Number(options.minCropBoxWidth) || 0; - var minCropBoxHeight = Number(options.minCropBoxHeight) || 0; - var maxCropBoxWidth = limited ? Math.min(containerData.width, cropBoxLimited.width, cropBoxLimited.width + cropBoxLimited.left, containerData.width - cropBoxLimited.left) : containerData.width; - var maxCropBoxHeight = limited ? Math.min(containerData.height, cropBoxLimited.height, cropBoxLimited.height + cropBoxLimited.top, containerData.height - cropBoxLimited.top) : containerData.height; - - // The min/maxCropBoxWidth/Height must be less than container's width/height - minCropBoxWidth = Math.min(minCropBoxWidth, containerData.width); - minCropBoxHeight = Math.min(minCropBoxHeight, containerData.height); - - // The minWidth/Height must be less than maxWidth/Height - cropBoxData.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth); - cropBoxData.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight); - cropBoxData.maxWidth = maxCropBoxWidth; - cropBoxData.maxHeight = maxCropBoxHeight; - } - if (positionLimited) { - if (limited) { - cropBoxData.minLeft = Math.max(0, cropBoxLimited.left); - cropBoxData.minTop = Math.max(0, cropBoxLimited.top); - cropBoxData.maxLeft = Math.min(containerData.width, cropBoxLimited.left + cropBoxLimited.width) - cropBoxData.width; - cropBoxData.maxTop = Math.min(containerData.height, cropBoxLimited.top + cropBoxLimited.height) - cropBoxData.height; - } else { - cropBoxData.minLeft = 0; - cropBoxData.minTop = 0; - cropBoxData.maxLeft = containerData.width - cropBoxData.width; - cropBoxData.maxTop = containerData.height - cropBoxData.height; - } - } - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/template.js b/packages/meta/es/ImageEditor/cropper/template.js deleted file mode 100644 index 505801b..0000000 --- a/packages/meta/es/ImageEditor/cropper/template.js +++ /dev/null @@ -1,2 +0,0 @@ -import { NAMESPACE } from "./constants"; -export default "\n
\n
\n
\n \n >\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n"); \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/cropper/viewerBridge.js b/packages/meta/es/ImageEditor/cropper/viewerBridge.js deleted file mode 100644 index a200d90..0000000 --- a/packages/meta/es/ImageEditor/cropper/viewerBridge.js +++ /dev/null @@ -1,95 +0,0 @@ -//@ts-nocheck -import { addEventListenerWrapper } from '@zhst/func'; -import { EVENT_WHEEL } from "./constants"; -import { EVENT_VIEWER_TRANSFORM_CHANGE } from "../viewer/constants"; -export default { - initBridge: function initBridge() { - var _this = this; - var container = this.container, - element = this.element, - _this$eventHandleList = this.eventHandleList, - eventHandleList = _this$eventHandleList === void 0 ? [] : _this$eventHandleList, - option = this.option; - if (this.options.viewer) { - var viewer = this.options.viewer; - var scaleAble = this.options.scaleAble; - //添加缩放事件 - if (scaleAble) { - var handleWhele = addEventListenerWrapper(canvas, EVENT_WHEEL, this.onWheel.bind(this)); - eventHandleList.push(handleWhele); - } - //添加事件监听 获取limit crop box & 渲染canvas - this.onTransformChange(viewer); - this.limited = true; - var handleTransformChange = addEventListenerWrapper(viewer.element, EVENT_VIEWER_TRANSFORM_CHANGE, function (event) { - _this.onTransformChange(viewer); - }); - eventHandleList.push(handleTransformChange); - } - }, - onTransformChange: function onTransformChange(viewer) { - if (!viewer.image) return; - var _viewer$image = viewer.image, - imgWidth = _viewer$image.width, - imgHeight = _viewer$image.height; - var _ref = viewer.targetTransform || {}, - _ref$rotate = _ref.rotate, - rotate = _ref$rotate === void 0 ? 0 : _ref$rotate; - var imgLeftTop = { - x: 0, - y: 0 - }; - var imgRightBottom = { - x: imgWidth, - y: imgHeight - }; - if (rotate % 180 !== 0) { - //todo:旋转测试 - var diffx = (imgWidth - imgHeight) / 2; - var diffy = (imgHeight - imgWidth) / 2; - imgLeftTop = { - x: imgLeftTop.x + diffx, - y: imgLeftTop.y + diffy - }; - imgRightBottom = { - x: imgRightBottom.x - diffx, - y: imgRightBottom.y - diffy - }; - } - var _viewer$originAxisToC = viewer.originAxisToCanvasAxis({ - x: imgLeftTop.x, - y: imgLeftTop.y - }), - x1 = _viewer$originAxisToC.x, - y1 = _viewer$originAxisToC.y; - var _viewer$originAxisToC2 = viewer.originAxisToCanvasAxis({ - x: imgRightBottom.x, - y: imgRightBottom.y - }), - x2 = _viewer$originAxisToC2.x, - y2 = _viewer$originAxisToC2.y; - var limitCropBox = { - left: x1, - top: y1, - width: x2 - x1, - height: y2 - y1 - }; - this.options.cropBoxLimited = limitCropBox; - this.limitCropBox(true, true); - - //渲染预览框 - if (this.previewBox) { - var _canvas = this.previewBox; - var ctx = _canvas.getContext('2d'); - var viewerRender = viewer.renderCanvas.bind(viewer); - viewerRender(ctx); - } - }, - onWheel: function onWheel(event) { - var viewer = this.options.viewer; - //onwheel - var onViewerWheelHandler = viewer.onWheel.bind(viewer); - onViewerWheelHandler(event, this.cropped ? this.cropBoxData : null); - }, - clearBridge: function clearBridge() {} -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/index.js b/packages/meta/es/ImageEditor/index.js deleted file mode 100644 index cda3a99..0000000 --- a/packages/meta/es/ImageEditor/index.js +++ /dev/null @@ -1,7 +0,0 @@ -//@ts-nocheck -export { default as Cropper } from "./cropper"; -export { default as Viewer } from "./viewer"; - -//custom event -export { EVENT_CROP_CHANGE, EVENT_CROP_START, EVENT_CROP_END } from "./cropper/constants"; -export { EVENT_VIEWER_TRANSFORM_CHANGE, EVENT_VIEWER_READY, EVENT_VIEWER_ERROR, EVENT_SHAPE_SELECT, EVENT_EYE_DONE } from "./viewer/constants"; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/interface.d.ts b/packages/meta/es/ImageEditor/interface.d.ts deleted file mode 100644 index 54ccf05..0000000 --- a/packages/meta/es/ImageEditor/interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -//@ts-nocheck -export { Option as CropOption } from './cropper'; -export { Option as ViewOption } from './viewer'; diff --git a/packages/meta/es/ImageEditor/utils.js b/packages/meta/es/ImageEditor/utils.js deleted file mode 100644 index a8268f2..0000000 --- a/packages/meta/es/ImageEditor/utils.js +++ /dev/null @@ -1,168 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -//@ts-nocheck -import { isObject, isNumber, assign, isFunction } from '@zhst/func'; -import { hasClass, addClass, removeClass } from 'rc-util/lib/Dom/class'; -export var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; -export var WINDOW = IS_BROWSER ? window : {}; -export var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false; -export var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false; - -// 横杠转换驼峰 -function toHump(name) { - return name.replace(/\-(\w)/g, function (all, letter) { - return letter.toUpperCase(); - }); -} -var REGEXP_CAMEL_CASE = /([a-z\d])([A-Z])/g; -/** - * Transform the given string from camelCase to kebab-case - * @param {string} value - The value to transform. - * @returns {string} The transformed value. - */ -export function toParamCase(value) { - return value.replace(REGEXP_CAMEL_CASE, '$1-$2').toLowerCase(); -} - -/** - * Get data from the given element. - * @param {Element} element - The target element. - * @param {string} name - The data key to get. - * @returns {string} The data value. - */ -export function getData(element, name) { - if (isObject(element[name])) { - return element[name]; - } - if (element.dataset) { - return element.dataset[toHump(name)]; - } - return element.getAttribute("data-".concat(toParamCase(name))); -} -export function toggleClass(node, className) { - if (hasClass(node, className)) { - addClass(node, className); - } else { - removeClass(node, className); - } -} - -/** - * Get a pointer from an event object. - * @param {Object} event - The target event object. - * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not. - * @returns {Object} The result pointer contains start and/or end point coordinates. - */ -export function getPointer(_ref, endOnly) { - var pageX = _ref.pageX, - pageY = _ref.pageY; - var end = { - endX: pageX, - endY: pageY - }; - return endOnly ? end : _objectSpread({ - startX: pageX, - startY: pageY - }, end); -} - -/** - * Get the offset base on the document. - * @param {Element} element - The target element. - * @returns {Object} The offset data. - */ -export function getOffset(element) { - var box = element.getBoundingClientRect(); - return { - left: box.left + (window.pageXOffset - document.documentElement.clientLeft), - top: box.top + (window.pageYOffset - document.documentElement.clientTop) - }; -} - -/** - * Get transforms base on the given object. - * @param {Object} obj - The target object. - * @returns {string} A string contains transform values. - */ -export function getTransforms(_ref2) { - var rotate = _ref2.rotate, - scaleX = _ref2.scaleX, - scaleY = _ref2.scaleY, - translateX = _ref2.translateX, - translateY = _ref2.translateY; - var values = []; - if (isNumber(translateX) && translateX !== 0) { - values.push("translateX(".concat(translateX, "px)")); - } - if (isNumber(translateY) && translateY !== 0) { - values.push("translateY(".concat(translateY, "px)")); - } - - // Rotate should come first before scale to match orientation transform - if (isNumber(rotate) && rotate !== 0) { - values.push("rotate(".concat(rotate, "deg)")); - } - if (isNumber(scaleX) && scaleX !== 1) { - values.push("scaleX(".concat(scaleX, ")")); - } - if (isNumber(scaleY) && scaleY !== 1) { - values.push("scaleY(".concat(scaleY, ")")); - } - var transform = values.length ? values.join(' ') : 'none'; - return { - WebkitTransform: transform, - msTransform: transform, - transform: transform - }; -} - -/** - * copy from https://github.com/steelsojka/lodash-decorators/blob/master/src/mixin.ts - * Mixins an object into the classes prototype. - * @export - * @param {...Object[]} srcs - * @returns {ClassDecorator} - * @example - * - * const myMixin = { - * blorg: () => 'blorg!' - * } - * - * @Mixin(myMixin) - * class MyClass {} - * - * const myClass = new MyClass(); - * - * myClass.blorg(); // => 'blorg!' - */ -export function Mixin() { - for (var _len = arguments.length, srcs = new Array(_len), _key = 0; _key < _len; _key++) { - srcs[_key] = arguments[_key]; - } - return function (target) { - assign.apply(void 0, [target.prototype].concat(srcs)); - return target; - }; -} - -/** - * Dispatch event on the target element. - * @param {Element} element - The event target. - * @param {string} type - The event type(s). - * @param {Object} data - The additional event data. - * @returns {boolean} Indicate if the event is default prevented or not. - */ -export function dispatchEvent(element, type, data) { - var event; - // Event and CustomEvent on IE9-11 are global objects, not constructors - if (isFunction(Event) && isFunction(CustomEvent)) { - event = new CustomEvent(type, { - detail: data, - bubbles: true, - cancelable: true - }); - } else { - event = document.createEvent('CustomEvent'); - event.initCustomEvent(type, true, true, data); - } - return element.dispatchEvent(event); -} \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/constants.js b/packages/meta/es/ImageEditor/viewer/constants.js deleted file mode 100644 index e394819..0000000 --- a/packages/meta/es/ImageEditor/viewer/constants.js +++ /dev/null @@ -1,42 +0,0 @@ -import { IS_TOUCH_DEVICE, HAS_POINTER_EVENT } from "../utils"; -export var NAMESPACE = 'zhst-viewer'; - -// Actions -export var ACTION_DRAG = 'drag'; - -// Classes -export var CLASS_CANVAS = "".concat(NAMESPACE, "-canvas"); -export var CLASS_MOVE = "".concat(NAMESPACE, "-move"); - -// Events -export var EVENT_CLICK = 'click'; -export var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown'; -export var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove'; -export var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup'; -export var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START; -export var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE; -export var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END; -export var EVENT_WHEEL = 'wheel'; -export var EVENT_LEAVEL = 'mouseleave'; -export var EVENT_ENTER = 'mouseenter'; -//custom event -export var EVENT_VIEWER_TRANSFORM_CHANGE = 'viewer-transform-change'; -export var EVENT_VIEWER_READY = 'viewer-ready'; -export var EVENT_VIEWER_ERROR = 'viewer-error'; -export var EVENT_SHAPE_SELECT = 'shape-select'; -export var EVENT_EYE_DONE = 'eye-done'; - -// RegExps -export var REGEXP_SPACES = /\s\s*/; - -//变换前的坐标(左上角为原点) -export var AXIS_TYPE_ORIGIN = 1; -//变换后显示在画布中的坐标(还是左上角为原点) -export var AXIS_TYPE_CANVAS = 2; -//基于图片的坐标轴 原点为图片左上角 -export var AXIS_TYPE_IMAGE = 3; - -//形状 -export var SHAPE_TYPE_CUSTOM = 1; -export var SHAPE_TYPE_RECT = 2; -export var SHAPE_TYPE_CIRCLE = 3; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/event.js b/packages/meta/es/ImageEditor/viewer/event.js deleted file mode 100644 index 0c0f4c6..0000000 --- a/packages/meta/es/ImageEditor/viewer/event.js +++ /dev/null @@ -1,189 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -//@ts-nocheck -import { isNumber, get, addEventListenerWrapper } from '@zhst/func'; -import { addClass, removeClass } from 'rc-util/lib/Dom/class.js'; -import guid from 'rc-util/lib/guid'; -import warn from 'rc-util/lib/warn'; -import { getPointer, dispatchEvent } from "../utils"; -import { CLASS_MOVE, ACTION_DRAG, -// event -EVENT_CLICK, EVENT_WHEEL, EVENT_POINTER_DOWN, EVENT_POINTER_MOVE, EVENT_POINTER_UP, EVENT_EYE_DONE, -//正则 -REGEXP_SPACES, SHAPE_TYPE_CIRCLE } from "./constants"; -export default { - //store - disabled: false, - eventHandleList: [], - wheeling: false, - pointer: null, - action: null, - //method - bind: function bind() { - var _this = this; - var canvas = this.canvas, - element = this.element, - _this$eventHandleList = this.eventHandleList, - eventHandleList = _this$eventHandleList === void 0 ? [] : _this$eventHandleList, - options = this.options; - // 鼠标滚轮事件 - var scaleAble = get(options, 'scaleAble', true); - if (scaleAble) { - var handleWheel = addEventListenerWrapper(canvas, EVENT_WHEEL, this.onWheel.bind(this)); - eventHandleList.push(handleWheel); - } - - // 鼠标 - 拖拽事件 - var dragAble = get(options, 'dragAble', true); - if (dragAble) { - var handleDragStart = addEventListenerWrapper(canvas, EVENT_POINTER_DOWN, this.onDragStart.bind(this)); - eventHandleList.push(handleDragStart); - var handleDragMove = addEventListenerWrapper(element.ownerDocument, EVENT_POINTER_MOVE, this.onDragMove.bind(this)); - eventHandleList.push(handleDragMove); - EVENT_POINTER_UP.trim().split(REGEXP_SPACES).forEach(function (_eventName) { - var handleDragEnd = addEventListenerWrapper(element.ownerDocument, _eventName, _this.onDragEnd.bind(_this)); - eventHandleList.push(handleDragEnd); - }); - } - - // 鼠标 - 点击事件 - var selectAble = get(options, 'selectAble', true); - if (selectAble) { - var handleClick = addEventListenerWrapper(canvas, EVENT_CLICK, this.onClick.bind(this)); - eventHandleList.push(handleClick); - } - }, - unbind: function unbind() { - var eventHandleList = this.eventHandleList; - for (var index = eventHandleList.length; index > 0; index--) { - var handler = eventHandleList[index - 1]; - try { - handler.remove(); - } catch (error) { - warn('VIEWER:REMOVE_EVENT_FAIL,', error); - } - } - }, - /* 鼠标滚轮事件 */onWheel: function onWheel(event, cropBox) { - var _this2 = this; - event.stopPropagation(); - event.preventDefault(); - - // Limit wheel speed to prevent zoom too fast - if (this.wheeling || !this.zoomable) { - return; - } - this.wheeling = true; - setTimeout(function () { - _this2.wheeling = false; - }, 16); - var ratio = Number(this.options.zoomRatio) || 0.1; - var delta = 1; - if (event.deltaY) { - delta = event.deltaY > 0 ? 1 : -1; - } else if (event.wheelDelta) { - delta = -event.wheelDelta / 120; - } else if (event.detail) { - delta = event.detail > 0 ? 1 : -1; - } - var step = -delta * ratio; - var pos = this.windowToCanvasAxis(event); - this.calcTransform({ - scaleCenter: _objectSpread(_objectSpread({}, pos), {}, { - step: step - }) - }, cropBox); - }, - // 鼠标拖拽 - 开始拖拽 - onDragStart: function onDragStart(event) { - event.stopPropagation(); - // This line is required for preventing page zooming in iOS browsers - event.preventDefault(); - var buttons = event.buttons, - button = event.button; - if (!this.movable) { - return; - } - if (this.disabled || - // Handle mouse event and pointer event and ignore touch event - (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( - // No primary button (Usually the left button) - isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 || - // Open context menu - event.ctrlKey)) { - return; - } - this.pointer = getPointer(event); - this.action = ACTION_DRAG; - addClass(this.canvas, CLASS_MOVE); - }, - // 鼠标拖拽 - 拖拽中 - onDragMove: function onDragMove(event) { - event.stopPropagation(); - - /***************************************************/ - //todo:看下怎么拆shape 事件 - var pointerCenter = this.windowToCanvasAxis(event); - var id = this.calcSelectShape(pointerCenter); - this.hoverShapId = id; - /***************************************************/ - - var action = this.action; - if (!action) { - return; - } - this.pointer = Object.assign({}, this.pointer, getPointer(event, true)); - event.preventDefault(); - var range = { - x: this.pointer.endX - this.pointer.startX, - y: this.pointer.endY - this.pointer.startY - }; - this.calcTransform({ - translateX: range.x, - translateY: range.y - }); - // Override - this.pointer.startX = this.pointer.endX; - this.pointer.startY = this.pointer.endY; - }, - // 鼠标拖拽 - 停止拖拽 - onDragEnd: function onDragEnd(event) { - event.stopPropagation(); - var action = this.action; - if (!action) { - return; - } - event.preventDefault(); - this.action = null; - this.point = null; - removeClass(this.canvas, CLASS_MOVE); - }, - // 鼠标点击 - onClick: function onClick(event) { - event.stopPropagation(); - var pointerCenter = this.windowToCanvasAxis(event); - if (!this.isEyeOpen) { - var id = this.calcSelectShape(pointerCenter); - this.setSelectShapId(id); - } else { - //双目 - //先直接写在这里 - //过滤掉框,只有point - var pointShapeList = this.shapeList.filter(function (v) { - return !v['w']; - }); - if (pointShapeList.length === 5) return; - var originAxis = this.canvasAxisToOriginAxis(pointerCenter); - var imageAxis = this.originAxisToImgAxis(originAxis); - this.addShape(_objectSpread({ - id: "pointer_".concat(guid()), - selectAble: false - }, imageAxis), SHAPE_TYPE_CIRCLE); - pointShapeList = this.shapeList.filter(function (v) { - return !v['w']; - }); - if (pointShapeList.length === 5) { - dispatchEvent(this.element, EVENT_EYE_DONE); - } - } - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/helper.js b/packages/meta/es/ImageEditor/viewer/helper.js deleted file mode 100644 index b1834b9..0000000 --- a/packages/meta/es/ImageEditor/viewer/helper.js +++ /dev/null @@ -1,220 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; -var _excluded = ["x", "y"], - _excluded2 = ["x", "y"], - _excluded3 = ["x", "y", "w", "h", "image"], - _excluded4 = ["x", "y"], - _excluded5 = ["x", "y"], - _excluded6 = ["x", "y", "w", "h"]; -//@ts-nocheck -import * as turf from '@turf/turf'; -import { AXIS_TYPE_ORIGIN, AXIS_TYPE_CANVAS, AXIS_TYPE_IMAGE } from "./constants"; -export function rectToPolygon(axisRect) { - var polygon = turf.polygon([[[setNumberAccuracy(axisRect.x, -2), setNumberAccuracy(axisRect.y, -2)], [setNumberAccuracy(axisRect.x2, -2), setNumberAccuracy(axisRect.y, -2)], [setNumberAccuracy(axisRect.x2, -2), setNumberAccuracy(axisRect.y2, -2)], [setNumberAccuracy(axisRect.x, -2), setNumberAccuracy(axisRect.y2, -2)], [setNumberAccuracy(axisRect.x, -2), setNumberAccuracy(axisRect.y, -2)]]]); - return polygon; -} - -//设置数据的精度 -//accuracy 表示精度 以原点为中心向左为正,向右为负, -//isCeil 表示是否为向上取整 -export var setNumberAccuracy = function setNumberAccuracy(originNumber) { - var accuracy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var isCeil = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - if (originNumber === 0) { - return 0; - } - var returnData = 0; - if (isCeil) { - returnData = Math.ceil(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } else { - returnData = Math.floor(originNumber / Math.pow(10, accuracy)) * Math.pow(10, accuracy); - } - //设置精度 - if (accuracy < 0) { - returnData = Number(returnData.toFixed(-accuracy)); - } else { - returnData = Number(returnData.toFixed(0)); - } - return returnData; -}; -export default { - targetTransform: { - translateX: 0, - translateY: 0, - scale: 1, - rotate: 0 - // rotate: 90, - }, - windowToCanvasAxis: function windowToCanvasAxis(event) { - return { - x: event.offsetX, - y: event.offsetY, - __AXIS_TYPE__: AXIS_TYPE_CANVAS - }; - }, - offsetAxisToCanvasAxis: function offsetAxisToCanvasAxis(_ref) { - var x = _ref.x, - y = _ref.y; - var targetTransform = this.targetTransform; - var translateX = targetTransform.translateX, - translateY = targetTransform.translateY, - scale = targetTransform.scale; - return { - x: (x + translateX) / scale + translateX / scale, - y: y / scale + translateY / scale, - __AXIS_TYPE__: AXIS_TYPE_CANVAS - }; - }, - originAxisToCanvasAxis: function originAxisToCanvasAxis(_ref2) { - var x = _ref2.x, - y = _ref2.y, - others = _objectWithoutProperties(_ref2, _excluded); - var targetTransform = this.targetTransform; - var translateX = targetTransform.translateX, - translateY = targetTransform.translateY, - _targetTransform$scal = targetTransform.scale, - scale = _targetTransform$scal === void 0 ? 1 : _targetTransform$scal; - var axis = _objectSpread(_objectSpread({ - x: translateX + x * scale, - y: translateY + y * scale - }, others), {}, { - __AXIS_TYPE__: AXIS_TYPE_CANVAS - }); - return axis; - }, - canvasAxisToOriginAxis: function canvasAxisToOriginAxis(_ref3) { - var x = _ref3.x, - y = _ref3.y, - others = _objectWithoutProperties(_ref3, _excluded2); - var targetTransform = this.targetTransform; - var translateX = targetTransform.translateX, - translateY = targetTransform.translateY, - scale = targetTransform.scale; - var axis = _objectSpread(_objectSpread({ - x: (x - translateX) / scale, - y: (y - translateY) / scale - }, others), {}, { - __AXIS_TYPE__: AXIS_TYPE_ORIGIN - }); - return axis; - }, - imgRectAxisToCanvasAxisRect: function imgRectAxisToCanvasAxisRect(_ref4) { - var _ref4$x = _ref4.x, - x = _ref4$x === void 0 ? 0 : _ref4$x, - _ref4$y = _ref4.y, - y = _ref4$y === void 0 ? 0 : _ref4$y, - _ref4$w = _ref4.w, - w = _ref4$w === void 0 ? 0 : _ref4$w, - _ref4$h = _ref4.h, - h = _ref4$h === void 0 ? 0 : _ref4$h, - image = _ref4.image, - others = _objectWithoutProperties(_ref4, _excluded3); - var _ref5 = this.image || image, - width = _ref5.width, - height = _ref5.height; - var _ref6 = this || { - translateX: 0, - translateY: 0, - scale: 0, - rotate: 0 - // rotate: 90, - }, - targetTransform = _ref6.targetTransform; - var rotate = targetTransform.rotate; - var theta = Math.PI / 180 * rotate; - var offsetRect = { - x: width * x, - y: height * y, - x2: width * w + width * x, - y2: height * h + height * y - }; - //旋转 - // x' = x * cos(Theta) - y * sin(Theta); - // (dx,dy) = (x2-x1,y2-y1); - var newX = (offsetRect.x - width / 2) * Math.cos(theta) - (offsetRect.y - height / 2) * Math.sin(theta) + width / 2; - var newY = (offsetRect.x - width / 2) * Math.sin(theta) + (offsetRect.y - height / 2) * Math.cos(theta) + height / 2; - var newX2 = (offsetRect.x2 - width / 2) * Math.cos(theta) - (offsetRect.y2 - height / 2) * Math.sin(theta) + width / 2; - var newY2 = (offsetRect.x2 - width / 2) * Math.sin(theta) + (offsetRect.y2 - height / 2) * Math.cos(theta) + height / 2; - var newAxis1 = this.originAxisToCanvasAxis({ - x: newX, - y: newY - }); - var newAxis2 = this.originAxisToCanvasAxis({ - x: newX2, - y: newY2 - }); - return _objectSpread(_objectSpread({ - x: newAxis1.x, - y: newAxis1.y, - x2: newAxis2.x, - y2: newAxis2.y - }, others), {}, { - __AXIS_TYPE__: AXIS_TYPE_CANVAS - }); - }, - originAxisToImgAxis: function originAxisToImgAxis(_ref7) { - var x = _ref7.x, - y = _ref7.y, - others = _objectWithoutProperties(_ref7, _excluded4); - var _this$image = this.image, - width = _this$image.width, - height = _this$image.height; - var targetTransform = this.targetTransform; - var rotate = targetTransform.rotate; - var theta = Math.PI / 180 * (360 - rotate); - var newX = (x - width / 2) * Math.cos(theta) - (y - height / 2) * Math.sin(theta) + width / 2; - var newY = (x - width / 2) * Math.sin(theta) + (y - height / 2) * Math.cos(theta) + height / 2; - return _objectSpread(_objectSpread({ - x: newX / width, - y: newY / height - }, others), {}, { - __AXIS_TYPE__: AXIS_TYPE_IMAGE - }); - }, - imgAxisToOriginAxis: function imgAxisToOriginAxis(_ref8) { - var _x = _ref8.x, - _y = _ref8.y, - others = _objectWithoutProperties(_ref8, _excluded5); - var _this$image2 = this.image, - width = _this$image2.width, - height = _this$image2.height; - // - var x = width * _x; - var y = height * _y; - // - var targetTransform = this.targetTransform; - var rotate = targetTransform.rotate; - var theta = Math.PI / 180 * rotate; - var newX = (x - width / 2) * Math.cos(theta) - (y - height / 2) * Math.sin(theta) + width / 2; - var newY = (x - width / 2) * Math.sin(theta) + (y - height / 2) * Math.cos(theta) + height / 2; - return _objectSpread(_objectSpread({ - x: newX, - y: newY - }, others), {}, { - __AXIS_TYPE__: AXIS_TYPE_ORIGIN - }); - }, - getDataUrlbyOriginAxis: function getDataUrlbyOriginAxis(_ref9) { - var _ref9$x = _ref9.x, - x = _ref9$x === void 0 ? 0 : _ref9$x, - _ref9$y = _ref9.y, - y = _ref9$y === void 0 ? 0 : _ref9$y, - _ref9$w = _ref9.w, - w = _ref9$w === void 0 ? 0 : _ref9$w, - _ref9$h = _ref9.h, - h = _ref9$h === void 0 ? 0 : _ref9$h, - others = _objectWithoutProperties(_ref9, _excluded6); - var ctx = this.canvas.getContext('2d'); - var commonCanvas = document.createElement('canvas'); - commonCanvas.width = w; - commonCanvas.height = h; - commonCanvas.style.display = 'none'; - document.body.appendChild(commonCanvas); - var commonCtx = commonCanvas.getContext('2d'); - var imageData = ctx.getImageData(x, y, w, h); - commonCtx.putImageData(imageData, 0, 0); - var dataUrl = commonCanvas.toDataURL('image/jpeg'); - commonCanvas.parentNode.removeChild(commonCanvas); - return dataUrl; - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/index.js b/packages/meta/es/ImageEditor/viewer/index.js deleted file mode 100644 index a037de5..0000000 --- a/packages/meta/es/ImageEditor/viewer/index.js +++ /dev/null @@ -1,109 +0,0 @@ -import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime"; -import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; -import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; -import _createClass from "@babel/runtime/helpers/esm/createClass"; -import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; -var _dec, _class; -//@ts-nocheck -import { isPlainObject } from '@zhst/func'; -import { addClass } from 'rc-util/lib/Dom/class'; -import { Mixin, dispatchEvent } from "../utils"; -import Render from "./render"; -import Event from "./event"; -import Shape from "./shape"; -import Helper from "./helper"; -import { CLASS_CANVAS, EVENT_VIEWER_READY, EVENT_VIEWER_ERROR } from "./constants"; -import "./index.scss"; -var Viewer = (_dec = Mixin(Render, Event, Shape, Helper), _dec(_class = /*#__PURE__*/function () { - function Viewer(element, options) { - _classCallCheck(this, Viewer); - /* 方便访问dom元素 */ - /* 容器:挂在的节点 */ - _defineProperty(this, "element", void 0); - /* 图片对象 */ - _defineProperty(this, "image", void 0); - /* canvas对象 */ - _defineProperty(this, "canvas", void 0); - /* 配置项 */ - _defineProperty(this, "options", void 0); - /* 是否初始化完成 */ - _defineProperty(this, "ready", void 0); - this.element = element; - this.options = Object.assign({}, isPlainObject(options) && options); - this.ready = false; - this.init(); - } - _createClass(Viewer, [{ - key: "init", - value: function () { - var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - this.build(); - //@ts-ignore - this.bind(); - //@ts-ignore - _context.next = 5; - return this.render(); - case 5: - this.ready = true; - dispatchEvent(this.element, EVENT_VIEWER_READY); - _context.next = 12; - break; - case 9: - _context.prev = 9; - _context.t0 = _context["catch"](0); - dispatchEvent(this.element, EVENT_VIEWER_ERROR); - case 12: - case "end": - return _context.stop(); - } - }, _callee, this, [[0, 9]]); - })); - function init() { - return _init.apply(this, arguments); - } - return init; - }() - }, { - key: "build", - value: function build() { - var _this$options = this.options, - _this$options$width = _this$options.width, - width = _this$options$width === void 0 ? 300 : _this$options$width, - _this$options$height = _this$options.height, - height = _this$options$height === void 0 ? 150 : _this$options$height; - var canvas = document.createElement('canvas'); - canvas.width = width || canvas.width; - canvas.height = height || canvas.height; - addClass(canvas, CLASS_CANVAS); - this.element.appendChild(canvas); - this.canvas = canvas; - } - }, { - key: "refleshImage", - value: function refleshImage(options) { - this.options = Object.assign({}, isPlainObject(options) && options); - this.ready = false; - this.element.removeChild(this.canvas); - this.init(); - } - }, { - key: "destroy", - value: function destroy() { - var _this$element, _this$element$removeC; - //清理动画 - //@ts-ignore - window.cancelAnimationFrame(this.animationFrame); - //清理事件 - //@ts-ignore - this.unbind(); - //清理dom - (_this$element = this.element) === null || _this$element === void 0 || (_this$element$removeC = _this$element.removeChild) === null || _this$element$removeC === void 0 || _this$element$removeC.call(_this$element, this.canvas); - } - }]); - return Viewer; -}()) || _class); -export default Viewer; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/index.scss b/packages/meta/es/ImageEditor/viewer/index.scss deleted file mode 100644 index fcc2881..0000000 --- a/packages/meta/es/ImageEditor/viewer/index.scss +++ /dev/null @@ -1,44 +0,0 @@ -$prefix: zhst; - -:global { - // .zhst-cropper-container { - // width: 100px; - // } - .zhst-viewer { - &-canvas { - // cursor: grab; - cursor: pointer; - } - - //辅助class - &-invisible { - opacity: 0; - } - - &-hide { - position: absolute; - display: block; - width: 0; - height: 0; - } - - &-hidden { - display: none !important; - } - - &-move { - cursor: move; - } - - &-crop { - cursor: crosshair; - } - - &-disabled &-drag-box, - &-disabled &-face, - &-disabled &-line, - &-disabled &-point { - cursor: not-allowed; - } - } -} diff --git a/packages/meta/es/ImageEditor/viewer/render.js b/packages/meta/es/ImageEditor/viewer/render.js deleted file mode 100644 index 2f54284..0000000 --- a/packages/meta/es/ImageEditor/viewer/render.js +++ /dev/null @@ -1,333 +0,0 @@ -import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime"; -import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; -//@ts-nocheck -import { set, getOuterWidth, getOuterHeight } from 'rc-util/lib/Dom/css'; -import { isNil, isString, isFunction, cloneDeep } from '@zhst/func'; -import { dispatchEvent } from "../utils"; -import { EVENT_VIEWER_TRANSFORM_CHANGE } from "./constants"; -export default { - // store - image: null, - canvas: null, - containerData: { - width: 0, - height: 0 - }, - animationFrame: null, - backgroundColor: '#fff', - targetTransform: { - translateX: 0, - translateY: 0, - scale: 0, - rotate: 0 - // rotate: 90, - }, - //method - render: function render() { - var _this = this; - return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return _this.initImg(); - case 2: - _this.initCanvas(); - _this.startRaf(); - case 4: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - initImg: function initImg() { - var _this2 = this; - return new Promise(function (resolve, reject) { - var propImage = _this2.options.image; - if (isString(propImage)) { - var image = new Image(); - image.crossOrigin = 'anonymous'; - image.src = propImage; - image.onload = function () { - _this2.image = image; - resolve(image); - }; - image.onerror = function (err) { - reject(err); - }; - } else { - _this2.image = propImage; - resolve(propImage); - } - }); - }, - initCanvas: function initCanvas() { - //通过样式设置 不依赖父元素的prosition - var element = this.element, - canvas = this.canvas, - _this$limit = this.limit, - limit = _this$limit === void 0 ? {} : _this$limit, - options = this.options; - var containerData = { - width: getOuterWidth(element), - height: getOuterHeight(element) - }; - this.containerData = containerData; - set(canvas, containerData); - canvas.width = containerData.width; - canvas.height = containerData.height; - var fitTransform = this.calcFitScreen(); - this.targetTransform = Object.assign({}, this.targetTransform, fitTransform); - dispatchEvent(this.element, EVENT_VIEWER_TRANSFORM_CHANGE, cloneDeep(this.targetTransform)); - //产品需求:fitscale 是 minscale - var _options$fitScaleAsMi = options.fitScaleAsMinScale, - fitScaleAsMinScale = _options$fitScaleAsMi === void 0 ? false : _options$fitScaleAsMi; - if (fitScaleAsMinScale) { - this.limit = Object.assign({ - minScale: this.targetTransform.scale - }, this.limit); - } - }, - startRaf: function startRaf() { - var _this3 = this; - //清理动画 - window.cancelAnimationFrame(this.animationFrame); - - //渲染 - var loop = function loop() { - // this.update(); //先update - _this3.renderCanvas(); - window.cancelAnimationFrame(_this3.animationFrame); - _this3.animationFrame = window.requestAnimationFrame(loop); - }; - loop(); - }, - // 绘制画布 - renderCanvas: function renderCanvas(_ctx) { - if (!this.canvas) return; - var containerData = this.containerData, - canvas = this.canvas, - targetTransform = this.targetTransform, - options = this.options; - var translateX = targetTransform.translateX, - translateY = targetTransform.translateY, - scale = targetTransform.scale, - rotate = targetTransform.rotate; - var ctx = _ctx ? _ctx : canvas.getContext('2d'); - //画背景 - ctx.clearRect(0, 0, containerData.width, containerData.height); - ctx.fillStyle = options.backgroundColor; //todo@wdy OD框背景颜色 - ctx.fillRect(0, 0, canvas.width, canvas.height); - //画图 - ctx.save(); - - //缩放移动 - ctx.setTransform(scale, 0, 0, scale, translateX, translateY); - // ctx.setTransform(scale, 0, 0, scale, translateX, translateY); - //旋转 - var centerX = this.image ? this.image.width / 2 : canvas.width; - var centerY = this.image ? this.image.height / 2 : canvas.height; - ctx.translate(centerX, centerY); - ctx.rotate(rotate / 180 * Math.PI); - ctx.translate(-centerX, -centerY); - - //图片 - this.image && ctx.drawImage(this.image, 0, 0); - ctx.restore(); - //画图形 - ctx.save(); - this.renderShape(ctx); - ctx.restore(); - }, - scaleTo: function scaleTo(offsetScale) { - //获取图片中心点 - var containerData = this.containerData; - this.calcTransform({ - scaleCenter: { - x: containerData.width / 2, - y: containerData.height / 2, - step: offsetScale - } - }); - }, - //暂时只支持90deg旋转 否则limit 不能做 - rotateTo: function rotateTo(T) { - if (!this.image) return; - var targetTransform = this.targetTransform; - var rotate = targetTransform.rotate; - var newDeg = isFunction(T) ? T(rotate) : T; - this.calcTransform({ - rotate: newDeg - }); - }, - reset: function reset() { - this.targetTransform.rotate = 0; - var fitTransform = this.calcFitScreen(); - this.targetTransform = Object.assign({}, this.targetTransform, fitTransform); - dispatchEvent(this.element, EVENT_VIEWER_TRANSFORM_CHANGE, cloneDeep(this.targetTransform)); - }, - getImgSize: function getImgSize() { - if (!this.image) return; - return { - w: this.image.width, - h: this.image.height - }; - }, - getImage: function getImage() { - return this; - }, - calcFitScreen: function calcFitScreen() { - if (!this.image) return; - var w = this.containerData.width; - var h = this.containerData.height; - var iw = this.image.width; - var ih = this.image.height; - //算图片显示长款 (todo:旋转算旋转后) - var _this$targetTransform = this.targetTransform.rotate, - rotate = _this$targetTransform === void 0 ? 0 : _this$targetTransform; - var wToh = w / h; - var imgwToh = iw / ih; - if (rotate % 180 !== 0) { - imgwToh = ih / iw; - } - //计算后的位置 - var scale; - var translateX = 0; - var translateY = 0; - if (imgwToh > wToh) { - scale = w / iw; - translateX = 0; - translateY = (h - ih * scale) / 2; - if (rotate % 180 !== 0) { - scale = w / ih; - translateX = (ih - iw) / 2 * scale; - translateY = (h - iw * scale) / 2 + (iw - ih) / 2 * scale; - } - } else { - scale = h / ih; - translateX = (w - iw * scale) / 2; - translateY = 0; - if (rotate % 180 !== 0) { - scale = h / iw; - translateX = (w - ih * scale) / 2 + (ih - iw) / 2 * scale; - translateY = (iw - ih) / 2 * scale; - } - } - var fitTransform = { - translateX: translateX, - translateY: translateY, - scale: scale - }; - return fitTransform; - }, - calcTransform: function calcTransform(newTransform, cropBox) { - if (!this.image) return; - var translateX = newTransform.translateX, - translateY = newTransform.translateY, - scaleCenter = newTransform.scaleCenter, - rotate = newTransform.rotate; - if (!isNil(scaleCenter)) { - var _targetTransform = this.targetTransform, - _this$limit2 = this.limit, - limit = _this$limit2 === void 0 ? {} : _this$limit2; - var _limit$minScale = limit.minScale, - minScale = _limit$minScale === void 0 ? 0.1 : _limit$minScale, - _limit$maxScale = limit.maxScale, - maxScale = _limit$maxScale === void 0 ? Number.MAX_VALUE : _limit$maxScale; - if (cropBox) { - //如果有cropbox 最小缩放值需要重新计算 - var _this$image = this.image, - iw = _this$image.width, - ih = _this$image.height; - if (_targetTransform.rotate % 180 !== 0) { - var _ref = [ih, iw]; - iw = _ref[0]; - ih = _ref[1]; - } - var cw = cropBox.width, - ch = cropBox.height; - var corpMinScale = Math.max(cw / iw, ch / ih); - minScale = Math.max(corpMinScale, minScale); - } - var x = scaleCenter.x, - y = scaleCenter.y, - step = scaleCenter.step; - var preScale = _targetTransform.scale; - var newScale = _targetTransform.scale + step; - newScale = Math.min(maxScale, Math.max(newScale, minScale)); - var newStep = newScale - preScale; - if (newScale != preScale) { - var offsetX = (x - _targetTransform.translateX) / _targetTransform.scale * newStep; - var offsetY = (y - _targetTransform.translateY) / _targetTransform.scale * newStep; - this.targetTransform.translateX = this.targetTransform.translateX - offsetX; - this.targetTransform.translateY = this.targetTransform.translateY - offsetY; - } - this.targetTransform.scale = newScale; - } - if (!isNil(translateX)) { - this.targetTransform.translateX += translateX; - } - if (!isNil(translateY)) { - this.targetTransform.translateY += translateY; - } - if (!isNil(rotate)) { - this.targetTransform.rotate = rotate; - } - - //阻止拖出边界 - var targetTransform = this.targetTransform, - containerData = this.containerData; - var minMargin = 50; - var imgWidth = this.image.width; - var imgHeight = this.image.height; - if (this.targetTransform.rotate % 180 !== 0) { - imgWidth = this.image.height; - imgHeight = this.image.width; - } - var minX = minMargin - imgWidth * targetTransform.scale; - var maxX = containerData.width - minMargin; - var minY = minMargin - imgHeight * targetTransform.scale; - var maxY = containerData.height - minMargin; - this.targetTransform.translateX = Math.min(maxX, Math.max(this.targetTransform.translateX, minX)); - this.targetTransform.translateY = Math.min(maxY, Math.max(this.targetTransform.translateY, minY)); - - //限制截图框不能超出拖动范围 - if (cropBox) { - var _cw = cropBox.width, - _ch = cropBox.height, - top = cropBox.top, - left = cropBox.left; - var _this$image2 = this.image, - _iw = _this$image2.width, - _ih = _this$image2.height; - var imgLeftTop = { - x: 0, - y: 0 - }; - var imgRightBottom = { - x: _iw, - y: _ih - }; - if (this.targetTransform.rotate % 180 !== 0) { - imgLeftTop = { - x: (_iw - _ih) / 2, - y: (_ih - _iw) / 2 - }; - imgRightBottom = { - x: (_iw + _ih) / 2, - y: (_iw + _ih) / 2 - }; - } - //图片左上角不能大于crop左上角 - var _maxX = left - imgLeftTop.x * this.targetTransform.scale; - var _maxY = top - imgLeftTop.y * this.targetTransform.scale; - //图片右下角不能小于crop 右下角 - var _minX = left + _cw - imgRightBottom.x * this.targetTransform.scale; - var _minY = top + _ch - imgRightBottom.y * this.targetTransform.scale; - this.targetTransform.translateX = Math.min(_maxX, Math.max(this.targetTransform.translateX, _minX)); - this.targetTransform.translateY = Math.min(_maxY, Math.max(this.targetTransform.translateY, _minY)); - } - dispatchEvent(this.element, EVENT_VIEWER_TRANSFORM_CHANGE, cloneDeep(this.targetTransform)); - } -}; \ No newline at end of file diff --git a/packages/meta/es/ImageEditor/viewer/shape.js b/packages/meta/es/ImageEditor/viewer/shape.js deleted file mode 100644 index 6e4424c..0000000 --- a/packages/meta/es/ImageEditor/viewer/shape.js +++ /dev/null @@ -1,247 +0,0 @@ -import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -// @ts-nocheck -import { isNil, isArray, isFunction } from '@zhst/func'; -import * as turf from '@turf/turf'; -import booleanPointInPolygon from '@turf/boolean-point-in-polygon'; -import { rectToPolygon } from "./helper"; -import { SHAPE_TYPE_RECT, SHAPE_TYPE_CIRCLE, EVENT_SHAPE_SELECT } from "./constants"; -import { dispatchEvent } from "../utils"; -export default { - //store - shapeList: [], - hoverShapId: null, - selectShapId: null, - //是否开启人脸 - isEyeOpen: false, - //是否移动 - movable: true, - //是否放大缩小 - zoomable: true, - //禁止添加shap - disableAdd: false, - //自定义画框的颜色 - color: '', - changeEyeModel: function changeEyeModel(isOpen) { - if (isOpen) { - this.isEyeOpen = true; - this.changeMoveAble(false); - this.changeZoonAble(false); - } else { - this.isEyeOpen = false; - this.changeMoveAble(true); - this.changeZoonAble(true); - } - }, - //method:添加矩形 - addShape: function addShape(shape) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SHAPE_TYPE_RECT; - this.color = shape.color ? shape.color : ''; - if (isNil(shape) || this.disableAdd) return; - var _this$shapeList = this.shapeList, - preShapeList = _this$shapeList === void 0 ? [] : _this$shapeList; - var _shapeList = isArray(shape) ? shape : [shape]; - _shapeList = _shapeList.map(function (v) { - return _objectSpread(_objectSpread({}, v), {}, { - __SHAPE_TYPE__: type - }); - }); - this.shapeList = [].concat(_toConsumableArray(preShapeList), _toConsumableArray(_shapeList)); - }, - // - setSelectShapId: function setSelectShapId(id) { - this.selectShapId = id; - dispatchEvent(this.element, EVENT_SHAPE_SELECT, id); - }, - getSelectShape: function getSelectShape() { - var _this = this; - var contain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var selectShapeList = []; - var selectShape = this.shapeList.find(function (v) { - return v['id'] === _this.selectShapId; - }); - selectShape && selectShapeList.push(selectShape); - if (contain && selectShape) { - var originFeature = rectToPolygon(this.imgRectAxisToCanvasAxisRect(selectShape)); - for (var i = 0; i < this.shapeList.length; i++) { - var shape = this.shapeList[i]; - if (shape['id'] !== this.selectShapId) { - var feature = rectToPolygon(this.imgRectAxisToCanvasAxisRect(shape)); - var isContain = turf.booleanContains(originFeature, feature); - isContain && selectShapeList.push(shape); - } - } - } - return selectShapeList; - }, - replaceShape: function replaceShape(shape) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SHAPE_TYPE_RECT; - if (isNil(shape)) return; - var _this$shapeList2 = this.shapeList, - preShapeList = _this$shapeList2 === void 0 ? [] : _this$shapeList2; - var _shape; - if (isFunction(shape)) { - _shape = shape(preShapeList); - } else { - _shape = shape; - } - var shapList = isArray(_shape) ? _shape : [_shape]; - shapList = shapList.map(function (v) { - return _objectSpread(_objectSpread({}, v), {}, { - __SHAPE_TYPE__: type - }); - }); - this.shapeList = _toConsumableArray(shapList); - }, - clearShape: function clearShape() { - this.shapeList = []; - }, - calcSelectShape: function calcSelectShape(canvasPoint) { - // todo:有问题 - var shapeList = this.shapeList, - image = this.image; - var selectAbleShape = shapeList.filter(function (_ref) { - var _ref$selectAble = _ref.selectAble, - selectAble = _ref$selectAble === void 0 ? true : _ref$selectAble; - return !!selectAble; - }); - //判断落点离哪个形状最近 - var minId = null; - var minDis = Number.MAX_VALUE; - var pt = turf.point([canvasPoint.x, canvasPoint.y]); - for (var i = 0; i < selectAbleShape.length; i++) { - var shape = selectAbleShape[i]; - var axisRect = this.imgRectAxisToCanvasAxisRect(shape); - var polygon = turf.polygon([[[axisRect.x, axisRect.y], [axisRect.x2, axisRect.y], [axisRect.x2, axisRect.y2], [axisRect.x, axisRect.y2], [axisRect.x, axisRect.y]]]); - var isPtInPolygon = booleanPointInPolygon(pt, polygon); - if (isPtInPolygon) { - //如果点在多变形内 判断距离是否是最短 - var line = turf.polygonToLine(polygon); - var distance = turf.pointToLineDistance(pt, line, { - method: 'planar' - }); - if (distance < minDis) { - minDis = distance; - minId = shape['id']; - } - } - } - return minId; - }, - clearSelectShape: function clearSelectShape() { - this.setSelectShapId(null); - }, - changeMoveAble: function changeMoveAble() { - var movable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - this.movable = movable; - }, - changeZoonAble: function changeZoonAble() { - var zoomable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - this.zoomable = zoomable; - }, - disabledAddShap: function disabledAddShap() { - var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - this.disableAdd = value; - }, - renderShape: function renderShape(ctx) { - var shapeList = this.shapeList; - //先排序 - var selectShapeList = []; - var hoverShapeList = []; - var normalShapeList = []; - for (var i = 0; i < shapeList.length; i++) { - var shape = shapeList[i]; - var isSelectShape = this.selectShapId === shape['id']; - var isHoverShape = this.hoverShapId === shape['id']; - if (isSelectShape) { - selectShapeList.push(shape); - } else if (isHoverShape) { - hoverShapeList.push(shape); - } else { - normalShapeList.push(shape); - } - } - // const sortShapeList = shapeList.sort((a, b) => (this.isHightLight(a) ? 1 : -1)); - //渲染 - for (var _i = 0; _i < normalShapeList.length; _i++) { - var _shape2 = normalShapeList[_i]; - var __SHAPE_TYPE__ = _shape2.__SHAPE_TYPE__; - switch (__SHAPE_TYPE__) { - case SHAPE_TYPE_RECT: - this.renderRect(ctx, _shape2, 'normal'); - break; - case SHAPE_TYPE_CIRCLE: - this.renderPoint(ctx, _shape2, 'normal'); - break; - default: - break; - } - } - for (var _i2 = 0; _i2 < hoverShapeList.length; _i2++) { - var _shape3 = hoverShapeList[_i2]; - var _SHAPE_TYPE__ = _shape3.__SHAPE_TYPE__; - switch (_SHAPE_TYPE__) { - case SHAPE_TYPE_RECT: - this.renderRect(ctx, _shape3, 'hover'); - break; - default: - break; - } - } - for (var _i3 = 0; _i3 < selectShapeList.length; _i3++) { - var _shape4 = selectShapeList[_i3]; - var _SHAPE_TYPE__2 = _shape4.__SHAPE_TYPE__; - switch (_SHAPE_TYPE__2) { - case SHAPE_TYPE_RECT: - this.renderRect(ctx, _shape4, 'select'); - break; - default: - break; - } - } - }, - // 绘制矩形 - renderRect: function renderRect(ctx, shape, type) { - //算rect - var axisRect = this.imgRectAxisToCanvasAxisRect(_objectSpread(_objectSpread({}, shape), {}, { - image: ctx.canvas - })); - var rect = { - x: axisRect.x2 > axisRect.x ? axisRect.x : axisRect.x2, - y: axisRect.y2 > axisRect.y ? axisRect.y : axisRect.y2, - w: Math.abs(axisRect.x2 - axisRect.x), - h: Math.abs(axisRect.y2 - axisRect.y) - }; - //画 - ctx.save(); - if (type === 'normal') { - ctx.strokeStyle = this.color ? this.color : '#FFF566'; - ctx.lineWidth = 2; - ctx.strokeRect.apply(ctx, _toConsumableArray(Object.values(rect))); - } - if (type === 'hover') { - ctx.fillStyle = 'rgba(0, 153, 255, 0.3)'; - ctx.fillRect.apply(ctx, _toConsumableArray(Object.values(rect))); - ctx.strokeStyle = 'rgba(92, 219, 211, 1)'; - ctx.lineWidth = 2; - ctx.strokeRect.apply(ctx, _toConsumableArray(Object.values(rect))); - } - if (type === 'select') { - ctx.strokeStyle = 'rgba(255, 0, 0, 1)'; - ctx.lineWidth = 2; - ctx.strokeRect.apply(ctx, _toConsumableArray(Object.values(rect))); - } - ctx.restore(); - }, - renderPoint: function renderPoint(ctx, shape) { - var originAxis = this.imgAxisToOriginAxis(shape); - var canvasAxis = this.originAxisToCanvasAxis(originAxis); - //画 - ctx.save(); - ctx.beginPath(); - ctx.arc(canvasAxis.x, canvasAxis.y, 2, 0, 2 * Math.PI); - ctx.fillStyle = '#DF0101'; - ctx.fill(); - ctx.restore(); - } -}; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/VideoPlayer.js b/packages/meta/es/VideoPlayer/VideoPlayer.js deleted file mode 100644 index 51b921b..0000000 --- a/packages/meta/es/VideoPlayer/VideoPlayer.js +++ /dev/null @@ -1,689 +0,0 @@ -import _extends from "@babel/runtime/helpers/esm/extends"; -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime"; -import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; -import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; -import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'; -import { noop, get, addEventListenerWrapper, dataURLToBlob, nextTick, toRealNumber, getTransforms, formatDurationTime } from '@zhst/func'; -import Align from 'rc-align'; -import { useLatest, useUpdateEffect, useFullscreen, useUnmount } from '@zhst/hooks'; -import classNames from 'classnames'; -import { message } from '..'; -import { IconFont } from '@zhst/icon'; -import { Cropper, EVENT_CROP_START, EVENT_CROP_END, Viewer } from "../ImageEditor"; -import FlvPlayer, { FLV_EVENT } from "./components/FlvPlayer"; -import Range from "./components/Progress"; -import Loading from "./components/Loading"; -import { CROP_TYPE } from "../utils/constants"; -import { downloadFrame, getShowStatus } from "./videoPlayerHelper"; -import "./index.less"; -var componentName = "zhst-image__video-view"; -var VideoPlayer = /*#__PURE__*/forwardRef(function (props, ref) { - var url = props.url, - _props$maxDuration = props.maxDuration, - maxDuration = _props$maxDuration === void 0 ? 20 : _props$maxDuration, - _props$screenshotButt = props.screenshotButtonAlign, - screenshotButtonAlign = _props$screenshotButt === void 0 ? { - points: ['bl', 'br'], - offset: [6, 0], - overflow: { - adjustX: true, - adjustY: true - } - } : _props$screenshotButt, - _props$autoPlay = props.autoPlay, - autoPlay = _props$autoPlay === void 0 ? false : _props$autoPlay, - odList = props.odList, - showOD = props.showOD, - _props$width = props.width, - width = _props$width === void 0 ? '100%' : _props$width, - _props$height = props.height, - height = _props$height === void 0 ? '532px' : _props$height, - _props$backgroundColo = props.backgroundColor, - backgroundColor = _props$backgroundColo === void 0 ? '#333' : _props$backgroundColo, - _props$screenshotButt2 = props.screenshotButtonRender, - screenshotButtonRender = _props$screenshotButt2 === void 0 ? function () { - return /*#__PURE__*/React.createElement("div", { - style: { - color: '#fff', - width: '80px', - top: 0 - } - }, "\u56DE\u8C03DOM"); - } : _props$screenshotButt2, - onCropChange = props.onCropChange, - defaultNormalizationRect = props.defautlNormalizationRect, - playerProps = props.playerProps; - // ========================== 播放 ========================= - //实例参数 - var containerRef = useRef(null); //容器ref - var videoRef = useRef(null); //video 标签dom - var videoInsRef = useRef(null); //flv 实例 - var _useState = useState(0), - _useState2 = _slicedToArray(_useState, 2), - playSeq = _useState2[0], - setPlaySeq = _useState2[1]; // 通过重置playid使FLV组件重新渲染 - var videoRemoveListener = useRef(noop); //移除dom监听的中间函数 - var loadingTimeRef = useRef(0); //最后一次加载时间 - var delayLoadingTimer = useRef(null); //算loading的定时器 - //状态参数 - var _useState3 = useState(false), - _useState4 = _slicedToArray(_useState3, 2), - isReady = _useState4[0], - setIsReady = _useState4[1]; // - var _useState5 = useState(false), - _useState6 = _slicedToArray(_useState5, 2), - isPlay = _useState6[0], - setIsPlay = _useState6[1]; //当前是否播放 - - var _useState7 = useState(false), - _useState8 = _slicedToArray(_useState7, 2), - isEnd = _useState8[0], - setIsEnd = _useState8[1]; //是否播放结束 - var _useState9 = useState(false), - _useState10 = _slicedToArray(_useState9, 2), - isError = _useState10[0], - setIsError = _useState10[1]; //播放出错 - var _useState11 = useState(false), - _useState12 = _slicedToArray(_useState11, 2), - isVideoLoadFinished = _useState12[0], - setIsVideoLoadFinish = _useState12[1]; //是否缓存加载完成 - var _useState13 = useState(0), - _useState14 = _slicedToArray(_useState13, 2), - playTime = _useState14[0], - setPlayTime = _useState14[1]; //当前播放时间 - var _useState15 = useState(true), - _useState16 = _slicedToArray(_useState15, 2), - isLoadingVideo = _useState16[0], - setIsLoadingVideo = _useState16[1]; //是否加载中 - var _useState17 = useState(false), - _useState18 = _slicedToArray(_useState17, 2), - isDelayLoading = _useState18[0], - setIsDelayLoading = _useState18[1]; //显示的转圈loading 延迟0.2s显示 - //设置延迟转圈圈 - var latestIsLoadingVideo = useLatest(isLoadingVideo); - var setIsLoadingVideoWrapper = function setIsLoadingVideoWrapper(isLoading) { - setIsLoadingVideo(function (preLoading) { - if (!preLoading && isLoading) { - loadingTimeRef.current = new Date().getTime(); - } - if (!isLoading) { - loadingTimeRef.current = null; - } - //延迟0。2s相关 - if (!isLoading) { - setIsDelayLoading(false); - } - if (!delayLoadingTimer.current && preLoading) { - delayLoadingTimer.current = setTimeout(function () { - if (latestIsLoadingVideo.current) { - //0.2s后才显示 - setIsDelayLoading(true); - } - delayLoadingTimer.current = null; - }, 200); - } - return isLoading; - }); - }; - // 初始化loading 30s 直接显示错误 - // TODO :逻辑忘记了 不应该是每次init player吗? - useEffect(function () { - var timer = setInterval(function () { - if (loadingTimeRef.current) { - if (new Date().getTime() - loadingTimeRef.current > 1000 * 30) { - checkIsErr(); - } - } - }, 1000); - return function () { - clearInterval(timer); - }; - }, []); - - //结束的时候暂停 保证不播了 - useUpdateEffect(function () { - if (isEnd) { - var _videoInsRef$current, _videoInsRef$current$; - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current = videoInsRef.current) === null || _videoInsRef$current === void 0 || (_videoInsRef$current$ = _videoInsRef$current.pause) === null || _videoInsRef$current$ === void 0 || _videoInsRef$current$.call(_videoInsRef$current); - } - }, [isEnd]); - - // 捕捉视频播放报错 - var checkIsErr = function checkIsErr() { - setIsError(true); - try { - var _videoInsRef$current2, _videoInsRef$current3; - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current2 = videoInsRef.current) === null || _videoInsRef$current2 === void 0 || (_videoInsRef$current3 = _videoInsRef$current2.destroy) === null || _videoInsRef$current3 === void 0 || _videoInsRef$current3.call(_videoInsRef$current2); - } catch (error) { - console.error(error); - } - }; - - // 初始化 - var latestMaxDuration = useLatest(maxDuration); - var initPlayer = useCallback(function (ins, dom) { - videoRef.current = dom; - videoInsRef.current = ins; - var maxDuration = latestMaxDuration.current || 0; - //监听播放事件 - var video = dom; - var errorLister = function errorLister(e) { - checkIsErr(); - console.error('视频出错了', e, video.currentTime); - }; - var waitingListener = function waitingListener() { - setIsLoadingVideoWrapper(true); - // console.debug('视频加载等待', e, video.currentTime); - }; - var playingListener = function playingListener() { - setIsLoadingVideoWrapper(false); - setIsError(false); - // console.debug('视频从等待中播放', e, video.currentTime); - }; - var playLister = function playLister() { - setIsPlay(true); - setIsError(false); - // console.debug('提示该视频正在播放中', e, video.currentTime); - }; - var pauseListener = function pauseListener() { - setIsPlay(false); - // console.debug('暂停播放', e, video.currentTime); - }; - var endedListner = function endedListner() { - setIsEnd(true); - setIsVideoLoadFinish(true); - // console.debug('视频播放完了', e, video.currentTime); - }; - var timeupdateListner = function timeupdateListner() { - var nowTime = video.currentTime; - if (nowTime >= maxDuration) { - setIsEnd(true); - setIsVideoLoadFinish(true); - } - setPlayTime(nowTime); - }; - // see https://github.com/bilibili/flv.js/issues/337 - var windowErrorHandle = function windowErrorHandle(errorEvent) { - try { - if (errorEvent['message'] == "Uncaught TypeError: Cannot read property 'flushStashedSamples' of null") { - checkIsErr(); - console.error('视频出错了 window监听', errorEvent); - } - } catch (error) { - console.error(error); - } - }; - video.addEventListener('error', errorLister); - video.addEventListener('waiting', waitingListener); - video.addEventListener('playing', playingListener); - video.addEventListener('play', playLister); - video.addEventListener('pause', pauseListener); - video.addEventListener('ended', endedListner); - video.addEventListener('timeupdate', timeupdateListner); - window.addEventListener('error', windowErrorHandle); - videoRemoveListener.current = function () { - video.removeEventListener('error', errorLister); - video.removeEventListener('waiting', waitingListener); - video.removeEventListener('playing', playingListener); - video.removeEventListener('play', playLister); - video.removeEventListener('pause', pauseListener); - video.removeEventListener('ended', endedListner); - video.removeEventListener('timeupdate', timeupdateListner); - window.removeEventListener('error', windowErrorHandle); - }; - videoInsRef === null || videoInsRef === void 0 || videoInsRef.current.on(FLV_EVENT.ERROR, function (type, errDetail, info) { - checkIsErr(); - console.error('videoInsRef 错误', type, errDetail, info, video.currentTime); - }); - var playPromise = videoInsRef === null || videoInsRef === void 0 ? void 0 : videoInsRef.current.play(); - //先ready 遮挡会导致播放失败 - setIsReady(true); - playPromise.then(function () { - setIsReady(true); - }).catch(function () { - try {} catch (error) {} - // setIsError(true); - for (var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++) { - arg[_key] = arguments[_key]; - } - console.error('playPromise视频出错了', arg); - }); - }, []); - useUnmount(function () { - try { - videoRemoveListener.current(); - } catch (e) { - console.error(e); - } - }); - - // 重新加载 - var _reload = /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var oldTime; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - if (!videoInsRef.current) { - _context.next = 15; - break; - } - oldTime = videoInsRef.current.currentTime; - videoInsRef.current.currentTime = 0; - - //如果修改时间不成功,则走重新加载的逻辑 - if (!(oldTime === videoInsRef.current.currentTime)) { - _context.next = 14; - break; - } - //重置状态 - setIsReady(false); - setIsPlay(false); - setIsLoadingVideoWrapper(false); - setIsReady(false); - setIsEnd(false); - setIsVideoLoadFinish(false); - setPlayTime(0); - - //清楚dom事件监听 - try { - videoRemoveListener.current(); - } catch (error) { - console.error(error); - } - setPlaySeq(function (pre) { - return pre + 1; - }); - return _context.abrupt("return"); - case 14: - videoInsRef.current.play(); - case 15: - setPlayTime(0); - setIsEnd(false); - case 17: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function reload() { - return _ref.apply(this, arguments); - }; - }(); - - // 进度条操作 - var seek = function seek(v) { - if (videoInsRef.current && isVideoLoadFinished) { - setPlayTime(parseFloat(v)); - videoInsRef.current.currentTime = parseFloat(v); - } else { - message.warning('待视频加载完,才可操作进度条'); - } - }; - - // ========================== 视频opt bar ========================= - var _useFullscreen = useFullscreen(containerRef, { - pageFullscreen: true - }), - _useFullscreen2 = _slicedToArray(_useFullscreen, 2), - isFullscreen = _useFullscreen2[0], - toggleFullscreen = _useFullscreen2[1].toggleFullscreen; - var showMaxDuration = !!maxDuration ? maxDuration : toRealNumber(get(videoRef, 'current.duration', 0)); - var showSlider = videoInsRef.current && isVideoLoadFinished; - var showStatus = getShowStatus(isDelayLoading, isEnd, isError); - - // ========================== 截图 ========================= - var corpContainerRef = useRef(); - var cropInsRef = useRef(null); - var _useState19 = useState(false), - _useState20 = _slicedToArray(_useState19, 2), - showCrop = _useState20[0], - _setShowCrop = _useState20[1]; - - //回显默认框选 - var isFirstFlagRef = useRef(true); - useEffect(function () { - var isFirst = isFirstFlagRef.current; - if (!isLoadingVideo && isReady && isFirst && defaultNormalizationRect && !showStatus) { - nextTick(function () { - _setShowCrop(true); - }); - } - }, [isLoadingVideo, showStatus]); - - //定位按钮相关参数 - var alginContainerRef = useRef(null); - var alignRef = useRef(null); - var _useState21 = useState(null), - _useState22 = _slicedToArray(_useState21, 2), - cropRect = _useState22[0], - setCropRect = _useState22[1]; - - // 监听showCrop, isReady - 是否可编辑、视频播放组件是否挂载 - useEffect(function () { - var handlerCropStart; - var handlerCropEnd; - setCropRect(null); - if (!isReady) return; - if (showCrop) { - var _canvas$parentNode, _videoInsRef$current4; - handlerCropStart = addEventListenerWrapper(corpContainerRef.current, EVENT_CROP_START, function () { - setCropRect(null); - }); - handlerCropEnd = addEventListenerWrapper(corpContainerRef.current, EVENT_CROP_END, function (event) { - var _alignRef$current, _alignRef$current$for; - var data = event.detail; - setCropRect({ - x: data.left, - y: data.top, - w: data.width, - h: data.height - }); - alignRef === null || alignRef === void 0 || (_alignRef$current = alignRef.current) === null || _alignRef$current === void 0 || (_alignRef$current$for = _alignRef$current.forceAlign) === null || _alignRef$current$for === void 0 || _alignRef$current$for.call(_alignRef$current); - }); - var video = videoRef.current; - //计算 limitcroppbox - var scale = Math.min(video.offsetWidth / video.videoWidth, video.offsetHeight / video.videoHeight); - var finalVideoWidth = video.videoWidth * scale; - var finalVideoHeight = video.videoHeight * scale; - var cropBoxLimited = { - width: finalVideoWidth, - height: finalVideoHeight, - top: (video.offsetHeight - finalVideoHeight) / 2, - left: (video.offsetWidth - finalVideoWidth) / 2 - }; - //获取视频图片 - var canvas = document.createElement('canvas'); - canvas.width = video.offsetWidth; - canvas.height = video.offsetHeight; - canvas.style.display = 'none'; - document.body.appendChild(canvas); - var ctx = canvas.getContext('2d'); - ctx === null || ctx === void 0 || ctx.drawImage(video, (video.offsetWidth - finalVideoWidth) / 2, (video.offsetHeight - finalVideoHeight) / 2, finalVideoWidth, finalVideoHeight); - var imageData = canvas.toDataURL('image/png'); - (_canvas$parentNode = canvas.parentNode) === null || _canvas$parentNode === void 0 || _canvas$parentNode.removeChild(canvas); - //回显编辑框 - var isFirst = isFirstFlagRef.current; - var initialCropBoxData = null; - if (isFirst && defaultNormalizationRect) { - initialCropBoxData = { - left: defaultNormalizationRect.x * finalVideoWidth + cropBoxLimited.left, - top: defaultNormalizationRect.y * finalVideoHeight + cropBoxLimited.top, - width: defaultNormalizationRect.w * finalVideoWidth, - height: defaultNormalizationRect.h * finalVideoHeight - }; - } - isFirstFlagRef.current = false; - - // 初始化圈选工具 - cropInsRef.current = new Cropper(corpContainerRef.current, { - showMask: true, - cropBoxLimited: cropBoxLimited, - editAble: false, - img: imageData, - initialCropBoxData: initialCropBoxData - }); - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current4 = videoInsRef.current) === null || _videoInsRef$current4 === void 0 || _videoInsRef$current4.pause(); - } else { - var _videoInsRef$current5; - var _element = videoInsRef.current._mediaElement || {}; - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current5 = videoInsRef.current) === null || _videoInsRef$current5 === void 0 || _videoInsRef$current5.play(); - // 挂载图片选择 - cropInsRef.current = new Viewer(corpContainerRef.current, { - scaleAble: false, - selectAble: false, - dragAble: false, - width: _element.clientWidth, - height: _element.clientHeight, - backgroundColor: 'transparent' - }); - - // 判定是否存在od框 - showOD && (odList === null || odList === void 0 ? void 0 : odList.forEach(function (_od) { - var _cropInsRef$current; - cropInsRef === null || cropInsRef === void 0 || (_cropInsRef$current = cropInsRef.current) === null || _cropInsRef$current === void 0 || _cropInsRef$current.addShape(_od); - })); - } - return function () { - var _handlerCropStart, _handlerCropEnd, _cropInsRef$current2, _cropInsRef$current2$; - (_handlerCropStart = handlerCropStart) === null || _handlerCropStart === void 0 || _handlerCropStart.remove(); - (_handlerCropEnd = handlerCropEnd) === null || _handlerCropEnd === void 0 || _handlerCropEnd.remove(); - cropInsRef === null || cropInsRef === void 0 || (_cropInsRef$current2 = cropInsRef.current) === null || _cropInsRef$current2 === void 0 || (_cropInsRef$current2$ = _cropInsRef$current2.destroy) === null || _cropInsRef$current2$ === void 0 || _cropInsRef$current2$.call(_cropInsRef$current2); - cropInsRef.current = null; - }; - }, [showCrop, isReady]); - var latestCropRect = useLatest(cropRect); - var getCropInfo = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { - var _canvas$parentNode2; - var cropRect, video, rectList, extendRectList, selectIndex, scale, finalVideoWidth, finalVideoHeight, canvas, ctx, base64, blobData, file, newRect; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - cropRect = latestCropRect.current; - video = videoRef.current; - if (video) { - _context3.next = 4; - break; - } - return _context3.abrupt("return"); - case 4: - rectList = []; - extendRectList = []; - selectIndex = 0; //获取视频图片的url - scale = Math.min(video.offsetWidth / video.videoWidth, video.offsetHeight / video.videoHeight); - finalVideoWidth = video.videoWidth * scale; - finalVideoHeight = video.videoHeight * scale; - canvas = document.createElement('canvas'); - canvas.width = finalVideoWidth; - canvas.height = finalVideoHeight; - canvas.style.display = 'none'; - document.body.appendChild(canvas); - ctx = canvas.getContext('2d'); - ctx.drawImage(video, 0, 0, finalVideoWidth, finalVideoHeight); - base64 = canvas.toDataURL('image/jpeg'); - blobData = dataURLToBlob(base64); - (_canvas$parentNode2 = canvas.parentNode) === null || _canvas$parentNode2 === void 0 || _canvas$parentNode2.removeChild(canvas); - file = new window.File([blobData], "".concat(new Date().getTime())); - newRect = { - w: cropRect.w / finalVideoWidth, - h: cropRect.h / finalVideoHeight, - x: (cropRect.x - (video.offsetWidth - finalVideoWidth) / 2) / finalVideoWidth, - y: (cropRect.y - (video.offsetHeight - finalVideoHeight) / 2) / finalVideoHeight - }; - rectList.push(newRect); - extendRectList.push(newRect); - //扩展框获取imgkey - extendRectList.forEach( /*#__PURE__*/function () { - var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(rect, index) { - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - extendRectList[index] = _objectSpread({}, rect); - case 1: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - return function (_x, _x2) { - return _ref3.apply(this, arguments); - }; - }()); - return _context3.abrupt("return", { - rectList: rectList, - extendRectList: extendRectList, - selectIndex: selectIndex, - file: file - }); - case 26: - case "end": - return _context3.stop(); - } - }, _callee3); - })); - return function getCropInfo() { - return _ref2.apply(this, arguments); - }; - }(); - - // 监听showCrop、cropRect - 监听是否可编辑、绘制的矩形 - useEffect(function () { - //计算归一化crop rect - var normalizationRect = null; - if (showCrop && cropRect) { - var video = videoRef.current; - var scale = Math.min(video.offsetWidth / video.videoWidth, video.offsetHeight / video.videoHeight); - var finalVideoWidth = video.videoWidth * scale; - var finalVideoHeight = video.videoHeight * scale; - var cropBoxLimited = { - width: finalVideoWidth, - height: finalVideoHeight, - top: (video.offsetHeight - finalVideoHeight) / 2, - left: (video.offsetWidth - finalVideoWidth) / 2 - }; - normalizationRect = { - x: (cropRect.x - cropBoxLimited.left) / cropBoxLimited.width, - y: (cropRect.y - cropBoxLimited.top) / cropBoxLimited.height, - w: cropRect.w / cropBoxLimited.width, - h: cropRect.h / cropBoxLimited.height - }; - } - onCropChange === null || onCropChange === void 0 || onCropChange(showCrop, normalizationRect); - }, [showCrop, cropRect]); - - // ========================== 截帧 ========================= - var downloadVideoFrame = useCallback(function (opt) { - var _videoInsRef$current6, _videoInsRef$current7; - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current6 = videoInsRef.current) === null || _videoInsRef$current6 === void 0 || (_videoInsRef$current7 = _videoInsRef$current6.pause) === null || _videoInsRef$current7 === void 0 || _videoInsRef$current7.call(_videoInsRef$current6); - downloadFrame(videoRef.current, opt); - }, []); - - // ============================== 暴露出去的方法 =============================== - var latestIsReady = useLatest(isReady); - var cropAble = !showStatus && isReady; - useImperativeHandle(ref, function () { - return { - cropAble: cropAble, - setShowCrop: function setShowCrop(dispatch) { - var isReady = latestIsReady.current; - if (!isReady) return; - _setShowCrop === null || _setShowCrop === void 0 || _setShowCrop(dispatch); - }, - downloadVideoFrame: downloadVideoFrame, - pause: function pause() { - var _videoInsRef$current8, _videoInsRef$current9; - (_videoInsRef$current8 = videoInsRef.current) === null || _videoInsRef$current8 === void 0 || (_videoInsRef$current9 = _videoInsRef$current8.pause) === null || _videoInsRef$current9 === void 0 || _videoInsRef$current9.call(_videoInsRef$current8); - }, - play: function play() { - var _videoInsRef$current10, _videoInsRef$current11; - (_videoInsRef$current10 = videoInsRef.current) === null || _videoInsRef$current10 === void 0 || (_videoInsRef$current11 = _videoInsRef$current10.play) === null || _videoInsRef$current11 === void 0 || _videoInsRef$current11.call(_videoInsRef$current10); - }, - reload: _reload - }; - }); - return /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName)), - ref: containerRef, - style: { - width: width, - height: height, - backgroundColor: backgroundColor - } - }, url && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FlvPlayer, _extends({ - playId: playSeq, - autoPlay: autoPlay, - className: classNames("".concat(componentName, "-flv")), - type: url.startsWith('http') ? 'mp4' : 'flv', - url: url, - config: { - enableStashBuffer: true, - stashInitialSize: 1024 * 700, - isLive: true, - hasAudio: false, - hasVideo: true - }, - onCreate: initPlayer - }, playerProps)), /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "-crop-container")), - ref: corpContainerRef, - style: { - display: isFullscreen ? 'none' : 'block', - width: '100%', - height: '100%' - } - }), showCrop && cropRect && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - ref: alginContainerRef, - className: classNames("".concat(componentName, "-align")), - style: Object.assign({ - width: cropRect.w, - height: cropRect.h - }, getTransforms({ - translateX: cropRect.x, - translateY: cropRect.y - })) - }), /*#__PURE__*/React.createElement(Align, { - ref: alignRef, - monitorWindowResize: true, - align: screenshotButtonAlign, - target: function target() { - return alginContainerRef.current; - } - }, screenshotButtonRender({ - model: 'IMAGE', - getCropInfo: getCropInfo, - setShowCrop: _setShowCrop, - cropType: CROP_TYPE['CUSTOM'] - }))), !showCrop && /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-opt") - }, /*#__PURE__*/React.createElement(IconFont, { - styles: { - marginRight: '12px', - color: '#fff', - display: 'flex' - }, - onIconClick: function onIconClick() { - if (!isPlay) { - var _videoInsRef$current12; - //播放中暂停 - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current12 = videoInsRef.current) === null || _videoInsRef$current12 === void 0 || _videoInsRef$current12.play(); - _setShowCrop(false); - } else { - var _videoInsRef$current13; - videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current13 = videoInsRef.current) === null || _videoInsRef$current13 === void 0 || _videoInsRef$current13.pause(); - } - }, - color: "#1890ff", - icon: !isPlay ? 'icon-bofang3' : 'icon-zanting1' - }), /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-opt-range"), - onClick: function onClick(e) { - e.stopPropagation(); - } - }, /*#__PURE__*/React.createElement(Range, { - value: playTime, - min: 0, - max: showMaxDuration, - showSlider: showSlider, - onChange: seek - }), /*#__PURE__*/React.createElement("div", null, formatDurationTime(playTime), "/", formatDurationTime(showMaxDuration))), /*#__PURE__*/React.createElement(IconFont, { - styles: { - display: 'flex', - marginLeft: '12px' - }, - color: "#fff", - size: 18, - onIconClick: function onIconClick(e) { - e.stopPropagation(); - toggleFullscreen(); - }, - icon: isFullscreen ? 'icon-suoxiao1' : 'icon-quanping1' - })), !!showStatus && /*#__PURE__*/React.createElement(Loading, { - status: showStatus, - reload: function reload() { - return _reload(); - } - }))); -}); -export default VideoPlayer; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/components/FlvPlayer/index.js b/packages/meta/es/VideoPlayer/components/FlvPlayer/index.js deleted file mode 100644 index cbae339..0000000 --- a/packages/meta/es/VideoPlayer/components/FlvPlayer/index.js +++ /dev/null @@ -1,140 +0,0 @@ -import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; -import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; -import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; -import _createClass from "@babel/runtime/helpers/esm/createClass"; -import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized"; -import _inherits from "@babel/runtime/helpers/esm/inherits"; -import _createSuper from "@babel/runtime/helpers/esm/createSuper"; -import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; -var _excluded = ["className", "autoPlay", "config", "onCreate", "playId"]; -import React, { Component } from 'react'; -import flvjs from 'flv.js'; -import { isEqual } from '@zhst/func'; -export var FLV_EVENT = flvjs.Events; -var VideoPlayer = /*#__PURE__*/function (_Component) { - _inherits(VideoPlayer, _Component); - var _super = _createSuper(VideoPlayer); - function VideoPlayer() { - var _this; - _classCallCheck(this, VideoPlayer); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - _this = _super.call.apply(_super, [this].concat(args)); - _defineProperty(_assertThisInitialized(_this), "state", { - curPlayUrl: '', - shouldReinit: false - }); - _defineProperty(_assertThisInitialized(_this), "flvPlayer", null); - _defineProperty(_assertThisInitialized(_this), "videoElement", null); - _defineProperty(_assertThisInitialized(_this), "initFlv", function ($video) { - _this.videoElement = $video; - var _this$props = _this.props, - className = _this$props.className, - _this$props$autoPlay = _this$props.autoPlay, - autoPlay = _this$props$autoPlay === void 0 ? true : _this$props$autoPlay, - _this$props$config = _this$props.config, - config = _this$props$config === void 0 ? {} : _this$props$config, - onCreate = _this$props.onCreate, - playId = _this$props.playId, - others = _objectWithoutProperties(_this$props, _excluded); - if ($video) { - if (flvjs.isSupported() && _this.props.url && _this.props.url) { - var reload = function reload() { - var _this$flvPlayer; - if (_this.flvPlayer && _this.flvPlayer.destroy) { - try { - _this.flvPlayer.destroy(); - } catch (error) { - console.error(error); - } - } - var flvPlayer = flvjs.createPlayer(_objectSpread({}, others), _objectSpread({ - deferLoadAfterSourceOpen: false - }, config)); - flvPlayer.attachMediaElement($video); - flvPlayer.load(); - _this.flvPlayer = flvPlayer; - // @ts-ignore - var controller = (_this$flvPlayer = _this.flvPlayer) === null || _this$flvPlayer === void 0 || (_this$flvPlayer = _this$flvPlayer._transmuxer) === null || _this$flvPlayer === void 0 ? void 0 : _this$flvPlayer._controller; - var wsLoader = controller._ioctl._loader; - var oldWsOnCompleteFunc = wsLoader._onComplete; - wsLoader._onComplete = function () { - if (!controller._remuxer) { - controller._remuxer = { - destroy: function destroy() { - console.log('组件销毁'); - }, - flushStashedSamples: function flushStashedSamples() { - console.log("flushStashedSamples"); - } - }; - } - oldWsOnCompleteFunc(); - }; - _this.flvPlayer.reload = reload; - onCreate === null || onCreate === void 0 || onCreate(_this.flvPlayer, $video); - }; - reload(); - } - } - }); - return _this; - } - _createClass(VideoPlayer, [{ - key: "componentWillUnmount", - value: function componentWillUnmount() { - if (this.flvPlayer) { - var _this$flvPlayer2, _this$flvPlayer3; - (_this$flvPlayer2 = this.flvPlayer) === null || _this$flvPlayer2 === void 0 || _this$flvPlayer2.unload(); - (_this$flvPlayer3 = this.flvPlayer) === null || _this$flvPlayer3 === void 0 || _this$flvPlayer3.detachMediaElement(); - } - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate() { - if (this.state.shouldReinit) { - this.setState({ - shouldReinit: false - }); - this.initFlv(this.videoElement); - } - } - }, { - key: "render", - value: function render() { - var _this$props2 = this.props, - className = _this$props2.className, - style = _this$props2.style; - return /*#__PURE__*/React.createElement("video", { - muted: true, - preload: "metadata", - className: className, - style: _objectSpread({ - width: '100%', - height: '100%' - }, style), - ref: this.initFlv - }); - } - }]); - return VideoPlayer; -}(Component); -_defineProperty(VideoPlayer, "getDerivedStateFromProps", function (nextProps, prevState) { - var _nextProps$playId = nextProps.playId, - playId = _nextProps$playId === void 0 ? 0 : _nextProps$playId; - var _prevState$playId = prevState.playId, - prePlayId = _prevState$playId === void 0 ? 0 : _prevState$playId; - if (nextProps.url !== undefined) { - if (!isEqual(nextProps.url, prevState.curPlayUrl) || !isEqual(playId, prePlayId)) { - return { - playId: playId, - curPlayUrl: nextProps.url, - shouldReinit: true - }; - } - } - // 否则,对于state不进行任何操作 - return null; -}); -export { VideoPlayer as default }; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/components/Loading/index.js b/packages/meta/es/VideoPlayer/components/Loading/index.js deleted file mode 100644 index c88f084..0000000 --- a/packages/meta/es/VideoPlayer/components/Loading/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; -import { Spin } from 'antd'; -import classNames from 'classnames'; -import { IconFont as Icon } from '@zhst/icon'; -import "./index.less"; -var componentName = "zhst-image__video-view"; -var Loading = function Loading(props) { - var status = props.status, - reload = props.reload; - return /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__player-mask")), - onClick: function onClick(e) { - e.stopPropagation(); - } - }, status === 'LOADING' && /*#__PURE__*/React.createElement(Spin, { - tip: "\u52A0\u8F7D\u4E2D...", - spinning: status === 'LOADING' - }), status === 'END' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - onClick: function onClick() { - reload(); - }, - className: classNames("".concat(componentName, "__icon-wraper")) - }, /*#__PURE__*/React.createElement(Icon, { - styles: { - fill: '#ffffff', - color: '#ffffff' - }, - size: 54, - icon: 'icon-shuaxin' - })), /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__player-mask-title")) - }, '点击刷新后,将重新播放')), status === 'ERROR' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__icon-wraper")) - }, /*#__PURE__*/React.createElement(Icon, { - styles: { - color: '#ffffff' - }, - size: 54, - icon: 'icon-jiazaishibai' - })), /*#__PURE__*/React.createElement("div", { - className: classNames("".concat(componentName, "__player-mask-title")) - }, '视频加载失败,', /*#__PURE__*/React.createElement("a", { - onClick: reload - }, " ", '刷新')))); -}; -export default Loading; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/components/Progress/index.js b/packages/meta/es/VideoPlayer/components/Progress/index.js deleted file mode 100644 index eae9481..0000000 --- a/packages/meta/es/VideoPlayer/components/Progress/index.js +++ /dev/null @@ -1,28 +0,0 @@ -import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; -var _excluded = ["className", "style", "showSlider"]; -import React from 'react'; -import classNames from 'classnames'; -import { Slider, ConfigProvider } from 'antd'; -import "./index.less"; -var componentName = "zhst-image__range"; -export var Range = function Range(props) { - var className = props.className, - style = props.style, - _props$showSlider = props.showSlider, - showSlider = _props$showSlider === void 0 ? true : _props$showSlider, - others = _objectWithoutProperties(props, _excluded); - return /*#__PURE__*/React.createElement("div", { - style: style, - className: classNames("".concat(componentName), !showSlider && "".concat(componentName, "--no-slider"), className) - }, /*#__PURE__*/React.createElement(ConfigProvider, { - theme: { - components: { - Slider: { - railBg: 'rgba(255, 255, 255, 0.6)', - railHoverBg: 'rgba(255, 255, 255, 0.6)' - } - } - } - }, /*#__PURE__*/React.createElement(Slider, others))); -}; -export default Range; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/index.js b/packages/meta/es/VideoPlayer/index.js deleted file mode 100644 index 5863364..0000000 --- a/packages/meta/es/VideoPlayer/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import VideoPlayer from "./VideoPlayer"; -export default VideoPlayer; \ No newline at end of file diff --git a/packages/meta/es/VideoPlayer/videoPlayerHelper.js b/packages/meta/es/VideoPlayer/videoPlayerHelper.js deleted file mode 100644 index b4e2d3f..0000000 --- a/packages/meta/es/VideoPlayer/videoPlayerHelper.js +++ /dev/null @@ -1,51 +0,0 @@ -import download from "downloadjs"; -export function getShowStatus(isLoadingVideo, isEnd, isError) { - var status = null; - if (isLoadingVideo) { - status = 'LOADING'; - } - if (isError) { - status = 'ERROR'; - } - if (isEnd) { - status = 'END'; - } - return status; -} - -// 下载功能的可配置属性 - -// 视屏截帧、下载 -export var downloadFrame = function downloadFrame(_videoDom, opt) { - var _ref = opt || {}, - _ref$downloadAble = _ref.downloadAble, - downloadAble = _ref$downloadAble === void 0 ? true : _ref$downloadAble, - _ref$fileName = _ref.fileName, - fileName = _ref$fileName === void 0 ? 'image' : _ref$fileName, - _ref$fileType = _ref.fileType, - fileType = _ref$fileType === void 0 ? 'image/png' : _ref$fileType; - try { - var video = _videoDom; - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); - var base64; - - //当视频处于还未加载出来时,截屏为黑色图片 - if (video.readyState === 0) { - ctx === null || ctx === void 0 || ctx.clearRect(0, 0, canvas.width, canvas.height); - canvas.width = video.offsetWidth; - canvas.height = video.offsetHeight; - // @ts-ignore - ctx.fillStyle = 'black'; - ctx === null || ctx === void 0 || ctx.fillRect(0, 0, canvas.width, canvas.height); - } else { - canvas.width = video.videoWidth; - canvas.height = video.videoHeight; - ctx === null || ctx === void 0 || ctx.drawImage(video, 0, 0, canvas.width, canvas.height); - } - base64 = canvas.toDataURL(fileType); - downloadAble && download(base64, fileName); - } catch (error) { - console.error(error); - } -}; \ No newline at end of file diff --git a/packages/meta/es/index.js b/packages/meta/es/index.js deleted file mode 100644 index bc3fa06..0000000 --- a/packages/meta/es/index.js +++ /dev/null @@ -1,59 +0,0 @@ -export { default as CompareImage } from "./CompareImage"; -export { default as BigImagePreview } from "./BigImagePreview"; -export { default as Scanner } from "./scanner"; -export { default as BtnGroup } from "./BigImagePreview/components/BtnGroup"; -export { default as CropperImage } from "./cropperImage"; -export { default as AttachImage } from "./attachImage"; -export { default as RelatedImage } from "./relatedImage"; -export { default as VideoPlayer } from "./VideoPlayer"; -// antd -export { default as Tabs } from "./tabs"; -export { default as Tree } from "./tree"; -export { default as Spin } from "./spin"; -export { default as message } from "./message"; -export { default as Button } from "./button"; -export { default as Image } from "./image"; -export { default as Layout } from "./layout"; -export { default as Dropdown } from "./dropdown"; -export { default as FloatButton } from "./float-button"; -export { default as Space } from "./space"; -export { default as Slider } from "./slider"; -export { default as Switch } from "./switch"; -export { default as Grid } from "./grid"; -export { default as Row } from "./row"; -export { default as Col } from "./col"; -export { default as TimePicker } from "./time-picker"; -export { default as DatePicker } from "./date-picker"; -export { default as Calendar } from "./calendar"; -export { default as Empty } from "./empty"; -export { default as Form } from "./form"; -export { default as Select } from "./select"; -export { default as Radio } from "./radio"; -export { default as Checkbox } from "./checkbox"; -export { default as Input } from "./input"; -export { default as ConfigProvider } from "./config-provider"; -export { default as Theme } from "./theme"; -export { default as Locale } from "./locale"; -export { default as Watermark } from "./watermark"; -export { default as Typography } from "./typography"; -export { default as InputNumber } from "./input-number"; -export { default as Modal } from "./modal"; -export { default as Divider } from "./divider"; -export { default as Descriptions } from "./descriptions"; -export { default as Flex } from "./flex"; -export { default as Score } from "./score"; -export { default as Progress } from "./progress"; -export { default as theme } from "./theme"; -export { default as Badge } from "./badge"; -export { default as Alert } from "./alert"; -export { default as Popover } from "./popover"; -export { default as Avatar } from "./avatar"; -export { default as Card } from "./card"; -export { default as Skeleton } from "./skeleton"; -export { default as Tooltip } from "./tooltip"; -export { default as Tour } from "./tour"; -export { default as Segmented } from "./segmented"; -export { default as App } from "./app"; -export { default as notification } from "./notification"; -export { default as ButtonList } from "./ButtonList"; -export * from "./utils"; \ No newline at end of file diff --git a/packages/meta/es/utils/constants.js b/packages/meta/es/utils/constants.js deleted file mode 100644 index 1dc65e2..0000000 --- a/packages/meta/es/utils/constants.js +++ /dev/null @@ -1,13 +0,0 @@ -export var CROP_TYPE = { - CUSTOM: 'CUSTOM', - AUTO: 'AUTO' -}; -export var defaultAlignOption = { - points: ['bl', 'br'], - offset: [6, 0], - overflow: { - adjustX: true, - adjustY: true - } -}; -export var EMPTY_BASE64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=='; \ No newline at end of file diff --git a/packages/meta/es/utils/index.js b/packages/meta/es/utils/index.js deleted file mode 100644 index d23448b..0000000 --- a/packages/meta/es/utils/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from "./constants"; \ No newline at end of file diff --git a/packages/request/lib/index.js b/packages/request/lib/index.js deleted file mode 100644 index bdb1091..0000000 --- a/packages/request/lib/index.js +++ /dev/null @@ -1,96 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.tsx -var src_exports = {}; -__export(src_exports, { - reqConfig: () => reqConfig -}); -module.exports = __toCommonJS(src_exports); -var import_antd = require("antd"); -var reqConfig = (config) => { - const { - authorization, - showMsg = true, - onError, - onExpired, - expiredCodes = [403, 401, 203] - } = config || {}; - return { - timeout: 1e3, - baseURL: location.origin, - errorConfig: { - // @ts-ignore - errorHandler(response) { - const { code, message: resMessage } = (response == null ? void 0 : response.data) || {}; - let msg = resMessage || "\u8BF7\u6C42\u5931\u8D25\uFF01"; - if (response.status !== 200) { - msg = "\u7F51\u7EDC\u5F02\u5E38"; - onError == null ? void 0 : onError(response); - } else if (expiredCodes.includes(code)) { - msg = "\u767B\u5F55\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55"; - onExpired == null ? void 0 : onExpired(response); - } - showMsg && import_antd.message.error(msg); - }, - // @ts-ignore - errorThrower(res) { - console.log("\u62A5\u9519\u5566\uFF1A", res); - } - }, - // @ts-ignore - responseInterceptors: [ - // 一个二元组,第一个元素是 request 拦截器,第二个元素是错误处理 - [ - (response) => { - const { code } = (response == null ? void 0 : response.data) || {}; - if (code !== 200) { - return Promise.reject(response); - } - return (response == null ? void 0 : response.data) || {}; - } - ] - ], - // 请求 - requestInterceptors: [ - // 一个二元组,第一个元素是 request 拦截器,第二个元素是错误处理 - [ - (url, options) => { - const Authorization = authorization || localStorage.getItem("ZHST_AUTH_TOKEN") || ""; - return { - url, - options: { - ...options, - headers: { - Authorization - } - } - }; - }, - (error) => { - return Promise.reject(error); - } - ] - ], - ...config - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - reqConfig -}); diff --git a/packages/slave/es/index.js b/packages/slave/es/index.js deleted file mode 100644 index 22491f2..0000000 --- a/packages/slave/es/index.js +++ /dev/null @@ -1,158 +0,0 @@ -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); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import { message } from "antd"; -import { isUrl } from '@zhst/func'; -var Slave = /*#__PURE__*/function () { - // 设置参数 - function Slave() { - _classCallCheck(this, Slave); - _defineProperty(this, "config", void 0); - _defineProperty(this, "authTokenDefine", void 0); - this.authTokenDefine = 'ZHST_AUTH_TOKEN'; - } - _createClass(Slave, [{ - key: "init", - value: function () { - var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(opt) { - var _opt$jumpToLogin, jumpToLogin, jumpUrl, tokenKey, _opt$showMsg, showMsg, msgText, from, to, currentUrl, currentJumpUrl, _token, isLogin; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _opt$jumpToLogin = opt.jumpToLogin, jumpToLogin = _opt$jumpToLogin === void 0 ? true : _opt$jumpToLogin, jumpUrl = opt.jumpUrl, tokenKey = opt.tokenKey, _opt$showMsg = opt.showMsg, showMsg = _opt$showMsg === void 0 ? true : _opt$showMsg, msgText = opt.msgText, from = opt.from, to = opt.to; - this.config = opt; - this.checkUrl(jumpUrl, 'jumpUrl'); - // 当前链接 - currentUrl = new URL(location.href); // 当前待跳转链接 - currentJumpUrl = new URL(jumpUrl); - _token = currentUrl.searchParams.get(tokenKey || 'token') || this.getToken(); - this.setToken(_token); - this._setUrlKey({ - targetKey: 'from', - targetUrl: from, - jumpUrl: currentJumpUrl - }); - this._setUrlKey({ - targetKey: 'to', - targetUrl: to, - jumpUrl: currentJumpUrl - }); - - // 判断当前登录环境 - isLogin = this.checkEnv({ - showMsg: showMsg, - msgText: msgText - }); // 是否执行跳转页面 - if (jumpToLogin && !isLogin) { - // 判断是否为同一个域,采用不同的跳转方式 - // 同一个域名下 - if (currentJumpUrl.origin === location.origin) { - history.pushState('', '', currentJumpUrl.href); - } else { - location.href = currentJumpUrl.href; - } - } - case 11: - case "end": - return _context.stop(); - } - }, _callee, this); - })); - function init(_x) { - return _init.apply(this, arguments); - } - return init; - }() // 设置 URL 中的值 - /** - * @param opt targetUrl 目标链接,目标链接的 key 值,sourceUrl: 需要添加参数的链接 - */ - }, { - key: "_setUrlKey", - value: function _setUrlKey(opt) { - var targetUrl = opt.targetUrl, - targetKey = opt.targetKey, - jumpUrl = opt.jumpUrl; - var _targetUrl = targetUrl || location.origin + location.pathname; - this.checkUrl(_targetUrl, targetKey); - if (!jumpUrl.searchParams.get(targetKey)) { - jumpUrl.searchParams.set(targetKey, _targetUrl); - } - } - - /** - * 判端是否登录 - * @param _opt showMsg 是否提示 | msgText 提示文案 - * @returns boolean - */ - }, { - key: "checkEnv", - value: function checkEnv(_opt) { - var _token = this.getToken() || String(this.getToken()); - if (!_token && _token !== 'null' && _opt.showMsg) { - message.error(_opt.msgText || '请先登录!'); - return false; - } - return true; - } - - // 检查是否为url,并且跑出错误 - }, { - key: "checkUrl", - value: function checkUrl(url, label) { - if (!isUrl(url)) { - throw Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684 ".concat(label, " \u94FE\u63A5\u5730\u5740\uFF0C\u4EE5http(s)://\u5F00\u5934\uFF01'")); - } - } - - // 退出登录 - }, { - key: "logOut", - value: function logOut(jumpUrl, config) { - this.removeToken(); - var _ref = config || this.config || {}, - from = _ref.from, - to = _ref.to; - var targetUrl = new URL(jumpUrl); - this._setUrlKey({ - targetKey: 'from', - targetUrl: from, - jumpUrl: targetUrl - }); - this._setUrlKey({ - targetKey: 'to', - targetUrl: to, - jumpUrl: targetUrl - }); - location.href = targetUrl.href; - } - }, { - key: "setToken", - value: function setToken(val) { - var tokenKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.authTokenDefine; - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - val && localStorage.setItem(tokenKey, val); - } - }, { - key: "removeToken", - value: function removeToken(cb) { - var tokenKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.authTokenDefine; - localStorage.removeItem(tokenKey); - cb === null || cb === void 0 || cb(); - } - }, { - key: "getToken", - value: function getToken() { - var tokenKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.authTokenDefine; - return localStorage.getItem(tokenKey); - } - }]); - return Slave; -}(); -export default new Slave(); \ No newline at end of file diff --git a/packages/slave/lib/index.js b/packages/slave/lib/index.js deleted file mode 100644 index c357f51..0000000 --- a/packages/slave/lib/index.js +++ /dev/null @@ -1,133 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.tsx -var src_exports = {}; -__export(src_exports, { - default: () => src_default -}); -module.exports = __toCommonJS(src_exports); -var import_antd = require("antd"); -var import_func = require("@zhst/func"); -var Slave = class { - config; - authTokenDefine; - // 设置参数 - constructor() { - this.authTokenDefine = "ZHST_AUTH_TOKEN"; - } - async init(opt) { - const { - jumpToLogin = true, - jumpUrl, - tokenKey, - showMsg = true, - msgText, - from, - to - // force - } = opt; - this.config = opt; - this.checkUrl(jumpUrl, "jumpUrl"); - let currentUrl = new URL(location.href); - let currentJumpUrl = new URL(jumpUrl); - let _token = currentUrl.searchParams.get(tokenKey || "token") || this.getToken(); - this.setToken(_token); - this._setUrlKey({ - targetKey: "from", - targetUrl: from, - jumpUrl: currentJumpUrl - }); - this._setUrlKey({ - targetKey: "to", - targetUrl: to, - jumpUrl: currentJumpUrl - }); - const isLogin = this.checkEnv({ showMsg, msgText }); - if (jumpToLogin && !isLogin) { - if (currentJumpUrl.origin === location.origin) { - history.pushState("", "", currentJumpUrl.href); - } else { - location.href = currentJumpUrl.href; - } - } - } - // 设置 URL 中的值 - /** - * @param opt targetUrl 目标链接,目标链接的 key 值,sourceUrl: 需要添加参数的链接 - */ - _setUrlKey(opt) { - const { - targetUrl, - targetKey, - jumpUrl - } = opt; - let _targetUrl = targetUrl || location.origin + location.pathname; - this.checkUrl(_targetUrl, targetKey); - if (!jumpUrl.searchParams.get(targetKey)) { - jumpUrl.searchParams.set(targetKey, _targetUrl); - } - } - /** - * 判端是否登录 - * @param _opt showMsg 是否提示 | msgText 提示文案 - * @returns boolean - */ - checkEnv(_opt) { - const _token = this.getToken() || String(this.getToken()); - if (!_token && _token !== "null" && _opt.showMsg) { - import_antd.message.error(_opt.msgText || "\u8BF7\u5148\u767B\u5F55\uFF01"); - return false; - } - return true; - } - // 检查是否为url,并且跑出错误 - checkUrl(url, label) { - if (!(0, import_func.isUrl)(url)) { - throw Error(`\u8BF7\u8F93\u5165\u6B63\u786E\u7684 ${label} \u94FE\u63A5\u5730\u5740\uFF0C\u4EE5http(s)://\u5F00\u5934\uFF01'`); - } - } - // 退出登录 - logOut(jumpUrl, config) { - this.removeToken(); - const { from, to } = config || this.config || {}; - const targetUrl = new URL(jumpUrl); - this._setUrlKey({ - targetKey: "from", - targetUrl: from, - jumpUrl: targetUrl - }); - this._setUrlKey({ - targetKey: "to", - targetUrl: to, - jumpUrl: targetUrl - }); - location.href = targetUrl.href; - } - setToken(val, tokenKey = this.authTokenDefine) { - val && localStorage.setItem(tokenKey, val); - } - removeToken(cb, tokenKey = this.authTokenDefine) { - localStorage.removeItem(tokenKey); - cb == null ? void 0 : cb(); - } - getToken(tokenKey = this.authTokenDefine) { - return localStorage.getItem(tokenKey); - } -}; -var src_default = new Slave();