var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(u){var N=0;return function(){return N<u.length?{done:!1,value:u[N++]}:{done:!0}}};$jscomp.arrayIterator=function(u){return{next:$jscomp.arrayIteratorImpl(u)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(u,N,g){if(u==Array.prototype||u==Object.prototype)return u;u[N]=g.value;return u};$jscomp.getGlobal=function(u){u=["object"==typeof globalThis&&globalThis,u,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var N=0;N<u.length;++N){var g=u[N];if(g&&g.Math==Math)return g}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(u,N){var g=$jscomp.propertyToPolyfillSymbol[N];if(null==g)return u[N];g=u[g];return void 0!==g?g:u[N]};
$jscomp.polyfill=function(u,N,g,T){N&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(u,N,g,T):$jscomp.polyfillUnisolated(u,N,g,T))};$jscomp.polyfillUnisolated=function(u,N,g,T){g=$jscomp.global;u=u.split(".");for(T=0;T<u.length-1;T++){var U=u[T];if(!(U in g))return;g=g[U]}u=u[u.length-1];T=g[u];N=N(T);N!=T&&null!=N&&$jscomp.defineProperty(g,u,{configurable:!0,writable:!0,value:N})};
$jscomp.polyfillIsolated=function(u,N,g,T){var U=u.split(".");u=1===U.length;T=U[0];T=!u&&T in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var L=0;L<U.length-1;L++){var X=U[L];if(!(X in T))return;T=T[X]}U=U[U.length-1];g=$jscomp.IS_SYMBOL_NATIVE&&"es6"===g?T[U]:null;N=N(g);null!=N&&(u?$jscomp.defineProperty($jscomp.polyfills,U,{configurable:!0,writable:!0,value:N}):N!==g&&(void 0===$jscomp.propertyToPolyfillSymbol[U]&&(g=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[U]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(U):$jscomp.POLYFILL_PREFIX+g+"$"+U),$jscomp.defineProperty(T,$jscomp.propertyToPolyfillSymbol[U],{configurable:!0,writable:!0,value:N})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(u){if(u)return u;var N=function(L,X){this.$jscomp$symbol$id_=L;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:X})};N.prototype.toString=function(){return this.$jscomp$symbol$id_};var g="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",T=0,U=function(L){if(this instanceof U)throw new TypeError("Symbol is not a constructor");return new N(g+(L||"")+"_"+T++,L)};return U},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(u){if(u)return u;u=Symbol("Symbol.iterator");for(var N="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),g=0;g<N.length;g++){var T=$jscomp.global[N[g]];"function"===typeof T&&"function"!=typeof T.prototype[u]&&$jscomp.defineProperty(T.prototype,u,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return u},"es6",
"es3");$jscomp.iteratorPrototype=function(u){u={next:u};u[Symbol.iterator]=function(){return this};return u};$jscomp.iteratorFromArray=function(u,N){u instanceof String&&(u+="");var g=0,T=!1,U={next:function(){if(!T&&g<u.length){var L=g++;return{value:N(L,u[L]),done:!1}}T=!0;return{done:!0,value:void 0}}};U[Symbol.iterator]=function(){return U};return U};$jscomp.polyfill("Array.prototype.keys",function(u){return u?u:function(){return $jscomp.iteratorFromArray(this,function(N){return N})}},"es6","es3");
$jscomp.findInternal=function(u,N,g){u instanceof String&&(u=String(u));for(var T=u.length,U=0;U<T;U++){var L=u[U];if(N.call(g,L,U,u))return{i:U,v:L}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(N,g){return $jscomp.findInternal(this,N,g).v}},"es6","es3");
(function(){function u(){var L,X,Y,r,ba=[];this.setId=function(a){L=a};this.getId=function(){return L};this.setCode=function(a){X=a};this.getCode=function(){return X};this.setDisplayName=function(a){Y=a};this.getDisplayName=function(){return Y};this.setPreset=function(a){r=a};this.isPreset=function(){return r};this.setFontResources=function(a){ba=a};this.getFontResources=function(){return ba};this.fromJsonObject=function(a){if(a){L=a.id;X=a.code;Y=a.displayName;r=a.isPreset;a=a.fontResourcePos;var E=
[],n;for(n in a){var ea=new N;ea.fromJsonObject(a[n]);E.push(ea)}ba=E}};this.toJsonObject=function(){var a={};a.id=L;a.code=X;a.displayName=Y;a.isPreset=r;a.fontResourcePos=[];for(var E in ba){var n=ba[E].toJsonObject();a.fontResourcePos.push(n)}return a};this.copy=function(){var a=new u;a.setId(L);a.setCode(X);a.setDisplayName(Y);a.setPreset(r);var E=[],n;for(n in ba)E.push(ba[n].copy());a.setFontResources(E);return a}}function N(){var L,X,Y,r,ba,a,E;this.setId=function(n){L=n};this.getId=function(){return L};
this.setFontId=function(n){X=n};this.getFontId=function(){return X};this.setPath=function(n){Y=n};this.getPath=function(){return Y};this.setOrder=function(n){r=n};this.getOrder=function(){return r};this.setPathType=function(n){ba=n};this.getPathType=function(){return ba};this.getPathTypeEnum=function(){return g.FontResourceType.convert(ba)};this.setFileSize=function(n){a=n};this.getFileSize=function(){return a};this.setFileDisplayName=function(n){E=n};this.getFileDisplayName=function(){return E};
this.fromJsonObject=function(n){n&&(L=n.id,X=n.fontId,Y=n.path,r=n.order,ba=n.pathType,a=n.fileSize,E=n.fileDisplayName)};this.toJsonObject=function(){var n={};n.id=L;n.fontId=X;n.path=Y;n.order=r;n.pathType=ba;n.fileSize=a;n.fileDisplayName=E;return n};this.copy=function(){var n=new N;n.setId(L);n.setFontId(X);n.setPath(Y);n.setOrder(r);n.setPathType(ba);n.setFileSize(a);n.setFileDisplayName(E);return n}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==
typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.fontlib&&(com.kingdee.bos.qing.fontlib={});"undefined"==typeof com.kingdee.bos.qing.fontlib.model&&(com.kingdee.bos.qing.fontlib.model={});var g=com.kingdee.bos.qing.fontlib.model;g.FontModel=function(){var L,X,Y,r,ba,a,E,n,ea,y,V;this.setId=function(O){L=O};this.getId=function(){return L};this.setCode=function(O){X=O};this.getCode=function(){return X};
this.setDisplayName=function(O){Y=O};this.getDisplayName=function(){return Y};this.setCreatorId=function(O){r=O};this.getCreatorId=function(){return r};this.setCreatorName=function(O){ba=O};this.getCreatorName=function(){return ba};this.setModifierId=function(O){a=O};this.getModifierId=function(){return a};this.setModifierName=function(O){E=O};this.getModifierName=function(){return E};this.setCreateTime=function(O){n=O};this.getCreateTime=function(){return n};this.setModifyTime=function(O){ea=O};
this.getModifyTime=function(){return ea};this.getCreateFormatTime=function(){return y};this.getModifyFormatTime=function(){return V};this.fromJsonObject=function(O){O&&(L=O.id,X=O.code,Y=O.displayName,r=O.creatorId,ba=O.creatorName,a=O.modifierId,E=O.modifierName,n=O.createTime,ea=O.modifyTime,y=O.createFormatTime,V=O.modifyFormatTime)};this.toJsonObject=function(){var O={};O.id=L;O.code=X;O.displayName=Y;O.creatorId=r;O.creatorName=ba;O.modifierId=a;O.modifierName=E;O.createTime=n;O.modifyTime=ea;
return O}};g.FontInfo=u;g.FontResource=N;g.UploadFileInfo=function(){var L,X,Y;this.setFileName=function(r){L=r};this.getFileName=function(){return L};this.setDisplayName=function(r){X=r};this.getDisplayName=function(){return X};this.setFileSize=function(r){Y=r};this.getFileSize=function(){return Y};this.fromJsonObject=function(r){r&&(L=r.fileName,X=r.displayName,Y=r.fileSize)};this.toJsonObject=function(){var r={};r.fileName=L;r.displayName=X;r.fileSize=Y;return r}};g.ImportFontModel=function(){var L,
X,Y=-1;this.setCode=function(r){L=r};this.getCode=function(){return L};this.setDisplayName=function(r){X=r};this.getDisplayName=function(){return X};this.setHandleStrategy=function(r){Y=r};this.getHandleStrategy=function(){return Y};this.toJsonObject=function(){var r={};r.code=L;r.displayName=X;r.handleStrategy=Y;return r};this.fromJsonObject=function(r){r&&(L=r.code,X=r.displayName,Y=r.handleStrategy)}};var T,U;(function(){var L=com.kingdee.bos.qing.framework.common;U=L.MultilanguageManager;L=com.kingdee.bos.qing.fontlib.common;
T=U.createPackageAccessor(L)})();g.ConflictImportFontHandleType=new function(){this.IGNORE=0;this.OVERWRITE=1;this.RENAME=2};g.FontResourceType=new function(){function L(X,Y){this.name=function(){return Y};this.index=function(){return X}}this.QING=new L(0,T.get("uploadFont","\u4e0a\u4f20\u5b57\u4f53\u6587\u4ef6"));this.LOCAL=new L(1,T.get("localFont","\u5ba2\u6237\u7aef\u672c\u5730\u5b57\u4f53"));this.OTHER=new L(2,T.get("fontLink","\u7f51\u7edc\u94fe\u63a5"));this.PRESET=new L(3,T.get("presetFont",
"\u7cfb\u7edf\u9884\u7f6e"));this.convert=function(X){switch(X){case 0:return this.QING;case 1:return this.LOCAL;case 2:return this.OTHER;default:return null}}}})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.fontlib&&(com.kingdee.bos.qing.fontlib={});"undefined"==typeof com.kingdee.bos.qing.fontlib.common&&(com.kingdee.bos.qing.fontlib.common={});var u=com.kingdee.bos.qing.fontlib.common;u.FontLibFacade=function(r,ba,a,E){N.call(this,r,ba,a,E);
var n=this.protectedMethod,ea=function(y){y.appID="qing"};this.loadAllFontIds=function(y){y={searchContent:y};ea(y);n.remote("loadAllFontIds",y)};this.removeFonts=function(y){y={fontIds:JSON.stringify(y)};ea(y);n.remote("batchRemoveFonts",y)};this.loadAllFonts=function(y,V,O){y={pageSize:V,targetPage:y,searchContent:O};ea(y);n.remote("loadAllFonts",y)};this.loadFontInfo=function(y){y={fontId:y};ea(y);n.remote("loadFontInfo",y)};this.updateFontInfo=function(y){y={fontInfo:JSON.stringify(y.toJsonObject())};
ea(y);n.remote("updateFont",y)};this.addFont=function(y){y={fontInfo:JSON.stringify(y.toJsonObject())};ea(y);n.remote("addFont",y)};this.getUploadFileInfo=function(y){y={fileName:y};ea(y);n.remote("getUploadFileInfo",y)};this.isFontExist=function(y){y={fontId:y};ea(y);n.remote("isFontExist",y)};this.checkPermission=function(){var y={};ea(y);n.remote("isPermitted",y)};this.exportFonts=function(y){y={selectedFontId:JSON.stringify(y)};ea(y);n.remote("exportFonts",y)};this.parseImportFile=function(y){y=
{importFileName:y};ea(y);n.remote("parseImportFile",y)};this.importSelectedFonts=function(y,V){y={fileName:y,selectedFontCodes:JSON.stringify(V)};ea(y);n.remote("importSelectedFonts",y)};this.importConflictFonts=function(y,V){for(var O=[],ya=0;ya<V.length;ya++)O.push(JSON.stringify(V[ya].toJsonObject()));y={fileName:y,conflictFonts:JSON.stringify(O)};ea(y);n.remote("importConflictFonts",y)}};u.FontLibRemoteImpl=function(){g.call(this);var r;this.getRemoteUrl=function(){return r};this.setRemoteUrl=
function(ba){r=ba}};var N,g,T,U,L,X,Y;(function(){var r=com.kingdee.bos.qing.framework.common;N=r.AbstractFacade;g=r.AbstractRemoteCall;T=com.kingdee.bos.qing.framework.common.AbstractIcons;X=r.MultilanguageManager;Y=r.TabbedUiUtil;r=com.kingdee.bos.qing.fontlib.common;L=X.createPackageAccessor(r);r=com.kingdee.bos.qing.common;U=r.Util})();u.Icons=new function(){T.call(this);var r=this.protectedMethod;this.protectedInit=function(ba,a){ba=com.kingdee.bos.qing.fontlib.skin.ComboIcon;if(!ba)throw Error("com.kingdee.bos.qing.macro.ComboIcon not found.");
ba.define(a,"background");r.registIcon(0,0,"nodata");ba.define(a,"tm-publish");r.registIcon(0,0,"icon-side-close");a.setStartPosition(33,0);a.setIconSize(17,14);r.registIcon(0,0,"icon-side-open");ba.define(a,"font-library");r.registIcon(0,0,"delete_hover");r.registIcon(1,0,"delete");r.registIcon(2,0,"delete_disabled");r.registIcon(0,1,"font-file-icon");r.registIcon(0,2,"upload-file-button-icon");ba.define(a,"group-theme-no-data");r.registIcon(0,0,"font-library-no-data");ba.define(a,"no-font-resource");
r.registIcon(0,0,"no-font-resource")}};u.FontLibUtil=new function(){var r=U.decodeParamFromUrl(window.location.search,"path"),ba=/[`~!@#$%^&*()+<>?:"{},.\/;'[\]]/im,a=/[\u00b7\uff01#\uffe5\uff08\u2014\u2014\uff09\uff1a\uff1b\u201c\u201d\u2018\u3001\uff0c|\u300a\u3002\u300b\uff1f\u3001\u3010\u3011[\]]/im;this.jumpToFontLibDetailPanel=function(E,n){var ea=r+"/qing/fontLibDetail.do";n&&0<n.length?(ea=U.appendParamToUrl(ea,"fontId",n),E=L.get("editFont","\u7f16\u8f91\u5b57\u4f53 - ")+E,n=ea):(E=L.get("newFont",
"\u65b0\u5efa\u5b57\u4f53"),n=(new Date).getTime());Y.openNewTab(E,ea,n,Y.QING_ANALYSIS)};this.checkCustomName=function(E){return a.test(E)||ba.test(E)?!1:!0};this.checkCustomStrExistQuotation=function(E){return/["']/.test(E)};this.equals=function(E,n){if(void 0===E||null===E)E="";if(void 0===n||null===n)n="";return E===n}}})();(function(){function u(C,I){Aa.call(this);var D=this,h=D.protectedMethod,e=I?I.copy():new ya,l,Q,M,F,G=com.kingdee.bos.qing.fontlib.common.Icons,p=["attachment","local","link"],W=[".ttf",".ttc",".woff",".otf",".woff2"],da,S,f,v,w,Z,m,A,t,b,c,H,K=!1;(function(){var J=I?a.get("editFontResource","\u7f16\u8f91\u5b57\u4f53\u6765\u6e90"):a.get("addFontResource","\u6dfb\u52a0\u5b57\u4f53\u6765\u6e90");h.setTitle(J);h.setSelectable(!0);D.setSize(400,300);h.setContentPaneCreator(function(){if(!da){da=$("<div>");
da.addClass("font-lib-resource-add-edit-dialog-main");na(da);var B=da;w=$("<div>");w.addClass("font-lib-resource-content");var d=e.getPathType();ka(p[d]?p[d]:p[0]);B.append(w)}return da});h.setClosingChecker2(function(B){if(K)return h.getMessageCurtain().showPrompt(a.get("fileUploading","\u6587\u4ef6\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002\u3002"),2E3),!1;B=F.getUserObject();var d=!1;B===V.LOCAL.index()?(d=ea.checkCustomStrExistQuotation(l.getText()))&&h.getMessageCurtain().showPrompt(a.get("illegalFontLocalName",
"\u5ba2\u6237\u7aef\u672c\u5730\u5b57\u4f53\u540d\u79f0\u4e0d\u80fd\u5305\u542b\u5355\u5f15\u53f7\u3001\u53cc\u5f15\u53f7\u3002"),2E3):B===V.OTHER.index()&&(d=ea.checkCustomStrExistQuotation(Q))&&h.getMessageCurtain().showPrompt(a.get("illegalFontLinkName","\u7f51\u7edc\u94fe\u63a5\u4e0d\u80fd\u5305\u542b\u5355\u5f15\u53f7\u3001\u53cc\u5f15\u53f7\u3002"),2E3);if(d||ia())return!1;B=F.getUserObject();if(B===V.LOCAL.index()?x(B,l.getText()):B===V.OTHER.index()&&x(B,Q.getText()))return h.getMessageCurtain().showPrompt(a.get("fileDuplicated",
"\u5b57\u4f53\u6765\u6e90\u5df2\u5b58\u5728\u3002"),2E3),!1;B=F.getUserObject();e.setPathType(B);B===V.LOCAL.index()?e.setPath(l.getText()):B===V.QING.index()?(e.setPath(M.getFileName()),e.setFileDisplayName(M.getDisplayName()),e.setFileSize(M.getFileSize())):B===V.OTHER.index()&&e.setPath(Q.getText());c&&c(e);return!0},function(B){h.destroy();return!0});h.setClosingAction(function(B){h.destroy();return!0})})();this.setFinalCallBack=function(J){c=J};this.setCheckFileExist=function(J){H=J};var x=function(J,
B,d){var k=!0;if(I){var q=I.getPathType();J!==V.QING.index()&&(k=I.getPath(),k=J!==q||B!==k)}return k&&H(J,B,d)},ia=function(){var J=F.getUserObject();if(J===V.LOCAL.index())return J=$.trim(l.getText()),(J=!J||0===J.length)&&h.getMessageCurtain().showPrompt(a.get("inputName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002"),2E3),J;if(J===V.QING.index())return(J=!M)&&h.getMessageCurtain().showPrompt(a.get("uploadAttachment","\u8bf7\u4e0a\u4f20\u9644\u4ef6\u3002"),2E3),J;if(J===V.OTHER.index())return J=$.trim(Q.getText()),
(J=!J||0===J.length)&&h.getMessageCurtain().showPrompt(a.get("inputURL","\u8bf7\u8f93\u5165URL\u3002"),2E3),J},na=function(J){var B=$("<div>");B.text(a.get("sourceType","\u6765\u6e90\u65b9\u5f0f"));B.addClass("font-lib-resource-dialog-source-type-text");F=new sa;F.setItemModels(p);var d=e.getPathType();F.setUserObject(d);F.setSelected(p[d]?p[d]:p[0]);F.setCustomPainter(function(q,z,P){q="";switch(P){case p[0]:q=a.get("uploadFont","\u4e0a\u4f20\u5b57\u4f53\u6587\u4ef6");break;case p[1]:q=a.get("localFont",
"\u5ba2\u6237\u7aef\u672c\u5730\u5b57\u4f53");break;case p[2]:q=a.get("fontLink","\u7f51\u7edc\u94fe\u63a5")}P=$("<div>");P.text(q);z.append(P)});F.addSelectedChangedListener(qa);d=F.getJqUi();d.addClass("font-lib-resource-dialog-combo-box");var k=$("<div>");k.addClass("font-lib-resource-dialog-source-type");k.append(B);k.append(d);J.append(k)},qa=function(J,B,d){ka(d)},ka=function(J){switch(J){case p[0]:F.setUserObject(V.QING.index());ma();break;case p[1]:F.setUserObject(V.LOCAL.index());if(!S){S=
$("<div>");J=$("<div>");J.addClass("font-lib-resource-dialog-column");var B=$("<div>");B.text(a.get("name","\u5b57\u4f53\u540d\u79f0"));B.addClass("font-lib-resource-dialog-path-title");var d=a.get("fontResourceNameType","\u6b64\u5904\u7684\u540d\u79f0\u662f\u6307\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5df2\u5b89\u88c5\u5b57\u4f53\u7684\u540d\u79f0\u3002"),k=$("<div>");k.text(d);d=new U;d.setTipsSize(200,55);d.setText(k);k=d.getJqUi();k.addClass("font-lib-resource-dialog-path-prompt");B.appendTo(J);
k.appendTo(J);l=new y;B="";e.getPathType()===V.LOCAL.index()&&(B=(B=e.getPath())&&0<B.length?B:"");l.setText(B);B=l.getJqUi();B.addClass("font-lib-resource-path-input");S.append(J);S.append(B);w.append(S)}S.show();f&&f.hide();v&&v.hide();break;case p[2]:F.setUserObject(V.OTHER.index());if(!v){v=$("<div>");J=$("<div>");J.addClass("font-lib-resource-dialog-column");k=$("<div>");k.text(a.get("link","\u94fe\u63a5"));k.addClass("font-lib-resource-dialog-path-title");var q=a.get("fontResourceLinkType",
"\u6b64\u5904\u7684URL\u662f\u6307\u5b57\u4f53\u7684\u5916\u90e8\u5f15\u7528\u94fe\u63a5\uff0c\u901a\u8fc7\u8be5\u94fe\u63a5\u53ef\u4ee5\u83b7\u53d6\u5b57\u4f53\u3002");d=$("<div>");d.text(q);q=new U;q.setTipsSize(250,55);q.setText(d);d=q.getJqUi();d.addClass("font-lib-resource-dialog-path-prompt");k.appendTo(J);d.appendTo(J);Q=new y;e.getPathType()===V.OTHER.index()&&(B=(B=e.getPath())&&0<B.length?B:"");B&&Q.setText(B);Q.setPlaceholder("https://www.XXX.com/xx.ttf");B=Q.getJqUi();B.addClass("font-lib-resource-path-input");
v.append(J);v.append(B);w.append(v)}S&&S.hide();f&&f.hide();v.show()}},R=function(){M=null;A.empty();Z.show();m.hide()},ma=function(){if(!f){f=$("<div>");var J=$("<div>");J.addClass("font-lib-resource-dialog-column");var B=$("<div>");B.text(a.get("attachment","\u5b57\u4f53\u6587\u4ef6"));B.addClass("font-lib-resource-dialog-path-title");var d=a.get("uploadFileTip","\u652f\u6301ttf\u3001ttc\u3001otf\u3001woff\u3001woff2\u6587\u4ef6\u3002"),k=$("<div>");k.text(d);d=new U;d.setTipsSize(260,40);d.setText(k);
k=d.getJqUi();k.addClass("font-lib-resource-dialog-path-prompt");B.appendTo(J);k.appendTo(J);B=$("<div>");G.background(B,"upload-file-button-icon");B=new L(a.get("uploadFile","\u4e0a\u4f20\u6587\u4ef6"),B);B.setFinalCallBack(oa);Z=B.getJqUi();Z.addClass("font-lib-resource-upload-file-button");m=$("<div>");m.addClass("font-lib-resource-upload-file-info");B=$("<div>");G.background(B,"font-file-icon");B.addClass("font-lib-resource-font-file-icon");A=$("<div>");A.addClass("font-lib-resource-upload-file-info-text");
if(e.getPathType()===V.QING.index()){var q=ra(e.getFileDisplayName(),pa(e.getFileSize()));M=new wa;M.setFileName(e.getPath());M.setDisplayName(e.getFileDisplayName());M.setFileSize(e.getFileSize())}q&&A.append(q);b=$("<div>");G.background(b,"delete");b.on("mouseover mouseout",function(z){"mouseover"===z.type?G.background(b,"delete_hover"):"mouseout"===z.type&&G.background(b,"delete")});b.addClass("font-lib-resource-upload-file-info-delete");b.on("click",function(){R()});t=$("<div>");t.addClass("font-lib-resource-upload-file-loading");
t.css("background-image",la.getIconUrl("common","loading.gif"));t.hide();m.append(B);m.append(A);m.append(t);m.append(b);f.append(J);f.append(Z);f.append(m);w.append(f);M?(Z.hide(),m.show()):(Z.show(),m.hide())}S&&S.hide();f.show();v&&v.hide()},oa=function(){var J=$("<input type='file' id='uploadBtn'>");J.addClass("font-lib-upload-file");J.attr("accept",W);J.on("change",function(B){K=!0;if(B=B.currentTarget.files[0]){var d=B.name,k=B.size,q=d.lastIndexOf(".");q=d.substring(q,d.length).toLowerCase();
da.find("#uploadBtn").val("");var z=!1;for(P in W)if(q===W[P]){z=!0;break}if(z)if(0===k)K=!1,h.getMessageCurtain().showPrompt(a.get("uploadFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3);else if(52428800<=k)K=!1,h.getMessageCurtain().showPrompt(a.get("fileTooLarge","\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3);else{var P=ra(d,pa(k));A.append(P);Z.hide();t.show();b.hide();m.show();(new N(function(ja){M=new wa;M.setFileName(ja);
M.setDisplayName(d);M.setFileSize(k);x(V.QING.index(),d,k)?(h.getMessageCurtain().showPrompt(a.get("fileDuplicated","\u5b57\u4f53\u6765\u6e90\u5df2\u5b58\u5728\u3002"),2E3),M=null,R()):(t.hide(),b.show())},function(){R()},function(){K=!1})).upload(B,h.getMessageCurtain(),!1)}else K=!1,h.getMessageCurtain().showPrompt(a.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3)}J.val("")});J.click()},ra=function(J,B){var d=$("<div>"),k=$("<div>"),
q=$("<div>");k.addClass("font-lib-detail-edit-dialog-upload-file-name");k.text(J);q.text(" ("+B+") ");q.addClass("font-lib-detail-edit-dialog-upload-file-size");d.append(k);d.append(q);return d},pa=function(J){return 1048576<=J?(J/1048576).toFixed(2)+"MB":1024<=J?(J/1024).toFixed(2)+"KB":J+"B"}}function N(C,I,D){var h,e,l,Q;this.upload=function(p,W,da){h=W;da&&F();W=new FormData;W.append("filename",p);p=new XMLHttpRequest;p.addEventListener("error",M,!1);var S=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();
da&&p.upload.addEventListener("progress",G,!1);p.open("post",S,!0);p.onload=function(f){200===this.status&&(f=JSON.parse(this.response),"number"==typeof f.errorCode&&3099003===f.errorCode?(I&&I(),h.showError(f.errorMessage)):(f=f.data,C&&C(f)),e&&e.remove(),Q&&Q.remove(),D&&D())};p.send(W)};var M=function(p){h&&h.showPrompt(a.get("uploadFailed","\u4e0a\u4f20\u5931\u8d25\u3002"))},F=function(){e=$("<div>");e.addClass("font-importing-exporting-main");var p=$(document.body);Q=$("<div class='font-ctrl-modallayer'>");
Q.appendTo(p);l=$("<progress value='0' max='100'>");l.addClass("font-importing-upload-progress");var W=$("<div>");W.addClass("font-importing-exporting-text");W.text(a.get("uploading","\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u5019"));e.append(l);e.append(W);p.append(e)},G=function(p){var W=l.get(0);p.lengthComputable&&(W.max=p.total,W.value=p.loaded)}}function g(C,I,D){var h,e,l=!!D,Q,M;this.setInputCallBack=function(G){M=G};var F=function(){M&&M()};this.setEnabled=function(G){Q=G;e&&e.setEnabled(G)};
this.getText=function(){return"undefined"==typeof e?null:$.trim(e.getText())};this.setText=function(G){I=G;e&&e.setText(G)};this.setWidth=function(G){h&&h.css("width",G)};this.getJqUi=function(){if(!h){h=$("<div>");h.addClass("font-lib-input");h.css("width","230");var G=$("<div>");G.addClass("font-lib-input-title");var p=$("<span>");p.css("font-size","12px");p.text(C);if(l){var W=$("<span>");W.text("*");W.css("color","red")}G.append(p);l&&G.append(W);e=new y;e.setEnabled(Q);e.addEditedListener(F);
I&&e.setText(I);p=e.getJqUi();p.addClass("font-lib-input-frame");h.append(G);h.append(p)}return h}}function T(){var C,I,D,h,e,l=!0,Q=!1,M=!1;this.getJqUi=function(){C||(C=$("<div>"),C.addClass("font-lib-expansion"),F(C),I=$("<div>"),I.addClass("font-lib-expansion-maim"),!M&&I.css("paddingLeft","10px"),I.append(D),C.append(I));return C};this.setContentPanel=function(G){D=G;I&&I.empty();I&&I.append(D)};this.setTitle=function(G){h=G};this.setPrompt=function(G){e=G};this.setPromptShow=function(G){Q=G};
this.setSwitchVisual=function(G){M=G};var F=function(G){var p=$("<div>");p.addClass("font-lib-expansion-title");var W=$("<div>");W.addClass("font-lib-expansion-switch-triangle");var da={transform:"rotate(0deg)",transition:"transform 100ms linear"},S={transform:"rotate(-90deg)",transition:"transform 100ms linear"},f=$("<div>");f.addClass("font-lib-expansion-switch");f.on("click",function(){l?(W.css(S),I.hide()):(W.css(da),I.show());l=!l});f.append(W);M?f.show():f.hide();var v=$("<span>");v.addClass("font-lib-expansion-title-name");
v.text(h);!M&&v.css("marginLeft","10px");if(Q){var w=$("<div>");w.text(e);var Z=new U;Z.setText(w);Z.setTipsSize(350,55);w=Z.getJqUi();w.css("margin-top","4px");w.addClass("font-lib-expansion-prompt")}p.append(f);p.append(v);Q&&p.append(w);G.append(p)}}function U(){var C,I,D,h;this.setText=function(e){I=e};this.setTipsSize=function(e,l){D=e;h=l};this.getJqUi=function(){if(!C){C=$("<div>");var e=new ua;e.setIconType(ua.ICON_TYPE_QUESTION);e.setTipsSize(D,h);e.setTipsHtml(I);e=e.getJqUi();e.addClass("font-lib-prompt-help-icon");
C.append(e)}return C}}function L(C,I){var D,h;this.setFinalCallBack=function(l){h=l};var e=function(){h&&h()};this.getJqUi=function(){if(!D){D=$("<div>");D.addClass("font-lib-upload-file-button");I&&I.addClass("font-lib-resource-upload-file-button-icon");I&&I.appendTo(D);var l=$("<div>");l.addClass("font-lib-resource-upload-file-button-text");l.text(C);D.append(l);D.on("click",e)}return D}}function X(){function C(m){KTDefaultCellRender.call(this,m);var A=this,t=this.paintCellUI;this.paintCellUI=function(c,
H){var K=A.getCurrentRowIdx(),x=A.getCurrentRow(),ia=A.getCurrentColIdx();x=x.getUserObject();K<E.getHeadRowCount()?t(c,H):0===ia?(H=$("<div>"),H.text(x.getCode()),H.addClass("font-lib-import-table-code"),H.appendTo(c)):1===ia?(H=$("<div>"),H.text(x.getDisplayName()),H.addClass("font-lib-import-table-displayName"),H.appendTo(c)):2===ia&&(c=E.createCtrlInCell(c,A.getCellWidth(),A.getCellHeight(),sa),c.setItemModels([aa.IGNORE,aa.OVERWRITE,aa.RENAME]),c.setUserObject(x),H=(H=l[x.getCode()])?H.getSelected():
aa.IGNORE,c.setSelected(H),c.setCustomPainter(b),l[x.getCode()]=c)};var b=function(c,H,K){switch(K){case aa.IGNORE:c=a.get("ignoreBtn","\u5ffd\u7565");break;case aa.OVERWRITE:c=a.get("overwriteBtn","\u8986\u76d6");break;case aa.RENAME:c=a.get("renameBtn","\u91cd\u547d\u540d");break;default:c=""}K=$("<div>");K.text(c);K.appendTo(H)}}Aa.call(this);var I=this,D=I.protectedMethod,h,e,l={},Q,M,F,G,p;(function(){D.setTitle(a.get("exportFonts","\u5bfc\u5165\u5b57\u4f53"));D.setSelectable(!0);I.setSize(600,
450);D.setContentPaneCreator(function(){if(!h){h=$("<div>");if(e&&0<e.length)for(var m=0;m<e.length;m++)e[m].setHandleStrategy(aa.IGNORE);m=h;var A=$("<span>");var t=1<M?a.get("importResultTips","\u6210\u529f\u5bfc\u5165#1\u4e2a\u5b57\u4f53\uff0c\u4ee5\u4e0b\u5b57\u4f53\u7f16\u7801\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002"):a.get("importResultTips2","\u6210\u529f\u5bfc\u5165#1\u4e2a\u5b57\u4f53\uff0c\u4ee5\u4e0b\u5b57\u4f53\u7f16\u7801\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002");t=t.replace("#1",
M);A.text(t);A.addClass("font-lib-import-conflict-tips");A.appendTo(m);m=h;A=$("<div>");A.addClass("font-lib-import-conflict-operation");da(A);S(A);f(A);A.appendTo(m);Z(h)}return h});D.setClosingChecker2(function(m){m=[];for(var A in l){var t=l[A],b=t.getSelected();b!==aa.IGNORE&&(t=t.getUserObject(),t.setHandleStrategy(b),m.push(t))}if(0===m.length)return D.destroy(),G&&G(!1,!1),!0;W(m)},function(m){D.destroy();G&&G(!1,void 0);return!0});D.setClosingAction(function(m){D.destroy();return!0})})();
var W=function(m){(new ta(Q,function(A){D.destroy();A=A.isOverwritePreset;G&&G(!0,A)},function(A){D.getMessageCurtain().showPrompt(a.get("handleConflictFontsFailed","\u5904\u7406\u5931\u8d25\u3002"),3E3);return!1})).importConflictFonts(F,m)};this.setRemoteImpl=function(m){Q=m};this.setImportFileName=function(m){F=m};this.setConflictImportFontModels=function(m){e=m?m:[]};this.setSuccessImportQuantity=function(m){M=m};this.setHandleFinalCallBack=function(m){G=m};var da=function(m){v(a.get("ignoreAllBtn",
"\u5168\u90e8\u5ffd\u7565"),!0,function(){w(aa.IGNORE)},m).css("margin-left","3px")},S=function(m){v(a.get("overwriteAllBtn","\u5168\u90e8\u8986\u76d6"),!0,function(){w(aa.OVERWRITE)},m)},f=function(m){v(a.get("renameAllBtn","\u5168\u90e8\u91cd\u547d\u540d"),!1,function(){w(aa.RENAME)},m)},v=function(m,A,t,b){var c=$("<div>");c.text(m);c.addClass("font-import-conflict-all-operate");c.on("click",t);c.appendTo(b);A&&(m=$("<div>"),m.addClass("font-import-conflict-btn-split-line"),m.appendTo(b));return c},
w=function(m){for(var A=0;A<e.length;A++)e[A].setHandleStrategy(m);for(var t in l)l[t].setSelected(m)},Z=function(m){p=E.createTable();E.bindTableListenerForCtrl(p);p.setColumnFitVisibleWidth(!1);var A=new C(p);A.setOutsideVisible(!1);p.setCellRender(A);p.setSyncUIWhenModelChanged(!1);A=$(p.getUI());A.addClass("font-lib-no-x-scroll-table");A.css("top","40px");A.children().css("overflow-x","hidden");m.append(A)};this.paintTable=function(){p||Z(h);E.clear(p);p.addColumns(3);p.getColumn(0).setWidth(210);
p.getColumn(1).setWidth(210);p.getColumn(2).setWidth(100);var m=E.createHeadRow(p);m.getCell(0).setValue(a.get("fontCode","\u5b57\u4f53\u7f16\u7801"));m.getCell(1).setValue(a.get("fontDisplay","\u5b57\u4f53\u663e\u793a\u540d\u79f0"));m.getCell(2).setValue(a.get("handleType","\u5904\u7406\u7b56\u7565"));for(m=0;m<e.length;m++){var A=e[m];E.createRow(p).setUserObject(A)}E.refresh(p)}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&
(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.fontlib&&(com.kingdee.bos.qing.fontlib={});"undefined"==typeof com.kingdee.bos.qing.fontlib.common&&(com.kingdee.bos.qing.fontlib.common={});"undefined"==typeof com.kingdee.bos.qing.fontlib.common.ui&&(com.kingdee.bos.qing.fontlib.common.ui={});var Y=com.kingdee.bos.qing.fontlib.common.ui;Y.FontLibInfoPanel=function(){function C(t){KTDefaultCellRender.call(this,t);var b=
this,c=this.paintCellUI;this.paintCellUI=function(K,x){var ia=b.getCurrentRowIdx(),na=b.getCurrentRow(),qa=b.getCurrentColIdx(),ka=na.getUserObject();if(ia<E.getHeadRowCount()){if(c(K,x),0===qa&&1===ia){x=!(!Q||!Q.isChecked());Q=new n;Q.setChecked(x);Q.addCheckedListener(function(oa,ra){if(ra)if(oa.isChecked())for(var pa in F)G[pa]=!0,F[pa].setChecked(!0);else for(pa in F)delete G[pa],F[pa].setChecked(!1);A()});var R=Q.getJqUi();R.addClass("font-lib-head-check-box");R.appendTo(K)}}else if(0===qa){ia=
ka.getId();na=new n;x=!1;for(R in G)if(ia===R){x=!0;break}na.setChecked(x);na.setUserObject(ka);na.addCheckedListener(function(oa,ra){if(ra){ra=oa.isChecked();oa=oa.getUserObject().getId();F[oa].setChecked(ra);if(ra){oa=G[oa]=!0;for(var pa in F)if(!F[pa].isChecked()){oa=!1;break}oa&&Q.setChecked(!0)}else delete G[oa],Q.setChecked(!1);A()}});F[ia]=na;R=na.getJqUi();R.addClass("font-lib-check-box");R.appendTo(K)}else if(1===qa)R=da*(W-1)+ia+1-E.getHeadRowCount(),x=$("<div>"),x.addClass("font-lib-table-serial-number"),
x.text(R),x.appendTo(K);else if(2===qa){R=$("<div>");R.addClass("font-lib-table-element");var ma=ka.getCode();void 0===ka.getCreatorName()&&(x=$("<div>"),x.addClass("font-lib-table-preset-label"),x.text(a.get("preset","\u9884\u7f6e")),x.appendTo(R));x=$("<div>");x.attr("title",ma);x.addClass("font-lib-table-name");x.appendTo(R);x.on("click",function(){var oa=ka.getId(),ra=new ta(S,function(pa){pa&&!0===pa?ea.jumpToFontLibDetailPanel(ma,oa):f.showPrompt(a.get("fontNotExist","\u5b57\u4f53\u4e0d\u5b58\u5728\uff0c\u8bf7\u5237\u65b0\u540e\u91cd\u8bd5\u3002"),
2E3)},function(pa,J){if(40277008===pa)return f.showPrompt(a.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3),!0});ra.setShowBlocking(!1);ra.isFontExist(oa)});H(x,p,ma);R.appendTo(K)}else 3===qa?(R=$("<div>"),x=ka.getDisplayName(),R.attr("title",x),R.addClass("font-lib-table-display-name"),R.addClass("font-lib-table-element"),H(R,p,x),R.appendTo(K)):4===qa?(x=$("<div>"),x.addClass("font-lib-table-creator"),
x.addClass("font-lib-table-element"),R=(R=ka.getCreatorName())?R:a.get("presetFont","\u7cfb\u7edf\u9884\u7f6e"),x.text(R),x.attr("title",R),x.appendTo(K)):5===qa?(x=$("<div>"),x.addClass("font-lib-table-create-time"),x.addClass("font-lib-table-element"),R=ka.getCreateFormatTime(),R=ka.getCreatorName()?R:"-",x.text(R),x.attr("title",R),x.appendTo(K)):6===qa?(x=$("<div>"),x.addClass("font-lib-table-modifier"),x.addClass("font-lib-table-element"),R=(R=ka.getModifierName())?R:a.get("presetFont","\u7cfb\u7edf\u9884\u7f6e"),
x.text(R),x.attr("title",R),x.appendTo(K)):7===qa&&(x=$("<div>"),x.addClass("font-lib-table-modify-time"),x.addClass("font-lib-table-element"),R=ka.getModifyFormatTime(),R=ka.getCreatorName()?R:"-",x.text(R),x.attr("title",R),x.appendTo(K))};var H=function(K,x,ia){if(x&&ia){x=x.toUpperCase();var na=ia.toUpperCase(),qa=na.split(x),ka=x.length,R;for(R in qa){var ma=na.indexOf(qa[R]),oa=ia.substr(pa,qa[R].length);ma+=qa[R].length;var ra=na.length-ma;na=na.substr(ma,ra);ia=ia.substr(ma,ra);ma=$("<span>");
ma.text(oa);ma.appendTo(K);if(R!=qa.length-1&&1<qa.length){var pa=na.indexOf(x);oa=ia.substr(pa,ka);ma=pa+ka;ra=na.length-ma;na=na.substr(ma,ra);ia=ia.substr(ma,ra);ma=$("<span>");ma.text(oa);ma.css("color","red");ma.clone().appendTo(K)}}}else K.text(ia)}}var I=this,D,h,e,l,Q,M=[],F={},G={},p,W,da,S,f,v;this.setItemCheckedCallBack=function(t){v=t};this.setRemoteImpl=function(t){S=t};this.setMessageCurtain=function(t){f=t};this.updateSelectedRowAllPage=function(t){G={};for(var b in t)G[t[b]]=!0;this.updateUi(M)};
this.getSelectedFontAllPage=function(){return Object.keys(G)};this.containPresetFont=function(t){for(var b in t){var c=F[t[b]];if((c=c&&c.getUserObject())&&"100000"===c.setCreatorId())return!0}return!1};this.getJqUi=function(){D||(D=$("<div>"),r.layoutCtrlWithLRTB(D,0,0,null,32,0,null),M&&0<M.length?w():Z(D));return D};this.resize=function(){l&&I.updateUi()};this.updateUi=function(t,b,c){t&&(M=t);b&&(W=b);c&&(da=c);if(M&&0<M.length){l&&$(l.getUI()).show();e&&e.hide();h&&h.hide();l||w();E.clear(l);
F={};l.addColumns(8);l.getColumn(0).setWidth(20);l.getColumn(1).setWidth(30);l.getColumn(2).setWidth(100);l.getColumn(3).setWidth(150);l.getColumn(4).setWidth(60);l.getColumn(5).setWidth(120);l.getColumn(6).setWidth(60);l.getColumn(7).setWidth(120);t=E.createHeadRow(l);t.getCell(1).setValue("#");t.getCell(2).setValue(a.get("fontCode","\u5b57\u4f53\u7f16\u7801"));t.getCell(3).setValue(a.get("fontDisplayName","\u5b57\u4f53\u663e\u793a\u540d\u79f0"));t.getCell(4).setValue(a.get("creator","\u521b\u5efa\u4eba"));
t.getCell(5).setValue(a.get("createTime","\u521b\u5efa\u65f6\u95f4"));t.getCell(6).setValue(a.get("modifier","\u6700\u540e\u4fee\u6539\u4eba"));t.getCell(7).setValue(a.get("modifyTime","\u6700\u540e\u4fee\u6539\u65f6\u95f4"));for(t=0;t<M.length;t++)b=M[t],E.createRow(l).setUserObject(b);E.refresh(l);t=m(F);b=Object.keys(G).length;v&&v(t,b);t===M.length?Q.setChecked(!0):Q.setChecked(!1)}else h&&e||Z(D),p&&0<p.length?(h.show(),e&&e.hide()):(e.show(),h&&h.hide()),l&&$(l.getUI()).hide()};this.setSearchContent=
function(t){p=t};var w=function(){if(D){l=E.createTable();l.setColumnFitVisibleWidth(!0);var t=new C(l);t.setOutsideVisible(!1);l.setCellRender(t);l.setSyncUIWhenModelChanged(!0);t=$(l.getUI());r.layoutCtrlWithLRTB(t,0,0,null,0,0,null);D.append(t)}},Z=function(t){if(p){h=$("<div>");var b=$("<div>");com.kingdee.bos.qing.fontlib.common.Icons.background(b,"nodata");b.addClass("font-lib-no-match-search-font-icon");var c=$("<div>");c.text(a.get("noMatchingFont","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c\u3002"));
c.addClass("font-lib-no-data-prompt");h.append(b);h.append(c);t.append(h)}else e=$("<div>"),b=$("<div>"),com.kingdee.bos.qing.fontlib.common.Icons.background(b,"font-library-no-data"),b.addClass("font-lib-no-created-font-icon"),c=$("<div>"),c.text(a.get("noFont","\u8bf7\u70b9\u51fb\u5de5\u5177\u680f\u3010\u65b0\u5efa\u3011\u6309\u94ae\uff0c\u65b0\u5efa\u5b57\u4f53")),c.addClass("font-lib-no-data-prompt"),e.append(b),e.append(c),t.append(e)},m=function(t){var b=0,c;for(c in t)t[c].isChecked()&&b++;
return b},A=function(){var t=m(F),b=Object.keys(G).length;v&&v(t,b)}};Y.FontLibDetailPanel=function(C,I){function D(d){KTDefaultCellRender.call(this,d);var k=this,q=this.paintCellUI;this.paintCellUI=function(z,P){var ja=k.getCurrentRowIdx(),fa=k.getCurrentRow(),va=k.getCurrentColIdx();fa=fa.getUserObject();if(ja<E.getHeadRowCount())q(z,P);else if(0===va){fa=parseInt(fa.getOrder())+1;var ha=$("<div>");ha.addClass("font-lib-source-order");ha.text(fa);ha.appendTo(z)}else if(1===va){ha=$("<div>");P=fa.getPathType();
switch(P){case V.LOCAL.index():ha.text(a.get("localFont","\u5ba2\u6237\u7aef\u672c\u5730\u5b57\u4f53"));break;case V.QING.index():ha.text(a.get("uploadFont","\u4e0a\u4f20\u5b57\u4f53\u6587\u4ef6"));break;case V.OTHER.index():ha.text(a.get("fontLink","\u7f51\u7edc\u94fe\u63a5"));break;case V.PRESET.index():ha.text(a.get("presetFont","\u7cfb\u7edf\u9884\u7f6e"))}ha.addClass("font-lib-source-type");ha.appendTo(z)}else if(2===va){P=fa.getPathType();switch(P){case V.LOCAL.index():ha=a.get("name","\u540d\u79f0")+
": ";var xa=fa.getPath();break;case V.QING.index():ha=a.get("attachment","\u9644\u4ef6")+": ";xa=fa.getFileDisplayName();break;case V.OTHER.index():ha=a.get("link","\u94fe\u63a5")+": ";xa=fa.getPath();break;case V.PRESET.index():ha=a.get("attachment","\u9644\u4ef6")+": ",xa=fa.getFileDisplayName()}fa=$("<div>");fa.text(ha+xa);fa.attr("title",xa);fa.addClass("font-lib-source-detail");fa.appendTo(z)}else 3===va&&(ha=$("<div>"),R(ha,fa),ma(ha,fa),oa(ha,fa),ra(ha,fa),ha.addClass("font-lib-source-operation"),
ha.appendTo(z))}}var h=this,e,l,Q,M,F,G,p,W,da,S,f,v=!1,w,Z,m;this.isDirty=function(){var d=$.trim(p.getText()),k=$.trim(W.getText());if(!ea.equals(d,I.getCode())||!ea.equals(k,I.getDisplayName()))return!0;d=I.getFontResources();if(d.length!==f.length)return!0;for(var q in f){k=d[q];var z=f[q];if(z.getId()!==k.getId()||k.getPath()!==z.getPath())return!0}return!1};this.setTabDirty=function(d){m=d};var A=function(){m&&m(!0)};this.setMessageCurtain=function(d){Z=d};this.getJqUi=function(){if(!e){t();
e=$("<div>");e.addClass("font-lib-detail-main-panel");b();var d=$("<div>");!w&&K(d);l=$("<div>");l.addClass("font-lib-resource-data-display-area");f&&0<f.length?H(l):c(l);d.append(l);var k=new T;k.setTitle(a.get("fontResource","\u5b57\u4f53\u6765\u6e90"));k.setPromptShow(!0);k.setPrompt(a.get("fontResourcePrompt","\u7531\u4e8e\u6d4f\u89c8\u5668\u517c\u5bb9\u6027\u7684\u95ee\u9898\uff0c\u4e00\u4e2a\u5b57\u4f53\u5141\u8bb8\u8bbe\u7f6e\u591a\u4e2a\u6765\u6e90\uff0c\u4f18\u5148\u4f7f\u7528\u4f18\u5148\u7ea7\u9760\u524d\u7684\u5b57\u4f53\u6765\u6e90\u3002"));
k.setContentPanel(d);d=k.getJqUi();d.addClass("font-lib-resource-expansion");e.append(d)}return e};this.resize=function(){h.updateResourceUi()};this.getFontInfo=function(){da.setCode($.trim(p.getText()));da.setDisplayName($.trim(W.getText()));da.setFontResources(f);return da};this.setModel=function(d){I=d;t();p&&p.setText(da.getCode());W&&W.setText(da.getDisplayName());h.updateResourceUi()};this.updateResourceUi=function(){f&&0<f.length?(M&&M.hide(),Q&&Q.show(),ka()):(Q&&Q.hide(),M||c(l),M.show())};
var t=function(){if(I){var d=I.getFontResources();d.sort(function(q,z){return q.getOrder()-z.getOrder()});for(var k in d)d[k].setOrder(k);da=I.copy()}else da=new O;w=da.isPreset();f=da.getFontResources()},b=function(){var d=$("<div>");d.addClass("font-lib-basic-info-main");var k=da.getCode();p=new g(a.get("fontCode","\u5b57\u4f53\u7f16\u7801"),k,!0);p.setEnabled(!w);!w&&p.setInputCallBack(function(){var z=p.getText();na(z);A()});k=p.getJqUi();k.addClass("font-lib-basic-info-input");var q=da.getDisplayName();
W=new g(a.get("fontDisplayName","\u5b57\u4f53\u663e\u793a\u540d\u79f0"),q,!0);W.setEnabled(!w);!w&&W.setInputCallBack(function(){A()});q=W.getJqUi();q.addClass("font-lib-basic-info-input");d.append(k);d.append(q);k=new T;k.setTitle(a.get("basicInfo","\u57fa\u672c\u4fe1\u606f"));k.setPromptShow(!1);k.setContentPanel(d);d=k.getJqUi();e.append(d)},c=function(d){M=$("<div>");var k=$("<div>");com.kingdee.bos.qing.fontlib.common.Icons.background(k,"no-font-resource");k.addClass("font-lib-no-font-resource-icon");
var q=$("<div>");q.text(a.get("noFontResource","\u6682\u65e0\u5b57\u4f53\u6765\u6e90"));q.addClass("font-lib-no-font-resource-prompt");M.append(k);M.append(q);d.append(M)},H=function(d){Q=$("<div>");Q.addClass("font-lib-resource-main");var k=Q;S=E.createTable();S.setColumnFitVisibleWidth(!1);var q=new D(S);q.setOutsideVisible(!0);S.setCellRender(q);S.setSyncUIWhenModelChanged(!1);q=$(S.getUI());r.layoutCtrlWithLRTB(q,10,0,null,10,0,null);q.addClass("font-lib-no-x-scroll-table");q.children("overflowX",
"hidden");k.append(q);!v&&ka();x(Q);d.append(Q)},K=function(d){var k=new Ba(a.get("newFontResource","\u6dfb\u52a0\u5b57\u4f53\u6765\u6e90"));k.setHighlight(!0);k.addActionListener(function(){var q=new u(C,null);q.setFinalCallBack(function(z){z.setFontId(da.getId());z.setOrder(f.length);f.push(z);h.updateResourceUi();A();Z&&Z.showSuccess(a.get("addFontResourceSuccess","\u6dfb\u52a0\u5b57\u4f53\u6765\u6e90\u6210\u529f\u3002"))});q.setCheckFileExist(B);q.showDialog()});k=k.getJqUi();k.addClass("font-lib-resource-new-button");
d.append(k)},x=function(d){var k=$("<div>"),q=com.kingdee.bos.qing.fontlib.common.Icons,z=$("<div>");q.background(z,"icon-side-open");z.addClass("font-lib-resource-css-message-open-button");z.hide();var P=$("<div>");q.background(P,"icon-side-close");P.addClass("font-lib-resource-css-message-close-button");var ja=$("<div>");ia(ja);z.on("click",function(){z.hide();P.show();ja.show();E.refresh(S)});P.on("click",function(){z.show();P.hide();ja.hide();E.refresh(S)});k.append(z);k.append(P);k.append(ja);
d.append(k)},ia=function(d){var k=$("<div>");k.addClass("font-lib-resource-css-main");var q=$("<div>");q.addClass("font-lib-resource-css-title");q.text(a.get("previewCss","\u9884\u89c8CSS"));var z=$("<div>");z.addClass("font-lib-resource-css-content");var P=$("<p>");P.text("@font-face {");var ja=$("<p>");F=$("<div>");var fa=$("<span>");F.addClass("font-lib-detail-css-preview-family-name");fa.text('";');F.appendTo(ja);fa.appendTo(ja);na(p.getText());fa=$("<p>");fa.text("\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0src:");
G=$("<span>");qa(G,f);var va=$("<p>");va.text("}");z.append(P);z.append(ja);z.append(fa);z.append(G);z.append(va);k.append(q);k.append(z);d.append(k)},na=function(d){F&&(F.text('\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0font-family:\u00a0"'+d),F.attr("title",d))},qa=function(d,k){if(d){d.empty();var q=k.length-1,z;for(z in k){var P=$("<p>");P.css("height","17px");var ja=$("<span>");ja.addClass("font-lib-resource-preview-url-prefix");var fa=$("<span>");fa.addClass("font-lib-resource-preview-url-suffix");
var va=k[z],ha=va.getPathType(),xa="\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0",za="";ha===V.LOCAL.index()?(za=va.getPath(),xa+='local("'+za):ha===V.QING.index()?(za=va.getFileDisplayName(),xa+='url("'+za):ha===V.OTHER.index()?(za=va.getPath(),xa+='url("'+za):ha===V.PRESET.index()&&(za=va.getFileDisplayName(),xa+='url("'+za);ja.text(xa);fa.text('")'+(z==q?";":","));P.attr("title",za);P.append(ja);P.append(fa);d.append(P)}}},ka=function(){v=!0;S||H(l);E.clear(S);S.addColumns(w?
3:4);S.getColumn(0).setWidth(80);S.getColumn(1).setWidth(200);S.getColumn(2).setWidth(910);!w&&S.getColumn(3).setWidth(200);var d=E.createHeadRow(S);d.getCell(0).setValue(a.get("priority","\u4f18\u5148\u7ea7"));d.getCell(1).setValue(a.get("sourceType","\u6765\u6e90\u65b9\u5f0f"));d.getCell(2).setValue(a.get("sourceDetail","\u6765\u6e90\u8be6\u60c5"));!w&&d.getCell(3).setValue(a.get("operation","\u64cd\u4f5c"));for(d=0;d<f.length;d++){var k=f[d];E.createRow(S).setUserObject(k)}E.refresh(S);qa(G,f);
v=!1},R=function(d,k){var q=$("<div>");q.addClass("font-lib-source-operation-button");q.text(a.get("moveUp","\u4e0a\u79fb"));var z=k.getOrder();q.on("click",function(){if(0<z){var P=z-1,ja=f[z];f[z]=f[P];f[P]=ja;f[z].setOrder(z);f[P].setOrder(P);ka();A()}});0<z?J(q):pa(q);d.append(q)},ma=function(d,k){var q=$("<div>");q.addClass("font-lib-source-operation-button");q.text(a.get("moveDown","\u4e0b\u79fb"));var z=k.getOrder();q.on("click",function(){if(z<f.length-1){var P=parseInt(z)+1,ja=f[z];f[z]=
f[P];f[P]=ja;f[z].setOrder(z);f[P].setOrder(P);ka();A()}});z<f.length-1?J(q):pa(q);d.append(q)},oa=function(d,k){var q=$("<div>");q.addClass("font-lib-source-operation-button");q.text(a.get("edit","\u7f16\u8f91"));q.on("click",function(){var z=new u(C,k);z.setFinalCallBack(function(P){var ja=k.getOrder();P.setId(k.getId());P.setFontId(k.getFontId());P.setOrder(ja);f[ja]=P;ka();A()});z.setCheckFileExist(B);z.showDialog()});d.append(q)},ra=function(d,k){var q=$("<div>");q.addClass("font-lib-source-operation-button");
q.text(a.get("delete","\u5220\u9664"));q.on("click",function(){var z=ca.createFeedbackDialog();z.setOptionType(ca.OPTION_OK_CANCEL);z.setMsgImageType(ca.MSG_DELETE);z.setMessage(a.get("deleteFontResourcePrompt","\u6240\u9009\u5b57\u4f53\u6765\u6e90\u5220\u9664\u540e\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u5b57\u4f53\u6765\u6e90\u5417\uff1f"));z.setClosingChecker(function(P){if(P===ca.RETURN_OK){P=k.getOrder();0<f.length&&f.splice(P,1);for(var ja in f)f[ja].setOrder(ja);h.updateResourceUi();
A();Z&&Z.showSuccess(a.get("deleteFontResourceSuccess","\u5220\u9664\u5b57\u4f53\u6765\u6e90\u6210\u529f\u3002"))}return!0});z.showDialog()});d.append(q)},pa=function(d){d.css("color","#b2b2b2");d.css("cursor","default")},J=function(d){d.css("color","");d.css("cursor","pointer")},B=function(d,k,q){var z=!1;if(d===V.QING.index())for(var P in f){if(d=f[P],k===d.getFileDisplayName()&&q===d.getFileSize()){z=!0;break}}else for(P in f)k===f[P].getPath()&&(z=!0);return z}};Y.UploadPanel=N;Y.ImportFontsDialog=
function(C){function I(v){KTDefaultCellRender.call(this,v);var w=this,Z=this.paintCellUI;this.paintCellUI=function(m,A){var t=w.getCurrentRowIdx(),b=w.getCurrentRow(),c=w.getCurrentColIdx();b=b.getUserObject();t<E.getHeadRowCount()?(Z(m,A),0===c&&1===t&&(p=new n,p.setChecked(f(l)),p.addCheckedListener(function(H,K){if(K){H=H.isChecked();for(var x in l)l[x].setChecked(H)}}),b=p.getJqUi(),b.addClass("font-lib-head-check-box"),b.appendTo(m))):0===c?(A=b.getCode(),t=l[A],c=new n,l[A]=c,c.setUserObject(b),
c.setChecked(t&&t.isChecked()),c.addCheckedListener(function(H,K){K&&(H=f(l),p.setChecked(H))}),b=c.getJqUi(),b.addClass("font-lib-check-box"),b.appendTo(m)):1===c?(A=b.getCode(),b=$("<div>"),b.text(A),b.addClass("font-lib-import-table-code"),b.appendTo(m)):2===c&&(b=b.getDisplayName(),A=$("<div>"),A.text(b),A.addClass("font-lib-import-table-displayName"),A.appendTo(m))}}Aa.call(this);var D=this,h=D.protectedMethod,e,l,Q,M,F,G,p;(function(){h.setTitle(a.get("exportFonts","\u5bfc\u5165\u5b57\u4f53"));
h.setSelectable(!0);D.setSize(600,450);h.setContentPaneCreator(function(){G||(G=$("<div>"),G.addClass("font-lib-import-panel"),S(G));return G});h.setClosingChecker2(function(v){v=l;var w=[],Z;for(Z in v){var m=v[Z];m.isChecked()&&(m=m.getUserObject(),w.push(m.getCode()))}if(0<w.length)da(w);else return h.getMessageCurtain().showPrompt(a.get("noFontSelected","\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u4e2a\u5b57\u4f53\u3002"),2E3),!1},function(v){h.destroy();return!0});h.setClosingAction(function(v){h.destroy();
return!0})})();this.setImportSuccessCallBack=function(v){Q=v};var W=function(v,w){Q&&Q(v,w)};this.setRemoteImpl=function(v){M=v};this.setImportFileName=function(v){e=v};var da=function(v){(new ta(M,function(w){h.destroy();if(w&&0<w.length){for(var Z=v.length,m=w.length,A=[],t=0;t<w.length;t++){var b=A,c=b.push;a:{var H=w[t];for(var K=0;K<C.length;K++){var x=C[K];if(H===x.getCode()){H=x;break a}}H=void 0}c.call(b,H)}w=new X;w.setRemoteImpl(M);w.setImportFileName(e);w.setHandleFinalCallBack(W);w.setSuccessImportQuantity(Z-
m);w.setConflictImportFontModels(A);w.showDialog();w.paintTable()}else W(!0,!1)},function(w){h.getMessageCurtain().showPrompt(a.get("importFontsFailed","\u5bfc\u5165\u5b57\u4f53\u5931\u8d25\u3002"),3E3);return!0})).importSelectedFonts(e,v)},S=function(v){F=E.createTable();F.setColumnFitVisibleWidth(!1);var w=new I(F);w.setOutsideVisible(!1);F.setCellRender(w);F.setSyncUIWhenModelChanged(!1);w=$(F.getUI());w.addClass("font-lib-no-x-scroll-table");w.children().css("overflow-x","hidden");v.append(w)};
this.paintTable=function(){F||S(G);E.clear(F);l={};F.addColumns(3);F.getColumn(0).setWidth(30);F.getColumn(1).setWidth(225);F.getColumn(2).setWidth(255);var v=E.createHeadRow(F);v.getCell(0).setValue("");v.getCell(1).setValue(a.get("fontCode","\u5b57\u4f53\u7f16\u7801"));v.getCell(2).setValue(a.get("fontDisplayName","\u5b57\u4f53\u663e\u793a\u540d\u79f0"));for(v=0;v<C.length;v++){var w=C[v];E.createRow(F).setUserObject(w)}E.refresh(F)};var f=function(v){for(var w in v)if(!v[w].isChecked())return!1;
return!0}};var r,ba,a,E,n,ea,y,V,O,ya,Ba,Aa,ca,sa,ta,wa,la,ua,aa;(function(){var C=com.kingdee.bos.qing.common;r=C.DomUtil;C=com.kingdee.bos.qing.framework.common;ba=C.MultilanguageManager;la=C.Resource;C=com.kingdee.bos.qing.fontlib.common;a=ba.createPackageAccessor(C);ea=C.FontLibUtil;ta=C.FontLibFacade;C=com.kingdee.bos.qing.fontlib.model;O=C.FontInfo;ya=C.FontResource;wa=C.UploadFileInfo;V=C.FontResourceType;aa=C.ConflictImportFontHandleType;C=com.kingdee.bos.qing.common.ui;E=C.TableUtil;C=com.kingdee.bos.qing.ui.component;
n=C.CheckBox;y=C.TextField;Ba=C.Button;Aa=C.AbstractModalDialog;ca=C.MessageDialog;sa=C.ComboBox;ua=C.HelpIcon})()})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.fontlib&&(com.kingdee.bos.qing.fontlib={});"undefined"==typeof com.kingdee.bos.qing.fontlib.ui&&(com.kingdee.bos.qing.fontlib.ui={});var u=com.kingdee.bos.qing.fontlib.ui;u.FontLibEntrance=function(ca){var sa,ta,wa,la=new N,ua,aa,C,I,D,h=
new Y,e=new U;this.resize=function(){D&&D.resize()};this.getJqUi=function(){if(!sa){sa=$("<div>");sa.addClass("font-lib-main");sa.append(h.getJqUi());ta=$("<div>");ta.addClass("font-lib-main-panel");sa.append(ta);var b=la.getJqUi();la.createButton(b,!1,p,g.get("newFontBtn","\u65b0\u5efa"));ua=la.createButton(b,!1,W,g.get("deleteFontBtn","\u5220\u9664"));la.createButton(b,!1,da,g.get("importBtn","\u5bfc\u5165"));aa=la.createButton(b,!1,S,g.get("exportBtn","\u5bfc\u51fa"));la.createButton(b,!1,f,g.get("refreshFontBtn",
"\u5237\u65b0"));la.createButton(b,!1,v,g.get("closeTab","\u9000\u51fa"));ua.setEnabled(!1);aa.setEnabled(!1);Z();sa.append(b);M();G()}return sa};var l=function(b,c){return new E(ca,b,c)},Q=function(b,c){e.refreshSelectedRowTotal(c);0>=c?(ua.setEnabled(!1),aa.setEnabled(!1)):(ua.setEnabled(!0),aa.setEnabled(!0))},M=function(){e.setSelectedAllOrNotListener(function(b,c){b?l(function(H){F(H,e.refreshTotalRow);l(function(K){D.updateSelectedRowAllPage(K);c(K.length)}).loadAllFontIds(I)},function(H,K){if(40277008===
H)return h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3),!0}).loadAllFonts(e.getCurrentPage(),e.getPageSize(),I):D.updateSelectedRowAllPage({})});e.setJumpToPageListener(function(b,c,H){l(function(K){F(K,H)},function(K,x){if(40277008===K)return h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),
5E3),!0}).loadAllFonts(b,c,I)});e.setAutoHide(!0);e.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);wa=e.getJqUi();ta.append(wa)},F=function(b,c){c?c(b.totalRow):e.refreshPagination();c=[];b=b.fonts;for(var H in b){var K=new V;K.fromJsonObject(b[H]);c.push(K)}D.updateUi(c,e.getCurrentPage(),e.getPageSize())},G=function(){l(function(b){D=new n;D.setItemCheckedCallBack(Q);D.setRemoteImpl(ca);D.setMessageCurtain(h);ta.append(D.getJqUi());F(b,e.resetPaginationAndJumpToFirstPage)}).loadAllFonts(1,
e.getPageSize(),I)},p=function(){var b=l(function(c){ea.jumpToFontLibDetailPanel(null,null)},function(c,H){if(40277008===c)return h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3),!0});b.setShowBlocking(!1);b.checkPermission()},W=function(){var b=r.createFeedbackDialog();b.setOptionType(r.OPTION_OK_CANCEL);b.setMsgImageType(r.MSG_DELETE);b.setMessage(g.get("deleteFontPrompt","\u6240\u9009\u5b57\u4f53\u5220\u9664\u540e\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u5b57\u4f53\u5417\uff1f"));
b.setClosingChecker(function(c){c===r.RETURN_OK&&(c=D.getSelectedFontAllPage(),l(function(){h.showSuccess(g.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"),2E3);l(function(H){e.refreshSelectedRowTotal(0);D.updateSelectedRowAllPage({});F(H,e.resetPaginationAndJumpToFirstPage)}).loadAllFonts(1,e.getPageSize(),I)},function(H,K){40277008===H?h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3):
40277009===H?(h.showPrompt(g.get("noDeletePermission","\u9884\u7f6e\u7684\u5b57\u4f53\u65e0\u6cd5\u5220\u9664\u3002"),2E3),l(function(x){e.refreshSelectedRowTotal(0);D.updateSelectedRowAllPage({});F(x,e.resetPaginationAndJumpToFirstPage)}).loadAllFonts(1,e.getPageSize(),I)):h.showPrompt(g.get("deleteFailure","\u5220\u9664\u5931\u8d25"),2E3);return!0}).removeFonts(c));return!0});b.showDialog()},da=function(){var b=$("<input type='file' id='importBtn'>");b.attr("accept",[".qing-font"]);b.on("change",
function(c){if(c=c.currentTarget.files[0]){var H=c.name,K=c.size,x=H.lastIndexOf(".");H=H.substring(x+1,H.length).toLowerCase();sa.find("#importBtn").val("");"qing-font"!==H?h.showPrompt(g.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),3E3):0===K?h.showPrompt(g.get("importFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),3E3):104857600<=K?h.showPrompt(g.get("fileTooLarge","\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),
3E3):(new ya(function(ia){w(ia)})).upload(c,h,!0)}b.val("")});b.click()},S=function(){var b=D.getSelectedFontAllPage();!b||0>=b.length||(D.containPresetFont(b)?h.showPrompt(g.get("noPermissionExportPresetFonts","\u9884\u7f6e\u7684\u5b57\u4f53\u65e0\u6cd5\u5bfc\u51fa\u3002"),3E3):l(function(c){c=c.exportFileName;var H="Qing-"+(new Date).getTime()+".qing-font";a.downloadFile(H,c)},function(c,H){40277008===c?h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),
5E3):40277014===c?h.showPrompt(g.get("noPermissionExportPresetFonts","\u9884\u7f6e\u7684\u5b57\u4f53\u65e0\u6cd5\u5bfc\u51fa\u3002"),3E3):h.showPrompt(g.get("exportFailed","\u5bfc\u51fa\u5931\u8d25\u3002"),2E3);return!0}).exportFonts(b))},f=function(){l(function(b){D.updateSelectedRowAllPage({});e.refreshSelectedRowTotal(0);F(b,e.refreshTotalRow)},function(b,c){if(40277008===b)return h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),
5E3),!0}).loadAllFonts(e.getCurrentPage(),e.getPageSize(),I)},v=function(){X.closeCurrentTab()},w=function(b){l(function(c){if(c&&0<c.length){for(var H=[],K=0;K<c.length;K++){var x=new Aa;x.fromJsonObject(c[K]);H.push(x)}A(b,H)}else h.showPrompt(g.get("noFoundImportFont","\u6240\u9009\u6587\u4ef6\u4e2d\u672a\u53d1\u73b0\u53ef\u5bfc\u5165\u7684\u5b57\u4f53\u4fe1\u606f\u3002"),5E3)},function(c){40277012===c?h.showPrompt(g.get("noFoundUploadFile","\u4e0a\u4f20\u6587\u4ef6\u5931\u8d25\u3002"),3E3):40277013===
c&&h.showPrompt(g.get("parseImportFileError","\u5bfc\u5165\u5b57\u4f53\u6587\u4ef6\u89e3\u6790\u5f02\u5e38\u3002"),3E3)}).parseImportFile(b)},Z=function(){C=new L;C.addSearchListener(m);C.setSearchListenerDelay(1E3);C.setAlwaysShowCleanIcon(!1);C.setShowSearchIcon(!0);C.setPlaceholder(g.get("searchBoxPlaceholder","\u641c\u7d22\u5b57\u4f53\u7f16\u7801/\u5b57\u4f53\u663e\u793a\u540d\u79f0"));var b=C.getJqUi();b.addClass("font-lib-search");var c=b.find(":input");c.focus(function(){b.css({width:"300px"})});
c.blur(function(){b.css({width:"210px"})});la.getJqUi().append(b)},m=function(b){I=C.getText().trim();D.setSearchContent(I);b=l(function(H){D.updateSelectedRowAllPage({});e.refreshSelectedRowTotal(0);F(H,e.resetPaginationAndJumpToFirstPage)},function(H,K){if(40277008===H)return h.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3),!0});var c=e.getPageSize();b.loadAllFonts(1,c,I)},A=function(b,c){c=
new Ba(c);c.setImportFileName(b);c.setRemoteImpl(ca);c.setImportSuccessCallBack(function(H,K){H&&(K?h.showSuccess(g.get("importFontsSuccessComplex","\u5bfc\u5165\u6210\u529f\uff0c\u4e0e\u9884\u7f6e\u5b57\u4f53\u7f16\u7801\u51b2\u7a81\u7684\u5b57\u4f53\u5df2\u8fdb\u884c\u91cd\u547d\u540d\u64cd\u4f5c\u3002"),5E3):h.showSuccess(g.get("importFontsSuccessSimple","\u5bfc\u5165\u6210\u529f\u3002"),2E3));t()});c.showDialog();c.paintTable()},t=function(){l(function(b){I="";var c=C.getJqUi().find(":input");
c.val("");c.blur();D.updateSelectedRowAllPage({});e.refreshSelectedRowTotal(0);F(b,e.resetPaginationAndJumpToFirstPage)}).loadAllFonts(1,e.getPageSize())}};u.FontLibDetailEntrance=function(ca,sa){var ta,wa,la,ua=new N,aa=new Y,C=!1,I=!1,D,h;this.getJqUi=function(){ta||Q();return ta};this.setCloseButtonCallBack=function(f){D=f};var e=function(){D&&D()};this.setTabDirty=function(f){h=f};var l=function(f){h&&h(f)};this.isDirty=function(){return!I&&la.isDirty()};this.resize=function(){la&&la.resize()};
var Q=function(){ta=$("<div>");ta.addClass("font-lib-main");ta.append(aa.getJqUi());wa=$("<div>");wa.addClass("font-lib-detail-main-panel-background");ta.append(wa);var f=new O;sa?S(function(v){f.fromJsonObject(v);C=!!f.isPreset();M();da(f);f.getCode()||aa.showError(g.get("fontNotExist","\u5b57\u4f53\u4e0d\u5b58\u5728\uff0c\u8bf7\u5237\u65b0\u540e\u91cd\u8bd5\u3002"))}).loadFontInfo(sa):(C=!1,M(),da(f))},M=function(){var f=ua.getJqUi();!C&&ua.createButton(f,!1,F,g.get("saveFontBtn","\u4fdd\u5b58"));
!C&&ua.createButton(f,!1,G,g.get("refreshFontBtn","\u5237\u65b0"));ua.createButton(f,!1,e,g.get("closeTab","\u9000\u51fa"));ta.append(f)},F=function(){var f=la.getFontInfo();p(f)&&W(f)},G=function(){if(sa)S(function(v){if(v){var w=new O;w.fromJsonObject(v);la.setModel(w);l(!1);aa.showSuccess(g.get("refreshSuccess","\u5237\u65b0\u6210\u529f\u3002"),2E3);I=!1}else aa.showPrompt(g.get("fontInfoNoExist","\u5b57\u4f53\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),l(!1),I=!0},function(v,
w){if(40277008===v)return aa.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),5E3),!0}).loadFontInfo(sa);else{var f=new O;la.setModel(f);l(!1);aa.showSuccess(g.get("refreshSuccess","\u5237\u65b0\u6210\u529f\u3002"),2E3);I=!1}},p=function(f){var v=f.getCode(),w=f.getDisplayName();f=f.getFontResources();if(v&&0!==v.length||w&&0!==w.length)if(v&&0!==v.length)if(w&&0!==w.length)if(f&&0!==f.length){if(50<
v.length)return aa.showPrompt(g.get("fontNameOverLength","\u5b57\u4f53\u7f16\u7801\u4e0d\u80fd\u8d85\u8fc725\u4e2a\u5b57\u7b26\u3002"),2E3),!1;if(50<w.length)return aa.showPrompt(g.get("displayNameOverLength","\u5b57\u4f53\u663e\u793a\u540d\u79f0\u4e0d\u80fd\u8d85\u8fc725\u4e2a\u5b57\u7b26\u3002"),2E3),!1;if(!ba.checkVariableNaming(v))return aa.showPrompt(g.get("illegalFontName","\u5b57\u4f53\u7f16\u7801\u5fc5\u987b\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\u3002"),
4E3),!1;if(!ea.checkCustomName(w))return aa.showPrompt(g.get("illegalFontDisplayName","\u5b57\u4f53\u663e\u793a\u540d\u79f0\u4e0d\u5141\u8bb8\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u3002"),2E3),!1}else return aa.showPrompt(g.get("noFoundFontResource","\u8bf7\u6dfb\u52a0\u5b57\u4f53\u6765\u6e90\u3002"),2E3),!1;else return aa.showPrompt(g.get("noFoundDisplayName","\u8bf7\u8f93\u5165\u5b57\u4f53\u663e\u793a\u540d\u79f0\u3002"),2E3),!1;else return aa.showPrompt(g.get("noFoundFontCode","\u8bf7\u8f93\u5165\u5b57\u4f53\u7f16\u7801\u3002"),
2E3),!1;else return aa.showPrompt(g.get("noFoundFontCodeAndDisplayName","\u8bf7\u8f93\u5165\u5b57\u4f53\u7f16\u7801\u548c\u5b57\u4f53\u663e\u793a\u540d\u79f0\u3002"),2E3),!1;return!0},W=function(f){var v=S(function(Z){var m=new O;m.fromJsonObject(Z);la.setModel(m);sa=m.getId();l(!1);aa.showSuccess(g.get("saveSuccess","\u4fdd\u5b58\u6210\u529f"),2E3)},function(Z,m){if(40277005===Z)aa.showPrompt(g.get("fontNameAndDisplayNameDuplicated","\u5b57\u4f53\u7f16\u7801\u548c\u5b57\u4f53\u663e\u793a\u540d\u79f0\u5df2\u5b58\u5728\u3002"),
2E3);else if(40277006===Z)aa.showPrompt(g.get("fontNameDuplicated","\u5b57\u4f53\u7f16\u7801\u5df2\u5b58\u5728\u3002"),2E3);else if(40277007===Z)aa.showPrompt(g.get("fontDisplayNameDuplicated","\u5b57\u4f53\u663e\u793a\u540d\u79f0\u5df2\u5b58\u5728\u3002"),2E3);else if(40277008===Z)aa.showPrompt(g.get("noPermission","\u60a8\u7684\u83dc\u5355\u6743\u9650\u5df2\u53d1\u751f\u53d8\u66f4\uff0c\u65e0\u6cd5\u7ee7\u7eed\u64cd\u4f5c\u3002"),2E3);else if(40277010===Z)aa.showPrompt(g.get("fontInfoOutdated",
"\u5f53\u524d\u9875\u9762\u5df2\u5931\u6548\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u540e\u91cd\u8bd5\u3002"),2E3),l(!1),I=!0;else if(40277011===Z)aa.showPrompt(g.get("fontInfoNoExist","\u5b57\u4f53\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),l(!1),I=!0;else return!1;return!0}),w=f.getId();w&&0<w.length?v.updateFontInfo(f):v.addFont(f)},da=function(f){la=new y(ca,f);la.setMessageCurtain(aa);la.setTabDirty(l);wa.append(la.getJqUi());la.updateResourceUi()},S=function(f,v){return new E(ca,
f,v)}};var N,g,T,U,L,X,Y,r,ba,a,E,n,ea,y,V,O,ya,Ba,Aa;(function(){var ca=com.kingdee.bos.qing.ui.component;N=ca.Toolbar;Y=ca.MessageCurtain;r=ca.MessageDialog;ca=com.kingdee.bos.qing.common;ba=ca.Util;ca=com.kingdee.bos.qing.framework.common;T=ca.MultilanguageManager;X=ca.TabbedUiUtil;a=ca.RemoteFramework;ca=com.kingdee.bos.qing.fontlib.common;g=T.createPackageAccessor(ca);E=ca.FontLibFacade;ea=ca.FontLibUtil;ca=com.kingdee.bos.qing.fontlib.model;V=ca.FontModel;O=ca.FontInfo;Aa=ca.ImportFontModel;
ca=com.kingdee.bos.qing.fontlib.common.ui;n=ca.FontLibInfoPanel;y=ca.FontLibDetailPanel;ya=ca.UploadPanel;Ba=ca.ImportFontsDialog;ca=com.kingdee.bos.qing.biz.common;U=ca.ComplexPaginationBar;ca=com.kingdee.bos.qing.ui.component;L=ca.SearchBox})()})();
//qingVersionTag: 20250415