@pdfme/ui 4.0.0-dev.6 → 4.0.0-dev.7

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.
package/dist/index.es.js CHANGED
@@ -9237,7 +9237,7 @@ ieee754.write = function(a, s, $, _, _e, tt) {
9237
9237
  throw new Error("BigInt not supported");
9238
9238
  }
9239
9239
  })(buffer$1);
9240
- const langs = ["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"], Lang = z.enum(langs);
9240
+ const langs = ["en", "zh", "ja", "ko", "ar", "th", "pl", "it", "de", "es", "fr"], Lang = z.enum(langs);
9241
9241
  z.object({
9242
9242
  // -----------------used in ui-----------------
9243
9243
  cancel: z.string(),
@@ -135127,6 +135127,63 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135127
135127
  "schemas.table.headStyle": "Header Style",
135128
135128
  "schemas.table.bodyStyle": "Body Style",
135129
135129
  "schemas.table.columnStyle": "Column Style"
135130
+ }, dictZh = {
135131
+ cancel: "取消",
135132
+ field: "字段",
135133
+ fieldName: "名称",
135134
+ align: "对齐",
135135
+ width: "宽度",
135136
+ height: "高度",
135137
+ opacity: "透明度",
135138
+ rotate: "旋转",
135139
+ edit: "编辑",
135140
+ plsInputName: "请输入名称",
135141
+ fieldMustUniq: "字段名称必须唯一",
135142
+ notUniq: "(名称不唯一)",
135143
+ noKeyName: "无名称",
135144
+ fieldsList: "字段列表",
135145
+ editField: "编辑字段",
135146
+ type: "类型",
135147
+ errorOccurred: "发生错误",
135148
+ errorBulkUpdateFieldName: "由于项目数量已更改,无法提交更改。",
135149
+ commitBulkUpdateFieldName: "提交更改",
135150
+ bulkUpdateFieldName: "批量更新字段名称",
135151
+ addPageAfter: "在之后添加页面",
135152
+ removePage: "删除当前页面",
135153
+ removePageConfirm: "您确定要删除此页面吗?此操作无法撤销。",
135154
+ hexColorPrompt: "请输入有效的十六进制颜色代码。",
135155
+ "schemas.color": "颜色",
135156
+ "schemas.borderWidth": "边框宽度",
135157
+ "schemas.borderColor": "边框颜色",
135158
+ "schemas.backgroundColor": "背景颜色",
135159
+ "schemas.textColor": "文字颜色",
135160
+ "schemas.bgColor": "背景颜色",
135161
+ "schemas.horizontal": "水平",
135162
+ "schemas.vertical": "垂直",
135163
+ "schemas.left": "左",
135164
+ "schemas.center": "中",
135165
+ "schemas.right": "右",
135166
+ "schemas.top": "顶",
135167
+ "schemas.middle": "中间",
135168
+ "schemas.bottom": "底",
135169
+ "schemas.padding": "填充",
135170
+ "schemas.text.fontName": "字体名称",
135171
+ "schemas.text.size": "大小",
135172
+ "schemas.text.spacing": "间距",
135173
+ "schemas.text.textAlign": "文本对齐",
135174
+ "schemas.text.verticalAlign": "垂直对齐",
135175
+ "schemas.text.lineHeight": "行高",
135176
+ "schemas.text.min": "最小",
135177
+ "schemas.text.max": "最大",
135178
+ "schemas.text.fit": "适应",
135179
+ "schemas.text.dynamicFontSize": "动态字体大小",
135180
+ "schemas.barcodes.barColor": "条码颜色",
135181
+ "schemas.barcodes.includetext": "包括文本",
135182
+ "schemas.table.alternateBackgroundColor": "交替背景颜色",
135183
+ "schemas.table.tableStyle": "表格样式",
135184
+ "schemas.table.headStyle": "表头样式",
135185
+ "schemas.table.bodyStyle": "表体样式",
135186
+ "schemas.table.columnStyle": "列样式"
135130
135187
  }, dictJa = {
135131
135188
  cancel: "キャンセル",
135132
135189
  field: "入力項目",
@@ -135184,6 +135241,63 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135184
135241
  "schemas.table.headStyle": "ヘッダースタイル",
135185
135242
  "schemas.table.bodyStyle": "ボディスタイル",
135186
135243
  "schemas.table.columnStyle": "カラムスタイル"
135244
+ }, dictKo = {
135245
+ cancel: "취소",
135246
+ field: "필드",
135247
+ fieldName: "이름",
135248
+ align: "정렬",
135249
+ width: "너비",
135250
+ height: "높이",
135251
+ opacity: "투명도",
135252
+ rotate: "회전",
135253
+ edit: "편집",
135254
+ plsInputName: "이름을 입력하세요",
135255
+ fieldMustUniq: "필드 이름은 유일해야 합니다",
135256
+ notUniq: "(유일하지 않은 이름)",
135257
+ noKeyName: "이름 없음",
135258
+ fieldsList: "필드 목록",
135259
+ editField: "필드 편집",
135260
+ type: "유형",
135261
+ errorOccurred: "오류 발생",
135262
+ errorBulkUpdateFieldName: "항목 수가 변경되어 변경을 커밋할 수 없습니다.",
135263
+ commitBulkUpdateFieldName: "변경 사항 커밋",
135264
+ bulkUpdateFieldName: "필드 이름 일괄 업데이트",
135265
+ addPageAfter: "다음에 페이지 추가",
135266
+ removePage: "현재 페이지 제거",
135267
+ removePageConfirm: "이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",
135268
+ hexColorPrompt: "유효한 16진수 색상 코드를 입력하세요.",
135269
+ "schemas.color": "색상",
135270
+ "schemas.borderWidth": "테두리 너비",
135271
+ "schemas.borderColor": "테두리 색상",
135272
+ "schemas.backgroundColor": "배경색",
135273
+ "schemas.textColor": "텍스트 색상",
135274
+ "schemas.bgColor": "배경색",
135275
+ "schemas.horizontal": "수평",
135276
+ "schemas.vertical": "수직",
135277
+ "schemas.left": "왼쪽",
135278
+ "schemas.center": "중앙",
135279
+ "schemas.right": "오른쪽",
135280
+ "schemas.top": "상단",
135281
+ "schemas.middle": "중간",
135282
+ "schemas.bottom": "하단",
135283
+ "schemas.padding": "패딩",
135284
+ "schemas.text.fontName": "글꼴 이름",
135285
+ "schemas.text.size": "크기",
135286
+ "schemas.text.spacing": "간격",
135287
+ "schemas.text.textAlign": "텍스트 정렬",
135288
+ "schemas.text.verticalAlign": "수직 정렬",
135289
+ "schemas.text.lineHeight": "줄 높이",
135290
+ "schemas.text.min": "최소",
135291
+ "schemas.text.max": "최대",
135292
+ "schemas.text.fit": "맞춤",
135293
+ "schemas.text.dynamicFontSize": "동적 폰트 크기",
135294
+ "schemas.barcodes.barColor": "바코드 색상",
135295
+ "schemas.barcodes.includetext": "텍스트 포함",
135296
+ "schemas.table.alternateBackgroundColor": "대체 배경색",
135297
+ "schemas.table.tableStyle": "테이블 스타일",
135298
+ "schemas.table.headStyle": "헤더 스타일",
135299
+ "schemas.table.bodyStyle": "본문 스타일",
135300
+ "schemas.table.columnStyle": "열 스타일"
135187
135301
  }, dictAr = {
135188
135302
  cancel: "إلغاء",
135189
135303
  field: "الحقل",
@@ -135585,7 +135699,9 @@ const MinusOutlined$1 = /* @__PURE__ */ reactExports.forwardRef(MinusOutlined),
135585
135699
  "schemas.table.columnStyle": "Style de colonne"
135586
135700
  }, dictionaries = {
135587
135701
  en: dictEn,
135702
+ zh: dictZh,
135588
135703
  ja: dictJa,
135704
+ ko: dictKo,
135589
135705
  ar: dictAr,
135590
135706
  th: dictTh,
135591
135707
  it: dictIt,
package/dist/index.umd.js CHANGED
@@ -39,7 +39,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
39
39
  *
40
40
  * @author Feross Aboukhadijeh <https://feross.org>
41
41
  * @license MIT
42
- */(function(a){const s=base64Js,$=ieee754,_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=at,a.SlowBuffer=gt,a.INSPECT_MAX_BYTES=50;const _e=2147483647;a.kMaxLength=_e,at.TYPED_ARRAY_SUPPORT=tt(),!at.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function tt(){try{const Xt=new Uint8Array(1),Gt={foo:function(){return 42}};return Object.setPrototypeOf(Gt,Uint8Array.prototype),Object.setPrototypeOf(Xt,Gt),Xt.foo()===42}catch{return!1}}Object.defineProperty(at.prototype,"parent",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.buffer}}),Object.defineProperty(at.prototype,"offset",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.byteOffset}});function nt(Xt){if(Xt>_e)throw new RangeError('The value "'+Xt+'" is invalid for option "size"');const Gt=new Uint8Array(Xt);return Object.setPrototypeOf(Gt,at.prototype),Gt}function at(Xt,Gt,Wt){if(typeof Xt=="number"){if(typeof Gt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lt(Xt)}return ot(Xt,Gt,Wt)}at.poolSize=8192;function ot(Xt,Gt,Wt){if(typeof Xt=="string")return et(Xt,Gt);if(ArrayBuffer.isView(Xt))return ut(Xt);if(Xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt);if(tr(Xt,ArrayBuffer)||Xt&&tr(Xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tr(Xt,SharedArrayBuffer)||Xt&&tr(Xt.buffer,SharedArrayBuffer)))return ft(Xt,Gt,Wt);if(typeof Xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const er=Xt.valueOf&&Xt.valueOf();if(er!=null&&er!==Xt)return at.from(er,Gt,Wt);const lr=ht(Xt);if(lr)return lr;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Xt[Symbol.toPrimitive]=="function")return at.from(Xt[Symbol.toPrimitive]("string"),Gt,Wt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt)}at.from=function(Xt,Gt,Wt){return ot(Xt,Gt,Wt)},Object.setPrototypeOf(at.prototype,Uint8Array.prototype),Object.setPrototypeOf(at,Uint8Array);function rt(Xt){if(typeof Xt!="number")throw new TypeError('"size" argument must be of type number');if(Xt<0)throw new RangeError('The value "'+Xt+'" is invalid for option "size"')}function st(Xt,Gt,Wt){return rt(Xt),Xt<=0?nt(Xt):Gt!==void 0?typeof Wt=="string"?nt(Xt).fill(Gt,Wt):nt(Xt).fill(Gt):nt(Xt)}at.alloc=function(Xt,Gt,Wt){return st(Xt,Gt,Wt)};function lt(Xt){return rt(Xt),nt(Xt<0?0:dt(Xt)|0)}at.allocUnsafe=function(Xt){return lt(Xt)},at.allocUnsafeSlow=function(Xt){return lt(Xt)};function et(Xt,Gt){if((typeof Gt!="string"||Gt==="")&&(Gt="utf8"),!at.isEncoding(Gt))throw new TypeError("Unknown encoding: "+Gt);const Wt=pt(Xt,Gt)|0;let er=nt(Wt);const lr=er.write(Xt,Gt);return lr!==Wt&&(er=er.slice(0,lr)),er}function it(Xt){const Gt=Xt.length<0?0:dt(Xt.length)|0,Wt=nt(Gt);for(let er=0;er<Gt;er+=1)Wt[er]=Xt[er]&255;return Wt}function ut(Xt){if(tr(Xt,Uint8Array)){const Gt=new Uint8Array(Xt);return ft(Gt.buffer,Gt.byteOffset,Gt.byteLength)}return it(Xt)}function ft(Xt,Gt,Wt){if(Gt<0||Xt.byteLength<Gt)throw new RangeError('"offset" is outside of buffer bounds');if(Xt.byteLength<Gt+(Wt||0))throw new RangeError('"length" is outside of buffer bounds');let er;return Gt===void 0&&Wt===void 0?er=new Uint8Array(Xt):Wt===void 0?er=new Uint8Array(Xt,Gt):er=new Uint8Array(Xt,Gt,Wt),Object.setPrototypeOf(er,at.prototype),er}function ht(Xt){if(at.isBuffer(Xt)){const Gt=dt(Xt.length)|0,Wt=nt(Gt);return Wt.length===0||Xt.copy(Wt,0,0,Gt),Wt}if(Xt.length!==void 0)return typeof Xt.length!="number"||ir(Xt.length)?nt(0):it(Xt);if(Xt.type==="Buffer"&&Array.isArray(Xt.data))return it(Xt.data)}function dt(Xt){if(Xt>=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return Xt|0}function gt(Xt){return+Xt!=Xt&&(Xt=0),at.alloc(+Xt)}at.isBuffer=function(Gt){return Gt!=null&&Gt._isBuffer===!0&&Gt!==at.prototype},at.compare=function(Gt,Wt){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),tr(Wt,Uint8Array)&&(Wt=at.from(Wt,Wt.offset,Wt.byteLength)),!at.isBuffer(Gt)||!at.isBuffer(Wt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Gt===Wt)return 0;let er=Gt.length,lr=Wt.length;for(let ur=0,pr=Math.min(er,lr);ur<pr;++ur)if(Gt[ur]!==Wt[ur]){er=Gt[ur],lr=Wt[ur];break}return er<lr?-1:lr<er?1:0},at.isEncoding=function(Gt){switch(String(Gt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},at.concat=function(Gt,Wt){if(!Array.isArray(Gt))throw new TypeError('"list" argument must be an Array of Buffers');if(Gt.length===0)return at.alloc(0);let er;if(Wt===void 0)for(Wt=0,er=0;er<Gt.length;++er)Wt+=Gt[er].length;const lr=at.allocUnsafe(Wt);let ur=0;for(er=0;er<Gt.length;++er){let pr=Gt[er];if(tr(pr,Uint8Array))ur+pr.length>lr.length?(at.isBuffer(pr)||(pr=at.from(pr)),pr.copy(lr,ur)):Uint8Array.prototype.set.call(lr,pr,ur);else if(at.isBuffer(pr))pr.copy(lr,ur);else throw new TypeError('"list" argument must be an Array of Buffers');ur+=pr.length}return lr};function pt(Xt,Gt){if(at.isBuffer(Xt))return Xt.length;if(ArrayBuffer.isView(Xt)||tr(Xt,ArrayBuffer))return Xt.byteLength;if(typeof Xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Xt);const Wt=Xt.length,er=arguments.length>2&&arguments[2]===!0;if(!er&&Wt===0)return 0;let lr=!1;for(;;)switch(Gt){case"ascii":case"latin1":case"binary":return Wt;case"utf8":case"utf-8":return Jt(Xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt*2;case"hex":return Wt>>>1;case"base64":return Kt(Xt).length;default:if(lr)return er?-1:Jt(Xt).length;Gt=(""+Gt).toLowerCase(),lr=!0}}at.byteLength=pt;function mt(Xt,Gt,Wt){let er=!1;if((Gt===void 0||Gt<0)&&(Gt=0),Gt>this.length||((Wt===void 0||Wt>this.length)&&(Wt=this.length),Wt<=0)||(Wt>>>=0,Gt>>>=0,Wt<=Gt))return"";for(Xt||(Xt="utf8");;)switch(Xt){case"hex":return Rt(this,Gt,Wt);case"utf8":case"utf-8":return Tt(this,Gt,Wt);case"ascii":return It(this,Gt,Wt);case"latin1":case"binary":return yt(this,Gt,Wt);case"base64":return Ot(this,Gt,Wt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,Gt,Wt);default:if(er)throw new TypeError("Unknown encoding: "+Xt);Xt=(Xt+"").toLowerCase(),er=!0}}at.prototype._isBuffer=!0;function ct(Xt,Gt,Wt){const er=Xt[Gt];Xt[Gt]=Xt[Wt],Xt[Wt]=er}at.prototype.swap16=function(){const Gt=this.length;if(Gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Wt=0;Wt<Gt;Wt+=2)ct(this,Wt,Wt+1);return this},at.prototype.swap32=function(){const Gt=this.length;if(Gt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Wt=0;Wt<Gt;Wt+=4)ct(this,Wt,Wt+3),ct(this,Wt+1,Wt+2);return this},at.prototype.swap64=function(){const Gt=this.length;if(Gt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Wt=0;Wt<Gt;Wt+=8)ct(this,Wt,Wt+7),ct(this,Wt+1,Wt+6),ct(this,Wt+2,Wt+5),ct(this,Wt+3,Wt+4);return this},at.prototype.toString=function(){const Gt=this.length;return Gt===0?"":arguments.length===0?Tt(this,0,Gt):mt.apply(this,arguments)},at.prototype.toLocaleString=at.prototype.toString,at.prototype.equals=function(Gt){if(!at.isBuffer(Gt))throw new TypeError("Argument must be a Buffer");return this===Gt?!0:at.compare(this,Gt)===0},at.prototype.inspect=function(){let Gt="";const Wt=a.INSPECT_MAX_BYTES;return Gt=this.toString("hex",0,Wt).replace(/(.{2})/g,"$1 ").trim(),this.length>Wt&&(Gt+=" ... "),"<Buffer "+Gt+">"},_&&(at.prototype[_]=at.prototype.inspect),at.prototype.compare=function(Gt,Wt,er,lr,ur){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),!at.isBuffer(Gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Gt);if(Wt===void 0&&(Wt=0),er===void 0&&(er=Gt?Gt.length:0),lr===void 0&&(lr=0),ur===void 0&&(ur=this.length),Wt<0||er>Gt.length||lr<0||ur>this.length)throw new RangeError("out of range index");if(lr>=ur&&Wt>=er)return 0;if(lr>=ur)return-1;if(Wt>=er)return 1;if(Wt>>>=0,er>>>=0,lr>>>=0,ur>>>=0,this===Gt)return 0;let pr=ur-lr,yr=er-Wt;const Er=Math.min(pr,yr),br=this.slice(lr,ur),gr=Gt.slice(Wt,er);for(let Ar=0;Ar<Er;++Ar)if(br[Ar]!==gr[Ar]){pr=br[Ar],yr=gr[Ar];break}return pr<yr?-1:yr<pr?1:0};function vt(Xt,Gt,Wt,er,lr){if(Xt.length===0)return-1;if(typeof Wt=="string"?(er=Wt,Wt=0):Wt>2147483647?Wt=2147483647:Wt<-2147483648&&(Wt=-2147483648),Wt=+Wt,ir(Wt)&&(Wt=lr?0:Xt.length-1),Wt<0&&(Wt=Xt.length+Wt),Wt>=Xt.length){if(lr)return-1;Wt=Xt.length-1}else if(Wt<0)if(lr)Wt=0;else return-1;if(typeof Gt=="string"&&(Gt=at.from(Gt,er)),at.isBuffer(Gt))return Gt.length===0?-1:At(Xt,Gt,Wt,er,lr);if(typeof Gt=="number")return Gt=Gt&255,typeof Uint8Array.prototype.indexOf=="function"?lr?Uint8Array.prototype.indexOf.call(Xt,Gt,Wt):Uint8Array.prototype.lastIndexOf.call(Xt,Gt,Wt):At(Xt,[Gt],Wt,er,lr);throw new TypeError("val must be string, number or Buffer")}function At(Xt,Gt,Wt,er,lr){let ur=1,pr=Xt.length,yr=Gt.length;if(er!==void 0&&(er=String(er).toLowerCase(),er==="ucs2"||er==="ucs-2"||er==="utf16le"||er==="utf-16le")){if(Xt.length<2||Gt.length<2)return-1;ur=2,pr/=2,yr/=2,Wt/=2}function Er(gr,Ar){return ur===1?gr[Ar]:gr.readUInt16BE(Ar*ur)}let br;if(lr){let gr=-1;for(br=Wt;br<pr;br++)if(Er(Xt,br)===Er(Gt,gr===-1?0:br-gr)){if(gr===-1&&(gr=br),br-gr+1===yr)return gr*ur}else gr!==-1&&(br-=br-gr),gr=-1}else for(Wt+yr>pr&&(Wt=pr-yr),br=Wt;br>=0;br--){let gr=!0;for(let Ar=0;Ar<yr;Ar++)if(Er(Xt,br+Ar)!==Er(Gt,Ar)){gr=!1;break}if(gr)return br}return-1}at.prototype.includes=function(Gt,Wt,er){return this.indexOf(Gt,Wt,er)!==-1},at.prototype.indexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!0)},at.prototype.lastIndexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!1)};function xt(Xt,Gt,Wt,er){Wt=Number(Wt)||0;const lr=Xt.length-Wt;er?(er=Number(er),er>lr&&(er=lr)):er=lr;const ur=Gt.length;er>ur/2&&(er=ur/2);let pr;for(pr=0;pr<er;++pr){const yr=parseInt(Gt.substr(pr*2,2),16);if(ir(yr))return pr;Xt[Wt+pr]=yr}return pr}function bt(Xt,Gt,Wt,er){return nr(Jt(Gt,Xt.length-Wt),Xt,Wt,er)}function Et(Xt,Gt,Wt,er){return nr(rr(Gt),Xt,Wt,er)}function St(Xt,Gt,Wt,er){return nr(Kt(Gt),Xt,Wt,er)}function Bt(Xt,Gt,Wt,er){return nr(Yt(Gt,Xt.length-Wt),Xt,Wt,er)}at.prototype.write=function(Gt,Wt,er,lr){if(Wt===void 0)lr="utf8",er=this.length,Wt=0;else if(er===void 0&&typeof Wt=="string")lr=Wt,er=this.length,Wt=0;else if(isFinite(Wt))Wt=Wt>>>0,isFinite(er)?(er=er>>>0,lr===void 0&&(lr="utf8")):(lr=er,er=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ur=this.length-Wt;if((er===void 0||er>ur)&&(er=ur),Gt.length>0&&(er<0||Wt<0)||Wt>this.length)throw new RangeError("Attempt to write outside buffer bounds");lr||(lr="utf8");let pr=!1;for(;;)switch(lr){case"hex":return xt(this,Gt,Wt,er);case"utf8":case"utf-8":return bt(this,Gt,Wt,er);case"ascii":case"latin1":case"binary":return Et(this,Gt,Wt,er);case"base64":return St(this,Gt,Wt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,Gt,Wt,er);default:if(pr)throw new TypeError("Unknown encoding: "+lr);lr=(""+lr).toLowerCase(),pr=!0}},at.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ot(Xt,Gt,Wt){return Gt===0&&Wt===Xt.length?s.fromByteArray(Xt):s.fromByteArray(Xt.slice(Gt,Wt))}function Tt(Xt,Gt,Wt){Wt=Math.min(Xt.length,Wt);const er=[];let lr=Gt;for(;lr<Wt;){const ur=Xt[lr];let pr=null,yr=ur>239?4:ur>223?3:ur>191?2:1;if(lr+yr<=Wt){let Er,br,gr,Ar;switch(yr){case 1:ur<128&&(pr=ur);break;case 2:Er=Xt[lr+1],(Er&192)===128&&(Ar=(ur&31)<<6|Er&63,Ar>127&&(pr=Ar));break;case 3:Er=Xt[lr+1],br=Xt[lr+2],(Er&192)===128&&(br&192)===128&&(Ar=(ur&15)<<12|(Er&63)<<6|br&63,Ar>2047&&(Ar<55296||Ar>57343)&&(pr=Ar));break;case 4:Er=Xt[lr+1],br=Xt[lr+2],gr=Xt[lr+3],(Er&192)===128&&(br&192)===128&&(gr&192)===128&&(Ar=(ur&15)<<18|(Er&63)<<12|(br&63)<<6|gr&63,Ar>65535&&Ar<1114112&&(pr=Ar))}}pr===null?(pr=65533,yr=1):pr>65535&&(pr-=65536,er.push(pr>>>10&1023|55296),pr=56320|pr&1023),er.push(pr),lr+=yr}return Ct(er)}const wt=4096;function Ct(Xt){const Gt=Xt.length;if(Gt<=wt)return String.fromCharCode.apply(String,Xt);let Wt="",er=0;for(;er<Gt;)Wt+=String.fromCharCode.apply(String,Xt.slice(er,er+=wt));return Wt}function It(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]&127);return er}function yt(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]);return er}function Rt(Xt,Gt,Wt){const er=Xt.length;(!Gt||Gt<0)&&(Gt=0),(!Wt||Wt<0||Wt>er)&&(Wt=er);let lr="";for(let ur=Gt;ur<Wt;++ur)lr+=sr[Xt[ur]];return lr}function kt(Xt,Gt,Wt){const er=Xt.slice(Gt,Wt);let lr="";for(let ur=0;ur<er.length-1;ur+=2)lr+=String.fromCharCode(er[ur]+er[ur+1]*256);return lr}at.prototype.slice=function(Gt,Wt){const er=this.length;Gt=~~Gt,Wt=Wt===void 0?er:~~Wt,Gt<0?(Gt+=er,Gt<0&&(Gt=0)):Gt>er&&(Gt=er),Wt<0?(Wt+=er,Wt<0&&(Wt=0)):Wt>er&&(Wt=er),Wt<Gt&&(Wt=Gt);const lr=this.subarray(Gt,Wt);return Object.setPrototypeOf(lr,at.prototype),lr};function jt(Xt,Gt,Wt){if(Xt%1!==0||Xt<0)throw new RangeError("offset is not uint");if(Xt+Gt>Wt)throw new RangeError("Trying to access beyond buffer length")}at.prototype.readUintLE=at.prototype.readUIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return lr},at.prototype.readUintBE=at.prototype.readUIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt+--Wt],ur=1;for(;Wt>0&&(ur*=256);)lr+=this[Gt+--Wt]*ur;return lr},at.prototype.readUint8=at.prototype.readUInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]},at.prototype.readUint16LE=at.prototype.readUInt16LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]|this[Gt+1]<<8},at.prototype.readUint16BE=at.prototype.readUInt16BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]<<8|this[Gt+1]},at.prototype.readUint32LE=at.prototype.readUInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),(this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16)+this[Gt+3]*16777216},at.prototype.readUint32BE=at.prototype.readUInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]*16777216+(this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3])},at.prototype.readBigUInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24,ur=this[++Gt]+this[++Gt]*2**8+this[++Gt]*2**16+er*2**24;return BigInt(lr)+(BigInt(ur)<<BigInt(32))}),at.prototype.readBigUInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt*2**24+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt],ur=this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er;return(BigInt(lr)<<BigInt(32))+BigInt(ur)}),at.prototype.readIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return ur*=128,lr>=ur&&(lr-=Math.pow(2,8*Wt)),lr},at.prototype.readIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=Wt,ur=1,pr=this[Gt+--lr];for(;lr>0&&(ur*=256);)pr+=this[Gt+--lr]*ur;return ur*=128,pr>=ur&&(pr-=Math.pow(2,8*Wt)),pr},at.prototype.readInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]&128?(255-this[Gt]+1)*-1:this[Gt]},at.prototype.readInt16LE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt]|this[Gt+1]<<8;return er&32768?er|4294901760:er},at.prototype.readInt16BE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt+1]|this[Gt]<<8;return er&32768?er|4294901760:er},at.prototype.readInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16|this[Gt+3]<<24},at.prototype.readInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]<<24|this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3]},at.prototype.readBigInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=this[Gt+4]+this[Gt+5]*2**8+this[Gt+6]*2**16+(er<<24);return(BigInt(lr)<<BigInt(32))+BigInt(Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24)}),at.prototype.readBigInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=(Wt<<24)+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt];return(BigInt(lr)<<BigInt(32))+BigInt(this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er)}),at.prototype.readFloatLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!0,23,4)},at.prototype.readFloatBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!1,23,4)},at.prototype.readDoubleLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!0,52,8)},at.prototype.readDoubleBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!1,52,8)};function Ht(Xt,Gt,Wt,er,lr,ur){if(!at.isBuffer(Xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Gt>lr||Gt<ur)throw new RangeError('"value" argument is out of bounds');if(Wt+er>Xt.length)throw new RangeError("Index out of range")}at.prototype.writeUintLE=at.prototype.writeUIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=1,pr=0;for(this[Wt]=Gt&255;++pr<er&&(ur*=256);)this[Wt+pr]=Gt/ur&255;return Wt+er},at.prototype.writeUintBE=at.prototype.writeUIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=er-1,pr=1;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)this[Wt+ur]=Gt/pr&255;return Wt+er},at.prototype.writeUint8=at.prototype.writeUInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,255,0),this[Wt]=Gt&255,Wt+1},at.prototype.writeUint16LE=at.prototype.writeUInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeUint16BE=at.prototype.writeUInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeUint32LE=at.prototype.writeUInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt+3]=Gt>>>24,this[Wt+2]=Gt>>>16,this[Wt+1]=Gt>>>8,this[Wt]=Gt&255,Wt+4},at.prototype.writeUint32BE=at.prototype.writeUInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4};function Ft(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,Wt}function _t(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt+7]=ur,ur=ur>>8,Xt[Wt+6]=ur,ur=ur>>8,Xt[Wt+5]=ur,ur=ur>>8,Xt[Wt+4]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt+3]=pr,pr=pr>>8,Xt[Wt+2]=pr,pr=pr>>8,Xt[Wt+1]=pr,pr=pr>>8,Xt[Wt]=pr,Wt+8}at.prototype.writeBigUInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeBigUInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=0,pr=1,yr=0;for(this[Wt]=Gt&255;++ur<er&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur-1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=er-1,pr=1,yr=0;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur+1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,127,-128),Gt<0&&(Gt=255+Gt+1),this[Wt]=Gt&255,Wt+1},at.prototype.writeInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,this[Wt+2]=Gt>>>16,this[Wt+3]=Gt>>>24,Wt+4},at.prototype.writeInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),Gt<0&&(Gt=4294967295+Gt+1),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4},at.prototype.writeBigInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),at.prototype.writeBigInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Nt(Xt,Gt,Wt,er,lr,ur){if(Wt+er>Xt.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("Index out of range")}function Mt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,4),$.write(Xt,Gt,Wt,er,23,4),Wt+4}at.prototype.writeFloatLE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!0,er)},at.prototype.writeFloatBE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!1,er)};function Lt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,8),$.write(Xt,Gt,Wt,er,52,8),Wt+8}at.prototype.writeDoubleLE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!0,er)},at.prototype.writeDoubleBE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!1,er)},at.prototype.copy=function(Gt,Wt,er,lr){if(!at.isBuffer(Gt))throw new TypeError("argument should be a Buffer");if(er||(er=0),!lr&&lr!==0&&(lr=this.length),Wt>=Gt.length&&(Wt=Gt.length),Wt||(Wt=0),lr>0&&lr<er&&(lr=er),lr===er||Gt.length===0||this.length===0)return 0;if(Wt<0)throw new RangeError("targetStart out of bounds");if(er<0||er>=this.length)throw new RangeError("Index out of range");if(lr<0)throw new RangeError("sourceEnd out of bounds");lr>this.length&&(lr=this.length),Gt.length-Wt<lr-er&&(lr=Gt.length-Wt+er);const ur=lr-er;return this===Gt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Wt,er,lr):Uint8Array.prototype.set.call(Gt,this.subarray(er,lr),Wt),ur},at.prototype.fill=function(Gt,Wt,er,lr){if(typeof Gt=="string"){if(typeof Wt=="string"?(lr=Wt,Wt=0,er=this.length):typeof er=="string"&&(lr=er,er=this.length),lr!==void 0&&typeof lr!="string")throw new TypeError("encoding must be a string");if(typeof lr=="string"&&!at.isEncoding(lr))throw new TypeError("Unknown encoding: "+lr);if(Gt.length===1){const pr=Gt.charCodeAt(0);(lr==="utf8"&&pr<128||lr==="latin1")&&(Gt=pr)}}else typeof Gt=="number"?Gt=Gt&255:typeof Gt=="boolean"&&(Gt=Number(Gt));if(Wt<0||this.length<Wt||this.length<er)throw new RangeError("Out of range index");if(er<=Wt)return this;Wt=Wt>>>0,er=er===void 0?this.length:er>>>0,Gt||(Gt=0);let ur;if(typeof Gt=="number")for(ur=Wt;ur<er;++ur)this[ur]=Gt;else{const pr=at.isBuffer(Gt)?Gt:at.from(Gt,lr),yr=pr.length;if(yr===0)throw new TypeError('The value "'+Gt+'" is invalid for argument "value"');for(ur=0;ur<er-Wt;++ur)this[ur+Wt]=pr[ur%yr]}return this};const $t={};function Pt(Xt,Gt,Wt){$t[Xt]=class extends Wt{constructor(){super(),Object.defineProperty(this,"message",{value:Gt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Xt}]`,this.stack,delete this.name}get code(){return Xt}set code(lr){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:lr,writable:!0})}toString(){return`${this.name} [${Xt}]: ${this.message}`}}}Pt("ERR_BUFFER_OUT_OF_BOUNDS",function(Xt){return Xt?`${Xt} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pt("ERR_INVALID_ARG_TYPE",function(Xt,Gt){return`The "${Xt}" argument must be of type number. Received type ${typeof Gt}`},TypeError),Pt("ERR_OUT_OF_RANGE",function(Xt,Gt,Wt){let er=`The value of "${Xt}" is out of range.`,lr=Wt;return Number.isInteger(Wt)&&Math.abs(Wt)>2**32?lr=Dt(String(Wt)):typeof Wt=="bigint"&&(lr=String(Wt),(Wt>BigInt(2)**BigInt(32)||Wt<-(BigInt(2)**BigInt(32)))&&(lr=Dt(lr)),lr+="n"),er+=` It must be ${Gt}. Received ${lr}`,er},RangeError);function Dt(Xt){let Gt="",Wt=Xt.length;const er=Xt[0]==="-"?1:0;for(;Wt>=er+4;Wt-=3)Gt=`_${Xt.slice(Wt-3,Wt)}${Gt}`;return`${Xt.slice(0,Wt)}${Gt}`}function Ut(Xt,Gt,Wt){Qt(Gt,"offset"),(Xt[Gt]===void 0||Xt[Gt+Wt]===void 0)&&qt(Gt,Xt.length-(Wt+1))}function Vt(Xt,Gt,Wt,er,lr,ur){if(Xt>Wt||Xt<Gt){const pr=typeof Gt=="bigint"?"n":"";let yr;throw ur>3?Gt===0||Gt===BigInt(0)?yr=`>= 0${pr} and < 2${pr} ** ${(ur+1)*8}${pr}`:yr=`>= -(2${pr} ** ${(ur+1)*8-1}${pr}) and < 2 ** ${(ur+1)*8-1}${pr}`:yr=`>= ${Gt}${pr} and <= ${Wt}${pr}`,new $t.ERR_OUT_OF_RANGE("value",yr,Xt)}Ut(er,lr,ur)}function Qt(Xt,Gt){if(typeof Xt!="number")throw new $t.ERR_INVALID_ARG_TYPE(Gt,"number",Xt)}function qt(Xt,Gt,Wt){throw Math.floor(Xt)!==Xt?(Qt(Xt,Wt),new $t.ERR_OUT_OF_RANGE(Wt||"offset","an integer",Xt)):Gt<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE(Wt||"offset",`>= ${Wt?1:0} and <= ${Gt}`,Xt)}const Zt=/[^+/0-9A-Za-z-_]/g;function ar(Xt){if(Xt=Xt.split("=")[0],Xt=Xt.trim().replace(Zt,""),Xt.length<2)return"";for(;Xt.length%4!==0;)Xt=Xt+"=";return Xt}function Jt(Xt,Gt){Gt=Gt||1/0;let Wt;const er=Xt.length;let lr=null;const ur=[];for(let pr=0;pr<er;++pr){if(Wt=Xt.charCodeAt(pr),Wt>55295&&Wt<57344){if(!lr){if(Wt>56319){(Gt-=3)>-1&&ur.push(239,191,189);continue}else if(pr+1===er){(Gt-=3)>-1&&ur.push(239,191,189);continue}lr=Wt;continue}if(Wt<56320){(Gt-=3)>-1&&ur.push(239,191,189),lr=Wt;continue}Wt=(lr-55296<<10|Wt-56320)+65536}else lr&&(Gt-=3)>-1&&ur.push(239,191,189);if(lr=null,Wt<128){if((Gt-=1)<0)break;ur.push(Wt)}else if(Wt<2048){if((Gt-=2)<0)break;ur.push(Wt>>6|192,Wt&63|128)}else if(Wt<65536){if((Gt-=3)<0)break;ur.push(Wt>>12|224,Wt>>6&63|128,Wt&63|128)}else if(Wt<1114112){if((Gt-=4)<0)break;ur.push(Wt>>18|240,Wt>>12&63|128,Wt>>6&63|128,Wt&63|128)}else throw new Error("Invalid code point")}return ur}function rr(Xt){const Gt=[];for(let Wt=0;Wt<Xt.length;++Wt)Gt.push(Xt.charCodeAt(Wt)&255);return Gt}function Yt(Xt,Gt){let Wt,er,lr;const ur=[];for(let pr=0;pr<Xt.length&&!((Gt-=2)<0);++pr)Wt=Xt.charCodeAt(pr),er=Wt>>8,lr=Wt%256,ur.push(lr),ur.push(er);return ur}function Kt(Xt){return s.toByteArray(ar(Xt))}function nr(Xt,Gt,Wt,er){let lr;for(lr=0;lr<er&&!(lr+Wt>=Gt.length||lr>=Xt.length);++lr)Gt[lr+Wt]=Xt[lr];return lr}function tr(Xt,Gt){return Xt instanceof Gt||Xt!=null&&Xt.constructor!=null&&Xt.constructor.name!=null&&Xt.constructor.name===Gt.name}function ir(Xt){return Xt!==Xt}const sr=function(){const Xt="0123456789abcdef",Gt=new Array(256);for(let Wt=0;Wt<16;++Wt){const er=Wt*16;for(let lr=0;lr<16;++lr)Gt[er+lr]=Xt[Wt]+Xt[lr]}return Gt}();function cr(Xt){return typeof BigInt>"u"?or:Xt}function or(){throw new Error("BigInt not supported")}})(buffer$1);const langs=["en","ja","ar","th","pl","it","de","es","fr"],Lang=z.enum(langs);z.object({cancel:z.string(),field:z.string(),fieldName:z.string(),align:z.string(),width:z.string(),opacity:z.string(),height:z.string(),rotate:z.string(),edit:z.string(),plsInputName:z.string(),fieldMustUniq:z.string(),notUniq:z.string(),noKeyName:z.string(),fieldsList:z.string(),editField:z.string(),type:z.string(),errorOccurred:z.string(),errorBulkUpdateFieldName:z.string(),commitBulkUpdateFieldName:z.string(),bulkUpdateFieldName:z.string(),addPageAfter:z.string(),removePage:z.string(),removePageConfirm:z.string(),hexColorPrompt:z.string(),"schemas.color":z.string(),"schemas.borderWidth":z.string(),"schemas.borderColor":z.string(),"schemas.backgroundColor":z.string(),"schemas.textColor":z.string(),"schemas.bgColor":z.string(),"schemas.horizontal":z.string(),"schemas.vertical":z.string(),"schemas.left":z.string(),"schemas.center":z.string(),"schemas.right":z.string(),"schemas.top":z.string(),"schemas.middle":z.string(),"schemas.bottom":z.string(),"schemas.padding":z.string(),"schemas.text.fontName":z.string(),"schemas.text.size":z.string(),"schemas.text.spacing":z.string(),"schemas.text.textAlign":z.string(),"schemas.text.verticalAlign":z.string(),"schemas.text.lineHeight":z.string(),"schemas.text.min":z.string(),"schemas.text.max":z.string(),"schemas.text.fit":z.string(),"schemas.text.dynamicFontSize":z.string(),"schemas.barcodes.barColor":z.string(),"schemas.barcodes.includetext":z.string(),"schemas.table.alternateBackgroundColor":z.string(),"schemas.table.tableStyle":z.string(),"schemas.table.headStyle":z.string(),"schemas.table.bodyStyle":z.string(),"schemas.table.columnStyle":z.string()}),z.enum(["viewer","form","designer"]);const ColorType=z.enum(["rgb","cmyk"]).optional();z.object({height:z.number(),width:z.number()});const Schema$1=z.object({type:z.string(),icon:z.string().optional(),content:z.string().optional(),position:z.object({x:z.number(),y:z.number()}),width:z.number(),height:z.number(),rotate:z.number().optional(),opacity:z.number().optional(),readOnly:z.boolean().optional()}).passthrough(),SchemaForUIAdditionalInfo=z.object({id:z.string(),key:z.string()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=z.any().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=z.any().refine(a=>a instanceof Uint8Array),BlankPdf=z.object({width:z.number(),height:z.number(),padding:z.tuple([z.number(),z.number(),z.number(),z.number()])}),BasePdf=z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema,BlankPdf]),Template=z.object({schemas:z.array(z.record(Schema$1)),basePdf:BasePdf,pdfmeVersion:z.string().optional()}).passthrough(),Inputs=z.array(z.record(z.any())).min(1),Font=z.record(z.object({data:z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema]),fallback:z.boolean().optional(),subset:z.boolean().optional()})),CommonOptions=z.object({font:Font.optional()}).passthrough(),CommonProps=z.object({template:Template,options:CommonOptions.optional(),plugins:z.record(z.object({ui:z.any(),pdf:z.any(),propPanel:z.any()})).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:z.string().optional(),creationDate:z.date().optional(),creator:z.string().optional(),keywords:z.array(z.string()).optional(),language:z.string().optional(),modificationDate:z.date().optional(),producer:z.string().optional(),subject:z.string().optional(),title:z.string().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:z.record(z.string(),z.string()).optional(),theme:z.record(z.string(),z.unknown()).optional()}),HTMLElementSchema=z.any().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const s="",$=Object.entries(a).reduce((_,_e)=>{const[tt,nt]=_e;return!_&&nt.fallback?tt:_},s);if($===s)throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return $},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>{const s=.26458333333333;return parseFloat(String(a))*s},blob2Base64Pdf=a=>new Promise((s,$)=>{const _=new FileReader;_.onloadend=()=>{_.result.startsWith("data:application/pdf;")?s(_.result):$(Error("[@pdfme/common] template.basePdf must be pdf data."))},_.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),getB64BasePdf=a=>typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"?fetch(a).then($=>$.blob()).then(blob2Base64Pdf).catch($=>{throw $}):a,isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>buffer$1.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,$=getByteString(s),_=new Uint8Array($.length);for(let _e=0;_e<$.length;_e+=1)_[_e]=$.charCodeAt(_e);return _},getFontNamesInSchemas=a=>uniq(a.map(s=>Object.values(s).map($=>$.fontName??"")).reduce((s,$)=>s.concat($),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:$}}=a,_e=Object.values(s).reduce((at,ot)=>ot.fallback?at+1:at,0);if(_e===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
42
+ */(function(a){const s=base64Js,$=ieee754,_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=at,a.SlowBuffer=gt,a.INSPECT_MAX_BYTES=50;const _e=2147483647;a.kMaxLength=_e,at.TYPED_ARRAY_SUPPORT=tt(),!at.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function tt(){try{const Xt=new Uint8Array(1),Gt={foo:function(){return 42}};return Object.setPrototypeOf(Gt,Uint8Array.prototype),Object.setPrototypeOf(Xt,Gt),Xt.foo()===42}catch{return!1}}Object.defineProperty(at.prototype,"parent",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.buffer}}),Object.defineProperty(at.prototype,"offset",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.byteOffset}});function nt(Xt){if(Xt>_e)throw new RangeError('The value "'+Xt+'" is invalid for option "size"');const Gt=new Uint8Array(Xt);return Object.setPrototypeOf(Gt,at.prototype),Gt}function at(Xt,Gt,Wt){if(typeof Xt=="number"){if(typeof Gt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lt(Xt)}return ot(Xt,Gt,Wt)}at.poolSize=8192;function ot(Xt,Gt,Wt){if(typeof Xt=="string")return et(Xt,Gt);if(ArrayBuffer.isView(Xt))return ut(Xt);if(Xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt);if(tr(Xt,ArrayBuffer)||Xt&&tr(Xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tr(Xt,SharedArrayBuffer)||Xt&&tr(Xt.buffer,SharedArrayBuffer)))return ft(Xt,Gt,Wt);if(typeof Xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const er=Xt.valueOf&&Xt.valueOf();if(er!=null&&er!==Xt)return at.from(er,Gt,Wt);const lr=ht(Xt);if(lr)return lr;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Xt[Symbol.toPrimitive]=="function")return at.from(Xt[Symbol.toPrimitive]("string"),Gt,Wt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt)}at.from=function(Xt,Gt,Wt){return ot(Xt,Gt,Wt)},Object.setPrototypeOf(at.prototype,Uint8Array.prototype),Object.setPrototypeOf(at,Uint8Array);function rt(Xt){if(typeof Xt!="number")throw new TypeError('"size" argument must be of type number');if(Xt<0)throw new RangeError('The value "'+Xt+'" is invalid for option "size"')}function st(Xt,Gt,Wt){return rt(Xt),Xt<=0?nt(Xt):Gt!==void 0?typeof Wt=="string"?nt(Xt).fill(Gt,Wt):nt(Xt).fill(Gt):nt(Xt)}at.alloc=function(Xt,Gt,Wt){return st(Xt,Gt,Wt)};function lt(Xt){return rt(Xt),nt(Xt<0?0:dt(Xt)|0)}at.allocUnsafe=function(Xt){return lt(Xt)},at.allocUnsafeSlow=function(Xt){return lt(Xt)};function et(Xt,Gt){if((typeof Gt!="string"||Gt==="")&&(Gt="utf8"),!at.isEncoding(Gt))throw new TypeError("Unknown encoding: "+Gt);const Wt=pt(Xt,Gt)|0;let er=nt(Wt);const lr=er.write(Xt,Gt);return lr!==Wt&&(er=er.slice(0,lr)),er}function it(Xt){const Gt=Xt.length<0?0:dt(Xt.length)|0,Wt=nt(Gt);for(let er=0;er<Gt;er+=1)Wt[er]=Xt[er]&255;return Wt}function ut(Xt){if(tr(Xt,Uint8Array)){const Gt=new Uint8Array(Xt);return ft(Gt.buffer,Gt.byteOffset,Gt.byteLength)}return it(Xt)}function ft(Xt,Gt,Wt){if(Gt<0||Xt.byteLength<Gt)throw new RangeError('"offset" is outside of buffer bounds');if(Xt.byteLength<Gt+(Wt||0))throw new RangeError('"length" is outside of buffer bounds');let er;return Gt===void 0&&Wt===void 0?er=new Uint8Array(Xt):Wt===void 0?er=new Uint8Array(Xt,Gt):er=new Uint8Array(Xt,Gt,Wt),Object.setPrototypeOf(er,at.prototype),er}function ht(Xt){if(at.isBuffer(Xt)){const Gt=dt(Xt.length)|0,Wt=nt(Gt);return Wt.length===0||Xt.copy(Wt,0,0,Gt),Wt}if(Xt.length!==void 0)return typeof Xt.length!="number"||ir(Xt.length)?nt(0):it(Xt);if(Xt.type==="Buffer"&&Array.isArray(Xt.data))return it(Xt.data)}function dt(Xt){if(Xt>=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return Xt|0}function gt(Xt){return+Xt!=Xt&&(Xt=0),at.alloc(+Xt)}at.isBuffer=function(Gt){return Gt!=null&&Gt._isBuffer===!0&&Gt!==at.prototype},at.compare=function(Gt,Wt){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),tr(Wt,Uint8Array)&&(Wt=at.from(Wt,Wt.offset,Wt.byteLength)),!at.isBuffer(Gt)||!at.isBuffer(Wt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Gt===Wt)return 0;let er=Gt.length,lr=Wt.length;for(let ur=0,pr=Math.min(er,lr);ur<pr;++ur)if(Gt[ur]!==Wt[ur]){er=Gt[ur],lr=Wt[ur];break}return er<lr?-1:lr<er?1:0},at.isEncoding=function(Gt){switch(String(Gt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},at.concat=function(Gt,Wt){if(!Array.isArray(Gt))throw new TypeError('"list" argument must be an Array of Buffers');if(Gt.length===0)return at.alloc(0);let er;if(Wt===void 0)for(Wt=0,er=0;er<Gt.length;++er)Wt+=Gt[er].length;const lr=at.allocUnsafe(Wt);let ur=0;for(er=0;er<Gt.length;++er){let pr=Gt[er];if(tr(pr,Uint8Array))ur+pr.length>lr.length?(at.isBuffer(pr)||(pr=at.from(pr)),pr.copy(lr,ur)):Uint8Array.prototype.set.call(lr,pr,ur);else if(at.isBuffer(pr))pr.copy(lr,ur);else throw new TypeError('"list" argument must be an Array of Buffers');ur+=pr.length}return lr};function pt(Xt,Gt){if(at.isBuffer(Xt))return Xt.length;if(ArrayBuffer.isView(Xt)||tr(Xt,ArrayBuffer))return Xt.byteLength;if(typeof Xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Xt);const Wt=Xt.length,er=arguments.length>2&&arguments[2]===!0;if(!er&&Wt===0)return 0;let lr=!1;for(;;)switch(Gt){case"ascii":case"latin1":case"binary":return Wt;case"utf8":case"utf-8":return Jt(Xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt*2;case"hex":return Wt>>>1;case"base64":return Kt(Xt).length;default:if(lr)return er?-1:Jt(Xt).length;Gt=(""+Gt).toLowerCase(),lr=!0}}at.byteLength=pt;function mt(Xt,Gt,Wt){let er=!1;if((Gt===void 0||Gt<0)&&(Gt=0),Gt>this.length||((Wt===void 0||Wt>this.length)&&(Wt=this.length),Wt<=0)||(Wt>>>=0,Gt>>>=0,Wt<=Gt))return"";for(Xt||(Xt="utf8");;)switch(Xt){case"hex":return Rt(this,Gt,Wt);case"utf8":case"utf-8":return Tt(this,Gt,Wt);case"ascii":return It(this,Gt,Wt);case"latin1":case"binary":return yt(this,Gt,Wt);case"base64":return Ot(this,Gt,Wt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,Gt,Wt);default:if(er)throw new TypeError("Unknown encoding: "+Xt);Xt=(Xt+"").toLowerCase(),er=!0}}at.prototype._isBuffer=!0;function ct(Xt,Gt,Wt){const er=Xt[Gt];Xt[Gt]=Xt[Wt],Xt[Wt]=er}at.prototype.swap16=function(){const Gt=this.length;if(Gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Wt=0;Wt<Gt;Wt+=2)ct(this,Wt,Wt+1);return this},at.prototype.swap32=function(){const Gt=this.length;if(Gt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Wt=0;Wt<Gt;Wt+=4)ct(this,Wt,Wt+3),ct(this,Wt+1,Wt+2);return this},at.prototype.swap64=function(){const Gt=this.length;if(Gt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Wt=0;Wt<Gt;Wt+=8)ct(this,Wt,Wt+7),ct(this,Wt+1,Wt+6),ct(this,Wt+2,Wt+5),ct(this,Wt+3,Wt+4);return this},at.prototype.toString=function(){const Gt=this.length;return Gt===0?"":arguments.length===0?Tt(this,0,Gt):mt.apply(this,arguments)},at.prototype.toLocaleString=at.prototype.toString,at.prototype.equals=function(Gt){if(!at.isBuffer(Gt))throw new TypeError("Argument must be a Buffer");return this===Gt?!0:at.compare(this,Gt)===0},at.prototype.inspect=function(){let Gt="";const Wt=a.INSPECT_MAX_BYTES;return Gt=this.toString("hex",0,Wt).replace(/(.{2})/g,"$1 ").trim(),this.length>Wt&&(Gt+=" ... "),"<Buffer "+Gt+">"},_&&(at.prototype[_]=at.prototype.inspect),at.prototype.compare=function(Gt,Wt,er,lr,ur){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),!at.isBuffer(Gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Gt);if(Wt===void 0&&(Wt=0),er===void 0&&(er=Gt?Gt.length:0),lr===void 0&&(lr=0),ur===void 0&&(ur=this.length),Wt<0||er>Gt.length||lr<0||ur>this.length)throw new RangeError("out of range index");if(lr>=ur&&Wt>=er)return 0;if(lr>=ur)return-1;if(Wt>=er)return 1;if(Wt>>>=0,er>>>=0,lr>>>=0,ur>>>=0,this===Gt)return 0;let pr=ur-lr,yr=er-Wt;const Er=Math.min(pr,yr),br=this.slice(lr,ur),gr=Gt.slice(Wt,er);for(let Ar=0;Ar<Er;++Ar)if(br[Ar]!==gr[Ar]){pr=br[Ar],yr=gr[Ar];break}return pr<yr?-1:yr<pr?1:0};function vt(Xt,Gt,Wt,er,lr){if(Xt.length===0)return-1;if(typeof Wt=="string"?(er=Wt,Wt=0):Wt>2147483647?Wt=2147483647:Wt<-2147483648&&(Wt=-2147483648),Wt=+Wt,ir(Wt)&&(Wt=lr?0:Xt.length-1),Wt<0&&(Wt=Xt.length+Wt),Wt>=Xt.length){if(lr)return-1;Wt=Xt.length-1}else if(Wt<0)if(lr)Wt=0;else return-1;if(typeof Gt=="string"&&(Gt=at.from(Gt,er)),at.isBuffer(Gt))return Gt.length===0?-1:At(Xt,Gt,Wt,er,lr);if(typeof Gt=="number")return Gt=Gt&255,typeof Uint8Array.prototype.indexOf=="function"?lr?Uint8Array.prototype.indexOf.call(Xt,Gt,Wt):Uint8Array.prototype.lastIndexOf.call(Xt,Gt,Wt):At(Xt,[Gt],Wt,er,lr);throw new TypeError("val must be string, number or Buffer")}function At(Xt,Gt,Wt,er,lr){let ur=1,pr=Xt.length,yr=Gt.length;if(er!==void 0&&(er=String(er).toLowerCase(),er==="ucs2"||er==="ucs-2"||er==="utf16le"||er==="utf-16le")){if(Xt.length<2||Gt.length<2)return-1;ur=2,pr/=2,yr/=2,Wt/=2}function Er(gr,Ar){return ur===1?gr[Ar]:gr.readUInt16BE(Ar*ur)}let br;if(lr){let gr=-1;for(br=Wt;br<pr;br++)if(Er(Xt,br)===Er(Gt,gr===-1?0:br-gr)){if(gr===-1&&(gr=br),br-gr+1===yr)return gr*ur}else gr!==-1&&(br-=br-gr),gr=-1}else for(Wt+yr>pr&&(Wt=pr-yr),br=Wt;br>=0;br--){let gr=!0;for(let Ar=0;Ar<yr;Ar++)if(Er(Xt,br+Ar)!==Er(Gt,Ar)){gr=!1;break}if(gr)return br}return-1}at.prototype.includes=function(Gt,Wt,er){return this.indexOf(Gt,Wt,er)!==-1},at.prototype.indexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!0)},at.prototype.lastIndexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!1)};function xt(Xt,Gt,Wt,er){Wt=Number(Wt)||0;const lr=Xt.length-Wt;er?(er=Number(er),er>lr&&(er=lr)):er=lr;const ur=Gt.length;er>ur/2&&(er=ur/2);let pr;for(pr=0;pr<er;++pr){const yr=parseInt(Gt.substr(pr*2,2),16);if(ir(yr))return pr;Xt[Wt+pr]=yr}return pr}function bt(Xt,Gt,Wt,er){return nr(Jt(Gt,Xt.length-Wt),Xt,Wt,er)}function Et(Xt,Gt,Wt,er){return nr(rr(Gt),Xt,Wt,er)}function St(Xt,Gt,Wt,er){return nr(Kt(Gt),Xt,Wt,er)}function Bt(Xt,Gt,Wt,er){return nr(Yt(Gt,Xt.length-Wt),Xt,Wt,er)}at.prototype.write=function(Gt,Wt,er,lr){if(Wt===void 0)lr="utf8",er=this.length,Wt=0;else if(er===void 0&&typeof Wt=="string")lr=Wt,er=this.length,Wt=0;else if(isFinite(Wt))Wt=Wt>>>0,isFinite(er)?(er=er>>>0,lr===void 0&&(lr="utf8")):(lr=er,er=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ur=this.length-Wt;if((er===void 0||er>ur)&&(er=ur),Gt.length>0&&(er<0||Wt<0)||Wt>this.length)throw new RangeError("Attempt to write outside buffer bounds");lr||(lr="utf8");let pr=!1;for(;;)switch(lr){case"hex":return xt(this,Gt,Wt,er);case"utf8":case"utf-8":return bt(this,Gt,Wt,er);case"ascii":case"latin1":case"binary":return Et(this,Gt,Wt,er);case"base64":return St(this,Gt,Wt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,Gt,Wt,er);default:if(pr)throw new TypeError("Unknown encoding: "+lr);lr=(""+lr).toLowerCase(),pr=!0}},at.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ot(Xt,Gt,Wt){return Gt===0&&Wt===Xt.length?s.fromByteArray(Xt):s.fromByteArray(Xt.slice(Gt,Wt))}function Tt(Xt,Gt,Wt){Wt=Math.min(Xt.length,Wt);const er=[];let lr=Gt;for(;lr<Wt;){const ur=Xt[lr];let pr=null,yr=ur>239?4:ur>223?3:ur>191?2:1;if(lr+yr<=Wt){let Er,br,gr,Ar;switch(yr){case 1:ur<128&&(pr=ur);break;case 2:Er=Xt[lr+1],(Er&192)===128&&(Ar=(ur&31)<<6|Er&63,Ar>127&&(pr=Ar));break;case 3:Er=Xt[lr+1],br=Xt[lr+2],(Er&192)===128&&(br&192)===128&&(Ar=(ur&15)<<12|(Er&63)<<6|br&63,Ar>2047&&(Ar<55296||Ar>57343)&&(pr=Ar));break;case 4:Er=Xt[lr+1],br=Xt[lr+2],gr=Xt[lr+3],(Er&192)===128&&(br&192)===128&&(gr&192)===128&&(Ar=(ur&15)<<18|(Er&63)<<12|(br&63)<<6|gr&63,Ar>65535&&Ar<1114112&&(pr=Ar))}}pr===null?(pr=65533,yr=1):pr>65535&&(pr-=65536,er.push(pr>>>10&1023|55296),pr=56320|pr&1023),er.push(pr),lr+=yr}return Ct(er)}const wt=4096;function Ct(Xt){const Gt=Xt.length;if(Gt<=wt)return String.fromCharCode.apply(String,Xt);let Wt="",er=0;for(;er<Gt;)Wt+=String.fromCharCode.apply(String,Xt.slice(er,er+=wt));return Wt}function It(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]&127);return er}function yt(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]);return er}function Rt(Xt,Gt,Wt){const er=Xt.length;(!Gt||Gt<0)&&(Gt=0),(!Wt||Wt<0||Wt>er)&&(Wt=er);let lr="";for(let ur=Gt;ur<Wt;++ur)lr+=sr[Xt[ur]];return lr}function kt(Xt,Gt,Wt){const er=Xt.slice(Gt,Wt);let lr="";for(let ur=0;ur<er.length-1;ur+=2)lr+=String.fromCharCode(er[ur]+er[ur+1]*256);return lr}at.prototype.slice=function(Gt,Wt){const er=this.length;Gt=~~Gt,Wt=Wt===void 0?er:~~Wt,Gt<0?(Gt+=er,Gt<0&&(Gt=0)):Gt>er&&(Gt=er),Wt<0?(Wt+=er,Wt<0&&(Wt=0)):Wt>er&&(Wt=er),Wt<Gt&&(Wt=Gt);const lr=this.subarray(Gt,Wt);return Object.setPrototypeOf(lr,at.prototype),lr};function jt(Xt,Gt,Wt){if(Xt%1!==0||Xt<0)throw new RangeError("offset is not uint");if(Xt+Gt>Wt)throw new RangeError("Trying to access beyond buffer length")}at.prototype.readUintLE=at.prototype.readUIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return lr},at.prototype.readUintBE=at.prototype.readUIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt+--Wt],ur=1;for(;Wt>0&&(ur*=256);)lr+=this[Gt+--Wt]*ur;return lr},at.prototype.readUint8=at.prototype.readUInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]},at.prototype.readUint16LE=at.prototype.readUInt16LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]|this[Gt+1]<<8},at.prototype.readUint16BE=at.prototype.readUInt16BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]<<8|this[Gt+1]},at.prototype.readUint32LE=at.prototype.readUInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),(this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16)+this[Gt+3]*16777216},at.prototype.readUint32BE=at.prototype.readUInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]*16777216+(this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3])},at.prototype.readBigUInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24,ur=this[++Gt]+this[++Gt]*2**8+this[++Gt]*2**16+er*2**24;return BigInt(lr)+(BigInt(ur)<<BigInt(32))}),at.prototype.readBigUInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt*2**24+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt],ur=this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er;return(BigInt(lr)<<BigInt(32))+BigInt(ur)}),at.prototype.readIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return ur*=128,lr>=ur&&(lr-=Math.pow(2,8*Wt)),lr},at.prototype.readIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=Wt,ur=1,pr=this[Gt+--lr];for(;lr>0&&(ur*=256);)pr+=this[Gt+--lr]*ur;return ur*=128,pr>=ur&&(pr-=Math.pow(2,8*Wt)),pr},at.prototype.readInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]&128?(255-this[Gt]+1)*-1:this[Gt]},at.prototype.readInt16LE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt]|this[Gt+1]<<8;return er&32768?er|4294901760:er},at.prototype.readInt16BE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt+1]|this[Gt]<<8;return er&32768?er|4294901760:er},at.prototype.readInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16|this[Gt+3]<<24},at.prototype.readInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]<<24|this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3]},at.prototype.readBigInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=this[Gt+4]+this[Gt+5]*2**8+this[Gt+6]*2**16+(er<<24);return(BigInt(lr)<<BigInt(32))+BigInt(Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24)}),at.prototype.readBigInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=(Wt<<24)+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt];return(BigInt(lr)<<BigInt(32))+BigInt(this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er)}),at.prototype.readFloatLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!0,23,4)},at.prototype.readFloatBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!1,23,4)},at.prototype.readDoubleLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!0,52,8)},at.prototype.readDoubleBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!1,52,8)};function Ht(Xt,Gt,Wt,er,lr,ur){if(!at.isBuffer(Xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Gt>lr||Gt<ur)throw new RangeError('"value" argument is out of bounds');if(Wt+er>Xt.length)throw new RangeError("Index out of range")}at.prototype.writeUintLE=at.prototype.writeUIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=1,pr=0;for(this[Wt]=Gt&255;++pr<er&&(ur*=256);)this[Wt+pr]=Gt/ur&255;return Wt+er},at.prototype.writeUintBE=at.prototype.writeUIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=er-1,pr=1;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)this[Wt+ur]=Gt/pr&255;return Wt+er},at.prototype.writeUint8=at.prototype.writeUInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,255,0),this[Wt]=Gt&255,Wt+1},at.prototype.writeUint16LE=at.prototype.writeUInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeUint16BE=at.prototype.writeUInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeUint32LE=at.prototype.writeUInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt+3]=Gt>>>24,this[Wt+2]=Gt>>>16,this[Wt+1]=Gt>>>8,this[Wt]=Gt&255,Wt+4},at.prototype.writeUint32BE=at.prototype.writeUInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4};function Ft(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,Wt}function _t(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt+7]=ur,ur=ur>>8,Xt[Wt+6]=ur,ur=ur>>8,Xt[Wt+5]=ur,ur=ur>>8,Xt[Wt+4]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt+3]=pr,pr=pr>>8,Xt[Wt+2]=pr,pr=pr>>8,Xt[Wt+1]=pr,pr=pr>>8,Xt[Wt]=pr,Wt+8}at.prototype.writeBigUInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeBigUInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=0,pr=1,yr=0;for(this[Wt]=Gt&255;++ur<er&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur-1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=er-1,pr=1,yr=0;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur+1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,127,-128),Gt<0&&(Gt=255+Gt+1),this[Wt]=Gt&255,Wt+1},at.prototype.writeInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,this[Wt+2]=Gt>>>16,this[Wt+3]=Gt>>>24,Wt+4},at.prototype.writeInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),Gt<0&&(Gt=4294967295+Gt+1),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4},at.prototype.writeBigInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),at.prototype.writeBigInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Nt(Xt,Gt,Wt,er,lr,ur){if(Wt+er>Xt.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("Index out of range")}function Mt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,4),$.write(Xt,Gt,Wt,er,23,4),Wt+4}at.prototype.writeFloatLE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!0,er)},at.prototype.writeFloatBE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!1,er)};function Lt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,8),$.write(Xt,Gt,Wt,er,52,8),Wt+8}at.prototype.writeDoubleLE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!0,er)},at.prototype.writeDoubleBE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!1,er)},at.prototype.copy=function(Gt,Wt,er,lr){if(!at.isBuffer(Gt))throw new TypeError("argument should be a Buffer");if(er||(er=0),!lr&&lr!==0&&(lr=this.length),Wt>=Gt.length&&(Wt=Gt.length),Wt||(Wt=0),lr>0&&lr<er&&(lr=er),lr===er||Gt.length===0||this.length===0)return 0;if(Wt<0)throw new RangeError("targetStart out of bounds");if(er<0||er>=this.length)throw new RangeError("Index out of range");if(lr<0)throw new RangeError("sourceEnd out of bounds");lr>this.length&&(lr=this.length),Gt.length-Wt<lr-er&&(lr=Gt.length-Wt+er);const ur=lr-er;return this===Gt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Wt,er,lr):Uint8Array.prototype.set.call(Gt,this.subarray(er,lr),Wt),ur},at.prototype.fill=function(Gt,Wt,er,lr){if(typeof Gt=="string"){if(typeof Wt=="string"?(lr=Wt,Wt=0,er=this.length):typeof er=="string"&&(lr=er,er=this.length),lr!==void 0&&typeof lr!="string")throw new TypeError("encoding must be a string");if(typeof lr=="string"&&!at.isEncoding(lr))throw new TypeError("Unknown encoding: "+lr);if(Gt.length===1){const pr=Gt.charCodeAt(0);(lr==="utf8"&&pr<128||lr==="latin1")&&(Gt=pr)}}else typeof Gt=="number"?Gt=Gt&255:typeof Gt=="boolean"&&(Gt=Number(Gt));if(Wt<0||this.length<Wt||this.length<er)throw new RangeError("Out of range index");if(er<=Wt)return this;Wt=Wt>>>0,er=er===void 0?this.length:er>>>0,Gt||(Gt=0);let ur;if(typeof Gt=="number")for(ur=Wt;ur<er;++ur)this[ur]=Gt;else{const pr=at.isBuffer(Gt)?Gt:at.from(Gt,lr),yr=pr.length;if(yr===0)throw new TypeError('The value "'+Gt+'" is invalid for argument "value"');for(ur=0;ur<er-Wt;++ur)this[ur+Wt]=pr[ur%yr]}return this};const $t={};function Pt(Xt,Gt,Wt){$t[Xt]=class extends Wt{constructor(){super(),Object.defineProperty(this,"message",{value:Gt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Xt}]`,this.stack,delete this.name}get code(){return Xt}set code(lr){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:lr,writable:!0})}toString(){return`${this.name} [${Xt}]: ${this.message}`}}}Pt("ERR_BUFFER_OUT_OF_BOUNDS",function(Xt){return Xt?`${Xt} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pt("ERR_INVALID_ARG_TYPE",function(Xt,Gt){return`The "${Xt}" argument must be of type number. Received type ${typeof Gt}`},TypeError),Pt("ERR_OUT_OF_RANGE",function(Xt,Gt,Wt){let er=`The value of "${Xt}" is out of range.`,lr=Wt;return Number.isInteger(Wt)&&Math.abs(Wt)>2**32?lr=Dt(String(Wt)):typeof Wt=="bigint"&&(lr=String(Wt),(Wt>BigInt(2)**BigInt(32)||Wt<-(BigInt(2)**BigInt(32)))&&(lr=Dt(lr)),lr+="n"),er+=` It must be ${Gt}. Received ${lr}`,er},RangeError);function Dt(Xt){let Gt="",Wt=Xt.length;const er=Xt[0]==="-"?1:0;for(;Wt>=er+4;Wt-=3)Gt=`_${Xt.slice(Wt-3,Wt)}${Gt}`;return`${Xt.slice(0,Wt)}${Gt}`}function Ut(Xt,Gt,Wt){Qt(Gt,"offset"),(Xt[Gt]===void 0||Xt[Gt+Wt]===void 0)&&qt(Gt,Xt.length-(Wt+1))}function Vt(Xt,Gt,Wt,er,lr,ur){if(Xt>Wt||Xt<Gt){const pr=typeof Gt=="bigint"?"n":"";let yr;throw ur>3?Gt===0||Gt===BigInt(0)?yr=`>= 0${pr} and < 2${pr} ** ${(ur+1)*8}${pr}`:yr=`>= -(2${pr} ** ${(ur+1)*8-1}${pr}) and < 2 ** ${(ur+1)*8-1}${pr}`:yr=`>= ${Gt}${pr} and <= ${Wt}${pr}`,new $t.ERR_OUT_OF_RANGE("value",yr,Xt)}Ut(er,lr,ur)}function Qt(Xt,Gt){if(typeof Xt!="number")throw new $t.ERR_INVALID_ARG_TYPE(Gt,"number",Xt)}function qt(Xt,Gt,Wt){throw Math.floor(Xt)!==Xt?(Qt(Xt,Wt),new $t.ERR_OUT_OF_RANGE(Wt||"offset","an integer",Xt)):Gt<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE(Wt||"offset",`>= ${Wt?1:0} and <= ${Gt}`,Xt)}const Zt=/[^+/0-9A-Za-z-_]/g;function ar(Xt){if(Xt=Xt.split("=")[0],Xt=Xt.trim().replace(Zt,""),Xt.length<2)return"";for(;Xt.length%4!==0;)Xt=Xt+"=";return Xt}function Jt(Xt,Gt){Gt=Gt||1/0;let Wt;const er=Xt.length;let lr=null;const ur=[];for(let pr=0;pr<er;++pr){if(Wt=Xt.charCodeAt(pr),Wt>55295&&Wt<57344){if(!lr){if(Wt>56319){(Gt-=3)>-1&&ur.push(239,191,189);continue}else if(pr+1===er){(Gt-=3)>-1&&ur.push(239,191,189);continue}lr=Wt;continue}if(Wt<56320){(Gt-=3)>-1&&ur.push(239,191,189),lr=Wt;continue}Wt=(lr-55296<<10|Wt-56320)+65536}else lr&&(Gt-=3)>-1&&ur.push(239,191,189);if(lr=null,Wt<128){if((Gt-=1)<0)break;ur.push(Wt)}else if(Wt<2048){if((Gt-=2)<0)break;ur.push(Wt>>6|192,Wt&63|128)}else if(Wt<65536){if((Gt-=3)<0)break;ur.push(Wt>>12|224,Wt>>6&63|128,Wt&63|128)}else if(Wt<1114112){if((Gt-=4)<0)break;ur.push(Wt>>18|240,Wt>>12&63|128,Wt>>6&63|128,Wt&63|128)}else throw new Error("Invalid code point")}return ur}function rr(Xt){const Gt=[];for(let Wt=0;Wt<Xt.length;++Wt)Gt.push(Xt.charCodeAt(Wt)&255);return Gt}function Yt(Xt,Gt){let Wt,er,lr;const ur=[];for(let pr=0;pr<Xt.length&&!((Gt-=2)<0);++pr)Wt=Xt.charCodeAt(pr),er=Wt>>8,lr=Wt%256,ur.push(lr),ur.push(er);return ur}function Kt(Xt){return s.toByteArray(ar(Xt))}function nr(Xt,Gt,Wt,er){let lr;for(lr=0;lr<er&&!(lr+Wt>=Gt.length||lr>=Xt.length);++lr)Gt[lr+Wt]=Xt[lr];return lr}function tr(Xt,Gt){return Xt instanceof Gt||Xt!=null&&Xt.constructor!=null&&Xt.constructor.name!=null&&Xt.constructor.name===Gt.name}function ir(Xt){return Xt!==Xt}const sr=function(){const Xt="0123456789abcdef",Gt=new Array(256);for(let Wt=0;Wt<16;++Wt){const er=Wt*16;for(let lr=0;lr<16;++lr)Gt[er+lr]=Xt[Wt]+Xt[lr]}return Gt}();function cr(Xt){return typeof BigInt>"u"?or:Xt}function or(){throw new Error("BigInt not supported")}})(buffer$1);const langs=["en","zh","ja","ko","ar","th","pl","it","de","es","fr"],Lang=z.enum(langs);z.object({cancel:z.string(),field:z.string(),fieldName:z.string(),align:z.string(),width:z.string(),opacity:z.string(),height:z.string(),rotate:z.string(),edit:z.string(),plsInputName:z.string(),fieldMustUniq:z.string(),notUniq:z.string(),noKeyName:z.string(),fieldsList:z.string(),editField:z.string(),type:z.string(),errorOccurred:z.string(),errorBulkUpdateFieldName:z.string(),commitBulkUpdateFieldName:z.string(),bulkUpdateFieldName:z.string(),addPageAfter:z.string(),removePage:z.string(),removePageConfirm:z.string(),hexColorPrompt:z.string(),"schemas.color":z.string(),"schemas.borderWidth":z.string(),"schemas.borderColor":z.string(),"schemas.backgroundColor":z.string(),"schemas.textColor":z.string(),"schemas.bgColor":z.string(),"schemas.horizontal":z.string(),"schemas.vertical":z.string(),"schemas.left":z.string(),"schemas.center":z.string(),"schemas.right":z.string(),"schemas.top":z.string(),"schemas.middle":z.string(),"schemas.bottom":z.string(),"schemas.padding":z.string(),"schemas.text.fontName":z.string(),"schemas.text.size":z.string(),"schemas.text.spacing":z.string(),"schemas.text.textAlign":z.string(),"schemas.text.verticalAlign":z.string(),"schemas.text.lineHeight":z.string(),"schemas.text.min":z.string(),"schemas.text.max":z.string(),"schemas.text.fit":z.string(),"schemas.text.dynamicFontSize":z.string(),"schemas.barcodes.barColor":z.string(),"schemas.barcodes.includetext":z.string(),"schemas.table.alternateBackgroundColor":z.string(),"schemas.table.tableStyle":z.string(),"schemas.table.headStyle":z.string(),"schemas.table.bodyStyle":z.string(),"schemas.table.columnStyle":z.string()}),z.enum(["viewer","form","designer"]);const ColorType=z.enum(["rgb","cmyk"]).optional();z.object({height:z.number(),width:z.number()});const Schema$1=z.object({type:z.string(),icon:z.string().optional(),content:z.string().optional(),position:z.object({x:z.number(),y:z.number()}),width:z.number(),height:z.number(),rotate:z.number().optional(),opacity:z.number().optional(),readOnly:z.boolean().optional()}).passthrough(),SchemaForUIAdditionalInfo=z.object({id:z.string(),key:z.string()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=z.any().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=z.any().refine(a=>a instanceof Uint8Array),BlankPdf=z.object({width:z.number(),height:z.number(),padding:z.tuple([z.number(),z.number(),z.number(),z.number()])}),BasePdf=z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema,BlankPdf]),Template=z.object({schemas:z.array(z.record(Schema$1)),basePdf:BasePdf,pdfmeVersion:z.string().optional()}).passthrough(),Inputs=z.array(z.record(z.any())).min(1),Font=z.record(z.object({data:z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema]),fallback:z.boolean().optional(),subset:z.boolean().optional()})),CommonOptions=z.object({font:Font.optional()}).passthrough(),CommonProps=z.object({template:Template,options:CommonOptions.optional(),plugins:z.record(z.object({ui:z.any(),pdf:z.any(),propPanel:z.any()})).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:z.string().optional(),creationDate:z.date().optional(),creator:z.string().optional(),keywords:z.array(z.string()).optional(),language:z.string().optional(),modificationDate:z.date().optional(),producer:z.string().optional(),subject:z.string().optional(),title:z.string().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:z.record(z.string(),z.string()).optional(),theme:z.record(z.string(),z.unknown()).optional()}),HTMLElementSchema=z.any().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const s="",$=Object.entries(a).reduce((_,_e)=>{const[tt,nt]=_e;return!_&&nt.fallback?tt:_},s);if($===s)throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return $},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>{const s=.26458333333333;return parseFloat(String(a))*s},blob2Base64Pdf=a=>new Promise((s,$)=>{const _=new FileReader;_.onloadend=()=>{_.result.startsWith("data:application/pdf;")?s(_.result):$(Error("[@pdfme/common] template.basePdf must be pdf data."))},_.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),getB64BasePdf=a=>typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"?fetch(a).then($=>$.blob()).then(blob2Base64Pdf).catch($=>{throw $}):a,isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>buffer$1.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,$=getByteString(s),_=new Uint8Array($.length);for(let _e=0;_e<$.length;_e+=1)_[_e]=$.charCodeAt(_e);return _},getFontNamesInSchemas=a=>uniq(a.map(s=>Object.values(s).map($=>$.fontName??"")).reduce((s,$)=>s.concat($),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:$}}=a,_e=Object.values(s).reduce((at,ot)=>ot.fallback?at+1:at,0);if(_e===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
43
43
  Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);if(_e>1)throw Error(`[@pdfme/common] ${_e} fallback flags found in font. true fallback flag must be only one.
44
44
  Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);const tt=getFontNamesInSchemas($),nt=Object.keys(s);if(tt.some(at=>!nt.includes(at)))throw Error(`[@pdfme/common] ${tt.filter(at=>!nt.includes(at)).join()} of template.schemas is not found in font.
45
45
  Check this document: https://pdfme.com/docs/custom-fonts`)},checkPlugins=a=>{const{plugins:s,template:{schemas:$}}=a,_=uniq($.map(tt=>Object.values(tt).map(nt=>nt.type)).flat()),_e=Object.values(s).map(tt=>tt==null?void 0:tt.propPanel.defaultSchema.type);if(_.some(tt=>!_e.includes(tt)))throw Error(`[@pdfme/common] ${_.filter(tt=>!_e.includes(tt)).join()} of template.schemas is not found in plugins.`)},checkProps=(a,s)=>{try{s.parse(a)}catch($){if($ instanceof z.ZodError){const _e=$.issues.map(tt=>`ERROR POSITION: ${tt.path.join(".")}
@@ -586,7 +586,7 @@ html body {
586
586
  ${$}-eye,
587
587
  ${$}-download,
588
588
  ${$}-delete
589
- `]:{zIndex:10,width:_,margin:`0 ${unit$1(a.marginXXS)}`,fontSize:_,cursor:"pointer",transition:`all ${a.motionDurationSlow}`,color:_e,"&:hover":{color:_e},svg:{verticalAlign:"baseline"}}},[`${at}-thumbnail, ${at}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${at}-name`]:{display:"none",textAlign:"center"},[`${at}-file + ${at}-name`]:{position:"absolute",bottom:a.margin,display:"block",width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`},[`${at}-uploading`]:{[`&${at}`]:{backgroundColor:a.colorFillAlter},[`&::before, ${$}-eye, ${$}-download, ${$}-delete`]:{display:"none"}},[`${at}-progress`]:{bottom:a.marginXL,width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${s}-wrapper${s}-picture-circle-wrapper`]:{[`${s}${s}-select`]:{borderRadius:"50%"}}}},genRtlStyle=a=>{const{componentCls:s}=a;return{[`${s}-rtl`]:{direction:"rtl"}}},genRtlStyle$1=genRtlStyle,genBaseStyle=a=>{const{componentCls:s,colorTextDisabled:$}=a;return{[`${s}-wrapper`]:Object.assign(Object.assign({},resetComponent(a)),{[s]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${s}-select`]:{display:"inline-block"},[`${s}-disabled`]:{color:$,cursor:"not-allowed"}})}},prepareComponentToken=a=>({actionsColor:a.colorTextDescription}),useStyle=genStyleHooks("Upload",a=>{const{fontSizeHeading3:s,fontHeight:$,lineWidth:_,controlHeightLG:_e,calc:tt}=a,nt=merge(a,{uploadThumbnailSize:tt(s).mul(2).equal(),uploadProgressOffset:tt(tt($).div(2)).add(_).equal(),uploadPicCardSize:tt(_e).mul(2.55).equal()});return[genBaseStyle(nt),genDraggerStyle$1(nt),genPictureStyle(nt),genPictureCardStyle(nt),genListStyle$1(nt),genMotionStyle$1(nt),genRtlStyle$1(nt),genCollapseMotion$1(nt)]},prepareComponentToken);var FileTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:$}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:s}}]}},name:"file",theme:"twotone"};const FileTwoToneSvg=FileTwoTone$2;var FileTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:FileTwoToneSvg}))};const FileTwoTone$1=reactExports.forwardRef(FileTwoTone);var PaperClipOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const PaperClipOutlinedSvg=PaperClipOutlined$2;var PaperClipOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PaperClipOutlinedSvg}))};const PaperClipOutlined$1=reactExports.forwardRef(PaperClipOutlined);var PictureTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:s}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:$}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:$}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:$}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:s}}]}},name:"picture",theme:"twotone"};const PictureTwoToneSvg=PictureTwoTone$2;var PictureTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PictureTwoToneSvg}))};const PictureTwoTone$1=reactExports.forwardRef(PictureTwoTone);function file2Obj(a){return Object.assign(Object.assign({},a),{lastModified:a.lastModified,lastModifiedDate:a.lastModifiedDate,name:a.name,size:a.size,type:a.type,uid:a.uid,percent:0,originFileObj:a})}function updateFileList(a,s){const $=_toConsumableArray$d(s),_=$.findIndex(_e=>{let{uid:tt}=_e;return tt===a.uid});return _===-1?$.push(a):$[_]=a,$}function getFileItem(a,s){const $=a.uid!==void 0?"uid":"name";return s.filter(_=>_[$]===a[$])[0]}function removeFileItem(a,s){const $=a.uid!==void 0?"uid":"name",_=s.filter(_e=>_e[$]!==a[$]);return _.length===s.length?null:_}const extname=function(){const s=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),_=s[s.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(_)||[""])[0]},isImageFileType=a=>a.indexOf("image/")===0,isImageUrl=a=>{if(a.type&&!a.thumbUrl)return isImageFileType(a.type);const s=a.thumbUrl||a.url||"",$=extname(s);return/^data:image\//.test(s)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test($)?!0:!(/^data:/.test(s)||$)},MEASURE_SIZE=200;function previewImage(a){return new Promise(s=>{if(!a.type||!isImageFileType(a.type)){s("");return}const $=document.createElement("canvas");$.width=MEASURE_SIZE,$.height=MEASURE_SIZE,$.style.cssText=`position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`,document.body.appendChild($);const _=$.getContext("2d"),_e=new Image;if(_e.onload=()=>{const{width:tt,height:nt}=_e;let at=MEASURE_SIZE,ot=MEASURE_SIZE,rt=0,st=0;tt>nt?(ot=nt*(MEASURE_SIZE/tt),st=-(ot-at)/2):(at=tt*(MEASURE_SIZE/nt),rt=-(at-ot)/2),_.drawImage(_e,rt,st,at,ot);const lt=$.toDataURL();document.body.removeChild($),window.URL.revokeObjectURL(_e.src),s(lt)},_e.crossOrigin="anonymous",a.type.startsWith("image/svg+xml")){const tt=new FileReader;tt.onload=()=>{tt.result&&(_e.src=tt.result)},tt.readAsDataURL(a)}else if(a.type.startsWith("image/gif")){const tt=new FileReader;tt.onload=()=>{tt.result&&s(tt.result)},tt.readAsDataURL(a)}else _e.src=window.URL.createObjectURL(a)})}var DownloadOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const DownloadOutlinedSvg=DownloadOutlined$2;var DownloadOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:DownloadOutlinedSvg}))};const DownloadOutlined$1=reactExports.forwardRef(DownloadOutlined),ListItem=reactExports.forwardRef((a,s)=>{let{prefixCls:$,className:_,style:_e,locale:tt,listType:nt,file:at,items:ot,progress:rt,iconRender:st,actionIconRender:lt,itemRender:et,isImgUrl:it,showPreviewIcon:ut,showRemoveIcon:ft,showDownloadIcon:ht,previewIcon:dt,removeIcon:gt,downloadIcon:pt,onPreview:mt,onDownload:ct,onClose:vt}=a;var At,xt;const{status:bt}=at,[Et,St]=reactExports.useState(bt);reactExports.useEffect(()=>{bt!=="removed"&&St(bt)},[bt]);const[Bt,Ot]=reactExports.useState(!1);reactExports.useEffect(()=>{const Dt=setTimeout(()=>{Ot(!0)},300);return()=>{clearTimeout(Dt)}},[]);const Tt=st(at);let wt=reactExports.createElement("div",{className:`${$}-icon`},Tt);if(nt==="picture"||nt==="picture-card"||nt==="picture-circle")if(Et==="uploading"||!at.thumbUrl&&!at.url){const Dt=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:Et!=="uploading"});wt=reactExports.createElement("div",{className:Dt},Tt)}else{const Dt=it!=null&&it(at)?reactExports.createElement("img",{src:at.thumbUrl||at.url,alt:at.name,className:`${$}-list-item-image`,crossOrigin:at.crossOrigin}):Tt,Ut=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:it&&!it(at)});wt=reactExports.createElement("a",{className:Ut,onClick:Vt=>mt(at,Vt),href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Dt)}const Ct=classnames(`${$}-list-item`,`${$}-list-item-${Et}`),It=typeof at.linkProps=="string"?JSON.parse(at.linkProps):at.linkProps,yt=ft?lt((typeof gt=="function"?gt(at):gt)||reactExports.createElement(DeleteOutlined$1,null),()=>vt(at),$,tt.removeFile,!0):null,Rt=ht&&Et==="done"?lt((typeof pt=="function"?pt(at):pt)||reactExports.createElement(DownloadOutlined$1,null),()=>ct(at),$,tt.downloadFile):null,kt=nt!=="picture-card"&&nt!=="picture-circle"&&reactExports.createElement("span",{key:"download-delete",className:classnames(`${$}-list-item-actions`,{picture:nt==="picture"})},Rt,yt),jt=classnames(`${$}-list-item-name`),Ht=at.url?[reactExports.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:jt,title:at.name},It,{href:at.url,onClick:Dt=>mt(at,Dt)}),at.name),kt]:[reactExports.createElement("span",{key:"view",className:jt,onClick:Dt=>mt(at,Dt),title:at.name},at.name),kt],Ft=ut&&(at.url||at.thumbUrl)?reactExports.createElement("a",{href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Dt=>mt(at,Dt),title:tt.previewFile},typeof dt=="function"?dt(at):dt||reactExports.createElement(EyeOutlined$1,null)):null,_t=(nt==="picture-card"||nt==="picture-circle")&&Et!=="uploading"&&reactExports.createElement("span",{className:`${$}-list-item-actions`},Ft,Et==="done"&&Rt,yt),{getPrefixCls:Nt}=reactExports.useContext(ConfigContext$1),Mt=Nt(),Lt=reactExports.createElement("div",{className:Ct},wt,Ht,_t,Bt&&reactExports.createElement(CSSMotion,{motionName:`${Mt}-fade`,visible:Et==="uploading",motionDeadline:2e3},Dt=>{let{className:Ut}=Dt;const Vt="percent"in at?reactExports.createElement(Progress$1,Object.assign({},rt,{type:"line",percent:at.percent,"aria-label":at["aria-label"],"aria-labelledby":at["aria-labelledby"]})):null;return reactExports.createElement("div",{className:classnames(`${$}-list-item-progress`,Ut)},Vt)})),$t=at.response&&typeof at.response=="string"?at.response:((At=at.error)===null||At===void 0?void 0:At.statusText)||((xt=at.error)===null||xt===void 0?void 0:xt.message)||tt.uploadError,Pt=Et==="error"?reactExports.createElement(_Tooltip,{title:$t,getPopupContainer:Dt=>Dt.parentNode},Lt):Lt;return reactExports.createElement("div",{className:classnames(`${$}-list-item-container`,_),style:_e,ref:s},et?et(Pt,at,ot,{download:ct.bind(null,at),preview:mt.bind(null,at),remove:vt.bind(null,at)}):Pt)}),ListItem$1=ListItem,InternalUploadList=(a,s)=>{const{listType:$="text",previewFile:_=previewImage,onPreview:_e,onDownload:tt,onRemove:nt,locale:at,iconRender:ot,isImageUrl:rt=isImageUrl,prefixCls:st,items:lt=[],showPreviewIcon:et=!0,showRemoveIcon:it=!0,showDownloadIcon:ut=!1,removeIcon:ft,previewIcon:ht,downloadIcon:dt,progress:gt={size:[-1,2],showInfo:!1},appendAction:pt,appendActionVisible:mt=!0,itemRender:ct,disabled:vt}=a,At=useForceUpdate(),[xt,bt]=reactExports.useState(!1);reactExports.useEffect(()=>{$!=="picture"&&$!=="picture-card"&&$!=="picture-circle"||(lt||[]).forEach(Ft=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Ft.originFileObj instanceof File||Ft.originFileObj instanceof Blob)||Ft.thumbUrl!==void 0||(Ft.thumbUrl="",_&&_(Ft.originFileObj).then(_t=>{Ft.thumbUrl=_t||"",At()}))})},[$,lt,_]),reactExports.useEffect(()=>{bt(!0)},[]);const Et=(Ft,_t)=>{if(_e)return _t==null||_t.preventDefault(),_e(Ft)},St=Ft=>{typeof tt=="function"?tt(Ft):Ft.url&&window.open(Ft.url)},Bt=Ft=>{nt==null||nt(Ft)},Ot=Ft=>{if(ot)return ot(Ft,$);const _t=Ft.status==="uploading",Nt=rt&&rt(Ft)?reactExports.createElement(PictureTwoTone$1,null):reactExports.createElement(FileTwoTone$1,null);let Mt=_t?reactExports.createElement(LoadingOutlined$1,null):reactExports.createElement(PaperClipOutlined$1,null);return $==="picture"?Mt=_t?reactExports.createElement(LoadingOutlined$1,null):Nt:($==="picture-card"||$==="picture-circle")&&(Mt=_t?at.uploading:Nt),Mt},Tt=(Ft,_t,Nt,Mt,Lt)=>{const $t={type:"text",size:"small",title:Mt,onClick:Pt=>{_t(),isValidElement(Ft)&&Ft.props.onClick&&Ft.props.onClick(Pt)},className:`${Nt}-list-item-action`};if(Lt&&($t.disabled=vt),isValidElement(Ft)){const Pt=cloneElement(Ft,Object.assign(Object.assign({},Ft.props),{onClick:()=>{}}));return reactExports.createElement(Button$2,Object.assign({},$t,{icon:Pt}))}return reactExports.createElement(Button$2,Object.assign({},$t),reactExports.createElement("span",null,Ft))};reactExports.useImperativeHandle(s,()=>({handlePreview:Et,handleDownload:St}));const{getPrefixCls:wt}=reactExports.useContext(ConfigContext$1),Ct=wt("upload",st),It=wt(),yt=classnames(`${Ct}-list`,`${Ct}-list-${$}`),Rt=_toConsumableArray$d(lt.map(Ft=>({key:Ft.uid,file:Ft})));let jt={motionDeadline:2e3,motionName:`${Ct}-${$==="picture-card"||$==="picture-circle"?"animate-inline":"animate"}`,keys:Rt,motionAppear:xt};const Ht=reactExports.useMemo(()=>{const Ft=Object.assign({},initCollapseMotion$1(It));return delete Ft.onAppearEnd,delete Ft.onEnterEnd,delete Ft.onLeaveEnd,Ft},[It]);return $!=="picture-card"&&$!=="picture-circle"&&(jt=Object.assign(Object.assign({},Ht),jt)),reactExports.createElement("div",{className:yt},reactExports.createElement(CSSMotionList,Object.assign({},jt,{component:!1}),Ft=>{let{key:_t,file:Nt,className:Mt,style:Lt}=Ft;return reactExports.createElement(ListItem$1,{key:_t,locale:at,prefixCls:Ct,className:Mt,style:Lt,file:Nt,items:lt,progress:gt,listType:$,isImgUrl:rt,showPreviewIcon:et,showRemoveIcon:it,showDownloadIcon:ut,removeIcon:ft,previewIcon:ht,downloadIcon:dt,iconRender:Ot,actionIconRender:Tt,itemRender:ct,onPreview:Et,onDownload:St,onClose:Bt})}),pt&&reactExports.createElement(CSSMotion,Object.assign({},jt,{visible:mt,forceRender:!0}),Ft=>{let{className:_t,style:Nt}=Ft;return cloneElement(pt,Mt=>({className:classnames(Mt.className,_t),style:Object.assign(Object.assign(Object.assign({},Nt),{pointerEvents:_t?"none":void 0}),Mt.style)}))}))},UploadList=reactExports.forwardRef(InternalUploadList),UploadList$1=UploadList;var __awaiter$1=function(a,s,$,_){function _e(tt){return tt instanceof $?tt:new $(function(nt){nt(tt)})}return new($||($=Promise))(function(tt,nt){function at(st){try{rt(_.next(st))}catch(lt){nt(lt)}}function ot(st){try{rt(_.throw(st))}catch(lt){nt(lt)}}function rt(st){st.done?tt(st.value):_e(st.value).then(at,ot)}rt((_=_.apply(a,s||[])).next())})};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,InternalUpload=(a,s)=>{const{fileList:$,defaultFileList:_,onRemove:_e,showUploadList:tt=!0,listType:nt="text",onPreview:at,onDownload:ot,onChange:rt,onDrop:st,previewFile:lt,disabled:et,locale:it,iconRender:ut,isImageUrl:ft,progress:ht,prefixCls:dt,className:gt,type:pt="select",children:mt,style:ct,itemRender:vt,maxCount:At,data:xt={},multiple:bt=!1,action:Et="",accept:St="",supportServerRender:Bt=!0,rootClassName:Ot}=a,Tt=reactExports.useContext(DisabledContext$1),wt=et??Tt,[Ct,It]=useMergedState(_||[],{value:$,postState:ur=>ur??[]}),[yt,Rt]=reactExports.useState("drop"),kt=reactExports.useRef(null);reactExports.useMemo(()=>{const ur=Date.now();($||[]).forEach((pr,yr)=>{!pr.uid&&!Object.isFrozen(pr)&&(pr.uid=`__AUTO__${ur}_${yr}__`)})},[$]);const jt=(ur,pr,yr)=>{let Er=_toConsumableArray$d(pr),br=!1;At===1?Er=Er.slice(-1):At&&(br=Er.length>At,Er=Er.slice(0,At)),reactDomExports.flushSync(()=>{It(Er)});const gr={file:ur,fileList:Er};yr&&(gr.event=yr),(!br||Er.some(Ar=>Ar.uid===ur.uid))&&reactDomExports.flushSync(()=>{rt==null||rt(gr)})},Ht=(ur,pr)=>__awaiter$1(void 0,void 0,void 0,function*(){const{beforeUpload:yr,transformFile:Er}=a;let br=ur;if(yr){const gr=yield yr(ur,pr);if(gr===!1)return!1;if(delete ur[LIST_IGNORE],gr===LIST_IGNORE)return Object.defineProperty(ur,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof gr=="object"&&gr&&(br=gr)}return Er&&(br=yield Er(br)),br}),Ft=ur=>{const pr=ur.filter(br=>!br.file[LIST_IGNORE]);if(!pr.length)return;const yr=pr.map(br=>file2Obj(br.file));let Er=_toConsumableArray$d(Ct);yr.forEach(br=>{Er=updateFileList(br,Er)}),yr.forEach((br,gr)=>{let Ar=br;if(pr[gr].parsedFile)br.status="uploading";else{const{originFileObj:Sr}=br;let Br;try{Br=new File([Sr],Sr.name,{type:Sr.type})}catch{Br=new Blob([Sr],{type:Sr.type}),Br.name=Sr.name,Br.lastModifiedDate=new Date,Br.lastModified=new Date().getTime()}Br.uid=br.uid,Ar=Br}jt(Ar,Er)})},_t=(ur,pr,yr)=>{try{typeof ur=="string"&&(ur=JSON.parse(ur))}catch{}if(!getFileItem(pr,Ct))return;const Er=file2Obj(pr);Er.status="done",Er.percent=100,Er.response=ur,Er.xhr=yr;const br=updateFileList(Er,Ct);jt(Er,br)},Nt=(ur,pr)=>{if(!getFileItem(pr,Ct))return;const yr=file2Obj(pr);yr.status="uploading",yr.percent=ur.percent;const Er=updateFileList(yr,Ct);jt(yr,Er,ur)},Mt=(ur,pr,yr)=>{if(!getFileItem(yr,Ct))return;const Er=file2Obj(yr);Er.error=ur,Er.response=pr,Er.status="error";const br=updateFileList(Er,Ct);jt(Er,br)},Lt=ur=>{let pr;Promise.resolve(typeof _e=="function"?_e(ur):_e).then(yr=>{var Er;if(yr===!1)return;const br=removeFileItem(ur,Ct);br&&(pr=Object.assign(Object.assign({},ur),{status:"removed"}),Ct==null||Ct.forEach(gr=>{const Ar=pr.uid!==void 0?"uid":"name";gr[Ar]===pr[Ar]&&!Object.isFrozen(gr)&&(gr.status="removed")}),(Er=kt.current)===null||Er===void 0||Er.abort(pr),jt(pr,br))})},$t=ur=>{Rt(ur.type),ur.type==="drop"&&(st==null||st(ur))};reactExports.useImperativeHandle(s,()=>({onBatchStart:Ft,onSuccess:_t,onProgress:Nt,onError:Mt,fileList:Ct,upload:kt.current}));const{getPrefixCls:Pt,direction:Dt,upload:Ut}=reactExports.useContext(ConfigContext$1),Vt=Pt("upload",dt),Qt=Object.assign(Object.assign({onBatchStart:Ft,onError:Mt,onProgress:Nt,onSuccess:_t},a),{data:xt,multiple:bt,action:Et,accept:St,supportServerRender:Bt,prefixCls:Vt,disabled:wt,beforeUpload:Ht,onChange:void 0});delete Qt.className,delete Qt.style,(!mt||wt)&&delete Qt.id;const qt=`${Vt}-wrapper`,[Zt,ar,Jt]=useStyle(Vt,qt),[rr]=useLocale$1("Upload",defaultLocale.Upload),{showRemoveIcon:Yt,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr}=typeof tt=="boolean"?{}:tt,cr=typeof Yt>"u"?!wt:!!Yt,or=(ur,pr)=>tt?reactExports.createElement(UploadList$1,{prefixCls:Vt,listType:nt,items:Ct,previewFile:lt,onPreview:at,onDownload:ot,onRemove:Lt,showRemoveIcon:cr,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr,iconRender:ut,locale:Object.assign(Object.assign({},rr),it),isImageUrl:ft,progress:ht,appendAction:ur,appendActionVisible:pr,itemRender:vt,disabled:wt}):ur,Xt=classnames(qt,gt,Ot,ar,Jt,Ut==null?void 0:Ut.className,{[`${Vt}-rtl`]:Dt==="rtl",[`${Vt}-picture-card-wrapper`]:nt==="picture-card",[`${Vt}-picture-circle-wrapper`]:nt==="picture-circle"}),Gt=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),ct);if(pt==="drag"){const ur=classnames(ar,Vt,`${Vt}-drag`,{[`${Vt}-drag-uploading`]:Ct.some(pr=>pr.status==="uploading"),[`${Vt}-drag-hover`]:yt==="dragover",[`${Vt}-disabled`]:wt,[`${Vt}-rtl`]:Dt==="rtl"});return Zt(reactExports.createElement("span",{className:Xt},reactExports.createElement("div",{className:ur,style:Gt,onDrop:$t,onDragOver:$t,onDragLeave:$t},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt,className:`${Vt}-btn`}),reactExports.createElement("div",{className:`${Vt}-drag-container`},mt))),or()))}const Wt=classnames(Vt,`${Vt}-select`,{[`${Vt}-disabled`]:wt}),lr=(ur=>reactExports.createElement("div",{className:Wt,style:ur},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt}))))(mt?void 0:{display:"none"});return Zt(nt==="picture-card"||nt==="picture-circle"?reactExports.createElement("span",{className:Xt},or(lr,!!mt)):reactExports.createElement("span",{className:Xt},lr,or()))},Upload$1=reactExports.forwardRef(InternalUpload),InternalUpload$1=Upload$1;var __rest$4=function(a,s){var $={};for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&s.indexOf(_)<0&&($[_]=a[_]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,_=Object.getOwnPropertySymbols(a);_e<_.length;_e++)s.indexOf(_[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,_[_e])&&($[_[_e]]=a[_[_e]]);return $};const Dragger=reactExports.forwardRef((a,s)=>{var{style:$,height:_}=a,_e=__rest$4(a,["style","height"]);return reactExports.createElement(InternalUpload$1,Object.assign({ref:s},_e,{type:"drag",style:Object.assign(Object.assign({},$),{height:_})}))}),Dragger$1=Dragger,Upload=InternalUpload$1;Upload.Dragger=Dragger$1,Upload.LIST_IGNORE=LIST_IGNORE;const _Upload=Upload;var ArrowLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const ArrowLeftOutlinedSvg=ArrowLeftOutlined$2;var ArrowLeftOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowLeftOutlinedSvg}))};const ArrowLeftOutlined$1=reactExports.forwardRef(ArrowLeftOutlined);var ArrowRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const ArrowRightOutlinedSvg=ArrowRightOutlined$2;var ArrowRightOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowRightOutlinedSvg}))};const ArrowRightOutlined$1=reactExports.forwardRef(ArrowRightOutlined);var ExclamationCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const ExclamationCircleOutlinedSvg=ExclamationCircleOutlined$2;var ExclamationCircleOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ExclamationCircleOutlinedSvg}))};const ExclamationCircleOutlined$1=reactExports.forwardRef(ExclamationCircleOutlined);var MenuOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const MenuOutlinedSvg=MenuOutlined$2;var MenuOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MenuOutlinedSvg}))};const MenuOutlined$1=reactExports.forwardRef(MenuOutlined);var MinusOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const MinusOutlinedSvg=MinusOutlined$2;var MinusOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MinusOutlinedSvg}))};const MinusOutlined$1=reactExports.forwardRef(MinusOutlined),dictEn={cancel:"Cancel",field:"field",fieldName:"Name",align:"Align",width:"Width",height:"Height",opacity:"Opacity",rotate:"Rotate",edit:"Edit",plsInputName:"Please input name",fieldMustUniq:"Name of field is not unique",notUniq:"(Not unique name)",noKeyName:"No name",fieldsList:"Field List",editField:"Edit Field",type:"Type",errorOccurred:"An error occurred",errorBulkUpdateFieldName:"Cannot commit the change because the number of items has been changed.",commitBulkUpdateFieldName:"Commit Changes",bulkUpdateFieldName:"Bulk update field names",addPageAfter:"Add Page After",removePage:"Remove Current Page",removePageConfirm:"Are you sure you want to delete this page? This action cannot be undone.",hexColorPrompt:"Please enter a valid hex color code.","schemas.color":"Color","schemas.borderWidth":"Border Width","schemas.borderColor":"Border Color","schemas.backgroundColor":"Background Color","schemas.textColor":"Text Color","schemas.bgColor":"Background Color","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Left","schemas.center":"Center","schemas.right":"Right","schemas.top":"Top","schemas.middle":"Middle","schemas.bottom":"Bottom","schemas.padding":"Padding","schemas.text.fontName":"Font Name","schemas.text.size":"Size","schemas.text.spacing":"Spacing","schemas.text.textAlign":"Text Align","schemas.text.verticalAlign":"Vertical Align","schemas.text.lineHeight":"Line Height","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Fit","schemas.text.dynamicFontSize":"Dynamic Font Size","schemas.barcodes.barColor":"Bar Color","schemas.barcodes.includetext":"Include Text","schemas.table.alternateBackgroundColor":"Alternate Background Color","schemas.table.tableStyle":"Table Style","schemas.table.headStyle":"Header Style","schemas.table.bodyStyle":"Body Style","schemas.table.columnStyle":"Column Style"},dictJa={cancel:"キャンセル",field:"入力項目",fieldName:"項目名",align:"整列",width:"幅",height:"高さ",opacity:"不透明度",rotate:"回転",edit:"編集する",plsInputName:"項目名を入力してください",fieldMustUniq:"他の入力項目名と被っています",notUniq:"(他の項目名と重複しています)",noKeyName:"項目名なし",fieldsList:"入力項目一覧",editField:"入力項目を編集",type:"タイプ",errorOccurred:"エラーが発生しました",errorBulkUpdateFieldName:"項目数が変更されているため変更をコミットできません。",commitBulkUpdateFieldName:"変更を反映",bulkUpdateFieldName:"項目名を一括変更",addPageAfter:"次にページを追加",removePage:"現在のページを削除",removePageConfirm:"ページを削除してもよろしいですか?この操作は元に戻せません。",hexColorPrompt:"有効な16進数のカラーコードを入力してください。","schemas.color":"色","schemas.borderWidth":"枠線の太さ","schemas.borderColor":"枠線の色","schemas.backgroundColor":"背景色","schemas.textColor":"テキストの色","schemas.bgColor":"背景色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中央","schemas.right":"右","schemas.top":"上","schemas.middle":"中間","schemas.bottom":"下","schemas.padding":"パディング","schemas.text.fontName":"フォント名","schemas.text.size":"サイズ","schemas.text.spacing":"間隔","schemas.text.textAlign":"テキストの揃え","schemas.text.verticalAlign":"垂直方向の揃え","schemas.text.lineHeight":"行の高さ","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"フィット","schemas.text.dynamicFontSize":"動的フォントサイズ","schemas.barcodes.barColor":"バーの色","schemas.barcodes.includetext":"テキストを含める","schemas.table.alternateBackgroundColor":"交互の背景色","schemas.table.tableStyle":"テーブルスタイル","schemas.table.headStyle":"ヘッダースタイル","schemas.table.bodyStyle":"ボディスタイル","schemas.table.columnStyle":"カラムスタイル"},dictAr={cancel:"إلغاء",field:"الحقل",fieldName:"اسم الحقل",align:"محاذاة",width:"العرض",height:"الارتفاع",opacity:"الشفافية",rotate:"تدوير",edit:"تعديل",plsInputName:"الرجاء إدخال الاسم",fieldMustUniq:"يجب أن يكون الحقل فريداً",notUniq:"(غير فريد)",noKeyName:"لا يوجد اسم للحقل",fieldsList:"قائمة الحقول",editField:"تعديل الحقل",type:"النوع",errorOccurred:"حدث خطأ",errorBulkUpdateFieldName:"لا يمكن تنفيذ التغيير لأنه تم تغيير عدد العناصر.",commitBulkUpdateFieldName:"تنفيذ التغييرات",bulkUpdateFieldName:"تغيير الأسماء",addPageAfter:"إضافة صفحة بعد",removePage:"احذف الصفحة الحالية",removePageConfirm:"هل أنت متأكد من رغبتك في حذف هذه الصفحة؟ لا يمكن التراجع عن هذا الإجراء.",hexColorPrompt:"الرجاء إدخال رمز لون سداسي عشري صالح.","schemas.color":"اللون","schemas.borderWidth":"عرض الحدود","schemas.borderColor":"لون الحدود","schemas.backgroundColor":"لون الخلفية","schemas.textColor":"لون الخط","schemas.bgColor":"لون الخلفية","schemas.horizontal":"أفقي","schemas.vertical":"عمودي","schemas.left":"يسار","schemas.center":"مركز","schemas.right":"يمين","schemas.top":"أعلى","schemas.middle":"وسط","schemas.bottom":"أسفل","schemas.padding":"التبطين","schemas.text.fontName":"اسم الخط","schemas.text.size":"الحجم","schemas.text.spacing":"التباعد","schemas.text.textAlign":"محاذاة النص","schemas.text.verticalAlign":"محاذاة عمودية","schemas.text.lineHeight":"ارتفاع السطر","schemas.text.min":"الحد الأدنى","schemas.text.max":"الحد الأقصى","schemas.text.fit":"ملاءمة","schemas.text.dynamicFontSize":"حجم الخط الديناميكي","schemas.barcodes.barColor":"لون الشريط","schemas.barcodes.includetext":"تضمين النص","schemas.table.alternateBackgroundColor":"لون الخلفية البديل","schemas.table.tableStyle":"أسلوب الجدول","schemas.table.headStyle":"أسلوب الرأس","schemas.table.bodyStyle":"أسلوب الجسم","schemas.table.columnStyle":"أسلوب العمود"},dictTh={cancel:"ยกเลิก",field:"ฟิลด์",fieldName:"ชื่อฟิลด์",align:"จัดเรียง",width:"ความกว้าง",height:"ความสูง",opacity:"ความทึบ",rotate:"หมุน",edit:"แก้ไข",plsInputName:"กรุณาใส่ชื่อ",fieldMustUniq:"ชื่อฟิลด์ต้องไม่ซ้ำกัน",notUniq:"(ชื่อฟิลด์ซ้ำกัน)",noKeyName:"ไม่มีชื่อ",fieldsList:"รายการฟิลด์ทั้งหมด",editField:"แก้ไขฟิลด์",type:"ประเภท",errorOccurred:"เกิดข้อผิดพลาด",errorBulkUpdateFieldName:"ไม่สามารถยืนยันการแก้ไขได้เนื่องจากจำนวนรายการมีการเปลี่ยนแปลง",commitBulkUpdateFieldName:"ยืนยันการแก้ไข",bulkUpdateFieldName:"แก้ไขชื่อฟิลด์เป็นชุด",addPageAfter:"เพิ่มหน้าถัดไป",removePage:"ลบหน้าปัจจุบัน",removePageConfirm:"คุณแน่ใจหรือไม่ว่าต้องการลบหน้านี้? การกระทำนี้ไม่สามารถย้อนกลับได้",hexColorPrompt:"กรุณาใส่รหัสสีแบบฐานสิบหกที่ถูกต้อง","schemas.color":"สี","schemas.borderWidth":"ความกว้างของเส้นขอบ","schemas.borderColor":"สีขอบ","schemas.backgroundColor":"สีพื้นหลัง","schemas.textColor":"สีข้อความ","schemas.bgColor":"สีพื้นหลัง","schemas.horizontal":"แนวนอน","schemas.vertical":"แนวตั้ง","schemas.left":"ซ้าย","schemas.center":"ตรงกลาง","schemas.right":"ขวา","schemas.top":"ด้านบน","schemas.middle":"ตรงกลาง","schemas.bottom":"ด้านล่าง","schemas.padding":"การเพิ่มพื้นที่","schemas.text.fontName":"ชื่อแบบอักษร","schemas.text.size":"ขนาด","schemas.text.spacing":"ระยะห่าง","schemas.text.textAlign":"จัดแนวข้อความ","schemas.text.verticalAlign":"จัดแนวแนวตั้ง","schemas.text.lineHeight":"ความสูงของบรรทัด","schemas.text.min":"ต่ำสุด","schemas.text.max":"สูงสุด","schemas.text.fit":"พอดี","schemas.text.dynamicFontSize":"ขนาดตัวอักษรแบบไดนามิก","schemas.barcodes.barColor":"สีบาร์","schemas.barcodes.includetext":"รวมข้อความ","schemas.table.alternateBackgroundColor":"สีพื้นหลังสลับกัน","schemas.table.tableStyle":"สไตล์ตาราง","schemas.table.headStyle":"สไตล์หัวข้อ","schemas.table.bodyStyle":"สไตล์เนื้อหา","schemas.table.columnStyle":"สไตล์คอลัมน์"},dictIt={cancel:"Annulla",field:"Campo",fieldName:"Nome",align:"Allinea",width:"Larghezza",height:"Altezza",opacity:"Opacità",rotate:"Ruota",edit:"Modifica",plsInputName:"Inserisci il nome per favore",fieldMustUniq:"Il nome del campo non è univoco",notUniq:"(Nome non univoco)",noKeyName:"Nessun nome",fieldsList:"Lista campi",editField:"Modifica campo",type:"Tipo",errorOccurred:"Riscontrato errore",errorBulkUpdateFieldName:"Non è possibile salvare le modifiche perché il numero di elementi è cambiato.",commitBulkUpdateFieldName:"Salva cambiamenti",bulkUpdateFieldName:"Modifica nomi campi in blocco",addPageAfter:"Aggiungi pagina dopo",removePage:"Rimuovi la Pagina Corrente",removePageConfirm:"Sei sicuro di voler eliminare questa pagina? Questa azione non può essere annullata.",hexColorPrompt:"Inserisci un codice colore esadecimale valido.","schemas.color":"Colore","schemas.borderWidth":"Spessore bordo","schemas.borderColor":"Colore bordo","schemas.backgroundColor":"Colore di Sfondo","schemas.textColor":"Colore testo","schemas.bgColor":"Colore sfondo","schemas.horizontal":"Orizzontale","schemas.vertical":"Verticale","schemas.left":"Sinistra","schemas.center":"Centro","schemas.right":"Destra","schemas.top":"Sopra","schemas.middle":"Medio","schemas.bottom":"Sotto","schemas.padding":"Padding","schemas.text.fontName":"Nome del font","schemas.text.size":"Dimensione","schemas.text.spacing":"Spaziatura","schemas.text.textAlign":"Allineamento testo","schemas.text.verticalAlign":"Allineamento verticale","schemas.text.lineHeight":"Altezza della linea","schemas.text.min":"Minimo","schemas.text.max":"Massimo","schemas.text.fit":"Adatta","schemas.text.dynamicFontSize":"Dimensione font dinamica","schemas.barcodes.barColor":"Colore barra","schemas.barcodes.includetext":"Includi testo","schemas.table.alternateBackgroundColor":"Colore di Sfondo Alternato","schemas.table.tableStyle":"Stile della Tabella","schemas.table.headStyle":"Stile dell'Intestazione","schemas.table.bodyStyle":"Stile del Corpo","schemas.table.columnStyle":"Stile della Colonna"},dictPl={cancel:"Anuluj",field:"pole",fieldName:"Klucz pola",align:"Wyrównanie",width:"Szerokość",height:"Wysokość",opacity:"przezroczystość",rotate:"Obrót",edit:"Edytuj",plsInputName:"Wymagane wprowadzenie klucza pola",fieldMustUniq:"Klucz pola nie jest unikalny",notUniq:"(Klucz pola nie jest unikalny)",noKeyName:"Brak nazwy klucza pola",fieldsList:"Lista pól",editField:"Edytuj pole",type:"Typ pola",errorOccurred:"Wystąpił błąd",errorBulkUpdateFieldName:"Nie można wprowadzić zmian ponieważ liczba elementów uległa zmianie.",commitBulkUpdateFieldName:"Zaakceptuj zmiany",bulkUpdateFieldName:"Masowo aktualizuj klucze pól",addPageAfter:"Dodaj stronę po",removePage:"Usuń Bieżącą Stronę",removePageConfirm:"Czy na pewno chcesz usunąć tę stronę? Tej operacji nie można cofnąć.",hexColorPrompt:"Wprowadź poprawny kod koloru szesnastkowego.","schemas.color":"Kolor","schemas.borderWidth":"Szerokość obramowania","schemas.borderColor":"Kolor obramowania","schemas.backgroundColor":"Kolor tła","schemas.textColor":"Kolor tekstu","schemas.bgColor":"Kolor tła","schemas.horizontal":"Poziomo","schemas.vertical":"Pionowo","schemas.left":"Lewo","schemas.center":"Centrum","schemas.right":"Prawo","schemas.top":"Góra","schemas.middle":"Środek","schemas.bottom":"Dół","schemas.padding":"Odsadzenie","schemas.text.fontName":"Nazwa czcionki","schemas.text.size":"Rozmiar","schemas.text.spacing":"Odstępy","schemas.text.textAlign":"Wyrównanie tekstu","schemas.text.verticalAlign":"Wyrównanie pionowe","schemas.text.lineHeight":"Wysokość linii","schemas.text.min":"Minimum","schemas.text.max":"Maksimum","schemas.text.fit":"Dopasowanie","schemas.text.dynamicFontSize":"Dynamiczny rozmiar czcionki","schemas.barcodes.barColor":"Kolor paska","schemas.barcodes.includetext":"Dołącz tekst","schemas.table.alternateBackgroundColor":"Alternatywny kolor tła","schemas.table.tableStyle":"Styl tabeli","schemas.table.headStyle":"Styl nagłówka","schemas.table.bodyStyle":"Styl ciała","schemas.table.columnStyle":"Styl kolumny"},dictDe={cancel:"Abbrechen",field:"Feld",fieldName:"Name",align:"Ausrichten",width:"Breite",height:"Höhe",opacity:"Opazität",rotate:"Drehen",edit:"Bearbeiten",plsInputName:"Bitte geben Sie einen Namen ein",fieldMustUniq:"Feldname ist nicht eindeutig",notUniq:"(Nicht eindeutiger Name)",noKeyName:"Kein Name",fieldsList:"Feldliste",editField:"Feld bearbeiten",type:"Typ",errorOccurred:"Ein Fehler ist aufgetreten",errorBulkUpdateFieldName:"Die Änderung kann nicht übernommen werden, weil die Anzahl der Elemente geändert wurde.",commitBulkUpdateFieldName:"Änderungen übernehmen",bulkUpdateFieldName:"Mehrfachaktualisierung der Feldnamen",addPageAfter:"Seite danach hinzufügen",removePage:"Aktuelle Seite entfernen",removePageConfirm:"Sind Sie sicher, dass Sie diese Seite löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",hexColorPrompt:"Bitte geben Sie einen gültigen Hex-Farbcode ein.","schemas.color":"Farbe","schemas.borderWidth":"Rahmenbreite","schemas.borderColor":"Rahmenfarbe","schemas.backgroundColor":"Hintergrundfarbe","schemas.textColor":"Textfarbe","schemas.bgColor":"Hintergrundfarbe","schemas.horizontal":"Horizontal","schemas.vertical":"Vertikal","schemas.left":"Links","schemas.center":"Zentriert","schemas.right":"Rechts","schemas.top":"Oben","schemas.middle":"Mitte","schemas.bottom":"Unten","schemas.padding":"Polsterung","schemas.text.fontName":"Schriftart","schemas.text.size":"Größe","schemas.text.spacing":"Abstand","schemas.text.textAlign":"Ausrichtung","schemas.text.verticalAlign":"vert. Ausr.","schemas.text.lineHeight":"Zeilenhöhe","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Anpassen","schemas.text.dynamicFontSize":"Dynamische Schriftgröße","schemas.barcodes.barColor":"Strichcodefarbe","schemas.barcodes.includetext":"Text anzeigen","schemas.table.alternateBackgroundColor":"Wechselnde Hintergrundfarbe","schemas.table.tableStyle":"Tabellenstil","schemas.table.headStyle":"Kopfzeilenstil","schemas.table.bodyStyle":"Körperstil","schemas.table.columnStyle":"Spaltenstil"},dictEs={cancel:"Cancelar",field:"campo",fieldName:"Nombre",align:"Alinear",width:"Anchura",height:"Altura",opacity:"Opacidad",rotate:"Rotar",edit:"Editar",plsInputName:"Introduce el nombre",fieldMustUniq:"El nombre del campo no es único",notUniq:"(Nombre no único)",noKeyName:"Sin nombre",fieldsList:"Lista de campos",editField:"Editar campo",type:"Tipo",errorOccurred:"Ocurrió un error",errorBulkUpdateFieldName:"No se puede confirmar el cambio porque el número de elementos ha cambiado.",commitBulkUpdateFieldName:"Confirmar cambios",bulkUpdateFieldName:"Actualizar en bloque el nombre de los campos",addPageAfter:"Insertar página",removePage:"Eliminar página actual",removePageConfirm:"¿Estás seguro de que quieres eliminar esta página? Esta acción no se puede deshacer.",hexColorPrompt:"Introduce un código de color hexadecimal válido.","schemas.color":"Color","schemas.borderWidth":"Ancho del borde","schemas.borderColor":"Color del borde","schemas.backgroundColor":"Color de fondo","schemas.textColor":"Color del texto","schemas.bgColor":"Color del fondo","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Izquierda","schemas.center":"Centro","schemas.right":"Derecha","schemas.top":"Arriba","schemas.middle":"Medio","schemas.bottom":"Abajo","schemas.padding":"Relleno","schemas.text.fontName":"Nombre de la fuente","schemas.text.size":"Tamaño","schemas.text.spacing":"Espaciado","schemas.text.textAlign":"Alineación del texto","schemas.text.verticalAlign":"Alineación vertical","schemas.text.lineHeight":"Altura de línea","schemas.text.min":"Mín","schemas.text.max":"Máx","schemas.text.fit":"Ajustar","schemas.text.dynamicFontSize":"Tamaño de fuente dinámico","schemas.barcodes.barColor":"Color de la barra","schemas.barcodes.includetext":"Incluir texto","schemas.table.alternateBackgroundColor":"Color de fondo alternativo","schemas.table.tableStyle":"Estilo de tabla","schemas.table.headStyle":"Estilo de cabecera","schemas.table.bodyStyle":"Estilo de cuerpo","schemas.table.columnStyle":"Estilo de columna"},dictFr={cancel:"Annuler",field:"Champ",fieldName:"Nom",align:"Aligner",width:"Largeur",height:"Hauteur",opacity:"Opacité",rotate:"Rotation",edit:"Éditer",plsInputName:"Veuillez saisir le nom",fieldMustUniq:"Le nom du champ n'est pas unique",notUniq:"(Nombre non unique)",noKeyName:"Pas de nom",fieldsList:"Liste des champs",editField:"Éditer le champ",type:"Type",errorOccurred:" Une erreur est survenue",errorBulkUpdateFieldName:"Impossible de confirmer le changement car le nombre d'éléments a changé.",commitBulkUpdateFieldName:"Confirmer les changements",bulkUpdateFieldName:"Modifier les noms de champs en masse",addPageAfter:"Ajouter une page après",removePage:"Supprimer la page actuelle",removePageConfirm:"Êtes-vous sûr de vouloir supprimer cette page ? Cette action est irréversible.",hexColorPrompt:"Veuillez entrer un code couleur hexadécimal valide.","schemas.color":"Couleur","schemas.borderWidth":"Largeur de la bordure","schemas.borderColor":"Couleur de la bordure","schemas.backgroundColor":"Couleur de fond","schemas.textColor":"Couleur du texte","schemas.bgColor":"Couleur de fond","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Gauche","schemas.center":"Centre","schemas.right":"Droite","schemas.top":"Haut","schemas.middle":"Milieu","schemas.bottom":"Bas","schemas.padding":"Zone de remplissage","schemas.text.fontName":"Nom de la police","schemas.text.size":"Taille","schemas.text.spacing":"Espacement","schemas.text.textAlign":"Alignement du texte","schemas.text.verticalAlign":"Alignement vertical","schemas.text.lineHeight":"Hauteur de ligne","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Ajustement","schemas.text.dynamicFontSize":"Taille de police dynamique","schemas.barcodes.barColor":"Couleur de la barre","schemas.barcodes.includetext":"Inclure le texte","schemas.table.alternateBackgroundColor":"Couleur de fond alternative","schemas.table.tableStyle":"Style de tableau","schemas.table.headStyle":"Style d'en-tête","schemas.table.bodyStyle":"Style de corps","schemas.table.columnStyle":"Style de colonne"},dictionaries={en:dictEn,ja:dictJa,ar:dictAr,th:dictTh,it:dictIt,pl:dictPl,de:dictDe,es:dictEs,fr:dictFr},getDict=a=>dictionaries[a]||dictionaries[DEFAULT_LANG],i18n=(a,s)=>(s||getDict(DEFAULT_LANG))[a],I18nContext=reactExports.createContext(i18n),FontContext=reactExports.createContext(getDefaultFont()),PluginsRegistry=reactExports.createContext(builtInPlugins),OptionsContext=reactExports.createContext({});function arrayMove(a,s,$){const _=a.slice();return _.splice($<0?_.length+$:$,0,_.splice(s,1)[0]),_}function getSortedRects(a,s){return a.reduce(($,_,_e)=>{const tt=s.get(_);return tt&&($[_e]=tt),$},Array(a.length))}function isValidIndex(a){return a!==null&&a>=0}function itemsEqual(a,s){if(a===s)return!0;if(a.length!==s.length)return!1;for(let $=0;$<a.length;$++)if(a[$]!==s[$])return!1;return!0}function normalizeDisabled(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const rectSortingStrategy=a=>{let{rects:s,activeIndex:$,overIndex:_,index:_e}=a;const tt=arrayMove(s,_,$),nt=s[_e],at=tt[_e];return!at||!nt?null:{x:at.left-nt.left,y:at.top-nt.top,scaleX:at.width/nt.width,scaleY:at.height/nt.height}},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=a=>{var s;let{activeIndex:$,activeNodeRect:_,index:_e,rects:tt,overIndex:nt}=a;const at=(s=tt[$])!=null?s:_;if(!at)return null;if(_e===$){const rt=tt[nt];return rt?{x:0,y:$<nt?rt.top+rt.height-(at.top+at.height):rt.top-at.top,...defaultScale$1}:null}const ot=getItemGap$1(tt,_e,$);return _e>$&&_e<=nt?{x:0,y:-at.height-ot,...defaultScale$1}:_e<$&&_e>=nt?{x:0,y:at.height+ot,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};function getItemGap$1(a,s,$){const _=a[s],_e=a[s-1],tt=a[s+1];return _?$<s?_e?_.top-(_e.top+_e.height):tt?tt.top-(_.top+_.height):0:tt?tt.top-(_.top+_.height):_e?_.top-(_e.top+_e.height):0:0}const ID_PREFIX="Sortable",Context$1=React$a.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(a){let{children:s,id:$,items:_,strategy:_e=rectSortingStrategy,disabled:tt=!1}=a;const{active:nt,dragOverlay:at,droppableRects:ot,over:rt,measureDroppableContainers:st}=useDndContext(),lt=useUniqueId(ID_PREFIX,$),et=at.rect!==null,it=reactExports.useMemo(()=>_.map(vt=>typeof vt=="object"&&"id"in vt?vt.id:vt),[_]),ut=nt!=null,ft=nt?it.indexOf(nt.id):-1,ht=rt?it.indexOf(rt.id):-1,dt=reactExports.useRef(it),gt=!itemsEqual(it,dt.current),pt=ht!==-1&&ft===-1||gt,mt=normalizeDisabled(tt);useIsomorphicLayoutEffect$1(()=>{gt&&ut&&st(it)},[gt,it,ut,st]),reactExports.useEffect(()=>{dt.current=it},[it]);const ct=reactExports.useMemo(()=>({activeIndex:ft,containerId:lt,disabled:mt,disableTransforms:pt,items:it,overIndex:ht,useDragOverlay:et,sortedRects:getSortedRects(it,ot),strategy:_e}),[ft,lt,mt.draggable,mt.droppable,pt,it,ht,ot,et,_e]);return React$a.createElement(Context$1.Provider,{value:ct},s)}const defaultNewIndexGetter=a=>{let{id:s,items:$,activeIndex:_,overIndex:_e}=a;return arrayMove($,_,_e).indexOf(s)},defaultAnimateLayoutChanges=a=>{let{containerId:s,isSorting:$,wasDragging:_,index:_e,items:tt,newIndex:nt,previousItems:at,previousContainerId:ot,transition:rt}=a;return!rt||!_||at!==tt&&_e===nt?!1:$?!0:nt!==_e&&s===ot},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=CSS$1.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useDerivedTransform(a){let{disabled:s,index:$,node:_,rect:_e}=a;const[tt,nt]=reactExports.useState(null),at=reactExports.useRef($);return useIsomorphicLayoutEffect$1(()=>{if(!s&&$!==at.current&&_.current){const ot=_e.current;if(ot){const rt=getClientRect$1(_.current,{ignoreTransform:!0}),st={x:ot.left-rt.left,y:ot.top-rt.top,scaleX:ot.width/rt.width,scaleY:ot.height/rt.height};(st.x||st.y)&&nt(st)}}$!==at.current&&(at.current=$)},[s,$,_,_e]),reactExports.useEffect(()=>{tt&&nt(null)},[tt]),tt}function useSortable(a){let{animateLayoutChanges:s=defaultAnimateLayoutChanges,attributes:$,disabled:_,data:_e,getNewIndex:tt=defaultNewIndexGetter,id:nt,strategy:at,resizeObserverConfig:ot,transition:rt=defaultTransition}=a;const{items:st,containerId:lt,activeIndex:et,disabled:it,disableTransforms:ut,sortedRects:ft,overIndex:ht,useDragOverlay:dt,strategy:gt}=reactExports.useContext(Context$1),pt=normalizeLocalDisabled(_,it),mt=st.indexOf(nt),ct=reactExports.useMemo(()=>({sortable:{containerId:lt,index:mt,items:st},..._e}),[lt,_e,mt,st]),vt=reactExports.useMemo(()=>st.slice(st.indexOf(nt)),[st,nt]),{rect:At,node:xt,isOver:bt,setNodeRef:Et}=useDroppable({id:nt,data:ct,disabled:pt.droppable,resizeObserverConfig:{updateMeasurementsFor:vt,...ot}}),{active:St,activatorEvent:Bt,activeNodeRect:Ot,attributes:Tt,setNodeRef:wt,listeners:Ct,isDragging:It,over:yt,setActivatorNodeRef:Rt,transform:kt}=useDraggable({id:nt,data:ct,attributes:{...defaultAttributes,...$},disabled:pt.draggable}),jt=useCombinedRefs(Et,wt),Ht=!!St,Ft=Ht&&!ut&&isValidIndex(et)&&isValidIndex(ht),_t=!dt&&It,Nt=_t&&Ft?kt:null,Lt=Ft?Nt??(at??gt)({rects:ft,activeNodeRect:Ot,activeIndex:et,overIndex:ht,index:mt}):null,$t=isValidIndex(et)&&isValidIndex(ht)?tt({id:nt,items:st,activeIndex:et,overIndex:ht}):mt,Pt=St==null?void 0:St.id,Dt=reactExports.useRef({activeId:Pt,items:st,newIndex:$t,containerId:lt}),Ut=st!==Dt.current.items,Vt=s({active:St,containerId:lt,isDragging:It,isSorting:Ht,id:nt,index:mt,items:st,newIndex:Dt.current.newIndex,previousItems:Dt.current.items,previousContainerId:Dt.current.containerId,transition:rt,wasDragging:Dt.current.activeId!=null}),Qt=useDerivedTransform({disabled:!Vt,index:mt,node:xt,rect:At});return reactExports.useEffect(()=>{Ht&&Dt.current.newIndex!==$t&&(Dt.current.newIndex=$t),lt!==Dt.current.containerId&&(Dt.current.containerId=lt),st!==Dt.current.items&&(Dt.current.items=st)},[Ht,$t,lt,st]),reactExports.useEffect(()=>{if(Pt===Dt.current.activeId)return;if(Pt&&!Dt.current.activeId){Dt.current.activeId=Pt;return}const Zt=setTimeout(()=>{Dt.current.activeId=Pt},50);return()=>clearTimeout(Zt)},[Pt]),{active:St,activeIndex:et,attributes:Tt,data:ct,rect:At,index:mt,newIndex:$t,items:st,isOver:bt,isSorting:Ht,isDragging:It,listeners:Ct,node:xt,overIndex:ht,over:yt,setNodeRef:jt,setActivatorNodeRef:Rt,setDroppableNodeRef:Et,setDraggableNodeRef:wt,transform:Qt??Lt,transition:qt()};function qt(){if(Qt||Ut&&Dt.current.newIndex===mt)return disabledTransition;if(!(_t&&!isKeyboardEvent(Bt)||!rt)&&(Ht||Vt))return CSS$1.Transition.toString({...rt,property:transitionProperty})}}function normalizeLocalDisabled(a,s){var $,_;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:($=a==null?void 0:a.draggable)!=null?$:s.draggable,droppable:(_=a==null?void 0:a.droppable)!=null?_:s.droppable}}function hasSortableData(a){if(!a)return!1;const s=a.data.current;return!!(s&&"sortable"in s&&typeof s.sortable=="object"&&"containerId"in s.sortable&&"items"in s.sortable&&"index"in s.sortable)}const directions=[KeyboardCode.Down,KeyboardCode.Right,KeyboardCode.Up,KeyboardCode.Left],sortableKeyboardCoordinates=(a,s)=>{let{context:{active:$,collisionRect:_,droppableRects:_e,droppableContainers:tt,over:nt,scrollableAncestors:at}}=s;if(directions.includes(a.code)){if(a.preventDefault(),!$||!_)return;const ot=[];tt.getEnabled().forEach(lt=>{if(!lt||lt!=null&&lt.disabled)return;const et=_e.get(lt.id);if(et)switch(a.code){case KeyboardCode.Down:_.top<et.top&&ot.push(lt);break;case KeyboardCode.Up:_.top>et.top&&ot.push(lt);break;case KeyboardCode.Left:_.left>et.left&&ot.push(lt);break;case KeyboardCode.Right:_.left<et.left&&ot.push(lt);break}});const rt=closestCorners({active:$,collisionRect:_,droppableRects:_e,droppableContainers:ot,pointerCoordinates:null});let st=getFirstCollision(rt,"id");if(st===(nt==null?void 0:nt.id)&&rt.length>1&&(st=rt[1].id),st!=null){const lt=tt.get($.id),et=tt.get(st),it=et?_e.get(et.id):null,ut=et==null?void 0:et.node.current;if(ut&&it&&lt&&et){const ht=getScrollableAncestors(ut).some((vt,At)=>at[At]!==vt),dt=isSameContainer(lt,et),gt=isAfter(lt,et),pt=ht||!dt?{x:0,y:0}:{x:gt?_.width-it.width:0,y:gt?_.height-it.height:0},mt={x:it.left,y:it.top};return pt.x&&pt.y?mt:subtract(mt,pt)}}}};function isSameContainer(a,s){return!hasSortableData(a)||!hasSortableData(s)?!1:a.data.current.sortable.containerId===s.data.current.sortable.containerId}function isAfter(a,s){return!hasSortableData(a)||!hasSortableData(s)||!isSameContainer(a,s)?!1:a.data.current.sortable.index<s.data.current.sortable.index}const{Text:Text$4}=Typography$1,Item=React$a.memo(React$a.forwardRef(({value:a,status:s,title:$,style:_,dragOverlay:_e,onClick:tt,onMouseEnter:nt,onMouseLeave:at,dragging:ot,fadeIn:rt,listeners:st,sorting:lt,transition:et,transform:it,...ut},ft)=>{const ht=reactExports.useContext(I18nContext);reactExports.useEffect(()=>{if(_e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[_e]);const{x:dt,y:gt,scaleX:pt,scaleY:mt}=it||{x:0,y:0,scaleX:1,scaleY:1};return jsxRuntimeExports.jsx("li",{style:{marginTop:10,transition:et,transform:`translate(${dt}px, ${gt}px) scale(${pt}, ${mt})`},onMouseEnter:nt,onMouseLeave:at,ref:ft,children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",..._},...ut,onClick:()=>tt&&tt(),children:[jsxRuntimeExports.jsx(Button$2,{...st,style:{display:"flex",alignItems:"center",background:"none",boxShadow:"none",border:"none",paddingLeft:"0.25rem"},icon:jsxRuntimeExports.jsx(HolderOutlined$1,{style:{cursor:"grab"}})}),jsxRuntimeExports.jsx(Text$4,{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},title:$||"",children:s===void 0?a:jsxRuntimeExports.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(ExclamationCircleOutlined$1,{width:15,style:{marginRight:"0.5rem"}}),s==="is-warning"?ht("noKeyName"):a,s==="is-danger"?ht("notUniq"):""]})})]})})})),Item$1=Item,usePrevious=a=>{const s=reactExports.useRef(null);return reactExports.useEffect(()=>{s.current=a}),s.current},getScale=(a,s)=>Math.floor((a/s>1?1:a/s)*100)/100,useUIPreProcessor=({template:a,size:s,zoomLevel:$})=>{const[_,_e]=reactExports.useState([]),[tt,nt]=reactExports.useState([]),[at,ot]=reactExports.useState(0),[rt,st]=reactExports.useState(null),lt=async et=>{const{template:{basePdf:it,schemas:ut},size:ft}=et;let ht,dt,gt,pt;if(isBlankPdf(it)){const{width:ct,height:vt}=it;ht=ct*ZOOM,dt=vt*ZOOM,gt=ut.map(()=>"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII="),pt=ut.map(()=>({width:ct,height:vt}))}else{const ct=await getB64BasePdf(it),vt=b64toBlob(ct);pt=await getPdfPageSizes(vt),ht=pt[0].width*ZOOM,dt=pt[0].height*ZOOM,gt=await pdf2Pngs(vt,ht)}const mt=Math.min(getScale(ft.width,ht),getScale(ft.height-RULER_HEIGHT,dt));return{backgrounds:gt,pageSizes:pt,scale:mt}};return reactExports.useEffect(()=>{lt({template:a,size:s}).then(({pageSizes:et,scale:it,backgrounds:ut})=>{nt(et),ot(it),_e(ut)}).catch(et=>{st(et),console.error(`[@pdfme/ui] ${et}`)})},[a,s]),{backgrounds:_,pageSizes:tt,scale:at*$,error:rt,refresh:et=>lt({template:et,size:s}).then(({pageSizes:it,scale:ut,backgrounds:ft})=>{nt(it),ot(ut),_e(ft)})}},useScrollPageCursor=({ref:a,pageSizes:s,scale:$,pageCursor:_,onChangePageCursor:_e})=>{const tt=reactExports.useCallback(()=>{if(!s[0]||!a.current)return;const nt=a.current.scrollTop,{top:at}=a.current.getBoundingClientRect(),ot=s.reduce((st,lt,et)=>{let it=(lt.height*ZOOM+RULER_HEIGHT)*$;return et===0?it+=at-it/2:it+=st[et-1],st.concat(it)},[]);let rt=0;ot.forEach((st,lt)=>{nt>st&&(rt=lt+1>=ot.length?ot.length-1:lt+1)}),rt!==_&&_e(rt)},[_e,_,s,a,$]);reactExports.useEffect(()=>{var nt;return(nt=a.current)==null||nt.addEventListener("scroll",tt),()=>{var at;(at=a.current)==null||at.removeEventListener("scroll",tt)}},[a,tt])},useMountStatus=()=>{const[a,s]=reactExports.useState(!1);return reactExports.useEffect(()=>{const $=setTimeout(()=>s(!0),500);return()=>clearTimeout($)},[]),a},useInitEvents=({pageCursor:a,pageSizes:s,activeElements:$,template:_,schemasList:_e,changeSchemas:tt,commitSchemas:nt,removeSchemas:at,onSaveTemplate:ot,past:rt,future:st,setSchemasList:lt,onEdit:et,onEditEnd:it})=>{const ut=reactExports.useRef(null),ft=reactExports.useCallback(()=>{const dt=()=>{const pt=$.map(mt=>mt.id);return _e[a].filter(mt=>pt.includes(mt.id))},gt=pt=>{const mt=pt==="undo",ct=mt?rt:st;if(ct.current.length<=0)return;(mt?st:rt).current.push(cloneDeep$2(_e[a]));const vt=cloneDeep$2(_e);vt[a]=ct.current.pop(),lt(vt)};initShortCuts({move:(pt,mt)=>{const ct=s[a],vt=dt(),At=moveCommandToChangeSchemasArg({command:pt,activeSchemas:vt,pageSize:ct,isShift:mt});tt(At)},copy:()=>{const pt=dt();pt.length!==0&&(ut.current=pt)},paste:()=>{if(!ut.current||ut.current.length===0)return;const pt=_e[a],mt=[],ct=ut.current.map(vt=>{const At=uuid$6(),xt=getUniqSchemaKey({copiedSchemaKey:vt.key,schema:pt,stackUniqSchemaKeys:mt}),{height:bt,width:Et,position:St}=vt,Bt=s[a],Ot={x:St.x+10>Bt.width-Et?Bt.width-Et:St.x+10,y:St.y+10>Bt.height-bt?Bt.height-bt:St.y+10};return Object.assign(cloneDeep$2(vt),{id:At,key:xt,position:Ot})});nt(_e[a].concat(ct)),et(ct.map(vt=>document.getElementById(vt.id))),ut.current=ct},redo:()=>gt("redo"),undo:()=>gt("undo"),save:()=>ot&&ot(schemasList2template(_e,_.basePdf)),remove:()=>at(dt().map(pt=>pt.id)),esc:it,selectAll:()=>et(_e[a].map(pt=>document.getElementById(pt.id)))})},[_,$,a,s,tt,nt,_e,ot,at,rt,st,lt,ut,et,it]),ht=reactExports.useCallback(()=>{destroyShortCuts()},[]);reactExports.useEffect(()=>(ft(),ht),[ft,ht])},SelectableSortableItem=({isSelected:a,style:s,onSelect:$,onEdit:_,schema:_e,schemas:tt,onMouseEnter:nt,onMouseLeave:at})=>{const{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),{setNodeRef:st,listeners:lt,isDragging:et,isSorting:it,transform:ut,transition:ft}=useSortable({id:_e.id}),ht=useMountStatus(),dt=et&&!ht,gt={...lt,onClick:vt=>$(_e.id,vt.shiftKey)};let pt;_e.key?tt.find(vt=>_e.key&&vt.key===_e.key&&vt.id!==_e.id)&&(pt="is-danger"):pt="is-warning";let mt=rt("edit");pt==="is-warning"?mt=rt("plsInputName"):pt==="is-danger"&&(mt=rt("fieldMustUniq"));const ct=a?{background:ot.colorPrimary,opacity:it||et?.5:1}:{};return jsxRuntimeExports.jsx(Item$1,{ref:st,onMouseEnter:nt,onMouseLeave:at,onClick:()=>_(_e.id),value:_e.key,status:pt,title:mt,style:{...ct,...s},dragging:et,sorting:it,transition:ft,transform:ut,fadeIn:dt,listeners:gt})},SelectableSortableItem$1=SelectableSortableItem,SelectableSortableContainer=a=>{const{token:s}=theme.useToken(),{schemas:$,onEdit:_,onSortEnd:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt}=a,[at,ot]=reactExports.useState([]),[rt,st]=reactExports.useState(null),[lt,et]=reactExports.useState(null),it=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:15}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),ut=ht=>at.map(dt=>dt.id).includes(ht),ft=(ht,dt)=>{if(dt)if(ut(ht)){const gt=at.filter(pt=>pt.id!==ht);ot(gt)}else{const gt=$.find(mt=>mt.id===ht),pt=at.concat(gt);ot(pt)}else ot([])};return jsxRuntimeExports.jsx(DndContext,{sensors:it,collisionDetection:closestCorners,onDragStart:({active:ht})=>{et(String(ht.id)),st($),ut(String(ht.id))?at.length>0&&_e(at.reduce((dt,gt)=>gt.id===String(ht.id)?dt:dt.filter(pt=>pt!==gt),$)):ot([])},onDragEnd:({active:ht,over:dt})=>{const gt=(dt==null?void 0:dt.id)||"",pt=$.map(ct=>ct.id).indexOf(String(ht.id)),mt=$.map(ct=>ct.id).indexOf(String(gt));if(at.length){let ct=[...$];ct=arrayMove(ct,pt,mt),ct.splice(mt+1,0,...at.filter(vt=>vt.id!==lt)),_e(ct),ot([])}else pt!==mt&&_e(arrayMove($,pt,mt));et(null)},onDragCancel:()=>{rt&&_e(rt),et(null),st(null)},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{style:{height:"100%",overflowY:"auto"},children:jsxRuntimeExports.jsx(SortableContext,{items:$,strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",borderRadius:5},children:$.map(ht=>jsxRuntimeExports.jsx(SelectableSortableItem$1,{style:{border:`1px solid ${ht.id===tt?s.colorPrimary:"transparent"}`},schema:ht,schemas:$,isSelected:ut(ht.id)||lt===ht.id,onEdit:_,onSelect:ft,onMouseEnter:()=>nt(ht.id),onMouseLeave:()=>nt(null)},ht.id))})})}),reactDomExports.createPortal(jsxRuntimeExports.jsx(DragOverlay,{adjustScale:!0,children:lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:jsxRuntimeExports.jsx(Item$1,{value:$.find(ht=>ht.id===lt).key,style:{background:s.colorPrimary},dragOverlay:!0})}),jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:at.filter(ht=>ht.id!==lt).map(ht=>jsxRuntimeExports.jsx(Item$1,{value:ht.key,style:{background:s.colorPrimary},dragOverlay:!0},ht.id))})]}):null}),document.body)]})})},SelectableSortableContainer$1=SelectableSortableContainer,{Text:Text$3}=Typography$1,{TextArea:TextArea$2}=_Input,headHeight=40,ListView=a=>{const{schemas:s,onSortEnd:$,onEdit:_,size:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,changeSchemas:at}=a,{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),[st,lt]=reactExports.useState(!1),[et,it]=reactExports.useState(""),ut=getSidebarContentHeight(_e.height),ft=()=>{const dt=et.split(`
589
+ `]:{zIndex:10,width:_,margin:`0 ${unit$1(a.marginXXS)}`,fontSize:_,cursor:"pointer",transition:`all ${a.motionDurationSlow}`,color:_e,"&:hover":{color:_e},svg:{verticalAlign:"baseline"}}},[`${at}-thumbnail, ${at}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${at}-name`]:{display:"none",textAlign:"center"},[`${at}-file + ${at}-name`]:{position:"absolute",bottom:a.margin,display:"block",width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`},[`${at}-uploading`]:{[`&${at}`]:{backgroundColor:a.colorFillAlter},[`&::before, ${$}-eye, ${$}-download, ${$}-delete`]:{display:"none"}},[`${at}-progress`]:{bottom:a.marginXL,width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${s}-wrapper${s}-picture-circle-wrapper`]:{[`${s}${s}-select`]:{borderRadius:"50%"}}}},genRtlStyle=a=>{const{componentCls:s}=a;return{[`${s}-rtl`]:{direction:"rtl"}}},genRtlStyle$1=genRtlStyle,genBaseStyle=a=>{const{componentCls:s,colorTextDisabled:$}=a;return{[`${s}-wrapper`]:Object.assign(Object.assign({},resetComponent(a)),{[s]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${s}-select`]:{display:"inline-block"},[`${s}-disabled`]:{color:$,cursor:"not-allowed"}})}},prepareComponentToken=a=>({actionsColor:a.colorTextDescription}),useStyle=genStyleHooks("Upload",a=>{const{fontSizeHeading3:s,fontHeight:$,lineWidth:_,controlHeightLG:_e,calc:tt}=a,nt=merge(a,{uploadThumbnailSize:tt(s).mul(2).equal(),uploadProgressOffset:tt(tt($).div(2)).add(_).equal(),uploadPicCardSize:tt(_e).mul(2.55).equal()});return[genBaseStyle(nt),genDraggerStyle$1(nt),genPictureStyle(nt),genPictureCardStyle(nt),genListStyle$1(nt),genMotionStyle$1(nt),genRtlStyle$1(nt),genCollapseMotion$1(nt)]},prepareComponentToken);var FileTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:$}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:s}}]}},name:"file",theme:"twotone"};const FileTwoToneSvg=FileTwoTone$2;var FileTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:FileTwoToneSvg}))};const FileTwoTone$1=reactExports.forwardRef(FileTwoTone);var PaperClipOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const PaperClipOutlinedSvg=PaperClipOutlined$2;var PaperClipOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PaperClipOutlinedSvg}))};const PaperClipOutlined$1=reactExports.forwardRef(PaperClipOutlined);var PictureTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:s}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:$}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:$}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:$}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:s}}]}},name:"picture",theme:"twotone"};const PictureTwoToneSvg=PictureTwoTone$2;var PictureTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PictureTwoToneSvg}))};const PictureTwoTone$1=reactExports.forwardRef(PictureTwoTone);function file2Obj(a){return Object.assign(Object.assign({},a),{lastModified:a.lastModified,lastModifiedDate:a.lastModifiedDate,name:a.name,size:a.size,type:a.type,uid:a.uid,percent:0,originFileObj:a})}function updateFileList(a,s){const $=_toConsumableArray$d(s),_=$.findIndex(_e=>{let{uid:tt}=_e;return tt===a.uid});return _===-1?$.push(a):$[_]=a,$}function getFileItem(a,s){const $=a.uid!==void 0?"uid":"name";return s.filter(_=>_[$]===a[$])[0]}function removeFileItem(a,s){const $=a.uid!==void 0?"uid":"name",_=s.filter(_e=>_e[$]!==a[$]);return _.length===s.length?null:_}const extname=function(){const s=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),_=s[s.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(_)||[""])[0]},isImageFileType=a=>a.indexOf("image/")===0,isImageUrl=a=>{if(a.type&&!a.thumbUrl)return isImageFileType(a.type);const s=a.thumbUrl||a.url||"",$=extname(s);return/^data:image\//.test(s)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test($)?!0:!(/^data:/.test(s)||$)},MEASURE_SIZE=200;function previewImage(a){return new Promise(s=>{if(!a.type||!isImageFileType(a.type)){s("");return}const $=document.createElement("canvas");$.width=MEASURE_SIZE,$.height=MEASURE_SIZE,$.style.cssText=`position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`,document.body.appendChild($);const _=$.getContext("2d"),_e=new Image;if(_e.onload=()=>{const{width:tt,height:nt}=_e;let at=MEASURE_SIZE,ot=MEASURE_SIZE,rt=0,st=0;tt>nt?(ot=nt*(MEASURE_SIZE/tt),st=-(ot-at)/2):(at=tt*(MEASURE_SIZE/nt),rt=-(at-ot)/2),_.drawImage(_e,rt,st,at,ot);const lt=$.toDataURL();document.body.removeChild($),window.URL.revokeObjectURL(_e.src),s(lt)},_e.crossOrigin="anonymous",a.type.startsWith("image/svg+xml")){const tt=new FileReader;tt.onload=()=>{tt.result&&(_e.src=tt.result)},tt.readAsDataURL(a)}else if(a.type.startsWith("image/gif")){const tt=new FileReader;tt.onload=()=>{tt.result&&s(tt.result)},tt.readAsDataURL(a)}else _e.src=window.URL.createObjectURL(a)})}var DownloadOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const DownloadOutlinedSvg=DownloadOutlined$2;var DownloadOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:DownloadOutlinedSvg}))};const DownloadOutlined$1=reactExports.forwardRef(DownloadOutlined),ListItem=reactExports.forwardRef((a,s)=>{let{prefixCls:$,className:_,style:_e,locale:tt,listType:nt,file:at,items:ot,progress:rt,iconRender:st,actionIconRender:lt,itemRender:et,isImgUrl:it,showPreviewIcon:ut,showRemoveIcon:ft,showDownloadIcon:ht,previewIcon:dt,removeIcon:gt,downloadIcon:pt,onPreview:mt,onDownload:ct,onClose:vt}=a;var At,xt;const{status:bt}=at,[Et,St]=reactExports.useState(bt);reactExports.useEffect(()=>{bt!=="removed"&&St(bt)},[bt]);const[Bt,Ot]=reactExports.useState(!1);reactExports.useEffect(()=>{const Dt=setTimeout(()=>{Ot(!0)},300);return()=>{clearTimeout(Dt)}},[]);const Tt=st(at);let wt=reactExports.createElement("div",{className:`${$}-icon`},Tt);if(nt==="picture"||nt==="picture-card"||nt==="picture-circle")if(Et==="uploading"||!at.thumbUrl&&!at.url){const Dt=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:Et!=="uploading"});wt=reactExports.createElement("div",{className:Dt},Tt)}else{const Dt=it!=null&&it(at)?reactExports.createElement("img",{src:at.thumbUrl||at.url,alt:at.name,className:`${$}-list-item-image`,crossOrigin:at.crossOrigin}):Tt,Ut=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:it&&!it(at)});wt=reactExports.createElement("a",{className:Ut,onClick:Vt=>mt(at,Vt),href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Dt)}const Ct=classnames(`${$}-list-item`,`${$}-list-item-${Et}`),It=typeof at.linkProps=="string"?JSON.parse(at.linkProps):at.linkProps,yt=ft?lt((typeof gt=="function"?gt(at):gt)||reactExports.createElement(DeleteOutlined$1,null),()=>vt(at),$,tt.removeFile,!0):null,Rt=ht&&Et==="done"?lt((typeof pt=="function"?pt(at):pt)||reactExports.createElement(DownloadOutlined$1,null),()=>ct(at),$,tt.downloadFile):null,kt=nt!=="picture-card"&&nt!=="picture-circle"&&reactExports.createElement("span",{key:"download-delete",className:classnames(`${$}-list-item-actions`,{picture:nt==="picture"})},Rt,yt),jt=classnames(`${$}-list-item-name`),Ht=at.url?[reactExports.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:jt,title:at.name},It,{href:at.url,onClick:Dt=>mt(at,Dt)}),at.name),kt]:[reactExports.createElement("span",{key:"view",className:jt,onClick:Dt=>mt(at,Dt),title:at.name},at.name),kt],Ft=ut&&(at.url||at.thumbUrl)?reactExports.createElement("a",{href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Dt=>mt(at,Dt),title:tt.previewFile},typeof dt=="function"?dt(at):dt||reactExports.createElement(EyeOutlined$1,null)):null,_t=(nt==="picture-card"||nt==="picture-circle")&&Et!=="uploading"&&reactExports.createElement("span",{className:`${$}-list-item-actions`},Ft,Et==="done"&&Rt,yt),{getPrefixCls:Nt}=reactExports.useContext(ConfigContext$1),Mt=Nt(),Lt=reactExports.createElement("div",{className:Ct},wt,Ht,_t,Bt&&reactExports.createElement(CSSMotion,{motionName:`${Mt}-fade`,visible:Et==="uploading",motionDeadline:2e3},Dt=>{let{className:Ut}=Dt;const Vt="percent"in at?reactExports.createElement(Progress$1,Object.assign({},rt,{type:"line",percent:at.percent,"aria-label":at["aria-label"],"aria-labelledby":at["aria-labelledby"]})):null;return reactExports.createElement("div",{className:classnames(`${$}-list-item-progress`,Ut)},Vt)})),$t=at.response&&typeof at.response=="string"?at.response:((At=at.error)===null||At===void 0?void 0:At.statusText)||((xt=at.error)===null||xt===void 0?void 0:xt.message)||tt.uploadError,Pt=Et==="error"?reactExports.createElement(_Tooltip,{title:$t,getPopupContainer:Dt=>Dt.parentNode},Lt):Lt;return reactExports.createElement("div",{className:classnames(`${$}-list-item-container`,_),style:_e,ref:s},et?et(Pt,at,ot,{download:ct.bind(null,at),preview:mt.bind(null,at),remove:vt.bind(null,at)}):Pt)}),ListItem$1=ListItem,InternalUploadList=(a,s)=>{const{listType:$="text",previewFile:_=previewImage,onPreview:_e,onDownload:tt,onRemove:nt,locale:at,iconRender:ot,isImageUrl:rt=isImageUrl,prefixCls:st,items:lt=[],showPreviewIcon:et=!0,showRemoveIcon:it=!0,showDownloadIcon:ut=!1,removeIcon:ft,previewIcon:ht,downloadIcon:dt,progress:gt={size:[-1,2],showInfo:!1},appendAction:pt,appendActionVisible:mt=!0,itemRender:ct,disabled:vt}=a,At=useForceUpdate(),[xt,bt]=reactExports.useState(!1);reactExports.useEffect(()=>{$!=="picture"&&$!=="picture-card"&&$!=="picture-circle"||(lt||[]).forEach(Ft=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Ft.originFileObj instanceof File||Ft.originFileObj instanceof Blob)||Ft.thumbUrl!==void 0||(Ft.thumbUrl="",_&&_(Ft.originFileObj).then(_t=>{Ft.thumbUrl=_t||"",At()}))})},[$,lt,_]),reactExports.useEffect(()=>{bt(!0)},[]);const Et=(Ft,_t)=>{if(_e)return _t==null||_t.preventDefault(),_e(Ft)},St=Ft=>{typeof tt=="function"?tt(Ft):Ft.url&&window.open(Ft.url)},Bt=Ft=>{nt==null||nt(Ft)},Ot=Ft=>{if(ot)return ot(Ft,$);const _t=Ft.status==="uploading",Nt=rt&&rt(Ft)?reactExports.createElement(PictureTwoTone$1,null):reactExports.createElement(FileTwoTone$1,null);let Mt=_t?reactExports.createElement(LoadingOutlined$1,null):reactExports.createElement(PaperClipOutlined$1,null);return $==="picture"?Mt=_t?reactExports.createElement(LoadingOutlined$1,null):Nt:($==="picture-card"||$==="picture-circle")&&(Mt=_t?at.uploading:Nt),Mt},Tt=(Ft,_t,Nt,Mt,Lt)=>{const $t={type:"text",size:"small",title:Mt,onClick:Pt=>{_t(),isValidElement(Ft)&&Ft.props.onClick&&Ft.props.onClick(Pt)},className:`${Nt}-list-item-action`};if(Lt&&($t.disabled=vt),isValidElement(Ft)){const Pt=cloneElement(Ft,Object.assign(Object.assign({},Ft.props),{onClick:()=>{}}));return reactExports.createElement(Button$2,Object.assign({},$t,{icon:Pt}))}return reactExports.createElement(Button$2,Object.assign({},$t),reactExports.createElement("span",null,Ft))};reactExports.useImperativeHandle(s,()=>({handlePreview:Et,handleDownload:St}));const{getPrefixCls:wt}=reactExports.useContext(ConfigContext$1),Ct=wt("upload",st),It=wt(),yt=classnames(`${Ct}-list`,`${Ct}-list-${$}`),Rt=_toConsumableArray$d(lt.map(Ft=>({key:Ft.uid,file:Ft})));let jt={motionDeadline:2e3,motionName:`${Ct}-${$==="picture-card"||$==="picture-circle"?"animate-inline":"animate"}`,keys:Rt,motionAppear:xt};const Ht=reactExports.useMemo(()=>{const Ft=Object.assign({},initCollapseMotion$1(It));return delete Ft.onAppearEnd,delete Ft.onEnterEnd,delete Ft.onLeaveEnd,Ft},[It]);return $!=="picture-card"&&$!=="picture-circle"&&(jt=Object.assign(Object.assign({},Ht),jt)),reactExports.createElement("div",{className:yt},reactExports.createElement(CSSMotionList,Object.assign({},jt,{component:!1}),Ft=>{let{key:_t,file:Nt,className:Mt,style:Lt}=Ft;return reactExports.createElement(ListItem$1,{key:_t,locale:at,prefixCls:Ct,className:Mt,style:Lt,file:Nt,items:lt,progress:gt,listType:$,isImgUrl:rt,showPreviewIcon:et,showRemoveIcon:it,showDownloadIcon:ut,removeIcon:ft,previewIcon:ht,downloadIcon:dt,iconRender:Ot,actionIconRender:Tt,itemRender:ct,onPreview:Et,onDownload:St,onClose:Bt})}),pt&&reactExports.createElement(CSSMotion,Object.assign({},jt,{visible:mt,forceRender:!0}),Ft=>{let{className:_t,style:Nt}=Ft;return cloneElement(pt,Mt=>({className:classnames(Mt.className,_t),style:Object.assign(Object.assign(Object.assign({},Nt),{pointerEvents:_t?"none":void 0}),Mt.style)}))}))},UploadList=reactExports.forwardRef(InternalUploadList),UploadList$1=UploadList;var __awaiter$1=function(a,s,$,_){function _e(tt){return tt instanceof $?tt:new $(function(nt){nt(tt)})}return new($||($=Promise))(function(tt,nt){function at(st){try{rt(_.next(st))}catch(lt){nt(lt)}}function ot(st){try{rt(_.throw(st))}catch(lt){nt(lt)}}function rt(st){st.done?tt(st.value):_e(st.value).then(at,ot)}rt((_=_.apply(a,s||[])).next())})};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,InternalUpload=(a,s)=>{const{fileList:$,defaultFileList:_,onRemove:_e,showUploadList:tt=!0,listType:nt="text",onPreview:at,onDownload:ot,onChange:rt,onDrop:st,previewFile:lt,disabled:et,locale:it,iconRender:ut,isImageUrl:ft,progress:ht,prefixCls:dt,className:gt,type:pt="select",children:mt,style:ct,itemRender:vt,maxCount:At,data:xt={},multiple:bt=!1,action:Et="",accept:St="",supportServerRender:Bt=!0,rootClassName:Ot}=a,Tt=reactExports.useContext(DisabledContext$1),wt=et??Tt,[Ct,It]=useMergedState(_||[],{value:$,postState:ur=>ur??[]}),[yt,Rt]=reactExports.useState("drop"),kt=reactExports.useRef(null);reactExports.useMemo(()=>{const ur=Date.now();($||[]).forEach((pr,yr)=>{!pr.uid&&!Object.isFrozen(pr)&&(pr.uid=`__AUTO__${ur}_${yr}__`)})},[$]);const jt=(ur,pr,yr)=>{let Er=_toConsumableArray$d(pr),br=!1;At===1?Er=Er.slice(-1):At&&(br=Er.length>At,Er=Er.slice(0,At)),reactDomExports.flushSync(()=>{It(Er)});const gr={file:ur,fileList:Er};yr&&(gr.event=yr),(!br||Er.some(Ar=>Ar.uid===ur.uid))&&reactDomExports.flushSync(()=>{rt==null||rt(gr)})},Ht=(ur,pr)=>__awaiter$1(void 0,void 0,void 0,function*(){const{beforeUpload:yr,transformFile:Er}=a;let br=ur;if(yr){const gr=yield yr(ur,pr);if(gr===!1)return!1;if(delete ur[LIST_IGNORE],gr===LIST_IGNORE)return Object.defineProperty(ur,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof gr=="object"&&gr&&(br=gr)}return Er&&(br=yield Er(br)),br}),Ft=ur=>{const pr=ur.filter(br=>!br.file[LIST_IGNORE]);if(!pr.length)return;const yr=pr.map(br=>file2Obj(br.file));let Er=_toConsumableArray$d(Ct);yr.forEach(br=>{Er=updateFileList(br,Er)}),yr.forEach((br,gr)=>{let Ar=br;if(pr[gr].parsedFile)br.status="uploading";else{const{originFileObj:Sr}=br;let Br;try{Br=new File([Sr],Sr.name,{type:Sr.type})}catch{Br=new Blob([Sr],{type:Sr.type}),Br.name=Sr.name,Br.lastModifiedDate=new Date,Br.lastModified=new Date().getTime()}Br.uid=br.uid,Ar=Br}jt(Ar,Er)})},_t=(ur,pr,yr)=>{try{typeof ur=="string"&&(ur=JSON.parse(ur))}catch{}if(!getFileItem(pr,Ct))return;const Er=file2Obj(pr);Er.status="done",Er.percent=100,Er.response=ur,Er.xhr=yr;const br=updateFileList(Er,Ct);jt(Er,br)},Nt=(ur,pr)=>{if(!getFileItem(pr,Ct))return;const yr=file2Obj(pr);yr.status="uploading",yr.percent=ur.percent;const Er=updateFileList(yr,Ct);jt(yr,Er,ur)},Mt=(ur,pr,yr)=>{if(!getFileItem(yr,Ct))return;const Er=file2Obj(yr);Er.error=ur,Er.response=pr,Er.status="error";const br=updateFileList(Er,Ct);jt(Er,br)},Lt=ur=>{let pr;Promise.resolve(typeof _e=="function"?_e(ur):_e).then(yr=>{var Er;if(yr===!1)return;const br=removeFileItem(ur,Ct);br&&(pr=Object.assign(Object.assign({},ur),{status:"removed"}),Ct==null||Ct.forEach(gr=>{const Ar=pr.uid!==void 0?"uid":"name";gr[Ar]===pr[Ar]&&!Object.isFrozen(gr)&&(gr.status="removed")}),(Er=kt.current)===null||Er===void 0||Er.abort(pr),jt(pr,br))})},$t=ur=>{Rt(ur.type),ur.type==="drop"&&(st==null||st(ur))};reactExports.useImperativeHandle(s,()=>({onBatchStart:Ft,onSuccess:_t,onProgress:Nt,onError:Mt,fileList:Ct,upload:kt.current}));const{getPrefixCls:Pt,direction:Dt,upload:Ut}=reactExports.useContext(ConfigContext$1),Vt=Pt("upload",dt),Qt=Object.assign(Object.assign({onBatchStart:Ft,onError:Mt,onProgress:Nt,onSuccess:_t},a),{data:xt,multiple:bt,action:Et,accept:St,supportServerRender:Bt,prefixCls:Vt,disabled:wt,beforeUpload:Ht,onChange:void 0});delete Qt.className,delete Qt.style,(!mt||wt)&&delete Qt.id;const qt=`${Vt}-wrapper`,[Zt,ar,Jt]=useStyle(Vt,qt),[rr]=useLocale$1("Upload",defaultLocale.Upload),{showRemoveIcon:Yt,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr}=typeof tt=="boolean"?{}:tt,cr=typeof Yt>"u"?!wt:!!Yt,or=(ur,pr)=>tt?reactExports.createElement(UploadList$1,{prefixCls:Vt,listType:nt,items:Ct,previewFile:lt,onPreview:at,onDownload:ot,onRemove:Lt,showRemoveIcon:cr,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr,iconRender:ut,locale:Object.assign(Object.assign({},rr),it),isImageUrl:ft,progress:ht,appendAction:ur,appendActionVisible:pr,itemRender:vt,disabled:wt}):ur,Xt=classnames(qt,gt,Ot,ar,Jt,Ut==null?void 0:Ut.className,{[`${Vt}-rtl`]:Dt==="rtl",[`${Vt}-picture-card-wrapper`]:nt==="picture-card",[`${Vt}-picture-circle-wrapper`]:nt==="picture-circle"}),Gt=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),ct);if(pt==="drag"){const ur=classnames(ar,Vt,`${Vt}-drag`,{[`${Vt}-drag-uploading`]:Ct.some(pr=>pr.status==="uploading"),[`${Vt}-drag-hover`]:yt==="dragover",[`${Vt}-disabled`]:wt,[`${Vt}-rtl`]:Dt==="rtl"});return Zt(reactExports.createElement("span",{className:Xt},reactExports.createElement("div",{className:ur,style:Gt,onDrop:$t,onDragOver:$t,onDragLeave:$t},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt,className:`${Vt}-btn`}),reactExports.createElement("div",{className:`${Vt}-drag-container`},mt))),or()))}const Wt=classnames(Vt,`${Vt}-select`,{[`${Vt}-disabled`]:wt}),lr=(ur=>reactExports.createElement("div",{className:Wt,style:ur},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt}))))(mt?void 0:{display:"none"});return Zt(nt==="picture-card"||nt==="picture-circle"?reactExports.createElement("span",{className:Xt},or(lr,!!mt)):reactExports.createElement("span",{className:Xt},lr,or()))},Upload$1=reactExports.forwardRef(InternalUpload),InternalUpload$1=Upload$1;var __rest$4=function(a,s){var $={};for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&s.indexOf(_)<0&&($[_]=a[_]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,_=Object.getOwnPropertySymbols(a);_e<_.length;_e++)s.indexOf(_[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,_[_e])&&($[_[_e]]=a[_[_e]]);return $};const Dragger=reactExports.forwardRef((a,s)=>{var{style:$,height:_}=a,_e=__rest$4(a,["style","height"]);return reactExports.createElement(InternalUpload$1,Object.assign({ref:s},_e,{type:"drag",style:Object.assign(Object.assign({},$),{height:_})}))}),Dragger$1=Dragger,Upload=InternalUpload$1;Upload.Dragger=Dragger$1,Upload.LIST_IGNORE=LIST_IGNORE;const _Upload=Upload;var ArrowLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const ArrowLeftOutlinedSvg=ArrowLeftOutlined$2;var ArrowLeftOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowLeftOutlinedSvg}))};const ArrowLeftOutlined$1=reactExports.forwardRef(ArrowLeftOutlined);var ArrowRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const ArrowRightOutlinedSvg=ArrowRightOutlined$2;var ArrowRightOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowRightOutlinedSvg}))};const ArrowRightOutlined$1=reactExports.forwardRef(ArrowRightOutlined);var ExclamationCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const ExclamationCircleOutlinedSvg=ExclamationCircleOutlined$2;var ExclamationCircleOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ExclamationCircleOutlinedSvg}))};const ExclamationCircleOutlined$1=reactExports.forwardRef(ExclamationCircleOutlined);var MenuOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const MenuOutlinedSvg=MenuOutlined$2;var MenuOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MenuOutlinedSvg}))};const MenuOutlined$1=reactExports.forwardRef(MenuOutlined);var MinusOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const MinusOutlinedSvg=MinusOutlined$2;var MinusOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MinusOutlinedSvg}))};const MinusOutlined$1=reactExports.forwardRef(MinusOutlined),dictEn={cancel:"Cancel",field:"field",fieldName:"Name",align:"Align",width:"Width",height:"Height",opacity:"Opacity",rotate:"Rotate",edit:"Edit",plsInputName:"Please input name",fieldMustUniq:"Name of field is not unique",notUniq:"(Not unique name)",noKeyName:"No name",fieldsList:"Field List",editField:"Edit Field",type:"Type",errorOccurred:"An error occurred",errorBulkUpdateFieldName:"Cannot commit the change because the number of items has been changed.",commitBulkUpdateFieldName:"Commit Changes",bulkUpdateFieldName:"Bulk update field names",addPageAfter:"Add Page After",removePage:"Remove Current Page",removePageConfirm:"Are you sure you want to delete this page? This action cannot be undone.",hexColorPrompt:"Please enter a valid hex color code.","schemas.color":"Color","schemas.borderWidth":"Border Width","schemas.borderColor":"Border Color","schemas.backgroundColor":"Background Color","schemas.textColor":"Text Color","schemas.bgColor":"Background Color","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Left","schemas.center":"Center","schemas.right":"Right","schemas.top":"Top","schemas.middle":"Middle","schemas.bottom":"Bottom","schemas.padding":"Padding","schemas.text.fontName":"Font Name","schemas.text.size":"Size","schemas.text.spacing":"Spacing","schemas.text.textAlign":"Text Align","schemas.text.verticalAlign":"Vertical Align","schemas.text.lineHeight":"Line Height","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Fit","schemas.text.dynamicFontSize":"Dynamic Font Size","schemas.barcodes.barColor":"Bar Color","schemas.barcodes.includetext":"Include Text","schemas.table.alternateBackgroundColor":"Alternate Background Color","schemas.table.tableStyle":"Table Style","schemas.table.headStyle":"Header Style","schemas.table.bodyStyle":"Body Style","schemas.table.columnStyle":"Column Style"},dictZh={cancel:"取消",field:"字段",fieldName:"名称",align:"对齐",width:"宽度",height:"高度",opacity:"透明度",rotate:"旋转",edit:"编辑",plsInputName:"请输入名称",fieldMustUniq:"字段名称必须唯一",notUniq:"(名称不唯一)",noKeyName:"无名称",fieldsList:"字段列表",editField:"编辑字段",type:"类型",errorOccurred:"发生错误",errorBulkUpdateFieldName:"由于项目数量已更改,无法提交更改。",commitBulkUpdateFieldName:"提交更改",bulkUpdateFieldName:"批量更新字段名称",addPageAfter:"在之后添加页面",removePage:"删除当前页面",removePageConfirm:"您确定要删除此页面吗?此操作无法撤销。",hexColorPrompt:"请输入有效的十六进制颜色代码。","schemas.color":"颜色","schemas.borderWidth":"边框宽度","schemas.borderColor":"边框颜色","schemas.backgroundColor":"背景颜色","schemas.textColor":"文字颜色","schemas.bgColor":"背景颜色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中","schemas.right":"右","schemas.top":"顶","schemas.middle":"中间","schemas.bottom":"底","schemas.padding":"填充","schemas.text.fontName":"字体名称","schemas.text.size":"大小","schemas.text.spacing":"间距","schemas.text.textAlign":"文本对齐","schemas.text.verticalAlign":"垂直对齐","schemas.text.lineHeight":"行高","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"适应","schemas.text.dynamicFontSize":"动态字体大小","schemas.barcodes.barColor":"条码颜色","schemas.barcodes.includetext":"包括文本","schemas.table.alternateBackgroundColor":"交替背景颜色","schemas.table.tableStyle":"表格样式","schemas.table.headStyle":"表头样式","schemas.table.bodyStyle":"表体样式","schemas.table.columnStyle":"列样式"},dictJa={cancel:"キャンセル",field:"入力項目",fieldName:"項目名",align:"整列",width:"幅",height:"高さ",opacity:"不透明度",rotate:"回転",edit:"編集する",plsInputName:"項目名を入力してください",fieldMustUniq:"他の入力項目名と被っています",notUniq:"(他の項目名と重複しています)",noKeyName:"項目名なし",fieldsList:"入力項目一覧",editField:"入力項目を編集",type:"タイプ",errorOccurred:"エラーが発生しました",errorBulkUpdateFieldName:"項目数が変更されているため変更をコミットできません。",commitBulkUpdateFieldName:"変更を反映",bulkUpdateFieldName:"項目名を一括変更",addPageAfter:"次にページを追加",removePage:"現在のページを削除",removePageConfirm:"ページを削除してもよろしいですか?この操作は元に戻せません。",hexColorPrompt:"有効な16進数のカラーコードを入力してください。","schemas.color":"色","schemas.borderWidth":"枠線の太さ","schemas.borderColor":"枠線の色","schemas.backgroundColor":"背景色","schemas.textColor":"テキストの色","schemas.bgColor":"背景色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中央","schemas.right":"右","schemas.top":"上","schemas.middle":"中間","schemas.bottom":"下","schemas.padding":"パディング","schemas.text.fontName":"フォント名","schemas.text.size":"サイズ","schemas.text.spacing":"間隔","schemas.text.textAlign":"テキストの揃え","schemas.text.verticalAlign":"垂直方向の揃え","schemas.text.lineHeight":"行の高さ","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"フィット","schemas.text.dynamicFontSize":"動的フォントサイズ","schemas.barcodes.barColor":"バーの色","schemas.barcodes.includetext":"テキストを含める","schemas.table.alternateBackgroundColor":"交互の背景色","schemas.table.tableStyle":"テーブルスタイル","schemas.table.headStyle":"ヘッダースタイル","schemas.table.bodyStyle":"ボディスタイル","schemas.table.columnStyle":"カラムスタイル"},dictKo={cancel:"취소",field:"필드",fieldName:"이름",align:"정렬",width:"너비",height:"높이",opacity:"투명도",rotate:"회전",edit:"편집",plsInputName:"이름을 입력하세요",fieldMustUniq:"필드 이름은 유일해야 합니다",notUniq:"(유일하지 않은 이름)",noKeyName:"이름 없음",fieldsList:"필드 목록",editField:"필드 편집",type:"유형",errorOccurred:"오류 발생",errorBulkUpdateFieldName:"항목 수가 변경되어 변경을 커밋할 수 없습니다.",commitBulkUpdateFieldName:"변경 사항 커밋",bulkUpdateFieldName:"필드 이름 일괄 업데이트",addPageAfter:"다음에 페이지 추가",removePage:"현재 페이지 제거",removePageConfirm:"이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",hexColorPrompt:"유효한 16진수 색상 코드를 입력하세요.","schemas.color":"색상","schemas.borderWidth":"테두리 너비","schemas.borderColor":"테두리 색상","schemas.backgroundColor":"배경색","schemas.textColor":"텍스트 색상","schemas.bgColor":"배경색","schemas.horizontal":"수평","schemas.vertical":"수직","schemas.left":"왼쪽","schemas.center":"중앙","schemas.right":"오른쪽","schemas.top":"상단","schemas.middle":"중간","schemas.bottom":"하단","schemas.padding":"패딩","schemas.text.fontName":"글꼴 이름","schemas.text.size":"크기","schemas.text.spacing":"간격","schemas.text.textAlign":"텍스트 정렬","schemas.text.verticalAlign":"수직 정렬","schemas.text.lineHeight":"줄 높이","schemas.text.min":"최소","schemas.text.max":"최대","schemas.text.fit":"맞춤","schemas.text.dynamicFontSize":"동적 폰트 크기","schemas.barcodes.barColor":"바코드 색상","schemas.barcodes.includetext":"텍스트 포함","schemas.table.alternateBackgroundColor":"대체 배경색","schemas.table.tableStyle":"테이블 스타일","schemas.table.headStyle":"헤더 스타일","schemas.table.bodyStyle":"본문 스타일","schemas.table.columnStyle":"열 스타일"},dictAr={cancel:"إلغاء",field:"الحقل",fieldName:"اسم الحقل",align:"محاذاة",width:"العرض",height:"الارتفاع",opacity:"الشفافية",rotate:"تدوير",edit:"تعديل",plsInputName:"الرجاء إدخال الاسم",fieldMustUniq:"يجب أن يكون الحقل فريداً",notUniq:"(غير فريد)",noKeyName:"لا يوجد اسم للحقل",fieldsList:"قائمة الحقول",editField:"تعديل الحقل",type:"النوع",errorOccurred:"حدث خطأ",errorBulkUpdateFieldName:"لا يمكن تنفيذ التغيير لأنه تم تغيير عدد العناصر.",commitBulkUpdateFieldName:"تنفيذ التغييرات",bulkUpdateFieldName:"تغيير الأسماء",addPageAfter:"إضافة صفحة بعد",removePage:"احذف الصفحة الحالية",removePageConfirm:"هل أنت متأكد من رغبتك في حذف هذه الصفحة؟ لا يمكن التراجع عن هذا الإجراء.",hexColorPrompt:"الرجاء إدخال رمز لون سداسي عشري صالح.","schemas.color":"اللون","schemas.borderWidth":"عرض الحدود","schemas.borderColor":"لون الحدود","schemas.backgroundColor":"لون الخلفية","schemas.textColor":"لون الخط","schemas.bgColor":"لون الخلفية","schemas.horizontal":"أفقي","schemas.vertical":"عمودي","schemas.left":"يسار","schemas.center":"مركز","schemas.right":"يمين","schemas.top":"أعلى","schemas.middle":"وسط","schemas.bottom":"أسفل","schemas.padding":"التبطين","schemas.text.fontName":"اسم الخط","schemas.text.size":"الحجم","schemas.text.spacing":"التباعد","schemas.text.textAlign":"محاذاة النص","schemas.text.verticalAlign":"محاذاة عمودية","schemas.text.lineHeight":"ارتفاع السطر","schemas.text.min":"الحد الأدنى","schemas.text.max":"الحد الأقصى","schemas.text.fit":"ملاءمة","schemas.text.dynamicFontSize":"حجم الخط الديناميكي","schemas.barcodes.barColor":"لون الشريط","schemas.barcodes.includetext":"تضمين النص","schemas.table.alternateBackgroundColor":"لون الخلفية البديل","schemas.table.tableStyle":"أسلوب الجدول","schemas.table.headStyle":"أسلوب الرأس","schemas.table.bodyStyle":"أسلوب الجسم","schemas.table.columnStyle":"أسلوب العمود"},dictTh={cancel:"ยกเลิก",field:"ฟิลด์",fieldName:"ชื่อฟิลด์",align:"จัดเรียง",width:"ความกว้าง",height:"ความสูง",opacity:"ความทึบ",rotate:"หมุน",edit:"แก้ไข",plsInputName:"กรุณาใส่ชื่อ",fieldMustUniq:"ชื่อฟิลด์ต้องไม่ซ้ำกัน",notUniq:"(ชื่อฟิลด์ซ้ำกัน)",noKeyName:"ไม่มีชื่อ",fieldsList:"รายการฟิลด์ทั้งหมด",editField:"แก้ไขฟิลด์",type:"ประเภท",errorOccurred:"เกิดข้อผิดพลาด",errorBulkUpdateFieldName:"ไม่สามารถยืนยันการแก้ไขได้เนื่องจากจำนวนรายการมีการเปลี่ยนแปลง",commitBulkUpdateFieldName:"ยืนยันการแก้ไข",bulkUpdateFieldName:"แก้ไขชื่อฟิลด์เป็นชุด",addPageAfter:"เพิ่มหน้าถัดไป",removePage:"ลบหน้าปัจจุบัน",removePageConfirm:"คุณแน่ใจหรือไม่ว่าต้องการลบหน้านี้? การกระทำนี้ไม่สามารถย้อนกลับได้",hexColorPrompt:"กรุณาใส่รหัสสีแบบฐานสิบหกที่ถูกต้อง","schemas.color":"สี","schemas.borderWidth":"ความกว้างของเส้นขอบ","schemas.borderColor":"สีขอบ","schemas.backgroundColor":"สีพื้นหลัง","schemas.textColor":"สีข้อความ","schemas.bgColor":"สีพื้นหลัง","schemas.horizontal":"แนวนอน","schemas.vertical":"แนวตั้ง","schemas.left":"ซ้าย","schemas.center":"ตรงกลาง","schemas.right":"ขวา","schemas.top":"ด้านบน","schemas.middle":"ตรงกลาง","schemas.bottom":"ด้านล่าง","schemas.padding":"การเพิ่มพื้นที่","schemas.text.fontName":"ชื่อแบบอักษร","schemas.text.size":"ขนาด","schemas.text.spacing":"ระยะห่าง","schemas.text.textAlign":"จัดแนวข้อความ","schemas.text.verticalAlign":"จัดแนวแนวตั้ง","schemas.text.lineHeight":"ความสูงของบรรทัด","schemas.text.min":"ต่ำสุด","schemas.text.max":"สูงสุด","schemas.text.fit":"พอดี","schemas.text.dynamicFontSize":"ขนาดตัวอักษรแบบไดนามิก","schemas.barcodes.barColor":"สีบาร์","schemas.barcodes.includetext":"รวมข้อความ","schemas.table.alternateBackgroundColor":"สีพื้นหลังสลับกัน","schemas.table.tableStyle":"สไตล์ตาราง","schemas.table.headStyle":"สไตล์หัวข้อ","schemas.table.bodyStyle":"สไตล์เนื้อหา","schemas.table.columnStyle":"สไตล์คอลัมน์"},dictIt={cancel:"Annulla",field:"Campo",fieldName:"Nome",align:"Allinea",width:"Larghezza",height:"Altezza",opacity:"Opacità",rotate:"Ruota",edit:"Modifica",plsInputName:"Inserisci il nome per favore",fieldMustUniq:"Il nome del campo non è univoco",notUniq:"(Nome non univoco)",noKeyName:"Nessun nome",fieldsList:"Lista campi",editField:"Modifica campo",type:"Tipo",errorOccurred:"Riscontrato errore",errorBulkUpdateFieldName:"Non è possibile salvare le modifiche perché il numero di elementi è cambiato.",commitBulkUpdateFieldName:"Salva cambiamenti",bulkUpdateFieldName:"Modifica nomi campi in blocco",addPageAfter:"Aggiungi pagina dopo",removePage:"Rimuovi la Pagina Corrente",removePageConfirm:"Sei sicuro di voler eliminare questa pagina? Questa azione non può essere annullata.",hexColorPrompt:"Inserisci un codice colore esadecimale valido.","schemas.color":"Colore","schemas.borderWidth":"Spessore bordo","schemas.borderColor":"Colore bordo","schemas.backgroundColor":"Colore di Sfondo","schemas.textColor":"Colore testo","schemas.bgColor":"Colore sfondo","schemas.horizontal":"Orizzontale","schemas.vertical":"Verticale","schemas.left":"Sinistra","schemas.center":"Centro","schemas.right":"Destra","schemas.top":"Sopra","schemas.middle":"Medio","schemas.bottom":"Sotto","schemas.padding":"Padding","schemas.text.fontName":"Nome del font","schemas.text.size":"Dimensione","schemas.text.spacing":"Spaziatura","schemas.text.textAlign":"Allineamento testo","schemas.text.verticalAlign":"Allineamento verticale","schemas.text.lineHeight":"Altezza della linea","schemas.text.min":"Minimo","schemas.text.max":"Massimo","schemas.text.fit":"Adatta","schemas.text.dynamicFontSize":"Dimensione font dinamica","schemas.barcodes.barColor":"Colore barra","schemas.barcodes.includetext":"Includi testo","schemas.table.alternateBackgroundColor":"Colore di Sfondo Alternato","schemas.table.tableStyle":"Stile della Tabella","schemas.table.headStyle":"Stile dell'Intestazione","schemas.table.bodyStyle":"Stile del Corpo","schemas.table.columnStyle":"Stile della Colonna"},dictPl={cancel:"Anuluj",field:"pole",fieldName:"Klucz pola",align:"Wyrównanie",width:"Szerokość",height:"Wysokość",opacity:"przezroczystość",rotate:"Obrót",edit:"Edytuj",plsInputName:"Wymagane wprowadzenie klucza pola",fieldMustUniq:"Klucz pola nie jest unikalny",notUniq:"(Klucz pola nie jest unikalny)",noKeyName:"Brak nazwy klucza pola",fieldsList:"Lista pól",editField:"Edytuj pole",type:"Typ pola",errorOccurred:"Wystąpił błąd",errorBulkUpdateFieldName:"Nie można wprowadzić zmian ponieważ liczba elementów uległa zmianie.",commitBulkUpdateFieldName:"Zaakceptuj zmiany",bulkUpdateFieldName:"Masowo aktualizuj klucze pól",addPageAfter:"Dodaj stronę po",removePage:"Usuń Bieżącą Stronę",removePageConfirm:"Czy na pewno chcesz usunąć tę stronę? Tej operacji nie można cofnąć.",hexColorPrompt:"Wprowadź poprawny kod koloru szesnastkowego.","schemas.color":"Kolor","schemas.borderWidth":"Szerokość obramowania","schemas.borderColor":"Kolor obramowania","schemas.backgroundColor":"Kolor tła","schemas.textColor":"Kolor tekstu","schemas.bgColor":"Kolor tła","schemas.horizontal":"Poziomo","schemas.vertical":"Pionowo","schemas.left":"Lewo","schemas.center":"Centrum","schemas.right":"Prawo","schemas.top":"Góra","schemas.middle":"Środek","schemas.bottom":"Dół","schemas.padding":"Odsadzenie","schemas.text.fontName":"Nazwa czcionki","schemas.text.size":"Rozmiar","schemas.text.spacing":"Odstępy","schemas.text.textAlign":"Wyrównanie tekstu","schemas.text.verticalAlign":"Wyrównanie pionowe","schemas.text.lineHeight":"Wysokość linii","schemas.text.min":"Minimum","schemas.text.max":"Maksimum","schemas.text.fit":"Dopasowanie","schemas.text.dynamicFontSize":"Dynamiczny rozmiar czcionki","schemas.barcodes.barColor":"Kolor paska","schemas.barcodes.includetext":"Dołącz tekst","schemas.table.alternateBackgroundColor":"Alternatywny kolor tła","schemas.table.tableStyle":"Styl tabeli","schemas.table.headStyle":"Styl nagłówka","schemas.table.bodyStyle":"Styl ciała","schemas.table.columnStyle":"Styl kolumny"},dictDe={cancel:"Abbrechen",field:"Feld",fieldName:"Name",align:"Ausrichten",width:"Breite",height:"Höhe",opacity:"Opazität",rotate:"Drehen",edit:"Bearbeiten",plsInputName:"Bitte geben Sie einen Namen ein",fieldMustUniq:"Feldname ist nicht eindeutig",notUniq:"(Nicht eindeutiger Name)",noKeyName:"Kein Name",fieldsList:"Feldliste",editField:"Feld bearbeiten",type:"Typ",errorOccurred:"Ein Fehler ist aufgetreten",errorBulkUpdateFieldName:"Die Änderung kann nicht übernommen werden, weil die Anzahl der Elemente geändert wurde.",commitBulkUpdateFieldName:"Änderungen übernehmen",bulkUpdateFieldName:"Mehrfachaktualisierung der Feldnamen",addPageAfter:"Seite danach hinzufügen",removePage:"Aktuelle Seite entfernen",removePageConfirm:"Sind Sie sicher, dass Sie diese Seite löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",hexColorPrompt:"Bitte geben Sie einen gültigen Hex-Farbcode ein.","schemas.color":"Farbe","schemas.borderWidth":"Rahmenbreite","schemas.borderColor":"Rahmenfarbe","schemas.backgroundColor":"Hintergrundfarbe","schemas.textColor":"Textfarbe","schemas.bgColor":"Hintergrundfarbe","schemas.horizontal":"Horizontal","schemas.vertical":"Vertikal","schemas.left":"Links","schemas.center":"Zentriert","schemas.right":"Rechts","schemas.top":"Oben","schemas.middle":"Mitte","schemas.bottom":"Unten","schemas.padding":"Polsterung","schemas.text.fontName":"Schriftart","schemas.text.size":"Größe","schemas.text.spacing":"Abstand","schemas.text.textAlign":"Ausrichtung","schemas.text.verticalAlign":"vert. Ausr.","schemas.text.lineHeight":"Zeilenhöhe","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Anpassen","schemas.text.dynamicFontSize":"Dynamische Schriftgröße","schemas.barcodes.barColor":"Strichcodefarbe","schemas.barcodes.includetext":"Text anzeigen","schemas.table.alternateBackgroundColor":"Wechselnde Hintergrundfarbe","schemas.table.tableStyle":"Tabellenstil","schemas.table.headStyle":"Kopfzeilenstil","schemas.table.bodyStyle":"Körperstil","schemas.table.columnStyle":"Spaltenstil"},dictEs={cancel:"Cancelar",field:"campo",fieldName:"Nombre",align:"Alinear",width:"Anchura",height:"Altura",opacity:"Opacidad",rotate:"Rotar",edit:"Editar",plsInputName:"Introduce el nombre",fieldMustUniq:"El nombre del campo no es único",notUniq:"(Nombre no único)",noKeyName:"Sin nombre",fieldsList:"Lista de campos",editField:"Editar campo",type:"Tipo",errorOccurred:"Ocurrió un error",errorBulkUpdateFieldName:"No se puede confirmar el cambio porque el número de elementos ha cambiado.",commitBulkUpdateFieldName:"Confirmar cambios",bulkUpdateFieldName:"Actualizar en bloque el nombre de los campos",addPageAfter:"Insertar página",removePage:"Eliminar página actual",removePageConfirm:"¿Estás seguro de que quieres eliminar esta página? Esta acción no se puede deshacer.",hexColorPrompt:"Introduce un código de color hexadecimal válido.","schemas.color":"Color","schemas.borderWidth":"Ancho del borde","schemas.borderColor":"Color del borde","schemas.backgroundColor":"Color de fondo","schemas.textColor":"Color del texto","schemas.bgColor":"Color del fondo","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Izquierda","schemas.center":"Centro","schemas.right":"Derecha","schemas.top":"Arriba","schemas.middle":"Medio","schemas.bottom":"Abajo","schemas.padding":"Relleno","schemas.text.fontName":"Nombre de la fuente","schemas.text.size":"Tamaño","schemas.text.spacing":"Espaciado","schemas.text.textAlign":"Alineación del texto","schemas.text.verticalAlign":"Alineación vertical","schemas.text.lineHeight":"Altura de línea","schemas.text.min":"Mín","schemas.text.max":"Máx","schemas.text.fit":"Ajustar","schemas.text.dynamicFontSize":"Tamaño de fuente dinámico","schemas.barcodes.barColor":"Color de la barra","schemas.barcodes.includetext":"Incluir texto","schemas.table.alternateBackgroundColor":"Color de fondo alternativo","schemas.table.tableStyle":"Estilo de tabla","schemas.table.headStyle":"Estilo de cabecera","schemas.table.bodyStyle":"Estilo de cuerpo","schemas.table.columnStyle":"Estilo de columna"},dictFr={cancel:"Annuler",field:"Champ",fieldName:"Nom",align:"Aligner",width:"Largeur",height:"Hauteur",opacity:"Opacité",rotate:"Rotation",edit:"Éditer",plsInputName:"Veuillez saisir le nom",fieldMustUniq:"Le nom du champ n'est pas unique",notUniq:"(Nombre non unique)",noKeyName:"Pas de nom",fieldsList:"Liste des champs",editField:"Éditer le champ",type:"Type",errorOccurred:" Une erreur est survenue",errorBulkUpdateFieldName:"Impossible de confirmer le changement car le nombre d'éléments a changé.",commitBulkUpdateFieldName:"Confirmer les changements",bulkUpdateFieldName:"Modifier les noms de champs en masse",addPageAfter:"Ajouter une page après",removePage:"Supprimer la page actuelle",removePageConfirm:"Êtes-vous sûr de vouloir supprimer cette page ? Cette action est irréversible.",hexColorPrompt:"Veuillez entrer un code couleur hexadécimal valide.","schemas.color":"Couleur","schemas.borderWidth":"Largeur de la bordure","schemas.borderColor":"Couleur de la bordure","schemas.backgroundColor":"Couleur de fond","schemas.textColor":"Couleur du texte","schemas.bgColor":"Couleur de fond","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Gauche","schemas.center":"Centre","schemas.right":"Droite","schemas.top":"Haut","schemas.middle":"Milieu","schemas.bottom":"Bas","schemas.padding":"Zone de remplissage","schemas.text.fontName":"Nom de la police","schemas.text.size":"Taille","schemas.text.spacing":"Espacement","schemas.text.textAlign":"Alignement du texte","schemas.text.verticalAlign":"Alignement vertical","schemas.text.lineHeight":"Hauteur de ligne","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Ajustement","schemas.text.dynamicFontSize":"Taille de police dynamique","schemas.barcodes.barColor":"Couleur de la barre","schemas.barcodes.includetext":"Inclure le texte","schemas.table.alternateBackgroundColor":"Couleur de fond alternative","schemas.table.tableStyle":"Style de tableau","schemas.table.headStyle":"Style d'en-tête","schemas.table.bodyStyle":"Style de corps","schemas.table.columnStyle":"Style de colonne"},dictionaries={en:dictEn,zh:dictZh,ja:dictJa,ko:dictKo,ar:dictAr,th:dictTh,it:dictIt,pl:dictPl,de:dictDe,es:dictEs,fr:dictFr},getDict=a=>dictionaries[a]||dictionaries[DEFAULT_LANG],i18n=(a,s)=>(s||getDict(DEFAULT_LANG))[a],I18nContext=reactExports.createContext(i18n),FontContext=reactExports.createContext(getDefaultFont()),PluginsRegistry=reactExports.createContext(builtInPlugins),OptionsContext=reactExports.createContext({});function arrayMove(a,s,$){const _=a.slice();return _.splice($<0?_.length+$:$,0,_.splice(s,1)[0]),_}function getSortedRects(a,s){return a.reduce(($,_,_e)=>{const tt=s.get(_);return tt&&($[_e]=tt),$},Array(a.length))}function isValidIndex(a){return a!==null&&a>=0}function itemsEqual(a,s){if(a===s)return!0;if(a.length!==s.length)return!1;for(let $=0;$<a.length;$++)if(a[$]!==s[$])return!1;return!0}function normalizeDisabled(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const rectSortingStrategy=a=>{let{rects:s,activeIndex:$,overIndex:_,index:_e}=a;const tt=arrayMove(s,_,$),nt=s[_e],at=tt[_e];return!at||!nt?null:{x:at.left-nt.left,y:at.top-nt.top,scaleX:at.width/nt.width,scaleY:at.height/nt.height}},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=a=>{var s;let{activeIndex:$,activeNodeRect:_,index:_e,rects:tt,overIndex:nt}=a;const at=(s=tt[$])!=null?s:_;if(!at)return null;if(_e===$){const rt=tt[nt];return rt?{x:0,y:$<nt?rt.top+rt.height-(at.top+at.height):rt.top-at.top,...defaultScale$1}:null}const ot=getItemGap$1(tt,_e,$);return _e>$&&_e<=nt?{x:0,y:-at.height-ot,...defaultScale$1}:_e<$&&_e>=nt?{x:0,y:at.height+ot,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};function getItemGap$1(a,s,$){const _=a[s],_e=a[s-1],tt=a[s+1];return _?$<s?_e?_.top-(_e.top+_e.height):tt?tt.top-(_.top+_.height):0:tt?tt.top-(_.top+_.height):_e?_.top-(_e.top+_e.height):0:0}const ID_PREFIX="Sortable",Context$1=React$a.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(a){let{children:s,id:$,items:_,strategy:_e=rectSortingStrategy,disabled:tt=!1}=a;const{active:nt,dragOverlay:at,droppableRects:ot,over:rt,measureDroppableContainers:st}=useDndContext(),lt=useUniqueId(ID_PREFIX,$),et=at.rect!==null,it=reactExports.useMemo(()=>_.map(vt=>typeof vt=="object"&&"id"in vt?vt.id:vt),[_]),ut=nt!=null,ft=nt?it.indexOf(nt.id):-1,ht=rt?it.indexOf(rt.id):-1,dt=reactExports.useRef(it),gt=!itemsEqual(it,dt.current),pt=ht!==-1&&ft===-1||gt,mt=normalizeDisabled(tt);useIsomorphicLayoutEffect$1(()=>{gt&&ut&&st(it)},[gt,it,ut,st]),reactExports.useEffect(()=>{dt.current=it},[it]);const ct=reactExports.useMemo(()=>({activeIndex:ft,containerId:lt,disabled:mt,disableTransforms:pt,items:it,overIndex:ht,useDragOverlay:et,sortedRects:getSortedRects(it,ot),strategy:_e}),[ft,lt,mt.draggable,mt.droppable,pt,it,ht,ot,et,_e]);return React$a.createElement(Context$1.Provider,{value:ct},s)}const defaultNewIndexGetter=a=>{let{id:s,items:$,activeIndex:_,overIndex:_e}=a;return arrayMove($,_,_e).indexOf(s)},defaultAnimateLayoutChanges=a=>{let{containerId:s,isSorting:$,wasDragging:_,index:_e,items:tt,newIndex:nt,previousItems:at,previousContainerId:ot,transition:rt}=a;return!rt||!_||at!==tt&&_e===nt?!1:$?!0:nt!==_e&&s===ot},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=CSS$1.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useDerivedTransform(a){let{disabled:s,index:$,node:_,rect:_e}=a;const[tt,nt]=reactExports.useState(null),at=reactExports.useRef($);return useIsomorphicLayoutEffect$1(()=>{if(!s&&$!==at.current&&_.current){const ot=_e.current;if(ot){const rt=getClientRect$1(_.current,{ignoreTransform:!0}),st={x:ot.left-rt.left,y:ot.top-rt.top,scaleX:ot.width/rt.width,scaleY:ot.height/rt.height};(st.x||st.y)&&nt(st)}}$!==at.current&&(at.current=$)},[s,$,_,_e]),reactExports.useEffect(()=>{tt&&nt(null)},[tt]),tt}function useSortable(a){let{animateLayoutChanges:s=defaultAnimateLayoutChanges,attributes:$,disabled:_,data:_e,getNewIndex:tt=defaultNewIndexGetter,id:nt,strategy:at,resizeObserverConfig:ot,transition:rt=defaultTransition}=a;const{items:st,containerId:lt,activeIndex:et,disabled:it,disableTransforms:ut,sortedRects:ft,overIndex:ht,useDragOverlay:dt,strategy:gt}=reactExports.useContext(Context$1),pt=normalizeLocalDisabled(_,it),mt=st.indexOf(nt),ct=reactExports.useMemo(()=>({sortable:{containerId:lt,index:mt,items:st},..._e}),[lt,_e,mt,st]),vt=reactExports.useMemo(()=>st.slice(st.indexOf(nt)),[st,nt]),{rect:At,node:xt,isOver:bt,setNodeRef:Et}=useDroppable({id:nt,data:ct,disabled:pt.droppable,resizeObserverConfig:{updateMeasurementsFor:vt,...ot}}),{active:St,activatorEvent:Bt,activeNodeRect:Ot,attributes:Tt,setNodeRef:wt,listeners:Ct,isDragging:It,over:yt,setActivatorNodeRef:Rt,transform:kt}=useDraggable({id:nt,data:ct,attributes:{...defaultAttributes,...$},disabled:pt.draggable}),jt=useCombinedRefs(Et,wt),Ht=!!St,Ft=Ht&&!ut&&isValidIndex(et)&&isValidIndex(ht),_t=!dt&&It,Nt=_t&&Ft?kt:null,Lt=Ft?Nt??(at??gt)({rects:ft,activeNodeRect:Ot,activeIndex:et,overIndex:ht,index:mt}):null,$t=isValidIndex(et)&&isValidIndex(ht)?tt({id:nt,items:st,activeIndex:et,overIndex:ht}):mt,Pt=St==null?void 0:St.id,Dt=reactExports.useRef({activeId:Pt,items:st,newIndex:$t,containerId:lt}),Ut=st!==Dt.current.items,Vt=s({active:St,containerId:lt,isDragging:It,isSorting:Ht,id:nt,index:mt,items:st,newIndex:Dt.current.newIndex,previousItems:Dt.current.items,previousContainerId:Dt.current.containerId,transition:rt,wasDragging:Dt.current.activeId!=null}),Qt=useDerivedTransform({disabled:!Vt,index:mt,node:xt,rect:At});return reactExports.useEffect(()=>{Ht&&Dt.current.newIndex!==$t&&(Dt.current.newIndex=$t),lt!==Dt.current.containerId&&(Dt.current.containerId=lt),st!==Dt.current.items&&(Dt.current.items=st)},[Ht,$t,lt,st]),reactExports.useEffect(()=>{if(Pt===Dt.current.activeId)return;if(Pt&&!Dt.current.activeId){Dt.current.activeId=Pt;return}const Zt=setTimeout(()=>{Dt.current.activeId=Pt},50);return()=>clearTimeout(Zt)},[Pt]),{active:St,activeIndex:et,attributes:Tt,data:ct,rect:At,index:mt,newIndex:$t,items:st,isOver:bt,isSorting:Ht,isDragging:It,listeners:Ct,node:xt,overIndex:ht,over:yt,setNodeRef:jt,setActivatorNodeRef:Rt,setDroppableNodeRef:Et,setDraggableNodeRef:wt,transform:Qt??Lt,transition:qt()};function qt(){if(Qt||Ut&&Dt.current.newIndex===mt)return disabledTransition;if(!(_t&&!isKeyboardEvent(Bt)||!rt)&&(Ht||Vt))return CSS$1.Transition.toString({...rt,property:transitionProperty})}}function normalizeLocalDisabled(a,s){var $,_;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:($=a==null?void 0:a.draggable)!=null?$:s.draggable,droppable:(_=a==null?void 0:a.droppable)!=null?_:s.droppable}}function hasSortableData(a){if(!a)return!1;const s=a.data.current;return!!(s&&"sortable"in s&&typeof s.sortable=="object"&&"containerId"in s.sortable&&"items"in s.sortable&&"index"in s.sortable)}const directions=[KeyboardCode.Down,KeyboardCode.Right,KeyboardCode.Up,KeyboardCode.Left],sortableKeyboardCoordinates=(a,s)=>{let{context:{active:$,collisionRect:_,droppableRects:_e,droppableContainers:tt,over:nt,scrollableAncestors:at}}=s;if(directions.includes(a.code)){if(a.preventDefault(),!$||!_)return;const ot=[];tt.getEnabled().forEach(lt=>{if(!lt||lt!=null&&lt.disabled)return;const et=_e.get(lt.id);if(et)switch(a.code){case KeyboardCode.Down:_.top<et.top&&ot.push(lt);break;case KeyboardCode.Up:_.top>et.top&&ot.push(lt);break;case KeyboardCode.Left:_.left>et.left&&ot.push(lt);break;case KeyboardCode.Right:_.left<et.left&&ot.push(lt);break}});const rt=closestCorners({active:$,collisionRect:_,droppableRects:_e,droppableContainers:ot,pointerCoordinates:null});let st=getFirstCollision(rt,"id");if(st===(nt==null?void 0:nt.id)&&rt.length>1&&(st=rt[1].id),st!=null){const lt=tt.get($.id),et=tt.get(st),it=et?_e.get(et.id):null,ut=et==null?void 0:et.node.current;if(ut&&it&&lt&&et){const ht=getScrollableAncestors(ut).some((vt,At)=>at[At]!==vt),dt=isSameContainer(lt,et),gt=isAfter(lt,et),pt=ht||!dt?{x:0,y:0}:{x:gt?_.width-it.width:0,y:gt?_.height-it.height:0},mt={x:it.left,y:it.top};return pt.x&&pt.y?mt:subtract(mt,pt)}}}};function isSameContainer(a,s){return!hasSortableData(a)||!hasSortableData(s)?!1:a.data.current.sortable.containerId===s.data.current.sortable.containerId}function isAfter(a,s){return!hasSortableData(a)||!hasSortableData(s)||!isSameContainer(a,s)?!1:a.data.current.sortable.index<s.data.current.sortable.index}const{Text:Text$4}=Typography$1,Item=React$a.memo(React$a.forwardRef(({value:a,status:s,title:$,style:_,dragOverlay:_e,onClick:tt,onMouseEnter:nt,onMouseLeave:at,dragging:ot,fadeIn:rt,listeners:st,sorting:lt,transition:et,transform:it,...ut},ft)=>{const ht=reactExports.useContext(I18nContext);reactExports.useEffect(()=>{if(_e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[_e]);const{x:dt,y:gt,scaleX:pt,scaleY:mt}=it||{x:0,y:0,scaleX:1,scaleY:1};return jsxRuntimeExports.jsx("li",{style:{marginTop:10,transition:et,transform:`translate(${dt}px, ${gt}px) scale(${pt}, ${mt})`},onMouseEnter:nt,onMouseLeave:at,ref:ft,children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",..._},...ut,onClick:()=>tt&&tt(),children:[jsxRuntimeExports.jsx(Button$2,{...st,style:{display:"flex",alignItems:"center",background:"none",boxShadow:"none",border:"none",paddingLeft:"0.25rem"},icon:jsxRuntimeExports.jsx(HolderOutlined$1,{style:{cursor:"grab"}})}),jsxRuntimeExports.jsx(Text$4,{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},title:$||"",children:s===void 0?a:jsxRuntimeExports.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(ExclamationCircleOutlined$1,{width:15,style:{marginRight:"0.5rem"}}),s==="is-warning"?ht("noKeyName"):a,s==="is-danger"?ht("notUniq"):""]})})]})})})),Item$1=Item,usePrevious=a=>{const s=reactExports.useRef(null);return reactExports.useEffect(()=>{s.current=a}),s.current},getScale=(a,s)=>Math.floor((a/s>1?1:a/s)*100)/100,useUIPreProcessor=({template:a,size:s,zoomLevel:$})=>{const[_,_e]=reactExports.useState([]),[tt,nt]=reactExports.useState([]),[at,ot]=reactExports.useState(0),[rt,st]=reactExports.useState(null),lt=async et=>{const{template:{basePdf:it,schemas:ut},size:ft}=et;let ht,dt,gt,pt;if(isBlankPdf(it)){const{width:ct,height:vt}=it;ht=ct*ZOOM,dt=vt*ZOOM,gt=ut.map(()=>"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII="),pt=ut.map(()=>({width:ct,height:vt}))}else{const ct=await getB64BasePdf(it),vt=b64toBlob(ct);pt=await getPdfPageSizes(vt),ht=pt[0].width*ZOOM,dt=pt[0].height*ZOOM,gt=await pdf2Pngs(vt,ht)}const mt=Math.min(getScale(ft.width,ht),getScale(ft.height-RULER_HEIGHT,dt));return{backgrounds:gt,pageSizes:pt,scale:mt}};return reactExports.useEffect(()=>{lt({template:a,size:s}).then(({pageSizes:et,scale:it,backgrounds:ut})=>{nt(et),ot(it),_e(ut)}).catch(et=>{st(et),console.error(`[@pdfme/ui] ${et}`)})},[a,s]),{backgrounds:_,pageSizes:tt,scale:at*$,error:rt,refresh:et=>lt({template:et,size:s}).then(({pageSizes:it,scale:ut,backgrounds:ft})=>{nt(it),ot(ut),_e(ft)})}},useScrollPageCursor=({ref:a,pageSizes:s,scale:$,pageCursor:_,onChangePageCursor:_e})=>{const tt=reactExports.useCallback(()=>{if(!s[0]||!a.current)return;const nt=a.current.scrollTop,{top:at}=a.current.getBoundingClientRect(),ot=s.reduce((st,lt,et)=>{let it=(lt.height*ZOOM+RULER_HEIGHT)*$;return et===0?it+=at-it/2:it+=st[et-1],st.concat(it)},[]);let rt=0;ot.forEach((st,lt)=>{nt>st&&(rt=lt+1>=ot.length?ot.length-1:lt+1)}),rt!==_&&_e(rt)},[_e,_,s,a,$]);reactExports.useEffect(()=>{var nt;return(nt=a.current)==null||nt.addEventListener("scroll",tt),()=>{var at;(at=a.current)==null||at.removeEventListener("scroll",tt)}},[a,tt])},useMountStatus=()=>{const[a,s]=reactExports.useState(!1);return reactExports.useEffect(()=>{const $=setTimeout(()=>s(!0),500);return()=>clearTimeout($)},[]),a},useInitEvents=({pageCursor:a,pageSizes:s,activeElements:$,template:_,schemasList:_e,changeSchemas:tt,commitSchemas:nt,removeSchemas:at,onSaveTemplate:ot,past:rt,future:st,setSchemasList:lt,onEdit:et,onEditEnd:it})=>{const ut=reactExports.useRef(null),ft=reactExports.useCallback(()=>{const dt=()=>{const pt=$.map(mt=>mt.id);return _e[a].filter(mt=>pt.includes(mt.id))},gt=pt=>{const mt=pt==="undo",ct=mt?rt:st;if(ct.current.length<=0)return;(mt?st:rt).current.push(cloneDeep$2(_e[a]));const vt=cloneDeep$2(_e);vt[a]=ct.current.pop(),lt(vt)};initShortCuts({move:(pt,mt)=>{const ct=s[a],vt=dt(),At=moveCommandToChangeSchemasArg({command:pt,activeSchemas:vt,pageSize:ct,isShift:mt});tt(At)},copy:()=>{const pt=dt();pt.length!==0&&(ut.current=pt)},paste:()=>{if(!ut.current||ut.current.length===0)return;const pt=_e[a],mt=[],ct=ut.current.map(vt=>{const At=uuid$6(),xt=getUniqSchemaKey({copiedSchemaKey:vt.key,schema:pt,stackUniqSchemaKeys:mt}),{height:bt,width:Et,position:St}=vt,Bt=s[a],Ot={x:St.x+10>Bt.width-Et?Bt.width-Et:St.x+10,y:St.y+10>Bt.height-bt?Bt.height-bt:St.y+10};return Object.assign(cloneDeep$2(vt),{id:At,key:xt,position:Ot})});nt(_e[a].concat(ct)),et(ct.map(vt=>document.getElementById(vt.id))),ut.current=ct},redo:()=>gt("redo"),undo:()=>gt("undo"),save:()=>ot&&ot(schemasList2template(_e,_.basePdf)),remove:()=>at(dt().map(pt=>pt.id)),esc:it,selectAll:()=>et(_e[a].map(pt=>document.getElementById(pt.id)))})},[_,$,a,s,tt,nt,_e,ot,at,rt,st,lt,ut,et,it]),ht=reactExports.useCallback(()=>{destroyShortCuts()},[]);reactExports.useEffect(()=>(ft(),ht),[ft,ht])},SelectableSortableItem=({isSelected:a,style:s,onSelect:$,onEdit:_,schema:_e,schemas:tt,onMouseEnter:nt,onMouseLeave:at})=>{const{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),{setNodeRef:st,listeners:lt,isDragging:et,isSorting:it,transform:ut,transition:ft}=useSortable({id:_e.id}),ht=useMountStatus(),dt=et&&!ht,gt={...lt,onClick:vt=>$(_e.id,vt.shiftKey)};let pt;_e.key?tt.find(vt=>_e.key&&vt.key===_e.key&&vt.id!==_e.id)&&(pt="is-danger"):pt="is-warning";let mt=rt("edit");pt==="is-warning"?mt=rt("plsInputName"):pt==="is-danger"&&(mt=rt("fieldMustUniq"));const ct=a?{background:ot.colorPrimary,opacity:it||et?.5:1}:{};return jsxRuntimeExports.jsx(Item$1,{ref:st,onMouseEnter:nt,onMouseLeave:at,onClick:()=>_(_e.id),value:_e.key,status:pt,title:mt,style:{...ct,...s},dragging:et,sorting:it,transition:ft,transform:ut,fadeIn:dt,listeners:gt})},SelectableSortableItem$1=SelectableSortableItem,SelectableSortableContainer=a=>{const{token:s}=theme.useToken(),{schemas:$,onEdit:_,onSortEnd:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt}=a,[at,ot]=reactExports.useState([]),[rt,st]=reactExports.useState(null),[lt,et]=reactExports.useState(null),it=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:15}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),ut=ht=>at.map(dt=>dt.id).includes(ht),ft=(ht,dt)=>{if(dt)if(ut(ht)){const gt=at.filter(pt=>pt.id!==ht);ot(gt)}else{const gt=$.find(mt=>mt.id===ht),pt=at.concat(gt);ot(pt)}else ot([])};return jsxRuntimeExports.jsx(DndContext,{sensors:it,collisionDetection:closestCorners,onDragStart:({active:ht})=>{et(String(ht.id)),st($),ut(String(ht.id))?at.length>0&&_e(at.reduce((dt,gt)=>gt.id===String(ht.id)?dt:dt.filter(pt=>pt!==gt),$)):ot([])},onDragEnd:({active:ht,over:dt})=>{const gt=(dt==null?void 0:dt.id)||"",pt=$.map(ct=>ct.id).indexOf(String(ht.id)),mt=$.map(ct=>ct.id).indexOf(String(gt));if(at.length){let ct=[...$];ct=arrayMove(ct,pt,mt),ct.splice(mt+1,0,...at.filter(vt=>vt.id!==lt)),_e(ct),ot([])}else pt!==mt&&_e(arrayMove($,pt,mt));et(null)},onDragCancel:()=>{rt&&_e(rt),et(null),st(null)},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{style:{height:"100%",overflowY:"auto"},children:jsxRuntimeExports.jsx(SortableContext,{items:$,strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",borderRadius:5},children:$.map(ht=>jsxRuntimeExports.jsx(SelectableSortableItem$1,{style:{border:`1px solid ${ht.id===tt?s.colorPrimary:"transparent"}`},schema:ht,schemas:$,isSelected:ut(ht.id)||lt===ht.id,onEdit:_,onSelect:ft,onMouseEnter:()=>nt(ht.id),onMouseLeave:()=>nt(null)},ht.id))})})}),reactDomExports.createPortal(jsxRuntimeExports.jsx(DragOverlay,{adjustScale:!0,children:lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:jsxRuntimeExports.jsx(Item$1,{value:$.find(ht=>ht.id===lt).key,style:{background:s.colorPrimary},dragOverlay:!0})}),jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:at.filter(ht=>ht.id!==lt).map(ht=>jsxRuntimeExports.jsx(Item$1,{value:ht.key,style:{background:s.colorPrimary},dragOverlay:!0},ht.id))})]}):null}),document.body)]})})},SelectableSortableContainer$1=SelectableSortableContainer,{Text:Text$3}=Typography$1,{TextArea:TextArea$2}=_Input,headHeight=40,ListView=a=>{const{schemas:s,onSortEnd:$,onEdit:_,size:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,changeSchemas:at}=a,{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),[st,lt]=reactExports.useState(!1),[et,it]=reactExports.useState(""),ut=getSidebarContentHeight(_e.height),ft=()=>{const dt=et.split(`
590
590
  `);dt.length!==s.length?alert(rt("errorBulkUpdateFieldName")):(at(dt.map((gt,pt)=>({key:"key",value:gt,schemaId:s[pt].id}))),lt(!1))},ht=()=>{it(s.map(dt=>dt.key).join(`
591
591
  `)),lt(!0)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{style:{height:headHeight,display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Text$3,{strong:!0,style:{textAlign:"center",width:"100%"},children:rt("fieldsList")})}),jsxRuntimeExports.jsx(Divider$1,{style:{marginTop:ot.marginXS,marginBottom:ot.marginXS}}),jsxRuntimeExports.jsxs("div",{style:{height:ut-headHeight},children:[st?jsxRuntimeExports.jsx(TextArea$2,{wrap:"off",value:et,onChange:dt=>it(dt.target.value),style:{paddingLeft:30,height:ut-headHeight,width:RIGHT_SIDEBAR_WIDTH-35,lineHeight:"2.75rem"}}):jsxRuntimeExports.jsx(SelectableSortableContainer$1,{schemas:s,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,onSortEnd:$,onEdit:_}),jsxRuntimeExports.jsx("div",{style:{paddingTop:"0.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:st?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:ft,children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("commitBulkUpdateFieldName")]})}),jsxRuntimeExports.jsx("span",{style:{margin:"0 1rem"},children:"/"}),jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:()=>lt(!1),children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("cancel")]})})]}):jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:ht,children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("bulkUpdateFieldName")]})})})]})]})},ListView$1=ListView;/*! *****************************************************************************
592
592
  Copyright (c) Microsoft Corporation.
@@ -10,7 +10,7 @@ export declare abstract class BaseUIClass {
10
10
  private readonly setSize;
11
11
  resizeObserver: ResizeObserver;
12
12
  constructor(props: UIProps);
13
- protected getLang(): "en" | "th" | "pl" | "ja" | "ar" | "it" | "de" | "es" | "fr";
13
+ protected getLang(): "en" | "th" | "pl" | "zh" | "ja" | "ko" | "ar" | "it" | "de" | "es" | "fr";
14
14
  protected getFont(): Record<string, {
15
15
  data: (string | ArrayBuffer | Uint8Array) & (string | ArrayBuffer | Uint8Array | undefined);
16
16
  fallback?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/ui",
3
- "version": "4.0.0-dev.6",
3
+ "version": "4.0.0-dev.7",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",
package/src/i18n.ts CHANGED
@@ -61,6 +61,65 @@ const dictEn: { [key in keyof Dict]: string } = {
61
61
  'schemas.table.columnStyle': 'Column Style',
62
62
  };
63
63
 
64
+ const dictZh: { [key in keyof Dict]: string } = {
65
+ cancel: '取消',
66
+ field: '字段',
67
+ fieldName: '名称',
68
+ align: '对齐',
69
+ width: '宽度',
70
+ height: '高度',
71
+ opacity: '透明度',
72
+ rotate: '旋转',
73
+ edit: '编辑',
74
+ plsInputName: '请输入名称',
75
+ fieldMustUniq: '字段名称必须唯一',
76
+ notUniq: '(名称不唯一)',
77
+ noKeyName: '无名称',
78
+ fieldsList: '字段列表',
79
+ editField: '编辑字段',
80
+ type: '类型',
81
+ errorOccurred: '发生错误',
82
+ errorBulkUpdateFieldName: '由于项目数量已更改,无法提交更改。',
83
+ commitBulkUpdateFieldName: '提交更改',
84
+ bulkUpdateFieldName: '批量更新字段名称',
85
+ addPageAfter: '在之后添加页面',
86
+ removePage: '删除当前页面',
87
+ removePageConfirm: '您确定要删除此页面吗?此操作无法撤销。',
88
+ hexColorPrompt: '请输入有效的十六进制颜色代码。',
89
+ 'schemas.color': '颜色',
90
+ 'schemas.borderWidth': '边框宽度',
91
+ 'schemas.borderColor': '边框颜色',
92
+ 'schemas.backgroundColor': '背景颜色',
93
+ 'schemas.textColor': '文字颜色',
94
+ 'schemas.bgColor': '背景颜色',
95
+ 'schemas.horizontal': '水平',
96
+ 'schemas.vertical': '垂直',
97
+ 'schemas.left': '左',
98
+ 'schemas.center': '中',
99
+ 'schemas.right': '右',
100
+ 'schemas.top': '顶',
101
+ 'schemas.middle': '中间',
102
+ 'schemas.bottom': '底',
103
+ 'schemas.padding': '填充',
104
+ 'schemas.text.fontName': '字体名称',
105
+ 'schemas.text.size': '大小',
106
+ 'schemas.text.spacing': '间距',
107
+ 'schemas.text.textAlign': '文本对齐',
108
+ 'schemas.text.verticalAlign': '垂直对齐',
109
+ 'schemas.text.lineHeight': '行高',
110
+ 'schemas.text.min': '最小',
111
+ 'schemas.text.max': '最大',
112
+ 'schemas.text.fit': '适应',
113
+ 'schemas.text.dynamicFontSize': '动态字体大小',
114
+ 'schemas.barcodes.barColor': '条码颜色',
115
+ 'schemas.barcodes.includetext': '包括文本',
116
+ 'schemas.table.alternateBackgroundColor': '交替背景颜色',
117
+ 'schemas.table.tableStyle': '表格样式',
118
+ 'schemas.table.headStyle': '表头样式',
119
+ 'schemas.table.bodyStyle': '表体样式',
120
+ 'schemas.table.columnStyle': '列样式',
121
+ };
122
+
64
123
  const dictJa: { [key in keyof Dict]: string } = {
65
124
  cancel: 'キャンセル',
66
125
  field: '入力項目',
@@ -120,6 +179,65 @@ const dictJa: { [key in keyof Dict]: string } = {
120
179
  'schemas.table.columnStyle': 'カラムスタイル',
121
180
  };
122
181
 
182
+ const dictKo: { [key in keyof Dict]: string } = {
183
+ cancel: '취소',
184
+ field: '필드',
185
+ fieldName: '이름',
186
+ align: '정렬',
187
+ width: '너비',
188
+ height: '높이',
189
+ opacity: '투명도',
190
+ rotate: '회전',
191
+ edit: '편집',
192
+ plsInputName: '이름을 입력하세요',
193
+ fieldMustUniq: '필드 이름은 유일해야 합니다',
194
+ notUniq: '(유일하지 않은 이름)',
195
+ noKeyName: '이름 없음',
196
+ fieldsList: '필드 목록',
197
+ editField: '필드 편집',
198
+ type: '유형',
199
+ errorOccurred: '오류 발생',
200
+ errorBulkUpdateFieldName: '항목 수가 변경되어 변경을 커밋할 수 없습니다.',
201
+ commitBulkUpdateFieldName: '변경 사항 커밋',
202
+ bulkUpdateFieldName: '필드 이름 일괄 업데이트',
203
+ addPageAfter: '다음에 페이지 추가',
204
+ removePage: '현재 페이지 제거',
205
+ removePageConfirm: '이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.',
206
+ hexColorPrompt: '유효한 16진수 색상 코드를 입력하세요.',
207
+ 'schemas.color': '색상',
208
+ 'schemas.borderWidth': '테두리 너비',
209
+ 'schemas.borderColor': '테두리 색상',
210
+ 'schemas.backgroundColor': '배경색',
211
+ 'schemas.textColor': '텍스트 색상',
212
+ 'schemas.bgColor': '배경색',
213
+ 'schemas.horizontal': '수평',
214
+ 'schemas.vertical': '수직',
215
+ 'schemas.left': '왼쪽',
216
+ 'schemas.center': '중앙',
217
+ 'schemas.right': '오른쪽',
218
+ 'schemas.top': '상단',
219
+ 'schemas.middle': '중간',
220
+ 'schemas.bottom': '하단',
221
+ 'schemas.padding': '패딩',
222
+ 'schemas.text.fontName': '글꼴 이름',
223
+ 'schemas.text.size': '크기',
224
+ 'schemas.text.spacing': '간격',
225
+ 'schemas.text.textAlign': '텍스트 정렬',
226
+ 'schemas.text.verticalAlign': '수직 정렬',
227
+ 'schemas.text.lineHeight': '줄 높이',
228
+ 'schemas.text.min': '최소',
229
+ 'schemas.text.max': '최대',
230
+ 'schemas.text.fit': '맞춤',
231
+ 'schemas.text.dynamicFontSize': '동적 폰트 크기',
232
+ 'schemas.barcodes.barColor': '바코드 색상',
233
+ 'schemas.barcodes.includetext': '텍스트 포함',
234
+ 'schemas.table.alternateBackgroundColor': '대체 배경색',
235
+ 'schemas.table.tableStyle': '테이블 스타일',
236
+ 'schemas.table.headStyle': '헤더 스타일',
237
+ 'schemas.table.bodyStyle': '본문 스타일',
238
+ 'schemas.table.columnStyle': '열 스타일',
239
+ };
240
+
123
241
  const dictAr: { [key in keyof Dict]: string } = {
124
242
  cancel: 'إلغاء',
125
243
  field: 'الحقل',
@@ -541,7 +659,9 @@ const dictFr: { [key in keyof Dict]: string } = {
541
659
 
542
660
  const dictionaries: { [key in Lang]: Dict } = {
543
661
  en: dictEn,
662
+ zh: dictZh,
544
663
  ja: dictJa,
664
+ ko: dictKo,
545
665
  ar: dictAr,
546
666
  th: dictTh,
547
667
  it: dictIt,