1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d14b5b5f-f13b-58d8-ac13-4e302bd9ff30")}catch(e){}}(); 3import{a as W}from"./chunk-JV2L7MYN.js";import{a as K}from"./chunk-W35CTE5C.js";import{a as X,b as Y}from"./chunk-4EMHEHJ6.js";import{a as H}from"./chunk-XFAF5S7Z.js";import"./chunk-M4IILFJ3.js";import{a as P,b as V}from"./chunk-IN6Q7XXR.js";import"./chunk-VED26QIY.js";import"./chunk-UCBWKLJS.js";import"./chunk-XIEPXTT7.js";import"./chunk-CDLPTF5L.js";import"./chunk-JXYUH2JJ.js";import"./chunk-75MSKHQ5.js";import"./chunk-DBAVNV7D.js";import"./chunk-LZANT4A3.js";import"./chunk-2IL73E45.js";import"./chunk-VQTNL4J6.js";import"./chunk-NXGCLNSX.js";import{F as J,h as O,m as Q,r as G}from"./chunk-DUEKGWVE.js";import{c as T}from"./chunk-SV4QHZ6R.js";import"./chunk-J7WPYGOY.js";import{k as S,l as A}from"./chunk-WZYMWVAN.js";import{a as R,b as F,d as U,e as q,f as w,g as j,h as z}from"./chunk-WO2N3BGC.js";import"./chunk-WHTYCSAG.js";import"./chunk-MIRAE4HP.js";import{b as k,f as B}from"./chunk-LKCBMZWZ.js";import"./chunk-VMBK3ESP.js";import"./chunk-VQM3N5YY.js";import"./chunk-U2S4Q5VS.js";import"./chunk-7B3DFEIE.js";import"./chunk-QFRXUKCK.js";import{Bb as D,Ca as C,Ec as a,Fc as N,Gc as c,Ld as y,P as v,Uc as L,Wb as u,Yb as f,Zc as s,_c as p,_d as E,bc as d,cc as l,dc as o,ec as h,hd as x,jb as i,ma as m,nc as I,pc as g,y as M}from"./chunk-MPV5Q6GW.js";import"./chunk-THKSGHO2.js";var Z=t=>[t,"truncate"];function $(t,r){if(t&1&&(l(0,"div",10),a(1),o()),t&2){let e=g();d("title",e.nibble.userLabel),i(),c(" ",e.nibble.userLabel," ")}}function ee(t,r){if(t&1&&(l(0,"div",11),a(1),o()),t&2){let e=g();d("ngClass",L(3,Z,e.nibble.userLabel?"text-xl":""))("title",e.cut.serviceLabel),i(),c(" (",e.cut.serviceLabel,") ")}}function te(t,r){t&1&&(l(0,"span",12),a(1),s(2,"transloco"),o()),t&2&&(i(),c(" ",p(2,1,"personal_content.edit_nibble_collection_note_dialog.caption_not_defined")," "))}function ie(t,r){if(t&1&&(h(0,"pc-nibble-type-icon",8),l(1,"div",9),u(2,$,2,2,"div",10),u(3,ee,2,5,"div",11),u(4,te,3,3,"span",12),o()),t&2){let e=g();d("type",r.nibble.type),i(2),f(e.useUserLabel()?2:-1),i(),f(e.useServiceLabel()?3:-1),i(),f(!e.useUserLabel()&&!e.useServiceLabel()?4:-1)}}function oe(t,r){return(t?.referredBy||[]).find(e=>e.id===r)?.collNote||""}var Le=(()=>{class t{constructor(){this.quillModules={toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link"]]},this.collNoteControl=new Q(""),this.loading=C(!1),this.nibbleCut=C(void 0),this.collection=C(void 0),this.useUserLabel=x(()=>{let e=this.nibbleCut();return e?!!e.nibble.userLabel:!1}),this.useServiceLabel=x(()=>{let e=this.nibbleCut();return e?!!e.cut.serviceLabel&&e.nibble.userLabel!==e.cut.serviceLabel:!1}),this.dialogRef=m(R),this.data=m(F),this.nibbleApi=m(K),this.collectionApi=m(H)}ngOnInit(){this.loading.set(!0),M([this.nibbleApi.getCollRelatedNote({id:this.data.nibbleId,positionId:this.data.positionId}),this.collectionApi.get({id:this.data.collectionId})]).pipe(v(()=>{this.loading.set(!1)})).subscribe(([e,n])=>{this.nibbleCut.set(e),this.collection.set(n.collection),this.collNoteControl.setValue(oe(e,this.data.collectionId))})}onSubmit(){this.loading.set(!0);let e=this.collection(),n=0;e&&(n=e.updateCheckNum+1),this.nibbleApi.editCollRelatedNote({id:this.data.nibbleId,positionId:this.data.positionId,collectionId:this.data.collectionId,note:this.collNoteControl.value,updateCheckNum:n}).pipe(v(()=>{this.loading.set(!1)})).subscribe(()=>{this.dialogRef.close()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["pc-shared-edit-nibble-collection-note-dialog"]],decls:18,vars:16,consts:[["mat-dialog-title","",1,"flex","items-center","gap-2","pt-4"],["mat-dialog-content",""],[1,"mt-3"],[1,"text-gray","mb-1"],[3,"formControl","modules"],["mat-dialog-actions","",1,"justify-between"],["mat-button","","mat-dialog-close","",1,"error-button"],["mat-button","",1,"primary-button",3,"click","loading"],[3,"type"],[1,"flex","flex-col","gap-1","flex-auto","min-w-0"],[1,"truncate",3,"title"],[3,"ngClass","title"],[1,"truncate"]],template:function(n,b){if(n&1&&(l(0,"div",0)(1,"div"),a(2),s(3,"transloco"),o(),u(4,ie,5,4),o(),l(5,"div",1)(6,"div",2)(7,"div",3),a(8),s(9,"transloco"),o(),h(10,"quill-editor",4),o()(),l(11,"div",5)(12,"button",6),a(13),s(14,"transloco"),o(),l(15,"button",7),I("click",function(){return b.onSubmit()}),a(16),s(17,"transloco"),o()()),n&2){let _;i(2),c(" ",p(3,8,"personal_content.edit_nibble_collection_note_dialog.title_prefix")," "),i(2),f((_=b.nibbleCut())?4:-1,_),i(4),N(p(9,10,"personal_content.edit_nibble_collection_note_dialog.annotation")),i(2),d("formControl",b.collNoteControl)("modules",b.quillModules),i(3),N(p(14,12,"ui.buttons.cancel")),i(2),d("loading",b.loading()),i(),c(" ",p(17,14,"ui.buttons.save")," ")}},dependencies:[E,y,V,P,J,O,G,T,Y,X,A,z,U,q,j,w,B,k,W,S],encapsulation:2})}}return t})();export{Le as EditNibbleCollectionNoteDialogComponent}; 4//# sourceMappingURL=chunk-IZCTRKZ3.js.map 5 6//# debugId=d14b5b5f-f13b-58d8-ac13-4e302bd9ff30
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.