1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"3.7.13"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3ab31392-c0cc-4754-8d84-def9bb755aeb",e._sentryDebugIdIdentifier="sentry-dbid-3ab31392-c0cc-4754-8d84-def9bb755aeb")}catch{}}(),(self.webpackChunk=self.webpackChunk||[]).push([[4731],{85839(e,t,i){let l={"./row-default.vue":63997,"./row-note.vue":77302,"./row-visualization.vue":27877};function n(e){return Promise.resolve().then(()=>{if(!i.o(l,e)){let t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i(l[e])})}n.keys=()=>Object.keys(l),n.id=85839,e.exports=n},73451(e,t,i){"use strict";i(18111),i(22489);var l=i(17094),n=i(88690);i.d(t,["A",0,{items:({query:e})=>l.w.commandsItemNote.filter(t=>t.title.toLowerCase().startsWith(e.toLowerCase())).slice(0,10),visible:!1,render:()=>(0,n.Ay)("item_note")}])},69699(e,t,i){"use strict";i.d(t,["_o",0,["jpg","jpeg","png","gif","svg","webp","heic","heif","ico","bmp","heic","heif"],"t1",0,["image/jpg","image/jpeg","image/png","image/gif","image/svg+xml","image/webp","image/heic","image/x-icon","image/bmp","image/heif"]])},68156(e,t,i){"use strict";i.d(t,{PI:()=>u,s2:()=>h}),i(44114),i(18111),i(22489),i(61701);var l=i(224),n=i(32644),o=i(16544),s=i(31571),a=i(97478),r=i(33868),d=i(82310),c=i(3679),m=i(94239),p=i(72311);function u(e,t){let i=t.target;if(!i.files||!r.M.listId)return;let u=[{name:"list_id",val:r.M.listId},{name:"type",val:e.type},{name:"file_type",val:"attachment"}],g=[];for(let e=0;e<i.files.length;e++){let t=i.files.item(e);t&&g.push(t)}i.value="",function e(t,i,u,g=!1){(0,o.xf)();let y=function(e){let t=[];for(let i=0;i<r.M.shopping_list.sections.length;i++)for(let l of r.M.shopping_list.sections[i].items)for(let i of Object.values(l?.attachments?.file_names||{}))e.includes(i)&&t.push(i);return t}(t.map(e=>e.name));if(!1===g&&y.length>0){let l,n,s;return(0,o.th)(),l=[{text:(0,a.T)("add_files_anyway_with_changed_names"),callback:()=>e(t,i,u,!0)}],(n=t.filter(e=>!y.includes(e.name))).length>0&&l.push({text:(0,a.T)("skip_duplicates"),callback:()=>{e(n,i,u)}}),l.push({text:(0,a.T)("cancel"),callback:()=>{}}),s=y.slice(0,5),void(0,p.Ni)({title:(0,a.T)("attachments_files_exists"),content:`<small>${s.join("<br>")}<br>${s.length<y.length?"...":""}</small>`,contentTitle:s.length<y.length?y.join(` 2`):"",links:l,duration:6e4})}let k=(0,l.pD)(t);if(null===k)return;if(!0!==k)return void alert((0,a.T)(k));let v=Routing.generate("upload_list_file");for(let e of(c.P.queueAttachmentsUpload(i.key,t.length),t))(0,n.Z2)(()=>(0,o.L5)(t=>!1===m.rS.hasItemQueuedAttachmentUpload(i.key)?Promise.resolve({file_reference:null}):((0,o.xf)(),(0,l.yr)(v,{blob:e,name:e.name,params:u}).catch(e=>{if(e?.status===403||e?.status===400)t(e);else throw e})),3).then(({file_reference:t})=>{!1===m.rS.hasItemQueuedAttachmentUpload(i.key)?c.P.clearAttachmentsUpload(i.key):(t&&function(e,t,i){let l={file_references:[...e?.attachments?.file_references||[],t],file_names:{...e?.attachments?.file_names||{},[t]:i}};e.attachments=l,d.uq.push("UPDATE_ITEM",e.key,{attachments:l})}(i,t,function(e){if(""===e||!h(e))return e;let t=e,i=1;for(;h(t);){let l=e.split(".").pop()||"",n=e.replace("."+l,"");t=`${n} (${i}).${l}`,i++}return t}(e.name)),c.P.completeAttachmentUpload(i.key))}).catch(()=>{throw c.P.completeAttachmentUpload(i.key),(0,p.Ni)({title:"toast.failed_uploading_file"}),"upload_failed"}),"default",!1),(0,n.qg)();(0,s._)("add_attachments")}(g,e,u)}function h(e){for(let t=0;t<r.M.shopping_list.sections.length;t++)for(let i of r.M.shopping_list.sections[t].items)if(Object.values(i?.attachments?.file_names||{}).includes(e))return!0;return!1}},87199(e,t,i){"use strict";i.d(t,{j:()=>function e(t,i,l){if(0===i)return 0;let n=e(t,i-1,l),o=t[i-1];return t[i].is_option||!l.includes(o.type)?n:n+1},u:()=>function e(t,i,l){if(0===i)return 0;let n=t[i-1];return n.is_option&&l.includes(n.type)?e(t,i-1,l)+1:0}})},63997(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>iU});var l=i(41425);let n=["id"],o={class:"list-section-row flex-wrap flex-md-nowrap item-row sortable position-relative top-field-edit"},s={key:0},a={class:"d-flex flex-column flex-sm-row py-sm-0 flex-md-column py-md-1 align-items-sm-baseline justify-content-md-between",style:{"min-width":"32px"}},r={class:"text-sm-start text-md-center w-100 text-lp me-sm-2 me-md-0 pb-1"},d={key:0},c={key:1},m={class:"d-flex flex-column flex-sm-row py-sm-0 flex-md-column align-items-sm-start py-md-1"},p={key:0,class:"text-sm-start text-md-center w-100 text-lp mb-md-2 mb-sm-0 mt-md-1 mt-sm-0"},u={key:2,class:"text-center w-100 me-sm-2 me-md-0 pb-12"},h=["title"],g={key:3,class:"d-flex text-center w-100 me-sm-2 me-md-0"},y=["title"],k={key:4,class:"opacity-coarse-el d-flex flex-column flex-sm-row py-sm-0 flex-md-column align-items-sm-baseline justify-content-md-between clickable pb-12 align-self-md-center align-self-sm-start"},v={class:"text-center w-100 me-lg-0 d-flex"},f=["title"],x=["title"],w=["title"],E={class:"list-section-row-title order-0 d-flex flex-column col col-md-auto align-items-baseline"},b=["title"],N=["title"],C=["title"],B={class:"offer-input p-0 w-100 focused"},V={key:0,class:"text-muted"},_={class:"ws-pre me-2"},I={key:0,class:"red-badge"},S={key:1,class:"fa fa-pencil text-regular text-muted position-absolute-edit-icon-offset edit-icon none-xs float-end"},M=["placeholder","value","title"],F={type:"hidden"},P={class:"order-2 flex-fill flex-basis-100 flex-md-column d-flex"},T=["title"],z=["title"],D=["title"],O={class:"offer-input p-0 w-100 focused"},$={key:0,class:"text-muted"},A={class:"ws-pre me-2"},K={key:0,class:"red-badge"},L={key:1,class:"fa fa-pencil text-regular text-muted position-absolute-edit-icon-offset edit-icon none-xs float-end"},U=["placeholder","value","title"],j={type:"hidden"},H={class:"flex-wrap d-flex flex-fill flex-column flex-md-row"}
2,R={class:"list-section-row-details pe-0 pe-sm-3 pt-md-0 d-flex flex-row flex-sm-column col"},X=["title"],q=["title"],Q=["title"],Z={class:"offer-input p-0 w-100 focused"},Y={key:0,class:"text-muted"},W={class:"ws-pre me-2"},G={key:0,class:"red-badge"},J={key:1,class:"fa fa-pencil position-absolute-edit-icon-offset text-regular text-muted edit-icon none-xs float-end"},ee=["placeholder","value","title"],et={type:"hidden"},ei={class:"list-section-row-details-visible"},el=["disabled"],en=["title","href"],eo=["title","href"],es={class:"element"},ea={class:"truncate"},er={key:0,class:"nowrap"},ed=["maxlength","value","placeholder"],ec=["title"],em={class:"p-0 text-muted item-label"},ep={key:0,class:"position-absolute price-label price-label-absolute"},eu={class:"element"},eh={class:"truncate position-relative pe-3"},eg=["title"],ey={key:1,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},ek=["title"],ev=["maxlength","value","title"],ef={type:"hidden"},ex=["title"],ew=["title"],eE={class:"element"},eb={class:"truncate position-relative pe-3"},eN={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},eC={key:1,class:"col p-0 position-relative align-self-end"},eB=["title"],eV={class:"p-0 item-label"},e_={class:"element"},eI={class:"truncate position-relative pe-3"},eS={class:"truncate position-relative"},eM={key:0,class:"text-12-darker"},eF={key:1,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},eP=["maxlength","value","title"],eT={type:"hidden"},ez={class:"flex-column mt-12"},eD={class:"d-flex align-items-center field-edit"},eO={key:0,class:"disabled d-flex align-items-center text-ellipsis cursor-default"},e$={class:"item-value text-12-darker my-2p w-100 ml-6 element"},eA={class:"truncate"},eK=["href","title"],eL={key:2,class:"ml-6 w-100 my-2p d-flex"},eU=["onFocus","title","onClick"],ej={class:"truncate"},eH=["value","onChange"],eR=["onClick","title"],eX={key:2,class:"col-12 p-0 d-none d-sm-flex flex-column flex-grow-1",style:{"z-index":"101"}},eq={key:0,class:"flex-grow-1"},eQ={class:"position-relative"},eZ={key:0,class:"p-0 w-100 ws-pre",style:{color:"#aaa"}},eY={key:2,class:"fa fa-pencil text-muted edit-icon none-xs float-end"},eW={type:"hidden"},eG={class:"flex-column"},eJ={class:"d-flex align-items-center field-edit"},e0={key:0,class:"disabled d-flex align-items-center text-ellipsis cursor-default"},e1={class:"item-value text-12-darker my-2p w-100 ml-6 element"},e2={class:"truncate"},e4=["href","title"],e3={key:2,class:"ml-6 w-100"},e6=["onFocus","title","onClick"],e9={class:"truncate"},e8=["value","onChange"],e5={key:0},e7={key:1},te={class:"list-section-row-actions"},tt=["title"],ti=["title"],tl=["title"],tn=["title"],to={key:0,width:"30",height:"30",viewBox:"0 0 22 21","aria-hidden":"true"},ts={key:1,width:"30",height:"30",viewBox:"0 0 22 21","aria-hidden":"true"},ta={key:2,class:"position-absolute unread-count"},tr={key:3,class:"position-absolute unread-count"},td={key:2},tc={class:"list-section-row-details-properties p-0 d-flex flex-wrap mw-lg-500 flex-fill align-items-baseline col-12 item-properties"},tm={key:0,class:"col-12 p-0 d-sm-none d-block"},tp={key:0,class:"w-fit text-muted ws-pre notes-toggler text-12-muted px-12 py-3p d-flex cursor-pointer"},tu={key:2,class:"fa fa-pencil text-muted edit-icon none-xs float-end"},th={type:"hidden"},tg={class:"col-12 col-sm-6 col-lg-6 col-xl-7 p-0 pt-xl-0 properties-column pe-0 pe-sm-3"},ty=["title"],tk=["innerHTML"],tv={key:0,class:"col p-0 item-value"},tf={class:"element"},tx={class:"truncate position-relative pe-3"},tw={key:0,class:"text-muted"},tE={key:1,class:"fa fa-pencil text-muted position-absolute-edit-icon edit-icon none-xs float-end lh-20"},tb=["value","maxlength","title"],tN=["title"],tC={class:"p-0 text-muted item-label"},tB={key:0,class:"col p-0 item-value"},tV={class:"element"},t_={class:"truncate position-relative pe-3"},tI={key:0,class:"text-muted"},tS={key:1,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},tM=["value","maxlength"],tF=["title"],tP={class:"truncate"},tT={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},tz=["title"],tD={class:"p-0 text-muted item-label"},tO={key:0,class:"col p-0 item-value"}
2,t$={class:"element"},tA={class:"truncate position-relative pe-3"},tK={key:0,class:"text-muted"},tL={key:1,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},tU=["value","maxlength"],tj={class:"col-12 col-sm-6 col-lg-6 col-xl-5 p-0 pt-xl-0 properties-column"},tH=["title"],tR=["title"],tX={class:"element"},tq={class:"truncate position-relative pe-3"},tQ={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},tZ={key:1,class:"col p-0 position-relative align-self-end"},tY=["title"],tW={class:"p-0 text-muted item-label"},tG={key:0,class:"position-absolute price-label price-label-absolute"},tJ={class:"element"},t0={class:"truncate position-relative pe-3"},t1=["title"],t2={key:1,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},t4=["title"],t3=["maxlength","value","title"],t6={type:"hidden"},t9=["title"],t8={class:"p-0 item-label"},t5={class:"element"},t7={class:"truncate position-relative pe-3"},ie={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},it=["maxlength","value","title"],ii={type:"hidden"},il={class:"col p-0 item-value text-green-bold"},io={class:"element"},is={class:"truncate position-relative pe-3"},ia={key:1,class:"order-1 order-md-3 dropdown d-flex flex-column ms-3"},ir=["title"],id=["id","disabled"],ic={class:"w-100 d-flex"},im={ref:"dropTarget"};i(18111),i(20116),i(44114);var ip=i(43049),iu=i(31173),ih=i(59931),ig=i(6947),iy=i(13582),ik=i(44347),iv=i(27039),ix=i(17924),iw=i(16544),iE=i(4221),ib=i(14961),iN=i(84661),iC=i(97478),iB=i(67369),iV=i(39941),i_=i(57208),iI=i(42162),iS=i(248),iM=i(68156),iF=i(3679),iP=i(94239),iT=i(87199),iz=i(46167),iD=i(33868),iO=i(13087),i$=i(54367),iA=i(74727);let iK=(0,ik.D7)(),iL={name:"ItemRow",mixins:[ix.C,ih.co],components:{LinkPreviewContent:iy.A,CommentWithFilesInput:iI.A,FormCheckbox:ig.A,QuickAdd:iA.A,ItemImage:i$.A,NumberInput:ip.A},directives:{Validate:iE.b,FocusOnCreate:iv.J,FocusOnMounted:iv.m},props:{itemTier:Number,disabled:Boolean,sectionIndex:Number,itemIndex:Number,item:Object,isLast:Boolean,noteMaxHeight:{type:Number,default:450},isDragging:Boolean},data(){return{startMeasure:this.item.measure,inputMaxlength:500,urlMaxLength:2e3,inputShortMaxlength:250,notesInputLimit:5e3,editedField:null,mediaSizes:iS.$.sizes,showMultiEdit:iD.M.showMultiEdit,discountsEnabled:iD.M.discountsEnabled,attachmentsEnabled:iD.M.attachmentsEnabled,catalogEnabled:iD.M.catalogEnabled,unitPrice:this.item.unit_price,fullPrice:this.item.price}},computed:{isPremium:()=>iD.M.isPremium,isInTeam:()=>iD.M.isInTeam,groupBy:()=>iD.M.groupBy,catalogSupplierActive(){if(!this.item.supplier_product_uid)return!1;let e=this.item?.supplier_product_uid?.split("|")?.[0];return iD.M.activeCatalogDomains.includes(Number(e))},deactivated(){return iD.M.errorKey&&iD.M.errorKey!==this.item.key},updatedPrice(){return iD.M.newPrices.find(e=>e.key===this.item.key)||null},priceToBeUpdated(){return this.updatedPrice&&this.updatedPrice.has_changed},showPriceUpToDate(){return this.updatedPrice&&!this.updatedPrice.has_changed},isProductUnavailable(){return this.updatedPrice&&!1===this.updatedPrice.available},isSelected(){return(0,iB.isItemSelected)(this.item)},editManyEnabled:()=>iD.M.editManyEnabled,section(){return iP.rS.getRenderedSection(this.sectionIndex)},virtualItemIndex(){return(0,iT.j)(this.section.items,this.itemIndex,iD.M.indexableItemTypes)},relativeItemIndex(){return(0,iT.u)(this.section.items,this.itemIndex,iD.M.indexableItemTypes)},unreadCommentsCount(){let e=0;return e=iD.M.unreadComments[this.item.key]?iD.M.unreadComments[this.item.key]?.unread_comments.length:0,iD.M.unreadLiveProposalComments[this.item.key]&&(e+=iD.M.unreadLiveProposalComments[this.item.key]?.unread_comments.length),iD.M.teamUnreadCountMap[this.item.key]&&(e+=iD.M.teamUnreadCountMap[this.item.key]),e},totalCommentsCount(){return iD.M.totalCommentsCount[this.item.key]&&iD.M.totalCommentsCount[this.item.key]||0},itemAcceptedInProposal(){return iD.M.proposalOpinions[this.item.key]&&"accepted"===iD.M.proposalOpinions[this.item.key]},itemRejectedInProposal(){return iD.M.proposalOpinions[this.item.key]&&"rejected"===iD.M.proposalOpinions[this.item.key]},itemInPendingProposal(){return(iD.M.proposalOpinions.hasOwnProperty(this.item.key)||i
2D.M.isLiveProposalEnabled)&&!iD.M.proposalOpinions[this.item.key]},readOnly:()=>iD.M.readOnlyMode,listId:()=>iD.M.listId,extraItemTourKey:()=>iD.M.extraItemTourKey,editedItemPropertiesKey:()=>iD.M.editedItemPropertiesKey,fieldsErrors:()=>iD.M.fieldsErrors,itemStatuses:()=>iD.M.item_statuses,status(){return this.itemStatuses.find(e=>e.id===this.item.status)},selectedCategory(){return iP.rS.getCategoryById(this.item.category)},selectedCategoryName(){return null===this.selectedCategory?"-":this.selectedCategory.name},selectedCategoryMeasure(){return null===this.selectedCategory?(0,iC.T)("default_measure"):(0,iC.T)(this.selectedCategory.attributes.measure||"default_measure")},selectedStatusName(){return this.status?this.status.name:""},selectedStatusColor(){return this.status&&this.status.attributes.color?this.status.attributes.color:"#808080"},isFocusedInput(){return iD.M.focusedItem===this.item.key},itemUrl(){return(0,iN.h)(this.item)},priceFieldTitle(){let e=(0,i_.aX)(this.item),t=[`${(0,iC.T)("sum")}: ${(0,ib.vv)(this.item.price)}`];return e&&e>0&&t.push(`${(0,iC.T)("data_table.delivery_cost")}: +${(0,ib.vv)(e)}`),t.join(` 3`)},deliveryCost(){return(0,i_.aX)(this.item)}},watch:{"item.price"(e){this.fullPrice=e},"item.unit_price"(e){this.unitPrice=e}},methods:{formatNumber:iw.ZV,fileSrc:iw.lB,imgSrc:iw.cM,changeName(e,t){},recordMeasureUpdateEvent(){iK(1500).then(()=>{this.item.measure>this.startMeasure&&iF.P.recordListOperation("add",{...this.item,measure:this.item.measure-this.startMeasure},"list"),this.startMeasure=this.item.measure})},onInputMeasure(e){let t=(0,iO.m)(e);null!==t&&(iz.f.setMeasure(this.item,t),this.fullPrice=this.item.price,this.recordMeasureUpdateEvent())},onChangeMeasure(e){iz.f.setMeasure(this.item,e),this.fullPrice=this.item.price,this.recordMeasureUpdateEvent()},setUnitPriceLocalValue(e,t=!1){if(""===(e=String(e).replaceAll("e","")))return;let i=Number.parseFloat(e);isNaN(i)||(this.unitPrice=t?(0,iw.z7)(i):Number.parseFloat(i))},setFullPriceLocalValue(e,t=!1){if(""===(e=String(e).replaceAll("e","")))return;let i=Number.parseFloat(e);isNaN(i)||(this.fullPrice=t?(0,iw.z7)(i):Number.parseFloat(i))},setUnitPriceValue(e){let t=e.target.value;""===(t=String(t).replaceAll("e",""))&&(t=0),isNaN(Number.parseFloat(t))&&(t=0),this.setUnitPriceLocalValue(t,!0),iz.f.setUnitPrice(this.item,this.unitPrice),this.fullPrice=this.item.price},setFullPriceValue(e){let t=e.target.value;""===(t=String(t).replaceAll("e",""))&&(t=0),isNaN(Number.parseFloat(t))&&(t=0),this.setFullPriceLocalValue(t,!0),iz.f.setPrice(this.item,this.fullPrice),this.fullPrice=this.item.price,this.unitPrice=this.item.unit_price},fileNameWithoutExtension(e){let t=this.item?.attachments?.file_names?.[e],i=t.split(".").pop();return t.replace("."+i,"")},updateAttachmentName(e,t){t=t.trim();let i=(this.item?.attachments?.file_names?.[e]).split(".").pop(),l=`${t}.${i}`;""!==t&&(0,iM.s2)(l)?this.$toastError({title:(0,iC.T)("item_name_taken.already_used"),content:(0,iC.T)("item_name_taken.choose_different")}):iF.P.updateAttachmentName(this.item,t,e)},catalogProductUrl:e=>Routing.generate("catalog_index",{product_id:e}),setFiles(e){(0,iM.PI)(this.item,e)},resetItemFocus(){iD.M.focusedItem=null},updateSinglePrice(){this.updatedPrice&&(this.setUnitPriceLocalValue(this.updatedPrice.new_unit_price,!0),iz.f.setUnitPrice(this.item,this.unitPrice),this.fullPrice=this.item.price,iF.P.clearPriceUpdate(this.item.key))},showDropdown(e,t,i=null,l={}){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-dropdown",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target,...i?{item:i}:{},...l})},showBottomMenu(e,t,i=null){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-bottom-menu",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target,...i?{item:i}:{}})},onSelectToggle(e,t=null){(0,iB.handleSelectToggle)(this.item,e,t)},setEditedField(e){if(!this.readOnly){if(this.editedField=e,null===e){this.$refs.input&&iu.A.destroy(this.$refs.input);return}"price"===e?this.fullPrice=this.item.price:"unit_price"===e&&(this.unitPrice=this.item.unit_price),"collection"===e&&this.$nextTick(()=>this.$refs.input&&(0,iu.A)(this.$refs.input))}},toggleOpinion(){!this.readOnly&&(this.itemAcceptedInProposal?this.opinionate(this.item,"rejected"):this.itemRejectedInProposal?this.opinionate(this.item):this.itemInPendingProposal&&this.opinionate(this.item,"accepted"))},toggleHidden(){this.readOnly||(iP.rS.isListTourActive()&&iD.M.listTour.next(),iz.f.toggleHidden(this.item))},opinionate(e,t){iF.P.opinionate(e.key,t).catch(()=>this.$toastError({title:"toast.error"}))},hideEditedProperties(){iD.M.editedItemPropertiesKey=null},setEditedPropertiesKey(){iD.M.editedItemPropertiesKey=this.item.key},setCollectionAndClearError(e,t,i){delete this.fieldsErrors[`sections[${i}].items[${t}].collection`],this.setCollection(e)},setNotesAndClearError(e,t,i){delete this.fieldsErrors[`sections[${i}].items[${t}].notes`],this.setNotes(e)},away(){"notes"===this.editedField&&this.$refs?.noteEditor?.hasActiveOverlays()||(this.editedField=null)},setImage(e){iF.P.setImage(this.item,e)},removeItem(){if(this.isSelected&&this.editManyEnabled){(0,iV.q3)(),(0,iB.deselectAll)();return}(0,iB.deselectItem)(this.item),(0,iV.k_)(this.item),iF.P.clearAttachmentsUpload(this.item.key)},addNewItem(e){this.groupBy?this.$emit("show-dropdown",{reference:e,item:this.item,type:"sections",context:{item_type:iD.M.DEFAULT_ITEM_TYPE},sectionIndex:this.sectionIndex,itemIndex:this.itemIndex+1}):iF.P.addNewItemBelow(this.sectionIndex,this.item)},translate:iC.T,formatToCurrency:e=>(0,ib.vv)(e,iD.M.currency),calculateDiscountedPrice:iw.w_,getValidUrl:iw.Cq,onNoteEditorEscape(){},highlightActiveItem(){let e=(0,iw.F8)("item")??(0,iw.F8)("opinionItem");if(e&&this.item.key===e){let t=document.querySelector(`#item-${e}`);if(!t)return;t.scrollIntoView({block:"center",inline:"center"}),t.classList.add("kis-highlight-inbox")}this.$nextTick(()=>{(0,iw.l0)(["item","opinionItem"])})}},mounted(){this.isFocusedInput&&this.setEditedField("collection"),this.highlightActiveItem()}},iU=(0,i(66262).A)(iL,[["render",function(e,t,i,ip,iu,ih){let ig=(0,l.resolve
3Component)("form-checkbox"),iy=(0,l.resolveComponent)("item-image"),ik=(0,l.resolveComponent)("number-input"),iv=(0,l.resolveComponent)("link-preview-content"),ix=(0,l.resolveComponent)("comment-with-files-input"),iw=(0,l.resolveComponent)("quick-add"),iE=(0,l.resolveDirective)("focus-on-create"),ib=(0,l.resolveDirective)("validate"),iN=(0,l.resolveDirective)("click-away");return(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["position-relative opacity-coarse",{"box-shadow-edit-many":ih.editManyEnabled&&ih.isSelected,deactivated:ih.deactivated,"box-shadow-selected":ih.isSelected}]),style:{"scroll-margin":"40px"},id:`item-${i.item.key}`},[(0,l.createElementVNode)("div",o,[i.item.is_option?((0,l.openBlock)(),(0,l.createElementBlock)("div",s,[(0,l.createElementVNode)("div",a,[(0,l.createElementVNode)("div",r,[i.item.is_option?((0,l.openBlock)(),(0,l.createElementBlock)("span",d,(0,l.toDisplayString)(ih.virtualItemIndex+1)+"."+(0,l.toDisplayString)(ih.relativeItemIndex+1),1)):((0,l.openBlock)(),(0,l.createElementBlock)("span",c,(0,l.toDisplayString)(ih.virtualItemIndex+1),1))])])])):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("div",m,[i.item.is_option?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",p,(0,l.toDisplayString)(ih.virtualItemIndex+1),1)),!iu.showMultiEdit||ih.readOnly||iu.mediaSizes.isXs||iu.mediaSizes.isSm?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["d-none d-md-flex p-0 w-100 justify-content-center align-items-center pb-12",{"opacity-coarse-el":!ih.isSelected}])},[(0,l.createVNode)(ig,{"model-value":ih.isSelected,onChange:ih.onSelectToggle,class:"p-svg font-18",style:{"margin-right":"0 !important","max-width":"20px"}},{extra:(0,l.withCtx)(()=>[...t[119]||(t[119]=[(0,l.createElementVNode)("svg",{width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg svg-icon border-gray bg-white"},[(0,l.createElementVNode)("path",{"data-v-21951d93":"",d:"M5.00301 8.99989L0.76001 4.75689L2.17401 3.34289L5.00301 6.17189L10.659 0.514893L12.074 1.92889L5.00301 8.99989Z",fill:"#2D9CDB"})],-1)])]),"off-extra":(0,l.withCtx)(()=>[...t[120]||(t[120]=[(0,l.createElementVNode)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l.createElementVNode)("rect",{x:"0.5",y:"0.5",width:"19",height:"19",stroke:"#BDC3C7"})],-1)])]),_:1},8,["model-value","onChange"])],2)),!i.item.is_option||iu.mediaSizes.isSm||iu.mediaSizes.isXs?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",u,[((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)({clickable:!ih.readOnly}),title:ih.translate("deselect_option"),onClick:t[0]||(t[0]=(...t)=>e.toggleOption&&e.toggleOption(...t)),width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[...t[121]||(t[121]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-option-gray"},null,-1)])],10,h))])),i.item.is_option&&iu.mediaSizes.isSm&&!iu.mediaSizes.isXs?((0,l.openBlock)(),(0,l.createElementBlock)("div",g,[((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)({clickable:!ih.readOnly}),title:ih.translate("deselect_option"),onClick:t[1]||(t[1]=(...t)=>e.toggleOption&&e.toggleOption(...t)),width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[...t[122]||(t[122]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-option-gray"},null,-1)])],10,y))])):iu.mediaSizes.isXs||ih.readOnly||i.item.is_option?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",k,[(0,l.createElementVNode)("div",v,[((0,l.openBlock)(),(0,l.createElementBlock)("svg",{width:"20",height:"20",title:ih.translate("item_is_option"),onClick:t[2]||(t[2]=(...t)=>e.toggleOption&&e.toggleOption(...t)),viewBox:"0 0 20 21","aria-hidden":"true"},[...t[123]||(t[123]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-option-off"},null,-1)])],8,f))])])),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:5,class:(0,l.normalizeClass)(["d-md-flex justify-content-center align-items-center mx-auto clickable d-none eye-toggler",{tour_item_hidden:ih.extraItemTourKey===i.item.key}]),onClick:t[3]||(t[3]=(0,l.withModifiers)((...e)=>ih.toggleHidden&&ih.toggleHidden(...e),["prevent"]))},[i.item.is_hidden?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,style:{"margin-top":"2px"},title:ih.translate("remove_hidden_short"),width:"22",height:"19",viewBox:"0 0 22 19","aria-hidden":"true"},[...t[124]||(t[124]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye-off-alt"},null,-1)])],8,x)):((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,class:"opacity-coarse-el",title:ih.translate("set_as_hidden"),width:"22",height:"12",viewBox:"0 0 22 12","aria-hidden":"true"},[...t[125]||(t[125]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye"},null,-1)])],8,w))],2))]),(0,l.createElementVNode)("div",E,[(0,l.createCommentVNode)("item name - xs and sm only"),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["d-flex d-md-none align-items-baseline flex-fill w-100 position-relative",{is_hidden:i.item.is_hidden,"border-danger":"collection"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`]}])},[ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:"list-section-row-title-status",onClick:t[4]||(t[4]=(...e)=>ih.toggleOpinion&&ih.toggleOpinion(...e))},[ih.itemAcceptedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:ih.translate("item_is_accepted"),
3class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[126]||(t[126]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-accept"},null,-1)])],8,b)):(0,l.createCommentVNode)("v-if",!0),ih.itemRejectedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("item_is_rejected"),class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[127]||(t[127]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-reject"},null,-1)])],8,N)):(0,l.createCommentVNode)("v-if",!0),ih.itemInPendingProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:2,title:ih.translate("item_is_pending"),class:"opinion-icon mr-6",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true"},[...t[128]||(t[128]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-pending"},null,-1)])],8,C)):(0,l.createCommentVNode)("v-if",!0)])),"collection"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:1,class:(0,l.normalizeClass)(["list-section-row-title-name mb-0 field-edit flex-fill p-0",{"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[5]||(t[5]=e=>ih.setEditedField("collection")),onClick:t[6]||(t[6]=e=>ih.setEditedField("collection"))},[(0,l.createElementVNode)("span",B,[i.item.collection.trim()?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",V,(0,l.toDisplayString)(ih.translate("product_collection_name")),1)),(0,l.createElementVNode)("span",null,[(0,l.createElementVNode)("span",_,(0,l.toDisplayString)(i.item.collection),1),ih.isProductUnavailable?((0,l.openBlock)(),(0,l.createElementBlock)("span",I,(0,l.toDisplayString)(ih.translate("product_unavailable")),1)):(0,l.createCommentVNode)("v-if",!0)]),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",S))])],34)):(0,l.createCommentVNode)("v-if",!0),"collection"===iu.editedField?(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("textarea",{key:2,onBlur:t[7]||(t[7]=e=>(ih.setEditedField(null),ih.resetItemFocus())),onKeyup:t[8]||(t[8]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),rows:"1",onInput:t[9]||(t[9]=e=>ih.setCollectionAndClearError(e,i.itemIndex,i.sectionIndex)),onChange:t[10]||(t[10]=(...t)=>e.trimCollection&&e.trimCollection(...t)),ref:"input",placeholder:ih.translate("product_collection_name"),value:i.item.collection,class:"list-section-row-title-name offer-input p-0 w-100 focused item-name mb-0",title:ih.translate("shift_tab_to_search"),onKeypress:t[11]||(t[11]=(0,l.withKeys)((0,l.withModifiers)(e=>ih.addNewItem(e.target),["ctrl"]),["enter"]))},null,40,M)),[[iE,ih.isFocusedInput||"collection"===iu.editedField]]):(0,l.createCommentVNode)("v-if",!0),(0,l.withDirectives)((0,l.createElementVNode)("input",F,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`],void 0,{tooltip:!0}]])],2),(0,l.createCommentVNode)("img from md"),(0,l.createVNode)(iy,{"show-comments-info":ih.isPremium,"unread-comments-count":ih.unreadCommentsCount,"total-comments-count":ih.totalCommentsCount,onShowUnread:t[12]||(t[12]=t=>e.$emit("show-unread",i.item.key)),class:(0,l.normalizeClass)([{is_hidden:i.item.is_hidden,handle:!ih.readOnly},"d-none d-md-flex flex-column"]),"is-selected":!1,"edit-many-enabled":ih.editManyEnabled,item:i.item,"item-index":i.itemIndex,"section-index":i.sectionIndex,disabled:!ih.listId,"show-preview":!i.isDragging},null,8,["show-comments-info","unread-comments-count","total-comments-count","class","edit-many-enabled","item","item-index","section-index","disabled","show-preview"])]),(0,l.createElementVNode)("div",P,[(0,l.createCommentVNode)("img sm"),(0,l.createVNode)(iy,{"show-comments-info":ih.isPremium,"unread-comments-count":ih.unreadCommentsCount,"total-comments-count":ih.totalCommentsCount,onShowUnread:t[13]||(t[13]=t=>e.$emit("show-unread",i.item.key)),class:(0,l.normalizeClass)(["md-auto d-none d-sm-flex d-md-none flex-column py-1",{is_hidden:i.item.is_hidden,handle:!ih.readOnly}]),"is-selected":!1,"edit-many-enabled":ih.editManyEnabled,"img-src":ih.imgSrc(i.item.photo),item:i.item,"item-index":i.itemIndex,"section-index":i.sectionIndex,disabled:!ih.listId,"show-preview":!i.isDragging},null,8,["show-comments-info","unread-comments-count","total-comments-count","class","edit-many-enabled","img-src","item","item-index","section-index","disabled","show-preview"]),(0,l.createCommentVNode)("item name - from md to xl"),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-row-title list-section-row-title-name d-none d-md-flex d-xl-none w-100 position-relative",{is_hidden:i.item.is_hidden,clickable:!ih.readOnly,"border-danger":"collection"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`]}])},[ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,onClick:t[14]||(t[14]=(...e)=>ih.toggleOpinion&&ih.toggleOpinion(...e)),class:"d-flex"},[ih.itemAcceptedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:ih.translate("item_is_accepted"),
3class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[129]||(t[129]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-accept"},null,-1)])],8,T)):(0,l.createCommentVNode)("v-if",!0),ih.itemRejectedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("item_is_rejected"),class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[130]||(t[130]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-reject"},null,-1)])],8,z)):(0,l.createCommentVNode)("v-if",!0),ih.itemInPendingProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:2,title:ih.translate("item_is_pending"),class:"opinion-icon mr-6",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true"},[...t[131]||(t[131]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-pending"},null,-1)])],8,D)):(0,l.createCommentVNode)("v-if",!0)])),"collection"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["mb-0 field-edit item-name p-0 w-100",{"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[15]||(t[15]=e=>ih.setEditedField("collection")),onClick:t[16]||(t[16]=e=>ih.setEditedField("collection"))},[(0,l.createElementVNode)("span",O,[i.item.collection.trim()?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",$,(0,l.toDisplayString)(ih.translate("product_collection_name")),1)),(0,l.createElementVNode)("span",null,[(0,l.createElementVNode)("span",A,(0,l.toDisplayString)(i.item.collection),1),ih.isProductUnavailable?((0,l.openBlock)(),(0,l.createElementBlock)("span",K,(0,l.toDisplayString)(ih.translate("product_unavailable")),1)):(0,l.createCommentVNode)("v-if",!0)]),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",L))])],34)):(0,l.createCommentVNode)("v-if",!0),"collection"===iu.editedField?(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("textarea",{key:2,onBlur:t[17]||(t[17]=e=>ih.setEditedField(null)),onKeyup:t[18]||(t[18]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),rows:"1",onInput:t[19]||(t[19]=e=>ih.setCollectionAndClearError(e,i.itemIndex,i.sectionIndex)),onChange:t[20]||(t[20]=(...t)=>e.trimCollection&&e.trimCollection(...t)),ref:"input",placeholder:ih.translate("product_collection_name"),value:i.item.collection,class:"list-section-row-title-name offer-input p-0 w-100 focused item-name mb-0",title:ih.translate("shift_tab_to_search"),onKeypress:t[21]||(t[21]=(0,l.withKeys)((0,l.withModifiers)(e=>ih.addNewItem(e.target),["ctrl"]),["enter"]))},null,40,U)),[[iE,ih.isFocusedInput||"collection"===iu.editedField]]):(0,l.createCommentVNode)("v-if",!0),(0,l.withDirectives)((0,l.createElementVNode)("input",j,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`],void 0,{tooltip:!0}]])],2),(0,l.createElementVNode)("div",H,[(0,l.createElementVNode)("div",R,[(0,l.createCommentVNode)("item name - xl only"),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-row-title list-section-row-title-name d-none d-xl-flex pb-6 position-relative",{is_hidden:i.item.is_hidden,clickable:!ih.readOnly,"border-danger":"collection"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`]}])},[ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,onClick:t[22]||(t[22]=(...e)=>ih.toggleOpinion&&ih.toggleOpinion(...e)),class:"d-flex"},[ih.itemAcceptedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:ih.translate("item_is_accepted"),class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[132]||(t[132]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-accept"},null,-1)])],8,X)):(0,l.createCommentVNode)("v-if",!0),ih.itemRejectedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("item_is_rejected"),class:"opinion-icon mr-6",width:"40",height:"40",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[133]||(t[133]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-reject"},null,-1)])],8,q)):(0,l.createCommentVNode)("v-if",!0),ih.itemInPendingProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:2,title:ih.translate("item_is_pending"),class:"opinion-icon mr-6",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true"},[...t[134]||(t[134]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-pending"},null,-1)])],8,Q)):(0,l.createCommentVNode)("v-if",!0)])),"collection"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:1,class:(0,l.normalizeClass)(["mb-0 field-edit item-name d-flex flex-fill p-0",{"curs
3or-text":!ih.readOnly}]),tabindex:"0",onFocus:t[23]||(t[23]=e=>ih.setEditedField("collection")),onClick:t[24]||(t[24]=e=>ih.setEditedField("collection"))},[(0,l.createElementVNode)("span",Z,[i.item.collection.trim()?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",Y,(0,l.toDisplayString)(ih.translate("product_collection_name")),1)),(0,l.createElementVNode)("span",null,[(0,l.createElementVNode)("span",W,(0,l.toDisplayString)(i.item.collection),1),ih.isProductUnavailable?((0,l.openBlock)(),(0,l.createElementBlock)("span",G,(0,l.toDisplayString)(ih.translate("product_unavailable")),1)):(0,l.createCommentVNode)("v-if",!0)]),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",J))])],34)):(0,l.createCommentVNode)("v-if",!0),"collection"===iu.editedField?(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("textarea",{key:2,onBlur:t[25]||(t[25]=e=>ih.setEditedField(null)),onKeyup:t[26]||(t[26]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),rows:"1",onInput:t[27]||(t[27]=e=>ih.setCollectionAndClearError(e,i.itemIndex,i.sectionIndex)),onChange:t[28]||(t[28]=(...t)=>e.trimCollection&&e.trimCollection(...t)),ref:"input",placeholder:ih.translate("product_collection_name"),value:i.item.collection,class:"list-section-row-title-name offer-input p-0 w-100 focused item-name mb-0",title:ih.translate("shift_tab_to_search"),onKeypress:t[29]||(t[29]=(0,l.withKeys)((0,l.withModifiers)(e=>ih.addNewItem(e.target),["ctrl"]),["enter"]))},null,40,ee)),[[iE,ih.isFocusedInput||"collection"===iu.editedField]]):(0,l.createCommentVNode)("v-if",!0),(0,l.withDirectives)((0,l.createElementVNode)("input",et,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].collection`],void 0,{tooltip:!0}]])],2),(0,l.createCommentVNode)("img xs"),(0,l.createVNode)(iy,{"show-comments-info":ih.isPremium,"unread-comments-count":ih.unreadCommentsCount,"total-comments-count":ih.totalCommentsCount,onShowUnread:t[30]||(t[30]=t=>e.$emit("show-unread",i.item.key)),class:(0,l.normalizeClass)(["md-auto d-flex d-sm-none",{is_hidden:i.item.is_hidden,handle:!ih.readOnly}]),"is-selected":!1,"edit-many-enabled":ih.editManyEnabled,"img-src":ih.imgSrc(i.item.photo),item:i.item,"item-index":i.itemIndex,"section-index":i.sectionIndex,disabled:!ih.listId,"show-preview":!i.isDragging},null,8,["show-comments-info","unread-comments-count","total-comments-count","class","edit-many-enabled","img-src","item","item-index","section-index","disabled","show-preview"]),(0,l.createElementVNode)("div",ei,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-row-status col-md-auto col-sm-12 p-0 d-print-none",{is_hidden:i.item.is_hidden}])},[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["kis-badge kis-badge-status w-100",{clickable:!ih.readOnly}]),disabled:ih.readOnly,style:(0,l.normalizeStyle)(`background-color: ${ih.selectedStatusColor}20`),onClick:t[31]||(t[31]=e=>ih.showDropdown("status",e))},[(0,l.createElementVNode)("i",{class:(0,l.normalizeClass)(["kis-dot kis-dot-10",i.item.status]),style:(0,l.normalizeStyle)({"background-color":ih.selectedStatusColor})},null,6),(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(ih.selectedStatusName||ih.translate("item_status")),1)],14,el),(0,l.createCommentVNode)(" url "),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["d-flex field-edit align-items-center",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[36]||(t[36]=e=>ih.setEditedField("url"))},[iu.catalogEnabled&&i.item.supplier_product_uid&&ih.catalogSupplierActive?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:0,target:"_blank",class:"pr-6 d-flex",title:ih.translate("open_in_catalog"),href:ih.catalogProductUrl(i.item.supplier_product_uid)},[...t[135]||(t[135]=[(0,l.createElementVNode)("svg",{height:"18",width:"18",viewBox:"0 0 22 18","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-catalog_3d_list"})],-1)])],8,en)):(0,l.createCommentVNode)("v-if",!0),ih.itemUrl?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:1,target:"_blank",title:ih.translate("open_product_link"),rel:"nofollow",href:ih.getValidUrl(ih.itemUrl),class:"pr-6 d-flex"},[...t[136]||(t[136]=[(0,l.createElementVNode)("svg",{height:"12",width:"12",viewBox:"0 0 12 13","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-url"})],-1)])],8,eo)):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("span",{class:"flex-fill d-flex",onClick:t[35]||(t[35]=(0,l.withModifiers)(e=>ih.setEditedField("url"),["prevent"]))},["url"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([{"cursor-text":!ih.readOnly,"border-danger":"url"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].url`]},"list-section-row-url col p-0 d-block"]),rel:"nofollow"},[(0,l.createElementVNode)("span",es,[(0,l.createElementVNode)("span",ea,[(0,l.createTextVNode)((0,l.toDisplayString)(i.item.url)+" ",1),i.item.url?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",er,(0,l.toDisplayString)(ih.translate("product_link")),1))])])],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,maxlength:iu.urlMaxLength,onInput:t[32]||(t[32]=(...t)=>e.setUrl&&e.setUrl(...t)),onKeyup:t[33]||(t[33]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),onBlur:t[34]||(t[34]=e=>ih.setEditedField(null)),value:i.item.url,placeholder:ih.translate("url"),type:"text",class:"w-100 offer-input p-0 focused item-value"},null,40,ed)),[[iE,"url"===iu.editedField]])])],34)],2),iu.mediaSizes.isXs?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createCommentVNode)(" unit_price_short "),(0,l.createElementVNode)("label",{class:(0,l.normalizeClass)(["d-flex field-edit align-items-baseline cursor-text m-0 position-relative",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[43]||(t[43]=e=>ih.setEditedField("unit_price")),onClick:t[44]||(t[44]=e=>ih.setEditedField("unit_price")),title:i.item.unit_price},[(0,l.createElementVNode)("span",em,(0,l.toDisplayString)(ih.translate("unit_price_short")),1),"unit_price"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)(["col p-0 item-value position-relative d-flex align-items-center",{"border-danger":"unit_price"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].unitPrice`]}])},[ih.priceToBeUpdated?((0,l.openBlock)(),(0,l.createElementBlock)("span",ep)):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("span",eu,[(0,l.createElementVNode)("span",eh,[(0,l.createTextVNode)((0,l.toDisplayString)(ih.formatToCurrency(i.item.unit_price))+" ",1),ih.showPriceUpToDate?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:`${ih.translate("price_up_to_date")}: ${ih.updatedPrice.price_check_date}`,style:{"z-index":"1","vertical-align":"text-top"},class:"mx-2",width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[...t[137]||(t[137]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-ok-green"},null,-1)])],8,eg)):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",ey))])]),ih.priceToBeUpdated?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("update_price_available"),style:{"z-index":"1"},class:"clickable mx-2 icon-emphasize",onMousedown:t[37]||(t[37]=(0,l.withModifiers)((...e)=>ih.updateSinglePrice&&ih.updateSinglePrice(...e),["prevent","stop"])),width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[...t[138]||(t[138]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-round-arrows"},null,-1)])],40,ek)):(0,l.createCommentVNode)("v-if",!0)],2)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createCommentVNode)(" 69 is 'e' - prevent scientific notation "),(0,l.withDirectives)((0,l.createElementVNode)("input",{maxlength:iu.inputMa
3xlength,onBlur:t[38]||(t[38]=e=>ih.setEditedField(null)),onKeyup:t[39]||(t[39]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),onKeydown:t[40]||(t[40]=(0,l.withKeys)((0,l.withModifiers)(()=>{},["prevent","stop"]),["e"])),onInput:t[41]||(t[41]=e=>ih.setUnitPriceLocalValue(e.target.value)),onChange:t[42]||(t[42]=(...e)=>ih.setUnitPriceValue&&ih.setUnitPriceValue(...e)),value:iu.unitPrice,type:"number",step:"0.01",min:"0",title:ih.translate("unit_price"),class:"col offer-input p-0 focused item-value"},null,40,ev),[[iE,"unit_price"===iu.editedField]])],2112)),(0,l.withDirectives)((0,l.createElementVNode)("input",ef,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].unitPrice`],void 0,{tooltip:!0}]])],42,ec),(0,l.createCommentVNode)(" measure"),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["d-flex field-edit align-items-baseline m-0",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),title:i.item.measure},[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 text-muted item-label",{clickable:!ih.readOnly}]),onClick:t[45]||(t[45]=e=>!ih.readOnly&&ih.showDropdown("item-measure",e)),title:ih.readOnly?"":ih.translate("overwrite_item_measure")},(0,l.toDisplayString)(i.item.custom_unit?ih.translate(i.item.custom_unit):ih.selectedCategoryMeasure)+": ",11,ew),"measure"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,tabindex:"0",onFocus:t[46]||(t[46]=e=>ih.setEditedField("measure")),onClick:t[47]||(t[47]=e=>ih.setEditedField("measure")),class:(0,l.normalizeClass)(["col p-0 item-value",{"border-danger":"measure"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].measure`]}])},[(0,l.createElementVNode)("span",eE,[(0,l.createElementVNode)("span",eb,[(0,l.createTextVNode)((0,l.toDisplayString)(String(i.item.measure||0).replace(".",","))+" ",1),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",eN))])])],34)):((0,l.openBlock)(),(0,l.createElementBlock)("span",eC,[(0,l.withDirectives)((0,l.createVNode)(ik,{onBlur:t[48]||(t[48]=e=>ih.setEditedField(null)),onKeyup:t[49]||(t[49]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),class:"col-5 p-0 me-4 position-absolute bottom-0 text-12-normal w-100",onInput:ih.onInputMeasure,"onUpdate:modelValue":[ih.onChangeMeasure,t[50]||(t[50]=e=>i.item.measure=e)],modelValue:i.item.measure,min:0,size:"small",controls:""},null,8,["onInput","onUpdate:modelValue","modelValue"]),[[iE,"measure"===iu.editedField]])]))],10,ex),(0,l.createCommentVNode)(" price "),(0,l.createElementVNode)("label",{class:(0,l.normalizeClass)(["d-flex field-edit align-items-baseline m-0 position-relative",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[56]||(t[56]=e=>ih.setEditedField("price")),onClick:t[57]||(t[57]=e=>ih.setEditedField("price")),title:ih.priceFieldTitle},[(0,l.createElementVNode)("span",eV,(0,l.toDisplayString)(ih.translate("sum"))+":",1),"price"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)(["col p-0 item-value",{"border-danger":"price"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].price`]}])},[(0,l.createElementVNode)("span",e_,[(0,l.createElementVNode)("span",eI,[(0,l.createElementVNode)("span",eS,(0,l.toDisplayString)(ih.formatToCurrency(i.item.price)),1),ih.deliveryCost?((0,l.openBlock)(),(0,l.createElementBlock)("span",eM," ("+(0,l.toDisplayString)(ih.translate("plus_delivery",{value:ih.formatToCurrency(ih.deliveryCost)}))+") ",1)):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",eF))])])],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,maxlength:iu.inputMaxlength,onBlur:t[51]||(t[51]=e=>ih.setEditedField(null)),onKeydown:t[52]||(t[52]=(0,l.withKeys)((0,l.withModifiers)(()=>{},["prevent","stop"]),["e"])),onInput:t[53]||(t[53]=e=>ih.setFullPriceLocalValue(e.target.value)),onChange:t[54]||(t[54]=(...e)=>ih.setFullPriceValue&&ih.setFullPriceValue(...e)),onKeyup:t[55]||(t[55]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),value:iu.fullPrice,type:"number",min:"0",step:"0.01",title:ih.translate("price"),class:"col offer-input p-0 focused item-value"},null,40,eP)),[[iE,"price"===iu.editedField]]),(0,l.withDirectives)((0,l.createElementVNode)("input",eT,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].price`],void 0,{tooltip:!0}]])],42,eB)],64)):(0,l.createCommentVNode)("v-if",!0),!iu.mediaSizes.isXs&&i.item?.attachments?.file_references?.length?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)({is_hidden:i.item.is_hidden})},[(0,l.createElementVNode)("div",ez,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(i.item?.attachments?.file_references||[],e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",eD,[iu.attachmentsEnabled?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",eO,[t[139]||(t[139]=(0,l.createElementVNode)("svg",{width:"12",height:"14",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip"})],-1)),(0,l.createElementVNode)("span",e$,[(0,l.createElementVNode)("span",eA,(0,l.toDisplayString)(i.item?.attachments?.file_names[e]),1)])])),iu.attachmentsEnabled?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:1,href:ih.fileSrc(e,i.item?.attachments?.file_names?.[e]),class:(0,l.normalizeClass)([{disabled:!iu.attachmentsEnabled},"position-relative d-flex align-items-center"]),title:ih.translate("download_attachment"),target:"_blank"},[...t[140]||(t[140]=[(0,l.createElementVNode)("svg",{width:"12",height:"14",class:"edit-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip-blue"})],-1),(0,l.createElementVNode)("svg",{width:"12",height:"14",class:"edit-icon-invert position-absolute left-0",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip"})],-1)])],10,eK)):(0,l.createCommentVNode)("v-if",!0),iu.attachmentsEnabled?((0,l.openBlock)(),(0,l.createElementBlock)("div",eL,[iu.editedField!==`attachment_name_${e}`?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,tabindex:"0",onFocus:t=>ih.setEditedField(`attachment_name_${e}
3`),class:"item-value text-12-darker text-ellipsis my-2p w-100 cursor-text element",title:i.item?.attachments?.file_names[e],onClick:t=>ih.setEditedField(`attachment_name_${e}`)},[(0,l.createElementVNode)("span",ej,(0,l.toDisplayString)(i.item?.attachments?.file_names[e]),1)],40,eU)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,onBlur:t[58]||(t[58]=e=>ih.setEditedField(null)),value:ih.fileNameWithoutExtension(e),onChange:t=>ih.updateAttachmentName(e,t.target.value),type:"text",class:"w-100 offer-input text-12-darker p-0 focused my-2p item-value"},null,40,eH)),[[iE,iu.editedField===`attachment_name_${e}`]])])):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:3,href:"#",onClick:(0,l.withModifiers)(t=>ih.showDropdown("delete-attachment",t,e),["prevent"]),title:ih.translate("delete_attachment"),class:"edit-icon ms-auto"},[...t[141]||(t[141]=[(0,l.createElementVNode)("svg",{class:"ml-6",width:"12",he
3ight:"12",viewBox:"0 0 8 9","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-times-red"})],-1)])],8,eR))]))),256))])],2)):(0,l.createCommentVNode)("v-if",!0),iu.mediaSizes.isXs?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",eX,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-row-details-note field-edit position-relative font-notes",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly,"d-flex flex-column flex-grow-1":"notes"!==iu.editedField,"border-danger":"notes"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`]}]),tabindex:"0",onFocus:t[63]||(t[63]=e=>ih.setEditedField("notes")),onClick:t[64]||(t[64]=e=>ih.setEditedField("notes",e))},["notes"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("div",eq,[(0,l.createElementVNode)("div",eQ,[i.item.notes||ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",eZ,(0,l.toDisplayString)(ih.translate("notes_comments")),1)),i.item.notes?((0,l.openBlock)(),(0,l.createBlock)(iv,{key:1,class:"p-0 w-100 tiptap tiptap-rendered text-muted",html:i.item.notes,"enabled-providers":["external"]},null,8,["html"])):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",eY))])])):((0,l.openBlock)(),(0,l.createBlock)(ix,{key:1,onClick:t[59]||(t[59]=(0,l.withModifiers)(()=>{},["stop"])),onKeyup:t[60]||(t[60]=(0,l.withKeys)(e=>ih.setEditedField(null),["esc"])),onBlur:t[61]||(t[61]=e=>ih.setEditedField(null)),onInput:t[62]||(t[62]=e=>ih.setNotesAndClearError({target:{value:e}},i.itemIndex,i.sectionIndex)),"on-create":()=>"notes"===iu.editedField,placeholder:ih.translate("notes_comments"),"model-value":i.item.notes,style:(0,l.normalizeStyle)({"max-height":`${i.noteMaxHeight}px`}),"attachments-enabled":!1,maxlength:iu.notesInputLimit,"submit-enabled":!1,"mentions-enabled":!1,"comment-link-previews":!1,"attachment-link-previews":!1,ref:"noteEditor",class:"item-note","editor-content-styles":"font-size: 14px; line-height: 22px;","convert-to-html":!0,"emoji-picker-body":!1},null,8,["on-create","placeholder","model-value","style","maxlength"])),(0,l.withDirectives)((0,l.createElementVNode)("input",eW,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`],void 0,{tooltip:!0}]])],34)]))])]),iu.mediaSizes.isXs&&i.item&&i.item.attachments?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["w-100 px-sm-6 px-0 mr-3p mt-2 mt-sm-4 mb-3 mb-sm-0",{is_hidden:i.item.is_hidden}])},[(0,l.createElementVNode)("div",eG,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(i.item?.attachments?.file_references||[],e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",eJ,[iu.attachmentsEnabled?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",e0,[t[142]||(t[142]=(0,l.createElementVNode)("svg",{width:"12",height:"14",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip"})],-1)),(0,l.createElementVNode)("span",e1,[(0,l.createElementVNode)("span",e2,(0,l.toDisplayString)(i.item?.attachments?.file_names[e]),1)])])),iu.attachmentsEnabled?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:1,href:ih.fileSrc(e,i.item?.attachments?.file_names?.[e]),class:(0,l.normalizeClass)([{disabled:!iu.attachmentsEnabled},"position-relative d-flex align-items-center"]),title:ih.translate("download_attachment"),target:"_blank"},[...t[143]||(t[143]=[(0,l.createElementVNode)("svg",{width:"12",height:"14",class:"edit-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip-blue"})],-1),(0,l.createElementVNode)("svg",{width:"12",height:"14",class:"edit-icon-invert position-absolute left-0",viewBox:"0 0 16 16","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-paperclip"})],-1)])],10,e4)):(0,l.createCommentVNode)("v-if",!0),iu.attachmentsEnabled?((0,l.openBlock)(),(0,l.createElementBlock)("div",e3,[iu.editedField!==`attachment_name_${e}`?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,tabindex:"0",onFocus:t=>ih.setEditedField(`attachment_name_${e}
3`),class:"item-value text-12-darker text-ellipsis my-3p w-100 cursor-text element",title:i.item?.attachments?.file_names[e],onClick:t=>ih.setEditedField(`attachment_name_${e}`)},[(0,l.createElementVNode)("span",e9,(0,l.toDisplayString)(i.item?.attachments?.file_names[e]),1)],40,e6)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,onBlur:t[65]||(t[65]=e=>ih.setEditedField(null)),value:ih.fileNameWithoutExtension(e),onChange:t=>ih.updateAttachmentName(e,t.target.value),type:"text",class:"w-100 offer-input text-12-darker p-0 focused item-value my-3p"},null,40,e8)),[[iE,iu.editedField===`attachment_name_${e}`]])])):(0,l.createCommentVNode)("v-if",!0),(0,l.createCommentVNode)(' <a href="#" v-if="!readOnly" @click.prevent="showDropdown(\'delete-attachment\', $event, attachment)"'),(0,l.createCommentVNode)(' :title="translate(\'delete_attachment\')" class="edit-icon ms-auto">'),(0,l.createCommentVNode)(' <svg class="ml-6" width="8" height="9" viewBox="0 0 8 9" aria-hidden="true"><use xlink:href="/build/images/spritemap.svg#icon-ico-times-red"></use></svg>'),(0,l.createCommentVNode)(" </a>")]))),256))])],2)):(0,l.createCommentVNode)("v-if",!0),iu.mediaSizes.isXs?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["list-section-row-details-toggle text-center flex-fill w-100",{is_hidden:i.item.is_hidden}])},[ih.editedItemPropertiesKey===i.item.key?((0,l.openBlock)(),(0,l.createElementBlock)("div",e5,[(0,l.createElementVNode)("a",{class:"no-link",href:"#",onClick:t[66]||(t[66]=(0,l.withModifiers)((...e)=>ih.hideEditedProperties&&ih.hideEditedProperties(...e),["prevent"]))},[(0,l.createTextVNode)((0,l.toDisplayString)(ih.translate("item.details_fold"))+" ",1),t[144]||(t[144]=(0,l.createElementVNode)("svg",{width:"7",height:"5",viewBox:"0 0 7 5","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-up-arrow"})],-1))])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",e7,[(0,l.createElementVNode)("a",{class:"no-link",href:"#",onClick:t[67]||(t[67]=(0,l.withModifiers)((...e)=>ih.setEditedPropertiesKey&&ih.setEditedPropertiesKey(...e),["prevent"]))},[(0,l.createTextVNode)((0,l.toDisplayString)(ih.translate("item.details_unfold"))+" ",1),t[145]||(t[145]=(0,l.createElementVNode)("svg",{width:"7",height:"5",viewBox:"0 0 7 5","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-down-arrow"})],-1))])])),(0,l.createElementVNode)("div",te,[ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:t[68]||(t[68]=(...e)=>ih.toggleOpinion&&ih.toggleOpinion(...e))},[ih.itemAcceptedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:ih.translate("item_is_accepted"),class:"mr-6",height:"30",width:"30",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[146]||(t[146]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-accept"},null,-1)])],8,tt)):(0,l.createCommentVNode)("v-if",!0),ih.itemRejectedInProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("item_is_rejected"),class:"mr-6",height:"30",width:"30",viewBox:"0 0 40 40","aria-hidden":"true"},[...t[147]||(t[147]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-reject"},null,-1)])],8,ti)):(0,l.createCommentVNode)("v-if",!0),ih.itemInPendingProposal?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:2,title:ih.translate("item_is_pending"),class:"mr-6",height:"30",width:"30",viewBox:"0 0 20 20","aria-hidden":"true"},[...t[148]||(t[148]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-pending"},null,-1)])],8,tl)):(0,l.createCommentVNode)("v-if",!0)])),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"text-white unread-count-ico clickable d-flex align-items-center justify-content-center",style:{"z-index":"100"},title:ih.translate("view_comments"),onClick:t[69]||(t[69]=t=>e.$emit("show-unread",i.item.key))},[ih.unreadCommentsCount>0?((0,l.openBlock)(),(0,l.createElementBlock)("svg",to,[...t[149]||(t[149]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-unread-comments-count"},null,-1)])])):((0,l.openBlock)(),(0,l.createElementBlock)("svg",ts,[...t[150]||(t[150]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-comment-count"},null,-1)])])),ih.unreadCommentsCount>0?((0,l.openBlock)(),(0,l.createElementBlock)("span",ta,(0,l.toDisplayString)(ih.unreadCommentsCount),1)):ih.totalCommentsCount>0?((0,l.openBlock)(),(0,l.createElementBlock)("span",tr,(0,l.toDisplayString)(ih.totalCommentsCount),1)):(0,l.createCommentVNode)("v-if",!0)],8,tn)),i.item.notes?((0,l.openBlock)(),(0,l.createElementBlock)("button",td,[...t[151]||(t[151]=[(0,l.createElementVNode)("svg",{height:"30",width:"30",viewBox:"0 0 30 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-note"})],-1)])])):(0,l.createCommentVNode)("v-if",!0)])],2)):(0,l.createCommentVNode)("v-if",!0),(0,l.createCommentVNode)("item properties"),(0,l.createElementVNode)("div",tc,[iu.mediaSizes.isXs&&ih.editedItemPropertiesKey===i.item.key?((0,l.openBlock)(),(0,l.createElementBlock)("div",tm,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-row-detail
3s-note field-edit position-relative",{is_hidden:i.item.is_hidden,"border-danger":"notes"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`]}]),tabindex:"0",onFocus:t[74]||(t[74]=e=>ih.setEditedField("notes")),onClick:t[75]||(t[75]=e=>ih.setEditedField("notes"))},["notes"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)({"cursor-text":!ih.readOnly})},[i.item.notes||ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",tp,(0,l.toDisplayString)(ih.translate("click_to_add_notes")),1)),i.item.notes?((0,l.openBlock)(),(0,l.createBlock)(iv,{key:1,class:"p-0 w-100 text-muted tiptap tiptap-rendered",html:i.item.notes,"enabled-providers":["external"]},null,8,["html"])):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tu))],2)):((0,l.openBlock)(),(0,l.createBlock)(ix,{key:1,onClick:t[70]||(t[70]=(0,l.withModifiers)(()=>{},["stop"])),onKeyup:t[71]||(t[71]=(0,l.withKeys)(e=>ih.setEditedField(null),["esc"])),onBlur:t[72]||(t[72]=e=>ih.setEditedField(null)),onInput:t[73]||(t[73]=e=>ih.setNotesAndClearError({target:{value:e}},i.itemIndex,i.sectionIndex)),"on-create":()=>"notes"===iu.editedField,placeholder:ih.translate("notes_comments"),"model-value":i.item.notes,maxlength:iu.notesInputLimit,style:(0,l.normalizeStyle)({"max-height":`${i.noteMaxHeight}px`}),"attachments-enabled":!1,"submit-enabled":!1,"mentions-enabled":!1,"comment-link-previews":!1,"attachment-link-previews":!1,ref:"noteEditor",class:"item-note","editor-content-styles":"font-size: 14px; line-height: 22px;","convert-to-html":!0,"emoji-picker-body":!1},null,8,["on-create","placeholder","model-value","maxlength","style"])),(0,l.withDirectives)((0,l.createElementVNode)("input",th,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`],void 0,{tooltip:!0}]])],34)])):(0,l.createCommentVNode)("v-if",!0),iu.mediaSizes.isXs&&ih.editedItemPropertiesKey!==i.item.key?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createElementVNode)("div",tg,[(0,l.createCommentVNode)(" supplier"),(0,l.createElementVNode)("label",{class:(0,l.normalizeClass)(["d-flex pt-0 field-edit align-items-baseline property-dark",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[78]||(t[78]=e=>ih.setEditedField("supplier")),onClick:t[79]||(t[79]=e=>ih.setEditedField("supplier")),title:i.item.supplier},[(0,l.createElementVNode)("span",{class:"p-0 text-muted item-label",innerHTML:ih.translate("supplier_raw")},null,8,tk),"supplier"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",tv,[(0,l.createElementVNode)("span",tf,[(0,l.createElementVNode)("span",tx,[(0,l.createTextVNode)((0,l.toDisplayString)(i.item.supplier)+" ",1),i.item.supplier?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tw,"-")),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tE))])])])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,onChange:t[76]||(t[76]=(...t)=>e.setSupplier&&e.setSupplier(...t)),onKeyup:t[77]||(t[77]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),value:i.item.supplier,maxlength:iu.inputShortMaxlength,type:"text",title:ih.translate("shop_details"),class:"col offer-input p-0 focused item-value"},null,40,tb)),[[iE,"supplier"===iu.editedField]])],42,ty),(0,l.createCommentVNode)(" catalog_nr"),(0,l.createElementVNode)("label",{class:(0,l.normalizeClass)(["d-flex pt-3p field-edit align-items-baseline property-white",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[83]||(t[83]=e=>ih.setEditedField("catalog_nr")),onClick:t[84]||(t[84]=e=>ih.setEditedField("catalog_nr")),title:i.item.catalog_nr},[(0,l.createElementVNode)("span",tC,(0,l.toDisplayString)(ih.translate("catalog_nr")),1),"catalog_nr"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",tB,[(0,l.createElementVNode)("span",tV,[(0,l.createElementVNode)("span",t_,[(0,l.createTextVNode)((0,l.toDisplayString)(i.item.catalog_nr)+" ",1),i.item.catalog_nr?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tI,"-")),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tS))])])])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,value:i.item.catalog_nr,onBlur:t[80]||(t[80]=e=>ih.setEditedField(null)),onKeyup:t[81]||(t[81]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),onChange:t[82]||(t[82]=(...t)=>e.setCatalogNr&&e.setCatalogNr(...t)),maxlength:iu.inputShortMaxlength,type:"text",class:"col offer-input p-0 focused item-value"},null,40,tM)),[[iE,"catalog_nr"===iu.editedField],[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].catalog_nr`]]])],42,tN),(0,l.createCommentVNode)(" item_category_short"),(0,l.createElementVNode)("label",{class:"d-flex pt-3p field-edit align-items-baseline position-relative property-dark",title:ih.selectedCategoryName},[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 item-label",{is_hidden:i.item.is_hidden}])},(0,l.toDisplayString)(ih.translate("item_category_short")),3),(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 d-table-layout col item-value",{is_hidden:i.item.is_hidden,clickable:!ih.readOnly}]),onClick:t[85]||(t[85]=e=>ih.showDropdown("category",e,null,{placement:"bottom-start"}))},[(0,l.createElementVNode)("span",tP,[(0,l.createTextVNode)((0,l.toDisplayString)(ih.selectedCategoryName)+" ",1),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tT))])],2)],8,tF),(0,l.createCommentVNode)(" dimensions"),(0,l.createElementVNode)("label",{class:(0,l.normalizeClass)(["d-flex pt-3p field-edit align-items-baseline property-white",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[89]||(t[89]=e=>ih.setEditedField("size")),onClick:t[90]||(t[90]=e=>ih.setEditedField("size")),title:i.item.size},[(0,l.createElementVNode)("span",tD,(0,l.toDisplayString)(ih.translate("dimensions")),1),"size"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",tO,[(0,l.createElementVNode)("span",t$,[(0,l.createElementVNode)("span",tA,[(0,l.createTextVNode)((0,l.toDisplayString)(i.item.size)+" ",1),0===i.item.size?((0,l.openBlock)(),(0,l.createElementBlock)("i",tK,"-")):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tL))])])])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,value:i.item.size,onBlur:t[86]||(t[86]=e=>ih.setEditedField(null)),onKeyup:t[87]||(t[87]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),onInput:t[88]||(t[88]=(...t)=>e.setSize&&e.setSize(...t)),maxlength:iu.inputShortMaxlength,type:"text",class:"col offer-input p-0 focused item-value"},null,40,tU)),[[iE,"size"===iu.editedField],[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].size`]]])],42,tz)]),(0,l.createElementVNode)("div",tj,[(0,l.createCommentVNode)(" measure"),iu.mediaSizes.isXs?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["d-flex pt-0 field-edit align-items-baseline cursor-text property-dark",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),title:i.item.measure},[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 text-muted item-label",{clickable:!ih.readOnly}]),onClick:t[91]||(t[91]=e=>
3!ih.readOnly&&ih.showDropdown("item-measure",e)),title:ih.readOnly?"":ih.translate("overwrite_item_measure")},(0,l.toDisplayString)(i.item.custom_unit?ih.translate(i.item.custom_unit):ih.selectedCategoryMeasure)+": ",11,tR),"measure"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,tabindex:"0",onFocus:t[92]||(t[92]=e=>ih.setEditedField("measure")),onClick:t[93]||(t[93]=e=>ih.setEditedField("measure")),class:(0,l.normalizeClass)(["col p-0 item-value",{"border-danger":"measure"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].measure`]}])},[(0,l.createElementVNode)("span",tX,[(0,l.createElementVNode)("span",tq,[(0,l.createTextVNode)((0,l.toDisplayString)(String(i.item.measure||0).replace(".",","))+" ",1),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",tQ))])])],34)):((0,l.openBlock)(),(0,l.createElementBlock)("span",tZ,[(0,l.withDirectives)((0,l.createVNode)(ik,{onBlur:t[94]||(t[94]=e=>ih.setEditedField(null)),onKeyup:t[95]||(t[95]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),class:"col-5 p-0 me-4 position-absolute bottom-0 text-12-normal number-input--small w-100",onInput:ih.onInputMeasure,"onUpdate:modelValue":[ih.onChangeMeasure,t[96]||(t[96]=e=>i.item.measure=e)],modelValue:i.item.measure,min:0,size:"small",controls:""},null,8,["onInput","onUpdate:modelValue","modelValue"]),[[iE,"measure"===iu.editedField]])]))],10,tH)),(0,l.createCommentVNode)(" unit_price_short "),iu.mediaSizes.isXs?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:1,class:(0,l.normalizeClass)(["d-flex pt-3p field-edit align-items-baseline position-relative",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[103]||(t[103]=e=>ih.setEditedField("unit_price")),onClick:t[104]||(t[104]=e=>ih.setEditedField("unit_price")),title:i.item.unit_price},[(0,l.createElementVNode)("span",tW,(0,l.toDisplayString)(ih.translate("unit_price_short")),1),"unit_price"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)(["col p-0 item-value position-relative d-flex align-items-center",{"border-danger":"unit_price"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].unitPrice`]}])},[ih.priceToBeUpdated?((0,l.openBlock)(),(0,l.createElementBlock)("span",tG)):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("span",tJ,[(0,l.createElementVNode)("span",t0,[(0,l.createTextVNode)((0,l.toDisplayString)(ih.formatToCurrency(i.item.unit_price))+" ",1),ih.showPriceUpToDate?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,title:`${ih.translate("price_up_to_date")}: ${ih.updatedPrice.price_check_date}`,style:{"z-index":"1","vertical-align":"text-top"},class:"mx-2",width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true"},[...t[152]||(t[152]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-ok-green"},null,-1)])],8,t1)):(0,l.createCommentVNode)("v-if",!0),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",t2))])]),ih.priceToBeUpdated?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,title:ih.translate("update_price_available"),style:{"z-index":"1"},class:"clickable mx-2 icon-emphasize",onMousedown:t[97]||(t[97]=(0,l.withModifiers)((...e)=>ih.updateSinglePrice&&ih.updateSinglePrice(...e),["prevent","stop"])),width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[...t[153]||(t[153]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-round-arrows"},null,-1)])],40,t4)):(0,l.createCommentVNode)("v-if",!0)],2)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createCommentVNode)(" 69 is 'e' - prevent scientific notation "),(0,l.withDirectives)((0,l.createElementVNode)("input",{maxlength:iu.inputMaxlength,onBlur:t[98]||(t[98]=e=>ih.setEditedField(null)),onKeyup:t[99]||(t[99]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),onKeydown:t[100]||(t[100]=(0,l.withKeys)((0,l.withModifiers)(()=>{},["prevent","stop"]),["e"])),onInput:t[101]||(t[101]=e=>ih.setUnitPriceLocalValue(e.target.value)),onChange:t[102]||(t[102]=(...e)=>ih.setUnitPriceValue&&ih.setUnitPriceValue(...e)),value:iu.unitPrice,type:"number",step:"0.01",min:"0",title:ih.translate("unit_price"),class:"col offer-input p-0 focused item-value w-100"},null,40,t3),[[iE,"unit_price"===iu.editedField]])],2112)),(0,l.withDirectives)((0,l.createElementVNode)("input",t6,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].unitPrice`],void 0,{tooltip:!0}]])],42,tY)),(0,l.createCommentVNode)(" price "),iu.mediaSizes.isXs?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:2,class:(0,l.normalizeClass)(["d-flex pt-3p field-edit align-items-baseline cursor-text position-relative",{is_hidden:i.item.is_hidden,"cursor-text":!ih.readOnly}]),tabindex:"0",onFocus:t[110]||(t[110]=e=>ih.setEditedField("price")),onClick:t[111]||(t[111]=e=>ih.setEditedField("price")),title:ih.priceFieldTitle},[(0,l.createElementVNode)("span",t8,(0,l.toDisplayString)(ih.translate("sum"))+":",1),"price"!==iu.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)(["col p-0 item-value",{"border-danger":"price"!==iu.editedField&&ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].price`]}])},[(0,l.createElementVNode)("span",t5,[(0,l.createElementVNode)("span",t7,[(0,l.createTextVNode)((0,l.toDisplayString)(ih.formatToCurrency(i.item.price))+" ",1),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",ie))])])],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:1,maxlength:iu.inputMa
3xlength,onBlur:t[105]||(t[105]=e=>ih.setEditedField(null)),onKeydown:t[106]||(t[106]=(0,l.withKeys)((0,l.withModifiers)(()=>{},["prevent","stop"]),["e"])),onInput:t[107]||(t[107]=e=>ih.setFullPriceLocalValue(e.target.value)),onChange:t[108]||(t[108]=(...e)=>ih.setFullPriceValue&&ih.setFullPriceValue(...e)),onKeyup:t[109]||(t[109]=(0,l.withKeys)(e=>e.target.blur(),["esc"])),value:iu.fullPrice,type:"number",min:"0",step:"0.01",title:ih.translate("price"),class:"col offer-input p-0 focused item-value w-100"},null,40,it)),[[iE,"price"===iu.editedField]]),(0,l.withDirectives)((0,l.createElementVNode)("input",ii,null,512),[[ib,ih.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].price`],void 0,{tooltip:!0}]])],42,t9)),(0,l.createCommentVNode)(" discount"),i.item.discount?((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:3,class:(0,l.normalizeClass)(["d-flex pt-3p field-edit align-items-baseline property-dark",{is_hidden:i.item.is_hidden}])},[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 item-label",{clickable:iu.discountsEnabled}]),onClick:t[112]||(t[112]=t=>e.$emit("change-discount"))}," -"+(0,l.toDisplayString)(ih.formatNumber(i.item.discount))+"% ",3),(0,l.createElementVNode)("span",il,[(0,l.createElementVNode)("span",io,[(0,l.createElementVNode)("span",is,(0,l.toDisplayString)(ih.formatToCurrency(ih.calculateDiscountedPrice(i.item.discount,i.item.price))),1)])])],2)):(0,l.createCommentVNode)("v-if",!0)])],64))])])]),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",ia,[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["d-none d-sm-block btn dropdown-toggle-no-arrow dropdown-toggle-split p-0 border-0",{tour_item_menu:ih.extraItemTourKey===i.item.key,disabled:ih.isSelected&&ih.editManyEnabled}]),onClick:t[113]||(t[113]=e=>ih.showDropdown("actions",e)),style:{"z-index":"1"}},[...t[154]||(t[154]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2),(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["d-block d-sm-none btn dropdown-toggle-no-arrow dropdown-toggle-split p-0 border-0",{tour_item_menu:ih.extraItemTourKey===i.item.key,disabled:ih.isSelected&&ih.editManyEnabled}]),onClick:t[114]||(t[114]=e=>ih.showBottomMenu("actions",e)),style:{"z-index":"1"}},[...t[155]||(t[155]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2),(0,l.createElementVNode)("div",{class:"p-0 mt-auto clickable d-none d-md-block",title:ih.translate("delete_product_shorter"),onClick:t[115]||(t[115]=(...e)=>ih.removeItem&&ih.removeItem(...e)),style:{"z-index":"1"}},[...t[156]||(t[156]=[(0,l.createElementVNode)("svg",{height:"29",width:"29",class:"opacity-coarse-el",viewBox:"0 0 29 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-trash-btn"})],-1)])],8,ir)]))]),ih.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,onChange:t[116]||(t[116]=(...e)=>ih.setFiles&&ih.setFiles(...e)),multiple:"",name:"attachments",id:"attachments_"+i.item.key,type:"file",disabled:i.disabled,style:{display:"none"}},null,40,id)),ih.readOnly||!1!==i.isLast?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createBlock)(iw,{key:1,class:"pl-6",onPlusClick:t[117]||(t[117]=(0,l.withModifiers)(t=>e.$emit("show-dropdown",{reference:e.$refs.dropTarget,item:i.item,type:"add-item",sectionIndex:i.sectionIndex,itemIndex:i.itemIndex+1}),["prevent"])),"title-plus":ih.translate("add_new_item_here_for.tier_"+i.itemTier),"prevent-plus-add":!0,title:ih.translate("add_new_product_here"),onAdd:t[118]||(t[118]=t=>ih.addNewItem(e.$refs.dropTarget))},null,8,["title-plus","title"])),(0,l.createElementVNode)("div",ic,[(0,l.createElementVNode)("div",im,null,512)])],10,n)),[[iN,ih.away]])}],["__scopeId","data-v-50c9cf92"]])},77302(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>j});var l=i(41425);let n=["id"],o={class:"list-note d-flex flex-wrap flex-md-nowrap item-row py-12 sortable mb-36 mb-md-0 position-relative align-items-baseline align-items-md-stretch top-field-edit"},s={class:"d-flex flex-column py-1 flex-sm-row py-sm-0 flex-md-column py-md-1 align-items-sm-baseline",style:{"min-width":"33px"}},a=["title"],r=["title"],d=["title"],c={class:"w-100 order-2 order-md-1"},m={key:0,class:"d-flex pl-10 pb-12"},p=["title"],u=["title"],h={class:"p-0 item-label w-auto mr-6"},g={class:"truncate"},y={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},k={class:"tiptap tiptap-rendered"},v={key:1,class:"p-0 text-muted ws-pre"},f={key:2,class:"ms-2 fa fa-pencil text-muted edit-icon none-xs float-end"},x={type:"hidden"},w={key:0,class:"order-1 order-md-3 dropdown d-flex flex-column ms-auto"},E=["title"],b={class:"w-100 d-flex"},N={ref:"dropTarget"};var C=i(97478),B=i(33868),V=i(4221),_=i(3679),I=i(17924),S=i(94239),M=i(46167),F=i(248),P=i(74727),T=i(67369),z=i(16544),D=i(39941),O=i(6947),$=i(73451),A=i(88690),K=i(13582);let L=(0,l.defineAsyncComponent)(()=>Promise.all([i.e(5877),i.e(5502),i.e(6448),i.e(7687),i.e(6645),i.e(9139)]
3).then(i.bind(i,66645))),U={name:"row-note",mixins:[I.C],components:{Tiptap:L,FormCheckbox:O.A,QuickAdd:P.A,LinkPreviewContent:K.A},directives:{Validate:V.b},props:{itemTier:Number,sectionIndex:Number,itemIndex:Number,item:Object,isLast:Boolean,isDragging:Boolean},data:()=>({instance:null,lang:B.M.locale,editedField:null,mediaSizes:F.$.sizes,showMultiEdit:B.M.showMultiEdit,commandsItemNoteTemplates:$.A,TYPE_ITEM_NOTE_TEMPLATE:A.r5}),computed:{selectedCategory(){return S.rS.getCategoryById(this.item.category)},selectedCategoryName(){return null===this.selectedCategory?"-":this.selectedCategory.name},deactivated(){return B.M.errorKey&&B.M.errorKey!==this.item.key},isSelected(){return(0,T.isItemSelected)(this.item)},editManyEnabled:()=>B.M.editManyEnabled,readOnly:()=>B.M.readOnlyMode,extraItemTourKey:()=>B.M.extraItemTourKey,fieldsErrors:()=>B.M.fieldsErrors,isFocusedInput(){return B.M.focusedItem===this.item.key}},methods:{setEditedField(e,t){if(!this.readOnly){if(t?.target instanceof HTMLAnchorElement)return void window.open(t.target.href,"_blank");null===e&&(this.instance=null),"notes"===e&&this.$nextTick(()=>(0,z.U)(`item-${this.item.key}`,200,{behavior:"auto",block:"center"})),this.editedField=e}},stripHtml:z.QZ,resetItemFocus(){B.M.focusedItem=null},showDropdown(e,t){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-dropdown",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target})},showBottomMenu(e,t,i=null){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-bottom-menu",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target,...i?{item:i}:{}})},onSelectToggle(e,t=null){(0,T.handleSelectToggle)(this.item,e,t)},toggleHidden(){this.readOnly||(S.rS.isListTourActive()&&B.M.listTour.next(),M.f.toggleHidden(this.item))},setNotesAndClearError(e,t,i){this.item.notes!==e&&(delete this.fieldsErrors[`sections[${i}].items[${t}].notes`],this.setNotesValue(e))},removeItem(){if(this.isSelected&&this.editManyEnabled){(0,D.q3)(),(0,T.deselectAll)();return}(0,T.deselectItem)(this.item),(0,D.k_)(this.item)},addNewItem(){_.P.addNewItemBelow(this.sectionIndex,this.item)},translate:C.T},mounted(){this.isFocusedInput&&this.setEditedField("notes")}},j=(0,i(66262).A)(U,[["render",function(e,t,i,C,B,V){let _=(0,l.resolveComponent)("form-checkbox"),I=(0,l.resolveComponent)("link-preview-content"),S=(0,l.resolveComponent)("tiptap"),M=(0,l.resolveComponent)("quick-add"),F=(0,l.resolveDirective)("validate");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["position-relative opacity-coarse",{"box-shadow-edit-many":V.editManyEnabled&&V.isSelected,deactivated:V.deactivated,"box-shadow-selected":V.isSelected}]),style:{"scroll-margin":"40px"},id:`item-${i.item.key}`},[(0,l.createElementVNode)("div",o,[(0,l.createElementVNode)("div",s,[!B.showMultiEdit||V.readOnly||B.mediaSizes.isXs||B.mediaSizes.isSm?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["d-none d-md-flex p-0 w-100 justify-content-center align-items-center",{"opacity-coarse-el":!V.isSelected}])},[(0,l.createVNode)(_,{"model-value":V.isSelected,onChange:V.onSelectToggle,class:"p-svg font-18",style:{"margin-right":"0 !important","max-width":"20px"}},{extra:(0,l.withCtx)(()=>[...t[9]||(t[9]=[(0,l.createElementVNode)("svg",{width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg svg-icon border-gray bg-white"},[(0,l.createElementVNode)("path",{"data-v-21951d93":"",d:"M5.00301 8.99989L0.76001 4.75689L2.17401 3.34289L5.00301 6.17189L10.659 0.514893L12.074 1.92889L5.00301 8.99989Z",fill:"#2D9CDB"})],-1)])]),"off-extra":(0,l.withCtx)(()=>[...t[10]||(t[10]=[(0,l.createElementVNode)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l.createElementVNode)("rect",{x:"0.5",y:"0.5",width:"19",height:"19",stroke:"#BDC3C7"})],-1)])]),_:1},8,["model-value","onChange"])],2)),V.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:"d-none d-md-flex opacity p-0 mx-auto handle pt-16 pb-12",title:V.translate("ctrl_drag")},[...t[11]||(t[11]=[(0,l.createElementVNode)("svg",{class:"clickable non-hover",height:"14",width:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-handler"})],-1),(0,l.createElementVNode)("svg",{class:"clickable on-hover",height:"14",width:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-handler-dark"})],-1)])],8,a)),V.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:(0,l.normalizeClass)(["col-1 d-md-flex justify-content-center align-items-center mx-auto clickable d-none eye-toggler",{tour_item_hidden:V.extraItemTourKey===i.item.key}]),onMousedown:t[0]||(t[0]=(0,l.withModifiers)((...e)=>V.toggleHidden&&V.toggleHidden(...e),["prevent"]))},[i.item.is_hidden?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,style:{"margin-top":"2px"},title:V.translate("remove_hidden_short"),width:"22",height:"19",viewBox:"0 0 22 19","aria-hidden":"true"},[...t[12]||(t[12]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye-purple"},null,-1)])],8,r)):((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,class:"opacity-coarse-el",title:V.translate("set_as_hidden_note"),width:"22",height:"12",viewBox:"0 0 22 12","aria-hidden":"true"},[...t[13]||(t[13]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye"},null,-1)])],8,d))],34))]),(0,l.createElementVNode)("div",c,[i.item.category||i.item.is_hidden?((0,l.openBlock)(),(0,l.createElementBlock)("div",m,[i.item.is_hidden?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:"purple-label text-uppercase mr-18",title:V.translate("private_for_client")},[t[14]||(t[14]=(0,l.createElementVNode)("svg",{width:"10",height:"12",viewBox:"0 0 10 12","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-lock-purple"})],-1)),(0,l.createTextVNode)(" "+(0,l.toDisplayString)(V.translate("private")),1)],8,p)):(0,l.createCommentVNode)("v-if",!0),i.item.category?((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:1,class:"d-flex field-edit align-items-baseline position-relative mb-0",title:V.selectedCategoryName},[(0,l.createElementVNode)("span",h,(0,l.toDisplayString)(V.translate("note_category")),1),(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 d-table-layout col item-value",{clickable:!V.readOnly}]),style:{"max-width":"250px"},onClick:t[1]||(t[1]=e=>V.showDropdown("category",e))},[(0,l.createElementVNode)("span",g,[(0,l.createTextVNode)((0,l.toDisplayString)(V.selectedCategoryName)+" ",1),V.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",y))])],2)],8,u)):(0,l.createCommentVNode)("v-if",!0)])):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["field-edit pr-12 pl-10 pe-md-0 font-notes position-relative w-100 note-preview mt-6 mt-md-0",{"border-danger":"notes"!==B.editedField&&V.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`]}]),onClick:t[4]||(t[4]=e=>V.setEditedField("notes"))},[(0,l.createElementVNode)("div",k,["notes"!==B.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["d-flex align-items-baseline",{"cursor-text":!V.readOnly}])},[V.stripHtml(i.item.notes).length>0||i.item.notes?.includes("data-link-preview-node")?((0,l.openBlock)(),(0,l.createBlock)(I,{key:0,class:"w-100",html:i.item.notes,"enabled-providers":["external"]}
3,null,8,["html"])):((0,l.openBlock)(),(0,l.createElementBlock)("div",v,(0,l.toDisplayString)(V.readOnly?"":V.translate("notes_comments")),1)),V.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",f))],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createBlock)(S,{key:1,value:i.item.notes,onAway:t[2]||(t[2]=e=>(V.setEditedField(null),V.resetItemFocus())),onInput:t[3]||(t[3]=e=>V.setNotesAndClearError(e,i.itemIndex,i.sectionIndex)),"on-create":e=>B.instance=e,"templates-active":!0,"templates-type":B.TYPE_ITEM_NOTE_TEMPLATE,menu:!0,"comment-link-previews":!1,"attachment-link-previews":!1,class:"content-editor",placeholder:V.readOnly?"":V.translate("proposal.command_template"),autofocus:!0},null,8,["value","on-create","templates-type","placeholder"])),[[l.vShow,null!==B.instance]])]),(0,l.withDirectives)((0,l.createElementVNode)("input",x,null,512),[[F,V.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`],void 0,{tooltip:!0}]])],2)]),V.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",w,[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["d-none d-sm-block btn dropdown-toggle-no-arrow dropdown-toggle-split px-6 py-3p ml-12 mr-6 border-0",{tour_item_menu:V.extraItemTourKey===i.item.key,disabled:V.isSelected&&V.editManyEnabled}]),onClick:t[5]||(t[5]=e=>V.showDropdown("actions",e)),style:{"z-index":"1"}},[...t[15]||(t[15]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2),(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["d-block d-sm-none btn dropdown-toggle-no-arrow dropdown-toggle-split px-6 py-3p ml-12 mr-6 border-0",{tour_item_menu:V.extraItemTourKey===i.item.key,disabled:V.isSelected&&V.editManyEnabled}]),onClick:t[6]||(t[6]=e=>V.showBottomMenu("actions",e))},[...t[16]||(t[16]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2),(0,l.createElementVNode)("div",{class:"px-6 py-1 ml-12 mr-6 mt-auto clickable d-none d-md-block",title:V.translate("delete_product_shorter"),onClick:t[7]||(t[7]=(...e)=>V.removeItem&&V.removeItem(...e))},[...t[17]||(t[17]=[(0,l.createElementVNode)("svg",{height:"29",width:"29",class:"opacity-coarse-el",viewBox:"0 0 29 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-trash-btn"})],-1)])],8,E)]))]),V.readOnly||!1!==i.isLast?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createBlock)(M,{key:0,class:"pl-6",onPlusClick:t[8]||(t[8]=(0,l.withModifiers)(t=>e.$emit("show-dropdown",{reference:e.$refs.dropTarget,item:i.item,type:"add-item",sectionIndex:i.sectionIndex,itemIndex:i.itemIndex+1}),["prevent"])),"title-plus":V.translate("add_new_item_here_for.tier_"+i.itemTier),"prevent-plus-add":!0,title:V.translate("add_new_product_here"),onAdd:V.addNewItem},null,8,["title-plus","title","onAdd"])),(0,l.createElementVNode)("div",b,[(0,l.createElementVNode)("div",N,null,512)])],10,n)}],["__scopeId","data-v-6fc9ed6c"]])},27877(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>R});var l=i(41425);let n=["id"],o={class:"list-visualization d-flex flex-wrap flex-md-nowrap item-row py-12 sortable mb-36 mb-md-0 position-relative align-items-baseline align-items-md-stretch top-field-edit"},s={key:0,class:"d-flex flex-column py-1 flex-sm-row py-sm-0 flex-md-column py-md-1 align-items-sm-baseline",style:{"min-width":"33px"}},a=["title"],r=["title"],d=["title"],c={class:"order-0 px-6 d-flex flex-column col col-md-auto align-items-baseline mx-6"},m={class:"w-100 order-2 order-md-1 d-flex flex-column"},p={key:0,class:"kis-notify kis-notify-xs kis-notify-warning mb-1"},u={class:"kis-notify-text"},h={class:"kis-notify-title"},g=["title"],y={class:"p-0 item-label w-auto mr-6"},k={class:"truncate"},v={key:0,class:"fa fa-pencil text-muted edit-icon none-xs position-absolute-edit-icon float-end lh-20"},f={class:"h-100 tiptap tiptap-rendered"},x={key:1,class:"p-0 text-muted ws-pre"},w={key:2,class:"ms-2 fa fa-pencil text-muted edit-icon none-xs float-end"},E={type:"hidden"},b={key:1,class:"order-1 order-md-3 dropdown d-flex flex-column ms-auto mb-auto mb-md-0"},N=["title"],C={class:"w-100 d-flex"},B={ref:"dropTarget"};var V=i(97478),_=i(33868),I=i(4221),S=i(3679),M=i(17924),F=i(94239),P=i(46167),T=i(248),z=i(74727),D=i(67369),O=i(16544),$=i(54367),A=i(39941),K=i(6947),L=i(13582),U=i(88690);let j=(0,l.defineAsyncComponent)(()=>Promise.all([i.e(5877),i.e(5502),i.e(6448),i.e(7687),i.e(6645),i.e(9139)]
3).then(i.bind(i,66645))),H={name:"row-visualization",mixins:[M.C],components:{LinkPreviewContent:L.A,Tiptap:j,FormCheckbox:K.A,ItemImage:$.A,QuickAdd:z.A},directives:{Validate:I.b},props:{itemTier:Number,sectionIndex:Number,itemIndex:Number,item:Object,isLast:Boolean,isDragging:Boolean},data:()=>({instance:null,lang:_.M.locale,editedField:null,mediaSizes:T.$.sizes,showMultiEdit:_.M.showMultiEdit,TYPE_ITEM_NOTE_TEMPLATE:U.r5}),computed:{isVisualizationItemPendingUpload(){return F.rS.isVisualizationItemPendingUpload(this.item.key)},itemTypeIsAvailable(){return F.rS.isItemTypeAvailable(this.item.type)},itemIsHidden(){return this.item.is_hidden||!1===this.itemTypeIsAvailable&&!_.M.readOnlyMode},selectedCategory(){return F.rS.getCategoryById(this.item.category)},selectedCategoryName(){return null===this.selectedCategory?"-":this.selectedCategory.name},listId:()=>_.M.listId,totalCommentsCount(){return _.M.totalCommentsCount[this.item.key]&&_.M.totalCommentsCount[this.item.key]||0},unreadCommentsCount(){let e=0;return e=_.M.unreadComments[this.item.key]?_.M.unreadComments[this.item.key]?.unread_comments.length:0,_.M.unreadLiveProposalComments[this.item.key]&&(e+=_.M.unreadLiveProposalComments[this.item.key]?.unread_comments.length),_.M.teamUnreadCountMap[this.item.key]&&(e+=_.M.teamUnreadCountMap[this.item.key]),e},deactivated(){return _.M.errorKey&&_.M.errorKey!==this.item.key},isSelected(){return(0,D.isItemSelected)(this.item)},editManyEnabled:()=>_.M.editManyEnabled,readOnlyMode:()=>_.M.readOnlyMode,readOnly(){return _.M.readOnlyMode||!1===this.itemTypeIsAvailable},extraItemTourKey:()=>_.M.extraItemTourKey,fieldsErrors:()=>_.M.fieldsErrors,isFocusedInput(){return _.M.focusedItem===this.item.key}},methods:{stripHtml:O.QZ,resetItemFocus(){_.M.focusedItem=null},showDropdown(e,t){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-dropdown",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target})},showBottomMenu(e,t,i=null){this.readOnly||"actions"===e&&this.isSelected&&this.editManyEnabled||this.$emit("show-bottom-menu",{key:this.item.key,itemIndex:this.itemIndex,sectionIndex:this.sectionIndex,type:e,reference:t.target,...i?{item:i}:{}})},onSelectToggle(e,t=null){(0,D.handleSelectToggle)(this.item,e,t)},setEditedField(e,t){if(!this.readOnly){if(t?.target instanceof HTMLAnchorElement)return void window.open(t.target.href,"_blank");null===e&&(this.instance=null),"notes"===e&&this.$nextTick(()=>(0,O.U)(`item-${this.item.key}`,200,{behavior:"auto",block:"center"})),this.editedField=e}},toggleHidden(){this.readOnly||(F.rS.isListTourActive()&&_.M.listTour.next(),P.f.toggleHidden(this.item))},setNotesAndClearError(e,t,i){this.item.notes!==e&&(delete this.fieldsErrors[`sections[${i}].items[${t}].notes`],this.setNotesValue(e))},removeItem(){if(F.rS.isVisualizationItemPendingUpload(this.item.key)){if(S.P.removeVisualizationItemFromQueue(this.item.key),this.isSelected&&this.editManyEnabled){removeSelectedItems(),(0,D.deselectAll)();return}(0,D.deselectItem)(this.item),S.P.removeItem(this.sectionIndex,this.itemIndex);return}if(this.isSelected&&this.editManyEnabled){(0,A.q3)(),(0,D.deselectAll)();return}(0,D.deselectItem)(this.item),(0,A.k_)(this.item)},addNewItem(){S.P.addNewItemBelow(this.sectionIndex,this.item)},translate:V.T},mounted(){this.isFocusedInput&&this.setEditedField("notes")}},R=(0,i(66262).A)(H,[["render",function(e,t,i,V,_,I){let S=(0,l.resolveComponent)("form-checkbox"),M=(0,l.resolveComponent)("item-image"),F=(0,l.resolveComponent)("link-preview-content"),P=(0,l.resolveComponent)("tiptap"),T=(0,l.resolveComponent)("quick-add"),z=(0,l.resolveDirective)("validate");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["position-relative opacity-coarse",{"box-shadow-edit-many":I.editManyEnabled&&I.isSelected,deactivated:I.deactivated,"box-shadow-selected":I.isSelected}]),style:{"scroll-margin":"40px"},id:`item-${i.item.key}`},[(0,l.createElementVNode)("div",o,[_.mediaSizes.isXs||_.mediaSizes.isSm?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",s,[!_.showMultiEdit||I.readOnly||_.mediaSizes.isXs||_.mediaSizes.isSm||!1!==I.isVisualizationItemPendingUpload?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["d-none d-md-flex p-0 w-100 justify-content-center align-items-center",{"opacity-coarse-el":!I.isSelected}])},[(0,l.createVNode)(S,{"model-value":I.isSelected,onChange:I.onSelectToggle,class:"p-svg font-18",style:{"margin-right":"0 !important","max-width":"20px"}},{extra:(0,l.withCtx)(()=>[...t[11]||(t[11]=[(0,l.createElementVNode)("svg",{width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg svg-icon border-gray bg-white"},[(0,l.createElementVNode)("path",{"data-v-21951d93":"",d:"M5.00301 8.99989L0.76001 4.75689L2.17401 3.34289L5.00301 6.17189L10.659 0.514893L12.074 1.92889L5.00301 8.99989Z",fill:"#2D9CDB"})],-1)])]),"off-extra":(0,l.withCtx)(()=>[...t[12]||(t[12]=[(0,l.createElementVNode)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l.createElementVNode)("rect",{x:"0.5",y:"0.5",width:"19",height:"19",stroke:"#BDC3C7"})],-1)])]),_:1},8,["model-value","onChange"])],2)),I.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:"d-none d-md-flex opacity p-0 mx-auto handle pt-16 pb-12",title:I.translate("ctrl_drag")},[...t[13]||(t[13]=[(0,l.createElementVNode)("svg",{class:"clickable non-hover",height:"14",width:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-handler"})],-1),(0,l.createElementVNode)("svg",{class:"clickable on-hover",height:"14",width:"14",viewBox:"0 0 14 14","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-handler-dark"})],-1)])],8,a)),I.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:(0,l.normalizeClass)(["col-1 d-md-flex justify-content-center align-items-center mx-auto clickable d-none eye-toggler",{tour_item_hidden:I.extraItemTourKey===i.item.key}]),onClick:t[0]||(t[0]=(0,l.withModifiers)((...e)=>I.toggleHidden&&I.toggleHidden(...e),["prevent"]))},[I.itemIsHidden?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:0,style:{"margin-top":"2px"},title:I.translate("remove_hidden_short"),width:"22",height:"19",viewBox:"0 0 22 19","aria-hidden":"true"},[...t[14]||(t[14]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye-off"},null,-1)])],8,r)):((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:1,class:"opacity-coarse-el",title:I.translate("set_as_hidden_note"),width:"22",height:"12",viewBox:"0 0 22 12","aria-hidden":"true"},[...t[15]||(t[15]=[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-eye"},null,-1)])],8,d))],2))])),(0,l.createElementVNode)("div",c,[(0,l.createVNode)(M,{"thumb-filter":"vis_thumb","is-gallery-slide":!0,"img-class":"object-position-top visualization","show-comments-info":I.itemTypeIsAvailable,"unread-comments-count":I.unreadCommentsCount,"total-comments-count":I.totalCommentsCount,onShowUnread:t[1]||(t[1]=t=>e.$emit("show-unread",i.item.key)),onShowGallery:t[2]||(t[2]=t=>e.$emit("show-gallery",t)),class:(0,l.normalizeClass)([{is_hidden:I.itemIsHidden,handle:!I.readOnly},"d-flex flex-column mx-auto"]),"is-selected":!1,"edit-many-enabled":I.editManyEnabled,item:i.item,"item-index":i.itemIndex,"section-index":i.sectionIndex,disabled:!I.listId,"show-preview":!i.isDragging},null,8,["show-comments-info","unread-comments-count","total-comments-count","class","edit-many-enabled","item","item-index","section-index","disabled","show-preview"])]),(0,l.createElementVNode)("div",m,[!1!==I.itemTypeIsAvailable||I.readOnlyMode?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",p,[t[16]||(t[16]=(0,l.createElementVNode)("svg",{height:"18",width:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-notify-warning"})],-1)),(0,l.createElementVNode)("div",u,[(0,l.createElementVNode)("div",h,(0,l.toDisplayString)(I.translate("unavailable_in_plan")),1
3)])])),i.item.category?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["d-flex pl-10 pb-12",{is_hidden:I.itemIsHidden}])},[i.item.category?((0,l.openBlock)(),(0,l.createElementBlock)("label",{key:0,class:"d-flex field-edit align-items-baseline position-relative mb-0",title:I.selectedCategoryName},[(0,l.createElementVNode)("span",y,(0,l.toDisplayString)(I.translate("visualization_category")),1),(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["p-0 d-table-layout col item-value",{clickable:!I.readOnly}]),style:{"max-width":"250px"},onClick:t[3]||(t[3]=e=>I.showDropdown("category",e))},[(0,l.createElementVNode)("span",k,[(0,l.createTextVNode)((0,l.toDisplayString)(I.selectedCategoryName)+" ",1),I.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",v))])],2)],8,g)):(0,l.createCommentVNode)("v-if",!0)],2)):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["field-edit px-2 ps-sm-2 pr-14 pe-md-0 font-notes position-relative h-100 w-100 note-preview mt-6 mt-md-0 mx-1 mx-sm-0",{is_hidden:I.itemIsHidden,"border-danger":"notes"!==_.editedField&&I.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`]}]),onClick:t[6]||(t[6]=e=>I.setEditedField("notes"))},[(0,l.createElementVNode)("div",f,["notes"!==_.editedField?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["d-flex align-items-baseline",{"cursor-text":!I.readOnly}])},[I.stripHtml(i.item.notes).length>0||i.item.notes?.includes("data-link-preview-node")?((0,l.openBlock)(),(0,l.createBlock)(F,{key:0,class:"w-100",html:i.item.notes,"enabled-providers":["external"]},null,8,["html"])):((0,l.openBlock)(),(0,l.createElementBlock)("div",x,(0,l.toDisplayString)(I.readOnly?"":I.translate("notes_comments")),1)),I.readOnly?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",w))],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createBlock)(P,{key:1,value:i.item.notes,onInput:t[4]||(t[4]=e=>I.setNotesAndClearError(e,i.itemIndex,i.sectionIndex)),onAway:t[5]||(t[5]=e=>(I.setEditedField(null),I.resetItemFocus())),"on-create":e=>_.instance=e,"templates-active":!0,"templates-type":_.TYPE_ITEM_NOTE_TEMPLATE,menu:!0,"comment-link-previews":!1,"attachment-link-previews":!1,class:"content-editor",placeholder:I.readOnly?"":I.translate("proposal.command_template")},null,8,["value","on-create","templates-type","placeholder"])),[[l.vShow,null!==_.instance]])]),(0,l.withDirectives)((0,l.createElementVNode)("input",E,null,512),[[z,I.fieldsErrors[`sections[${i.sectionIndex}].items[${i.itemIndex}].notes`],void 0,{tooltip:!0}]])],2)]),I.readOnly&&!1!==I.itemTypeIsAvailable?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",b,[I.itemTypeIsAvailable?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)(["d-none d-sm-block btn dropdown-toggle-no-arrow dropdown-toggle-split px-6 py-3p ml-12 mr-6 border-0",{tour_item_menu:I.extraItemTourKey===i.item.key,disabled:I.isSelected&&I.editManyEnabled}]),onClick:t[7]||(t[7]=e=>I.showDropdown("actions",e)),style:{"z-index":"1"}},[...t[17]||(t[17]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2)):(0,l.createCommentVNode)("v-if",!0),I.itemTypeIsAvailable?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:(0,l.normalizeClass)(["d-block d-sm-none btn dropdown-toggle-no-arrow dropdown-toggle-split px-6 py-3p ml-12 mr-6 border-0",{tour_item_menu:I.extraItemTourKey===i.item.key,disabled:I.isSelected&&I.editManyEnabled}]),onClick:t[8]||(t[8]=e=>I.showBottomMenu("actions",e)),style:{"z-index":"1"}},[...t[18]||(t[18]=[(0,l.createElementVNode)("svg",{width:"29",height:"29",viewBox:"0 0 29 29","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dots"})],-1)])],2)):(0,l.createCommentVNode)("v-if",!0),I.readOnlyMode?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:"px-6 py-1 ml-12 mr-6 mt-auto clickable d-none d-md-block mt-auto",title:I.translate("delete_product_shorter"),onClick:t[9]||(t[9]=(...e)=>I.removeItem&&I.removeItem(...e)),style:{"z-index":"1"}},[...t[19]||(t[19]=[(0,l.createElementVNode)("svg",{height:"29",width:"29",class:"opacity-coarse-el",viewBox:"0 0 29 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-trash-btn"})],-1)])],8,N))]))]),I.readOnly||!1!==i.isLast?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createBlock)(T,{key:0,class:"pl-6",onPlusClick:t[10
3]||(t[10]=(0,l.withModifiers)(t=>e.$emit("show-dropdown",{reference:e.$refs.dropTarget,item:i.item,type:"add-item",sectionIndex:i.sectionIndex,itemIndex:i.itemIndex+1}),["prevent"])),"title-plus":I.translate("add_new_item_here_for.tier_"+i.itemTier),"prevent-plus-add":!0,title:I.translate("add_new_product_here"),onAdd:I.addNewItem},null,8,["title-plus","title","onAdd"])),(0,l.createElementVNode)("div",C,[(0,l.createElementVNode)("div",B,null,512)])],10,n)}],["__scopeId","data-v-66f3bca5"]])},69735(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>es});var l=i(41425);let n={class:"p-0"},o={class:"list-sections",id:"table-new",style:{position:"relative"}},s={key:0,class:"sections-loading-overlay"},a={class:"list-section-borders view-table-new m-0"},r=["onClick","title"],d=["title"],c={type:"hidden"},m=["onBlur","maxlength","value","onInput","onChange","onKeyup","placeholder"],p=["onClick"],u={class:"position-relative d-flex align-items-center flex-fill"},h={key:0,class:"bg-white pe-2"},g=["onClick","title"],y={key:0},k={key:1},v={class:"item-row"},f={key:1,style:{height:"180px"}},x=["onClick"],w={class:"item-row dashed me-0"},E={style:{"min-width":"33px"},class:"d-flex justify-content-center align-items-center"},b=["onClick","title"],N=["onClick"],C=["innerHTML"],B={class:"list-section-borders position-relative d-flex align-items-center"},V={class:"col-12 pl-3p ps-sm-2 pe-0 position-relative"},_={class:"offer-input section-name d-flex w-100 focused align-items-center position-relative pe-0"};i(18111),i(18237),i(14603),i(47566),i(98721),i(44114),i(22489),i(13579);var I=i(3679),S=i(46167),M=i(248),F=i(14961),P=i(35178),T=i(67369),z=i(39941),D=i(99537),O=i(82866),$=i(432),A=i.n($),K=i(6947),L=i(75393),U=i(44347),j=i(27039),H=i(88597),R=i(85995),X=i(16544),q=i(4221),Q=i(97478),Z=i(63997),Y=i(77302),W=i(27877),G=i(31839),J=i(94239),ee=i(55176),et=i(33868);let ei=(0,U.D7)(),el=null;function en(){return el||(el=new IntersectionObserver(e=>{for(let t of e)t.target.__intersectCallback?.(t.isIntersecting,t)},{rootMargin:"600px"})),el}let eo={name:"ListTable",directives:{Validate:q.b,FocusOnCreate:j.J,intersect:{mounted(e,t){t.value&&(e.__intersectCallback=(i,l)=>{t.value(i,l,e)},en().observe(e))},unmounted(e){el?.unobserve(e),delete e.__intersectCallback}}},components:{FormCheckbox:K.A,SectionActions:P.A,Draggable:A(),BottomMenu:D.default,Skeleton:O.A,LoaderDots:G.A,"row-default":Z.default,"row-note":Y.default,"row-visualization":W.default,...Object.keys(et.M.allTemplates).reduce((e,t)=>["default","note","visualization"].includes(t)?e:Object.assign(e,{[`row-${t}`]:(0,l.defineAsyncComponent)(()=>i(85839)(`./row-${t}.vue`))}),{})},props:{isIntroTour:Boolean,itemTier:Number,viewType:String},mixins:[H.A],data:()=>({renderLimit:30,visibleItems:{},activeItemKey:new URLSearchParams(globalThis.location.search).get("item")??new URLSearchParams(globalThis.location.search).get("opinionItem"),groupNamesMap:ee.K,enabledUserDefinedColors:et.M.enabledUserDefinedColors,showMultiEdit:et.M.showMultiEdit,errorItemText:et.M.errorItemText,inputMaxlength:et.M.inputMaxlength,itemStatuses:et.M.item_statuses,itemCategories:et.M.item_categories,disableSelectSectionName:!1,editedSection:null,isAdvanced:et.M.isAdvanced,isPremium:et.M.isPremium}),watch:{focusedSection(e){this.editedSection=e}},computed:{isPartiallyLoaded:()=>et.M.isPartiallyLoaded,groupBy:()=>et.M.groupBy,userDefinedColors:()=>et.M.userDefinedColors,deactivated:()=>!!et.M.errorKey,readOnly:()=>et.M.readOnlyMode,stepByStepUrl:()=>Routing.generate("step_by_step"),mediaSizes:()=>M.$.sizes,extraTourSectionKey:()=>et.M.extraTourSectionKey,focusedSection:()=>et.M.focusedSection,hasAnyItemsSelected:()=>(0,T.hasSomeItemSelected)(),fieldsErrors:{get:()=>et.M.fieldsErrors,set:e=>et.M.fieldsErrors=e},listSections:()=>J.rS.listSections(),totalItemCount(){return this.listSections.reduce((e,t)=>e+t.items.length,0)},sectionRenderOffsets(){let e=[],t=0;for(let i of this.listSections)e.push(t),t+=i.items.length;return e},canCloneSection(){return et.M.canCloneSection&&null===this.groupBy},showSectionsLoader:()=>
3et.M.isListBusy||et.M.isPartiallyLoaded&&J.rS.isAnyFilterActive()},methods:{isItemRendered(e,t){return(this.sectionRenderOffsets[e]??0)+t<this.renderLimit},isItemVisible(e){return this.activeItemKey===e||!!this.visibleItems[e]},onIntersect(e,t,i,l){t&&(this.visibleItems[e]=!0,l&&en().unobserve(l))},onMove(e){if(this.groupBy&&e.from!==e.to)return ei(500).then(()=>{this.$toastWarning({title:"toast.cant_move_section_title",content:"toast.cant_move_section_content",duration:1e4})}),!1},getSectionName(e){return this.groupBy?L.sF.includes(e.key)?(0,Q.T)(`static_groups.${e.key}.${this.groupBy}`):this.groupNamesMap[this.groupBy]?.[e.key]||e.name:e.name},onSectionInputBlur(e,t){if(this.editedSection=null,this.$emit("section-name-blur"),""===e.name.trim()){let e=J.rS.getNewSectionName(this.translate("default_section_name"));S.f.setSectionName(t,e)}},notDeletedCount:e=>e.filter(e=>!1===(0,z.LS)(e.key)).length,sectionContainsCalculable:e=>e?.items.length>0&&e?.items.some(e=>et.M.calculableItemTypes.includes(e.type)),itemNotFilteredAndCalculable(e){return this.itemNotFiltered(e)&&et.M.calculableItemTypes.includes(e.type)},itemRowComponent:e=>`row-${e}`,hasSomeItemsSelected:e=>(0,T.hasSomeItemSelected)(e),hasAllSelected:e=>(0,T.hasAllSelected)(e),onSelectAll(e,t){e?(0,T.selectAllInSection)(t):(0,T.deselectAllInSection)(t)},onSelectNameFocus(e){!1===this.disableSelectSectionName&&e.target.select(),this.disableSelectSectionName=!1},editSection(e){this.groupBy||(this.editedSection=e,this.disableSelectSectionName=!0)},cloneSection(e){!1!==this.canCloneSection&&I.P.cloneSection(e)},addNewSectionBelow(e){if(this.groupBy)return;let t=I.P.addNewSection(!0,e);this.$emit("add-new-section",t)},addNewSection(){if(this.groupBy)return;let e=I.P.addNewSection(!0);this.$emit("add-new-section",e)},isSectionVisible:e=>J.rS.isSectionVisible(e),sectionTotalItemsCount:(e,t)=>J.rS.sectionTotalItemsCount(e,t),sectionTotalValue:(e,t)=>J.rS.sectionTotalValue(e,t),isNotLastSection(e){return e<this.listSections.length-1},removeSection(e,t){(0,z.O8)(e,t),I.P.removeVisualizationItemFromQueueForSection(e),I.P.clearAttachmentsUploadForSection(e)},moveSection(e,t){I.P.moveSection(e,t)},toggleSectionVisibility(e){0!==e.items.length&&I.P.toggleSectionVisibility(e.key)},itemNotFiltered:e=>!1===J.rS.isListFiltered()&&!1===et.M.showOnlySelected&&!1===et.M.hideHidden&&(0,z.gg)()||(0,J.EB)(e),sectionNotFiltered(e){return(0,J.gE)(e)&&(!1===J.rS.isListFilteredExceptSection()||this.shoppingListItems(e.items).length>0)},setSectionName(e,t){I.P.clearError(`sections[${t}].name`),S.f.setSectionName(t,e.target.value),this.$emit("name-input")},onSectionNameChange(e,t){if(""===e.target.value.trim()){let e=J.rS.getNewSectionName(this.translate("default_section_name"));S.f.setSectionName(t,e)}},shoppingListItems:e=>J.rS.listItems(e),updateItemOrder(e,t){R.A.updateItemOrder(e,t)},changeColor(e,t,i){if(!this.readOnly){if(this.userDefinedColors.length>0)return void this.$emit("show-dropdown",{x:i.clientX,y:i.clientY,item:t,type:"section-color-picker"});I.P.randomizeSectionColor(e)}},sectionBarStyle:X.II,translate:Q.T,cloneDraggable:e=>I.P.cloneItem(e),formatToCurrency:e=>(0,F.vv)(e,et.M.currency)},mounted(){this.$emit("loaded")}},es=(0,i(66262).A)(eo,[["render",function(e,t,i,I,S,M){let F=(0,l.resolveComponent)("loader-dots"),P=(0,l.resolveComponent)("form-checkbox"),T=(0,l.resolveComponent)("Skeleton"),z=(0,l.resolveComponent)("section-actions"),D=(0,l.resolveComponent)("draggable"),O=(0,l.resolveDirective)("validate"),$=(0,l.resolveDirective)("focus-on-create"),A=(0,l.resolveDirective)("intersect");return(0,l.openBlock)(),(0,l.createElementBlock)("div",null,[(0,l.createElementVNode)("div",n,[(0,l.createElementVNode)("div",o,[M.showSectionsLoader?((0,l.openBlock)(),(0,l.createElementBlock)("div",s,[(0,l.createVNode)(F)])):(0,l.createCommentVNode)("v-if",!0),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(M.listSections,(n,o)=>(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:n.key,class:(0,l.normalizeClass)(["list-section position-relative container-responsive section-opacity",M.hasAnyItemsSelected?"section-visible-edit":"section-edit"])},[S.showMultiEdit&&!M.readOnly&&!M.mediaSizes.isXs&&!M.mediaSizes.isSm&&M.sectionNotFiltered(n)?((0,l.openBlock)(),(0,l.createBlock)(P,{key:0,class:(0,l.normalizeClass)(["select-all-toggler section-opacity-el p-svg p-round p-smooth me-2 d-flex",{"select-radio-some":M.hasSomeItemsSelected(n)&&!M.hasAllSelected(n)}]),title:M.translate("select_all_in_section"),disabled:0===M.notDeletedCount(n.items)||M.deactivated,onChange:e=>M.onSelectAll(e,o),"model-value":M.hasAllSelected(n),style:(0,l.normalizeStyle)(M.hasAllSelected(n)?"opacity: 1":"")},{"off-extra":(0,l.withCtx)(()=>[...t[8]||(t[8]=[(0,l.createElementVNode)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l.createElementVNode)("circle",{cx:"13",cy:"13",r:"12.5",stroke:"#BDC3C7"})],-1)])]),extra:(0,l.withCtx)(()=>[...t[9]||(t[9]=[(0,l.createElementVNode)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,l.createElementVNode)("path",{d:"M20 13C20 9.13401 16.866 6 13 6C9.13401 6 6 9.13401 6 13C6 16.866 9.13401 20 13 20C16.866 20 20 16.866 20 13Z",fill:"#2D9CDB"}),(0,l.createElementVNode)("circle",{cx:"13",cy:"13",r:"12.5",stroke:"#BDC3C7"})],-1)])]),_:1},8,["title","class","disabled","onChange","model-value","style"])):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("div",a,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["list-section-bar",{clickable:!M.readOnly,deactivated:M.deactivated}]),style:(0,l.normalizeStyle)(M.sectionBarStyle(n)),onClick:e=>M.changeColor(o,n,e),title:M.translate("change_color")},null,14,r),(0,l.createCommentVNode)("section name"),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["tour_section_name list-head-wrapper position-relative",{deactivated:M.deactivated}]),style:(0,l.normalizeStyle)(`border-color: ${n.color}`),title:M.getSectionName(n)},[(0,l.withDirectives)((0,l.createElementVNode)("input",c,null,512),[[O,M.fieldsErrors[`sections[${o}].name`],void 0,{tooltip:!0,div:!0,top:!0,scroll:!0}]]),S.editedSection!==n.key||M.readOnly?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["list-head section-name focused field-edit",{"border-danger":M.fieldsErrors[`sections[${o}].name`]}])},[(0,l.createElementVNode)("div",{onClick:e=>M.editSection(n.key),class:(0,l.normalizeClass)(["list-head-name bg-white pe-2 break-long-words",{"curs
3or-default":M.groupBy}])},(0,l.toDisplayString)(M.getSectionName(n)),11,p),(0,l.createElementVNode)("div",u,[Array.isArray(n.items)?((0,l.openBlock)(),(0,l.createElementBlock)("div",h,[M.sectionContainsCalculable(n)||!1===M.isSectionVisible(n.key)?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["count-pill ms-0 text-nowrap",{"count-pill-alt":!1===M.isSectionVisible(n.key),clickable:n.items.length>0}]),onClick:e=>M.toggleSectionVisibility(n),title:M.translate(M.isSectionVisible(n.key)?"collapse_section":"expand_section")},[!1===M.isSectionVisible(n.key)?((0,l.openBlock)(),(0,l.createElementBlock)("span",y,(0,l.toDisplayString)(M.translate("hidden_products_short")),1)):((0,l.openBlock)(),(0,l.createElementBlock)("span",k,[null!==M.sectionTotalItemsCount(n,M.itemNotFilteredAndCalculable)?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createTextVNode)((0,l.toDisplayString)(M.sectionTotalItemsCount(n,M.itemNotFilteredAndCalculable)),1)],64)):((0,l.openBlock)(),(0,l.createBlock)(T,{key:1,width:"1rem",he
3ight:"0.75rem",class:"d-inline-block",style:{"background-color":"#ededed"}}))]))],10,g)):(0,l.createCommentVNode)("v-if",!0)])):(0,l.createCommentVNode)("v-if",!0),(0,l.createElementVNode)("div",{class:"section-menu-bar me-3 position-absolute",style:(0,l.normalizeStyle)(`background-color: ${n.color}`)},null,4),(0,l.createVNode)(z,{"item-tier":i.itemTier,class:"d-flex align-items-center ms-auto shift-right-more",deletable:!M.groupBy,onAddItem:t=>e.$emit("show-dropdown",{reference:t.target,item:"add-item",type:"add-item",sectionIndex:o,sectionKey:n.key,itemIndex:0}),onCloneSection:e=>M.cloneSection(o),onMoveSection:e=>M.moveSection(o,e),onRemoveSection:e=>M.removeSection(n.key,n.name),onToggleSectionVisibility:e=>M.toggleSectionVisibility(n),"add-extra-tour-class":n.key===M.extraTourSectionKey,"section-items":n.items,"can-clone-section":M.canCloneSection,"is-not-last-section":M.isNotLastSection(o),"is-section-visible":M.isSectionVisible(n.key),section_index:o,"view-type":i.viewType,section:n,"read-only":M.readOnly,"section-name":n.name},null,8,["item-tier","deletable","onAddItem","onCloneSection","onMoveSection","onRemoveSection","onToggleSectionVisibility","add-extra-tour-class","section-items","can-clone-section","is-not-last-section","is-section-visible","section_index","view-type","section","read-only","section-name"])])],2)):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,onBlur:e=>M.onSectionInputBlur(n,o),maxlength:S.inputMaxlength,value:n.name,onInput:e=>M.setSectionName(e,o),onChange:e=>M.onSectionNameChange(e,o),onKeyup:[t[0]||(t[0]=(0,l.withKeys)(e=>e.target.blur(),["enter"])),(0,l.withKeys)((0,l.withModifiers)(e=>(e.target.blur(),M.addNewSectionBelow(o)),["ctrl"]),["enter"]),t[1]||(t[1]=(0,l.withKeys)(e=>e.target.blur(),["esc"]))],onFocus:t[2]||(t[2]=(...e)=>M.onSelectNameFocus&&M.onSelectNameFocus(...e)),ref_for:!0,ref:"name",type:"text",placeholder:M.translate("enter_section_name_placeholder"),class:(0,l.normalizeClass)([{"no-box-shadow":i.isIntroTour,"border-danger":M.fieldsErrors[`sections[${o}].name`]},"list-head-name offer-input section-name w-100 focused no-uppercase pe-0"])},null,42,m)),[[$,S.editedSection===n.key]])],14,d),(0,l.withDirectives)((0,l.createVNode)(D,{group:{name:"sections",pull:e.pullFunction},disabled:M.mediaSizes.isXs||M.isPartiallyLoaded,move:M.onMove,onChange:e=>M.updateItemOrder(e,n),clone:M.cloneDraggable,modelValue:n.items,"onUpdate:modelValue":e=>n.items=e,"swap-threshold":.8,"scroll-sensitivity":250,onStart:t=>e.start(t,o),onEnd:t[6]||(t[6]=t=>e.end(t)),animation:150,"item-key":"key","ghost-class":"ghost",handle:".handle",class:"col-12 draggable-img-collection p-0 item-list","delay-on-touch-only":!0,delay:150},{item:(0,l.withCtx)(({element:s,index:a})=>[(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("div",v,[M.isItemRendered(o,a)||M.isItemVisible(s.key)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(M.itemRowComponent(s.type)),{onShowDropdown:t[3]||(t[3]=t=>e.$emit("show-dropdown",t)),onShowBottomMenu:t[4]||(t[4]=t=>e.$emit("show-bottom-menu",t)),onShowUnread:t=>e.$emit("show-unread",s.key),onShowGallery:t[5]||(t[5]=t=>e.$emit("show-gallery",t)),onChangeDiscount:t=>e.$emit("change-discount",s.key),"item-tier":i.itemTier,item:s,"is-last":a===n.items.length-1,"section-index":o,"item-index":a,"is-dragging":null!==e.draggedItemKey,key:s.key},null,40,["onShowUnread","onChangeDiscount","item-tier","item","is-last","section-index","item-index","is-dragging"])):((0,l.openBlock)(),(0,l.createElementBlock)("div",f))])),[[l.vShow,M.itemNotFiltered(s)],[A,(e,t,i)=>M.onIntersect(s.key,e,t,i)]])]),_:2},1032,["group","disabled","move","onChange","clone","modelValue","onUpdate:modelValue","onStart"]),[[l.vShow,M.isSectionVisible(n.key)]]),(0,l.createCommentVNode)("section collapsed"),M.isSectionVisible(n.key)?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:"ui-button-clear list-section-toggle",onClick:e=>M.toggleSectionVisibility(n)},[t[10]||(t[10]=(0,l.createElementVNode)("svg",{width:"14",height:"14",viewBox:"0 0 10 12","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-polygon-right"})],-1)),(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(M.translate("contains_collapsed_items")),1)],8,x)),(0,l.createCommentVNode)(" button to add new section"),M.isSectionVisible(n.key)&&!M.readOnly?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)({deactivated:M.deactivated})},[(0,l.createElementVNode)("div",w,[(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["d-flex item-row ml-6 mb-5 mb-md-0 position-relative align-items-center row-item",M.mediaSizes.isXs?"py-3p":"py-12"])},[(0,l.createElementVNode)("div",E,[(0,l.createElementVNode)("a",{href:"#",onClick:(0,l.withModifiers)(t=>e.$emit("show-dropdown",{reference:t.target,item:"add-item",type:"add-item",sectionIndex:o,sectionKey:n.key}),["prevent"]),title:M.translate("click_to_add_or_use_extension")},[...t[11]||(t[11]=[(0,l.createElementVNode)("svg",{height:"20",width:"20",viewBox:"0 0 30 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-plus-disabled-light"})],-1)])],8,b)]),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["pl-6 add-item-placeholder clickable d-flex h-100 align-items-center flex-wrap flex-sm-nowrap clickable",{"hide-medium":!S.isAdvanced,"hide-start":!S.isPremium}]),onClick:t=>e.$emit("show-dropdown",{reference:t.target,item:"add-item",type:"add-item",sectionIndex:o,sectionKey:n.key})},[(0,l.createElementVNode)("div",{class:"me-3 mt-3p text-12-muted text-uppercase",style:{"margin-left":"-1px"},innerHTML:M.translate("click_to_add_product")},null,8,C)],10,N)],2)])],2)):(0,l.createCommentVNode)("v-if",!0)])])],2)),[[l.vShow,M.sectionNotFiltered(n)]])),128)),M.readOnly||M.groupBy?(0,l.createCommentVNode)("v-if",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["list-section container-responsive",{deactivated:M.deactivated}])},[(0,l.createElementVNode)("div",B,[t[14]||(t[14]=(0,l.createElementVNode)("div",{class:"list-section-bar clickable",style:{"border-color":"grey"}},null,-1)),(0,l.createCommentVNode)("section add button "),(0,l.createElementVNode)("div",V,[(0,l.createElementVNode)("div",_,[(0,l.createElementVNode)("div",{onClick:t[7]||(t[7]=(...e)=>M.addNewSection&&M.addNewSection(...e)),class:"bg-white pe-3 d-flex align-items-center add-section-button clickable pr-36 pl-18 nowrap tour_add_section_alt"},[t[12]||(t[12]=(0,l.createElementVNode)("svg",{class:"me-3",width:"30",height:"30",viewBox:"0 0 30 30","aria-hidden":"true"},[(0,l.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-plus-blue"})],-1)),(0,l.createTextVNode)(" "+(0,l.toDisplayString)(M.translate(i.isIntroTour?"onboarding.list.add_section":"add_section")),1)]),t[13]||(t[13]=(0,l.createElementVNode)("div",{class:"position-relative d-flex align-items-center flex-fill-500 py-6"},[(0,l.createElementVNode)("div",{class:"section-menu-bar me-3 position-absolute",style:{"background-color":"grey"}})],-1))])])])],2))])])])}],["__scopeId","data-v-c324702e"]])}}]);
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.