"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),S=require("@aplus-frontend/antdv"),d=require("@aplus-frontend/utils"),a=require("lodash-unified"),Y=require("../../../utils/format.js"),A=require("./utils.js");function g({value:t},e){if(!e?.ellipsis)return t;const n={...e,content:t,ellipsis:e.ellipsis?a.isBoolean(e.ellipsis)?{tooltip:t,rows:1}:{...e.ellipsis,tooltip:t}:!1};return u.createVNode(S.TypographyParagraph,n,null)}function y({value:t},e){const{joinSymbol:n}=a.merge({joinSymbol:" "},e);return t?.join?.(n)}function f({value:t},e){const{zoneAlias:n,format:r}=a.merge({zoneAlias:"LA",format:"YYYY-MM-DD HH:mm:ss"},e);return d.getTimeFormatToZone(t,n,r)}function p({value:t,record:e},n){const{fieldList:r,templateString:i="{0}",formatter:o}=n,s=r?.map((l,m)=>{const c=a.get(e,l);return o?o(c,m):c})||[];return s.length===0&&s.push(t),A.formatString(i,s)}function h({value:t,record:e},n){const{fieldList:r,format:i="YYYY-MM-DD HH:mm:ss",joinSymbol:o="~",zoneAlias:s="LA"}=n,l=Array.isArray(i)?i:[i,i];return p({value:t,record:e},{fieldList:r,templateString:`{0} ${o} {1}`,formatter(m,c){return f({value:m,record:e},{format:l[c],zoneAlias:s})}})}function b({record:t},e){const{urlPath:n="url",namePath:r="name",style:i,downloadFile:o,className:s}=e,l=a.get(t,r),m=a.get(t,n),c=a.debounce(()=>{o?.(m,l)},500);return u.createVNode("span",{style:i,class:[s,"ap-descriptions-item-content__link "],onClick:c},[l])}function M({value:t},e){const{style:n={},precision:r,isFixed:i=!0}=e;let o="";try{i?o=d.toThousand(t,r||0,"fixed"):o=Y.toDecimalMark(t,r)}catch{o=t}return u.createVNode("span",{style:n,class:"ap-descriptions-item-content__number"},[o])}const q={text:g,array:y,date:f,dateRange:h,template:p,number:M,attachment:b};exports.array=y;exports.attachment=b;exports.date=f;exports.dateRange=h;exports.formatterMap=q;exports.number=M;exports.template=p;exports.text=g;
