@cloudbase/weda-ui 3.3.3 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ declare function MultipleSelect({ id, style, className, events, label, labelVisi
26
26
  declare namespace MultipleSelect {
27
27
  const propTypes: {
28
28
  events: import("prop-types").Requireable<object>;
29
- defaultValue: import("prop-types").Requireable<NonNullable<string | number>>;
29
+ defaultValue: import("prop-types").Requireable<string | number>;
30
30
  name: import("prop-types").Requireable<string>;
31
31
  placeholder: import("prop-types").Requireable<string>;
32
32
  disabled: import("prop-types").Requireable<boolean>;
@@ -39,7 +39,7 @@ declare namespace MultipleSelect {
39
39
  virtual: import("prop-types").Requireable<boolean>;
40
40
  searchable: import("prop-types").Requireable<boolean>;
41
41
  size: import("prop-types").Requireable<string>;
42
- value: import("prop-types").Requireable<NonNullable<string | any[]>>;
42
+ value: import("prop-types").Requireable<string | any[]>;
43
43
  enumType: import("prop-types").Requireable<string>;
44
44
  customEnum: import("prop-types").Requireable<any[]>;
45
45
  optionId: import("prop-types").Requireable<string>;
@@ -25,7 +25,7 @@ declare const NormalSelect: {
25
25
  }): JSX.Element;
26
26
  propTypes: {
27
27
  events: import("prop-types").Requireable<object>;
28
- defaultValue: import("prop-types").Requireable<NonNullable<string | number>>;
28
+ defaultValue: import("prop-types").Requireable<string | number>;
29
29
  name: import("prop-types").Requireable<string>;
30
30
  placeholder: import("prop-types").Requireable<string>;
31
31
  disabled: import("prop-types").Requireable<boolean>;
@@ -38,7 +38,7 @@ declare const NormalSelect: {
38
38
  virtual: import("prop-types").Requireable<boolean>;
39
39
  searchable: import("prop-types").Requireable<boolean>;
40
40
  size: import("prop-types").Requireable<string>;
41
- value: import("prop-types").Requireable<NonNullable<string | any[]>>;
41
+ value: import("prop-types").Requireable<string | any[]>;
42
42
  enumType: import("prop-types").Requireable<string>;
43
43
  customEnum: import("prop-types").Requireable<any[]>;
44
44
  optionId: import("prop-types").Requireable<string>;
@@ -25,7 +25,7 @@ declare const EnumSelect: {
25
25
  }): JSX.Element;
26
26
  propTypes: {
27
27
  events: import("prop-types").Requireable<object>;
28
- defaultValue: import("prop-types").Requireable<NonNullable<string | number>>;
28
+ defaultValue: import("prop-types").Requireable<string | number>;
29
29
  name: import("prop-types").Requireable<string>;
30
30
  placeholder: import("prop-types").Requireable<string>;
31
31
  disabled: import("prop-types").Requireable<boolean>;
@@ -38,7 +38,7 @@ declare const EnumSelect: {
38
38
  virtual: import("prop-types").Requireable<boolean>;
39
39
  searchable: import("prop-types").Requireable<boolean>;
40
40
  size: import("prop-types").Requireable<string>;
41
- value: import("prop-types").Requireable<NonNullable<string | any[]>>;
41
+ value: import("prop-types").Requireable<string | any[]>;
42
42
  enumType: import("prop-types").Requireable<string>;
43
43
  customEnum: import("prop-types").Requireable<any[]>;
44
44
  optionId: import("prop-types").Requireable<string>;
@@ -1,6 +1,6 @@
1
1
  export namespace propTypes {
2
2
  const events: PropTypes.Requireable<object>;
3
- const defaultValue: PropTypes.Requireable<NonNullable<string | number>>;
3
+ const defaultValue: PropTypes.Requireable<string | number>;
4
4
  const name: PropTypes.Requireable<string>;
5
5
  const placeholder: PropTypes.Requireable<string>;
6
6
  const disabled: PropTypes.Requireable<boolean>;
@@ -13,7 +13,7 @@ export namespace propTypes {
13
13
  const virtual: PropTypes.Requireable<boolean>;
14
14
  const searchable: PropTypes.Requireable<boolean>;
15
15
  const size: PropTypes.Requireable<string>;
16
- const value: PropTypes.Requireable<NonNullable<string | any[]>>;
16
+ const value: PropTypes.Requireable<string | any[]>;
17
17
  const enumType: PropTypes.Requireable<string>;
18
18
  const customEnum: PropTypes.Requireable<any[]>;
19
19
  const optionId: PropTypes.Requireable<string>;
@@ -31,7 +31,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
31
31
  });
32
32
  const [exploreList, setExploreList] = useState([]);
33
33
  const [searchList, setSearchList] = useState([]);
34
- const mapDomName = Date.now();
34
+ const mapDomName = useRef(new Date().getTime());
35
35
  const clientHeight = useMemo(() => document.documentElement.clientHeight, []);
36
36
  const [mapBoxHeight, setMapBoxHeight] = useState(clientHeight - 328);
37
37
  const [searchLoadingStatus, setSearchLoadingStatus] = useState(false);
@@ -79,7 +79,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
79
79
  //定义地图中心点坐标
80
80
  const center = new TMap.LatLng(lat, lng);
81
81
  //定义map变量,调用 TMap.Map() 构造函数创建地图
82
- mapRef.current = new TMap.Map(document.getElementById(`form-map-choose-${mapDomName}`), {
82
+ mapRef.current = new TMap.Map(document.getElementById(`form-map-choose-${mapDomName.current}`), {
83
83
  center,
84
84
  zoom: 16, //设置地图缩放级别
85
85
  });
@@ -111,12 +111,12 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
111
111
  },
112
112
  geometries: [
113
113
  {
114
- id: `pointer-origin-${mapDomName}`,
114
+ id: `pointer-origin-${mapDomName.current}`,
115
115
  styleId: 'originPointer',
116
116
  position: currentLocationsPosition,
117
117
  },
118
118
  {
119
- id: `pointer-${mapDomName}`,
119
+ id: `pointer-${mapDomName.current}`,
120
120
  styleId: 'pointer',
121
121
  position,
122
122
  },
@@ -160,7 +160,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
160
160
  centerRef.current = centerPosition;
161
161
  markerRef.current.updateGeometries([
162
162
  {
163
- id: `pointer-${mapDomName}`,
163
+ id: `pointer-${mapDomName.current}`,
164
164
  styleId: 'pointer',
165
165
  position: mapRef.current.getCenter(),
166
166
  },
@@ -282,7 +282,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
282
282
  mapRef.current.setCenter(center);
283
283
  markerRef.current.updateGeometries([
284
284
  {
285
- id: `pointer-${mapDomName}`,
285
+ id: `pointer-${mapDomName.current}`,
286
286
  styleId: 'pointer',
287
287
  position: center,
288
288
  },
@@ -336,7 +336,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
336
336
  changeSearchBoxHeight(false);
337
337
  };
338
338
  const renderMapView = () => {
339
- return (React.createElement("div", { id: `form-map-choose-${mapDomName}`, style: { height: '100%', width: '100%', position: 'relative' } },
339
+ return (React.createElement("div", { id: `form-map-choose-${mapDomName.current}`, style: { height: '100%', width: '100%', position: 'relative' } },
340
340
  React.createElement("div", { className: "weda-ui_mapChoose_map_control", onClick: backToOrigin, onTouchEnd: backToOrigin },
341
341
  React.createElement("img", { src: "https://qcloudimg.tencent-cloud.cn/raw/16f372916b73decb45faa912e37f6e6f.svg", className: "weda-ui_mapChoose_map_control_img", alt: "" }))));
342
342
  };
@@ -455,7 +455,7 @@ export default function MapChoose({ changeLocation, onConfirm, onClose, currentL
455
455
  const nowPosition = new TMap.LatLng(currentLocationsLatlng.lat, currentLocationsLatlng.lng);
456
456
  markerRef.current.updateGeometries([
457
457
  {
458
- id: `pointer-${mapDomName}`,
458
+ id: `pointer-${mapDomName.current}`,
459
459
  styleId: 'pointer',
460
460
  position: nowPosition,
461
461
  },
@@ -13,7 +13,7 @@ export namespace propTypes {
13
13
  const zoom: PropTypes.Requireable<boolean>;
14
14
  const disabled: PropTypes.Requireable<boolean>;
15
15
  const requiredFlag: PropTypes.Requireable<boolean>;
16
- const decorator: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
16
+ const decorator: PropTypes.Requireable<PropTypes.ReactNodeLike>;
17
17
  const value: PropTypes.Requireable<object>;
18
18
  const locationType: PropTypes.Requireable<number>;
19
19
  const dataSource: PropTypes.Requireable<object>;
@@ -1,4 +1,4 @@
1
- export default function useLocationInfo({ apiKey, locationType, eventsChange, dataSourceStatus, }: {
1
+ export default function useLocationInfo({ apiKey: APIKEY, locationType, eventsChange, dataSourceStatus, }: {
2
2
  apiKey: any;
3
3
  locationType: any;
4
4
  eventsChange: any;
@@ -5,7 +5,7 @@ import { getCloudInstance } from '../../../utils/tcb';
5
5
  import isObjectEqual from '../../../utils/isObjectEqual';
6
6
  import { useSyncValue } from '../../../utils/useSyncValue';
7
7
  import { randomStr } from '../../../utils/platform';
8
- import { IMAGE_TYPES } from './uploader.pc';
8
+ import { IMAGE_TYPES, encodeConvert } from './uploader.pc';
9
9
  import { useTempUrl } from '../../../utils/use-cloud-id-temp-url';
10
10
  const uploadPath = 'weda-uploader';
11
11
  /**
@@ -73,7 +73,7 @@ export function ImageUploaderH5({ title, maxUploadCount, maxSize = 10, acceptTyp
73
73
  setUploading(true);
74
74
  getCloudInstance().then(async (tcb) => {
75
75
  try {
76
- const cloudPath = `${uploadPath}/${randomStr()}-${file === null || file === void 0 ? void 0 : file.name}`;
76
+ const cloudPath = `${uploadPath}/${randomStr()}-${file === null || file === void 0 ? void 0 : file.name.replace(/[%#]/g, '-')}`;
77
77
  const { fileID } = await tcb.uploadFile({
78
78
  cloudPath,
79
79
  filePath: file,
@@ -163,18 +163,19 @@ function SingleImage({ src, deleteBySrc }) {
163
163
  'weui-uploader__file': true,
164
164
  });
165
165
  const { data: realSrc, error } = useTempUrl(src);
166
+ const encodeSrc = encodeConvert(realSrc);
166
167
  const imgStyle = {
167
- backgroundImage: `url(${realSrc})`,
168
+ backgroundImage: `url(${encodeURI(encodeSrc)})`,
168
169
  };
169
170
  const showGallery = () => {
170
- const gallery = weui.gallery(encodeURI(realSrc), {
171
+ const gallery = weui.gallery(encodeURI(encodeSrc), {
171
172
  onDelete: function () {
172
173
  deleteBySrc(src);
173
174
  gallery.hide();
174
175
  },
175
176
  });
176
177
  };
177
- return (React.createElement("li", { className: cls, style: imgStyle, onClick: showGallery }, error || status ? (React.createElement("div", { className: "weui-uploader__file-content" }, error ? (React.createElement("i", { role: "img", "aria-label": "\u9519\u8BEF", className: "weui-icon-warn" })) : (React.createElement("i", { className: "weui-loading", style: { width: 30, height: 30 } })))) : (false)));
178
+ return (React.createElement("li", { className: cls, style: imgStyle, onClick: showGallery, "data-testid": "uploaderh5_imgStyle" }, error || status ? (React.createElement("div", { className: "weui-uploader__file-content" }, error ? (React.createElement("i", { role: "img", "aria-label": "\u9519\u8BEF", className: "weui-icon-warn" })) : (React.createElement("i", { className: "weui-loading", style: { width: 30, height: 30 } })))) : (false)));
178
179
  }
179
180
  const UploaderLabel = ({ layout, title, currentCount, maxCount, requiredFlag, }) => {
180
181
  if (layout === 'horizontal') {
@@ -27,3 +27,4 @@ export interface PropsType extends H5UploaderProps {
27
27
  btnTitle?: string;
28
28
  uploadPath?: string;
29
29
  }
30
+ export declare function encodeConvert(src: any): any;
@@ -121,7 +121,7 @@ export function UploaderPCInner(props) {
121
121
  setUploading(true);
122
122
  getCloudInstance().then(async (tcb) => {
123
123
  try {
124
- const cloudPath = `${uploadPath}/${randomStr()}-${file === null || file === void 0 ? void 0 : file.name}`;
124
+ const cloudPath = `${uploadPath}/${randomStr()}-${file === null || file === void 0 ? void 0 : file.name.replace(/[%#]/g, '-')}`;
125
125
  const { fileID } = await tcb.uploadFile({
126
126
  cloudPath,
127
127
  filePath: file,
@@ -190,19 +190,32 @@ export const TcbImage = (props) => {
190
190
  const { fileID, isZoom, ...rest } = props;
191
191
  const [isError, setIsError] = React.useState(false);
192
192
  const { data: src, error: requestError } = useTempUrl(fileID);
193
+ const encodeSrc = encodeConvert(src);
193
194
  if (isError || requestError) {
194
195
  return React.createElement(ErrorTip, null);
195
196
  }
196
197
  if (src) {
197
- return isZoom ? (React.createElement(ImagePreview, { key: fileID, className: `${CLASS_PREFIX}__image`, ...rest, src: encodeURI(src), previewSrc: encodeURI(src),
198
+ return isZoom ? (React.createElement(ImagePreview, { key: fileID, className: `${CLASS_PREFIX}__image`, ...rest, src: encodeURI(encodeSrc), previewSrc: encodeURI(encodeSrc),
198
199
  /** @ts-expect-error tea imagepreview onError */
199
200
  onError: (e) => {
200
201
  setIsError(true);
201
202
  (props === null || props === void 0 ? void 0 : props.onError) && props.onError(e);
202
- } })) : (React.createElement("img", { key: fileID, className: `${CLASS_PREFIX}__image`, ...rest, src: encodeURI(src), onError: (e) => {
203
+ } })) : (React.createElement("img", { "data-testid": "uploaderpc_imgStyle", key: fileID, className: `${CLASS_PREFIX}__image`, ...rest, src: encodeURI(encodeSrc), onError: (e) => {
203
204
  setIsError(true);
204
205
  (props === null || props === void 0 ? void 0 : props.onError) && props.onError(e);
205
206
  } }));
206
207
  }
207
208
  return null;
208
209
  };
210
+ //兼容私有化下载链接encodeURIComponent被编码情况
211
+ export function encodeConvert(src) {
212
+ if (src) {
213
+ try {
214
+ return 'https://' + decodeURIComponent(src.split('https://')[1]);
215
+ }
216
+ catch (e) {
217
+ return src;
218
+ }
219
+ }
220
+ return src;
221
+ }
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import { emptyObject } from '../../../../utils/constant';
3
3
  import { renderDecorator } from '../../renderDecorator';
4
4
  import classNames from 'classnames';
5
- import { Dropdown, ConfigProvider, Text } from 'tea-component';
5
+ import { Dropdown, ConfigProvider, Text, Icon } from 'tea-component';
6
6
  import { getNode, getRelationData, dealOrgData } from '../utils';
7
7
  import { getDepartById, defaultRequest } from '../getUserService';
8
8
  import '../userOrgSelect.css';
@@ -141,12 +141,11 @@ const SelectViewContainer = (props) => {
141
141
  return React.createElement(Text, { className: "placeholder" }, placeholder);
142
142
  return (React.createElement(React.Fragment, null,
143
143
  React.createElement(ViewCell, { data: curSelectItem, showType: "tree", relation: undefined }),
144
- moveIn && (React.createElement(React.Fragment, null,
145
- React.createElement("div", { className: "weda-select-user-dept__dialog-input-clear", onClick: (e) => {
146
- e.stopPropagation();
147
- onChange === null || onChange === void 0 ? void 0 : onChange();
148
- } },
149
- React.createElement("p", { className: "weda-select-user-dept__dialog-input-clear-close" }))))));
144
+ moveIn && (React.createElement("div", { className: "weda-select-user-dept-input-clear", onClick: (e) => {
145
+ e.stopPropagation();
146
+ onChange === null || onChange === void 0 ? void 0 : onChange();
147
+ } },
148
+ React.createElement(Icon, { className: 'pc-clear', type: "dismiss", size: "s", onMouseDown: onChange })))));
150
149
  };
151
150
  const ViewCell = ({ data, showType, relation }) => {
152
151
  if (showType === 'tree') {
@@ -562,6 +562,7 @@
562
562
  z-index: 20;
563
563
  cursor: pointer;
564
564
  }
565
+
565
566
  .weda-select-user-dept__dialog
566
567
  .weda-select-user-dept__dialog-input-clear::before,
567
568
  .weda-select-user-dept__dialog
@@ -673,14 +674,14 @@
673
674
  .weda-select-user-dept__dialog .user_loading {
674
675
  top: -0.14286rem;
675
676
  }
676
-
677
677
  .weda-select-user-dept__dialog .wedatea2td-form-check .wedatea2td-checkbox,
678
678
  .weda-select-user-dept__dialog .wedatea2td-form-check .wedatea2td-radio-wrap {
679
679
  height: 1.42857rem;
680
680
  margin-right: 0.85714rem;
681
681
  }
682
- .weda-select-user-dept__dialog .wedatea2td-radio,
683
- input[type='radio'] {
682
+ .weda-select-user-dept__dialog
683
+ .weda-select-user-dept__list-item-wrap
684
+ .wedatea2td-radio {
684
685
  width: 1.42857rem;
685
686
  height: 1.42857rem;
686
687
  }
@@ -807,3 +808,16 @@ input[type='radio'] {
807
808
  .weda-user-model-select .size-auto-width .wedatea2td-dropdown__value {
808
809
  white-space: pre-wrap;
809
810
  }
811
+ .weda-select-user-dept-input-clear {
812
+ position: absolute;
813
+ right: 0.57143rem;
814
+ top: 0;
815
+ cursor: pointer;
816
+ background-color: white;
817
+ }
818
+ .weda-select-user-dept-input-clear .pc-clear {
819
+ position: relative;
820
+ top: 25%;
821
+ display: inline-block;
822
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzg4OCIgZD0iTTggMWE3IDcgMCAxIDAgMCAxNEE3IDcgMCAwIDAgOCAxem0zLjUzNiA5LjEyMWwtMS40MTQgMS40MTRMOCA5LjQxNGwtMi4xMjEgMi4xMjEtMS40MTQtMS40MTRMNi41ODYgOCA0LjQ2NCA1Ljg3OWwxLjQxNC0xLjQxNEw4IDYuNTg2bDIuMTIxLTIuMTIxIDEuNDE0IDEuNDE0TDkuNDE0IDhsMi4xMjIgMi4xMjF6Ii8+PC9zdmc+) !important;
823
+ }
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useCallback } from 'react';
2
2
  import { renderDecorator } from '../renderDecorator';
3
3
  import { isInIde, filterStrList } from '../../../utils/platform';
4
4
  import classNames from 'classnames';
5
- import { Dropdown, ConfigProvider, Text, Modal } from 'tea-component';
5
+ import { Dropdown, ConfigProvider, Text, Modal, Icon } from 'tea-component';
6
6
  import { getNode, getRelationData, dealOrgData, dealUserData, removeMarkString, } from './utils';
7
7
  import { getUserInfo, defaultRequest } from './getUserService';
8
8
  import './userOrgSelect.css';
@@ -237,12 +237,11 @@ const SelectViewContainer = (props) => {
237
237
  return React.createElement(Text, { className: "placeholder1" }, placeholder);
238
238
  return (React.createElement(React.Fragment, null,
239
239
  React.createElement(ViewCell, { data: data, showType: "tree", relation: undefined }),
240
- moveIn && (React.createElement(React.Fragment, null,
241
- React.createElement("div", { className: "weda-select-user-dept__dialog-input-clear", onClick: (e) => {
242
- e.stopPropagation();
243
- onChange === null || onChange === void 0 ? void 0 : onChange();
244
- } },
245
- React.createElement("p", { className: "weda-select-user-dept__dialog-input-clear-close" }))))));
240
+ moveIn && (React.createElement("div", { className: "weda-select-user-dept-input-clear", onClick: (e) => {
241
+ e.stopPropagation();
242
+ onChange === null || onChange === void 0 ? void 0 : onChange();
243
+ } },
244
+ React.createElement(Icon, { className: 'pc-clear', type: "dismiss", size: "s", onMouseDown: onChange })))));
246
245
  };
247
246
  const ViewCell = ({ data, showType, relation }) => {
248
247
  if (showType === 'tree') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",
@@ -1,3 +0,0 @@
1
- export function getTMap(): any;
2
- export function calculateDistance(latlng1: any, latlng2: any): number;
3
- export const base64Loc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XBoaWMiIGluMj0iZWZmZWN0M19kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K";
@@ -1,21 +0,0 @@
1
- export function getTMap() {
2
- const TMap = window === null || window === void 0 ? void 0 : window.TMap;
3
- return TMap;
4
- }
5
- export function calculateDistance(latlng1, latlng2) {
6
- let lat1 = latlng1.latitude;
7
- let lng1 = latlng1.longitude;
8
- let lat2 = latlng2.latitude;
9
- let lng2 = latlng2.longitude;
10
- var radLat1 = (lat1 * Math.PI) / 180.0;
11
- var radLat2 = (lat2 * Math.PI) / 180.0;
12
- var a = radLat1 - radLat2;
13
- var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
14
- var s = 2 *
15
- Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
16
- Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
17
- s = s * 6378.137; // EARTH_RADIUS;
18
- s = Math.round(s * 10000) / 10000;
19
- return s * 1000;
20
- }
21
- export const base64LocationIcon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4NCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC45OCIgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRkXzI0NDdfNTc0OSkiPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSIxMiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSI3IiBmaWxsPSIjMDA1MkQ5Ii8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkZF8yNDQ3XzU3NDkiIHg9IjAiIHk9IjAiIHdpZHRoPSI4NCIgaGVp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