1import{a as ta}from"./chunk-YTBEPGXF.js";import{a as ee}from"./chunk-E2NRSE5Z.js";import{a as hp}from"./chunk-IGX45H2B.js";import{a as gp}from"./chunk-TWYO7TGT.js";import{a as dp}from"./chunk-XWLIKQVD.js";import"./chunk-54AVFOTK.js";import"./chunk-KRZZJDXC.js";import{a as ea}from"./chunk-FAH5PCRE.js";import{a as mp}from"./chunk-WLGBGJTF.js";import{a as fp}from"./chunk-UROX7W77.js";import{e as up}from"./chunk-PSN6RBRB.js";import{a as cp}from"./chunk-EMIHTWGH.js";import{a as xt}from"./chunk-D36QDFAL.js";import"./chunk-33QA72TW.js";import{a as Ri}from"./chunk-C4ZQ2H7P.js";import{a as np,b as op,c as ap,d as rp,e as lp,f as sp,g as An,m as pp}from"./chunk-JMCGQXPU.js";import{c as Qn}from"./chunk-HUTKT65R.js";import"./chunk-M2FENB6K.js";import"./chunk-SXDRRJPM.js";import"./chunk-CRQ3KBO7.js";import{b as Vn,c as tp}from"./chunk-QBT3JE3F.js";import"./chunk-ZBYOT36G.js";import"./chunk-5ZZ65SV2.js";import"./chunk-ANUL6DZ3.js";import{j as Zo,k as Fi,l as Ks,x as kn}from"./chunk-QU27HB2Z.js";import{a as Gs,b as $s}from"./chunk-MXYGTM64.js";import"./chunk-47UBDI73.js";import{b as Hs}from"./chunk-DLP7UQLC.js";import"./chunk-6J4I6FP7.js";import{c as ip}from"./chunk-SBQRUWSK.js";import"./chunk-BAGNUCZH.js";import{a as Dn,b as Ws}from"./chunk-XO67435D.js";import"./chunk-WVGI2OPS.js";import{a as js}from"./chunk-HL74NBMN.js";import"./chunk-LIK2ODAW.js";import{h as vt}from"./chunk-S2NCBUN2.js";import{C as Jt,D as Ms,E as Qa,Ma as Bs,O as qs,P as Is,Q as Vi,R as N,Sa as Ls,T as Es,Ua as Qi,V as $e,Va as zs,Wa as Pn,g as Sn,ga as Os,h as Ti,ha as Ps,ia as Ds,ja as ks,r as Ss,s as ws,wa as $o,xa as Xo,ya as As}from"./chunk-VGS45BGB.js";import"./chunk-6MRLMWSN.js";import{a as Ns}from"./chunk-J75E45UY.js";import"./chunk-PCVCOCYF.js";import"./chunk-MDS55AFQ.js";import{f as Us,h as st,i as Ai,l as Xs,m as Ys,n as Js,o as Zs,p as ep}from"./chunk-76MWMFGZ.js";import{a as Yo,b as Jo}from"./chunk-CAAMLNK2.js";import"./chunk-BKYCN2UL.js";import{a as Vs}from"./chunk-GTWE364S.js";import"./chunk-BNR6VICX.js";import"./chunk-E7KE5WOB.js";import{a as Ke}from"./chunk-4WCUKRWY.js";import{a as Et,c as Ot,d as Pt,f as Dt,g as Qs}from"./chunk-GVSX327P.js";import"./chunk-VUT3IBC3.js";import"./chunk-QWP7RBJ4.js";import"./chunk-EWVAYMBQ.js";import"./chunk-F2KQCO5S.js";import{Aa as Cs,Ba as ys,Ca as vs,Da as xs,Ea as bs,Ha as Ts,R as Ro,S as No,U as Xt,X as os,_ as zo,aa as ps,ca as cs,cb as Fs,db as Rs,ga as ds,k as wn,n as ts,oa as od,za as _s}from"./chunk-PMORTF6P.js";import"./chunk-UWB6RRQG.js";import"./chunk-MEYIDREN.js";import"./chunk-VFBQYCPS.js";import"./chunk-FALCEB6Z.js";import{g as Ko,h as qn,k as In,p as En,r as Go,s as ki,t as On}from"./chunk-Q36WUEZZ.js";import"./chunk-3YZV6C76.js";import"./chunk-DY76GKLB.js";import{a as Ao,b as Mi,c as qi,d as Fo}from"./chunk-OFAPK2CL.js";import{g as G,h as Bo,p as ls,x as ss,z as Yt}from"./chunk-2UQJLHWF.js";import{b as Qo}from"./chunk-W7XG2GJN.js";import"./chunk-ZU6YWRWQ.js";import{a as Ml}from"./chunk-TH5HBDQ4.js";import"./chunk-3QXL25NC.js";import{a as Ge}from"./chunk-37Q7HLLO.js";import{a as zl}from"./chunk-5LDQNJMW.js";import"./chunk-D2MLSZQN.js";import"./chunk-7HKO3UL2.js";import"./chunk-2QUMRTIY.js";import{f as Ql,n as Al,o as Fl,p as Rl,q as ko,r as Nl}from"./chunk-JEFH2IQ2.js";import{a as Tn,b as Do}from"./chunk-MXXG7JMP.js";import{a as Mn,b as as}from"./chunk-E4E5GYG6.js";import{c as bi,e as Ll}from"./chunk-JX6FSAUM.js";import{m as wi}from"./chunk-PW6R7FZB.js";import{a as Cl,b as yl,c as xl,e as bl,f as Io,g as Pe,h as hi,i as Tl}from"./chunk-JXVG5W4L.js";import"./chunk-PQR3PYUO.js";import"./chunk-NDGBGQVO.js";import"./chunk-D5GWZTVH.js";import"./chunk-3HAYFAB6.js";import"./chunk-J26UBQIS.js";import{a as Hl}from"./chunk-FCMMJPHU.js";import{B as Zl,C as es,D as is,G as ns,H as Ii,I as Ei,K as Oi,L as Pi,M as Di,N as Lo,P as ms,Q as Wo,R as us,S as fs,T as gs,U as hs,V as Ho,W as jo,X as Uo,a as $l,b as Xl,c as Yl,d as Jl}from"./chunk-XOUY3WFW.js";import{a as se,d as Bl,e as ne,f as oe}from"./chunk-T6JVNTJG.js";import"./chunk-IWLZYVXZ.js";import"./chunk-D7PLVGOH.js";import{a as yt,b as rs}from"./chunk-N5LBTIVW.js";import{a as Va,b as Si,j as Ul,k as Kl,t as Gl}from"./chunk-KD24FFGN.js";import{b as jl}from"./chunk-OAAZQYCH.js";import{e as he,g as xn,h as xi,j as bn}from"./chunk-SXL2JL7W.js";import{a as ql}from"./chunk-WF623SJ5.js";import{a as El}from"./chunk-KSZMJEWO.js";import{c as vn,e as _i,i as Ci,k as yi,l as vi,m as Il}from"./chunk-YURTUYSP.js";import"./chunk-SXVF2WKJ.js";import"./chunk-CS5QP4JE.js";import{A as Ie,B as Eo,D as Ut,E as yn,F as Oo,G as Kt,K as Ue,O as Gt,P as It,Q as wl,i as vl,l as Cn,o as le,s as V,t as ge,w as De,y as Sl,z as Q}from"./chunk-6SKS5UXQ.js";import"./chunk-QNMKYRGV.js";import"./chunk-LZRPRFKU.js";import{a as Wl}from"./chunk-D5MYV4RH.js";import{a as Ct}from"./chunk-FGPSS3KE.js";import{b as Ki,c as Mo,e as qo,f as ka}from"./chunk-H7WYYANA.js";import"./chunk-4RLCA45F.js";import{a as ye}from"./chunk-52J7GBXI.js";import"./chunk-XXE5J3QR.js";import"./chunk-NANLX6N2.js";import"./chunk-MAIQQVIF.js";import{a as Po,c as kl,i as Vl}from"./chunk-ELNVTVEF.js";import{k as gi}from"./chunk-W723OFBR.js";import"./chunk-MPGCY2UP.js";import{F as gl,G as hl,H as _n,j as fl}from"./chunk-Z2726B6L.js";import{a as Ol,b as Pl,e as it,r as Dl,s as Vo}from"./chunk-63VSCBUG.js";import{e as $t}from"./chunk-BBRIDMAM.js";import{c as _l}from"./chunk-AK76XBCN.js";import"./chunk-CDJGICS6.js";import"./chunk-GELYA6QP.js";import"./chunk-WDJMVSF4.js";import"./chunk-R22ER6WU.js";import{$d as _o,Bb as jt,Bd as Qt,Bg as xo,Cd as ie,Cf as il,Db as mo,Dd as di,Eb as Ui,Fb as Nn,Ga as Ur,Gd as ho,Gg as ll,Gh as ml,Ha as sn,Hb as lt,I as Mt,Ih as ut,Ja as Kr,Jb as pn,Je as el,Jh as wo,Ka as Gr,Kg as sl,La as ji,Lb as Ne,Lc as qa,M as Ht,Mb as mt,Mc as Ia,Oa as ve,Ob as Bn,Qg as cl,Ra as rt,Sf as nl,Vf as ol,Wb as Ye,X as Wr,Xc as fo,Xf as je,Yc as Xr,Yd as Jr,Yf as Ft,Yh as Da,Zd as Zr,_g as So,ah as dl,ba as rn,ca as ln,cf as tl,de as dn,f as zr,fh as mi,ii as Be,ka as Hr,ke as At,ki as ui,ld as Yr,lg as un,ma as jr,
1ne as mn,ng as al,ni as fi,oe as Oa,oi as zn,qi as ul,re as Co,sd as Ln,se as yo,tc as uo,ue as vo,w as h,y as ue,zd as go,zh as hn}from"./chunk-PTO5EKF4.js";import{L as Ea,a as pi,aa as K,ca as ci,h as $r,k as ce,l as cn}from"./chunk-2HBSW6TV.js";import{b as X,c as k,d as Wt}from"./chunk-D7IZ65KR.js";import{B as Pa,u as pl,w as bo,y as To}from"./chunk-XZ5BPYQY.js";import{$a as C,$c as E,A as Sa,Aa as Ir,Bc as S,Da as tn,E as Wi,Ea as ai,Ec as y,Fa as Bt,Gb as io,Gc as d,H as Hi,Hc as ao,I as br,Ic as ro,Id as He,Ja as ti,Ka as re,Lc as Vr,Mc as qe,Nb as r,Nc as Te,Nd as _t,Ob as T,Oc as Se,Od as Fr,Pa as P,Pd as so,Qa as Lt,R as Tr,Ra as Er,Rc as W,Rd as Rr,Sc as g,T as Sr,Tb as no,Tc as w,Ub as Dr,Uc as M,V as wr,Vc as wt,Wb as ii,Za as Re,Zb as oo,_a as _,_b as kr,_c as I,aa as Jn,ad as O,bc as x,bd as wa,cb as Or,ed as et,fd as ht,ga as Mr,gb as to,gc as l,gd as Qr,h as fe,hc as We,hd as Y,i as xr,ia as Zn,ib as R,ic as be,id as at,ie as Nr,jc as St,jd as Ce,je as B,kc as dt,kd as an,ke as A,ld as Ma,le as ri,md as Ar,me as li,nb as Pr,ne as po,oe as Br,pd as m,pe as co,qc as Ae,qd as u,r as en,rd as zt,sd as lo,tc as nn,ua as qr,uc as on,vc as p,vd as te,wa as ae,wc as c,xc as b,xe as Lr,ya as eo,yc as j,ye as si,zc as U}from"./chunk-LJ57Y6Y4.js";import{S as gn,g as tt,j as rl,w as fn,y as Oe}from"./chunk-3CYOMHKS.js";import{a as me,b as Ee,h as nd,n as Tt}from"./chunk-66XN5LXC.js";var ad=["richTextTpl"],rd=["richTextHeaderTpl"],ld=()=>({standalone:!0}),sd=()=>({height:"414px"});function pd(n,a){if(n&1&&(p(0,"div",4),g(1),b(2,"i",5),m(3,"translate"),c()),n&2){let o=d();r(),M(" ",o.title," "),r(),l("qfTooltipTitle",u(3,2,"widgets.limitedCharactersTips"))}}function cd(n,a){n&1&&(p(0,"span",8),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"widgets.characterLimitExceeded")," "))}function dd(n,a){if(n&1){let o=S();p(0,"qf-rich-text",6),O("ngModelChange",function(e){_(o);let i=d();return E(i.templateDefaultValue,e)||(i.templateDefaultValue=e),C(e)}),c(),x(1,cd,3,3,"span",7)}if(n&2){let o=d();l("placeholder",o.placeholder)("ngModelOptions",Y(7,ld))("quillStyles",Y(8,sd))("pathType",o.pathType)("appKey",o.appKey),I("ngModel",o.templateDefaultValue),r(),l("ngIf",(o.templateDefaultValue==null?null:o.templateDefaultValue.length)>o.LIMIT_LENGTH)}}var _p=4e3,Wn=(()=>{let a=class a{get data(){return this._data}set data(t){var e;this._data=t,this.templateDefaultValue=String((e=t.queDefaultValue)!=null?e:"")}constructor(t,e){this._modal=t,this._translate=e,this.placeholder="widgets.inputContent",this.dataChange=new R,this.PathType=rt,this.LIMIT_LENGTH=_p}openRichTextModal(){this._modal.open({title:this.richTextHeaderTpl,size:"large",content:this.richTextTpl,bodyStyle:{"padding-top":"8px"},okText:this._translate.instant("widgets.finish"),onOk:()=>{var t;if(((t=this.templateDefaultValue)==null?void 0:t.length)>_p)return!1;this.data.queDefaultValue=this.templateDefaultValue,this.dataChange.emit(this.data)},onCancel:()=>{this.templateDefaultValue=tt(this.data.queDefaultValue)}})}};a.\u0275fac=function(e){return new(e||a)(T(Pe),T(X))},a.\u0275cmp=P({type:a,selectors:[["qf-default-rich-text"]],viewQuery:function(e,i){if(e&1&&(qe(ad,5),qe(rd,5)),e&2){let s;Te(s=Se())&&(i.richTextTpl=s.first),Te(s=Se())&&(i.richTextHeaderTpl=s.first)}},inputs:{data:"data",appKey:"appKey",title:"title",pathType:"pathType",placeholder:"placeholder"},outputs:{dataChange:"dataChange"},decls:7,vars:1,consts:[["richTextHeaderTpl",""],["richTextTpl",""],[1,"widget-edit-share","rich-text"],["qf-button","","qfSize","medium","qfType","dashed",3,"click"],[1,"rich-text-header"],["qf-icon","","qf-tooltip","","qfName","ex-help-outlined","qfName","ex-help-outlined","qfTooltipPlacement","right","qfTheme","default",1,"rich-text-header-tooltip",3,"qfTooltipTitle"],["bounds","self",3,"ngModelChange","placeholder","ngModelOptions","quillStyles","pathType","appKey","ngModel"],["class","limit-letter-tip",4,"ngIf"],[1,"limit-letter-tip"]],template:function(e,i){if(e&1){let s=S();p(0,"div",2)(1,"button",3),y("click",function(){return _(s),C(i.openRichTextModal())}
1),g(2),c()(),x(3,pd,4,4,"ng-template",null,0,te)(5,dd,2,9,"ng-template",null,1,te)}e&2&&(r(2),M(" ",i.title," "))},dependencies:[A,V,Q,wn,K,ce,bi,k],styles:[".widget-edit-share.rich-text[_ngcontent-%COMP%] .qf-btn[_ngcontent-%COMP%]{width:100%}.rich-text-header[_ngcontent-%COMP%]{padding:24px 32px 16px;font-size:20px;font-weight:500;line-height:28px;color:#121315}.rich-text-header-tooltip[_ngcontent-%COMP%]{font-size:16px;color:#acb3bd;cursor:pointer}.limit-letter-tip[_ngcontent-%COMP%]{margin-top:4px;font-size:14px;line-height:22px;color:#fb4b51}"]});let n=a;return n})();var Fa=(()=>{let a=class a{constructor(t){this._widgetChange=t,this.PathType=rt}change(){this._widgetChange.changed.emit(!0),this._widgetChange.syncForm$.next({type:"description",question:this.data})}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-description-character-edit"]],inputs:{appKey:"appKey",data:"data"},decls:10,vars:15,consts:[[1,"description-edit"],[1,"widget-edit-body"],[1,"widget-edit-title"],[3,"hintMsg"],[3,"dataChange","placeholder","title","data","appKey","pathType"]],template:function(e,i){e&1&&(p(0,"form",0)(1,"div",1)(2,"p",2),g(3),m(4,"translate"),b(5,"qf-hint-msg",3),m(6,"translate"),c(),p(7,"qf-default-rich-text",4),m(8,"translate"),m(9,"translate"),y("dataChange",function(){return i.change()}),c()()()),e&2&&(r(3),M(" ",u(4,7,"widgets.content")," "),r(2),l("hintMsg",u(6,9,"widgetHelp.description")),r(2),l("placeholder",u(8,11,"all.description"))("title",u(9,13,"widgets.editContent"))("data",i.data)("appKey",i.appKey)("pathType",i.PathType.Description))},dependencies:[Ie,ge,De,G,Wn,k],styles:[".description-edit[_ngcontent-%COMP%]{margin-top:24px}"]});let n=a;return n})();var ud=["imgUploader"],fd=(n,a)=>({"left-tag-chosen":n,tag:a}),gd=(n,a)=>({"right-tag-chosen":n,tag:a}),hd=()=>["jpg","jpeg","png","gif","bmp","tif"];function _d(n,a){if(n&1){let o=S();p(0,"div",11),y("click",function(){let e=_(o).index,i=d(2);return C(i.changeTheme(e))}),b(1,"img",12),p(2,"div",13)(3,"p",14),g(4),m(5,"translate"),c()()()}if(n&2){let o=a.$implicit,t=a.index;We("background",o.cardBg),l("tabindex",t),r(),l("qfSrc",o.list),r(3),w(u(5,5,o.name))}}function Cd(n,a){if(n&1&&(j(0),x(1,_d,6,7,"div",10),U()),n&2){let o=d();r(),l("ngForOf",o.themes)}}function yd(n,a){if(n&1&&(b(0,"qf-option",25),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.label))("qfValue",o)}}function vd(n,a){if(n&1){let o=S();p(0,"qf-color-picker",26),O("colorChange",function(e){_(o);let i=d(3);return E(i.formStyle.headerColor,e)||(i.formStyle.headerColor=e),C(e)}),y("colorChange",function(){_(o);let e=d(3);return C(e.updateFormStyle())}),c()}if(n&2){let o=d(3);I("color",o.formStyle.headerColor)}}function xd(n,a){if(n&1&&(b(0,"qf-option",25),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.label))("qfValue",o)}}function bd(n,a){if(n&1){let o=S();p(0,"qf-color-picker",26),O("colorChange",function(e){_(o);let i=d(3);return E(i.formStyle.bgColor,e)||(i.formStyle.bgColor=e),C(e)}),y("colorChange",function(){_(o);let e=d(3);return C(e.updateFormStyle())}),c()}if(n&2){let o=d(3);I("color",o.formStyle.bgColor)}}function Td(n,a){if(n&1){let o=S();j(0),p(1,"div",16)(2,"p",17),g(3),m(4,"translate"),c(),p(5,"div",18)(6,"qf-select",19),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.selectedHeaderStyle,e)||(i.selectedHeaderStyle=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d(2);return C(i.utils.headerStyleChange(e))}),x(7,yd,2,4,"qf-option",20),c(),p(8,"div",21)(9,"div",22),y("click",function(){_(o);let e=d(2);return C(e.selectedHeaderStyle.value==="img"?e.utils.clickUploadImg(1):null)}),c(),p(10,"div",23),y("click",function(){_(o);let e=d(2);return C(e.utils.resetFormStyle(1))}),p(11,"i",24),g(12,"\uE64F"),c()(),x(13,vd,1,1,"ng-template",null,1,te),c()()(),p(15,"div",16)(16,"p",17),g(17),m(18,"translate"),c(),p(19,"div",18)(20,"qf-select",19),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.selectedBgStyle,e)||(i.selectedBgStyle=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d(2);return C(i.utils.bgStyleChange(e))}),x(21,xd,2,4,"qf-option",20),c(),p(22,"div",21)(23,"div",22),y("click",function(){_(o);let e=d(2);return C(e.selectedBgStyle.value==="img"?e.utils.clickUploadImg(2):null)}),c(),p(24,"div",23),y("click",function(){_(o);let e=d(2);return C(e.utils.resetFormStyle(2))}),p(25,"i",24),g(26,"\uE64F"),c()(),x(27,bd,1,1,"ng-template",null,2,te),c()()(),U()}if(n&2){let o=W(14),t=W(28),e=d(2);r(3),w(u(4,14,"all.header")),r(3),I("ngModel",e.selectedHeaderStyle),r(),l("ngForOf",e.styleTypeOpt),r(2),St(e.headerStyle),l("qfPopoverTrigger",e.selectedHeaderStyle.value==="img"?null:"click")("qfPopoverContent",o),r(8),w(u(18,16,"all.background")),r(3),I("ngModel",e.selectedBgStyle),r(),l("ngForOf",e.styleTypeOpt),r(2),St(e.bgStyle),l("qfPopoverTrigger",e.selectedBgStyle.value==="img"?null:"click")("qfPopoverContent",t)}}function Sd(n,a){if(n&1&&b(0,"qf-version-limit-card",27),n&2){let o=d(2);l("restrictedFunction",o.limitFunctionKey.customStyle)}
1}function wd(n,a){if(n&1&&(j(0),x(1,Td,29,18,"ng-container",8)(2,Sd,1,1,"qf-version-limit-card",15),U()),n&2){let o=d();r(),l("ngIf",o.showCustomStyle),r(),l("ngIf",!o.showCustomStyle)}}var Na=(()=>{let a=class a{toggleDefaultTheme(t){this.defaultTheme=t}constructor(t,e){this.widgetChange=t,this.aclSrc=e,this.defaultTheme=!0,this.themes=Co,this.PathType=rt,this.limitFunctionKey=Be,this.styleTypeOpt=[{value:"img",label:"all.image"},{value:"color",label:"all.color"}],this.selectedHeaderStyle=this.styleTypeOpt[0],this.selectedBgStyle=this.styleTypeOpt[1],this.change=()=>{this.widgetChange.changed.emit(!0)},this.utils={headerStyleChange:i=>{i.value==="img"?(this.formStyle.headerImage||(this.formStyle.headerImage=this.themes[this.formTheme].url),this.formStyle.headerColor=null):this.formStyle.headerImage=null,this.updateFormStyle()},bgStyleChange:i=>{i.value==="img"?this.formStyle.bgColor=null:(this.formStyle.bgImage=null,this.formStyle.bgColor||(this.formStyle.bgColor=this.themes[this.formTheme].rgb)),this.updateFormStyle()},resetFormStyle:i=>{i===1?(this.formStyle.headerImage=null,this.formStyle.headerColor=null,this.selectedHeaderStyle=this.styleTypeOpt[0]):(this.formStyle.bgImage=null,this.formStyle.bgColor=null,this.selectedBgStyle=this.styleTypeOpt[1]),this.updateFormStyle()},clickUploadImg:i=>{this.uploadInvoke=i,this.imgUploader.nativeElement.click()}}}ngOnInit(){this.initFormStyle(),this.showCustomStyle=this.aclSrc.canUseFunction(Be.customStyle)}initFormStyle(){this.formStyle.headerImage?this.selectedHeaderStyle=this.styleTypeOpt[0]:this.formStyle.headerColor&&(this.selectedHeaderStyle=this.styleTypeOpt[1]),this.formStyle.bgImage?this.selectedBgStyle=this.styleTypeOpt[0]:this.formStyle.bgColor&&(this.selectedBgStyle=this.styleTypeOpt[1])}get headerStyle(){return this.selectedHeaderStyle.value==="img"?{"background-image":`url(${this.formStyle.headerImage||this.themes[this.formTheme].url})`}:{"background-color":this.formStyle.headerColor}}get bgStyle(){return this.selectedBgStyle.value==="img"?{"background-image":`url(${this.formStyle.bgImage})`}:{"background-color":this.formStyle.bgColor||this.themes[this.formTheme].rgb}}updateFormStyle(){this.widgetChange.headerBgChanged.emit()}doUpload(t){t.type==="success"&&(this.uploadInvoke===1?this.formStyle.headerImage=t.file.url:this.formStyle.bgImage=t.file.url,this.updateFormStyle())}changeTheme(t){this.utils.resetFormStyle(1),this.utils.resetFormStyle(2),this.widgetChange.themeChanged.emit(t),this.change()}};a.\u0275fac=function(e){return new(e||a)(T(N),T(ui))},a.\u0275cmp=P({type:a,selectors:[["qf-form-theme-edit"]],viewQuery:function(e,i){if(e&1&&qe(ud,5),e&2){let s;Te(s=Se())&&(i.imgUploader=s.first)}},inputs:{formTheme:"formTheme",formStyle:"formStyle"},decls:17,vars:23,consts:[["imgUploader",""],["colorPickTpl1",""],["colorPickTpl2",""],[1,"themes"],[1,"tags"],[3,"click"],[1,"tag-name"],[1,"theme-content"],[4,"ngIf"],[3,"qfChange","hidden","pathType","maxSize","qfAccept"],["class","style-card",3,"background","tabindex","click",4,"ngFor","ngForOf"],[1,"style-card",3,"click","tabindex"],[1,"style-card-img",3,"qfSrc"],[1,"style-card-name-modal"],[1,"style-tag-name"],["cardType","small",3,"restrictedFunction",4,"ngIf"],[1,"theme-setting"],[1,"title"],[1,"set-container"],[2,"width","102px",3,"ngModelChange","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[1,"preview-container"],["qf-popover","","qfPopoverSize","small","qfPopoverOverlayClassName","color-pick-popover",1,"preview-inner",3,"click","qfPopoverTrigger","qfPopoverContent"],[1,"delete-icon-container",3,"click"],[1,"iconfont"],[3,"qfLabel","qfValue"],[3,"colorChange","color"],["cardType","small",3,"restrictedFunction"]],template:function(e,i){if(e&1){let s=S();p(0,"div",3)(1,"div",4)(2,"div",5),y("click",function(){return _(s),C(i.toggleDefaultTheme(!0))}),p(3,"p",6),g(4),m(5,"translate"),c()(),p(6,"div",5),y("click",function(){return _(s),C(i.toggleDefaultTheme(!1))}),p(7,"p",6),g(8),m(9,"translate"),c()()(),p(10,"div",7),x(11,Cd,2,1,"ng-container",8)(12,wd,3,2,"ng-container",8),c()(),p(13,"qf-upload-v2",9),y("qfChange",function(v){return _(s),C(i.doUpload(v))}),p(14,"button",null,0),g(16,"fake-button"),c()()}e&2&&(r(2),dt(Ce(16,fd,!i.defaultTheme,i.defaultTheme)),r(2),w(u(5,12,"all.themes")),r(2),dt(Ce(19,gd,i.defaultTheme,!i.defaultTheme)),r(2),w(u(9,14,"widgets.custom")),r(3),l("ngIf",i.defaultTheme),r(),l("ngIf",!i.defaultTheme),r(),l("hidden",!0)("pathType",i.PathType.FormStyle)("maxSize",20)("qfAccept",Y(22,hd)))},dependencies:[B,A,V,Q,oe,ne,Mn,$t,Ss,wi,Qo,k],styles:[".color-pick-popover .qf-popover-inner{padding:0;box-shadow:none} .color-pick-popover .qf-popover-inner-content{padding:0}.themes[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;background-color:#fff;border-radius:4px}.tags[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:35px}.tags[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%], .tags[_ngcontent-%COMP%] .right-tag-chosen[_ngcontent-%COMP%], .tags[_ngcontent-%COMP%] .left-tag-chosen[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:50%;height:100%;cursor:pointer}.tags[_ngcontent-%COMP%] .left-tag-chosen[_ngcontent-%COMP%]{border-right:solid 1px #f4f6f9;border-bottom:solid 1px #f4f6f9}.tags[_ngcontent-%COMP%] .right-tag-chosen[_ngcontent-%COMP%]{border-bottom:solid 1px #f4f6f9;border-left:solid 1px #f4f6f9}
1.tags[_ngcontent-%COMP%] .tag-name[_ngcontent-%COMP%]{margin:0}.theme-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:calc(100% - 45px);padding:10px 10px 50px}.theme-custom-content[_ngcontent-%COMP%]{width:100%;height:400px}.theme-setting[_ngcontent-%COMP%]{width:100%;padding:13px 10px 10px}.theme-setting[_ngcontent-%COMP%]:first-of-type{border-bottom:1px solid #f4f6f9}.theme-setting[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-bottom:8px;margin:0;color:#b4b4bc}.preview-container[_ngcontent-%COMP%]{display:flex;width:112px;height:34px;cursor:pointer;border:1px solid #c1c1cd;border-radius:3px}.preview-container[_ngcontent-%COMP%] .preview-inner[_ngcontent-%COMP%]{width:80px;background-position:center center;background-size:cover}.preview-container[_ngcontent-%COMP%] .delete-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(100% - 80px)}.preview-container[_ngcontent-%COMP%] .delete-icon-container[_ngcontent-%COMP%] .iconfont[_ngcontent-%COMP%]{color:#767e89;transform:scale(.5)}.set-container[_ngcontent-%COMP%]{display:flex;align-content:center;justify-content:space-between;place-content:center space-between}.style-card[_ngcontent-%COMP%]{position:relative;width:100%;height:90px;padding-bottom:10px;margin-bottom:10px;cursor:pointer;border:4px solid #fff;border-radius:3px;outline:none;box-shadow:0 4px 10px #0c1f5014}.style-card-img[_ngcontent-%COMP%]{display:block;width:138px;margin:0 auto}.style-card-name-modal[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:30px;background:#ffffffe6}.style-tag-name[_ngcontent-%COMP%]{margin:0}"]});let n=a;return n})();var ke=(()=>{let a=class a{constructor(){this.changeTargetQuestion$=new fe,this.editQueChange=new R}set editQue(t){this._editQue=t}get editQue(){return this._editQue}};a.\u0275fac=function(e){return new(e||a)},a.\u0275prov=ai({token:a,factory:a.\u0275fac});let n=a;return n})();var qd=["subQuestions","queDefaultValues","queId","queTempId","queTitle","tableAnswer","tableNoRepeatStatus","tableNoRepeatQuestion","tableCustomButtonText","tableRowsLimit","codeBlockConfig","encryptCode","encryptStr","innerQuestions","queWidth","input","subQuestions","queType"],Id=["_subQuestions","_queDefaultValues","_queId","_queTempId","_queTitle","_tableAnswer","_tableNoRepeatStatus","_tableNoRepeatQuestion","_tableCustomButtonText","_tableRowsLimit","_codeBlockConfig","_encryptCode","_encryptStr","_innerQuestions","_queWidth","_input","_subQuestions","_queType"],Zt=(()=>{let a=class a{getFields(t){let e=[h.CODEBLOCK,h.QLINKER,h.OCR,h.CODEBLOCK],i=this.appFormEditService.genInsertableQuestions(t).filter(s=>!e.includes(s.queType));return i.forEach(s=>{let f=At(s.queId,4);s.encryptCode=f,s.encryptStr=`{${s.queTitle}$$${f}$$}`}),i||[]}getQlinkerBindFields(t,e){let i=this.getFields(t),s=e.get("url").value,f=e.get("queryParams").value,v=e.get("headers").value,q=e.get("urlEncodedValue").value,D=e.get("jsonValue").value,F=e.get("xmlValue").value,H=i.reduce((de,Z)=>(Z.queType===h.TABLE&&(de.set(Z.queId,Z),de.set(Z.queTempId,Z)),de),new Map),_e=xo(s,!0),Qe=xo(D,!0),Xe=xo(F,!0),ct=new Set([..._e,...Qe,...Xe]);ct=[...f,...v,...q].reduce((de,{value:Z,type:Fe})=>
1{if(Fe===Nn.MATCH_QUE){let Nt=typeof Z=="string"?Number(Z):Z;de.add(Nt)}return de},ct);let xe=i.reduce((de,Z)=>{if(ct.has(Z.queId)&&!de.has(Z.supId))if(Z.supId){let Fe=Z.supId,Nt=H.get(Z.supId);de.set(Fe,Nt)}else de.set(Z.queId,Z);return de},new Map);return tt(Array.from(xe.values()))}dealDefaultValue(t){return t.forEach(e=>{var i,s,f,v,q,D,F,H,_e,Qe,Xe,ct,xe,de;switch(e.queType){case h.DATE_RANGE:typeof e.queDefaultValue=="string"?e.input=(s=(i=e.queDefaultValue)==null?void 0:i.split("~"))!=null?s:[]:e.input=(f=e.queDefaultValue)!=null?f:[];break;case h.LOCATION:case h.ADDRESS:case h.UPLOAD:e.input=((v=e.queDefaultValues)==null?void 0:v.values)||[];break;case h.SELECT:case h.RADIO:e.input=(q=e.options.find(Z=>Z.beingDefault))==null?void 0:q.optValue;break;case h.CHECKBOX:case h.IMAGE_PICKER:e.input=(D=e.options.filter(Z=>Z.beingDefault))==null?void 0:D.map(Z=>Z.optValue);break;case h.DEPARTMENT:e.input=(_e=(H=(F=e.deptDftValue)==null?void 0:F.depart)==null?void 0:H.map(Z=>Z.deptId))!=null?_e:[];break;case h.MEMBER:{let Z=e.queType===h.MEMBER&&Number(e.queId)===1;Z&&!e.memberDftValue?e.input=void 0:Z&&e.memberDftValue?e.input=(Xe=(Qe=e.memberDftValue)==null?void 0:Qe.member.map(Fe=>Fe.uid).pop())!=null?Xe:void 0:e.input=(de=(xe=(ct=e.memberDftValue)==null?void 0:ct.member)==null?void 0:xe.map(Fe=>Fe.uid))!=null?de:[];break}case h.RICHTEXT:e.input=e.queDefaultValue;break;case h.TABLE:{let Z={};Object.keys(e).filter(Fe=>qd.includes(Fe)||Id.includes(Fe)).map(Fe=>Z[Fe]=e[Fe]);for(let Fe in Z)if(Fe.indexOf("_")==0){let Nt=Fe.slice(1);Z[Nt]=Z[Fe],delete Z[Fe]}e.input=Z,e.input.codeBlockConfig={tableContent:je(e.queDefaultValues),tableDisplayData:[]};break}default:e.input=e.queDefaultType===Sn.CUSTOM?e.queDefaultValue:null}}),t}assembleData(t){return t.reduce((e,i)=>{var s,f,v,q;switch(i.queType===h.RICHTEXT&&typeof i.input!="string"&&(i.input=""),i.queType){case h.TABLE:if(i.testTableValue)e.push(...i.testTableValue||[]);else{let D=((f=(s=i.queDefaultValues)==null?void 0:s.tableValues)!=null?f:[]).flatMap(F=>F).reduce((F,H)=>{if(F.has(H.queId)){let _e=this.parseQlinkerTestTableValueByType(H);F.get(H.queId).values.push(..._e)}else{let _e=this.parseQlinkerTestTableValueByType(H);F.set(H.queId,{keyQueId:H.queId,values:_e,tableValues:[]})}return F},new Map);e.push(...D.values())}break;case h.UPLOAD:e.push({keyQueId:i.queId,values:i.input.map(D=>D.value),tableValues:[]});break;case h.REFER:e.push({keyQueId:i.queId,values:(v=i.input)==null?void 0:v.map(D=>D.applyId),tableValues:[]});break;case h.LOCATION:case h.ADDRESS:{let D=(q=i.input)==null?void 0:q.map(({value:F})=>F);e.push({keyQueId:i.queId,values:di(D)?D:D.join(""),tableValues:[]});break}case h.DATE_RANGE:e.push({keyQueId:i.queId,values:i.input.join("~"),tableValues:[]});break;default:e.push({keyQueId:i.queId,values:i.input,tableValues:[]})}return e},[])}parseQlinkerTestTableValueByType(t){switch(t.queType){case h.DEPARTMENT:case h.MEMBER:return t.values.map(e=>`${e.id}`);default:return t.values.map(e=>e.value)}}dealResError(t){let e,i;e=this.translateService.instant(`codeblock.errorMsg.${t}.title`),e.startsWith("codeblock.errorMsg.")?(e=this.translateService.instant(`errorMessage.${t}.name`),i=this.translateService.instant(`errorMessage.${t}.message`)):i=this.translateService.instant(`codeblock.errorMsg.${t}.content`),this.messageService.error(i)}constructor(t,e,i){this.appFormEditService=t,this.translateService=e,this.messageService=i}};a.\u0275fac=function(e){return new(e||a)(ti(ee),ti(X),ti(ye))},a.\u0275prov=ai({token:a,factory:a.\u0275fac});let n=a;return n})();function Ed(n,a){if(n&1){let o=S();p(0,"a",21),m(1,"translate"),y("click",function(){_(o);let e=d(),i=e.$implicit,s=e.index,f=d();return C(f.tryToDeleteSubQue(s,i))}),b(2,"i",22),c()}n&2&&l("title",u(1,1,"all.delete"))}function Od(n,a){n&1&&(p(0,"a",20),m(1,"translate"),b(2,"i",23),c()),n&2&&l("title",u(1,1,"widgets.canNotDeleteHint"))}function Pd(n,a){if(n&1){let o=S();p(0,"div",11)(1,"div",12),y("click",function(){let e=_(o).$implicit,i=d();return C(i.editSubQue.emit(e))}),b(2,"i",13),p(3,"span"),g(4),c()(),p(5,"div",14)(6,"a",15),y("click",function(){let e=_(o).$implicit,i=d();return C(i.editSubQue.emit(e))}),b(7,"i",16),c(),p(8,"a",17),b(9,"i",18),c(),x(10,Ed,3,3,"a",19)(11,Od,3,3,"a",20),c()()}if(n&2){let o=a.$implicit,t=d();r(2),l("qfIconfont",t.WIDGETS[o.queType].iconfont),r(2),w(o.queTitle),r(6),Ae(t.data.subQuestions.length>1?10:11)}}function Dd(n,a){if(n&1){let o=S();p(0,"li",24),y("click",function(){let e=_(o).$implicit,i=d();return C(i.addSubQue.emit(e))}),p(1,"span"),g(2),m(3,"translate"),c()()}if(n&2){let o=a.$implicit,t=d();l("qfPluginStatus",t.pluginTypeMap.get(o)),r(2),w(u(3,2,t.WIDGETS[o].name))}}var bp=(()=>{let a=class a{get data(){return this._data}set data(t){this._data=t,this.dataChange.emit(t)}change(){this.widgetChange.changed.emit(!0)}tryToDeleteSubQue(t,e){this.data.subQuestions.length!==1&&this.formEditService.tryToDeleteSubQue(t,e)}deleteSubQue(t,e){this.data.subQuestions.splice(t,1),this.data.subQuestions=[...this.data.subQuestions],this.clearQueDftValue(e),this.change(),this.widgetChange.syncForm$.emit({type:"subQuestion",question:this.data}),this.formEditService.delQueRelation(this.appFormEditSrv.appFormData,e),this.formEditService.delTableQueRelation(e),this.formEditService.delDeptOrMemberQuestionRelations(this.appFormEditSrv.appFormData,e),this.formEditService.delTableDeptOrMemberQuestionRelations(e)}getQueId(t){return t.queId===0?ie(t.queTempId)?0:t.queTempId:t.queId}clearQueDftValue(t){if(this.data.queDefaultValues){let e=this.data.queDefaultValues.tableValues;this.data.queDefaultValues.tableValues=e.reduce((i,s)=>(i.push(s.filter(f=>f.queId!==this.getQueId(t))),i),[])}}initTwoSubQue(){var t;(t=this.data.subQuestions)!=null&&t.length||(this.data.subQuestions=[this.generateWidget(2),this.generateWidget(2)],this.widgetChange.changed.emit(!0))}generateWidget(t){let e=this.formEditService.queTempId++;return Vi.initModelSwitchType(new Ms({queType:t,canEdit:!0,queTempId:e,supId:this.data.queTempId}))}drop(t){let{previousIndex:e,currentIndex:i}=t;e!==i&&(Et(this.data.subQuestions,t.previousIndex,t.currentIndex),this.widgetChange.syncForm$.next({type:"subQuestion",question:this.data}))}constructor(t,e,i){this.widgetChange=t,this.formEditService=e,this.appFormEditSrv=i,this.destroy$=new fe,this.dataChange=new R,this.editSubQue=new R,this.addSubQue=new R,this.pluginTypeMap=new Map([[h.REFER,"quote"]]),this.WIDGETS=yo,this.subQueType=[h.INPUT,h.ENCRYPTED_TEXT,h.TEXTAREA,h.NUMBER,h.LINK,h.DATE,h.PHONE,h.EMAIL,h.RADIO,h.SELECT,h.CHECKBOX,h.UPLOAD,h.DATA_RELATION,h.REFER,h.MEMBER,h.DEPARTMENT]}ngOnInit(){this.initTwoSubQue(),this.formEditService.delSubQue$.pipe(ae(this.destroy$)).subscribe(t=>{t.confirmDelete&&this.deleteSubQue(t.index,t.que)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(N),T($e),T(ee))},a.\u0275cmp=P({type:a,selectors:[["qf-table-edit"]],inputs:{data:"data"},outputs:{dataChange:"dataChange",editSubQue:"editSubQue",addSubQue:"addSubQue"},decls:20,vars:12,consts:[["subQueMenu","qfDropdownMenu"],[1,"table-edit"],[1,"widget-edit-share"],[1,"widget-title-edit","widget-edit-title"],[1,"widget-edit-inner"],["cdkDropList","",1,"table-sub-que-container",3,"cdkDropListDropped"],["cdkDrag","","class","sub-que-row",4,"ngFor","ngForOf"],["qf-button","","qf-
1dropdown","","qfType","dashed","qfTrigger","click","qfPlacement","bottomCenter",3,"qfDropdownMenu"],["qf-icon","","qfName","ex-plus-circle"],["qf-dropdown-menu","","qf-menu",""],["qf-menu-item","",3,"qfPluginStatus","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"sub-que-row"],[1,"sub-que-row-left",3,"click"],["qf-icon","",3,"qfIconfont"],[1,"sub-que-row-right"],["title","\u7F16\u8F91\u5B57\u6BB5",3,"click"],["qf-icon","","qfIconfont","\uE691"],["title","\u62D6\u52A8\u6362\u884C"],["cdkDragHandle","","qf-icon","","qfIconfont","\uE7E3",1,"iconfont","drag-icon"],[3,"title"],[1,"hover:!bg-transparent",3,"title"],[3,"click","title"],["qf-icon","","qfIconfont","\uE7C7"],["qf-icon","","qfIconfont","\uE7C7",1,"!text-gray-60"],["qf-menu-item","",3,"click","qfPluginStatus"]],template:function(e,i){if(e&1){let s=S();p(0,"form",1)(1,"div",2)(2,"div",3)(3,"span"),g(4),m(5,"translate"),c(),p(6,"div",4),g(7),m(8,"translate"),c()(),p(9,"div",5),y("cdkDropListDropped",function(v){return _(s),C(i.drop(v))}),x(10,Pd,12,3,"div",6),c(),p(11,"button",7),b(12,"i",8),p(13,"span"),g(14),m(15,"translate"),c()(),p(16,"qf-dropdown-menu",null,0)(18,"ul",9),x(19,Dd,4,4,"li",10),c()()()()}if(e&2){let s=W(17);r(4),w(u(5,6,"widgets.tableField")),r(3),M(" ",u(8,8,"all.clickTheFieldToEdit")," "),r(3),l("ngForOf",i.data.subQuestions),r(),l("qfDropdownMenu",s),r(3),w(u(15,10,"all.addField")),r(5),l("ngForOf",i.subQueType)}},dependencies:[B,Ie,ge,De,Dt,Pt,Ot,Ci,vi,yi,_i,vn,K,ce,zn,k],styles:[".table-edit[_ngcontent-%COMP%] .iconfont.help[_ngcontent-%COMP%]{margin-left:5px;font-size:13px;color:#acb3bd;cursor:pointer}.table-edit[_ngcontent-%COMP%] qf-dropdown[_ngcontent-%COMP%]{width:100%}.table-edit[_ngcontent-%COMP%] .add-field-selector[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:34px;cursor:pointer;background-color:#fafafd;border:1px dashed #d5d5f4;border-radius:3px}.table-edit[_ngcontent-%COMP%] .add-field-selector[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]{margin-right:5px;color:#acb3bd}.table-edit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.table-sub-que-container[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sub-que-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;height:36px;padding-left:10px;margin-bottom:10px;border:1px solid #dedee5;border-radius:4px}.sub-que-row[_ngcontent-%COMP%] .sub-que-row-left[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.sub-que-row[_ngcontent-%COMP%] .sub-que-row-left[_ngcontent-%COMP%] .iconfont[_ngcontent-%COMP%]{margin-right:5px}.sub-que-row[_ngcontent-%COMP%]:hover .sub-que-row-right[_ngcontent-%COMP%]{opacity:1}.sub-que-row[_ngcontent-%COMP%] .iconfont[_ngcontent-%COMP%]{color:#767e89}.sub-que-row[_ngcontent-%COMP%] > .sub-que-row-right[_ngcontent-%COMP%]{min-width:65px;opacity:0;transition:all ease .3s}.sub-que-row[_ngcontent-%COMP%] > .sub-que-row-right[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;width:20px;margin-right:4px;color:13px;text-align:center;border-radius:4px;transition:background ease .2s}.sub-que-row[_ngcontent-%COMP%] > .sub-que-row-right[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .drag-icon[_ngcontent-%COMP%]{cursor:move}.sub-que-row[_ngcontent-%COMP%] > .sub-que-row-right[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#e6e7e9}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.table-sub-que-container[_ngcontent-%COMP%] .cdk-drop-list-dragging[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]});let n=a;return n})();var Tp=nd(od(),1);var kd=["input"],Vd=(n,a)=>a.id;function Qd(n,a){if(n&1){let o=S();p(0,"nz-auto-option",19),y("click",function(){let e=_(o).$implicit,i=d().index,s=d();return C(s.selectAddress(i,e))}),g(1),c()}if(n&2){let o=a.$implicit;l("nzValue",o.name),r(),wt(" ",o.name," ",o.address," ")}}function Ad(n,a){if(n&1){let o=S();p(0,"div",8)(1,"div",9)(2,"div",10)(3,"span",11),g(4),m(5,"translate"),c(),p(6,"input",12,0),m(8,"translate"),O("ngModelChange",function(e){let i=_(o
1).$implicit;return E(i.center,e)||(i.center=e),C(e)}),y("focus",function(){let e=_(o),i=e.$implicit,s=e.index,f=d();return C(f.showMap(s,i.id))})("input",function(e){_(o);let i=d();return C(i.onInput(e))})("keyup.enter",function(e){let i=_(o).index,s=d();return C(s.selectAddressByKeyupEnter(i,e))}),c(),p(9,"nz-autocomplete",null,1),nn(11,Qd,2,3,"nz-auto-option",13,Vd),c()(),p(13,"div",14)(14,"span",11),g(15),m(16,"translate"),c(),p(17,"nz-input-number",15),O("ngModelChange",function(e){let i=_(o).$implicit;return E(i.radius,e)||(i.radius=e),C(e)}),y("ngModelChange",function(){let e=_(o).index,i=d();return C(i.changeCircle(e))})("nzBlur",function(){let e=_(o).index,i=d();return C(i.setDefaultRadius(e))}),c(),p(18,"span",11),g(19),m(20,"translate"),c()(),p(21,"div",16),y("click",function(){let e=_(o).index,i=d();return C(i.removePositionRange(e))}),b(22,"i",17),c()(),b(23,"div",18),c()}if(n&2){let o=a.$implicit,t=W(10),e=d();r(4),w(u(5,11,"all.locationCenter")),r(2),l("placeholder",u(8,13,"all.inputSearchLocation"))("nzAutocomplete",t)("nzStatus",o.center?"":"error"),I("ngModel",o.center),r(5),on(e.options),r(4),w(u(16,15,"all.rangeRadius")),r(2),l("nzPrecision",0)("nzMin",1),I("ngModel",o.radius),r(2),w(u(20,17,"all.meter")),r(4),l("id","map-container-"+o.id)}}function Fd(n,a){n&1&&(p(0,"ul")(1,"li")(2,"span"),g(3),m(4,"translate"),c()()()),n&2&&(r(3),w(u(4,1,"all.locationLimitTip1")))}var Sp=(()=>{let a=class a{addPositionRange(){this.positionRanges.length>=20||(this.positionRanges.push({center:"",radius:500,longitude:0,latitude:0,id:Date.now()}),setTimeout(()=>{this.inputs.last.nativeElement.focus()}))}clearPositionRange(){this.positionRanges=[]}removePositionRange(t){this.positionRanges.splice(t,1)}savePositionRange(t,e){this.positionRanges[t]=e}get mapKey(){return this._rootStore.globalEnvironmentConfig().mapProperties.key}selectAddress(t,e){this.addMarker(t,e.location.lng,e.location.lat,!1)&&(this.positionRanges[t].center=e.name,this.positionRanges[t].longitude=e.location.lng,this.positionRanges[t].latitude=e.location.lat)}selectAddressByKeyupEnter(t,e){let i=this.options.find(s=>s.name===e.target.value);i&&this.selectAddress(t,i)}changeCircle(t){var e;this.positionRanges[t].radius&&((e=this.circle)==null||e.setRadius(this.positionRanges[t].radius))}setDefaultRadius(t){this.positionRanges[t].radius||(this.positionRanges[t].radius=500)}addMarker(t,e,i,s=!0){var v,q;if(this.positionRanges.some((D,F)=>F!==t&&D.longitude===e&&D.latitude===i))return this.message.error(this.translate.instant("all.locationDuplicate")),!1;if((v=this.marker)==null||v.setMap(null),this.marker=null,(q=this.circle)==null||q.setMap(null),this.circle=null,this.marker=new AMap.Marker({position:[e,i],icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAApCAYAAAC/QpA/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANESURBVHgBxZi/b9NQEMfvbKeoEqAMLMCSIoFgaoNE6YQSscFAN+aOUALNH4CarCwhihALErDBRBjK2iAk1B8SpBuCoWVALJWICmopsX3cOU2atnHzzk3ar5Q8Oz47H92d7957CErVS2MpQLoFBCNEkECERPMan6/w+QogVIHwbSwzVwGF0MSInqfi7p/1B3w4xbfEwVABGEDFtjGPd+ZWutpDHyBCnpaLZRbyEAVm4+lYwvZoFmk7DAeVeIq9lA7zUkeYf0+ujKCPswf3RkfVyLLTA5Mfq9ANps8g+wLtgJHQOK7/uc8gLSDHwWR7yKz2q5IjhwQiinv8f1RIxffAcP2Y7mWymkjqlOusTzXPgzA1wkPLcDSqOe7gEGYrtcAzMY+mIaLw5GnAs5cBT12AiIo3vePIlw+QMirFTR07Adbw7eAjxy2t/QT/ywz4C89AJ5TCmsOg14AkrqHYE86NRwCnzofbMJRbvhuMCqA0h4nGFXd0BxExsH39IehE4wyDw6bm1sWb3UG2JHkU2Jtr2CKkhKk1XlI9XGUvUxFLU1vQ0Cvb9uZvmNQcCzRqf3OM7I+rzFUwpHo7WKtfVeacM8FszAxm+T1o5K9+M7aVuY7kTNX0Bn/pNWikKX4EDMPjd+M7pMJ+eGxkGoBowkqwJHWmDAr5S68aQGF/tPmbrxeitIRy0JLqpdFf6nkMV1nrDDfIc9cabxlD0I9P3JveBccqDF7iOPfnh5zGqVVkP+k6t4RsbQaAG+OBZWElGOTLcf+aJUKfZNch34LBbLXGQxGOQIj4ArONeXCr6DnuZo5DVYNDlORK0ys7YMQ7RHYeDlE+8LI3u7062DPBq5euvuFBNceJIgmPc29uov23Pb2JwzUhuwnQT5Bd4QmFkXB5Hqb7lj9ENZuf3x6eUBjRIBuSRb0HYhDyqCOIaN9FQU/X3VsgA9nF0MbcdYXSEyADEFHXydXA5GLVda1k1KQO+o5nJbuBGMGIJIcaSW0+92mQYCUsWTuag1K86MsZNtViLDM/BQqpYURuaXTcJyy073S2HshhIcQJ7U6nSLc62JKTWShL2Ajw5a5LRdsbTEYBEUXyTLs2CrwRafPGAU+oo0I09R/1nVtrEQKh8gAAAABJRU5ErkJggg==",offset:new AMap.Pixel(-15,-35),bubble:!0}),this.marker.setMap(this.map),this.circle=new AMap.Circle({center:[e,i],radius:this.positionRanges[t].radius,strokeColor:"#FB9337",strokeWeight:1,strokeOpacity:.25,fillColor:"#FB9337",fillOpacity:.25,zIndex:10,bubble:!0}),this.map.add(this.circle),this.map.setCenter([e,i]),this.map.getZoom()<15&&this.map.setZoom(15),this.positionRanges[t].longitude=e,this.positionRanges[t].latitude=i,s){let D=new AMap.Geocoder({}),F=[e,i];D.getAddress(F,(H,_e)=>{H==="complete"&&_e.info==="OK"&&(this.positionRanges[t].center=_e.regeocode.formattedAddress)})}}
1showMap(t,e){this.positionRanges.forEach(i=>{i.id!==e&&this.hideMap(i.id)}),this.previousClickedId!==e&&(this.previousClickedId=e,Tp.default.load({key:this.mapKey,plugins:["AMap.Map","AMap.Geolocation","AMap.Geocoder","AMap.PlaceSearch"],version:"2.0"}).then(i=>{let s=document.getElementById(`map-container-${e}`);s.style.height="240px",s.scrollIntoView({behavior:"smooth"}),this.map=new i.Map(`map-container-${e}`,{zoom:10});let f=new i.Geolocation({enableHighAccuracy:!0,showCircle:!1,showMarker:!1,offset:[10,20],zoomToAccuracy:!0,panToLocation:!0,position:"RB"});this.map.addControl(f),f.on("complete",v=>{this.addMarker(t,v.position.lng,v.position.lat)}),!this.positionRanges[t].longitude||!this.positionRanges[t].latitude?f.getCurrentPosition():this.addMarker(t,this.positionRanges[t].longitude,this.positionRanges[t].latitude),this.map.on("click",v=>{this.addMarker(t,v.lnglat.lng,v.lnglat.lat)})}).catch(i=>this.message.error(this.translate.instant("all.fillMapKey"))))}hideMap(t){var e,i,s,f,v;this.options=[],document.getElementById(`map-container-${t}`).style.height="0px",(s=(i=(e=document.querySelector(`map-container-${t} canvas.amap-layer`))==null?void 0:e.getContext("webgl"))==null?void 0:i.getExtension("WEBGL_lose_context"))==null||s.loseContext(),(f=this.map)==null||f.remove(this.map.getLayers(),this.map.getAllOverlays()),(v=this.map)==null||v.destroy(),this.map=null}constructor(t,e,i){this.message=t,this.cdr=e,this.translate=i,this.prePositionRanges=[],this.positionRanges=[],this.positionRangesLimit=20,this.options=[],this.previousClickedId=-1,this._rootStore=re(Yr),this.onInput=rl(s=>{new AMap.PlaceSearch().search(s.target.value,(v,q)=>{v==="complete"&&q.info==="OK"&&(this.options=q.poiList.pois,this.cdr.detectChanges())})},300)}ngOnInit(){this.prePositionRanges&&(this.positionRanges=this.prePositionRanges)}};a.\u0275fac=function(e){return new(e||a)(T(ye),T(He),T(X))},a.\u0275cmp=P({type:a,selectors:[["qf-location-limit-position"]],viewQuery:function(e,i){if(e&1&&qe(kd,5),e&2){let s;Te(s=Se())&&(i.inputs=s)}},inputs:{prePositionRanges:"prePositionRanges"},standalone:!0,features:[ht],decls:14,vars:21,consts:[["input",""],["auto",""],[1,"mt-16","flex","flex-col","gap-16"],[1,"flex","items-center","justify-between"],["qf-button","","qfIcon","ex-plus-circle","qfType","dashed","qf-tooltip","","qfTooltipPlacement","top",3,"click","qfTooltipTitle"],["qf-popconfirm","","qfPopconfirmPlacement","rightTop","qfOkType","danger",1,"delete-btn","flex","cursor-pointer","items-center","justify-center","rounded-small","px-8","py-[7px]","text-body-regular",2,"padding-top","7px","padding-bottom","7px",3,"qfOnConfirm","qfPopconfirmContent","qfCancelText","qfOkText","qfPopconfirmArrow","qfPopconfirmShowIcon"],["class","flex flex-col gap-8 rounded-medium bg-gray-40 px-16 py-8",4,"ngFor","ngForOf"],[4,"qfModalReminder"],[1,"flex","flex-col","gap-8","rounded-medium","bg-gray-40","px-16","py-8"],[1,"flex","w-full","items-center","gap-16"],[1,"flex","flex-1","items-center","gap-8"],[1,"whitespace-nowrap"],["nz-input","",3,"ngModelChange","focus","input","keyup.enter","placeholder","nzAutocomplete","nzStatus","ngModel"],[3,"nzValue"],[1,"flex","items-center","gap-8"],[3,"ngModelChange","nzBlur","nzPrecision","nzMin","ngModel"],[1,"delete-btn","flex","h-[28px]","w-[28px]","cursor-pointer","items-center","justify-center","rounded-small","text-[16px]",3,"click"],["qf-icon","","qfName","ex-delete"],[3,"id"],[3,"click","nzValue"]],template:function(e,i){e&1&&(p(0,"div",2)(1,"div",3)(2,"button",4),m(3,"translate"),y("click",function(){return i.addPositionRange()}),g(4),m(5,"translate"),c(),p(6,"div",5),m(7,"translate"),m(8,"translate"),m(9,"translate"),y("qfOnConfirm",function(){return i.clearPositionRange()}),g(10),m(11,"translate"),c()(),x(12,Ad,24,19,"div",6),c(),x(13,Fd,5,3,"ul",7)),e&2&&(r(2),l("qfTooltipTitle",i.positionRanges.length>=i.positionRangesLimit?u(3,9,"all.locationMaxLimit"):null),r(2),M(" ",u(5,11,"all.add1")," "),r(2),l("qfPopconfirmContent",u(7,13,"all.confirmDeleteAllLocation"))("qfCancelText",u(8,15,"all.cancel"))("qfOkText",u(9,17,"all.confirm1"))("qfPopconfirmArrow",!1)("qfPopconfirmShowIcon",!1),r(4),M(" ",u(11,19,"all.clear")," "),r(2),l("ngForOf",i.positionRanges))},dependencies:[si,B,It,le,V,Q,Wt,k,ci,K,Tl,Io,bn,os,Xt,cn,ce,Rs,Fs,Ll,bi,ns,is,ks,Ds,Os,Ps],styles:[".delete-btn[_ngcontent-%COMP%]:hover{background-color:#ffc7c0;color:#fb4b51}"]}
1);let n=a;return n})();var Rd=()=>[7,"wsize"];function Nd(n,a){if(n&1&&b(0,"qf-title-and-hint",25),n&2){let o=d(2);l("que",o.que)}}function Bd(n,a){if(n&1&&b(0,"qf-member-scope",26),n&2){let o=d(2);l("data",o.que)}}function Ld(n,a){if(n&1&&b(0,"qf-department-scope",26),n&2){let o=d(2);l("data",o.que)}}function zd(n,a){if(n&1){let o=S();p(0,"div",27)(1,"span",28),g(2),m(3,"translate"),c(),b(4,"qf-hint-msg",29),m(5,"translate"),b(6,"br"),p(7,"nz-input-number",30),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.fileSize,e)||(i.que.fileSize=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.widgetChange.fileSettingChange.emit("size"))}),c(),p(8,"span",31),g(9,"MB"),c()()}if(n&2){let o=d(2);r(2),M(" ",u(3,6,"widgets.maxfileSize")," "),r(2),l("hintMsg",u(5,8,"widgetHelp.limitFileSize")),r(3),l("nzMin",1)("nzMax",o.isPrivateCloud?o.Infinity:500)("nzStep",1),I("ngModel",o.que.fileSize)}}function Wd(n,a){if(n&1){let o=S();p(0,"div",32)(1,"p",33)(2,"span"),g(3),m(4,"translate"),c(),b(5,"br"),p(6,"span",34),g(7),m(8,"translate"),c()(),p(9,"qf-select",35),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.dateType,e)||(i.que.dateType=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.dateTypeChange())}),p(10,"qf-option",36),m(11,"translate"),p(12,"div",37),m(13,"translate"),g(14),m(15,"translate"),c()(),p(16,"qf-option",36),m(17,"translate"),p(18,"div",37),m(19,"translate"),g(20),m(21,"translate"),c()(),p(22,"qf-option",36),m(23,"translate"),p(24,"div",37),m(25,"translate"),g(26),m(27,"translate"),c()(),p(28,"qf-option",36),m(29,"translate"),p(30,"div",37),m(31,"translate"),g(32),m(33,"translate"),c()(),p(34,"qf-option",36),m(35,"translate"),p(36,"div",37),m(37,"translate"),g(38),m(39,"translate"),c()()()()}if(n&2){let o=d(2);r(3),w(u(4,23,"all.numberFormat")),r(4),w(u(8,25,"all.mobileOnlySupport")),r(2),I("ngModel",o.que.dateType),r(),l("qfLabel",u(11,27,"all.year"))("qfValue",o.DateType.Y),r(2),l("title",u(13,29,"all.year")),r(2),M(" ",u(15,31,"all.year")," "),r(2),l("qfLabel",u(17,33,"all.yearMonth1"))("qfValue",o.DateType.YM),r(2),l("title",u(19,35,"all.yearMonth1")),r(2),M(" ",u(21,37,"all.yearMonth1")," "),r(2),l("qfLabel",u(23,39,"all.yearMonthDay"))("qfValue",o.DateType.YMD),r(2),l("title",u(25,41,"all.yearMonthDay")),r(2),M(" ",u(27,43,"all.yearMonthDay")," "),r(2),l("qfLabel",u(29,45,"all.yearMonthDayHourMinute"))("qfValue",o.DateType.YMD_HM),r(2),l("title",u(31,47,"all.yearMonthDayHourMinute")),r(2),M(" ",u(33,49,"all.yearMonthDayHourMinute")," "),r(2),l("qfLabel",u(35,51,"all.yearMonthDayHourMinuteSecond"))("qfValue",o.DateType.YMD_HMS),r(2),l("title",u(37,53,"all.yearMonthDayHourMinuteSecond")),r(2),M(" ",u(39,55,"all.yearMonthDayHourMinuteSecond")," ")}}function Hd(n,a){if(n&1){let o=S();p(0,"qf-table-edit",38),y("addSubQue",function(e){_(o);let i=d(2);return C(i.handleAddSubQue(e))})("editSubQue",function(e){_(o);let i=d(2);return C(i.editTableSubQue(e))}),c()}if(n&2){let o=d(2);l("data",o.que)}}function jd(n,a){if(n&1){let o=S();p(0,"qf-quote-source",39),y("defaultValChange",function(e){_(o);let i=d(2);return C(i.defaultValChange.emit(e))}),c()}if(n&2){let o=d(2);l("editQue",o.que)}}function Ud(n,a){if(n&1&&b(0,"qf-address-precision-setting",26),n&2){let o=d(2);l("data",o.que)}}function Kd(n,a){if(n&1){let o=S();p(0,"qf-option-content",40),y("handleOption",function(){_(o);let e=d(2);return C(e.handleOtherOption())}),c()}if(n&2){let o=d(2);l("data",o.que)("selectType",o.widgetConfig.queType===10)}}function Gd(n,a){if(n&1){let o=S();p(0,"qf-multi-option-content",41),y("handleOption",function(){_(o);let e=d(2);return C(e.handleOtherOption())}),c()}if(n&2){let o=d(2);l("data",o.que)}}function $d(n,a){if(n&1){let o=S();p(0,"qf-image-option-content",42),y("defaultValChange",function(e){_(o);let i=d(2);return C(i.defaultValChange.emit(e))}),c()}if(n&2){let o=d(2);l("data",o.que)}}function Xd(n,a){if(n&1){let o=S();p(0,"qf-dft-val-edit",42),y("defaultValChange",function(e){_(o);let i=d(2);return C(i.defaultValChange.emit(e))}),c()}if(n&2){let o=d(2);l("data",o.que)}}function Yd(n,a){if(n&1){let o=S();p(0,"qf-ocr-template-select",42),y("defaultValChange",function(e){_(o);let i=d(2);return C(i.defaultValChange.emit(e))}),c()}if(n&2){let o=d(2);l("data",o.que)}}function Jd(n,a){if(n&1&&b(0,"qf-option",51),n&2){let o=a.$implicit;l("qfLabel",o.queTitle)("qfValue",o.queId||o.queTempId)}}function Zd(n,a){if(n&1){let o=S();p(0,"qf-select",49),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.que.tableNoRepeatQuestion,e)||(i.que.tableNoRepeatQuestion=e),C(e)}),x(2,Jd,1,2,"qf-option",50),c()}if(n&2){let o=d(3);l("qfPlaceHolder",u(1,3,"all.select")),I("ngModel",o.que.tableNoRepeatQuestion),r(2),l("ngForOf",o.que.subQuestions)}}function em(n,a){if(n&1){let o=S();p(0,"div",27)(1,"div",33)(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",43),m(6,"translate"),c(),p(7,"input",44),m(8,"translate"),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.tableCustomButtonText,e)||(i.que.tableCustomButtonText=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.changeTableCustomBtn())}),c(),p(9,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.tableNoRepeatStatus,e)||(i.que.tableNoRepeatStatus=e),C(e)}),p(10,"span"),g(11),m(12,"translate"),c()(),p(13,"div",46)(14,"p",47),g(15),m(16,"translate"),c(),x(17,Zd,3,5,"qf-select",48),c()()}if(n&2){let o=d(2);r(3),w(u(4,8,"widgetHelp.quoteButtonText")),r(2),l("hintMsg",u(6,10,"widgetHelp.setTheTextOfTheAddNewRowButton")),r(2),l("placeholder",u(8,12,"widgetHelp.pleaseInputButtonText")),I("ngModel",o.que.tableCustomButtonText),r(2),I("ngModel",o.que.tableNoRepeatStatus),r(2),w(u(12,14,"all.
1noRepeat")),r(4),M(" ",u(16,16,"all.noRepeatHint")," "),r(2),l("ngIf",o.que.tableNoRepeatStatus)}}function tm(n,a){if(n&1&&b(0,"qf-option-select-mode",26),n&2){let o=d(2);l("data",o.que)}}function im(n,a){if(n&1&&b(0,"qf-option-rank-way",26),n&2){let o=d(2);l("data",o.que)}}function nm(n,a){if(n&1&&b(0,"qf-qlinker-edit",26),n&2){let o=d(2);l("data",o.que)}}function om(n,a){if(n&1){let o=S();p(0,"qf-codeblock-edit",52),y("dataChange",function(){_(o);let e=d(2);return C(e.widgetChange.changed.emit())}),c()}if(n&2){let o=d(2);l("data",o.que)}}function am(n,a){if(n&1&&b(0,"qf-set-associate-data",53),n&2){let o=d(2);l("editQue",o.que)}}function rm(n,a){n&1&&b(0,"qf-filter-and-aggre")}function lm(n,a){if(n&1){let o=S();p(0,"qf-sqbque-width",54),y("changeSubQueWidth",function(e){_(o);let i=d(2);return C(i.onChangeSubQueWidth(e))}),c()}if(n&2){let o=d(2);l("question",o.que)("subQueWidth",o.que.subQueWidth)}}function sm(n,a){if(n&1){let o=S();p(0,"qf-percent-bar",55),y("activeItemChange",function(e){_(o);let i=d(2);return C(i.widthChange(e))}),c()}if(n&2){let o=d(2);l("activeItem",o.que.queWidth)}}function pm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"p",33)(2,"span"),g(3),m(4,"translate"),c()(),p(5,"qf-select",56),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.defaultLocation,e)||(i.que.defaultLocation=e),C(e)}),b(6,"qf-option",57),m(7,"translate"),b(8,"qf-option",57),m(9,"translate"),c()()}if(n&2){let o=d(2);r(3),w(u(4,6,"all.defaultContent")),r(2),I("ngModel",o.que.defaultLocation),r(),l("qfValue",o.DEFAULT_LOCATION.AUTO)("qfLabel",u(7,8,"all.autoLocation")),r(2),l("qfValue",o.DEFAULT_LOCATION.NONE)("qfLabel",u(9,10,"all.null"))}}function cm(n,a){if(n&1){let o=S();p(0,"label",59),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.otherInfoRequired,e)||(i.otherInfoRequired=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.otherOptionRequiredChange())}),p(1,"span"),g(2),m(3,"translate"),c()()}if(n&2){let o=d(3);I("ngModel",o.otherInfoRequired),r(2),w(u(3,2,"widgets.otherInfoRequired"))}}function dm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.required,e)||(i.que.required=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.requiredChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),x(7,cm,4,4,"label",58),c()}if(n&2){let o=d(2);be("location-postion",o.widgetConfig.pickPosition),r(),I("ngModel",o.que.required),r(2),w(u(4,6,"widgets.required")),r(2),l("hintMsg",u(6,8,"widgetHelp.required")),r(2),l("ngIf",o.otherInfoRequiredVisiable)}}function mm(n,a){if(n&1){let o=S();p(0,"qf-radio-group",63),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.que.scanType,e)||(i.que.scanType=e),C(e)}),p(1,"label",64),g(2),m(3,"translate"),c(),p(4,"label",64),g(5),m(6,"translate"),c()()}if(n&2){let o=d(3);I("ngModel",o.que.scanType),r(),l("qfValue",1),r(),w(u(3,5,"widgets.qrCode")),r(2),l("qfValue",2),r(),M(" ",u(6,7,"widgets.barCode")," ")}}function um(n,a){if(n&1){let o=S();p(0,"div",60)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.canScan,e)||(i.que.canScan=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.canScanChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",61),m(6,"translate"),b(7,"br"),x(8,mm,7,9,"qf-radio-group",62),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.canScan),r(2),w(u(4,5,"widgets.canScan")),r(2),l("qfPendant",Y(9,Rd))("hintMsg",u(6,7,"widgetHelp.canScan")),r(3),l("ngIf",o.que.canScan)}}function fm(n,a){n&1&&b(0,"qf-set-associate-sort")}function gm(n,a){if(n&1&&b(0,"qf-number-format",26),n&2){let o=d(2);l("data",o.que)}}function hm(n,a){n&1&&b(0,"qf-fe-aggre")}function _m(n,a){if(n&1&&b(0,"qf-que-custom-btn-setting",65),n&2){let o=d(2);l("editQue",o.que)}}function Cm(n,a){if(n&1&&b(0,"qf-que-file-being-capture",25),n&2){let o=d(2);l("que",o.que)}}function ym(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.pickPosition,e)||(i.que.pickPosition=e),C(e)}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.pickPosition),r(2),w(u(4,3,"widgets.pickPosition")),r(2),l("hintMsg",u(6,5,"widgetHelp.pickPosition"))}}function vm(n,a){if(n&1){let o=S();p(0,"div",46)(1,"button",67),y("click",function(){_(o);let e=d(3);return C(e.openLimitPositionModal())}),g(2),m(3,"translate"),c()()}n&2&&(r(2),M(" ",u(3,1,"all.editLimitPosition")," "))}function xm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.limitPosition,e)||(i.que.limitPosition=e),C(e)}),p(2,"span"),g(3),m(4,"translate"),c()(),x(5,vm,4,3,"div",66),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.limitPosition),r(2),w(u(4,3,"all.limitPosition")),r(2),l("ngIf",o.que.limitPosition)}}function bm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.showCoordinates,e)||(i.que.showCoordinates=e),C(e)}),p(2,"span"),g(3),m(4,"translate"),c()()()}if(n&2){let o=d(2);r(),I("ngModel",o.que.showCoordinates),r(2),w(u(4,2,"all.showCoordinates"))}}function Tm(n,a){if(n&1&&b(0,"qf-image-compress",25),n&2){let o=d(2);l("que",o.que)}}function Sm(n,a){if(n&1&&b(0,"qf-file-count-limit",25),n&2){let o=d(2);l("que",o.que)}}function wm(n,a){if(n&1&&b(0,"qf-file-size-limit",26),n&2){let o=d(2);l("data",o.que)}}function Mm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",68),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.referenceConfig.beingTableSource,e)||(i.que.referenceConfig.beingTableSource=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.widgetChange.changed.emit())}),p(3,"span"),g(4),m(5,"translate"),c()(),b(6,"qf-hint-msg",29),m(7,"translate"),c()}if(n&2){let o=d(2);r(),l("nzTooltipTitle",u(2,5,o.quoteTableSourceDisabledTip))("qfDisabled",o.quoteTableSourceDisabled),I("ngModel",o.que.referenceConfig.beingTableSource),r(3),w(u(5,7,"widgetHelp.quoteTableSource")),r(2),l("hintMsg",u(7,9,"widgetHelp.quoteTableSourceHint"))}}function qm(n,a){if(n&1&&b(0,"qf-quote-allow-add",69),n&2){let o=d(2);l("data",o.que)}}function Im(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.noRepeat,e)||(i.que.noRepeat=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.widgetChange.changed.emit())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.noRepeat),r(2),w(u(4,3,"widgets.noRepeat")),r(2),l("hintMsg",u(6,5,"widgetHelp.noRepeat"))}}function Em(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.fixedPhone,e)||(i.que.fixedPhone=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.fixedPhoneChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.fixedPhone),r(2),w(u(4,3,"all.fixedPhone")),r(2),l("hintMsg",u(6,5,"all.fixedPhoneHint"))}}
1function Om(n,a){if(n&1&&b(0,"qf-number-ranger",70),n&2){let o=d(2);l("data",o.que)}}function Pm(n,a){if(n&1&&b(0,"qf-number-ranger",71),n&2){let o=d(2);l("data",o.que)}}function Dm(n,a){if(n&1&&b(0,"qf-decimal-limit",26),n&2){let o=d(2);l("data",o.que)}}function km(n,a){if(n&1&&b(0,"qf-number-value-limit",26),n&2){let o=d(2);l("data",o.que)}}function Vm(n,a){if(n&1&&b(0,"qf-currency-format",26),n&2){let o=d(2);l("data",o.que)}}function Qm(n,a){if(n&1&&b(0,"qf-sms-verification",26),n&2){let o=d(2);l("data",o.que)}}function Am(n,a){if(n&1&&b(0,"qf-custom-btn-text",26),n&2){let o=d(2);l("data",o.que)}}function Fm(n,a){if(n&1){let o=S();p(0,"label",73),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.que.remoteLookupConfig.beingHideOnForm,e)||(i.que.remoteLookupConfig.beingHideOnForm=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.widgetChange.changed.emit())}),g(1),m(2,"translate"),c()}if(n&2){let o=d(3);I("ngModel",o.que.remoteLookupConfig.beingHideOnForm),r(),M(" ",u(2,2,"all.automaticTriggerHidden")," ")}}function Rm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.autoTrigger,e)||(i.que.autoTrigger=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.qLinkerAutomaticTriggerChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),x(7,Fm,3,4,"label",72),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.autoTrigger),r(2),w(u(4,4,"all.automaticTrigger")),r(2),l("hintMsg",u(6,6,"all.automaticTriggerTip")),r(2),l("ngIf",o.que.autoTrigger)}}function Nm(n,a){if(n&1){let o=S();p(0,"label",73),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.que.codeBlockConfig.beingHideOnForm,e)||(i.que.codeBlockConfig.beingHideOnForm=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.widgetChange.changed.emit())}),g(1),m(2,"translate"),c()}if(n&2){let o=d(3);I("ngModel",o.que.codeBlockConfig.beingHideOnForm),r(),M(" ",u(2,2,"all.automaticTriggerHidden")," ")}}function Bm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.autoTrigger,e)||(i.que.autoTrigger=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.codeBlockAutomaticTriggerHiddenChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),x(7,Nm,3,4,"label",72),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.autoTrigger),r(2),w(u(4,4,"all.automaticTrigger")),r(2),l("hintMsg",u(6,6,"all.automaticTriggerTip")),r(2),l("ngIf",o.que.autoTrigger)}}function Lm(n,a){if(n&1&&(j(0),p(1,"div",27),b(2,"qf-view-process-logs",26),c(),p(3,"div",27),b(4,"qf-enable-data-record",26),c(),U()),n&2){let o=d(2);r(2),l("data",o.que),r(2),l("data",o.que)}}function zm(n,a){if(n&1){let o=S();p(0,"div",27)(1,"label",45),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.que.beingHide,e)||(i.que.beingHide=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.beingHideChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",29),m(6,"translate"),c()}if(n&2){let o=d(2);r(),I("ngModel",o.que.beingHide),r(2),w(u(4,3,"all.beingHide")),r(2),l("hintMsg",u(6,5,"widgetHelp.beingHideTip"))}}function Wm(n,a){if(n&1&&(p(0,"div",27),b(1,"qf-desensitized-edit",25),c()),n&2){let o=d(2);r(),l("que",o.que)}}function Hm(n,a){if(n&1&&b(0,"qf-embed-config",74),n&2){let o=d(2);l("currentQuestion",o.que)}}function jm(n,a){if(n&1&&b(0,"qf-online-editing",25),n&2){let o=d(2);l("que",o.que)}}function Um(n,a){if(n&1){let o=S();p(0,"div",1)(1,"qf-widget-header",2),y("returnTableEdit",function(){_(o);let e=d();return C(e.returnTableEdit())})("queTypeChanged",function(e){_(o);let i=d();return C(i.queChanged(e))}),c(),p(2,"qf-function-lock",3),x(3,Nd,1,1,"qf-title-and-hint",4)(4,Bd,1,1,"qf-member-scope",5)(5,Ld,1,1,"qf-department-scope",5)(6,zd,10,10,"div",6)(7,Wd,40,57,"div",7)(8,Hd,1,1,"qf-table-edit",8)(9,jd,1,1,"qf-quote-source",9)(10,Ud,1,1,"qf-address-precision-setting",5)(11,Kd,1,2,"qf-option-content",10)(12,Gd,1,1,"qf-multi-option-content",11)(13,$d,1,1,"qf-image-option-content",12)(14,Xd,1,1,"qf-dft-val-edit",12)(15,Yd,1,1,"qf-ocr-template-select",12)(16,em,18,18,"div",6)(17,tm,1,1,"qf-option-select-mode",5)(18,im,1,1,"qf-option-rank-way",5)(19,nm,1,1,"qf-qlinker-edit",5)(20,om,1,1,"qf-codeblock-edit",13)(21,am,1,1,"qf-set-associate-data",14)(22,rm,1,0,"qf-filter-and-aggre",15)(23,lm,1,2,"qf-sqbque-width",16)(24,sm,1,1,"qf-percent-bar",17)(25,pm,10,12,"div",6)(26,dm,8,10,"div",18)(27,um,9,10,"div",19)(28,fm,1,0,"qf-set-associate-sort",15)(29,gm,1,1,"qf-number-format",5)(30,hm,1,0,"qf-fe-aggre",15)(31,_m,1,1,"qf-que-custom-btn-setting",20)(32,Cm,1,1,"qf-que-file-being-capture",4)(33,ym,7,7,"div",6)(34,xm,6,5,"div",6)(35,bm,5,4,"div",6)(36,Tm,1,1,"qf-image-compress",4)(37,Sm,1,1,"qf-file-count-limit",4)(38,wm,1,1,"qf-file-size-limit",5)(39,Mm,8,11,"div",6)(40,qm,1,1,"qf-quote-allow-add",21)(41,Im,7,7,"div",6)(42,Em,7,7,"div",6)(43,Om,1,1,"qf-number-ranger",22)(44,Pm,1,1,"qf-number-ranger",23)(45,Dm,1,1,"qf-decimal-limit",5)(46,km,1,1,"qf-number-value-limit",5)(47,Vm,1,1,"qf-currency-format",5)(48,Qm,1,1,"qf-sms-verification",5)(49,Am,1,1,"qf-custom-btn-text",5)(50,Rm,8,8,"div",6)(51,Bm,8,8,"div",6)(52,Lm,5,2,"ng-container",15)(53,zm,7,7,"div",6)(54,Wm,2,1,"div",6)(55,Hm,1,1,"qf-embed-config",24)(56,jm,1,1,"qf-online-editing",4),c()()}if(n&2){let o=d();r(),l("que",o.que)("widgetConfig",o.widgetConfig),r(),l("unlocked",o.queLimitUnlock)("currentQueType",o.que.queType),r(),l("ngIf",o.widgetConfig.title),r(),l("ngIf",o.que.queType===o.QueType.MEMBER),r(),l("ngIf",o.que.queType===o.QueType.DEPARTMENT),r(),l("ngIf",o.widgetConfig.fileSizeLimit),r(),l("ngIf",o.widgetConfig.precise),r(),l("ngIf",o.widgetConfig.tableEdit),r(),l("ngIf",o.widgetConfig.quoteApp),r(),l("ngIf",o.widgetConfig.addressPrecision),r(),l("ngIf",o.widgetConfig.singleSelect),r(),l("ngIf",o.widgetConfig.multipleSelect),r(),l("ngIf",o.widgetConfig.imageSelect),r(),l("ngIf",o.widgetConfig.default),r(),l("ngIf",o.widgetConfig.ocrTemplateSelect),r(),l("ngIf",o.widgetConfig.tableRepeat),r(),l("ngIf",o.widgetConfig.optSelectMode),r(),l("ngIf",o.isS
1howRankWay()),r(),l("ngIf",o.widgetConfig.remoteLookupConfig),r(),l("ngIf",o.widgetConfig.codeBlockConfig),r(),l("ngIf",o.widgetConfig.dataAsos),r(),l("ngIf",o.widgetConfig.dataAsos),r(),l("ngIf",!o.beingNil(o.que.supId)),r(),l("ngIf",o.widgetConfig.percent&&o.beingNil(o.que.supId)),r(),l("ngIf",o.widgetConfig.defaultLocation),r(),l("ngIf",o.widgetConfig.required),r(),l("ngIf",o.widgetConfig.canScan),r(),l("ngIf",o.widgetConfig.dataAsos),r(),l("ngIf",o.widgetConfig.displayFormat),r(),l("ngIf",o.widgetConfig.dataAsos),r(),l("ngIf",o.widgetConfig.dataAsos),r(),l("ngIf",o.widgetConfig.fileBeingCaptureOnly),r(),l("ngIf",o.widgetConfig.pickPosition),r(),l("ngIf",o.widgetConfig.limitPosition),r(),l("ngIf",o.widgetConfig.showCoordinates),r(),l("ngIf",o.widgetConfig.imageCompress),r(),l("ngIf",o.widgetConfig.fileCountLimit),r(),l("ngIf",o.widgetConfig.fileConfig),r(),l("ngIf",o.que.supId&&o.que.queType===o.QueType.REFER),r(),l("ngIf",o.widgetConfig.quoteAddBtnText),r(),l("ngIf",o.widgetConfig.noRepeat),r(),l("ngIf",o.widgetConfig.fixedPhone),r(),l("ngIf",o.widgetConfig.wordCount),r(),l("ngIf",o.widgetConfig.choiceNumber&&o.beingNil(o.que.supId)),r(),l("ngIf",o.widgetConfig.decimal),r(),l("ngIf",o.widgetConfig.valueLimit),r(),l("ngIf",o.widgetConfig.displayFormat),r(),l("ngIf",!o.que.fixedPhone&&o.widgetConfig.smsVerification),r(),l("ngIf",o.widgetConfig.customBtnText),r(),l("ngIf",o.widgetConfig.queType===o.QueType.QLINKER),r(),l("ngIf",o.widgetConfig.queType===o.QueType.CODEBLOCK),r(),l("ngIf",o.widgetConfig.queType===o.QueType.REFER),r(),l("ngIf",o.canBeingHide()),r(),l("ngIf",o.beingDesensitized),r(),l("ngIf",o.widgetConfig.queType===o.QueType.EMBED),r(),l("ngIf",o.widgetConfig.beingAllowWpsOnlineEditing&&!o.isPrivateCloud)}}var Gi=(()=>{let a=class a{set que(t){this.queChanged(t)}get que(){return this._que}get beingDesensitized(){return[h.INPUT,h.ENCRYPTED_TEXT,h.TEXTAREA,h.NUMBER,h.PHONE,h.EMAIL,h.ADDRESS,h.LINK,h.DATE,h.DATA_RELATION].includes(this.widgetConfig.queType)}editTableSubQue(t){this.formEditService.setActiveQueByKey(t.queTempId),this.activate.emit(t)}handleAddSubQue(t){this.addSubQue.emit(t),this.widgetChange.syncForm$.emit({type:"subQuestion",question:this.que})}queChanged(t){t&&!(t instanceof UIEvent)&&(this._que=t,this.widgetConfig=this.widgetConfigs.get(t.queType),this.currentEditSrv.editQue=t,setTimeout(()=>{this.currentEditSrv.editQueChange.emit()}),t.scanType=t.scanType||1,t.queType===h.REFER?this.setQuoteTableSourceState():t.queType===h.CODEBLOCK&&(ie(t.autoTrigger)&&(t.autoTrigger=!1),ie(t.codeBlockConfig)&&(t.codeBlockConfig={configMode:1,codeContent:"",resultAliasPath:[],beingHideOnForm:!1}),ie(t.customBtnTextStatus)&&(t.customBtnTextStatus=!1)),this.queLimitUnlock=![h.LOCATION,h.DATA_RELATION,h.REFER,h.OCR,h.CODEBLOCK,h.QLINKER].includes(t.queType),this._que.queType===h.RICHTEXT&&this.defaultValChange.emit(t),this.handleOtherOption())}setQuoteTableSourceState(){if(this.que.supId){let t=this.formEditService.findQuestionByTempId(this.que.supId);this.quoteTableSourceDisabled=t.subQuestions.some(e=>(this.que.queId?e.queId!==this.que.queId:e.queTempId!==this.que.queTempId)&&e.queType===h.REFER&&e.referenceConfig.beingTableSource),this.quoteTableSourceDisabledTip=this.quoteTableSourceDisabled?"widgetHelp.quoteTableSourceSetErrorHint":null}else this.quoteTableSourceDisabled=!1,this.quoteTableSourceDisabledTip=null}widthChange(t){this.que.queWidth=t,this.widgetChange.syncForm$.emit({type:"queWidth",question:this.que})}returnTableEdit(){let t=this.formEditService.findQuestionByTempId(this.que.supId);this.activate.emit(t)}requiredChange(){this.otherOptionRequiredChange(),this.handleOtherOption(),this.widgetChange.changed.emit(),this.widgetChange.syncForm$.emit({type:"required",question:this.que})}handleOtherOption(){var t,e,i;if([h.CHECKBOX,h.RADIO,h.SELECT].includes(this._que.queType)){let s=(t=this._que.options.some(f=>f==null?void 0:f.beingOtherOpt))!=null?t:!1;this.otherInfoRequiredVisiable=s&&this.que.required,this.otherInfoRequired=(i=(e=this._que.options.find(f=>f==null?void 0:f.beingOtherOpt))==null?void 0:e.beingRequired)!=null?i:!1}else this.otherInfoRequiredVisiable=!1,this.otherInfoRequired=!1}otherOptionRequiredChange(){var t;[h.CHECKBOX,h.RADIO,h.SELECT].includes(this._que.queType)&&((t=this._que.o
1ptions.some(i=>i==null?void 0:i.beingOtherOpt))!=null&&t&&(this._que.options.find(i=>i.beingOtherOpt).beingRequired=this.otherInfoRequired&&this._que.required),this.activate.emit(this.que))}canScanChange(){this._rootStore.workspaceInfo().openPluginList.includes(Hr.SCAN_INPUT)?this.widgetChange.changed.emit():setTimeout(()=>{this.que.canScan=!1},0)}dateTypeChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.next({type:"dateType",question:this.que}),this.widgetChange.dataTypeChanged.emit(!0)}onChangeSubQueWidth(t){this.que.subQueWidth=t,this.widgetChange.syncForm$.emit({type:"subQueWidth",question:this.que})}fixedPhoneChange(){this.que.msgValidateStatus=!1,this.widgetChange.changed.emit()}changeTableCustomBtn(){this.widgetChange.changed.emit(),this.widgetChange.syncForm$.emit({type:"tableCustomButtonText",question:this.que})}isShowRankWay(){return this.widgetConfig.direction&&ie(this.que.supId)&&(this.que.queType!==h.CHECKBOX||this.que.optSelectMode===Gr.checkbox)}qLinkerAutomaticTriggerChange(){this.que.remoteLookupConfig.beingHideOnForm=!1,this.widgetChange.changed.emit()}codeBlockAutomaticTriggerHiddenChange(){this.que.codeBlockConfig.beingHideOnForm=!1,this.widgetChange.changed.emit()}canBeingHide(){let t=this.widgetConfig.queType;return![h.SECTION,h.DESCRIPTION,h.OCR,h.CODEBLOCK,h.QLINKER].includes(t)}beingHideChange(){this.widgetChange.changed.emit(),this.widgetChange.syncForm$.emit({type:"beingHide",question:this.que})}beingDesensitizedChange(){this.widgetChange.changed.emit()}openLimitPositionModal(){this.modalService.open({size:"large",title:this.translate.instant("all.markerRange"),content:Sp,componentParams:{prePositionRanges:this.que.positionRanges},onOk:t=>{if(t.positionRanges.some(e=>!e.center||!e.latitude||!e.longitude||!e.radius))return this.message.error(this.translate.instant("all.limitPositionError")),!1;this.que.positionRanges=t.positionRanges}})}constructor(t,e,i,s,f,v,q){this.formEditService=t,this.widgetChange=e,this.currentEditSrv=i,this.envService=s,this.modalService=f,this.translate=v,this.message=q,this._rootStore=re(Ct),this.DateType=Wr,this.QueType=h,this.queLimitUnlock=!1,this.Infinity=Number.MAX_SAFE_INTEGER,this.otherInfoRequired=!1,this.otherInfoRequiredVisiable=!1,this.activate=new R,this.defaultValChange=new R,this.addSubQue=new R,this.widgetConfigs=sn,this.beingNil=ie,this.quoteTableSourceDisabled=!1,this.quoteTableSourceDisabledTip=null,this.DEFAULT_LOCATION=Ur}ngOnInit(){this.isPrivateCloud=ho(this.envService.version)}};a.\u0275fac=function(e){return new(e||a)(T($e),T(N),T(ke),T(pi),T(Pe),T(X),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-edit-area"]],inputs:{que:"que",formStyle:"formStyle",formTheme:"formTheme"},outputs:{activate:"activate",defaultValChange:"defaultValChange",addSubQue:"addSubQue"},features:[et([ke])],decls:1,vars:1,consts:[["class","edit-area",4,"ngIf"],[1,"edit-area"],[3,"returnTableEdit","queTypeChanged","que","widgetConfig"],[3,"unlocked","currentQueType"],[3,"que",4,"ngIf"],[3,"data",4,"ngIf"],["class","widget-edit",4,"ngIf"],["class","widget-edit concret-time",4,"ngIf"],[3,"data","addSubQue","editSubQue",4,"ngIf"],[3,"editQue","defaultValChange",4,"ngIf"],[3,"data","selectType","handleOption",4,"ngIf"],[3,"data","handleOption",4,"ngIf"],[3,"data","defaultValChange",4,"ngIf"],[3,"data","dataChange",4,"ngIf"],[3,"editQue",4,"ngIf"],[4,"ngIf"],[3,"question","subQueWidth","changeSubQueWidth",4,"ngIf"],[3,"activeItem","activeItem
1Change",4,"ngIf"],["class","widget-edit",3,"location-postion",4,"ngIf"],["qfPendantItem","","class","widget-edit",4,"ngIf"],["qfPluginStatus","customButton",3,"editQue",4,"ngIf"],["class","widget-edit",3,"data",4,"ngIf"],["title","widgets.textAreaLimitLength","titleHint","widgets.textAreaLimitLengthHint",3,"data",4,"ngIf"],["title","widgets.choiceLimit","titleHint","widgets.choiceLimitHint",3,"data",4,"ngIf"],[3,"currentQuestion",4,"ngIf"],[3,"que"],[3,"data"],[1,"widget-edit"],[2,"margin-right","8px"],[3,"hintMsg"],[2,"margin-top","8px","width","calc(100% - 32px)",3,"ngModelChange","nzMin","nzMax","nzStep","ngModel"],[2,"margin-left","8px"],[1,"widget-edit","concret-time"],[1,"widget-edit-title"],[1,"hint"],[1,"select-mode",3,"ngModelChange","ngModel"],["qfCustomContent","",3,"qfLabel","qfValue"],[3,"title"],[3,"addSubQue","editSubQue","data"],[3,"defaultValChange","editQue"],[3,"handleOption","data","selectType"],[3,"handleOption","data"],[3,"defaultValChange","data"],[2,"margin-left","0px",3,"hintMsg"],["qf-input","","maxlength","100",1,"table-custom-btn-input",3,"ngModelChange","placeholder","ngModel"],["qf-checkbox","",3,"ngModelChange","ngModel"],[1,"widget-edit-detail"],[1,"qfont-gray-frequent","table-row-repeat-hint"],["qfAllowClear","","style","width: 100%","qfMode","multiple",3,"qfPlaceHolder","ngModel","ngModelChange",4,"ngIf"],["qfAllowClear","","qfMode","multiple",2,"width","100%",3,"ngModelChange","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"],[3,"dataChange","data"],[3,"editQue"],[3,"changeSubQueWidth","question","subQueWidth"],[3,"activeItem
1Change","activeItem"],[1,"w-full",3,"ngModelChange","ngModel"],[3,"qfValue","qfLabel"],["qf-checkbox","","class","widget-edit-other-option-required",3,"ngModel","ngModelChange",4,"ngIf"],["qf-checkbox","",1,"widget-edit-other-option-required",3,"ngModelChange","ngModel"],["qfPendantItem","",1,"widget-edit"],[3,"qfPendant","hintMsg"],["class","widget-edit-detail",3,"ngModel","ngModelChange",4,"ngIf"],[1,"widget-edit-detail",3,"ngModelChange","ngModel"],["qf-radio","",3,"qfValue"],["qfPluginStatus","customButton",3,"editQue"],["class","widget-edit-detail",4,"ngIf"],["qf-button","","qfIcon","ex-edit","qfType","dashed",1,"w-full",3,"click"],["qf-checkbox","","nz-tooltip","",3,"ngModelChange","nzTooltipTitle","qfDisabled","ngModel"],[1,"widget-edit",3,"data"],["title","widgets.textAreaLimitLength","titleHint","widgets.textAreaLimitLengthHint",3,"data"],["title","widgets.choiceLimit","titleHint","widgets.choiceLimitHint",3,"data"],["qf-checkbox","","class","widget-edit-detail",3,"ngModel","ngModelChange",4,"ngIf"],["qf-checkbox","",1,"widget-edit-detail",3,"ngModelChange","ngModel"],[3,"currentQuestion"]],template:function(e,i){e&1&&x(0,Um,57,58,"div",0),e&2&&l("ngIf",i.que)},styles:[".ant-input-number:focus, .ant-input-number-focused{border-color:#fb9337;border-color:var(--brand-primary-base, #fb9337);box-shadow:0 0 0 1px #ffb578;box-shadow:0 0 0 1px var(--brand-primary-40, #ffb578)} .ant-input-number-handler:hover .ant-input-number-handler-down-inner{color:#fb9337;color:var(--brand-primary-base, #fb9337)} .ant-input-number-handler:hover .ant-input-number-handler-up-inner{color:#fb9337;color:var(--brand-primary-base, #fb9337)}qf-hint-msg[_ngcontent-%COMP%]{margin-left:-8px}.table-row-repeat-hint[_ngcontent-%COMP%]{margin-top:-4px}.widget-edit[_ngcontent-%COMP%]{margin:24px 0}.widget-edit.concret-time[_ngcontent-%COMP%]{display:flex;flex-direction:column}.widget-edit.concret-time[_ngcontent-%COMP%] .select-mode[_ngcontent-%COMP%]{width:100%;margin:0 0 4px}.widget-edit[_ngcontent-%COMP%] .widget-edit-detail[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:8px}.widget-edit[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{font-size:13px;color:#acb3bd}.widget-edit-other-option-required[_ngcontent-%COMP%]{margin:10px 0 0 24px}.table-custom-btn-input[_ngcontent-%COMP%]{margin-bottom:24px}.location-postion[_ngcontent-%COMP%]{margin-top:20px}.desensitization-popover-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.desensitization-popover-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:288px;height:162px}.desensitization-popover-tip[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:68px;padding:0 20px;font-size:13px;color:#767e89;background-color:#f4f6f9;border-radius:0 8px 8px 0}"]});let n=a;return n})();var Km=["inputElement"];function Gm(n,a){if(n&1){let o=S();p(0,"div",5),g(1),m(2,"translate"),p(3,"input",6,0),y("ngModelChange",function(e){_(o);let i=d();return C(i.decimalDigitInputHandler(e))}),c(),g(5),m(6,"translate"),c()}if(n&2){let o=d();r(),M(" ",u(2,3,"all.atMost")," "),r(2),l("ngModel",o.data.decimalDigit),r(2),M(" ",u(6,5,"all.decimalPlaces")," ")}}var Wa=(()=>{let a=class a{decimalDigitInputHandler(t){let e=/^(0|[1-9][0-9]*)(\.[0-9]*)?$/;if(!isNaN(+t)&&e.test(t)||t===""){let i=Number(t)>10?"10":t;this.data.decimalDigit=Number(i)||null,this.inputElement.nativeElement.value=this.data.decimalDigit||""}else this.inputElement.nativeElement.value=0}resetDecimalDigit(){this.data.decimalDigit=null}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-decimal-limit"]],viewQuery:function(e,i){if(e&1&&qe(Km,5),e&2){let s;Te(s=Se())&&(i.inputElement=s.first)}},inputs:{data:"data"},decls:8,vars:8,consts:[["inputElement",""],[1,"widget-edit","decimal-control"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],["class","decimal-number widget-edit-detail",4,"ngIf"],[1,"decimal-number","widget-edit-detail"],["type","number","placeholder","0",1,"qflow-input-normal",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"label",2),O("ngModelChange",function(f){return E(i.data.canDecimal,f)||(i.data.canDecimal=f),f}),y("ngModelChange",function(){return i.resetDecimalDigit()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",3),m(6,"translate"),x(7,Gm,7,7,"div",4),c()),e&2&&(r(),I("ngModel",i.data.canDecimal),r(2),w(u(4,4,"widgets.canDecimal")),r(2),l("hintMsg",u(6,6,"widgetHelp.decimal")),r(2),l("ngIf",i.data.canDecimal))},dependencies:[A,le,Eo,V,Q,se,G,k],styles:["qf-hint-msg[_ngcontent-%COMP%]{margin-left:-8px}.decimal-number[_ngcontent-%COMP%]{display:flex;align-items:center}.decimal-number[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:inline-block;width:134px;margin:0 8px}"]});let n=a;return n})();function $m(n,a){if(n&1){let o=S();p(0,"li",5),y("click",function(){let e=_(o).$implicit,i=d();return C(i.widthChange(e))}),g(1),c()}if(n&2){let o=a.$implicit,t=d();be("active",o===t.activeItem),r(),M(" ",o," ")}}var Ha=(()=>
1{let a=class a{widthChange(t){this.activeItem=t,this.activeItemChange.emit(t),this.widgetChange.changed.emit(!0)}constructor(t){this.widgetChange=t,this.activeItemChange=new R,this.percents=[25,50,75,100]}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-percent-bar"]],inputs:{activeItem:"activeItem"},outputs:{activeItemChange:"activeItemChange"},decls:10,vars:7,consts:[["percentBar",""],[1,"widget-edit-share","widget-percent-bar"],[1,"widget-edit-title"],[3,"hintMsg"],[3,"active","click",4,"ngFor","ngForOf"],[3,"click"]],template:function(e,i){e&1&&(p(0,"div",1,0)(2,"p",2)(3,"span"),g(4),m(5,"translate"),c(),b(6,"qf-hint-msg",3),m(7,"translate"),c(),p(8,"ul"),x(9,$m,2,3,"li",4),c()()),e&2&&(r(4),w(u(5,3,"widgets.percentage")),r(2),l("hintMsg",u(7,5,"widgetHelp.rowPercent")),r(3),l("ngForOf",i.percents))},dependencies:[B,G,k],styles:[".widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex;width:100%}.widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:25%;height:36px;line-height:34px;text-align:center;cursor:pointer;border-top:1px solid #e6eaf0;border-bottom:1px solid #e6eaf0;border-left:1px solid #e6eaf0}.widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{border-radius:3px 0 0 3px}.widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-right:1px solid #e6eaf0;border-radius:0 3px 3px 0}.widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{line-height:34px;color:#fff;background:#fb9337;background:var(--brand-primary-base, #fb9337);border:none}.widget-percent-bar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{border-left:none}"]});let n=a;return n})();function Xm(n,a){if(n&1){let o=S();p(0,"div",5)(1,"nz-input-number",6),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.minWordCount,e)||(i.minWordCount=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.change())}),c(),p(3,"span",7),g(4,"~"),c(),p(5,"nz-input-number",6),m(6,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.maxWordCount,e)||(i.maxWordCount=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.change())}),c()()}if(n&2){let o=d();r(),l("nzPlaceHolder",u(2,8,"all.unlimit"))("nzMin",0)("nzMax",o.MAX_WORD_COUNT),I("ngModel",o.minWordCount),r(4),l("nzPlaceHolder",u(6,10,"all.unlimit"))("nzMin",o.minWordCount)("nzMax",o.MAX_WORD_COUNT),I("ngModel",o.maxWordCount)}}function Ym(n,a){if(n&1){let o=S();p(0,"div",5)(1,"nz-input-number",6),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.minOpts,e)||(i.minOpts=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.change())}),c(),p(3,"span",7),g(4,"~"),c(),p(5,"nz-input-number",8),m(6,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.maxOpts,e)||(i.maxOpts=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.change())}),c()()}if(n&2){let o=d();r(),l("nzPlaceHolder",u(2,7,"all.unlimit"))("nzMin",0)("nzMax",o.maxOpts||o.Infinity),I("ngModel",o.minOpts),r(4),l("nzPlaceHolder",u(6,9,"all.unlimit"))("nzMin",o.minOpts),I("ngModel",o.maxOpts)}}var $i=function(n){return n[n.signal=300]="signal",n[n.multi=5e3]="multi",n}($i||{}),ja=(()=>{let a=class a{set data(t){this._que=t,this.checked=!1,this.refreshInit()}get data(){return this._que}isShowValueContainer(){return this.checked&&(this.data.queType===h.CHECKBOX||this.data.queType===h.IMAGE_PICKER||this.data.queType===h.DEPARTMENT||this.data.queType===h.MEMBER)}constructor(t){this.widgetChange=t,this.QueType=h,this.Infinity=1/0,this.MAX_WORD_COUNT=$i.signal,this.minWordCount=null,this.maxWordCount=null,this.minOpts=null,this.maxOpts=null,this.checked=!1}ngOnInit(){this.refreshInit()}
1refreshInit(){this.data.minOpts===-1||this.data.minOpts==null?this.minOpts=null:(this.checked=!0,this.minOpts=this.data.minOpts),this.data.maxOpts===-1||this.data.maxOpts==null?this.maxOpts=null:(this.checked=!0,this.maxOpts=this.data.maxOpts),this.data.minWordCount===-1||this.data.minWordCount==null?this.minWordCount=null:(this.checked=!0,this.minWordCount=this.data.minWordCount),this.data.maxWordCount===-1||this.data.maxWordCount==null?this.maxWordCount=null:(this.checked=!0,this.maxWordCount=this.data.maxWordCount)}change(){[h.TEXTAREA,h.INPUT].includes(this.data.queType)&&(this.data.minWordCount=this.minWordCount,this.data.maxWordCount=this.maxWordCount,this.data.queType===h.TEXTAREA&&this.maxWordCount>$i.multi?this.data.maxWordCount=$i.multi:this.data.queType===h.INPUT&&this.maxWordCount>$i.signal&&(this.data.maxWordCount=$i.signal)),[h.CHECKBOX,h.IMAGE_PICKER,h.MEMBER,h.DEPARTMENT].includes(this.data.queType)&&(this.data.minOpts=this.minOpts||0,this.data.maxOpts=this.maxOpts||-1),this.widgetChange.changed.emit(!0)}updateInput(){this.checked||(this.data.minOpts=null,this.data.maxOpts=null,this.data.minWordCount=null,this.data.maxWordCount=null),this.checked&&this.refreshInit(),this.data.queType===h.TEXTAREA&&(this.MAX_WORD_COUNT=$i.multi)}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-number-ranger"]],inputs:{title:"title",titleHint:"titleHint",data:"data"},decls:10,vars:9,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],[1,"number-ranger","widget-edit-detail"],["class","value-container",4,"ngIf"],[1,"value-container"],[3,"ngModelChange","nzPlaceHolder","nzMin","nzMax","ngModel"],[1,"tidle-style"],[3,"ngModelChange","nzPlaceHolder","nzMin","ngModel"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.checked,f)||(i.checked=f),f}),y("ngModelChange",function(){return i.change(),i.updateInput()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",2),m(6,"translate"),p(7,"div",3),x(8,Xm,7,12,"div",4)(9,Ym,7,11,"div",4),c()()),e&2&&(r(),I("ngModel",i.checked),r(2),w(u(4,5,i.title)),r(2),l("hintMsg",u(6,7,i.titleHint)),r(3),l("ngIf",i.checked&&(i.data.queType===i.QueType.INPUT||i.data.queType===i.QueType.TEXTAREA)),r(),l("ngIf",i.isShowValueContainer()))},dependencies:[A,V,Q,se,Xt,G,k],styles:[".number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%]{display:flex;align-items:center}.number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%] nz-input-number[_ngcontent-%COMP%]{width:90px}.number-ranger[_ngcontent-%COMP%] .tidle-style[_ngcontent-%COMP%]{margin:0 8px}"]});let n=a;return n})();var Ze={queDefaultType:1,value:"all.userDefined"},ot={queDefaultType:2,value:"all.associateExistingData"},Xi={queDefaultType:3,value:"all.calculateByFormula"},Jm={queDefaultType:2,value:"all.associateExistingTable"},aa=new Map([[2,[Ze,ot,Xi]],[3,[Ze,ot,Xi]],[4,[Ze,ot,Xi]],[5,[Ze,ot]],[6,[Ze,ot,Xi]],[7,[Ze,ot,Xi]],[8,[Ze,ot,Xi]],[9,[Ze,ot,Xi]],[10,[Ze,ot]],[11,[Ze,ot]],[12,[Ze,ot]],[13,[Ze,ot]],[18,[Ze,Jm]],[21,[Ze,ot]],[22,[Ze,ot]],[23,[Ze,ot]],[25,[Ze,ot]],[16,[Ze]],[h.ENCRYPTED_TEXT,[Ze,ot]]]),Kn=[{value:1,title:"\u81EA\u52A8\u8BA1\u6570"},{value:2,title:"\u63D0\u4EA4\u65E5\u671F"},{value:3,title:"\u56FA\u5B9A\u5B57\u7B26"},{value:4,title:"\u8868\u5355\u5185\u5B57\u6BB5"}],ra=[{value:1,title:"Auto-counting"},{value:2,title:"Submit date"},{value:3,title:"Fixed character"},{value:4,title:"Fields in the form"}],la=[{value:1,title:"all.neverReset"},{value:2,title:"all.daily"},{value:3,title:"all.weekly"},{value:4,title:"all.monthly"},{value:5,title:"all.yearly"}],Mp=[{value:1,title:"Never reset"},{value:2,title:"Daily"},{value:3,title:"Weekly"},{value:4,title:"Monthly"},{value:5,title:"Yearly"}],sa=[{value:1,title:"all.year"},{value:2,title:"all.yearMonth"},{value:3,title:"all.yearMonthDay2"}];var tu=(n,a)=>({x:n,y:a}),iu=n=>({count:n});function nu(n,a){n&1&&(p(0,"li")(1,"span"),g(2),m(3,"translate"),c()()),n&2&&(r(2),w(u(3,1,"all.cantSetAggregationMode")))}function ou(n,a){n&1&&(p(0,"li")(1,"span"),g(2),m(3,"translate"),c()()),n&2&&(r(2),w(u(3,1,"all.referAndRelationQueNotSupportFilter")))}function au(n,a){if(n&1&&(p(0,"ul"),x(1,nu,4,3,"li",15)(2,ou,4,3,"li",15),c()),n&2){let o=d();r(),l("ngIf",o.disabledQueId.length>
10),r(),l("ngIf",o.isShowRelationHint)}}function ru(n,a){if(n&1&&b(0,"share-reminder",16),n&2){d();let o=W(2);l("reminders",o)}}function lu(n,a){n&1&&(p(0,"span",20),g(1,"*"),c())}function su(n,a){if(n&1&&(p(0,"th",17)(1,"span",18),g(2),x(3,lu,2,0,"span",19),c()()),n&2){let o=a.$implicit,t=d();l("nzWidth",t.subWidthMap[o.subQueWidth]+"px"),r(),We("width",t.subWidthMap[o.subQueWidth]-9+"px"),r(),M(" ",o.queTitle," "),r(),l("ngIf",o.required)}}function pu(n,a){if(n&1&&b(0,"th",21),n&2){let o=d();l("nzWidth",o.tableSize-o.xScrollWidth)}}function cu(n,a){n&1&&b(0,"div",29)}function du(n,a){if(n&1&&(p(0,"td",26)(1,"div"),b(2,"qform-pc-form-control",27,1),x(4,cu,1,0,"div",28),c()()),n&2){let o=a.$implicit,t=a.index,e=d().index,i=d();r(),We("width",i.subWidthMap[o.subQueWidth]-17+"px"),r(),l("formQuestion",o)("controlDefaultValue",i.tableDefaultValue[e][t])("formScenario",i.FormScenario.DESIGN)("standalone",!0)("queRelation",i.queRelationsMap.get(o.queId||o.queTempId))("isSimpleMode",!0)("isInTableView",!0)("isNeedTableView",!0)("isInDefaultConfig",!0),r(2),l("ngIf",i.disabledQueId.includes(o.queTempId))}}function mu(n,a){n&1&&b(0,"td")}function uu(n,a){if(n&1){let o=S();p(0,"tr"),x(1,du,5,12,"td",22)(2,mu,1,0,"td",15),p(3,"td",23)(4,"span",24),m(5,"translate"),y("click",function(){let e=_(o).index,i=d();return C(i.removeRow(e))}),p(6,"i",25),g(7,"\uE6AE"),c()()()()}if(n&2){let o=d();r(),l("ngForOf",o.currentQue.subQuestions),r(),l("ngIf",o.xScrollWidth<o.tableSize),r(2),l("title",u(5,3,"widgets.deleteRow"))}}var Ka=(()=>{let a=class a{get isAddToUpperLimit(){return ho(this.environment.version)?!1:this.tableDefaultValue.length>=(this.currentQue.tableRowsLimit||200)}initTable(){var e;let t=((e=this.currentQue.queDefaultValues)==null?void 0:e.tableValues)||[];this.tableDefaultValue=t.length>0?je(t).map(i=>this.currentQue.subQuestions.map(s=>i.find(f=>(f.queId<0?s.queTempId:s.queId)===f.queId))):[this.currentQue.subQuestions.map(i=>null)]}calculateXScrollWidth(){this.xScrollWidth=0,this.currentQue.subQuestions.forEach(t=>{this.rowFormModel[t.queId]=null,this.xScrollWidth+=this.subWidthMap[t.subQueWidth]}),this.currentQue.status===1&&(this.xScrollWidth+=90)}getTableDftValue(){let t=this.qfPcFormControlList.map(i=>i.modelAnswerDetail).map(i=>Ee(me({},i),{rowId:null}));return this.tableDefaultValue.map(i=>t.splice(0,this.currentQue.subQuestions.length))}addNewRow(){this.tableDefaultValue.push(this.currentQue.subQuestions.map(t=>null)),this.isAddToUpperLimit&&(this.showUpperLimit=!0)}removeRow(t){this.tableDefaultValue.splice(t,1),this.isAddToUpperLimit||(this.showUpperLimit=!1)}checkIsSubQueHasRelation(t,e){return t.filter(s=>[h.DATA_RELATION,h.REFER].includes(s.queType)).some(s=>{var f,v;return s.queType===h.DATA_RELATION?(f=e.get(s.queId))==null?void 0:f.matchRules.length:(v=s.referenceConfig)==null?void 0:v.referMatchRules.some(q=>q.some(D=>D.matchType===jr.MATCH_QUE))})}constructor(t,e,i,s){this.appFormEditService=t,this.qfFormDataSrv=e,this.formBaseService=i,this.environment=s,this.rowFormModel={},this.unsubscribe$=new fe,this.FormScenario=Ti,this.usageScenario=1,this.xScrollWidth=0,this.tableSize=660,this.tableDefaultValue=[],this.disabledQueId=[],this.showUpperLimit=!1,this.isShowRelationHint=!1}ngOnInit(){this.subWidthMap=this.qfFormDataSrv.subWidthMap,this.queRelationsMap=this.appFormEditService.queRelationsMap,this.isShowRelationHint=this.checkIsSubQueHasRelation(this.currentQue.subQuestions,this.appFormEditService.queRelationsMap),this.disabledQueId=this.currentQue.subQuestions.filter(t=>Qt(t.aggreType)).map(t=>t.queTempId),this.initTable(),this.calculateXScrollWidth(),this.formBaseService.changeSubWidthEvent.pipe(ae(this.unsubscribe$)).subscribe(()=>this.calculateXScrollWidth())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(Ri),T(Vi),T(pi))},a.\u0275cmp=P({type:a,selectors:[["qf-table-dft-value"]],viewQuery:function(e,i){if(e&1&&qe(Qi,5),e&2){let s;Te(s=Se())&&(i.qfPcFormControlList=s)}},inputs:{currentQue:"currentQue"},features:[et([Ri])],decls:20,vars:23,consts:[["remindersTpl",""],["modelControl",""],[1,"modal-content"],["class","modal-reminder",3,"reminders",4,"ngIf"],[3,"nzBordered","nzScroll","nzShowPagination","nzData"],[1,"qf-table-thead"],["class","table-widget-td",3,"nzWidth",4,"ngFor","ngForOf"],[3,"nzWidth",4,"ngIf"],["nzRight","0px","nzWidth","45px",1,"table-widget-td"],[2,"width","44px"],[4,"ngFor","ngForOf"],["nz-tooltip","","nzTooltipPlacement","bottom",3,"nzTooltipTitle","nzTooltipTrigger","nzTooltipVisible"],["qf-button","","qfType","dashed",1,"add-row-btn",3,"click","disabled"],["qf-icon","","qfName","ex-plus-circle"],[1,"add-row-btn-text"],[4,"ngIf"],[1,"modal-reminder",3,"reminders"],[1,"table-widget-td",3,"nzWidth"],[1,"th-title"],["class","required-mark",4,"ngIf"],[1,"required-mark"],[3,"nzWidth"],["class","table-widget-td",4,"ngFor","ngForOf"],["nzRight","0px",1,"table-widget-td"],[1,"action-icon-wrap","delete",3,"click","title"],[1,"iconfont"],[1,"table-widget-td"],[3,"formQuestion","controlDefaultValue","formScenario","standalone","queRelation","isSimpleMode","isInTableView","isNeedTableView","isInDefaultConfig"],["class","disabled-mask",4,"ngIf"],[1,"disabled-mask"]],template:function(e,i){if(e&1){let s=S();p(0,"div",2),x(1,au,3,2,"ng-template",null,0,te)(3,ru,1,1,"share-reminder",3),p(4,"nz-table",4)(5,"thead",5)(6,"tr"),x(7,su,4,5,"th",6)(8,pu,1,1,"th",7),p(9,"th",8),b(10,"div",9),c()()(),p(11,"tbody"),x(12,uu,8,5,"tr",10),c()(),p(13,"div",11),m(14,"translate"),p(15,"button",12),y("click",function(){return _(s),C(i.addNewRow())}),b(16,"i",13),p(17,"span",14),g(18),m(19,"translate"),c()()()()}e&2&&(r(3),l("ngIf",i.disabledQueId.length>0||i.isShowRelationHint),r(),l("nzBordered",!0)("nzScroll",Ce(18,tu,i.xScrollWidth+"px",(i.disabledQueId.length>0?340:380)+"3px"))("nzShowPagination",!1)("nzData",i.tableDefaultValue),r(3),l("ngForOf",i.currentQue.subQuestions),r(),l("ngIf",i.xScrollWidth<i.tableSize),r(4),l("ngForOf",i.tableDefaultValue),r(),l("nzTooltipTitle",zt(14,13,"widgets.tableUpperLimitTip",at(21,iu,i.currentQue.tableRowsLimit||200)))("nzTooltipTrigger",i.isAddToUpperLimit?"hover":null)("nzTooltipVisible",i.showUpperLimit),r(2),l("disabled",i.isAddToUpperLimit),r(3),M(" ",i.currentQue.tableCustomButtonText||u(19,16,"widgets.addRow")," "))},dependencies:[B,A,Go,qn,In,On,En,ki,Ko,yt,K,ce,Cl,Qi,k],styles:[".modal-content[_ngcontent-%COMP%]{height:490px}.modal-reminder[_ngcontent-%COMP%]{display:block;margin:0 0 20px}.table-widget-td[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 0}.table-widget-td[_ngcontent-%COMP%] .required-mark[_ngcontent-%COMP%]{margin-left:3px;color:#f26245}th.table-widget-td[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block}th.table-widget-td[_ngcontent-%COMP%] .th-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:8px;text-indent:8px}td.table-widget-td[_ngcontent-%COMP%]{padding:8px}.action-icon-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;cursor:pointer;border-radius:3px;transition:all .3s}.action-icon-wrap[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]{color:#c1c1cd;transition:all .3s}.action-icon-wrap[_ngcontent-%COMP%]:hover{background:#2b34410d}.action-icon-wrap[_ngcontent-%COMP%]:hover > .iconfont[_ngcontent-%COMP%]{color:#494f57}
1.action-icon-wrap.delete[_ngcontent-%COMP%]:hover{background:#ff12121a}.action-icon-wrap.delete[_ngcontent-%COMP%]:hover > .iconfont[_ngcontent-%COMP%]{color:red}.add-row-btn[_ngcontent-%COMP%]{width:100%;margin-top:10px}.add-row-btn[_ngcontent-%COMP%] .add-row-btn-text[_ngcontent-%COMP%]{max-width:98px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled-mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;cursor:not-allowed}qform-pc-form-control[_ngcontent-%COMP%]{max-height:220px;overflow:auto}"]});let n=a;return n})();var qp=()=>["member","dept","role","dynamic"],Ip=()=>["currentUser"],Ep=n=>({showDynamicType:n}),fu=(n,a)=>({tabList:n,dynamicConfig:a}),gu=()=>({beingContainDeptAndRole:!0}),hu=(n,a,o,t,e)=>({tabList:n,contactSelectScope:a,ignoreContactSelectScope:o,dynamicConfig:t,requestConfig:e});function _u(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",5),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.data.memberDftValue,e)||(i.data.memberDftValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.change())}),c()}if(n&2){let o=d(2);l("config",Ce(6,fu,Y(2,qp),at(4,Ep,Y(3,Ip)))),I("ngModel",o.data.memberDftValue)}}function Cu(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",5),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.data.memberDftValue,e)||(i.data.memberDftValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.change())}),c()}if(n&2){let o=d(2);l("config",Ar(7,hu,Y(2,qp),o.data.memberSelectScope,o.data.memberSelectScopeType!==o.MemberSelectScopeType.CUSTOM,at(4,Ep,Y(3,Ip)),Y(6,gu))),I("ngModel",o.data.memberDftValue)}}function yu(n,a){if(n&1&&(p(0,"div",3),x(1,_u,1,9,"qf-custom-range-frame",4)(2,Cu,1,13,"ng-template",null,0,te),c()),n&2){let o=W(3),t=d();r(),l("ngIf",t.data.memberSelectScopeType===t.MemberSelectScopeType.ALL)("ngIfElse",o)}}var $a=(()=>{let a=class a{constructor(){this.limitFunctionKey=Be,this.dynamicShowConfig={apply:!1,leader:!1,member:!1,email:!1,currentUser:!0},this.MemberSelectScopeType=rn,this.dataChange=new R}get data(){return this._data}set data(t){this._data=t}change(){this.dataChange.emit(this.data)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-default-member-scope"]],inputs:{data:"data",widgetInfo:"widgetInfo"},outputs:{dataChange:"dataChange"},decls:2,vars:1,consts:[["customSelectScopeTpl",""],[1,"dynamic-director-edit"],["class","widget-edit",4,"ngIf"],[1,"widget-edit"],[3,"config","ngModel","ngModelChange",4,"ngIf","ngIfElse"],[3,"ngModelChange","config","ngModel"]],template:function(e,i){e&1&&(p(0,"div",1),x(1,yu,4,2,"div",2),c()),e&2&&(r(),l("ngIf",i.data.queDefaultType===1))},dependencies:[A,V,Q,Yt],styles:[".p-sm[_ngcontent-%COMP%]{padding:6px 10px 10px}p[_ngcontent-%COMP%]{margin-bottom:7px}.b-b[_ngcontent-%COMP%]{border-bottom:1px solid #f4f6f9}.panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;height:35px;padding:0 10px}.panel-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:8px;font-size:13px}"]});let n=a;return n})();function xu(n,a){if(n&1){let o=S();p(0,"textarea",4),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.addressDetail,e)||(i.addressDetail=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.addressDetailChange())}),c()}if(n&2){let o=d(2);I("ngModel",o.addressDetail)}}function bu(n,a){if(n&1){let o=S();j(0),p(1,"nz-cascader",2),m(2,"translate"),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChanges(e))})("nzClear",function(){_(o);let e=d();return C(e.handleClear())}),c(),x(3,xu,1,1,"textarea",3),U()}if(n&2){let o=d();r(),l("ngModel",o.address)("nzPlaceHolder",u(2,5,"widgets.select"))("nzOptions",o.addressOptions)("nzLoadData",o.getNextLevelData),r(2),l("ngIf",o.addressPrecision===o.AddressPrecision.all)}}function Tu(n,a){if(n&1&&(p(0,"span",5),g(1),c()),n&2){let o=d();r(),w(o.addressText)}}var Op=function(n){return n[n.edit=1]="edit",n[n.preview=2]="preview",n}(Op||{}),Xa=(()=>{let a=class a{get addressPrecision(){return this._precision}set addressPrecision(t){t!==this._precision?(this._precision=t,this.initAddressConfig()):this._precision=t}get status(){return this._status}set status(t){this._status=t}constructor(t){this.appDataReq=t,this.addressMap=new Map(Jr.entries()),this.addressText="",this.addressDetail="",this.onChange=e=>{},this.onTouched=()=>{},this.MAX_ADDRESS_INDEX=2,this.ID_ADDRESS_DETAIL=ut.detail,this.AddressPrecision=Ye,this.getNextLevelData=this.getNextLevelData.bind(this)}ngOnInit(){this.initAddressConfig(),this.initAddressOptions()}handleClear(){this.onChange(null)}writeValue(t){let e=(Array.isArray(t)?t:[]).sort((s,f)=>s.id-f.id),i=e.filter(s=>s.id!==ut.detail);if(i.length!==0&&JSON.stringify(i.map(s=>s.otherInfo))===JSON.stringify(this.address)){this.setAddressBySortValue(e);return}[e,i]=this.processValByPrecision(e,i),this.addressText=e.map(s=>s.value).join(" "),this.status!==Op.preview?this.processSelectorAfterValueChange(e,i):this.setAddressBySortValue(e)}processValByPrecision(t,e){let i=t,s=e,f=s.filter(v=>!!v.value).length;
1switch(this.addressPrecision){case Ye.all:f<3&&(s=[],i=[]);break;case Ye.exceptDetail:f<3?(s=[],i=[]):i=i.filter(v=>v.id!==ut.detail);break;case Ye.provinceAndCity:f<2?(s=[],i=[]):(i=i.filter(v=>![ut.detail,ut.area].includes(v.id)),s=s.filter(v=>v.id!==ut.area));break;case Ye.provinceOnly:f<1?(s=[],i=[]):(i=i.filter(v=>![ut.detail,ut.area,ut.city].includes(v.id)),s=s.filter(v=>![ut.area,ut.city].includes(v.id)));break}return[i,s]}processSelectorAfterValueChange(t,e){let i=t,s=e;if(s[0]){let f=this.addressOptions.find(v=>v.value===s[0].otherInfo);s[1]?this.getNextLevelData(f,0).then(()=>{let v=f.children.find(q=>q.value===s[1].otherInfo);s[2]?this.getNextLevelData(v,1).then(()=>{this.setAddressBySortValue(i)}):(this.setAddressBySortValue(i),this.cleanCityNodesChildren())}):(this.setAddressBySortValue(i),this.cleanProvinceNodesChildren())}else this.setAddressBySortValue(i),this.cleanProvinceNodesChildren()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}onChanges(t){this.address=t;let e=t.map((i,s)=>({value:this.addressMap.get(i).name,id:s+1,otherInfo:String(i)}));if(this.addressPrecision===Ye.all)e.push({value:this.addressDetail.replace(/\s/g,""),id:ut.detail,otherInfo:void 0});else{let i=e.findIndex(s=>s.id===ut.detail);i!==-1&&e.splice(i,1)}this.addressText=e.sort((i,s)=>i.id-s.id).map(i=>i.value).join(" "),this.onChange(e)}initAddressConfig(){this.MAX_ADDRESS_INDEX=this.addressPrecision===Ye.all?2:4-this.addressPrecision}initAddressOptions(){this.addressOptions=this.formatResDataToOptions(tt(Array.from(this.addressMap.values())),this.MAX_ADDRESS_INDEX===0)}getNextLevelData(t,e){return e<this.MAX_ADDRESS_INDEX?this.appDataReq.getAddress(t.value).then(i=>{t.children=this.formatResDataToOptions(i,e===this.MAX_ADDRESS_INDEX-1)}).catch():Promise.resolve()}addressDetailChange(){this.onChanges(this.address)}cleanCityNodesChildren(){setTimeout(()=>{this.addressOptions.forEach(t=>{t.children&&t.children.forEach(e=>{e.children&&(e.children=null)})}),this.addressOptions=[...this.addressOptions]},0)}cleanProvinceNodesChildren(){setTimeout(()=>{this.addressOptions=this.formatResDataToOptions(Array.from(Zr),this.MAX_ADDRESS_INDEX===0)},0)}setAddressBySortValue(t){this.address=t.filter(i=>i.id!==this.ID_ADDRESS_DETAIL).map(i=>i.otherInfo);let e=t.find(i=>i.id===ut.detail);this.addressDetail=e?e.value:""}formatResDataToOptions(t,e){return t.map(i=>(this.addressMap.set(i.apcode,i),{value:i.apcode,label:i.name,isLeaf:e||!1}))}};a.\u0275fac=function(e){return new(e||a)(T(So))}
1,a.\u0275cmp=P({type:a,selectors:[["qf-address-base"]],inputs:{addressPrecision:"addressPrecision",status:"status"},features:[et([{provide:Cn,useExisting:tn(()=>a),multi:!0}])],decls:2,vars:2,consts:[[4,"ngIf"],["class","display-text",4,"ngIf"],[3,"ngModelChange","nzClear","ngModel","nzPlaceHolder","nzOptions","nzLoadData"],["qf-input","","class","address-detail",3,"ngModel","ngModelChange",4,"ngIf"],["qf-input","",1,"address-detail",3,"ngModelChange","ngModel"],[1,"display-text"]],template:function(e,i){e&1&&x(0,bu,4,7,"ng-container",0)(1,Tu,2,1,"span",1),e&2&&(l("ngIf",i.status===1),r(),l("ngIf",i.status===2))},dependencies:[A,le,V,Q,ts,he,k],styles:[".address-detail[_ngcontent-%COMP%]{height:60px;margin-top:8px}nz-cascader[_ngcontent-%COMP%]{width:100%}"]});let n=a;return n})();function Yi(n){if(ie(n)||n.length===0)return[];if(ie(n[0].aliasName))return n;let a=[];return n.forEach(o=>{var e;let t=[];((e=o.subAlias)==null?void 0:e.length)>0&&o.subAlias.forEach(i=>{t.push({aliasId:i.aliasId,aliasName:i.aliasName,aliasPath:i.aliasPath,qlinkerAlias:i.aliasName,qlinkerPath:i.aliasPath,aliasType:i.aliasType})}),a.push({aliasId:o.aliasId,aliasName:o.aliasName,aliasPath:o.aliasPath,qlinkerAlias:o.aliasName,qlinkerPath:o.aliasPath,aliasType:o.aliasType,subAlias:t})}),a}var Mu=()=>({type:"link"});function qu(n,a){n&1&&(p(0,"div",5)(1,"span",6),g(2,"\u8BF7\u5148\u8BBE\u7F6E\u8868\u683C\u5B50\u5B57\u6BB5"),c()())}function Iu(n,a){if(n&1&&b(0,"qf-option",17),n&2){let o=a.$implicit,t=d(3);l("qfLabel",o.queTitle)("qfValue",o[t.cellKey])}}function Eu(n,a){if(n&1&&(j(0,14),p(1,"qf-select",15),m(2,"translate"),x(3,Iu,1,2,"qf-option",16),m(4,"questionType"),c(),U()),n&2){let o=d(),t=o.$implicit,e=o.index,i=d();l("formGroupName",e),r(),l("qfPlaceHolder",u(2,3,"all.select")),r(2),l("ngForOf",lo(4,5,i.cells,t,i.appType!==i.AppType.App))}}function Ou(n,a){n&1&&(p(0,"span",18),g(1),m(2,"translate"),c(),b(3,"qf-hint-msg",19),m(4,"translate")),n&2&&(r(),w(u(2,2,"all.unsupportedFieldType")),r(2),l("hintMsg",u(4,4,"all.unsupportFieldAssociate")))}function Pu(n,a){if(n&1&&(p(0,"nz-form-item",7)(1,"div",8)(2,"span",9),g(3),c()(),p(4,"div",10),b(5,"i",11),c(),p(6,"nz-form-control",12),x(7,Eu,5,9,"ng-container",13)(8,Ou,5,6,"ng-template",null,0,te),c()()),n&2){let o=a.$implicit,t=W(9),e=d();r(3),M(" ",o.queTitle,""),r(2),l("nzCompatible",Y(4,Mu)),r(2),l("ngIf",e.supportRelateQueType.includes(o.queType))("ngIfElse",t)}}var Rt=function(n){return n[n.App=0]="App",n[n.Qlinker=1]="Qlinker",n[n.Codeblock=2]="Codeblock",n}(Rt||{}),Za=(()=>{let a=class a{get appType(){return{[h.QLINKER]:Rt.Qlinker,[h.CODEBLOCK]:Rt.Codeblock}[this.selectedApp.queType]||Rt.App}get cellKey(){return{[h.QLINKER]:"qlinkerAlias",[h.CODEBLOCK]:"aliasId"}[this.selectedApp.queType]||"queId"}get updateData(){return{queId:this.currentQue.queId||this.currentQue.queTempId,displayedQueId:this.relatedQueId,displayedQueInfo:{appKey:this.selectedApp.appKey,appTitle:this.selectedApp.formTitle,queTitle:this.relatedQue.queTitle},tableMatchRules:this.setForm.value.tableMatchRules.filter(t=>Rt.App===this.appType?_o(t.value):t.value).map(t=>({subQueId:t.subQueId,relatedSubQueId:Rt.App===this.appType?t.value:null,qlinkerAlias:Rt.Qlinker===this.appType?t.value:null,sonAliasId:Rt.Codeblock===this.appType?t.value:null})),matchRuleType:1,matchRules:[]}}initForm(){let t=this.fb.array(this.currentQue.subQuestions.map(e=>{let i=e.queId||e.queTempId,s=this.initRelation.tableMatchRules.find(q=>(q.subQueId||q.qlinkerAlias)===i),v={[Rt.Qlinker]:s==null?void 0:s.qlinkerAlias,[Rt.Codeblock]:s==null?void 0:s.sonAliasId}[this.appType]||(s==null?void 0:s.relatedSubQueId);return this.fb.group({subQueId:i,value:v})}));this.setForm=this.fb.group({tableMatchRules:t})}constructor(t){this.fb=t,this.unsubscribe$=new fe,this.AppType=Rt,this.supportRelateQueType=[h.INPUT,h.ENCRYPTED_TEXT,h.DATE,h.MEMBER,h.LINK,h.NUMBER,h.UPLOAD,h.TEXTAREA,h.EMAIL,h.PHONE,h.DATA_RELATION,h.DEPARTMENT,h.SELECT,h.RADIO,h.CHECKBOX,h.REFER]}ngOnInit(){this.initForm()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(Gt))},a.\u0275cmp=P({type:a,selectors:[["qf-table-relation-form"]],inputs:{currentQue:"currentQue",initRelation:"initRelation",cells:"cells",relatedQueId:"relatedQueId",selectedApp:"selectedApp",relatedQue:"relatedQue"},decls:4,vars:3,consts:[["notSupportTpl",""],[1,"table-relform-wrap"],["nz-form","","nzLayout","horizontal",3,"formGroup"],["nz-row","","class","subque-empty-wrap","nzType","flex","nzJustify","center","nzAlign","middle",4,"ngIf"],["formArrayName","tableMatchRules",4,"ngFor","ngForOf"],["nz-row","","nzType","flex","nzJustify","center","nzAlign","middle",1,"subque-empty-wrap"],[1,"qfont-gray-frequent"],["formArrayName","tableMatchRules"],["nz-col","","nzSpan","12",1,"field-value"],[1,"truncate"],["nz-col","","nzSpan","1",1,"rel-hint"],["qf-icon","",3,"nzCompatible"],["nzSpan","11"],[3,"formGroupName",4,"ngIf","ngIfElse"],[3,"formGroupName"],["qfAllowClear","","formControlName","value",2,"width","100%",3,"qfPlaceHolder"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"],[1,"not-support-hint"],[3,"hintMsg"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"form",2),x(2,qu,3,0,"div",3)(3,Pu,10,5,"nz-form-item",4),c()()),e&2&&(r(),l("formGroup",i.setForm),r(),l("ngIf",i.currentQue.subQuestions.length===0),r(),l("ngForOf",i.currentQue.subQuestions))},dependencies:[B,A,Ie,V,ge,Ut,Kt,yn,Oo,Ei,Ii,Pi,Oi,Di,oe,ne,ce,G,k,ko],styles:[".hint-text-row[_ngcontent-%COMP%]{padding:6px 20px;color:#6b737b;background:#fafafb}.hint-text-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{margin-right:10px}.table-relform-wrap[_ngcontent-%COMP%]{padding:10px 0}.rel-hint[_ngcontent-%COMP%]{line-height:34px;text-align:center}.not-support-hint[_ngcontent-%COMP%]{line-height:34px;color:#b0b0b9}.field-value[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:34px;padding:0 8px;background:#fafafb;border-radius:3px}.subque-empty-wrap[_ngcontent-%COMP%]{height:100px;border:1px solid #f4f6f9;border-radius:3px}"]});let n=a;return n})();function Du(n,a){if(n&1){let o=S();p(0,"div",5),y("click",function(){_(o);let e=d();return C(e.alert())}),c()}}function ku(n,a){if(n&1&&b(0,"qf-option",10),n&2){let o=a.$implicit,t=d(2);l("qfLabel",t.beingNil(o.queId)?o.qlinkerAlias:o.queTitle)("qfValue",o)}}function Vu(n,a){if(n&1){let o=S();p(0,"div",6)(1,"qf-select",7),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.target,e)||(i.target=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.targetChange(e))}),x(3,ku,1,2,"qf-option",8),c(),p(4,"qf-select",7),m(5,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.ascend,e)||(i.ascend=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.ascendChange())}),b(6,"qf-option",9),m(7,"translate"),b(8,"qf-option",9),m(9,"translate"),c()()}if(n&2){let o=d();r(),l("qfPlaceHolder",u(2,9,"all.selectAssociatedModule")),I("ngModel",o.target),r(2),l("ngForOf",o.targetQueList),r(),l("qfPlaceHolder",u(5,11,"all.setSortRule")),I("ngModel",o.ascend),r(2),l("qfValue",!0)("qfL
1abel",u(7,13,"common.ascending")),r(2),l("qfValue",!1)("qfLabel",u(9,15,"common.descending"))}}var pa=(()=>{let a=class a{get editQue(){return this.currentEditService.editQue}get editQueId(){return this.editQue.queId===0?this.editQue.queTempId:this.editQue.queId}get editSortConfig(){let t=this.appFormEditSrv.appFormData.questionRelations.find(e=>e.queId===this.editQueId);if(t)return ie(t.sortConfig)&&(t.sortConfig={queId:void 0,qlinkerAlias:void 0,status:void 0,ascend:void 0}),t.sortConfig}get sortHintMsg(){return this.isDftAssociate?this.translate.instant("all.sortHintDftAssociate"):this.translate.instant("all.sortHint")}sortStatusChange(){this.editSortConfig.status=this.sortStatus}alert(){let t=this.translate.instant("all.setTheAppAndQue2");this.messageService.error(t)}targetChange(t){this.isQlinker(t)?this.editSortConfig.qlinkerAlias=t.qlinkerAlias:this.editSortConfig.queId=t.queId}ascendChange(){this.editSortConfig.ascend=this.ascend}isQlinker(t){return!!t.qlinkerAlias}resolveGetTargetQueListSolution(t){this.isTargetQueListExternalExist?this.getTargetQueList(t):this.currentEditService.changeTargetQuestion$.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.getTargetQueList(this.currentEditService.targetQueList)})}filterQueList(t,e){t.forEach(i=>{var s;i.queType===h.SECTION?this.filterQueList(i.innerQuestions,e):(i.queId===((s=this.editSortConfig)==null?void 0:s.queId)||il.includes(i.queType)||i.aliasId)&&e.push(i)})}getTargetQueList(t){if(t){let i=[];this.filterQueList(this._currentEditService.targetQueList,i),this.targetQueList=i}this.editSortConfig?(this.sortStatus=this.editSortConfig.status,this.target=this.targetQueList.find(i=>this.isQlinker(i)?i.qlinkerAlias===this.editSortConfig.qlinkerAlias:i.queId===this.editSortConfig.queId),this.ascend=this.editSortConfig.ascend):(this.sortStatus=void 0,this.target=void 0,this.ascend=void 0)}get isTargetQueListExternalExist(){return!ie(this.targetQueListExternal)&&this.targetQueListExternal.length>0}constructor(t,e,i,s,f){this.appFormEditSrv=t,this.translate=e,this.editAreaComponent=i,this._currentEditService=s,this.messageService=f,this.beingNil=ie,this.targetQueList=[],this.sortStatus=!1,this.unsubscribe$=new fe,this.currentEditService=this.editAreaComponent.currentEditSrv}ngOnInit(){this.resolveGetTargetQueListSolution(this.targetQueListExternal)}ngOnChanges(t){let e=t.targetQueListExternal.currentValue;this.resolveGetTargetQueListSolution(e)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(X),T(Gi),T(ke),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-set-associate-sort"]],inputs:{targetQueListExternal:"targetQueListExternal",isDftAssociate:"isDftAssociate"},features:[Re],decls:9,vars:7,consts:[[1,"data-associate-set","widget-edit"],["class","mask",3,"click",4,"ngIf"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],["class","widget-edit-detail",4,"ngIf"],[1,"mask",3,"click"],[1,"widget-edit-detail"],[1,"associate-set-item",3,"ngModelChange","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfValue","qfLabel"],[3,"qfLabel","qfValue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div"),x(2,Du,1,0,"div",1),p(3,"label",2),O("ngModelChange",function(f){return E(i.sortStatus,f)||(i.sortStatus=f),f}),y("ngModelChange",function(){return i.sortStatusChange()}),p(4,"span"),g(5),m(6,"translate"),c()(),b(7,"qf-hint-msg",3),c(),x(8,Vu,10,17,"div",4),c()),e&2&&(r(2),l("ngIf",!i.appFormEditSrv.queRelationsMap.has(i.editQueId)),r(),I("ngModel",i.sortStatus),r(2),w(u(6,5,"all.sortSettings")),r(2),l("hintMsg",i.sortHintMsg),r(),l("ngIf",i.sortStatus))},dependencies:[B,A,V,Q,se,oe,ne,G,k],styles:["qf-hint-msg[_ngcontent-%COMP%]{margin-left:-8px}.widget-edit-title[_ngcontent-%COMP%]{position:relative}.widget-edit-title[_ngcontent-%COMP%] .mask[_ngcontent-%COMP%]{position:absolute;z-index:2;width:100%;height:100%;background-color:#0000}"]});let n=a;return n})();var Au=(n,a)=>[n,a],Fu=()=>({"margin-top":"10px"});function Ru(n,a){if(n&1&&b(0,"qf-option",11),n&2){let o=d().$implicit;l("qfLabel",o.appKey?o.formTitle:o.queTitle)("qfValue",o)}}function Nu(n,a){if(n&1&&(j(0),x(1,Ru,1,2,"qf-option",10),U()),n&2){let o=a.$implicit,t=d();r(),l("ngIf",t.editQue.queType!==t.QueType.TABLE||o.appKey!==t.curAppKey)}}function Bu(n,a){n&1&&(b(0,"i",16),m(1,"translate")),n&2&&l("qfTooltipTitle",u(1,1,"all.fieldDesensitized"))}function Lu(n,a){if(n&1&&(p(0,"qf-option",12),m(1,"queDisplayTitle"),p(2,"div",13)(3,"div",14),g(4),m(5,"queDisplayTitle"),c(),x(6,Bu,2,3,"i",15),c()()),n&2){let o=a.$implicit,t=d();l("qfLabel",t.beingNil(o.queId)?o.qlinkerAlias:u(1,4,o))("qfValue",o),r(4),M(" ",t.beingNil(o.queId)?o.qlinkerAlias:u(5,6,o)," "),r(2),l("ngIf",t.beingNil(o.queId)?!1:o.beingDesensitized)}}function zu(n,a){n&1&&(b(0,"i",16),m(1,"translate")),n&2&&l("qfTooltipTitle",u(1,1,"all.fieldDesensitized"))}function Wu(n,a){if(n&1&&(p(0,"div",13)(1,"div",14),g(2),c(),x(3,zu,2,3,"i",15),c()),n&2){let o=a.$implicit,t=d();r(2),w(o.qfLabel),r(),l("ngIf",t.beingNil(o.qfValue.queId)?!1:o.qfValue.beingDesensitized)}}function Hu(n,a){n&1&&(p(0,"p",17),g(1),m(2,"translate"),p(3,"a",18),g(4),m(5,"translate"),c()()),n&2&&(r(),M(" ",u(2,2,"all.filteringOnTheSameTable")," "),r(3),w(u(5,4,"all.examples")))}function ju(n,a){if(n&1){let o=S();p(0,"div",19)(1,"p")(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",20),m(6,"translate"),c(),p(7,"button",21),y("click",function(){_(o);let e=d();return C(e.openFilterCondModal())}),p(8,"span"),g(9),m(10,"translate"),c()(),b(11,"qf-filter-cond-info",22),c()}if(n&2){let o=d();r(3),w(u(4,8,"all.dataFilter")),r(2),l("hintMsg",u(6,10,"all.dataFilterTip")),r(4),w(u(10,12,"all.setFilterCriteria")),r(2),l("ques",o.targetQues)("currentQues",o.currentQues)("matchRules",o.matchRules)("formula",o.formula)("outsideStyle",Y(14,Fu))}}function Uu(n,a){if(n&1&&(p(0,"li"),g(1),p(2,"span",25),g(3,"\u5339\u914D"),c(),g(4),c()),n&2){let o=a.$implicit;r(),M(" ",o.subQueTitle," "),r(3),M(" ",o.relatedSubQueTitle," ")}}function Ku(n,a){if(n&1&&(p(0,"div",24)(1,"ul"),x(2,Uu,5,2,"li",3),c()()),n&2){let o=d(2);r(2),l("ngForOf",o.tableCellRules)}}function Gu(n,a){if(n&1){let o=S();p(0,"div")(1,"p"),g(2),m(3,"translate"),b(4,"qf-hint-msg",20),m(5,"translate"),c(),p(6,"button",21),y("click",function(){_(o);let e=d();return C(e.openTableRelationModal())}),p(7,"span"),g(8),m(9,"translate"),c()(),x(10,Ku,3,1,"div",23),c()}if(n&2){let o=d();r(2),M(" ",u(3,4,"all.associateSubfield")," "),r(2),l("hintMsg",u(5,6,"all.associateSubfieldHint")),r(4),w(u(9,8,"all.setAssociateRules")),r(2),l("ngIf",o.tableCellRules==null?null:o.tableCellRules.length)}}var Bi=(()=>{let a=class a{get selectedQueInfo(){return this._selectedQueInfo}set selectedQueInfo(t){this.currentEditSrv.targetQue=t,this._selectedQueInfo=t}get tableCellRules(){return this._tableCellRules}set tableCellRules(t){this._tableCellRules=t}set editQue(t){this._editQue=t,this.initData()}get editQue(){return this._editQue}get editQueId(){return this.editQue.queId===0?this.editQue.queTempId:this.editQue.queId}get targetQues(){return this.currentEditSrv.targetQueList}get queRelation(){return this.appFormEditSrv.queRelationsMap.get(this.editQueId)}get selectScopeRelations(){return this.appFormEditSrv.selectScopeRelations.get(this.editQueId)}get matchRules(){var t,e;if(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")return(t=this.selectScopeRelations)==null?void 0:t.matchRules;if(this.selectedType==="dataRelation")return(e=this.queRelation)==null?void 0:e.matchRules}get formula(){var t,e;if(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")return(t=this.selectScopeRelations)==null?void 0:t.matchRuleFormula;if(this.selectedType==="dataRelation")return(e=this.queRelation)==null?void 0:e.matchRuleFormula}get typeName(){return{[ve.app]:{cell:"queId",rule:"relatedSubQueId"},[ve.qLinker]:{cell:"qlinkerAlias",rule:"qlinkerAlias"},[ve.codeBlock]:{cell:"aliasId",rule:"sonAliasId"}}[this.queRelation.relationType]}limitMemOrDepChoiceScopeRelationUse(){if(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation"){if(this._rootStore.workspaceInfo().accountLevel<Mt.BASIC){let t;switch(this.selectedType){case"memberRelation":t=Be.memberRelation;break;case"departmantRelation":t=Be.departmentRelation;break}this.modalHelper.create(Qo,{restrictedFunction:t},{size:400,modalOptions:{footer:null}}).subscribe()}return}}relatedAppChange(t,e){var i,s;if(this.targetQueList=[],this.isQLinker=!!(t!=null&&t.remoteLookupConfig),e&&(this.limitMemOrDepChoiceScopeRelationUse(),(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")&&(t.appKey?(this.selectScopeRelations.displayedQueInfo={appKey:t.appKey},this.selectScopeRelations.relationType=ve.app,this.selectScopeRelations.qlinkerAlias=null,this.selectScopeRelations.aliasConfig=null,this.selectScopeRelations.matchRuleType=1,this.selectScopeRelations.queId=this.editQueId):(this.selectScopeRelations.displayedQueInfo=null,this.selectScopeRelations.relationType=this.isQLinker?ve.qLinker:ve.codeBlock,this.selectScopeRelations.aliasConfig={queId:t.queId,queTitle:t.queTitle},this.selectScopeRelations.qlinkerAlias=null,this.selectScopeRelations.matchRuleType=1),this.selectedQueInfo=null,this.targetQueList=[],this.selectScopeRelations.matchRules=[],this.widgetChange.changed.emit(),this.selectScopeRelations.displayedQueId&&(this.selectScopeRelations.displayedQueId=null)),this.selectedType==="dataRelation"&&(t.appKey?(this.queRelation.displayedQueInfo={appKey:t.appKey},this.queRelation.relationType=ve.app,this.queRelation.qlinkerAlias=null,this.queRelation.aliasConfig=null):(this.queRelation.displayedQueInfo=null,this.queRelation.relationType=this.isQLinker?ve.qLinker:ve.codeBlock,this.queRelation.qlinkerAlias=null,this.queRelation.aliasConfig={queId:t.queId,queTitle:t.queTitle}),this.queRelation.displayedQueId=null,this.queRelation.matchRules=[],this.selectedQueInfo=null,this.targetQueList=[],this.widgetChange.changed.emit())),t.appKey)this.appFormEditSrv.getQueList(this.selectedApp.appKey).subscribe(f=>{let v=[];f.forEach(q=>{q.queType===h.SECTION?v.push(...q.innerQuestions):v.push(q)}),this.editQue.queType===h.TABLE?(this.currentEditSrv.targetQueList=v.map(q=>(q.queDisplayTitle=q.queTitle,q)),this.targetQueList=this.currentEditSrv.targetQueList.filter(q=>q.queType===this.editQue.queType)):this.editQue.queType===h.MEMBER&&this.selectedType==="memberRelation"?this.handleToOptionalRangeRelation(h.MEMBER,v):this.editQue.queType===h.DEPARTMENT&&this.selectedType==="departmantRelation"?this.handleToOptionalRangeRelation(h.DEPARTMENT,v):(this.currentEditSrv.targetQueList=[].concat(...v.map(q=>(q.queDisplayTitle=q.queTitle,[q]))),this.targetQueList=Rl(this.currentEditSrv.targetQueList,this.editQue.queType)),this.currentQues=this.getCurrentQues(),e||((this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")&&(this.selectedQueInfo=this.targetQueList.find(q=>q.queId===this.selectScopeRelations.displayedQueId)),this.selectedType==="dataRelation"&&(this.selectedQueInfo=this.targetQueList.find(q=>q.queId===this.queRelation.displayedQueId))),this.selectedQueInfo?this.getRelatedTableSubInfo(t):this.tableCellRules=[]});else{let f=t,v=this.isQLinker?(i=f.remoteLookupConfig)==null?void 0:i.resultFormatPath:(s=f.codeBlockConfig)==null?void 0:s.resultAliasPath,q=Yi(v),D;this.editQue.queType!==h.TABLE?D=q.filter(F=>F.aliasType===lt.BASIC):D=q.filter(F=>F.aliasType===lt.TABLE),this.currentEditSrv.targetQueList=q,this.targetQueList=D,this.getRelatedTableSubInfo(f)}}handleToOptionalRangeRelation(t,e){this.currentEditSrv.targetQueList=e.map(i=>(i.queDisplayTitle=i.queTitle,i)),this.targetQueList=this.currentEditSrv.targetQueList.reduce((i,s)=>{if(s.queType===t&&s.queId!==1&&i.push(s),s.subQuestions){let v=(s.subQuestions.filter(({queType:q})=>q===t)||[]).filter(({queId:q})=>q!==1);i.push(...v)}return i},[])}getRelatedTableSubInfo(t){var s;let e=this.selectedType==="dataRelation"?this.queRelation:this.selectScopeRelations,i=[];t.appKey?i=this.getRelatedTableSubQuestions(this.selectedQueInfo.queId):i=((s=this.selectedQueInfo)==null?void 0:s.subAlias.map(f=>({qlinkerAlias:f.qlinkerAlias,queTitle:f.qlinkerAlias,aliasId:f.aliasId})))||[],this.tableCellRules=e.tableMatchRules.filter(f=>i.find(v=>v[this.typeName.cell]===f[this.typeName.rule])).map(f=>({subQueId:f.subQueId,relatedSubQueId:f.relatedSubQueId,qlinkerAlias:f.qlinkerAlias,subQueTitle:this.getSubQueTitle(f.subQueId),relatedSubQueTitle:i.filter(v=>v[this.typeName.cell]===f[this.typeName.rule])[0].queTitle}))}relatedAppQueChange(t){this.limitMemOrDepChoiceScopeRelationUse();let e=this.currentEditSrv.targetQue;if(this.resetMatchRules(e,t)){let i=this.translateService.instant("all");this.modalHelper.confirm({qfTitle:`${i.confirmSwitch} ?`,qfContent:i.confirmSwitchHint,qfType:"danger"},()=>{this.queRelation.matchRules=[],this.setRelatedAppQue(t)},{closable:!1,maskClosable:!1,onCancel:()=>this.selectedQueInfo=e}).subscribe()}else this.setRelatedAppQue(t)}setRelatedAppQue(t){(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")&&(ie(t.queId)?(this.selectScopeRelations.relationType=this.isQLinker?ve.qLinker:ve.codeBlock,this.selectScopeRelations.aliasConfig.qlinkerAlias=t.qlinkerAlias,this.selectScopeRelations.aliasConfig.aliasId=t.aliasId,this.selectScopeRelations.qlinkerAlias=t.qlinkerAlias):(this.selectScopeRelations.relationType=ve.app,this.selectScopeRelations.queId=this.editQueId,this.selectScopeRelations.displayedQueId=t.queId,this.currentEditSrv.targetQue=t)),this.selectedType==="dataRelation"&&(ie(t.queId)?(this.queRelation.relationType=this.isQLinker?ve.qLinker:ve.codeBlock,this.queRelation.aliasConfig.qlinkerAlias=t.qlinkerAlias,this.queRelation.aliasConfig.aliasId=t.aliasId,this.queRelation.qlinkerAlias=t.qlinkerAlias):(this.queRelation.relationType=ve.app,this.queRelation.displayedQueInfo.queId=t.queId,this.queRelation.displayedQueInfo.queType=t.queType,this.queRelation.displayedQueId=t.queId,this.currentEditSrv.targetQue=t)),this.widgetChange.changed.emit()}resetMatchRules(t,e){return ie(t)||ie(t.supId)&&ie(e.supId)||t.supId&&e.supId&&t.supId===e.supId||t.supId&&ie(e.supId)?!1:this.queRelation.matchRules.length!==0}getCurrentQues(){let t=[];
1return this.appFormEditSrv.appFormData.formQues.forEach(e=>{e.forEach(i=>{let s=Ft(i);s.queId!==this.editQue.queId&&(s.queType===h.TABLE?s.subQuestions=s.subQuestions.filter(f=>f.queId!==this.editQue.queId):s.queType===h.SECTION&&s.innerQuestions.forEach(f=>f.forEach(v=>{let q=Ft(v);q.queType===h.TABLE&&(q.subQuestions=q.subQuestions.filter(D=>D.queId!==this.editQue.queId)),t.push(q)})),s.queType!==h.SECTION&&t.push(s))})}),t.push({queId:ue.APPLY_ID,queTitle:this.translateService.instant("widgets.applyId"),queType:h.NUMBER}),t.length>1?t:null}openFilterCondModal(){var f,v;if(!this.selectedApp){let q=this.translateService.instant("all.setTheAppAndQue2");this.qfMessageService.error(q);return}this.limitMemOrDepChoiceScopeRelationUse();let t;this.selectedType==="dataRelation"?t=this.queRelation.relationType?(f=this.queRelation)==null?void 0:f.relationType:ve.app:(this.selectedType==="departmantRelation"||this.selectedType==="memberRelation")&&(t=this.selectScopeRelations.relationType?(v=this.selectScopeRelations)==null?void 0:v.relationType:ve.app);let e;_o(this.editQue.supId)&&(e=this.editQue.supId);let i=this.appFormEditSrv.getMatchQueList(this.editQue),s=[];if(this.currentEditSrv.targetQueList.forEach(q=>{q.queType===h.SECTION?s.push(...q.innerQuestions):s.push(q)}),t===ve.qLinker)if(this.editQue.queType===h.TABLE){let q=[];s.forEach(D=>{D.aliasType===lt.BASIC?q.push(D):q.push(...D.subAlias)}),s=q}else s=s.filter(q=>q.aliasType===lt.BASIC);this.modalHelper.create(An,{targetQues:s.filter(q=>![h.UPLOAD,h.RICHTEXT].includes(q.queType)),currentQues:this.getCurrentQues(),relationType:t,relateQLinkerInfo:this.selectedType==="dataRelation"?this.queRelation.aliasConfig:this.selectScopeRelations.aliasConfig,currentQueSupId:e,matchQues:i,editQue:this.currentEditSrv.editQue,matchRules:this.selectedType==="dataRelation"?this.queRelation.matchRules:this.selectScopeRelations.matchRules,formula:this.selectedType==="dataRelation"?this.queRelation.matchRuleFormula:this.selectScopeRelations.matchRuleFormula,copyPasteCond:"relateQue",canMultipleMatch:!0,mode:{mode:this.editQue.queType===h.REFER?"simple":"advanced",defaultType:this.matchRuleDefaultType()},needCheckFormulaLoop:!0},{size:1e3,modalOptions:{size:"large",maskClosable:!1,title:this.translateService.instant("all.filterTheData"),footer:null,onOk:q=>{let D=tt(this.queRelation),F=tt(this.selectScopeRelations),{type:H,matchRule:_e,formula:Qe}=q.formValue,Xe=q.getSubmitErrors();if(Xe.length){for(let ct of Xe){let xe={noEmpty:"all.conditionValueIsRequired",numericOnly:"all.enterNumbers"};this.qfMessageService.error(this.translateService.instant(xe[ct]))}return!1}this.currentQues=this.getCurrentQues(),this.selectedType==="dataRelation"&&(this.queRelation.matchRules=_e,this.queRelation.matchRuleType=H,this.queRelation.matchRuleFormula=Qe,fn(this.queRelation,D)||this.change()),(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")&&(this.selectScopeRelations.matchRules=_e,this.selectScopeRelations.matchRuleType=H,this.selectScopeRelations.matchRuleFormula=Qe,fn(this.selectScopeRelations,F)||this.change())}}}).subscribe()}matchRuleDefaultType(){return this.selectedType==="dataRelation"?this.queRelation.matchRuleType:this.selectedType==="memberRelation"?this.selectScopeRelations.matchRuleType:1}initData(){this.appList=[],this.appFormEditSrv.getAppList().subscribe(t=>{var s,f;let e=this.selectedType==="memberRelation"?[]:this.appFormEditSrv.currentQueList.filter(v=>v.queId!==0&&[h.QLINKER,h.CODEBLOCK].includes(v.queType));this.appList=this.editQue.queType!==h.REFER?[...e,...t]:[...t];let i={queId:this.editQueId,displayedQueId:null,displayedQueInfo:null,relationType:ve.app,qlinkerAlias:null,aliasConfig:null,matchRules:[],tableMatchRules:[],matchRuleType:1};if(!this.queRelation&&this.selectedType==="dataRelation")this.appFormEditSrv.appFormData.questionRelations.push(i),this.selectedApp=null,this.selectedQueInfo=null;else if((this.selectedType==="memberRelation"||this.selectedType==="departmantRelation")&&!this.selectScopeRelations)this.appFormEditSrv.appFormData.selectScopeRelations.push(i),this.selectedApp=null,this.selectedQueInfo=null;else if(this.selectedType==="dataRelation"&&(!this.queRelation.relationType||this.queRelation.relationType===ve.app))this.queRelation.displayedQueInfo?(this.selectedApp=t.find(v=>v.appKey===this.queRelation.displayedQueInfo.appKey),this.relatedAppChange(this.selectedApp)):this.selectedApp=null;else if(this.selectedType==="memberRelation"||this.selectedType==="departmantRelation"){if(this.selectScopeRelations.displayedQueInfo){this.selectedApp=t.find(v=>this.selectScopeRelations.displayedQueInfo.appKey&&v.appKey===this.selectScopeRelations.displayedQueInfo.appKey),this.relatedAppChange(this.selectedApp);return}}else if(this.queRelation.aliasConfig){let v=e.find(F=>F.queId===this.queRelation.aliasConfig.queId);if(!v){this.selectedApp=null,this.selectedQueInfo=null;return}let q=((s=v.remoteLookupConfig)==null?void 0:s.resultFormatPath)||((f=v.codeBlockConfig)==null?void 0:f.resultAliasPath),D=Yi(q);this.selectedApp=v,this.queRelation.aliasConfig.qlinkerAlias&&(this.selectedQueInfo=D.find(F=>F[this.typeName.cell]===this.queRelation.aliasConfig[this.typeName.cell])),this.relatedAppChange(this.selectedApp)}else this.selectedApp=null})}getRelatedTableSubQuestions(t){let e=this.currentEditSrv.targetQueList.filter(i=>i.queId===t&&i.queType===h.TABLE);return e.length?e[0].subQuestions:[]}
1openTableRelationModal(){let t=this.selectedApp,e=this.selectedQueInfo;if(!t||!e){this.qfMessageService.error(this.translateService.instant("all.setTheAppAndQue2"));return}let i;if([h.QLINKER,h.CODEBLOCK].includes(t.queType))i=e.subAlias.map(s=>({qlinkerAlias:s.qlinkerAlias,queTitle:s.qlinkerAlias,aliasId:s.aliasId}));else if(i=this.getRelatedTableSubQuestions(this.selectedQueInfo.queId),!i.length)return;this.modalHelper.create(Za,{selectedApp:t,relatedQue:e,currentQue:this.editQue,initRelation:this.queRelation,relatedQueId:this.selectedQueInfo.queId,cells:i},{size:"large",modalOptions:{title:this.translateService.instant("additional.subfieldAssociation"),onOk:s=>{let f=[];s.updateData.tableMatchRules.forEach(D=>{let F=i.filter(H=>H[this.typeName.cell]===D[this.typeName.rule]);F.length>0&&f.push({subQueId:D.subQueId,relatedSubQueId:D.relatedSubQueId,qlinkerAlias:D.qlinkerAlias,subQueTitle:this.getSubQueTitle(D.subQueId),relatedSubQueTitle:F[0].queTitle})}),this.tableCellRules=f;let v=this.appFormEditSrv.appFormData.questionRelations,q=s.updateData;q&&(this.queRelation?v[v.indexOf(this.queRelation)].tableMatchRules=q.tableMatchRules:v.push(q),this.change())}}}).subscribe()}change(){this.widgetChange.changed.emit()}getSubQueTitle(t){return this.editQue.subQuestions.find(e=>(e.queId||e.queTempId)===t)?this.editQue.subQuestions.find(e=>(e.queId||e.queTempId)===t).queTitle:""}constructor(t,e,i,s,f,v,q){this.translateService=t,this.appFormEditSrv=e,this.currentEditSrv=i,this.modalHelper=s,this.widgetChange=f,this.route=v,this.qfMessageService=q,this._rootStore=re(Ct),this._takeUntilDestroyed=gi(),this.RelationType=ve,this.beingNil=ie,this.QueType=h,this.limitFunctionKey=Be,this.canAssociate=!0,this.selectedQueCompareFn=(D,F)=>D&&F?Qt(D.queId)&&Qt(F.queId)?D.queId===F.queId:Qt(D.aliasId)&&Qt(F.aliasId)?D.aliasId===F.aliasId:D.qlinkerAlias===F.qlinkerAlias:!1}ngOnInit(){this.curAppKey=this.route.snapshot.parent.parent.params.appKey,this.currentEditSrv.editQueChange.pipe(this._takeUntilDestroyed).subscribe(()=>{this.selectedApp&&this.relatedAppChange(this.selectedApp)})}};a.\u0275fac=function(e){return new(e||a)(T(X),T(ee),T(ke),T(vt),T(N),T(bo),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-dft-associate-data"]],inputs:{editQue:"editQue",selectedType:"selectedType"},decls:14,vars:24,consts:[["customSelected",""],[1,"widget-edit","dft-associate-set"],[1,"associate-set-item",3,"ngModelChange","qfShowSearch","qfPlaceHolder","ngModel"],[4,"ngFor","ngForOf"],[1,"associate-set-item",3,"ngModelChange","qfPlaceHolder","qfShowSearch","compareWith","qfCustomTemplate","ngModel"],["qfCustomContent","",3,"qfLabel","qfValue",4,"ngFor","ngForOf"],["class","qfont-gray-frequent",4,"ngIf"],["class","widget-edit",4,"ngIf"],[4,"ngIf"],[1,"dft-associate-set-sort",3,"isDftAssociate","targetQueListExternal"],[3,"qfLabel","qfValue",4,"ngIf"],[3,"qfLabel","qfValue"],["qfCustomContent","",3,"qfLabel","qfValue"],[1,"related-lablel"],[1,"content"],["qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",3,"qfTooltipTitle",4,"ngIf"],["qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",3,"qfTooltipTitle"],[1,"qfont-gray-frequent"],["qfHelpDocName","dftAssociateData"],[1,"widget-edit"],[3,"hintMsg"],["qf-button","","qfType","dashed",3,"click"],[3,"ques","currentQues","matchRules","formula","outsideStyle"],["class","results-wrapper cond-info-wrap",4,"ngIf"],[1,"results-wrapper","cond-info-wrap"],[1,"judge-type"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"qf-select",2),m(2,"translate"),O("ngModelChange",function(v){return _(s),E(i.selectedApp,v)||(i.selectedApp=v),C(v)}),y("ngModelChange",function(v){return _(s),C(i.relatedAppChange(v,!0))}),x(3,Nu,2,1,"ng-container",3),c(),p(4,"qf-select",4),m(5,"translate"),m(6,"translate"),O("ngModelChange",function(v){return _(s),E(i.selectedQueInfo,v)||(i.selectedQueInfo=v),C(v)}),y("ngModelChange",function(v){return _(s),C(i.relatedAppQueChange(v))}),x(7,Lu,7,8,"qf-option",5)(8,Wu,4,2,"ng-template",null,0,te),c(),x(10,Hu,6,6,"p",6),c(),x(11,ju,12,15,"div",7)(12,Gu,11,10,"div",8),b(13,"qf-set-associate-sort",9)}if(e&2){let s=W(9);r(),l("qfShowSearch",!0)("qfPlaceHolder",u(2,15,"all.relateApp")),I("ngModel",i.selectedApp),r(2),l("ngForOf",i.appList),r(),l("qfPlaceHolder",i.editQue.queType===i.QueType.TABLE?u(5,17,"all.relateTable"):u(6,19,"all.relateFiled"))("qfShowSearch",!0)("compareWith",i.selectedQueCompareFn)("qfCustomTemplate",s),I("ngModel",i.selectedQueInfo),r(3),l("ngForOf",i.targetQueList),r(3),l("ngIf",i.selectedQueInfo&&!!i.selectedQueInfo.supId&&i.selectedType==="dataRelation"),r(),l("ngIf",!(i.editQue.queType===i.QueType.TABLE&&Ce(21,Au,i.RelationType.qLinker,i.RelationType.codeBlock).includes(i.queRelation==null?null:i.queRelation.relationType))),r(),l("ngIf",i.editQue.queType===i.QueType.TABLE),r(),l("isDftAssociate",!0)("targetQueListExter
1nal",i.targetQueList)}},dependencies:[B,A,V,Q,oe,ne,K,ce,bi,G,Ge,Qn,pa,k,it],styles:[".results-wrapper[_ngcontent-%COMP%]{margin-top:10px}.cond-info-wrap[_ngcontent-%COMP%]{padding:5px 16px;font-weight:400;line-height:25px;color:#2b3441;background-color:#2b34410d}.cond-info-wrap[_ngcontent-%COMP%] .judge-type[_ngcontent-%COMP%]{color:#acb3bd}button[_ngcontent-%COMP%]{width:100%}.related-lablel[_ngcontent-%COMP%]{display:flex;align-items:center}.related-lablel[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;word-break:break-all;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.related-lablel[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-left:4px;font-size:16px;color:#acb3bd}.dft-associate-set-sort[_ngcontent-%COMP%] >.data-associate-set{margin-bottom:0}.dft-associate-set-sort[_ngcontent-%COMP%] >.data-associate-set .widget-edit-detail{padding:0}.widget-edit[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}"]});let n=a;return n})();function $u(n,a){if(n&1&&(b(0,"qf-option",6),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.value))("qfValue",o.queDefaultType)}}function Xu(n,a){if(n&1&&(j(0,7),b(1,"qf-address-base",8),U()),n&2){let o=d();l("formGroup",o.customDefaultValueGroup),r(),l("addressPrecision",o.data.addressPrecision)("status",o.EDIT_STATUS)}}function Yu(n,a){if(n&1&&(p(0,"qf-function-lock",9),b(1,"qf-dft-associate-data",10),c()),n&2){let o=d();r(),l("editQue",o.data)}}var er=(()=>{let a=class a{get data(){return this._question}set data(t){this.customDefaultValueGroup&&(!this._question||t&&t.queId!==this._question.queId)&&t.queDefaultValues&&this.customDefaultValueGroup.get("address").setValue(t.queDefaultValues.values),this._question=t}get editQue(){return this.currentEditSrv.editQue}constructor(t,e,i,s,f,v,q){this.formEditSrv=t,this.aclSrv=e,this.fb=i,this.widgetChange=s,this.modalInvokeService=f,this.currentEditSrv=v,this.appFormEditService=q,this.defaultValChange=new R,this.unsubscribe$=new fe,this.queDefaultTypes=new Map(aa.entries()),this.showEditAsosData=!1,this.CUSTOM=1,this.RELATE=2,this.EDIT_STATUS=1}ngOnInit(){this.formEditSrv.addressPrecisionChange.subscribe(e=>{e.queId===this.data.queId&&this.clearDftValue()});let t=this.data&&this.data.queDefaultValues?this.data.queDefaultValues.values:null;this.customDefaultValueGroup=this.fb.group({address:null}),this.customDefaultValueGroup.get("address").setValue(t),this.customDefaultValueGroup.get("address").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(e=>{let i=this.data.queId||this.data.queTempId,s=this.editQue.queId||this.editQue.queTempId;i===s&&(this.data.queDefaultValues={queId:this.editQue.queId||this.editQue.queTempId,queTitle:this.editQue.queTitle,queType:this.editQue.queType,values:e},this.defaultValChange.emit(this.data),this.triggerFormChange())}),this.showEditAsosData=this.aclSrv.canUseFunction(Be.dataAssociation)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}triggerFormChange(){this.widgetChange.changed.emit()}clearDftValue(){this.customDefaultValueGroup.get("address").setValue([])}clearAsosData(){let t=this.appFormEditService.appFormData.questionRelations.findIndex(e=>e.queId===this.data.queId||e.queId===this.data.queTempId);t!==-1&&this.appFormEditService.appFormData.questionRelations.splice(t,1)}
1changeDftType(){if(this.data.queDefaultType===1)this.clearAsosData();else if(this.data.queDefaultType===2){if(!this.showEditAsosData){this.modalInvokeService.openFunctionLimitModal(Be.assData);return}this.clearDftValue()}else this.clearAsosData();this.triggerFormChange()}};a.\u0275fac=function(e){return new(e||a)(T($e),T(ui),T(Gt),T(N),T(Ke),T(ke),T(ee))},a.\u0275cmp=P({type:a,selectors:[["qf-address-default-val-setting"]],inputs:{data:"data"},outputs:{defaultValChange:"defaultValChange"},decls:8,vars:7,consts:[[1,"widget-edit-share"],[1,"widget-edit-title"],[3,"ngModelChange","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"formGroup",4,"ngIf"],["func","assData",4,"ngIf"],[3,"qfLabel","qfValue"],[3,"formGroup"],["formControlName","address",3,"addressPrecision","status"],["func","assData"],["selectedType","dataRelation",3,"editQue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1),g(2),m(3,"translate"),c(),p(4,"qf-select",2),O("ngModelChange",function(f){return E(i.data.queDefaultType,f)||(i.data.queDefaultType=f),f}),y("ngModelChange",function(){return i.changeDftType()}),x(5,$u,2,4,"qf-option",3),c(),x(6,Xu,2,3,"ng-container",4)(7,Yu,2,1,"qf-function-lock",5),c()),e&2&&(r(2),w(u(3,5,"all.defaultContent")),r(2),I("ngModel",i.data.queDefaultType),r(),l("ngForOf",i.queDefaultTypes.get(i.data.queType)),r(),l("ngIf",i.data.queDefaultType===i.CUSTOM),r(),l("ngIf",i.data.queDefaultType===i.RELATE&&i.showEditAsosData))},dependencies:[B,A,V,ge,Q,Ut,Kt,oe,ne,xt,Xa,Bi,k],styles:[".widget-edit-share[_ngcontent-%COMP%] .qflow-date-time-picker[_ngcontent-%COMP%]{position:relative;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .date-container[_ngcontent-%COMP%]{margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .select-dft-type[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;height:34px;padding:0 10px;margin-bottom:10px;cursor:pointer;background-color:#f9fafc;border-radius:3px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .notify[_ngcontent-%COMP%]{color:#fb9337;color:var(--brand-primary-base, #fb9337)}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data.asos-empty[_ngcontent-%COMP%]{justify-content:center}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .asos-setted[_ngcontent-%COMP%]{width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.default-value-hint[_ngcontent-%COMP%]{margin:-4px 0 8px;font-size:13px}.table-asos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.relation-info-wrap[_ngcontent-%COMP%]{position:relative;padding:10px 15px;margin-top:10px;background:#fafafb;border-radius:3px}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{position:absolute;top:10px;right:8px;cursor:pointer}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]:hover{color:#fb4b51}.relation-info-wrap[_ngcontent-%COMP%] .relation-info-title[_ngcontent-%COMP%]{color:#b0b0b9}.file-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;margin-bottom:10px;color:#494f57;border:1px solid #f9fafc;border-radius:3px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%]{width:24px;height:24px;margin-right:6px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;vertical-align:baseline}.file-item[_ngcontent-%COMP%] .file-item-name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item[_ngcontent-%COMP%] .iconfont.del-icon[_ngcontent-%COMP%]{color:#acb3bd;cursor:pointer;opacity:0;transition:all ease .2s}.file-item[_ngcontent-%COMP%] .file-item-progress[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;height:2px;background:#ffca6b;transition:width .3s}.file-item[_ngcontent-%COMP%]:hover .iconfont.del-icon[_ngcontent-%COMP%]{opacity:1}.table-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .refer-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .upload[_ngcontent-%COMP%]{width:100%}qf-select[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}"]});let n=a;return n})();var Vp=()=>["dept","dynamic"],Qp=()=>["currentDepartment"],Ap=n=>({showDynamicType:n}),Zu=(n,a)=>({title:"base.customDeptRange",tabList:n,dynamicConfig:a}),ef=(n,a,o)=>({tabList:n,contactSelectScope:a,ignoreContactSelectScope:!1,dynamicConfig:o});function tf(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",5),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.data.deptDftValue,e)||(i.data.deptDftValue=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d(2);return C(i.change(e))}),c()}if(n&2){let o=d(2);l("config",Ce(6,Zu,Y(2,Vp),at(4,Ap,Y(3,Qp)))),I("ngModel",o.data.deptDftValue)}}function nf(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",5),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.data.deptDftValue,e)||(i.data.deptDftValue=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d(2);return C(i.change(e))}),c()}if(n&2){let o=d(2);l("config",an(6,ef,Y(2,Vp),o.data.deptSelectScope,at(4,Ap,Y(3,Qp)))),I("ngModel",o.data.deptDftValue)}}function of(n,a){if(n&1&&(p(0,"div",3),x(1,tf,1,9,"qf-custom-range-frame",4)(2,nf,1,10,"ng-template",null,0,te),c()),n&2){let o=W(3),t=d();r(),l("ngIf",t.data.deptSelectScopeType===t.DeptSelectScopeType.ALL)("ngIfElse",o)}}var Fp=(()=>{let a=class a{constructor(){this.limitFunctionKey=Be,this.DeptSelectScopeType=ln,this.dataChange=new R}get data(){return this._data}set data(t){this._data=t}change(t){this.dataChange.emit(this.data)}};a.\u0275fac=function(e){return new(e||a)}
1,a.\u0275cmp=P({type:a,selectors:[["qf-default-depart-scope"]],inputs:{data:"data",widgetInfo:"widgetInfo"},outputs:{dataChange:"dataChange"},decls:2,vars:1,consts:[["customSelectScopeTpl",""],[1,"dynamic-director-edit"],["class","widget-edit",4,"ngIf"],[1,"widget-edit"],[3,"config","ngModel","ngModelChange",4,"ngIf","ngIfElse"],[3,"ngModelChange","config","ngModel"]],template:function(e,i){e&1&&(p(0,"div",1),x(1,of,4,2,"div",2),c()),e&2&&(r(),l("ngIf",i.data.queDefaultType===1))},dependencies:[A,V,Q,Yt],styles:[".p-sm[_ngcontent-%COMP%]{padding:6px 10px 10px}p[_ngcontent-%COMP%]{margin-bottom:7px}.b-b[_ngcontent-%COMP%]{border-bottom:1px solid #f4f6f9}.panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;height:35px;padding:0 10px}.panel-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:8px;font-size:13px}"]});let n=a;return n})();var pf=(n,a)=>[n,a];function cf(n,a){n&1&&(b(0,"qf-hint-msg",14),m(1,"translate")),n&2&&l("hintMsg",u(1,1,"widgetHelp.defaultValue"))}function df(n,a){if(n&1&&b(0,"qf-hint-msg",14),n&2){d();let o=W(8);l("hintMsg",o)}}function mf(n,a){n&1&&(g(0),m(1,"translate"),b(2,"br"),g(3),m(4,"translate"),b(5,"br")(6,"a",15)),n&2&&(M(" ",u(1,2,"widgetHelp.defaultValue")," "),r(3),M(" ",u(4,4,"all.referDefaultValue")," "))}function uf(n,a){if(n&1&&(p(0,"p",16),g(1),m(2,"translate"),c()),n&2){let o=d(3);r(),M(" ",u(2,1,o.defaultValueHint)," ")}}function ff(n,a){if(n&1&&(b(0,"qf-option",17),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.value))("qfValue",o.queDefaultType)}}function gf(n,a){if(n&1){let o=S();j(0),p(1,"p",9)(2,"span"),g(3),m(4,"translate"),c(),x(5,cf,2,3,"qf-hint-msg",10)(6,df,1,1,"qf-hint-msg",10)(7,mf,7,6,"ng-template",null,0,te),c(),x(9,uf,3,3,"p",11),p(10,"qf-select",12),O("ngModelChange",function(e){_(o);let i=d(2);return E(i.data.queDefaultType,e)||(i.data.queDefaultType=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.changeDftType())}),x(11,ff,2,4,"qf-option",13),c(),U()}if(n&2){let o=d(2);r(3),w(u(4,6,"widgets.defaultTitle")),r(2),l("ngIf",o.data.queType!==o.QueType.REFER),r(),l("ngIf",o.data.queType===o.QueType.REFER),r(3),l("ngIf",o.defaultValueHint),r(),I("ngModel",o.data.queDefaultType),r(),l("ngForOf",o.queDefaultTypes.get(o.data.queType))}}function hf(n,a){if(n&1){let o=S();p(0,"div",26)(1,"nz-date-picker",27),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.data.queDefaultValue,e)||(i.data.queDefaultValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.dateDftValChange())}),c()()}if(n&2){let o=d(3);r(),l("nzMode",o.DATE_MODE_TYPE_MAP.get(o.data.dateType))("nzPlaceHolder",u(2,5,"widgets.selectDate"))("nzFormat",o.DATE_FORMAT_MAP.get(o.data.dateType))("nzShowTime",o.DATE_SHOWTIME_MAP.get(o.data.dateType)),I("ngModel",o.data.queDefaultValue)}}function _f(n,a){if(n&1){let o=S();p(0,"input",28),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.data.queDefaultValue,e)||(i.data.queDefaultValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("placeholder",u(1,2,"widgets.defaultContent")),I("ngModel",o.data.queDefaultValue)}}function Cf(n,a){if(n&1){let o=S();p(0,"input",29),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.data.queDefaultValue,e)||(i.data.queDefaultValue=e),C(e)}),y("blur",function(){_(o);let e=d(3);return C(e.onNumberChange())})("ngModelChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("placeholder",u(1,2,"widgets.defaultContent")),I("ngModel",o.data.queDefaultValue)}}function yf(n,a){if(n&1){let o=S();p(0,"textarea",30),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.data.queDefaultValue,e)||(i.data.queDefaultValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("placeholder",u(1,2,"widgets.defaultContent")),I("ngModel",o.data.queDefaultValue)}}function vf(n,a){if(n&1){let o=S();p(0,"div",31)(1,"button",32),y("click",function(){_(o);let e=d(3);return C(e.openTableDftValueSettingModal())}),g(2),m(3,"translate"),c()()}n&2&&(r(2),M(" ",u(3,1,"all.customizetheDefaultContent")," "))}function xf(n,a){if(n&1&&(b(0,"img",43),m(1,"fileIcon")),n&2){let o=d().$implicit;l("src",u(1,1,o.url),io)}}function bf(n,a){if(n&1&&b(0,"div",44),n&2){let o=d().$implicit;We("width",o.percent+"%")}}function Tf(n,a){if(n&1){let o=S();p(0,"div",37)(1,"div",38),x(2,xf,2,3,"img",39),c(),p(3,"span",40),g(4),c(),p(5,"i",41),y("click",function(){let e=_(o).index,i=d(4);return C(i.removeFileItem(e))}),g(6," \uE6AE "),c(),x(7,bf,1,2,"div",42),c()}if(n&2){let o=a.$implicit;r(2),l("ngIf",o.status==="done"),r(2),w(o.name),r(3),l("ngIf",o.status==="uploading")}}function Sf(n,a){if(n&1){let o=S();j(0),p(1,"qf-upload-v2",33),O("fileListChange",function(e){_(o);let i=d(3);return E(i.fileList,e)||(i.fileList=e),C(e)}),y("qfChange",function(e){_(o);let i=d(3);return C(i.uploadFileChange(e))}),p(2,"button",34),g(3),m(4,"translate"),c()(),p(5,"div",35),x(6,Tf,8,3,"div",36),c(),U()}if(n&2){let o=d(3);r(),l("qfAccept",o.fileTypes)("qfMultiple",!0)("countLimit",o.data.maxFileLimitStatus?o.data.maxFileLimit:null)("maxSize",o.data.fileSize)("pathType",o.PathType.Upload),I("fileList",o.fileList),r(2),M(" ",u(4,8,"widgets.uploadFile")," "),r(3),l("ngForOf",o.fileList)}}function wf(n,a){if(n&1&&b(0,"qf-option",17),n&2){let o=a.$implicit;l("qfLabel",o.optValue)("qfValue",o.tempId)}}function Mf(n,a){if(n&1){let o=S();p(0,"qf-select",45),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d(3);return E(i.choiceDftValue,e)||(i.choiceDftValue=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d(3);return C(i.choiceDftValueChange(e))}),x(2,wf,1,2,"qf-option",13),c()}if(n&2){let o=d(3);l("qfPlaceHolder",u(1,4,"all.select"))("qfMode",o.data.queType===o.QueType.CHECKBOX?"multiple":"default"),I("ngModel",o.choiceDftValue),r(2),l("ngForOf",o.data.options)}}function qf(n,a){if(n&1){let o=S();p(0,"qf-default-member-scope",46),y("dataChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("data",o.data)}}function If(n,a){if(n&1){let o=S();p(0,"qf-default-depart-scope",46),y("dataChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("data",o.data)}}function Ef(n,a){if(n&1){let o=S();p(0,"qf-default-rich-text",47),m(1,"translate"),m(2,"translate"),y("dataChange",function(){_(o);let e=d(3);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(3);l("placeholder",u(1,4,"widgets.inputContent"))("title",u(2,6,"widgets.editDefaultContent"))("data",o.data)("pathType",o.PathType.RichText)}}function Of(n,a){if(n&1&&(j(0),x(1,hf,3,7,"div",18)(2,_f,2,4,"input",19)(3,Cf,2,4,"
1input",20)(4,yf,2,4,"textarea",21)(5,vf,4,3,"div",22)(6,Sf,7,10,"ng-container",4)(7,Mf,3,6,"qf-select",23)(8,qf,1,1,"qf-default-member-scope",24)(9,If,1,1,"qf-default-depart-scope",24)(10,Ef,3,8,"qf-default-rich-text",25),U()),n&2){let o=d(2);r(),l("ngIf",o.data.queType===o.QueType.DATE),r(),l("ngIf",o.simpleTextQueType.includes(o.data.queType)),r(),l("ngIf",o.data.queType===o.QueType.NUMBER),r(),l("ngIf",o.data.queType===o.QueType.TEXTAREA),r(),l("ngIf",o.data.queType===o.QueType.TABLE),r(),l("ngIf",o.data.queType===o.QueType.UPLOAD),r(),l("ngIf",o.choiceQueType.includes(o.data.queType)),r(),l("ngIf",o.data.queType===o.QueType.MEMBER),r(),l("ngIf",o.data.queType===o.QueType.DEPARTMENT),r(),l("ngIf",o.data.queType===o.QueType.RICHTEXT)}}function Pf(n,a){if(n&1&&(p(0,"qf-function-lock",48),b(1,"qf-dft-associate-data",49),c()),n&2){let o=d(2);r(),l("editQue",o.data)}}function Df(n,a){if(n&1){let o=S();p(0,"qf-function-lock",50)(1,"div",51),y("click",function(){_(o);let e=d(2);return C(e.openFormulaModal())}),p(2,"span",52),g(3),m(4,"translate"),c()()()}n&2&&(r(3),w(u(4,1,"all.formulaSettings")))}function kf(n,a){n&1&&b(0,"i",55)}function Vf(n,a){if(n&1){let o=S();j(0),p(1,"p",9)(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",14),m(6,"translate"),c(),p(7,"div",53)(8,"nz-range-picker",54),m(9,"translate"),m(10,"translate"),O("ngModelChange",function(e){_(o);let i=d(2);return E(i._dateRange,e)||(i._dateRange=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.setStartEndDateDft())}),c(),x(11,kf,1,0,"ng-template",null,1,te),c(),U()}if(n&2){let o=W(12),t=d(2);r(3),w(u(4,8,"widgets.defaultTitle")),r(2),l("hintMsg",u(6,10,"widgetHelp.defaultValue")),r(3),l("nzMode",t.DATE_MODE_TYPE_MAP.get(t.data.dateType))("nzFormat",t.DATE_FORMAT_MAP.get(t.data.dateType))("nzShowTime",t.DATE_SHOWTIME_MAP.get(t.data.dateType))("nzPlaceHolder",Ce(16,pf,u(9,12,"widgets.startTime"),u(10,14,"widgets.endTime")))("nzSuffixIcon",o),I("ngModel",t._dateRange)}}function Qf(n,a){if(n&1&&b(0,"qf-description-character-edit",56),n&2){let o=d(2);l("data",o.data)}}function Af(n,a){if(n&1){let o=S();p(0,"qf-address-default-val-setting",57),y("defaultValChange",function(){_(o);let e=d(2);return C(e.queDefaultValueChange())}),c()}if(n&2){let o=d(2);l("data",o.data)}}function Ff(n,a){if(n&1&&(p(0,"div",3),x(1,gf,12,8,"ng-container",4)(2,Of,11,10,"ng-container",4)(3,Pf,2,1,"qf-function-lock",5)(4,Df,5,3,"qf-function-lock",6)(5,Vf,13,19,"ng-container",4)(6,Qf,1,1,"qf-description-character-edit",7)(7,Af,1,1,"qf-address-default-val-setting",8),c()),n&2){let o=d();r(),l("ngIf",!o.hasUnicDefaultValueControl(o.data.queType)),r(),l("ngIf",o.data.queDefaultType===1),r(),l("ngIf",o.data.queDefaultType===2&&!o.hasUnicDefaultValueControl(o.data.queType)&&o.canAssociate),r(),l("ngIf",o.data.queDefaultType===3),r(),l("ngIf",o.data.queType===14),r(),l("ngIf",o.data.queType===o.QueType.DESCRIPTION),r(),l("ngIf",o.data.queType===o.QueType.ADDRESS)}}var tr=(()=>{let a=class a{set data(t){if(this._data=t,this.setDefaultValueHint(),this.choiceQueType.includes(this.data.queType)){this.refreshChoiceTempId(),this.widgetChange.syncForm$.emit({type:"option",question:this.data});let e=this.data.options.filter(i=>i.beingDefault).map(i=>i.tempId);this.choiceDftValue=this.data.queType===h.CHECKBOX?e:e[0]}}get data(){return this._data}hasUnicDefaultValueControl(t){return[h.DESCRIPTION,h.ADDRESS].includes(t)}setDefaultValueHint(){switch(this.data.queType){case h.TABLE:this.defaultValueHint="widgets.tableDefaultValueHint";break;case h.MEMBER:this.defaultValueHint="widgets.memberDefaultValueHint";break;case h.DEPARTMENT:this.defaultValueHint="widgets.departDefaultValueHint";break;default:this.defaultValueHint=null;break}}getFormulaQueList(){let t=[],e=i=>{let s=[];return i.forEach(f=>{if(f.queId===this.data.queId)return;let v=Ft(f);v.queType===h.TABLE&&(v.subQuestions=v.subQuestions.filter(q=>q.queId!==this.data.queId)),v.queType===h.SECTION?v.innerQuestions.forEach(q=>{s.push(...e(q))}):s.push(v)}),s};this.appFormEditService.appFormData.formQues.forEach(i=>{t.push(...e(i))}),this.formulaQueList=t.filter(i=>!sp.includes(i.queType))}openFormulaModal(){this.getFormulaQueList(),this.modalHelper.create(np,{fields:ap(this.formulaQueList),formulaValue:this.data.queDefaultValue,formualFunctions:op(this.translateService.currentLang),editorTitle:this.data.queTitle,currentField:this.data,validators:[rp(this.data.queId,this.appFormEditService.appFormData),lp()]},{size:1e3,modalOptions:{maskClosable:!1,size:"large",title:this.translateService.instant("all.calculateByFormula"),onOk:t=>{let e=t.getValidatorResult();return e&&this.handleFormula(t.formulaValue),e}}}).subscribe()}constructor(t,e,i,s,f,v,q){this.appFormEditService=t,this.currentEditSrv=e,this.widgetChange=i,this.translateService=s,this.modalInvokeService=f,this.modalHelper=v,this.messageService=q,this.rootStore=re(Ct),this.DATE_MODE_MAP=Ki,this.DATE_MODE_TYPE_MAP=Mo,this.DATE_FORMAT_MAP=ka,this.DATE_SHOWTIME_MAP=qo,this.unsubscribe$=new fe,this.QueType=h,this.PathType=rt,this.canAssociate=!0,this.simpleTextQueType=[h.INPUT,h.ENCRYPTED_TEXT,h.EMAIL,h.PHONE,h.LINK],this.choiceQueType=[h.SELECT,h.RADIO,h.CHECKBOX],this.queDefaultTypes=new Map(aa.entries()),this._dateRange=[],this.formulaQueList=[],this.defaultValChange=new R,this.fileList=[],this.fileTypes=[],this.widgetChange.choiceOptChange.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.refreshChoiceTempId()}),this.widgetChange.dataTypeChanged.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.data.queDefaultType===1&&this.data.queDefaultValue&&(this.refreshDateType(),this.queDefaultValueChange())}),this.widgetChange.fileSettingChange.pipe(ae(this.unsubscribe$)).subscribe(D=>{this.fileTypes=this.getFileTypes(),D==="type"&&this.fileTypes.length>0&&(this.fileList=this.fileList.filter(F=>this.fileTypes.includes(F.type))),D==="size"&&(this.fileList=this.fileList.filter(F=>F.size/1024/1024<this.data.fileSize)),this.setFileQueDefaultValues(),this.queDefaultValueChange()})}ngOnInit(){this.getFormulaQueList()}ngOnChanges(){this.data.queType===h.DATE_RANGE&&(this._dateRange=Oe(this.data.queDefaultValue)?[]:this.data.queDefaultValue.split("~")),this.data.queType===h.UPLOAD&&(this.fileTypes=this.getFileTypes(),this.fileList=Oe(this.data.queDefaultValues)?[]:this.data.queDefaultValues.values.map(t=>({url:t.value,name:t.otherInfo,type:go(t.otherInfo),percent:100,status:"done"})))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}change(){this.widgetChange.changed.emit()}
1refreshDateType(){if(this.data.queDefaultValue){if(this.data.queType===h.DATE)this.data.queDefaultValue=dn(this.data.queDefaultValue,Ki.get(this.data.dateType));else if(this.data.queType===h.DATE_RANGE){let[t,e]=this._dateRange;t=dn(t,Ki.get(this.data.dateType)),e=dn(e,Ki.get(this.data.dateType)),this._dateRange=[t,e],this.data.queDefaultValue=`${t}~${e}`}this.defaultValChange.emit(this.data)}}dateDftValChange(){this.refreshDateType(),this.queDefaultValueChange()}queDefaultValueChange(){this.change(),this.defaultValChange.emit(this.data)}onNumberChange(){this.data.queDefaultValue!==""&&(/^-?([0-9]{1,}([.][0-9]*)?)$/.test(this.data.queDefaultValue)?this.data.canDecimal&&!Oe(this.data.decimalDigit)&&(this.data.queDefaultValue=ol(this.data.queDefaultValue,this.data.decimalDigit)):this.data.queDefaultValue=""),this.queDefaultValueChange()}setStartEndDateDft(){if(this._dateRange.length!==2)this.data.queDefaultValue=null;else{let t=ka.get(this.data.dateType);this.data.queDefaultValue=`${dn(this._dateRange[0],t)}~${dn(this._dateRange[1],t)}`}this._dateRange=this.data.queDefaultValue.split("~"),this.queDefaultValueChange()}
1changeDftType(){if(this.clearDftValue(),this.data.queDefaultType===Sn.CUSTOM)this.clearAsosData();else if(this.data.queDefaultType===Sn.RELATE){if(this.rootStore.workspaceInfo().accountLevel<Mt.AIR){this.canAssociate=!1,this.modalInvokeService.openFunctionLimitModal("assData");return}switch(this.data.queType){case h.UPLOAD:{this.fileList=[],this.setFileQueDefaultValues();break}}}else if(this.data.queDefaultType===Sn.FORMULA){if(this.rootStore.workspaceInfo().accountLevel<Mt.AIR){this.modalInvokeService.openFunctionLimitModal("formula").afterOpen.subscribe(()=>{this.data.queDefaultType=1,this.clearAsosData()});return}this.openFormulaModal(),this.clearAsosData()}this.change(),this.queDefaultValueChange()}refreshChoiceTempId(){this.data.options.forEach(t=>t.tempId=t.tempId||this.widgetChange.optionTempId--)}choiceDftValueChange(t){this.data.options.forEach(e=>{let i=Array.isArray(t)?t.includes(e.tempId):e.tempId===t;e.beingDefault=i,e.checked=i}),this.queDefaultValueChange()}clearChoiceDftValue(){this.choiceDftValue=null,this.data.options.forEach(t=>{t.checked=!1,t.beingDefault=!1})}clearDftValue(){this.data.queDefaultValue=null,this.choiceQueType.includes(this.data.queType)&&this.clearChoiceDftValue()}clearAsosData(){let t=-1;this.appFormEditService.appFormData.questionRelations.every((e,i)=>e.queId===this.data.queId||e.queId===this.data.queTempId?(t=i,!1):!0),t!==-1&&this.appFormEditService.appFormData.questionRelations.splice(t,1)}handleFormula(t){this.data.queDefaultValue=t,this.change()}openTableDftValueSettingModal(){this.modalHelper.create(Ka,{currentQue:this.data},{size:700,modalOptions:{title:this.translateService.instant("all.setTheDefaultContent"),onOk:t=>{let e=t.getTableDftValue();this.data.queDefaultValues=e.length>0?{queId:this.data.queId||this.data.queTempId,queTitle:this.data.queTitle,queType:this.data.queType,tableValues:e}:null,this.widgetChange.syncForm$.emit({type:"tableDefault",question:this.data}),this.change()}}}).subscribe()}getSubQueTitle(t){return this.data.subQuestions.find(e=>(e.queId||e.queTempId)===t)?this.data.subQuestions.find(e=>(e.queId||e.queTempId)===t).queTitle:""}setFileQueDefaultValues(){this.data.queDefaultValues=this.fileList.length>0?{queId:this.data.queId||this.data.queTempId,queTitle:this.data.queTitle,values:this.fileList.map(t=>({value:t.url,otherInfo:t.name}))}:null}getFileTypes(){let t=[];return this.data.fileType.forEach(e=>{isNaN(Number(e))?t.push(e):t.push(...vo[Number(e)].types)}),t}uploadFileChange(t){switch(t.type){case"success":this.setFileQueDefaultValues(),this.queDefaultValueChange();break;case"error":this.fileList=this.fileList.filter(e=>e.lastModified!==t.file.lastModified),t.file.error&&this.messageService.error(t.file.error);break;default:break}}removeFileItem(t){this.fileList.splice(t,1),this.setFileQueDefaultValues(),this.queDefaultValueChange()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(ke),T(N),T(X),T(Ke),T(vt),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-dft-val-edit"]],inputs:{data:"data"},outputs:{defaultValChange:"defaultValChange"},features:[Re],decls:1,vars:1,consts:[["referDefaultValue",""],["dateIconTpl",""],["class","widget-edit-share",4,"ngIf"],[1,"widget-edit-share"],[4,"ngIf"],["func","assData",4,"ngIf"],["func","formula",4,"ngIf"],[3,"data",4,"ngIf"],[3,"data","defaultValChange",4,"ngIf"],[1,"widget-edit-title"],[3,"hintMsg",4,"ngIf"],["class","default-value-hint qfont-gray-frequent",4,"ngIf"],[1,"select-dft-type",3,"ngModelChange","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"hintMsg"],["qfHelpDocName","referDftDetail"],[1,"default-value-hint","qfont-gray-frequent"],[3,"qfLabel","qfValue"],["class","qflow-date-time-picker",4,"ngIf"],["qf-input","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["qf-input","",3,"placeholder","ngModel","ngModelChange","blur",4,"ngIf"],["qf-input","","rows","4",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["class","table-dft-value-container",4,"ngIf"],["qfAllowClear","","style","width: 100%",3,"qfPlaceHolder","qfMode","ngModel","ngModelChange",4,"ngIf"],[3,"data","dataChange",4,"ngIf"],[3,"placeholder","title","data","pathType","dataChange",4,"ngIf"],[1,"qflow-date-time-picker"],[2,"width","100%",3,"ngModelChange","nzMode","nzPlaceHolder","nzFormat","nzShowTime","ngModel"],["qf-input","",3,"ngModelChange","placeholder","ngModel"],["qf-input","",3,"ngModelChange","blur","placeholder","ngModel"],["qf-input","","rows","4",3,"ngModelChange","placeholder","ngModel"],[1,"table-dft-value-container"],["qf-button","","qfType","dashed",3,"click"],[2,"width","100%",3,"fileListChange","qfChange","qfAccept","qfMultiple","countLimit","maxSize","pathType","fileList"],["qf-button","","qfType","dashed",1,"upload",2,"margin-bottom","10px"],[1,"file-list-wrapper"],["class","file-item",4,"ngFor","ngForOf"],[1,"file-item"],[1,"file-item-thumb"],[3,"src",4,"ngIf"],[1,"file-item-name"],[1,"iconfont","del-icon",3,"click"],["class","file-item-progress",3,"width",4,"ngIf"],[3,"src"],[1,"file-item-progress"],["qfAllowClear","",2,"width","100%",3,"ngModelChange","qfPlaceHolder","qfMode","ngModel"],[3,"dataChange","data"],[3,"dataChange","placeholder","title","data","pathType"],["func","assData"],["selectedType","dataRelation",1,"table-asos-container",3,"editQue"],["func","formula"],[1,"set-asos-data","asos-empty",3,"click"],[1,"n
1otify"],[1,"date-container"],[2,"width","100%",3,"ngModelChange","nzMode","nzFormat","nzShowTime","nzPlaceHolder","nzSuffixIcon","ngModel"],["qf-icon","","qfName","ex-date"],[3,"data"],[3,"defaultValChange","data"]],template:function(e,i){e&1&&x(0,Ff,8,7,"div",2),e&2&&l("ngIf",i.data)},dependencies:[B,A,le,V,Q,Ro,No,he,oe,ne,K,ce,G,wi,Ge,xt,Fa,$a,er,Wn,Bi,Fp,k,Vo],styles:[".widget-edit-share[_ngcontent-%COMP%] .qflow-date-time-picker[_ngcontent-%COMP%]{position:relative;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .date-container[_ngcontent-%COMP%]{margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .select-dft-type[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;height:34px;padding:0 10px;margin-bottom:10px;cursor:pointer;background-color:#f9fafc;border-radius:3px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .notify[_ngcontent-%COMP%]{color:#fb9337;color:var(--brand-primary-base, #fb9337)}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data.asos-empty[_ngcontent-%COMP%]{justify-content:center}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .asos-setted[_ngcontent-%COMP%]{width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.default-value-hint[_ngcontent-%COMP%]{margin:-4px 0 8px;font-size:13px}.table-asos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.relation-info-wrap[_ngcontent-%COMP%]{position:relative;padding:10px 15px;margin-top:10px;background:#fafafb;border-radius:3px}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{position:absolute;top:10px;right:8px;cursor:pointer}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]:hover{color:#fb4b51}.relation-info-wrap[_ngcontent-%COMP%] .relation-info-title[_ngcontent-%COMP%]{color:#b0b0b9}.file-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;margin-bottom:10px;color:#494f57;border:1px solid #f9fafc;border-radius:3px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%]{width:24px;height:24px;margin-right:6px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;vertical-align:baseline}.file-item[_ngcontent-%COMP%] .file-item-name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item[_ngcontent-%COMP%] .iconfont.del-icon[_ngcontent-%COMP%]{color:#acb3bd;cursor:pointer;opacity:0;transition:all ease .2s}.file-item[_ngcontent-%COMP%] .file-item-progress[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;height:2px;background:#ffca6b;transition:width .3s}.file-item[_ngcontent-%COMP%]:hover .iconfont.del-icon[_ngcontent-%COMP%]{opacity:1}.table-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .refer-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .upload[_ngcontent-%COMP%]{width:100%}"]});let n=a;return n})();function Nf(n,a){if(n&1&&(p(0,"ul")(1,"li")(2,"span"),g(3),m(4,"translate"),b(5,"a",5),c()()()),n&2){let o=d();r(3),M(" ",u(4,2,o.des)," "),r(2),l("qfHelpDocName",o.descUrl)}}var Ji=(()=>{let a=class a{constructor(){this.bulkEditValue="",this.openBulkEdit=!1,this.closeModal=new R,this.ensure=new R}ngOnInit(){this.des||(this.des="all.bulkHint");let t="";this.bulkEditOptions!==void 0&&(this.bulkEditOptions.length!==0?(this.bulkEditOptions.forEach(e=>{e.beingOtherOpt||(t+=`${e.optValue} 2`)}),this.bulkEditValue=t):this.bulkEditValue="")}ngOnChanges(){this.ngOnInit()}handleBulkPanel(){this.closeModal.emit();let t=this.bulkEditValue.split(` 3`).filter(e=>e&&e.trim()).map(e=>e.slice(0,500));this.ensure.emit(t)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-bulk-edit"]],inputs:{openBulkEdit:"openBulkEdit",bulkEditOptions:"bulkEditOptions",des:"des",descUrl:"descUrl"},outputs:{closeModal:"closeModal",ensure:"ensure"},features:[Re],decls:6,vars:6,consts:[["size","medium",3,"qfOnCancel","qfOnOk","title","visible","closable"],[4,"qfModalReminder"],[1,"bulk-edit-layer"],[1,"bulk-edit"],["qf-input","","qfAutofocus","","name","bulkEdit",3,"ngModelChange","ngModel"],[3,"qfHelpDocName"]],template:function(e,i){e&1&&(p(0,"qf-modal",0),m(1,"translate"),y("qfOnCancel",function(){return i.closeModal.emit()}
3)("qfOnOk",function(){return i.handleBulkPanel()}),x(2,Nf,6,4,"ul",1),p(3,"div",2)(4,"div",3)(5,"textarea",4),O("ngModelChange",function(f){return E(i.bulkEditValue,f)||(i.bulkEditValue=f),f}),c()()()()),e&2&&(l("title",u(1,4,"widgets.bulkEdit"))("visible",i.openBulkEdit)("closable",!0),r(5),I("ngModel",i.bulkEditValue))},dependencies:[le,V,Q,he,hi,Io,Ge,Po,k],styles:[".bulk-edit-layer[_ngcontent-%COMP%]{margin-top:16px}.bulk-edit-layer[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;height:390px;padding:8px;font-size:13px;resize:none;outline:none}.modal-dialog[_ngcontent-%COMP%]{margin:100px auto}"]});let n=a;return n})();function Bf(n,a){if(n&1&&b(0,"qf-option",14),n&2){let o=a.$implicit;l("qfLabel",o.queTitle)("qfValue",o.queTempId)}}function Lf(n,a){if(n&1){let o=S();p(0,"tr",10)(1,"td",11),g(2),c(),p(3,"td",11)(4,"qf-select",12),m(5,"translate"),O("ngModelChange",function(e){let i=_(o).$implicit;return E(i.linkQueIds,e)||(i.linkQueIds=e),C(e)}),y("qfOpenChange",function(e){_(o);let i=d();return C(i.showField(e))}),x(6,Bf,1,2,"qf-option",13),c()()()}if(n&2){let o=a.$implicit,t=d();r(2),w(o.optValue),r(2),l("qfPlaceHolder",u(5,4,"widgets.select")),I("ngModel",o.linkQueIds),r(2),l("ngForOf",t.canAddQuestions)}}var zi=(()=>{let a=class a{get logicalFormData(){return this._data}set logicalFormData(t){this._data=t,this.dataChange.emit(t)}constructor(t,e,i){this.widgetChange=t,this.modalRef=e,this.appFormEditService=i,this.dataChange=new R,this.options=[]}ngOnInit(){this.options=je(this.logicalFormData.options),this.canAddQuestions=this.getAllQuestionList(this.targetQuestions),this.appFormEditService.eventBus$.next({type:"addRule",fieldType:this._data.queType})}change(){this.modalRef.close(),this.widgetChange.changed.emit(!0),this.appFormEditService.eventBus$.next({type:"complete",fieldType:this._data.queType})}closeLogicalEdit(){this.logicalFormData.options.splice(0),this.options.forEach(t=>{this.logicalFormData.options.push(Ft(t))}),this.modalRef.close()}getAllQuestionList(t){let e=[];return t.forEach(i=>{i.forEach(s=>{s.queType===24?e.push(...this.getAllQuestionList(s.innerQuestions)):s.queTempId!==this.logicalFormData.queTempId&&e.push(s)})}),e}showField(t){t&&this.appFormEditService.eventBus$.next({type:"showField",fieldType:this._data.queType})}};a.\u0275fac=function(e){return new(e||a)(T(N),T(xl),T(ee))},a.\u0275cmp=P({type:a,selectors:[["qf-logical-form"]],inputs:{logicalFormData:"logicalFormData",targetQuestions:"targetQuestions"},outputs:{dataChange:"dataChange"},decls:20,vars:13,consts:[[1,"rest-share-layer"],[1,"logical-setting"],[1,"logical-edit-body"],[1,"logical-edit-table"],[1,"logical-edit-table-thead"],[1,"logical-edit-table-th"],["class","logical-edit-table-tr",4,"ngFor","ngForOf"],[1,"logical-edit-footer","ant-modal-footer"],["qf-button","",3,"click"],["qf-button","","qfType","primary",3,"click"],[1,"logical-edit-table-tr"],[1,"logical-edit-table-td"],["qfMode","multiple",2,"width","315px",3,"ngModelChange","qfOpenChange","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"table",3)(4,"thead",4)(5,"tr")(6,"th",5),g(7),m(8,"translate"),c(),p(9,"th",5),g(10),m(11,"translate"),c()(),x(12,Lf,7,6,"tr",6),c()()(),p(13,"div",7)(14,"button",8),y("click",function(){return i.closeLogicalEdit()}),g(15),m(16,"translate"),c(),p(17,"button",9),y("click",function(){return i.change()}),g(18),m(19,"translate"),c()()()()),e&2&&(r(7),M(" ",u(8,5,"all.option")," "),r(3),M(" ",u(11,7,"all.fieldsToShow")," "),r(2),l("ngForOf",i.logicalFormData.options),r(3),M(" ",u(16,9,"all.cancel")," "),r(3),M(" ",u(19,11,"all.OK")," "))},dependencies:[B,V,Q,oe,ne,qn,In,On,ki,K,k],styles:[".logical-setting[_ngcontent-%COMP%]{width:100%;height:100%;background:#fff;border-radius:16px}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%]{width:100%;height:calc(100% - 210px);padding:0;overflow:auto}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-thead[_ngcontent-%COMP%] .logical-edit-table-th[_ngcontent-%COMP%]{height:34px;padding:0 0 0 15px;font-size:14px;font-weight:400;line-height:30px;color:#767e89;text-align:left;border-bottom:1px solid #f4f6f9}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-thead[_ngcontent-%COMP%] .logical-edit-table-th[_ngcontent-%COMP%]:first-child{width:200
3px}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-tr[_ngcontent-%COMP%]{height:47px;border-bottom:1px solid #f4f6f9}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-tr[_ngcontent-%COMP%]:first-child{height:34px}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-tr[_ngcontent-%COMP%] .logical-edit-table-td[_ngcontent-%COMP%]{padding:5px 0 5px 15px;font-size:14px;font-weight:600;vertical-align:middle}.logical-setting[_ngcontent-%COMP%] .logical-edit-body[_ngcontent-%COMP%] .logical-edit-table[_ngcontent-%COMP%] .logical-edit-table-tr[_ngcontent-%COMP%] .logical-edit-table-td[_ngcontent-%COMP%] .que-container[_ngcontent-%COMP%]{cursor:pointer}.logical-setting[_ngcontent-%COMP%] .logical-edit-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:96px}.logical-setting[_ngcontent-%COMP%] .logical-edit-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-of-type{margin-left:16px}"]});let n=a;return n})();function zf(n,a){if(n&1&&(b(0,"qf-option",7),m(1,"queDisplayTitle")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o))("qfValue",o.queId||o.queTempId)}}function Wf(n,a){if(n&1){let o=S();p(0,"qf-select",5),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d().$implicit,s=d();return E(s.fieldToQueMap[i],e)||(s.fieldToQueMap[i]=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.updateUsedQueList())}),x(2,zf,2,4,"qf-option",6),c()}if(n&2){let o=d().$implicit,t=d();l("qfPlaceHolder",u(1,3,"all.pleaseChoose")),I("ngModel",t.fieldToQueMap[o]),r(2),l("ngForOf",t.attachmentQueList)}}function Hf(n,a){if(n&1&&(b(0,"qf-option",7),m(1,"queDisplayTitle")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o))("qfValue",o.queId||o.queTempId)}}function jf(n,a){if(n&1){let o=S();p(0,"qf-select",5),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d().$implicit,s=d();return E(s.fieldToQueMap[i],e)||(s.fieldToQueMap[i]=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.updateUsedQueList())}),x(2,Hf,2,4,"qf-option",6),c()}if(n&2){let o=d().$implicit,t=d();l("qfPlaceHolder",u(1,3,"all.pleaseChoose")),I("ngModel",t.fieldToQueMap[o]),r(2),l("ngForOf",t.queListMap[o])}}function Uf(n,a){if(n&1&&(p(0,"li")(1,"div",2),g(2),c(),b(3,"i",3),x(4,Wf,3,5,"qf-select",4)(5,jf,3,5,"qf-select",4),c()),n&2){let o=a.$implicit;r(2),w(o),r(2),l("ngIf",o==="\u626B\u63CF\u539F\u4EF6"),r(),l("ngIf",o!=="\u626B\u63CF\u539F\u4EF6")}}var nr=(()=>{let a=class a{constructor(t,e){this.appFormEditService=t,this.wsReqSrv=e,this.isSpinning=!1,this.queList=[],this.queListMap={},this.attachmentQueList=[],this.usedQueList=[],this.fieldToQueMap={},this.exclusiveFields=[h.DESCRIPTION,h.DATE_RANGE,h.UPLOAD,h.RICHTEXT,h.QLINKER,h.CODEBLOCK,h.REFER,h.OCR]}ngOnInit(){return Tt(this,null,function*(){this.queList=this.appFormEditService.currentQueList.filter(t=>this.exclusiveFields.indexOf(t.queType)<0),this.attachmentQueList=this.appFormEditService.currentQueList.filter(t=>t.queType===h.UPLOAD),this.isSpinning=!0,this.ocrTemplateFields=(yield Wi(this.wsReqSrv.getOCRTemplateFields(this.ocrConfig.ocrId))).identifyFields,this.isSpinning=!1,this.ocrTemplateFields.forEach(t=>{let e=this.ocrConfig.ocrMatchRule.find(s=>s.identifyField===t);this.fieldToQueMap[t]=e?e.relatedQueId:null;let i=Object.values(this.fieldToQueMap);this.queListMap[t]=this.queList.filter(s=>{let f=s.queId||s.queTempId;return e&&f===e.relatedQueId||i.indexOf(f)<0})})})}updateUsedQueList(){let t=Object.values(this.fieldToQueMap);this.ocrTemplateFields.forEach(e=>{this.queListMap[e]=this.queList.filter(i=>{let s=i.queId||i.queTempId,f=this.fieldToQueMap[e];return s===f||t.indexOf(s)<0})})}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(mi))},a.\u0275cmp=P({type:a,selectors:[["qf-ocr-match-rule-modal"]],inputs:{ocrConfig:"ocrConfig"},decls:3,vars:2,consts:[[3,"nzSpinning"],[4,"ngFor","ngForOf"],[1,"template-field"],["qf-icon","","qfIconfont","\uE6A7"],["qfAllowClear","","class","question-field","style","width: 100%","qfMode","default",3,"qfPlaceHolder","ngModel","ngModelChange",4,"ngIf"],["qfAllowClear","","qfMode","default",1,"question-field",2,"width","100%",3,"ngModelChange","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"]],template:function(e,i){e&1&&(p(0,"nz-spin",0)(1,"ul"),x(2,Uf,6,3,"li",1),c()()),e&2&&(l("nzSpinning",i.isSpinning),r(2),l("ngForOf",i.ocrTemplateFields))},dependencies:[B,A,V,Q,oe,ne,Wl,ce,k,it],styles:["ul[_ngcontent-%COMP%]{min-height:180px}
3ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:10px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#cacad3}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .template-field[_ngcontent-%COMP%]{display:flex;flex:0 0 240px;align-items:center;height:34px;padding:0 10px;color:#494f57;text-align:left;background:#2b34410d;border-radius:4px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .question-field[_ngcontent-%COMP%]{flex:0 0 240px}"]});let n=a;return n})();function Kf(n,a){if(n&1&&b(0,"nz-option",10),n&2){let o=a.$implicit;l("nzLabel",o.ocrTemplateName)("nzValue",o.id)}}function Gf(n,a){if(n&1&&(p(0,"nz-option-group",9),x(1,Kf,1,2,"nz-option",6),c()),n&2){let o=d();r(),l("ngForOf",o.templates==null?null:o.templates.ocrCustomTemplates)}}function $f(n,a){if(n&1&&b(0,"nz-option",10),n&2){let o=a.$implicit;l("nzLabel",o.ocrTemplateName)("nzValue",o.id)}}function Xf(n,a){n&1&&(b(0,"nz-divider"),p(1,"div",11)(2,"a",12),g(3),m(4,"translate"),c()()),n&2&&(r(3),M(" ",u(4,1,"all.howToCustomize")," "))}function Yf(n,a){if(n&1&&(p(0,"li")(1,"span"),g(2),c(),p(3,"span"),g(4),m(5,"translate"),c(),p(6,"span"),g(7),c()()),n&2){let o=d().$implicit,t=d(2);r(2),w(o.identifyField),r(2),w(u(5,3,"all.equal")),r(3),w(t.queTitleMap.get(o.relatedQueId))}}function Jf(n,a){if(n&1&&(j(0),x(1,Yf,8,5,"li",15),U()),n&2){let o=a.$implicit;r(),l("ngIf",o.relatedQueId)}}function Zf(n,a){if(n&1&&(p(0,"ul",13),x(1,Jf,2,1,"ng-container",14),c()),n&2){let o=d();r(),l("ngForOf",o.data.ocrConfig.ocrMatchRule)}}var or=(()=>{let a=class a{constructor(t,e,i,s,f){this.appFormEditService=t,this.widgetChange=e,this.translateService=i,this.modalHelper=s,this.wsReqSrv=f,this.unsubscribe$=new fe,this.ocrTemplateFields=[],this.queTitleMap=new Map,this.choiceOptTempId=1,this.defaultValChange=new R}selectOCRTemplate(t){this.data.ocrConfig={ocrId:t,ocrTemplateName:"",ocrMatchRule:[]},this.change(),this.defaultValChange.emit(this.data)}ngOnInit(){return Tt(this,null,function*(){this.appFormEditService.currentQueList.forEach(t=>{this.queTitleMap.set(t.queId||t.queTempId,it.getDisplayTitle(t))})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}change(){this.widgetChange.changed.emit()}openMatchRuleModal(){let t=e=>{let i=Object.keys(e.fieldToQueMap).map(s=>({identifyField:s,relatedQueId:e.fieldToQueMap[s]}));this.data.ocrConfig.ocrMatchRule=i,this.change(),this.defaultValChange.emit(this.data)};this.modalHelper.create(nr,{ocrConfig:this.data.ocrConfig},{size:600,modalOptions:{title:this.translateService.instant("all.setTheMatchingRules"),size:"medium",bodyStyle:{"padding-top":"20px","padding-bottom":"20px"},onOk:t}}).subscribe()}ngOnChanges(t){return Tt(this,null,function*(){this.templates=yield Wi(this.wsReqSrv.getOCRTemplates()),this.selectedOCRTemplate=this.data.ocrConfig?this.data.ocrConfig.ocrId:null;let e=this.data.ocrConfig?this.data.ocrConfig.ocrTemplateName:"";this.data.ocrConfig={ocrId:this.selectedOCRTemplate,ocrTemplateName:e,ocrMatchRule:this.data.ocrConfig?this.data.ocrConfig.ocrMatchRule:[]}})}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(N),T(X),T(vt),T(mi))},a.\u0275cmp=P({type:a,selectors:[["qf-ocr-template-select"]],inputs:{data:"data"},outputs:{defaultValChange:"defaultValChange"},features:[Re],decls:16,vars:18,consts:[["customTipTpl",""],[1,"widget-edit-share"],[1,"widget-edit-title"],["nzAllowClear","","nzMode","default",2,"width","100%",3,"ngModelChange","nzPlaceHolder","nzDropdownRender","ngModel"],["nzLabel","\u81EA\u5B9A\u4E49\u6A21\u677F",4,"ngIf"],[3,"nzLabel"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["qf-button","","qfType","dashed",1,"match-rule-btn",3,"click","disabled"],["class","match-rule-preview",4,"ngIf"],["nzLabel","\u81EA\u5B9A\u4E49\u6A21\u677F"],[3,"nzLabel","nzValue"],[1,"cutom-tip"],["qfHelpDocName","customIdentifyTpl"],[1,"match-rule-preview"],[4,"ngFor","ngForOf"],[4,"ngIf"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"p",2),g(2),m(3,"translate"),c(),p(4,"nz-select",3),m(5,"translate"),O("ngModelChange",function(v){return _(s),E(i.selectedOCRTemplate,v)||(i.selectedOCRTemplate=v),C(v)}),y("ngModelChange",function(v){return _(s),C(i.selectOCRTemplate(v))}),x(6,Gf,2,1,"nz-option-group",4),p(7,"nz-option-group",5),m(8,"translate"),x(9,$f,1,2,"nz-option",6),c()(),x(10,Xf,5,3,"ng-template",null,0,te),p(12,"button",7),y("click",function(){return _(s),C(i.openMatchRuleModal())}),g(13),m(14,"translate"),c(),x(15,Zf,2,1,"ul",8),c()}if(e&2){let s=W(11);r(2),M(" ",u(3,10,"widgets.recognitionTemplate")," "),r(2),l("nzPlaceHolder",u(5,12,"all.pleaseSelect"))("nzDropdownRender",s),I("ngModel",i.selectedOCRTemplate),r(2),l("ngIf",i.templates==null?null:i.templates.ocrCustomTemplates.length),r(),l("nzLabel",u(8,14,"all.commonTemplate")),r(2),l("ngForOf",i.templates==null?null:i.templates.ocrRegularTemplates),r(3),l("disabled",!i.selectedOCRTemplate),r(),M(" ",u(14,16,"all.setMatchRule")," "),r(2),l("ngIf",i.data==null||i.data.ocrConfig==null?null:i.data.ocrConfig.ocrMatchRule.length)}},dependencies:[B,A,V,Q,Wo,jo,ms,ls,K,Ge,k],styles:[".match-rule-btn[_ngcontent-%COMP%]{width:100%;margin-top:10px}ul.match-rule-preview[_ngcontent-%COMP%]{padding:8px;margin-top:8px;background:#f4f5f5}ul.match-rule-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:8px}ul.match-rule-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:22px;font-size:14px}ul.match-rule-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(:last-child){display:inline-block;margin-right:8px}ul.match-rule-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){color:#aaaeb3}ul.match-rule-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(odd){color:#2b3441}nz-divider[_ngcontent-%COMP%]{margin:4px 0}.cutom-tip[_ngcontent-%COMP%]{padding:8px;
3cursor:pointer}"]});let n=a;return n})();var ma=[{label:"widgets.desensitizeAllMask",value:"allMask",detail:"widgets.desensitizeAllMaskDetail"},{label:"widgets.desensitizeName",value:"name",detail:"widgets.desensitizeNameDetail"},{label:"widgets.desensitizeEmail",value:"email",detail:"widgets.desensitizeEmailDetail"},{label:"widgets.desensitizePhone",value:"phone",detail:"widgets.desensitizePhoneDetail"},{label:"widgets.desensitizeAmountOfMoney",value:"amountOfMoney",detail:"widgets.desensitizeAmountOfMoneyDetail"},{label:"widgets.desensitizeIdNumber",value:"idNumber",detail:"widgets.desensitizeIdNumberDetail"},{label:"widgets.desensitizeAddress",value:"address",detail:"widgets.desensitizeAddressDetail"},{label:"widgets.desensitizeIp",value:"ip",detail:"widgets.desensitizeIpDetail"},{label:"widgets.desensitizeLicensePlate",value:"licensePlate",detail:"widgets.desensitizeLicensePlateDetail"}];var tg=(n,a)=>a.value;function ig(n,a){if(n&1&&(p(0,"nz-option",5),m(1,"translate"),g(2),m(3,"translate"),p(4,"span",10),g(5),m(6,"translate"),c()()),n&2){let o=a.$implicit;l("nzLabel",u(1,4,o.label))("nzValue",o),r(2),M(" ",u(3,6,o.label)," "),r(3),M("-",u(6,8,o.detail),"")}}function ng(n,a){if(n&1&&(g(0),m(1,"translate"),p(2,"span",10),g(3),m(4,"translate"),c()),n&2){let o=a.$implicit;M(" ",u(1,2,o.nzValue.label)," "),r(3),M("-",u(4,4,o.nzValue.detail),"")}}var Np=(()=>{let a=class a{constructor(){this.ruleList=ma,this.isDesensitized=ii(!1)}ngOnInit(){this.selectedRule=this.selectedRuleValue?this.ruleList.find(t=>t.value===this.selectedRuleValue):this.ruleList[0]}resetDesensitization(){this.testText="",this.isDesensitized.set(!1)}toggleDesensitization(){this.isDesensitized()?this.testText=this._preSensitizationText:(this._preSensitizationText=this.testText,this.testText=al(this.testText,this.selectedRule.value)),this.isDesensitized.update(t=>!t)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-desensitized-rule"]],inputs:{selectedRuleValue:"selectedRuleValue"},standalone:!0,features:[ht],decls:25,vars:22,consts:[["selectValueTemplate",""],[1,"space-y-20","py-4"],[1,"space-y-8"],[1,"text-body-bold"],[1,"w-full",3,"ngModelChange","nzCustomTemplate","ngModel"],["nzCustomContent","",3,"nzLabel","nzValue"],[1,"text-body-small","text-70"],[1,"flex","gap-x-20"],["qf-input","",1,"flex-1",3,"ngModelChange","placeholder","disabled","ngModel"],["qf-button","",3,"click","disabled"],[1,"text-70"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"div",2)(2,"div",3),g(3),m(4,"translate"),c(),p(5,"div")(6,"nz-select",4),O("ngModelChange",function(v){return _(s),E(i.selectedRule,v)||(i.selectedRule=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.resetDesensitization())}),nn(7,ig,7,10,"nz-option",5,tg),c(),x(9,ng,5,6,"ng-template",null,0,te),c()(),p(11,"div",2)(12,"div",3),g(13),m(14,"translate"),c(),p(15,"div",6),g(16),m(17,"translate"),c(),p(18,"div",7)(19,"input",8),m(20,"translate"),O("ngModelChange",function(v){return _(s),E(i.testText,v)||(i.testText=v),C(v)}),c(),p(21,"button",9),y("click",function(){return _(s),C(i.toggleDesensitization())}),g(22),m(23,"translate"),m(24,"translate"),c()()()()}if(e&2){let s=W(10);r(3),w(u(4,10,"all.desensitizedRule")),r(3),l("nzCustomTemplate",s),I("ngModel",i.selectedRule),r(),on(i.ruleList),r(6),w(u(14,12,"all.desensitizedRuleTest")),r(3),w(u(17,14,"all.desensitizedRuleTestHint")),r(3),l("placeholder",u(20,16,"all.pleaseInput"))("disabled",i.isDesensitized()),I("ngModel",i.testText),r(2),l("disabled",!i.testText),r(),M(" ",i.isDesensitized()?u(23,18,"all.removeDesensitization"):u(24,20,"all.desensitization")," ")}},dependencies:[Uo,Wo,jo,bn,he,ci,K,It,le,V,Q,Wt,k],encapsulation:2,changeDetection:0});let n=a;return n})();function og(n,a){if(n&1){let o=S();p(0,"div",2)(1,"button",3),y("click",function(){_(o);let e=d();return C(e.openEditModal())}),g(2),m(3,"translate"),c(),p(4,"button",4)(5,"span",5),g(6),m(7,"translate"),c(),p(8,"span",6),g(9),m(10,"translate"),c()()()}if(n&2){let o=d();r(2),M(" ",u(3,3,"all.desensitizedRuleEdit")," "),r(4),w(u(7,5,o.desensitizedRule().label)),r(3),M("-",u(10,7,o.desensitizedRule().detail),"")}}var ua=(()=>{let a=class a{constructor(){this._widgetChange=re(N),this._modalService=re(Pe),this._cdr=re(He),this._translate=re(X),this.desensitizedType=ii(null),this.desensitizedRule=so(()=>ma.find(t=>t.value===this.desensitizedType())),Rr(()=>{this.que.desensitizedRule=Ee(me({},this.que.desensitizedRule),{desensitizedType:this.desensitizedType()})})}ngOnChanges(t){var e;t.que&&this.desensitizedType.set((e=this.que.desensitizedRule)==null?void 0:e.desensitizedType)}openEditModal(){var t;this._modalService.open({title:this._translate.instant("all.desensitizedModaltitle"),width:600,content:Np,componentParams:{selectedRuleValue:(t=this.que.desensitizedRule)==null?void 0:t.desensitizedType},onOk:e=>{this.desensitizedType.set(e.selectedRule.value)},onCancel:()=>{var e;(e=this.que.desensitizedRule)!=null&&e.desensitizedType||(this.que.beingDesensitized=!1,this._cdr.markForCheck())}})}handleDesensitizedChange(t){t?this.openEditModal():this.desensitizedType.set(null),this._widgetChange.changed.emit()}};a.\u0275fac=function(e){return new(e||a)}
3,a.\u0275cmp=P({type:a,selectors:[["qf-desensitized-edit"]],inputs:{que:"que"},standalone:!0,features:[Re,ht],decls:7,vars:8,consts:[["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],[1,"mt-8","space-y-8"],["qf-button","","qfBlock","","qfType","dashed","qfSize","small",3,"click"],["qf-button","","qfBlock","","disabled","","qfSize","small",1,"!justify-start","gap-x-4"],[1,"text-100"],[1,"truncate","text-70"]],template:function(e,i){e&1&&(p(0,"label",0),O("ngModelChange",function(f){return E(i.que.beingDesensitized,f)||(i.que.beingDesensitized=f),f}),y("ngModelChange",function(f){return i.handleDesensitizedChange(f)}),p(1,"span"),g(2),m(3,"translate"),c()(),b(4,"qf-hint-msg",1),m(5,"translate"),x(6,og,11,9,"div",2)),e&2&&(I("ngModel",i.que.beingDesensitized),r(2),w(u(3,4,"all.dataDesensitization")),r(2),l("hintMsg",u(5,6,"all.fieldDesensitizedTip")),r(2),Ae(i.desensitizedRule()?6:-1))},dependencies:[Bl,se,It,V,Q,Wt,k,Bo,G,ci,K],encapsulation:2,changeDetection:0});let n=a;return n})();var lg=["titles"],sg=["*"],pg=()=>({standalone:!0}),cg=()=>({type:"delete"}),dg=()=>({type:"download"});function mg(n,a){if(n&1&&b(0,"img",22),n&2){let o=d();l("qfSrc",o.bkgImg.image)}}function ug(n,a){if(n&1&&b(0,"div",24),n&2){let o=d(2);We("background-color",o.bkgImg.color)}}function fg(n,a){if(n&1&&x(0,ug,1,2,"div",23),n&2){let o=d(),t=W(7);l("ngIf",o.bkgImg.color)("ngIfElse",t)}}function gg(n,a){if(n&1&&b(0,"img",22),n&2){let o=d();l("qfSrc",o.bkgImg.url)}}function hg(n,a){if(n&1){let o=S();p(0,"div",25),y("click",function(e){_(o);let i=d();return C(i.toggleFormTitleInput(!0,e))}),p(1,"span"),g(2),m(3,"translate"),c()()}if(n&2){let o=d();r(2),M(" ",o.appFormData.formTitle||u(3,1,"all.clickToeditName")," ")}}function _g(n,a){if(n&1){let o=S();p(0,"input",26),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.appFormData.formTitle,e)||(i.appFormData.formTitle=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.widgetChange.changed.emit())})("qfClickOutside",function(){_(o);let e=d();return C(e.toggleFormTitleInput(!1))}),c()}if(n&2){let o=d();l("placeholder",u(1,2,"all.InputFormName")),I("ngModel",o.appFormData.formTitle)}}function Cg(n,a){if(n&1){let o=S();p(0,"div",15),y("click",function(){_(o);let e=d();return C(e.toggleDescEditor(!0))}),b(1,"i",27),g(2),m(3,"translate"),c()}n&2&&(r(2),M(" ",u(3,1,"appForm.addAppDes")," "))}function yg(n,a){if(n&1){let o=S();p(0,"div",28),y("click",function(){_(o);let e=d();return C(e.toggleDescEditor(!0))}),p(1,"qf-rich-text",29),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.appFormData.formDesc,e)||(i.appFormData.formDesc=e),C(e)}),c()()}if(n&2){let o=d();r(),l("placeholder",u(2,2,"all.textDescription")),I("ngModel",o.appFormData.formDesc)}}function vg(n,a){if(n&1){let o=S();j(0),p(1,"qf-rich-text",30),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.appFormData.formDesc,e)||(i.appFormData.formDesc=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.widgetChange.changed.emit())}),c(),p(3,"button",31),y("click",function(){_(o);let e=d();return C(e.toggleDescEditor(!1))}),p(4,"span"),g(5),m(6,"translate"),c()(),U()}if(n&2){let o=d();r(),l("placeholder",u(2,5,"all.inputAppDescription"))("ngModelOptions",Y(9,pg))("pathType",o.PathType.FormHeader),I("ngModel",o.appFormData.formDesc),r(4),w(u(6,7,"all.OK"))}}function xg(n,a){if(n&1){let o=S();p(0,"div",15),y("click",function(){_(o),d();let e=W(27);return C(e.click())}),b(1,"i",32),g(2),m(3,"translate"),c()}n&2&&(r(2),M(" ",u(3,1,"widgets.addAttach")," "))}function bg(n,a){if(n&1&&(b(0,"img",38),m(1,"fileIcon")),n&2){let o=d().$implicit;l("src",u(1,1,o),io)}}function Tg(n,a){if(n&1){let o=S();p(0,"i",42),y("click",function(e){_(o);let i=d(2).$implicit,s=d();return C(s.downloadFile(e,i))}),c()}n&2&&l("nzCompatible",Y(1,dg))}function Sg(n,a){if(n&1){let o=S();p(0,"div",39),x(1,Tg,1,2,"i",40),p(2,"i",41),y("click",function(){_(o);let e=d().index,i=d();return C(i.removeAttach(e))}),c()()}if(n&2){let o=d(2);r(),l("ngIf",!o.pc),r(),l("nzCompatible",Y(2,cg))}}function wg(n,a){if(n&1&&(p(0,"div",43),b(1,"nz-progress",44),c()),n&2){let o=d().$implicit;r(),l("nzPercent",o.percent)("nzStrokeWidth",3)("nzShowInfo",!1)}}function Mg(n,a){if(n&1&&(p(0,"li",33)(1,"div",34),x(2,bg,2,3,"img",35),p(3,"span"),g(4),c()(),x(5,Sg,3,3,"div",36)(6,wg,2,3,"div",37),c()),n&2){let o=a.$implicit;We("background-size",o.percent+"% 100%"),be("attach-item-loading",o.percent!==100&&o.status!=="downloading"),r(2),l("ngIf",o.status==="done"||o.status==="downloading"),r(2),w(o.name),r(),l("ngIf",o.status==="done"||o.status==="downloading"),r(),l("ngIf",o.status==="downloading")}}var Bp=(()=>{let a=class a{get appFormData(){return this._appFormData}set appFormData(t){this._appFormData=t,this.setAttachList()}toggleFormTitleInput(t,e){e==null||e.stopPropagation(),this.formTitleInputVisible=t}toggleDescEditor(t){this.descEditorVisible=t}constructor(t,e){this.widgetChange=t,this.fileRequestService=e,this.PathType=rt,this.appFormDataChange=new R,this.openThemeEdit=new R,this.openSerialNmberEdit=new R,this.formTitleInputVisible=!1,this.descEditorVisible=!1,this.formAttachList=[]}ngOnInit(){var t;this.pc=(t=this.appFormData.attachVisibleOnlyConfig)==null?void 0:t.pc}setAttachList(){this.formAttachList=[],this.appFormData.formAttach.forEac
3h(t=>{this.formAttachList.push({url:t.fileUrl,name:t.fileName,percent:100,status:"done",type:go(t.fileName)})})}removeAttach(t){this.formAttachList.splice(t,1),this.appFormData.formAttach.splice(t,1)}uploadChange(t){switch(t.type){case"success":this.appFormData.formAttach.push({attachId:0,fileName:t.file.name,fileUrl:t.file.url}),this.widgetChange.changed.emit(!0);break;case"error":this.formAttachList=this.formAttachList.filter(e=>e.lastModified!==t.file.lastModified);break;default:break}}downloadFile(t,e){t.preventDefault(),e.percent=0,e.status="downloading",this.fileRequestService.downloadFile3(e.url).subscribe(i=>{if(i.type===3)e.percent=Math.floor(i.loaded/i.total*100);else if(i.body){e.status="done";let s=i.body;nl(s,e.name)}})}getTheme(){return{"background-color":this.bkgImg.rgb}}};a.\u0275fac=function(e){return new(e||a)(T(N),T(ul))},a.\u0275cmp=P({type:a,selectors:[["qf-dynamic-form"]],viewQuery:function(e,i){if(e&1&&qe(lg,5),e&2){let s;Te(s=Se())&&(i.titles=s.first)}},inputs:{bkgImg:"bkgImg",appFormData:"appFormData"},outputs:{appFormDataChange:"appFormDataChange",openThemeEdit:"openThemeEdit",openSerialNmberEdit:"openSerialNmberEdit"},ngContentSelectors:sg,decls:38,vars:22,consts:[["customColorContent",""],["defaultImgContent",""],["uploadSelector",""],[1,"dynamic-form"],[1,"dynamic-form-header"],[1,"form-header-main"],[3,"qfSrc",4,"ngIf","ngIfElse"],[1,"form-header-title-area"],["class","form-header-title",3,"click",4,"ngIf"],["qf-input","","qfAutofocus","","nzSize","large","maxlength","100",3,"placeholder","ngModel","ngModelChange","qfClickOutside",4,"ngIf"],[1,"form-header-attach"],[1,"form-attach-row"],["class","form-attach-inner",3,"click",4,"ngIf"],["class","form-attach-inner form-desc",3,"click",4,"ngIf"],[4,"ngIf"],[1,"form-attach-inner",3,"click"],["qf-icon","","qfName","ex-number",1,"iconfont","serialnumber-icon"],[1,"attach-list"],["class","attach-item",3,"attach-item-loading","background-size",4,"ngFor","ngForOf"],[3,"fileListChange","qfChange","hidden","qfMultiple","pathType","fileList"],["qf-button","","qfIcon","ex-attachment","qfSize","medium","qfType","dashed"],["qf-icon","","qfIconfont","\uE86E",1,"iconfont"],[3,"qfSrc"],["class","color-content",3,"background-color",4,"ngIf","ngIfElse"],[1,"color-content"],[1,"form-header-title",3,"click"],["qf-input","","qfAutofocus","","nzSize","large","maxlength","100",3,"ngModelChange","qfClickOutside","placeholder","ngModel"],["qf-icon","","qfIconfont","\uE853",1,"iconfont"],[1,"form-attach-inner","form-desc",3,"click"],["hideToolbar","","readOnly","",1,"quill-rich-text",3,"ngModelChange","placeholder","ngModel"],[1,"with-confirm-button",3,"ngModelChange","placeholder","ngModelOptions","pathType","ngModel"],["qf-button","","qfType","primary",1,"finish-desc-edit",3,"click"],["qf-icon","","qfIconfont","\uE86D",1,"iconfont"],[1,"attach-item"],[1,"attach-info"],[3,"src",4,"ngIf"],["class","attach-operate",4,"ngIf"],["class","download-file-progress",4,"ngIf"],[3,"src"],[1,"attach-operate"],["qf-icon","",3,"nzCompatible","click",4,"ngIf"],["qf-icon","",1,"delete",3,"click","nzCompatible"],["qf-icon","",3,"click","nzCompatible"],[1,"download-file-progress"],["nzStatus","active",3,"nzPercent","nzStrokeWidth","nzShowInfo"]],template:function(e,i){if(e&1){let s=S();ao(),p(0,"div",3)(1,"div",4)(2,"div",5),x(3,mg,1,1,"img",6)(4,fg,1,2,"ng-template",null,0,te)(6,gg,1,1,"ng-template",null,1,te),p(8,"div",7),x(9,hg,4,3,"div",8)(10,_g,2,4,"input",9),c()(),p(11,"div",10)(12,"div",11),x(13,Cg,4,3,"div",12)(14,yg,3,4,"div",13)(15,vg,7,10,"ng-container",14),c(),p(16,"div",11)(17,"div",15),y("click",function(){return _(s),C(i.openSerialNmberEdit.emit())}),b(18,"i",16),g(19),m(20,"translate"),c()(),p(21,"div",11),x(22,xg,4,3,"div",12),p(23,"ul",17),x(24,Mg,7,8,"li",18),c(),p(25,"qf-upload-v2",19),O("fileListChange",function(v){return _(s),E(i.formAttachList,v)||(i.formAttachList=v),C(v)}),y("qfChange",function(v){return _(s),C(i.uploadChange(v))}),p(26,"div",null,2)(28,"button",20),g(29),m(30,"translate"),c()()()(),p(31,"div",11)(32,"div",15),y("click",function(){return _(s),C(i.openThemeEdit.emit())}),b(33,"i",21),p(34,"span"),g(35),m(36,"translate"),c()()()()(),ro(37),c()}if(e&2){let s=W(5);r(3),l("ngIf",i.bkgImg.image)("ngIfElse",s),r(6),l("ngIf",!i.formTitleInputVisible),r(),l("ngIf",i.formTitleInputVisible),r(3),l("ngIf",!i.appFormData.formDesc&&!i.descEditorVisible),r(),l("ngIf",i.appFormData.formDesc&&!i.descEditorVisible),r(),l("ngIf",i.descEditorVisible),r(4),M(" ",u(20,16,"widgets.serialNumber")," "),r(3),l("ngIf",i.formAttachList.length===0),r(2),l("ngForOf",i.formAttachList),r(),l("hidden",i.formAttachList.length===0)("qfMultiple",!0)("pathType",i.PathType.FormHeader),I("fileList",i.formAttachList),r(4),M(" ",u(30,18,"
3widgets.uploadFile")," "),r(6),w(u(36,20,"all.setAppearance"))}},dependencies:[B,A,le,V,Ue,Q,wn,he,Ns,K,ce,$t,wi,Po,kl,k,Vo],styles:[".form-header-main[_ngcontent-%COMP%]{overflow:hidden;font-size:0;border-top-left-radius:10px;border-top-right-radius:10px}.form-header-main[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;border-top-left-radius:10px;border-top-right-radius:10px}.form-header-main[_ngcontent-%COMP%] > .color-content[_ngcontent-%COMP%]{height:22px;background-color:#fab300}.form-header-main[_ngcontent-%COMP%] > .default-img[_ngcontent-%COMP%]{height:22px;background-color:#90ee90}.form-header-main[_ngcontent-%COMP%] > .form-header-title-area[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:20px;margin-right:16px;margin-left:16px}.form-header-main[_ngcontent-%COMP%] > .form-header-title-area[_ngcontent-%COMP%] > .form-header-title[_ngcontent-%COMP%]{width:100%;padding:5px 4px;font-size:20px;font-weight:600;cursor:pointer;border-radius:3px;transition:all ease .2s}.form-header-main[_ngcontent-%COMP%] > .form-header-title-area[_ngcontent-%COMP%] > .form-header-title[_ngcontent-%COMP%]:hover{background-color:#f4f5f5}.form-header-main[_ngcontent-%COMP%] > .form-header-title-area[_ngcontent-%COMP%] > .form-header-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{word-break:break-all}.form-header-main[_ngcontent-%COMP%] > .form-header-title-area[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-bottom:1px}.form-header-attach[_ngcontent-%COMP%]{margin:0 16px}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%]{position:relative}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%]:last-of-type{padding-bottom:0}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] > .form-attach-inner[_ngcontent-%COMP%]{display:flex;align-items:center;padding:4px;margin:4px 0;color:#aaaeb3;cursor:pointer;border-radius:3px;transition:all ease .2s}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] > .form-attach-inner[_ngcontent-%COMP%]:hover{background-color:#f4f5f5}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] > .form-attach-inner[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]{padding-right:8px;color:#acb3bd}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] .form-desc[_ngcontent-%COMP%]{min-height:32px}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] .form-desc[_ngcontent-%COMP%] .quill-rich-text[_ngcontent-%COMP%]{display:block;width:100%}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] .with-confirm-button .ql-toolbar{padding-right:64px}.form-header-attach[_ngcontent-%COMP%] > .form-attach-row[_ngcontent-%COMP%] .finish-desc-edit[_ngcontent-%COMP%]{position:absolute;top:2px;right:4px}
3.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:45px;padding:0 5px;margin-bottom:10px;border:1px solid #c1c1cd;border-radius:3px}.attach-list[_ngcontent-%COMP%] .attach-item.attach-item-loading[_ngcontent-%COMP%]{color:#fff;background:linear-gradient(-90deg,#fbe045,#f5bc21) no-repeat;background-size:0 100%;border:none;box-shadow:0 4px 10px #0c1f5014}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-info[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-info[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:30px;height:30px;margin-right:5px}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .download-file-progress[_ngcontent-%COMP%]{position:absolute;top:24px;left:40px;width:calc(100% - 155px)}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .download-file-progress[_ngcontent-%COMP%] .ant-progress-success-bg, .attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .download-file-progress[_ngcontent-%COMP%] .ant-progress-bg{background-color:#62b92e}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-operate[_ngcontent-%COMP%]{cursor:pointer}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-operate[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#acb3bd}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-operate[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{margin:0 10px}.attach-list[_ngcontent-%COMP%] .attach-item[_ngcontent-%COMP%] .attach-operate[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]:hover{color:#fb4b51;transition:all ease .2s}.dynamic-form[_ngcontent-%COMP%]{width:100%;height:100%}.dynamic-form[_ngcontent-%COMP%] .dynamic-form-header[_ngcontent-%COMP%]{padding-bottom:12px;margin-bottom:20px;background:#fff;border-radius:10px;box-shadow:0 4px 6px #0c1f500a,0 0 0 1px #e6eaf0}.serialnumber-icon[_ngcontent-%COMP%]{padding-right:8px;color:#acb3bd}"]});let n=a;return n})();function Ig(n,a){if(n&1&&(p(0,"qf-option",4),m(1,"translate"),p(2,"div",5),m(3,"translate"),g(4),m(5,"translate"),c()()),n&2){let o=a.$implicit;l("qfLabel",u(1,4,o.label))("qfValue",o.value),r(2),l("title",u(3,6,o.label)),r(2),w(u(5,8,o.label))}}var Lp=(()=>{let a=class a{constructor(t,e){this.widgetChange=t,this.formEditSrv=e,this.precisionSettingOptions=[{label:"all.precisionAddress1",value:Ye.all},{label:"all.precisionAddress2",value:Ye.exceptDetail},{label:"all.precisionAddress3",value:Ye.provinceAndCity},{label:"all.precisionAddress4",value:Ye.provinceOnly}]}precisionChange(t){this.widgetChange.syncForm$.emit({type:"addressPrecision",question:this.data}),this.formEditSrv.addressPrecisionChange.emit({queId:this.data.queId,precision:t}),this.widgetChange.changed.emit(!0)}};a.\u0275fac=function(e){return new(e||a)(T(N),T($e))},a.\u0275cmp=P({type:a,selectors:[["qf-address-precision-setting"]],inputs:{data:"data"},decls:6,vars:5,consts:[[1,"widget-edit"],[1,"widget-edit-title"],[3,"ngModelChange","ngModel"],["qfCustomContent","",3,"qfLabel","qfValue",4,"ngFor","ngForOf"],["qfCustomContent","",3,"qfLabel","qfValue"],[3,"title"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1),g(2),m(3,"translate"),c(),p(4,"qf-select",2),O("ngModelChange",function(f){return E(i.data.addressPrecision,f)||(i.data.addressPrecision=f),f}),y("ngModelChange",function(f){return i.precisionChange(f)}),x(5,Ig,6,10,"qf-option",3),c()()),e&2&&(r(2),w(u(3,3,"all.accuracy")),r(2),I("ngModel",i.data.addressPrecision),r(),l("ngForOf",i.precisionSettingOptions))},dependencies:[B,V,Q,oe,ne,k],styles:["qf-select[_ngcontent-%COMP%]{width:100%}"]});let n=a;return n})();function Eg(n,a){if(n&1){let o=S();p(0,"div",6),y("click",function(){_(o);let e=d();return C(e.aggreTypePreCheck())}),c()}}function Og(n,a){if(n&1&&(b(0,"qf-option",9),m(1,"translate")),n&2){let o=a.$implicit,t=d(2);l("qfLabel",u(1,3,o.value))("qfValue",o.type)("qfDisabled",!!t.editQue.queOriginType&&t.judgedQueCanSelectOption(o.type))}}function Pg(n,a){if(n&1){let o=S();p(0,"qf-select",7),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.editQue.aggreType,e)||(i.editQue.aggreType=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.aggreTypeChange(e))}),x(2,Og,2,5,"qf-option",8),c()}if(n&2){let o=d();l("qfPlaceHolder",u(1,3,"all.selectAggregationMode")),I("ngModel",o.editQue.aggreType),r(2),l("ngForOf",o.aggreTypeOpts)}}var zp=(()=>{let a=class a{get editQue(){return this.currentEditSrv.editQue}get aggreTypeOpts(){let t=this.engineAggreTypeOpts;return t.find(i=>i.type===this.currentEditSrv.editQue.aggreType)||(this.editQue.aggreType=null),t}aggreTypeChange(t){this.editQue.aggreType=t,this.appFormEditSrv.tableDftValueQueAppChanged(this.editQue),this.widgetChange.changed.emit()}get editQueId(){return this.editQue.queId===0?this.editQue.queTempId:this.editQue.queId}aggreTypePreCheck(){this.messageService.error(this.translate.instant("all.
3setTheAppAndQue2"))}aggreTypeCheckChange(t){t||(this.editQue.aggreType=null)}judgedQueCanSelectOption(t){let e=this.appFormEditSrv.queRelationsMap.get(this.editQueId);if(!e)return!1;if(e.displayedQueId===ue.APPLY_ID)return!0;let i=e.matchRuleType;if([7,8].includes(t)&&i===2)return!0;let s=[];this.addSubQuestions(s,this.currentEditSrv.targetQueList);let f=e.matchRules.flat().map(v=>v.queId);if((f==null?void 0:f.length)>0){let v=s.map(D=>D.queId);if(f.reduce((D,F)=>v.includes(F)?D+1:D,0)>=2&&[7,8].includes(t))return!0}if(s.some(v=>v.queId===this.editQue.relatedQueId)){if(this.editQue.queOriginType===h.NUMBER)return!(t<4||t>=6);if(this.editQue.queOriginType)return t<6}else if(this.editQue.relatedQueId===ue.SERIAL_NUMBER||this.editQue.queOriginType!==h.NUMBER)return t<4}addSubQuestions(t,e){e==null||e.forEach(i=>{i.innerQuestions.length?this.addSubQuestions(t,i.innerQuestions.flat()):i.subQuestions.length&&i.subQuestions.forEach(s=>{t.push(s)})})}initData(){this.aggreTypeChecked=!ie(this.editQue.aggreType)}constructor(t,e,i,s,f){this.appFormEditSrv=t,this.currentEditSrv=e,this.widgetChange=i,this.translate=s,this.messageService=f,this.unsubscribe$=new fe,this.engineAggreTypeOpts=[{type:0,value:"all.summation"},{type:1,value:"all.average"},{type:2,value:"all.maxValue"},{type:3,value:"all.minValue"},{type:4,value:"all.oldestValue"},{type:5,value:"all.latestValue"},{type:6,value:"all.filledCounting"},{type:7,value:"all.emptyCounting"},{type:8,value:"all.counting"}],this.QueType=h,this.aggreTypeChecked=!1}ngOnInit(){this.initData(),this.currentEditSrv.editQueChange.pipe(ae(this.unsubscribe$)).subscribe(()=>this.initData())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(ke),T(N),T(X),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-fe-aggre"]],decls:10,vars:9,consts:[[1,"widget-edit"],["class","mask",3,"click",4,"ngIf"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],[1,"widget-edit-detail"],["style","width: 100%",3,"qfPlaceHolder","ngModel","ngModelChange",4,"ngIf"],[1,"mask",3,"click"],[2,"width","100%",3,"ngModelChange","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue","qfDisabled",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue","qfDisabled"]],template:function(e,i){e&1&&(p(0,"div",0),x(1,Eg,1,0,"div",1),p(2,"label",2),O("ngModelChange",function(f){return E(i.aggreTypeChecked,f)||(i.aggreTypeChecked=f),f}),y("ngModelChange",function(f){return i.aggreTypeCheckChange(f)}),p(3,"span"),g(4),m(5,"translate"),c()(),b(6,"qf-hint-msg",3),m(7,"translate"),p(8,"div",4),x(9,Pg,3,5,"qf-select",5),c()()),e&2&&(r(),l("ngIf",!i.appFormEditSrv.queRelationsMap.has(i.editQueId)&&i.editQue.queType===i.QueType.DATA_RELATION),r(),I("ngModel",i.aggreTypeChecked),r(2),w(u(5,5,"all.aggregationMode")),r(2),l("hintMsg",u(7,7,"all.aggregateAssociatedData")),r(3),l("ngIf",i.aggreTypeChecked))},dependencies:[B,A,V,Q,se,oe,ne,G,k],styles:[".widget-edit[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}button[_ngcontent-%COMP%]{width:100%}.cond-info-wrap[_ngcontent-%COMP%]{margin-top:10px}",".widget-edit[_ngcontent-%COMP%]{position:relative}.widget-edit[_ngcontent-%COMP%] .mask[_ngcontent-%COMP%]{position:absolute;z-index:2;width:100%;height:100%;background-color:#0000}"]});let n=a;return n})();var Dg=["nzTreeTemplate"],kg=["treeRef"],Vg=(n,a)=>a.key,lr=()=>[];function Qg(n,a){if(n&1&&(p(0,"span",10),b(1,"nz-embed-empty",11),c()),n&2){let o=d(2);r(),l("nzComponentName","tree-select")("specificContent",o.nzNotFoundContent)}}function Ag(n,a){if(n&1){let o=S();p(0,"div",8)(1,"nz-tree",9,0),y("nzExpandChange",function(e){_(o);let i=d();return C(i.onExpandedKeysChange(e))})("nzClick",function(e){_(o);let i=d();return C(i.nzTreeClick.emit(e))})("nzCheckedKeysChange",function(){_(o);let e=d();return C(e.updateSelectedNodes())})("nzSelectedKeysChange",function(){_(o);let e=d();return C(e.updateSelectedNodes())})("nzCheckBoxChange",function(e){_(o);let i=d();return C(i.nzTreeCheckBoxChange.emit(e))})("nzSearchValueChange",function(e){_(o);let i=d();return C(i.setSearchValues(e))}),c(),x(3,Qg,2,2,"span",10),c()}if(n&2){let o=d();be("ant-select-dropdown-placement-bottomLeft",o.dropDownPosition==="bottom")("ant-select-dropdown-placement-topLeft",o.dropDownPosition==="top")("ant-tree-select-dropdown-rtl",o.dir==="rtl"),l("@slideMotion","enter")("ngClass",o.dropdownClassName)("@.disabled",!!(o.noAnimation!=null&&o.noAnimation.nzNoAnimation))("nzNoAnimation",o.noAnimation==null?null:o.noAnimation.nzNoAnimation)("dir",o.dir)("ngStyle",o.nzDropdownStyle),r(),l("hidden",o.isNotFound)("nzData",o.nzNodes)("nzMultiple",o.nzMultiple)("nzSearchValue",o.inputValue)("nzHideUnMatched",o.nzHideUnMatched)("nzShowIcon",o.nzShowIcon)("nzCheckable",o.nzCheckable)("nzAsyncData",o.nzAsyncData)("nzShowExpand",o.nzShowExpand)("nzShowLine",o.nzShowLine)("nzExpandedIcon",o.nzExpandedIcon)("nzExpandAll",o.nzDefaultExpandAll)("nzExpandedKeys",o.expandedKeys)("nzCheckedKeys",o.nzCheckable?o.value:Y(34,lr))("nzSelectedKeys",o.nzCheckable?Y(35,lr):o.value)("nzTreeTemplate",o.treeTemplate)("nzCheckStrictly",o.nzCheckStrictly)("nzVirtualItemSize",o.nzVirtualItemSize)("nzVirtualMaxBufferPx",o.nzVirtualMaxBufferPx)("nzVirtualMinBufferPx",o.nzVirtualMinBufferPx)("nzVirtualHeight",o.nzVirtualHeight),r(2),Ae(o.nzNodes.length===0||o.isNotFound?3:-1)}}function Fg(n,a){if(n&1){let o=S();p(0,"nz-select-item",13),y("delete",function(){let e=_(o).$implicit,i=d(2);return C(i.removeSelected(e,!0))}),c()}if(n&2){let o=a.$implicit,t=d(2);l("deletable",!0)("disabled",o.isDisabled||t.nzDisabled)("label",t.nzDisplayWith(o))}}function Rg(n,a){if(n&1&&(b(0,"nz-select-item",12),m(1,"slice")),n&2){let o=d(2);l("contentTemplateOutlet",o.nzMaxTagPlaceholder)("contentTemplateOutletContext",zt(1,5,o.selectedNodes,o.nzMaxTagCount))("deletable",!1)("disabled",!1)("label","+ "+(o.selectedNodes.length-o.nzMaxTagCount)+" ...")}}function Ng(n,a){if(n&1&&(nn(0,Fg,1,3,"nz-select-item",6,Vg),m(2,"slice"),x(3,Rg,2,8,"nz-select-item",12)),n&2){let o=d();on(lo(2,1,o.selectedNodes,0,o.nzMaxTagCount)),r(3),Ae(o.selectedNodes.length>o.nzMaxTagCount?3:-1)}}function Bg(n,a){if(n&1&&b(0,"nz-select-placeholder",14),n&2){let o=d();We("display",o.placeHolderDisplay),l("placeholder",o.nzPlaceHolder)}}function Lg(n,a){if(n&1&&b(0,"nz-select-item",6),n&2){let o=d();l("deletable",!1)("disabled",!1)("label",o.nzDisplayWith(o.selectedNodes[0]))}}function zg(n,a){n&1&&b(0,"nz-select-arrow")}function Wg(n,a){if(n&1&&b(0,"nz-form-item-feedback-icon",15),n&2){let o=d(3);l("status",o.status)}}function Hg(n,a){if(n&1&&x(0,Wg,1,1,"nz-form-item-feedback-icon",15),n&2){let o=d(2);Ae(o.hasFeedback&&o.status?0:-1)}}function jg(n,a){if(n&1&&(p(0,"nz-select-arrow",7),x(1,Hg,1,1,"ng-template",null,1,te),c()),n&2){let o=W(2),t=d();l("showArrow",!t.isMultiple)("feedbackIcon",o)}}function Ug(n,a){if(n&1){let o=S();p(0,"nz-select-clear",16),y("clear",function(){_(o);let e=d();return C(e.onClearSelection())}),c()}}var ar=(()=>{let a=class a extends Cs{};a.\u0275fac=(()=>{let t;return function(i){return(t||(t=Or(a)))(i||a)}}
3)(),a.\u0275prov=ai({token:a,factory:a.\u0275fac});let n=a;return n})(),Kg="treeSelect",rr="ant-select-dropdown ant-select-tree-dropdown",Gg=[Si.bottomLeft,Si.bottomRight,Si.topRight,Si.topLeft],$g=(()=>{let a=class a extends vs{set nzExpandedKeys(t){this.expandedKeys=t}get nzExpandedKeys(){return this.expandedKeys}get treeTemplate(){return this.nzTreeTemplate||this.nzTreeTemplateChild}get placeHolderDisplay(){return this.inputValue||this.isComposing||this.selectedNodes.length?"none":"block"}get isMultiple(){return this.nzMultiple||this.nzCheckable}constructor(t,e,i,s,f,v,q){super(t),this.nzConfigService=e,this.renderer=i,this.cdr=s,this.elementRef=f,this.directionality=v,this.focusMonitor=q,this._nzModuleName=Kg,this.nzId=null,this.nzAllowClear=!0,this.nzShowExpand=!0,this.nzShowLine=!1,this.nzDropdownMatchSelectWidth=!0,this.nzCheckable=!1,this.nzHideUnMatched=!1,this.nzShowIcon=!1,this.nzShowSearch=!1,this.nzDisabled=!1,this.nzAsyncData=!1,this.nzMultiple=!1,this.nzDefaultExpandAll=!1,this.nzCheckStrictly=!1,this.nzVirtualItemSize=28,this.nzVirtualMaxBufferPx=500,this.nzVirtualMinBufferPx=28,this.nzVirtualHeight=null,this.nzNodes=[],this.nzOpen=!1,this.nzSize="default",this.nzPlaceHolder="",this.nzDropdownStyle=null,this.nzBackdrop=!1,this.nzStatus="",this.nzPlacement="",this.nzDisplayWith=D=>D.title,this.nzMaxTagPlaceholder=null,this.nzOpenChange=new R,this.nzCleared=new R,this.nzRemoved=new R,this.nzExpandChange=new R,this.nzTreeClick=new R,this.nzTreeCheckBoxChange=new R,this.prefixCls="ant-select",this.statusCls={},this.status="",this.hasFeedback=!1,this.dropdownClassName=rr,this.isComposing=!1,this.isDestroy=!0,this.isNotFound=!1,this.focused=!1,this.inputValue="",this.dropDownPosition="bottom",this.selectedNodes=[],this.expandedKeys=[],this.value=[],this.dir="ltr",this.positions=[],this.destroy$=new fe,this.isNzDisableFirstChange=!0,this.isComposingChange$=new fe,this.searchValueChange$=new fe,this.onChange=D=>{},this.onTouched=()=>{},this.noAnimation=re(Va,{host:!0,optional:!0}),this.nzFormStatusService=re($l,{optional:!0}),this.nzFormNoStatusService=re(Xl,{optional:!0}),this.renderer.addClass(this.elementRef.nativeElement,"ant-select"),this.renderer.addClass(this.elementRef.nativeElement,"ant-tree-select")}ngOnInit(){var t,e;(t=this.nzFormStatusService)==null||t.formStatusChanges.pipe(Mr((i,s)=>i.status===s.status&&i.hasFeedback===s.hasFeedback),Ir(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Sa(!1)),Hi(([{status:i,hasFeedback:s},f])=>({status:f?"":i,hasFeedback:s})),ae(this.destroy$)).subscribe(({status:i,hasFeedback:s})=>{this.setStatusStyles(i,s)}),this.isDestroy=!1,this.subscribeSelectionChange(),(e=this.directionality.change)==null||e.pipe(ae(this.destroy$)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.focusMonitor.monitor(this.elementRef,!0).pipe(ae(this.destroy$)).subscribe(i=>{i?(this.focused=!0,this.cdr.markForCheck()):(this.focused=!1,this.cdr.markForCheck(),Promise.resolve().then(()=>{this.onTouched()}))}),br([this.searchValueChange$,this.isComposingChange$.pipe(qr(!1))]).pipe(ae(this.destroy$)).subscribe(([i,s])=>{this.isComposing=s,s||(this.inputValue=i,this.updatePosition())})}ngOnDestroy(){this.isDestroy=!0,this.closeDropDown(),this.destroy$.next(),this.destroy$.complete()}isComposingChange(t){this.isComposingChange$.next(t)}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.closeDropDown(),this.isNzDisableFirstChange=!1}setStatusStyles(t,e){this.status=t,this.hasFeedback=e,this.cdr.markForCheck(),this.statusCls=gl(this.prefixCls,t,e),Object.keys(this.statusCls).forEach(i=>{this.statusCls[i]?this.renderer.addClass(this.elementRef.nativeElement,i):this.renderer.removeClass(this.elementRef.nativeElement,i)})}ngOnChanges(t){let{nzNodes:e,nzDropdownClassName:i,nzStatus:s,nzPlacement:f}=t;if(e&&this.updateSelectedNodes(!0),i){let v=this.nzDropdownClassName&&this.nzDropdownClassName.trim();this.dropdownClassName=v?`${rr} ${v}`:rr}s&&this.setStatusStyles(this.nzStatus,this.hasFeedback),f&&this.nzPlacement&&Si[this.nzPlacement]&&(this.positions=[Si[this.nzPlacement]])}writeValue(t){fl(t)?(this.isMultiple&&Array.isArray(t)?this.value=t:this.value=[t],this.clearSelectedNodes(),this.updateSelectedNodes(!0)):(this.value=[],this.clearSelectedNodes(),this.selectedNodes=[]),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}onKeydown(t){if(!this.nzDisabled)switch(t.keyCode){case 27:break;case 9:this.closeDropDown();break;default:this.nzOpen||this.openDropdown()}}trigger(){this.nzDisabled||!this.nzDisabled&&this.nzOpen?this.closeDropDown():this.openDropdown()}openDropdown(){this.nzDisabled||(this.nzOpen=!0,this.nzOpenChange.emit(this.nzOpen),this.updateCdkConnectedOverlayStatus(),(this.nzShowSearch||this.isMultiple)&&this.focusOnInput())}closeDropDown(){this.onTouched(),this.nzOpen=!1,this.inputValue="",this.isNotFound=!1,this.nzOpenChange.emit(this.nzOpen),this.cdr.markForCheck()}onKeyDownInput(t){let e=t.keyCode,i=t.target;if(this.isMultiple&&!i.value&&e===8&&(t.preventDefault(),this.selectedNodes.length)){let s=this.selectedNodes[this.selectedNodes.length-1];s&&!s.isDisabled&&this.removeSelected(s)}}onExpandedKeysChange(t){this.nzExpandChange.emit(t),this.expandedKeys=[...t.keys]}setInputValue(t){this.searchValueChange$.next(t)}removeSelected(t,e=!0){t.isSelected=!1,t.isChecked=!1,this.nzCheckable?this.nzTreeService.conduct(t,this.nzCheckStrictly):this.nzTreeService.setSelectedNodeList(t,this.nzMultiple),e&&this.nzRemoved.emit(t)}focusOnInput(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.focus()}subscribeSelectionChange(){Sr(this.nzTreeClick.pipe(eo(t=>{let e=t.node;this.nzCheckable&&!e.isDisabled&&!e.isDisableCheckbox&&(e.isChecked=!e.isChecked,e.isHalfChecked=!1,this.nzCheckStrictly||this.nzTreeService.conduct(e)),this.nzCheckable&&(e.isSelected=!1)}),wr(t=>{let e=t.node;return this.nzCheckable?!e.isDisabled&&!e.isDisableCheckbox:!e.isDisabled&&e.isSelectable})),this.nzCheckable?this.nzTreeCheckBoxChange.asObservable():Sa(),this.nzCleared,this.nzRemoved).pipe(ae(this.destroy$)).subscribe(()=>{this.updateSelectedNodes();let t=this.selectedNodes.map(e=>e.key);this.value=[...t],(this.nzShowSearch||this.isMultiple)&&(this.inputValue="",this.isNotFound=!1),this.isMultiple?(this.onChange(t),this.focusOnInput(),this.updatePosition()):(this.closeDropDown(),this.onChange(t.length?t[0]:null))})}updateSelectedNodes(t=!1){if(t){let e=this.coerceTreeNodes(this.nzNodes);this.nzTreeService.isMultiple=this.isMultiple,this.nzTreeService.isCheckStrictly=this.nzCheckStrictly,this.nzTreeService.initTree(e),this.nzCheckable?this.nzTreeService.conductCheck(this.value,this.nzCheckStrictly):this.nzTreeService.conductSelectedKeys(this.value,this.isMultiple)}this.selectedNodes=[...this.nzCheckable?this.getCheckedNodeList():this.getSelectedNodeList()].sort((e,i)=>{let s=this.value.indexOf(e.key),f=this.value.indexOf(i.key);return s!==-1&&f!==-1?s-f:s!==-1?-1:f!==-1?1:0})}updatePosition(){jl(()=>{var t,e;(e=(t=this.cdkConnectedOverlay)==null?void 0:t.overlayRef)==null||e.updatePosition()})}onPositionChange(t){this.dropDownPosition=t.connectionPair.originY}
3onClearSelection(){this.selectedNodes.forEach(t=>{this.removeSelected(t,!1)}),this.nzCleared.emit()}onClickOutside(t){let e=zr(t);this.elementRef.nativeElement.contains(e)||this.closeDropDown()}setSearchValues(t){Promise.resolve().then(()=>{this.isNotFound=(this.nzShowSearch||this.isMultiple)&&!!this.inputValue&&t.matchedKeys.length===0})}updateCdkConnectedOverlayStatus(){(!this.nzPlacement||!Gg.includes(Si[this.nzPlacement]))&&(this.triggerWidth=this.cdkOverlayOrigin.elementRef.nativeElement.getBoundingClientRect().width)}clearSelectedNodes(){this.selectedNodes.forEach(t=>{this.removeSelected(t,!1)})}};a.\u0275fac=function(e){return new(e||a)(T(ar),T(hl),T(no),T(He),T(Pr),T($r),T(vl))},a.\u0275cmp=P({type:a,selectors:[["nz-tree-select"]],contentQueries:function(e,i,s){if(e&1&&Vr(s,Dg,7),e&2){let f;Te(f=Se())&&(i.nzTreeTemplateChild=f.first)}},viewQuery:function(e,i){if(e&1&&(qe(Ho,5),qe(kg,5),qe(qa,7),qe(Ia,5)),e&2){let s;Te(s=Se())&&(i.nzSelectSearchComponent=s.first),Te(s=Se())&&(i.treeRef=s.first),Te(s=Se())&&(i.cdkOverlayOrigin=s.first),Te(s=Se())&&(i.cdkConnectedOverlay=s.first)}},hostAttrs:[1,"ant-select"],hostVars:24,hostBindings:function(e,i){e&1&&y("click",function(){return i.trigger()})("keydown",function(f){return i.onKeydown(f)}),e&2&&be("ant-select-in-form-item",!!i.nzFormStatusService)("ant-select-lg",i.nzSize==="large")("ant-select-rtl",i.dir==="rtl")("ant-select-sm",i.nzSize==="small")("ant-select-disabled",i.nzDisabled)("ant-select-single",!i.isMultiple)("ant-select-show-arrow",!i.isMultiple)("ant-select-show-search",!i.isMultiple)("ant-select-multiple",i.isMultiple)("ant-select-allow-clear",i.nzAllowClear)("ant-select-open",i.nzOpen)("ant-select-focused",i.nzOpen||i.focused)},inputs:{nzId:"nzId",nzAllowClear:[2,"nzAllowClear","nzAllowClear",_t],nzShowExpand:[2,"nzShowExpand","nzShowExpand",_t],nzShowLine:[2,"nzShowLine","nzShowLine",_t],nzDropdownMatchSelectWidth:[2,"nzDropdownMatchSelectWidth","nzDropdownMatchSelectWidth",_t],nzCheckable:[2,"nzCheckable","nzCheckable",_t],nzHideUnMatched:[2,"nzHideUnMatched","nzHideUnMatched",_t],nzShowIcon:[2,"nzShowIcon","nzShowIcon",_t],nzShowSearch:[2,"nzShowSearch","nzShowSearch",_t],nzDisabled:[2,"nzDisabled","nzDisabled",_t],nzAsyncData:[2,"nzAsyncData","nzAsyncData",_t],nzMultiple:[2,"nzMultiple","nzMultiple",_t],nzDefaultExpandAll:[2,"nzDefaultExpandAll","nzDefaultExpandAll",_t],nzCheckStrictly:[2,"nzCheckStrictly","nzCheckStrictly",_t],nzVirtualItemSize:"nzVirtualItemSize",nzVirtualMaxBufferPx:"nzVirtualMaxBufferPx",nzVirtualMinBufferPx:"nzVirtualMinBufferPx",nzVirtualHeight:"nzVirtualHeight",nzExpandedIcon:"nzExpandedIcon",nzNotFoundContent:"nzNotFoundContent",nzNodes:"nzNodes",nzOpen:"nzOpen",nzSize:"nzSize",nzPlaceHolder:"nzPlaceHolder",nzDropdownStyle:"nzDropdownStyle",nzDropdownClassName:"nzDropdownClassName",nzBackdrop:"nzBackdrop",nzStatus:"nzStatus",nzPlacement:"nzPlacement",nzExpandedKeys:"nzExpandedKeys",nzDisplayWith:"nzDisplayWith",nzMaxTagCount:[2,"nzMaxTagCount","nzMaxTagCount",Fr],nzMaxTagPlaceholder:"nzMaxTagPlaceholder",nzTreeTemplate:"nzTreeTemplate"},outputs:{nzOpenChange:"nzOpenChange",nzCleared:"nzCleared",nzRemoved:"nzRemoved",nzExpandChange:"nzExpandChange",nzTreeClick:"nzTreeClick",nzTreeCheckBoxChange:"nzTreeCheckBoxChange"},exportAs:["nzTreeSelect"],standalone:!0,features:[et([ar,{provide:ys,useExisting:ar},{provide:Cn,useExisting:tn(()=>a),multi:!0}]),kr,oo,Re,ht],decls:9,vars:20,consts:[["treeRef",""],["feedbackIconTpl",""],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"overlayOutsideClick","detach","positionChange","cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","cdkConnectedOverlayMinWidth","cdkConnectedOverlayWidth"],["cdkOverlayOrigin","",1,"ant-select-selector"],[3,"keydown","isComposingChange","valueChange","nzId","showInput","value","mirrorSync","disabled","focusTrigger"],[3,"placeholder","display"],[3,"deletable","disabled","label"],[3,"showArrow","feedbackIcon"],[3,"ngClass","nzNoAnimation","dir","ngStyle"],["nzNoAnimation","","nzSelectMode","","nzBlockNode","",3,"nzExpandChange","nzClick","nzCheckedKeysChange","nzSelectedKeysChange","nzCheckBoxChange","nzSearchValueChange","hidden","nzData","nzMultiple","nzSearchValue","nzHideUnMatched","nzShowIcon","nzCheckable","nzAsyncData","nzShowExpand","nzShowLine","nzExpandedIcon","nzExpandAll","nzExpandedKeys","nzCheckedKeys","nzSelectedKeys","nzTreeTemplate","nzCheckStrictly","nz
3VirtualItemSize","nzVirtualMaxBufferPx","nzVirtualMinBufferPx","nzVirtualHeight"],[1,"ant-select-not-found"],[3,"nzComponentName","specificContent"],[3,"contentTemplateOutlet","contentTemplateOutletContext","deletable","disabled","label"],[3,"delete","deletable","disabled","label"],[3,"placeholder"],[3,"status"],[3,"clear"]],template:function(e,i){e&1&&(x(0,Ag,4,36,"ng-template",2),y("overlayOutsideClick",function(f){return i.onClickOutside(f)})("detach",function(){return i.closeDropDown()})("positionChange",function(f){return i.onPositionChange(f)}),p(1,"div",3),x(2,Ng,4,5),p(3,"nz-select-search",4),y("keydown",function(f){return i.onKeyDownInput(f)})("isComposingChange",function(f){return i.isComposingChange(f)})("valueChange",function(f){return i.setInputValue(f)}),c(),x(4,Bg,1,3,"nz-select-placeholder",5)(5,Lg,1,3,"nz-select-item",6)(6,zg,1,0,"nz-select-arrow")(7,jg,3,2,"nz-select-arrow",7)(8,Ug,1,0,"nz-select-clear"),c()),e&2&&(l("cdkConnectedOverlayHasBackdrop",i.nzBackdrop)("cdkConnectedOverlayOrigin",i.cdkOverlayOrigin)("cdkConnectedOverlayPositions",i.nzPlacement?i.positions:Y(19,lr))("cdkConnectedOverlayOpen",i.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-select-tree-dropdown")("cdkConnectedOverlayMinWidth",i.nzDropdownMatchSelectWidth?null:i.triggerWidth)("cdkConnectedOverlayWidth",i.nzDropdownMatchSelectWidth?i.triggerWidth:null),r(2),Ae(i.isMultiple?2:-1),r(),l("nzId",i.nzId)("showInput",i.nzShowSearch)("value",i.inputValue)("mirrorSync",i.isMultiple)("disabled",i.nzDisabled)("focusTrigger",i.nzOpen),r(),Ae(i.nzPlaceHolder&&i.selectedNodes.length===0?4:-1),r(),Ae(!i.isMultiple&&i.selectedNodes.length===1&&!i.isComposing&&i.inputValue===""?5:-1),r(),Ae(i.isMultiple?-1:6),r(),Ae(!i.isMultiple||i.hasFeedback&&i.status?7:-1),r(),Ae(i.nzAllowClear&&!i.nzDisabled&&i.selectedNodes.length?8:-1))},dependencies:[Kl,Ul,Ia,Nr,Va,Br,bs,xs,es,Zl,qa,Lr,Uo,us,fs,gs,hs,Ho,Jl,Yl],encapsulation:2,data:{animation:[Gl]}});let n=a;return en([_n()],n.prototype,"nzDropdownMatchSelectWidth",void 0),en([_n()],n.prototype,"nzHideUnMatched",void 0),en([_n()],n.prototype,"nzShowIcon",void 0),en([_n()],n.prototype,"nzSize",void 0),en([_n()],n.prototype,"nzBackdrop",void 0),n})(),fa=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=Lt({type:a}),a.\u0275inj=Bt({imports:[$g]});let n=a;return n})();var Xg=n=>({x:n,y:"380px"}),Yg=n=>({count:n});function Jg(n,a){n&1&&(p(0,"span",15),g(1,"*"),c())}function Zg(n,a){if(n&1&&(p(0,"th",12)(1,"span",13),g(2),x(3,Jg,2,0,"span",14),c()()),n&2){let o=a.$implicit,t=d();l("nzWidth",t.subWidthMap[o.subQueWidth]+"px"),r(),We("width",t.subWidthMap[o.subQueWidth]-9+"px"),r(),M(" ",o.queTitle," "),r(),l("ngIf",o.required)}}function e0(n,a){n&1&&b(0,"div",23)}function t0(n,a){if(n&1&&(p(0,"td",20)(1,"div"),b(2,"qform-pc-form-control",21,0),x(4,e0,1,0,"div",22),c()()),n&2){let o=a.$implicit,t=a.index,e=d().index,i=d();r(),We("width",i.subWidthMap[o.subQueWidth]-17+"px"),r(),l("formQuestion",o)("controlDefaultValue",i.tableDefaultValue[e][t])("formScenario",i.FormScenario.DESIGN)("standalone",!0)("queRelation",i.queRelationsMap.get(o.queId||o.queTempId))("isSimpleMode",!0)("isInTableView",!0)("accountLevel",i.accountLevel)("isNeedTableView",!0)("useInCodeblock",!0),r(2),l("ngIf",i.disabledQueId.includes(o.queTempId))}}function i0(n,a){if(n&1){let o=S();p(0,"tr"),x(1,t0,5,13,"td",16),p(2,"td",17)(3,"span",18),m(4,"translate"),y("click",function(){let e=_(o).index,i=d();return C(i.removeRow(e))}),p(5,"i",19),g(6,"\uE6AE"),c()()()()}if(n&2){let o=d();r(),l("ngForOf",o.currentQue.subQuestions),r(2),l("title",u(4,2,"widgets.deleteRow"))}}var Wp=(()=>{let a=class a{get isAddToUpperLimit(){return this.tableDefaultValue.length>=(this.currentQue.tableRowsLimit||200)}initTable(){var t;this.subWidthMap=this.qfFormDataSrv.subWidthMap,this.currentQue.subQuestions.forEach(e=>this.subQMap.set(e.queId||e.queTempId,e)),this.tableDefaultValue=(t=this.tableDftValue)!=null&&t.length?je(this.tableDftValue).map(e=>this.currentQue.subQuestions.map(i=>e.find(s=>s.queId===i.queId||s.queId===i.queTempId))):[this.currentQue.subQuestions.map(e=>null)]}calculateXScrollWidth(){this.xScrollWidth=0,this.currentQue.subQuestions.forEach(t=>{this.rowFormModel[t.queId]=null,this.xScrollWidth+=this.subWidthMap[t.subQueWidth]}),this.xScrollWidth+=100}getCodeBlockTableValue(){return this.getTableDftValue().map(i=>i.map(s=>{let{queId:f,values:v}=s;return{keyQueId:f,values:ll(v,this.subQMap.get(f)),tableValues:[]}}))}getQLinkerTableValue(){let e=this.getInvalidControlValues().reduce((i,s)=>{if(i.has(s.queId)){let f=this.codeblockOrQlinkerTestService.parseQlinkerTestTableValueByType(s);i.get(s.queId).values.push(...f)}else{let f=this.codeblockOrQlinkerTestService.parseQlinkerTestTableValueByType(s);i.set(s.queId,{keyQueId:s.queId,values:f,tableValues:[]})}return i},new Map);return Array.from(e.values())}getTableDftValue(){let t=this.getInvalidControlValues().map(i=>Ee(me({},i),{rowId:null}));return this.tableDefaultValue.map(i=>t.splice(0,this.currentQue.subQuestions.length))}addNewRow(){this.tableDefaultValue.push(this.currentQue.subQuestions.map(t=>null)),this.isAddToUpperLimit&&(this.showUpperLimit=!0)}removeRow(t){this.tableDefaultValue.splice(t,1),this.isAddToUpperLimit||(this.showUpperLimit=!1)}
3getInvalidControlValues(){return this.qfPcFormControlList.map(e=>e.modelAnswerDetail).map(e=>{if([h.MEMBER,h.DEPARTMENT].includes(e.queType)){let i=e.values.filter(s=>s.value);return Ee(me({},e),{values:i})}else return e})}constructor(t,e,i){this.qfFormDataSrv=t,this.appFormEditService=e,this.codeblockOrQlinkerTestService=i,this.rowFormModel={},this.unsubscribe$=new fe,this.subQMap=new Map,this.accountLevel=Mt.ENTERPRISE,this.FormScenario=Ti,this.xScrollWidth=0,this.disabledQueId=[],this.tableDefaultValue=[],this.showUpperLimit=!1,this.tableDftValue=[]}ngOnInit(){this.queRelationsMap=this.appFormEditService.queRelationsMap,this.disabledQueId=this.currentQue.subQuestions.filter(t=>Qt(t.aggreType)).map(t=>t.queTempId),this.initTable(),this.calculateXScrollWidth()}ngOnDestroy(){this.getQLinkerTableValue(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(Ri),T(ee),T(Zt))},a.\u0275cmp=P({type:a,selectors:[["qf-test-table"]],viewQuery:function(e,i){if(e&1&&qe(Qi,5),e&2){let s;Te(s=Se())&&(i.qfPcFormControlList=s)}},inputs:{currentQue:"currentQue",tableDftValue:"tableDftValue"},features:[et([Ri])],decls:16,vars:20,consts:[["modelControl",""],[1,"modal-content"],[3,"nzBordered","nzScroll","nzShowPagination","nzData"],[1,"qf-table-thead"],["class","table-widget-td",3,"nzWidth",4,"ngFor","ngForOf"],["nzWidth","45px","nzRight","0px",1,"table-widget-td"],[2,"width","44px"],[4,"ngFor","ngForOf"],["nz-tooltip","","nzTooltipPlacement","bottom",3,"nzTooltipTitle","nzTooltipTrigger","nzTooltipVisible"],["qf-button","","qfType","dashed",1,"add-row-btn",3,"click","disabled"],["qf-icon","","qfName","ex-plus-circle"],[1,"add-row-btn-text"],[1,"table-widget-td",3,"nzWidth"],[1,"th-title"],["class","required-mark",4,"ngIf"],[1,"required-mark"],["class","table-widget-td",4,"ngFor","ngForOf"],["nzRight","0px",1,"table-widget-td"],[1,"action-icon-wrap","delete",3,"click","title"],[1,"iconfont"],[1,"table-widget-td"],[3,"formQuestion","controlDefaultValue","formScenario","standalone","queRelation","isSimpleMode","isInTableView","accountLevel","isNeedTableView","useInCodeblock"],["class","disabled-mask",4,"ngIf"],[1,"disabled-mask"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"nz-table",2)(2,"thead",3)(3,"tr"),x(4,Zg,4,5,"th",4),p(5,"th",5),b(6,"div",6),c()()(),p(7,"tbody"),x(8,i0,7,4,"tr",7),c()(),p(9,"div",8),m(10,"translate"),p(11,"button",9),y("click",function(){return i.addNewRow()}),b(12,"i",10),p(13,"span",11),g(14),m(15,"translate"),c()()()()),e&2&&(r(),l("nzBordered",!0)("nzScroll",at(16,Xg,i.xScrollWidth+"px"))("nzShowPagination",!1)("nzData",i.tableDefaultValue),r(3),l("ngForOf",i.currentQue.subQuestions),r(4),l("ngForOf",i.tableDefaultValue),r(),l("nzTooltipTitle",zt(10,11,"widgets.tableUpperLimitTip",at(18,Yg,i.currentQue.tableRowsLimit||200)))("nzTooltipTrigger",i.isAddToUpperLimit?"hover":null)("nzTooltipVisible",i.showUpperLimit),r(2),l("disabled",i.isAddToUpperLimit),r(3),M(" ",i.currentQue.tableCustomButtonText||u(15,14,"widgets.addRow")," "))},dependencies:[B,A,Go,qn,In,On,En,ki,Ko,yt,K,ce,Qi,k],styles:[".modal-content[_ngcontent-%COMP%]{height:490px}.table-widget-td[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 0}.table-widget-td[_ngcontent-%COMP%] .required-mark[_ngcontent-%COMP%]{margin-left:3px;color:#f26245}th.table-widget-td[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block}th.table-widget-td[_ngcontent-%COMP%] .th-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:8px;text-indent:8px}td.table-widget-td[_ngcontent-%COMP%]{padding:8px}.action-icon-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;cursor:pointer;border-radius:3px;transition:all .3s}.action-icon-wrap[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]{color:#c1c1cd;transition:all .3s}.action-icon-wrap[_ngcontent-%COMP%]:hover{background:#2b34410d}.action-icon-wrap[_ngcontent-%COMP%]:hover > .iconfont[_ngcontent-%COMP%]{color:#494f57}
3.action-icon-wrap.delete[_ngcontent-%COMP%]:hover{background:#ff12121a}.action-icon-wrap.delete[_ngcontent-%COMP%]:hover > .iconfont[_ngcontent-%COMP%]{color:red}.add-row-btn[_ngcontent-%COMP%]{width:100%;margin-top:10px}.add-row-btn[_ngcontent-%COMP%] .add-row-btn-text[_ngcontent-%COMP%]{max-width:98px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled-mask[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;cursor:not-allowed}"]});let n=a;return n})();var Hp=(()=>{let a=class a{constructor(){this.PathType=rt,this.filesChange=new R,this.fullFiles=[]}set files(t){this.fullFiles=di(t)?[]:t.map(e=>({name:e.otherInfo,url:e.value,status:"done"}))}uploadChange(t){let e=t.map(i=>({otherInfo:i.name,value:i.url}));this.filesChange.emit(e)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-widget-uploader"]],inputs:{files:"files"},outputs:{filesChange:"filesChange"},decls:1,vars:3,consts:[["ngDefaultControl","","btnText","widgets.upload",3,"ngModelChange","pathType","size","ngModel"]],template:function(e,i){e&1&&(p(0,"qf-single-func-file-upload",0),O("ngModelChange",function(f){return E(i.fullFiles,f)||(i.fullFiles=f),f}),y("ngModelChange",function(f){return i.uploadChange(f)}),c()),e&2&&(l("pathType",i.PathType.Upload)("size",10),I("ngModel",i.fullFiles))},dependencies:[le,V,Q,mp],styles:["[_nghost-%COMP%] .upload-block{width:270px!important;height:36px!important;font-size:14px}[_nghost-%COMP%] .upload-file-item{height:36px!important;margin-top:8px!important}[_nghost-%COMP%] .upload-file-avatar-inner{width:22px!important;height:22px!important;margin-top:5px}"],changeDetection:0});let n=a;return n})();var sr=(n,a)=>[n,a],o0=(n,a,o,t)=>[n,a,o,t],a0=(n,a,o,t)=>({key:n,status:a,formZone:o,referenceConfig:t,standalone:!0});function r0(n,a){if(n&1){let o=S();p(0,"nz-input-number",14),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChange(e))}),c()}if(n&2){let o=d();l("nzPlaceHolder",u(1,2,"codeblock.pleaseInput")),I("ngModel",o.data)}}function l0(n,a){if(n&1){let o=S();p(0,"nz-date-picker",15),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChange(e))}),c()}if(n&2){let o=d();l("nzMode",o.dateFormMode)("nzFormat",o.dateFormType)("nzShowTime",o.isShowTime)("nzPlaceHolder",u(1,5,"all.pleaseSelect")),I("ngModel",o.data)}}function s0(n,a){if(n&1){let o=S();p(0,"nz-range-picker",16),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChange(e))}),c()}if(n&2){let o=d();l("nzMode",o.dateFormMode)("nzFormat",o.dateFormType)("nzShowTime",o.isShowTime),I("ngModel",o.data)}}function p0(n,a){if(n&1&&b(0,"qf-option",19),n&2){let o=a.$implicit,t=d(2);l("qfValue",o.optValue)("qfLabel",o.optValue)("qfImgSrc",t.QueType.IMAGE_PICKER===t.type?o.optUrl:"")}}function c0(n,a){if(n&1){let o=S();p(0,"qf-select",17),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChange(e))}),x(2,p0,1,3,"qf-option",18),c()}if(n&2){let o=d();l("qfPlaceHolder",u(1,4,"all.pleaseSelect"))("qfMode",Ce(6,sr,o.QueType.CHECKBOX,o.QueType.IMAGE_PICKER).includes(o.type)?"multiple":"default"),I("ngModel",o.data),r(2),l("ngForOf",o.options)}}function d0(n,a){if(n&1){let o=S();p(0,"qf-member-select",20),O("ngModelChange",function(e){_(o);let i=d();return E(i.memberList,e)||(i.memberList=e),C(e)}),y("qfOpen",function(){_(o);let e=d();return C(e.openMemberModal())})("ngModelChange",function(e){_(o);let i=d();return C(i.removeMember(e))}),c()}if(n&2){let o=d();I("ngModel",o.memberList)}}function m0(n,a){if(n&1){let o=S();p(0,"qf-widget-uploader",21),y("filesChange",function(e){_(o);let i=d();return C(i.onChange(e))}),c()}if(n&2){let o=d();l("files",o.data)}}function u0(n,a){if(n&1){let o=S();j(0,22),p(1,"qform-address-accessor",23),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onAddressChange(e))}),c(),U()}if(n&2){let o=d();l("formGroup",o.myGroup),r(),l("formControlName",o.modelKey)("model",o.addressModel),I("ngModel",o.data)}}function f0(n,a){if(n&1){let o=S();p(0,"qf-cond-depart-select",24),O("ngModelChange",function(e){_(o);let i=d();return E(i.deptData,e)||(i.deptData=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.changeDeptList(e))}),c()}if(n&2){let o=d();l("showExternal",!0),I("ngModel",o.deptData)}}function g0(n,a){if(n&1){let o=S();p(0,"qf-rich-text",25),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),c()}if(n&2){let o=d();l("placeholder",u(1,2,"widgets.descContent")),I("ngModel",o.data)}}function h0(n,a){if(n&1){let o=S();p(0,"qf-rich-text",26),m(1,"translate"),y("ngModelChange",function(e){_(o);let i=d();return C(i.onRichTextChange(e))}),c()}if(n&2){let o=d();l("placeholder",u(1,3,"widgets.inputTestContent"))("ngModel",o.data)("pathType",o.PathType.RichText)}}function _0(n,a){if(n&1){let o=S();j(0),p(1,"qform-pc-quote-accessor",27),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("onReferChange",function(e){_(o);let i=d();return C(i.onReferChange(e))}),c(),U()}if(n&2){let o=d();r(),l("isInTableView",!0)("model",Ma(7,a0,o.id,o.QueAuth.canEdit,o.formZone,o.referenceConfig))("formScenario",o.FormScenario.DESIGN)("accountLevel",o.AccountLevel.ENTERPRISE)("isNeedTableView",!0)("existMaxWidth",!1),I("ngModel",o.data)}}function C0(n,a){if(n&1){let o=S();p(0,"button",28),y("click",function(){_(o);let e=d();return C(e.openTestTableDftValueSettingModal(e.data))}),g(1),m(2,"translate"),c()}n&2&&(r(),M(" ",u(2,1,"widgets.setTable")," "))}function y0(n,a){if(n&1){let o=S();p(0,"input",29),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data,e)||(i.data=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onChange(e))}),c()}if(n&2){let o=d();l("placeholder",u(1,2,"codeblock.pleaseInput")),I("ngModel",o.data)}}var ga=(()=>{let a=class a{set addressPrecision(t){t&&(this.addressModel.isDetailVisible=t===Ye.all,this.addressModel.cols=this.addressPrecisionOfColsMap[t])}constructor(t,e,i,s,f){this.fb=t,this.changeDetectorRef=e,this.modalHelper=i,this.formZone=s,this._memberSelectModalService=f,this.QueType=h,this.FormScenario=Ti,this.QueAuth=Ht,this.AccountLevel=Mt,this.dataChange=new R,this.addressChange=new R,this.tableChange=new R,this.referChange=new R,this.referenceConfig={referAppKey:"",customButtonText:"",referMatchRules:[],referQuestions:[],referAuthQues:[],referFillRules:[],optionalDataNum:0},this.addressPrecisionOfColsMap={[Ye.provinceOnly]:1,[Ye.provinceAndCity]:2,[Ye.exceptDetail]:3,[Ye.all]:3},this.addressModel={status:1,isDetailVisible:!0,key:"",cols:3}
3,this.modelKey="data",this.uploadingImg=!1,this.PathType=rt,this.memberList=[],this.deptData={depart:[]}}changeDeptList(t){this.onChange(t.depart.map(e=>e.deptId))}removeMember(t){this.onChange(t.map(e=>e.uid))}openMemberModal(){this._memberSelectModalService.openMemberSelectModal({memberList:this.memberList.map(t=>({uid:t.uid,headImg:t.imgSrc,nickName:t.userName,email:t.userName,remark:t.userName})),tabTypeList:["member","external_member"],confirmCallback:t=>{this.memberList=t.map(e=>({imgSrc:e.headImg,uid:e.uid,userName:e.remark||e.nickName||e.email})),this.onChange(this.memberList.map(e=>e.uid))}})}getImgById(t){var e;return(e=this.options.find(i=>i.optId===t))==null?void 0:e.optUrl}onChange(t){t!==null&&(this.type===h.DATE?t=Ea(t,this.dateFormType):this.type===h.DATE_RANGE&&(t=t.map(e=>Ea(e,this.dateFormType)))),this.dataChange.emit(t)}onAddressChange(t){Array.isArray(t)&&this.addressChange.emit(t)}onRichTextChange(t){this.dataChange.emit(t)}onReferChange(t){this.referChange.emit(t),this.dataChange.emit(t)}getTableValue(){var t,e;return this.codeBlockTableData?((t=this.codeBlockTableData.codeBlockConfig.tableContent)==null?void 0:t.tableValues)||[]:this.testTableDftValues?this.testTableDftValues:(e=this.data.queDefaultValues)==null?void 0:e.tableValues}openTestTableDftValueSettingModal(t){let e=this.getTableValue();this.modalHelper.create(Wp,{currentQue:t,tableDftValue:e},{size:700,modalOptions:{title:t.queTitle,onOk:i=>{let s=i.getTableDftValue(),f=i.getCodeBlockTableValue(),v=i.getQLinkerTableValue();this.codeBlockTableData=je(t),this.codeBlockTableData.codeBlockConfig.tableContent=s.length>0?{queId:t.queId,tableValues:s}:null,this.dataChange.emit(t),this.tableChange.emit({tableDftValues:s,tableTranslateValues:f,qlinkerTableTranslateValues:v})}}}).subscribe()}ngOnInit(){this.addressModel.key=this.modelKey,this.dateFormType=Ki.get(this.dateType),this.dateFormMode=Mo.get(this.dateType),this.isShowTime=qo.get(this.dateType),[h.ADDRESS,h.LOCATION,h.REFER,h.TABLE].includes(this.type)&&(this.myGroup=this.fb.group({[this.modelKey]:[]}),this.control=this.myGroup.get(this.modelKey)),this.isApplicant=this.type===h.MEMBER&&Number(this.id)===1,this.changeDetectorRef.detectChanges()}};a.\u0275fac=function(e){return new(e||a)(T(Gt),T(He),T(vt),T(qs),T(zo))},a.\u0275cmp=P({type:a,selectors:[["qf-widget"]],inputs:{data:"data",type:"type",testTableDftValues:"testTableDftValues",dateType:"dateType",id:"id",options:"options",referenceConfig:"referenceConfig",addressPrecision:"addressPrecision"},outputs:{dataChange:"dataChange",addressChange:"addressChange",tableChange:"tableChange",referChange:"referChange"},features:[et([zo])],decls:14,vars:24,consts:[[3,"ngSwitch"],[3,"nzPlaceHolder","ngModel","ngModelChange",4,"ngSwitchCase"],[3,"nzMode","nzFormat","nzShowTime","nzPlaceHolder","ngModel","ngModelChange",4,"ngSwitchCase"],[3,"nzMode","nzFormat","nzShowTime","ngModel","ngModelChange",4,"ngSwitchCase"],[3,"qfPlaceHolder","qfMode","ngModel","ngModelChange",4,"ngSwitchCase"],[3,"ngModel","ngModelChange","qfOpen",4,"ngSwitchCase"],[3,"files","filesChange",4,"ngSwitchCase"],[3,"formGroup",4,"ngSwitchCase"],[3,"showExternal","ngModel","ngModelChange",4,"ngSwitchCase"],["hideToolbar","","readOnly","",3,"placeholder","ngModel","ngModelChange",4,"ngSwitchCase"],["class","rich-text","bounds","self",3,"placeholder","ngModel","pathType","ngModelChange",4,"ngSwitchCase"],[4,"ngSwitchCase"],["qf-button","","qfType","dashed",3,"click",4,"ngSwitchCase"],["qf-input","","maxlength","5000",3,"placeholder","ngModel","ngModelChange",4,"ngSwitchDefault"],[3,"ngModelChange","nzPlaceHolder","ngModel"],[3,"ngModelChange","nzMode","nzFormat","nzShowTime","nzPlaceHolder","ngModel"],[3,"ngModelChange","nzMode","nzFormat","nzShowTime","ngModel"],[3,"ngModelChange","qfPlaceHolder","qfMode","ngModel"],[3,"qfValue","qfLabel","qfImgSrc",4,"ngFor","ngForOf"],[3,"qfValue","qfLabel","qfImgSrc"],[3,"ngModelChange","qfOpen","ngModel"],[3,"filesChange","files"],[3,"formGroup"],[3,"ngModelChange","formControlName","model","ngModel"],[3,"ngModelChange","showExternal","ngModel"],["hideToolbar","","readOnly","",3,"ngModelChange","placeholder","ngModel"],["bounds","self",1,"rich-text",3,"ngModelChange","placeholder","ngModel","pathType"],[3,"ngModelChange","onReferChange","isInTableView","model","formScenario","accountLevel","isNeedTableView","existMaxWidth","ngModel"],["qf-button","","qfType","dashed",3,"click"],["qf-input","","maxlength","5000",3,"ngModelChange","placeholder","ngModel"]],template:function(e,i){e&1&&(j(0,0),x(1,r0,2,4,"nz-input-number",1)(2,l0,2,7,"nz-date-picker",2)(3,s0,1,4,"nz-range-picker",3)(4,c0,3,9,"qf-select",4)(5,d0,1,1,"qf-member-select",5)(6,m0,1,1,"qf-widget-uploader",6)(7,u0,2,4,"ng-container",7)(8,f0,1,2,"qf-cond-depart-select",8)(9,g0,2,4,"qf-rich-text",9)(10,h0,2,5,"qf-rich-text",10)(11,_0,2,12,"ng-container",11)(12,C0,3,3,"button",12)(13,y0,2,4,"input",13),U()),e&2&&(l("ngSwitch",i.type),r(),l("ngSwitchCase",Ce(13,sr,i.QueType.NUMBER,i.QueType.PHONE).includes(i.type)&&i.id!==0?i.type:""),r(),l("ngSwitchCase",i.QueType.DATE),r(),l("ngSwitchCase",i.QueType.DATE_RANGE),r(),l("ngSwitchCase",Ma(16,o0,i.QueType.RADIO,i.QueType.SELECT,i.QueType.CHECKBOX,i.QueType.IMAGE_PICKER).includes(i.type)&&(i.options!=null&&i.options.length)?i.type:""),r(),l("ngSwitchCase",i.QueType.MEMBER),r(),l("ngSwitchCase",i.QueType.UPLOAD),r(),l("ngSwitchCase",Ce(21,sr,i.QueType.ADDRESS,i.QueType.LOCATION).includes(i.type)?i.type:""),r(),l("ngSwitchCase",i.QueType.DEPARTMENT),r(),l("ngSwitchCase",i.QueType.DESCRIPTION),r(),l("ngSwitchCase",i.QueType.RICHTEXT),r(),l("ngSwitchCase",i.QueType.REFER),r(),l("ngSwitchCase",i.QueType.TABLE))},dependencies:[B,ri,li,po,le,V,ge,Ue,Q,Ut,Kt,wn,Ro,No,he,Xt,oe,ne,K,ps,ds,Bs,Ls,Hp,k],styles:["[_nghost-%COMP%] > [_ngcontent-%COMP%]:first-child{width:100%}.ant-tree-node-content-wrapper[_ngcontent-%COMP%]{display:inline-block;
3max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"],changeDetection:0});let n=a;return n})();var ha=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=Lt({type:a}),a.\u0275inj=Bt({imports:[si,kn,Pn,fa,ea,Vn]});let n=a;return n})();function pr(n,a,o){n[o]=n[a],Reflect.deleteProperty(n,a)}function Up(n=[]){n.forEach(a=>{var o;pr(a,"subDeparts","children"),pr(a,"deptName","title"),pr(a,"deptId","key"),(o=a.children)!=null&&o.length?Up(a.children):a.isLeaf=!0})}var kt=(()=>{let a=class a{constructor(t,e,i,s){this.wsMemberRequest=t,this.singleDataRequest=e,this.appFormEditService=i,this.queDisplayTitlePipe=s,this.editorInit$=new fe,this.uniqId=1}getUserOptions(){return Tt(this,null,function*(){if(!this.userOptionsCache){let t=yield Wi(this.wsMemberRequest.getContactUsers({pageNum:1,pageSize:500,memberType:1}).pipe(Hi(e=>e.result)));this.userOptionsCache=t.map(e=>({optId:e.uid,optValue:e.nickName,optUrl:e.headImg}))}return{type:"user",result:this.userOptionsCache}})}getDepartmentOptions(t){return Tt(this,null,function*(){return this.departmentOptionsCache||(this.departmentOptionsCache=yield Wi(this.singleDataRequest.getDepartmentScope({queId:t,role:1,searchKey:"",beingDraft:!0}).pipe(Hi(e=>e.depart))),Up(this.departmentOptionsCache)),{type:"department",result:this.departmentOptionsCache}})}fillFieldsOptions(t){return Tt(this,null,function*(){let e=t.find(v=>v.queType===h.MEMBER),i=t.find(v=>v.queType===h.DEPARTMENT),s=[];e&&s.push(this.getUserOptions()),i&&s.push(this.getDepartmentOptions(i.queId));let f=[];try{f=yield Promise.all(s)}catch(v){console.error(v)}f.forEach(v=>{v.type==="user"?t.filter(q=>q.queType===h.MEMBER).forEach(q=>{var D,F;return q.options=this.setOptionsBeingDefault((F=(D=q.memberDftValue)==null?void 0:D.member)!=null?F:[],v.result,"user")}):v.type==="department"&&t.filter(q=>q.queType===h.DEPARTMENT).forEach(q=>{var D,F;return q.options=this.setOptionsBeingDefault((F=(D=q.deptDftValue)==null?void 0:D.depart)!=null?F:[],v.result,"department")})})})}setOptionsBeingDefault(t,e,i){let s=t.map(v=>i==="user"?v.uid:v.deptId),f=new Set(s);return e.forEach(v=>{let q=i==="user"?v.optId:v.deptId;return v.beingDefault=f.has(q),v}),tt(e)}getFields(t){let e=[h.CODEBLOCK,h.QLINKER,h.OCR],i=this.appFormEditService.genInsertableQuestions(t).filter(s=>!e.includes(s.queType));return i.forEach(s=>{let f=At(s.queId,4);s.encryptCode=f;let v=this.queDisplayTitlePipe.transform(s);s.encryptStr=`{${v}$$${f}$$}`}),tt(i||[])}getUniqId(){return this.uniqId++}resetUniqId(){this.uniqId=1}};a.\u0275fac=function(e){return new(e||a)(ti(ml),ti(hn),ti(ee),ti(it))},a.\u0275prov=ai({token:a,factory:a.\u0275fac});let n=a;return n})();function v0(n,a){if(n&1&&b(0,"qf-option",8),n&2){let o=a.$implicit;l("qfValue",o.value)("qfLabel",o.label)}}function x0(n,a){if(n&1){let o=S();p(0,"qf-select",6),O("ngModelChange",function(e){_(o);let i=d();return E(i.value.aliasType,e)||(i.value.aliasType=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.onTypeChange())}),x(1,v0,1,2,"qf-option",7),c()}if(n&2){let o=d();I("ngModel",o.value.aliasType),r(),l("ngForOf",o.types)}}function b0(n,a){n&1&&(p(0,"button",9),m(1,"translate"),g(2),m(3,"translate"),c()),n&2&&(l("title",u(1,2,"plugin.childAlias")),r(2),M(" ",u(3,4,"plugin.childAlias")," "))}var Kp=()=>{},T0={provide:Cn,useExisting:tn(()=>cr),multi:!0},cr=(()=>{let a=class a{get value(){return this.innerValue}set value(t){t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t))}constructor(t){this.translateService=t,this.innerValue={},this.onTouchedCallback=Kp,this.onChangeCallback=Kp,this.nodeType="normal",this.remove=new R,this.types=[{label:this.translateService.instant("plugin.basicAlias"),value:lt.BASIC},{label:this.translateService.instant("plugin.tableAlias"),value:lt.TABLE}]}writeValue(t){t!==this.innerValue&&(this.innerValue=t||{})}onValueChange(){this.onChangeCallback(this.value)}onTypeChange(){this.value.subAlias=[],this.onChangeCallback(this.value)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}};a.\u0275fac=function(e){return new(e||a)(T(X))}
3,a.\u0275cmp=P({type:a,selectors:[["qf-parsing-base-item"]],inputs:{nodeType:"nodeType"},outputs:{remove:"remove"},features:[et([T0])],decls:7,vars:7,consts:[[1,"first"],[3,"ngModel","ngModelChange",4,"ngIf"],["qf-button","","class","child-btn","disabled","","qfSize","medium",3,"title",4,"ngIf"],["qf-input","","maxlength","500",3,"ngModelChange","placeholder","ngModel"],["qf-input","","placeholder","JSON Path","maxlength","500",3,"ngModelChange","ngModel"],["qf-button","","qfIconWithBorder","","qfSize","large","qfIcon","ex-delete","qfType","text",3,"click"],[3,"ngModelChange","ngModel"],[3,"qfValue","qfLabel",4,"ngFor","ngForOf"],[3,"qfValue","qfLabel"],["qf-button","","disabled","","qfSize","medium",1,"child-btn",3,"title"]],template:function(e,i){e&1&&(p(0,"div",0),x(1,x0,2,2,"qf-select",1)(2,b0,4,6,"button",2),c(),p(3,"input",3),m(4,"translate"),O("ngModelChange",function(f){return E(i.value.aliasName,f)||(i.value.aliasName=f),f}),y("ngModelChange",function(){return i.onValueChange()}),c(),p(5,"input",4),O("ngModelChange",function(f){return E(i.value.aliasPath,f)||(i.value.aliasPath=f),f}),y("ngModelChange",function(){return i.onValueChange()}),c(),p(6,"button",5),y("click",function(){return i.remove.emit()}),c()),e&2&&(r(),l("ngIf",i.nodeType==="normal"),r(),l("ngIf",i.nodeType==="leaf"),r(),l("placeholder",u(4,5,"all.enterAliasName")),I("ngModel",i.value.aliasName),r(2),I("ngModel",i.value.aliasPath))},dependencies:[B,A,le,V,Ue,Q,he,oe,ne,K,k],styles:["[_nghost-%COMP%]{display:flex;gap:40px 8px}.first[_ngcontent-%COMP%]{flex:0 0 90px}.first[_ngcontent-%COMP%] qf-select[_ngcontent-%COMP%]{width:100%}.first[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:calc(100% - 13px)}.first[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.child-btn.qf-btn[_ngcontent-%COMP%]:disabled{margin-left:13px;cursor:auto!important;background:#fff!important}.qf-btn.qf-btn-small[_ngcontent-%COMP%]{color:#494f57!important}"]});let n=a;return n})();function M0(n,a){if(n&1){let o=S();p(0,"qf-parsing-base-item",14),O("ngModelChange",function(e){let i=_(o).index,s=d(2).index,f=d();return E(f.aliases[s].subAlias[i],e)||(f.aliases[s].subAlias[i]=e),C(e)}),y("remove",function(){let e=_(o).index,i=d(2).$implicit,s=d();return C(s.removeChild(i,e))})("ngModelChange",function(){_(o);let e=d(3);return C(e.onAliasValueChange())}),c()}if(n&2){let o=a.index,t=d(2).index,e=d();I("ngModel",e.aliases[t].subAlias[o])}}function q0(n,a){if(n&1){let o=S();p(0,"div",11),x(1,M0,1,1,"qf-parsing-base-item",12),p(2,"button",13),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.addChild(e))}),g(3),m(4,"translate"),c()()}if(n&2){let o=d().$implicit;r(),l("ngForOf",o.subAlias),r(2),M(" ",u(4,2,"plugin.addChildAlias")," ")}}function I0(n,a){if(n&1){let o=S();p(0,"div",8)(1,"qf-parsing-base-item",9),O("ngModelChange",function(e){let i=_(o).index,s=d();return E(s.aliases[i],e)||(s.aliases[i]=e),C(e)}),y("remove",function(){let e=_(o).index,i=d();return C(i.remove(e))})("ngModelChange",function(){_(o);let e=d();return C(e.onAliasValueChange())}),c(),x(2,q0,5,4,"div",10),c()}if(n&2){let o=a.$implicit,t=a.index,e=d();r(),I("ngModel",e.aliases[t]),r(),l("ngIf",o.aliasType===e.AliasType.TABLE)}}var $p=(()=>{let a=class a{get aliases(){return this._aliases}set aliases(t){this._aliases=Array.isArray(t)?tt(t):[]}
3constructor(t,e,i){this.codeblockEditService=t,this.notification=e,this.translateService=i,this._aliases=[],this.canAdd=!0,this.aliasesChange=new R,this.AliasType=lt}get htmlCode(){var e;let t=" ";try{return((e=JSON.stringify(this.testingResult,null,4))==null?void 0:e.replace(/\n\}$/,` 4 }`))||t}catch{return t}}add(){let t=new pn("","",lt.BASIC);this._aliases.length>=100||(this._aliases.push(t),this.change())}remove(t){this._aliases.splice(t,1),this.change()}addChild(t){var s;let e=((s=t.subAlias)==null?void 0:s.length)||0,i=new pn("","",lt.BASIC);e?t.subAlias.push(i):t.subAlias=[i],this.change()}removeChild(t,e){t.subAlias.splice(e,1),this.change()}onAliasValueChange(){this.change()}change(){this.canAdd=this._aliases.length<100,this.codeblockEditService.resetUniqId(),this._aliases.forEach(t=>{var e;(t.aliasId<0||!t.aliasId)&&(t.aliasId=-this.codeblockEditService.getUniqId()),(e=t.subAlias)==null||e.forEach((i,s)=>{if(i.aliasId<0||!i.aliasId){let f=String(Math.round(2147483648/Math.abs(t.aliasId))).length-1;f<2&&(f=2);let v=Math.pow(10,f);i.aliasId=-(Math.abs(t.aliasId)*v+this.codeblockEditService.getUniqId())}})}),this.aliasesChange.emit(this._aliases)}parseOutput(){try{let t=Object.keys(this.testingResult).map(e=>new pn(e,`$.${e}`,lt.BASIC));this._aliases.push(...t),this.change()}catch{this.notification.show({type:"error",title:"\u8B66\u544A",subTitle:`${this.translateService.instant("codeblock.generateParsing")}\u5931\u8D25`})}}};a.\u0275fac=function(e){return new(e||a)(T(kt),T(fo),T(X))},a.\u0275cmp=P({type:a,selectors:[["qf-codeblock-edit-parsing"]],inputs:{testingResult:"testingResult",aliases:"aliases"},outputs:{aliasesChange:"aliasesChange"},decls:19,vars:16,consts:[[1,"output"],["mode","json","qfHeight","286px",3,"ngModel","readOnly"],[1,"notice"],["qf-button","","qfSize","medium","qfType","primary",3,"click"],[1,"create-alias"],[1,"aliases"],["class","alias",4,"ngFor","ngForOf"],["qf-button","","qfIconWithBorder","","qfSize","medium","qfIcon","ex-plus-circle","qfType","dashed",3,"click","disabled"],[1,"alias"],[3,"ngModelChange","remove","ngModel"],["class","child",4,"ngIf"],[1,"child"],["class","child-item","nodeType","leaf",3,"ngModel","ngModelChange","remove",4,"ngFor","ngForOf"],["qf-button","","qfIconWithBorder","","qfSize","medium","qfIcon","ex-plus-circle","qfType","dashed",1,"add",3,"click"],["nodeType","leaf",1,"child-item",3,"ngModelChange","remove","ngModel"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"p"),g(2,"qf_output"),c(),b(3,"qf-codemirror",1),p(4,"p",2),g(5),m(6,"translate"),c(),p(7,"button",3),y("click",function(){return i.parseOutput()}),g(8),m(9,"translate"),c()(),p(10,"div",4)(11,"h4"),g(12),m(13,"translate"),c(),p(14,"div",5),x(15,I0,3,2,"div",6),c(),p(16,"button",7),y("click",function(){return i.add()}),g(17),m(18,"translate"),c()()),e&2&&(r(3),l("ngModel",i.htmlCode)("readOnly",!0),r(2),w(u(6,8,"codeblock.parsingTip")),r(3),M(" ",u(9,10,"codeblock.generateParsing")," "),r(4),w(u(13,12,"plugin.addAlias")),r(3),l("ngForOf",i.aliases),r(),l("disabled",!i.canAdd),r(),M(" ",u(18,14,"plugin.addNewAlias")," "))},dependencies:[B,A,V,Q,K,st,cr,k],styles:["[_nghost-%COMP%]{display:flex;column-gap:32px}.output[_ngcontent-%COMP%]{flex:1;width:50%;font-size:13px}.output[_ngcontent-%COMP%] p.notice[_ngcontent-%COMP%]{color:#767e89}.create-alias[_ngcontent-%COMP%]{flex:1}.create-alias[_ngcontent-%COMP%] .qf-btn.qf-btn-small[_ngcontent-%COMP%]{color:#494f57!important}.create-alias[_ngcontent-%COMP%] .aliases[_ngcontent-%COMP%]{max-height:302px;padding:1px;margin-bottom:8px;overflow-y:auto}.create-alias[_ngcontent-%COMP%] .aliases[_ngcontent-%COMP%] .alias[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:8px;margin-bottom:8px}.create-alias[_ngcontent-%COMP%] .aliases[_ngcontent-%COMP%] .alias[_ngcontent-%COMP%]:last-child{margin-bottom:0}.create-alias[_ngcontent-%COMP%] .aliases[_ngcontent-%COMP%] .alias[_ngcontent-%COMP%] .child[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:8px}.create-alias[_ngcontent-%COMP%] .aliases[_ngcontent-%COMP%] .alias[_ngcontent-%COMP%] .child[_ngcontent-%COMP%] .add[_ngcontent-%COMP%]{width:128px;margin-left:13px}"]});let n=a;return n})();var O0=(n,a)=>[n,a];function P0(n,a){if(n&1){let o=S();p(0,"div",8)(1,"button",9),g(2),c(),p(3,"qf-widget",10),y("dataChange",function(e){let i=_(o
4).$implicit,s=d();return C(s.dataChange(e,i))})("tableChange",function(e){let i=_(o).$implicit,s=d();return C(s.tableChange(e,i))})("addressChange",function(e){let i=_(o).$implicit,s=d();return C(s.addressChange(e,i))}),c()()}if(n&2){let o=a.$implicit,t=d();be("field-block",Ce(14,O0,t.QueType.RICHTEXT,t.QueType.DESCRIPTION).includes(o.queType)),r(),be("rich-text-button",o.queType===t.QueType.RICHTEXT||t.QueType.DESCRIPTION),l("title",o.queTitle),r(),M(" ",o.queTitle," "),r(),l("id",o.queId)("type",o.queType)("dateType",o.dateType)("addressPrecision",o.addressPrecision)("data",o.input)("testTableDftValues",o.testTableDftValues)("options",o.options)("referenceConfig",o.referenceConfig)}}function D0(n,a){if(n&1&&(j(0),p(1,"p"),g(2," qf_output "),p(3,"span",11),g(4),m(5,"translate"),c()(),b(6,"qf-codemirror",12),p(7,"p",13),g(8),m(9,"translate"),c(),U()),n&2){let o=d();r(4),w(u(5,5,"codeblock.parsingSucess")),r(2),l("ngModel",o.formattedCode)("isCopyVisible",!0)("readOnly",!0),r(2),w(u(9,7,"codeblock.nextParsingStepTip"))}}function k0(n,a){if(n&1&&(j(0),p(1,"p")(2,"span",14),g(3),m(4,"translate"),c()(),b(5,"qf-codemirror",15),U()),n&2){let o=d();r(3),M(" ",u(4,4,"codeblock.parsingFailure")," "),r(2),l("ngModel",o.failureMsg)("isCopyVisible",!0)("readOnly",!0)}}function V0(n,a){if(n&1&&(j(0),p(1,"p"),g(2,"qf_output"),c(),b(3,"qf-codemirror",12),p(4,"p",13),g(5),m(6,"translate"),c(),U()),n&2){let o=d();r(3),l("ngModel",o.formattedCode)("isCopyVisible",!1)("readOnly",!0),r(2),w(u(6,4,"codeblock.nextParsingStepTip"))}}var ei=function(n){return n[n.Intact=0]="Intact",n[n.Running=1]="Running",n[n.Success=2]="Success",n[n.Failure=3]="Failure",n}(ei||{}),Xp=(()=>{let a=class a{get formattedCode(){var e;let t=" ";try{return((e=JSON.stringify(this.testingResult,null,4))==null?void 0:e.replace(/\n\}$/,` 5}`))||t}catch{return t}}constructor(t,e,i,s,f,v){this.formRequest=t,this.changeDetectorRef=e,this.messageService=i,this.translateService=s,this.codeblockEditService=f,this.codeblockOrQlinkerTestService=v,this.fields=[],this.code="",this.testingResultChange=new R,this.testingStateChange=new R,this.State=ei,this.QueType=h,this.state=ei.Intact,this.failureMsg=""}ngOnInit(){return Tt(this,null,function*(){this.testingStateChange.emit(this.state),yield this.codeblockEditService.fillFieldsOptions(this.fields),this.codeblockOrQlinkerTestService.dealDefaultValue(this.fields),this._loadCacheTestAnswer(),this.changeDetectorRef.detectChanges()})}assembleData(t){let e=t.map(s=>{var f,v;switch(s.queType===h.RICHTEXT&&typeof s.input!="string"&&(s.input=""),s.queType){case h.UPLOAD:return{keyQueId:s.queId,values:s.input.map(q=>q.value),tableValues:[]};case h.REFER:return{keyQueId:s.queId,values:(f=s.input)==null?void 0:f.map(q=>q.applyId),tableValues:[]};case h.DATE_RANGE:return{keyQueId:s.queId,values:s.input.join("~"),tableValues:[]};case h.SELECT:case h.RADIO:return{keyQueId:s.queId,values:s.options.filter(q=>q.optValue===s.input).map(q=>q.optId),tableValues:[]};case h.CHECKBOX:case h.IMAGE_PICKER:{let q=s.input?s.input:[];return{keyQueId:s.queId,values:s.options.filter(D=>q.includes(D.optValue)).map(D=>D.optId),tableValues:[]}}case h.LOCATION:case h.ADDRESS:return{keyQueId:s.queId,values:(v=s.input)==null?void 0:v.map(({value:q})=>q).join(""),tableValues:[]};case h.TABLE:{let q=s.testTableValue&&!di(s.testTableValue)?s.testTableValue:this.getDefultTableValues(s);return{keyQueId:s.queId,values:[],tableValues:q||[]}}default:return{keyQueId:s.queId,values:s.input,tableValues:[]}}});return{code:mn(this.code),keyQueValues:e}}getDefultTableValues(t){return t.queDefaultValues?t.queDefaultValues.tableValues.reduce((e,i)=>(e.push(i.map(s=>{let f=[h.DEPARTMENT,h.MEMBER,h.SELECT,h.CHECKBOX,h.RADIO].includes(s.queType)?s.values.map(v=>v.id):s.values.map(v=>v.value);return{keyQueId:s.queId,tableValues:[],values:f}})),e),[]):[t.subQuestions.map(e=>({keyQueId:e.queId,values:[],tableValues:[]}))]}run(){this.state=ei.Running;let t=this.assembleData(this.fields);this.codeblockEditService.cacheTestAnswer=this.fields.map(e=>({id:e.queId,input:e.input,testTableDftValues:e.testTableDftValues}
5)),this.formRequest.testCodeBlock(this.appKey,t).pipe(eo(e=>console.log(e)),Zn(()=>{this.changeDetectorRef.detectChanges(),this.testingStateChange.emit(this.state)})).subscribe({next:e=>{e.statusCode===0?(this.testingResultChange.emit(e.data),this.state=ei.Success):this.dealResError(e)},error:e=>{var i;this.state=ei.Failure,this.failureMsg=(i=e==null?void 0:e.body)==null?void 0:i.message}})}dealResError(t){this.state=ei.Failure,this.failureMsg=t.message;let e=t.statusCode,i,s;i=this.translateService.instant(`codeblock.errorMsg.${e}.title`),i.startsWith("codeblock.errorMsg.")?(i=this.translateService.instant(`errorMessage.${e}.name`),s=this.translateService.instant(`errorMessage.${e}.message`)):s=this.translateService.instant(`codeblock.errorMsg.${e}.content`),this.messageService.error(s)}dataChange(t,e){e.input=t}tableChange(t,e){var i;e.testTableValue=t.tableTranslateValues,e.testTableDftValues=t.tableDftValues,(i=e==null?void 0:e.queDefaultValues)!=null&&i.tableValues&&(e.queDefaultValues.tableValues=t.tableDftValues)}addressChange(t,e){ie(e.queDefaultValues)?e.queDefaultValues={values:t}:e.queDefaultValues.values=t,e.input=t}_loadCacheTestAnswer(){let t=this.codeblockEditService.cacheTestAnswer||[];this.fields.forEach((e,i)=>{let s=t.find(f=>f.id===e.queId);s&&(this.fields[i].input=s.input,e.queType===h.TABLE&&(this.fields[i].testTableDftValues=s.testTableDftValues))})}};a.\u0275fac=function(e){return new(e||a)(T(wo),T(He),T(ye),T(X),T(kt),T(Zt))},a.\u0275cmp=P({type:a,selectors:[["qf-codeblock-edit-testing"]],inputs:{fields:"fields",code:"code",appKey:"appKey",testingResult:"testingResult"},outputs:{testingResultChange:"testingResultChange",testingStateChange:"testingStateChange"},decls:17,vars:14,consts:[[1,"input"],["cdkScrollable","",1,"fields"],["class","field",3,"field-block",4,"ngFor","ngForOf"],["qf-button","","qfSize","medium","qfType","primary",3,"click","qfLoading"],[1,"output"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"field"],["qf-button","","disabled","","qfSize","medium",3,"title"],[3,"dataChange","tableChange","addressChange","id","type","dateType","addressPrecision","data","testTableDftValues","options","referenceConfig"],[1,"success"],["mode","json","qfHeight","350px",3,"ngModel","isCopyVisible","readOnly"],[1,"notice"],[1,"failure"],["mode","javascript","qfHeight","350px",3,"ngModel","isCopyVisible","readOnly"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"h4"),g(2),m(3,"translate"),c(),p(4,"form",1),x(5,P0,4,17,"div",2),c(),p(6,"p"),g(7),m(8,"translate"),c(),p(9,"button",3),y("click",function(){return i.run()}),g(10),m(11,"translate"),c()(),p(12,"div",4),j(13,5),x(14,D0,10,9,"ng-container",6)(15,k0,6,6,"ng-container",6)(16,V0,7,6,"ng-container",7),U(),c()),e&2&&(r(2),w(u(3,8,"all.field")),r(3),l("ngForOf",i.fields),r(2),w(u(8,10,"codeblock.inputTestValue")),r(2),l("qfLoading",i.state===i.State.Running),r(),M(" ",u(11,12,"all.test")," "),r(3),l("ngSwitch",i.state),r(),l("ngSwitchCase",i.State.Success),r(),l("ngSwitchCase",i.State.Failure))},dependencies:[B,ri,li,po,Ie,V,ge,Q,De,uo,K,ga,st,k],styles:["[_nghost-%COMP%]{display:flex}.input[_ngcontent-%COMP%]{width:448px}.input[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%]{max-height:316px;padding:2px 2px 2px 0;margin-right:37px;overflow-y:auto}.input[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;margin-bottom:8px}.input[_ngcontent-%COMP%] .field.field-block[_ngcontent-%COMP%]{display:block}.input[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] qf-widget[_ngcontent-%COMP%]{width:274px}.input[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:132px;margin-right:8px;cursor:auto!important}.input[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span{width:100%;overflow:hidden;text-overflow:ellipsis}.input[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .rich-text-button[_ngcontent-%COMP%]{margin-bottom:8px}.input[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:16px;font-size:13px;color:#767e89}.output[_ngcontent-%COMP%]{width:480px;font-size:13px}.output[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:#00bd77}.output[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:#fb4b51}.output[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:8px}.output[_ngcontent-%COMP%] p.notice[_ngcontent-%COMP%]{color:#767e89;letter-spacing:-.2px}"],changeDetection:0});let n=a;return n})();var Q0=(n,a,o)=>({flex:n,"justify-between":a,"pr-4":o}),A0=(n,a)=>({"flex-1":n,truncate:a});function F0(n,a){if(n&1&&(b(0,"i",12),m(1,"qfQueTypeIcon")),n&2){let o=d().$implicit;l("qfName",u(1,1,o.queType))}}function R0(n,a){n&1&&(p(0,"qf-tag",11),g(1),m(2,"translate"),c()),n&2&&(r(),w(u(2,1,"all.systemFieldShort")))}function N0(n,a){if(n&1){let o=S();p(0,"div",6),y("click",function(){let e=_(o).$implicit,i=d();return C(i.onClickQuestion(e))}),x(1,F0,2,3,"i",7),wa(2),p(3,"span",8)(4,"span",9),wa(5),m(6,"queDisplayTitle"),p(7,"span",10),g(8),c(),x(9,R0,3,3,"qf-tag",11),c()()()}if(n&2){let o=a.$implicit;r(),l("ngIf",o.queType);let t=d().isSystemFields(o.queId);r(3),dt(an(10,Q0,t,t,t));let e=u(6,8,o);r(3),dt(Ce(14,A0,t,t)),l("nzTooltipTitle",e),r(),w(e),r(),Ae(t?9:-1)}}function B0(n,a){n&1&&(p(0,"div",13)(1,"span"),g(2),m(3,"translate"),c()()),n&2&&(r(2),w(u(3,1,"all.noResults")))}var Ca=(()=>{let a=class a{constructor(){this.questions=[],this.getInsertText=t=>`{${it.getDisplayTitle(t,this._translate)}$$${At(t.queId,4)}$$}`,this.clickQuestion=new R,this.searchChange$=new xr(""),this.queList=[],this.isEmptyVisible=!1,this.isSystemFields=un,this._translate=re(X),this._cdr=re(He),this.takeUntilDestoryed=sl()}ngOnInit(){this.searchChange$.asObservable().pipe(Jn(600),Hi(t=>t.trim()),this.takeUntilDestoryed()).subscribe(t=>{this._setSelectList(t)})}ngOnChanges(t){t.questions&&this._setSelectList()}onClickQuestion(t){let e=this.getInsertText(t);this.clickQuestion.emit(e)}onSearch(t){this.searchChange$.next(t)}_setSelectList(t){t?(this.queList=this.questions.filter(e=>it.getDisplayTitle(e,this._translate).includes(t)),this.isEmptyVisible=!this.queList.length):this.queList=this.questions,this._cdr.detectChanges()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-field-list"]],inputs:{questions:"questions",getInsertText:"getInsertText"},outputs:{clickQuestion:"clickQuestion"},standalone:!0,features:[Re,ht],decls:7,vars:6,consts:[[1,"pb-8"],["qfPrefixIcon","ex-search","qfSize","small"],["qf-input","",3,"ngModelChange","placeholder","ngModel"],[1,"h-[320px]","overflow-y-auto"],["class","flex h-32 cursor-pointer items-center rounded-small p-8 text-90 hover:bg-[#f7f8fa]",3,"click",4,"ngFor","ngForOf"],["class","flex h-full items-center justify-center text-70",4,"ngIf"],[1,"flex","h-32","cursor-pointer","items-center","rounded-small","p-8","text-90","hover:bg-[#f7f8fa]",3,"click"],["qf-icon","",3,"qfName",4,"ngIf"],[1,"flex-1","truncate"],[1,"pl-8"],["nz-tooltip","",3,"nzTooltipTitle"],["qfSize","tiny","qfColor","orange10"],["qf-icon","",3,"qfName"],[1,"flex","h-full","items-center","justify-center","text-70"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"qf-input-group",1)(2,"input",2),m(3,"translate"),y("ngModelChange",function(f){return i.onSearch(f)}),c()()(),p(4,"div",3),x(5,N0,10,17,"div",4)(6,B0,4,3,"div",5),c()),e&2&&(r(2),l("placeholder",u(3,4,"all.search"))("ngModel",i.searchValue),r(3),l("ngForOf",i.queList),r(),l("ngIf",i.isEmptyVisible))},dependencies:[si,B,A,Il,rs,yt,bn,he,xi,Wt,k,cn,ce,Nl,Ql,it,It,le,V,Q,Do,Tn],encapsulation:2,changeDetection:0});let n=a;return n})();var Jp=(()=>
5{let a=class a{constructor(){this.codeChange=new R,this.outPutKeywordCompletion=[Us.data.of({autocomplete:t=>{let e=t.matchBefore(/\w*/);return e.from==e.to&&!t.explicit?null:{from:e.from,options:[{label:"qf_output",type:"text"}]}}})],this.fieldPlaceholderOptions={regexp:/qf_field\.\{([^}]+)\$\$[^}]+\$\$\}/g},this.getInsertTextFromQue=t=>`qf_field.${t.encryptStr}`}onCodeChange(t){this.codeChange.emit(t.trim())}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-codeblock-edit-writing"]],inputs:{fields:"fields",code:"code"},outputs:{codeChange:"codeChange"},decls:14,vars:11,consts:[["codeEditor",""],[1,"insert"],[1,"dot"],["qfHelpDocName","codeBlockInsert"],[1,"flex","h-[350px]","gap-[12px]"],["mode","javascript","qfHeight","350px",1,"min-w-0","flex-1",3,"ngModelChange","ngModel","extensions","fieldPlaceholderOptions"],[1,"w-[180px]",3,"clickQuestion","questions","getInsertText"],[2,"margin-top","8px"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"p"),b(2,"span",2),g(3),m(4,"translate"),b(5,"a",3),c()(),p(6,"div",4)(7,"qf-codemirror",5,0),y("ngModelChange",function(v){return _(s),C(i.onCodeChange(v))}),c(),p(9,"qf-field-list",6),y("clickQuestion",function(v){_(s);let q=W(8);return C(q.insert(v))}),c()(),p(10,"p",7),b(11,"span",2),g(12),m(13,"translate"),c()}e&2&&(r(3),M(" ",u(4,7,"codeblock.inputTip")," "),r(4),l("ngModel",i.code)("extensions",i.outPutKeywordCompletion)("fieldPlaceholderOptions",i.fieldPlaceholderOptions),r(2),l("questions",i.fields)("getInsertText",i.getInsertTextFromQue),r(3),M(" ",u(13,9,"codeblock.outputTip"),` 6`))},dependencies:[V,Q,Ge,st,Ca,k],styles:[".editor[_ngcontent-%COMP%]{height:350px;padding-top:8px;margin-bottom:8px;overflow:hidden;border:1px solid #CCD4E0;border-radius:4px}.insert[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;-webkit-user-select:none;user-select:none}.insert[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.insert-menu[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.insert-menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.insert-que-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{cursor:pointer}.padding-0[_ngcontent-%COMP%]{padding:0}"],changeDetection:0});let n=a;return n})();var ya=(()=>{let a=class a{constructor(t){this.viewContainerRef=t}};a.\u0275fac=function(e){return new(e||a)(T(Dr))},a.\u0275dir=Er({type:a,selectors:[["","qfHost",""]]});let n=a;return n})();var W0=()=>({height:"340px",padding:"60px 32px 0 32px"}),Zp=(()=>{let a=class a{constructor(){this.visible=!1,this.confirm=new R,this.modalClose=new R}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-confirm-modal"]],inputs:{visible:"visible"},outputs:{confirm:"confirm",modalClose:"modalClose"},decls:14,vars:15,consts:[[3,"visibleChange","qfOnCancel","footer","width","bodyStyle","maskClosable","visible"],[1,"content"],[1,"img-container"],["qfSrc","/assets/assetsFiles/file.qingflow.com/assets/app-need-save.png"],[1,"title"],[1,"btn-container"],["qf-button","","qfSize","large",3,"click"],["qf-button","","qfSize","large","qfType","primary",3,"click"]],template:function(e,i){e&1&&(p(0,"qf-modal",0),O("visibleChange",function(f){return E(i.visible,f)||(i.visible=f),f}),y("qfOnCancel",function(){return i.modalClose.emit()}),p(1,"div",1)(2,"div",2),b(3,"img",3),c(),p(4,"div",4),g(5),m(6,"translate"),c(),p(7,"div",5)(8,"button",6),y("click",function(){return i.confirm.emit(!1)}),g(9),m(10,"translate"),c(),p(11,"button",7),y("click",function(){return i.confirm.emit(!0)}),g(12),m(13,"translate"),c()()()()),e&2&&(l("footer",null)("width",400)("bodyStyle",Y(14,W0))("maskClosable",!1),I("visible",i.visible),r(5),w(u(6,8,"codeblock.unsaveTip")),r(4),M(" ",u(10,10,"all.noSave")," "),r(3),M(" ",u(13,12,"all.saveAndLeave")," "))},dependencies:[hi,K,$t,k],styles:[".content[_ngcontent-%COMP%]{text-align:center;background:#fff}.content[_ngcontent-%COMP%] .img-container[_ngcontent-%COMP%]{margin:0 0 10px}.content[_ngcontent-%COMP%] .img-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:200
6px;height:144px}.content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:20px;font-size:16px;font-weight:600;color:#121315}.content[_ngcontent-%COMP%] .btn-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%}.content[_ngcontent-%COMP%] .btn-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:162px;height:40px}"],changeDetection:0});let n=a;return n})();var j0=()=>({overflow:"visible"});function U0(n,a){n&1&&(p(0,"h2",7),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"widgets.compilationAndTesting")," "))}function K0(n,a){}function G0(n,a){if(n&1){let o=S();p(0,"qf-confirm-modal",8),y("modalClose",function(){_(o);let e=d();return C(e.onConfirmModalClose())})("confirm",function(e){_(o);let i=d();return C(i.onConfirm(e))}),c()}if(n&2){let o=d();l("visible",o.confirmVisible)}}var Vt=function(n){return n[n.Writing=0]="Writing",n[n.Testing=1]="Testing",n[n.Parsing=2]="Parsing",n}(Vt||{}),ec=(()=>{let a=class a{constructor(t,e,i,s){this.changeDetectorRef=t,this.translateService=e,this.codeblockEditService=i,this.messageService=s,this.fields=[],this.visible=!1,this.visibleChange=new R,this.codeBlockConfigChange=new R,this.curIdx=Vt.Writing,this.isCodeBlockConfigChanged=!1,this.testingState=ei.Intact,this.confirmVisible=!1,this.steps=[{component:Jp,data:{footer:[{text:this.translateService.instant("codeblock.saveAndNext"),type:"primary",disabled:!0,callback:()=>{this.codeBlockConfig.codeContent?this.codeBlockConfig.codeContent.split(` 7`).length>=1e4?this.messageService.error(this.translateService.instant("all.exceedMaxLines2",{value:1e4})):this.loadComponent(Vt.Testing):this.messageService.error("\u4FDD\u5B58\u5931\u8D25\uFF0C\u4EE3\u7801\u7F16\u8BD1\u533A\u57DF\u4E0D\u53EF\u4E3A\u7A7A")}}],fields:[]}},{component:Xp,data:{footer:[{text:this.translateService.instant("all.previous"),callback:this.loadComponent.bind(this,Vt.Writing)},{text:this.translateService.instant("all.next"),callback:this.loadComponent.bind(this,Vt.Parsing)}]}},{component:$p,data:{footer:[{text:this.translateService.instant("all.previous"),callback:this.loadComponent.bind(this,Vt.Testing)},{text:this.translateService.instant("all.OK"),type:"primary",callback:this.onOk.bind(this)}]}}]}get codeBlockConfig(){return this._codeBlockConfig}set codeBlockConfig(t){var e;this._codeBlockConfig=Ee(me({},this._codeBlockConfig),{codeContent:t.codeContent,resultAliasPath:(e=t.resultAliasPath)==null?void 0:e.map(i=>new pn(i.aliasName,i.aliasPath,i.aliasType,i.aliasId,i.subAlias)),configMode:1})}get footer(){let{footer:t}=this.steps[this.curIdx].data;return this.curIdx===Vt.Writing?t[0].disabled=!this.codeBlockConfig.codeContent:this.curIdx===Vt.Testing&&(t[1].disabled=this.testingState!==ei.Success&&!this.codeBlockConfig.resultAliasPath.length),t}onConfirmModalClose(){this.confirmVisible=!1}onConfirm(t){this.confirmVisible=!1,this._clearCacheTestAnswer(),setTimeout(()=>{t?this.onOk():this.visibleChange.emit(!1)},0)}onCancel(){this.isCodeBlockConfigChanged?this.confirmVisible=!0:(this.visibleChange.emit(!1),this._clearCacheTestAnswer())}_clearCacheTestAnswer(){this.codeblockEditService.cacheTestAnswer=[]}onOk(){this.codeBlockConfig.resultAliasPath.every(t=>t.isValid())?(this.codeBlockConfigChange.emit(this.codeBlockConfig),this.visibleChange.emit(!1),this._clearCacheTestAnswer()):(this.messageService.error(this.translateService.instant("all.aliasNameIsNull2")),this.curIdx!==Vt.Parsing&&this.loadComponent(Vt.Parsing))}afterOpen(){this.loadComponent(Vt.Writing)}convertSameTableFields(){let t=new Map(this.fields.map(i=>[i.queId,i])),e=new Set;return this.fields.forEach(i=>{this.codeBlockConfig.codeContent.includes(i.encryptCode)&&e.add(i.supId?i.supId:i.queId)}),Array.from(e).map(i=>t.get(i))}loadComponent(t){var f,v,q,D;this.curIdx=t;let e=this.steps[t],i=this.qfHost.viewContainerRef;i.clear(),this.componentRef=i.createComponent(e.component);let s={};Object.assign(s,e.data,{appKey:this.appKey,testingResult:this.testingResult,code:this.codeBlockConfig.codeContent,aliases:this.codeBlockConfig.resultAliasPath,fields:t===Vt.Testing?this.convertSameTableFields():this.fields}),Object.assign(this.componentRef.instance,s),(f=this.componentRef.instance.testingResultChange)==null||f.subscribe(F=>{this.testingResult=this.componentRef.instance.testingResult=F}),(v=this.componentRef.instance.testingStateChange)==null||v.subscribe(F=>{this.testingState=F,this.changeDetectorRef.detectChanges()}),(q=this.componentRef.instance.codeChange)==null||q.subscribe(F=>{this._codeBlockConfig.codeContent=F,this.isCodeBlockConfigChanged=!0,this.changeDetectorRef.detectChanges()}),(D=this.componentRef.instance.aliasesChange)==null||D.subscribe(F=>{this._codeBlockConfig.resultAliasPath=F,this.isCodeBlockConfigChanged=!0}),this.changeDetectorRef.detectChanges()}ngOnDestroy(){this.confirmVisible=!1,this.componentRef.destroy()}};a.\u0275fac=function(e){return new(e||a)(T(He),T(X),T(kt),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-codeblock-edit-modal"]],viewQuery:function(e,i){if(e&1&&qe(ya,7),e&2){let s;
7Te(s=Se())&&(i.qfHost=s.first)}},inputs:{appKey:"appKey",fields:"fields",visible:"visible",codeBlockConfig:"codeBlockConfig"},outputs:{visibleChange:"visibleChange",codeBlockConfigChange:"codeBlockConfigChange"},decls:12,vars:16,consts:[["size","large",3,"qfOnCancel","afterOpen","footer","bodyStyle","visible"],["qf-button","",4,"qfModalHeader"],[1,"steps"],["nzSize","small",3,"nzCurrent","nzStartIndex"],[3,"nzTitle"],["qfHost",""],[3,"visible","modalClose","confirm",4,"ngIf"],["qf-button",""],[3,"modalClose","confirm","visible"]],template:function(e,i){e&1&&(p(0,"qf-modal",0),y("qfOnCancel",function(){return i.onCancel()})("afterOpen",function(){return i.afterOpen()}),x(1,U0,3,3,"h2",1),p(2,"div",2)(3,"nz-steps",3),b(4,"nz-step",4),m(5,"translate"),b(6,"nz-step",4),m(7,"translate"),b(8,"nz-step",4),m(9,"translate"),c()(),x(10,K0,0,0,"ng-template",5),c(),x(11,G0,1,1,"qf-confirm-modal",6)),e&2&&(l("footer",i.footer)("bodyStyle",Y(15,j0))("visible",i.visible),r(3),l("nzCurrent",i.curIdx)("nzStartIndex",0),r(),l("nzTitle",u(5,9,"codeblock.writeCode")),r(2),l("nzTitle",u(7,11,"codeblock.testRun")),r(2),l("nzTitle",u(9,13,"codeblock.parseReturn")),r(3),l("ngIf",i.confirmVisible))},dependencies:[A,$s,Gs,hi,bl,ya,Zp,k],styles:[".steps[_ngcontent-%COMP%]{width:calc(100% - 544px);margin:9px auto 25px}"],changeDetection:0});let n=a;return n})();function X0(n,a){if(n&1){let o=S();p(0,"qf-codeblock-edit-modal",7),O("visibleChange",function(e){_(o);let i=d();return E(i.showModal,e)||(i.showModal=e),C(e)}),y("codeBlockConfigChange",function(e){_(o);let i=d();return C(i.onCodeBlockConfig(e))}),c()}if(n&2){let o=d();l("fields",o.fields)("appKey",o.appKey)("codeBlockConfig",o.data.codeBlockConfig),I("visible",o.showModal)}}var tc=(()=>{let a=class a{constructor(t,e,i,s){this.changeDetectorRef=t,this.codeblockEditService=e,this.appFormEditService=i,this.translate=s,this.data={queId:0},this.dataChange=new R,this.showModal=!1}ngOnInit(){this.appKey=this.appFormEditService.appFormData.appKey}onCodeBlockConfig(t){this.data.codeBlockConfig=me(me({},this.data.codeBlockConfig),t),this.dataChange.emit(this.data)}open(){this.showModal=!0,this.fields=this.codeblockEditService.getFields(this.data.queId);let t=this.fields.findIndex(e=>e.queId===ue.APPLY_ID);this.fields.splice(t,0,{queId:ue.WS_ID,queTitle:this.translate.instant("all.exId"),queType:h.INPUT,encryptCode:At(ue.WS_ID,4),encryptStr:`{${this.translate.instant("all.exId")}$$${At(ue.WS_ID,4)}$$}`},{queId:ue.APP_ID,queTitle:this.translate.instant("all.appID"),queType:h.INPUT,encryptCode:At(ue.APP_ID,4),encryptStr:`{${this.translate.instant("all.appID")}$$${At(ue.APP_ID,4)}$$}`}),this.changeDetectorRef.detectChanges()}};a.\u0275fac=function(e){return new(e||a)(T(He),T(kt),T(ee),T(X))},a.\u0275cmp=P({type:a,selectors:[["qf-codeblock-edit"]],inputs:{data:"data"},outputs:{dataChange:"dataChange"},decls:15,vars:13,consts:[[1,"widget-edit-share","code-block"],[1,"widget-edit-title"],[3,"hintMsg"],["qf-button","","qfSize","medium","qfType","dashed",3,"click"],[1,"btn-hint"],[1,"dot"],[3,"fields","appKey","codeBlockConfig","visible","visibleChange","codeBlockConfigChange",4,"ngIf"],[3,"visibleChange","codeBlockConfigChange","fields","appKey","codeBlockConfig","visible"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1)(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",2),m(6,"translate"),c(),p(7,"button",3),y("click",function(){return i.open()}),g(8),m(9,"translate"),c(),p(10,"div",4),b(11,"span",5),g(12),m(13,"translate"),c()(),x(14,X0,1,4,"qf-codeblock-edit-modal",6)),e&2&&(r(3),w(u(4,5,"widgets.editCodeBlock")),r(2),l("hintMsg",u(6,7,"widgetHelp.codeblock")),r(3),M(" ",u(9,9,"widgets.compilationAndTesting")," "),r(4),M(" ",u(13,11,"widgetHelp.codeblockButton")," "),r(2),l("ngIf",i.showModal))},dependencies:[A,K,G,ec,k],styles:[`.ant-code-editor{position:relative;display:block;width:100%;height:100%;background-color:#fff}.ant-code-editor .ant-code-editor-loading{position:absolute;z-index:100;display:flex;justify-content:center;width:100%;height:100%;background-color:#fff}.ant-code-editor .ant-code-editor-toolkit{position:absolute;top:20px;right:160px;z-index:2;min-width:100px;height:24px;text-align:right;background:transparent}.ant-code-editor .ant-code-editor-toolkit i,.ant-code-editor .ant-code-editor-toolkit span[nz-icon]{position:relative;right:4px;cursor:pointer}.ant-code-editor .ant-code-editor-toolkit i:not(:last-child),.ant-code-editor .ant-code-editor-toolkit span[nz-icon]:not(:last-child){padding-right:4px}.ant-code-editor .ant-code-editor-toolkit i.active,.ant-code-editor .ant-code-editor-toolkit span[nz-icon].active{color:#1890ff}.ant-spin{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;display:none;color:#1890ff;font-size:0;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78,.14,.15,.86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;font-size:14px;text-shadow:0 1px 2px #fff}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:none \\ ;width:100%;height:100%;background:#fff;opacity:0;transition:all .3s;content:"";pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none}.ant-spin-blur:after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:#00000073}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}
7.ant-spin-dot-item:nth-child(1){top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(0);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ant-spin-blur{background:#fff;opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(360deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}nz-spin{display:block}.dot{display:inline-block;width:4px;height:4px;margin-right:5px;vertical-align:middle;background:#fb9337;background:var(--brand-primary-base, #fb9337);border-radius:50%}.widget-edit-share.code-block .qf-btn{width:100%;margin-bottom:8px}.widget-edit-share.code-block .btn-hint{display:flex;align-items:center;font-size:10px;color:#767e89}.codeblock-tree-select{max-height:400px} 8`],encapsulation:2,changeDetection:0});let n=a;return n})();var ic=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=Lt({type:a}),a.\u0275inj=Bt({providers:[kt,it],imports:[si,kn,It,Pn,fa,ea,Vn,ha,Ai,st,cs,Ts,Ca]});let n=a;return n})();function J0(n,a){if(n&1&&(b(0,"qf-option",7),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.label))("qfValue",o.value)}}function Z0(n,a){if(n&1){let o=S();p(0,"qf-select",5),O("ngModelChange",function(e){_(o);let i=d();return E(i.data.currencyType,e)||(i.data.currencyType=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.CurrencyTypeChange())}),x(1,J0,2,4,"qf-option",6),c()}if(n&2){let o=d();l("qfShowSearch",!0),I("ngModel",o.data.currencyType),r(),l("ngForOf",o.currencyTypes)}}var nc=(()=>{let a=class a extends El{currencyStatusChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.next({type:"currencyStatus",question:this.data})}CurrencyTypeChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.next({type:"currencyType",question:this.data})}constructor(t){super(),this.widgetChange=t,this.currencyTypes=Pl,this.NumberFormatTypes=ji}ngOnInit(){this.widgetChange.changed.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.data.numberFormat===ji.percentage&&(this.data.currencyStatus=!1,this.widgetChange.currencyChanged.emit())})}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-currency-format"]],inputs:{data:"data"},features:[oo],decls:8,vars:6,consts:[[1,"widget-edit"],[1,"number-ranger"],[1,"label-container"],["qf-checkbox","",3,"ngModelChange","qfDisabled","ngModel"],["class","value-container widget-edit-detail",3,"qfShowSearch","ngModel","ngModelChange",4,"ngIf"],[1,"value-container","widget-edit-detail",3,"ngModelChange","qfShowSearch","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"label",3),O("ngModelChange",function(f){return E(i.data.currencyStatus,f)||(i.data.currencyStatus=f),f}),y("ngModelChange",function(){return i.currencyStatusChange()}),p(4,"span"),g(5),m(6,"translate"),c()()(),x(7,Z0,2,3,"qf-select",4),c()()),e&2&&(r(3),l("qfDisabled",i.data.numberFormat===i.NumberFormatTypes.percentage),I("ngModel",i.data.currencyStatus),r(2),w(u(6,4,"all.currency")),r(2),l("ngIf",i.data.currencyStatus))},dependencies:[B,A,V,Q,se,oe,ne,k],styles:[".number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%]{display:flex;align-items:center}.number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%] nz-input-number[_ngcontent-%COMP%]{width:90px}.number-ranger[_ngcontent-%COMP%] .tidle-style[_ngcontent-%COMP%]{margin:0 8px}",".number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%]{display:inline-block;width:100%}.number-ranger[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%]{display:flex;align-items:center}"]});let n=a;return n})();function eh(n,a){if(n&1){let o=S();p(0,"input",5),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data.customBtnText,e)||(i.data.customBtnText=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.customBtnTextChange())}),c()}if(n&2){let o=d();l("placeholder",u(1,2,"all.pleaseInput")),I("ngModel",o.data.customBtnText)}}var oc=(()=>{let a=class a{constructor(t,e){this.widgetChange=t,this.translateService=e}customBtnTextChange(){this.widgetChange.syncForm$.next({type:"customBtnText",question:this.data})}toggleStatus(){this.data.customBtnTextStatus&&(this.data.customBtnText=this.translateService.instant("all.run")),this.customBtnTextChange()}};a.\u0275fac=function(e){return new(e||a)(T(N),T(X))}
8,a.\u0275cmp=P({type:a,selectors:[["qf-custom-btn-text"]],inputs:{data:"data"},decls:9,vars:8,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],[1,"widget-edit-detail"],["qf-input","","style","margin-top: 10px; display: block","maxlength","100",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["qf-input","","maxlength","100",2,"margin-top","10px","display","block",3,"ngModelChange","placeholder","ngModel"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.data.customBtnTextStatus,f)||(i.data.customBtnTextStatus=f),f}),y("ngModelChange",function(){return i.toggleStatus()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",2),m(6,"translate"),p(7,"div",3),x(8,eh,2,4,"input",4),c()()),e&2&&(r(),I("ngModel",i.data.customBtnTextStatus),r(2),w(u(4,4,"widgets.customBtnText")),r(2),l("hintMsg",u(6,6,"widgetHelp.customBtnText")),r(3),l("ngIf",i.data.customBtnTextStatus))},dependencies:[A,le,V,Ue,Q,se,he,G,k],styles:["qf-hint-msg[_ngcontent-%COMP%]{margin-left:-8px}"],changeDetection:0});let n=a;return n})();function th(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",7),O("ngModelChange",function(e){_(o);let i=d();return E(i.deptSelectScope,e)||(i.deptSelectScope=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.change(e))}),c()}if(n&2){let o=d();l("config",o.customRangeFrameConfig),I("ngModel",o.deptSelectScope)}}function ih(n,a){if(n&1&&(p(0,"qf-function-lock",8),b(1,"qf-dft-associate-data",9),c()),n&2){let o=d();r(),l("editQue",o.data)}}var ac=(()=>{let a=class a{set data(t){this._data=t,this.deptSelectScopeType=t.deptSelectScopeType,this.deptSelectScope=t.deptSelectScope?me({},t.deptSelectScope):{depart:[],member:[],role:[],dynamic:[]},this.dataChange.emit(t)}get data(){return this._data}change(t){this.data.deptSelectScope=t,this.widgetChange.changed.emit(!0)}clearRelationData(){let t=this.appFormEditService.appFormData.selectScopeRelations.findIndex(e=>e.queId===this.data.queId||e.queId===this.data.queTempId);t!==-1&&this.appFormEditService.appFormData.selectScopeRelations.splice(t,1)}typeChange(t){if(this.data.deptSelectScopeType=t,this.widgetChange.changed.emit(!0),this.deptSelectScopeType===ln.RELATIONDATA&&this._rootStore.workspaceInfo().accountLevel<Mt.BASIC){this.canAssociate=!1,this.modalInvokeService.openFunctionLimitModal(Be.departmentRelation);return}this.deptSelectScopeType!==ln.RELATIONDATA&&this.clearRelationData()}constructor(t,e,i){this.widgetChange=t,this.modalInvokeService=e,this.appFormEditService=i,this._rootStore=re(Ct),this.DeptSelectScopeType=ln,this.limitFunctionKey=Be,this.canAssociate=!0,this.customRangeFrameConfig={title:"base.customDeptRange",tabList:["dept","dynamic"],deptConfig:{showIncludeSubDepartsCheckbox:!0},dynamicConfig:{showDynamicType:["currentDepartment"]}},this.dataChange=new R}};a.\u0275fac=function(e){return new(e||a)(T(N),T(Ke),T(ee))},a.\u0275cmp=P({type:a,selectors:[["qf-department-scope"]],inputs:{data:"data",widgetInfo:"widgetInfo"},outputs:{dataChange:"dataChange"},features:[et([ke])],decls:14,vars:18,consts:[[1,"dynamic-director-edit"],[1,"widget-edit"],[1,"widget-edit-title"],[2,"width","100%","margin-bottom","10px",3,"ngModelChange","ngModel"],[3,"qfValue","qfLabel"],[3,"config","ngModel","ngModelChange",4,"ngIf"],["func","departmentRelation",4,"ngIf"],[3,"ngModelChange","config","ngModel"],["func","departmentRelation"],["selectedType","departmantRelation",3,"editQue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1)(2,"p",2),g(3),m(4,"translate"),c(),p(5,"qf-select",3),O("ngModelChange",function(f){return E(i.deptSelectScopeType,f)||(i.deptSelectScopeType=f),f}),y("ngModelChange",function(f){return i.typeChange(f)}),b(6,"qf-option",4),m(7,"translate"),b(8,"qf-option",4),m(9,"translate"),b(10,"qf-option",4),m(11,"translate"),c(),x(12,th,1,2,"qf-custom-range-frame",5)(13,ih,2,1,"qf-function-lock",6),c()()),e&2&&(r(3),w(u(4,10,"widgets.selectScope")),r(2),I("ngModel",i.deptSelectScopeType),r(),l("qfValue",i.DeptSelectScopeType.ALL)("qfLabel",u(7,12,"widgets.deptSelectScopeTypeAll")),r(2),l("qfValue",i.DeptSelectScopeType.CUSTOM)("qfL
8abel",u(9,14,"widgets.deptSelectScopeTypeCustom")),r(2),l("qfValue",i.DeptSelectScopeType.RELATIONDATA)("qfLabel",u(11,16,"all.associateExistingDepartments")),r(2),l("ngIf",i.deptSelectScopeType===i.DeptSelectScopeType.CUSTOM),r(),l("ngIf",i.deptSelectScopeType===i.DeptSelectScopeType.RELATIONDATA&&i.canAssociate))},dependencies:[A,V,Q,oe,ne,Yt,xt,Bi,k],styles:[".p-sm[_ngcontent-%COMP%]{padding:6px 10px 10px}p[_ngcontent-%COMP%]{margin-bottom:7px}.m-b-md[_ngcontent-%COMP%]{margin-bottom:10px}.b-b[_ngcontent-%COMP%]{border-bottom:1px solid #f4f6f9}.panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;height:35px;padding:0 10px}.panel-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:8px;font-size:13px}.table-asos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}"]});let n=a;return n})();var nh=["*"];function oh(n,a){if(n&1&&b(0,"qf-hint-msg",3),n&2){let o=d();l("hintMsg",o.hintMsg)}}function ah(n,a){}function rh(n,a){if(n&1&&(p(0,"div",4),x(1,ah,0,0,"ng-template",5),c()),n&2){let o=d();r(),l("ngTemplateOutlet",o.titleSuffix)}}var rc=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-edit-form-item"]],inputs:{itemTitle:"itemTitle",hintMsg:"hintMsg",titleSuffix:"titleSuffix"},standalone:!0,features:[ht],ngContentSelectors:nh,decls:7,vars:4,consts:[[1,"mb-24"],[1,"mb-8","flex","items-center"],[1,"truncate","text-body-bold",3,"title"],[3,"hintMsg"],[1,"ml-auto"],[3,"ngTemplateOutlet"]],template:function(e,i){e&1&&(ao(),p(0,"div",0)(1,"div",1)(2,"div",2),g(3),c(),x(4,oh,1,1,"qf-hint-msg",3)(5,rh,2,1,"div",4),c(),ro(6),c()),e&2&&(r(2),l("title",i.itemTitle),r(),w(i.itemTitle),r(),Ae(i.hintMsg?4:-1),r(),Ae(i.titleSuffix?5:-1))},dependencies:[co,Bo,G],encapsulation:2,changeDetection:0});let n=a;return n})();var lh=["jsonEditorTpl"];function sh(n,a){if(n&1){let o=S();p(0,"qf-insert-que-select-v2",11),y("clickQuestion",function(e){_(o),d();let i=W(4);return C(i.insert(e))}),c()}if(n&2){let o=d();l("questions",o.canInsertQues)}}function ph(n,a){if(n&1){let o=S();p(0,"div",12)(1,"div",13),g(2,"JSON"),c(),p(3,"qf-insert-que-select-v2",11),y("clickQuestion",function(e){_(o);let i=W(5);return C(i.insert(e))}),c()(),p(4,"qf-codemirror",14,3),O("ngModelChange",function(e){_(o);let i=d();return E(i.jsonConfig,e)||(i.jsonConfig=e),C(e)}),c()}if(n&2){let o=d();r(3),l("questions",o.canInsertQues),r(),l("bordered",!0),I("ngModel",o.jsonConfig)}}var va=(()=>{let a=class a{constructor(){this._appFormEditServive=re(ee),this._modalService=re(Pe),this._widgetChange=re(N),this._translate=re(X),this.INVALID_INSERT_QUE_TYPE=[h.RICHTEXT,h.DESCRIPTION,h.TABLE]}ngOnInit(){this.canInsertQues=this._appFormEditServive.genInsertableQuestions(this.currentQuestion.queId).filter(t=>!this.INVALID_INSERT_QUE_TYPE.includes(t.queType)),this.jsonConfig=this.currentQuestion.embedFieldConfig.jsonConfig}openJsonEditor(){this._modalService.open({size:"medium",title:this._translate.instant("all.set"),content:this.jsonEditorTpl,onCancel:()=>{this.jsonConfig=this.currentQuestion.embedFieldConfig.jsonConfig},onOk:()=>{this.currentQuestion.embedFieldConfig.jsonConfig=this.jsonConfig}})}onConfigChange(){this._widgetChange.changed.emit()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-embed-config"]],viewQuery:function(e,i){if(e&1&&qe(lh,7),e&2){let s;Te(s=Se())&&(i.jsonEditorTpl=s.first)}},inputs:{currentQuestion:"currentQuestion"},standalone:!0,features:[ht],decls:26,vars:26,consts:[["queSelectTpl",""],["urlEditor",""],["jsonEditorTpl",""],["jsonEditor",""],["itemTitle","URL",3,"titleSuffix"],["mode","plain","qfHeight","56px",3,"ngModelChange","bordered","ngModel"],["itemTitle","JSON"],["qf-button","","qfBlock","","qfType","dashed",3,"click"],[3,"itemTitle"],[3,"ngModelChange","ngModel"],["qf-radio-button","",3,"qfValue"],[3,"clickQuestion","questions"],[1,"mb-8","flex","items-center","justify-between"],[1,"text-body-bold"],["mode","json","qfHeight","420px",3,"ngModelChange","bordered","ngModel"]],template:function(e,i){if(e&1){let s=S();p(0,"qf-edit-form-item",4),x(1,sh,1,1,"ng-template",null,0,te),p(3,"qf-codemirror",5,1),O("ngModelChange",function(v){return _(s),E(i.currentQuestion.embedFieldConfig.url,v)||(i.currentQuestion.embedFieldConfig.url=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.onConfigChange())}),c()(),p(5,"qf-edit-form-item",6)(6,"button",7),y("click",function(){return _(s),C(i.openJsonEditor())}),g(7),m(8,"translate"),c(),x(9,ph,6,3,"ng-template",null,2,te),c(),p(11,"qf-edit-form-item",8),m(12,"translate"),p(13,"qf-radio-group",9),O("ngModelChange",function(v){return _(s),E(i.currentQuestion.embedFieldConfig.height,v)||(i.currentQuestion.embedFieldConfig.height=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.onConfigChange())}),p(14,"label",10),g(15),m(16,"translate"),c(),p(17,"label",10),g(18),m(19,"translate"),c(),p(20,"label",10),g(21),m(22,"translate"),c(),p(23,"label",10),g(24),m(25,"translate"),c()()()}if(e&2){let s=W(2);l("titleSuffix",s),r(3),l("bordered",!0),I("ngModel",i.currentQuestion.embedFieldConfig.url),r(4),w(u(8,14,"all.clickToSet")),r(4),l("itemTitle",u(12,16,"widgetHelp.heightOfIDisplay")),r(2),I("ngModel",i.currentQuestion.embedFieldConfig.height),r(),l("qfValue",200),r(),w(u(16,18,"widgets.low")),r(2),l("qfValue",400),r(),w(u(19,20,"widgets.middle")),r(2),l("qfValue",600),r(),w(u(22,22,"widgets.high")),r(2),l("qfValue",800),r(),w(u(25,24,"all.highest"))}},dependencies:[It,V,Q,rc,Ai,st,ci,K,Fo,Mi,qi,Ao,Jo,Wt,k],encapsulation:2,changeDetection:0});let n=a;return n})();var lc=(()=>{let a=class a{referfenceViewChange(){this.widgetChange.changed.emit(!0)}constructor(t){this.widgetChange=t}};a.\u0275fac=function(e){return new(e||a)(T(N))}
8,a.\u0275cmp=P({type:a,selectors:[["qf-enable-data-record"]],inputs:{data:"data"},decls:6,vars:7,consts:[["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"]],template:function(e,i){e&1&&(p(0,"label",0),O("ngModelChange",function(f){return E(i.data.referenceConfig.beingDataLogVisible,f)||(i.data.referenceConfig.beingDataLogVisible=f),f}),y("ngModelChange",function(){return i.referfenceViewChange()}),p(1,"span"),g(2),m(3,"translate"),c()(),b(4,"qf-hint-msg",1),m(5,"translate")),e&2&&(I("ngModel",i.data.referenceConfig.beingDataLogVisible),r(2),w(u(3,3,"auditRecord.canViewDataRecord")),r(2),l("hintMsg",u(5,5,"auditRecord.allowViewQuoteDataRecord")))},dependencies:[V,Q,se,G,k],encapsulation:2});let n=a;return n})();function dh(n,a){if(n&1){let o=S();p(0,"label",15),y("click",function(){_(o);let e=d(3);return C(e.toggleBulkEdit(!0))}),g(1),m(2,"translate"),c()}n&2&&(r(),M(" ",u(2,1,"widgets.edit")," "))}function mh(n,a){n&1&&(p(0,"a",19),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.learnMore")," "))}function uh(n,a){if(n&1&&(p(0,"p"),g(1),m(2,"translate"),x(3,mh,3,3,"a",18),c()),n&2){let o=a.$implicit,t=a.last,e=a.index,i=d(2).$implicit;r(),wt(" ",e+1,".",u(2,3,o)," "),r(2),l("ngIf",t&&i.id==="cad")}}function fh(n,a){if(n&1&&(p(0,"div",16),x(1,uh,4,5,"p",17),c()),n&2){let o=d().$implicit;r(),l("ngForOf",o.des)}}function gh(n,a){if(n&1){let o=S();p(0,"tr",10)(1,"div",11)(2,"label",12),O("ngModelChange",function(e){let i=_(o).$implicit;return E(i.checked,e)||(i.checked=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.updateFileType())}),p(3,"span"),g(4),m(5,"translate"),c()(),x(6,dh,3,3,"label",13),c(),x(7,fh,2,1,"div",14),c()}if(n&2){let o=a.$implicit,t=a.index;r(2),l("id",o.id)("name","fileType"+t),I("ngModel",o.checked),r(2),w(u(5,6,o.name)),r(2),l("ngIf",o.checked&&o.id==="custom"),r(),l("ngIf",o.checked)}}function hh(n,a){if(n&1&&(p(0,"div",6)(1,"table",7)(2,"tbody",8),x(3,gh,8,8,"tr",9),c()()()),n&2){let o=d();r(3),l("ngForOf",o.fileType)}}var sc=(()=>{let a=class a{constructor(){this.translate=re(X),this.widgetChange=re(N),this.setfileType=!1,this.openBulkEdit=!1,this.des=this.translate.instant("all.customDesc"),this.cusBulkEdit=[]}toggleBulkEdit(t){this.openBulkEdit=t}ngOnChanges(t){this.cusBulkEdit=[],this.fileType=tt(vo),t.data.currentValue.fileType.length!==0?(this.setfileType=!0,this.initFileType()):this.setfileType=!1}change(){this.widgetChange.changed.emit(!0)}setfileTypeChange(){this.setfileType?this.updateFileType():(this.data.fileType=[],this.widgetChange.fileSettingChange.emit("type")),this.widgetChange.changed.emit(!0)}initFileType(){let t,e="\u81EA\u5B9A\u4E49\u7C7B\u578B\u5982\u4E0B\uFF1A";this.data.fileType.forEach(i=>{t=parseInt(i,10),t>-1&&t<6?this.fileType[t].checked=!0:(this.fileType[6].checked=!0,e+=`${i} / `,this.cusBulkEdit.push({optValue:i}))}),this.fileType[6].cus=[],this.fileType[6].des=[e]}updateFileType(){this.data.fileType=[],this.fileType.forEach(t=>{t.checked&&(t.index===6?t.cus.forEach(e=>{this.data.fileType.push(e)}):this.data.fileType.push(t.index))}),this.widgetChange.fileSettingChange.emit("type"),this.widgetChange.changed.emit(!0)}saveBulkEdit(t){let e="\u81EA\u5B9A\u4E49\u7C7B\u578B\u5982\u4E0B\uFF1A";t.forEach(i=>{e+=`${i} / `}),this.fileType[6].cus=t,this.fileType[6].des=[e],this.updateFileType()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-file-size-limit"]],inputs:{data:"data"},features:[Re],decls:10,vars:11,consts:[[1,"upload-edit"],[1,"widget-edit"],["qf-checkbox","","id","fileTypeCheck","type","checkbox","name","fileType",3,"ngModelChange","ngModel"],[3,"hintMsg"],["class","file-type-panel widget-edit-detail",4,"ngIf"],["descUrl","modelIdentify",3,"closeModal","ensure","openBulkEdit","bulkEditOptions","des"],[1,"file-type-panel","widget-edit-detail"],[1,"file-type-table"],[1,"tbody"],["class","sub-type-panel",4,"ngFor","ngForOf"],[1,"sub-type-panel"],[1,"form-check"],["qf-checkbox","",3,"ngModelChange","id","name","ngModel"],["class","custom-edit",3,"click",4,"ngIf"],["class","sub-type-des",4,"ngIf"],[1,"custom-edit",3,"click"],[1,"sub-type-des"],[4,"ngFor","ngForOf"],["qfHelpDocName","cadViewFiles",4,"ngIf"],["qfHelpDocName","cadViewFiles"]],template:function(e,i){e&1&&(p(0,"form",0)(1,"div",1)(2,"label",2),O("ngModelChange",function(f){return E(i.setfileType,f)||(i.setfileType=f),f}),y("ngModelChange",function(){return i.setfileTypeChange()}),p(3,"span"),g(4),m(5,"translate"),c()(),b(6,"qf-hint-msg",3),m(7,"translate"),x(8,hh,4,1,"div",4),c(),p(9,"qf-bulk-edit",5),y("closeModal",function(){return i.toggleBulkEdit(!1)})("ensure",function(f){return i.saveBulkEdit(f)}),c()()),e&2&&(r(2),I("ngModel",i.setfileType),r(2),w(u(5,7,"widgets.fileType")),r(2),l("hintMsg",u(7,9,"widgetHelp.limitFileType")),r(2),l("ngIf",i.setfileType),r(),l("openBulkEdit",i.openBulkEdit)("bulkEditOptions",i.cusBulkEdit)("des",i.des))},dependencies:[B,A,Ie,V,ge,Q,De,se,En,ki,G,Ge,Ji,k],styles:[".upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%]{position:relative}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-size[_ngcontent-%COMP%]{display:inline-block;padding-left:5px;margin-top:3px;font-size:13px}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-size[_ngcontent-%COMP%] nz-input-number[_ngcontent-%COMP%]{width:55px;margin-bottom:2px;margin-left:3px}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .tbody[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;border:1px solid #f4f6f9}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%], .upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%]:last-child{justify-content:center;width:100%;line-height:36px;border-bottom:1px solid #f4f6f9}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{position:relative;height:36px;padding-left:14px;margin-bottom:0}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline;display:initial}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%] .custom-edit[_ngcontent-%COMP%]{position:absolute;right:14px;color:#fb9337;color:var(--brand-primary-base, #fb9337);
8cursor:pointer}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-panel[_ngcontent-%COMP%]:last-child{border-bottom:none}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-des[_ngcontent-%COMP%]{padding:6px 8px;font-size:13px;line-height:1.5;color:#aaaeb3;border-top:1px solid #f4f6f9}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-des[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .file-type-panel[_ngcontent-%COMP%] .sub-type-des[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:not(:last-of-type){margin-bottom:4px}.upload-edit[_ngcontent-%COMP%] .widget-edit[_ngcontent-%COMP%] .mask-item[_ngcontent-%COMP%]{position:absolute;z-index:99;width:130px;height:20px;cursor:pointer;opacity:0}"]});let n=a;return n})();var pc=(()=>{let a=class a{get editQue(){return this.currentEditSrv.editQue}get targetQues(){return this.currentEditSrv.targetQueList}get queRelation(){return this.appFormEditSrv.queRelationsMap.get(this.editQueId)}get editQueId(){return this.editQue.queId===0?this.editQue.queTempId:this.editQue.queId}condCheckChange(t){t&&this.openFilterCondModal();let e=this.appFormEditSrv.queRelationsMap;!t&&e.has(this.editQueId)&&e.get(this.editQueId).matchRules.splice(0)}getCurrentQues(){let t=[];return this.appFormEditSrv.appFormData.formQues.forEach(e=>{e.forEach(i=>{let s=Ft(i);s.queId!==this.editQue.queId&&(s.queType===h.TABLE?s.subQuestions=s.subQuestions.filter(f=>f.queId!==this.editQue.queId):s.queType===h.SECTION&&s.innerQuestions.forEach(f=>f.forEach(v=>{let q=Ft(v);q.queType===h.TABLE&&(q.subQuestions=q.subQuestions.filter(D=>D.queId!==this.editQue.queId)),t.push(q)})),s.queType!==h.SECTION&&t.push(s))})}),t.push({queId:ue.APPLY_ID,queTitle:this.translateService.instant("widgets.applyId"),queType:h.NUMBER}),t.length>1?t:[]}openFilterCondModal(){if(!this.appFormEditSrv.queRelationsMap.has(this.editQueId)){let v=this.translateService.instant("all.setTheAppAndQue2");this.qfMessageService.error(v);return}let t=this.appFormEditSrv.queRelationsMap.get(this.editQueId),e=t.relationType,i=this.appFormEditSrv.getMatchQueList(this.currentEditSrv.editQue),s=this.translateService.instant("all.dataFilter"),f=[];this.currentEditSrv.targetQueList.forEach(v=>{v.queType===h.SECTION?f.push(...v.innerQuestions):f.push(v)}),this.modalService.open({content:An,size:"large",footer:null,title:s,maskClosable:!1,componentParams:{relateQLinkerInfo:t.aliasConfig,targetQues:f.filter(v=>![h.UPLOAD,h.RICHTEXT].includes(v.queType)),currentQues:this.currentQues,matchQues:i,relationType:e,matchRules:t?t.matchRules:[],formula:t.matchRuleFormula,editQue:this.editQue,targetQue:this.currentEditSrv.targetQue,copyPasteCond:"relateQue",canMultipleMatch:!0,mode:{mode:"advanced",defaultType:t.matchRuleType||1},needCheckFormulaLoop:!0},onOk:v=>{let q=v.getSubmitErrors();if(q.length){for(let Qe of q){let Xe={noEmpty:"all.conditionValueIsRequired",numericOnly:"all.enterNumbers"};this.qfMessageService.error(this.translateService.instant(Xe[Qe]))}return!1}let{type:D,matchRule:F,formula:H}=v.formValue,_e=this.currentEditSrv.editQue.aggreType;D===2&&t.matchRuleType===1&&(_e===7||_e===8)&&(this.currentEditSrv.editQue.aggreType=null),t.matchRules=F,t.matchRuleType=D,t.matchRuleFormula=H,this.widgetChange.changed.emit()}})}constructor(t,e,i,s,f,v){this.currentEditSrv=t,this.widgetChange=e,this.appFormEditSrv=i,this.modalService=s,this.translateService=f,this.qfMessageService=v}ngOnInit(){this.currentQues=this.getCurrentQues()}};a.\u0275fac=function(e){return new(e||a)(T(ke),T(N),T(ee),T(Pe),T(X),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-filter-and-aggre"]],decls:13,vars:13,consts:[[1,"widget-edit"],[3,"hintMsg"],["qf-button","","qfType","dashed",3,"click"],[1,"cond-info-wrap"],[3,"matchRules","formula","ques","currentQues"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"p")(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",1),m(6,"translate"),c(),p(7,"button",2),y("click",function(){return i.openFilterCondModal()}),p(8,"span"),g(9),m(10,"translate"),c()(),p(11,"div",3),b(12,"qf-filter-cond-info",4),c()()),e&2&&(r(3),w(u(4,7,"all.dataFilter")),r(2),l("hintMsg",u(6,9,"all.dataFilterTip")),r(4),w(u(10,11,"all.setFilterCriteria")),r(3),l("matchRules",i.queRelation==null?null:i.queRelation.matchRules)("formula",i.queRelation==null?null:i.queRelation.matchRuleFormula)("ques",i.targetQues)("currentQues",i.currentQues))},dependencies:[K,G,Qn,k],styles:[".widget-edit[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}button[_ngcontent-%COMP%]{width:100%}.cond-info-wrap[_ngcontent-%COMP%]{margin-top:10px}"]});let n=a;return n})();function _h(n,a){n&1&&(p(0,"div",3)(1,"p"),g(2),m(3,"translate"),c(),p(4,"p"),g(5),m(6,"translate"),c()()),n&2&&(r(2),M("1.",u(3,2,"all.fileSetting1"),""),r(3),M("2.",u(6,4,"all.fileSetting2"),""))}var cc=(()=>{let a=class a{constructor(t){this.widgetChange=t}changeHandler(t){this.widgetChange.changed.emit()}};a.\u0275fac=function(e){return new(e||a)(T(N))}
8,a.\u0275cmp=P({type:a,selectors:[["qf-image-compress"]],inputs:{que:"que"},decls:6,vars:5,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],["class","widget-tip-wrapper widget-edit-detail",4,"ngIf"],[1,"widget-tip-wrapper","widget-edit-detail"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.que.imageCompress,f)||(i.que.imageCompress=f),f}),y("ngModelChange",function(f){return i.changeHandler(f)}),p(2,"span"),g(3),m(4,"translate"),c()(),x(5,_h,7,6,"div",2),c()),e&2&&(r(),I("ngModel",i.que.imageCompress),r(2),w(u(4,3,"widgets.imageCompress")),r(2),l("ngIf",i.que.imageCompress))},dependencies:[A,V,Q,se,k],styles:[".widget-tip-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;font-size:13px;color:#767e89}.widget-tip-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:first-of-type{margin-top:-4px}"]});let n=a;return n})();var Ch=["fileUpload"],yh=()=>["jpg","jpeg","png","gif","bmp","tif"],dc=()=>({standalone:!0});function vh(n,a){n&1&&(p(0,"p"),g(1),m(2,"translate"),c(),p(3,"p"),g(4),m(5,"translate"),c()),n&2&&(r(),w(u(2,2,"widgetHelp.optionContent")),r(3),w(u(5,4,"widgetHelp.optionContentNotice")))}function xh(n,a){if(n&1){let o=S();p(0,"label",22),m(1,"translate"),O("ngModelChange",function(e){_(o);let i=d().$implicit;return E(i.beingDefault,e)||(i.beingDefault=e),C(e)}),y("ngModelChange",function(){_(o);let e=d().$implicit,i=d();return e.checked=e.beingDefault,C(i.defaultOptionChange())}),c(),p(2,"div",23),y("click",function(){_(o);let e=d(),i=e.$implicit,s=e.index,f=d();return C(f.customImage(i,s))}),p(3,"i",24),g(4,"\uE70A"),c()()}if(n&2){let o=d().$implicit;l("nzTooltipTitle",u(1,4,"additional.setDefault"))("ngModelOptions",Y(6,dc)),I("ngModel",o.beingDefault),r(2),l("qfBgImage",o.optUrl)}}function bh(n,a){n&1&&(p(0,"div",25),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.optionNoRepeat")," "))}function Th(n,a){if(n&1){let o=S();p(0,"div",15)(1,"div",16)(2,"a",17),m(3,"translate"),y("click",function(){let e=_(o).$implicit,i=d();return C(i.deleteOption(e))}),p(4,"i",12),g(5,"\uE7C7"),c()(),p(6,"a",18)(7,"i",12),g(8,"\uE7E3"),c()()(),p(9,"qf-input-group",19)(10,"input",20),O("ngModelChange",function(e){let i=_(o).$implicit;return E(i.optValue,e)||(i.optValue=e),C(e)}),y("blur",function(){_(o);let e=d();return C(e.formEditService.getReapeatList())})("ngModelChange",function(){_(o);let e=d();return C(e.optionChange())}),c()(),x(11,xh,5,7,"ng-template",null,2,te)(13,bh,3,3,"div",21),c()}if(n&2){let o=a.$implicit,t=W(12),e=d();r(2),l("title",u(3,7,"additional.delete")),r(7),be("check-item",e.formEditService.repeatOptList.includes(o.tempId)),l("qfPrefix",t),r(),l("ngModelOptions",Y(9,dc)),I("ngModel",o.optValue),r(3),l("ngIf",e.formEditService.repeatOptList.includes(o.tempId))}}function Sh(n,a){if(n&1){let o=S();p(0,"div",4)(1,"div",5)(2,"p",6),g(3),m(4,"translate"),c()(),p(5,"button",26),y("click",function(){_(o);let e=d();return C(e.showLogicalEdit())}),g(6),m(7,"translate"),c()()}n&2&&(r(3),w(u(4,2,"widgets.logicalForm")),r(3),M(" ",u(7,4,"all.clickToSet")," "))}var mc=(()=>{let a=class a{get data(){return this._data}set data(t){this._data=t,t.options.forEach(e=>{e.optUrl||(e.optUrl=Oa(this.rootStore.workspaceInfo().type)[this.optUrlLoop],this.optUrlLoop=(this.optUrlLoop+1)%3)}),this.choiceQueType.includes(this.data.queType)&&(this.refreshChoiceTempId(),this.widgetChange.syncForm$.emit({type:"option",question:this.data})),this.dataChange.emit(t)}refreshChoiceTempId(){this.data.options.forEach(t=>t.tempId=t.tempId||this.widgetChange.optionTempId--)}showLogicalEdit(){let t=this.modalInvoke.getLogicalEditParam(this.data,this.allQuestions);t.content=zi,this.modalService.open(t)}noReturnPredicate(){return!1}constructor(t,e,i,s,f,v,q){this.formEditService=t,this.modalService=e,this.modalInvoke=i,this.appFormEditService=s,this.widgetChange=f,this.translateService=v,this.messageService=q,this.rootStore=re(Ct),this.beingNil=ie,this.PathType=rt,this.choiceQueType=[h.SELECT,h.RADIO,h.CHECKBOX,h.IMAGE_PICKER],this.dataChange=new R,this.sendAttachArray=new R,this.defaultValChange=new R,this.attachArray=[],this.optUrlLoop=0}ngOnChanges(){this.allQuestions=this.appFormEditService.appFormData.formQues}optionChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"option",question:this.data})}defaultOptionChange(){this.widgetChange.changed.emit(!0),this.defaultValChange.emit(this.data)}doUpload(t){t.type==="success"?(this.showAddedFile(t.file),this.optionChange()):t.type==="error"&&this.messageService.error(t.file.error)}customImage(t,e){this.optImageChangeId=t.optId,this.fileUpload.nativeElement.click(),this.selectedImgIndex=e}showAddedFile(t){this.attachArray.push(t),this.sendAttachArray.emit(this.attachArray);let e=!1;this.data.options.forEach(i=>
8{i.optId&&i.optId===this.optImageChangeId&&(i.optUrl=t.url,e=!0)}),!e&&this.data.options[this.selectedImgIndex]&&(this.data.options[this.selectedImgIndex].optUrl=t.url),this.widgetChange.changed.emit(!0)}addOption(){let t=Oa(this.rootStore.workspaceInfo().type)[this.optUrlLoop],e=new Jt({optId:0,tempId:this.widgetChange.optionTempId--,optValue:this.translateService.instant("all.unnamed"),optUrl:t,checked:!1,linkQueIds:[],beingDefault:!1});this.data.options.push(e),this.widgetChange.changed.emit(!0),this.optUrlLoop=(this.optUrlLoop+1)%3,this.formEditService.getReapeatList()}deleteOption(t){this.data.options.every((e,i)=>e===t?(this.data.options.splice(i,1),this.optionChange(),!1):!0),this.formEditService.getReapeatList()}drop(t){let{previousIndex:e,currentIndex:i}=t;e!==i&&(Et(this.data.options,t.previousIndex,t.currentIndex),this.widgetChange.syncForm$.next({type:"optionOrderChange",question:this.data}))}};a.\u0275fac=function(e){return new(e||a)(T($e),T(Pe),T(Ke),T(ee),T(N),T(X),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-image-option-content"]],viewQuery:function(e,i){if(e&1&&qe(Ch,5),e&2){let s;Te(s=Se())&&(i.fileUpload=s.first)}},inputs:{data:"data"},outputs:{dataChange:"dataChange",sendAttachArray:"sendAttachArray",defaultValChange:"defaultValChange"},features:[Re],decls:25,vars:19,consts:[["hintMsgTemplate",""],["fileUpload",""],["prefix",""],[1,"image-choice-edit"],[1,"widget-edit"],[1,"widget-edit-header"],[1,"widget-edit-title"],[3,"hintMsg"],[1,"widget-edit-hint"],["cdkDropList","",1,"options-container",3,"cdkDropListDropped","cdkDropListEnterPredicate"],["cdkDrag","","class","option-item-container","cdkDragLockAxis","y",4,"ngFor","ngForOf"],["qf-button","","qfType","dashed",1,"widget-edit-title-l",3,"click"],[1,"iconfont"],["class","widget-edit",4,"ngIf"],[3,"qfChange","hidden","qfMultiple","maxSize","pathType","qfAccept"],["cdkDrag","","cdkDragLockAxis","y",1,"option-item-container"],[1,"suffix-container"],[3,"click","title"],["cdkDragHandle","","title","\u62D6\u52A8\u6362\u884C",1,"drag-icon"],[1,"option-item",3,"qfPrefix"],["qf-input","","placeholder","\u9009\u9879\u5185\u5BB9","maxlength","500",3,"ngModelChange","blur","ngModelOptions","ngModel"],["class","check-repeat",4,"ngIf"],["nz-tooltip","","qf-checkbox","","nzTooltipPlacement","bottom",3,"ngModelChange","nzTooltipTitle","ngModelOptions","ngModel"],[1,"opt-img",3,"click","qfBgImage"],[1,"iconfont","edit-img"],[1,"check-repeat"],["qf-button","","qfType","dashed",1,"logic-set-btn",3,"click"]],template:function(e,i){if(e&1){let s=S();p(0,"form",3)(1,"div",4)(2,"div",5)(3,"p",6)(4,"span"),g(5),m(6,"translate"),c(),b(7,"qf-hint-msg",7),x(8,vh,6,6,"ng-template",null,0,te),c(),p(10,"p",8),g(11),m(12,"translate"),c()(),p(13,"div",9),y("cdkDropListDropped",function(v){return _(s),C(i.drop(v))}),x(14,Th,14,10,"div",10),c(),p(15,"button",11),y("click",function(){return _(s),i.addOption(),C(i.optionChange())}),p(16,"i",12),g(17,"\uE867"),c(),g(18),m(19,"translate"),c()(),x(20,Sh,8,6,"div",13),p(21,"qf-upload-v2",14),y("qfChange",function(v){return _(s),C(i.doUpload(v))}),p(22,"button",null,1),g(24,"fake-button"),c()()()}if(e&2){let s=W(9);r(5),w(u(6,12,"widgets.choiceContent")),r(2),l("hintMsg",s),r(4),M(" ",u(12,14,"all.pleaseUploadImagesFirst")," "),r(2),l("cdkDropListEnterPredicate",i.noReturnPredicate),r(),l("ngForOf",i.data.options),r(4),M(" ",u(19,16,"widgets.addImageChoice")," "),r(2),l("ngIf",i.beingNil(i.data.supId)),r(),l("hidden",!0)("qfMultiple",!1)("maxSize",20)("pathType",i.PathType.Image)("qfAccept",Y(18,yh))}},dependencies:[B,A,Ie,le,V,ge,Ue,Q,De,Dt,Pt,Ot,se,he,xi,xn,yt,K,G,$t,wi,k],styles:[".widget-edit-header[_ngcontent-%COMP%] .widget-edit-hint[_ngcontent-%COMP%]{margin-top:-4px;font-size:13px;color:#aaaeb3}.widget-edit-header[_ngcontent-%COMP%] .widget-edit-title[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .image-choice-edit .options-container .qf-input{margin-left:56px}[_nghost-%COMP%] .image-choice-edit .qf-input-prefix{position:absolute;display:flex;align-items:center}[_nghost-%COMP%] .image-choice-edit .qf-input-prefix .opt-img{position:relative;z-index:999;width:26px;height:26px;margin-left:7px;cursor:pointer;background-size:cover}[_nghost-%COMP%] .image-choice-edit .qf-input-prefix .opt-img .edit-img{position:absolute;top:2px;bottom:13px;left:6px;font-size:14px;color:#fff;opacity:0}
8[_nghost-%COMP%] .image-choice-edit .qf-input-prefix .opt-img:hover .edit-img{opacity:1}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.options-container.cdk-drop-list-dragging[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]});let n=a;return n})();function wh(n,a){if(n&1){let o=S();p(0,"qf-custom-range-frame",7),O("ngModelChange",function(e){_(o);let i=d();return E(i.memberSelectScope,e)||(i.memberSelectScope=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.change(e))}),c()}if(n&2){let o=d();l("config",o.customRangeFrameConfig),I("ngModel",o.memberSelectScope)}}function Mh(n,a){if(n&1&&(p(0,"qf-function-lock",8),b(1,"qf-dft-associate-data",9),c()),n&2){let o=d();r(),l("editQue",o.data)}}var uc=(()=>{let a=class a{set data(t){this._data=t,this.memberSelectScopeType=t.memberSelectScopeType,this.memberSelectScope=t.memberSelectScope||{depart:[],member:[],role:[],dynamic:[]},this.dataChange.emit(t)}get data(){return this._data}change(t){this.data.memberSelectScope=t,this.widgetChange.changed.emit(!0)}clearRelationData(){let t=this.appFormEditService.appFormData.selectScopeRelations.findIndex(e=>e.queId===this.data.queId||e.queId===this.data.queTempId);t!==-1&&this.appFormEditService.appFormData.selectScopeRelations.splice(t,1)}typeChange(t){if(this.data.memberSelectScopeType=t,this.widgetChange.changed.emit(!0),this.memberSelectScopeType===rn.RELATIONDATA&&this._rootStore.workspaceInfo().accountLevel<Mt.BASIC){this.canAssociate=!1,this.modalInvokeService.openFunctionLimitModal(Be.memberRelation);return}this.memberSelectScopeType!==rn.RELATIONDATA&&this.clearRelationData()}constructor(t,e,i){this.appFormEditService=t,this.widgetChange=e,this.modalInvokeService=i,this._rootStore=re(Ct),this.MemberSelectScopeType=rn,this.limitFunctionKey=Be,this.canAssociate=!0,this.customRangeFrameConfig={tabList:["member","dept","role","dynamic"],deptConfig:{showIncludeSubDepartsCheckbox:!0},dynamicConfig:{showDynamicType:["currentUser","department"],dynamicQues:[]}},this.dataChange=new R}ngOnInit(){let t=this.appFormEditService.appFormData.formQues.flat();this.customRangeFrameConfig=ss(this.customRangeFrameConfig,{dynamicConfig:{dynamicQues:t}})}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(N),T(Ke))},a.\u0275cmp=P({type:a,selectors:[["qf-member-scope"]],inputs:{data:"data",widgetInfo:"widgetInfo"},outputs:{dataChange:"dataChange"},features:[et([ke])],decls:14,vars:18,consts:[[1,"dynamic-director-edit"],[1,"widget-edit"],[1,"widget-edit-title"],[2,"margin-bottom","8px","width","100%",3,"ngModelChange","ngModel"],[3,"qfValue","qfLabel"],[3,"config","ngModel","ngModelChange",4,"ngIf"],["func","memberRelation",4,"ngIf"],[3,"ngModelChange","config","ngModel"],["func","memberRelation"],["selectedType","memberRelation",1,"table-asos-container",3,"editQue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1)(2,"p",2),g(3),m(4,"translate"),c(),p(5,"qf-select",3),O("ngModelChange",function(f){return E(i.memberSelectScopeType,f)||(i.memberSelectScopeType=f),f}),y("ngModelChange",function(f){return i.typeChange(f)}),b(6,"qf-option",4),m(7,"translate"),b(8,"qf-option",4),m(9,"translate"),b(10,"qf-option",4),m(11,"translate"),c(),x(12,wh,1,2,"qf-custom-range-frame",5)(13,Mh,2,1,"qf-function-lock",6),c()()),e&2&&(r(3),w(u(4,10,"widgets.selectScope")),r(2),I("ngModel",i.memberSelectScopeType),r(),l("qfValue",i.MemberSelectScopeType.ALL)("qfLabel",u(7,12,"widgets.memberSelectScopeTypeAll")),r(2),l("qfValue",i.MemberSelectScopeType.CUSTOM)("qfL
8abel",u(9,14,"widgets.memberSelectScopeTypeCustom")),r(2),l("qfValue",i.MemberSelectScopeType.RELATIONDATA)("qfLabel",u(11,16,"all.associateExistingMembers")),r(2),l("ngIf",i.memberSelectScopeType===i.MemberSelectScopeType.CUSTOM),r(),l("ngIf",i.memberSelectScopeType===i.MemberSelectScopeType.RELATIONDATA&&i.canAssociate))},dependencies:[A,V,Q,oe,ne,Yt,xt,Bi,k],styles:[".p-sm[_ngcontent-%COMP%]{padding:6px 10px 10px}p[_ngcontent-%COMP%]{margin-bottom:7px}.m-b-md[_ngcontent-%COMP%]{margin-bottom:10px}.b-b[_ngcontent-%COMP%]{border-bottom:1px solid #f4f6f9}.panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;height:35px;padding:0 10px}.panel-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:8px;font-size:13px}.table-asos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}"]});let n=a;return n})();var mr=()=>({standalone:!0}),Eh=(n,a)=>({"color-item":n,"check-item":a}),fc=(n,a)=>({background:n,color:a}),Oh=(n,a)=>({background:n,border:a});function Ph(n,a){n&1&&(p(0,"p"),g(1),m(2,"translate"),c(),p(3,"p"),g(4),m(5,"translate"),c()),n&2&&(r(),w(u(2,2,"widgetHelp.optionContent")),r(3),w(u(5,4,"widgetHelp.optionContentNotice")))}function Dh(n,a){if(n&1){let o=S();p(0,"div",35),y("click",function(){let e=_(o).$implicit,i=d(5);return C(i.selectColor(e))})("mouseenter",function(){let e=_(o).$implicit,i=d(5);return C(i.mouseenter(e))})("mouseleave",function(){let e=_(o).$implicit,i=d(5);return C(i.mouseleave(e))}),p(1,"i",15),g(2," \uE861 "),c()()}if(n&2){let o=a.$implicit,t=d(5);St(Ce(4,Oh,o.optionColor,t.curOption.optionThemeColor.themeId===o.themeId||o.hover?"1px solid"+o.hoverBorderColor:"none")),r(),We("color",t.curOption.optionThemeColor.themeId===o.themeId?o.tickColor:"transparent")}}function kh(n,a){if(n&1&&(p(0,"div",32)(1,"p",33),g(2),m(3,"translate"),c(),x(4,Dh,3,7,"div",34),c()),n&2){let o=d(4);r(2),M(" ",u(3,2,"widgets.pleaseSelectColor")," "),r(2),l("ngForOf",o.optionThemes)}}function Vh(n,a){if(n&1){let o=S();p(0,"div",30)(1,"div",31,2),y("click",function(){_(o);let e=d(2).$implicit,i=d();return C(i.createColorOverlay(e))}),c(),x(3,kh,5,4,"ng-template",null,3,te),c()}if(n&2){let o=W(4),t=d(2).$implicit;r(),St(Ce(3,fc,t==null?null:t.optionThemeColor.optionColor,t==null?null:t.optionThemeColor.textColor)),l("qfPopoverContent",o)}}function Qh(n,a){}function Ah(n,a){if(n&1){let o=S();j(0),p(1,"div",24)(2,"a",25),m(3,"translate"),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.deleteOption(e))}),p(4,"i",15),g(5,"\uE7C7"),c()(),p(6,"a",26)(7,"i",15),g(8,"\uE7E3"),c()()(),x(9,Vh,5,6,"div",27),p(10,"qf-input-group",28)(11,"input",29),O("ngModelChange",function(e){_(o);let i=d().$implicit;return E(i.optValue,e)||(i.optValue=e),C(e)}),y("blur",function(){_(o);let e=d(2);return C(e.formEditService.getReapeatList())})("ngModelChange",function(){_(o);let e=d(2);return C(e.change())}),c()(),x(12,Qh,0,0,"ng-template",null,1,te),U()}if(n&2){let o=W(13),t=d().$implicit,e=d();r(2),l("title",u(3,8,"additional.delete")),r(7),l("ngIf",e.data.beingShowColor),r(),dt(Ce(10,Eh,e.data.beingShowColor,e.formEditService.repeatOptList.includes(t.tempId))),l("qfSuffix",o),r(),l("disabled",t.beingOtherOpt)("ngModelOptions",Y(13,mr)),I("ngModel",t.optValue)}}function Fh(n,a){n&1&&(p(0,"div",36),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.optionNoRepeat")," "))}function Rh(n,a){if(n&1&&(p(0,"div",21),x(1,Ah,14,14,"ng-container",22)(2,Fh,3,3,"div",23),c()),n&2){let o=a.$implicit,t=d();r(),l("ngIf",!o.beingOtherOpt),r(),l("ngIf",t.formEditService.repeatOptList.includes(o.tempId))}}function Nh(n,a){if(n&1&&(p(0,"div",30),b(1,"div",39),c()),n&2){let o=d(2).$implicit;r(),St(Ce(2,fc,o.optionThemeColor.optionColor,o.optionThemeColor.textColor))}}function Bh(n,a){if(n&1){let o=S();p(0,"a",25),m(1,"translate"),y("click",function(){_(o);let e=d(2).$implicit,i=d();return C(i.deleteOption(e))}),p(2,"i",15),g(3,"\uE7C7"),c()()}n&2&&l("title",u(1,1,"additional.delete"))}function Lh(n,a){if(n&1&&(j(0),x(1,Nh,2,5,"div",27),p(2,"qf-input-group",28),b(3,"input",38),c(),x(4,Bh,4,3,"ng-template",null,4,te),U()),n&2){let o=W(5),t=d().$implicit,e=d();r(),l("ngIf",e.data.beingShowColor),r(),be("color-item",e.data.beingShowColor),l("qfSuffix",o),r(),l("disabled",!0)("ngModel",t.optValue)("ngModelOptions",Y(7,mr))}}function zh(n,a){if(n&1&&(p(0,"div",37),x(1,Lh,6,8,"ng-container",22),c()),n&2){let o=a.$implicit;r(),l("ngIf",o.beingOtherOpt)}}function Wh(n,a){if(n&1){let o=S();p(0,"div",6)(1,"div",40)(2,"p",41),g(3),m(4,"translate"),c()(),p(5,"button",42),y("click",function(){_(o);let e=d();return C(e.showLogicalEdit())}),g(6),m(7,"translate"),c()()}n&2&&(r(3),w(u(4,2,"widgets.logicalForm")),r(3),M(" ",u(7,4,"all.clickToSet")," "))}function Hh(n,a){if(n&1){let o=S();p(0,"qf-bulk-edit",43),y("closeModal",function(){_(o);let e=d();return C(e.toggleOpenBulkEdit(!1))})("ensure",function(e){_(o);let i=d();return C(i.saveBulkEdit(e))}),c()}if(n&2){let o=d();l("openBulkEdit",o.openBulkEdit)("bulkEditOptions",o.data.options)}}var gc=(()=>{let a=class a{set data(t){this._data=t,this._data.options.forEach(e
8=>{e.optValue?e.optValue=this.translateService.instant(e.optValue).trim():e.optValue=e.optValue.trim()}),this.getOptionThemes(),this.dataChange.emit(this._data)}get data(){return this._data}noReturnPredicate(){return!1}createColorOverlay(t){this.curOption=t}selectColor(t){this.curOption.optionThemeColor=t,this.change()}colorOptionChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"beingShowColor",question:this.data}),this.widgetChange.syncForm$.emit({type:"option",question:this.data})}getOptionThemes(){this.singleDataReq.getOptionThemes().subscribe(t=>{this.optionThemes=t.optionThemes,this.data.options.forEach(e=>{!e.optionThemeColor&&this.optionThemes&&(e.optionThemeColor=this.optionThemes[20],this.change())})})}mouseenter(t){t.hover=!0}mouseleave(t){t.hover=!1}toggleOpenBulkEdit(t){this.openBulkEdit=t}constructor(t,e,i,s,f,v,q,D){this.formEditService=t,this.translateService=e,this.widgetChange=i,this.modalInvoke=s,this.appFormEditService=f,this.modalService=v,this.messageService=q,this.singleDataReq=D,this.dataChange=new R,this.handleOption=new R,this.status={isopen:!1},this.beingNil=ie,this.openBulkEdit=!1}ngOnChanges(){this.alreadyOther=!1,this.data.options.forEach(e=>{e.beingOtherOpt&&(this.alreadyOther=!0)}),this.allQuestions=this.appFormEditService.appFormData.formQues,this.data.options.forEach(e=>{!e.optionThemeColor&&this.optionThemes&&(e.optionThemeColor=this.optionThemes[20],this.change())})}change(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.next({type:"option",question:this.data})}addOption(){let t=new Jt({optId:0,optValue:this.translateService.instant("all.unnamed"),beingOtherOpt:!1,beingRequired:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]}),e=this.data.options.length;this.alreadyOther?this.data.options.splice(e-1,0,t):this.data.options.push(t),this.widgetChange.choiceOptChange.emit(),this.change(),this.formEditService.getReapeatList()}addOther(){if(!this.alreadyOther){let t=new Jt({optId:0,optValue:this.translateService.instant("widgets.other"),beingOtherOpt:!0,beingRequired:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]});this.data.options.push(t),this.alreadyOther=!0}this.widgetChange.choiceOptChange.emit(),this.change(),this.handleOption.emit()}deleteOption(t){this.data.options.every((e,i)=>e===t?(t.beingOtherOpt&&(this.alreadyOther=!1),this.data.options.splice(i,1),!1):!0),this.change(),this.handleOption.emit(),this.formEditService.getReapeatList()}saveBulkEdit(t){let e=t.map(v=>v.trim());if(gn(e).length!==e.length){this.messageService.error(this.translateService.instant("all.optionNoRepeat")),this.openBulkEdit=!0;return}this.formEditService.repeatOptList=[];let s=this.data.options.find(v=>v.beingOtherOpt),f=e.map((v,q)=>{let D=this.data.options[q];return D&&!D.beingOtherOpt?(D.optValue=v,D):new Jt({optId:0,optValue:v,beingOtherOpt:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]})});this.data.options=f,s&&this.data.options.push(s),this.widgetChange.choiceOptChange.emit(),this.change()}showLogicalEdit(){let t=this.modalInvoke.getLogicalEditParam(this.data,this.allQuestions);t.content=zi,this.modalService.open(t)}drop(t){let{previousIndex:e,currentIndex:i}=t;e!==i&&(Et(this.data.options,t.previousIndex,t.currentIndex),this.widgetChange.syncForm$.next({type:"optionOrderChange",question:this.data}))}};a.\u0275fac=function(e){return new(e||a)(T($e),T(X),T(N),T(Ke),T(ee),T(Pe),T(ye),T(hn))},a.\u0275cmp=P({type:a,selectors:[["qf-multi-option-content"]],inputs:{data:"data"},outputs:{dataChange:"dataChange",handleOption:"handleOption"},features:[Re],decls:30,vars:26,consts:[["hintMsgTemplate",""],["emptySuffix",""],["circleTem",""],["colorTemplate",""],["optSuffix",""],[1,"multi-choice-edit"],[1,"widget-edit"],[1,"widget-edit-title","w-100"],[3,"hintMsg"],[1,"color-switch"],[3,"ngModelChange","ngModelOptions","ngModel"],["cdkDropList","",1,"options-container",3,"cdkDropListDropped","cdkDropListEnterPredicate"],["cdkDrag","","class","option-item-container","cdkDragLockAxis","y",4,"ngFor","ngForOf"],["class","option-item-other",4,"ngFor","ngForOf"],["qf-button","","qfType","dashed",1,"widget-edit-title-l",3,"click"],[1,"iconfont"],[1,"widget-edit-three"],[3,"click"],[1,"widget-edit-title-sub-none",3,"click"],["class","widget-edit",4,"ngIf"],["descUrl","mulEdit",3,"openBulkEdit","bulkEditOptions","closeModal","ensure",4,"ngIf"],["cdkDrag","","cdkDragLockAxis","y",1,"option-item-container"],[4,"ngIf"],["class","check-repeat",4,"ngIf"],[1,"suffix-container"],[3,"click","title"],["cdkDragHandle","","title","\u62D6\u52A8\u6362\u884C",1,"drag-icon"],["class","prefix-container",4,"ngIf"],[1,"option-item",3,"qfSuffix"],["qf-input","","placeholder","\u7F16\u8F91\u9009\u9879\u540D","maxlength","500",3,"ngModelChange","blur","disabled","ngModelOptions","ngModel"],[1,"prefix-container"],["qf-popover","","qfPopoverTrigger","click","qfPopoverSize","small","qfPopoverPlacement","bottomLeft",1,"circle",3,"click","qfPopoverContent"],[1,"color-container"],[1,"color-title"],["class","circle color-option",3,"style","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[1,"circle","color-option",3,"click","mouseenter","mouseleave"],[1,"check-repeat"],[1,"option-item-other"],["qf-input","",3,"disabled","ngModel","ngModelOptions"],[1,"circle"],[1,"widget-edit-header"],[1,"widget-edit-title"],["qf-button","","qfType","dashed",1,"logic-set-btn",3,"click"],["descUrl","mulEdit",3,"closeModal","ensure","openBulkEdit","bulkEditOptions"]],template:function(e,i){if(e&1){let s=S();p(0,"form",5)(1,"div",6)(2,"div",7)(3,"span"),g(4),m(5,"translate"),c(),b(6,"qf-hint-msg",8),x(7,Ph,6,6,"ng-template",null,0,te),p(9,"div",9),g(10),m(11,"translate"),p(12,"qf-switch",10),O("ngModelChange",function(v){return _(s),E(i.data.beingShowColor,v)||(i.data.beingShowColor=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.colorOptionChange())}),c()()(),p(13,"div",11),y("cdkDropListDropped",function(v){return _(s),C(i.drop(v))}),x(14,Rh,3,2,"div",12)(15,zh,2,1,"div",13),c(),p(16,"button",14),y("click",function(){return _(s),C(i.addOption())}),p(17,"i",15),g(18,"\uE867"),c(),g(19),m(20,"translate"),c(),p(21,"div",16)(22,"p",17),y("click",function(){return _(s),C(i.addOther())}),g(23),m(24,"translate"),c(),p(25,"p",18),y("click",function(){return _(s),C(i.toggleOpenBulkEdit(!0))}),g(26),m(27,"translate"),c()()(),x(28,Wh,8,6,"div",19)(29,Hh,1,2,"qf-bulk-edit",20),c()}if(e&2){let s=W(8);r(4),w(u(5,15,"widgets.choiceContent")),r(2),l("hintMsg",s),r(4),M(" ",u(11,17,"all.colorful")," "),r(2),l("ngModelOptions",Y(25,mr)),I("ngModel",i.data.beingShowColor),r(),l("cdkDropListEnterPredicate",i.noReturnPredicate),r(),l("ngForOf",i.data.options),r(),l("ngForOf",i.data.options),r(4),M(" ",u(20,19,"widgets.addChoice")," "),r(3),dt(i.alreadyOther?"widget-edit-title-m-disabled":"widget-edit-title-sub"),r(),M(" ",u(24,21,"widgets.addOther")," "),r(3),M(" ",u(27,23,"widgets.bulkEdit")," "),r(2),l("ngIf",i.beingNil(i.data.supId)),r(),l("ngIf",i.openBulkEdit)}},dependencies:[B,A,Ie,le,V,ge,Ue,Q,De,Dt,Pt,Ot,he,xi,xn,Mn,K,Yo,G,Ji,k],styles:[".widget-edit-title[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
8.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.options-container.cdk-drop-list-dragging[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.prefix-container[_ngcontent-%COMP%]{top:11px}.widget-edit[_ngcontent-%COMP%] .option-item.color-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:16px}"]});let n=a;return n})();function jh(n,a){if(n&1&&(b(0,"qf-option",4),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.label))("qfValue",o.value)}}var hc=(()=>{let a=class a{changNumberFormat(){this.change()}change(){this.widgetChange.changed.emit()}constructor(t){this.widgetChange=t,this.numberFormats=[{label:"all.none",value:ji.empty},{label:"all.showThousandsSeparators",value:ji.spliter},{label:"all.showAPercentSymbol",value:ji.percentage}]}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-number-format"]],inputs:{data:"data"},decls:6,vars:5,consts:[[1,"widget-edit-share"],[1,"widget-edit-title"],[1,"number-format-type",3,"ngModelChange","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"p",1),g(2),m(3,"translate"),c(),p(4,"qf-select",2),O("ngModelChange",function(f){return E(i.data.numberFormat,f)||(i.data.numberFormat=f),f}),y("ngModelChange",function(){return i.changNumberFormat()}),x(5,jh,2,4,"qf-option",3),c()()),e&2&&(r(2),w(u(3,3,"all.numberFormat")),r(2),I("ngModel",i.data.numberFormat),r(),l("ngForOf",i.numberFormats))},dependencies:[B,V,Q,oe,ne,k],styles:[".widget-edit-share[_ngcontent-%COMP%] .qflow-date-time-picker[_ngcontent-%COMP%]{position:relative;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .date-container[_ngcontent-%COMP%]{margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .select-dft-type[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;height:34px;padding:0 10px;margin-bottom:10px;cursor:pointer;background-color:#f9fafc;border-radius:3px}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .notify[_ngcontent-%COMP%]{color:#fb9337;color:var(--brand-primary-base, #fb9337)}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data.asos-empty[_ngcontent-%COMP%]{justify-content:center}.widget-edit-share[_ngcontent-%COMP%] .set-asos-data[_ngcontent-%COMP%] .asos-setted[_ngcontent-%COMP%]{width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.default-value-hint[_ngcontent-%COMP%]{margin:-4px 0 8px;font-size:13px}.table-asos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.relation-info-wrap[_ngcontent-%COMP%]{position:relative;padding:10px 15px;margin-top:10px;background:#fafafb;border-radius:3px}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{position:absolute;top:10px;right:8px;cursor:pointer}.relation-info-wrap[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]:hover{color:#fb4b51}.relation-info-wrap[_ngcontent-%COMP%] .relation-info-title[_ngcontent-%COMP%]{color:#b0b0b9}.file-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;margin-bottom:10px;color:#494f57;border:1px solid #f9fafc;border-radius:3px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%]{width:24px;height:24px;margin-right:6px}.file-item[_ngcontent-%COMP%] .file-item-thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;vertical-align:baseline}.file-item[_ngcontent-%COMP%] .file-item-name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item[_ngcontent-%COMP%] .iconfont.del-icon[_ngcontent-%COMP%]{color:#acb3bd;cursor:pointer;opacity:0;transition:all ease .2s}.file-item[_ngcontent-%COMP%] .file-item-progress[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;height:2px;background:#ffca6b;transition:width .3s}.file-item[_ngcontent-%COMP%]:hover .iconfont.del-icon[_ngcontent-%COMP%]{opacity:1}.table-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .refer-dft-value-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .upload[_ngcontent-%COMP%]{width:100%}",".number-format-type[_ngcontent-%COMP%]{width:100%}"]});let n=a;return n})();function Uh(n,a){if(n&1){let o=S();p(0,"div",3)(1,"input",4),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data.minValue,e)||(i.data.minValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.numberChange())}),c(),p(3,"span",5),g(4,"~"),c(),p(5,"input",4),m(6,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data.maxValue,e)||(i.data.maxValue=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.numberChange())}),c()()}if(n&2){let o=d();r(),l("placeholder",u(2,4,"all.minValue")),I("ngModel",o.data.minValue),r(4),l("placeholder",u(6,6,"all.maxValue")),I("ngModel",o.data.maxValue)}}var _c=(()=>{let a=class a{checkChange(t){t||(this.data.minValue="",this.data.maxValue=""),this.widgetChange.changed.emit(!0)}numberChange(){let t=/^[-]?([0-9]{1,}([.][0-9]*)?)$/;t.test(this.data.minValue)||(this.data.minValue=""),t.test(this.data.maxValue)||(this.data.maxValue=""),this.widgetChange.changed.emit(!0)}constructor(t){this.widgetChange=t,this.checked=!1}
8};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-number-value-limit"]],inputs:{data:"data"},decls:6,vars:5,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],["class","value-container widget-edit-detail",4,"ngIf"],[1,"value-container","widget-edit-detail"],["type","number","step","1",1,"qflow-input-normal",3,"ngModelChange","placeholder","ngModel"],[1,"tidle-style"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.data.numberLimitStatus,f)||(i.data.numberLimitStatus=f),f}),y("ngModelChange",function(f){return i.checkChange(f)}),p(2,"span"),g(3),m(4,"translate"),c()(),x(5,Uh,7,8,"div",2),c()),e&2&&(r(),I("ngModel",i.data.numberLimitStatus),r(2),w(u(4,3,"all.rangeLimit")),r(2),l("ngIf",i.data.numberLimitStatus))},dependencies:[A,le,Eo,V,Q,se,k],styles:[".number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%]{display:flex;align-items:center}.number-ranger[_ngcontent-%COMP%] .value-container[_ngcontent-%COMP%] nz-input-number[_ngcontent-%COMP%]{width:90px}.number-ranger[_ngcontent-%COMP%] .tidle-style[_ngcontent-%COMP%]{margin:0 8px}",".value-container[_ngcontent-%COMP%]{display:inline-flex;margin-top:6px}.value-container[_ngcontent-%COMP%] .tidle-style[_ngcontent-%COMP%]{display:inline-block;padding:0 8px;line-height:34px}.value-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-bottom:0}"]});let n=a;return n})();var Gh=()=>[48,"wsize"],Cc=(()=>{let a=class a{constructor(){this.pluginValidInfo=ii(null),this.widgetChange=re(N),this.modalInvokeService=re(Ke),this.pluginStatusService=re(fi),this.cdr=re(He),this.destroyRef=re(to)}get canChecked(){var t;return((t=this.pluginValidInfo())==null?void 0:t.installed)||this.que.beingAllowWpsOnlineEditing}beingAllowWpsOnlineEditingChange(){if(!this.pluginValidInfo().valid){Tr(0).pipe(gi(this.destroyRef)).subscribe(()=>{this.que.beingAllowWpsOnlineEditing=!1,this.cdr.detectChanges()}),this.modalInvokeService.openFunctionLimitModal("onlineEditing",this.pluginValidInfo().pluginInfo);return}this.widgetChange.changed.emit(),this.widgetChange.syncForm$.emit({type:"beingAllowWpsOnlineEditing",question:this.que})}ngOnInit(){this.pluginStatusService.isValid("onlineEditing").then(t=>this.pluginValidInfo.set(t))}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-online-editing"]],inputs:{que:"que"},decls:5,vars:8,consts:[["qfPendantItem","",1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","qfPendant","ngModel"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.que.beingAllowWpsOnlineEditing,f)||(i.que.beingAllowWpsOnlineEditing=f),f}),y("ngModelChange",function(){return i.beingAllowWpsOnlineEditingChange()}),p(2,"span"),g(3),m(4,"translate"),c()()()),e&2&&(r(),be("pointer-events-none",!i.canChecked),l("qfPendant",Y(7,Gh)),I("ngModel",i.que.beingAllowWpsOnlineEditing),r(2),w(u(4,5,"widgets.allowOnlineEditing")))},dependencies:[V,Q,se,Zo,Fi,k],encapsulation:2});let n=a;return n})();var $h=["bulk"],fr=()=>({standalone:!0}),Xh=(n,a)=>({"color-item":n,"check-item":a}),yc=(n,a)=>({background:n,color:a}),Yh=(n,a)=>({background:n,border:a});function Jh(n,a){n&1&&(p(0,"p"),g(1),m(2,"translate"),c(),p(3,"p"),g(4),m(5,"translate"),c()),n&2&&(r(),w(u(2,2,"widgetHelp.optionContent")),r(3),w(u(5,4,"widgetHelp.optionContentNotice")))}function Zh(n,a){if(n&1){let o=S();p(0,"div",36),y("click",function(){let e=_(o).$implicit,i=d(5);return C(i.selectColor(e))})("mouseenter",function(){let e=_(o).$implicit,i=d(5);return C(i.mouseenter(e))})("mouseleave",function(){let e=_(o).$implicit,i=d(5);return C(i.mouseleave(e))}),p(1,"i",26),g(2," \uE861 "),c()()}if(n&2){let o=a.$implicit,t=d(5);St(Ce(4,Yh,o.optionColor,(t.curOption==null?null:t.curOption.optionThemeColor.themeId)===o.themeId||o.hover?"1px solid"+o.hoverBorderColor:"none")),r(),We("color",(t.curOption==null?null:t.curOption.optionThemeColor.themeId)===o.themeId?o.tickColor:"transparent")}}function e_(n,a){if(n&1&&(p(0,"div",33)(1,"p",34),g(2),m(3,"translate"),c(),x(4,Zh,3,7,"div",35),c()),n&2){let o=d(4);r(2),M(" ",u(3,2,"widgets.pleaseSelectColor")," "),r(2),l("ngForOf",o.optionThemes)}}function t_(n,a){if(n&1){let o=S();p(0,"div",31)(1,"div",32,2),y("click",function(){_(o);let e=d(2).$implicit,i=d();return C(i.createColorOverlay(e))}),c(),x(3,e_,5,4,"ng-template",null,3,te),c()}if(n&2){let o=W(4),t=d(2).$implicit;r(),St(Ce(3,yc,t==null||t.optionThemeColor==null?null:t.optionThemeColor.optionColor,t==null||t.optionThemeColor==null?null:t.optionThemeColor.textColor)),l("qfPopoverContent",o)}}function i_(n,a){}function n_(n,a){if(n&1){let o=S();j(0),p(1,"div",24)(2,"a",25),m(3,"translate"),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.deleteOption(e))}),p(4,"i",26),g(5,"\uE7C7"),c()(),p(6,"a",27)(7,"i",26),g(8,"\uE7E3"),c()()(),x(9,t_,5,6,"div",28),p(10,"qf-input-group",29)(11,"input",30),O("ngModelChange",function(e){_(o);let i=d().$implicit;return E(i.optValue,e)||(i.optValue=e),C(e)}),y("blur",function(){_(o);let e=d(2);return C(e.formEditService.getReapeatList())})("ngModelChange",function(){_(o);let e=d(2);return C(e.change())}),c()(),x(12,i_,0,0,"ng-template",null,1,te),U()}if(n&2){let o=W(13),t=d().$implicit,e=d();r(2),l("title",u(3,8,"additional.delete")),r(7),l("ngIf",e.data.beingShowColor),r(),dt(Ce(10,Xh,e.data.beingShowColor,e.formEditService.repeatOptList.includes(t.tempId))),l("qfSuffix",o),r(),l("disabled",t.beingOtherOpt)("ngModelOptions",Y(13,fr)),I("ngModel",t.optValue)}}function o_(n,a){n&1&&(p(0,"div",37),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.optionNoRepeat")," "))}function a_(n,a){if(n&1&&(p(0,"div",21),x(1,n_,14,14,"ng-container",22)(2,o_,3,3,"div",23),c()),n&2){let o=a.$implicit,t=d();r(),l("ngIf",!o.beingOtherOpt),r(),l("ngIf",t.formEditService.repeatOptList.includes(o.tempId))}}function r_(n,a){if(n&1&&(p(0,"div",31),b(1,"div",40),c()),n&2){let o=d(2).$implicit;r(),St(Ce(2,yc,o.optionThemeColor.optionColor,o.optionThemeColor.textColor))}}function l_(n,a){if(n&1){let o=S();p(0,"a",25),m(1,"translate"),y("click",function(){_(o);let e=d(2).$implicit,i=d();return C(i.deleteOption(e))}),p(2,"i",26),g(3,"\uE7C7"),c()()}n&2&&l("title",u(1,1,"additional.delete"))}function s_(n,a){if(n&1&&(j(0),x(1,r_,2,5,"div",28),p(2,"qf-input-group",29),b(3,"input",39),c(),x(4,l_,4,3,"ng-template",null,4,te),U()),n&2){let o=W(5),t=d().$implicit,e=d();r(),l("ngIf",e.data.beingShowColor),r(),be("color-item",e.data.beingShowColor),l("qfSuffix",o),r(),l("disabled",!0)("ngModel",t.optValue)("ngModelOptions",Y(7,fr))}}function p_(n,a){if(n&1&&(p(0,"div",38),x(1,s_,6,8,"ng-container",22),c()),n&2){let o=a.$implicit;r(),l("ngIf",o.beingOtherOpt)}}function c_(n,a){if(n&1){let o=S();p(0,"div",6)(1,"div",41)(2,"p",42),g(3),m(4,"translate"),c()(),p(5,"button",43),y("click",function(){_(o);let e=d();return C(e.showLogicalEdit())}),g(6),m(7,"translate"),c()()}n&2&&(r(3),w(u(4,2,"widgets.logicalForm")),r(3),M(" ",u(7,4,"all.clickToSet")," "))}function d_(n,a){if(n&1){let o=S();p(0,"qf-bulk-edit",44),y("closeModal",function(){_(o);let e=d();return C(e.toggleOpenBulkEdit(!1))})("ensure",function(e){_(o);let i=d();return C(i.saveBulkEdit(e))}),c()}if(n&2){let o=d();l("openBulkEdit",o.openBulkEdit)("bulkEditOptions",o.data.options)("descUrl",o.selectType?"bulkEdit":"dropEdit")}}var vc=(()=>{let a=class a{get data(){return this._data}
8set data(t){this._data=t,this._data.options.forEach(e=>{e.optValue?e.optValue=this.translateService.instant(e.optValue).trim():e.optValue=e.optValue.trim()}),this.getOptionThemes(),this.dataChange.emit(this._data)}noReturnPredicate(){return!1}createColorOverlay(t){this.curOption=t}selectColor(t){this.curOption.optionThemeColor=t,this.change()}colorOptionChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"beingShowColor",question:this.data}),this.widgetChange.syncForm$.emit({type:"option",question:this.data})}getOptionThemes(){this.singleDataReq.getOptionThemes().subscribe(t=>{this.optionThemes=t.optionThemes,this.data.options.forEach(e=>{e!=null&&e.optionThemeColor||(e.optionThemeColor=this.optionThemes[20],this.change())})})}mouseenter(t){t.hover=!0}mouseleave(t){t.hover=!1}toggleOpenBulkEdit(t){this.openBulkEdit=t}constructor(t,e,i,s,f,v,q,D){this.formEditService=t,this.translateService=e,this.widgetChange=i,this.modalInvoke=s,this.appFormEditService=f,this.modalService=v,this.singleDataReq=q,this.messageService=D,this.openBulkEdit=!1,this.beingNil=ie,this.dataChange=new R,this.handleOption=new R,this.status={isopen:!1}}ngOnChanges(){this.alreadyOther=!1;let t=this.data.options;t&&t.forEach(e=>{e.beingOtherOpt&&(this.alreadyOther=!0)}),this.allQuestions=this.appFormEditService.appFormData.formQues,this.data.options.forEach(e=>{!e.optionThemeColor&&this.optionThemes&&(e.optionThemeColor=this.optionThemes[20],this.change())})}change(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"option",question:this.data})}addOption(t){let e=t||this.translateService.instant("all.unnamed"),i=new Jt({optId:0,optValue:e,beingOtherOpt:!1,beingRequired:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]}),s=this.data.options.length;this.alreadyOther?this.data.options.splice(s-1,0,i):this.data.options.push(i),this.data.options=[...this.data.options],this.widgetChange.choiceOptChange.emit(),this.change(),this.formEditService.getReapeatList()}addOther(){if(!this.alreadyOther){let t=new Jt({optId:0,optValue:this.translateService.instant("widgets.other"),beingOtherOpt:!0,beingRequired:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]});this.data.options.push(t),this.data.options=[...this.data.options],this.alreadyOther=!0,this.widgetChange.choiceOptChange.emit(),this.change(),this.handleOption.emit()}}deleteOption(t){this.data.options.every((e,i)=>e===t?(t.beingOtherOpt&&(this.alreadyOther=!1),this.data.options.splice(i,1),this.change(),!1):!0),this.handleOption.emit(),this.formEditService.getReapeatList()}saveBulkEdit(t){let e=t.map(v=>v.trim());if(gn(e).length!==e.length){this.messageService.error(this.translateService.instant("all.optionNoRepeat")),this.openBulkEdit=!0;return}this.formEditService.repeatOptList=[];let s=this.data.options.find(v=>v.beingOtherOpt),f=e.map((v,q)=>{let D=this.data.options[q];return D&&!D.beingOtherOpt?(D.optValue=v,D):new Jt({optId:0,optValue:v,beingOtherOpt:!1,checked:!1,linkQueIds:[],beingDefault:!1,optionThemeColor:this.optionThemes[20]})});this.data.options=f,s&&this.data.options.push(s),this.widgetChange.choiceOptChange.emit(),this.change()}showLogicalEdit(){let t=this.modalInvoke.getLogicalEditParam(this.data,this.allQuestions);t.content=zi,this.modalService.open(t)}drop(t){let{previousIndex:e,currentIndex:i}=t;e!==i&&(Et(this.data.options,t.previousIndex,t.currentIndex),this.widgetChange.syncForm$.next({type:"optionOrderChange",question:this.data}))}};a.\u0275fac=function(e){return new(e||a)(T($e),T(X),T(N),T(Ke),T(ee),T(Pe),T(hn),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-option-content"]],viewQuery:function(e,i){if(e&1&&qe($h,5),e&2){let s;Te(s=Se())&&(i.bulk=s.first)}},inputs:{data:"data",selectType:"selectType"},outputs:{dataChange:"dataChange",handleOption:"handleOption"},features:[Re],decls:29,vars:26,consts:[["hintMsgTemplate",""],["emptySuffix",""],["circleTem",""],["colorTemplate",""],["optSuffix",""],[1,"dropdown-choice"],[1,"widget-edit"],[1,"widget-edit-title","w-100"],[3,"hintMsg"],[1,"color-switch"],[3,"ngModelChange","ngModelOptions","ngModel"],["cdkDropList","",1,"options-container",3,"cdkDropListDropped","cdkDropListEnterPredicate"],["cdkDrag","","class","option-item-container","cdkDragLockAxis","y",4,"ngFor","ngForOf"],["class","option-item-other",4,"ngFor","ngForOf"],["qf-button","","qfType","dashed",1,"widget-edit-title-l",3,"click"],["qf-icon","","qfIconfont","\uE867",1,"iconfont"],[1,"widget-edit-three"],[3,"click"],[1,"widget-edit-title-sub",3,"click"],["class","widget-edit",4,"ngIf"],[3,"openBulkEdit","bulkEditOptions","descUrl","closeModal","ensure",4,"ngIf"],["cdkDrag","","cdkDragLockAxis","y",1,"option-item-container"],[4,"ngIf"],["class","check-repeat",4,"ngIf"],[1,"suffix-container"],[3,"click","title"],[1,"iconfont"],["cdkDragHandle","","title","\u62D6\u52A8\u6362\u884C",1,"drag-icon"],["class","prefix-container",4,"ngIf"],[1,"option-item",3,"qfSuffix"],["qf-input","","placeholder","\u7F16\u8F91\u9009\u9879\u540D","maxlength","500",3,"ngModelChange","blur","disabled","ngModelOptions","ngModel"],[1,"prefix-container"],["qf-popover","","qfPopoverTrigger","click","qfPopoverSize","small","qfPopoverPlacement","bottomLeft",1,"circle",3,"click","qfPopoverContent"],[1,"color-container"],[1,"color-title"],["class","circle color-option",3,"style","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[1,"circle","color-option",3,"click","mouseenter","mouseleave"],[1,"check-repeat"],[1,"option-item-other"],["qf-input","",3,"disabled","ngModel","ngModelOptions"],[1,"circle"],[1,"widget-edit-header"],[1,"widget-edit-title"],["qf-button","","qfType","dashed",1,"logic-set-btn",3,"click"],[3,"closeModal","ensure","openBulkEdit","bulkEditOptions","descUrl"]],template:function(e,i){if(e&1){let s=S();p(0,"form",5)(1,"div",6)(2,"div",7)(3,"span"),g(4),m(5,"translate"),c(),b(6,"qf-hint-msg",8),x(7,Jh,6,6,"ng-template",null,0,te),p(9,"div",9),g(10),m(11,"translate"),p(12,"qf-switch",10),O("ngModelChange",function(v){return _(s),E(i.data.beingShowColor,v)||(i.data.beingShowColor=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.colorOptionChange())}),c()()(),p(13,"div",11),y("cdkDropListDropped",function(v){return _(s),C(i.drop(v))}),x(14,a_,3,2,"div",12)(15,p_,2,1,"div",13),c(),p(16,"button",14),y("click",function(){return _(s),C(i.addOption())}),b(17,"i",15),g(18),m(19,"translate"),c(),p(20,"div",16)(21,"p",17),y("click",function(){return _(s),C(i.addOther())}),g(22),m(23,"translate"),c(),p(24,"p",18),y("click",function(){return _(s),C(i.toggleOpenBulkEdit(!i.openBulkEdit))}),g(25),m(26,"translate"),c()()(),x(27,c_,8,6,"div",19)(28,d_,1,3,"qf-bulk-edit",20),c()}if(e&2){let s=W(8);r(4),w(u(5,15,"widgets.choiceContent")),r(2),l("hintMsg",s),r(4),M(" ",u(11,17,"all.colorful")," "),r(2),l("ngModelOptions",Y(25,fr)),I("ngModel",i.data.beingShowColor),r(),l("cdkDropListEnterPredicate",i.noReturnPredicate),r(),l("ngForOf",i.data.options),r(),l("ngForOf",i.data.options),r(3),M(" ",u(19,19,"widgets.addChoice")," "),r(3),dt(i.alreadyOther?"widget-edit-title-m-disabled":"widget-edit-title-sub"),r(),M(" ",u(23,21,"widgets.addOther")," "),r(3),M(" ",u(26,23,"widgets.bulkEdit")," "),r(2),l("ngIf",i.beingNil(i.data.supId)),r(),l("ngIf",i.openBulkEdit)}},dependencies:[B,A,Ie,le,V,ge,Ue,Q,De,Dt,Pt,Ot,he,xi,xn,Mn,K,ce,Yo,G,Ji,k],styles:[".widget-edit-title[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
8.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.options-container.cdk-drop-list-dragging[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.flex-space-between[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.prefix-container[_ngcontent-%COMP%]{top:11px}.widget-edit[_ngcontent-%COMP%] .option-item.color-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-left:16px}"]});let n=a;return n})();var xc=(()=>{let a=class a{set data(t){this._data=t,this.dataChange.emit(t)}get data(){return this._data}directionChange(t){this.data.optDirection=t,this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.next({type:"direction",question:this.data})}constructor(t){this.widgetChange=t,this.dataChange=new R}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-option-rank-way"]],inputs:{data:"data"},outputs:{dataChange:"dataChange"},decls:14,vars:16,consts:[[1,"choice-edit"],[1,"widget-edit"],[1,"widget-edit-title"],[3,"hintMsg"],[3,"click"]],template:function(e,i){e&1&&(p(0,"form",0)(1,"div",1)(2,"p",2),g(3),m(4,"translate"),b(5,"qf-hint-msg",3),m(6,"translate"),c(),p(7,"ul")(8,"li",4),y("click",function(){return i.directionChange(0)}),g(9),m(10,"translate"),c(),p(11,"li",4),y("click",function(){return i.directionChange(1)}),g(12),m(13,"translate"),c()()()()),e&2&&(r(3),M(" ",u(4,8,"widgets.display")," "),r(2),l("hintMsg",u(6,10,"widgetHelp.displayDirection")),r(3),be("active",i.data.optDirection===0),r(),M(" ",u(10,12,"widgets.displayH")," "),r(2),be("active",i.data.optDirection===1),r(),M(" ",u(13,14,"widgets.displayV")," "))},dependencies:[Ie,ge,De,G,k],styles:[".widget-edit[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:-4px}.choice-edit[_ngcontent-%COMP%] .modal[_ngcontent-%COMP%]{background:#0003}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex;width:100%}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:50%;height:36px;font-size:13px;line-height:34px;text-align:center;cursor:pointer;border-top:1px solid #e6eaf0;border-bottom:1px solid #e6eaf0;border-left:1px solid #e6eaf0}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{border-radius:3px 0 0 3px}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-right:1px solid #e6eaf0;border-radius:0 3px 3px 0}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{color:#fff;background:#fb9337;background:var(--brand-primary-base, #fb9337);border:none}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{border-left:none}.widget-edit-checkbox[_ngcontent-%COMP%]{margin-bottom:10px;background:#fff;border:2px solid #c1c1cd;border-radius:3px}"]});let n=a;return n})();var bc=(()=>{let a=class a{set data(t){this._data=t}get data(){return this._data}changeMode(t){this.data.optSelectMode=t,this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"optSelectMode",question:this.data})}constructor(t){this.widgetChange=t}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-option-select-mode"]],inputs:{data:"data"},decls:14,vars:16,consts:[[1,"choice-edit"],[1,"widget-edit"],[1,"widget-edit-title"],[3,"hintMsg"],[3,"click"]],template:function(e,i){e&1&&(p(0,"form",0)(1,"div",1)(2,"p",2),g(3),m(4,"translate"),b(5,"qf-hint-msg",3),m(6,"translate"),c(),p(7,"ul")(8,"li",4),y("click",function(){return i.changeMode(1)}),g(9),m(10,"translate"),c(),p(11,"li",4),y("click",function(){return i.changeMode(2)}),g(12),m(13,"translate"),c()()()()),e&2&&(r(3),M(" ",u(4,8,"widgets.optSelectMode")," "),r(2),l("hintMsg",u(6,10,"widgetHelp.optSelectMode")),r(3),be("active",i.data.optSelectMode===1),r(),M(" ",u(10,12,"widgets.checkboxSelect")," "),r(2),be("active",i.data.optSelectMode===2),r(),M(" ",u(13,14,"widgets.dropSelect")," "))},dependencies:[Ie,ge,De,G,k],styles:[".widget-edit[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:-4px}.choice-edit[_ngcontent-%COMP%] .modal[_ngcontent-%COMP%]{background:#0003}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex;width:100%}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:50%;height:36px;font-size:13px;line-height:34px;text-align:center;cursor:pointer;border-top:1px solid #e6eaf0;border-bottom:1px solid #e6eaf0;border-left:1px solid #e6eaf0}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{border-radius:3px 0 0 3px}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-right:1px solid #e6eaf0;border-radius:0 3px 3px 0}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{color:#fff;background:#fb9337;background:var(--brand-primary-base, #fb9337);border:none}.choice-edit[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{border-left:none}.widget-edit-checkbox[_ngcontent-%COMP%]{margin-bottom:10px;background:#fff;border:2px solid #c1c1cd;border-radius:3px}"]});let n=a;return n})();
8var Xn=class extends Error{constructor(a,o){super(a),this.cause=o}},ze;function Tc(){return Mc(!1)||g_()||qc()||f_()}function Sc(){return gt(/\s*/),Mc(!0)||qc()||u_()||wc(!1)}function m_(){let n=wc(!0),a=[],o,t=Sc();for(;t;){if(t.node.type==="Element"){if(o)throw new Error("Found multiple root nodes");o=t.node}t.excluded||a.push(t.node),t=Sc()}if(!o)throw new Xn("Failed to parse XML","Root Element not found");if(ze.xml.length!==0)throw new Xn("Failed to parse XML","Not Well-Formed XML");return{declaration:n?n.node:null,root:o,children:a}}function wc(n){let a=gt(n?/^<\?(xml(-stylesheet)?)\s*/:/^<\?([\w-:.]+)\s*/);if(!a)return;let o={name:a[1],type:"ProcessingInstruction",attributes:{}};for(;!(Ec()||xa("?>"));){let t=Ic();if(t)o.attributes[t.name]=t.value;else return}return gt(/\?>/),{excluded:n?!1:ze.options.filter(o)===!1,node:o}}function Mc(n){let a=gt(/^<([^?!</>\s]+)\s*/);if(!a)return;let o={type:"Element",name:a[1],attributes:{},children:[]},t=n?!1:ze.options.filter(o)===!1;for(;!(Ec()||xa(">")||xa("?>")||xa("/>"));){let i=Ic();if(i)o.attributes[i.name]=i.value;else return}if(gt(/^\s*\/>/))return o.children=null,{excluded:t,node:o};gt(/\??>/);let e=Tc();for(;e;)e.excluded||o.children.push(e.node),e=Tc();if(ze.options.strictMode){let i=`</${o.name}>`;if(ze.xml.startsWith(i))ze.xml=ze.xml.slice(i.length);else throw new Xn("Failed to parse XML",`Closing tag not matching "${i}"`)}else gt(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:t,node:o}}function u_(){let n=gt(/^<!DOCTYPE\s+\S+\s+SYSTEM[^>]*>/)||gt(/^<!DOCTYPE\s+\S+\s+PUBLIC[^>]*>/)||gt(/^<!DOCTYPE\s+\S+\s*\[[^\]]*]>/)||gt(/^<!DOCTYPE\s+\S+\s*>/);if(n){let a={type:"DocumentType",content:n[0]};return{excluded:ze.options.filter(a)===!1,node:a}}}function f_(){if(ze.xml.startsWith("<![CDATA[")){let n=ze.xml.indexOf("]]>");if(n>-1){let a=n+3,o={type:"CDATA",content:ze.xml.substring(0,a)};return ze.xml=ze.xml.slice(a),{excluded:ze.options.filter(o)===!1,node:o}}}}function qc(){let n=gt(/^<!--[\s\S]*?-->/);if(n){let a={type:"Comment",content:n[0]};return{excluded:ze.options.filter(a)===!1,node:a}}}function g_(){let n=gt(/^([^<]+)/);if(n){let a={type:"Text",content:n[1]};return{excluded:ze.options.filter(a)===!1,node:a}}}function Ic(){let n=gt(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(n)return{name:n[1].trim(),value:h_(n[2].trim())}}function h_(n){return n.replace(/^['"]|['"]$/g,"")}function gt(n){let a=ze.xml.match(n);if(a)return ze.xml=ze.xml.slice(a[0].length),a}function Ec(){return ze.xml.length===0}function xa(n){return ze.xml.indexOf(n)===0}function Oc(n,a={}){n=n.trim();let o=a.filter||(()=>!0);return ze={xml:n,options:Object.assign(Object.assign({},a),{filter:o,strictMode:a.strictMode===!0})},m_()}typeof module<"u"&&typeof exports=="object"&&(module.exports=Oc);var Pc=Oc;function ba(n){if(!n.options.indentation&&!n.options.lineSeparator)return;n.content+=n.options.lineSeparator;let a;for(a=0;a<n.level;a++)n.content+=n.options.indentation}function __(n){n.content=n.content.replace(/ +$/,"");let a;for(a=0;a<n.level;a++)n.content+=n.options.indentation}function oi(n,a){n.content+=a}function Dc(n,a,o){if(typeof n.content=="string")C_(n.content,a,o);else if(n.type==="Element")v_(n,a,o);else if(n.type==="ProcessingInstruction")Vc(n,a);else throw new Error("Unknown node type: "+n.type)}function C_(n,a,o){if(!o){let t=n.trim();(a.options.lineSeparator||t.length===0)&&(n=t)}n.length>0&&(!o&&a.content.length>0&&ba(a),oi(a,n))}function y_(n,a){let o="/"+n.join("/"),t=n[n.length-1];return a.includes(t)||a.includes(o)}function v_(n,a,o){if(a.path.push(n.name),!o&&a.content.length>0&&ba(a),oi(a,"<"+n.name),kc(a,n.attributes),n.children===null||a.options.forceSelfClosingEmptyTag&&n.children.length===0){let t=a.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";oi(a,t)}else if(n.children.length===0)oi(a,"></"+n.name+">");else{let t=n.children;oi(a,">"),a.level++;let e=n.attributes["xml:space"]==="preserve",i=!1;if(!e&&a.options.ignoredPaths&&(i=y_(a.path,a.options.ignoredPaths),e=i),!e&&a.options.collapseContent){let s=!1,f=!1,v=!1;t.forEach(function(q,D){q.type==="Text"?(q.content.includes(` 9`)?(f=!0,q.content=q.content.trim()):(D===0||D===t.length-1)&&!o&&q.content.trim().length===0&&(q.content=""),q.content.trim().length>0&&(s=!0)):q.type==="CDATA"?s=!0:v=!0}),s&&(!v||!f)&&(e=!0)}t.forEach(function(s){Dc(s,a,o||e)}),a.level--,!o&&!e&&ba(a),i&&__(a),oi(a,"</"+n.name+">")}a.path.pop()}
9function kc(n,a){Object.keys(a).forEach(function(o){let t=a[o].replace(/"/g,""");oi(n," "+o+'="'+t+'"')})}function Vc(n,a){a.content.length>0&&ba(a),oi(a,"<?"+n.name),kc(a,n.attributes),oi(a,"?>")}function Ta(n,a={}){a.indentation="indentation"in a?a.indentation:" ",a.collapseContent=a.collapseContent===!0,a.lineSeparator="lineSeparator"in a?a.lineSeparator:`\r 10`,a.whiteSpaceAtEndOfSelfclosingTag=a.whiteSpaceAtEndOfSelfclosingTag===!0,a.throwOnFailure=a.throwOnFailure!==!1;try{let o=Pc(n,{filter:a.filter,strictMode:a.strictMode}),t={content:"",level:0,options:a,path:[]};return o.declaration&&Vc(o.declaration,t),o.children.forEach(function(e){Dc(e,t,!1)}),a.lineSeparator?t.content.replace(/\r\n/g,` 11`).replace(/\n/g,a.lineSeparator):t.content}catch(o){if(a.throwOnFailure)throw o;return n}}Ta.minify=(n,a={})=>Ta(n,Object.assign(Object.assign({},a),{indentation:"",lineSeparator:""}));typeof module<"u"&&typeof exports=="object"&&(module.exports=Ta);var Qc=Ta;var x_=(n,a)=>[n,a];function b_(n,a){if(n&1){let o=S();p(0,"div",15)(1,"button",16),g(2),c(),p(3,"qf-widget",17),y("dataChange",function(e){let i=_(o).$implicit,s=d();return C(s.dataChange(e,i))})("tableChange",function(e){let i=_(o).$implicit,s=d();return C(s.tableChange(e,i))})("addressChange",function(e){let i=_(o).$implicit,s=d();return C(s.addressChange(e,i))})("filesChange",function(e){let i=_(o).$implicit,s=d();return C(s.filesChange(e,i))})("referChange",function(e){let i=_(o).$implicit,s=d();return C(s.referChange(e,i))}),c()()}if(n&2){let o=a.$implicit,t=d();be("field-block",Ce(13,x_,t.QueType.RICHTEXT,t.QueType.DESCRIPTION).includes(o.queType)),r(),be("rich-text-button",o.queType===t.QueType.RICHTEXT||t.QueType.DESCRIPTION),l("title",o.queTitle),r(),M(" ",o.queTitle," "),r(),l("id",o.queId)("type",o.queType)("data",o.input)("dateType",o.dateType)("options",o.options)("addressPrecision",o.addressPrecision)("referenceConfig",o.referenceConfig)}}function T_(n,a){n&1&&(p(0,"div",19),g(1),m(2,"translate"),c()),n&2&&(r(),w(u(2,1,"all.noFieldsUsed")))}function S_(n,a){if(n&1&&(p(0,"qf-empty-legacy",18),x(1,T_,3,3,"ng-template",null,0,te),c()),n&2){let o=W(2);l("notFoundTitle",o)}}function w_(n,a){n&1&&(p(0,"span",20),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.success")," "))}function M_(n,a){n&1&&(p(0,"span",21),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.testFail")," "))}var Zi=function(n){return n[n.NoRun=0]="NoRun",n[n.Success=1]="Success",n[n.Failure=2]="Failure",n[n.Running=3]="Running",n}(Zi||{}),gr=(()=>{let a=class a{get formattedCode(){var t;if(!this.testApiSuccessResult)return"";try{switch(this.resultType){case mt.JSON:{let e=JSON.parse(this.testApiSuccessResult);return(t=JSON.stringify(e,null,4))==null?void 0:t.replace(/\n\}$/,` 12}`)}case mt.XML:return Qc(this.testApiSuccessResult);default:return this.testApiSuccessResult}}catch{return""}}dataChange(t,e){e.input=t}referChange(t,e){e.queDefaultValue=t}tableChange(t,e){e.testTableValue=t.qlinkerTableTranslateValues,e.queDefaultValues?Object.assign(e.queDefaultValues,{tableValues:t.tableDftValues}):Object.assign(e,{queDefaultValues:{tableValues:t.tableDftValues}})}addressChange(t,e){ie(e.queDefaultValues)?e.queDefaultValues={values:t}:e.queDefaultValues.values=t,e.input=t}filesChange(t,e){e.queDefaultValues.values=t}getTestQLinkerParams(){return{keyQueValueList:this.codeblockOrQlinkerTestService.assembleData(this.fields),remoteLookupConfig:this.remoteLookupConfig,appKey:this.appKey}}run(){let t=this.getTestQLinkerParams();this.testApiSuccessResult=null,this.testApiFailureResult="",this.testApiStatus=Zi.Running,this.formRequest.testQLinker(t).subscribe({next:e=>{e.statusCode===0?(this.testApiSuccessResult=e.data,this.testApiStatus=Zi.Success):(this.testApiFailureResult=e.message,this.testApiStatus=Zi.Failure,this.codeblockOrQlinkerTestService.dealResError(e.statusCode))},error:e=>{this.testApiFailureResult=e.message,this.testApiStatus=Zi.Failure}})}
12constructor(t,e,i){this.codeblockEditService=t,this.codeblockOrQlinkerTestService=e,this.formRequest=i,this.QueType=h,this.RunStatus=Zi,this.isEmptyArray=di,this.testApiSuccessResult=null,this.testApiStatus=Zi.NoRun,this.resultTypeMap=new Map([[mt.JSON,"json"],[mt.TEXT,"plain"],[mt.XML,"xml"]])}ngOnInit(){return Tt(this,null,function*(){yield this.codeblockEditService.fillFieldsOptions(this.fields),this.fields=this.codeblockOrQlinkerTestService.dealDefaultValue(this.fields)})}};a.\u0275fac=function(e){return new(e||a)(T(kt),T(Zt),T(wo))},a.\u0275cmp=P({type:a,selectors:[["qf-qlinker-test-api"]],inputs:{resultType:"resultType",fields:"fields",appKey:"appKey",queId:"queId",remoteLookupConfig:"remoteLookupConfig"},decls:28,vars:25,consts:[["emptyContent",""],[1,"test-api-container"],[1,"test-api-param"],[1,"label"],["cdkScrollable","",1,"fields"],["class","field",3,"field-block",4,"ngFor","ngForOf"],["class","empty","notFoundImage","/assets/assetsFiles/file.qingflow.com/assets/illustration/ill-no-date.svg","imageSize","small",3,"notFoundTitle",4,"ngIf"],[1,"result"],["qf-button","","qfType","primary",3,"click","qfLoading"],[3,"ngSwitch"],["class","success",4,"ngSwitchCase"],["class","failure",4,"ngSwitchCase"],[1,"test-api-result"],[1,"sub-label"],["qfHeight","480px",3,"ngModel","mode","readOnly","isCopyVisible"],[1,"field"],["qf-button","","disabled","","qfSize","medium",3,"title"],[3,"dataChange","tableChange","addressChange","filesChange","referChange","id","type","data","dateType","options","addressPrecision","referenceConfig"],["notFoundImage","/assets/assetsFiles/file.qingflow.com/assets/illustration/ill-no-date.svg","imageSize","small",1,"empty",3,"notFoundTitle"],[1,"empty-title"],[1,"success"],[1,"failure"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"div",2)(2,"header")(3,"span",3),g(4),m(5,"translate"),c()(),p(6,"form",4),x(7,b_,4,16,"div",5),p(8,"p"),g(9),m(10,"translate"),c(),x(11,S_,3,1,"qf-empty-legacy",6),c(),p(12,"footer",7)(13,"button",8),y("click",function(){return i.run()}),g(14),m(15,"translate"),c(),j(16,9),x(17,w_,3,3,"span",10)(18,M_,3,3,"span",11),U(),c()(),p(19,"div",12)(20,"header")(21,"span",3),g(22),m(23,"translate"),c(),p(24,"span",13),g(25),m(26,"translate"),c()(),b(27,"qf-codemirror",14),c()()),e&2&&(r(4),w(u(5,15,"all.field")),r(3),l("ngForOf",i.fields),r(2),w(u(10,17,"all.qLinkerTestTip")),r(2),l("ngIf",i.fields.length===0),r(2),l("qfLoading",i.testApiStatus===i.RunStatus.Running),r(),M(" ",u(15,19,"all.test")," "),r(2),l("ngSwitch",i.testApiStatus),r(),l("ngSwitchCase",i.RunStatus.Success),r(),l("ngSwitchCase",i.RunStatus.Failure),r(4),w(u(23,21,"all.responseBody")),r(3),M("(",u(26,23,"all.responseBodyTip"),")"),r(2),l("ngModel",i.testApiStatus!==i.RunStatus.Failure?i.formattedCode:i.testApiFailureResult)("mode",i.testApiStatus!==i.RunStatus.Failure?i.resultTypeMap.get(i.resultType):"javascript")("readOnly",!0)("isCopyVisible",!0))},dependencies:[B,A,ri,li,Ie,V,ge,Q,De,uo,K,Hl,ga,st,k],styles:[".test-api-container[_ngcontent-%COMP%]{display:flex;gap:30px}.test-api-container[_ngcontent-%COMP%] .test-api-result[_ngcontent-%COMP%], .test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%]{flex:1;margin-bottom:8px}.test-api-container[_ngcontent-%COMP%] .test-api-result[_ngcontent-%COMP%] header[_ngcontent-%COMP%], .test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{margin-top:16px}.test-api-container[_ngcontent-%COMP%] .test-api-result[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:22px;color:#121315}.test-api-container[_ngcontent-%COMP%] .test-api-result[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .sub-label[_ngcontent-%COMP%], .test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] header[_ngcontent-%COMP%] .sub-label[_ngcontent-%COMP%]{padding-left:8px;font-size:14px;font-weight:400;line-height:22px;color:#494f57}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:522px}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%]{position:relative;flex:1;padding:2px 2px 2px 0;margin-right:37px;overflow-y:auto}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;margin-bottom:8px}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field.field-block[_ngcontent-%COMP%]{display:block}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] qf-widget[_ngcontent-%COMP%]{width:274px}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:132px;margin-right:8px;
12cursor:auto!important}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span{width:100%;overflow:hidden;text-overflow:ellipsis}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .rich-text-button[_ngcontent-%COMP%]{margin-bottom:8px}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:8px;font-size:13px;font-weight:400;line-height:20px;color:#767e89}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%]{position:absolute;top:50%;width:100%;transform:translateY(-50%)}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .empty[_ngcontent-%COMP%] .empty-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:24px;color:#121315;text-align:center}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{margin-top:16px}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:8px;font-size:13px;text-align:center}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:#00bd77}.test-api-container[_ngcontent-%COMP%] .test-api-param[_ngcontent-%COMP%] footer[_ngcontent-%COMP%] .failure[_ngcontent-%COMP%]{color:#fb4b51}.test-api-container[_ngcontent-%COMP%] .test-api-result[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transform:translate(408px,-479px)}"]});let n=a;return n})();var q_=(n,a,o)=>[n,a,o];function I_(n,a){if(n&1&&(b(0,"qf-option",12),m(1,"translate")),n&2){let o=d().$implicit;l("qfValue",o.value)("qfLabel",u(1,2,o.label))}}function E_(n,a){if(n&1&&(j(0),x(1,I_,2,4,"qf-option",11),U()),n&2){let o=a.$implicit;r(),l("ngIf",!o.hide)}}function O_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.title)("qfValue",o.id)}}function P_(n,a){if(n&1&&(p(0,"qf-select",13),m(1,"translate"),x(2,O_,1,2,"qf-option",14),c()),n&2){let o=d();l("qfPlaceHolder",u(1,2,"widgets.selectTemplate")),r(2),l("ngForOf",o.qlinkerConfigList)}}function D_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.name)("qfValue",o)}}function k_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.name)("qfValue",o.availableEvents)}}function V_(n,a){if(n&1){let o=S();j(0,16),p(1,"qf-select",17),m(2,"translate"),x(3,D_,1,2,"qf-option",14),c(),p(4,"qf-select",18),m(5,"translate"),y("qfOpenChange",function(e){_(o);let i=d();return C(i.connectorEventsOpen(e))}),x(6,k_,1,2,"qf-option",14),c(),U()}if(n&2){let o=d();r(),l("compareWith",o.installedConCompareFn)("qfPlaceHolder",u(2,6,"open.selectApplication")),r(2),l("ngForOf",o.installedConnectors),r(),l("compareWith",o.conectorEventsCompareFn)("qfPlaceHolder",u(5,8,"open.selectEvent")),r(2),l("ngForOf",o.connectorEvents)}}function Q_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.agentName)("qfValue",o)}}function A_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.skillName)("qfValue",o.selectedSkill)}}function F_(n,a){if(n&1){let o=S();j(0,19),p(1,"qf-select",20),m(2,"translate"),x(3,Q_,1,2,"qf-option",14),c(),p(4,"qf-select",21),m(5,"translate"),y("qfOpenChange",function(e){_(o);let i=d();return C(i.qingWingsAgentsOpen(e))}),x(6,A_,1,2,"qf-option",14),c(),U()}if(n&2){let o=d();r(),l("compareWith",o.qingWingsAgentCompareFn)("qfPlaceHolder",u(2,6,"open.selectAgent")),r(2),l("ngForOf",o.qingWingsAgentList),r(),l("compareWith",o.qingWingsSkillCompareFn)("qfPlaceHolder",u(5,8,"open.selectSkill")),r(2),l("ngForOf",o.qingWingsAgentSkills)}}function R_(n,a){if(n&1){let o=S();p(0,"div",2)(1,"div",3),g(2),m(3,"translate"),c(),p(4,"button",22),y("click",function(){_(o);let e=d();return C(e.bindVariables())}),g(5),m(6,"translate"),c()()}n&2&&(r(2),M(" ",u(3,2,"widgets.bindVariable")," "),r(3),M(" ",u(6,4,"widgets.clickToBind")," "))}function N_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.title)("qfValue",o.globalAuthId)}}function B_(n,a){if(n&1&&(p(0,"qf-select",35),m(1,"translate"),x(2,N_,1,2,"qf-option",14),c()),n&2){let o=d(2);l("qfDisabled",!o.showAuth)("qfPlaceHolder",u(1,3,"plugin.inputVariableDefault")),r(2),l("ngForOf",o.globalAuthList)}}function L_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o)("qfValue",o)}}function z_(n,a){if(n&1&&b(0,"qf-option",15),n&2){let o=a.$implicit;l("qfLabel",o.label)("qfValue",o.value)}}function W_(n,a){if(n&1&&(p(0,"div",40),g(1),c()),n&2){let o=a.$implicit;r(),M(" ",o.aliasName," ")}}function H_(n,a){if(n&1&&(p(0,"div",36)(1,"div",37),g(2),m(3,"translate"),c(),p(4,"div",38),x(5,W_,2,1,"div",39),c()()),n&2){let o=d(2);r(2),wt("",o.resultFormatPath.length,"",u(3,3,"additional.aliasCanRetrieved"),""),r(3),l("ngForOf",o.resultFormatPath)}}function j_(n,a){if(n&1){let o=S();j(0),p(1,"div",2)(2,"div",23),g(3),m(4,"translate"),p(5,"a",24),g(6),m(7,"translate"),c()(),p(8,"qf-function-lock",25),x(9,B_,3,5,"qf-select",26),c()(),p(10,"div",2)(11,"div",23),g(12," URL "),p(13,"qf-insert-que-select-v2",27),y("clickQuestion",function(e){_(o);let i=W(15);return C(i.insert(e))}),c()(),b(14,"qf-codemirror",28,0),c(),p(16,"div",2)(17,"div",3),g(18,"QueryParam"),c(),p(19,"button",29),y("click",function(){_(o);let e=d();return C(e.openQueryParamEditor())}),g(20),m(21,"translate"),c()(),p(22,"div",2)(23,"div",3),g(24,"Method"),c(),p(25,"qf-select",30),x(26,L_,1,2,"qf-option",14),c()(),p(27,"div",2)(28,"div",3),g(29,"Header/Body"),c(),p(30,"button",29),y("click",function(){_(o);let e=d();return C(e.openHeaderAndBodyEditor())}),g(31),m(32,"translate"),c()(),p(33,"div",2)(34,"div",3),g(35),m(36,"translate"),c(),p(37,"button",29),y("click",function(){_(o);let e=d();return C(e.testApi())}),g(38),m(39,"translate"),c()(),p(40,"div",2)(41,"div",3),g(42," Result Format "),p(43,"a",31),g(44),m(45,"translate"),c()(),p(46,"qf-select",32),x(47,z_,1,2,"qf-option",14),c(),p(48,"button",33),y("click",function(){_(o);let e=d();return C(e.openPathEditor())}),g(49),m(50,"translate"),c(),x(51,H_,6,5,"div",34),c(),U()}if(n&2){let o=d();r(3),M(" ",u(4,15,"all.authenticationMethod")," "),r(3),M(" ",u(7,17,"all.Details")," "),r(3),l("ngIf",o.showAuth),r(4),l("questions",o.canInsertQues),r(),l("bordered",!0),r(6),M(" ",u(21,19,"all.clickToSet")," "),r(6),l("ngForOf",o.methodOpts),r(5),M(" ",u(32,21,"all.clickToSet")," "),r(4),w(u(36,23,"all.test")),r(3),M(" ",u(39,25,"all.testAPIrequests")," "),r(6),w(u(45,27,"all.examples")),r(3),l("ngForOf",o.formatOpts),r(2),wt(" ",u(50,29,"all.set")," ",o.pathTitle," "),r(2),l("ngIf",(o.resultFormatPath==null?null:o.resultFormatPath.length)>0)}}var Fc=(()=>{let a=class a{set data(t){this._data=t,this.initData()}get data(){return this._data}get resultFormatPath(){return this.settingGroup.get("resultFormatPath")?this.settingGroup.get("resultFormatPath").value:[]}initInsertableQues(){this.canInsertQues=this.appFormEditService.genInsertableQuestions(this.data.queId).filter(e=>e.queType!==h.TABLE);let t=this.canInsertQues.findIndex(e=>e.queId===ue.APPLY_ID);this.canInsertQues.splice(t,0,{queId:ue.WS_ID,queTitle:this.translate.instant("all.exId"),queType:h.INPUT},{queId:ue.APP_ID,queTitle:this.translate.instant("all.appID"),queType:h.INPUT})}getCanInsertQuesMap(t){let e=new Map;for(let i of t)e.set(i.queId,i);return e}bindVariables(){let t,e,i=this.settingGroup.get("configMode").value;if(i===Ne.template){if(t=this.qlinkerConfigList.find(q=>q.id===this.settingGroup.get("globalQLinkerConfigId").value),Oe(t)){this.messageService.error(this.translate.instant("widgets.selectTemplateFirst"));return}e=t.variables}else if(i===Ne.connector){let q=this.installedConnectors.find(F=>F.id===this.settingGroup.get("openAppConfig").get("installedCons").value.id),D=this.connectorEvents.find(F=>F.eventId===this.settingGroup.get("openAppConfig").get("event").value.eventId);if(Oe(q)||Oe(D)){this.messageService.error(this.translate.instant("widgets.selectConnectorAndEvent"));return}e=D.variables}else if(i===Ne.wings){let q=this.qingWingsAgentList.find(F=>F.agentId===this.settingGroup.get("qingWingsConfig").get("selectedAgent").value.agentId),D=this.qingWingsAgentSkills.find(F=>F.skillId===this.settingGroup.get("qingWingsConfig").get("skill").value.skillId);if(Oe(q)||Oe(D)){this.messageService.error(this.translate.instant("widgets.selectAgentAndSkill"));return}e=D.variables}let s=this.settingGroup.get("variablesConfig").value;if((s==null?void 0:s.length)>0){let q=F=>{var H;return(H=e.filter(_e=>_e.variableKey===F.wingsVarKey)[0])==null?void 0:H.id},D=F=>F.map(H=>Ee(me({},H),{value:H.type===2?H.value?parseInt(H.value.toString(),10):H.value===0?H.value:null:H.value,subVariable:D(H.subVariable||[]),variablesId:Oe(H.variablesId)?q(H):H.variablesId})).filter(H=>!Oe(H.variablesId));s=D(s)}let f=this.appFormEditService.genInsertableQuestions(this.data.queId),v=this.settingGroup.get("configMode").value===Ne.template;this.modalHelper.create(fp,{variablesConfigs:s,selectableParams:f,variables:e,useInPluginCenter:v},{size:716,modalOptions:{title:this.translate.instant("widgets.bindVariable"),footer:null,maskClosable:!1,onOk:q=>{i!==Ne.wings?this.settingGroup.setControl("variablesConfig",this.fb.array(q.variablesConfigs.map(D=>this.fb.group(Ee(me({},D),{subVariable:this.fb.array(D.subVariable||[])}))))):this.settingGroup.setControl("variablesConfig",this.fb.array(q.variablesConfigs.map(D=>{let F=e.filter(H=>H.id===D.variablesId)[0];return this.fb.group(Ee(me({},D),{wingsVarKey:F.variableKey,wingsVarName:F.variableName}))}))),this.widgetChange.changed.emit()}}}).subscribe()}openQueryParamEditor(){let t=this.settingGroup.get("queryParams").value;t=this.formatIntoGroup(t),this.modalHelper.create(ep,{params:t,title:"QueryParam",requestGroupConfig:{selectableParams:this.canInsertQues,paramType:[{title:"widgets.custom",value:1},{title:"all.matchField",value:2}],inputStyle:{keyWidth:"184px",selectWidth:"184px"}}},{size:600,modalOptions:{title:"QueryParam",bodyStyle:{"padding-top":"20px","padding-bottom":"20px"},onOk:e=>{if(e.params.find(s=>s.key===""||Oe(s.key)))return this.messageService.error("QueryParam \u7684 Name \u4E0D\u80FD\u4E3A\u7A7A"),
12!1;let i=this.formatParamSet(e,"params").map(s=>this.fb.group(s));this.settingGroup.setControl("queryParams",this.fb.array(i)),this.widgetChange.changed.emit()}}}).subscribe()}openHeaderAndBodyEditor(){let t=this.fb.group({jsonValue:this.settingGroup.get("jsonValue").value,beingInsertValueDirectly:this.settingGroup.get("beingInsertValueDirectly").value,method:this.settingGroup.get("method").value,bodyType:this.settingGroup.get("bodyType").value,xmlValue:this.settingGroup.get("xmlValue").value,headers:this.fb.array(this.parseFormGroupHeader(this.settingGroup.get("headers").value).map(e=>this.fb.group(e))),urlEncodedValue:this.fb.array(this.formatIntoGroup(this.settingGroup.get("urlEncodedValue").value).map(e=>this.fb.group(e)))});this.modalHelper.create(Zs,{dataGroup:t,requestGroupConfig:{selectableParams:this.canInsertQues,selectableParamsMap:this.getCanInsertQuesMap(this.canInsertQues),showDropdownSubtitle:!0,headersSelectable:!0,paramType:[{title:"widgets.custom",value:1},{title:"all.matchField",value:2}],inputStyle:{keyWidth:"184px",selectWidth:"184px"},methods:[jt.POST,jt.PUT,jt.DELETE,jt.GET],bodyTypes:[{label:mo.URLENCODED,value:Ui.URLENCODED},{label:mo.JSON,value:Ui.JSON},{label:mo.XML,value:Ui.XML}]}},{size:600,modalOptions:{title:"Header/Body",onOk:e=>{let i=["headers","urlEncodedValue"];for(let s of i)if(e.dataGroup.get(s).value.find(v=>v.key===""||Oe(v.key))){let v=s==="headers"?"Header":"Body";return this.messageService.error(this.translate.instant("all.nameNotNull",{title:v})),!1}this.settingGroup.patchValue({bodyType:e.dataGroup.value.bodyType,jsonValue:e.dataGroup.value.jsonValue,beingInsertValueDirectly:e.dataGroup.value.beingInsertValueDirectly,xmlValue:e.dataGroup.value.xmlValue}),i.forEach(s=>{let f=this.formatParamSet(e.dataGroup.value,s).map(v=>this.fb.group(v));this.settingGroup.setControl(s,this.fb.array(f))}),this.widgetChange.changed.emit()}}}).subscribe()}openPathEditor(){this.modalHelper.create(up,{aliasConfigs:this.settingGroup.get("resultFormatPath"),pathTitle:this.pathTitle,insertableQues:this.canInsertQues},{size:600,modalOptions:{title:this.pathTitle,onOk:t=>{let e=t.checkValid();if(e.flag)this.settingGroup.setControl("resultFormatPath",t.pathSettingGroup.get("aliasConfig")),this.widgetChange.changed.emit();else return this.messageService.error(this.translate.instant(e.essage)),!1}}}).subscribe()}testApi(){if(!this.settingGroup.get("url").value){let q=this.translate.instant("all.urlRequired");this.messageService.warning(q);return}let e=this.settingGroup.get("resultType").value,i=this.data.queId,s=this.settingGroup.value,f=this.codeblockOrQlinkerTestService.getQlinkerBindFields(i,this.settingGroup),v=this.translate.instant("all.testAPIrequests");this.modal.open({title:v,footer:null,size:"large",content:gr,componentParams:{appKey:this.appKey,queId:this.data.queId,resultType:e,fields:f,remoteLookupConfig:s}})}cleanFormArray(t){for(;t.length!==0;)t.removeAt(0)}getPathTitle(t){switch(parseInt(t,10)){case mt.JSON:return"JSON Path";case mt.XML:return"XPath";case mt.TEXT:return this.translate.instant("all.regularExpression")}}getGlobalQlinkerTemplate(){this.wsReq.getGlobalQLinkerConfig().subscribe(t=>{this.qlinkerConfigList=t.globalQLinkerConfigList})}parseFormGroupHeader(t){return t&&t.length!==0?t.map(e=>({key:e.key,type:e.type,id:e.type===Nn.MATCH_QUE?Number(e.value):null,value:null,innerValue:e.type===Nn.MATCH_QUE?null:e.value})):[]}formatIntoGroup(t){return t&&t.length!==0?t.map(e=>({key:e.key,type:e.type,id:e.type===2?parseInt(e.value,10):null,value:e.type===2?null:e.value})):[]}formatParamSet(t,e){var i,s;return((i=t[e])==null?void 0:i.length)!==0?(s=t[e])==null?void 0:s.map(f=>({key:f.key,type:f.type,value:f.type===1?f.innerValue||f.value:f.id===0?0:f.id||f.queId})):[]}initSubAlias(t){let e=[];return t.length>0&&t.forEach(i=>{e.push(this.fb.group(me({},i)))}),e}initResultFormatPath(t){let e=[];return t.length>0&&t.forEach(i=>{e.push(this.fb.group(Ee(me({},i),{subAlias:this.fb.array(i.subAlias?this.initSubAlias(i.subAlias):[])})))}),e}initGlobalAuth(){this.showAuth=this.statusChange.can("auth"),this.showAuth&&this.wsReq.getGlobalAuthBaseInfo().subscribe(t=>{this.globalAuthList=t})}getInstalledConnectors(){this.wsReq.getInstalledConnectors().subscribe(t=>{this.installedConnectors=t.installedApps})}getWingsAgents(){this.wsReq.getWingsAgents().subscribe({next:t=>{this.qingWingsAgentList=t},error:()=>{this.qfMessageService.error(this.translate.instant("all.queryFailed"))}})}connectorEventsOpen(t){t&&this.settingGroup.get("openAppConfig").get("installedCons").value.id&&this.wsReq.getConnectorEvents(this.settingGroup.get("openAppConfig").get("installedCons").value.id,tl.qlinker).subscribe(e=>{this.connectorEvents=e.eventConfig.map(i=>i=Ee(me({},i),{availableEvents:{eventId:i.eventId,name:i.name}}))})}qingWingsAgentsOpen(t){t&&this.settingGroup.get("qingWingsConfig").get("selectedAgent").value.agentId&&this.wsReq.getWingsAgentSkills(this.settingGroup.get("qingWingsConfig").get("selectedAgent").value.agentId).subscribe({next:e=>{let i=1;this.qingWingsAgentSkills=e.map(s=>Ee(me({},s),{variables:s.variables.map(f=>Ee(me({},f),{id:i++,key:f.variableName})),selectedSkill:{skillId:s.skillId,skillName:s.skillName}}))},error:()=>{this.qfMessageService.error(this.translate.instant("all.queryFailed"))}})}initOpenAppConfig(){return{id:null,name:null,event:{eventId:null,name:null}}}initWingsAgentConfig(){return{agentId:null,agentName:null,skill:{skillId:null,skillName:null}}}initData(){this.initInsertableQues(),this.initGlobalAuth(),this._data.remoteLookupConfig=this._data.remoteLookupConfig||{configMode:1,globalQLinkerConfigId:null,variablesConfig:[],url:null,method:jt.GET,headers:[],queryParams:[],bodyType:Ui.URLENCODED,urlEncodedValue:[],jsonValue:null,xmlValue:null,resultType:mt.JSON,resultFormatPath:[],beingInsertValueDirectly:!0,openAppConfig:this.initOpenAppConfig(),qingWingsConfig:this.initWingsAgentConfig()},this._data.remoteLookupConfig.openAppConfig=this._data.remoteLookupConfig.openAppConfig||this.initOpenAppConfig(),this._data.remoteLookupConfig.qingWingsConfig=this._data.remoteLookupConfig.qingWingsConfig||this.initWingsAgentConfig(),this.unsubscribe$.next(),this.settingGroup=this.fb.group(Ee(me({},this.data.remoteLookupConfig),{variablesConfig:this.fb.array(this.data.remoteLookupConfig.variablesConfig.map(t=>this.fb.group(Ee(me({},t),{subVariable:t.variableType===el.OBJECT_ARRAY?this.fb.array(t.subVariable.map(e=>this.fb.group(e))):null})))),queryParams:this.fb.array(this.data.remoteLookupConfig.queryParams.map(t=>this.fb.group(t))),headers:this.fb.array(this.data.remoteLookupConfig.headers.map(t=>this.fb.group(t))),urlEncodedValue:this.fb.array(this.data.remoteLookupConfig.urlEncodedValue.map(t=>this.fb.group(t))),resultFormatPath:this.fb.array(this.initResultFormatPath(this.data.remoteLookupConfig.resultFormatPath)),openAppConfig:this.fb.group({installedCons:{id:this.data.remoteLookupConfig.openAppConfig.id,name:this.data.remoteLookupConfig.openAppConfig.name},event:me({},this.data.remoteLookupConfig.openAppConfig.event)}),qingWingsConfig:this.fb.group({selectedAgent:{agentId:this.data.remoteLookupConfig.qingWingsConfig.agentId,agentName:this.data.remoteLookupConfig.qingWingsConfig.agentName},skill:me({},this.data.remoteLookupConfig.qingWingsConfig.skill)})})),this.pathTitle=this.getPathTitle(this.settingGroup.get("resultType").value),this.showAuth&&this.settingGroup.addControl("globalAuthId",new Sl(this.data.remoteLookupConfig.globalAuthId)),this.settingGroup.get("resultType").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{this.pathTitle=this.getPathTitle(t),this.cleanFormArray(this.settingGroup.get("resultFormatPath"))}),this.settingGroup.get("method").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{this.noBodyMethods.includes(t)&&(this.settingGroup.patchValue({bodyType:Ui.URLENCODED,jsonValue:null},{emitEvent:!1}),this.cleanFormArray(this.settingGroup.get("urlEncodedValue")))}),this.settingGroup.get("configMode").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{t===Ne.template?this.getGlobalQlinkerTemplate():t===Ne.connector?this.getInstalledConnectors():t===Ne.wings&&this.getWingsAgents(),this.settingGroup.patchValue({globalQLinkerConfigId:null,variablesConfig:[],url:null,method:jt.GET,headers:[],queryParams:[],bodyType:Ui.URLENCODED,urlEncodedValue:[],jsonValue:null,resultType:mt.JSON,resultFormatPath:[],configMode:t,openAppConfig:{installedCons:{id:null,name:null},event:{eventId:null,name:null}},qingWingsConfig:{selectedAgent:{agentId:null,agentName:null},skill:{skillId:null,skillName:null}}},{emitEvent:!1}),this.settingGroup.setControl("variablesConfig",this.fb.array([])),this.settingGroup.setControl("resultFormatPath",this.fb.array([])),this.pathTitle=this.getPathTitle(this.settingGroup.get("resultType").value)}),this.settingGroup.get("globalQLinkerConfigId").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>
12{if(t){let i=this.qlinkerConfigList.filter(s=>s.id===t)[0].resultFormatPath.map(s=>this.fb.group(s));this.settingGroup.setControl("resultFormatPath",this.fb.array(i)),this.settingGroup.setControl("headers",this.fb.array([])),this.settingGroup.setControl("queryParams",this.fb.array([])),this.settingGroup.setControl("urlEncodedValue",this.fb.array([]))}}),this.settingGroup.get("openAppConfig").get("installedCons").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.settingGroup.get("openAppConfig").patchValue({event:{eventId:null,name:null}}),this.settingGroup.setControl("resultFormatPath",this.fb.array([])),this.settingGroup.setControl("variablesConfig",this.fb.array([]))}),this.settingGroup.get("openAppConfig").get("event").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{var s;let e=this.connectorEvents.find(f=>f.eventId===t.eventId),i=(s=e==null?void 0:e.resultAliasPath)==null?void 0:s.map(f=>this.fb.group(f));this.settingGroup.setControl("resultFormatPath",this.fb.array(i||[])),this.settingGroup.setControl("variablesConfig",this.fb.array([]))}),this.settingGroup.get("qingWingsConfig").get("selectedAgent").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.settingGroup.get("qingWingsConfig").patchValue({skill:{skillId:null,skillName:null}}),this.settingGroup.setControl("resultFormatPath",this.fb.array([])),this.settingGroup.setControl("variablesConfig",this.fb.array([]))}),this.settingGroup.get("qingWingsConfig").get("skill").valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{let e=this.qingWingsAgentSkills.find(s=>s.skillId===t.skillId),i=this.initResultFormatPath(e==null?void 0:e.resultFormatPath);this.settingGroup.setControl("resultFormatPath",this.fb.array(i||[])),this.settingGroup.setControl("variablesConfig",this.fb.array([]))}),this.settingGroup.valueChanges.pipe(ae(this.unsubscribe$)).subscribe(t=>{let{customBtnText:e,customBtnTextStatus:i}=this.data;this.data.remoteLookupConfig=t,this.data.customBtnText=e,this.data.customBtnTextStatus=i;let s=t.openAppConfig;this.data.remoteLookupConfig.openAppConfig={id:s.installedCons.id,name:s.installedCons.name,event:s.event};let f=t.qingWingsConfig;this.data.remoteLookupConfig.qingWingsConfig={agentId:f.selectedAgent.agentId,agentName:f.selectedAgent.agentName,skill:f.skill},this.widgetChange.changed.emit()}),this.data.remoteLookupConfig.configMode===Ne.template?this.getGlobalQlinkerTemplate():this.data.remoteLookupConfig.configMode===Ne.connector?(this.getInstalledConnectors(),this.connectorEventsOpen(!0)):this.data.remoteLookupConfig.configMode===Ne.wings&&(this.getWingsAgents(),this.qingWingsAgentsOpen(!0))}constructor(t,e,i,s,f,v,q,D,F,H,_e,Qe,Xe,ct,xe){this.currentEditSrv=t,this.appFormEditService=e,this.appItemService=i,this.widgetChange=s,this.fb=f,this.modalHelper=v,this.translate=q,this.wsReq=D,this.statusChange=F,this.aclSrv=H,this.messageService=_e,this.modal=Qe,this.env=Xe,this.qfMessageService=ct,this.co
12deblockOrQlinkerTestService=xe,this.ConfigMode=Ne,this.unsubscribe$=new fe,this.noBodyMethods=[jt.GET],this.installedConCompareFn=(de,Z)=>de&&Z?de.id===Z.id:de===Z,this.conectorEventsCompareFn=(de,Z)=>de&&Z?de.eventId===Z.eventId:de===Z,this.qingWingsAgentCompareFn=(de,Z)=>de&&Z?de.agentId===Z.agentId:de===Z,this.qingWingsSkillCompareFn=(de,Z)=>de&&Z?de.skillId===Z.skillId:de===Z,this.qlinkerConfigList=[],this.installedConnectors=[],this.connectorEvents=[],this.qingWingsAgentList=[],this.qingWingsAgentSkills=[],this.configMode=[{value:Ne.custom,label:"widgets.custom",hide:!1},{value:Ne.template,label:"widgets.useTemplate",hide:!1},{value:Ne.connector,label:"open.useOpenTemplate",hide:this.aclSrv.can({wsTypes:["ding"]})},{value:Ne.wings,label:"open.useWingsSkill",hide:this.env.version!=="normal"||this.env.thirdPartner===!0}],this.methodOpts=[jt.GET,jt.POST],this.formatOpts=[{label:"JSON",value:mt.JSON},{label:"XML",value:mt.XML},{label:"TEXT",value:mt.TEXT}],this.globalAuthList=[],this.showAuth=!1,this.cacheData=new Map}ngOnInit(){this.appKey=this.appFormEditService.appFormData.appKey,this.appItemService.onFormSaving.pipe(ae(this.unsubscribe$)).subscribe(t=>t&&this.initInsertableQues())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ke),T(ee),T(Dn),T(N),T(Gt),T(vt),T(X),T(mi
12),T(fi),T(ui),T(ye),T(Pe),T(pi),T(ye),T(Zt))},a.\u0275cmp=P({type:a,selectors:[["qf-qlinker-edit"]],inputs:{data:"data"},decls:12,vars:14,consts:[["urlEditor",""],[3,"formGroup"],[1,"widget-edit"],[1,"widget-edit-title"],["formControlName","configMode",1,"selector"],[4,"ngFor","ngForOf"],["class","mt-4","formControlName","globalQLinkerConfigId",3,"qfPlaceHolder",4,"ngIf"],["formGroupName","openAppConfig",4,"ngIf"],["formGroupName","qingWingsConfig",4,"ngIf"],["class","widget-edit",4,"ngIf"],[4,"ngIf"],[3,"qfValue","qfLabel",4,"ngIf"],[3,"qfValue","qfLabel"],["formControlName","globalQLinkerConfigId",1,"mt-4",3,"qfPlaceHolder"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[3,"qfLabel","qfValue"],["formGroupName","openAppConfig"],["formControlName","installedCons",1,"mt-4",3,"compareWith","qfPlaceHolder"],["formControlName","event",1,"mt-4",3,"qfOpenChange","compareWith","qfPlaceHolder"],["formGroupName","qingWingsConfig"],["formControlName","selectedAgent",1,"mt-4",3,"compareWith","qfPlaceHolder"],["formControlName","skill",1,"mt-4",3,"qfOpenChange","compareWith","qfPlaceHolder"],["qf-button","","qfType","dashed",1,"button-width",3,"click"],[1,"widget-edit-title-between","widget-edit-title"],["qfHelpDocName","auth",1,"widget-edit-title-link"],["pluginFuncName","auth"],["qfAllowClear","","class","selector","formControlName","globalAuthId",3,"qfDisabled","qfPlaceHolder",4,"ngIf"],[3,"clickQuestion","questions"],["mode","plain","qfHeight","56px","formControlName","url",3,"bordered"],["qf-button","","qfType","dashed",3,"click"],["formControlName","method",1,"selector"],["qfHelpDocName","qlinker"],["formControlName","resultType",1,"selector"],["qf-button","","qfType","dashed",1,"btn-config-path",3,"click"],["class","alias-wrapper",4,"ngIf"],["qfAllowClear","","formControlName","globalAuthId",1,"selector",3,"qfDisabled","qfPlaceHolder"],[1,"alias-wrapper"],[1,"alias-title"],[1,"alias-item-wrapper"],["class","alias-item",4,"ngFor","ngForOf"],[1,"alias-item"]],template:function(e,i){e&1&&(j(0,1),p(1,"div",2)(2,"div",3),g(3),m(4,"translate"),c(),p(5,"qf-select",4),x(6,E_,2,1,"ng-container",5),c(),x(7,P_,3,4,"qf-select",6)(8,V_,7,10,"ng-container",7)(9,F_,7,10,"ng-container",8),c(),x(10,R_,7,6,"div",9)(11,j_,52,31,"ng-container",10),U()),e&2&&(l("formGroup",i.settingGroup),r(3),M(" ",u(4,8,"widgets.modeConfiguration")," "),r(3),l("ngForOf",i.configMode),r(),l("ngIf",i.settingGroup.get("configMode").value===i.ConfigMode.template),r(),l("ngIf",i.settingGroup.get("configMode").value===i.ConfigMode.connector),r(),l("ngIf",i.settingGroup.get("configMode").value===i.ConfigMode.wings),r(),l("ngIf",an(10,q_,i.ConfigMode.template,i.ConfigMode.connector,i.ConfigMode.wings).includes(i.settingGroup.get("configMode").value)),r(),l("ngIf",i.settingGroup.get("configMode").value===i.ConfigMode.custom))},dependencies:[B,A,V,ge,Ut,Kt,yn,oe,ne,K,Ge,xt,st,Ai,k],styles:[".mt-4[_ngcontent-%COMP%]{margin-top:4px}.widget-edit[_ngcontent-%COMP%] .button-width[_ngcontent-%COMP%]{width:100%}.widget-edit[_ngcontent-%COMP%] > qf-select[_ngcontent-%COMP%], .widget-edit[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{width:100%}.widget-edit[_ngcontent-%COMP%] .selector[_ngcontent-%COMP%]{width:100%}.widget-edit[_ngcontent-%COMP%] .widget-edit-title[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-left:4px;font-size:13px;color:#fb9337;color:var(--brand-primary-base, #fb9337)}.widget-edit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.widget-edit[_ngcontent-%COMP%] .widget-edit-title-between[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:0}.widget-edit[_ngcontent-%COMP%] .widget-edit-title-between[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-left:4px;font-size:14px;font-weight:600}.widget-edit[_ngcontent-%COMP%] .btn-config-path[_ngcontent-%COMP%]{margin-top:10px}.alias-wrapper[_ngcontent-%COMP%]{box-sizing:border-box;margin-top:10px;border:1px solid rgba(43,52,65,.1);border-radius:4px}.alias-wrapper[_ngcontent-%COMP%] .alias-title[_ngcontent-%COMP%]{height:30px;padding:0 14px;font-size:14px;line-height:30px;color:#767e89;background:#2b34410d}.alias-wrapper[_ngcontent-%COMP%] .alias-item-wrapper[_ngcontent-%COMP%]{max-height:200px;overflow-y:scroll}.alias-wrapper[_ngcontent-%COMP%] .alias-item[_ngcontent-%COMP%]{height:30px;padding:0 14px;overflow:hidden;font-size:14px;line-height:30px;color:#494f57;text-overflow:ellipsis;white-space:nowrap}.alias-wrapper[_ngcontent-%COMP%] .alias-item[_ngcontent-%COMP%]:nth-child(1){margin-top:10px}.alias-wrapper[_ngcontent-%COMP%] .alias-item[_ngcontent-%COMP%]:nth-last-child(1){margin-bottom:10px}"]});let n=a;return n})();var U_=()=>({type:"plus"});function K_(n,a){if(n&1){let o=S();p(0,"li",15),y("click",function(){let e=_(o).$implicit,i=d(2);return C(i.selectCustomButton(e))}),p(1,"span",16),g(2),c()()}if(n&2){let o=a.$implicit;r(2),w(o.buttonText)}}function G_(n,a){n&1&&(p(0,"li",17),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"widgets.noButton")," "))}function $_(n,a){if(n&1){let o=S();p(0,"div",20)(1,"span",16),g(2),m(3,"translate"),c(),p(4,"span",21)(5,"i",22),y("click",function(){_(o);let e=d(3);return C(e.deleteCustomButton())}),g(6,"\uE7C7"),c()()()}if(n&2){let o=a.$implicit;r(2),w(u(3,1,o.buttonText))}}function X_(n,a){if(n&1&&(p(0,"div",18),x(1,$_,7,3,"div",19),c()),n&2){let o=d(2);r(),l("ngForOf",o.selectedCustomButton)}}function Y_(n,a){if(n&1){let o=S();p(0,"div",5)(1,"button",6),y("qfVisibleChange",function(e){_(o);let i=d();return C(i.getCustomButtons(e))}),b(2,"i",7),p(3,"span"),g(4),m(5,"translate"),c()(),p(6,"qf-dropdown-menu",null,0)(8,"div",8)(9,"ul",9),x(10,K_,3,1,"li",10)(11,G_,3,3,"li",11),c(),p(12,"p",12),y("click",function(){_(o);let e=d();return C(e.goToAddButton())}),p(13,"span"),b(14,"i",13),g(15),m(16,"translate"),c()()()(),x(17,X_,2,1,"div",14),c()}if(n&2){let o=W(7),t=d();r(),l("disabled",t.selectedCustomButton.length===1)("qfDropdownMenu",o),r(3),w(u(5,8,"widgets.addBtn")),r(6),l("ngForOf",t.customButtons),r(),l("ngIf",t.customButtons.length===0),r(3),l("nzCompatible",Y(12,U_)),r(),M(" ",u(16,10,"widgets.createBtn")," "),r(2),l("ngIf",(t.selectedCustomButton==null?null:t.selectedCustomButton.length)>0)}}var Rc=(()=>{let a=class a{set editQue(t){this._editQue=t,t.customButtonConfig?(this.status=t.customButtonConfig.status,this.selectedCustomButton=t.customButtonConfig.customButtonDetailInfo?[t.customButtonConfig.customButtonDetailInfo]:[]):(this.status=!1,this.selectedCustomButton=[])}get editQue(){return this._editQue}get appKey(){return this.appFormEditSrv.appFormData.appKey}editChange(){this.editQue.customButtonConfig={status:this.status,customButtonDetailInfo:this.selectedCustomButton[0]||null},this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"customBtn",question:this.editQue})}statusChange(){this.editChange()}getCustomButtons(t){t&&this.customButtons.length===0&&this.appSett
12ingAndPublishService.getAppCustomButtons(this.appKey,!0).subscribe(e=>this.customButtons=e.result)}selectCustomButton(t){this.selectedCustomButton=[t],this.editChange()}deleteCustomButton(){this.selectedCustomButton=[],this.editChange()}goToAddButton(){this.router.navigate(["/f",this.appKey,"edit","setting","custom-btn"]).catch()}constructor(t,e,i,s){this.appFormEditSrv=t,this.router=e,this.widgetChange=i,this.appSettingAndPublishService=s,this.customButtons=[],this.selectedCustomButton=[]}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(To),T(N),T(dl))},a.\u0275cmp=P({type:a,selectors:[["qf-que-custom-btn-setting"]],inputs:{editQue:"editQue"},decls:8,vars:8,consts:[["buttonMenu","qfDropdownMenu"],[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],["class","widget-edit-detail",4,"ngIf"],[1,"widget-edit-detail"],["qf-button","","qf-dropdown","","qfType","dashed","qfTrigger","click",1,"add-custom-button",3,"qfVisibleChange","disabled","qfDropdownMenu"],["qf-icon","","qfIconfont","\uE867"],[1,"content-container"],["qf-dropdown-menu","","qf-menu","",1,"add-dropdown-list"],["qf-menu-item","",3,"click",4,"ngFor","ngForOf"],["qf-menu-item","","nzDisabled","",4,"ngIf"],[1,"add-new-button",3,"click"],["qf-icon","",3,"nzCompatible"],["class","buttons-container",4,"ngIf"],["qf-menu-item","",3,"click"],[1,"button-text"],["qf-menu-item","","nzDisabled",""],[1,"buttons-container"],["class","buttons",4,"ngFor","ngForOf"],[1,"buttons"],[1,"delete-icon"],[1,"iconfont",3,"click"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"label",2),O("ngModelChange",function(f){return E(i.status,f)||(i.status=f),f}),y("ngModelChange",function(){return i.statusChange()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",3),m(6,"translate"),x(7,Y_,18,13,"div",4),c()),e&2&&(r(),I("ngModel",i.status),r(2),w(u(4,4,"widgets.customBtn")),r(2),l("hintMsg",u(6,6,"all.queCustomBtnTip")),r(2),l("ngIf",i.status))},dependencies:[B,A,V,Q,Ci,vi,yi,_i,vn,se,K,ce,G,k],styles:["qf-hint-msg[_ngcontent-%COMP%]{margin-left:-8px}.widget-edit[_ngcontent-%COMP%]{position:relative}.widget-edit[_ngcontent-%COMP%] .add-custom-button[_ngcontent-%COMP%]{width:100%}.buttons-container[_ngcontent-%COMP%]{padding:4px 0;margin-top:4px}.buttons[_ngcontent-%COMP%]{position:relative;height:36px;padding:8px;margin-bottom:4px;line-height:18px;background:#fff;border:1px solid #d5d6d9;border-radius:4px}.buttons[_ngcontent-%COMP%] .button-text[_ngcontent-%COMP%]{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buttons[_ngcontent-%COMP%] .delete-icon[_ngcontent-%COMP%]{position:absolute;top:5px;right:8px;width:24px;height:24px;line-height:24px;text-align:center;cursor:pointer;border-radius:4px;opacity:.6;transition:background ease .2s}.buttons[_ngcontent-%COMP%] .delete-icon[_ngcontent-%COMP%]:hover{background:#d5d6d9}.content-container[_ngcontent-%COMP%]{position:relative;min-height:80px;background:#fff;box-shadow:0 4px 10px #0c1f5014}.content-container[_ngcontent-%COMP%] .add-dropdown-list[_ngcontent-%COMP%]{max-height:210px;overflow:auto;box-shadow:none}.content-container[_ngcontent-%COMP%] .add-dropdown-list[_ngcontent-%COMP%] .button-text[_ngcontent-%COMP%]{display:block;width:219px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-container[_ngcontent-%COMP%] .add-new-button[_ngcontent-%COMP%]{padding:0 10px;margin:0;line-height:40px;cursor:pointer;border-top:1px solid #F9FAFC}.content-container[_ngcontent-%COMP%] .add-new-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fb9337;color:var(--brand-primary-base, #fb9337)}.content-container[_ngcontent-%COMP%] .add-new-button[_ngcontent-%COMP%]:hover{background:#fffded}.content-container[_ngcontent-%COMP%] .add-new-button[_ngcontent-%COMP%]:active{background:#ffebdb;background:var(--brand-primary-10, #ffebdb)}"]});let n=a;return n})();function J_(n,a){n&1&&(g(0),m(1,"translate"),b(2,"a",5)),n&2&&M(" ",u(1,1,"all.onlyPhotoDesc")," ")}function Z_(n,a){if(n&1){let o=S();
12p(0,"label",8),O("ngModelChange",function(e){let i=_(o).$implicit;return E(i.checked,e)||(i.checked=e),C(e)}),y("ngModelChange",function(){_(o);let e=d(2);return C(e.fileBeingCaptureOnlyChange())}),p(1,"span"),g(2),m(3,"translate"),c()()}if(n&2){let o=a.$implicit;l("qfValue",o.value),I("ngModel",o.checked),r(2),w(u(3,3,o.label))}}function eC(n,a){if(n&1&&(p(0,"div",6),x(1,Z_,4,5,"label",7),c()),n&2){let o=d();r(),l("ngForOf",o.terminalList)}}var Nc=(()=>{let a=class a{set que(t){this._editQue=t;let e=this.getConfigureList(t.fileBeingCaptureOnly);this.canConfigureTerminal=e.length>0,this.terminalList.forEach(i=>i.checked=e.includes(i.value))}get que(){return this._editQue}constructor(t){this.widgetChange=t,this.canConfigureTerminal=!1,this.terminalList=[{label:"all.mobileDevices",value:Bn.Mobile,checked:!0},{label:"all.pcDevices",value:Bn.Web,checked:!1}]}configureTerminalChange(){this.canConfigureTerminal?(this.terminalList.find(t=>t.value===Bn.Mobile).checked=!0,this.fileBeingCaptureOnlyChange()):(this.terminalList.forEach(t=>t.checked=!1),this.fileBeingCaptureOnlyChange())}fileBeingCaptureOnlyChange(){this.que.fileBeingCaptureOnly=this.terminalList.filter(t=>t.checked).reduce((t,e)=>t+e.value,0),this.canConfigureTerminal=this.que.fileBeingCaptureOnly!==Bn.NONE,this.widgetChange.changed.emit(),this.widgetChange.syncForm$.emit({type:"fileBeingCaptureOnly",question:this.que})}getConfigureList(t){let e=t.toString(2),i=[];for(let s=0;s<e.length;s++)e[s]==="1"&&i.unshift(e.length-s);return i}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-que-file-being-capture"]],inputs:{que:"que"},decls:9,vars:6,consts:[["tipcontent",""],[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],["class","capture-container",4,"ngIf"],["qfHelpDocName","upload"],[1,"capture-container"],["qf-checkbox","",3,"qfValue","ngModel","ngModelChange",4,"ngFor","ngForOf"],["qf-checkbox","",3,"ngModelChange","qfValue","ngModel"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"label",2),O("ngModelChange",function(v){return _(s),E(i.canConfigureTerminal,v)||(i.canConfigureTerminal=v),C(v)}),y("ngModelChange",function(){return _(s),C(i.configureTerminalChange())}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",3),x(6,J_,3,3,"ng-template",null,0,te)(8,eC,2,1,"div",4),c()}if(e&2){let s=W(7);r(),I("ngModel",i.canConfigureTerminal),r(2),w(u(4,4,"all.onlyPhoto")),r(2),l("hintMsg",s),r(3),l("ngIf",i.canConfigureTerminal)}},dependencies:[B,A,V,Q,se,G,Ge,k],styles:[".capture-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:198px;margin:4px 0 0 24px;border:1px solid #E6EAF0;border-radius:4px}.capture-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{padding:7px 16px}.capture-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:first-of-type{border-bottom:1px solid #e6eaf0}"]});let n=a;return n})();function tC(n,a){if(n&1){let o=S();p(0,"div",3)(1,"span"),g(2),m(3,"translate"),c(),b(4,"qf-hint-msg",4),m(5,"translate"),p(6,"input",5),m(7,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.data.referenceConfig.dataAdditionButtonText,e)||(i.data.referenceConfig.dataAdditionButtonText=e),C(e)}),y("ngmodelChange",function(){_(o);let e=d();return C(e.changeInputText())}),c()()}if(n&2){let o=d();r(2),w(u(3,4,"widgets.buttonText")),r(2),l("hintMsg",u(5,6,"widgets.enterButtonText")),r(2),l("placeholder",u(7,8,"widgets.defaultButtonText")),I("ngModel",o.data.referenceConfig.dataAdditionButtonText)}}var Bc=(()=>{let a=class a{changeStatus(){this.widgetChange.changed.emit(),this.data.referenceConfig.dataAdditionButtonText=""}changeInputText(){this.widgetChange.changed.emit(),this.widgetChange.syncForm$.next({type:"dataAdditionButtonText",question:this.data})}constructor(t){this.widgetChange=t}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-quote-allow-add"]],inputs:{data:"data"},decls:8,vars:8,consts:[["qf-checkbox","",3,"ngModelChange","ngModel"],[1,"hint-msg",3,"hintMsg"],["class","btn-text",4,"ngIf"],[1,"btn-text"],[3,"hintMsg"],["qf-input","","maxlength","50",1,"input-place",3,"ngModelChange","ngmodelChange","placeholder","ngModel"]],template:function(e,i){e&1&&(p(0,"div")(1,"label",0),O("ngModelChange",function(f){return E(i.data.referenceConfig.canAddData,f)||(i.data.referenceConfig.canAddData=f),f}),y("ngModelChange",function(){return i.changeStatus()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",1),m(6,"translate"),c(),x(7,tC,8,10,"div",2)),e&2&&(r(),I("ngModel",i.data.referenceConfig.canAddData),r(2),w(u(4,4,"widgets.permitToaddData")),r(2),l("hintMsg",u(6,6,"widgets.afterChecking")),r(2),l("ngIf",i.data.referenceConfig.canAddData))},dependencies:[A,le,V,Ue,Q,se,he,G,k],styles:[".btn-text[_ngcontent-%COMP%]{margin-top:10px}.btn-text[_ngcontent-%COMP%] qf-hint-msg[_ngcontent-%COMP%]{margin:0}.hint-msg[_ngcontent-%COMP%]{margin-left:-8px}.input-place[_ngcontent-%COMP%]{margin-top:8px}"]});let n=a;return n})();function iC(n,a){if(n&1&&(p(0,"span",10),g(1),m(2,"authPipe"),m(3,"translate"),c()),n&2){let o=d().$implicit;r(),M(" ",u(3,3,u(2,1,o.queAuth))," ")}}function nC(n,a){if(n&1){let o=S();p(0,"qf-que-status-switch",11),y("selectChange",function(e){_(o);let i=d().$implicit,s=d();return C(s.queAuthChange(i,e))}),c()}if(n&2){let o=d().$implicit;l("hideCanEdit",!0)("disableCheck",o.disabled)("activeBtn",o.queAuth)}}function oC(n,a){if(n&1){let o=S();p(0,"button",12),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.showTableAuthSetting(e))}),g(1),m(2,"translate"),c()}n&2&&(r(),M(" ",u(2,1,"all.configureTablePermissions")," "))}function aC(n,a){if(n&1){let o=S();p(0,"button",12),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.showSectionAuthSetting(e))}),g(1),m(2,"translate"),c()}n&2&&(r(),M(" ",u(2,1,"all.configureSectionpermissions")," "))}function rC(n,a){if(n&1&&(p(0,"li",4)(1,"span",5),g(2),c(),x(3,iC,4,5,"span",6),p(4,"div",7),x(5,nC,1,3,"qf-que-status-switch",8)(6,oC,3,3,"button",9)(7,aC,3,3,"button",9),c()()),n&2){let o=a.$implicit,t=d();r(2),w(o.queTitle),r(),l("ngIf",o.queType!==t.QueType.TABLE&&o.queType!==t.QueType.SECTION),r(2),l("ngIf",o.queType!==t.QueType.TABLE&&o.queType!==t.QueType.SECTION),r(),l("ngIf",o.queType===t.QueType.TABLE),r(),l("ngIf",o.queType===t.QueType.SECTION)}}var hr=(()=>{let a=class a{setAllQuesAuth(t,e=this.authQuesDraft){e.forEach(i=>
12{var s,f;![h.SECTION,h.TABLE].includes(i.queType)&&!i.disabled&&(i.queAuth=t),((s=i.subQues)==null?void 0:s.length)>0&&this.setAllQuesAuth(t,i.subQues),((f=i.innerQues)==null?void 0:f.length)>0&&this.setAllQuesAuth(t,i.innerQues)})}formAuthChange(t){this.formAuth=t.queAuth,this.setAllQuesAuth(t.queAuth)}queAuthChange(t,e){t.queAuth=e.queAuth}showTableAuthSetting(t){this.modalService.open({content:Ys,width:430,title:this.translate.instant("additional.formPermission"),closable:!1,componentParams:{tableAuth:t,canEdit:!1,needUpdateTableAuth:!0},onOk:e=>{let i=e.copyTableQue;t.subQues=i.subQues,t.queAuth=i.queAuth,t.addRow=i.addRow,t.editRow=i.editRow,t.deleteRow=i.deleteRow,t.subQues=i.subQues}})}showSectionAuthSetting(t){this.modalService.open({content:Js,width:430,title:this.translate.instant("all.configureSectionpermissions"),closable:!1,componentParams:{sectionQue:t,canEdit:!1,canSort:!1,needUpdateTableAuth:!0},onOk:e=>{let i=e.copySectionQue;t.queAuth=i.queAuth,t.beingFold=i.beingFold,t.innerQues=i.innerQues}})}constructor(t,e){this.modalService=t,this.translate=e,this.BASIC_QUE_IDS=[ue.SERIAL_NUMBER,ue.APPLYER,ue.APPLY_TIME,ue.UPDATE_TIME,ue.CURRENT_NODE],this.QueType=h}ngOnInit(){this.authQuesDraft=je(this.authQues).filter(t=>t.queId!==ue.APPLY_ID)}};a.\u0275fac=function(e){return new(e||a)(T(Pe),T(X))},a.\u0275cmp=P({type:a,selectors:[["qf-quote-auth"]],inputs:{authQues:"authQues"},decls:7,vars:6,consts:[[1,"overall-settings"],["selectModel","none",3,"selectChange","hideCanEdit","activeBtn"],[1,"table-auth-container"],["class","que-item",4,"ngFor","ngForOf"],[1,"que-item"],[1,"que-title"],["class","que-status",4,"ngIf"],[1,"auth-edit-actions"],[3,"hideCanEdit","disableCheck","activeBtn","selectChange",4,"ngIf"],["qf-button","","class","table-auth-setting","qfType","default",3,"click",4,"ngIf"],[1,"que-status"],[3,"selectChange","hideCanEdit","disableCheck","activeBtn"],["qf-button","","qfType","default",1,"table-auth-setting",3,"click"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"span"),g(2),m(3,"translate"),c(),p(4,"qf-que-status-switch",1),y("selectChange",function(f){return i.formAuthChange(f)}),c()(),p(5,"ul",2),x(6,rC,8,5,"li",3),c()),e&2&&(r(2),w(u(3,4,"all.overallSettings")),r(2),l("hideCanEdit",!0)("activeBtn",i.formAuth),r(2),l("ngForOf",i.authQuesDraft))},dependencies:[B,A,K,Xs,k,Ol],styles:[".table-auth-setting[_ngcontent-%COMP%]{width:150px;height:30px;margin-top:2px;color:#6b737b;background:#e9eaec!important;border:0 none}.table-auth-setting[_ngcontent-%COMP%]:hover{color:#494f57;background-color:#ffffffb3}.overall-settings[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:60px;padding:15px 0;margin:20px 0 0;color:#494f57;background-color:#f9fafc;border-bottom:1px solid #f9fafc;border-radius:4px 4px 0 0}.table-auth-container[_ngcontent-%COMP%]{min-height:280px;max-height:315px;padding:0;margin:0 0 20px;overflow:auto;background-color:#fff;border:1px solid #f5f5f7;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.que-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;height:60px;padding:15px;background-color:#fff;border-bottom:1px solid #f9fafc}.que-item[_ngcontent-%COMP%] .que-title[_ngcontent-%COMP%]{display:block;width:calc(100% - 44px);overflow:hidden;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.que-item[_ngcontent-%COMP%] .que-status[_ngcontent-%COMP%]{font-size:13px;color:#767e89}.que-item[_ngcontent-%COMP%] .auth-edit-actions[_ngcontent-%COMP%]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:flex;align-items:center;justify-content:center;cursor:pointer;background:#0000004d;opacity:0;transition:all .3s}.que-item[_ngcontent-%COMP%] .auth-edit-actions[_ngcontent-%COMP%] .drag-icon[_ngcontent-%COMP%]{position:absolute;right:12px;display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:24px;background-color:#fff;border-radius:4px;opacity:.6}.que-item[_ngcontent-%COMP%]:hover .auth-edit-actions[_ngcontent-%COMP%]{opacity:1}"]}
12);let n=a;return n})();var lC=()=>({type:"link"});function sC(n,a){n&1&&(p(0,"div",4)(1,"span",5),g(2,"\u8BF7\u5148\u7ED9\u5F53\u524D\u5E94\u7528\u6DFB\u52A0\u5B57\u6BB5"),c()())}function pC(n,a){n&1&&(p(0,"qf-tag",17),g(1),m(2,"translate"),c()),n&2&&(r(),w(u(2,1,"all.systemFieldShort")))}function cC(n,a){if(n&1&&(p(0,"qf-option",14)(1,"span",15)(2,"span")(3,"span",16),g(4),c()(),x(5,pC,3,3,"qf-tag",17),c()()),n&2){let o=a.$implicit,t=d(2);l("qfLabel",o.queTitle)("qfValue",o.queId),r(4),w(o.queTitle),r(),Ae(t.isSystemFields(o.queId)?5:-1)}}function dC(n,a){if(n&1&&(p(0,"nz-form-item",6)(1,"div",7)(2,"span"),g(3),c()(),p(4,"div",8),b(5,"i",9),c(),p(6,"nz-form-control",10),j(7,11),p(8,"qf-select",12),m(9,"translate"),x(10,cC,6,4,"qf-option",13),m(11,"questionType"),c(),U(),c()()),n&2){let o=a.$implicit,t=a.index,e=d();r(3),wt(" ",o.supId?o.supQueTitle+"\xB7":""," ",o.queTitle," "),r(2),l("nzCompatible",Y(11,lC)),r(2),l("formGroupName",t),r(),l("qfPlaceHolder",u(9,6,"all.select")),r(2),l("ngForOf",zt(11,8,e.canMatchTargetQues,o))}}var _r=(()=>{let a=class a{get formValue(){return this.setForm.value.referFillRules.filter(t=>Qt(t.relatedQueId)&&this.targetQues.find(e=>e.queId===t.relatedQueId)).map(t=>{let e=this.targetQues.find(s=>s.queId===t.relatedQueId),i=this.matchQues.find(s=>s.queId===t.queId);return{queId:t.queId,queTitle:i.supId?`${i.supQueTitle}\xB7${i.queTitle}`:i.queTitle,relatedQueId:t.relatedQueId,relatedQueTitle:e.supId?`${e.supQueTitle}\xB7${e.queTitle}`:e.queTitle}})}setCanSelectTargetQues(){this.queAuthInfosMap.clear();let t=e=>{switch(e.queType){case h.SECTION:{e.innerQues.forEach(i=>t(i));break}case h.TABLE:{e.subQues.forEach(i=>t(i));break}default:this.queAuthInfosMap.set(e.queId,e)}};this.editQue.referenceConfig.referAuthQues.forEach(e=>t(e))}initForm(){this.setCanSelectTargetQues(),this.canMatchQues=this.matchQues.filter(e=>this.supportMatchQueType.includes(e.queType)),this.canMatchTargetQues=this.targetQues.filter(e=>{var i;return((i=this.queAuthInfosMap.get(e.queId))==null?void 0:i.queAuth)===Ht.justShow||e.queId===ue.APPLY_ID});let t=this.fb.array(this.canMatchQues.map(e=>{let i=this.fillRules?this.fillRules.find(s=>s.queId===e.queId):null;return this.fb.group({queId:e.queId,relatedQueId:i==null?void 0:i.relatedQueId})}));this.setForm=this.fb.group({referFillRules:t})}constructor(t){this.fb=t,this.unsubscribe$=new fe,this.supportMatchQueType=[h.INPUT,h.ENCRYPTED_TEXT,h.DATE,h.MEMBER,h.NUMBER,h.SELECT,h.RADIO,h.CHECKBOX,h.UPLOAD,h.TEXTAREA,h.EMAIL,h.PHONE,h.DATA_RELATION,h.DEPARTMENT],this.canMatchQues=[],this.queAuthInfosMap=new Map,this.canMatchTargetQues=[],this.isSystemFields=un,this.fillRules=[]}ngOnInit(){this.initForm()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(Gt))},a.\u0275cmp=P({type:a,selectors:[["qf-quote-fill"]],inputs:{editQue:"editQue",targetQues:"targetQues",matchQues:"matchQues",fillRules:"fillRules"},decls:4,vars:3,consts:[[1,"table-relform-wrap"],["nz-form","","nzLayout","horizontal",3,"formGroup"],["nz-row","","class","subque-empty-wrap","nzType","flex","nzJustify","center","nzAlign","middle",4,"ngIf"],["formArrayName","referFillRules",4,"ngFor","ngForOf"],["nz-row","","nzType","flex","nzJustify","center","nzAlign","middle",1,"subque-empty-wrap"],[1,"qfont-gray-frequent"],["formArrayName","referFillRules"],["nz-col","","nzSpan","12",1,"field-value"],["nz-col","","nzSpan","1",1,"rel-hint"],["qf-icon","",3,"nzCompatible"],["nzSpan","11"],[3,"formGroupName"],["qfAllowClear","","formControlName","relatedQueId",2,"width","100%",3,"qfPlaceHolder"],["qfCustomContent","",3,"qfLabel","qfValue",4,"ngFor","ngForOf"],["qfCustomContent","",3,"qfLabel","qfValue"],[1,"flex","flex-1","items-center","justify-between"],[1,"line-clamp-1","text-ellipsis"],["qfSize","tiny","qfColor","orange10"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"form",1),x(2,sC,3,0,"div",2)(3,dC,12,12,"nz-form-item",3),c()()),e&2&&(r(),l("formGroup",i.setForm),r(),l("ngIf",i.canMatchQues.length===0),r(),l("ngForOf",i.canMatchQues))},dependencies:[B,A,Ie,V,ge,Ut,Kt,yn,Oo,Ei,Ii,Pi,Oi,Di,oe,ne,ce,Tn,k,ko],styles:['nz-form-item[_ngcontent-%COMP%]:last-of-type{margin:0}.top-tip[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{font-size:14px;line-height:1.8;color:#767e89}.top-tip[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:before{position:relative;top:-1px;display:inline-block;width:6px;height:6px;margin-right:8px;content:"";background:#fb9337;background:var(--brand-primary-base, #fb9337);border-radius:50%}.table-relform-wrap[_ngcontent-%COMP%]{min-height:400px;padding:10px 0}.rel-hint[_ngcontent-%COMP%]{line-height:34px;text-align:center}.not-support-hint[_ngcontent-%COMP%]{line-height:34px;color:#b0b0b9}.field-value[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:34px;padding:0 8px;background:#f9fafc;border-radius:3px}.field-value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subque-empty-wrap[_ngcontent-%COMP%]{height:100px;border:1px solid #f4f6f9;border-radius:3px}']}
12);let n=a;return n})();function mC(n,a){if(n&1&&b(0,"qf-option",7),n&2){let o=a.$implicit;l("qfLabel",o.formTitle)("qfValue",o.appKey)}}function uC(n,a){n&1&&b(0,"i",26)}function fC(n,a){if(n&1){let o=S();p(0,"li",23),y("click",function(){let e=_(o).$implicit,i=d(2);return C(i.toggleQuoteQue(e))}),p(1,"div",24),g(2),c(),x(3,uC,1,0,"i",25),c()}if(n&2){let o=a.$implicit;r(2),w(o.queTitle),r(),l("ngIf",o.checked)}}function gC(n,a){n&1&&(p(0,"li",27),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"widgetHelp.noQuoteField")," "))}function hC(n,a){if(n&1){let o=S();p(0,"div",28)(1,"div",29),g(2),c(),p(3,"button",30),y("click",function(){let e=_(o),i=e.$implicit,s=e.index,f=d(2);return C(f.deleteQuoteQue(i,s))}),c(),b(4,"button",31),c()}if(n&2){let o=a.$implicit;r(2),w(o.queTitle)}}function _C(n,a){if(n&1&&(p(0,"li"),g(1),p(2,"span",34),g(3,"\u5339\u914D"),c(),g(4),c()),n&2){let o=a.$implicit;r(),M(" ",o.queTitle," "),r(3),M(" ",o.relatedQueTitle," ")}}function CC(n,a){if(n&1&&(p(0,"div",32)(1,"ul"),x(2,_C,5,2,"li",33),c()()),n&2){let o=d(2);r(2),l("ngForOf",o.editQue.referenceConfig.referFillRules)}}function yC(n,a){if(n&1){let o=S();j(0),p(1,"div",1)(2,"div",2)(3,"span"),g(4),m(5,"translate"),c(),b(6,"qf-hint-msg",3),m(7,"translate"),c(),p(8,"qf-radio-group",8),O("ngModelChange",function(e){_(o);let i=d();return E(i.editQue.referenceConfig.optionalDataNum,e)||(i.editQue.referenceConfig.optionalDataNum=e),C(e)}),p(9,"label",9),g(10),m(11,"translate"),c(),p(12,"label",9),g(13),m(14,"translate"),c()()(),p(15,"div",1)(16,"div",2)(17,"span"),g(18),m(19,"translate"),c(),b(20,"qf-hint-msg",3),m(21,"translate"),c(),p(22,"button",10)(23,"span"),g(24),m(25,"translate"),c()(),p(26,"qf-dropdown-menu",null,0)(28,"ul",11),x(29,fC,4,2,"li",12)(30,gC,3,3,"li",13),c()(),p(31,"div",14),y("cdkDropListDropped",function(e){_(o);let i=d();return C(i.sortDrop(e))}),x(32,hC,5,1,"div",15),c()(),p(33,"div",1)(34,"div",2)(35,"span"),g(36),m(37,"translate"),c(),b(38,"qf-hint-msg",3),m(39,"translate"),c(),p(40,"button",16),y("click",function(){_(o);let e=d();return C(e.openAuthSetModal())}),p(41,"span"),g(42),m(43,"translate"),c()()(),p(44,"div",1)(45,"div",2)(46,"span"),g(47),m(48,"translate"),c(),b(49,"qf-hint-msg",3),m(50,"translate"),c(),p(51,"input",17),m(52,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.editQue.referenceConfig.customButtonText,e)||(i.editQue.referenceConfig.customButtonText=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.changeCustomButtonText())}),c()(),p(53,"div",1)(54,"div",2)(55,"span"),g(56),m(57,"translate"),c(),b(58,"qf-hint-msg",3),m(59,"translate"),c(),p(60,"button",16),y("click",function(){_(o);let e=d();return C(e.openQuoteFilterModal())}),p(61,"span"),g(62),m(63,"translate"),c()(),p(64,"div",18),b(65,"qf-filter-cond-info",19),c()(),p(66,"div",1)(67,"div",2)(68,"span"),g(69),m(70,"translate"),c(),b(71,"qf-hint-msg",3),m(72,"translate"),c(),p(73,"button",16),y("click",function(){_(o);let e=d();return C(e.openFillRulesModal())}),p(74,"span"),g(75),m(76,"translate"),c()(),x(77,CC,3,1,"div",20),p(78,"div",21)(79,"span"),g(80),m(81,"translate"),c(),p(82,"a",22),g(83),m(84,"translate"),c()()(),U()}if(n&2){let o=W(27),t=d();r(4),w(u(5,33,"widgetHelp.optionalDataAmount")),r(2),l("hintMsg",u(7,35,"widgetHelp.canBeReferenced")),r(2),I("ngModel",t.editQue.referenceConfig.optionalDataNum),r(),l("qfValue",1),r(),M(" ",u(11,37,"widgetHelp.single")," "),r(2),l("qfValue",0),r(),M(" ",u(14,39,"widgetHelp.multiple")," "),r(5),w(u(19,41,"widgetHelp.quoteViewField")),r(2),l("hintMsg",u(21,43,"widgetHelp.quoteViewFieldHint")),r(2),l("disabled",t.quoteQuestions.length>=t.maxReferQueLength)("qfDisabled",t.quoteQuestions.length>=t.maxReferQueLength)("qfDropdownMenu",o),r(2),w(u(25,45,"widgetHelp.selectQuoteViewField")),r(5),l("ngForOf",t.canReferQueList),r(),l("ngIf",t.queList.length===0),r(2),l("ngForOf",t.quoteQuestions),r(4),w(u(37,47,"widgetHelp.quoteFieldAuth")),r(2),l("hintMsg",u(39,49,"widgetHelp.quoteFieldAuthHint")),r(4),w(u(43,51,"widgetHelp.quoteSetVisibleField")),r(5),w(u(48,53,"widgetHelp.quoteButtonText")),r(2),l("hintMsg",u(50,55,"widgetHelp.quoteButtonTextHint")),r(2),l("placeholder",u(52,57,"widgetHelp.pleaseInputButtonText")),I("ngModel",t.editQue.referenceConfig.customButtonText),r(5),w(u(57,59,"widgetHelp.quoteFieldScope")),r(2),l("hintMsg",u(59,61,"widgetHelp.quoteFieldScopeHint")),r(4),w(u(63,63,"all.setFilterCriteria")),r(3),l("matchRules",t.editQue.referenceConfig.referMatchRules),r(4),w(u(70,65,"widgetHelp.quoteFillField")),r(2),l("hintMsg",u(72,67,"widgetHelp.quoteFillFieldHint")),r(4),w(u(76,69,"widgetHelp.quoteSetFillFieldRules")),r(2),l("ngIf",(t.editQue.referenceConfig.referFillRules==null?null:t.editQue.referenceConfig.referFillRules.length)>0),r(3),w(u(81,71,"all.referDftDetailTip")),r(3),M(" ",u(84,73,"addressList.learnMore")," ")}}var Lc=(()=>{let a=class a{set editQue(t){this.clickSaveDuringEdit.set(!1),this._editQue.set(t),this.getAllAppList(),t.referenceConfig.referAppKey&&this.getQuesByAppkey(t.referenceConfig.referAppKey).then(()=>{let e=t.referenceConfig.referQuestions;this.quoteQuestions=e?e.map(i=>{let s=this.queList.find(f=>f.queId===i.queId);return Ee(me({},s),{checked:!0})}):[],this.quoteQuestions.forEach(i=>
12{let s=this.getQueAuth(this.editQue.referenceConfig.referAuthQues,i);s.disabled=!0;let f=this.canReferQueList.find(v=>v.queId===i.queId);f.checked=!0}),this.editQue.referenceConfig.referAuthQues=this.editQue.referenceConfig.referAuthQues.map(i=>this.setQueTitleAndQueType(i)),this.editQue.referenceConfig.optionalDataNum===null&&(this.editQue.referenceConfig.optionalDataNum=0)}).catch(),this.editQue.referenceConfig.referFillRules.map(e=>{this.editQue.supQueTitle&&!e.queTitle.startsWith(`${this.editQue.supQueTitle}\xB7`)&&(e.queTitle=`${this.editQue.supQueTitle}\xB7${e.queTitle}`)})}get editQue(){return this._editQue()}ngOnInit(){this._appItemService.onFormSaving.pipe(this._takeUntilDestroyed).subscribe(()=>{this.clickSaveDuringEdit.set(!0)})}parseFormQueToChartQueAndSetQueAuth(t){let{queId:e,queTitle:i,queType:s,subQuestions:f,innerQuestions:v}=t,q=this.editQue.referenceConfig.referAuthQues?this.getQueAuth(this.editQue.referenceConfig.referAuthQues,t):null,D=[],F=q?q.queAuth:Ht.hide;return s===h.TABLE&&(D=f.map(H=>this.parseFormQueToChartQueAndSetQueAuth(H)),F=Ht.justShow),{queId:e,queTitle:i,queType:s,subQues:D,innerQues:s===h.SECTION?v.map(H=>this.parseFormQueToChartQueAndSetQueAuth(H)):[],queAuth:F,beingVisible:!0}}setReferQuestions(){this.editQue.referenceConfig.referQuestions=this.quoteQuestions.map(t=>({queId:t.queId,queType:t.queType,queTitle:t.queTitle,options:t.options})),this.widgetChangeService.changed.emit()}getQueAuth(t,e){for(let i of t){if(i.queId===e.queId)return i;let s;if(i.innerQues.length>0?s=this.getQueAuth(i.innerQues,e):i.subQues.length>0&&(s=this.getQueAuth(i.subQues,e)),s)return s}}toggleQuoteQue(t){var s;if(((s=this.quoteQuestions)==null?void 0:s.length)>=this.maxReferQueLength)return;let e=this.quoteQuestions.findIndex(f=>f.queId===t.queId),i=this.getQueAuth(this.editQue.referenceConfig.referAuthQues,t);e===-1?(this.quoteQuestions.push(t),t.checked=!0,i.disabled=!0,i.queAuth=Ht.justShow):(this.quoteQuestions.splice(e,1),t.checked=!1,i.disabled=!1,i.queAuth=Ht.hide),this.setReferQuestions(),this.defaultValChange.emit(this.editQue)}deleteQuoteQue(t,e){let i=this.queList.find(f=>f.queId===t.queId),s=this.getQueAuth(this.editQue.referenceConfig.referAuthQues,i);this.quoteQuestions.splice(e,1),i.checked=!1,s.disabled=!1,s.queAuth=Ht.hide,this.setReferQuestions(),this.defaultValChange.emit(this.editQue)}sortDrop(t){Et(this.quoteQuestions,t.previousIndex,t.currentIndex),this.setReferQuestions(),this.defaultValChange.emit(this.editQue)}quotedAppChange(t){this.quoteQuestions=[],this.editQue.referenceConfig.referAuthQues=null,this.editQue.referenceConfig.referQuestions=[],this.editQue.referenceConfig.referFillRules=[],this.editQue.referenceConfig.referMatchRules=[],this.getQuesByAppkey(t,!0).then(()=>{this.widgetChangeService.changed.emit(),this.widgetChangeService.quotedAppChange$.next()}).catch(),this.appFormEditSrv.tableDftValueQueAppChanged(this.editQue)}changeCustomButtonText(){this.widgetChangeService.changed.emit()}getQuesByAppkey(t,e=!1){return new Promise(i=>{this.appFormEditSrv.getQueList(t).subscribe(s=>{this.queListIncludeSection=s,this.editQue.referenceConfig.referAuthQues=this.queListIncludeSection.map(q=>this.parseFormQueToChartQueAndSetQueAuth(q));let f=[],v=q=>{f.push(q),q.queType===h.SECTION?q.innerQuestions.forEach(D=>v(D)):q.queType===h.TABLE&&q.subQuestions.forEach(D=>v(D))};s.forEach(q=>v(q)),this.queList=f,this.canReferQueList=this.queList.filter(q=>!this.invalidReferQueTypes.includes(q.queType)&&!q.supId&&q.queId!==ue.APPLY_ID),i()})})}getAllAppList(){this.appFormEditSrv.getAppList().subscribe(t=>{this.appList=t})}setQueTitleAndQueType(t){let e=this.queList.find(i=>i.queId===t.queId)||this.queListIncludeSection.find(i=>i.queId===t.queId);return e&&(t.queTitle=e.queTitle,t.queType=e.queType,t.queType===h.SECTION?t.innerQues.forEach(i=>this.setQueTitleAndQueType(i)):t.queType===h.TABLE&&t.subQues.forEach(i=>this.setQueTitleAndQueType(i))),t}openAuthSetModal(){let t=this.editQue.referenceConfig.referAuthQues.filter(e=>e.queId!==ue.APPLY_ID);console.log(t),this.modalService.open({content:hr,componentParams:{authQues:t},size:"medium",reminders:[{text:"\u5728\u586B\u5199\u65F6/\u67E5\u770B\u539F\u6570\u636E\u65F6\uFF0C\u53EF\u4EE5\u67E5\u770B\u6307\u5B9A\u7684\u5B57\u6BB5"}],title:this.translateService.instant("widgetHelp.quoteFieldAuth"),onOk:e=>{fn(t,e.authQuesDraft)||this.widgetChangeService.changed.emit(),this.editQue.referenceConfig.referAuthQues=e.authQuesDraft}})}getMatchQueList(){return this.appFormEditSrv.currentQueList.filter(e=>{let i=e.queId!==this.editQue.queId,s=this.editQue.supId?this.editQue.supId===e.supId:!e.supId;return i&&s})}getTargetQues(){return this.queList.filter(t=>!t.supId)}openQuoteFilterModal(){let t=this.appFormEditSrv.getMatchQueList(this.editQue).concat([{queId:ue.APPLY_ID,queTitle:"widgets.applyId",queType:h.NUMBER}]),e=this.editQue.referenceConfig.referMatchRules;this.modalService.open({content:An,maskClosable:!1,componentParams:{isInQuoteSource:!0,targetQues:this.queList.filter(i=>!i.supId&&![h.UPLOAD,h.RICHTEXT].includes(i.queType)),matchQues:t,matchRules:e,copyPasteCond:"quoteFilter",canMultipleMatch:!0},title:this.translateService.instant("all.dataFilter"),size:"large",footer:null,onOk:i=>{let s=i.getSubmitErrors();if(s.length){for(let v of s){let q={noEmpty:"all.conditionValueIsRequired",numericOnly:"all.enterNumbers"};this.qfMessageService.error(this.translateService.instant(q[v]))}return!1}let{matchRule:f}=i.formValue;this.editQue.referenceConfig.referMatchRules=f,fn(e,f)||this.widgetChangeService.changed.emit()}})}openFillRulesModal(){let t=this.getMatchQueList(),e=this.getTargetQues(),i=this.editQue.referenceConfig.referFillRules;this.modalService.open({content:_r,componentParams:{targetQues:e,matchQues:t,fillRules:i,editQue:this.editQue},title:this.translateService.instant("widgetHelp.quoteFillField"),size:"large",reminders:[{text:"\u5C06\u5DF2\u9009\u6570\u636E\u7684\u503C\uFF0C\u6309\u4EE5\u4E0B\u89C4\u5219\u7ED9\u5F53\u524D\u8868\u5355\u5B57\u6BB5\u586B\u5145\u6570\u636E"},{text:"\u586B\u5145\u7684\u6570\u636E\u4E0D\u4F1A\u968F\u6E90\u8868\u81EA\u52A8\u66F4\u65B0"}],onOk:s=>{let f=s.formValue;this.editQue.referenceConfig.referFillRules=f,this.widgetChangeService.changed.emit()}})}constructor(t,e,i,s,f,v){this._appItemService=t,this.modalService=e,this.translateService=i,this.appFormEditSrv=s,this.widgetChangeService=f,this.qfMessageService=v,this._takeUntilDestroyed=gi(),this._editQue=ii(null),this.maxReferQueLength=4,this.invalidReferQueTypes=[h.SECTION,h.QLINKER,h.CODEBLOCK,h.OCR,h.TABLE,h.DESCRIPTION,h.REFER,h.EMBED],this.queList=[],this.canReferQueList=[],this.queListIncludeSection=[],this.quoteQuestions=[],this.clickSaveDuringEdit=ii(!1),this.disableEdit=so(()=>!!this.editQue.queId||this.clickSaveDuringEdit()),this.defaultValChange=new R}};a.\u0275fac=function(e){return new(e||a)(T(Dn),T(Pe),T(X),T(ee),T(N),T(ye))},a.\u0275cmp=P({type:a,selectors:[["qf-quote-source"]],inputs:{editQue:"editQue"},outputs:{defaultValChange:"defaultValChange"},decls:11,vars:14,consts:[["buttonMenu","qfDropdownMenu"],[1,"widget-edit-share"],[1,"widget-edit-title"],[3,"hintMsg"],[1,"associate-set-item",3,"ngModelChange","qfDisabled","qf
12ShowSearch","qfPlaceHolder","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"qfLabel","qfValue"],[3,"ngModelChange","ngModel"],["qf-radio","",3,"qfValue"],["qf-button","","qfBlock","","qf-dropdown","","qfType","dashed","qfClickHide","false","qfTrigger","click",3,"disabled","qfDisabled","qfDropdownMenu"],["qf-dropdown-menu","","qf-menu","",2,"background-clip","border-box"],["class","flex cursor-pointer items-center rounded-small p-8 hover:bg-10",3,"click",4,"ngFor","ngForOf"],["qf-menu-item","","nzDisabled","",4,"ngIf"],["cdkDropList","",1,"mt-4",3,"cdkDropListDropped"],["cdkDrag","","class","mb-4 flex h-[36px] items-center rounded-small border border-10 bg-white px-8",4,"ngFor","ngForOf"],["qf-button","","qfBlock","","qfType","dashed",3,"click"],["qf-input","",3,"ngModelChange","placeholder","ngModel"],[1,"filter-info",2,"margin-top","10px"],[3,"matchRules"],["class","results-wrapper cond-info-wrap",4,"ngIf"],[1,"refer-tip"],["qfHelpDocName","referDftDetail"],[1,"flex","cursor-pointer","items-center","rounded-small","p-8","hover:bg-10",3,"click"],[1,"flex-1","truncate"],["qf-icon","","qfName","ex-check","class","text-brand-primary",4,"ngIf"],["qf-icon","","qfName","ex-check",1,"text-brand-primary"],["qf-menu-item","","nzDisabled",""],["cdkDrag","",1,"mb-4","flex","h-[36px]","items-center","rounded-small","border","border-10","bg-white","px-8"],[1,"flex-1","truncate","pr-4"],["qf-button","","qfType","text","qfIcon","ex-delete","qfSize","small",3,"click"],["cdkDragHandle","","qf-button","","qfType","text","qfIcon","ex-list-move","qfSize","small",1,"ml-4","!cursor-move"],[1,"results-wrapper","cond-info-wrap"],[4,"ngFor","ngForOf"],[1,"text-gray-70"]],template:function(e,i){e&1&&(p(0,"div",1)(1,"div",2)(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",3),m(6,"translate"),c(),p(7,"qf-select",4),m(8,"translate"),O("ngModelChange",function(f){return E(i.editQue.referenceConfig.referAppKey,f)||(i.editQue.referenceConfig.referAppKey=f),f}),y("ngModelChange",function(f){return i.quotedAppChange(f)}),x(9,mC,1,2,"qf-option",5),c()(),x(10,yC,85,75,"ng-container",6)),e&2&&(r(3),w(u(4,8,"widgetHelp.quoteSource")),r(2),l("hintMsg",u(6,10,"widgetHelp.quoteSourceEditTip")),r(2),l("qfDisabled",i.disableEdit())("qfShowSearch",!i.disableEdit())("qfPlaceHolder",u(8,12,"all.relateApp")),I("ngModel",i.editQue.referenceConfig.referAppKey),r(2),l("ngForOf",i.appList),r(),l("ngIf",i.editQue.referenceConfig.referAppKey))},dependencies:[B,A,le,V,Q,Dt,Pt,Ot,Ci,vi,yi,_i,vn,he,oe,ne,K,ce,Mi,qi,G,Ge,Qn,k],styles:[".results-wrapper[_ngcontent-%COMP%]{margin-top:10px}.cond-info-wrap[_ngcontent-%COMP%]{padding:5px 16px;font-weight:400;line-height:25px;color:#2b3441;background-color:#2b34410d;border-radius:4px}.widget-edit-share[_ngcontent-%COMP%] qf-radio-group[_ngcontent-%COMP%]{width:100%}.widget-edit-share[_ngcontent-%COMP%] qf-radio-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-right:24px;font-size:14px;color:#494f57}.refer-tip[_ngcontent-%COMP%]{margin-top:4px;font-size:13px;line-height:20px;color:#acb3bd}"]});let n=a;return n})();function vC(n,a){if(n&1&&b(0,"qf-option",9),n&2){let o=a.$implicit;l("qfLabel",o.appKey?o.formTitle:o.queTitle)("qfValue",o)}}function xC(n,a){n&1&&(b(0,"i",15),m(1,"translate")),n&2&&l("qfTooltipTitle",u(1,1,"all.fieldDesensitized"))}function bC(n,a){n&1&&(p(0,"qf-tag",14),g(1),m(2,"translate"),c()),n&2&&(r(),w(u(2,1,"all.systemFieldShort")))}function TC(n,a){if(n&1&&(p(0,"qf-option",10),m(1,"queDisplayTitle"),p(2,"span",11)(3,"span")(4,"span",12),g(5),m(6,"queDisplayTitle"),c(),x(7,xC,2,3,"i",13),c(),x(8,bC,3,3,"qf-tag",14),c()()),n&2){let o=a.$implicit,t=d();l("qfLabel",t.beingNil(o.queId)?o.qlinkerAlias:u(1,5,o))("qfValue",o),r(5),M(" ",t.beingNil(o.queId)?o.qlinkerAlias:u(6,7,o)," "),r(2),l("ngIf",t.beingNil(o.queId)?!1:o.beingDesensitized),r(),Ae(t.isSystemFields(o.queId)?8:-1)}}function SC(n,a){n&1&&(b(0,"i",19),m(1,"translate")),n&2&&l("qfTooltipTitle",u(1,1,"all.fieldDesensitized"))}function wC(n,a){if(n&1&&(p(0,"div",16)(1,"div",17),g(2),c(),x(3,SC,2,3,"i",18),c()),n&2){let o=a.$implicit,t=d();r(2),w(o.qfLabel),r(),l("ngIf",t.beingNil(o.qfValue.queId)?!1:o.qfValue.beingDesensitized)}}function MC(n,a){n&1&&(p(0,"p",20),g(1),m(2,"translate"),p(3,"a",21),g(4),m(5,"translate"),c()()),n&2&&(r(),M(" ",u(2,2,"all.filteringOnTheSameTable")," "),r(3),w(u(5,4,"all.examples")))}var zc=(()=>{let a=class a{get editQue(){return this._data}set editQue(t){this._data=t}get assoQue(){return this._assoQue}set assoQue(t){this.currentEditSrv.targetQue=t,this._assoQue=t}get editQueId(){return this.editQue.queId===0?this.editQue.queTempId:this.editQue.queId}get queRelation(){return this.appFormEditSrv.queRelationsMap.get(this.editQueId)}initData(){this.appFormEditSrv.getAppList().subscribe(t=>{this.resetValues();let e=this.appFormEditSrv.currentQueList.filter(i=>i.queId!==0&&[h.QLINKER,h.CODEBLOCK].includes(i.queType));if(this.appList=[...e,...t],this.initRelatedApp(),this.assoApp){if(this.assoApp.appKey)this.appFormEditSrv.getQueList(this.assoApp.appKey).subscribe(i=>{this.setRelatedQueList(i),this.initRelatedQue();let s=this.queRelation.displayedQueInfo||this.queRelation.aliasConfig;if(this.editQue.queType===h.DATA_RELATION){let f=null,v=function(q){var D,F;for(let H of q)if(((D=H.innerQuestions)==null?void 0:D.length)>0&&v(H.innerQuestions),((F=H.subQuestions)==null?void 0:F.length)>0&&v(H.subQuestions),H.queId===s.queId){f=H;break}};v(i),this.editQue.queOriginType=f?f.queOriginType||f.queType:null}});else if(this.assoApp.queId){let i=e.find(s=>
12s.queId===this.assoApp.queId);i.queType===h.QLINKER?i.remoteLookupConfig.resultFormatPath=Yi(i.remoteLookupConfig.resultFormatPath):i.queType===h.CODEBLOCK&&(i.codeBlockConfig.resultAliasPath=Yi(i.codeBlockConfig.resultAliasPath)),this.setRelatedQueList(i),this.initRelatedQue()}}})}initRelatedApp(){if(!this.appFormEditSrv.queRelationsMap.has(this.editQueId))return;let{displayedQueInfo:t,aliasConfig:e}=this.queRelation;t?this.currentRelateType=ve.app:e&&(this.currentRelateType=ve.qLinker);let i=this.appList.find(s=>this.currentRelateType===ve.app?t.appKey===s.appKey:this.currentRelateType===ve.qLinker?e.queId===s.queId:(t==null?void 0:t.appKey)===s.appKey);this.preAssosApp=i,this.assoApp=i}initRelatedQue(){for(let t of this.targetQueList)if(!Oe(this.queRelation.displayedQueId)&&t.queId===this.queRelation.displayedQueId){this.assoQue=t;break}else if(!Oe(this.queRelation.aliasConfig)&&t.qlinkerAlias===this.queRelation.qlinkerAlias){this.assoQue=t;break}else if(!Oe(this.queRelation.aliasConfig)&&t.aliasId===this.queRelation.aliasConfig.aliasId){this.assoQue=t;break}}relatedAppChange(t){if(t.appKey&&(!this.preAssosApp||t.appKey!==this.preAssosApp.appKey))this.preAssosApp=t,this.appFormEditSrv.getQueList(this.assoApp.appKey).subscribe(e=>{this.currentRelateType=ve.app,this.setRelatedQueList(e),this.assoQue=this.targetQueList[0],this.queRelation&&(this.queRelation.matchRules=[]),this.setRelatedAppQue(this.assoQue)}),this.widgetChange.changed.emit(!0);else if(t.queId&&(!this.preAssosApp||t.queId!==this.preAssosApp.queId)){let e=t.queType===h.QLINKER;this.currentRelateType=e?ve.qLinker:ve.codeBlock;let i=e?t.remoteLookupConfig.resultFormatPath:t.codeBlockConfig.resultAliasPath,s=Yi(i),f=s;this.editQue.queType===h.DATA_RELATION&&(f=s.filter(v=>v.aliasType===lt.BASIC)),this.setRelatedQueList(f),this.assoQue=this.targetQueList[0],this.queRelation&&(this.queRelation.matchRules=[]),this.setRelatedAppQue(this.assoQue)}}relatedAppQueChange(t){this.appFormEditSrv.tableDftValueQueAppChanged(this.editQue);let e=this.currentEditSrv.targetQue;if(this.resetMatchRules(e,t)){let i=this.translate.instant("all");this.modalHelper.confirm({qfTitle:`${i.confirmSwitch} ?`,qfContent:i.confirmSwitchHint,qfType:"danger"},()=>{this.queRelation.matchRules=[],this.setRelatedAppQue(t)},{closable:!1,onCancel:()=>this.assoQue=e}).subscribe()}else this.setRelatedAppQue(t)}setRelatedAppQue(t){if(this.currentEditSrv.editQue.aggreType=null,Oe(t))return;let e=this.appFormEditSrv.queRelationsMap;if(this.currentRelateType===ve.app){if(this.editQue.relatedQueId=t.queId,this.editQue.queOriginType=t.queType===h.DATA_RELATION?t.queOriginType:t.queType,e.has(this.editQueId)){let i=e.get(this.editQueId);i.qlinkerAlias=null,i.aliasConfig=null,i.relationType=this.currentRelateType,i.displayedQueId=t.queId,i.displayedQueInfo={appKey:this.assoApp.appKey,appTitle:this.assoApp.formTitle,queId:t.queId,queTitle:t.queTitle,queType:t.queType}}else this.appFormEditSrv.appFormData.questionRelations.push({queId:this.editQueId,relationType:this.currentRelateType,displayedQueId:t.queId,displayedQueInfo:{appKey:this.assoApp.appKey,appTitle:this.assoApp.formTitle,queId:t.queId,queTitle:t.queTitle,queType:t.queType},matchRules:[],tableMatchRules:[],matchRuleType:1});this.widgetChange.changed.emit(!0)}else{if(this.editQue.queOriginType=this.currentRelateType===ve.qLinker?h.QLINKER:h.CODEBLOCK,e.has(this.editQueId)){let i=e.get(this.editQueId);i.matchRules=[],i.displayedQueInfo=null,i.displayedQueId=null,i.relationType=this.currentRelateType,i.qlinkerAlias=t.qlinkerAlias,i.aliasConfig={queId:this.assoApp.queId,queTitle:this.assoApp.queTitle,qlinkerAlias:i.qlinkerAlias,aliasId:t.aliasId}}else this.appFormEditSrv.appFormData.questionRelations.push({queId:this.editQueId,relationType:this.currentRelateType,qlinkerAlias:t.qlinkerAlias,aliasConfig:{queId:this.assoApp.queId,queTitle:this.assoApp.queTitle,qlinkerAlias:t.qlinkerAlias,aliasId:t.aliasId},matchRules:[],tableMatchRules:[],matchRuleType:1});this.widgetChange.changed.emit(!0)}}resetMatchRules(t,e){var i,s;return Oe(t)||Oe(t.supId)&&Oe(e.supId)||t.supId&&e.supId&&t.supId===e.supId||t.supId&&Oe(e.supId)?!1:((s=(i=this.queRelation)==null?void 0:i.matchRules)==null?void 0:s.length)!==0}resetValues(){this.assoApp=void 0,this.preAssosApp=void 0,this.assoQue=void 0,this.targetQueList=void 0}setRelatedQueList(t){if(Array.isArray(t))this.currentEditSrv.targetQueList=t,this.targetQueList=Fl(this.currentEditSrv.targetQueList).filter(e=>e.qlinkerAlias||[h.INPUT,h.ENCRYPTED_TEXT,h.TEXTAREA,h.NUMBER,h.LINK,h.DATE,h.DATE_RANGE,h.PHONE,h.EMAIL,h.RADIO,h.CHECKBOX,h.SELECT,h.IMAGE_PICKER,h.ADDRESS,h.LOCATION,h.MEMBER,h.DEPARTMENT,h.DATA_RELATION].includes(e.queType)).filter(e=>![ue.APPLY_ID].includes(e.queId));else{let e=t,i=e.queType===h.QLINKER?e.remoteLookupConfig.resultFormatPath:e.codeBlockConfig.resultAliasPath,s=i;this.editQue.queType===h.DATA_RELATION&&(s=i.filter(f=>f.aliasType===lt.BASIC)),this.currentEditSrv.targetQueList=s,this.targetQueList=Al(this.currentEditSrv.targetQueList)}this.currentEditSrv.changeTargetQuestion$.next()}constructor(t,e,i,s,f){this.appFormEditSrv=t,this.widgetChange=e,this.modalHelper=i,this.translate=s,this.currentEditSrv=f,this.unsubscribe$=new fe,this.isSystemFields=un,this.beingNil=Oe}ngOnInit(){this.currentEditSrv.editQueChange.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.initData()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(N),T(vt),T(X),T(ke))},a.\u0275cmp=P({type:a,selectors:[["qf-set-associate-data"]],inputs:{editQue:"editQue"},decls:16,vars:20,consts:[["customSelected",""],[1,"data-associate-set","widget-edit"],[1,"widget-edit-title"],[1,"!m-0",3,"hintMsg"],[1,"associate-set-item",3,"ngModelChange","qfPlaceHolder","qfShowSearch","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],[1,"associate-set-item",3,"ngModelChange","qfPlaceHolder","qfShowSearch","qfCustomTemplate","ngModel"],["qfCustomContent","",3,"qfLabel","qfValue",4,"ngFor","ngForOf"],["class","qfont-gray-frequent",4,"ngIf"],[3,"qfLabel","qfValue"],["qfCustomContent","",3,"qfLabel","qfValue"],[1,"flex","flex-1","items-center","justify-between"],[1,"line-clamp-1","text-ellipsis"],["class","ml-4 text-h4 text-70","qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",3,"qfTooltipTitle",4,"ngIf"],["qfSize","tiny","qfColor","orange10"],["qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",1,"ml-4","text-h4","text-70",3,"qfTooltipTitle"],[1,"related-lablel"],[1,"content"],["qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",3,"qfTooltipTitle",4,"ngIf"],["qf-icon","","qf-tooltip","","qfName","ex-locked","qfTooltipPlacement","bottom",3,"qfTooltipTitle"],[1,"qfont-gray-frequent"],["qfHelpDocName","dftAssociateData"]],template:function(e,i){if(e&1){let s=S();p(0,"div",1)(1,"p",2)(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",3),m(6,"translate"),p(7,"qf-select",4),m(8,"translate"),O("ngModelChange",function(v){return _(s),E(i.assoApp,v)||(i.assoApp=v),C(v)}),y("ngModelChange",function(v){return _(s),C(i.relatedAppChange(v))}),x(9,vC,1,2,"qf-option",5),c(),p(10,"qf-select",6),m(11,"translate"),O("ngModelChange",function(v){return _(s),E(i.assoQue,v)||(i.assoQue=v),C(v)}),y("ngModelChange",function(v){return _(s),C(i.relatedAppQueChange(v))}),x(12,TC,9,9,"qf-option",7)(13,wC,4,2,"ng-template",null,0,te),c(),x(15,MC,6,6,"p",8),c()}if(e&2){let s=W(14);r(3),w(u(4,12,"all.settings")),r(2),l("hintMsg",u(6,14,"all.associatedSettingsHint")),r(2),l("qfPlaceHolder",u(8,16,"all.relateApp"))("qfShowSearch",!0),I("ngModel",i.assoApp),r(2),l("ngForOf",i.appList),r(),l("qfPlaceHolder",u(11,18,"all.selectAssociatedField"))("qfShowSearch",!0)("qfCustomTemplate",s),I("ngModel",i.assoQue),r(2),l("ngForOf",i.targetQueList),r(3),l("ngIf",i.assoQue&&!!i.assoQue.supId)}},dependencies:[B,A,V,Q,oe,ne,ce,bi,G,Ge,Tn,k,it],encapsulation:2});let n=a;return n})();var qC=n=>({num:n});function IC(n,a){if(n&1&&(p(0,"div",5),g(1),m(2,"translate"),c()),n&2){let o=d(2);r(),M(" ",zt(2,1,"widgets.smsRemains",at(4,qC,o.smsNumLeft))," ")}}function EC(n,a){n&1&&(p(0,"div",5),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"widgets.smsRunsOut")," "))}function OC(n,a){if(n&1&&(j(0),x(1,IC,3,6,"div",4)(2,EC,3,3,"div",4),U()),n&2){let o=d();r(),l("ngIf",o.accountInfo&&o.smsNumLeft>0),r(),l("ngIf",o.accountInfo&&o.smsNumLeft<=0)}}var Wc=(()=>{let a=class a{change(){this.widgetChange.changed.emit()}constructor(t,e){this.wsRequest=t,this.widgetChange=e,this.smsNumLeft=0}ngOnInit(){this.wsRequest.getWsAccountInfo().subscribe(t=>{this.accountInfo=t,this.smsNumLeft=this.accountInfo.canMsgNum-this.accountInfo.currentMsgNum})}};a.\u0275fac=function(e){return new(e||a)(T(mi),T(N))}
12,a.\u0275cmp=P({type:a,selectors:[["qf-sms-verification"]],inputs:{data:"data"},decls:8,vars:8,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"],[4,"ngIf"],["class","hint widget-edit-detail",4,"ngIf"],[1,"hint","widget-edit-detail"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.data.msgValidateStatus,f)||(i.data.msgValidateStatus=f),f}),y("ngModelChange",function(){return i.change()}),p(2,"span"),g(3),m(4,"translate"),c()(),b(5,"qf-hint-msg",2),m(6,"translate"),x(7,OC,3,2,"ng-container",3),c()),e&2&&(r(),I("ngModel",i.data.msgValidateStatus),r(2),w(u(4,4,"widgets.smsVerification")),r(2),l("hintMsg",u(6,6,"widgetHelp.smsVerification")),r(2),l("ngIf",i.data.msgValidateStatus))},dependencies:[A,V,Q,se,G,k],styles:[".hint[_ngcontent-%COMP%]{margin-top:8px;font-size:13px;color:#acb3bd}"]});let n=a;return n})();function PC(n,a){n&1&&(p(0,"div",6)(1,"div"),g(2),m(3,"translate"),c()()),n&2&&(r(2),w(u(3,1,"all.numericFieldHint1")))}function DC(n,a){n&1&&(p(0,"div",6)(1,"div",7),g(2),m(3,"translate"),c()()),n&2&&(r(2),M(" ",u(3,1,"all.onlySupportMobileDevices")," "))}function kC(n,a){if(n&1){let o=S();p(0,"div",0)(1,"div",2)(2,"span"),g(3),m(4,"translate"),c(),b(5,"qf-hint-msg",3),m(6,"translate"),c(),p(7,"input",4),m(8,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.que.queHint,e)||(i.que.queHint=e),C(e)}),y("ngModelChange",function(){_(o);let e=d();return C(e.hintChange())}),c()()}if(n&2){let o=d();r(3),w(u(4,4,"widgets.hint")),r(2),l("hintMsg",u(6,6,"widgetHelp.hint")),r(2),l("placeholder",u(8,8,"widgets.hintContent")),I("ngModel",o.que.queHint)}}var Hc=(()=>{let a=class a{constructor(t){this.widgetChange=t,this.QueType=h}titleChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"title",question:this.que})}hintChange(){this.widgetChange.changed.emit(!0),this.widgetChange.syncForm$.emit({type:"hint",question:this.que})}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-title-and-hint"]],inputs:{que:"que"},decls:13,vars:13,consts:[[1,"widget-edit-share"],["class","hint-content-area",4,"ngIf"],[1,"widget-edit-title"],[3,"hintMsg"],["qf-input","","maxlength","400",3,"ngModelChange","placeholder","ngModel"],["class","widget-edit-share",4,"ngIf"],[1,"hint-content-area"],[1,"limit-tip"]],template:function(e,i){e&1&&(p(0,"div",0),x(1,PC,4,3,"div",1)(2,DC,4,3,"div",1),c(),p(3,"div",0)(4,"div",2)(5,"span"),g(6),m(7,"translate"),c(),b(8,"qf-hint-msg",3),m(9,"translate"),c(),p(10,"input",4),m(11,"translate"),O("ngModelChange",function(f){return E(i.que.queTitle,f)||(i.que.queTitle=f),f}),y("ngModelChange",function(){return i.titleChange()}),c()(),x(12,kC,9,10,"div",5)),e&2&&(r(),l("ngIf",i.que.queType===i.QueType.NUMBER),r(),l("ngIf",i.que.queType===i.QueType.LOCATION),r(4),w(u(7,7,"common.title")),r(2),l("hintMsg",u(9,9,"widgetHelp.title")),r(2),l("placeholder",u(11,11,"all.title")),I("ngModel",i.que.queTitle),r(2),l("ngIf",i.que.queType!==i.QueType.DESCRIPTION))},dependencies:[A,le,V,Ue,Q,he,G,k],styles:[".limit-tip[_ngcontent-%COMP%]{font-size:14px}"]});let n=a;return n})();var jc=(()=>{let a=class a{referfenceViewChange(){this.widgetChange.changed.emit(!0)}constructor(t){this.widgetChange=t}};a.\u0275fac=function(e){return new(e||a)(T(N))},a.\u0275cmp=P({type:a,selectors:[["qf-view-process-logs"]],inputs:{data:"data"},decls:6,vars:7,consts:[["qf-checkbox","",3,"ngModelChange","ngModel"],[3,"hintMsg"]],template:function(e,i){e&1&&(p(0,"label",0),O("ngModelChange",function(f){return E(i.data.referenceConfig.canViewProcessLog,f)||(i.data.referenceConfig.canViewProcessLog=f),f}),y("ngModelChange",function(){return i.referfenceViewChange()}),p(1,"span"),g(2),m(3,"translate"),c()(),b(4,"qf-hint-msg",1),m(5,"translate")),e&2&&(I("ngModel",i.data.referenceConfig.canViewProcessLog),r(2),w(u(3,3,"all.viewProcessLog")),r(2),l("hintMsg",u(5,5,"all.viewProcessLogTip")))},dependencies:[V,Q,se,G,k],encapsulation:2});let n=a;return n})();function VC(n,a){if(n&1){let o=S();p(0,"div",3)(1,"nz-input-number",4),m(2,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.que.maxFileLimit,e)||(i.que.maxFileLimit=e),C(e)}),c()()}if(n&2){let o=d();r(),l("nzMin",1)("nzMax",2e3)("nzPlaceHolder",u(2,4,"all.inputANumber")),I("ngModel",o.que.maxFileLimit)}}var Uc=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["qf-file-count-limit"]],inputs:{que:"que"},decls:6,vars:5,consts:[[1,"widget-edit"],["qf-checkbox","",3,"ngModelChange","ngModel"],["class","file-count-limit-input widget-edit-detail",4,"ngIf"],[1,"file-count-limit-input","widget-edit-detail"],[3,"ngModelChange","nzMin","nzMax","nzPlaceHolder","ngModel"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"label",1),O("ngModelChange",function(f){return E(i.que.maxFileLimitStatus,f)||(i.que.maxFileLimitStatus=f),f}),p(2,"span"),g(3),m(4,"translate"),c()(),x(5,VC,3,6,"div",2),c()),e&2&&(r(),I("ngModel",i.que.maxFileLimitStatus),r(2),w(u(4,3,"all.fileSetting3")),r(2),l("ngIf",i.que.maxFileLimitStatus))},dependencies:[A,V,Q,se,Xt,k],styles:[".file-count-limit-input[_ngcontent-%COMP%] nz-input-number[_ngcontent-%COMP%]{width:100%}"]});let n=a;return n})();function QC(n,a){n&1&&(p(0,"span",9),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.pleaseSelectFormationType")," "))}function AC(n,a){n&1&&(p(0,"span",10),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.formationTypeTip1")," "))}function FC(n,a){n&1&&(p(0,"span",10),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.setTheSubmissionDate")," "))}function RC(n,a){n&1&&(p(0,"span",10),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.formationTypeTip")," "))}function NC(n,a){n&1&&(p(0,"span",10),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.takeTheValueOfField")," "))}function BC(n,a){if(n&1&&b(0,"qf-option",12),n&2){let o=d().$implicit;l("qfLabel",o.title)("qfValue",o.value)}}function LC(n,a){if(n&1&&(j(0),x(1,BC,1,2,"qf-option",11),U()),n&2){let o=a.$implicit,t=d();r(),l("ngIf",o.value!==1||t.editingSerialNum.type===1)}}function zC(n,a){if(n&1&&b(0,"qf-option",12),n&2){let o=a.$implicit;l("qfLabel",o)("qfValue",o)}}function WC(n,a){if(n&1&&(b(0,"qf-option",12),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.title))("qfValue",o.value)}}function HC(n,a){if(n&1){let o=S();j(0),p(1,"nz-form-item")(2,"nz-form-label"),g(3),m(4,"translate"),b(5,"br"),p(6,"span",10),g(7),m(8,"translate"),c()(),p(9,"nz-form-control")(10,"qf-select",13),O("ngModelChange",function(e){_(o);let i=d();return E(i.editingSerialNum.length,e)||(i.editingSerialNum.length=e),C(e)}),x(11,zC,1,2,"qf-option",14),c()()(),p(12,"nz-form-item")(13,"nz-form-label"),g(14),m(15,"translate"),c(),p(16,"nz-form-control")(17,"qf-select",15),O("ngModelChange",function(e){_(o);let i=d();return E(i.editingSerialNum.repeatPeriod,e)||(i.editingSerialNum.repeatPeriod=e),C(e)}),x(18,WC,2,4,"qf-option",14),c()()(),U()}if(n&2){let o=d();
12r(3),M(" ",u(4,7,"all.digitNumber")," "),r(4),M(" ",u(8,9,"all.numberOfDigitsIsTooSmall")," "),r(3),I("ngModel",o.editingSerialNum.length),r(),l("ngForOf",o.serialNumlength),r(3),w(u(15,11,"all.resetCycle")),r(3),I("ngModel",o.editingSerialNum.repeatPeriod),r(),l("ngForOf",o.repeatPeriod)}}function jC(n,a){n&1&&(p(0,"span",9),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.charactersAtMost")," "))}function UC(n,a){n&1&&(p(0,"span",9),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.pleaseInputCharacters")," "))}function KC(n,a){if(n&1){let o=S();p(0,"nz-form-item")(1,"nz-form-label"),g(2),m(3,"translate"),x(4,jC,3,3,"span",2)(5,UC,3,3,"span",2),c(),p(6,"nz-form-control")(7,"input",16),m(8,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.editingSerialNum.customTitle,e)||(i.editingSerialNum.customTitle=e),C(e)}),c()()()}if(n&2){let o=d();r(2),M(" ",u(3,5,"all.characters")," "),r(2),l("ngIf",o.errorType==="tooLongCustomTitle"),r(),l("ngIf",o.errorType==="noCustomTitle"),r(2),l("placeholder",u(8,7,"all.inputNoMoreThan20Characters")),I("ngModel",o.editingSerialNum.customTitle)}}function GC(n,a){n&1&&(p(0,"span",9),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.selectField")," "))}function $C(n,a){if(n&1&&b(0,"qf-option",12),n&2){let o=a.$implicit;l("qfLabel",o.queTitle)("qfValue",o)}}function XC(n,a){if(n&1){let o=S();p(0,"nz-form-item")(1,"nz-form-label"),g(2),m(3,"translate"),x(4,GC,3,3,"span",2),c(),p(5,"nz-form-control")(6,"qf-select",17),m(7,"translate"),O("ngModelChange",function(e){_(o);let i=d();return E(i.selectedQue,e)||(i.selectedQue=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.changeQue(e))}),x(8,$C,1,2,"qf-option",14),c()()()}if(n&2){let o=d();r(2),M(" ",u(3,5,"all.selectAField")," "),r(2),l("ngIf",o.errorType==="noQuestion"),r(2),l("qfPlaceHolder",u(7,7,"all.select")),I("ngModel",o.selectedQue),r(2),l("ngForOf",o.questions)}}function YC(n,a){if(n&1&&(b(0,"qf-option",12),m(1,"translate")),n&2){let o=a.$implicit;l("qfLabel",u(1,2,o.title))("qfValue",o.value)}}function JC(n,a){n&1&&(p(0,"span",20),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.previewDateY")," "))}function ZC(n,a){n&1&&(p(0,"span",20),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.previewDateYM")," "))}function e1(n,a){n&1&&(p(0,"span",20),g(1),m(2,"translate"),c()),n&2&&(r(),M(" ",u(2,1,"all.previewDateYMD")," "))}function t1(n,a){if(n&1){let o=S();p(0,"nz-form-item")(1,"nz-form-label"),g(2),m(3,"translate"),c(),p(4,"nz-form-control")(5,"qf-select",18),O("ngModelChange",function(e){_(o);let i=d();return E(i.editingSerialNum.dateFormat,e)||(i.editingSerialNum.dateFormat=e),C(e)}),x(6,YC,2,4,"qf-option",14),c(),x(7,JC,3,3,"span",19)(8,ZC,3,3,"span",19)(9,e1,3,3,"span",19),c()()}if(n&2){let o=d();r(2),w(u(3,6,"all.dateUnit")),r(3),I("ngModel",o.editingSerialNum.dateFormat),r(),l("ngForOf",o.dateFormatConf),r(),l("ngIf",o.editingSerialNum.dateFormat===1),r(),l("ngIf",o.editingSerialNum.dateFormat===2),r(),l("ngIf",o.editingSerialNum.dateFormat===3)}}var Cr=(()=>{let a=class a{changeQue(t){this.editingSerialNum.queId=t.queTempId,this.editingSerialNum.queTitle=t.queTitle,t.queType!==4?this.editingSerialNum.dateFormat=null:this.editingSerialNum.dateFormat=3}changeType(t){t===4&&!this.questions&&this.getQues(),this.editingSerialNum={id:this.editingSerialNum.id,type:t,dateFormat:t===2?3:null,customTitle:null,queId:null},this.selectedQue=null}checkData(){return this.editingSerialNum.type?this.editingSerialNum.type===3&&ie(this.editingSerialNum.customTitle)?(this.errorType="noCustomTitle",!0):this.editingSerialNum.type===3&&this.editingSerialNum.customTitle.length>20?(this.errorType="tooLongCustomTitle",!0):this.editingSerialNum.type===4&&ie(this.editingSerialNum.queId)?(this.errorType="noQuestion",!0):!1:(this.errorType="noType",!0)}getQues(){this.questions=[];let t=Ln(this.formEditService.appFormData.formQues,[h.INPUT,h.ENCRYPTED_TEXT,h.DATE,h.NUMBER,h.RADIO,h.SELECT,h.LOCATION,h.DATA_RELATION],!0,!0);this.questions=[...t]}initSerialNumConfigType(){this.translate.currentLang==="en"?this.serialNumConfigType=ra:this.serialNumConfigType=Kn}constructor(t,e){this.formEditService=t,this.translate=e,this.dateFormatConf=sa,this.repeatPeriod=la,this.serialNumConfigType=Kn,this.serialNumlength=[3,4,5,6,7,8,9],this.serialNum={id:null,type:null}}ngOnInit(){this.editingSerialNum=je(this.serialNum),this.serialNum.type===4&&(this.getQues(),this.questions.forEach(t=>{(t.queId===this.serialNum.queId||t.queTempId===this.serialNum.queId)&&(this.selectedQue=t)})),this.initSerialNumConfigType()}};a.\u0275fac=function(e){return new(e||a)(T($e),T(X))}
12,a.\u0275cmp=P({type:a,selectors:[["qf-serial-number-edit"]],inputs:{serialNum:"serialNum"},decls:21,vars:19,consts:[[1,"modal-content"],["nz-form","","nzLayout","vertical"],["class","error-tip",4,"ngIf"],["class","length-tip",4,"ngIf"],["name","serialNumConfigType",3,"ngModelChange","qfDisabled","qfPlaceHolder","ngModel"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngIf"],[1,"error-tip"],[1,"length-tip"],[3,"qfLabel","qfValue",4,"ngIf"],[3,"qfLabel","qfValue"],["name","serialNumLength",3,"ngModelChange","ngModel"],[3,"qfLabel","qfValue",4,"ngFor","ngForOf"],["name","repeatPeriod",3,"ngModelChange","ngModel"],["qf-input","","name","customTitle",3,"ngModelChange","placeholder","ngModel"],["name","queId",3,"ngModelChange","qfPlaceHolder","ngModel"],["name","dateFormat",3,"ngModelChange","ngModel"],["class","date-preview",4,"ngIf"],[1,"date-preview"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"form",1)(2,"nz-form-item")(3,"nz-form-label"),g(4),m(5,"translate"),x(6,QC,3,3,"span",2),b(7,"br"),x(8,AC,3,3,"span",3)(9,FC,3,3,"span",3)(10,RC,3,3,"span",3)(11,NC,3,3,"span",3),c(),p(12,"nz-form-control")(13,"qf-select",4),m(14,"translate"),O("ngModelChange",function(f){return E(i.editingSerialNum.type,f)||(i.editingSerialNum.type=f),f}),y("ngModelChange",function(f){return i.changeType(f)}),x(15,LC,2,1,"ng-container",5),c()()(),j(16,6),x(17,HC,19,13,"ng-container",7)(18,KC,9,9,"nz-form-item",7)(19,XC,9,9,"nz-form-item",7),U(),x(20,t1,10,8,"nz-form-item",8),c()()),e&2&&(r(4),M(" ",u(5,15,"all.formationType")," "),r(2),l("ngIf",i.errorType==="noType"),r(2),l("ngIf",i.editingSerialNum.type===1),r(),l("ngIf",i.editingSerialNum.type===2),r(),l("ngIf",i.editingSerialNum.type===3),r(),l("ngIf",i.editingSerialNum.type===4),r(2),l("qfDisabled",i.serialNum.type===1)("qfPlaceHolder",u(14,17,"all.select")),I("ngModel",i.editingSerialNum.type),r(2),l("ngForOf",i.serialNumConfigType),r(),l("ngSwitch",i.editingSerialNum.type),r(),l("ngSwitchCase",1),r(),l("ngSwitchCase",3),r(),l("ngSwitchCase",4),r(),l("ngIf",i.editingSerialNum.type===2||(i.selectedQue==null?null:i.selectedQue.queType)===4))},dependencies:[B,A,ri,li,Ie,le,V,ge,Q,De,Ei,Ii,Pi,Oi,Lo,Di,he,oe,ne,k],styles:["[_nghost-%COMP%] .ant-form-item-label>label{flex-direction:column;align-items:flex-start;height:auto}.modal-content[_ngcontent-%COMP%]{min-height:310px;padding:15px 0}.length-tip[_ngcontent-%COMP%]{font-weight:400;color:#acb3bd}.error-tip[_ngcontent-%COMP%]{margin-left:15px;font-weight:400;color:#fb4b51}.date-preview[_ngcontent-%COMP%]{display:inline-block;margin-top:5px;color:#acb3bd}"]});let n=a;return n})();var i1=()=>[8,"esizem"];function n1(n,a){n&1&&(p(0,"div",3),g(1),m(2,"translate"),b(3,"br"),g(4," 1\u30012\u30013\u2026\u2026 99\u3001100\u2026\u2026 "),c()),n&2&&(r(),M(" ",u(2,1,"all.defaultFormatExample")," "))}function o1(n,a){if(n&1){let o=S();p(0,"i",20),y("click",function(){_(o);let e=d().index,i=d(2);return C(i.deleteRule(e))}),g(1," \uE6AE "),c()}}function a1(n,a){if(n&1&&(j(0),p(1,"p",26),g(2),m(3,"translate"),c(),p(4,"p",26),g(5),m(6,"translate"),m(7,"translate"),c(),U()),n&2){let o=d().$implicit;r(2),wt("",u(3,4,"all.digitNumber")," ",o.length,""),r(3),wt(" ",u(6,6,"all.resetCycle")," ",u(7,8,o.repeatPeriodTitle)," ")}}function r1(n,a){if(n&1&&(p(0,"p",26),g(1),c()),n&2){let o=d().$implicit;r(),M(" ",o.customTitle," ")}}function l1(n,a){if(n&1&&(p(0,"p",26),g(1),c()),n&2){let o=d().$implicit;r(),M(" ",o.queTitle," ")}}function s1(n,a){if(n&1&&(p(0,"p",26),g(1),m(2,"translate"),m(3,"translate"),c()),n&2){let o=d().$implicit;r(),wt(" ",u(2,2,"all.dateformat"),"\uFF1A ",u(3,4,o.dateFormatTitle)," ")}}function p1(n,a){if(n&1){let o=S();p(0,"div",16)(1,"div",17)(2,"span",18),g(3),c(),p(4,"span",19)(5,"i",20),y("click",function(){let e=_(o).index,i=d(2);return C(i.openSerialNumberEdit(e))}),g(6,"\uE6B2"),c(),p(7,"i",21),g(8,"\uE6E8"),c(),x(9,o1,2,0,"i",22),c()(),p(10,"div",23),x(11,a1,8,10,"ng-container",24)(12,r1,2,1,"p",25)(13,l1,2,1,"p",25)(14,s1,4,6,"p",25),c()()}if(n&2){let o=a.$implicit;r(3),w(o.typeTitle),r(6),l("ngIf",o.type!==1),r(2),l("ngIf",o.type===1),r(),l("ngIf",o.type===3),r(),l("ngIf",o.type===4),r(),l("ngIf",o.dateFormat)}}function c1(n,a){if(n&1){let o=S();p(0,"qf-function-lock",11)(1,"div",12)(2,"p"),g(3),m(4,"translate"),c(),p(5,"div",13),y("cdkDropListDropped",function(e){_(o);let i=d();return C(i.drop(e))}),x(6,p1,15,6,"div",14),c(),p(7,"button",15),y("click",function(){_(o);let e=d();return C(e.openSerialNumberEdit())}),g(8),m(9,"translate"),c()()()}if(n&2){let o=d();r(3),w(u(4,3,"all.setting")),r(3),l("ngForOf",o.serialNumConfig),r(2),M(" ",u(9,5,"all.addFormation")," ")}}var yr=(()=>{let a=class a{get serialNumType(){return this.appFormEditService.appFormData.seri
12alNumType}set serialNumType(t){this.appFormEditService.appFormData.serialNumType=t}get serialNumConfig(){return this.appFormEditService.appFormData.serialNumConfig}set serialNumConfig(t){this.appFormEditService.appFormData.serialNumConfig=t}deleteRule(t){this.serialNumConfig.splice(t,1)}parseTitle(){this.serialNumConfig.forEach(t=>{this.translate.currentLang==="en"?ra.forEach(e=>{e.value===t.type&&(t.typeTitle=e.title)}):Kn.forEach(e=>{e.value===t.type&&(t.typeTitle=e.title)}),t.dateFormat&&sa.forEach(e=>{e.value===t.dateFormat&&(t.dateFormatTitle=e.title)}),t.repeatPeriod&&(this.translate.currentLang==="en"?Mp.forEach(e=>{e.value===t.repeatPeriod&&(t.repeatPeriodTitle=e.title)}):la.forEach(e=>{e.value===t.repeatPeriod&&(t.repeatPeriodTitle=e.title)}))}),this.appFormEditService.currentQueList.forEach(t=>{this.serialNumConfig.forEach(e=>{e.queId===t.queId&&(e.queTitle=t.queTitle)})})}changeType(t){var e;if(!this.customSerialNumValidInfo.installed){this.serialNumType=1;return}if(t===2&&!((e=this.customSerialNumValidInfo)!=null&&e.valid)){this.modalInvokeSer.openFunctionLimitModal("customSerialNum",this.customSerialNumValidInfo.pluginInfo).afterOpen.subscribe(()=>this.serialNumType=1);return}t===2&&this.serialNumConfig.length===0&&(this.serialNumConfig=[{id:null,type:1,length:5,repeatPeriod:1}],this.parseTitle()),this.widgetChange.changed.emit()}openSerialNumberEdit(t=null){let e=this.translate.instant("all.serialNumberFormation");this.modalHelper.create(Cr,{serialNum:t===null?{id:null,type:null}:this.serialNumConfig[t]},{size:400,modalOptions:{title:e,onOk:i=>{if(i.checkData())return!1;let s=t===null?this.serialNumConfig.length:t;this.serialNumConfig.splice(s,1,i.editingSerialNum),this.parseTitle()}}}).subscribe()}drop(t){let{previousIndex:e,currentIndex:i}=t;e!==i&&Et(this.serialNumConfig,t.previousIndex,t.currentIndex)}constructor(t,e,i,s,f,v){this.appFormEditService=t,this.modalHelper=e,this.widgetChange=i,this.translate=s,this.pluginStatusSer=f,this.modalInvokeSer=v}ngOnInit(){this.parseTitle(),this.pluginStatusSer.isValid("customSerialNum").then(t=>this.customSerialNumValidInfo=t).catch()}};a.\u0275fac=function(e){return new(e||a)(T(ee),T(vt),T(N),T(X),T(fi),T(Ke))},a.\u0275cmp=P({type:a,selectors:[["qf-serial-number"]],decls:28,vars:28,consts:[[1,"serial-number-editor"],[1,"editor-header"],["qf-icon","","qfName","ex-number",1,"number-iconfont"],[1,"description"],[1,"serial-number-type"],["nz-form","","nzLayout","vertical"],["name","serialNumType",3,"ngModelChange","ngModel"],["qfCustomContent","",3,"qfLabel","qfValue"],[2,"width","100%",3,"qfPendantItem"],["class","description",4,"ngIf"],["pluginFuncName","customSerialNum",4,"ngIf"],["pluginFuncName","customSerialNum"],[1,"rules-edit-container"],["cdkDropList","",1,"serial-number-rules",3,"cdkDropListDropped"],["cdkDrag","","class","rule-item","cdkDragLockAxis","y",4,"ngFor","ngForOf"],["qf-button","","qfType","dashed","qfIcon","ex-plus-circle",3,"click"],["cdkDrag","","cdkDragLockAxis","y",1,"rule-item"],[1,"rule-header"],[1,"header-left"],[1,"header-right"],[1,"iconfont",3,"click"],["cdkDragHandle","",1,"iconfont","drag-icon"],["class","iconfont",3,"click",4,"ngIf"],[1,"rule-content"],[4,"ngIf"],["class","content-row",4,"ngIf"],[1,"content-row"]],template:function(e,i){e&1&&(p(0,"div",0)(1,"div",1),b(2,"i",2),p(3,"span"),g(4),m(5,"translate"),c()(),p(6,"div",3),g(7),m(8,"translate"),c(),p(9,"div",4)(10,"form",5)(11,"nz-form-item")(12,"nz-form-label"),g(13),m(14,"translate"),c(),p(15,"nz-form-control")(16,"qf-select",6),O("ngModelChange",function(f){return E(i.serialNumType,f)||(i.serialNumType=f),f}),y("ngModelChange",function(f){return i.changeType(f)}),p(17,"qf-option",7),m(18,"translate"),g(19),m(20,"translate"),c(),p(21,"qf-option",7),m(22,"translate"),p(23,"div",8),g(24),m(25,"translate"),c()()()()()()(),x(26,n1,5,3,"div",9)(27,c1,10,7,"qf-function-lock",10),c()),e&2&&(r(4),w(u(5,13,"widgets.serialNumber")),r(3),w(u(8,15,"all.serialNumberFormatTip")),r(6),M(" ",u(14,17,"all.serialNumberFormation")," "),r(3),I("ngModel",i.serialNumType),r(),l("qfLabel",u(18,19,"all.default"))("qfValue",1),r(2),M(" ",u(20,21,"all.default")," "),r(2),l("qfLabel",u(22,23,"all.userDefined"))("qfValue",2),r(2),l("qfPendantItem",Y(27,i1)),r(),M(" ",u(25,25,"all.userDefined")," "),r(2),l("ngIf",i.serialNumType===1),r(),l("ngIf",i.serialNumType===2))},dependencies:[B,A,Ie,V,ge,Q,De,Dt,Pt,Ot,Ei,Ii,Pi,Oi,Lo,Di,oe,ne,K,ce,xt,Fi,k],styles:[".serial-number-editor[_ng
12content-%COMP%]{background:#fff;border-radius:4px;box-shadow:0 4px 10px #0c1f5014}.editor-header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px;color:#121315;border-bottom:solid 1px #F9FAFC}.editor-header[_ngcontent-%COMP%] .number-iconfont[_ngcontent-%COMP%]{font-size:16px;color:#767e89;vertical-align:middle}.editor-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 8px}.serial-number-type[_ngcontent-%COMP%]{padding:0 15px;margin:0}.serial-number-type[_ngcontent-%COMP%] nz-form-item[_ngcontent-%COMP%]{padding:0;margin:0}.rules-edit-container[_ngcontent-%COMP%]{padding:15px 15px 20px}.rules-edit-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{padding:0 0 8px;margin:0}.rules-edit-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.rule-item[_ngcontent-%COMP%]{padding:10px 15px;margin-bottom:10px;border:1px solid #f4f6f9;border-left:5px solid #fb9337;border-left:5px solid var(--brand-primary-base, #fb9337);border-radius:3px}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid #F9FAFC}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%]{display:inline-block;height:22px}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-right[_ngcontent-%COMP%]{opacity:0;transition:all .2s}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-right[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]{margin-right:10px;color:#767e89;cursor:pointer;transition:all .2s}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-right[_ngcontent-%COMP%] > .iconfont.drag-icon[_ngcontent-%COMP%]{cursor:move}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-right[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]:last-of-type{margin-right:0}.rule-item[_ngcontent-%COMP%] .rule-header[_ngcontent-%COMP%] .header-right[_ngcontent-%COMP%] > .iconfont[_ngcontent-%COMP%]:hover{color:#494f57}.rule-item[_ngcontent-%COMP%] .rule-content[_ngcontent-%COMP%]{padding-top:10px}.rule-item[_ngcontent-%COMP%] .rule-content[_ngcontent-%COMP%] > .content-row[_ngcontent-%COMP%]{margin:0;line-height:1.8;color:#767e89}.rule-item[_ngcontent-%COMP%]:hover .rule-header[_ngcontent-%COMP%] > .header-right[_ngcontent-%COMP%]{opacity:1}.description[_ngcontent-%COMP%]{padding:15px;line-height:1.8;color:#767e89}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]});let n=a;return n})();function m1(n,a){if(n&1&&(p(0,"label",5),g(1),m(2,"translate"),c()),n&2){let o=a.$implicit;l("qfValue",o.value),r(),M(" ",u(2,2,"widgets."+o.name)," ")}}function u1(n,a){if(n&1){let o=S();p(0,"div",1)(1,"p",2),g(2),m(3,"translate"),c(),p(4,"qf-radio-group",3),O("ngModelChange",function(e){_(o);let i=d();return E(i.subQueWidth,e)||(i.subQueWidth=e),C(e)}),y("ngModelChange",function(e){_(o);let i=d();return C(i.onWidthChange(e))}),x(5,m1,3,4,"label",4),c()()}if(n&2){let o=d();r(2),w(u(3,3,"widgets.subqueWidth")),r(2),I("ngModel",o.subQueWidth),r(),l("ngForOf",o.subQueWidthConfig)}}var f1=[{name:"superSmall",value:1},{name:"small",value:2},{name:"middle",value:3},{name:"large",value:4},{name:"enormous",value:5}],Kc=(()=>{let a=class a{onWidthChange(t){this.changeSubQueWidth.emit(t),this.formBaseSrv.changeSubWidthEvent.emit()}constructor(t){this.formBaseSrv=t,this.changeSubQueWidth=new R}ngOnInit(){this.subQueWidthConfig=je(f1)}};a.\u0275fac=function(e){return new(e||a)(T(Vi))},a.\u0275cmp=P({type:a,selectors:[["qf-sqbque-width"]],inputs:{subQueWidth:"subQueWidth",question:"question"},outputs:{changeSubQueWidth:"changeSubQueWidth"},decls:1,vars:1,consts:[["class","widget-edit-share",4,"ngIf"],[1,"widget-edit-share"],[1,"widget-edit-title"],["qfButtonStyle","solid",1,"width-group",3,"ngModelChange","ngModel"],["qf-radio-button","",3,"qfValue",4,"ngFor","ngForOf"],["qf-radio-button","",3,"qfValue"]],template:function(e,i){e&1&&x(0,u1,6,5,"div",0),e&2&&l("ngIf",i.subQueWidthConfig.length>1)},dependencies:[B,A,V,Q,Mi,qi,Ao,k],styles:["[_nghost-%COMP%] .ant-radio-button-wrapper{padding:0}.width-group[_ngcontent-%COMP%]{display:flex;width:100%}.width-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:1;text-align:center}.width-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .qf-radio-detail{margin:0 auto}"]});let n=a;return n})();function g1(n,a){}function h1(n,a){if(n&1&&(p(0,"div",5)(1,"div",6),b(2,"i",7),p(3,"span",8)(4,"span"),g(5),m(6,"translate"),c(),b(7,"qf-hint-msg",9),m(8,"translate"),c()(),p(9,"div",10),x(10,g1,0,0,"ng-template",11),c()()),n&2){let o=d(),t=W(3);r(2),l("qfName",o.widgetConfig.icon),r(3),w(u(6,4,o.widgetConfig.name)),r(2),l("hintMsg",o.widgetConfig?u(8,6,o.widgetConfig.helpInfo):""),r(3),l("ngTemplateOutlet",t)}}function _1(n,a){}function C1(n,a){if(n&1){let o=S();p(0,"div",12)(1,"div",13)(2,"i",14),y("click",function(){_(o);let e=d();return C(e.returnTableEdit.emit())}),c(),p(3,"span"),g(4),m(5,"translate"),c(),g(6," \xB7 "),p(7,"span"),g(8),m(9,"translate"),c()(),p(10,"div",15),x(11,_1,0,0,"ng-template",11),c()()}if(n&2){let o=d(),t=W(3);r(4),w(u(5,3,"all.table")),r(4),w(u(9,5,o.widgetConfig.name)),r(3),l("ngTemplateOutlet",t)}}function y1(n,a){if(n&1&&(b(0,"button",23),m(1,"translate")),n&2){d();let o=W(2);l("nzTooltipTitle",u(1,2,"all.switchType"))("qfDropdownMenu",o)}}function v1(n,a){if(n&1){let o=S();p(0,"qf-popconfirm-legacy",25),m(1,"translate"),m(2,"translate"),m(3,"translate"),m(4,"translate"),y("qfOnCancel",function(){_(o);let e=d(3);return C(e.cancelChangeType())})("qfOnConfirm",function(){_(o);let e=d().$implicit,i=d(2);return C(i.selectType(e))}),p(5,"li",18),b(6,"i",19),p(7,"div",20),g(8),m(9,"translate"),c()()()}if(n&2){let o=d().$implicit,t=d(2);l("qfDocLink",t.qfDocLink)("qfTitle",u(1,6,"all.confirmSwitchTo")+u(2,8,o.name)+"\uFF1F")("qfHint",u(3,10,"all.fieldConversionTips"))("qfOkText",u(4,12,"all.ok")),r(6),l("qfName",o.icon),r(2),M(" ",u(9,14,o.name)," ")}}function x1(n,a){if(n&1){let o=S();p(0,"li",26),y("click",function(){_(o);let e=d().$implicit,i=d(2);return C(i.selectType(e))}),b(1,"i",19),p(2,"div",20),g(3),m(4,"translate"),c()()}if(n&2){let o=d().$implicit;r(),l("qfName",o.icon),r(2),M(" ",u(4,2,o.name)," ")}}function b1(n,a){if(n&1&&(j(0),x(1,v1,10,16,"qf-popconfirm-legacy",24)(2,x1,5,4,"ng-template",null,2,te),U()),n&2){let o=a.$implicit,t=W(3),e=d(2);r(),l("ngIf",e.showPopconfirm&&e.supportSwitching.includes(o.queType))("ngIfElse",t)}}function T1(n,a){if(n&1&&(x(0,y1,2,4,"button",16),p(1,"qf-dropdown-menu",null,1)(3,"ul",17)(4,"li",18),b(5,"i",19),p(6,"div",20),g(7),m(8,"translate"),c(),b(9,"i",21),c(),x(10,b1,4,2,"ng-container",22),c()()),n&2){let o=d();l("ngIf",o.showChangeDropDown),r(5),l("qfName",o.widgetConfig.icon),r(2),M(" ",u(8,4,o.widgetConfig.name)," "),r(3),l("ngForOf",o.allowTypes)}}var Gc=(()=>{let a=class a{set que(t){this.curQueType=t.queType,this._que=t,this.getAllowTypes()}get que(){return this._que}_getAllowChangeTypeMap(){return new Map([[h.INPUT,[h.TEXTAREA,h.DATA_RELATION]],[h.TEXTAREA,this.isTableQue?[h.INPUT]:[h.INPUT,h.RICHTEXT]],[h.SELECT,[h.RADIO]],[h.RADIO,[h.SELECT]],[h.PHONE,[h.INPUT]],[h.DATA_RELATION,[h.INPUT]]])}getAllowTypes(){this.isTableQue=!Oe(this.que.supId);let t=this._getAllowChangeTypeMap();this.showChangeDropDown=t.has(this.que.queType),this.allowTypes=[],this.showChangeDropDown&&t.get(this.que.queType).forEach(e
12=>{this.allowTypes.push(this.widgetConfigs.get(e))})}cancelChangeType(){this.showPopconfirm=!1,this.cdr.detectChanges(),this.showPopconfirm=!0}selectType(t){this.que.queType===h.DATA_RELATION&&(this.que.queOriginType=null,this.que.aggreType=null),this.que.queType=t.queType,this.que.canScan=!1,this.que.maxWordCount=-1,this.que.minWordCount=-1,this.que.canDecimal=!0,this.que.optDirection=0,(this.curQueType===h.RADIO&&t.queType===h.CHECKBOX||this.curQueType===h.SELECT&&t.queType===h.CHECKBOX)&&(this.que.optSelectMode=1),t.queType===h.DATA_RELATION&&(this.que.queDefaultType=2,this.que.noRepeat=!1),t.queType===h.RICHTEXT&&(this.que.queDefaultValue=null,this.que.noRepeat=!1),this.formEditService.setActiveQueByKey(this.que.queTempId),this.queTypeChanged.emit(this.que),this.widgetConfig=t,this.widgetChangeService.syncForm$.next({type:"typeChange",question:this.que}),this.getAllowTypes()}constructor(t,e,i){this.formEditService=t,this.widgetChangeService=e,this.cdr=i,this.showPopconfirm=!0,this.QueType=h,this.supportSwitching=[h.INPUT,h.TEXTAREA,h.NUMBER,h.DATA_RELATION,h.RICHTEXT,h.CHECKBOX],this.widgetConfigs=sn,this.qfDocLink=zl("homePage"),this.returnTableEdit=new R,this.queTypeChanged=new R}};a.\u0275fac=function(e){return new(e||a)(T($e),T(N),T(He))},a.\u0275cmp=P({type:a,selectors:[["qf-widget-header"]],inputs:{que:"que",widgetConfig:"widgetConfig"},outputs:{returnTableEdit:"returnTableEdit",queTypeChanged:"queTypeChanged"},decls:4,vars:2,consts:[["changeType",""],["changeTypeMenu","qfDropdownMenu"],["noPopconfirm",""],["class","widget-header-container",4,"ngIf"],["class","table-edit-title",4,"ngIf"],[1,"widget-header-container"],[1,"header-left"],["qf-icon","",1,"iconfont","current-icon",3,"qfName"],[1,"widget-header-name"],[3,"hintMsg"],[1,"header-right"],[3,"ngTemplateOutlet"],[1,"table-edit-title"],[1,"table-edit-title-left"],["qf-icon","","qfIconfont","\uE606",1,"iconfont",3,"click"],[1,"table-edit-title-right"],["qf-button","","nz-tooltip","","qf-dropdown","","qfType","text","qfIcon","ex-switch","qfSize","small","nzTooltipPlacement","bottom","qfTrigger","click","qfPlacement","bottomRight",3,"nzTooltipTitle","qfDropdownMenu",4,"ngIf"],["qf-menu",""],[1,"flex","h-32","cursor-pointer","items-center","rounded-small","px-8","hover:bg-10"],["qf-icon","",1,"text-80",3,"qfName"],[1,"flex-1","truncate","px-4","text-gray-90"],["qf-icon","","qfName","ex-check",1,"text-brand-primary"],[4,"ngFor","ngForOf"],["qf-button","","nz-tooltip","","qf-dropdown","","qfType","text","qfIcon","ex-switch","qfSize","small","nzTooltipPlacement","bottom","qfTrigger","click","qfPlacement","bottomRight",3,"nzTooltipTitle","qfDropdownMenu"],["size","default","qfOkType","primary",3,"qfDocLink","qfTitle","qfHint","qfOkText","qfOnCancel","qfOnConfirm",4,"ngIf","ngIfElse"],["size","default","qfOkType","primary",3,"qfOnCancel","qfOnConfirm","qfDocLink","qfTitle","qfHint","qfOkText"],[1,"flex","h-32","cursor-pointer","items-center","rounded-small","px-8","hover:bg-10",3,"click"]],template:function(e,i){e&1&&x(0,h1,11,8,"div",3)(1,C1,12,7,"div",4)(2,T1,11,6,"ng-template",null,0,te),e&2&&(l("ngIf",!i.isTableQue),r(),l("ngIf",i.isTableQue))},dependencies:[B,A,co,Ci,vi,yi,_i,yt,K,ce,js,G,k],styles:[".widget-header-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;color:#494f57}.widget-header-container[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .iconfont[_ngcontent-%COMP%]{font-size:16px;color:#acb3bd}.widget-header-container[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .iconfont.help-info[_ngcontent-%COMP%]{cursor:pointer}.widget-header-container[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .widget-header-name[_ngcontent-%COMP%]{margin:0 8px;font-size:16px;font-weight:600}.widget-header-container[_ngcontent-%COMP%] .header-left[_ngcontent-%COMP%] .current-icon[_ngcontent-%COMP%]{font-size:16px;color:#767e89!important}.table-edit-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.table-edit-title[_ngcontent-%COMP%] .table-edit-title-left[_ngcontent-%COMP%] .iconfont[_ngcontent-%COMP%]{margin-right:9px;color:#acb3bd;cursor:pointer}"]});let n=a;return n})();var S1=["formComponent"],w1=()=>({height:"340px",padding:"60px 32px 0 32px"}),$c=()=>["example-target"],Xc=n=>[n,"ne"];function M1(n,a){if(n&1){let o=S();p(0,"div",11),m(1,"translate"),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.addQue(e.queType,null,e==null?null:e.id).catch())}),b(2,"i",12),p(3,"span"),g(4),m(5,"translate"),c()()}if(n&2){let o=d().$implicit;dt("quetype-"+o.queType),l("nzTooltipTitle",u(1,8,o.name))("ngxDraggable",Y(12,$c))("model",o)("qfPendantItem",at(13,Xc,o==null?null:o.id)),r(2),l("qfName",o.icon),r(2),w(u(5,10,o.name))}}function q1(n,a){if(n&1&&(j(0),x(1,M1,6,15,"div",10),U()),n&2){let o=a.$implicit;r(),l("ngIf",!o.isAdvanced)}}function I1(n,a){if(n&1){let o=S();p(0,"div",11),m(1,"translate"),y("click",function(){_(o);let e=d().$implicit,i=d();return C(i.addQue(e.queType,null,e==null?null:e.id).catch())}),b(2,"i",12),p(3,"span"),g(4),m(5,"translate"),c()()}if(n&2){let o=d().$implicit;dt("quetype-"+o.queType),l("nzTooltipTitle",u(1,8,o.name))("ngxDraggable",Y(12,$c))("model",o)("qfPendantItem",at(13,Xc,o==null?null:o.id)),r(2),l("qfName",o.icon),r(2),w(u(5,10,o.name))}}function E1(n,a){if(n&1&&(j(0),x(1,I1,6,15,"div",10),U()),n&2){let o=a.$implicit;r(),l("ngIf",o.isAdvanced)}}function O1(n,a){if(n&1){let o=S();p(0,"qform-pc-form",20,1),y("addField",function(e){_(o);let i=d(2);return C(i.onAddField(e))}),c()}if(n&2){let o=d(2);l("appFormData",o.appFormEditService.appFormData)("formConfig",o.formConfig)("formScenario",o.FormScenario.DESIGN)}}function P1(n,a){if(n&1){let o=S();p(0,"qf-edit-area",21),y("activate",function(e){_(o);let i=d(2);return C(i.activate(e))})("addSubQue",function(e){_(o);let i=d(2);return C(i.addQue(e,i.editQue).catch())})("defaultValChange",function(e){_(o);let i=d(2);return C(i.formComponent.setDefaultValInEditPage(e))}),c()}if(n&2){let o=d(2);l("formTheme",o.selectedTheme)("que",o.editQue)("formStyle",o.appFormEditService.appFormData.formStyle)}}function D1(n,a){if(n&1&&b(0,"qf-form-theme-edit",22),n&2){let o=d(2);l("formTheme",o.appFormEditService.appFormData.formTheme)("formStyle",o.appFormEditService.appFormData.formStyle)}}function k1(n,a){n&1&&b(0,"qf-serial-number")}function V1(n,a){if(n&1){let o=S();j(0),p(1,"div",13)(2,"div",14)(3,"qf-dynamic-form",15),O("appFormDataChange",function(e){_(o);let i=d();return E(i.appFormEditService.appFormData,e)||(i.appFormEditService.appFormData=e),C(e)}),y("openThemeEdit",function(){_(o);let e=d();return C(e.openThemeEdit())})("openSerialNmberEdit",function(){_(o);let e=d();return C(e.openSerialNmberEdit())}),x(4,O1,2,3,"qform-pc-form",16),c()()(),p(5,"div",17),x(6,P1,1,3,"qf-edit-area",18)(7,D1,1,2,"qf-form-theme-edit",19)(8,k1,1,0,"qf-serial-number",8),c(),U()}if(n&2){let o=d();r(3),l("bkgImg",o.bkgImg),I("appFormData",o.appFormEditService.appFormData),r(),l("ngIf",o.appFormEditService.appFormData&&o.appFormEditService.appFormData.formQues),r(),We("animation-name",o.cssRightHidden?"out-right":"in-right"),be("hidden",o.rightHidden),r(),l("ngIf",o.editType===1),r(),l("ngIf",o.editType===2),r(),l("ngIf",o.editType===3)}}function Q1(n,a){if(n&1){let o=S();b(0,"img",23),p(1,"div",24),g(2),m(3,"translate"),c(),p(4,"div",25)(5,"button",26),y("click",function(){_(o);let e=d();return C(e.clearTimer(1))}),g(6),m(7,"translate"),c(),p(8,"button",27),y("click",function(){_(o);let e=d();return C(e.clearTimer(0))}),g(9),m(10,"translate"),c()()}n&2&&(r(2),M(" ",u(3,3,"all.ifSaveChange")," "),r(4),M(" ",u(7,5,"all.noSave")," "),r(3),M(" ",u(10,7,"all.saveAndLeave")," "))}var Yc=(()=>{let a=class a{get showTplCenter(){return this.environment.showTemplateCenter}openThemeEdit(){this.rightHidden=!1,this.cssRightHidden=!1,this.editType=2}openSerialNmberEdit(){this.rightHidden=!1,this.cssRightHidden=!1,this.editType=3}initOldData(t){this.oldData=new Qa(je(t))}canDeactivate(){return this.confirmLeavePage?!0:this.contentChanged||this.contentChangedOnSaving?(this.showSaveForm=!0,!1):!0}handleSave(){this._saveForm().then(()=>{this.sendTrack(!0)},t=>{this.sendTrack(!1,t==null?void 0:t.errMsg)}).catch()}sendTrack(t,e){this.sensorsService.sendSensorsTrackingData("appEdit_save_click",{app_key:this.formInfo.appKey,app_name:this.formInfo.formTitle,is_success:t,message:e||"\u65E0\u503C",a
12ppPackage_key:this.route.snapshot.queryParams.tagId&&this.route.snapshot.queryParams.tagId!=="0"?this.route.snapshot.queryParams.tagId:"\u65E0\u503C",appPackage_key_list:this.formInfo.tagIds.map(i=>i.toString())})}clearTimer(t){t===0?this._saveForm().then(()=>{this.isOptionRepeat||(this.router.navigateByUrl(this.tryToRoute).catch(),this.confirmLeavePage=!0,this.formEditService.setActiveQueByKey())}).catch(e=>{console.log(e)}):t===1?(this._appEditStore.abortSaveFormData(),this.confirmLeavePage=!0,this.formEditService.setActiveQueByKey(),this.router.navigateByUrl(this.tryToRoute).catch()):(this.confirmLeavePage=!1,this.showSaveForm=!1)}activate(t){this.formEditService.activeQue$.next(t),this.formEditService.setActiveQueByKey(t.queTempId)}checkAsyncBeingLoop(){return this.formComponent.checkAsyncBeingLoop()}setTheme(t){this.appFormEditService.appFormData.formTheme=t,this.selectedTheme=t,this.bkgImg=je(this.themePics[this.selectedTheme]),this.appFormEditService.appFormData.formStyle&&(this.appFormEditService.appFormData.formStyle.headerColor!=null&&(this.bkgImg.color=this.appFormEditService.appFormData.formStyle.headerColor),this.appFormEditService.appFormData.formStyle.headerImage!=null&&(this.bkgImg.image=this.appFormEditService.appFormData.formStyle.headerImage))}getTheme(){if(this.appFormEditService.appFormData){if(this.appFormEditService.appFormData.formStyle){if(this.appFormEditService.appFormData.formStyle.bgImage!=null)return this.bkgImg.rgb="transparent",{"background-image":`url('${this.appFormEditService.appFormData.formStyle.bgImage}')`,"background-size":"100% 100%"};if(this.appFormEditService.appFormData.formStyle.bgColor!=null)return this.bkgImg.rgb=this.appFormEditService.appFormData.formStyle.bgColor,{"background-color":this.appFormEditService.appFormData.formStyle.bgColor}}return{"background-color":this.themePics[this.selectedTheme].rgb}}else return{"background-color":this.themePics[this.selectedTheme].rgb}}encodeFormularValue(t){let e=i=>{i.forEach(s=>{s.queType===h.TABLE?e(s.subQuestions):s.queType===h.SECTION?s.innerQuestions.forEach(f=>e(f)):s!=null&&s.queDefaultValue&&(s.queDefaultValue=mn(s.queDefaultValue))})};return t.formQues.forEach(i=>{e(i)}),t.questionRelations.forEach(i=>{i!=null&&i.matchRuleFormula&&(i.matchRuleFormula=mn(i.matchRuleFormula))}),t.selectScopeRelations.forEach(i=>{i!=null&&i.matchRuleFormula&&(i.matchRuleFormula=mn(i.matchRuleFormula))}),t}_saveForm(){return new Promise((t,e)=>{let i=this.checkQuesValidate(),s=this.checkAssociateSortValidate();if(!i.validateResult)return e(i);if(!s.validateResult)return e(s);let f=Ee(me({},this.appFormEditService.appFormData.getFormPostData()),{editVersionNo:this.appEditing.editVersionNo});Kr(f);let v=JSON.stringify(this.encodeFormularValue(f)),q=Ln(this.appFormEditService.appFormData.formQues,[],!0,!0);this.appItemService.onFormSaving.emit(!1),this.saving=!0,this.formService.postAppBodyData(this.appItemService.appKey,v).pipe(Zn(()=>this.saving=!1)).subscribe({next:D=>{this.messageService.success(this.translateService.instant("all.successfullySaved")),this._appEditStore.appChange(),this._appEditStore.updateFormData(D),this.initOldData(D),this.updateFormQues(D.formQues,q),this.appItemService.formTitle=D.formTitle,this.contentChanged=!1,this.appItemService.onFormSaving.emit(!0),t(null)},error:D=>{if(D.error.statusCode===40044){let H=`${D.error.message||""} ${this.translateService.instant("all.fieldsAssociatedInformationError")}`;this.messageService.error(H)}this.appItemService.onFormSaving.emit(!0),e(D)}})})}checkQuesValidate(){let t=!0,e,i=new Set;return this.appFormEditService.appFormData.questionRelations.forEach(({sortConfig:s,queId:f})=>{s&&s.status&&(ie(s.queId)&&ie(s.qlinkerAlias)||ie(s.ascend))&&i.add(f)}),t=this.appFormEditService.currentQueList.every(s=>{var D,F,H,_e,Qe,Xe,ct;let f=!0,v=s.supQueTitle?`${s.supQueTitle}\xB7${s.queTitle}`:s.queTitle;i.has(s.queId||s.queTempId)&&(f=!1,this.messageService.error(this.translateService.instant("all.missSortInformation2",{title:v})));let q=it.getDisplayTitle(s);switch(s.queType){case h.DATA_RELATION:{if(!this.appFormEditService.appFormData.questionRelations.some(xe=>xe.queId===s.queTempId||xe.queId===s.queId)){f=!1,e=`${s.queDisplayTitle||s.queTitle} ${this.translateService.instant("all.fieldsAssociatedInformation2")}`,this.messageService.error(e);return}break}case h.NUMBER:{!ie(s.minValue)&&!ie(s.maxValue)&&Number(s.minValue)>Number(s.maxValue)&&(f=!1,e=`${q} ${this.translateService.instant("all.fieldsRange")}`,this.messageService.error(e));break}case h.OCR:{ie((D=s.ocrConfig)==null?void 0:D.ocrId)?(f=!1,e=this.translateService.instant("widgets.pleaseSelectRecognitionTemplate",{title:s.queTitle}),this.messageService.error(e)):s.ocrConfig.ocrMatchRule.every(xe=>ie(xe.relatedQueId))&&(f=!1,e=this.translateService.instant("widgets.pleaseSetOCRMatchRuleTip",{title:s.queTitle}),this.messageService.error(e));break}case h.QLINKER:{let xe;switch(s.remoteLookupConfig.configMode){case Ne.custom:s.remoteLookupConfig.url||(f=!1,xe=`${s.queDisplayTitle||s.queTitle} ${this.translateService.instant("all.fieldsUrl2")}`);break;case Ne.template:s.remoteLookupConfig.globalQLinkerConfigId||(f=!1,xe=`${s.queDisplayTitle||s.queTitle} ${this.translateService.instant("all.fieldsSelectedTemplate2")}`);break;case Ne.connector:(!((F=s.remoteLookupConfig.openAppConfig)!=null&&F.id)||!s.remoteLookupConfig.openAppConfig.event.eventId)&&(f=!1,xe=`${s.queDisplayTitle||s.queTitle} ${this.translateService.instant("all.fieldsConnector2")}`);break;case Ne.wings:(!((H=s.remoteLookupConfig.qingWingsConfig)!=null&&H.agentId)||!((_e=s.remoteLookupConfig.qingWingsConfig.skill)!=null&&_e.skillId))&&(f=!1,xe=`${s.queDisplayTitle||s.queTitle} ${this.translateService.instant("all.fieldsWings")}`);break}s.remoteLookupConfig.openAppConfig=s.remoteLookupConfig.openAppConfig||{id:null,name:null,event:{eventId:null,name:null}},xe&&(e=xe,this.messageService.error(xe));break}case h.REFER:{s.referenceConfig.referQuestions.length===0&&(f=!1,e=this.translateService.instant("all.incompleteVisibleFields",{value:q})),s.referenceConfig.referAppKey||(f=!1,e=this.translateService.instant("all.incompleteDataSource",{value:q}));let xe=this.appFormEditService.appFormData.questionRelations.find(de=>de.queId===s.queId);if(s.referenceConfig.referAppKey&&(xe!=null&&xe.displayedQueInfo)){let{displayedQueInfo:{queId:de,appKey:Z,queType:Fe}}=xe;if(de===ue.APPLY_ID&&Z!==s.referenceConfig.referAppKey&&(f=!1,e=this.translateService.instant("all.differentDataSource",{value:q})),Fe===h.REFER){let Nt=(Xe=(Qe=this.appFormEditService.appQueMap.get(Z))==null?void 0:Qe.flatMap(qt=>qt.queType===h.SECTION?qt.innerQuestions:[qt]).flatMap(qt=>{var Yn;return qt.queType===h.TABLE&&((Yn=qt.subQuestions)==null?void 0:Yn.length)>0?qt.subQuestions:[qt]}))==null?void 0:Xe.find(qt=>qt.queId===de);Nt&&Nt.referenceConfig.referAppKey!==s.referenceConfig.referAppKey&&(f=!1,e=this.translateService.instant("all.differentDataSource",{value:q}))}}(f&&s.supQueTitle&&this.getReferValues(s)||f&&s.referenceConfig.optionalDataNum===1&&((ct=s.queDefaultValues)==null?void 0:ct.referValues.length)>1)&&(f=!1,e=`${this.translateService.instant("widgetHelp.optionalDataAmountLimited",{queTitle:q})}`),!f&&e&&this.messageService.error(e);break}case h.RADIO:case h.IMAGE_PICKER:case h.SELECT:case h.CHECKBOX:{let xe=this.checkOptRepeat(s);f=xe.result,e=xe.errMsg;break}}return f}),this.checkAsyncBeingLoop()&&(t=!1,e=this.translateService.instant("codeblock.loopTip"),this.notification.show({type:"error",title:e})),{validateResult:t,errMsg:e}}checkAssociateSortValidate(){let t=!0,e,i=new Set;return this.appFormEditService.appFormData.questionRelations.forEach(({sortConfig:s,queId:f})=>{s&&s.status&&(ie(s.queId)&&ie(s.qlinkerAlias)||ie(s.ascend))&&i.add(f)}),t=this.appFormEditService.currentQueList.every(s=>{let f=!0;return i.has(s.queId||s.queTempId)&&(f=!1),f}),{validateResult:t,errMsg:e}}getReferValues(t){var e,i,s;return((s=(i=(e=this.formInfo.formQues.flat().find(({queTempId:f,queId:v})=>[f,v].includes(t.supId)))==null?void 0:e.queDefaultValues)==null?void 0:i.tableValues)==null?void 0:s.flat().filter(({referValues:f})=>f).some(({referValues:f,queId:v})=>[t.queId,t.queTempId].includes(v)&&f.length>1))&&t.referenceConfig.optionalDataNum}drag(t){this.formEditService.dragElement=t.el,this.render2.addClass(t.el,"widget-unit-dragging")}onAddField(t){this.sendTrackingData("form_field_operate_click",t)}cancel(){this.render2.removeClass(this.formEditService.dragElement,"widget-unit-dragging")}updateFormQues(t,e){let i=e.filter(f=>f.queType!==h.TABLE||f.subQuestions.length),s=Ln(t,[],!0,!0);
12i.forEach((f,v)=>this.updateFormQue(f,s[v]))}updateSelectQueOptionId(t,e){[h.CHECKBOX,h.RADIO,h.SELECT,h.IMAGE_PICKER].includes(t.queType)&&t.options.forEach((i,s)=>{i.optId!==e.options[s].optId&&(i.optId=e.options[s].optId)})}updateFormQue(t,e){if(t.queType===h.QLINKER&&(t.remoteLookupConfig.resultFormatPath=e.remoteLookupConfig.resultFormatPath),t.queId!==0&&t.queType===h.CODEBLOCK&&(t.codeBlockConfig=me(me({},t.codeBlockConfig),e.codeBlockConfig)),t.queId!==0&&t.queType!==h.TABLE){this.updateSelectQueOptionId(t,e);return}let i=t.queTempId;t.queId=e.queId,this.updateSelectQueOptionId(t,e),t.queType===h.TABLE&&(t.tableNoRepeatQuestion=e.tableNoRepeatQuestion);let s=this.appFormEditService.appFormData.questionRelations.find(v=>v.queId===i);s&&(s.queId=e.queId,s.tableMatchRules=this.oldData.questionRelations.find(v=>v.queId===e.queId).tableMatchRules);let f=this.appFormEditService.appFormData.selectScopeRelations.find(v=>v.queId===i);f&&(f.queId=e.queId,f.tableMatchRules&&(f.tableMatchRules=this.oldData.questionRelations.find(v=>v.queId===e.queId).tableMatchRules)),t.queType===h.TABLE&&t.subQuestions.forEach((v,q)=>{this.updateFormQue(v,e.subQuestions[q])})}addQue(t,e,i){return new Promise((s,f)=>{if(t===h.DATA_RELATION&&!this.aclService.canUseFunction(this.functionLimitMap.get(t)))this.modalInvokeService.openFunctionLimitModal(this.functionLimitMap.get(t)),f();else{if(i&&!this.rootStore.workspaceInfo().openPluginList.includes(i))return;if(this.PluginLimitTypes.includes(t)&&!this.pluginInfoMap[t].valid)this.modalInvokeService.openFunctionLimitModal(null,this.pluginInfoMap[t].pluginInfo);else{if([h.UPLOAD,h.CODEBLOCK,h.EMBED].includes(t)&&!this.rootStore.isCerted()){let F=yo[t].name,H,_e=[],Qe="";this.rootStore.isSuperAdmin()?(Qe="all.pleaseCertHint",H="certification",_e=[{text:"all.nextTime",buttonType:"default"},{text:"all.certNow",action:()=>this.router.navigateByUrl("/index/manage/baseinfo"),buttonType:"primary"}]):(Qe="all.contactSuperAdminToCert",_e=[{text:"all.nextTime",buttonType:"default"},{text:"all.moreInformation",action:()=>window.open("https://exiao.yuque.com/ixwxsb/rryqld/xwkmd6mgroc331vt","_blank"),buttonType:"primary"}]),this.modalService.open({content:ta,footer:null,width:400,componentParams:{widgetName:F,hintMsg:Qe,helpDocName:H,buttonConfigs:_e}});return}let v=this.findActiveQueRowInfo(),{rowIdx:q,belongSection:D}=v;this.formComponent.addQue(t,q+1,e,D),s()}}})}findActiveQueRowInfo(){let t=this.formEditService.activeQue;if(!t)return{rowIdx:this.formEditService.appFormData.formQues.length,belongSection:null};let e=t.queTempId;for(let i=0;i<this.formEditService.appFormData.formQues.length;i++){let s=this.formEditService.appFormData.formQues[i];for(let f of s){if(f.queTempId===e)return f.queType===h.SECTION?{rowIdx:f.innerQuestions.length-1,belongSection:f}:{rowIdx:i,belongSection:null};if(f.queType===h.TABLE){for(let v of f.subQuestions)if(v.queTempId===e)return{rowIdx:i,belongSection:null}}else if(f.queType===h.SECTION)for(let v=0;v<f.innerQuestions.length;v++){let q=f.innerQuestions[v];for(let D of q)if(D.queTempId===e)return{rowIdx:v,belongSection:f}}}}return{rowIdx:this.formEditService.appFormData.formQues.length,belongSection:null}}initializeFormData(t){let{accountLevel:e,appKey:i,formQues:s,questionRelations:f,attachVisibleOnlyConfig:v,selectScopeRelations:q}=t;this.formConfig={formQues:s,accountLevel:e,appKey:i,questionRelations:f,noAutoDetect:!0,attachVisibleOnlyConfig:v,selectScopeRelations:q}}checkOptRepeat(t){let e=[];return t.options.filter(i=>!i.beingOtherOpt).forEach(i=>{e.push(i.optValue)}),e.length===gn(e).length?{result:!0}:(this.isOptionRepeat=!0,this.messageService.error(`${t.queTitle}\u4E0D\u5141\u8BB8\u91CD\u590D\u9009\u9879`),{result:!1,errMsg:`${t.queTitle}\u4E0D\u5141\u8BB8\u91CD\u590D\u9009\u9879`})}sendTrackingData(t,e=null){var H,_e,Qe,Xe;let i={[h.DESCRIPTION]:"\u63CF\u8FF0\u6587\u5B57",[h.INPUT]:"\u5355\u884C\u6587\u5B57",[h.ENCRYPTED_TEXT]:"\u52A0\u5BC6\u6587\u672C",[h.TEXTAREA]:"\u591A\u884C\u6587\u5B57",[h.DATE]:"\u65E5\u671F",[h.MEMBER]:"\u6210\u5458",[h.EMAIL]:"\u90AE\u7BB1",[h.PHONE]:"\u7535\u8BDD",[h.NUMBER]:"\u6570\u5B57",[h.LINK]:"\u94FE\u63A5",[h.RADIO]:"\u5355\u9879\u9009\u62E9",[h.SELECT]:"\u4E0B\u62C9\u9009\u62E9",[h.CHECKBOX]:"\u591A\u9879\u9009\u62E9",[h.UPLOAD]:"\u4E0A\u4F20\u9644\u4EF6",[h.DATE_RANGE]:"\u8D77\u6B62\u65F6\u95F4",[h.IMAGE_PICKER]:"\u56FE\u7247\u9009\u62E9",[h.RICHTEXT]:"\u5BCC\u6587\u672C",[h.LOCATION]:"\u5B9A\u4F4D",[h.TABLE]:"\u8868\u683C",[h.DATA_RELATION]:"\u6570\u636E\u5173\u8054",[h.QLINKER]:"Q-linker",[h.ADDRESS]:"\u5730\u5740",[h.DEPARTMENT]:"\u90E8\u95E8",[h.OCR]:"\u6587\u5B57\u8BC6\u522B",[h.SECTION]:"\u6BB5\u843D",[h.REFER]:"\u5F15\u7528",[h.CODEBLOCK]:"\u4EE3\u7801\u5757"},s=(i==null?void 0:i[e])||"\u5176\u4ED6",f=(H=this==null?void 0:this.appName)!=null&&H.trim()?this.appName.trim():"\u5E94\u7528\u65E0\u540D\u79F0",v=((_e=this==null?void 0:this.tagNameArr)==null?void 0:_e.length)>0?this.tagNameArr:["\u65E0\u5173\u8054\u5E94\u7528\u5305\u540D\u79F0"],q=((Qe=this==null?void 0:this.tagIdArr)==null?void 0:Qe.length)>0?this.tagIdArr:["\u65E0\u5173\u8054\u5E94\u7528\u5305key"],D={app_key:((Xe=this.appItemService)==null?void 0:Xe.appKey)||null,app_name:f,appPackage_name_list:v,appPackage_key_list:q},F=this._appEditStore.publishStatus().appPublishStatus===0;switch(t){case"form_edit_view":D=Ee(me({},D),{is_self:this.isSelf,is_first_create:F});break;case"form_field_operate_click":D=Ee(me({},D),{is_self:this.isSelf,is_first_create:F,field_type:s});break;case"form_logicform_addRule_exposure":case"form_logicform_showField_click":case"form_logicform_complete_click":D=Ee(me({},D),{field_type:s});break}this.sensorsService.sendSensorsTrackingData(t,D)}constructor(t,e,i,s,f,v,q,D,F,H,_e,Qe,Xe,ct,xe,de,Z,Fe,Nt,qt,Yn,Zc,ed,td,id){this.sensorsService=t,this.aclService=e,this.widgetChange=i,this.formService=s,this.translateService=f,this.router=v,this.route=q,this.render2=D,this.appItemService=F,this.seo=H,this.formEditService=_e,this.appFormEditService=Qe,this.modalInvokeService=Xe,this.notification=ct,this.pluginStatusChangeService=xe,this.formBaseService=de,this.environment=Z,this.appEditing=Fe,this.controlCreator=Nt,this.appDataService=qt,this.messageService=Yn,this.tourGuideService=Zc,this.qmcService=ed,this._destroyRef=td,this.modalService=id,this._appEditStore=re(gp),this.widgetConfigs=sn,this.openVersion$=new fe,this.rootStore=re(Ct),this.FormScenario=Ti,this.unsubscribe$=new fe,this.showSaveForm=!1,this.rightHidden=!0,this.cssRightHidden=!0,this.confirmLeavePage=!1,this.contentChanged=!1,this.saving=!1,this.contentChangedOnSaving=!1,this.bkgImg={},this.initOver=!1,this.local={},this.selectedTheme=0,this.themePics=Co,this.widgetList=[],this.themeChanged=!1,this.editType=1,this.functionLimitTypes=[h.DATA_RELATION],this.PluginLimitTypes=[h.LOCATION,h.QLINKER,h.CODEBLOCK,h.OCR,h.REFER,h.SECTION,h.EMBED],this.functionLimitMap=new Map([[h.DATA_RELATION,Be.dataAssociation],[h.LOCATION,"locationInput"],[h.REFER,"quote"],[h.QLINKER,"remoteLookUp"],[h.CODEBLOCK,"codeblock"],[h.OCR,"ocr"],[h.SECTION,"section"],[h.EMBED,"embed"]]),this.pluginInfoMap={},this.tagIdArr=[],this.tagNameArr=[],this.isSelf=!0,v.events.pipe(ae(this.unsubscribe$)).subscribe(vr=>{vr instanceof pl&&(this.tryToRoute=vr.url)})}initFormInfo(){this.formInfo=tt(this._appEditStore.formData()),this.isSelf=!this.formInfo.beingFromSolution,this.appDataService.getTagAndViewInfo(this.appItemService.appKey).subscribe(t=>{var e,i;this.tagIdArr=((e=t==null?void 0:t.tagList)==null?void 0:e.map(s=>s.tagId.toString()))||[],this.tagNameArr=((i=t==null?void 0:t.tagList)==null?void 0:i.map(s=>s.tagName))||[]}),this.initializeFormData(this.formInfo),this.initOldData(this.formInfo),this.formInfo.formTitle&&(this.appItemService.formTitle=this.formInfo.formTitle),this.appFormEditService.appFormData=new Qa(this.formInfo),this.appFormEditService.appFormData.formTheme&&(this.selectedTheme=this.appFormEditService.appFormData.formTheme),this.setTheme(this.selectedTheme),this.formEditService.appFormData=this.appFormEditService.appFormData,this.initOver=!0}
12ngOnInit(){this.appEditing.appSave$.pipe(Jn(500),gi(this._destroyRef)).subscribe(()=>{this._saveForm()}),this.formBaseService.openVersionLimitCard.pipe(ae(this.openVersion$)).subscribe(i=>{let s=i.pluginValidInfo,f=i.versionFunName;if(s){if(!s.installed){this.modalInvokeService.openPlug(s.pluginInfo);return}this.modalInvokeService.openFunctionLimitModal(null,s.pluginInfo);return}f&&this.modalInvokeService.openFunctionLimitModal(f)}),this.widgetChange.changed.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.contentChanged=!0,this.saving&&!this.contentChangedOnSaving&&(this.contentChangedOnSaving=!0)}),this.widgetChange.tableDftValueChange.pipe(ae(this.unsubscribe$)).subscribe(()=>{}),this.widgetChange.themeChanged.pipe(ae(this.unsubscribe$)).subscribe(i=>{this.setTheme(i)}),this.widgetChange.headerBgChanged.pipe(ae(this.unsubscribe$)).subscribe(()=>{this.themeChanged=!0,this.setTheme(this.selectedTheme)}),this.widgetChange.backBgChanged.pipe(ae(this.unsubscribe$)).subscribe(i=>{this.appFormEditService.appFormData.formStyle.bgImage=i[0].url,this.appFormEditService.appFormData.formStyle.bgColor=i[1].color,this.themeChanged=!0,this.getTheme()}),this.initFormInfo();let t={"widgets.ocr":6,"widgets.location":9,"widgets.quote":39,"all.section":37,"widgets.remoteSearch":19,"widgets.codeblock":44,"widgets.embedField":47};this.widgetConfigs.forEach(i=>{i.queType===h.CODEBLOCK&&this.environment.hideCodeBlock||i.queType===h.ADDRESS&&!this.qmcService.getItemShow(Da.Address)||i.queType===h.LOCATION&&!this.qmcService.getItemShow(Da.Location)||this.widgetList.push(Ee(me({},i),{status:0,id:t[i.name]||null}))}),this.formEditService.activeQue$.pipe(ae(this.unsubscribe$)).subscribe(i=>{i?(this.editType=1,this.editQue=i,this.rightHidden=!1,this.cssRightHidden=!1):(this.cssRightHidden=!0,setTimeout(()=>this.rightHidden=!0,200),this.editQue=null)});let e=[];this.PluginLimitTypes.forEach(i=>{let s=this.functionLimitMap.get(i);e.push(this.pluginStatusChangeService.isValid(s))}),Promise.all(e).then(i=>{i.forEach((s,f)=>{this.pluginInfoMap[this.PluginLimitTypes[f]]=s})}).catch(),this.appFormEditService.eventBus$.pipe(ae(this.unsubscribe$)).subscribe(i=>{switch(i.type){case"addRule":this.sendTrackingData("form_logicform_addRule_exposure",i.fieldType);break;case"showField":this.sendTrackingData("form_logicform_showField_click",i.fieldType);break;case"complete":this.sendTrackingData("form_logicform_complete_click",i.fieldType);break}}),this.tourGuideService.openGuideModal(cl.FormDesignGuide)}ngOnDestroy(){this.seo.setPcView(),this.formEditService.queTempId=1,this.unsubscribe$.next(),this.unsubscribe$.complete(),this.openVersion$.next(),this.openVersion$.complete()}};a.\u0275fac=function(e){return new(e||a)(T(ql),T(ui),T(N),T(Es),T(X),T(To),T(bo),T(no),T(Dn),T(_l),T($e),T(ee),T(Ke),T(fo),T(fi),T(Vi),T(pi),T(Ws),T(Is),T(So),T(ye),T(Vs),T(Ml),T(to),T(Pe))},a.\u0275cmp=P({type:a,selectors:[["qf-creation"]],viewQuery:function(e,i){if(e&1&&qe(S1,5),e&2){let s;Te(s=Se())&&(i.formComponent=s.first)}},decls:18,vars:23,consts:[["saveFormModal",""],["formComponent",""],["perfectScrollbar","",1,"page-content"],[1,"overflow-auto","border-r","border-r-10","bg-white","px-12","py-24"],[1,"mb-12"],[1,"mb-[10px]","text-body-regular","font-bold"],["ngxDroppable","","direction","mixed",1,"grid","grid-cols-2","gap-x-8","gap-y-12",3,"drag","cancel","model","copy"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"visibleChange","qfOnCancel","content","footer","width","bodyStyle","maskClosable","visible"],["nz-tooltip","","class","widget-item hover:bg-gray-4 group w-[116px] cursor-pointer items-center rounded-small border border-solid border-[#e6eaf0] bg-10 px-8 py-[6px] text-gray-90 hover:border-[#ccd4e0] hover:font-bold hover:text-100","nzTooltipPlacement","bottom",3,"class","nzTooltipTitle","ngxDraggable","model","qfPendantItem","click",4,"ngIf"],["nz-tooltip","","nzTooltipPlacement","bottom",1,"widget-item","hover:bg-gray-4","group","w-[116px]","cursor-pointer","items-center","rounded-small","border","border-solid","border-[#e6eaf0]","bg-10","px-8","py-[6px]","text-gray-90","hover:border-[#ccd4e0]","hover:font-bold","hover:text-100",3,"click","nzTooltipTitle","ngxDraggable","model","qfPendantItem"],["qf-icon","",1,"mr-12","group-hover:text-90",3,"qfName"],[1,"center"],[1,"form-content"],[3,"appFormDataChange","openThemeEdit","openSerialNmberEdit","bkgImg","appFormData"],[3,"appFormData","formConfig","formScenario","addField",4,"ngIf"],[1,"right"],[3,"formTheme","que","formStyle","activate","addSubQue","defaultValChange",4,"ngIf"],[3,"formTheme","formStyle",4,"ngIf"],[3,"addField","appFormData","formConfig","formScenario"],[3,"activate","addSubQue","defaultValChange","formTheme","que","formStyle"],[3,"formTheme","formStyle"],["qfSrc","/assets/assetsFiles/file.qingflow.com/assets/app-need-save.png",1,"mx-auto","block","h-[144px]","w-[200px]"],[1,"my-20","text-center","text-h4"],[1,"flex","justify-between"],["qf-button","","qfSize","large",1,"w-[162px]",3,"click"],["qf-button","","qfSize","large","qfType","primary",1,"w-[162px]",3,"click"]],template:function(e,i){if(e&1){let s=S();p(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),g(4),m(5,"translate"),c(),p(6,"div",6),y("drag",function(v){return _(s),C(i.drag(v))})("cancel",function(){return _(s),C(i.cancel())}),x(7,q1,2,1,"ng-container",7),c()(),p(8,"div",4)(9,"div",5),g(10),m(11,"translate"),c(),p(12,"div",6),y("drag",function(v){return _(s),C(i.drag(v))})("cancel",function(){return _(s),C(i.cancel())}),x(13,E1,2,1,"ng-container",7),c()()(),x(14,V1,9,10,"ng-container",8),p(15,"qf-modal",9),O("visibleChange",function(v){return _(s),E(i.showSaveForm,v)||(i.showSaveForm=v),C(v)}),y("qfOnCancel",function(){return _(s),C(i.clearTimer(2))}),x(16,Q1,11,9,"ng-template",null,0,te),c()()}
12if(e&2){let s=W(17);St(i.getTheme()),l("@routeAnimation",!0),r(4),M(" ",u(5,18,"widgets.basic")," "),r(2),l("model",i.widgetList)("copy",!0),r(),l("ngForOf",i.widgetList),r(3),M(" ",u(11,20,"widgets.advanced")," "),r(2),l("model",i.widgetList)("copy",!0),r(),l("ngForOf",i.widgetList),r(),l("ngIf",i.initOver),r(),l("content",s)("footer",null)("width",400)("bodyStyle",Y(22,w1))("maskClosable",!1),I("visible",i.showSaveForm)}},dependencies:[B,A,yt,hi,K,ce,$t,Xo,$o,zs,Fi,Na,Gi,yr,Bp,k],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}[_nghost-%COMP%] .dynamic-form-body .empty-wrapper{padding:50px 0}.page-content[_ngcontent-%COMP%]{display:flex;flex:1;width:100%;overflow:auto;background:#f9fafc}.m-r-md[_ngcontent-%COMP%]{margin-right:10px}.center[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center;height:100%;padding:20px 20px 0;overflow:auto;transition:all ease .2s}.center[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%]{width:100%;max-width:900px}.right[_ngcontent-%COMP%]{width:265px;overflow:auto;background:#fff;border-left:1px solid #e6eaf0;transition:all ease .2s;transform-origin:left;animation-duration:.2s}@keyframes _ngcontent-%COMP%_in-right{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes _ngcontent-%COMP%_out-right{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.hidden[_ngcontent-%COMP%]{display:none}.wait-modal-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:20px;color:#fff}.filed-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:98px;height:36px;background:#fff;background-image:url(/assets/assetsFiles/file.qingflow.com/assets/widget/cover.png);background-size:98px 36px;border-radius:9px}.filed-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin:0 8px 0 6px}@media (max-width: 642px){.center[_ngcontent-%COMP%]{padding:20px 0}}.widget-item.gu-transit[_ngcontent-%COMP%]{display:block;width:100%;background:#658cf31a;border-radius:8px;opacity:.6}.widget-item.gu-transit[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{display:none}.widget-item.gu-transit.quetype-1[_ngcontent-%COMP%]{height:59px}.widget-item.gu-transit.quetype-2[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-4[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-5[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-6[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-7[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-8[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-9[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-11[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-14[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-17[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-19[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-20[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-22[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-23[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-25[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-26[_ngcontent-%COMP%]{height:104px}.widget-item.gu-transit.quetype-3[_ngcontent-%COMP%]{height:248px}.widget-item.gu-transit.quetype-10[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-12[_ngcontent-%COMP%]{height:96px}.widget-item.gu-transit.quetype-13[_ngcontent-%COMP%]{height:134px}.widget-item.gu-transit.quetype-15[_ngcontent-%COMP%]{height:280px}.widget-item.gu-transit.quetype-16[_ngcontent-%COMP%], .widget-item.gu-transit.quetype-24[_ngcontent-%COMP%]{height:188.38px}.widget-item.gu-transit.quetype-18[_ngcontent-%COMP%]{height:203px}.widget-item.gu-transit.quetype-21[_ngcontent-%COMP%]{height:212px}"],data:{animation:[ip]}});let n=a;return n})();var A1=[{path:"",component:Yc,canDeactivate:[hp]}],Jc=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=Lt({type:a}),a.\u0275inj=Bt({imports:[Pa.forChild(A1),Pa]});let n=a;return n})();var AQ=(()=>{let a=class a{};a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=Lt({type:a}),a.\u0275inj=Bt({providers:[ee,$o,Xo,Zt],imports:[Jc,tp,kn,wl,cp,Vn,As.forRoot(),dp,yl,pp,Pn,Hs,Qs,cn,Ks,Xr,_s,Vl,ic,ws,as,Fo,ha,Dl,st,Ai,Jo,Yt,va,ua,Do,ta]});let n=a;return n})();Qr(Gi,function(){return[B,A,le,V,Ue,Q,se,he,Xt,oe,ne,yt,K,Mi,qi,G,zn,xt,Zo,Fi,tc,va,ua,bp,or,Gc,Hc,sc,cc,Lc,pc,zp,Wc,zc,pa,xc,vc,gc,hc,_c,nc,oc,mc,uc,Lp,Rc,Fc,Nc,Cc,Ha,tr,Kc,ja,Wa,bc,ac,Uc,Bc,jc,lc]},function(){return[k]});
12export{AQ as CreationModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.