import{parseFragment as t,registerTemplate as e,freezeTemplate as s,registerDecorators as r,registerComponent as i}from"@kdcloudjs/kwc";import{s as o}from"../kddsCommon-CucK_w70.js";import"../observable-tloG64m6.js";import"../i18n-B98kiI7M.js";import{b as l}from"../normalize-C0Pp7GJL.js";import{parseToFormattedLinkifiedParts as n,isTextIgnoreRTL as a}from"./utilsPrivate.js";import u from"./shadowBaseClassPrivate.js";import"../empty_html-CjXB8rB4.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";var m=[[o]];const p=t`<span dir="ltr"${3}>${"t1"}</span>`,d=t`<a target="_blank"${"a0:href"} rel="noopener"${3}>${"t1"}</a>`;function h(t,e,s,r){const{d:i,sp:o,st:l,t:n,k:a,i:u,f:m}=t;return m([e.shouldFormat?null:e.ignoreRTL?l(p,1,[o(1,null,i(e.normalizedValue))]):null,e.shouldFormat||e.ignoreRTL?null:n(i(e.normalizedValue)),u(e.formattedParts,function(t){return[e.shouldFormat&&t.isLink?l(d,a(3,t.key),[o(0,{attrs:{href:t.href}},null),o(1,null,i(t.value))]):null,e.shouldFormat&&t.isText?n(i(t.value)):null]})])}var c=e(h);h.stylesheets=[],h.stylesheetToken="kwc-2sj394kinr2",h.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\baseFormattedText-undefined_baseFormattedText",m&&h.stylesheets.push.apply(h.stylesheets,m),s(h);class k extends u{constructor(...t){super(...t),this.value="",this._linkify=!1}get linkify(){return this._linkify}set linkify(t){this._linkify=l(t)}get shouldFormat(){return this.linkify&&this.isString}get isString(){return this.value&&"string"==typeof this.value}get isObject(){return"object"==typeof this.value}get normalizedValue(){return this.isObject?"":this.value}get formattedParts(){return this.isString?n(this.value,!0):[]}get ignoreRTL(){return a(this.value)}}r(k,{publicProps:{value:{config:0},linkify:{config:3}},track:{_linkify:1}});const f=i(k,{tmpl:c,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\baseFormattedText-",apiVersion:63});export{f as default};
