var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(p,E,x){p instanceof String&&(p=String(p));for(var D=p.length,A=0;A<D;A++){var fa=p[A];if(E.call(x,fa,A,p))return{i:A,v:fa}}return{i:-1,v:void 0}};$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(p,E,x){if(p==Array.prototype||p==Object.prototype)return p;p[E]=x.value;return p};$jscomp.getGlobal=function(p){p=["object"==typeof globalThis&&globalThis,p,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var E=0;E<p.length;++E){var x=p[E];if(x&&x.Math==Math)return x}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(p,E){var x=$jscomp.propertyToPolyfillSymbol[E];if(null==x)return p[E];x=p[x];return void 0!==x?x:p[E]};
$jscomp.polyfill=function(p,E,x,D){E&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(p,E,x,D):$jscomp.polyfillUnisolated(p,E,x,D))};$jscomp.polyfillUnisolated=function(p,E,x,D){x=$jscomp.global;p=p.split(".");for(D=0;D<p.length-1;D++){var A=p[D];if(!(A in x))return;x=x[A]}p=p[p.length-1];D=x[p];E=E(D);E!=D&&null!=E&&$jscomp.defineProperty(x,p,{configurable:!0,writable:!0,value:E})};
$jscomp.polyfillIsolated=function(p,E,x,D){var A=p.split(".");p=1===A.length;D=A[0];D=!p&&D in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var fa=0;fa<A.length-1;fa++){var ra=A[fa];if(!(ra in D))return;D=D[ra]}A=A[A.length-1];x=$jscomp.IS_SYMBOL_NATIVE&&"es6"===x?D[A]:null;E=E(x);null!=E&&(p?$jscomp.defineProperty($jscomp.polyfills,A,{configurable:!0,writable:!0,value:E}):E!==x&&(void 0===$jscomp.propertyToPolyfillSymbol[A]&&(x=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[A]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(A):$jscomp.POLYFILL_PREFIX+x+"$"+A),$jscomp.defineProperty(D,$jscomp.propertyToPolyfillSymbol[A],{configurable:!0,writable:!0,value:E})))};$jscomp.polyfill("Array.prototype.find",function(p){return p?p:function(E,x){return $jscomp.findInternal(this,E,x).v}},"es6","es3");
(function(){function p(){}function E(){fa.call(this);var I;this.getRemoteUrl=function(){return I};this.setRemoteUrl=function(z){I=z}}function x(I,z,B,P){ra.call(this,I,z,B,P);var K=this.protectedMethod;this.loadUserInfo=function(){K.remote("loadUserInfo",{})};this.loadGaiPrivacyInfo=function(){K.remote("loadGaiPrivacyInfo",{})};this.loadQingGPTLicense=function(){K.remote("loadQingGPTLicense",{})};this.loadMatchedCardInfo=function(H,L,ba){H={questionText:H,workbenchId:L,currentRef:JSON.stringify(ba)};
K.remote("loadMatchedCardInfo",H)};this.loadSchema=function(H,L){H={tag:H,viewInfos:JSON.stringify(L)};K.remote("loadSchema",H)};this.checkNeedRecommendQuestions=function(H){K.remote("checkNeedRecommendQuestions",{workbenchId:H})};this.loadRecommendQuestions=function(H){K.remote("loadRecommendQuestions",{workbenchId:H})};this.loadSingleCardRecommendQuestions=function(H,L,ba){H={referenceMap:JSON.stringify(H),workbenchId:L,chartInfo:JSON.stringify(ba)};K.remote("loadSingleCardRecommendQuestions",H)};
this.loadView=function(H,L,ba){H={questionText:H,referenceMap:JSON.stringify(L),workbenchId:ba};K.remote("loadView",H)}}"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.assistant&&(com.kingdee.bos.qing.assistant={});"undefined"==typeof com.kingdee.bos.qing.assistant.common&&(com.kingdee.bos.qing.assistant.common=
{});NS=com.kingdee.bos.qing.assistant.common;NS.AssistantConstant=p;NS.DragHelper=function(){var I,z,B,P=!1,K,H,L,ba;this.bindElement=function(C,M,y,R){I=C;I.on("mousedown",ma);H=M;L=y;ba=R};this.setMaskContainer=function(C){B=C};var ma=function(C){P=!0;var M=B||I,y=$("<div>");y.css({position:"absolute",top:"0",left:"0",width:"100%",height:"100%","z-index":"10"});z=y;M.append(z);K=C.originalEvent;H&&H();$(document).on("mousemove",a);$(document).on("mouseup",F);C=K;C.stopPropagation();C.preventDefault()},
a=function(C){C=C.originalEvent;P&&L&&L(C.clientX-K.clientX,C.clientY-K.clientY);C.stopPropagation();C.preventDefault()},F=function(C){C=C.originalEvent;P=!1;z.remove();ba&&ba();$(document).off("mousemove",a);$(document).off("mouseup",F);C.stopPropagation();C.preventDefault()}};NS.TipsHelper=function(I){var z;this.getJqUi=function(){z||(z=$("<div class='qing-assistant-tooltips'>"),I.on({mouseenter:B,mouseleave:P},"[data-tooltips]"));return z};var B=function(K){K=$(this);var H=K.attr("data-tooltips");
H&&(z.text(H),z.css({top:K.offset().top+K.outerHeight()+4,left:K.offset().left-(z.outerWidth()-K.outerWidth())/2}),z.show())},P=function(K){z.hide()}};NS.TypeHelper=function(I){var z={target:null,speed:50,typingClass:"qing-assistant-typing",untypedClass:"qing-assistant-untyped",filter:function(a){},humanizer:function(a){},onType:function(a){},onComplete:function(a){}},B,P;this.start=function(){for(var a in z)I.hasOwnProperty(a)&&(z[a]=I[a]);K(z.target)};this.stop=function(){clearTimeout(P);z.target.find("."+
z.typingClass).removeClass(z.typingClass);z.onComplete(!1)};this.pause=function(){B=!0};this.resume=function(){B=!1};var K=function(a){var F=B?a:H(a);if(0===F.length||0===F.closest(z.target).length)z.onComplete(!0);else P=setTimeout(function(){K(F)},ba(a))},H=function(a){a.removeClass(z.untypedClass);z.onType(a);if(L(a))return ma(a);if(0<a.children().length)return a.children().addClass(z.untypedClass),a.children().first();a.addClass(z.typingClass);var F=a.data("type-text")||a.data("type-text",a.text()).data("type-text"),
C=parseInt(a.data("type-pos")||0);C<F.length?(a.text(F.substring(0,++C)),a.data("type-pos",C)):(a.removeData("type-text").removeData("type-pos"),a.removeClass(z.typingClass),a=ma(a));return a},L=function(a){return!a.text()||z.filter(a)},ba=function(a){if(L(a))return 0;a=z.humanizer(a);return"number"===typeof a?a:Math.round(Math.random()*z.speed)+z.speed},ma=function(a){for(var F;0!==a.length&&0===(F=a.next()).length;)a=a.parent();return F}};NS.GPTFacade=x;var D,A,fa,ra;(function(){var I=com.kingdee.bos.qing.common;
D=I.DomUtil;I=com.kingdee.bos.qing.framework.common;A=I.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.workbench);fa=I.AbstractRemoteCall;ra=I.AbstractFacade})();p.ShowType={FLOAT:"float",PINNED:"pinned",FULLSCREEN:"fullscreen"};p.PrivacyType={TENANT:"tenantAgreement",USER:"userAgreement"};NS.UserInfoUtil=new function(){var I;this.getUserInfo=function(){I||z();return I};var z=function(){(new x(com.kingdee.bos.qing.assistant.common.Integration.getRemoteImpl(),function(B){I=B},function(B,
P,K){return!1})).loadUserInfo()}};NS.PrivacyUtil=new function(){var I=this,z=com.kingdee.bos.qing.integration.GaiPrivacyAgreementActionHandler,B,P;this.setPrivacyChangeListener=function(a){P=a};this.openPrivacyAgreement=function(a,F){z.setCallback(function(M){M=M.content;if(B.tenantAgree!==M.tenantAgree||B.userAgree!==M.userAgree)B.tenantAgree=M.tenantAgree,B.userAgree=M.userAgree,P&&P(B);M=p.PrivacyType.TENANT===a?B.tenantAgree:B.userAgree;F&&F(M)});var C={};C.tenantAgreement=p.PrivacyType.TENANT===
a;C.userAgreement=p.PrivacyType.USER===a;z.openGaiPrivacyAgreement(C)};this.checkQingGPTLicense=function(a,F){var C=new x(com.kingdee.bos.qing.assistant.common.Integration.getRemoteImpl(),function(M){var y=M.hasQingGPTLicense;M=M.qingGPTLicenseCode;B&&(B.hasQingGPTLicense=y,B.qingGPTLicenseCode=M);if(F||y)a&&a(y);else{y=3010009===M?A.get("illegalGPTLicenseDialogTips","\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010AI\u6570\u636e\u5206\u6790\u52a9\u624b\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u4f7f\u7528\u667a\u80fd\u6570\u636e\u5206\u6790\u529f\u80fd\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"):
A.get("noGPTLicenseDialogTips","\u60a8\u6240\u4f7f\u7528\u7684\u8d26\u6237\u6ca1\u6709\u88ab\u5206\u914d\u3010AI\u6570\u636e\u5206\u6790\u52a9\u624b\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u4f7f\u7528\u667a\u80fd\u6570\u636e\u5206\u6790\u529f\u80fd\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002");M=com.kingdee.bos.qing.ui.component.MessageDialog;var R=M.createFeedbackDialog();R.setMsgImageType(M.MSG_CONFIRM);R.setOptionType(M.OPTION_OK);R.setButtonText(M.RETURN_OK,
A.get("close","\u5173\u95ed"));R.setMessage(y);R.showDialog()}},function(M,y,R){a&&a(!1);return!1});C.setShowBlocking(!1);C.loadQingGPTLicense()};this.checkQingLicense=function(a){H(function(){a(B.hasQingLicense)})};this.checkUserPrivacyAgreed=function(a){var F=B.userAgree;if(F)return!0;a||F||ma(function(){I.openPrivacyAgreement(p.PrivacyType.USER)});return!1};this.checkAllPrivacyAgreed=function(a){H(function(){K(a)})};var K=function(a){var F=function(C){C&&I.checkAllPrivacyAgreed(a)};B.tenantAgree&&
B.userAgree&&a&&a();B.tenantAgree||B.adminUser?B.tenantAgree&&B.userAgree||I.openPrivacyAgreement(B.tenantAgree?p.PrivacyType.USER:p.PrivacyType.TENANT,F):ba();P&&P(B)},H=function(a){B?a&&a():L(a)},L=function(a){var F=new x(com.kingdee.bos.qing.assistant.common.Integration.getRemoteImpl(),function(C){B=C;a&&a()},function(C,M,y){a&&a();return!1});F.setShowBlocking(!1);F.loadGaiPrivacyInfo()},ba=function(){var a=com.kingdee.bos.qing.ui.component.MessageDialog,F=a.createFeedbackDialog();F.setMsgImageType(a.MSG_CONFIRM);
F.setOptionType(a.OPTION_OK);F.setButtonText(a.RETURN_OK,A.get("tenantAgreementConfirm","\u6211\u77e5\u9053\u4e86"));F.setMessage(A.get("tenantAgreementTips","\u60a8\u7684\u4f01\u4e1a\u8fd8\u672a\u7b7e\u7f72\u82cd\u7a79GPT\u670d\u52a1\u534f\u8bae\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u8fdb\u884c\u7b7e\u7f72\u3002"));F.showDialog()},ma=function(a){var F=com.kingdee.bos.qing.ui.component.MessageDialog,C=F.createFeedbackDialog();C.setMsgImageType(F.MSG_CONFIRM);C.setOptionType(F.OPTION_OK);C.setButtonText(F.RETURN_OK,
A.get("userAgreementDetail","\u9690\u79c1\u653f\u7b56\u8be6\u60c5"));C.setMessage(A.get("userAgreementTips","\u4e3a\u4e86\u7ed9\u60a8\u63d0\u4f9b\u66f4\u597d\u7684\u670d\u52a1\uff0c\u8bf7\u5148\u9605\u8bfb\u5e76\u540c\u610f\u9690\u79c1\u653f\u7b56\u3002"));C.setExtendPainter(function(M,y){var R=$("<div>");D.layoutCtrlWithLRTB(R,6,6,null,8,null,60);R.text(y);R.css("text-align","center");R.appendTo(M)});C.showDialog();C.setClosingChecker(function(M){M===F.RETURN_OK&&a&&a();return!0})}};NS.PermissionUtil=
new function(){this.checkPermission=function(I,z,B){var P=com.kingdee.bos.qing.workbench.common.Integration,K=new com.kingdee.bos.qing.workbench.common.RemoteImpl;P=P.getWorkbenchRemoteUrl();K.setRemoteUrl(P);(new com.kingdee.bos.qing.workbench.common.Facade(K,function(H){z&&z();return!0},function(H,L,ba){B&&B(H,L);return!0})).checkPermission(I)}};NS.Integration=new function(){var I,z,B,P,K,H=!1;this.setRemoteUrl=function(L){I=new E;I.setRemoteUrl(L)};this.getRemoteImpl=function(){return I};this.setSquareExhibitionLoader=
function(L){z=L};this.getSquareExhibitionLoader=function(){return z};this.setOpenDesigner=function(L){B=L};this.getOpenDesigner=function(){return B};this.setOpenQingGPTListener=function(L){P=L};this.openQingGPT=function(L){P&&P(L)};this.setShowAssistantEntrance=function(L){K=L};this.isShowAssistantEntrance=function(){return K};this.setShowAssistantPanel=function(L){H=L};this.isShowAssistantPanel=function(){return H}};NS.CardIconUtil=new function(){this.getIconNameByCardType=function(I){if(!I)return"card_type_square";
switch(I){case "longer":return"card_type_longer";case "rpt":return"card_type_rpt";case "square":return"card_type_square";case "metric":return"card_type_metric";default:return"card_type_square"}}}})();(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.assistant&&(com.kingdee.bos.qing.assistant={});"undefined"==typeof com.kingdee.bos.qing.assistant.model&&(com.kingdee.bos.qing.assistant.model={});NS=com.kingdee.bos.qing.assistant.model;NS.ChartTypeModel=function(){var p,E,x;this.setIconName=
function(D){p=D};this.getIconName=function(){return p};this.setChartTypeName=function(D){E=D};this.getChartTypeName=function(){return E};this.setChartName=function(D){x=D};this.getChartName=function(){return x}};NS.RecommendItem=function(){var p,E,x,D;this.getCardId=function(){return p};this.setCardId=function(A){p=A};this.getCardName=function(){return E};this.setCardName=function(A){E=A};this.getCardType=function(){return x};this.setCardType=function(A){x=A};this.getQuestionText=function(){return D};
this.setQuestionText=function(A){D=A};this.fromJsonObject=function(A){p=A.cardId;E=A.cardName;x=A.cardType;D=A.questionText}}})();(function(){function p(){var b;this.getJqUi=function(){b||(b=$("<div class='qing-assistant-bubble'>"),y.background(b,"assistant-bot"));return b}}function E(){var b=this,f;this.getJqUi=function(){f||(f=$("<div class='qing-assistant-panel-record'>"),f.append(b.getUserInfo()),f.append(b.getContent()));return f};this.getUserInfo=function(){throw Error("override me");};this.setContent=function(h){throw Error("override me");};this.getContent=function(){throw Error("override me");}}function x(){E.call(this);
var b=$("<div>"),f;this.getUserInfo=function(){var h=$("<div class='qing-assistant-panel-userinfo'>"),c=$("<div class='qing-assistant-panel-avatar'>"),g=$("<span class='qing-assistant-panel-username'>"),k=Ga.getUserInfo();c.css("background-image","url("+k.avatar+")");g.text(k.name);h.append(c);h.append(g);return h};this.setContent=function(h){b.text(h)};this.setEditListener=function(h){f=h};this.getContent=function(){var h=$("<div class='qing-assistant-panel-question'>");h.append(b);var c=$("<div class='qing-assistant-panel-question-operate'>");
if(f){var g=$("<div class='qing-assistant-panel-question-edit'>");c.append(g);g.on("click",function(){f&&f(b.text())});y.backgroundWithHover(g,"assistant-edit")}h.append(c);return h}}function D(){E.call(this);var b,f,h;this.getUserInfo=function(){var c=$("<div class='qing-assistant-panel-userinfo'>"),g=$("<div class='qing-assistant-panel-avatar'>"),k=$("<span class='qing-assistant-panel-username'>");y.background(g,"assistant-cosmic");k.text(a.get("assistantAnswerRecordUserName","\u82cd\u7a79"));c.append(g);
c.append(k);return c};this.setContent=function(c){c.addClass("qing-assistant-panel-answer");b?b.replaceWith(c):b=c};this.setContentText=function(c){b||(b=$("<div>"));b.addClass("qing-assistant-panel-answer");b.text(c)};this.getContent=function(){return b};this.setResizeListener=function(c){f=c};this.triggerResize=function(){f&&f()};this.setExtInfo=function(c){h=c};this.getExtInfo=function(){return h}}function A(){var b=this,f,h,c,g,k;this.setWorkbenchGptModel=function(m){f=m};this.setSendQuestionListener=
function(m){h=m};this.setEditQuestionListener=function(m){c=m};this.setDroppableTrigger=function(m){g=m};this.setAddWidgetFromGpt=function(m){k=m};this.supportSource=function(m){return m.getBizType()==com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Dashboard?!1:!0};this.createDraggedChartPane=function(){var m=f.getBizType();var n=com.kingdee.bos.qing.workbench.model.WorkbenchModel;m=n.WidgetType_Metrics==m||n.WidgetType_Square==m?new ra:b.supportSource(f)?new I:new z;t(m);return m};
this.createGPTChartPane=function(m){var n=new fa;n.setJsonViewInfos(m);t(n);return n};var t=function(m){m.setWorkbenchGptModel(f);m.setSendQuestionListener(h);m.setEditQuestionListener(c);m.setDroppableTrigger(g);m.setAddToWorkbenchListener(function(n){k(n)})}}function fa(){B.call(this);var b=this.protectedMethod,f,h;this.setJsonViewInfos=function(c){h=c};this.protectedGetChartTitle=function(){return f.title};this.protectedLoadSchema=function(c,g,k){var t=new ua(ea.getRemoteImpl(),function(m){f=m.chartInfo;
k(m.schemaContent)},function(m,n,S){m=$("<div>");m.addClass("");m.appendTo(g);n=$("<div>");da.layoutCtrlWithLRTB(n,"50%",null,100,10,null,80);n.css("margin-left","-50px");y.background(n,"msg-warning");n.appendTo(m);n=$("<div>");da.layoutCtrlWithLRTB(n,"10%",null,"80%",94,null,30);n.css("text-align","center");n.text(a.get("loadSchemaError","\u7f3a\u5c11\u751f\u6210\u56fe\u8868\u6240\u9700\u8981\u7684\u5b57\u6bb5\uff0c\u5efa\u8bae\u60a8\u66f4\u6362\u4e00\u4e0b\u63d0\u95ee\u65b9\u5f0f\u3002"));n.appendTo(m);
b.hideAddWorkBenchItem();return!0});t.setBlockingJqUi(g);t.loadSchema(c,h)};this.protectedGetChartTitleIconType=function(){return ha.getGPTChartTitleIconType(b.getWorkbenchGptModel())};this.protectedCreateQuestion=function(){var c=b.createRecommendedQuestionPane();c.setChartInfo(f);c.getJqUi().appendTo(b.getQuestionPaneParentUi())}}function ra(){B.call(this);var b=this.protectedMethod;this.protectedGetChartTitle=function(){return b.getWorkbenchGptModel().getBizName()};this.protectedLoadSchema=function(h,
c,g){var k=b.getWorkbenchGptModel();h=new com.kingdee.bos.qing.workbench.common.Facade(f(),function(t){(t=t.model)?g(t):com.kingdee.bos.qing.workbench.common.MetricIntegration.remoteSchemaContent(k.getWorkbenchId(),k.getBizId(),function(m){g(m.schema)})},function(t,m,n){return!1});h.setBlockingJqUi(c);h.loadSchema(k.getWorkbenchId(),k.getRef())};var f=function(){var h=com.kingdee.bos.qing.workbench.common.Integration,c=new com.kingdee.bos.qing.workbench.common.RemoteImpl;h=h.getWorkbenchRemoteUrl();
c.setRemoteUrl(h);return c};this.protectedGetChartTitleIconType=function(){return b.getWorkbenchGptModel().getBizType()}}function I(){B.call(this);var b=this.protectedMethod;this.protectedIsShowChart=function(){return!1};this.protectedGetDesc=function(){var f=a.get("workbenchChartPaneWithSourceDesc","\u4ee5\u4e0b\u662f\u6211\u4e3a\u60a8\u63a8\u8350\u7684\u51e0\u4e2a\u95ee\u9898\uff0c\u6216\u8bb8\u80fd\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u5206\u6790\u201c#1\u201d#2\uff1a");f=f.replace("#1",b.getWorkbenchGptModel().getBizName());
return f=f.replace("#2",ha.getBizTypeNameDesc(b.getWorkbenchGptModel()))};this.protectedCreateQuestion=function(){var f=function(){var c=b.createRecommendedQuestionPane();c.hideTitle();c.setErrorListener(function(g){b.setDesc(g)});c.getJqUi().appendTo(b.getQuestionPaneParentUi())},h=b.getWorkbenchGptModel();Ha.checkPermission(h.getBizId(),function(){f()},function(){b.setDesc(a.get("gptCheckPermissionError","\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u8be5\u5361\u7247\u7684\u67e5\u770b\u6743\u9650\uff0c\u65e0\u6cd5\u4e3a\u60a8\u63a8\u8350\u95ee\u9898\u3002"))})}}
function z(){B.call(this);var b=this.protectedMethod;this.protectedIsShowChart=function(){return!1};this.protectedGetDesc=function(){var f=a.get("workbenchChartPaneWithoutSourceDesc","\u5f88\u62b1\u6b49\uff0c\u76ee\u524d\u6211\u8fd8\u65e0\u6cd5\u5206\u6790#1\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u62d6\u52a8\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u5185\u5bb9\u8ba9\u6211\u5206\u6790\u3002");return f=f.replace("#1",ha.getBizTypeName(b.getWorkbenchGptModel()))};this.protectedCreateQuestion=function(){}}
function B(){P.call(this);var b=this,f=this.protectedMethod,h,c,g,k,t,m,n;this.setAddToWorkbenchListener=function(r){t=r};this.setWorkbenchGptModel=function(r){h=r;(c=h.getRef().tag)||(c=Ba.createUUID());b.setTag(c)};this.setSendQuestionListener=function(r){g=r};this.setEditQuestionListener=function(r){k=r};this.getQuestionRecordContent=function(){return ha.getQuestionRecordContent(h)};this.createWorkbenchGptModel=function(){var r=h.clone();r.setJsonModelBook(f.getJsonModelBook());r.setBizName(b.protectedGetChartTitle());
r.setBizType(com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Square);r.getRef().uid=Ba.createUUID();return r};this.protectedCreateQuestion=function(){S().getJqUi().appendTo(f.getQuestionPaneParentUi())};this.protectedRemoveQuestion=function(){n&&n.clear()};var S=function(){if(n)return n;n=new K;n.setRef(h.getRef());n.setWorkbenchId(h.getWorkbenchId());n.setSendQuestionListener(function(r){X.checkQingGPTLicense(function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION,
com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION_USER_SELECT);g(h,r)})});n.setEditQuestionListener(k);return n};this.protectedLoadDataExtractUi=function(r,T){var Y=h.getRef(),q=new com.kingdee.bos.qing.prepare.WorkbenchCardDataExtractor;q.setTag(c);q.setRefType(Y.refType);q.setWidgetBizId(h.getBizId());q.setJsonReferenceMap(Y);q.setErrorCallback(function(Q,N,O){if(Q=ha.getLicenseErrorTips(Q))f.setDesc(Q),f.removeChartContainer()});q.getJqUi().appendTo(r);q.start();
q.setExtractDataFinishedSuccessCallback(function(){T()})};this.protectedCreateCustomOperation=function(r){m=$("<div>");m.addClass("qing-assistant-chart-pane-add-workbench");m.on("click",function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_ADD_TO_GRID);var q=b.createWorkbenchGptModel();
t(q)});var T=$("<div>");T.addClass("qing-assistant-chart-pane-add-workbench-circle");T.appendTo(m);var Y=$("<div>");Y.addClass("qing-assistant-chart-pane-add-workbench-plus");Y.appendTo(T);T=$("<span>");T.text(a.get("addWorkBench","\u6dfb\u52a0\u81f3\u5de5\u4f5c\u53f0"));T.appendTo(m);m.appendTo(r);return m};this.protectedGetDesc=function(){var r=a.get("workbenchChartPaneDesc","\u8fd9\u662f\u6211\u9488\u5bf9\u201c#1\u201d#2\u751f\u6210\u7684\u5206\u6790\u5185\u5bb9\u3002");r=r.replace("#1",f.getWorkbenchGptModel().getBizName());
return r=r.replace("#2",ha.getBizTypeName(h))};this.protectedMethod.getWorkbenchGptModel=function(){return h};this.protectedMethod.createRecommendedQuestionPane=S;this.protectedMethod.hideAddWorkBenchItem=function(){m.hide()}}function P(){var b=this,f,h,c,g,k,t,m,n,S,r,T,Y,q,Q,N,O,aa=Ba.createUUID();this.protectedLoadSchema=function(v,U,J){throw Error("override me");};this.protectedGetDesc=function(){throw Error("override me");};this.protectedGetChartTitle=function(){throw Error("override me");};
this.protectedCreateQuestion=function(){throw Error("override me");};this.protectedRemoveQuestion=function(){throw Error("override me");};this.protectedLoadDataExtractUi=function(v,U){throw Error("override me");};this.protectedGetChartTitleIconType=function(){throw Error("override me");};this.protectedCreateCustomOperation=function(v){return $("<div>")};this.protectedIsShowChart=function(){return!0};this.redraw=function(){Y&&Y()};this.setTag=function(v){O=v};this.getId=function(){return aa};this.setDroppableTrigger=
function(v){Q=v};this.getJqUi=function(){f||(f=$("<div>"),f.addClass("qing-assistant-chart-pane"),N=new M,N.getJqUi().appendTo(f),t=$("<div>"),t.addClass("qing-assistant-chart-pane-desc"),t.appendTo(f),t.text(b.protectedGetDesc()),b.protectedIsShowChart()?Z():b.protectedCreateQuestion());return f};var Z=function(){k=$("<div>");k.addClass("qing-assistant-chart-pane-chart-container");k.addClass("qing-assistant-chart-droppable");k.attr("gs-id",aa);k.appendTo(f);m=$("<div>");m.appendTo(k);m.hide();var v=
$("<div>");y.background(v,b.protectedGetChartTitleIconType());da.layoutCtrlWithLRTB(v,10,null,16,10,null,16);v.appendTo(m);S=new C;v=S.getJqUi();da.layoutCtrlWithLRTB(v,30,110,null,10,null,16);v.css("font-weight","600");v.css("cursor","default");v.children().css("color","#212121");v.appendTo(m);na(m,k);c=$("<div>");da.layoutCtrlWithLRTB(c,0,6,null,32,0,null);c.appendTo(k);h=$("<div>");da.layoutCtrlWithLRTB(h,6,6,null,32,0,null);h.appendTo(k);n=b.protectedCreateCustomOperation(f);n.hide();g=$("<div>");
g.addClass("qing-assistant-chart-pane-insight");g.appendTo(f);b.protectedLoadDataExtractUi(h,function(){Ia(h)})},na=function(v,U){var J=$("<div>");J.addClass("qing-assistant-chart-pane-operation");J.appendTo(v);var oa=$("<div>");v=$("<div>");oa.addClass("qing-assistant-chart-pane-operation-left");v.addClass("qing-assistant-chart-pane-operation-right");oa.appendTo(J);v.appendTo(J);J=$("<div>");J.attr("title",a.get("summaryInfo","\u56fe\u8868\u4fe1\u606f"));y.background(J,"summary_info_btn");J.data("model",
"summary_info_btn");J.addClass("qing-assistant-chart-pane-operation-button");J.appendTo(oa);J.on("click",function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_INFO);c.children().remove();T(c)});ia(J);J=$("<div>");J.attr("title",a.get("translateChart","\u5207\u6362\u56fe\u8868"));y.background(J,
"exchange_chart_btn");J.data("model","exchange_chart_btn");J.addClass("qing-assistant-chart-pane-operation-button");J.appendTo(v);J.on("click",function(){X.checkUserPrivacyAgreed()&&X.checkQingGPTLicense(function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_TYPE);var ja=$("<div>");
da.layoutCtrlWithLRTB(ja,null,10,138,40,0,84);ja.addClass("qing-assistant-chart-pane-charttype");ja.appendTo(U);qa(ja);var sa=138,wa=Pa.getChartTypeModels(),ta=4,Ca=4;sa=Math.max(36,sa);for(var va=0;va<wa.length;va++){ta+28+4>sa&&(ta=4,Ca+=27);var xa=wa[va],ka=$("<div>");ka.data("model",xa.getChartTypeName());ka.attr("title",xa.getChartName());ka.addClass("sa-charttypecard-button");ka.css("left",ta);ka.css("top",Ca);ka.css("width",28);ka.css("height",21);y.background(ka,xa.getIconName());ka.on("click",
la);ka.appendTo(ja);ta+=34}})});ia(J);J=$("<div>");J.attr("title",a.get("edit","\u7f16\u8f91"));y.background(J,"edit_btn");J.data("model","edit_btn");J.addClass("qing-assistant-chart-pane-operation-button");J.appendTo(v);J.on("click",function(){X.checkUserPrivacyAgreed()&&X.checkQingGPTLicense(function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_EDIT);
ca()})});ia(J)},ia=function(v){v.on("mouseover",function(){var U=v.data("model");y.background(v,U+"_hover")});v.on("mouseout",function(){var U=v.data("model");y.background(v,U)})},qa=function(v){$(document.body).on("mousedown",function(U){da.isDescendent(U.target,v[0])||da.isDescendent(U.target,v[0])||v.hide()})},la=function(v){v=$(v.target).data("model");r=q(v)},ca=function(){ea.getOpenDesigner()(O,b.protectedGetChartTitle(),r,function(v){h.children().remove();ya(v)})},Ia=function(v){b.protectedLoadSchema(O,
v,function(U){ya(U)})},ya=function(v){ea.getSquareExhibitionLoader()(O,h,v,function(U){r=com.kingdee.bos.qing.ModelHelper.toJson(U)},function(U,J,oa,ja,sa,wa,ta){U&&(S.setText(b.protectedGetChartTitle()),m.show(),T=oa,Y=wa,q=ta,Da(sa),n.show(),Q&&Q("qing-assistant-panel-body","qing-assistant-chart-droppable"))})},Da=function(v){g.children().remove();b.protectedRemoveQuestion();if(v=v()){var U=$("<div class='qing-assistant-chart-pane-insight-title'>");U.css("font-weight","bold");U.text(a.get("insight",
"\u6d1e\u5bdf\u4e0e\u89c1\u89e3"));U.appendTo(g);var J=$("<div>");J.addClass("qing-assistant-chart-pane-insight-loading");var oa=$("<img>");da.layoutCtrlWithLRTB(oa,null,null,27,6,null,27);oa.attr("src",com.kingdee.bos.qing.CodeLoader.getIconUrl("workbench","assistant/content-loading.gif"));oa.appendTo(J);J.appendTo(g);v.hookJqInsightSubtitleCreator(function(){return $("<div>")});v.hookJqInsightLineCreator(function(){return $("<li>")});v.requestJqContent(function(ja){ja&&ja.text()?setTimeout(function(){J.remove();
ja.appendTo(g);za()},500):(U.remove(),J.remove(),za())})}else za()},za=function(){X.checkUserPrivacyAgreed(!0)&&X.checkQingGPTLicense(function(v){v&&b.protectedCreateQuestion()},!0)};this.protectedMethod={getJsonModelBook:function(){return r},getQuestionPaneParentUi:function(){return f},setDesc:function(v){t.text(v)},removeChartContainer:function(){k&&k.remove()}}}function K(){var b=this,f,h,c,g,k,t,m,n=!0,S;this.setRef=function(q){h=q};this.setWorkbenchId=function(q){c=q};this.hideTitle=function(){n=
!1};this.setSendQuestionListener=function(q){k=q};this.setEditQuestionListener=function(q){t=q};this.setErrorListener=function(q){m=q};this.setChartInfo=function(q){S=q};this.clear=function(){f&&(f.remove(),f=null)};this.getJqUi=function(){if(!f){f=$("<div>");f.addClass("qing-assistant-chart-pane-question");if(n){var q=$("<div>");q.addClass("qing-assistant-chart-pane-question-title");q.text(a.get("youCanAsk","\u60a8\u8fd8\u53ef\u4ee5\u95ee"));q.appendTo(f)}r()}return f};var r=function(){var q=$("<div>");
q.addClass("qing-assistant-chart-pane-question-item");var Q=$("<img>");da.layoutCtrlWithLRTB(Q,null,null,27,6,null,27);Q.attr("src",com.kingdee.bos.qing.CodeLoader.getIconUrl("workbench","assistant/content-loading.gif"));Q.appendTo(q);q.appendTo(f);g?T(0,g,q):(Q=new ua(ea.getRemoteImpl(),function(N){g=N;T(0,g,q)},function(N,O,aa){m?(b.clear(),N=ha.getErrorMessageWhenRecommendQuestion(!0,N,O),m(N)):(O=N=ha.getErrorMessageWhenRecommendQuestion(!1,N,O),N=$("<div>"),N.text(O),N.addClass("qing-assistant-chart-pane-question-item"),
N.insertBefore(q),N.css("padding-left","26px"),O=$("<div>"),O.addClass("qing-assistant-chart-pane-question-error-cicle"),O.appendTo(N),q.remove());return!0}),Q.setShowBlocking(!1),Q.setBlockingJqUi(f),Q.loadSingleCardRecommendQuestions(h,c,S))},T=function(q,Q,N){if(q!=Q.length){var O=Q[q],aa=$("<div>");aa.text(O);aa.attr("title",O);aa.data("model",O);aa.addClass("qing-assistant-chart-pane-question-item");aa.on("click",Y);aa.insertBefore(N);var Z=$("<div>");da.layoutCtrlWithLRTB(Z,null,0,36,0,null,
36);Z.css("background-color","#E0EFFF");Z.appendTo(aa);var na=$("<div>");da.layoutCtrlWithLRTB(na,null,10,16,10,null,16);y.backgroundWithHover(na,"question_edit_btn");na.appendTo(Z);Z.hide();Z.data("model",O);Z.on("click",function(ia){ia.stopPropagation();t(Z.data("model"))});aa.on("mouseover mouseout",function(ia){"mouseover"===ia.type?Z.show():"mouseout"===ia.type&&Z.hide()});q==Q.length-1?N.remove():setTimeout(function(){T(++q,Q,N)},200)}},Y=function(q){q=$(q.target).data("model");k(q)}}function H(){var b,
f,h,c;this.setRecommendItem=function(k){f=k};this.setFunClickCallBack=function(k){h=k};this.setFunClickEditCallBack=function(k){c=k};this.getJqUi=function(){b||g();return b};var g=function(){b=$("<div>");b.addClass("qing-assistant-panel-recommended-question-content-item");var k=Ja.getIconNameByCardType(f.getCardType()),t=$("<div class='qing-assistant-panel-recommended-question-content-item-icon'>");y.background(t,k);var m=$("<span class='qing-assistant-panel-recommended-question-content-item-text'>");
m.text(f.getQuestionText());var n=$("<div class='qing-assistant-panel-recommended-question-content-item-edit'>");n.on("mouseleave mousemove",function(S){"mousemove"===S.type?y.background(n,"edit_recommended_question_hover"):"mouseleave"===S.type&&y.background(n,"edit_recommended_question")});n.on("click",function(S){S.stopPropagation();c(f.getQuestionText())});t.appendTo(b);m.appendTo(b);n.appendTo(b);b.on("mouseover mouseout",function(S){"mouseover"===S.type?(b.css("border","1px solid #B3D5FF"),
m.css("color","#2A71F5"),y.background(t,k+"_hover"),y.background(n,"edit_recommended_question"),n.show()):"mouseout"===S.type&&(b.css("border","1px solid #E7EAEF"),m.css("color","#404151"),y.background(t,k),n.hide())});b.on("click",function(){h(f.getCardId(),f.getQuestionText(),!1)})}}function L(){var b,f,h,c=[],g=1,k=1,t,m=a.get("findDataContent","\u6211\u5728\u5f53\u524d\u5de5\u4f5c\u53f0\u5185\u627e\u5230\u4ee5\u4e0b\u76f8\u5173\u6570\u636e\u5185\u5bb9\uff0c\u60a8\u60f3\u8981\u5206\u6790\u54ea\u4e00\u4e2a?");
this.setRecommendItems=function(r){c=r};this.setClickRecommendCardCallback=function(r){t=r};this.setTitleText=function(r){m=r};this.getJqUi=function(){if(!b){k=Math.ceil(c.length/4);b=$("<div>");b.css({width:"calc(100% - 64px)"});var r=$("<div class='qing-assistant-panel-card-list-title'>");r.text(m);r.appendTo(b);f=$("<div>");f.addClass("qing-assistant-panel-card-list");f.appendTo(b);n();4<c.length&&S()}return b};var n=function(){var r=4*(g-1),T=Math.min(c.length,r+4);for(f.empty();r<T;r++){var Y=
c[r],q=new ba;q.setRecommendItem(Y);q.setFinalCallBack(t);q.getJqUi().appendTo(f)}},S=function(){f.addClass("qing-assistant-panel-card-list-line");h=$("<div>");h.addClass("qing-assistant-panel-card-list-turn-page");h.appendTo(b);var r=$("<div>");y.background(r,"icon_refresh_on");r.addClass("qing-assistant-panel-card-list-turn-page-icon");r.appendTo(h);r=$("<div>");r.addClass("qing-assistant-panel-card-list-turn-page-content");var T=a.get("changeBatch","\u6362\u4e00\u6279");r.text(T);r.on("click",
function(){g=g==k?1:g+1;n()});r.appendTo(h)}}function ba(){var b,f,h,c,g;this.setFinalCallBack=function(t){g=t};this.setRecommendItem=function(t){c=t};this.getJqUi=function(){b||k();return b};var k=function(){b=$("<div>");b.addClass("qing-assistant-panel-card");b.on("click",function(){g&&g(c)});f=$("<div>");y.background(f,Ja.getIconNameByCardType(c.getCardType()));f.addClass("qing-assistant-panel-card-icon");f.appendTo(b);h=$("<div>");h.addClass("qing-assistant-panel-card-content");var t=c.getCardName();
h.text(t);h.attr("title",t);h.appendTo(b)}}"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.assistant&&(com.kingdee.bos.qing.assistant={});var ma=com.kingdee.bos.qing.assistant;ma.AssistantEntrance=p;ma.AssistantPanel=function(){com.kingdee.bos.qing.workbench.common.AbstractDroppableHandler.call(this);
var b=this,f,h,c,g,k,t,m,n,S,r,T,Y,q,Q,N,O,aa,Z=!1,na=!1,ia=!1,qa=[],la,ca;this.getJqUi=function(e){if(!h){f=e;e=$("<div class='qing-assistant-panel-body'>");Q=$("<div class='qing-assistant-panel-dialog'>");t=sa();Q.append(t);e.append(Q);q=e;c=$("<div class='qing-assistant-panel-content'>");c.append(J());c.append(q);c.append(oa());g=$("<div class='qing-assistant-panel-resize'>");e=$("<div class='qing-assistant-panel-drop-mask'>");var l=$("<div class='qing-assistant-panel-drop-container'>"),d=$("<div class='qing-assistant-panel-drop-logo'>"),
w=$("<div class='qing-assistant-panel-drop-text'>");w.text(a.get("assistantDropTips","\u62d6\u5165\u5bf9\u8bdd\u533a\u57df\u5373\u53ef\u8fdb\u884c\u5206\u6790"));l.append(d);l.append(w);e.append(l);e.hide();y.background(d,"assistant-drop");k=e;h=$("<div class='qing-assistant-panel'>");h.append(c);h.append(g);h.append(k);h.hide();b.setShowType(R.ShowType.FLOAT);Ca();ka()}return h};this.setWorkbenchHandler=function(e){la=e};this.setShowType=function(e){aa=e;Z=(na=aa===R.ShowType.FULLSCREEN)?Z:aa===
R.ShowType.PINNED;na?n.hide():n.show();h.removeClass();h.addClass("qing-assistant-panel");h.addClass("qing-assistant-panel-"+aa);La();n.attr("data-tooltips",Z?a.get("assistantUnpin","\u53d6\u6d88\u56fa\u5b9a"):a.get("assistantPin","\u56fa\u5b9a\u81f3\u5f53\u524d\u5de5\u4f5c\u53f0")).trigger("mouseleave");S.attr("data-tooltips",na?a.get("assistantContract","\u8fd8\u539f"):a.get("assistantExpand","\u6700\u5927\u5316")).trigger("mouseleave");r.attr("data-tooltips",a.get("assistantClose","\u5173\u95ed"));
Z?n.addClass("qing-assistant-panel-header-button-active"):n.removeClass("qing-assistant-panel-header-button-active");y.background(h,na?"assistant-bg-fullscreen":"assistant-bg");y.backgroundWithHover(n,Z?"assistant-pinned":"assistant-pin");y.backgroundWithHover(S,na?"assistant-contract":"assistant-expand");y.backgroundWithHover(r,"assistant-close")};this.toggleShowType=function(e){aa!==e?b.setShowType(e):R.ShowType.PINNED===e?b.setShowType(R.ShowType.FLOAT):R.ShowType.FULLSCREEN===e&&b.setShowType(Z?
R.ShowType.PINNED:R.ShowType.FLOAT)};this.toggleDropMask=function(e){e?(c.addClass("qing-assistant-panel-content-blur"),k.show()):(c.removeClass("qing-assistant-panel-content-blur"),k.hide())};this.scrollToBottom=function(e){q.stop().animate({scrollTop:q.prop("scrollHeight")},e||250,"linear")};this.appendRecord=function(e){t.is(":visible")&&t.hide();N.is(":hidden")&&N.show();e instanceof x&&e.setEditListener(Ka);Q.append(e.getJqUi());qa.push(e);b.scrollToBottom();ia=!0};this.getRecords=function(){return qa};
this.doSearch=function(e){X.checkUserPrivacyAgreed()&&X.checkQingGPTLicense(function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION_USER_INPUT);var l=e;l||(l=O.getText(),O.setText(""),T.trigger("input"));if(l){var d=new x;d.setContent(l);b.appendRecord(d);za(l)}})};var Ia=function(e,l){if(l)var d=
l;else d=new D,d.setContent(ya()),b.appendRecord(d);l=new ua(ea.getRemoteImpl(),function(w){var u=Da(ca).createGPTChartPane(w);d.setContent(u.getJqUi());d.setResizeListener(function(){u.redraw()});d.setExtInfo(u)},function(w,u,G){w=ha.getErrorMessageWhenLoadView(w,u);u=$("<div>");u.css({"white-space":"pre-line"});u.text(w);d.setContent(u);return!0});l.setShowBlocking(!1);l.setBlockingJqUi(h);l.loadView(e,ca.getRef(),ca.getWorkbenchId())},ya=function(e){var l=$("<div>"),d=$("<img>");da.layoutCtrlWithLRTB(d,
12,null,26,12,null,26);d.attr("src",com.kingdee.bos.qing.CodeLoader.getIconUrl("workbench","assistant/content-loading.gif"));d.appendTo(l);d=$("<span>");d.css("margin-left","22px");e=e?e:a.get("contentLoading","\u5185\u5bb9\u52a0\u8f7d\u4e2d");d.text(e);d.appendTo(l);return l},Da=function(e){var l=new A;l.setWorkbenchGptModel(e);l.setSendQuestionListener(Aa);l.setEditQuestionListener(Ka);l.setDroppableTrigger(la.setupGptSquareDragIn);l.setAddWidgetFromGpt(la.addWidgetFromGpt);return l};this.getDroppableAreaClassName=
function(e){return"qing-assistant-panel"};this.dropOverHandler=function(e){k.addClass("qing-assistant-panel-drop-mask-highlight")};this.dropOutHandler=function(e){k.removeClass("qing-assistant-panel-drop-mask-highlight")};this.droppedHandler=function(e){k.removeClass("qing-assistant-panel-drop-mask-highlight");var l=function(d){if(d){var w=ha.getQuestionRecordContent(d),u=new x;u.setContent(w);b.appendRecord(u);if(d.getErrorCode()&&d.getErrorMessage())w=new D,w.setContentText(ha.getErrorMessageWhenRefMap(d.getErrorCode(),
d.getErrorMessage())),b.appendRecord(w);else{w=Da(d);w.supportSource(d)&&(ca=d);var G=w.createDraggedChartPane();d=new D;d.setContent(G.getJqUi());d.setResizeListener(function(){G.redraw()});d.setExtInfo(G);b.appendRecord(d)}}else console.error("droppedHandler error",d)};X.checkUserPrivacyAgreed()&&X.checkQingGPTLicense(function(){l(e)})};this.createWorkbenchGptModel=function(e){for(var l=0;l<qa.length;l++){var d=qa[l];if(d instanceof D&&(d=d.getExtInfo(),(d instanceof fa||d instanceof ra)&&d.getId()==
e))return d.createWorkbenchGptModel()}return null};var za=function(e){var l=new D;l.setContent(ya());b.appendRecord(l);var d=new ua(ea.getRemoteImpl(),function(u){a:if(0==u.length){var G=a.get("notFindDataContent","\u975e\u5e38\u62b1\u6b49\uff0c\u6211\u6ca1\u6709\u5728\u5f53\u524d\u5de5\u4f5c\u53f0\u5185\u627e\u5230\u76f8\u5173\u7684\u6570\u636e\u5185\u5bb9\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5c06\u60f3\u8981\u5206\u6790\u7684\u6570\u636e\u5185\u5bb9\u62d6\u5165\u5bf9\u8bdd\u533a\u57df\u8fdb\u884c\u5206\u6790\u3002");
U(G,l)}else if(1!=u.length||ca){G=[];for(var V=0;V<u.length;V++){var W=new Ea;W.fromJsonObject(u[V]);W.setQuestionText(e);G.push(W)}if(ca)for(u=ca.getRef().uid,V=0;V<G.length;V++)if(W=G[V],W=W.getCardId(),W==u){Aa(ca,e,!0,l);break a}V=new L;ca&&(u=a.get("changeCurrentCard","\u770b\u8d77\u6765\u60a8\u7684\u95ee\u9898\u53ef\u80fd\u4e0e\u5176\u4ed6\u6570\u636e\u5185\u5bb9\u6709\u5173\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u66f4\u6362\u5f53\u524d\u5206\u6790\u7684\u5361\u7247\uff1a"),V.setTitleText(u));
V.setRecommendItems(G);V.setClickRecommendCardCallback(v);G=V.getJqUi();l.setContent(G)}else G=new Ea,G.fromJsonObject(u[0]),W=G.getCardId(),(G=la.getWorkbenchGptModelByRefUid(W))?Aa(G,e,!0,l):(G=a.get("notFindDataContent","\u975e\u5e38\u62b1\u6b49\uff0c\u6211\u6ca1\u6709\u5728\u5f53\u524d\u5de5\u4f5c\u53f0\u5185\u627e\u5230\u76f8\u5173\u7684\u6570\u636e\u5185\u5bb9\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5c06\u60f3\u8981\u5206\u6790\u7684\u6570\u636e\u5185\u5bb9\u62d6\u5165\u5bf9\u8bdd\u533a\u57df\u8fdb\u884c\u5206\u6790\u3002"),
U(G,l))},function(u,G,V){u=ha.getErrorMessageWhenLoadMatchedCard(u,G);G=$("<div>");G.css({"white-space":"pre-line"});G.text(u);l.setContent(G);return!0});d.setShowBlocking(!1);var w={};ca&&(w=ca.getRef());d.loadMatchedCardInfo(e,la.getWorkbenchId(),w)},v=function(e){X.checkUserPrivacyAgreed()&&X.checkQingGPTLicense(function(){var l=new x,d=e.getCardName();d=a.get("useCardAnalyze",'\u4f7f\u7528"#1"\u5361\u7247\u8fdb\u884c\u5206\u6790\u3002').replace("#1",d);l.setContent(d);b.appendRecord(l);d=e.getCardId();
la.getWorkbenchGptModelByRefUid(d)?(l=e.getQuestionText(),d=la.getWorkbenchGptModelByRefUid(d),Aa(d,l,!0,void 0)):(l=a.get("dataContentNotExist","\u975e\u5e38\u62b1\u6b49\uff0c\u5f53\u524d\u5de5\u4f5c\u53f0\u5185\u4e0d\u5b58\u5728\u60a8\u9009\u62e9\u7684\u6570\u636e\u5185\u5bb9\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u5c06\u60f3\u8981\u5206\u6790\u7684\u6570\u636e\u5185\u5bb9\u62d6\u5165\u5bf9\u8bdd\u533a\u57df\u8fdb\u884c\u5206\u6790\u3002"),d=new D,U(l,d),b.appendRecord(d))})},U=function(e,l){var d=
$("<div class='qing-assistant-panel-card-list-title'>");d.text(e);l.setContent(d)},J=function(){var e=$("<div class='qing-assistant-panel-header'>"),l=$("<div class='qing-assistant-panel-header-button-group'>"),d=$("<div class='qing-assistant-panel-header-button-group'>"),w=$("<div class='qing-assistant-panel-header-button'>"),u=$("<div class='qing-assistant-panel-header-button'>");y.backgroundWithHover(w,"assistant-new-chat");y.backgroundWithHover(u,"assistant-history-chat");w.attr("data-tooltips",
a.get("assistantNewDialog","\u65b0\u5bf9\u8bdd")).on("click",Qa);u.attr("data-tooltips",a.get("assistantHistoryDialog","\u5386\u53f2\u5bf9\u8bdd"));l.append(w);w=$("<div class='qing-assistant-panel-header-icon'>");u=$("<div class='qing-assistant-panel-header-text'>");y.background(w,"assistant-cosmic");u.text(a.get("assistantAnswerRecordUserName","\u82cd\u7a79"));N=$("<div>");N.append(w);N.append(u);N.hide();n=$("<div class='qing-assistant-panel-header-button'>");S=$("<div class='qing-assistant-panel-header-button'>");
r=$("<div class='qing-assistant-panel-header-button'>");n.on("click",function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_PIN);b.toggleShowType(R.ShowType.PINNED)});S.on("click",function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION,
com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_EXPAND);b.toggleShowType(R.ShowType.FULLSCREEN)});r.on("click",function(){xa()});q.on("scroll",function(){0<q.scrollTop()?e.addClass("qing-assistant-panel-header-active"):e.removeClass("qing-assistant-panel-header-active")});d.append(n);d.append(S);d.append(r);e.append(l);e.append(N);e.append(d);return e},oa=function(){O=new F;O.setPlaceholder(a.get("assistantPlaceholder","\u8bd5\u7740\u95ee\u6211\u95ee\u9898\uff0c\u6211\u5c06\u6839\u636e\u60a8\u7684\u95ee\u9898\u5206\u6790\u76f8\u5173\u6570\u636e\u5185\u5bb9"));
var e=$("<div class='qing-assistant-panel-footer'>"),l=$("<div class='qing-assistant-panel-input-box'>"),d=O.getJqUi();d.addClass("qing-assistant-panel-input-field");T=d.children("input");T.on("focus",function(){l.addClass("qing-assistant-panel-input-box-highlight")});T.on("blur",function(){l.removeClass("qing-assistant-panel-input-box-highlight")});Y=$("<div class='qing-assistant-panel-input-button'>");Y.attr("data-tooltips",a.get("assistantSend","\u53d1\u9001"));y.backgroundWithHover(Y,"assistant-send");
l.append(d);l.append(Y);e.append(l);e.append(ja());return e},ja=function(){var e=$("<div class='qing-assistant-panel-footer-tips'>"),l=$("<span class='qing-assistant-panel-footer-text'>"),d=$("<span class='qing-assistant-panel-footer-divider'>"),w=$("<span class='qing-assistant-panel-footer-text-highlight'>");l.text(a.get("privacyTips","AI\u751f\u6210\u7684\u5185\u5bb9\u4ec5\u4f9b\u53c2\u8003\uff0c\u8bf7\u7ed3\u5408\u60a8\u7684\u7ecf\u9a8c\u4f7f\u7528"));w.text(a.get("privacyText","\u9690\u79c1"));
w.on("click",function(){X.openPrivacyAgreement(R.PrivacyType.USER)});l.appendTo(e);d.appendTo(e);w.appendTo(e);return e},sa=function(){var e=$("<div>"),l=e.append;var d=a.get("assistantAnswerRecordUserName","Cosmic");if("\u82cd\u7a79"===d||"\u84bc\u7a79"===d){d=$("<div class='qing-assistant-panel-banner'>");var w=$("<div class='qing-assistant-panel-banner-logo qing-assistant-panel-banner-logo-1'>");y.background(w,"assistant-cosmic-banner-1");var u=$("<div class='qing-assistant-panel-banner-text qing-assistant-panel-banner-text-1'>"),
G=$("<span>");G.text("\u4f60\u7684");var V=$("<span>");V.text("AI");V.css("letter-spacing","1px");var W=$("<span>");W.text("\u7ba1\u7406\u52a9");W.css("margin-left","7px");var pa=$("<span>");pa.text("\u624b");pa.css("letter-spacing","0px");u.append(G);u.append(V);u.append(W);u.append(pa);d.append(w);d.append(u)}else d=$("<div class='qing-assistant-panel-banner'>"),w=$("<div class='qing-assistant-panel-banner-logo qing-assistant-panel-banner-logo-2'>"),y.background(w,"assistant-cosmic-banner-2"),u=
$("<div class='qing-assistant-panel-banner-text qing-assistant-panel-banner-text-2'>"),u.text("Your AI Management Assistant"),d.append(w),d.append(u);l.call(e,d);ea.isShowAssistantPanel()&&e.append(wa());return e},wa=function(){var e=$("<div class='qing-assistant-panel-guide'>"),l=$("<div class='qing-assistant-panel-guide-title'>"),d=$("<div class='qing-assistant-panel-guide-title-icon'>");y.background(d,"icon_guide_intelligent");var w=$("<span class='qing-assistant-panel-guide-title-text'>");w.text(a.get("intelligentDataAnalysis",
"\u667a\u80fd\u6570\u636e\u5206\u6790"));d.appendTo(l);w.appendTo(l);var u=$("<div class='qing-assistant-panel-guide-content'>");d=$("<div class='qing-assistant-panel-guide-content-tips'>");w=$("<div class='qing-assistant-panel-guide-content-text'>");w.text(a.get("guideTips","\u60a8\u53ef\u4ee5\u4ece\u5de6\u4fa7\u6811\u5f62\u83dc\u5355\u3001\u5f53\u524d\u5de5\u4f5c\u53f0\u4e2d\u62d6\u52a8\u60f3\u8981\u5206\u6790\u7684\u5185\u5bb9\u81f3\u5bf9\u8bdd\u7a97\u53e3\uff0c\u8ba9\u6211\u5e2e\u60a8\u5206\u6790\u3002"));
var G=$("<div class='qing-assistant-panel-guide-content-icon'>"),V=$("<div class='qing-assistant-panel-guide-content-icon-image'>");y.background(V,"icon_guide_background");V.appendTo(G);w.appendTo(d);G.appendTo(d);d.appendTo(u);l.appendTo(e);u.appendTo(e);X.checkQingGPTLicense(function(W){if(W)ta(u);else{W=$("<div class='qing-assistant-panel-guide-no-license-tips'>");$("<div class='qing-assistant-panel-guide-no-license-tips-symbol'>").appendTo(W);var pa=$("<div class='qing-assistant-panel-guide-no-license-tips-text'>");
pa.text(a.get("noGPTLicenseTips","\u83b7\u5f97\u3010AI\u6570\u636e\u5206\u6790\u52a9\u624b\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\u540e\u65b9\u53ef\u4f7f\u7528"));pa.appendTo(W);W.appendTo(u)}},!0);return e},ta=function(e){var l=new ua(ea.getRemoteImpl(),function(d){if(1==d){d=$("<div class='qing-assistant-panel-guide-recommended-question'>");var w=$("<div class='qing-assistant-panel-guide-recommended-question-tips'>");$("<div class='qing-assistant-panel-guide-recommended-question-tips-symbol'>").appendTo(w);
var u=$("<div class='qing-assistant-panel-guide-recommended-question-tips-text'>");u.text(a.get("questionTips","\u5728\u5f53\u524d\u5de5\u4f5c\u53f0\u4e2d\uff0c\u60a8\u53ef\u80fd\u5173\u6ce8\u4ee5\u4e0b\u95ee\u9898\uff1a"));u.appendTo(w);w.appendTo(d);d.appendTo(e);var G=$("<div class='qing-assistant-panel-guide-recommended-question-wait'>");d=$("<img class='qing-assistant-panel-guide-recommended-question-wait-gif'>");d.attr("src",com.kingdee.bos.qing.CodeLoader.getIconUrl("workbench","assistant/content-loading.gif"));
d.appendTo(G);d=$("<span class='qing-assistant-panel-guide-recommended-question-wait-text'>");d.text(a.get("guideWaitTips","\u63a8\u8350\u95ee\u9898\u751f\u6210\u4e2d"));d.appendTo(G);G.appendTo(e);d=new ua(ea.getRemoteImpl(),function(V){G.remove();if(0<V.length)for(var W=0;W<V.length;W++){var pa=new Ea;pa.fromJsonObject(V[W]);var Fa=new H;Fa.setRecommendItem(pa);Fa.setFunClickCallBack(function(Ra,Sa,Ta,Ua){X.checkQingGPTLicense(function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION,
com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION_RECOMMEND);var Va=la.getWorkbenchGptModelByRefUid(Ra);Aa(Va,Sa,Ta,Ua)})});Fa.setFunClickEditCallBack(Ka);Fa.getJqUi().appendTo(e)}},function(V,W,pa){return!0});d.setShowBlocking(!1);d.loadRecommendQuestions(la.getWorkbenchId())}},function(d,w,u){return!1});l.setShowBlocking(!1);l.checkNeedRecommendQuestions(la.getWorkbenchId())},Ca=function(){m=(new p).getJqUi();m.on("click",function(){va()});ea.isShowAssistantEntrance()||
m.hide();f.append(m)};this.openQingGPT=function(e){"tabSwitch"==e.triggerEvent&&e.switchSide?va():"click"==e.triggerEvent&&(h.is(":hidden")?va():xa())};var va=function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION_COSMIC);ea.isShowAssistantPanel()&&X.checkAllPrivacyAgreed(function(){m.hide()&&h.show()})},
xa=function(){h.hide();ea.isShowAssistantEntrance()&&m.show()},ka=function(){q.on("wheel",function(){ia=q.scrollTop()+q.height()+1>=q[0].scrollHeight});(new MutationObserver(function(d){ia&&b.scrollToBottom(10)})).observe(q[0],{attributes:!0,childList:!0,subtree:!0});var e,l=new Ma;l.bindElement(g,function(){e=h.width()},function(d){h.width(e-d)},La);l.setMaskContainer(f);l=new Na(h);$("body").append(l.getJqUi());O.addAcceptableListener(function(d,w){w&&b.doSearch()});T.on("input",function(){O.getText()?
Y.show():Y.hide()});Y.on("click",function(){b.doSearch()});Ga.getUserInfo();X.setPrivacyChangeListener(function(d){var w=d.hasQingGPTLicense;d=d.userAgree;var u=a.get("assistantPlaceholder","\u8bd5\u7740\u95ee\u6211\u95ee\u9898\uff0c\u6211\u5c06\u6839\u636e\u60a8\u7684\u95ee\u9898\u5206\u6790\u76f8\u5173\u6570\u636e\u5185\u5bb9");w?d||(u=a.get("privacyPlaceholder","\u540c\u610f\u9690\u79c1\u653f\u7b56\u540e\u65b9\u53ef\u4f7f\u7528")):u=a.get("noGPTLicenseTips","\u83b7\u5f97\u3010AI\u6570\u636e\u5206\u6790\u52a9\u624b\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\u540e\u65b9\u53ef\u4f7f\u7528");
var G=$(".qing-assistant-panel-input-field input");G.attr("disabled",!(w&&d));G.attr("placeholder",u)})},La=function(){for(var e=0;e<qa.length;e++){var l=qa[e];l.triggerResize&&l.triggerResize()}},Ka=function(e){X.checkUserPrivacyAgreed()&&(e&&(O.setText(e),T.trigger("input")),O.requestFocus())},Qa=function(){com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.interestInBehavior(com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION,com.kingdee.bos.qing.workbench.common.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_NEW_DAILOG);
X.checkUserPrivacyAgreed()&&(Q.empty(),qa=[],ca=null,t=sa(),Q.append(t),N.hide())},Aa=function(e,l,d,w){ca=e;l&&X.checkUserPrivacyAgreed()&&(d||(d=new x,d.setContent(l),b.appendRecord(d)),ca&&Ha.checkPermission(e.getBizId(),function(){Ia(l,w)},function(){var u=new D;u.setContentText(a.get("gptCheckPermissionError","\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u8be5\u5361\u7247\u7684\u67e5\u770b\u6743\u9650\uff0c\u65e0\u6cd5\u4e3a\u60a8\u63a8\u8350\u95ee\u9898\u3002"));b.appendRecord(u)}))}};ma.QuestionRecord=
x;ma.AnswerRecord=D;var a,F,C,M,y,R,Ma,Na,Ga,X,Ha,ua,ea,Ja,Oa,Ea,da,Ba;(function(){var b=com.kingdee.bos.qing.framework.common;a=b.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.workbench);b=com.kingdee.bos.qing.ui.component;F=b.TextField;C=b.Label;M=b.MessageCurtain;b=com.kingdee.bos.qing.workbench;y=b.MyIcons;b=com.kingdee.bos.qing.assistant.common;R=b.AssistantConstant;Ma=b.DragHelper;Na=b.TipsHelper;Ga=b.UserInfoUtil;X=b.PrivacyUtil;Ha=b.PermissionUtil;ua=b.GPTFacade;ea=b.Integration;
Ja=b.CardIconUtil;b=com.kingdee.bos.qing.assistant.model;Oa=b.ChartTypeModel;Ea=b.RecommendItem;b=com.kingdee.bos.qing.common;da=b.DomUtil;Ba=b.Util})();var Pa=new function(){this.getChartTypeModels=function(){var b=com.kingdee.bos.qing.square.model.SquareModel;b=[b.ChartType_KPI,b.ChartType_Pie,b.ChartType_Ring,b.ChartType_Rose,b.ChartType_Column,b.ChartType_StackedColumn,b.ChartType_PercentStackedColumn,b.ChartType_Bar,b.ChartType_StackedBar,b.ChartType_PercentStackedBar,b.ChartType_Line,b.ChartType_Grid];
for(var f="\u6307\u6807\u56fe \u997c\u56fe \u73af\u5f62\u56fe \u73ab\u7470\u56fe \u591a\u7cfb\u5217\u67f1\u72b6\u56fe \u5806\u79ef\u67f1\u72b6\u56fe \u767e\u5206\u6bd4\u5806\u79ef\u67f1\u72b6\u56fe \u6761\u5f62\u56fe \u5806\u79ef\u6761\u5f62\u56fe \u767e\u5206\u6bd4\u5806\u79ef\u6761\u5f62\u56fe \u6298\u7ebf\u56fe \u5217\u8868".split(" "),h="Kpi Pie Ring Rose Msbar Stackbar Percentbar Horizontalmsbar Horizontalstackbar Horizontalpercentbar Mline Grid".split(" "),c=[],g=0;g<b.length;g++){var k=b[g],
t=f[g],m=h[g],n=new Oa;n.setChartTypeName(k);n.setChartName(t);n.setIconName(m);c.push(n)}return c}},ha=new function(){var b=this,f,h=function(){if(!f){f={};var c=com.kingdee.bos.qing.workbench.model.WorkbenchModel;f[c.WidgetType_Square]=a.get("widgetTypeSquare","\u6570\u636e\u6597\u65b9");f[c.WidgetType_Longer]=a.get("widgetTypeLonger","\u6570\u636e\u5206\u6790");f[c.WidgetType_Dashboard]=a.get("widgetTypeDashboard","\u4eea\u8868\u677f");f[c.WidgetType_QingReport]=a.get("widgetTypeQingReport","\u8f7b\u62a5\u8868");
f[c.WidgetType_Metrics]=a.get("widgetTypeMetrics","\u6307\u6807")}};this.getBizTypeName=function(c){h();return f[c.getBizType()]};this.getBizTypeNameDesc=function(c){h();var g=com.kingdee.bos.qing.workbench.model.WorkbenchModel,k=f[c.getBizType()];return g.WidgetType_QingReport==c.getBizType()?a.get("this1","\u8fd9\u5f20")+k:a.get("this2","\u8fd9\u4e2a")+k};this.getQuestionRecordContent=function(c){h();var g=a.get("questionRecordContent","\u8bf7\u5e2e\u6211\u5206\u6790\u201c#1\u201d#2\u3002");g=g.replace("#1",
c.getBizName());return g=g.replace("#2",b.getBizTypeNameDesc(c))};this.getGPTChartTitleIconType=function(c){h();var g=com.kingdee.bos.qing.workbench.model.WorkbenchModel;return c.getBizType()==g.WidgetType_Square||c.getBizType()==g.WidgetType_Metrics?c.getBizType():g.WidgetType_Square};this.getDatasourceErrorTips=function(c,g){var k;-1<[2103001,1011013,1011016].indexOf(c)?k=a.get("gptDataSourcePublishTargetNotFoundError","\u62b1\u6b49\uff0c\u8be5\u7ec4\u4ef6\u6765\u6e90\u5df2\u88ab\u5220\u9664\u3002")+
g:-1<[2101001,1011017].indexOf(c)?k=a.get("gptDataSourceThemeNotFoundError","\u62b1\u6b49\uff0c\u5bf9\u5e94\u4e3b\u9898\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002")+g:-1<[2101002,2101003,2101004,2101005,1011018].indexOf(c)&&(k=a.get("gptDataSourceSubjectModelNotDefinedError","\u62b1\u6b49\uff0c\u5bf9\u5e94\u4e3b\u9898\u6ca1\u6709\u5b9a\u4e49\u6570\u636e\u3002")+g);return k};this.getRptDataSourceErrorTips=function(c,g){var k;2315003===c?k=a.get("gptDataSourceRptNoDataSetError","\u62b1\u6b49\uff0c\u5bf9\u5e94\u8f7b\u62a5\u8868\u6ca1\u6709\u5f15\u7528\u6570\u636e\u96c6\u3002")+
g:2315004===c?k=a.get("gptDataSourcePublishTargetNotFoundError","\u62b1\u6b49\uff0c\u8be5\u7ec4\u4ef6\u6765\u6e90\u5df2\u88ab\u5220\u9664\u3002")+g:2315005===c&&(k=a.get("gptDataSourceRptNoReportError","\u62b1\u6b49\uff0c\u5bf9\u5e94\u8f7b\u62a5\u8868\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002")+g);return k};this.getLicenseErrorTips=function(c){var g;3010002==c?g=a.get("illegalLicense","\u62b1\u6b49\uff0c\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010\u8f7b\u5206\u6790\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"):
3010003==c?g=a.get("noQingModulePermission","\u62b1\u6b49\uff0c\u60a8\u7684\u8d26\u6237\u6ca1\u6709\u88ab\u5206\u914d\u3010\u8f7b\u5206\u6790\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"):3010005==c?g=a.get("illegalQingReportLicense","\u62b1\u6b49\uff0c\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010\u8f7b\u62a5\u8868\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"):
3010006==c?g=a.get("noQingReportModulePermission","\u62b1\u6b49\uff0c\u60a8\u7684\u8d26\u6237\u6ca1\u6709\u88ab\u5206\u914d\u3010\u8f7b\u62a5\u8868\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"):21000008==c&&(g=a.get("noQingModelerLicense","\u62b1\u6b49\uff0c\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010\u8f7b\u5efa\u6a21\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u65e0\u6cd5\u8fdb\u884c\u5206\u6790\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"));
return g};this.getErrorTips=function(c,g,k){var t=b.getLicenseErrorTips(c);if(t||(t=b.getRptDataSourceErrorTips(c,k))||(t=b.getDatasourceErrorTips(c,k)))return t;switch(c){case 5100002:t=a.get("gptUserInputError","\u62b1\u6b49\uff0c\u6211\u7684\u672c\u804c\u5de5\u4f5c\u662f\u5e2e\u60a8\u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u6682\u65f6\u65e0\u6cd5\u56de\u7b54\u5176\u4ed6\u95ee\u9898\u3002\u5982\u679c\u60a8\u6709\u4efb\u4f55\u4e0e\u6570\u636e\u5206\u6790\u76f8\u5173\u7684\u95ee\u9898\u6216\u9700\u6c42\uff0c\u6b22\u8fce\u968f\u65f6\u544a\u8bc9\u6211\uff0c\u6211\u4f1a\u5c3d\u529b\u5e2e\u52a9\u60a8\u3002");
break;case 5100003:t=a.get("gptPromptIdNotFound","\u62b1\u6b49\uff0c\u5927\u6a21\u578b\u914d\u7f6e\u6709\u8bef")+k;break;case 5100004:t=a.get("gptPromptServiceError","\u670d\u52a1\u5668\u5f00\u4e86\u4e2a\u5c0f\u5dee\uff0c\u7a0d\u540e\u518d\u8bd5\u8bd5\u770b\u3002");break;case 5100009:t=a.get("gptPromptLengthExceed","\u975e\u5e38\u62b1\u6b49\uff0c\u60a8\u60f3\u8981\u5206\u6790\u7684\u5185\u5bb9\u8d85\u51fa\u5927\u6a21\u578b\u8f93\u5165token\u6700\u5927\u5b57\u6570\u9650\u5236\uff0c\u6211\u65e0\u6cd5\u5e2e\u60a8\u5206\u6790\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u62d6\u5165\u60f3\u8981\u5206\u6790\u6570\u636e\u5185\u5bb9\u81f3\u5bf9\u8bdd\u533a\u57df\u8fdb\u884c\u5206\u6790\u3002");
break;default:t=g||""+c}return t};this.getErrorMessageWhenRefMap=function(c,g){g=a.get("gptLoadSingleCardRecommendQuestionSuffix","\u65e0\u6cd5\u4e3a\u60a8\u63a8\u8350\u95ee\u9898");var k=a.get("gptGetRefMapDefaultError","\u62b1\u6b49\uff0c\u83b7\u53d6\u8be5\u6570\u636e\u5185\u5bb9\u65f6\u51fa\u9519\uff0c\u60a8\u53ef\u4ee5\u6362\u4e2a\u6570\u636e\u5185\u5bb9\u5206\u6790\u3002");return b.getErrorTips(c,k,g)};this.getErrorMessageWhenRecommendQuestion=function(c,g,k){k=a.get("gptLoadSingleCardRecommendQuestionSuffix",
"\u65e0\u6cd5\u4e3a\u60a8\u63a8\u8350\u95ee\u9898");c=c?a.get("gptLoadSingleCardRecommendQuestionDefaultError1","\u62b1\u6b49\uff0c\u63a8\u8350\u95ee\u9898\u751f\u6210\u5931\u8d25\u3002\u60a8\u53ef\u4ee5\u6362\u4e2a\u6570\u636e\u5185\u5bb9\u5206\u6790."):a.get("gptLoadSingleCardRecommendQuestionDefaultError2","\u63a8\u8350\u95ee\u9898\u751f\u6210\u5931\u8d25");return b.getErrorTips(g,c,k)};this.getErrorMessageWhenLoadView=function(c,g){if(5100002===c)return a.get("gptLoadViewGenerateError","\u62b1\u6b49\uff0c\u5927\u6a21\u578b\u751f\u6210\u9519\u8bef\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u6362\u4e2a\u5176\u4ed6\u95ee\u6cd5\u6216\u7a0d\u540e\u91cd\u8bd5\u3002");
g=a.get("gptLoadViewSuffix","\u65e0\u6cd5\u4e3a\u60a8\u751f\u6210\u56fe\u8868");var k=a.get("gptLoadViewDefaultError","\u62b1\u6b49\uff0c\u751f\u6210\u56fe\u8868\u5931\u8d25\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u6362\u4e2a\u95ee\u6cd5\u6216\u7a0d\u540e\u91cd\u8bd5");return b.getErrorTips(c,k,g)};this.getErrorMessageWhenLoadMatchedCard=function(c,g){g=a.get("gptLoadMatchedCardSuffix","\u65e0\u6cd5\u4e3a\u60a8\u5339\u914d\u8f93\u5165\u95ee\u9898");var k=a.get("gptLoadMatchedCardDefaultError","\u62b1\u6b49\uff0c\u5339\u914d\u8f93\u5165\u7684\u95ee\u9898\u5931\u8d25\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u6362\u4e2a\u95ee\u6cd5\u6216\u7a0d\u540e\u91cd\u8bd5");
return b.getErrorTips(c,k,g)}}})();
//qingVersionTag: 20250415