1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a05142d-2b09-5965-9c9f-8a6ad2b52456")}catch(e){}}(); 3var vr=Object.freeze,oo=Object.defineProperty;var Ye=(r,e)=>vr(oo(r,"raw",{value:vr(e||r.slice())}));import{R as N,i as ao,g as en,r as I,j as t,e as C,K,n as Te}from"./index.modern-Bk2HkT0W.js";import{cu as tt,cv as so,u as fe,I as Q,ah as bi,ai as Ti,cw as lo,e as M,cx as co,y as G,s as et,T as nr,cy as uo,cz as Mi,N as Be,cA as po,V as mo,cB as ji,S as Qe,_ as go,cb as ho,cC as fo,a0 as xr,A as yo,m as be,o as Gt,R as vo,cD as xo,cE as _o,cF as wo,cG as So,cH as Co,cI as tn,cJ as Wi,cc as Ct,ce as Gi,c0 as bo,c1 as _r,cd as Yi,ar as To,D as Jt,M as wr,cK as jo,q as Io,c as fi,l as ko,a2 as Po,cL as Fo,cf as Do,F as Mo,cg as Lo}from"./main-LStdChlz.js";import{a0 as j,z as jt,B as It,E as kt,K as z,bq as A,G as Pt,M as it,J as Ze,a4 as Eo,ab as $o,I as Oo,al as Ii,aO as V,aP as rt,b4 as he,aU as or,$ as Ro,aW as zo,ar as Sr,P as Ao}
3from"./i18next-CszFfP19.js";import{u as rn,C as No}from"./index-DUdwSwlm.js";import{u as nn,F as Bo}from"./index-B6Qo4Ek2.js";import"./IframeProvider-vVUS8qNT.js";import"./ShowConfirmModal-DicafaA2.js";import{u as ar}from"./index-DdhsUcq7.js";import{S as qo}from"./SpecifiedEventPlatform-B9h0Nb1l.js";import{u as Ho}from"./sqlCustomDataFeedTag-C-q6vUgK.js";import"./PlaceholderConditionFieldList-mPMYO8bp.js";import{u as Vo,F as Cr}from"./FeedTagViewForLineAndMessenger-D8kDsT4A.js";import{u as Uo,W as Wo,S as Go}from"./index-DSULLvQP.js";import{C as Yo,u as on,P as Xo,b as Ko,i as an,g as Jo,a as br,c as Zo,d as Qo,S as ea}from"./useProductFeedCascader-BubVCbnG.js";import{E as sr}from"./EmojiPicker-CmHg0Cl9.js";import{u as ta}from"./updateTemplateAsync-0mJiPOV0.js";import{M as ia}from"./ModalTrigger-CfWB89vM.js";import{P as ra}from"./applyInvalidColumnsFormErrors-DCm0x1Ul.js";import{E as na}from"./EditorBreadcrumb-BYP4JvhO.js";import{t as oa,T as aa}from"./trackTemplateEvent-Dsw9fSyF.js";import{u as sa}from"./useTemplateId-CRMBK8Tb.js";import{B as la}from"./BaseTestForm-j62IPLSW.js";import{u as da,g as ca}from"./utils-8aZvsLKo.js";import{F as S,R as Ne,C as oe,u as sn,c as ua}from"./utils-CSAAr35u.js";import{B as J,b as de,E as ln}from"./index-BQ2d9Nl-.js";import{C as pa}from"./CloneTemplateButton-DXwo1B_k.js";import{E as ma}from"./EnsureDeactivateTemplateCheckbox-DfoKnsOK.js";import{T as ga}from"./TemplateActionHistoryButton-BGE22esd.js";import{h as dn}from"./moment-DdbtTH-v.js";import{c as cn}from"./clone-CaKw963H.js";import{o as ha}from"./omit-D_5uR4aN.js";import{b as je}from"./index-M-PNOqPT.js";import"./index-Dd5yBUji.js";import"./SearchColumnDropdown-B0bsFa8L.js";import{C as un,a as fa}from"./ColorGridPicker-gSMD8Hf2.js";import{C as H}from"./index-D-ik_bUf.js";import{D as Tt}from"./DeleteOutlined-BagnrRyR.js";import{L as pn}from"./LinkOutlined-JOSCkpNe.js";import{A as mn}from"./index-DOEaSdt5.js";import{D as Zt}from"./index-BCmZ69Bt.js";import{U as Si}from"./index-AwK2lYAB.js";import{I as lr}from"./index-CoH8WfaW.js";import{P as dr,u as ya}from"./useImageMapCanvasEditor-B-F2AICM.js";import{U as cr}from"./UploadOutlined-Eo9-Qidj.js";import{f as va}from"./currencyFormatter-LRVM5P45.js";import{a as xa,E as _a,b as wa,c as Sa}from"./index-wpDTjdB4.js";import{u as Ca}from"./useDataCategory-DEjYqMkv.js";import{P as ba}from"./ProductRangeLimitInput-DXNuBCZZ.js";import{S as Ta}from"./SiteSelect-BwVnBs_C.js";import{C as yi}from"./index-Esn6J2e9.js";import{C as ja}from"./index-CREkANFA.js";import{P as Ia}from"./index-Doou4lf-.js";import{p as ur}from"./pick-HjB7nCN9.js";import{m as gn}from"./mergeAll-BEboglWd.js";import{C as ka}from"./CircleLoading-CKUurmPk.js";import{I as Pa}from"./InfoLabel-BV3G1GcQ.js";import{v as gt,I as Yt,R as hn,L as Fa}from"./react-router-dom-DXdvtoRG.js";import{C as Tr}from"./Collapse-LzgIe7sE.js";import{u as Da}from"./useMergeTagTypingTracker-BPRV0g-l.js";import{b as Ma}from"./isEmpty-DcGlrHxc.js";import{i as vi}from"./isArray-B9Vz3BzZ.js";import{c as La}from"./urlValidator-DfH2Bm_i.js";import{d as Ea}from"./index-BblopUiD.js";import{l as $a}from"./last-gmPjgiKx.js";import{S as Oa}from"./ShareAltOutlined-0prSO4eP.js";import"./Compact-PbnmyqLK.js";import"./useFlexGapSupport-jkLCp-NU.js";import"./react-error-boundary.esm-hP1M-t7m.js";import"./hoist-non-react-statics.cjs-B15GkqZC.js";import"./index-DaUwV_YV.js";import"./parentOrigin-jt27BBm3.js";import"./useQuery-Bu9IAIDW.js";import"./LogicDisplay-Bhnm8lxr.js";import"./TransText-Bwe-759-.js";import"./utils-Td84NrFk.js";import"./FeedTagListWithModal-DM8xcVPi.js";import"./simple_cell-CtXU4YRG.js";import"./Edit-DyXFv38e.js";import"./Path-Ua_Gp91t.js";import"./CustomButton-naBY8A0O.js";import"./Button-BFLYUsvG.js";import"./htmlPropsUtils-CJ5Ylz3D.js";import"./Label-Ks5-xyFy.js";import"./DisabledBlock-wDrhz9ER.js";import"./isIdentifier-CKfsgkS3.js";import"./VoucherListItems-D4QKy3rJ.js";import"./ConstraintForm-C74W52MH.js";import"./Dropdown-BOSA1e0C.js";import"./debounce-C04CPak_.js";import"./pickBy-CYN_Ov7V.js";import"./keys-coJY5a-s.js";import"./pipe-Boagcv_B.js";
3import"./useSearchParams-BP3QLRn4.js";import"./useUnauthorizedHandler-BCxRisKl.js";import"./calcDeactivatePermission-LbuDN8oJ.js";import"./utils-DnLDlqer.js";import"./useMutation-BvMljKdw.js";import"./useOrganizationUsers-CYMykAGJ.js";import"./useMultiHighlightColumnSearchProps-BVLImr4Y.js";import"./style-BlhGWqsG.js";import"./Table-BLuy6k3H.js";import"./css-CG3sgCP8.js";import"./useForceUpdate-CMpVYnmX.js";import"./CaretDownOutlined-BYd2v7Ye.js";import"./calculateApprovalPermissions-CnuGdhfj.js";import"./index-BmP7beDD.js";import"./ApprovalStepApprovers-BWkCAqFE.js";import"./isNonNullish-CATHZ622.js";import"./sqlCustomModels-Dbbm14NO.js";import"./customNodeDefinition-nBUW4KP2.js";import"./mergeDeep-CFVxAu1e.js";import"./useCustomModels-LN0ZcTkI.js";import"./isDefined-x_FWQwMl.js";import"./index-B2sXcWmm.js";import"./PreviewErrorMessage-CArftAvw.js";import"./decryptOutputScope-NiJLBInJ.js";import"./index-BB-MwdT7.js";import"./isNumber-j3SIk7av.js";import"./index-CzGNaUv4.js";import"./const-K_CvloLi.js";import"./useAntdTableHandler-emfNQVP0.js";import"./index-B2KRirKN.js";import"./ReloadOutlined-d-A11tyo.js";import"./LockOutlined-CJ80uljT.js";import"./FolderAddOutlined-PSfultct.js";import"./groupBy-Bn_xKp8m.js";import"./unique-BlbLKNcy.js";import"./_reduceLazy-DGRijHJe.js";import"./uniqueBy-QILWJz80.js";import"./ActionButton-ClFQzdQ9.js";import"./ShareIcon-Daa_4X9g.js";import"./UndoOutlined-BS7nCL-M.js";import"./DownloadOutlined-1rVSR8g9.js";import"./PlusCircleOutlined-C7fmi8Yg.js";import"./index-DX3j3QQx.js";import"./find-YaPEqp1R.js";import"./_toLazyIndexed-DKwVQv5F.js";import"./map-DWOGOw4C.js";import"./filter-RDNUz6aA.js";import"./addProp-BYz_cS62.js";import"./uniqBy-BxxuC8MA.js";import"./DownSquareFilled-BG9qVra9.js";import"./splitAt-Cy6B6M-u.js";import"./ApprovalStatusTag-dKMrjHx_.js";import"./uniq--g1OkKbO.js";import"./CaretRightOutlined-Z8aOzl7H.js";import"./useSort-CAv1je6x.js";import"./SwapOutlined-DCyuWc0y.js";import"./SettingOutlined-Cjr7tr1T.js";import"./ConfirmActionModal-DIYq8fy1.js";import"./MoreOutlined-Dap9mGW_.js";import"./FontSizeOutlined-rIwmmemw.js";import"./concat-D9hpuPL4.js";import"./modulePermissions-CTdhDNLf.js";import"./parsePhoneNumber_-CdwiMiG2.js";import"./set-CubgmYsW.js";import"./sumBy-CYctKS3q.js";import"./index-DL-WLzNv.js";import"./TreeView-CgmS0E15.js";import"./Breadcrumb-BeN_-LQI.js";import"./useCustomEvent-dcqWEK4d.js";import"./utils-DUp49APB.js";import"./index-CcWF_PnF.js";import"./useGCSTransferApi-teOGgPCU.js";import"./index-DmBC1Rud.js";import"./DndTableComponents-DgrCTc9P.js";import"./ArrowRightOutlined-BT6q6IGb.js";import"./constants-aiCedAsw.js";import"./getValueFromUploadEvent-lIHZO4IS.js";import"./useDuplicateFormListValidator-7jVZINie.js";import"./useDebounce-BdB934gJ.js";import"./index-yZl9wWrP.js";import"./Table-ANyD8RQY.js";import"./Header-B-xffsGu.js";import"./Modal-DC9nk9mf.js";import"./reduce-CpBSza1e.js";import"./_baseSet-B5zHM4Uu.js";import"./index-C-jORQRa.js";import"./OperationRecordDrawer-BBF07Ppq.js";import"./ActorDisplay-DiDNJQ05.js";import"./HistoryOutlined-Cu5Yc6-y.js";import"./index-D_yrCVzT.js";import"./audienceInfoBasicFields-Duj_Ot5w.js";import"./ZoomOutOutlined-CNUiLbzv.js";import"./customEventAggMapping-CpO2eolD.js";import"./FormComplexItems-B_uqmf3a.js";import"./navigationStore-B5vOcQ0r.js";import"./G-CcHRxzW0.js";import"./mappingFunctions-jtNKCRPq.js";import"./Tags--VCg0lyr.js";import"./TagsField-Bs8WNddi.js";import"./OldCompatibleDatePicker-B3rE18rz.js";import"./ChannelSelect-B4q-Z-M0.js";import"./Dropdown-CnUkacDC.js";import"./eventTexts-RnCXKxlV.js";import"./WarningIcon-B6DAQLXc.js";import"./useUserUnitOptions-Cs0lHmie.js";import"./useTargetOptions-CDaut2_P.js";import"./useThrottle-DfG5J951.js";import"./utils-DyGJLQY2.js";import"./Form-BVaMtBXM.js";import"./Checkbox-AOxs-zPa.js";import"./customFields-B3wGVoAS.js";import"./CustomFieldsList-7P78faqT.js";import"./CustomFieldFormItem-7alBlcSF.js";import"./partition-BEZd1qSf.js";import"./const-DlXFfi6r.js";import"./useIsConversionMetricEnabled-DfGL3mNZ.js";import"./isValidPhoneNumber-BanLfDmd.js";import"./MonthlyUsageBar-DpS_6CZh.js";import"./index-B7TVgemq.js";import"./Conversations-CaVZ3bqB.js";import"./index-D-lv1rBW.js";import"./useNavigationTargets-CKwgkpnF.js";import"./abTestUtils-CXMzIqWM.js";import"./WarningTwoTone-DIvr6uG7.js";import"./ParameterFieldItems-1Xvb1f4g.js";import"./offering-BPFU8PCl.js";import"./mapToObj-BY9mfno6.js";var Ra={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};function Xi(r,e,n){return Math.max(e,Math.min(r,n))}var bt=function(e){var n=["onTouchStart","onTouchMove","onWheel"];n.includes(e._reactName)||e.preventDefault()},Ci=function(e){for(var n=[],a=fn(e),i=yn(e),o=a;o<i;o++)e.lazyLoadedList.indexOf(o)<0&&n.push(o);return n},fn=function(e){return e.currentSlide-za(e)},yn=function(e){return e.currentSlide+Aa(e)},za=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(p
vendor: 10,367 bytes, line 3
3arseInt(e.centerPadding)>0?1:0):0},Aa=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},Ki=function(e){return e&&e.offsetWidth||0},pr=function(e){return e&&e.offsetHeight||0},vn=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,i,o,s;return a=e.startX-e.curX,i=e.startY-e.curY,o=Math.atan2(i,a),s=Math.round(o*180/Math.PI),s<0&&(s=360-Math.abs(s)),s<=45&&s>=0||s<=360&&s>=315?"left":s>=135&&s<=225?"right":n===!0?s>=35&&s<=135?"up":"down":"vertical"},ki=function(e){var n=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(n=!1),n},Li=function(e,n){var a={};return n.forEach(function(i){return a[i]=e[i]}),a},Na=function(e){var n=N.Children.count(e.children),a=e.listRef,i=Math.ceil(Ki(a)),o=e.trackRef&&e.trackRef.node,s=Math.ceil(Ki(o)),l;if(e.vertical)l=i;else{var d=e.centerMode&&parseInt(e.centerPadding)*2;typeof e.centerPadding=="string"&&e.centerPadding.slice(-1)==="%"&&(d*=i/100),l=Math.ceil((i-d)/e.slidesToShow)}var c=a&&pr(a.querySelector('[data-index="0"]')),p=c*e.slidesToShow,g=e.currentSlide===void 0?e.initialSlide:e.currentSlide;e.rtl&&e.currentSlide===void 0&&(g=n-1-e.initialSlide);var v=e.lazyLoadedList||[],f=Ci(j(j({},e),{},{currentSlide:g,lazyLoadedList:v}));v=v.concat(f);var h={slideCount:n,slideWidth:l,listWidth:i,trackWidth:s,currentSlide:g,slideHeight:c,listHeight:p,lazyLoadedList:v};return e.autoplaying===null&&e.autoplay&&(h.autoplaying="playing"),h},Ba=function(e){var n=e.waitForAnimate,a=e.animating,i=e.fade,o=e.infinite,s=e.index,l=e.slideCount,d=e.lazyLoad,c=e.currentSlide,p=e.centerMode,g=e.slidesToScroll,v=e.slidesToShow,f=e.useCSS,h=e.lazyLoadedList;if(n&&a)return{};var y=s,w,x,m,_={},u={},T=o?s:Xi(s,0,l-1);if(i){if(!o&&(s<0||s>=l))return{};s<0?y=s+l:s>=l&&(y=s-l),d&&h.indexOf(y)<0&&(h=h.concat(y)),_={animating:!0,currentSlide:y,lazyLoadedList:h,targetSlide:y},u={animating:!1,targetSlide:y}}else w=y,y<0?(w=y+l,o?l%g!==0&&(w=l-l%g):w=0):!ki(e)&&y>c?y=w=c:p&&y>=l?(y=o?l:l-1,w=o?0:l-1):y>=l&&(w=y-l,o?l%g!==0&&(w=0):w=l-v),!o&&y+v>=l&&(w=l-v),x=Kt(j(j({},e),{},{slideIndex:y})),m=Kt(j(j({},e),{},{slideIndex:w})),o||(x===m&&(y=w),x=m),d&&(h=h.concat(Ci(j(j({},e),{},{currentSlide:y})))),f?(_={animating:!0,currentSlide:w,trackStyle:xn(j(j({},e),{},{left:x})),lazyLoadedList:h,targetSlide:T},u={animating:!1,currentSlide:w,trackStyle:Xt(j(j({},e),{},{left:m})),swipeLeft:null,targetSlide:T}):_={currentSlide:w,trackStyle:Xt(j(j({},e),{},{left:m})),lazyLoadedList:h,targetSlide:T};return{state:_,nextState:u}},qa=function(e,n){var a,i,o,s,l,d=e.slidesToScroll,c=e.slidesToShow,p=e.slideCount,g=e.currentSlide,v=e.targetSlide,f=e.lazyLoad,h=e.infinite;if(s=p%d!==0,a=s?0:(p-g)%d,n.message==="previous")o=a===0?d:c-a,l=g-o,f&&!h&&(i=g-o,l=i===-1?p-1:i),h||(l=v-d);else if(n.message==="next")o=a===0?d:a,l=g+o,f&&!h&&(l=(g+d)%p+a),h||(l=v+d);else if(n.message==="dots")l=n.index*n.slidesToScroll;else if(n.message==="children"){if(l=n.index,h){var y=Xa(j(j({},e),{},{targetSlide:l}));l>n.currentSlide&&y==="left"?l=l-p:l<n.currentSlide&&y==="right"&&(l=l+p)}}else n.message==="index"&&(l=Number(n.index));return l},Ha=function(e,n,a){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!n?"":e.keyCode===37?a?"next":"previous":e.keyCode===39?a?"previous":"next":""},Va=function(e,n,a){return e.target.tagName==="IMG"&&bt(e),!n||!a&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}},Ua=function(e,n){var a=n.scrolling,i=n.animating,o=n.vertical,s=n.swipeToSlide,l=n.verticalSwiping,d=n.rtl,c=n.currentSlide,p=n.edgeFriction,g=n.edgeDragged,v=n.onEdge,f=n.swiped,h=n.swiping,y=n.slideCount,w=n.slidesToScroll,x=n.infinite,m=n.touchObject,_=n.swipeEvent,u=n.listHeight,T=n.listWidth;if(!a){if(i)return bt(e);o&&s&&l&&bt(e);var F,P={},k=Kt(n);m.curX=e.touches?e.touches[0].pageX:e.clientX,m.curY=e.touches?e.touches[0].pageY:e.clientY,m.swipeLength=Math.round(Math.sqrt(Math.pow(m.curX-m.startX,2)));var L=Math.round(Math.sqrt(Math.pow(m.curY-m.startY,2)));if(!l&&!h&&L>10)return{scrolling:!0};l&&(m.swipeLength=L);var R=(d?-1:1)*(m.curX>m.startX?1:-1);l&&(R=m.curY>m.startY?1:-1);var E=Math.ceil(y/w),Z=vn(n.touchObject,l),U=m.swipeLength;return x||(c===0&&(Z==="right"||Z==="down")||c+1>=E&&(Z==="left"||Z==="up")||!ki(n)&&(Z==="left"||Z==="up"))&&(U=m.swipeLength*p,g===!1&&v&&(v(Z),P.edgeDragged=!0)),!f&&_&&(_(Z),P.swiped=!0),o?F=k+U*(u/T)*R:d?F=k-U*R:F=k+U*R,l&&(F=k+U*R),P=j(j({},P),{},{touchObject:m,swipeLeft:F,trackStyle:Xt(j(j({},n),{},{left:F}))}),Math.abs(m.curX-m.startX)<Math.abs(m.curY-m.startY)*.8||m.swipeLength>10&&(P.swiping=!0,bt(e)),P}},Wa=function(e,n){var a=n.dragging,i=n.swipe,o=n.touchObject,s=n.listWidth,l=n.touchThreshold,d=n.verticalSwiping,c=n.listHeight,p=n.swipeToSlide,g=n.scrolling,v=n.onSwipe,f=n.targetSlide,h=n.currentSlide,y=n.infinite;if(!a)return i&&bt(e),{};var w=d?c/l:s/l,x=vn(o,d),m={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(g||!o.swipeLength)return m;if(o.swipeLength>w){bt(e),v&&v(x);var _,u,T=y?h:f;switch(x){case"left":case"up":u=T+Ir(n),_=p?jr(n,u):u,m.currentDirection=0;break;case"right":case"down":u=T-Ir(n),_=p?jr(n,u):u,m.currentDirection=1;break;default:_=T}m.triggerSlideHandler=_}else{var F=Kt(n);m.trackStyle=xn(j(j({},n),{},{left:F}))}return m},Ga=function(e){for(var n=e.infinite?e.slideCount*2:e.slideCount,a=e.infinite?e.slidesToShow*-1:0,i=e.infinite?e.slidesToShow*-1:0,o=[];a<n;)o.push(a),a=i+e.slidesToScroll,i+=Math.min(e.slidesToScroll,e.slidesToShow);return o},jr=function(e,n){var a=Ga(e),i=0;if(n>a[a.length-1])n=a[a.length-1];else for(var o in a){if(n<a[o]){n=i;break}i=a[o]}return n},Ir=function(e){var n=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var a,i=e.listRef,o=i.querySelectorAll&&i.querySelectorAll(".slick-slide")||[];if(Array.from(o).every(function(d){if(e.vertical){if(d.offsetTop+pr(d)/2>e.swipeLeft*-1)return a=d,!1}else if(d.offsetLeft-n+Ki(d)/2>e.swipeLeft*-1)return a=d,!1;return!0}),!a)return 0;var s=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide,l=Math.abs(a.dataset.index-s)||1;return l}else return e.slidesToScroll},mr=function(e,n){return n.reduce(function(a,i){return a&&e.hasOwnProperty(i)},!0)?null:console.error("Keys Missing:",e)},Xt=function(e){mr(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var n,a,i=e.slideCount+2*e.slidesToShow;e.vertical?a=i*e.slideHeight:n=Ya(e)*e.slideWidth;var o={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",d=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";o=j(j({},o),{},{WebkitTransform:s,transform:l,msTransform:d})}else e.vertical?o.top=e.left:o.left=e.left;return e.fade&&(o={opacity:1}),n&&(o.width=n),a&&(o.height=a),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?o.marginTop=e.left+"px":o.marginLeft=e.left+"px"),o},xn=function(e){mr(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var n=Xt(e);return e.useTransform?(n.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,n.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?n.transition="top "+e.speed+"ms "+e.cssEase:n.transition="left "+e.speed+"ms "+e.cssEase,n},Kt=function(e){if(e.unslick)return 0;mr(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var n=e.slideIndex,a=e.trackRef,i=e.infinite,o=e.centerMode,s=e.slideCount,l=e.slidesToShow,d=e.slidesToScroll,c=e.slideWidth,p=e.listWidth,g=e.variableWidth,v=e.slideHeight,f=e.fade,h=e.vertical,y=0,w,x,m=0;if(f||e.slideCount===1)return 0;var _=0;if(i?(_=-Ke(e),s%d!==0&&n+d>s&&(_=-(n>s?l-(n-s):s%d)),o&&(_+=parseInt(l/2))):(s%d!==0&&n+d>s&&(_=l-s%d),o&&(_=parseInt(l/2))),y=_*c,m=_*v,h?w=n*v*-1+m:w=n*c*-1+y,g===!0){var u,T=a&&a.node;if(u=n+Ke(e),x=T&&T.childNodes[u],w=x?x.offsetLeft*-1:0,o===!0){u=i?n+Ke(e):n,x=T&&T.children[u],w=0;for(var F=0;F<u;F++)w-=T&&T.children[F]&&T.children[F].offsetWidth;w-=parseInt(e.centerPadding),w+=x&&(p-x.offsetWidth)/2}}return w},Ke=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)},wi=function(e){return e.unslick||!e.infinite?0:e.slideCount},Ya=function(e){return e.slideCount===1?1:Ke(e)+e.slideCount+wi(e)},Xa=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+Ka(e)?"left":"right":e.targetSlide<e.currentSlide-Ja(e)?"right":"left"},Ka=function(e){var n=e.slidesToShow,a=e.centerMode,i=e.rtl,o=e.centerPadding;if(a){var s=(n-1)/2+1;return parseInt(o)>0&&(s+=1),i&&n%2===0&&(s+=1),s}return i?0:n-1},Ja=function(e){var n=e.slidesToShow,a=e.centerMode,i=e.rtl,o=e.centerPadding;if(a){var s=(n-1)/2+1;return parseInt(o)>0&&(s+=1),!i&&n%2===0&&(s+=1),s}return i?n-1:0},kr=function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},Ei=function(e){var n,a,i,o,s;e.rtl?s=e.slideCount-1-e.index:s=e.index,i=s<0||s>=e.slideCount,e.centerMode?(o=Math.floor(e.slidesToShow/2),a=(s-e.currentSlide)%e.slideCount===0,s>e.currentSlide-o-1&&s<=e.currentSlide+o&&(n=!0)):n=e.currentSlide<=s&&s<e.currentSlide+e.slidesToShow;var l;e.targetSlide<0?l=e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?l=e.targetSlide-e.slideCount:l=e.targetSlide;var d=s===l;return{"slick-slide":!0,"slick-active":n,"slick-center":a,"slick-cloned":i,"slick-current":d}},Za=function(e){var n={};return(e.variableWidth===void 0||e.variableWidth===!1)&&(n.width=e.slideWidth),e.fade&&(n.position="relative",e.vertical?n.top=-e.index*parseInt(e.slideHeight):n.left=-e.index*parseInt(e.slideWidth),n.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(n.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),n},$i=function(e,n){return e.key+"-"+n},Qa=function(e){var n,a=[],i=[],o=[],s=N.Children.count(e.children),l=fn(e),d=yn(e);
3return N.Children.forEach(e.children,function(c,p){var g,v={message:"children",index:p,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(p)>=0?g=c:g=N.createElement("div",null);var f=Za(j(j({},e),{},{index:p})),h=g.props.className||"",y=Ei(j(j({},e),{},{index:p}));if(a.push(N.cloneElement(g,{key:"original"+$i(g,p),"data-index":p,className:Ze(y,h),tabIndex:"-1","aria-hidden":!y["slick-active"],style:j(j({outline:"none"},g.props.style||{}),f),onClick:function(m){g.props&&g.props.onClick&&g.props.onClick(m),e.focusOnSelect&&e.focusOnSelect(v)}})),e.infinite&&e.fade===!1){var w=s-p;w<=Ke(e)&&s!==e.slidesToShow&&(n=-w,n>=l&&(g=c),y=Ei(j(j({},e),{},{index:n})),i.push(N.cloneElement(g,{key:"precloned"+$i(g,n),"data-index":n,tabIndex:"-1",className:Ze(y,h),"aria-hidden":!y["slick-active"],style:j(j({},g.props.style||{}),f),onClick:function(m){g.props&&g.props.onClick&&g.props.onClick(m),e.focusOnSelect&&e.focusOnSelect(v)}}))),s!==e.slidesToShow&&(n=s+p,n<d&&(g=c),y=Ei(j(j({},e),{},{index:n})),o.push(N.cloneElement(g,{key:"postcloned"+$i(g,n),"data-index":n,tabIndex:"-1",className:Ze(y,h),"aria-hidden":!y["slick-active"],style:j(j({},g.props.style||{}),f),onClick:function(m){g.props&&g.props.onClick&&g.props.onClick(m),e.focusOnSelect&&e.focusOnSelect(v)}})))}}),e.rtl?i.concat(a,o).reverse():i.concat(a,o)},es=(function(r){jt(n,r);var e=It(n);function n(){var a;kt(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return a=e.call.apply(e,[this].concat(o)),z(A(a),"node",null),z(A(a),"handleRef",function(l){a.node=l}),a}return Pt(n,[{key:"render",value:function(){var i=Qa(this.props),o=this.props,s=o.onMouseEnter,l=o.onMouseOver,d=o.onMouseLeave,c={onMouseEnter:s,onMouseOver:l,onMouseLeave:d};return N.createElement("div",it({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},c),i)}}]),n})(N.PureComponent),ts=function(e){var n;return e.infinite?n=Math.ceil(e.slideCount/e.slidesToScroll):n=Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,n},is=(function(r){jt(n,r);var e=It(n);function n(){return kt(this,n),e.apply(this,arguments)}return Pt(n,[{key:"clickHandler",value:function(i,o){o.preventDefault(),this.props.clickHandler(i)}},{key:"render",value:function(){for(var i=this.props,o=i.onMouseEnter,s=i.onMouseOver,l=i.onMouseLeave,d=i.infinite,c=i.slidesToScroll,p=i.slidesToShow,g=i.slideCount,v=i.currentSlide,f=ts({slideCount:g,slidesToScroll:c,slidesToShow:p,infinite:d}),h={onMouseEnter:o,onMouseOver:s,onMouseLeave:l},y=[],w=0;w<f;w++){var x=(w+1)*c-1,m=d?x:Xi(x,0,g-1),_=m-(c-1),u=d?_:Xi(_,0,g-1),T=Ze({"slick-active":d?v>
3=u&&v<=m:v===u}),F={message:"dots",index:w,slidesToScroll:c,currentSlide:v},P=this.clickHandler.bind(this,F);y=y.concat(N.createElement("li",{key:w,className:T},N.cloneElement(this.props.customPaging(w),{onClick:P})))}return N.cloneElement(this.props.appendDots(y),j({className:this.props.dotsClass},h))}}]),n})(N.PureComponent),rs=(function(r){jt(n,r);var e=It(n);function n(){return kt(this,n),e.apply(this,arguments)}return Pt(n,[{key:"clickHandler",value:function(i,o){o&&o.preventDefault(),this.props.clickHandler(i,o)}},{key:"render",value:function(){var i={"slick-arrow":!0,"slick-prev":!0},o=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(this.props.currentSlide===0||this.props.slideCount<=this.props.slidesToShow)&&(i["slick-disabled"]=!0,o=null);var s={key:"0","data-role":"none",className:Ze(i),style:{display:"block"},onClick:o},l={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},d;return this.props.prevArrow?d=N.cloneElement(this.props.prevArrow,j(j({},s),l)):d=N.createElement("button",it({key:"0",type:"button"},s)," ","Previous"),d}}]),n})(N.PureComponent),ns=(function(r){jt(n,r);var e=It(n);function n(){return kt(this,n),e.apply(this,arguments)}return Pt(n,[{key:"clickHandler",value:function(i,o){o&&o.preventDefault(),this.props.clickHandler(i,o)}},{key:"render",value:function(){var i={"slick-arrow":!0,"slick-next":!0},o=this.clickHandler.bind(this,{message:"next"});ki(this.props)||(i["slick-disabled"]=!0,o=null);var s={key:"1","data-role":"none",className:Ze(i),style:{display:"block"},onClick:o},l={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},d;return this.props.nextArrow?d=N.cloneElement(this.props.nextArrow,j(j({},s),l)):d=N.createElement("button",it({key:"1",type:"button"},s)," ","Next"),d}}]),n})(N.PureComponent),os=["animating"],as=(function(r){jt(n,r);var e=It(n);function n(a){var i;kt(this,n),i=e.call(this,a),z(A(i),"listRefHandler",function(s){return i.list=s}),z(A(i),"trackRefHandler",function(s){return i.track=s}),z(A(i),"adaptHeight",function(){if(i.props.adaptiveHeight&&i.list){var s=i.list.querySelector('[data-index="'.concat(i.state.currentSlide,'"]'));i.list.style.height=pr(s)+"px"}}),z(A(i),"componentDidMount",function(){if(i.props.onInit&&i.props.onInit(),i.props.lazyLoad){var s=Ci(j(j({},i.props),i.state));s.length>0&&(i.setState(function(d){return{lazyLoadedList:d.lazyLoadedList.concat(s)}}),i.props.onLazyLoad&&i.props.onLazyLoad(s))}var l=j({listRef:i.list,trackRef:i.track},i.props);i.updateState(l,!0,function(){i.adaptHeight(),i.props.autoplay&&i.autoPlay("playing")}),i.props.lazyLoad==="progressive"&&(i.lazyLoadTimer=setInterval(i.progressiveLazyLoad,1e3)),i.ro=new ao(function(){i.state.animating?(i.onWindowResized(!1),i.callbackTimers.push(setTimeout(function(){return i.onWindowResized()},i.props.speed))):i.onWindowResized()}),i.ro.observe(i.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),function(d){d.onfocus=i.props.pauseOnFocus?i.onSlideFocus:null,d.onblur=i.props.pauseOnFocus?i.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",i.onWindowResized):window.attachEvent("onresize",i.onWindowResized)}),z(A(i),"componentWillUnmount",function(){i.animationEndCallback&&clearTimeout(i.animationEndCallback),i.lazyLoadTimer&&clearInterval(i.lazyLoadTimer),i.callbackTimers.length&&(i.callbackTimers.forEach(function(s){return clearTimeout(s)}),i.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",i.onWindowResized):window.detachEvent("onresize",i.onWindowResized),i.autoplayTimer&&clearInterval(i.autoplayTimer),i.ro.disconnect()}),z(A(i),"componentDidUpdate",function(s){if(i.checkImagesLoad(),i.props.onReInit&&i.props.onReInit(),i.props.lazyLoad){var l=Ci(j(j({},i.props),i.state));l.length>0&&(i.setState(function(p){return{lazyLoadedList:p.lazyLoadedList.concat(l)}}),i.props.onLazyLoad&&i.props.onLazyLoad(l))}i.adaptHeight();var d=j(j({listRef:i.list,trackRef:i.track},i.props),i.state),c=i.didPropsChange(s);c&&i.updateState(d,c,function(){i.state.currentSlide>=N.Children.count(i.props.children)&&i.changeSlide({message:"index",index:N.Children.count(i.props.children)-i.props.slidesToShow,currentSlide:i.state.currentSlide}),(s.autoplay!==i.props.autoplay||s.autoplaySpeed!==i.props.autoplaySpeed)&&(!s.autoplay&&i.props.autoplay?i.autoPlay("playing"):i.props.autoplay?i.autoPlay("update"):i.pause("paused"))})}),z(A(i),"onWindowResized",function(s){i.debouncedResize&&i.debouncedResize.cancel(),i.debouncedResize=Ea(function(){return i.resizeWindow(s)},50),i.debouncedResize()}),z(A(i),"resizeWindow",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,l=!!(i.track&&i.track.node);
3if(l){var d=j(j({listRef:i.list,trackRef:i.track},i.props),i.state);i.updateState(d,s,function(){i.props.autoplay?i.autoPlay("update"):i.pause("paused")}),i.setState({animating:!1}),clearTimeout(i.animationEndCallback),delete i.animationEndCallback}}),z(A(i),"updateState",function(s,l,d){var c=Na(s);s=j(j(j({},s),c),{},{slideIndex:c.currentSlide});var p=Kt(s);s=j(j({},s),{},{left:p});var g=Xt(s);(l||N.Children.count(i.props.children)!==N.Children.count(s.children))&&(c.trackStyle=g),i.setState(c,d)}),z(A(i),"ssrInit",function(){if(i.props.variableWidth){var s=0,l=0,d=[],c=Ke(j(j(j({},i.props),i.state),{},{slideCount:i.props.children.length})),p=wi(j(j(j({},i.props),i.state),{},{slideCount:i.props.children.length}));i.props.children.forEach(function(P){d.push(P.props.style.width),s+=P.props.style.width});for(var g=0;g<c;g++)l+=d[d.length-1-g],s+=d[d.length-1-g];for(var v=0;v<p;v++)s+=d[v];for(var f=0;f<i.state.currentSlide;f++)l+=d[f];var h={width:s+"px",left:-l+"px"};if(i.props.centerMode){var y="".concat(d[i.state.currentSlide],"px");h.left="calc(".concat(h.left," + (100% - ").concat(y,") / 2 ) ")}return{trackStyle:h}}var w=N.Children.count(i.props.children),x=j(j(j({},i.props),i.state),{},{slideCount:w}),m=Ke(x)+wi(x)+w,_=100/i.props.slidesToShow*m,u=100/m,T=-u*(Ke(x)+i.state.currentSlide)*_/100;i.props.centerMode&&(T+=(100-u*_/100)/2);var F={width:_+"%",left:T+"%"};return{slideWidth:u+"%",trackStyle:F}}),z(A(i),"checkImagesLoad",function(){var s=i.list&&i.list.querySelectorAll&&i.list.querySelectorAll(".slick-slide img")||[],l=s.length,d=0;Array.prototype.forEach.call(s,function(c){var p=function(){return++d&&d>=l&&i.onWindowResized()};if(!c.onclick)c.onclick=function(){return c.parentNode.focus()};else{var g=c.onclick;c.onclick=function(){g(),c.parentNode.focus()}}c.onload||(i.props.lazyLoad?c.onload=function(){i.adaptHeight(),i.callbackTimers.push(setTimeout(i.onWindowResized,i.props.speed))}:(c.onload=p,c.onerror=function(){p(),i.props.onLazyLoadError&&i.props.onLazyLoadError()}))})}),z(A(i),"progressiveLazyLoad",function(){for(var s=[],l=j(j({},i.props),i.state),d=i.state.currentSlide;d<i.state.slideCount+wi(l);d++)if(i.state.lazyLoadedList.indexOf(d)<0){s.push(d);break}for(var c=i.state.currentSlide-1;c>=-Ke(l);c--)if(i.state.lazyLoadedList.indexOf(c)<0){s.push(c);break}s.length>0?(i.setState(function(p){return{lazyLoadedList:p.lazyLoadedList.concat(s)}}),i.props.onLazyLoad&&i.props.onLazyLoad(s)):i.lazyLoadTimer&&(clearInterval(i.lazyLoadTimer),delete i.lazyLoadTimer)}),z(A(i),"slideHandler",function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=i.props,c=d.asNavFor,p=d.beforeChange,g=d.onLazyLoad,v=d.speed,f=d.afterChange,h=i.state.currentSlide,y=Ba(j(j(j({index:s},i.props),i.state),{},{trackRef:i.track,useCSS:i.props.useCSS&&!l})),w=y.state,x=y.nextState;if(w){p&&p(h,w.currentSlide);var m=w.lazyLoadedList.filter(function(_){return i.state.lazyLoadedList.indexOf(_)<0});g&&m.length>0&&g(m),!i.props.waitForAnimate&&i.animationEndCallback&&(clearTimeout(i.animationEndCallback),f&&f(h),delete i.animationEndCallback),i.setState(w,function(){c&&i.asNavForIndex!==s&&(i.asNavForIndex=s,c.innerSlider.slideHandler(s)),x&&(i.animationEndCallback=setTimeout(function(){var _=x.animating,u=Eo(x,os);i.setState(u,function(){i.callbackTimers.push(setTimeout(function(){return i.setState({animating:_})},10)),f&&f(w.currentSlide),delete i.animationEndCallback})},v))})}}),z(A(i),"changeSlide",function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=j(j({},i.props),i.state),c=qa(d,s);if(!(c!==0&&!c)&&(l===!0?i.slideHandler(c,l):i.slideHandler(c),i.props.autoplay&&i.autoPlay("update"),i.props.focusOnSelect)){var p=i.list.querySelectorAll(".slick-current");p[0]&&p[0].focus()}}),z(A(i),"clickHandler",function(s){i.clickable===!1&&(s.stopPropagation(),s.preventDefault()),i.clickable=!0}),z(A(i),"keyHandler",function(s){var l=Ha(s,i.props.accessibility,i.props.rtl);l!==""&&i.changeSlide({message:l})}),z(A(i),"selectHandler",function(s){i.changeSlide(s)}),z(A(i),"disableBodyScroll",function(){var s=function(d){d=d||window.event,d.preventDefault&&d.preventDefault(),d.returnValue=!1};window.ontouchmove=s}),z(A(i),"enableBodyScroll",function(){window.ontouchmove=null}),z(A(i),"swipeStart",function(s){i.props.verticalSwiping&&i.disableBodyScroll();var l=Va(s,i.props.swipe,i.props.draggable);l!==""&&i.setState(l)}),z(A(i),"swipeMove",function(s){var l=Ua(s,j(j(j({},i.props),i.state),{},{trackRef:i.track,listRef:i.list,slideIndex:i.state.currentSlide}));l&&(l.swiping&&(i.clickable=!1),i.setState(l))}),z(A(i),"swipeEnd",function(s){var l=Wa(s,j(j(j({},i.props),i.state),{},{trackRef:i.track,listRef:i.list,slideIndex:i.state.currentSlide}));if(l){var d=l.triggerSlideHandler;delete l.triggerSlideHandler,i.setState(l),d!==void 0&&(i.slideHandler(d),i.props.verticalSwiping&&i.enableBodyScroll())}}),z(A(i),"touchEnd",function(s){i.swipeEnd(s),i.clickable=!0}),z(A(i),"slickPrev",function(){i.callbackTimers.push(setTimeout(function(){return i.changeSlide({message:"previous"})},0))}),z(A(i),"slickNext",function(){i.callbackTimers.push(setTimeout(function(){return i.changeSlide({message:"next"})},0))}),z(A(i),"slickGoTo",function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(s=Number(s),isNaN(s))return"";i.callbackTimers.push(setTimeout(function(){return i.changeSlide({message:"index",index:s,currentSlide:i.state.currentSlide},l)},0))}),z(A(i),"play",function(){var s;if(i.props.rtl)s=i.state.currentSlide-i.props.slidesToScroll;else if(ki(j(j({},i.props),i.state)))s=i.state.currentSlide+i.props.slidesToScroll;else return!1;i.slideHandler(s)}),z(A(i),"autoPlay",function(s){i.autoplayTimer&&clearInterval(i.autoplayTimer);var l=i.state.autoplaying;if(s==="update"){if(l==="hovered"||l==="focused"||l==="paused")return}else if(s==="leave"){if(l==="paused"||l==="focused")return}else if(s==="blur"&&(l==="paused"||l==="hovered"))return;i.autoplayTimer=setInterval(i.play,i.props.autoplaySpeed+50),i.setState({auto
3playing:"playing"})}),z(A(i),"pause",function(s){i.autoplayTimer&&(clearInterval(i.autoplayTimer),i.autoplayTimer=null);var l=i.state.autoplaying;s==="paused"?i.setState({autoplaying:"paused"}):s==="focused"?(l==="hovered"||l==="playing")&&i.setState({autoplaying:"focused"}):l==="playing"&&i.setState({autoplaying:"hovered"})}),z(A(i),"onDotsOver",function(){return i.props.autoplay&&i.pause("hovered")}),z(A(i),"onDotsLeave",function(){return i.props.autoplay&&i.state.autoplaying==="hovered"&&i.autoPlay("leave")}),z(A(i),"onTrackOver",function(){return i.props.autoplay&&i.pause("hovered")}),z(A(i),"onTrackLeave",function(){return i.props.autoplay&&i.state.autoplaying==="hovered"&&i.autoPlay("leave")}),z(A(i),"onSlideFocus",function(){return i.props.autoplay&&i.pause("focused")}),z(A(i),"onSlideBlur",function(){return i.props.autoplay&&i.state.autoplaying==="focused"&&i.autoPlay("blur")}),z(A(i),"render",function(){var s=Ze("slick-slider",i.props.className,{"slick-vertical":i.props.vertical,"slick-initialized":!0}),l=j(j({},i.props),i.state),d=Li(l,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),c=i.props.pauseOnHover;d=j(j({},d),{},{onMouseEnter:c?i.onTrackOver:null,onMouseLeave:c?i.onTrackLeave:null,onMouseOver:c?i.onTrackOver:null,focusOnSelect:i.props.focusOnSelect&&i.clickable?i.selectHandler:null});var p;if(i.props.dots===!0&&i.state.slideCount>=i.props.slidesToShow){var g=Li(l,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),v=i.props.pauseOnDotsHover;g=j(j({},g),{},{clickHandler:i.changeSlide,onMouseEnter:v?i.onDotsLeave:null,onMouseOver:v?i.onDotsOver:null,onMouseLeave:v?i.onDotsLeave:null}),p=N.createElement(is,g)}var f,h,y=Li(l,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);y.clickHandler=i.changeSlide,i.props.arrows&&(f=N.createElement(rs,y),h=N.createElement(ns,y));var w=null;i.props.vertical&&(w={height:i.state.listHeight});var x=null;i.props.vertical===!1?i.props.centerMode===!0&&(x={padding:"0px "+i.props.centerPadding}):i.props.centerMode===!0&&(x={padding:i.props.centerPadding+" 0px"});var m=j(j({},w),x),_=i.props.touchMove,u={className:"slick-list",style:m,onClick:i.clickHandler,onMouseDown:_?i.swipeStart:null,onMouseMove:i.state.dragging&&_?i.swipeMove:null,onMouseUp:_?i.swipeEnd:null,onMouseLeave:i.state.dragging&&_?i.swipeEnd:null,onTouchStart:_?i.swipeStart:null,onTouchMove:i.state.dragging&&_?i.swipeMove:null,onTouchEnd:_?i.touchEnd:null,onTouchCancel:i.state.dragging&&_?i.swipeEnd:null,onKeyDown:i.props.accessibility?i.keyHandler:null},T={className:s,dir:"ltr",style:i.props.style};return i.props.unslick&&(u={className:"slick-list"},T={className:s}),N.createElement("div",T,i.props.unslick?"":f,N.createElement("div",it({ref:i.listRefHandler},u),N.createElement(es,it({ref:i.trackRefHandler},d),i.props.children)),i.props.unslick?"":h,i.props.unslick?"":p)}),i.list=null,i.track=null,i.state=j(j({},Ra),{},{currentSlide:i.props.initialSlide,slideCount:N.Children.count(i.props.children)}),i.callbackTimers=[],i.clickable=!0,i.debouncedResize=null;var o=i.ssrInit();return i.state=j(j({},i.state),o),i}return Pt(n,[{key:"didPropsChange",value:function(i){for(var o=!1,s=0,l=Object.keys(this.props);s<l.length;s++){var d=l[s];if(!i.hasOwnProperty(d)){o=!0;break}if(!($o(i[d])==="object"||typeof i[d]=="function")&&i[d]!==this.props[d]){o=!0;break}}return o||N.Children.count(this.props.children)!==N.Children.count(i.children)}}]),n})(N.Component),Oi,Pr;function ss(){if(Pr)return Oi;Pr=1;var r=function(e){return e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()}).toLowerCase()};return Oi=r,Oi}var Ri,Fr;function ls(){if(Fr)return Ri;Fr=1;var r=ss(),e=function(i){var o=/[height|width]$/;return o.test(i)},n=function(i){var o="",s=Object.keys(i);
3return s.forEach(function(l,d){var c=i[l];l=r(l),e(l)&&typeof c=="number"&&(c=c+"px"),c===!0?o+=l:c===!1?o+="not "+l:o+="("+l+": "+c+")",d<s.length-1&&(o+=" and ")}),o},a=function(i){var o="";return typeof i=="string"?i:i instanceof Array?(i.forEach(function(s,l){o+=n(s),l<i.length-1&&(o+=", ")}),o):n(i)};return Ri=a,Ri}var ds=ls();const zi=en(ds);var Dr={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return N.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return N.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},cs=(function(r){jt(n,r);var e=It(n);function n(a){var i;return kt(this,n),i=e.call(this,a),z(A(i),"innerSliderRefHandler",function(o){return i.innerSlider=o}),z(A(i),"slickPrev",function(){return i.innerSlider.slickPrev()}),z(A(i),"slickNext",function(){return i.innerSlider.slickNext()}),z(A(i),"slickGoTo",function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return i.innerSlider.slickGoTo(o,s)}),z(A(i),"slickPause",function(){return i.innerSlider.pause("paused")}),z(A(i),"slickPlay",function(){return i.innerSlider.autoPlay("play")}),i.state={breakpoint:null},i._responsiveMediaHandlers=[],i}return Pt(n,[{key:"media",value:function(i,o){var s=window.matchMedia(i),l=function(c){var p=c.matches;p&&o()};s.addListener(l),l(s),this._responsiveMediaHandlers.push({mql:s,query:i,listener:l})}},{key:"componentDidMount",value:function(){var i=this;if(this.props.responsive){var o=this.props.responsive.map(function(l){return l.breakpoint});o.sort(function(l,d){return l-d}),o.forEach(function(l,d){var c;d===0?c=zi({minWidth:0,maxWidth:l}):c=zi({minWidth:o[d-1]+1,maxWidth:l}),kr()&&i.media(c,function(){i.setState({breakpoint:l})})});var s=zi({minWidth:o.slice(-1)[0]});kr()&&this.media(s,function(){i.setState({breakpoint:null})})}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach(function(i){i.mql.removeListener(i.listener)})}},{key:"render",value:function(){var i=this,o,s;this.state.breakpoint?(s=this.props.responsive.filter(function(w){return w.breakpoint===i.state.breakpoint}),o=s[0].settings==="unslick"?"unslick":j(j(j({},Dr),this.props),s[0].settings)):o=j(j({},Dr),this.props),o.centerMode&&(o.slidesToScroll>1,o.slidesToScroll=1),o.fade&&(o.slidesToShow>1,o.slidesToScroll>1,o.slidesToShow=1,o.slidesToScroll=1);var l=N.Children.toArray(this.props.children);l=l.filter(function(w){return typeof w=="string"?!!w.trim():!!w}),o.variableWidth&&(o.rows>1||o.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),o.variableWidth=!1);for(var d=[],c=null,p=0;p<l.length;p+=o.rows*o.slidesPerRow){for(var g=[],v=p;v<p+o.rows*o.slidesPerRow;v+=o.slidesPerRow){for(var f=[],h=v;h<v+o.slidesPerRow&&(o.variableWidth&&l[h].props.style&&(c=l[h].props.style.width),!(h>=l.length));h+=1)f.push(N.cloneElement(l[h],{key:100*p+10*v+h,tabIndex:-1,style:{width:"".concat(100/o.slidesPerRow,"%"),display:"inline-block"}}));g.push(N.createElement("div",{key:10*p+v},f))}o.variableWidth?d.push(N.createElement("div",{key:p,style:{width:c}},g)):d.push(N.createElement("div",{key:p},g))}if(o==="unslick"){var y="regular slider "+(this.props.className||"");return N.createElement("div",{className:y},l)}else d.length<=o.slidesToShow&&(o.unslick=!0);return N.createElement(as,it({style:this.props.style,ref:this.innerSliderRefHandler},o),d)}}]),n})(N.Component),us=function(r,e){var n={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&e.indexOf(a)<0&&(n[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(r);i<a.length;i++)e.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(r,a[i])&&(n[a[i]]=r[a[i]]);return n},ps=I.forwardRef(function(r,e){var n,a=r.dots,i=a===void 0?!0:a,o=r.arrows,s=o===void 0?!1:o,l=r.draggable,d=l===void 0?!1:l,c=r.dotPosition,p=c===void 0?"bottom":c,g=r.vertical,v=g===void 0?p==="left"||p==="right":g,f=us(r,["dots","arrows","draggable","dotPosition","vertical"]),h=I.useContext(Oo),y=h.getPrefixCls,w=h.direction,x=I.useRef(),m=function(E){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;x.current.slickGoTo(E,Z)};I.useImperativeHandle(e,function(){return{goTo:m,autoPlay:x.current.innerSlider.autoPlay,innerSlider:x.current.innerSlider,prev:x.current.slickPrev,next:x.current.slickNext}},[x.current]);var _=I.useRef(I.Children.count(f.children));I.useEffect(function(){_.current!==I.Children.count(f.children)&&(m(f.initialSlide||0,!1),_.current=I.Children.count(f.children))},[f.children]);var u=it({vertical:v},f);u.effect==="fade"&&(u.fade=!0);var T=y("carousel",u.prefixCls),F="slick-dots",P=!!i,k=Ze(F,"".concat(F,"-").concat(p),typeof i=="boolean"?!1:i==null?void 0:i.className),L=Ze(T,(n={},z(n,"".concat(T,"-rtl"),w==="rtl"),z(n,"".concat(T,"-vertical"),p==="left"||p==="right"),n));return I.createElement("div",{className:L},I.createElement(cs,it({ref:x},u,{dots:P,dotsClass:k,arrows:s,draggable:d})))}),ms={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M396 512a112 112 0 10224 0 112 112 0 10-224 0zm546.2-25.8C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2
3-300.3 7.7-16.2 7.7-35 0-51.5zM508 688c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z"}}]},name:"eye",theme:"filled"},_n=function(e,n){return I.createElement(Ii,j(j({},e),{},{ref:n,icon:ms}))};_n.displayName="EyeFilled";const gs=I.forwardRef(_n);var hs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},wn=function(e,n){return I.createElement(Ii,j(j({},e),{},{ref:n,icon:hs}))};wn.displayName="PictureOutlined";const gr=I.forwardRef(wn);var fs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"},Sn=function(e,n){return I.createElement(Ii,j(j({},e),{},{ref:n,icon:fs}))};Sn.displayName="PlayCircleFilled";const ys=I.forwardRef(Sn);var vs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}}]},name:"video-camera",theme:"outlined"},Cn=function(e,n){return I.createElement(Ii,j(j({},e),{},{ref:n,icon:vs}))};Cn.displayName="VideoCameraOutlined";const bn=I.forwardRef(Cn);let Ai=!1,Ni=!1;class xs{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){tt(!Ai,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ai=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ai=!1}}isDragging(){if(!this.sourceId)return!1;tt(!Ni,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ni=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ni=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Bi=!1;class _s{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;tt(!Bi,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Bi=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Bi=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}
3getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function ws(r){if(typeof r.type=="string")return;const e=r.type.displayName||r.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}function Ss(r){return(e=null,n=null)=>{if(!I.isValidElement(e)){const o=e;return r(o,n),o}const a=e;return ws(a),Cs(a,n?o=>r(o,n):r)}}function Tn(r){const e={};return Object.keys(r).forEach(n=>{const a=r[n];if(n.endsWith("Ref"))e[n]=r[n];else{const i=Ss(a);e[n]=()=>i}}),e}function Mr(r,e){typeof r=="function"?r(e):r.current=e}function Cs(r,e){const n=r.ref;return tt(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?I.cloneElement(r,{ref:a=>{Mr(n,a),Mr(e,a)}}):I.cloneElement(r,{ref:e})}function Ji(r){return r!==null&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"current")}function Zi(r,e,n,a){let i;if(i!==void 0)return!!i;if(r===e)return!0;if(typeof r!="object"||!r||typeof e!="object"||!e)return!1;const o=Object.keys(r),s=Object.keys(e);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<o.length;d++){const c=o[d];if(!l(c))return!1;const p=r[c],g=e[c];if(i=void 0,i===!1||i===void 0&&p!==g)return!1}return!0}class bs{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,a=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(a&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}a&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Zi(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Zi(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Tn({dragSource:(n,a)=>{this.clearDragSource(),this.dragSourceOptions=a||null,Ji(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,a)=>{this.clearDragPreview(),this.dragPreviewOptions=a||null,Ji(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Ts{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Zi(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Tn({dropTarget:(n,a)=>{this.clearDropTarget(),this.dropTargetOptions=a,Ji(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function js(r,e,n){const a=n.getRegistry(),i=a.addTarget(r,e);return[i,()=>a.removeTarget(i)]}function Is(r,e,n){const a=n.getRegistry(),i=a.addSource(r,e);return[i,()=>a.removeSource(i)]}const ht=typeof window<"u"?I.useLayoutEffect:I.useEffect;class ks{beginDrag(){const e=this.spec,n=this.monitor;let a=null;return typeof e.item=="object"?a=e.item:typeof e.item=="function"?a=e.item(n):a={},a!=null?a:null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const a=this.spec,i=this.monitor,{isDragging:o}=a;return o?o(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,a=this.connector,{end:i}=e;i&&i(n.getItem(),n),a.reconnect()}constructor(e,n,a){this.spec=e,this.monitor=n,this.connector=a}}function Ps(r,e,n){const a=I.useMemo(()=>new ks(r,e,n),[e,n]);return I.useEffect(()=>{a.spec=r},[r]),a}function Ft(){const{dragDropManager:r}=I.useContext(so);return tt(r!=null,"Expected drag drop context"),r}function Fs(r){return I.useMemo(()=>{const e=r.type;
3return tt(e!=null,"spec.type must be defined"),e},[r])}function Ds(r,e,n){const a=Ft(),i=Ps(r,e,n),o=Fs(r);ht(function(){if(o!=null){const[l,d]=Is(o,i,a);return e.receiveHandlerId(l),n.receiveHandlerId(l),d}},[a,e,n,i,o])}function jn(r,e){const n=[];return typeof r!="function"&&n.push(r),I.useMemo(()=>typeof r=="function"?r():r,n)}function Ms(){const r=Ft();return I.useMemo(()=>new xs(r),[r])}function Ls(r,e){const n=Ft(),a=I.useMemo(()=>new bs(n.getBackend()),[n]);return ht(()=>(a.dragSourceOptions=r||null,a.reconnect(),()=>a.disconnectDragSource()),[a,r]),ht(()=>(a.dragPreviewOptions=e||null,a.reconnect(),()=>a.disconnectDragPreview()),[a,e]),a}var qi,Lr;function Es(){return Lr||(Lr=1,qi=function r(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var a,i,o;if(Array.isArray(e)){if(a=e.length,a!=n.length)return!1;for(i=a;i--!==0;)if(!r(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),a=o.length,a!==Object.keys(n).length)return!1;for(i=a;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=a;i--!==0;){var s=o[i];if(!r(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),qi}var $s=Es();const Os=en($s);function Rs(r,e,n){const[a,i]=I.useState(()=>e(r)),o=I.useCallback(()=>{const s=e(r);Os(a,s)||(i(s),n&&n())},[a,r,n]);return ht(o),[a,o]}function zs(r,e,n){const[a,i]=Rs(r,e,n);return ht(function(){const s=r.getHandlerId();if(s!=null)return r.subscribeToStateChange(i,{handlerIds:[s]})},[r,i]),a}function In(r,e,n){return zs(e,r||(()=>({})),()=>n.reconnect())}function As(r){return I.useMemo(()=>r.hooks.dragSource(),[r])}function Ns(r){return I.useMemo(()=>r.hooks.dragPreview(),[r])}function Bs(r,e){const n=jn(r);tt(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const a=Ms(),i=Ls(n.options,n.previewOptions);return Ds(n,a,i),[In(n.collect,a,i),As(i),Ns(i)]}function qs(r){const{accept:e}=r;return I.useMemo(()=>(tt(r.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Hs{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Vs(r,e){const n=I.useMemo(()=>new Hs(r,e),[e]);return I.useEffect(()=>{n.spec=r},[r]),n}function Us(r,e,n){const a=Ft(),i=Vs(r,e),o=qs(r);ht(function(){const[l,d]=js(o,i,a);return e.receiveHandlerId(l),n.receiveHandlerId(l),d},[a,e,i,n,o.map(s=>s.toString()).join("|")])}function Ws(){const r=Ft();return I.useMemo(()=>new _s(r),[r])}function Gs(r){const e=Ft(),n=I.useMemo(()=>new Ts(e.getBackend()),[e]);return ht(()=>(n.dropTargetOptions=r||null,n.reconnect(),()=>n.disconnectDropTarget()),[r]),n}function Ys(r){return I.useMemo(()=>r.hooks.dropTarget(),[r])}function Xs(r,e){const n=jn(r),a=Ws(),i=Gs(n.options);return Us(n,a,i),[In(n.collect,a,i),Ys(i)]}const Er=(r="",e=r.length)=>{if(typeof r!="string")throw new Error("Argument 'string' should be typeof string");if(e&&typeof e!="number")throw new Error("Argument maxUtf16Length should be typeof number");const n=Array.from(r);let a=n.slice(0,e).join(""),i=e;for(;a.length>e;)--i,a=n.slice(0,i).join("");return a},kn=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M13.3333 4.53906H14.3333C14.8856 4.53906 15.3333 4.98678 15.3333 5.53906V10.5549C15.3333 11.1072 14.8856 11.5549 14.3333 11.5549H13.3333V4.53906Z",fill:"#191C20"}),t.jsx("path",{d:"M0.666668 5.53906C0.666668 4.98678 1.11438 4.53906 1.66667 4.53906H2.66667V11.5549H1.66667C1.11438 11.5549 0.666668 11.1072 0.666668 10.5549V5.53906Z",fill:"#191C20"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.37037 3.33334H11.6296C12.2 3.33334 12.6667 3.8 12.6667 4.37037V11.6296C12.6667 12.2 12.2 12.6667 11.6296 12.6667H4.37037C3.8 12.6667 3.33333 12.2 3.33333 11.6296V4.37037C3.33333 3.8 3.8 3.33334 4.37037 3.33334ZM10.6677 8.01631L8.39369 6.70346C8.31165 6.65614 8.21058 6.65614 8.12846 6.70346C8.04635 6.75078 7.99581 6.83859 7.99581 6.93324V8.01096L5.73129 6.70346C5.6491 6.65614 5.5481 6.65614 5.46599 6.70346C5.38387 6.75078 5.33333 6.83859 5.33333 6.93324V9.55902C5.33333 9.65367 5.38387 9.74131 5.46599 9.78863C5.50704 9.81229 5.5528 9.82425 5.59856 9.82425C5.64431 9.82425 5.69015 9.81229 5.73121 9.78863L7.99564 8.4813V9.55902C7.99564 9.65367 8.0461 9.74131 8.12821 9.78863C8.16927 9.81229 8.21519 9.82425 8.26087 9.82425C8.30654 9.82425 8.35246 9.81229 8.39336 9.78863L10.6674 8.47
3578C10.7495 8.42846 10.8 8.34082 10.8 8.24601C10.8003 8.15136 10.7498 8.06364 10.6677 8.01631Z",fill:"#191C20"})]}),hr=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"m15.116 2.398.196.64-9.044 9.634S2.9 11.418 1.622 8.961L1.18 7.609s1.303 2.384 4.547 3.367l9.389-8.578z",fill:"currentColor"}),t.jsx("path",{d:"m15.779 4.438.22.689L7.276 15.72s-3.441-1.696-4.645-3.662l-.345-1.082s1.279 1.942 4.45 3.122l9.044-9.66z",fill:"currentColor"}),t.jsx("mask",{id:"6avz80zska",fill:"currentColor",children:t.jsx("path",{d:"m.441 3.484 12.854-2.25c.393-.068.634.418.34.688L9.878 5.39l-4.08 3.64a.892.892 0 0 1-.967.165c-.651-.3-1.785-.922-2.758-1.975C1.015 6.074.403 4.672.146 3.984a.375.375 0 0 1 .295-.5z"})}),t.jsx("path",{d:"m.441 3.484 12.854-2.25c.393-.068.634.418.34.688L9.878 5.39l-4.08 3.64a.892.892 0 0 1-.967.165c-.651-.3-1.785-.922-2.758-1.975C1.015 6.074.403 4.672.146 3.984a.375.375 0 0 1 .295-.5z",fill:"currentColor"}),t.jsx("path",{d:"M13.295 1.234 13.123.25l.172.985zM.441 3.484.27 2.499l.172.985zm-.295.5.936-.35-.936.35zM2.073 7.22l-.735.678.735-.678zm2.758 1.975.418-.909-.418.91zm.967-.166-.665-.746.665.746zm4.08-3.639.666.747.006-.006.007-.006-.679-.735zm3.757-3.468.679.735-.679-.735zM13.123.25.269 2.5l.345 1.97 12.854-2.25-.345-1.97zM-.791 4.335c.276.736.943 2.278 2.13 3.563l1.469-1.357c-.93-1.007-1.486-2.268-1.726-2.908l-1.873.702zm2.13 3.563c1.094 1.186 2.357 1.876 3.075 2.206l.835-1.818c-.585-.268-1.59-.824-2.441-1.745l-1.47 1.357zm5.125 1.878 4.08-3.64-1.331-1.492-4.08 3.639 1.33 1.493zm4.093-3.65 3.757-3.469-1.357-1.47L9.2 4.657l1.357 1.47zm-6.143 3.978c.729.335 1.523.142 2.05-.328L5.133 8.283c-.002.001.005-.006.026-.01a.157.157 0 0 1 .09.013l-.835 1.818zM.269 2.499c-.812.142-1.377.989-1.06 1.836l1.873-.702c.15.4-.127.776-.468.836l-.345-1.97zm13.199-.28c-.59.104-.95-.625-.51-1.031l1.356 1.47c1.026-.948.184-2.65-1.191-2.409l.345 1.97z",fill:"currentColor",mask:"url(#6avz80zska)"})]}),Pn=()=>t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.71589 5.0825C5.36608 5.0825 5.0825 5.36608 5.0825 5.71589C5.0825 6.06571 5.36608 6.34928 5.71589 6.34928H7.57067V10.829C7.57067 11.1874 7.86123 11.478 8.21967 11.478C8.5781 11.478 8.86867 11.1874 8.86867 10.829V6.34928H10.6141C10.9639 6.34928 11.2475 6.06571 11.2475 5.71589C11.2475 5.36608 10.9639 5.0825 10.6141 5.0825H5.71589Z",fill:"#191C20"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.37 2H12.96C13.7135 2 14.33 2.6165 14.33 3.37V12.96C14.33 13.7135 13.7135 14.33 12.96 14.33H3.37C2.6165 14.33 2 13.7135 2 12.96V3.37C2 2.6165 2.6165 2 3.37 2ZM11.96 12.96C12.5123 12.96 12.96 12.5123 12.96 11.96V4.37C12.96 3.81771 12.5123 3.37 11.96 3.37H4.37C3.81771 3.37 3.37 3.81772 3.37 4.37V11.96C3.37 12.5123 3.81772 12.96 4.37 12.96H11.96Z",fill:"#191C20"}),t.jsx("mask",{id:"mask0_2013_1053",maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"13",height:"13",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.37 2H12.96C13.7135 2 14.33 2.6165 14.33 3.37V12.96C14.33 13.7135 13.7135 14.33 12.96 14.33H3.37C2.6165 14.33 2 13.7135 2 12.96V3.37C2 2.6165 2.6165 2 3.37 2ZM11.96 12.96C12.5123 12.96 12.96 12.5123 12.96 11.96V4.37C12.96 3.81771 12.5123 3.37 11.96 3.37H4.37C3.81771 3.37 3.37 3.81772 3.37 4.37V11.96C3.37 12.5123 3.81772 12.96 4.37 12.96H11.96Z",fill:"white"})}),t.jsx("g",{mask:"url(#mask0_2013_1053)"})]});function Ks({isMultiChannel:r,isTemplateCanEdit:e,save:n,testSendAction:a}){const{t:i}=V(),[{data:o}]=da(),[s]=S.useForm(),l=sa(),[{loading:d},c]=rt({url:"/external_api/line/send-line-test/",method:"POST"},{manual:!0}),p=async()=>{const g=await a.resolveActor();if(!g)return;const v=async()=>{const{manual:f,lineId:h,testMemberSn:y,testerId:w,channelId:x}=s.getFieldsValue(),m=f&&(!h||!y),_=!f&&w==null;if(m||_||l==null)return;const u=f?{tester_line_id:h,tester_member_sn:y}:ca(o,w);try{await c({data:a.applyDelegationPayload({line_id:u.tester_line_id,member_sn:u.tester_member_sn,tester_group_id:u.tester_group_id,template_id:l,channel_id:x},g)}),he.info(i("editor.all.testExecutionInProgress")),oa(aa)}catch(T){console.error(T)}};e?n(!1,v,g)():v()};return t.jsxs(S,{layout:"vertical",form:s,initialValues:{manual:!1,lineId:"",testMemberSn:""},children:[t.jsx(la,{testersData:o,type:"line"}),r?t.jsx(Yo,{type:"line",isMultiChannel:r}):null,t.jsx(J,{disabled:d,type:"primary",onClick:async()=>{try{await s.validateFields(),p()}catch(g){console.log(g)}},children:i("sendLineText")})]})}const xi=(r,e,n)=>{let a=cn(r),i=a;return e.forEach((o,s)=>{Object.prototype.hasOwnProperty.call(i,o)||(i[o]=s===e.length-1?n:{}),s===e.length-1&&(i[o]=n),i=i[o]}),a},Fn=I.createContext({}),Js=({children:r})=>{const[e,n]=I.useState({}),[a,i]=I.useState({version:"v1"});return t.jsx(Fn.Provider,{value:{bubbleForms:e,setBubbleForms:n,carouselProductFeedConfigs:a,setCarouselProductFeedConfigs:i},children:r})},Qt=()=>I.useContext(Fn),Zs=({form:r,bubbleId:e})=>{const{setBubbleForms:n}
3=Qt();I.useEffect(()=>(n(a=>({...a,[e]:r})),()=>{n(a=>ha(a!=null?a:{},[e]))}),[r,e,n])},Dn=I.createContext(null);function Qs({children:r,reshowIdx:e,currentItemIdx:n,imgUrl:a,isImageCard:i,mergeTags:o}){return t.jsx(Dn.Provider,{value:{reshowIdx:e,currentItemIdx:n,imgUrl:a,isImageCard:i,mergeTags:o},children:r})}function ft(){const r=I.useContext(Dn);if(!r)throw new Error("useCarouselImageFormContext must be used within a CarouselImageFormProvider");return r}const Mn=({header:r,children:e})=>t.jsxs(el,{children:[t.jsx(tl,{children:r}),t.jsx(il,{children:e})]});var el=C("div").withConfig({displayName:"MovableWrapper___StyledDiv",componentId:"sc-8vdjrp-0"})(["margin-bottom:12px;border:1px solid var(--neutral-4);border-radius:4px;overflow:hidden;"]),tl=C("div").withConfig({displayName:"MovableWrapper___StyledDiv2",componentId:"sc-8vdjrp-1"})(["display:flex;align-items:center;justify-content:space-between;min-height:42px;padding:0 16px;background-color:var(--neutral-2);"]),il=C("div").withConfig({displayName:"MovableWrapper___StyledDiv3",componentId:"sc-8vdjrp-2"})(["padding:16px;background-color:#ffffff;"]);const rl=({buttonName:r,restField:e})=>{const{t:n}=V(),{modulePermissionSet:a}=fe(),i=a.has("Fubon"),o=[{label:n("editor.line.buttonStyle.link"),value:"link"},{label:n("editor.line.buttonStyle.primary"),value:"primary"}],s=[{label:n("editor.line.productFeed.productTitleSize.medium"),value:"md"},{label:n("editor.line.productFeed.productTitleSize.large"),value:"lg"}];return t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:8,children:t.jsx(S.Item,{...e,label:n("editor.all.style"),name:[r,"buttonStyle"],children:t.jsx(je,{options:o})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...e,label:n("editor.all.size"),name:[r,"buttonSize"],children:t.jsx(je,{options:s,disabled:i})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...e,label:n("color"),name:[r,"buttonColor"],children:t.jsx(un,{disabled:i})})})]})},nl=({buttonName:r,buttonIndex:e,restField:n,buttonsNamePath:a,fieldsLength:i,canRemove:o,onMoveUp:s,onMoveDown:l,onRemove:d})=>{const{t:c}=V(),{isImageCard:p}=ft(),g=[...a,r],v=[{label:c("editor.line.actionType.openLink"),value:"link"},{label:c("editor.line.actionType.sendMsg"),value:"message"}];return t.jsxs(Mn,{header:t.jsxs(t.Fragment,{children:["".concat(c("button")," ").concat(e+1),t.jsxs(H,{size:0,children:[e!==0&&t.jsx(J,{type:"text",icon:t.jsx(bi,{}),onClick:s}),e!==i-1&&t.jsx(J,{type:"text",icon:t.jsx(Ti,{}),onClick:l}),o&&t.jsx(J,{type:"text",icon:t.jsx(Tt,{}),onClick:d})]})]}),children:[t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:12,children:t.jsx(S.Item,{...n,rules:[{required:!0}],label:c("editor.all.actionType"),name:[r,"actionType"],children:t.jsx(je,{options:v})})}),t.jsx(oe,{span:12,children:t.jsx(S.Item,{noStyle:!0,dependencies:[[...g,"actionType"]],children:({getFieldValue:f})=>K(f([...g,"actionType"])).with("link",()=>p?I.createElement(S.Item,{...n,key:"subText",label:c("linkText"),rules:[{required:!0}],name:[r,"subText"]},t.jsx(Q,{showCount:!0,placeholder:c("linkText"),maxLength:40})):null).with("message",()=>I.createElement(S.Item,{...n,key:"message",label:c("editor.line.actionType.msgText"),rules:[{required:!0}],extra:c("editor.line.actionType.msgText.hint"),name:[r,"message"]},t.jsx(Q,{showCount:!0,placeholder:c("editor.line.actionType.msgText"),maxLength:40}))).otherwise(()=>null)})})]}),t.jsx(S.Item,{noStyle:!0,dependencies:[[...g,"actionType"]],children:({getFieldValue:f})=>f([...g,"actionType"])==="link"?I.createElement(S.Item,{...n,key:"uri",label:c("report.Table.title.Links"),rules:[{required:!0}],name:[r,"uri"],normalize:h=>h==null?void 0:h.trim()},t.jsx(Q,{placeholder:c("report.Table.title.Links")})):null}),p&&t.jsx(rl,{buttonName:r,restField:n})]})},ol=5,al=()=>{const{t:r}=V(),e=S.useFormInstance(),{modulePermissionSet:n}=fe(),a=n.has("Fubon"),{reshowIdx:i,currentItemIdx:o,isImageCard:s}=ft(),l=["content",o,"buttons"],d=()=>M("line/writeCarouselItem",{key:"buttons",value:e.getFieldValue(l),idx:i,currentItemIdx:o});return t.jsx(S.List,{name:l,children:(c,{add:p,remove:g,move:v})=>t.jsxs(t.Fragment,{children:[t.jsx(de.Title,{level:5,children:r("button")}),c.map(({key:f,name:h,...y},w)=>t.jsx(nl,{buttonName:h,buttonIndex:w,restField:y,buttonsNamePath:l,fieldsLength:c.length,canRemove:c.length>1,onMoveUp:()=>{v(w,w-1),d()},onMoveDown:()=>{v(w,w+1),d()},onRemove:()=>{g(h),d()}},f)),s&&t.jsx(J,{icon:t.jsx(pn,{}),onClick:()=>{p(lo(r,a)),d()},disabled:c.length>=ol,children:r("addButton")})]})})},sl=(r=[])=>r.length===7&&r[0]==="content"&&r[2]==="content"&&r[4]==="columns"&&r[6]==="text"?{carouselItemIdx:Number(r[1]),blockIndex:Number(r[3]),columnIndex:Number(r[5])}:null,Qi=new Map,er=new Map,tr=new Map,Ln=(r,e)=>"".concat(r,":").concat(e),ll=(r,e)=>(Qi.set(r,e),()=>{Qi.delete(r)}),dl=(r,e)=>{er.set(r,e);const n=tr.get(r);return n&&(e(n.blockIndex,n.columnIndex),tr.delete(r)),()=>{er.delete(r)}},cl=(r,e,n)=>{const a=er.get(r);if(a){a(e,n);return}tr.set(r,{blockIndex:e,columnIndex:n})},ul=(r,e,n,a)=>{cl(Ln(r,e),n,a)},pl=({bubbleIdx:r,carouselItemIdx:e,blockIndex:n,columnIndex:a})=>{var i;(i=Qi.get(r))==null||i(e,n,a)},ml=(r,e)=>{const n=sl(e);return n?(pl({bubbleIdx:r,...n}),!0):!1},gl=async(r,e,n)=>{var i;const a=(i=n==null?void 0:n[0])==null?void 0:i.name;return!a||!ml(e,a)?!1:(await new Promise(o=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{setTimeout(o,0)})})}),r.scrollToField(a,{behavior:"smooth",block:"center"}),!0)},En=I.createContext(null);function hl({children:r}){const e=S.useFormInstance(),{reshowIdx:n,currentItemIdx:a}=ft(),i=["content",a,"content"],o=()=>
3M("line/writeCarouselItem",{key:"content",value:e.getFieldValue(i),idx:n,currentItemIdx:a});return t.jsx(En.Provider,{value:{contentNamePath:i,syncContent:o},children:r})}function Pi(){const r=I.useContext(En);if(!r)throw new Error("useCarouselImageFormContentSectionContext must be used within a CarouselImageFormContentSectionProvider");return r}const fl=({blockName:r,activeColumnIdx:e,columnIdx:n,restField:a,blockFieldPath:i})=>{const{t:o}=V(),s=S.useFormInstance(),{modulePermissionSet:l}=fe(),{mergeTags:d}=ft(),{syncContent:c}=Pi(),p=I.useRef(null),g=l.has("SQLFunction")&&l.has("SQLFunctionMergeTagModule"),v=l.has("Fubon"),f=m=>{var L,R,E;const _=[...i,"columns",e,"text"],u=(R=(L=p.current)==null?void 0:L.resizableTextArea)==null?void 0:R.textArea,T=(E=s.getFieldValue(_))!=null?E:"";if(!u){s.setFieldValue(_,"".concat(T).concat(m)),c();return}const{selectionStart:F,selectionEnd:P}=u,k=T.substring(0,F).concat(m,T.substring(P));s.setFieldValue(_,k),c()},h=[{label:o("editor.line.productFeed.productTitleSize.small"),value:"sm"},{label:o("editor.line.productFeed.productTitleSize.medium"),value:"md"},{label:o("editor.line.productFeed.productTitleSize.large"),value:"lg"}],y=[{label:o("editor.all.contentSetting.fontWeight.regular"),value:"regular"},{label:o("editor.all.contentSetting.fontWeight.bold"),value:"bold"}],w=[{label:o("editor.all.contentSetting.position.left"),value:"start"},{label:o("editor.all.contentSetting.position.center"),value:"center"},{label:o("editor.all.contentSetting.position.right"),value:"end"}],x=[{label:o("yes"),value:!0},{label:o("no"),value:!1}];return t.jsxs(t.Fragment,{children:[t.jsx(yl,{...a,name:[r,"columns",n,"text"],label:o("editor.popUp.textContent"),rules:[{required:!0}],children:t.jsx(Q.TextArea,{ref:n===e?p:void 0,placeholder:o("text"),autoSize:{minRows:4}})}),t.jsx(S.Item,{wrapperCol:{offset:0}
3,children:t.jsxs(H,{children:[t.jsx(mn,{getItems:({basicItems:m,customFieldItems:_,sqlItems:u,sqlCustomDataFeedItems:T})=>[...m,..._,...g?[...u,...T]:[],...d!=null?d:[]],onClickTag:f,buttonProps:{size:"small"}}),t.jsx(sr,{label:o("emoji"),inputRef:p,onEmojiSelect:m=>f(m.native),buttonProps:{size:"small"}})]})}),t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"columns",n,"fontSize"],label:o("editor.all.contentSetting.fontSize"),children:t.jsx(je,{options:h})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"columns",n,"fontWeight"],label:o("editor.all.contentSetting.fontWeight"),children:t.jsx(je,{options:y})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"columns",n,"color"],label:o("color"),children:v?t.jsx(fa,{presetColors:[...co]}):t.jsx(un,{})})})]}),t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:12,children:t.jsx(S.Item,{...a,name:[r,"columns",n,"textAlign"],label:o("editor.all.contentSetting.align"),children:t.jsx(je,{options:w})})}),t.jsx(oe,{span:12,children:t.jsx(S.Item,{...a,name:[r,"columns",n,"wrap"],label:t.jsxs(H,{size:4,children:[o("editor.line.wrap"),t.jsx(et,{content:o("editor.line.wrap.tooltip")})]}),children:t.jsx(G.Group,{options:x})})})]})]})};var yl=C(S.Item).withConfig({displayName:"DetailedColumnTabChildren___StyledFormItem",componentId:"sc-uu539n-0"})(["margin-bottom:4px;"]);const vl=({blockName:r,activeColumnIdx:e,setActiveColumnIdx:n,restField:a,blockFieldPath:i})=>{var d;const{t:o}=V(),s=(d=S.useWatch([...i,"blockCount"]))!=null?d:2,l=Array.from({length:s},(c,p)=>({key:String(p),label:o("editor.line.columnN",{n:p+1}),children:t.jsx(fl,{blockName:r,activeColumnIdx:e,columnIdx:p,restField:a,blockFieldPath:i})}));return t.jsx(xl,{type:"card",activeKey:String(e),onChange:c=>n(Number(c)),items:l})};var xl=C(nr).withConfig({displayName:"DetailedColumnTab___StyledTabs",componentId:"sc-1xdjbln-0"})([".ant-tabs-nav{margin-bottom:16px;}&& .ant-tabs-content-holder{background-color:transparent;padding:0;}"]);const _l=({blockName:r,activeColumnIdx:e,setActiveColumnIdx:n,restField:a,blockFieldPath:i})=>{var y;const{t:o}=V(),s=S.useFormInstance(),{modulePermissionSet:l}=fe(),d=l.has("Fubon"),c=(y=S.useWatch([...i,"blockCount"]))!=null?y:1,{syncContent:p}=Pi(),g=w=>{var _,u;const x=(_=s.getFieldValue([...i,"columns"]))!=null?_:[],m=Array.from({length:w},(T,F)=>{var P;return(P=x[F])!=null?P:uo(d)});if(s.setFieldValue([...i,"columns"],m),w===1)s.setFieldValue([...i,"columnRatio"],Mi.columnRatio),s.setFieldValue([...i,"verticalAlign"],Mi.verticalAlign),s.setFieldValue([...i,"columnGap"],Mi.columnGap);else{const T=f(w),F=s.getFieldValue([...i,"columnRatio"]);T.some(P=>P.value===F)||s.setFieldValue([...i,"columnRatio"],(u=T[0])==null?void 0:u.value)}e>=w&&n(Math.max(0,w-1)),p()},v=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}],f=w=>K(w).with(2,()=>[{label:"1:1",value:"1:1"},{label:"1:2",value:"1:2"},{label:"2:1",value:"2:1"},{label:"1:3",value:"1:3"},{label:"3:1",value:"3:1"},{label:"1:4",value:"1:4"},{label:"4:1",value:"4:1"}]).with(3,()=>[{label:"1:1:1",value:"1:1:1"},{label:"1:2:1",value:"1:2:1"},{label:"2:1:1",value:"2:1:1"},{label:"1:1:2",value:"1:1:2"}]).otherwise(()=>[]),h=[{label:o("editor.all.contentSetting.position.top"),value:"flex-start"},{label:o("editor.all.contentSetting.position.verticalCenter"),value:"center"},{label:o("editor.all.contentSetting.position.bottom"),value:"flex-end"}];return t.jsxs(t.Fragment,{children:[t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:12,children:t.jsx(S.Item,{...a,name:[r,"blockCount"],label:o("editor.line.columnCount"),children:t.jsx(je,{options:v,placeholder:o("Please Select"),onChange:w=>g(w)})})}),t.jsx(oe,{span:12,children:t.jsx(S.Item,{...a,name:[r,"marginTop"],label:o("editor.line.marginTop"),children:t.jsx(wl,{min:0,precision:0,addonAfter:"px"})})})]}),c>1&&t.jsxs(Ne,{gutter:16,children:[t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"columnRatio"],label:o("editor.line.columnRatio"),children:t.jsx(je,{options:f(c),placeholder:o("Please Select")})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"verticalAlign"],label:o("editor.all.contentSetting.verticalAlign"),children:t.jsx(je,{options:h,placeholder:o("Please Select")})})}),t.jsx(oe,{span:8,children:t.jsx(S.Item,{...a,name:[r,"columnGap"],label:o("editor.line.columnGap"),children:t.jsx(Sl,{min:0,precision:0,addonAfter:"px"})})})]})]})};var wl=C(Be).withConfig({displayName:"GeneralContentSettings___StyledInputNumber",componentId:"sc-13oss3x-0"})(["width:100%;"]),Sl=C(Be).withConfig({displayName:"GeneralContentSettings___StyledInputNumber2",componentId:"sc-13oss3x-1"})(["width:100%;"]);const Cl=({activeColumnIdx:r=0,isCollapsed:e=!1,onColumnClick:n=()=>{},blockFieldPath:a=[]})=>{var c,p;const{t:i}=V(),o=S.useFormInstance(),s=(c=S.useWatch([...a,"blockCount"]))!=null?c:2,d=((p=S.useWatch([...a,"columnRatio"]))!=null?p:"1:1").split(":").map(Number);return t.jsx(bl,{$_css:e?"0":"16px",children:Array.from({length:s}).map((g,v)=>{const f=o.getFieldValue([...a,"columns",v,"text"]),h=!e&&v===r;return t.jsx(Tl,{role:"button",tabIndex:0,onClick:()=>n(v),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&n(v)}
3,$_css2:d[v]||1,$_css3:h?"solid":"dashed",$_css4:h?"var(--primary-1)":"var(--primary-0)",children:!f&&i("editor.line.editField")},v)})})};var bl=C("div").withConfig({displayName:"LayoutPreview___StyledDiv",componentId:"sc-6brc4b-0"})(["display:flex;gap:8px;margin-bottom:",";height:48px;"],r=>r.$_css),Tl=C("div").withConfig({displayName:"LayoutPreview___StyledDiv2",componentId:"sc-6brc4b-1"})(["flex:",";border-radius:2px;border:1px var(--primary-5) ",";background:",";color:var(--primary-7);cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{border:1px solid var(--primary-5);background-color:var(--primary-1);}"],r=>r.$_css2,r=>r.$_css3,r=>r.$_css4);const jl=({blockName:r,blockIndex:e,restField:n,fieldsLength:a,isExpanded:i,focusColumnIndex:o,onColumnFocusHandled:s,onExpand:l,onMoveUp:d,onMoveDown:c,onRemove:p})=>{const{t:g}=V(),{contentNamePath:v}=Pi(),[f,h]=I.useState(0),y=[...v,r];return I.useEffect(()=>{o!==void 0&&(h(o),s==null||s())},[o,s]),t.jsxs(Mn,{header:t.jsxs(t.Fragment,{children:[t.jsx(Il,{type:"text",onClick:()=>l(e),children:"".concat(g("editor.line.block")," ").concat(e+1)}),t.jsxs(H,{size:0,children:[e!==0&&t.jsx(J,{type:"text",icon:t.jsx(bi,{}),onClick:w=>{w.stopPropagation(),d()}}),e!==a-1&&t.jsx(J,{type:"text",icon:t.jsx(Ti,{}),onClick:w=>{w.stopPropagation(),c()}}),a>1&&t.jsx(J,{type:"text",icon:t.jsx(Tt,{}),onClick:w=>{w.stopPropagation(),p()}})]})]}),children:[t.jsx(Cl,{activeColumnIdx:f,isCollapsed:!i,onColumnClick:w=>{if(i&&w===f){l(e);return}h(w),i||l(e)},blockFieldPath:y}),t.jsxs(kl,{$_css:i?"auto":"0",$_css2:i?"16px":"0",children:[t.jsx(_l,{blockName:r,activeColumnIdx:f,setActiveColumnIdx:h,restField:n,blockFieldPath:y}),t.jsx(vl,{blockName:r,activeColumnIdx:f,setActiveColumnIdx:h,restField:n,blockFieldPath:y})]})]})};var Il=C(J).withConfig({displayName:"BlockItem___StyledButton",componentId:"sc-10fxdhs-0"})(["padding:0;height:auto;font-weight:inherit;"]),kl=C("div").withConfig({displayName:"BlockItem___StyledDiv",componentId:"sc-10fxdhs-1"})(["height:",";padding:",";overflow:hidden;background-color:var(--neutral-2);"],r=>r.$_css,r=>r.$_css2);const Pl=10,$r=(r,e,n)=>r===e?n:e<r&&n>=r?r-1:e>r&&n<=r?r+1:r,Fl=()=>{const{t:r}=V(),{modulePermissionSet:e}=fe(),n=e.has("Fubon"),{isImageCard:a,reshowIdx:i,currentItemIdx:o}=ft(),{contentNamePath:s,syncContent:l}=Pi(),[d,c]=I.useState(0),[p,g]=I.useState(null);I.useEffect(()=>{const f=Ln(i,o);return dl(f,(h,y)=>{c(h),g({blockIndex:h,columnIndex:y})})},[i,o]);const v=f=>{c(h=>h===f?null:f)};return a?t.jsxs(t.Fragment,{children:[t.jsx(S.List,{name:s,children:(f,{add:h,remove:y,move:w})=>t.jsxs(t.Fragment,{children:[t.jsx(de.Title,{level:5,children:r("content")}),f.map(({key:x,name:m,..._},u)=>t.jsx(jl,{blockName:m,blockIndex:u,restField:_,fieldsLength:f.length,isExpanded:d===u,focusColumnIndex:(p==null?void 0:p.blockIndex)===u?p.columnIndex:void 0,onColumnFocusHandled:()=>g(null),onExpand:v,onMoveUp:()=>{w(u,u-1),c(T=>T===null?null:$r(T,u,u-1)),l()},onMoveDown:()=>{w(u,u+1),c(T=>T===null?null:$r(T,u,u+1)),l()},onRemove:()=>{y(m),c(T=>T===null?null:T===u?Math.max(0,u-1):T>u?T-1:T),l()}},x)),t.jsx(J,{icon:t.jsx(mo,{}),onClick:()=>{h(po(n)),c(f.length),l()},disabled:f.length>=Pl,children:r("all.addResource",{resource:r("editor.line.block")})})]})}),t.jsx(Zt,{})]}):null},$n=({imgUrl:r,writeImgUrl:e,showSquareRatioHint:n=!0})=>{const{t:a}=V(),{modulePermissionSet:i}=fe(),[o,s]=I.useState(!1);return t.jsxs(Dl,{direction:"vertical",size:12,children:[t.jsx(Ml,{children:r?t.jsx(Ll,{src:r,width:200}):t.jsx(El,{children:t.jsx($l,{})})}),t.jsx(Si,{name:"image",accept:"image/png, image/jpeg, image/gif, image/bmp",action:"/ma_cms/line-image-carousel/",showUploadList:!1,beforeUpload:async l=>{try{return await sn(l,{size:20971520,width:1040,isSquare:n}),!0}catch(d){return!n&&d==="imageRatioNotOneThird"?!0:(K(d).with("imageSizeExceed",()=>he.error(a("all.errorMessage.theSizeMustNotExceed",{limit:"20 MB"}))).with("imageOverSizeError",()=>he.error(a("editor.line.imageOverSizeError"))).with("imageNotSquare",()=>he.error(a("editor.line.imageNotSquare"))).with("imageRatioNotOneThird",()=>he.error(a("editor.line.errormsg.aspectRatioExceed13"))).otherwise(()=>he.error(d||a("all.error.unexpectedError"))),s(!1),Si.LIST_IGNORE)}},customRequest:async({action:l,file:d,filename:c,onSuccess:p,onError:g})=>{const v=new FormData;v.append(c,d);try{const f=await or.post(l,v,{headers:{"Content-Type":"multipart/form-data"}});p(f.data)}catch(f){g(f)}},onChange:l=>{var d;if(l.file.status==="uploading")return s(!0);if(l.file.status==="done")return s(!1),e==null?void 0:e((d=l.file.response)==null?void 0:d.url);s(!1)},children:t.jsx(J,{loading:o,icon:r?t.jsx(ln,{}):t.jsx(cr,{}),children:a(r?"Change Image":"uploadImage")})}),t.jsxs(Ol,{direction:"vertical",size:4,children:[t.jsx(Hi,{children:a("lineImageUploadReminder")}),i.has("ImageSizeCompression")&&t.jsx(Hi,{children:a("editor.all.imageSizeCompressionHint")}),n&&t.jsx(Hi,{children:a("editor.line.imageSquareRatioHint")})]})]})},Hi=C(de.Text).withConfig({displayName:"ImageUploader__RemindText",componentId:"sc-1syu6f4-0"})(["color:#979797;"]);var Dl=C(H).withConfig({displayName:"ImageUploader___StyledSpace",componentId:"sc-1syu6f4-1"})(["width:100%;align-items:center;padding-top:28px;"]),Ml=C("div").withConfig({displayName:"ImageUploader___StyledDiv",componentId:"sc-1syu6f4-2"})(["padding:15px;box-shadow:0px 0px 0px 1px rgba(63,63,68,0.05),0px 1px 3px rgba(63,63,68,0.15);border-radius:3px;"]),Ll=C(lr).withConfig({displayName:"ImageUploader___StyledImage",componentId:"sc-1syu6f4-3"})(["border-radius:10px;"]),El=C("div").withConfig({displayName:"ImageUploader___StyledDiv2",componentId:"sc-1syu6f4-4"}
3)(["width:200px;height:200px;background-color:var(--neutral-3);border-radius:10px;display:flex;align-items:center;justify-content:center;"]),$l=C(dr).withConfig({displayName:"ImageUploader___StyledPictureFilled",componentId:"sc-1syu6f4-5"})(["color:var(--neutral-5);font-size:43px;"]),Ol=C(H).withConfig({displayName:"ImageUploader___StyledSpace2",componentId:"sc-1syu6f4-6"})(["align-items:center;"]);const Rl=()=>{const{t:r}=V(),{reshowIdx:e,currentItemIdx:n,imgUrl:a}=ft(),i=o=>M("line/writeCarouselItem",{key:"imgUrl",value:o,idx:e,currentItemIdx:n});return t.jsxs(t.Fragment,{children:[t.jsx(de.Title,{level:5,children:r("image")}),t.jsx($n,{imgUrl:a,writeImgUrl:i,showSquareRatioHint:!1}),t.jsx(Zt,{})]})},ir=r=>{const e=String(r!=null?r:"").replace(/\D/g,"");return e?Number(e):null},On=r=>r===null?"":va({value:r,locale:"en",style:"decimal"}),Or={normalize:r=>On(ir(r)),getValueProps:r=>({value:ir(r)})},Rr={min:0,precision:0,formatter:r=>On(ir(r))},zl=()=>{const{t:r}=V(),{modulePermissionSet:e}=fe(),n=e.has("Fubon"),{currentItemIdx:a}=ft(),i=[{label:r("editor.all.contentSetting.position.left"),value:"start"},{label:r("editor.all.contentSetting.position.right"),value:"end"}];return n?null:t.jsxs(t.Fragment,{children:[t.jsx(de.Title,{level:5,children:r("price")}
3),t.jsx(S.Item,{label:r("price"),children:t.jsxs(H,{children:[t.jsx(S.Item,{noStyle:!0,name:["content",a,"currencyType"],children:t.jsx(Al,{allowClear:!0,showSearch:!0,placeholder:r("editor.line.carousel.price.currencyPlaceholder"),options:ji})}),t.jsx(S.Item,{noStyle:!0,children:t.jsx(S.Item,{noStyle:!0,dependencies:["content",a,"currencyType"],children:({getFieldValue:o})=>{const s=o(["content",a,"currencyType"]);return t.jsxs(H,{children:[t.jsx(S.Item,{noStyle:!0,name:["content",a,"originalPrice"],...Or,children:t.jsx(Nl,{name:"originalPrice",disabled:!s,addonBefore:r("originalPrice"),placeholder:r("amountOfMoney"),...Rr})}),t.jsx(S.Item,{noStyle:!0,name:["content",a,"specialPrice"],...Or,children:t.jsx(Bl,{name:"specialPrice",disabled:!s,addonBefore:r("salePrice"),placeholder:r("amountOfMoney"),...Rr})})]})}})})]})}),t.jsx(S.Item,{noStyle:!0,dependencies:[["content",a,"currencyType"]],children:({getFieldValue:o})=>o(["content",a,"currencyType"])?t.jsx(S.Item,{name:["content",a,"price_align"],label:r("editor.all.pricePosition"),children:t.jsx(G.Group,{options:i})}):null}),t.jsx(Zt,{})]})};var Al=C(Qe).withConfig({displayName:"PriceSection___StyledSelect",componentId:"sc-atmy0p-0"})(["min-width:100px;"]),Nl=C(Be).withConfig({displayName:"PriceSection___StyledInputNumber",componentId:"sc-atmy0p-1"})(["min-width:220px;.ant-input-number{width:100%;}"]),Bl=C(Be).withConfig({displayName:"PriceSection___StyledInputNumber2",componentId:"sc-atmy0p-2"})(["min-width:220px;.ant-input-number{width:100%;}"]);const ql=({imgUrl:r})=>t.jsxs(t.Fragment,{children:[t.jsx(Rl,{imgUrl:r}),t.jsx(hl,{children:t.jsx(Fl,{})}),t.jsx(zl,{}),t.jsx(al,{})]}),_i=({rootFieldPath:r,fieldPath:e,name:n,radioValue:a})=>{const i=e?[...e,"relativeTimeType"]:["relativeTimeType"],o=e?[...e,n]:n,{formStatus:s}=nn();return t.jsx(S.Item,{dependencies:i,noStyle:!0,children:({getFieldValue:l})=>t.jsx(S.Item,{name:o,children:t.jsx(Ul,{type:"number",min:1,disabled:(r&&e?l([r,...e,"relativeTimeType"])!==a:l("relativeTimeType")!==a)||(s==null?void 0:s.disabled)})})})},Hl=({rootFieldPath:r,fieldPath:e,...n})=>{const a="onlyStart",i="onlyEnd",o="between",{t:s}=V(),l=e?[...e,"relativeTimeType"]:"relativeTimeType";return t.jsx(S.Item,{name:l,...n,children:t.jsx(G.Group,{children:t.jsxs(H,{direction:"vertical",children:[t.jsx(G,{value:a,children:t.jsxs(Wl,{children:[s("relativeOnlyStartingTime1"),t.jsx(_i,{fieldPath:e,rootFieldPath:r,name:"only_relative_starting_time",radioValue:a}),s("days"),s("relativeOnlyStartingTime2")]})}),t.jsx(G,{value:i,children:t.jsxs(Gl,{children:[s("relativeOnlyEdingTime1"),t.jsx(_i,{fieldPath:e,rootFieldPath:r,name:"only_relative_ending_time",radioValue:i}),s("days"),s("relativeOnlyEdingTime2")]})}),t.jsx(G,{value:o,children:t.jsxs(Yl,{children:[s("relativeStaringAndEndingTime1"),t.jsx(_i,{fieldPath:e,rootFieldPath:r,name:"relative_ending_time",radioValue:o}),s("days"),s("relativeStaringAndEndingTime2"),t.jsx(_i,{fieldPath:e,rootFieldPath:r,name:"relative_starting_time",radioValue:o}),s("days"),s("relativeStaringAndEndingTime3")]})})]})})})},Vl=({fieldPath:r,...e})=>{const{t:n}=V();return t.jsx(H,{size:"large",children:[{name:"starting_time",label:n("startingDate")},{name:"ending_time",label:n("endingDate")}].map(({name:a,label:i})=>t.jsx(S.Item,{name:r?[...r,a]:a,label:i,labelCol:{span:24},...e,children:t.jsx(go,{})},a))})};var Ul=C(Q).withConfig({displayName:"AbsoluteOrRelativeDatePicker___StyledInput",componentId:"sc-1fw3dnv-0"})(["width:100px;"]),Wl=C(H).withConfig({displayName:"AbsoluteOrRelativeDatePicker___StyledSpace",componentId:"sc-1fw3dnv-1"})(["align-items:baseline;"]),Gl=C(H).withConfig({displayName:"AbsoluteOrRelativeDatePicker___StyledSpace2",componentId:"sc-1fw3dnv-2"})(["align-items:baseline;"]),Yl=C(H).withConfig({displayName:"AbsoluteOrRelativeDatePicker___StyledSpace3",componentId:"sc-1fw3dnv-3"})(["align-items:baseline;"]);const Xl=({textProductCustomFields:r})=>{const{t:e}=V(),{setFieldValue:n}=S.useFormInstance(),[{data:a=[],loading:i}]=rt("/ma_audience/product/additional-product-photo-names/"),o=({width:s,height:l})=>{const d=l/s;return!l||!s||d>0&&d<=3?Promise.resolve():Promise.reject(e("editor.line.productFeed.aspectRatioLimit"))};return t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{label:e("editor.line.productFeed.frameResponse"),labelCol:{span:5},name:["imageRatio","type"],children:t.jsx(je,{onChange:s=>{s==="auto"&&n("aspectMode","cover")},options:[{value:"auto",label:e("editor.line.productFeed.auto")},{value:"custom",label:e("editor.line.productFeed.customRatio")}]})}),t.jsx(S.Item,{dependencies:[["imageRatio","type"]],noStyle:!0,children:({getFieldValue:s})=>{const l=s(["imageRatio","type"]);return t.jsxs(t.Fragment,{children:[l==="custom"&&t.jsx(S.Item,{label:t.jsxs(H,{
3children:[e("editor.email.productFeed.customRatioLabel"),t.jsx(et,{content:e("editor.line.productFeed.aspectRatioLimit")})]}),labelCol:{span:5},required:!0,children:t.jsxs(Kl,{children:[t.jsx(Jl,{name:["imageRatio","width"],dependencies:[["imageRatio","height"]],rules:[{required:!0},({getFieldValue:d})=>({validator:(c,p)=>{const g=d(["imageRatio","height"]);return o({width:p,height:g})}})],messageVariables:{label:e("editor.line.productFeed.width")},children:t.jsx(Be,{min:1,max:1e4,style:{width:"100%"},addonBefore:e("editor.line.productFeed.width")})}),t.jsx(Zl,{children:":"}),t.jsx(Ql,{name:["imageRatio","height"],rules:[{required:!0},({getFieldValue:d})=>({validator:(c,p)=>{const g=d(["imageRatio","width"]);return o({width:g,height:p})}})],messageVariables:{label:e("editor.line.productFeed.height")},children:t.jsx(Be,{min:1,max:1e4,style:{width:"100%"},addonBefore:e("editor.line.productFeed.height")})})]})}),t.jsx(S.Item,{name:"aspectMode",label:e("editor.line.productFeed.imageFillMethod"),labelCol:{span:5},children:t.jsxs(G.Group,{disabled:l==="auto",children:[l!=="auto"&&t.jsx(G,{value:"fit",children:t.jsxs(H,{size:4,children:[e("editor.line.productFeed.imageFillMethod.fit"),t.jsx(et,{content:e("editor.line.productFeed.imageFillMethod.fit.tooltip")})]})}),t.jsx(G,{value:"cover",children:t.jsxs(H,{size:4,children:[e("editor.line.productFeed.imageFillMethod.fill"),t.jsx(et,{content:e("editor.line.productFeed.imageFillMethod.fill.tooltip")})]})})]})})]})}}),a.length>0&&t.jsx(S.Item,{name:"additional_image_name",label:e("editor.line.productFeed.productImage"),labelCol:{span:5},children:t.jsx(je,{options:[{value:"",label:e("editor.line.productFeed.productImage.default")},...a.map(s=>({value:s,label:s}))],loading:i,optionFilterProp:"value",showSearch:!0})}),t.jsx(S.Item,{name:"productTitleSize",label:e("editor.line.productFeed.productTitleSize"),labelCol:{span:5},children:t.jsxs(G.Group,{children:[t.jsx(G,{value:"sm",children:e("editor.line.productFeed.productTitleSize.small")}),t.jsx(G,{value:"md",children:e("editor.line.productFeed.productTitleSize.medium")}),t.jsx(G,{value:"lg",children:e("editor.line.productFeed.productTitleSize.large")})]})}),t.jsx(S.Item,{dependencies:[["isShowCustomField"]],noStyle:!0,children:({getFieldValue:s})=>{const l=s("isShowCustomField");return t.jsxs(t.Fragment,{children:[t.jsx(ed,{name:"isShowCustomField",label:e("editor.all.productCustomField"),labelCol:{span:5},valuePropName:"checked",$_css:[l&&Te(["margin-bottom:0px;"])],children:t.jsx(yi,{children:e("editor.line.productCustomField.display")})}),l&&t.jsx(td,{name:"custom_field_id",labelCol:{span:5},label:" ",colon:!1,extra:e("editor.all.productCustomField.helpText"),rules:[{required:!0}],required:!1,messageVariables:{label:e("editor.all.productCustomField")},children:t.jsx(je,{showSearch:!0,optionFilterProp:"label",options:r.map(d=>({value:d.id,label:d.field_name})),placeholder:e("all.pleaseSelect")})})]})}}),t.jsx(S.Item,{name:"price_types",label:e("editor.line.productFeed.productPrice"),labelCol:{span:5},children:t.jsxs(yi.Group,{children:[t.jsx(yi,{value:"original",children:e("originalPrice")}),t.jsx(yi,{value:"special",children:e("salePrice")})]})}),t.jsx(S.Item,{name:"price_align",label:e("editor.all.pricePosition"),labelCol:{span:5},children:t.jsxs(G.Group,{children:[t.jsx(G,{value:"start",children:e("editor.all.contentSetting.position.left")}),t.jsx(G,{value:"end",children:e("editor.all.contentSetting.position.right")})]})})]})};var Kl=C("div").withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledDiv",componentId:"sc-17t6ww0-0"})(["display:flex;align-items:start;"]),Jl=C(S.Item).withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledFormItem",componentId:"sc-17t6ww0-1"})(["flex-basis:50%;margin-bottom:0;"]),Zl=C("div").withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledDiv2",componentId:"sc-17t6ww0-2"})(["display:grid;place-content:center;flex-basis:32px;height:30px;flex-shrink:0;"]),Ql=C(S.Item).withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledFormItem2",componentId:"sc-17t6ww0-3"})(["flex-basis:50%;margin-bottom:0;"]),ed=C(S.Item).withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledFormItem3",componentId:"sc-17t6ww0-4"})(["",""],r=>r.$_css),td=C(S.Item).withConfig({displayName:"ProductFeedDisplaySettingsV2___StyledFormItem4",componentId:"sc-17t6ww0-5"})(["margin-left:30px;"]);const id=()=>{const{t:r}=V();return t.jsx(S.Item,{label:r("editor.line.carouselTitle"),labelCol:{span:5},required:!0,children:t.jsx(S.List,{name:"headers",children:e=>t.jsx(ad,{direction:"vertical",size:24,children:e.map(n=>t.jsx(sd,{direction:"vertical",children:t.jsx(S.Item,{...n,rules:[{required:!0}],required:!1,label:r("all.title",{number:n.name+1}),labelCol:{span:24},children:t.jsx(ld,{maxLength:10,autoSize:{maxRows:1},showCount:!0})})},n.key))})})})},rd=({productFeedType:r,productTags:e,idx:n})=>{const{t:a}=V(),{dataCategoryEnum:i}=Ca(),[o,s]=I.useState(!1),[{data:l=[]}
3]=rt({url:"/ma_audience/product-category/"}),{data:d=[]}=ar({params:{data_category:i.product.key,data_source:"Template",page_size:-1,page:1}}),c=1,p=30,g=f=>{if(f>p){s(!0);return}else s(!1)};return(f=>{var h;switch(f){case"recent_view":case"abandon_cart":case"view_together":case"wishlist":return t.jsx(t.Fragment,{children:t.jsxs(S.Item,{label:a("daysAgo"),required:!0,labelCol:{span:5},children:[t.jsx(S.Item,{name:"lookBackDays",noStyle:!0,normalize:y=>y>p?p:y<c?c:y,children:t.jsx(Be,{style:{width:"100%"},type:"number",onChange:g,status:o&&"warning"})}),o&&t.jsxs(dd,{children:["("+a("maxDaysAgoReminder")+")"," "]})]})});case"tag":return t.jsx(S.Item,{label:a("productTags"),labelCol:{span:5},required:!0,name:"tag",children:t.jsx(Qe,{"data-test-id":"product-tag-".concat(n),mode:"multiple",optionFilterProp:"label",options:e==null?void 0:e.map(({name:y})=>({label:y,value:y}))})});case"category":return t.jsx(S.Item,{label:a("productCategory"),labelCol:{span:5},required:!0,name:"tag",children:t.jsx(Qe,{"data-test-id":"product-category-".concat(n),mode:"multiple",optionFilterProp:"label",options:(h=l==null?void 0:l.data)==null?void 0:h.map(({category_name:y})=>({label:y,value:y}))})});case"most_view":case"most_sold_by_ranking":case"most_sold":return t.jsxs(Ne,{children:[t.jsx(oe,{span:5}),t.jsxs(oe,{span:19,children:[t.jsx(S.Item,{name:"timeType",rules:[{required:!0,message:a("all.validation.columnMustBeFilled")}],children:t.jsx(G.Group,{options:[{label:a("absoluteDate"),value:"absoluteDate"},{label:a("relativeTime"),value:"relativeTime"}]})}),t.jsx(S.Item,{dependencies:["timeType"],noStyle:!0,children:({getFieldValue:y})=>K(y("timeType")).with("absoluteDate",()=>t.jsx(Vl,{rules:[{required:!0}],getValueProps:w=>({value:w?dn(w,"YYYY/MM/DD"):null})})).with("relativeTime",()=>t.jsx(Hl,{messageVariables:{label:a("timeType")},rules:[{required:!0}]})).otherwise(()=>null)})]})]});case"attribute":return t.jsx(od,{});case"personalized_inventory":return t.jsx(_a,{});case"all_products_inventory":return t.jsx(xa,{});case"personalized_price_fluctuation_variation":return t.jsx(cd,{});case"price_fluctuation_variation":return t.jsx(ud,{});case"custom_field":return t.jsx(ho,{productCustomFields:d,labelCol:{span:5}});default:return null}})(r)},nd=({bubble:r,idx:e,isMultiSite:n})=>{const{t:a}=V(),{productFeedType:i,site:o}=r||{},{modulePermissionSet:s}=fe(),l=s.has("OS91APPLiff"),{cascaderOptions:d}=on(),{carouselProductFeedConfigs:c}=Qt(),p=[{label:a("originalPrice"),value:"original"},{label:a("salePrice"),value:"special"},{label:"".concat(a("originalPrice")," + ").concat(a("salePrice")),value:"original_and_special"}],g=[{label:a("editor.line.transferTarget.website"),value:"official_web"},{label:a("editor.line.transferTarget.91applineliff"),value:"91app_web"}],[{data:v}]=rt({url:"/ma_workflow/audience-tag/",params:{category:"product",is_attributes:!1}}),{data:f=[]}=ar({params:{data_category:"product",data_source:"Template",page_size:-1,page:1}}),h=y=>{M("line/writeProductFeedCarouselItem",{value:y,key:"site",idx:e})};return t.jsxs(pd,{children:[t.jsx(S.Item,{label:a("linkText"),labelCol:{span:5},rules:[{required:!0}],name:"productFeedUriText",children:t.jsx(Q,{placeholder:a("yourText"),maxLength:40,showCount:!0})}),l&&t.jsx(S.Item,{label:a("editor.line.transferTarget"),labelCol:{span:5},required:!0,name:"redirect_target",children:t.jsx(G.Group,{options:g})}),t.jsx(de.Title,{level:5,children:a("productFeedUrlHeader")}),t.jsx(Xo,{formItemProps:{labelCol:{span:5}}}),t.jsx(S.Item,{name:"productFeedType",hidden:!0,children:t.jsx(Q,{})}),t.jsx(S.Item,{required:!0,label:a("editor.email.productFeed.productSource"),labelCol:{span:5},name:"productFeedTypeCascader",children:t.jsx(ja,{"data-test-id":"select-product-feed-type-".concat(e),expandTrigger:"hover",allowClear:!1,options:d,placeholder:a("pleaseSelect")})}),t.jsx(rd,{productFeedType:i,productTags:v,idx:e}),t.jsx(S.Item,{noStyle:!0,dependencies:["productFeedType","excluded_product_range"],children:()=>{const y={tag:!0,customFields:!0};return t.jsx(Ko,{name:"excluded_product_range",labelCol:{span:5},label:a("editor.all.excludedProductRange"),enabledOptions:y,productCustomFields:f,required:!0})}}),t.jsx(S.Item,{noStyle:!0,dependencies:["productFeedType","limit_product_range"],children:()=>{const y={tag:i!=="tag",category:i!=="category",customFields:i!=="custom_field"&&i!=="attribute"};return t.jsx(ba,{name:"limit_product_range",labelCol:{span:5},dependencies:["productFeedType"],label:a("editor.all.limitProductRange"),enabledOptions:y,productCustomFields:f,required:!0})}}),t.jsx(de.Title,{level:5,children:a("editor.email.productFeed.displaySetting")}
3),t.jsx(S.Item,{label:t.jsxs(H,{children:[a("numOfItem"),t.jsx(et,{content:a("editor.line.numberOfItems.tooltip")})]}),labelCol:{span:5},rules:[{required:!0}],name:"numOfProductFeed",messageVariables:{label:a("numOfItem")},children:t.jsx(md,{placeholder:a("Number"),min:1,max:10})}),t.jsx(S.Item,{dependencies:["productFeedType","numOfProductFeed "],noStyle:!0,children:({getFieldValue:y})=>y("productFeedType")==="most_sold_by_ranking"&&t.jsx(id,{})}),c.version==="v2"?t.jsx(Xl,{textProductCustomFields:f.filter(y=>y.field_type==="text")}):t.jsx(S.Item,{label:a("price"),labelCol:{span:5},name:"price_type",required:!0,children:t.jsx(G.Group,{options:p})}),n&&t.jsx(Ta,{name:"site",valueLocator:y=>y.id,onChange:h,fieldProps:{required:!0},defaultValue:o}),t.jsx(de.Title,{level:5,children:a("editor.email.productFeed.trackSource")}),t.jsx(S.Item,{label:a("source"),labelCol:{span:5},name:"utm_source",children:t.jsx(Q,{placeholder:"utm_source"})}),t.jsx(S.Item,{label:a("medium"),labelCol:{span:5},name:"utm_medium",children:t.jsx(Q,{placeholder:"utm_medium"})}),t.jsx(S.Item,{label:a("campaign"),labelCol:{span:5},name:"utm_campaign",children:t.jsx(Q,{placeholder:"utm_campaign"})}),t.jsx(S.Item,{label:a("editor.productFeed.customParameter"),labelCol:{span:5},name:"custom_tracking_params",children:t.jsx(Q,{placeholder:a("editor.productFeed.customParameter.placeholder")})})]})};function od(){const r={Brand:"product.productVariant.brand",Material:"product.productVariant.material",Size:"product.productVariant.size",Color:"product.productVariant.color"},{t:e}=V(),[n,a]=I.useState(),[{data:{custom:i=[],default:o=[]}={},loading:s}]=rt({url:"/ma_audience/product/product-attribute-fields/"}),[{data:l=[],loading:d}]=rt({url:"/ma_audience/product/product-attribute-values/?attribute_field=".concat(n)},{manual:!n});return t.jsxs(S.Item,{labelCol:{span:5},label:e("product.productVariant"),style:{marginBottom:0},required:!0,children:[t.jsx(S.Item,{messageVariables:{label:e("product.productVariant")},name:"product_attribute_key",rules:[{required:!0}],style:{display:"inline-block",width:"50%"},children:t.jsx(Qe,{loading:s,placeholder:e("all.selectField"),onChange:c=>{a(c)},options:i.map(c=>({label:c,value:c})).concat(o.map(c=>({label:"".concat(e(r[c])," (").concat(e("all.default"),")"),value:c})))})}),t.jsx(S.Item,{messageVariables:{label:e("product.productVariant")},rules:[{required:!0}],name:"product_attribute_value",style:{display:"inline-block",width:"calc(50% - 8px)",marginLeft:"8px"},children:t.jsx(Qe,{placeholder:e("all.selectValue"),loading:d,options:l.map(c=>(an(c)&&(c=e(c==null?void 0:c.toString())),{label:c,value:c}))})})]})}var ad=C(H).withConfig({displayName:"CarouselProductFeedForm___StyledSpace",componentId:"sc-1r2062f-0"})(["width:100%;"]),sd=C(H).withConfig({displayName:"CarouselProductFeedForm___StyledSpace2",componentId:"sc-1r2062f-1"})(["width:100%;"]),ld=C(Q.TextArea).withConfig({displayName:"CarouselProductFeedForm___StyledInputTextArea",componentId:"sc-1r2062f-2"})(["width:100%;"]),dd=C("div").withConfig({displayName:"CarouselProductFeedForm___StyledDiv",componentId:"sc-1r2062f-3"})(["color:#9b9b9b;position:absolute;"]),cd=C(wa).withConfig({displayName:"CarouselProductFeedForm___StyledEditorPersonalizedPriceFluctuationField",componentId:"sc-1r2062f-4"})(["margin-bottom:24px;"]),ud=C(Sa).withConfig({displayName:"CarouselProductFeedForm___StyledEditorAllPriceFluctuationField",componentId:"sc-1r2062f-5"})(["margin-bottom:24px;"]),pd=C("div").withConfig({displayName:"CarouselProductFeedForm___StyledDiv2",componentId:"sc-1r2062f-6"})(["border:1px solid var(--neutral-5);padding:16px 32px;border-radius:var(--border-radius-base);"]),md=C(Be).withConfig({displayName:"CarouselProductFeedForm___StyledInputNumber",componentId:"sc-1r2062f-7"})(["width:100%;"]);const gd=async(r,e,n)=>{var o,s;const a=(o=n==null?void 0:n.errorFields)!=null?o:[];!await gl(r,e,a)&&((s=a[0])!=null&&s.name)&&r.scrollToField(a[0].name,{behavior:"smooth",block:"center"})},zr=({width:r,height:e,message:n})=>{const a=e/r;return!e||!r||a>0&&a<=3?Promise.resolve():Promise.reject(n)},rr=[{label:"1:1",value:"1:1",ratio:{width:1,height:1}},{label:"1.51:1",value:"1.51:1",ratio:{width:1.51,height:1}}],hd=r=>{var e;return(e=rr.find(n=>n.ratio.width===(r==null?void 0:r.width)&&n.ratio.height===(r==null?void 0:r.height)))==null?void 0:e.value},fd=(r,e)=>{const{relativeTimeType:n,relative_starting_time:a,relative_ending_time:i}=r,o=n==="onlyStart"&&!xr(a),s=n==="onlyEnd"&&!xr(i);return gn([{limit_product_range:"disable",excluded_product_range:"disable",productFeedTypeCascader:e(r.productFeedType),imageRatio:{width:1,height:1},aspectMode:"cover"},cn(r),o?{only_relative_starting_time:a}:{},s?{only_relative_ending_time:i}:{}])},Ar=r=>Object.entries(r).map(([e,n])=>({name:[e],value:n})),Nr="DraggableTabNode",yd=({index:r,children:e,moveNode:n})=>{const[a,i]=I.useState(null),o=I.useRef(null),[{isOver:s,canDrop:l},d]=Xs({accept:Nr,collect:p=>{const{index:g}=p.getItem()||{};return g===r?{}:(i(g),{isOver:p.isOver(),canDrop:p.canDrop()})},drop:p=>
3{n(p.index,r)}}),[,c]=Bs({type:Nr,item:{index:r},collect:p=>({isDragging:p.isDragging()})});return d(c(o)),t.jsx(_d,{ref:o,$_css:l&&s&&(a<r?"border-right: 2px solid var(--primary-color)":"border-left: 2px solid var(--primary-color)"),children:e})},vd=({content:r,onEditTabs:e,setCurrentItemIdx:n,currentItemIdx:a,idx:i,isImageCard:o,mergeTags:s,onDelete:l})=>{const{t:d}=V(),c=r.map((v,f)=>{var h;return{key:"".concat(f),label:"Tab".concat(f+1),forceRender:!0,children:t.jsx(Qs,{reshowIdx:i,currentItemIdx:f,imgUrl:((h=r[f])==null?void 0:h.imgUrl)||"",isImageCard:o,mergeTags:s,children:t.jsx(ql,{})}),closeIcon:t.jsx(Ia,{title:d("editor.deleteTabConfirm"),onConfirm:()=>l(f),children:t.jsx(Ro,{})}),...r.length===1&&{closable:!1}}}),p=(v,f)=>{if(v===f)return;const h=r.splice(v,1);r.splice(f,0,...h),n(Number(f)),M("line/changeCarouselItemOrder",{idx:i,content:r})},g=(v,f)=>t.jsx(f,{...v,children:h=>t.jsx(yd,{index:h.key,moveNode:p,children:h},h.key)});return t.jsx(nr,{type:"editable-card",onEdit:e,hideAdd:r.length===10,activeKey:a.toString(),onChange:v=>n(Number(v)),renderTabBar:g,items:c})},xd=({idx:r,bubble:e,...n})=>{const{t:a}=V(),{modulePermissionSet:i}=fe(),o=i.has("Fubon"),[s,l]=I.useState(0),{content:d,carouselType:c="image_card"}=e||{},[p]=S.useForm(),{getCascaderValue:g}=on();Zs({form:p,bubbleId:e.id}),I.useEffect(()=>ll(r,(m,_,u)=>{l(m),ul(r,m,_,u)}),[r]);const v=n.is_multi_site||!1,f=c==="image_card",h=[{label:a("carouselImageCard"),value:"image_card"},{label:a("carouselImageOnly"),value:"image_only"}],y=[{label:a("normal"),value:!1,isShow:!0},{label:a("all.ProductFeed"),value:!0,isShow:f&&i.has("EditorProductRecommendation")}],w=(m,_)=>{_==="add"&&d.length<10&&(M("line/addCarouselItem",{idx:r,isFubon:o}),l(d.length-1))},x=m=>{var T,F,P;const _=(F=(T=m[0])==null?void 0:T.name)==null?void 0:F[0],u=(P=m[0])==null?void 0:P.value;K(_).with("carouselType",()=>{M("line/setCarouselType",{carouselType:u,idx:r}),u==="image_only"&&M("line/setIsProductFeed",{isProductFeed:!1,idx:r})}).with("isProductFeed",()=>{M("line/setIsProductFeed",{isProductFeed:u,idx:r})}).with("productFeedTypeCascader",()=>{const k=u.at(-1);if(M("line/setProductFeedType",{productFeedType:k,idx:r}),M("line/writeProductFeedCarouselItem",{key:"tag",value:[],idx:r}),k==="most_sold_by_ranking"){const L=Array(3).fill().map((R,E)=>"Top ".concat(E+1));M("line/writeProductFeedCarouselItem",{value:3,key:"numOfProductFeed",idx:r}),M("line/writeProductFeedCarouselItem",{value:L,key:"headers",idx:r})}else M("line/writeProductFeedCarouselItem",{value:[],key:"headers",idx:r});["tag","category","custom_field","attribute"].includes(k)&&M("line/writeProductFeedCarouselItem",{value:"disable",key:"limit_product_range",idx:r})}).with("productFeedUriText","redirect_target","utm_source","utm_medium","utm_campaign","custom_tracking_params","price_type","lookBackDays","timeType","relativeTimeType","excluded_product_range","excluded_tags","limit_product_range","included_tags","included_categories","only_relative_starting_time","only_relative_ending_time","relative_starting_time","relative_ending_time","product_attribute_key","product_attribute_value",()=>{M("line/writeProductFeedCarouselItem",{value:u,key:_,idx:r}),_==="limit_product_range"&&(u==="disable"||u==="included_tags"||u==="included_categories")&&M("line/writeProductFeedCarouselItem",{key:"included_custom_fields",value:{product_custom_field:{}},idx:r}),_==="excluded_product_range"&&(u==="disable"||u==="excluded_tags")&&M("line/writeProductFeedCarouselItem",{key:"excluded_custom_fields",value:[{}],idx:r})}).with("numOfProductFeed",()=>{var L;if(e.productFeedType==="most_sold_by_ranking"){const R=u>e.numOfProductFeed,E=(L=e==null?void 0:e.headers)!=null?L:[],Z=R?E.concat(Array(u-e.numOfProductFeed).fill()).map((U,ce)=>U!=null?U:"Top ".concat(ce+1)):E.slice(0,u);M("line/writeProductFeedCarouselItem",{value:Z,key:"headers",idx:r})}M("line/writeProductFeedCarouselItem",{value:u,key:_,idx:r})}).with("headers",()=>{const k=Object.assign([],e.headers,{[m[0].name[1]]:u});M("line/writeProductFeedCarouselItem",{value:k,key:"headers",idx:r})}).with("starting_time","ending_time",()=>{M("line/writeProductFeedCarouselItem",{value:u?dn(u).format("YYYY/MM/DD"):null,key:_,idx:r})}).with("tag","category",()=>{M("line/writeProductFeedCarouselItem",{key:"tag",value:u,idx:r})}).with("content",()=>{const k=m[0].name[2],L=m[0].name.length>3;M("line/writeCarouselItem",{value:L?p.getFieldValue(["content",s,k]):u,key:k,idx:r,currentItemIdx:s})}).with("inventory",()=>{var E;const k=m[0].name.slice(1),L=(E=e==null?void 0:e.inventory)!=null?E:{},R=xi(L,k,u);M("line/writeProductFeedCarouselItem",{key:"inventory",value:R,idx:r})}).with("productGranularity",()=>{M("line/writeProductFeedCarouselItem",{value:u,key:_,idx:r})}).with("distinctRootProduct",()=>{M("line/writeProductFeedCarouselItem",{value:u,key:_,idx:r})}).with("imageRatio",()=>{M("line/writeProductFeedCarouselItem",{value:p.getFieldValue("imageRatio"),key:"imageRatio",idx:r})}).with("aspectMode",()=>{M("line/writeProductFeedCarouselItem",{value:u,key:"aspectMode",idx:r})}).with("product_custom_field",()=>{var E;const k=m[0].name.slice(1),L=(E=e==null?void 0:e.product_custom_field)!=null?E:{};let R=xi(L,k,u);k[0]==="custom_field_id"?R={custom_field_id:u}:k[0]==="inputType"?R={custom_field_id:L.custom_field_id,inputType:u}:k[0]==="is_future_time"?R={custom_field_id:L.custom_field_id,inputType:L.inputType,is_future_time:u}:k[0]==="usingInput"&&(R={custom_field_id:L.custom_field_id,inputType:L.inputType,is_future_time:L.is_future_time,usingInput:u}),M("line/writeProductFeedCarouselItem",{key:"product_custom_field",value:R,idx:r})}).with("included_custom_fields",()=>{var E;const k=m[0].name.slice(1),L=(E=e==null?void 0:e.included_custom_fields)!=null?E:{};let R=xi(L,k,u);k[1]==="custom_field_id"&&(R={product_custom_field:{custom_field_id:u}}),(k==null?void 0:k.at(-1))==="inputType"&&(R=xi(R,[...k.slice(0,-1),"filter_value"],void 0)),M("line/writeProductFeedCarouselItem",{key:"included_custom_fields",value:R,idx:r})}).with("excluded_custom_fields",()=>{var L,R;let k;if(m[0].name.length===1)k=[...m[0].value],k=k.length>=1?k.map(E=>E||{}):[{}];else if(m[0].name.length>1){const E=m[0].name.slice(1);k=[...(L=e==null?void 0:e.excluded_custom_fields)!=null?L:[]];const U=E[0];typeof U=="number"&&(k[U]={...k[U],product_custom_field:{...(R=k[U])==null?void 0:R.product_custom_field,[E[2]]:u,...(E==null?void 0:E.at(-1))==="inputType"&&{filter_value:void 0}}}),E[2]==="custom_field_id"&&(k=k.map((ce,ye)=>ye===U?{product_custom_field:{custom_field_id:u}}:ce))}M("line/writeProductFeedCarouselItem",{key:"excluded_custom_fields",value:k,idx:r})}).otherwise(()=>{})};return t.jsx(wd,{children:t.jsxs(S,{form:p,layout:"vertical",initialValues:fd(e,g),fields:[...Ar(e),...Ar(ur(p.getFieldsValue(),fo))],onFieldsChange:x,onFinishFailed:m=>{gd(p,r,m)},children:[t.jsxs(Ne,{children:[t.jsx(oe,{span:12,children:t.jsx(S.Item,{label:a("carouselType"),name:"carouselType",children:t.jsx(G.Group,{options:h})})}),t.jsx(Sd,{span:12,children:t.jsx(S.Item,{dependencies:["carouselType"],noStyle:!0,children:()=>t.jsx(S.Item,{label:a("imageSource"),name:"isProductFeed",children:t.jsx(G.Group,{options:y.filter(m=>m.isShow)})})})})]}),t.jsx(S.Item,{dependencies:["carouselType","isProductFeed"],noStyle:!0,children:({getFieldValue:m})=>{const _=m("carouselType")==="image_card",u=m("isProductFeed");return _&&u&&i.has("EditorProductRecommendation")?t.jsx(Cd,{direction:"vertical",children:t.jsx(nd,{bubble:e,idx:r,isMultiSite:v})}):t.jsxs(t.Fragment,{children:[t.jsxs(Ne,{wrap:!1,children:[t.jsx(oe,{span:12,children:o?t.jsx(S.Item,{label:a("editor.all.customRatio"),name:"imageRatio",rules:[{required:!0,message:a("all.requiredresourceConfirm",{resource:a("editor.all.customRatio")})}],normalize:T=>{var F;return(F=rr.find(P=>P.value===T))==null?void 0:F.ratio},getValueProps:T=>({value:hd(T)}),children:t.jsx(Qe,{options:rr})}
3):t.jsx(S.Item,{label:t.jsxs(H,{children:[a("editor.all.customRatio"),t.jsx(et,{content:a("editor.line.productFeed.aspectRatioLimit")})]}),children:t.jsxs(Ne,{children:[t.jsx(oe,{span:11,children:t.jsx(bd,{name:["imageRatio","width"],dependencies:[["imageRatio","height"]],rules:[{required:!0,message:a("all.requiredresourceConfirm",{resource:a("editor.all.customRatio")})},({getFieldValue:T})=>({validator:(F,P)=>zr({width:P,height:T(["imageRatio","height"]),message:a("editor.line.productFeed.aspectRatioLimit")})})],children:t.jsx(Be,{min:1,max:1e4,style:{width:"100%"},addonBefore:a("editor.line.productFeed.width")})})}),t.jsx(Td,{span:1,children:t.jsx(de.Text,{children:":"})}),t.jsx(oe,{span:11,children:t.jsx(jd,{name:["imageRatio","height"],dependencies:[["imageRatio","width"]],rules:[{required:!0,message:a("all.requiredresourceConfirm",{resource:a("editor.all.customRatio")})},({getFieldValue:T})=>({validator:(F,P)=>zr({width:T(["imageRatio","width"]),height:P,message:a("editor.line.productFeed.aspectRatioLimit")})})],children:t.jsx(Be,{min:1,max:1e4,style:{width:"100%"},addonBefore:a("editor.line.productFeed.height")})})})]})})}),t.jsx(Id,{span:12,children:t.jsx(S.Item,{name:"aspectMode",label:a("editor.line.productFeed.imageFillMethod"),children:t.jsxs(G.Group,{children:[t.jsx(G,{value:"fit",children:t.jsxs(H,{size:4,children:[a("editor.line.productFeed.imageFillMethod.fit"),t.jsx(et,{content:a("editor.line.productFeed.imageFillMethod.fit.tooltip")})]})}),t.jsx(G,{value:"cover",children:t.jsxs(H,{size:4,children:[a("editor.line.productFeed.imageFillMethod.fill"),t.jsx(et,{content:a("editor.line.productFeed.imageFillMethod.fill.tooltip")})]})})]})})})]}),t.jsx(kd,{children:t.jsx(vd,{content:d,onEditTabs:w,setCurrentItemIdx:l,currentItemIdx:s,idx:r,isImageCard:_,mergeTags:n.mergeTags,onDelete:T=>{M("line/removeCarouselItem",{idx:r,key:Number(T)}),s-1<0?l(0):l(s-1)}})})]})}})]})})};var _d=C("div").withConfig({displayName:"CarouselBubble___StyledDiv",componentId:"sc-1at7g2t-0"})(["",""],r=>r.$_css),wd=C("div").withConfig({displayName:"CarouselBubble___StyledDiv2",componentId:"sc-1at7g2t-1"})(["padding:2rem;border:1px solid #dfe3e8;"]),Sd=C(oe).withConfig({displayName:"CarouselBubble___StyledCol",componentId:"sc-1at7g2t-2"})(["padding-left:22px;"]),Cd=C(H).withConfig({displayName:"CarouselBubble___StyledSpace",componentId:"sc-1at7g2t-3"})(["padding:0rem 1.5rem 1.5rem 1.5rem;width:100%;"]),bd=C(S.Item).withConfig({displayName:"CarouselBubble___StyledFormItem",componentId:"sc-1at7g2t-4"})(["margin-bottom:0;"]),Td=C(oe).withConfig({displayName:"CarouselBubble___StyledCol2",componentId:"sc-1at7g2t-5"})(["text-align:center;"]),jd=C(S.Item).withConfig({displayName:"CarouselBubble___StyledFormItem2",componentId:"sc-1at7g2t-6"})(["margin-bottom:0;"]),Id=C(oe).withConfig({displayName:"CarouselBubble___StyledCol3",componentId:"sc-1at7g2t-7"})(["padding-left:22px;"]),kd=C("div").withConfig({displayName:"CarouselBubble___StyledDiv3",componentId:"sc-1at7g2t-8"})(["& > div > div.ant-tabs-content-holder{border:1px solid rgba(0,0,0,0.06);border-radius:4px;padding:18px;}& > div > div.ant-tabs-nav{margin:0;&::before{border-bottom:none;}}"]);function Rn({handleUpload:r,showHint:e=!0,disabled:n=!1,label:a}){const{t:i}=V(),{modulePermissionSet:o}=fe(),s=I.useRef(null);return t.jsxs(t.Fragment,{children:[t.jsx(J,{icon:t.jsx(cr,{}),disabled:n,onClick:l=>{l.stopPropagation(),s.current.value="",s.current.click()},children:a!=null?a:i("changeImage")}),t.jsx("input",{type:"file",ref:s,accept:"image/png, image/jpeg, image/gif, image/bmp",onChange:r,required:!0,hidden:!0}),e&&t.jsxs(Pd,{children:[i("lineImageUploadReminder"),o.has("ImageSizeCompression")&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),i("editor.all.imageSizeCompressionHint")]})]})]})}var Pd=C("div").withConfig({displayName:"AntdUploadButton___StyledDiv",componentId:"sc-1c0zftu-0"})(["&&{margin-top:16px;font-size:14px;color:#7d7d7d;text-align:center;}"]);const Fd=({isFocus:r=!1,...e})=>t.jsx("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:r?"#4484c2":"#E1E0E5",strokeWidth:"2"})}),Dd=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"127",viewBox:"0 0 126 127",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"64",y1:"2",x2:"64",y2:"126.004",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),Md=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"125.006",y1:"64",x2:"1.00182",y2:"64",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),Ld=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"125.004",y1:"43",x2:"0.99987",y2:"43",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"125.004",y1:"85",x2:"0.99987",y2:"85",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),Ed=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("path",{d:"M64 2v122M124 64H2",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),$d=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"64",y1:"63",x2:"64",y2:"125",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"125.004",y1:"64",x2:"0.99987",y2:"64",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),Od=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("path",{stroke:"#E1E0E5",strokeWidth:"2",d:"M125.006 64H1.002M125.006 95H1.002"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),Rd=({isFocus:r=!1,...e})=>t.jsxs("svg",{width:"126",height:"126",viewBox:"0 0 126 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",fill:r?"#eff9fe":"#F7F7F7",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"43",y1:"0.998047",x2:"43",y2:"125.002",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"85",y1:"0.998047",x2:"85",y2:"125.002",stroke:"#E1E0E5",strokeWidth:"2"}),t.jsx("line",{x1:"125.008",y1:"64",x2:"1.00378",y2:"64",stroke:"#E1E0E5",strokeWidth:"2"}),r&&t.jsx("rect",{x:"1",y:"1",width:"124",height:"124",rx:"5",stroke:"#4484c2",strokeWidth:"2"})]}),{values:zd}=Object,zn={sq_type1:{name:"sq_type1",imageSrc:window.__getStaticUrl__("images/square-type1.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type1.svg"),linkAreaList:["A"],svg:Fd},sq_type2:{name:"sq_type2",imageSrc:window.__getStaticUrl__("images/square-type2.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type2.svg"),linkAreaList:["A","B"],svg:Dd},sq_type3:{name:"sq_type3",imageSrc:window.__getStaticUrl__("images/square-type3.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type3.svg"),linkAreaList:["A","B"],svg:Md},sq_type4:{name:"sq_type4",imageSrc:window.__getStaticUrl__("images/square-type4.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type4.svg"),linkAreaList:["A","B","C"],svg:Ld},sq_type5:{name:"sq_type5",imageSrc:window.__getStaticUrl__("images/square-type5.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type5.svg"),linkAreaList:["A","B","C","D"],svg:Ed},sq_type6:{name:"sq_type6",imageSrc:window.__getStaticUrl__("images/square-type6.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type6.svg"),linkAreaList:["A","B","C"],svg:$d},sq_type7:{name:"sq_type7",imageSrc:window.__getStaticUrl__("images/square-type7.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type7.svg"),linkAreaList:["A","B","C"],svg:Od},sq_type8:{name:"sq_type8",imageSrc:window.__getStaticUrl__("images/square-type8.svg"),uploadedImgSrc:window.__getStaticUrl__("images/uploaded-square-type8.svg"),linkAreaList:["A","B","C","D","E","F"],svg:Rd}},D=1024,Ad={sq_type1:[{x:0,y:0,h:D,w:D}],sq_type2:[{x:0,y:0,h:D,w:D/2},{x:D/2,y:0,h:D,w:D/2}],sq_type3:[{x:0,y:0,h:D/2,w:D},{x:0,y:D/2,h:D/2,w:D}],sq_type4:[{x:0,y:0,h:D/3,w:D},{x:0,y:D/3,h:D/3,w:D},{x:0,y:D*2/3,h:D/3,w:D}],sq_type5:[{x:0,y:0,h:D/2,w:D/2},{x:D/2,y:0,h:D/2,w:D/2},{x:0,y:D/2,h:D/2,w:D/2},{x:D/2,y:D/2,h:D/2,w:D/2}],sq_type6:[{x:0,y:0,h:D/2,w:D},{x:0,y:D/2,h:D/2,w:D/2},{x:D/2,y:D/2,h:D/2,w:D/2}],sq_type7:[{x:0,y:0,h:D/2,w:D},{x:0,y:D/2,h:D/4,w:D},{x:0,y:D*3/4,h:D/4,w:D}],sq_type8:[{x:0,y:0,h:D/2,w:D/3},{x:D/3,y:0,h:D/2,w:D/3},{x:D*2/3,y:0,h:D/2,w:D/3},{x:0,y:D/2,h:D/2,w:D/3},{x:D/3,y:D/2,h:D/2,w:D/3},{x:D*2/3,y:D/2,h:D/2,w:D/3}]};function Br(r){return(r+10).toString(36).toUpperCase()}function Nd(r,e){return r.x<=e.x+e.w&&r.x+r.w>=e.x&&r.y<=e.y+e.h&&r.y+r.h>=e.y}function Bd(r,e){const{t:n}=V(),[a,i]=I.useState(r),[o,s]=I.useState(0),l=I.useRef(),d=I.useRef(e);function c(x,m,_){i(u=>[...u.slice(0,x),{...u[x],[m]:_},...u.slice(x+1)])}function p(x,m){c(x,"uri",m)}function g(x,m){c(x,"message",m)}function v(x,m){c(x,"actionType",m)}function f({rect:x,uri:m,message:_,actionType:u}){i(T=>T.some(({rect:F})=>Nd(x,F))?T:[...T,{id:gt(),rect:x,uri:m,message:_,actionType:u}])}function h(x){i(m=>[...m.slice(0,x),...m.slice(x+1)])}function y(x){i(m=>x.map(_=>{const u=m.find(({rect:T})=>T.x===_.x&&T.y===_.y&&T.w===_.w&&T.h===_.h);return u?{...u,rect:_}:{id:gt(),rect:_,uri:"",actionType:"link",message:n("editor.line.actionType.msgText")}}))}function w(x,m){i(_=>{var T,F,P,k;const u=_[0];return[{id:(T=u==null?void 0:u.id)!=null?T:gt(),rect:{x:0,y:0,w:x,h:m},uri:(F=u==null?void 0:u.uri)!=null?F:"",actionType:(P=u==null?void 0:u.actionType)!=null?P:"link",message:(k=u==null?void 0:u.message)!=null?k:n("editor.line.actionType.msgText")}]})}return I.useEffect(()=>{function x(){s(m=>m+1)}if(l.current){l.current.addEventListener("load",x);const m=l.current;return()=>{m.removeEventListener("load",x)}}},[]),I.useEffect(()=>{var x;(x=l.current)!=null&&x.complete&&i(m=>m.map(_=>_.fallback?{..._,rect:{x:0,y:0,w:l.current.width,h:l.current.height},fallback:!1}:_))},[o]),I.useEffect(()=>{d.current!==e&&(d.current=e,i(r))},[e,r]),{imgRef:l,imgLoadCount:o,areas:a,updateUri:p,updateMessage:g,updateActionType:v,addArea:f,deleteArea:h,setAreasFromRects:y,resetToSingleArea:w}}const qd=r=>{var Ie,le,ge,ke,Ee;const{t:e}=V(),{modulePermissionSet:n}=fe(),{idx:a,bubble:i,handleUpload:o}=r,{url:s,imgmapType:l="custom",lineMessage:d}=i,c=l!=="custom",p=I.useMemo(()=>{var O,W,ee;return(ee=(W=(O=d==null?void 0:d.uri)==null?void 0:O.map)==null?void 0:W.call(O,({x:te,y:ae,w:Y,h:$,uri:ve,message:nt=e("editor.line.actionType.msgText"),actionType:ot="link",fallback:$e})=>$e?{id:gt(),rect:{x:te,y:ae,w:Y,h:$},uri:ve,message:nt,actionType:ot,fallback:$e}:{id:gt(),rect:{x:.5*te,y:.5*ae,w:.5*Y,h:.5*$},uri:ve,message:nt,actionType:ot}))!=null?ee:c?Ad[l].map(({x:te,y:ae,w:Y,h:$})=>({id:gt(),rect:{x:.5*te,y:.5*ae,w:.5*Y,h:.5*$},uri:"",message:e("editor.line.actionType.msgText"),actionType:"link"})):[]},[c,l,d==null?void 0:d.uri,e]),{areas:g,imgRef:v,imgLoadCount:f,updateUri:h,updateMessage:y,updateActionType:w,addArea:x,deleteArea:m,setAreasFromRects:_,resetToSingleArea:u}=Bd(p,l),[T,F]=I.useState((ge=i.interactiveBlockMode)!=null?ge:l==="custom"&&((le=(Ie=d==null?void 0:d.uri)==null?void 0:Ie.length)!=null?le:0)>1?"multiple":"single"),P=T==="multiple",k=I.useMemo(()=>g.map(({rect:O})=>O),[g]),{canvasRef:L,selectedRectKey:R}=ya(k,_,{imgRef:v}),[E,Z]=I.useState(()=>g.map(({id:O})=>O));I.useEffect(()=>{Z(O=>{const W=new Set(O),ee=g.filter(({id:te})=>!W.has(te)).map(({id:te})=>te);return ee.length===0?O:[...O,...ee]})},[g]);const U=O=>{var W;F(O),M("line/writeImgBubble",{key:"interactiveBlockMode",value:O,idx:a}),O==="single"&&((W=v.current)!=null&&W.complete)&&u(v.current.width,v.current.height),O==="multiple"&&_([])};I.useEffect(()=>{var O;l==="custom"&&!P&&g.length===0&&((O=v.current)!=null&&O.complete)&&x({rect:{x:0,y:0,w:v.current.width,h:v.current.height},uri:"",actionType:"link",message:e("editor.line.actionType.msgText")})},[l,P,g.length,f,x,v,e]);const ce=I.useRef(d);ce.current=d,I.useEffect(()=>{M("line/writeImgBubble",{key:"lineMessage",value:{...ce.current,uri:g.map(({rect:{x:O,y:W,w:ee,h:te},uri:ae,message:Y,actionType:$,fallback:ve})=>({x:2*O,y:2*W,w:ve?ee:2*ee,h:ve?te:2*te,uri:ae,message:Y,actionType:$,fallback:ve}))},idx:a})},[g,a]);const ye=()=>{M("line/deleteImgBubbleContent",{idx:a})};return t.jsxs(H,{direction:"vertical",size:"large",style:{display:"flex",width:"100%"},children:[t.jsxs(oc,{children:[l==="custom"?t.jsxs(Ud,{children:[t.jsx(Wd,{style:{visibility:(ke=v.current)!=null&&ke.complete?"visible":"hidden"}
3,children:g.map(({id:O,rect:{x:W,y:ee,w:te,h:ae}},Y)=>t.jsxs(I.Fragment,{children:[t.jsx(Gd,{style:{left:W,top:ee,width:te,height:ae,backgroundColor:Y===R?"rgba(135, 232, 222, 0.2)":"inherit"},children:t.jsx(Yd,{children:Br(Y)})}),P&&!c&&R===Y&&t.jsx(J,{style:{position:"absolute",left:W+te+2,top:ee,zIndex:10},size:"small",icon:t.jsx(Tt,{}),onClick:()=>m(Y)})]},O))}),t.jsx("canvas",{ref:L,style:{visibility:(Ee=v.current)!=null&&Ee.complete&&P?"visible":"hidden",pointerEvents:P?"auto":"none"}}),t.jsx(qr,{src:s,ref:v})]}):t.jsx(ac,{type:l,children:t.jsx(qr,{src:s})}),t.jsxs(ic,{children:[t.jsx(Rn,{handleUpload:o,showHint:!1}),t.jsx(J,{icon:t.jsx(ln,{}),onClick:ye,children:e("changeTemplate")})]}),t.jsxs(rc,{children:[e("lineImageUploadReminder"),n.has("ImageSizeCompression")&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),e("editor.all.imageSizeCompressionHint")]})]})]}),t.jsx(Zt,{style:{margin:"0 0 4px"}}),l==="custom"&&t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{style:{marginBottom:0},label:e("editor.line.interactiveBlock"),children:t.jsx(lc,{children:t.jsxs(G.Group,{value:T,onChange:O=>U(O.target.value),children:[t.jsx(G,{value:"single",children:e("editor.line.singleInteractiveBlock")}),t.jsx(G,{value:"multiple",children:e("editor.line.multipleInteractiveBlock")})]})})}),P&&t.jsx(yo,{type:"info",showIcon:!0,message:e("editor.line.multipleInteractiveBlock.info")})]}),t.jsx(nc,{children:t.jsx(Tr,{activeKey:E,onChange:O=>Z(O),children:g==null?void 0:g.map(({id:O,uri:W,message:ee,actionType:te},ae)=>t.jsxs(Tr.Panel,{header:Br(ae),extra:!c&&P?t.jsx(J,{type:"text",size:"small",icon:t.jsx(Tt,{}),onClick:Y=>{Y.stopPropagation(),m(ae)}}):null,children:[t.jsx(S.Item,{required:!0,label:e("editor.all.actionType"),labelCol:{span:6},wrapperCol:{span:18},children:t.jsx(Qe,{value:te,options:[{label:e("editor.line.actionType.openLink"),value:"link"},{label:e("editor.line.actionType.sendMsg"),value:"message"}],onChange:Y=>{w(ae,Y)}})}),K(te).with("link",()=>t.jsx(S.Item,{label:e("report.Table.title.Links"),required:!0,labelCol:{span:6},wrapperCol:{span:18},children:t.jsx(Q,{placeholder:"https://...",value:W,onChange:Y=>{var $;h(ae,($=Y.target.value)==null?void 0:$.trim())}})})).with("message",()=>t.jsx(S.Item,{label:e("editor.line.actionType.msgText"),required:!0,labelCol:{span:6},wrapperCol:{span:18},help:e("editor.line.actionType.msgText.hint"),children:t.jsx(Q,{showCount:!0,maxLength:40,value:ee,onChange:Y=>{y(ae,Y.target.value)}})})).otherwise(()=>null)]},O))})})]})},Hd=r=>{const{bubble:{url:e,imgmapType:n},I18N:a,idx:i}=r,{t:o}=V(),[s,l]=I.useState(n),[d,c]=I.useState(!1),p=h=>()=>{l(h)},g=h=>{M("line/writeImgBubble",{key:"url",value:h,idx:i})},v=h=>{h&&(c(!0),M("uploadLineImage",{files:h,callback:y=>{g(y.url),M("line/writeImgBubble",{key:"imgmapType",value:s,idx:i}),s==="custom"&&(M("line/writeImgBubble",{key:"lineMessage",value:{type:"imagemap",baseurl:y.url,uri:[]},idx:i}),M("line/writeImgBubble",{key:"id",value:gt(),idx:i})),c(!1)}}))},f=async h=>{const y=h.target.files;if(y&&y.length){const w=y[0];try{await sn(w,{size:20971520,width:1040,isSquare:s!=="custom"}),v(y)}catch(x){K(x).with("imageSizeExceed",()=>he.error(o("all.errorMessage.theSizeMustNotExceed",{limit:"20 MB"}))).with("imageOverSizeError",()=>he.error(o("editor.line.imageOverSizeError"))).with("imageNotSquare",()=>he.error(o("editor.line.imageNotSquare"))).with("imageRatioNotOneThird",()=>he.error(o("editor.line.errormsg.aspectRatioExceed13"))).otherwise(()=>he.error(x||o("all.error.unexpectedError"))),c(!1)}}};return t.jsx(Vd,{children:e?t.jsx(qd,{...r,handleUpload:f}):d?t.jsx("div",{style:{textAlign:"center"},children:t.jsx(ka,{style:sc.loading})}):t.jsxs(t.Fragment,{children:[t.jsx(Xd,{children:a.chooseTemplate}),t.jsxs(Kd,{children:[t.jsxs(Jd,{children:[t.jsx(de.Title,{level:5,style:{margin:"1rem 0"},children:t.jsx(Pa,{tip:o("editor.line.productFeed.aspectRatioLimit"),children:a.custom})}),t.jsx(tc,{name:"custom",$isFocus:s==="custom",onClick:p("custom")})]}),t.jsxs(Zd,{children:[t.jsx(de.Title,{level:5,style:{margin:"1rem 0"},children:a.square}),t.jsx(Qd,{children:zd(zn).map((h,y)=>t.jsx(h.svg,{name:h.name,isFocus:s===h.name,onClick:p(h.name)},y))})]})]}),t.jsx("div",{style:{marginTop:"2rem",textAlign:"center"},children:t.jsx(Rn,{handleUpload:f,disabled:!s,label:a.uploadImage})})]})})},Vd=C.div.withConfig({displayName:"ImageBubble__Container",componentId:"sc-un2mor-0"})(["padding:2rem;border:solid 1px #dfe3e8;overflow:auto;width:100%;"]),Ud=C.div.withConfig({displayName:"ImageBubble__ImageMapContainer",componentId:"sc-un2mor-1"})(["position:relative;width:520px;flex:0 0 auto;margin-bottom:1rem;canvas{position:absolute;width:100%;height:100%;z-index:1;cursor:crosshair;}"]),Wd=C.div.withConfig({displayName:"ImageBubble__ImageMap",componentId:"sc-un2mor-2"})(["position:absolute;width:100%;height:100%;"]),Gd=C.div.withConfig({displayName:"ImageBubble__ImageMapArea",componentId:"sc-un2mor-3"})(["position:absolute;display:flex;align-items:center;justify-content:center;border:1px solid #87e8de;color:rgb(11,11,11);box-sizing:border-box;z-index:10;pointer-events:none;"]),Yd=C.span.withConfig({displayName:"ImageBubble__AreaLabel",componentId:"sc-un2mor-4"})(["width:20px;height:20px;background-color:white;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;"]),Xd=C.h4.withConfig({displayName:"ImageBubble__Hint",componentId:"sc-un2mor-5"})(["color:#979797;line-height:20px;font-size:18px;margin:0;"]),Kd=C.div.withConfig({displayName:"ImageBubble__Content",componentId:"sc-un2mor-6"})(["display:flex;gap:48px;"]),Jd=C.div.withConfig({displayName:"ImageBubble__CustomShapeSection",componentId:"sc-un2mor-7"})(["flex:0 0 auto;"]),Zd=C.div.withConfig({displayName:"ImageBubble__SquareShapeSection",componentId:"sc-un2mor-8"})(["flex:1;min-width:0;"]),Qd=C.div.withConfig({displayName:"ImageBubble__TemplateImages",componentId:"sc-un2mor-9"})(["display:grid;grid-template-columns:repeat(4,104px);gap:24px;svg{width:104px;
3height:104px;display:block;cursor:pointer;}rect{stroke-width:1px;}"]),ec=C.div.withConfig({displayName:"ImageBubble__ShapeBase",componentId:"sc-un2mor-10"})(["color:#f5f8fc;border:solid 1px #c4cdd5;border-radius:5px;background-color:#f7f7f7;",""],({$isFocus:r})=>r&&"border: solid 2px #4484c2; background-color: #eff9fe;"),tc=C(ec).withConfig({displayName:"ImageBubble__CustomShape",componentId:"sc-un2mor-11"})(["width:124px;height:232px;"]),ic=C.div.withConfig({displayName:"ImageBubble__ButtonRow",componentId:"sc-un2mor-12"})(["display:flex;gap:8px;justify-content:center;align-items:center;margin-top:1rem;"]),rc=C.div.withConfig({displayName:"ImageBubble__UploadHint",componentId:"sc-un2mor-13"})(["margin-top:16px;font-size:14px;color:#7d7d7d;text-align:center;"]),nc=C.div.withConfig({displayName:"ImageBubble__LinkInputSection",componentId:"sc-un2mor-14"})(["display:flex;min-width:360px;flex-direction:column;flex:1;"]),oc=C.div.withConfig({displayName:"ImageBubble__ImageSection",componentId:"sc-un2mor-15"})(["display:flex;flex-direction:column;align-items:center;flex:1;"]),ac=C.div.withConfig({displayName:"ImageBubble__PreImgWrapper",componentId:"sc-un2mor-16"})(["position:relative;width:520px;margin-bottom:1rem;&::after{content:'';background-size:cover;display:inline-block;width:100%;height:100%;position:absolute;top:0;left:0;background-image:",";}"],({type:r})=>{var e;return"url(".concat((e=zn[r])==null?void 0:e.uploadedImgSrc,")")}),qr=C.img.withConfig({displayName:"ImageBubble__PreviewImage",componentId:"sc-un2mor-17"})(["display:block;width:100%;user-select:none;"]),sc={loading:{width:50,textAlign:"center",margin:"7rem 1rem"}};var lc=C("div").withConfig({displayName:"ImageBubble___StyledDiv",componentId:"sc-un2mor-18"})(["display:flex;flex-direction:column;gap:8px;"]);const An=({bubble:r,mergeTags:e,idx:n,maxActionItems:a=5,isSurveyCake:i=!1})=>{let{text:o="",actions:s=[]}=r;const{t:l,i18n:d}=V(),c=S.useFormInstance(),p=I.useRef(null),{markInsertedByDropdown:g}=Da(o),v=K({isSurveyCake:i,lang:d==null?void 0:d.language}).with({isSurveyCake:!0,lang:"ja"},()=>5).with({isSurveyCake:!0},()=>3).with({isSurveyCake:!1,lang:"ja"},()=>6).with({isSurveyCake:!1},()=>4).otherwise(()=>3),f=["ja","en"].includes(d==null?void 0:d.language)?4:3,h=(_,u=!1)=>{if(!p)return;const{selectionStart:T,selectionEnd:F}=p.current.resizableTextArea.textArea,P=o.substring(0,T).concat(_,o.substring(F));u&&g(P),M("line/writeBubbleText",{text:P,idx:n}),c.setFieldValue("text",P)},y=_=>{h(_.native)},w=_=>{h(_,!0)},x=()=>{const _=c.getFieldValue("questionnaireInfo");_&&h("{{".concat(_.title,"}}"),!0)},m=(_,u)=>{const T=i?{text:"",link:""}:{actionType:"link",text:"",link:"",message:l("editor.line.actionType.msgText")},F=[...s];K(_).with("add",()=>{F.push(T)}).with("remove",()=>{F.splice(u,1)}).with("moveUp",()=>{const P=F[u];F.splice(u,1),F.splice(u-1,0,P)}).with("moveDown",()=>{const P=F[u];F.splice(u,1),F.splice(u+1,0,P)}).exhaustive(),M("line/writeBubbleTextActions",{value:F,idx:n})};return t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{label:l("carouselDescText"),name:"text",rules:[{required:!0}],style:{marginBottom:"12px"},children:t.jsx(Q.TextArea,{ref:p,placeholder:l("text"),maxLength:1900,autoSize:{minRows:5}})}),t.jsx(S.Item,{wrapperCol:{offset:f}
3,children:t.jsxs(H,{children:[t.jsx(mn,{getItems:({basicItems:_,customFieldItems:u,sqlItems:T,sqlCustomDataFeedItems:F})=>[..._,...u,...T,...e,...F],onClickTag:w}),t.jsx(sr,{label:l("emoji"),onEmojiSelect:y}),i&&t.jsx(J,{icon:t.jsx(Yt,{component:hr}),onClick:x,children:l("editor.line.bringQuestionnaireLink")})]})}),t.jsx(S.List,{name:"actions",children:(_,{add:u,remove:T,move:F})=>{var P;return t.jsxs("div",{children:[_.map(({key:k,name:L,...R},E)=>t.jsx(dc,{required:!1,children:t.jsxs(cc,{children:[t.jsxs(uc,{children:[i?l("editor.line.addText.linkButton",{number:E+1}):"".concat(l("button")," ").concat(E+1),t.jsxs(H,{children:[E!==0&&t.jsx(J,{type:"text",icon:t.jsx(bi,{}),onClick:()=>{F(E,E-1),m("moveUp",E)}}),E!==_.length-1&&t.jsx(J,{type:"text",icon:t.jsx(Ti,{}),onClick:()=>{F(E,E+1),m("moveDown",E)}}),t.jsx(J,{type:"text",icon:t.jsx(Tt,{}),onClick:()=>{T(L),m("remove",E)}})]})]}),K(i).with(!0,()=>t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{...R,label:l("editor.line.addText.link"),labelCol:{span:v},required:!0,name:[L,"link"],children:t.jsx(Q,{placeholder:"https://",disabled:i})}),t.jsx(S.Item,{...R,label:l("editor.line.addText.linkText"),labelCol:{span:v},required:!0,name:[L,"text"],children:t.jsx(Q,{showCount:!0,placeholder:l("text"),maxLength:40})})]})).with(!1,()=>t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{...R,label:l("editor.all.actionType"),labelCol:{span:v},required:!0,name:[L,"actionType"],children:t.jsx(Qe,{options:[{label:l("editor.line.actionType.openLink"),value:"link"},{label:l("editor.line.actionType.sendMsg"),value:"message"}]})}),t.jsx(S.Item,{noStyle:!0,dependencies:["actions",L,"actionType"],children:({getFieldValue:Z})=>{const U=Z(["actions",L,"actionType"]);return K(U).with("link",()=>t.jsxs(t.Fragment,{children:[t.jsx(S.Item,{...R,label:l("editor.line.addText.linkText"),labelCol:{span:v},required:!0,name:[L,"text"],children:t.jsx(Q,{showCount:!0,placeholder:l("text"),maxLength:40})}),t.jsx(S.Item,{...R,label:l("editor.line.addText.link"),labelCol:{span:v},required:!0,name:[L,"link"],children:t.jsx(Q,{placeholder:"https://",disabled:i})})]})).with("message",()=>t.jsx(S.Item,{...R,label:l("editor.line.actionType.msgText"),labelCol:{span:v},required:!0,name:[L,"message"],help:l("editor.line.actionType.msgText.hint"),children:t.jsx(Q,{showCount:!0,placeholder:l("editor.line.actionType.msgText"),maxLength:40})})).otherwise(()=>null)}})]})).otherwise(()=>null)]})},k)),t.jsx(S.Item,{children:t.jsx(J,{icon:t.jsx(pn,{}),onClick:()=>{i?(u(),c.setFieldValue(["actions",0,"link"],"{{".concat(c.getFieldValue("questionnaireInfo").title,"}}"))):u({actionType:"link",link:"",message:l("editor.line.actionType.msgText")}),m("add")},disabled:_.length===a||i&&!((P=c.getFieldValue("questionnaireInfo"))!=null&&P.title),children:l(i?"editor.line.addText.addLinkButton":"addButton")})})]})}})]})};var dc=C(S.Item).withConfig({displayName:"TextAndActionField___StyledFormItem",componentId:"sc-1vkr6fq-0"})([".ant-form-item{margin-bottom:12px;}"]),cc=C("div").withConfig({displayName:"TextAndActionField___StyledDiv",componentId:"sc-1vkr6fq-1"})(["padding:12px 16px;border:1px solid #dfe3e8;border-radius:4px;"]),uc=C(H).withConfig({displayName:"TextAndActionField___StyledSpace",componentId:"sc-1vkr6fq-2"})(["width:100%;justify-content:space-between;margin-bottom:10px;"]);function pc({bubble:r,idx:e,mergeTags:n}){var g;const{t:a,i18n:i}=V(),[o]=S.useForm(),[{data:s=[]}]=rt("/ma_account/surveycake-questionnaire/"),l=["ja","en"].includes(i==null?void 0:i.language)?4:3,d=(g=r.questionnaireInfo)==null?void 0:g.value,c=v=>{const[f]=v,[h,y,w]=f.name,x=f.value,m={...r};K(h).with("questionnaireType",()=>{m[h]=x}).with("questionnaireInfo",()=>{m[h]=x,o.setFieldValue("uri","{{".concat(x.title,"}}")),m.uri="{{".concat(x.title,"}}"),o.getFieldInstance(["actions",0,"link"])&&o.setFieldValue(["actions",0,"link"],"{{".concat(x.title,"}}"))}).otherwise(()=>{K(o.getFieldValue("questionnaireType")).with("text",()=>{K(h).with("text",()=>{m.text=x}).with("actions",()=>{var _;w&&(m.actions[y][w]=x,m.actions[y].link="{{".concat((_=o.getFieldValue("questionnaireInfo"))==null?void 0:_.title,"}}"))}).exhaustive()}).with("image_card",()=>{m[h]=x}).exhaustive()}),M("line/writeBubbleState",{bubble:m,idx:e})},p=v=>{const f={...r};f.imgUrl=v,M("line/writeBubbleState",{bubble:f,idx:e})};return t.jsx(mc,{"data-test-id":"survey-cake-form-container-".concat(e),children:t.jsxs(S,{form:o,labelCol:{span:l},labelWrap:!0,onFieldsChange:c,initialValues:r,children:[t.jsx(S.Item,{label:a("setting.surveyCake.surveyName"),name:"questionnaireInfo",rules:[{required:!0}],extra:d&&t.jsxs(gc,{children:[t.jsx(hn,{}),t.jsx(hc,{children:a("setting.surveyCake.surveyURL")}),t.jsx(fc,{href:d,target:"_blank",children:d})]}),children:t.jsx(yc,{"data-test-id":"add-surveyCake-name-select-".concat(e),popupClassName:"survey-cake-name-select-dropdown-".concat(e),labelInValue:!0,showSearch:!0,filterOption:(v,f)=>f.title.toLowerCase().includes(v.toLowerCase()),placeholder:a("setting.surveyCake.surveyName"),options:s,fieldNames:{label:"title",value:"questionnaire_url"}})}),t.jsx(S.Item,{label:a("editor.line.questionnaireForm"),name:"questionnaireType",children:t.jsxs(G.Group,{children:[t.jsx(G,{value:"text",children:a("Text")}),t.jsx(G,{value:"image_card",children:a("Carousel Image Card")})]})}),t.jsx(S.Item,{dependencies:["questionnaireType"],noStyle:!0,children:({getFieldValue:v})=>{const f=v("questionnaireType");return K(f).with("text",()=>t.jsx(An,{bubble:r,mergeTags:n,idx:e,maxActionItems:1,isSurveyCake:!0})).with("image_card",()=>t.jsxs(vc,{children:[t.jsx($n,{writeImgUrl:p,imgUrl:r.imgUrl}),t.jsx(Zt,{}),t.jsx(S.Item,{label:a("Carousel Main Text"),name:"mainText",rules:[{required:!0}],children:t.jsx(Q,{})}),t.jsx(S.Item,{name:"titleSize",label:a("editor.line.titleFontSize"),children:t.jsxs(G.Group,{children:[t.jsx(G,{value:"sm",children:a("editor.line.productFeed.productTitleSize.small")}),t.jsx(G,{value:"md",children:a("editor.line.productFeed.productTitleSize.medium")}),t.jsx(G,{value:"lg",children:a("editor.line.productFeed.productTitleSize.large")})]})}),t.jsx(S.Item,{label:a("Carousel Desc Text"),name:"descText",children:t.jsx(Q.TextArea,{autoSize:{minRows:2}})}),t.jsx(S.Item,{label:a("editor.line.addText.link"),name:"uri",rules:[{required:!0}],children:t.jsx(Q,{disabled:!0,placeholder:a("setting.surveyCake.surveyURL")})}),t.jsx(S.Item,{label:a("editor.line.addText.linkText"),name:"subText",rules:[{required:!0}],children:t.jsx(Q,{showCount:!0,maxLength:40})})]})).exhaustive()}})]})})}var mc=C("div").withConfig({displayName:"SurveyCakeBubble___StyledDiv",componentId:"sc-67lwl0-0"})(["padding:2rem;border:1px solid #dfe3e8;"]),gc=C("div").withConfig({displayName:"SurveyCakeBubble___StyledDiv2",componentId:"sc-67lwl0-1"})(["margin-top:13px;color:#8c8c8c;"]),hc=C("span").withConfig({displayName:"SurveyCakeBubble___StyledSpan",componentId:"sc-67lwl0-2"})(["padding:0 8px;"]),fc=C(de.Link).withConfig({displayName:"SurveyCakeBubble___StyledTypographyLink",componentId:"sc-67lwl0-3"})(["color:#10a1b5;"]),yc=C(Qe).withConfig({displayName:"SurveyCakeBubble___StyledSelect",componentId:"sc-67lwl0-4"})(["&&{width:250px;}"]),vc=C("div").withConfig({displayName:"SurveyCakeBubble___StyledDiv3",componentId:"sc-67lwl0-5"})(["padding:0rem 2rem;border:1px solid #dfe3e8;"]);function xc(r){const{idx:e,mergeTags:n,bubble:a}=r,[i]=S.useForm(),{i18n:o}=V();let{actions:s=[]}=a;const l=["ja","en"].includes(o==null?void 0:o.language)?4:3,d=c=>{const[p]=c,[g,v,f]=p.name,h=p.value;Ma(h)&&K(g).with("text",()=>M("line/writeBubbleText",{text:h,idx:e})).with("actions",()=>{s[v][f]=h,M("line/writeBubbleTextActions",{value:s,idx:e})}).exhaustive()};return t.jsx(_c,{children:t.jsx(S,{form:i,labelCol:{span:l},layout:"horizontal",labelWrap:!0,onFieldsChange:d,initialValues:a,children:t.jsx(An,{bubble:a,mergeTags:n,idx:e})})})}const _c=C.div.withConfig({displayName:"TextBubble__Container",componentId:"sc-pekamj-0"})(["padding:16px;border:solid 1px var(--neutral-4);border-top:none;width:100%;"]),wc=r=>{const{idx:e,bubble:n}=r,{imgLink:a,url:i,urilabel:o}=n,{i18n:s,t:l}=V(),{modulePermissionSet:d}=fe(),c=d.has("CompressLineVideo")?{text:"200MB",size:209715200}:{text:"20MB",size:20971520}
3,[p,g]=I.useState(!1),[v,f]=I.useState(""),h=(x,m)=>M("line/writeImgBubble",{key:x,value:m,idx:e}),y=x=>M("line/writeImgBubble",{key:"url",value:x,idx:e}),w=x=>M("line/deleteImgUrl",{idx:e});return t.jsxs(be,{children:[t.jsx(Sc,{direction:"vertical",align:"center",children:i?t.jsxs(Cc,{children:[t.jsx(bc,{src:i,type:"video/mp4",controls:!0,autoPlay:!0,muted:!0,loop:!0}),t.jsx(Gt,{className:"x-btn",style:{right:"1.5rem",top:"1.5rem",position:"absolute",cursor:"pointer",zIndex:"99",opacity:"0.5",width:30},src:window.__getStaticUrl__("images/btn-x.svg"),onClick:w})]}):t.jsxs(t.Fragment,{children:[t.jsx(Tc,{children:v?t.jsx(vo,{status:"error",title:l("all.error.uploadFailed"),subTitle:v==="timeout"&&l("all.error.connectionTimeout")}):t.jsx(lr,{preview:!1,style:{width:300,minHeight:229,margin:"2rem auto",borderRadius:3,padding:"1.4rem"},src:window.__getStaticUrl__("images/ic-video.svg")})}),t.jsx(Si,{name:"video",accept:"video/mp4",showUploadList:!1,customRequest:async x=>{const{file:m,onSuccess:_,onError:u}=x,T=new FormData;T.append("video",m),g(!0);try{const F=await or.post("/ma_cms/line-video/",T,{headers:{"X-CSRFToken":zo("csrftoken"),"Content-Type":"multipart/form-data"},timeout:12e5});f(""),y(F.data.url),g(!1),_()}catch(F){F.code==="ECONNABORTED"?f("timeout"):f("else"),g(!1),u()}},beforeUpload:x=>x.size>c.size?(he.error(l("all.errorMessage.theSizeMustNotExceed",{limit:c.text})),Si.LIST_IGNORE):!0,children:t.jsx(J,{icon:t.jsx(cr,{}),loading:p,disabled:p,children:l("Add Video")})}),t.jsx(jc,{children:l("editor.line.uploadVideoReminder",{limit:c.text})})]})}),t.jsxs(Ic,{labelCol:{span:(s==null?void 0:s.language)==="ja"?5:4},wrapperCol:{span:(s==null?void 0:s.language)==="ja"?19:20},colon:!1,children:[t.jsx(S.Item,{label:t.jsxs(H,{children:[t.jsx(Gt,{style:{display:"inline-block",cursor:"pointer"},src:window.__getStaticUrl__("images/ic-link.svg")}),t.jsx("span",{children:l("report.Table.title.Links")})]}),required:!0,labelAlign:"left",normalize:x=>x.trim(),children:t.jsx(Q,{placeholder:"https://...",value:a||"",name:"imgLink",onChange:x=>{var m;return h(x.target.name,(m=x.target.value)==null?void 0:m.trim())}})}),t.jsx(S.Item,{label:t.jsxs(H,{children:[t.jsx(Gt,{style:{display:"inline-block",cursor:"pointer"},src:window.__getStaticUrl__("images/icons/ic_text.svg")}),t.jsx("span",{children:l("buttonText")})]}),required:!0,labelAlign:"left",children:t.jsx(Q,{showCount:!0,placeholder:l("yourText"),defaultValue:o||"",name:"urilabel",onChange:x=>h(x.target.name,x.target.value),maxLength:30})})]})]})};var Sc=C(H).withConfig({displayName:"VideoBubble___StyledSpace",componentId:"sc-1lyfzy0-0"})(["padding:1rem;border:solid 1px #dfe3e8;width:100%;text-align:center;"]),Cc=C("div").withConfig({displayName:"VideoBubble___StyledDiv",componentId:"sc-1lyfzy0-1"})(["position:relative;"]),bc=C("video").withConfig({displayName:"VideoBubble___StyledVideo",componentId:"sc-1lyfzy0-2"})(["width:100%;max-height:800px;"]),Tc=C("div").withConfig({displayName:"VideoBubble___StyledDiv2",componentId:"sc-1lyfzy0-3"})(["width:300px;height:300px;box-shadow:0 1px 3px 0 rgba(63,63,68,0.15),0 0 0 1px rgba(63,63,68,0.05);display:flex;align-items:center;justify-content:center;"]),jc=C(de.Text).withConfig({displayName:"VideoBubble___StyledTypographyText",componentId:"sc-1lyfzy0-4"})(["white-space:pre-line;color:#7d7d7d;"]),Ic=C(S).withConfig({displayName:"VideoBubble___StyledForm",componentId:"sc-1lyfzy0-5"})(["box-shadow:0 1px 3px 0 rgba(63,63,68,0.15),0 0 0 1px rgba(63,63,68,0.05);background-color:#ffffff;padding:1rem;line-height:30px;"]);const Wt=r=>{const{bubbleArr:e,idx:n,typeLabel:a,icon:i}=r,o=n!==0,s=n!==e.length-1,l=p=>()=>M("line/removeBubble",{idx:p}),d=p=>()=>M("line/switchUp",{idx:p}),c=p=>()=>M("line/switchDown",{idx:p});return t.jsxs(be,{style:St.headerSec,children:[t.jsx(Pc,{component:i}),a+" "+(n+1),t.jsxs(be,{style:St.iconGroup,children:[o&&t.jsx(J,{type:"text",icon:t.jsx(bi,{}),onClick:d(n),style:St.icon}),s&&t.jsx(J,{type:"text",icon:t.jsx(Ti,{}),onClick:c(n),style:St.icon}),t.jsx(J,{type:"text",icon:t.jsx(Tt,{}),onClick:l(n),style:St.icon})]})]})},kc=r=>{const{idx:e,bubbleArr:n,bubble:a}=r,{type:i}=a||{},{t:o}=V(),s=l=>{switch(l){case"text":return t.jsxs(t.Fragment,{children:[t.jsx(Wt,{icon:Pn,typeLabel:o("text"),bubbleArr:n,idx:e}),t.jsx(xc,{...r})]});case"image":return t.jsxs(t.Fragment,{children:[t.jsx(Wt,{typeLabel:o("image"),icon:dr,bubbleArr:n,idx:e}),t.jsx(Hd,{...r})]});case"video":return t.jsxs(t.Fragment,{children:[t.jsx(Wt,{typeLabel:o("video"),icon:bn,bubbleArr:n,idx:e}),t.jsx(wc,{...r})]});case"carousel":return t.jsxs(t.Fragment,{children:[t.jsx(Wt,{typeLabel:o("carousel"),icon:kn,bubbleArr:n,idx:e}),t.jsx(xd,{...r})]});case"surveyCake":return t.jsxs(t.Fragment,{children:[t.jsx(Wt,{icon:hr,typeLabel:o("editor.line.all.questionnaire"),bubbleArr:n,idx:e}),t.jsx(pc,{...r})]});default:return null}};return t.jsx(be,{children:t.jsx(be,{style:St.bubble,children:s(i)})})},St={bubble:{position:"relative",borderRadius:4,backgroundColor:"#ffffff",width:760},headerSec:{minHeight:42,backgroundColor:"var(--neutral-2)"},iconGroup:{float:"right",display:"flex"},icon:{padding:".4rem",width:43,height:43,display:"inline-block",cursor:"pointer"}};var Pc=C(Yt).withConfig({displayName:"Bubble___StyledIcon",componentId:"sc-85pek1-0"})(["padding:1rem;"]);const Fc=(r="md")=>r==="lg"?"md":"sm",Dc=({buttonStyle:r=So,buttonSize:e=Co,buttonColor:n=wo,...a}={})=>({type:"button",style:r,height:Fc(e),color:n,action:Nn(a)}),Nn=({actionType:r,uri:e,message:n,subText:a}={})=>r==="message"?{type:"message",text:n,label:n}:{type:"uri",uri:e,...a&&{label:a}},Bn=({content:r={},isImageOnly:e=!1,isFubon:n=!1,previewHint:a={},cardTexts:i={}})=>{var _,u;const{imgUrl:o,buttons:s,imageRatio:l,aspectMode:d="cover",priceLabel:c="",uri:p,subText:g,actionType:v,message:f}=r,h=xo(n?{...r,currencyType:void 0}:r,{previewHint:a,cardTexts:i,priceLabel:c}),y=_o(h,{textPlaceholder:(_=a.text)!=null?_:a.mainText}),w=l!=null&&l.width&&(l!=null&&l.height)?"".concat(l.width,":").concat(l.height):"1:1",x=s!=null&&s.length?s:[{uri:p,subText:g,actionType:v,message:f}],m=(u=x[0])!=null?u:{};return{type:"bubble",hero:{type:"image",url:o,size:"full",aspectRatio:w,aspectMode:d},action:Nn(m),...!e&&{body:{type:"box",layout:"vertical",contents:y,flex:1},footer:{type:"box",layout:"vertical",spacing:"sm",contents:x.map(Dc),flex:0}}}},Mc=({t:r,previews:e={}})=>({productName:{preview:r("productName"),jinja:"{{jinja_product_name_context}}"},customField:{preview:r("editor.line.productCustomField.placeholder"),jinja:"{{jinja_product_customfield_context}}"}
3,originalPrice:{preview:"100,000",jinja:"{{jinja_original_product_price_context}}"},specialPrice:{preview:"99,999",jinja:"{{jinja_special_product_price_context}}"},productLink:{jinja:"{{jinja_product_tracking_url_context}}"},productPhotoLink:{jinja:"{{jinja_product_photo_url_context}}"},productPhotoAspectRatio:{jinja:"{{jinja_product_image_proportion_context}}"},headerTitle:{preview:e.headerTitle,jinja:"{{jinja_product_header_context}}"}}),qn=({t:r,values:e,index:n,currencyCode:a="",isPreview:i=!1})=>{var m,_,u,T;const{imageRatio:{width:o,height:s}={},aspectMode:l,productTitleSize:d,productFeedUriText:c}=e,p=Mc({t:r,previews:{headerTitle:(m=e==null?void 0:e.headers)==null?void 0:m[n]}}),g=o&&s?"".concat(o,":").concat(s):void 0,v=e.isShowCustomField,f=(_=e.price_types)==null?void 0:_.includes("original"),h=(u=e.price_types)==null?void 0:u.includes("special"),y=e.price_align,w=Array.isArray(e.headers),x=({jinja:F,preview:P})=>i?P:F;return{type:"bubble",...w?{header:{type:"box",layout:"vertical",contents:[{type:"text",text:x(p.headerTitle),size:"md",weight:"bold"}]},paddingTop:"lg",paddingBottom:"lg"}:{},hero:{type:"image",url:p.productPhotoLink.jinja,size:"full",aspectRatio:g!=null?g:p.productPhotoAspectRatio.jinja,aspectMode:l,action:{type:"uri",uri:p.productLink.jinja}},body:{type:"box",layout:"vertical",contents:[{type:"box",layout:"vertical",contents:[{type:"text",text:x(p.productName),weight:"bold",size:(T=tn[d])!=null?T:d,decoration:"none"},...v?[{type:"box",layout:"baseline",contents:[{type:"text",text:x(p.customField),wrap:!0,color:"#7B7B7B",size:"sm",flex:5}],height:"40px"}]:[]],spacing:"sm"},...i?[...f||h?[{type:"box",layout:"vertical",spacing:"xs",contents:[...f||!f&&h?[{type:"text",text:h?"".concat(a).concat(x(p.specialPrice)):"".concat(a).concat(x(p.originalPrice)),size:"lg",align:y,weight:"bold"}]:[],...h&&f?[{type:"text",text:"".concat(r("Original Price")," ").concat(a).concat(x(p.originalPrice)),size:"xs",align:y,color:"#7B7B7B"}]:[]]}]:[]]:["__JINJA_ORIGINAL_PRODUCT_PRICE_CONTEXT__"]],spacing:"lg"},footer:{type:"box",layout:"vertical",contents:[{type:"button",action:{type:"uri",label:c,uri:p.productLink.jinja}}]}}},Lc=(r={})=>{var i,o;let e=-1,n=-1,a=!1;return r.content?a=((i=r.content)!=null?i:[]).every(({columns:s},l)=>s==null?void 0:s.every((d,c)=>{var p;return(p=d==null?void 0:d.text)!=null&&p.trim()?!0:(e===-1&&(e=l,n=c),!1)})):a=!!((o=r.mainText)!=null&&o.trim()),{isPass:a,blockIdx:e,colIdx:n}},Hn=(r,e)=>JSON.stringify({text:e,type:r}),Vn=(r,e,n,a=new Set)=>{const i=a.has("Fubon"),o={link:d=>({type:"uri",label:"action",uri:d.link}),message:d=>({type:"message",label:"action",text:d.message})},s=n.map(d=>{var g,v;const{actionType:c="link"}=d,p=(v=(g=o[c])==null?void 0:g.call(o,d))!=null?v:o.link(d);return{type:"text",text:c==="message"?d.message:d.text,action:p,align:"center",color:i?Wi.fubon:Wi.default,margin:"xxl",wrap:!0}}),l=[{type:"text",text:e,weight:"regular",size:"md",wrap:!0,style:"normal"},...s];return JSON.stringify({type:"hyperlink_text",altText:r,size:"kilo",body:{type:"box",layout:"vertical",contents:l,spacing:"md",cornerRadius:"xs",paddingAll:"xl"}})},Ec=(r,e,n,a,i,o)=>JSON.stringify({type:"imagemap",baseurl:e,uri:((l=[])=>Array.isArray(l)?l.map(({x:d,y:c,w:p,h:g,uri:v,message:f,actionType:h,fallback:y})=>{const w={x:d,y:c,w:p,h:g,actionType:h!=null?h:"link",...y?{fallback:y}:{}};return h==="message"?{...w,type:"message",text:f}:{...w,type:"uri",uri:v}}):[])(o==null?void 0:o.uri)}),$c=(r,e,n,a)=>JSON.stringify({type:"imagemapvideo",videourl:e,uri:n,urilabel:a}),Oc=(r,e)=>{const{questionnaireType:n,actions:a,titleSize:i}=r;return K(n).with("text",()=>a!=null&&a.length?Vn(e,r.text,a):Hn("text",r.text)).with("image_card",()=>{var o;return JSON.stringify({type:"carousel",contents:[{type:"bubble",hero:{type:"image",url:r.imgUrl,size:"full",aspectRatio:"1:1",aspectMode:"cover"},action:{type:"uri",uri:r.uri},body:{type:"box",layout:"vertical",contents:[{type:"box",layout:"vertical",contents:[{type:"box",layout:"vertical",contents:[{type:"text",text:r.mainText,size:(o=tn[i])!=null?o:"20px",weight:"bold",wrap:!0}]},...r.descText?[{type:"box",layout:"vertical",contents:[{type:"text",text:r.descText,size:"16px",wrap:!0}]}]:[]]}]},footer:{type:"box",layout:"vertical",spacing:"sm",contents:[{type:"button",style:"link",height:"sm",action:{type:"uri",label:r.subText,uri:r.uri}}]}}]})}).exhaustive()},Rc=({bubbles:r,org:e,hasMergeTagPermission:n,productCustomFields:a,t:i})=>{var l,d;const{I18N:o={}}=(d=(l=To.getState())==null?void 0:l.toJS())!=null?d:{},{is_multi_site:s}=e||{};if(!Array.isArray(r))throw o.msgUserError;r.forEach((c,p)=>{const{type:g,text:v,url:f,imgLink:h,content:y,urilabel:w,lineMessage:x,actions:m}=c,_={text:o.text,image:o.image,video:o.video,surveyCake:o["editor.line.all.questionnaire"],carousel:o.carousel}[g],u="".concat(o.msgRequiredFieldsAreMissing,"ï¼").concat(_," ").concat(p+1);K(g).with("text",()=>{const T="".concat(o["editor.popUp.https.placeholder"],"ï¼").concat(o.text," ").concat(p+1);if(!v)throw"".concat(u," (").concat(o.carouselDescText,"ï¼");if(!n&&ua(v))throw o["editor.all.noPermissionPersonalizedTag"];if(Array.isArray(m)&&m.length>0){if(m!=null&&m.some(({actionType:P,link:k})=>P==="link"&&!k))throw"".concat(u,"ï¼").concat(o["editor.line.addText.link"],"ï¼");if(m!=null&&m.some(({actionType:P,link:k})=>P==="link"&&k&&!k.startsWith("https://")))throw"".concat(T,"ï¼").concat(o["editor.line.addText.link"],"ï¼");if(m!=null&&m.some(({actionType:P,text:k})=>P==="link"&&(!k||(k==null?void 0:k.length)===0)))throw"".concat(u,"ï¼").concat(o["editor.line.addText.linkText"],"ï¼");if(m!=null&&m.some(({actionType:P,message:k})=>P==="message"&&(!k||(k==null?void 0:k.length)===0)))throw"".concat(u,"ï¼").concat(o["editor.line.actionType.msgText"],"ï¼")}}).with("image",()=>{const T="".concat(o["editor.popUp.https.placeholder"],"ï¼ ").concat(o.image," ").concat(p+1);if(!f)throw"".concat(u,"ï¼").concat(o.image,"ï¼");if(x.uri.length===0||x.uri.some(({actionType:F,uri:P})=>F==="link"&&!P))throw"".concat(u,"ï¼").concat(o["report.Table.title.Links"],")");if(x.uri.some(({actionType:F,uri:P})=>F==="link"&&!P.startsWith("https://")))throw"".concat(T,"ï¼").concat(o["report.Table.title.Links"],")");if(x.uri.some(({actionType:F,message:P})=>F==="message"&&!P))throw"".concat(u,"ï¼").concat(o["editor.line.actionType.msgText"],")")}).with("video",()=>{const T="".concat(o["editor.popUp.https.placeholder"],": ").concat(o.video," ").concat(p+1);if(!f)throw"".concat(u,"ï¼").concat(o.video,"ï¼");if(!h)throw"".concat(u,"ï¼").concat(o["report.Table.title.Links"],"ï¼");if(!h.startsWith("https://"))throw"".concat(T,"ï¼").concat(o["report.Table.title.Links"],"ï¼");if(!w)throw"".concat(u,"ï¼").concat(o.buttonText,"ï¼")}).with("surveyCake",()=>{const{questionnaireType:T,questionnaireInfo:F}=c;
3if(!F)throw"".concat(o["editor.surveySetting.reminder.selectSurveyName"]);K(T).with("text",()=>{if(!v)throw"".concat(u," (").concat(o.carouselDescText,"ï¼");if(Array.isArray(m)&&m.length>0){if(m!=null&&m.some(({link:P})=>!P))throw"".concat(u,"ï¼").concat(o["editor.line.addText.link"],"ï¼");if(m!=null&&m.some(({text:P})=>!P||(P==null?void 0:P.length)===0))throw"".concat(u,"ï¼").concat(o["editor.line.addText.linkText"],"ï¼")}}).with("image_card",()=>{const{imgUrl:P,mainText:k,subText:L}=c;if(!P)throw"".concat(u,"ï¼").concat(o.image,"ï¼");if(!k)throw"".concat(u,"ï¼").concat(o.carouselMainText,"ï¼");if(!L)throw"".concat(u,"ï¼").concat(o.linkText,"ï¼")}).exhaustive()}).with("carousel",()=>{var k,L,R,E,Z,U,ce,ye,Ie,le,ge,ke,Ee,O,W,ee,te,ae,Y,$,ve,nt,ot,$e,ei,ti,ii,ri,at,Dt,Mt,Lt,Et,$t,Ot,Rt,zt,At,Nt,B,ne,Pe,yt,st,Bt,vt,ni,oi,xt,ai,si,li,di,ci,qt,Ht;const{isProductFeed:T,carouselType:F}=c,P="".concat(o["editor.popUp.https.placeholder"]," : ").concat(o.carousel," ").concat(p+1);if(T){const{productFeedType:ie,numOfProductFeed:Vt,headers:xe,lookBackDays:Oe,tag:qe,site:re,timeType:q,relativeTimeType:pe,starting_time:_e,ending_time:Re,only_relative_starting_time:Fe,only_relative_ending_time:ze,relative_starting_time:De,relative_ending_time:lt,excluded_product_range:Me,excluded_tags:He,excluded_custom_fields:Ae,limit_product_range:dt,included_tags:Ve,included_categories:_t,included_custom_fields:ct,inventory:b,product_custom_field:ut}=c,pt=X=>X==null||Object.keys(X).length===0,ui=X=>{var se;if(pt(X))throw"".concat(u,"ï¼").concat(o["editor.all.specifyProductCustomField"],"ï¼");if(a&&X){if(!X.custom_field_id)throw"".concat(u,"ï¼").concat(o["editor.all.specifyProductCustomField"],"ï¼");const Se=a.find(we=>we.id===X.custom_field_id),Le=Se==null?void 0:Se.field_type,Ue=((se=Se==null?void 0:Se.text_options)==null?void 0:se.length)>0;if(Le==="text"&&(!X.filter_value||!Ue&&!X.rel_type)||Le==="number"&&(typeof X.filter_value!="number"||!X.rel_type)||Le==="boolean"&&typeof X.filter_value!="boolean")throw"".concat(u,"ï¼").concat(o["editor.all.specifyProductCustomField"],"ï¼");if(Le==="datetime"||Le==="date"){const{inputType:we,usingInput:me,filter_value:ue,rel_type:Ce,is_future_time:mt,start:wt,end:We}=X;if(!we||we==="absolute"&&!ue||we==="default"&&(!Ce||!ue)||we==="relative"&&(mt===void 0||mt===!0&&(pt(wt)||pt(We))||mt===!1&&pt(wt)&&pt(We)&&me!=="PreviousMonth"))throw"".concat(u,"ï¼").concat(o["editor.all.specifyProductCustomField"],"ï¼")}}};if(ie==="personalized_inventory"){if(["triggerCondition","triggerOperation","triggerValue"].some(se=>(b==null?void 0:b[se])===void 0||(b==null?void 0:b[se])===null))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProductFilter"],"ï¼");if(b!=null&&b.withInventoryLevel&&(!((k=b==null?void 0:b.inventoryLevel)!=null&&k.operation)||!((L=b==null?void 0:b.inventoryLevel)!=null&&L.value)))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProduct.specifyInventoryLevel"],"ï¼");if(((R=b==null?void 0:b.audienceProductEventAction)==null?void 0:R.length)===0)throw"".concat(u,"ï¼").concat(o["workflow.node.inventory.audienceProductEventAction"],"ï¼");if(typeof(b==null?void 0:b.audienceProductEventActionDaysAgo)!="number")throw"".concat(u,"ï¼").concat(o["editor.all.interactionRetroDays"],"ï¼");if(!((E=b==null?void 0:b.dateCondition)!=null&&E.inputType)||((Z=b==null?void 0:b.dateCondition)==null?void 0:Z.inputType)==="absolute"&&(!((U=b==null?void 0:b.dateCondition)!=null&&U.absolute)||((ye=(ce=b==null?void 0:b.dateCondition)==null?void 0:ce.absolute)==null?void 0:ye.length)!==2)||((Ie=b==null?void 0:b.dateCondition)==null?void 0:Ie.inputType)==="relative"&&(!((le=b==null?void 0:b.dateCondition)!=null&&le.relative)||((ke=(ge=b==null?void 0:b.dateCondition)==null?void 0:ge.relative)==null?void 0:ke.usingInput)==="StartOnly"&&!((W=(O=(Ee=b==null?void 0:b.dateCondition)==null?void 0:Ee.relative)==null?void 0:O.start)!=null&&W.number)||((te=(ee=b==null?void 0:b.dateCondition)==null?void 0:ee.relative)==null?void 0:te.usingInput)==="EndOnly"&&!(($=(Y=(ae=b==null?void 0:b.dateCondition)==null?void 0:ae.relative)==null?void 0:Y.end)!=null&&$.number)||((nt=(ve=b==null?void 0:b.dateCondition)==null?void 0:ve.relative)==null?void 0:nt.usingInput)==="StartAndEnd"&&(!((ei=($e=(ot=b==null?void 0:b.dateCondition)==null?void 0:ot.relative)==null?void 0:$e.start)!=null&&ei.number)||!((ri=(ii=(ti=b==null?void 0:b.dateCondition)==null?void 0:ti.relative)==null?void 0:ii.end)!=null&&ri.number))))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProduct.inventoryEventTimRange"],"ï¼")}if(ie==="all_products_inventory"){if(["triggerCondition","triggerOperation","triggerValue"].some(se=>(b==null?void 0:b[se])===void 0||(b==null?void 0:b[se])===null))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProductFilter"],"ï¼");if(b!=null&&b.withInventoryLevel&&(!((at=b==null?void 0:b.inventoryLevel)!=null&&at.operation)||!((Dt=b==null?void 0:b.inventoryLevel)!=null&&Dt.value)))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProduct.specifyInventoryLevel"],"ï¼");if(!((Mt=b==null?void 0:b.dateCondition)!=null&&Mt.inputType)||((Lt=b==null?void 0:b.dateCondition)==null?void 0:Lt.inputType)==="absolute"&&(!((Et=b==null?void 0:b.dateCondition)!=null&&Et.absolute)||((Ot=($t=b==null?void 0:b.dateCondition)==null?void 0:$t.absolute)==null?void 0:Ot.length)!==2)||((Rt=b==null?void 0:b.dateCondition)==null?void 0:Rt.inputType)==="relative"&&(!((zt=b==null?void 0:b.dateCondition)!=null&&zt.relative)||((Nt=(At=b==null?void 0:b.dateCondition)==null?void 0:At.relative)==null?void 0:Nt.usingInput)==="StartOnly"&&!((Pe=(ne=(B=b==null?void 0:b.dateCondition)==null?void 0:B.relative)==null?void 0:ne.start)!=null&&Pe.number)||((st=(yt=b==null?void 0:b.dateCondition)==null?void 0:yt.relative)==null?void 0:st.usingInput)==="EndOnly"&&!((ni=(vt=(Bt=b==null?void 0:b.dateCondition)==null?void 0:Bt.relative)==null?void 0:vt.end)!=null&&ni.number)||((xt=(oi=b==null?void 0:b.dateCondition)==null?void 0:oi.relative)==null?void 0:xt.usingInput)==="StartAndEnd"&&(!((li=(si=(ai=b==null?void 0:b.dateCondition)==null?void 0:ai.relative)==null?void 0:si.start)!=null&&li.number)||!((qt=(ci=(di=b==null?void 0:b.dateCondition)==null?void 0:di.relative)==null?void 0:ci.end)!=null&&qt.number))))throw"".concat(u,"ï¼").concat(o["editor.all.inventoryProduct.inventoryEventTimRange"],"ï¼")}if(ie==="most_sold_by_ranking"&&xe.some(X=>!X))throw"".concat(u,"ï¼").concat(o["editor.line.carouselTitle"],"ï¼");if(Me==="excluded_tags"&&(!He||He.length<=0))throw"".concat(u,"ï¼").concat(o["w
3orkflow.realTimeTracking.select.designatedProductLabel"],"ï¼");if(Me==="excluded_custom_fields"){if(!Ae||Ae.length<=0)throw"".concat(u,"ï¼").concat(o["editor.all.specifyProductCustomField"],"ï¼");Ae.forEach(X=>{const se=X==null?void 0:X.product_custom_field;ui(se)})}if(ie!=="tag"&&ie!=="category"&&dt==="included_tags"&&(!Ve||Ve.length<=0))throw"".concat(u,"ï¼").concat(o["workflow.realTimeTracking.select.designatedProductLabel"],"ï¼");if(ie!=="tag"&&ie!=="category"&&dt==="included_categories"&&(!_t||_t.length<=0))throw"".concat(u,"ï¼").concat(o["editor.popUp.specifyProductCategory"],"ï¼");if(ie!=="custom_field"&&ie!=="attribute"&&dt==="included_custom_fields"){const X=ct==null?void 0:ct.product_custom_field;ui(X)}if(!Vt)throw"".concat(u,"ï¼").concat(o.numOfItem,"ï¼");if(s&&!re)throw"".concat(u,"ï¼").concat(o.site,"ï¼");if(ie==="recent_view"||ie==="abandon_cart"||ie==="view_together"){if(!Oe)throw"".concat(u,"ï¼").concat(o.daysAgo,"ï¼")}else{if(ie==="tag"&&(!qe||qe.length<=0))throw"".concat(u,"ï¼").concat(o.productTags,"ï¼");if(ie==="category"&&(!qe||qe.length<=0))throw"".concat(u,"ï¼").concat(o.productCategory,"ï¼");if(ie==="most_view"||ie==="most_sold"||ie==="most_sold_by_ranking"){if(!q||q==="absoluteDate"&&(!_e||!Re)||q==="relativeTime"&&pe==="onlyStart"&&!Fe||q==="relativeTime"&&pe==="onlyEnd"&&!ze||q==="relativeTime"&&pe==="between"&&(!De||!lt)||q==="relativeTime"&&!pe)throw"".concat(u,"ï¼").concat(o.timeType,"ï¼")}else if(ie==="attribute"){const{product_attribute_key:X,product_attribute_value:se}=c;if(!X||!se)throw"".concat(u,"ï¼").concat(o["product.productVariant"],"ï¼")}else if(ie==="custom_field"){const{custom_field_id:X,filter_value:se,rel_type:Se,inputType:Le,usingInput:Ue,is_future_time:we,start:me,end:ue}=ut!=null?ut:{},Ce="".concat(u,"ï¼").concat(o["editor.productFeed.customField"],"ï¼");if(!X)throw Ce;const{field_type:mt,text_options:wt}=(Ht=a.find(We=>We.id===X))!=null?Ht:{};switch(mt){case"text":if(!se||!wt.length&&!Se)throw Ce;break;case"number":if(se==null||!Se)throw Ce;break;case"boolean":if(!an(se))throw Ce;break;case"date":case"datetime":if(!Le)throw Ce;switch(Le){case"default":if(!se||!Se)throw Ce;break;case"absolute":if(!se)throw Ce;break;case"relative":{if(we===void 0||!Ue||Ue==="StartAndEnd"&&(!me||!ue)||Ue==="EndOnly"&&!ue||Ue==="StartOnly"&&!me)throw Ce;const We=(me==null?void 0:me.unit)==="days"?(me==null?void 0:me.number)*24:me==null?void 0:me.number,pi=(ue==null?void 0:ue.unit)==="days"?(ue==null?void 0:ue.number)*24:ue==null?void 0:ue.number;if(me&&ue&&(we&&We>=pi||!we&&We<=pi))throw"".concat(o["all.validation.startTimeMustSmallerThanEndTime"],"ï¼").concat(_," ").concat(p+1);break}}break}}}}else{const ie=F==="image_card",Vt=F==="image_only",xe=c.imageRatio;if(xe!=null&&xe.width&&(xe!=null&&xe.height)){const Oe=xe.height/xe.width;if(!(Oe>0&&Oe<=3))throw"".concat(o["editor.line.productFeed.aspectRatioLimit"],"ï¼").concat(_," ").concat(p+1)}y.forEach((Oe,qe)=>{const{imgUrl:re,buttons:q=[],currencyType:pe,originalPrice:_e,specialPrice:Re}=Oe;if(ie){if(!re)throw"".concat(u,"ï¼").concat(o.image,"ï¼");const{isPass:Fe,blockIdx:ze,colIdx:De}=Lc(Oe);if(!Fe)throw"".concat(u,"ï¼Tab ").concat(qe+1," - ").concat(i("content")," - ").concat(i("editor.line.block")," ").concat(ze+1," - ").concat(i("editor.line.columnN",{n:De+1}),"ï¼");if(pe&&!_e&&!Re)throw"".concat(u,"ï¼").concat(o.price,"ï¼")}if(Vt&&!re)throw"".concat(u,"ï¼").concat(o.image,"ï¼");q.forEach(({actionType:Fe,uri:ze,subText:De,message:lt})=>{if(ie&&Fe==="link"&&!De)throw"".concat(u,"ï¼").concat(o.linkText,"ï¼");if(Fe==="link"){if(!ze)throw"".concat(u,"ï¼").concat(o["report.Table.title.Links"],"ï¼");if(!ze.startsWith("https://"))throw"".concat(P,"ï¼").concat(o["report.Table.title.Links"],"ï¼")}else if(Fe==="message"&&!lt)throw"".concat(u,"ï¼").concat(o["editor.line.actionType.msgText"],"ï¼")})})}}).otherwise(()=>{throw o.msgUserError})})},zc=({t:r,bubble:e,modulePermissionSet:n,productCustomFields:a,values:i,version:o,channelLang:s})=>{var c;const{isProductFeed:l,carouselType:d="image_card"}=e;if(l){const{productFeedType:p,productFeedUriText:g,redirect_target:v,numOfProductFeed:f,headers:h,tag:y,lookBackDays:w,utm_campaign:x,utm_source:m,utm_medium:_,custom_tracking_params:u,site:T,price_type:F,timeType:P,starting_time:k,ending_time:L,relativeTimeType:R,only_relative_starting_time:E,only_relative_ending_time:Z,relative_starting_time:U,relative_ending_time:ce,excluded_product_range:ye,excluded_tags:Ie,excluded_custom_fields:le,limit_product_range:ge,included_tags:ke,included_categories:Ee,included_custom_fields:O,inventory:W,productGranularity:ee,distinctRootProduct:te}=e,{price_types:ae,priceFluctuation:Y}=i,$={type:"line_product_feed",product_feed_type:p,num_of_column:f,...h&&{headers:h},link_text:g,utm_campaign:x,utm_source:m===""?null:m,utm_medium:_===""?null:_,custom_tracking_params:u===""?null:u,price_type:F,site:T===""?null:T,...o==="v2"&&{contents:[qn({t:r,values:i,isPreview:!1})],...ur(i,["price_align",i.additional_image_name&&"additional_image_name",i.custom_field_id&&"custom_field_id"].filter(
3Boolean))}};return n.has("OS91APPLiff")&&v==="91app_web"&&($.redirect_target=v),ye==="excluded_tags"&&vi(Ie)&&($.excluded_tags=Ie.join()),ye==="excluded_custom_fields"&&(le==null?void 0:le.length)>0&&($.excluded_custom_fields=le.map(ve=>Ct({productCustomFields:a,product_custom_field:ve.product_custom_field}))),p!=="tag"&&ge==="included_tags"&&vi(ke)&&($.included_tags=ke.join()),p!=="category"&&ge==="included_categories"&&vi(Ee)&&($.included_categories=Ee.join()),p!=="custom_field"&&p!=="attribute"&&ge==="included_custom_fields"&&(O!=null&&O.product_custom_field)&&($.product_attributes=Ct({productCustomFields:a,product_custom_field:O.product_custom_field})),ee&&($.productfeed_condition={product_granularity:ee,distinct_root_product:te!=null?te:null}),p==="recent_view"||p==="abandon_cart"||p==="view_together"?$.look_back_days=w:p==="most_view"||p==="most_sold"||p==="most_sold_by_ranking"?P==="absoluteDate"?$.filter_date={abs_start_date:k,abs_end_date:L}:R==="onlyStart"?$.filter_date={relative_start_date:E}:R==="onlyEnd"?$.filter_date={relative_end_date:Z}:R==="between"&&($.filter_date={relative_start_date:U,relative_end_date:ce}):p==="attribute"?$.product_attributes={[e.product_attribute_key]:e.product_attribute_value}:p==="custom_field"?$.product_attributes=Ct({productCustomFields:a,product_custom_field:e.product_custom_field}):$.tag=vi(y)?y.join():"",p==="personalized_inventory"&&($.product_feed_type=W.triggerCondition==="level"?"stock_quantity":"inventory",$.look_back_days=W==null?void 0:W.audienceProductEventActionDaysAgo,$.tag=Jo(W==null?void 0:W.audienceProductEventAction),$.product_attributes=br({...W,dateCondition:W.dateCondition?Gi(W.dateCondition):null})),p==="all_products_inventory"&&($.product_feed_type=W.triggerCondition==="level"?"stock_quantity":"inventory",$.product_attributes=br({...W,dateCondition:W.dateCondition?Gi(W.dateCondition):null})),p==="personalized_price_fluctuation_variation"&&($.product_feed_type="price_fluctuation",$.filter_date={time_condition_category:"relative",relative_starting_time:-Y.event.relative_starting_time*24},$.tag=bo((c=Y.event)==null?void 0:c.has_event_action),$.product_attributes=_r(Yi(Y).product)),p==="price_fluctuation_variation"&&($.product_feed_type="price_fluctuation",$.product_attributes=_r(Yi(Y).product)),Array.isArray(ae)&&K([...ae].sort()).with(["original"],()=>{$.price_type="original"}).with(["special"],()=>{$.price_type="special"}).with(["original","special"],()=>{$.price_type="original_and_special"}).otherwise(()=>{$.price_type="original_nor_special"}),JSON.stringify($)}else{const p=d==="image_only",g=n.has("Fubon"),v=e.content.map(f=>{var h,y;return Bn({content:{...f,imageRatio:i.imageRatio,aspectMode:i.aspectMode,titleSize:f==null?void 0:f.productTitleSize,priceLabel:(y=(h=ji.find(w=>w.value===f.currencyType))==null?void 0:h.label)!=null?y:"NT$"},isImageOnly:p,isFubon:g,cardTexts:{originalPrice:r("originalPrice",{lng:s})}})});return JSON.stringify({type:"carousel",contents:v})}},Je=({component:r,boxPadding:e="10px",className:n})=>{var a,i,o,s,l,d,c,p,g,v;switch(r==null?void 0:r.type){case"box":return t.jsx(Ac,{className:n,$_css:e,$_css2:K(r.layout).with("vertical",()=>"column").with("horizontal",()=>"row").otherwise(()=>"column"),$_css3:(a=r.alignItems)!=null?a:"stretch",$_css4:(i=r.margin)!=null?i:0,$_css5:typeof r.spacing=="string"&&r.spacing.endsWith("px")?r.spacing:K(r.spacing).with("sm",()=>"4px").with("lg",()=>"12px").otherwise(()=>0),$_css6:(o=r.height)!=null?o:"auto",children:(s=r.contents)==null?void 0:s.map((f,h)=>{var y;return t.jsx(I.Fragment,{children:t.jsx(Nc,{$_css7:(y=f.flex)!=null?y:"initial",children:t.jsx(Je,{component:f,boxPadding:0})})},h)})});case"text":return t.jsx(Bc,{className:n,$_css8:[Te(["white-space:pre-line;font-weight:",";font-size:",";color:",";text-align:",";word-break:break-word;"],K(r==null?void 0:r.weight).with("bold",()=>"bold").otherwise(()=>"normal"),K(r.size).with("xs",()=>"13px").with("sm",()=>"14px").with("md",()=>"16px").with("lg",()=>"19px").otherwise(f=>f),r.color,r.align),r.wrap?Te(["white-space:pre-wrap;text-overflow:clip;"]):Te(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"])],children:r.text});case"image":{const f=La({url:r.url}),h=(l=r.aspectRatio)==null?void 0:l.replace(":","/");if(f){const y=(d=r.aspectMode)!=null?d:"cover";return t.jsx(qc,{className:n,$_css9:h,children:t.jsx(Hc,{src:r.url,$_css0:y==="fit"?"contain":"cover"})})}return t.jsx(Vc,{className:n,$_css1:h,children:t.jsx(Uc,{})})}case"button":{const f=(c=r.style)!=null?c:"link",h=(p=r.height)!=null?p:"md",y=(g=r.color)!=null?g:"#42659A";return t.jsx(Wc,{className:n,$_css10:h==="md"?"52px":"40px",$_css11:K(f).with("primary",()=>"#ffffff").otherwise(()=>y),$_css12:K(f).with("primary",()=>y).otherwise(()=>"transparent"),children:(v=r.action.label)==null?void 0:v.replace(/\s+$/,"")})}default:return null}};var Ac=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv",componentId:"sc-11rk0o4-0"})(["background-color:white;padding:",";display:flex;flex-direction:",";align-items:",";margin-top:",";gap:",";height:",";"],r=>r.$_css,r=>r.$_css2,r=>r.$_css3,r=>r.$_css4,r=>r.$_css5,r=>r.$_css6),Nc=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv2",componentId:"sc-11rk0o4-1"})(["flex:",";min-width:0;"],r=>r.$_css7),Bc=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv3",componentId:"sc-11rk0o4-2"})(["",""],r=>r.$_css8),qc=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv4",componentId:"sc-11rk0o4-3"})(["aspect-ratio:1/1;aspect-ratio:",";overflow:hidden;width:300px;"],r=>r.$_css9),Hc=C("img").withConfig({displayName:"LineFlexMessageRender___StyledImg",componentId:"sc-11rk0o4-4"})(["width:100%;height:100%;object-fit:",";display:block;"],r=>r.$_css0),Vc=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv5",componentId:"sc-11rk0o4-5"})(["position:relative;background-color:#f7f7f7;aspect-ratio:1/1;overflow:hidden;aspect-ratio:",";"],r=>r.$_css1),Uc=C(gr).withConfig({displayName:"LineFlexMessageRender___StyledPictureOutlined",componentId:"sc-11rk0o4-6"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:100px;color:var(--neutral-7);"]),Wc=C("div").withConfig({displayName:"LineFlexMessageRender___StyledDiv6",componentId:"sc-11rk0o4-7"})(["width:100%;min-height:",";display:flex;align-items:center;justify-content:center;padding:0 16px;color:",";background-color:",";border-radius:4px;text-align:center;white-space:pre;text-overflow:ellipsis;overflow:hidden;"],r=>r.$_css10,r=>r.$_css11,r=>r.$_css12);
3const Un=({content:r,isImageOnly:e,imageRatio:n,aspectMode:a})=>{var l,d,c;const{t:i}=V(),{channelLang:o}=rn(),s=Bn({content:{...r,titleSize:(l=r.titleSize)!=null?l:r.productTitleSize,priceLabel:(c=(d=ji.find(p=>p.value===(r==null?void 0:r.currencyType)))==null?void 0:d.label)!=null?c:"",...n!==void 0&&{imageRatio:n},...a!==void 0&&{aspectMode:a}},isImageOnly:e,previewHint:{mainText:i("carouselMainText"),price:i("editor.email.productFeed.productPrice")},cardTexts:{originalPrice:i("originalPrice",{lng:o})}});return t.jsxs(Gc,{children:[t.jsx(Je,{component:s.header,boxPadding:"20px"}),t.jsx(Je,{component:s.hero}),t.jsx(Yc,{component:s.body,boxPadding:"19px 20px 10px 20px"}),t.jsx(Je,{component:s.footer})]})};var Gc=C("div").withConfig({displayName:"ImageCardPreview___StyledDiv",componentId:"sc-upzhm9-0"})(["font-family:-apple-system,'system-ui',Helvetica,Roboto,sans-serif;color:#444;line-height:1.4;border:1px solid #ddd;border-radius:17px;overflow:hidden;width:300px;height:100%;background:white;display:flex;flex-direction:column;"]),Yc=C(Je).withConfig({displayName:"ImageCardPreview___StyledLineFlexMessageRender",componentId:"sc-upzhm9-1"})(["flex-grow:1;"]);const Xc=({bubbleId:r,currencyCode:e,index:n})=>{var d;const{t:a}=V(),{bubbleForms:i}=Qt(),o=i==null?void 0:i[r],s=(d=S.useWatch([],o))!=null?d:{},l=qn({t:a,values:{...s,productFeedUriText:(s==null?void 0:s.productFeedUriText)||a("editor.line.addText.linkText")},currencyCode:e,isPreview:!0,index:n});return t.jsxs(Kc,{children:[t.jsx(Je,{component:l.header,boxPadding:"20px"}),t.jsx(Je,{component:l.hero}),t.jsx(Je,{component:l.body,boxPadding:"19px 20px 10px 20px"}),t.jsx(Je,{component:l.footer})]})};var Kc=C("div").withConfig({displayName:"ProductFeedPreviewV2___StyledDiv",componentId:"sc-jutc5y-0"})(["font-family:-apple-system,'system-ui',Helvetica,Roboto,sans-serif;color:#444;line-height:1.4;border:1px solid #ddd;border-radius:17px;overflow:hidden;width:300px;height:fit-content;"]);const Jc=C.div.withConfig({displayName:"MessagePreviewer__Title",componentId:"sc-4bcpok-0"})(["color:rgba(0,0,0,0.85);font-size:20px;font-weight:700;max-width:240px;word-wrap:break-word;"]),Vi=C.div.withConfig({displayName:"MessagePreviewer__PriceSection",componentId:"sc-4bcpok-1"})(["display:flex;flex-direction:column;align-items:flex-end;"]),Ui=C.div.withConfig({displayName:"MessagePreviewer__SalePrice",componentId:"sc-4bcpok-2"})(["font-size:22px;color:#262626;"]),Zc=C.div.withConfig({displayName:"MessagePreviewer__OriginalPrice",componentId:"sc-4bcpok-3"})(["font-size:14px;color:#00000073;"]),Qc=C.div.withConfig({displayName:"MessagePreviewer__LinkButton",componentId:"sc-4bcpok-4"})(["white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:16px;text-align:center;color:#486086;padding-top:20px;"]);var Wr;const Hr=Te(Wr||(Wr=Ye(["\n position: absolute;\n z-index: 1;\n top: 50%;\n transform: translateY(-50%);\n"])));var Gr;const fr=Te(Gr||(Gr=Ye(["\n background-color: #f7f7f7;\n display: flex;\n justify-content: center;\n & > span {\n display: flex;\n align-items: center;\n }\n"])));var Yr;const Fi=Te(Yr||(Yr=Ye(["\n border-radius: 15px;\n overflow: hidden;\n margin-left: 20px;\n & > .ant-card-body {\n display: none;\n }\n"]))),eu=({bubble:r})=>{const{mainText:e,descText:n,subText:a,imgUrl:i,titleSize:o}=r,s={descText:n,mainText:e,subText:a,imgUrl:i,titleSize:o};return t.jsx(su,{children:t.jsx(Un,{content:s,isImageOnly:r.carouselType==="image_only"},r.id)})};var Xr;const tu=({priceType:r,productFeedUriText:e,title:n})=>{const{t:a}=V(),i=t.jsx(lu,{$_css:[fr,Te(Xr||(Xr=Ye(["\n height: 290px;\n "])))],children:t.jsx(du,{})}),o={original:t.jsx(Vi,{children:t.jsx(Ui,{children:a("originalPrice")})}),special:t.jsx(Vi,{children:t.jsx(Ui,{children:a("salePrice")})}),original_and_special:t.jsxs(Vi,{children:[t.jsx(Ui,{children:a("salePrice")}),t.jsx(Zc,{children:a("originalPrice")})]})};return t.jsxs(cu,{title:n,headStyle:{fontWeight:"normal"},cover:i,style:{width:290},children:[t.jsx(Jc,{children:a("productName")}
3),o[r],t.jsx(Qc,{children:e||a("linkText")})]})};var Kr,Jr;const iu=({bubble:r,currencyCode:e})=>{const{isProductFeed:n,content:a,numOfProductFeed:i,price_type:o,productFeedUriText:s,headers:l=[]}=r,{carouselProductFeedConfigs:d}=Qt(),{modulePermissionSet:c}=fe(),p=c.has("Fubon"),[g,v]=I.useState(0),f=I.useRef(),h=Array(i).fill(1),y=n?h==null?void 0:h.length:a==null?void 0:a.length;return t.jsxs(uu,{$_css2:y===1&&"padding-left: 20px",children:[g!==0&&t.jsx(pu,{shape:"circle",icon:t.jsx(Fa,{}),onClick:()=>f.current.prev(),$_css3:[Hr,Te(Kr||(Kr=Ye(["\n left: 0px;\n "])))]}),t.jsx(mu,{centerMode:!0,dots:!1,centerPadding:"20px",infinite:!1,ref:f,afterChange:w=>v(w),children:[...n?h:a].map((w,x)=>K(!0).with(n&&d.version==="v2",()=>t.jsx(Xc,{bubbleId:r.id,currencyCode:e,index:x},r.id)).with(n,()=>t.jsx(tu,{priceType:o,productFeedUriText:s,title:l[x]},x)).with(r.carouselType==="image_card"||r.carouselType==="image_only",()=>{var m,_;return t.jsx(Un,{content:{...w,priceLabel:p?"":(_=(m=ji.find(u=>u.value===(w==null?void 0:w.currencyType)))==null?void 0:m.label)!=null?_:"",...p&&{currencyType:void 0}},isImageOnly:r.carouselType==="image_only",imageRatio:r.imageRatio,aspectMode:r.aspectMode},r.id+x)}).otherwise(()=>null))}),g!==y-1&&t.jsx(gu,{shape:"circle",icon:t.jsx(hn,{}),onClick:()=>f.current.next(),$_css4:[Hr,Te(Jr||(Jr=Ye(["\n right: 20px;\n "])))]})]})};var Zr;const ru=({bubble:r})=>{const{url:e}=r;return e?t.jsx(hu,{style:{width:290},cover:t.jsx(lr,{src:e,alt:"image"})}):t.jsx(vu,{style:{width:290},cover:t.jsx(fu,{$_css5:[fr,Te(Zr||(Zr=Ye(["\n height: 290px;\n "])))],children:t.jsx(yu,{})})})},Vr=({bubble:r})=>{const{text:e,actions:n}=r,{t:a}=V(),{modulePermissionSet:i}=fe(),o=i.has("Fubon")?Wi.fubon:"#42659a",s=e==null?void 0:e.split("\n"),l=(e==null?void 0:e.length)>0?s.map((d,c)=>t.jsx(xu,{children:d.length>0?d:t.jsx("br",{})},c)):a("text");return Array.isArray(n)&&n.length>0?t.jsx(wu,{style:{width:235},cover:t.jsxs(_u,{direction:"vertical",size:"small",children:[t.jsx(de.Text,{align:"left",children:l}),n.map((d,c)=>K(d.actionType).with("message",()=>{var p;return t.jsx(de.Link,{href:null,target:"_blank",style:{whiteSpace:"break-spaces",color:o},children:((p=d==null?void 0:d.message)==null?void 0:p.replace(/\s+$/,""))||a("editor.line.actionType.msgText")},"".concat(c,"-").concat(d.message))}).otherwise(()=>t.jsx(de.Link,{href:d.link.length>0?d.link:null,target:"_blank",style:{whiteSpace:"break-spaces",color:o},children:d.text.replace(/\s+$/,"")||a("editor.line.addText.linkText")},"".concat(c,"-").concat(d.text))))]})}):t.jsx(Su,{children:t.jsx(Cu,{children:l})})};var Qr;const nu=({bubble:r})=>{const{url:e}=r;return e?t.jsx(bu,{src:e,type:"video/mp4",controls:!0,muted:!0,loop:!0,width:290}):t.jsx(Iu,{style:{width:290},cover:t.jsx(Tu,{$_css6:[fr,Te(Qr||(Qr=Ye(["\n height: 124px;\n "])))],children:t.jsx(ju,{})})})},ou=({bubble:r,currencyCode:e})=>{if(!r)return;const{type:n}=r;return K(n).with("surveyCake",()=>K(r.questionnaireType).with("text",()=>t.jsx(Vr,{bubble:r})).with("image_card",()=>t.jsx(eu,{bubble:r})).exhaustive()).with("carousel",()=>t.jsx(iu,{bubble:r,currencyCode:e})).with("text",()=>t.jsx(Vr,{bubble:r})).with("image",()=>t.jsx(ru,{bubble:r})).with("video",()=>t.jsx(nu,{bubble:r})).exhaustive()},au=({bubbles:r})=>{var i,o;const{t:e}=V(),[{data:n}]=rt("/ma_account/product-feed-display/"),a=(o=(i=n==null?void 0:n.at(0))==null?void 0:i.currency_code)!=null?o:"";return t.jsxs(ku,{children:[t.jsx(Pu,{children:t.jsx(Fu,{children:e("editor.line.previewInfo")})}),t.jsx(Du,{children:t.jsx(H,{direction:"vertical",size:12,children:r.map((s,l)=>t.jsx(ou,{bubble:s,currencyCode:a},l))})})]})};var su=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv",componentId:"sc-4bcpok-5"})(["padding-left:20px;"]),lu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv2",componentId:"sc-4bcpok-6"})(["",""],r=>r.$_css),du=C(gr).withConfig({displayName:"MessagePreviewer___StyledPictureOutlined",componentId:"sc-4bcpok-7"})(["font-size:100px;color:var(--neutral-7);"]),cu=C(Jt).withConfig({displayName:"MessagePreviewer___StyledCard",componentId:"sc-4bcpok-8"})(["border-radius:18px;overflow:hidden;display:flex;flex-direction:column;& > .ant-card-body{padding:20px;flex-direction:column;flex:1;}"]),uu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv3",componentId:"sc-4bcpok-9"})(["width:350px;max-width:350px;overflow:hidden;position:relative;",""],r=>r.$_css2),pu=C(J).withConfig({displayName:"MessagePreviewer___StyledButton",componentId:"sc-4bcpok-10"})(["",""],r=>r.$_css3),mu=C(ps).withConfig({displayName:"MessagePreviewer___StyledCarousel",componentId:"sc-4bcpok-11"})(["& > div > div.slick-track{display:flex;& > div.slick-slide{height:inherit;display:flex;& > div{display:flex;flex:1;}}}"]),gu=C(J).withConfig({displayName:"MessagePreviewer___StyledButton2",componentId:"sc-4bcpok-12"})(["",""],r=>r.$_css4),hu=C(Jt).withConfig({displayName:"MessagePreviewer___StyledCard2",componentId:"sc-4bcpok-13"})(["",""],Fi),fu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv4",componentId:"sc-4bcpok-14"})(["",""],r=>r.$_css5),yu=C(gr).withConfig({displayName:"MessagePreviewer___StyledPictureOutlined2",componentId:"sc-4bcpok-15"})(["font-size:70px;color:var(--neutral-7);"]),vu=C(Jt).withConfig({displayName:"MessagePreviewer___StyledCard3",componentId:"sc-4bcpok-16"})(["",""],Fi),xu=C(de.Paragraph).withConfig({displayName:"MessagePreviewer___StyledTypographyParagraph",componentId:"sc-4bcpok-17"})(["max-width:205px;&&{margin-bottom:0px;}
3"]),_u=C(H).withConfig({displayName:"MessagePreviewer___StyledSpace",componentId:"sc-4bcpok-18"})(["text-align:center;padding:15px;word-break:break-all;"]),wu=C(Jt).withConfig({displayName:"MessagePreviewer___StyledCard4",componentId:"sc-4bcpok-19"})(["",""],Fi),Su=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv5",componentId:"sc-4bcpok-20"})(["border-radius:14px;background-color:white;padding:7px 10px;display:inline-block;position:relative;margin-left:20px;"]),Cu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv6",componentId:"sc-4bcpok-21"})(["&::after{content:' ';position:absolute;width:0;height:0;left:-4px;right:auto;top:8px;bottom:auto;border:4px solid;border-color:white white transparent transparent;}"]),bu=C("video").withConfig({displayName:"MessagePreviewer___StyledVideo",componentId:"sc-4bcpok-22"})(["padding-left:20px;"]),Tu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv7",componentId:"sc-4bcpok-23"})(["",""],r=>r.$_css6),ju=C(ys).withConfig({displayName:"MessagePreviewer___StyledPlayCircleFilled",componentId:"sc-4bcpok-24"})(["font-size:50px;color:var(--neutral-7);"]),Iu=C(Jt).withConfig({displayName:"MessagePreviewer___StyledCard5",componentId:"sc-4bcpok-25"})(["",""],Fi),ku=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv8",componentId:"sc-4bcpok-26"})(["min-width:355px;border-radius:4px;flex:0;overflow:hidden;"]),Pu=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv9",componentId:"sc-4bcpok-27"})(["background-color:var(--neutral-8);border-radius:4px 4px 0px 0px;padding:9px 15px;"]),Fu=C(de.Text).withConfig({displayName:"MessagePreviewer___StyledTypographyText",componentId:"sc-4bcpok-28"})(["color:white;"]),Du=C("div").withConfig({displayName:"MessagePreviewer___StyledDiv0",componentId:"sc-4bcpok-29"})(["padding:10px 0 10px 5px;height:600px;max-height:600px;overflow-y:auto;background-color:#91aad5;"]);function Mu({onChange:r,value:e,textRef:n,...a}){const i=I.useRef(!1),[o,s]=I.useState("");I.useEffect(()=>{s(e)},[e]);const l=d=>{if(s(d.target.value),d.type==="compositionstart"){i.current=!0;return}d.type==="compositionend"&&(i.current=!1),i.current||r(d)};return t.jsx(Q.TextArea,{...a,ref:n,value:o,onChange:l,onCompositionEnd:l,onCompositionStart:l})}const Lu=r=>{var at,Dt,Mt,Lt,Et,$t,Ot,Rt,zt,At,Nt;const{t:e}=V(),{channelLang:n}=rn(),{bubbles:a,previewText:i}=r,o=(Mt=(Dt=(at=r==null?void 0:r.template)==null?void 0:at.toJS)==null?void 0:Dt.call(at))!=null?Mt:{},{delegators:s,modulePermissionSet:l,userInfo:d,userPermissionSet:c}=fe(),{setFormStatus:p}=nn(),{bubbleForms:g,carouselProductFeedConfigs:v,setCarouselProductFeedConfigs:f}=Qt(),[h,y]=I.useState(!1),[w,x]=I.useState(null),m=(Lt=w!=null?w:o==null?void 0:o.sensitive_info)!=null?Lt:[],_=fi(r.I18N)||{},{rapm:u,derived:{hasActivateEligibility:T,hasEditEligibility:F,isTemplateCanClone:P,isTemplateCanEdit:k},actions:L}=Uo({template:o,resourceType:"line_template"}),{own:R}=u,E=Zo({channel:"line",delegators:s,modulePermissionSet:l,rapm:u,template:o,userInfo:d,userPermissionSet:c}),Z=I.useRef(null),U=$a(a),ce=(U==null?void 0:U.type)==="text"||(U==null?void 0:U.type)==="surveyCake"&&(U==null?void 0:U.questionnaireType)==="text",ye=($t=(Et=o==null?void 0:o.template)==null?void 0:Et.carouselProductFeed)==null?void 0:$t.version,Ie=(B="")=>B.split("{{").filter((yt,st)=>st===0||yt.includes("}}")).join("{{"),le=Ie(Er(ce?U.text:i,128)),ge=l.has("EditorMergeTagModule"),ke=l.has("SQLFunction")&&l.has("SQLFunctionMergeTagModule"),Ee=l==null?void 0:l.has("EditorOneClickSend"),O=o==null?void 0:o.is_active,{sqlCustomDataFeedModelGroups:W}=Ho(),{data:ee=[]}=ar({params:{data_source:"Template",page_size:-1,page:1}}),te=Vo({hasMergeTagPermission:ge,hasCustomFieldPermission:l.has("CustomFields"),allCustomFields:ee,includeVoucherTags:!0,giftVoucherMergeTags:(Rt=(Ot=o==null?void 0:o.template)==null?void 0:Ot.giftVoucherMergeTags)!=null?Rt:{},orderInfoMergeTags:(At=(zt=o==null?void 0:o.template)==null?void 0:zt.orderInfoMergeTags)!=null?At:{}});I.useEffect(()=>{r.organization||M("getOrganization")},[]),I.useEffect(()=>{r.id&&M("line/getLineTempConfig",{id:r.id})},[r.id]),I.useEffect(()=>{p({disabled:!k})},[k,p]),I.useEffect(()=>{f(B=>({...B,version:ye}))},[f,ye]);const ae=async()=>{try{if(await Promise.all(Object.values(g).map(ne=>(ne.submit(),ne.validateFields()))),!ce&&!i)throw"".concat(e("msgRequiredFieldsAreMissing"),"ï¼").concat(e("previewText"));const B=fi(r.organization)||{};return Rc({bubbles:a,org:B,hasMergeTagPermission:ge,productCustomFields:ee.filter(ne=>ne.data_category==="product"),t:e}),Promise.resolve(!0)}catch(B){return(B==null?void 0:B.errorFields)?he.error(e("setting.pleaseCheckContentError")):he.error(B),Promise.resolve(!1)}},Y=(B,ne,Pe=null,yt={})=>async()=>{var xe,Oe,qe;const st=B?L.activate:L.edit,Bt=Pe!=null?Pe:await st.resolveActor();if(!Bt||B&&!await ae())return!1;const{id:vt}=o,ni=a.map(re=>
3{const{type:q,text:pe,url:_e,imgLink:Re,urilabel:Fe,areaLinkMap:ze,imgmapType:De,lineMessage:lt,actions:Me}=re;if(q==="text")return Array.isArray(Me)&&Me.length>0?Vn(le,pe,Me,l):Hn(q,pe);if(q==="image")return Ec(q,_e,Re,ze,De,lt);if(q==="video")return $c(q,_e,Re,Fe);if(q==="carousel"){const He=g[re.id].getFieldsValue();return zc({t:e,bubble:re,modulePermissionSet:l,productCustomFields:ee.filter(Ae=>Ae.data_category==="product"),values:He,version:v.version,channelLang:n})}if(q==="surveyCake")return Oc(re,le)}),oi=a.map(re=>{const{type:q,text:pe,url:_e,imgLink:Re,content:Fe,urilabel:ze,imgmapType:De="custom",areaLinkMap:lt,actions:Me}=re;if(q==="text")return Array.isArray(Me)&&Me.length>0?{type:"hyperlink_text",text:pe,actions:Me}:{type:q,text:pe};if(q==="image")return De==="custom"?{type:q,url:_e,imgLink:Re,imgmapType:De,content:[{isProductFeed:!1}]}:{type:q,url:_e,imgLink:Re,imgmapType:De,areaLinkMap:lt,content:[{isProductFeed:!1}]};if(q==="video")return{type:q,url:_e,imgLink:Re,urilabel:ze};if(q==="surveyCake"){const{questionnaireType:He,questionnaireInfo:Ae,imgUrl:dt,descText:Ve,mainText:_t,subText:ct,uri:b,titleSize:ut}=re;return{type:q,questionnaireType:He,questionnaireInfo:Ae,imgUrl:dt,descText:Ve,mainText:_t,subText:ct,uri:b,actions:Me,text:pe,titleSize:ut}}if(q==="carousel"){const{isProductFeed:He,carouselType:Ae="image_card",id:dt}=re,Ve=g[dt].getFieldsValue();if(He){const{isProductFeed:_t,redirect_target:ct,productFeedType:b,productFeedUriText:ut,numOfProductFeed:pt,headers:ui,lookBackDays:X,tag:se,utm_campaign:Se,utm_medium:Le,utm_source:Ue,custom_tracking_params:we,price_type:me,site:ue,timeType:Ce,relativeTimeType:mt,starting_time:wt,ending_time:We,only_relative_starting_time:pi,only_relative_ending_time:Wn,relative_starting_time:Gn,relative_ending_time:Yn,product_attribute_key:Xn,product_attribute_value:Kn,excluded_product_range:Di,excluded_tags:Jn,excluded_custom_fields:mi,limit_product_range:gi,included_tags:Zn,included_categories:Qn,included_custom_fields:hi,inventory:Ut,productGranularity:eo,distinctRootProduct:to,product_custom_field:yr}=re,{priceFluctuation:io={}}=Ve,ro=Yi(io);return{type:q,carouselType:Ae,isProductFeed:_t,redirect_target:ct,productFeedType:b,productFeedUriText:ut,numOfProductFeed:pt,headers:ui,timeType:Ce,relativeTimeType:mt,starting_time:wt,ending_time:We,only_relative_starting_time:pi,only_relative_ending_time:Wn,relative_starting_time:Gn,relative_ending_time:Yn,lookBackDays:X,tag:se,utm_campaign:Se,utm_medium:Le===""?null:Le,utm_source:Ue===""?null:Ue,custom_tracking_params:we===""?null:we,price_type:me,content:[{imgUrl:"",mainText:"",uri:"",subText:""}],site:ue,product_attribute_key:Xn,product_attribute_value:Kn,excluded_product_range:Di,excluded_tags:Di==="excluded_tags"?Jn:[],limit_product_range:gi,included_tags:b!=="tag"&&gi==="included_tags"?Zn:[],included_categories:b!=="category"&&gi==="included_categories"?Qn:[],...b!=="custom_field"&&b!=="attribute"&&gi==="included_custom_fields"&&(hi==null?void 0:hi.product_custom_field)&&{included_custom_fields:Ct({productCustomFields:ee.filter(Ge=>Ge.data_category==="product"),product_custom_field:hi.product_custom_field})},...Di==="excluded_custom_fields"&&(mi==null?void 0:mi.length)>0&&{excluded_custom_fields:mi.filter(Ge=>Ge.product_custom_field).map(Ge=>Ct({productCustomFields:ee.filter(no=>no.data_category==="product"),product_custom_field:Ge==null?void 0:Ge.product_custom_field}))},...(b==="personalized_inventory"||b==="all_products_inventory")&&{inventory:{...Ut,dateCondition:Ut!=null&&Ut.dateCondition?Gi(Ut.dateCondition):null}},productGranularity:eo,distinctRootProduct:to,...b==="custom_field"&&yr&&{product_custom_field:Ct({productCustomFields:ee.filter(Ge=>Ge.data_category==="product"),product_custom_field:yr})},priceFluctuation:ro,...ur(Ve,Object.keys(Fo))}}else return{type:q,carouselType:Ae,isProductFeed:He,imageRatio:Ve.imageRatio,aspectMode:Ve.aspectMode,content:Fe}}}),xt=re=>{var q,pe,_e;return(_e=(pe=yt[re])!=null?pe:(q=o.template)==null?void 0:q[re])!=null?_e:{}},ai=xt("giftVoucherMergeTags"),si=xt("orderInfoMergeTags"),li=xt("sqlCustomDataFeedMergeTags"),di=(xe=o.template)==null?void 0:xe.carouselProductFeed,ci=gn([(qe=(Oe=o.template)==null?void 0:Oe.surveyCakeMergeTags)!=null?qe:{},...a.filter(({type:re})=>re==="surveyCake").map(re=>({[re.questionnaireInfo.title]:{questionnaire_url:re.questionnaireInfo.value}}))]),qt=st.applyDelegationPayload(k?{template:{line_message:ni,message_configuration:oi,preview_text:le,...ge&&{giftVoucherMergeTags:ai,orderInfoMergeTags:si},...ke&&{sqlCustomDataFeedMergeTags:li},surveyCakeMergeTags:ci,carouselProductFeed:di},title_template:r.templateTitle,name:r.templateName,...B===!0&&{is_active:!0},preview_text:le}:{...B===!0&&{is_active:!0}},Bt),Ht=()=>{M("line/getLineTempConfig",{id:vt}),he.success(e("msgUpdateSuccessfully")),ne==null||ne()},ie=async re=>{y(!0);try{const{data:q}=await or.patch("/ma_cms/template/".concat(vt,"/"),re);
3if(Do(q)){x(q.sensitive_info),Mo.confirm({width:520,icon:t.jsx(Ao,{}),title:e("editor.all.piiDetection.title"),content:t.jsx(Lo,{results:q.sensitive_info}),okText:e("all.confirmEnable"),cancelText:e("cancel"),onOk:()=>ie({...re,personal_data_confirmed:!0})});return}M({template:q}),x(null),Ht()}finally{y(!1)}};if(B===!0){ie(qt);return}y(!0);const Vt=await ta({id:vt,query:qt,callback:()=>{x(null),Ht()}});return y(!1),Vt},$=(B,ne)=>Y(!1,ne,null,B)(),ve=B=>{M("line/addBubble",{name:B,carouselProductFeedVersion:ye,isFubon:l.has("Fubon")})},nt=B=>{M("line/writePreviewText",{text:Ie(Er(B.target.value||"",128))})},ot=B=>{const ne=Z==null?void 0:Z.current.resizableTextArea.textArea.selectionStart;if(B){const Pe=i.substring(0,ne).concat(B.native,i.substring(ne));M("line/writePreviewText",{text:Pe})}};Ur=ko(Ur,Eu);const $e=r.id,{is_multi_channel:ei,is_multi_site:ti}=fi(r.organization)||{},ii=[{label:e("addImage"),name:"image",icon:t.jsx(dr,{}),isShow:!0},{label:e("addText"),name:"text",icon:t.jsx(Yt,{component:Pn}),isShow:!0},{label:e("addVideo"),name:"video",icon:t.jsx(bn,{}),isShow:!0},{label:e("addCarousel"),name:"carousel",icon:t.jsx(Yt,{component:kn}),isShow:!0},{label:e("editor.line.add.questionnaire"),name:"surveyCake",icon:t.jsx(Yt,{component:hr}),isShow:l.has("SurveyCake Questionnaire System")}],ri=[{label:e("edit"),key:"edit",isShow:!0,children:t.jsxs(be,{disabled:!k,children:[t.jsx(S.Item,{labelCol:{span:24},required:!0,label:t.jsxs(H,{children:[t.jsx(Gt,{style:Xe.icon,src:window.__getStaticUrl__("images/ic-line2.svg")}),t.jsx("span",{style:Xe.msgHeader,children:e("lineMsgDia")}),t.jsxs("span",{style:Xe.text,children:["( ",e("added")," ",a.length,"/5 )"]})]}),children:t.jsx(H,{children:ii.filter(({isShow:B})=>B).map(({label:B,name:ne,icon:Pe})=>t.jsx($u,{"data-test-id":"add-".concat(ne),icon:Pe,onClick:()=>ve(ne),children:B},ne))})}),t.jsx(be,{id:"line-form",style:Xe.form,children:a.length?t.jsxs(Ou,{align:"start",size:21,children:[t.jsx(H,{direction:"vertical",size:"middle",children:a.map((B,ne)=>t.jsx(kc,{I18N:_,bubble:B,idx:ne,bubbleArr:a,mergeTags:te,is_multi_site:ti},B.id))}),t.jsx(au,{bubbles:a})]}):t.jsxs(be,{style:Xe.editPlaceholder,children:[t.jsx(Gt,{style:Xe.icon,name:"image",src:window.__getStaticUrl__("images/img-line-edit-placeholder.svg")}),t.jsx("p",{children:e("addDialog")})]})}),a.length>0&&t.jsxs(S.Item,{required:!0,labelCol:{span:24},style:{marginTop:"32px"},label:t.jsxs(H,{children:[t.jsx(gs,{style:{fontSize:"20px"}}),t.jsx("span",{style:Xe.lineHeader,children:e("editor.line.previewTextInChat")})]}),children:[t.jsx(Sr,{title:ce?e("editor.line.autoFilledTextInfo"):"",children:t.jsx(Ru,{children:t.jsx(Mu,{autoSize:!0,name:"preview_text",value:(Nt=le==null?void 0:le.replaceAll)==null?void 0:Nt.call(le,"\n"," "),onChange:nt,placeholder:e("editor.line.previewTextInChat.info"),textRef:Z,disabled:ce,maxLength:128,showCount:!0,onKeyDown:B=>{B.key}})})}),t.jsx(sr,{label:e("emoji"),onEmojiSelect:ot,popoverProps:{placement:"bottomLeft"},buttonProps:{disabled:ce}})]})]})},{label:e("test"),key:"test",isShow:Qo({channel:"line",modulePermissionSet:l,testSendActors:E.actors,userPermissionSet:c,canEdit:F}),children:t.jsx(Ks,{isMultiChannel:ei,isTemplateCanEdit:k,testSendAction:E,save:Y})},{label:e("giftVoucherFeed"),key:"giftVoucherFeed",isShow:ge,children:t.jsx(Cr,{I18N:_,template:r.template,tagType:"giftVoucher",channel:"line",isTemplateCanEdit:k,isShowAddEditButton:k,isTemplateActive:O,saveTemplateWithMergeTags:$})},{label:e("orderProductFeed"),key:"orderProductFeed",isShow:ge,children:t.jsx(Cr,{I18N:_,template:r.template,tagType:"orderInfo",channel:"line",isTemplateCanEdit:k,isShowAddEditButton:k,isTemplateActive:O,saveTemplateWithMergeTags:$})},{label:e("editor.sqlCustomDataFeed"),key:"sqlCustomDataFeed",isShow:ke,children:t.jsx(be,{style:{minHeight:300},children:t.jsx(ea,{template:r.template,sqlCustomDataFeedModelGroups:W,isTemplateCanEdit:k,isShowAddEditButton:k,saveTemplateWithMergeTags:$})})}];return t.jsx(qo,{mergeTags:fi(r.template,["template","sqlCustomDataFeedMergeTags"]),children:t.jsx(be,{children:t.jsxs(Po,{titleComp:t.jsx(na,{channel:"line",template:o}),children:[t.jsx(be,{style:Xe.contBox,children:t.jsx(zu,{items:ri.filter(
3B=>B.isShow),tabBarExtraContent:{right:t.jsx(be,{style:Xe.btnGroup,children:t.jsxs(H,{children:[t.jsx(ia,{trigger:t.jsx(Sr,{title:e("editor.all.workflowHistory"),children:t.jsx(J,{icon:t.jsx(Oa,{rotate:180})})}),title:e("editor.all.workflowHistory.title"),children:t.jsx(Wo,{templateId:$e})}),P&&t.jsx(pa,{groupId:o==null?void 0:o.group_id,name:o==null?void 0:o.name,filterCanEdit:R.filterCanEdit,template:o,mediaType:"LINE",...k&&a.length>0&&{beforeOpen:()=>Y(!1)()}}),t.jsx(ga,{templateId:$e}),!O&&F&&t.jsx(J,{"data-test-id":"template-save-draft",disabled:h||O||a.length===0,type:"secondary",onClick:Y(!1),children:e("saveAsDraft")}),T&&t.jsxs(t.Fragment,{children:[O||t.jsx(J,{"data-test-id":"template-activate",disabled:h||O||a.length===0,type:"primary",onClick:Y(!0),children:e("finishAndActive")}),Ee&&t.jsx(Go,{templateId:$e,hadCreatedWorkflow:o==null?void 0:o.had_created_workflow,isActive:O})]}),O&&T?t.jsx(ma,{label:e("isActive"),isActive:O,templateId:$e,resolveDeactivatePayload:()=>L.deactivate.resolveDelegationPayload({})}):null]})})},tabBarStyle:{margin:"unset"}})}),t.jsx(ra,{sensitiveInfo:m,defaultOpen:new URLSearchParams(window.location.search).get("pii_alert")==="1"})]})})})},Hh=r=>t.jsx(Js,{children:t.jsx(Bo,{children:t.jsx(No,{children:t.jsx(wr,{stores:[jo],initStates:["bubbles","previewText"],children:t.jsx(wr,{initStates:["I18N","template","lineBubble","organization"],children:t.jsx(Io,{initStates:["id"],children:t.jsx(Lu,{...r})})})})})})});let Ur;const Eu={popupModal:[{borderRadius:4,backgroundColor:"#f4f6f8"},".ui.active.modal>.content"],bodyBackGround:[{backgroundColor:"#f5f8fc"},"body"],subMenuBorder:[{borderBottom:"3px solid #0052CC !important"},".tab-view > .menu > .active"],headerBtn:[{backgroundColor:"rgb(227, 230, 233) !important"},".header-btn:hover"],addBtn:[{backgroundColor:"rgb(238, 238, 238) !important"},".add-msg-btn:hover"]},Xe={form:{background:"white",borderRadius:4,boxShadow:": 0 1px 3px 0 rgba(63, 63, 68, 0.15), 0 0 0 1px rgba(63, 63, 68, 0.05)"},btnGroup:{margin:"1rem 0",display:"flex",justifyContent:"flex-end"},text:{display:"inline",marginLeft:12,color:"#959595"},icon:{display:"inline",marginRight:4},lineHeader:{fontWeight:"normal",fontSize:16,color:"#555d66",overflow:"auto",lineHeight:"34px"},contBox:{maxWidth:1200,margin:"auto"},msgHeader:{fontWeight:"normal",fontSize:16,color:"#555d66",height:34,lineHeight:"34px",margin:"2rem 0 12px 0"},editPlaceholder:{textAlign:"center",padding:"4rem"}};var $u=C(J).withConfig({displayName:"LineTemplateEditor___StyledButton",componentId:"sc-1w5zvas-0"})(["&:hover{& > span > svg > path{fill:var(--primary-color);}}"]),Ou=C(H).withConfig({displayName:"LineTemplateEditor___StyledSpace",componentId:"sc-1w5zvas-1"})(["& > div:last-child{position:sticky;top:70px;}"]),Ru=C("div").withConfig({displayName:"LineTemplateEditor___StyledDiv",componentId:"sc-1w5zvas-2"})(["margin:8px 0 16px 0;"]),zu=C(nr).withConfig({displayName:"LineTemplateEditor___StyledTabs",componentId:"sc-1w5zvas-3"})([".ant-tabs-content-holder{background:white;padding:32px;}"]);export{Hh as default}; 4 5//# debugId=9a05142d-2b09-5965-9c9f-8a6ad2b52456
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.