nucliadb-admin-assets 1.0.0.post2499__py3-none-any.whl → 1.0.0.post2515__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nucliadb_admin_assets/538.55dd545601007b28.js +1 -0
- nucliadb_admin_assets/assets/deployment/app-config.json +1 -1
- nucliadb_admin_assets/assets/i18n/common/ca.json +2 -0
- nucliadb_admin_assets/assets/i18n/common/en.json +2 -0
- nucliadb_admin_assets/assets/i18n/common/es.json +2 -0
- nucliadb_admin_assets/assets/i18n/common/fr.json +2 -0
- nucliadb_admin_assets/assets/i18n/sync/ca.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/en.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/es.json +4 -0
- nucliadb_admin_assets/assets/i18n/sync/fr.json +4 -0
- nucliadb_admin_assets/index.html +1 -1
- nucliadb_admin_assets/main.7afd6336f3d33795.js +1 -0
- nucliadb_admin_assets/polyfills.9066651cc91e9048.js +1 -0
- nucliadb_admin_assets/{runtime.10e44cc4d76feb3b.js → runtime.49058055c24c8f17.js} +1 -1
- {nucliadb_admin_assets-1.0.0.post2499.dist-info → nucliadb_admin_assets-1.0.0.post2515.dist-info}/METADATA +1 -1
- {nucliadb_admin_assets-1.0.0.post2499.dist-info → nucliadb_admin_assets-1.0.0.post2515.dist-info}/RECORD +19 -19
- nucliadb_admin_assets/538.808ca1518e1f6e95.js +0 -1
- nucliadb_admin_assets/main.bd4b52fcbc7d50a4.js +0 -1
- nucliadb_admin_assets/polyfills.07329d7acd49761e.js +0 -1
- {nucliadb_admin_assets-1.0.0.post2499.dist-info → nucliadb_admin_assets-1.0.0.post2515.dist-info}/WHEEL +0 -0
- {nucliadb_admin_assets-1.0.0.post2499.dist-info → nucliadb_admin_assets-1.0.0.post2515.dist-info}/top_level.txt +0 -0
- {nucliadb_admin_assets-1.0.0.post2499.dist-info → nucliadb_admin_assets-1.0.0.post2515.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknucliadb_admin=self.webpackChunknucliadb_admin||[]).push([[461],{5360:(te,Q,ve)=>{ve(6935)},6935:()=>{const te=globalThis;function Q(t){return(te.__Zone_symbol_prefix||"__zone_symbol__")+t}const Ee=Object.getOwnPropertyDescriptor,Le=Object.defineProperty,Ie=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Me="addEventListener",Ze="removeEventListener",Ae=Q(Me),je=Q(Ze),ae="true",le="false",Pe=Q("");function He(t,r){return Zone.current.wrap(t,r)}function xe(t,r,i,n,s){return Zone.current.scheduleMacroTask(t,r,i,n,s)}const H=Q,Ce=typeof window<"u",Te=Ce?window:void 0,$=Ce&&Te||globalThis;function Ve(t,r){for(let i=t.length-1;i>=0;i--)"function"==typeof t[i]&&(t[i]=He(t[i],r+"_"+i));return t}function We(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const qe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,De=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ge=!De&&!qe&&!(!Ce||!Te.HTMLElement),Xe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!qe&&!(!Ce||!Te.HTMLElement),Se={},mt=H("enable_beforeunload"),Ye=function(t){if(!(t=t||$.event))return;let r=Se[t.type];r||(r=Se[t.type]=H("ON_PROPERTY"+t.type));const i=this||t.target||$,n=i[r];let s;return Ge&&i===Te&&"error"===t.type?(s=n&&n.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===s&&t.preventDefault()):(s=n&&n.apply(this,arguments),"beforeunload"===t.type&&$[mt]&&"string"==typeof s?t.returnValue=s:null!=s&&!s&&t.preventDefault()),s};function $e(t,r,i){let n=Ee(t,r);if(!n&&i&&Ee(i,r)&&(n={enumerable:!0,configurable:!0}),!n||!n.configurable)return;const s=H("on"+r+"patched");if(t.hasOwnProperty(s)&&t[s])return;delete n.writable,delete n.value;const f=n.get,T=n.set,g=r.slice(2);let p=Se[g];p||(p=Se[g]=H("ON_PROPERTY"+g)),n.set=function(C){let E=this;!E&&t===$&&(E=$),E&&("function"==typeof E[p]&&E.removeEventListener(g,Ye),T&&T.call(E,null),E[p]=C,"function"==typeof C&&E.addEventListener(g,Ye,!1))},n.get=function(){let C=this;if(!C&&t===$&&(C=$),!C)return null;const E=C[p];if(E)return E;if(f){let P=f.call(this);if(P)return n.set.call(this,P),"function"==typeof C.removeAttribute&&C.removeAttribute(r),P}return null},Le(t,r,n),t[s]=!0}function Ke(t,r,i){if(r)for(let n=0;n<r.length;n++)$e(t,"on"+r[n],i);else{const n=[];for(const s in t)"on"==s.slice(0,2)&&n.push(s);for(let s=0;s<n.length;s++)$e(t,n[s],i)}}const re=H("originalInstance");function we(t){const r=$[t];if(!r)return;$[H(t)]=r,$[t]=function(){const s=Ve(arguments,t);switch(s.length){case 0:this[re]=new r;break;case 1:this[re]=new r(s[0]);break;case 2:this[re]=new r(s[0],s[1]);break;case 3:this[re]=new r(s[0],s[1],s[2]);break;case 4:this[re]=new r(s[0],s[1],s[2],s[3]);break;default:throw new Error("Arg list too long.")}},fe($[t],r);const i=new r(function(){});let n;for(n in i)"XMLHttpRequest"===t&&"responseBlob"===n||function(s){"function"==typeof i[s]?$[t].prototype[s]=function(){return this[re][s].apply(this[re],arguments)}:Le($[t].prototype,s,{set:function(f){"function"==typeof f?(this[re][s]=He(f,t+"."+s),fe(this[re][s],f)):this[re][s]=f},get:function(){return this[re][s]}})}(n);for(n in r)"prototype"!==n&&r.hasOwnProperty(n)&&($[t][n]=r[n])}function ue(t,r,i){let n=t;for(;n&&!n.hasOwnProperty(r);)n=Ie(n);!n&&t[r]&&(n=t);const s=H(r);let f=null;if(n&&(!(f=n[s])||!n.hasOwnProperty(s))&&(f=n[s]=n[r],We(n&&Ee(n,r)))){const g=i(f,s,r);n[r]=function(){return g(this,arguments)},fe(n[r],f)}return f}function yt(t,r,i){let n=null;function s(f){const T=f.data;return T.args[T.cbIdx]=function(){f.invoke.apply(this,arguments)},n.apply(T.target,T.args),f}n=ue(t,r,f=>function(T,g){const p=i(T,g);return p.cbIdx>=0&&"function"==typeof g[p.cbIdx]?xe(p.name,g[p.cbIdx],p,s):f.apply(T,g)})}function fe(t,r){t[H("OriginalDelegate")]=r}let Je=!1,Be=!1;function kt(){if(Je)return Be;Je=!0;try{const t=Te.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(Be=!0)}catch{}return Be}function Qe(t){return"function"==typeof t}function et(t){return"number"==typeof t}let ge=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){ge=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ge=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+Pe+"(\\w+)(true|false)$"),rt=H("propagationStopped");function ot(t,r){const i=(r?r(t):t)+le,n=(r?r(t):t)+ae,s=Pe+i,f=Pe+n;ne[t]={},ne[t][le]=s,ne[t][ae]=f}function bt(t,r,i,n){const s=n&&n.add||Me,f=n&&n.rm||Ze,T=n&&n.listeners||"eventListeners",g=n&&n.rmAll||"removeAllListeners",p=H(s),C="."+s+":",E="prependListener",P="."+E+":",A=function(k,h,x){if(k.isRemoved)return;const G=k.callback;let Y;"object"==typeof G&&G.handleEvent&&(k.callback=m=>G.handleEvent(m),k.originalDelegate=G);try{k.invoke(k,h,[x])}catch(m){Y=m}const B=k.options;return B&&"object"==typeof B&&B.once&&h[f].call(h,x.type,k.originalDelegate?k.originalDelegate:k.callback,B),Y};function V(k,h,x){if(!(h=h||t.event))return;const G=k||h.target||t,Y=G[ne[h.type][x?ae:le]];if(Y){const B=[];if(1===Y.length){const m=A(Y[0],G,h);m&&B.push(m)}else{const m=Y.slice();for(let W=0;W<m.length&&(!h||!0!==h[rt]);W++){const L=A(m[W],G,h);L&&B.push(L)}}if(1===B.length)throw B[0];for(let m=0;m<B.length;m++){const W=B[m];r.nativeScheduleMicroTask(()=>{throw W})}}}const z=function(k){return V(this,k,!1)},K=function(k){return V(this,k,!0)};function J(k,h){if(!k)return!1;let x=!0;h&&void 0!==h.useG&&(x=h.useG);const G=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let B=!1;h&&void 0!==h.rt&&(B=h.rt);let m=k;for(;m&&!m.hasOwnProperty(s);)m=Ie(m);if(!m&&k[s]&&(m=k),!m||m[p])return!1;const W=h&&h.eventNameToString,L={},w=m[p]=m[s],b=m[H(f)]=m[f],S=m[H(T)]=m[T],ee=m[H(g)]=m[g];let q;h&&h.prepend&&(q=m[H(h.prepend)]=m[h.prepend]);const N=x?function(o){if(!L.isExisting)return w.call(L.target,L.eventName,L.capture?K:z,L.options)}:function(o){return w.call(L.target,L.eventName,o.invoke,L.options)},D=x?function(o){if(!o.isRemoved){const u=ne[o.eventName];let v;u&&(v=u[o.capture?ae:le]);const R=v&&o.target[v];if(R)for(let y=0;y<R.length;y++)if(R[y]===o){R.splice(y,1),o.isRemoved=!0,o.removeAbortListener&&(o.removeAbortListener(),o.removeAbortListener=null),0===R.length&&(o.allRemoved=!0,o.target[v]=null);break}}if(o.allRemoved)return b.call(o.target,o.eventName,o.capture?K:z,o.options)}:function(o){return b.call(o.target,o.eventName,o.invoke,o.options)},he=h&&h.diff?h.diff:function(o,u){const v=typeof u;return"function"===v&&o.callback===u||"object"===v&&o.originalDelegate===u},oe=Zone[H("UNPATCHED_EVENTS")],ye=t[H("PASSIVE_EVENTS")],a=function(o,u,v,R,y=!1,I=!1){return function(){const M=this||t;let Z=arguments[0];h&&h.transferEventName&&(Z=h.transferEventName(Z));let F=arguments[1];if(!F)return o.apply(this,arguments);if(De&&"uncaughtException"===Z)return o.apply(this,arguments);let U=!1;if("function"!=typeof F){if(!F.handleEvent)return o.apply(this,arguments);U=!0}if(G&&!G(o,F,M,arguments))return;const de=ge&&!!ye&&-1!==ye.indexOf(Z),ie=function l(o){if("object"==typeof o&&null!==o){const u={...o};return o.signal&&(u.signal=o.signal),u}return o}(function j(o,u){return!ge&&"object"==typeof o&&o?!!o.capture:ge&&u?"boolean"==typeof o?{capture:o,passive:!0}:o?"object"==typeof o&&!1!==o.passive?{...o,passive:!0}:o:{passive:!0}:o}(arguments[2],de)),pe=ie?.signal;if(pe?.aborted)return;if(oe)for(let ce=0;ce<oe.length;ce++)if(Z===oe[ce])return de?o.call(M,Z,F,ie):o.apply(this,arguments);const Ue=!!ie&&("boolean"==typeof ie||ie.capture),lt=!(!ie||"object"!=typeof ie)&&ie.once,At=Zone.current;let ze=ne[Z];ze||(ot(Z,W),ze=ne[Z]);const ut=ze[Ue?ae:le];let Ne,ke=M[ut],ft=!1;if(ke){if(ft=!0,Y)for(let ce=0;ce<ke.length;ce++)if(he(ke[ce],F))return}else ke=M[ut]=[];const ht=M.constructor.name,dt=tt[ht];dt&&(Ne=dt[Z]),Ne||(Ne=ht+u+(W?W(Z):Z)),L.options=ie,lt&&(L.options.once=!1),L.target=M,L.capture=Ue,L.eventName=Z,L.isExisting=ft;const Re=x?vt:void 0;Re&&(Re.taskData=L),pe&&(L.options.signal=void 0);const se=At.scheduleEventTask(Ne,F,Re,v,R);if(pe){L.options.signal=pe;const ce=()=>se.zone.cancelTask(se);o.call(pe,"abort",ce,{once:!0}),se.removeAbortListener=()=>pe.removeEventListener("abort",ce)}return L.target=null,Re&&(Re.taskData=null),lt&&(L.options.once=!0),!ge&&"boolean"==typeof se.options||(se.options=ie),se.target=M,se.capture=Ue,se.eventName=Z,U&&(se.originalDelegate=F),I?ke.unshift(se):ke.push(se),y?M:void 0}};return m[s]=a(w,C,N,D,B),q&&(m[E]=a(q,P,function(o){return q.call(L.target,L.eventName,o.invoke,L.options)},D,B,!0)),m[f]=function(){const o=this||t;let u=arguments[0];h&&h.transferEventName&&(u=h.transferEventName(u));const v=arguments[2],R=!!v&&("boolean"==typeof v||v.capture),y=arguments[1];if(!y)return b.apply(this,arguments);if(G&&!G(b,y,o,arguments))return;const I=ne[u];let M;I&&(M=I[R?ae:le]);const Z=M&&o[M];if(Z)for(let F=0;F<Z.length;F++){const U=Z[F];if(he(U,y))return Z.splice(F,1),U.isRemoved=!0,0!==Z.length||(U.allRemoved=!0,o[M]=null,R||"string"!=typeof u)||(o[Pe+"ON_PROPERTY"+u]=null),U.zone.cancelTask(U),B?o:void 0}return b.apply(this,arguments)},m[T]=function(){const o=this||t;let u=arguments[0];h&&h.transferEventName&&(u=h.transferEventName(u));const v=[],R=st(o,W?W(u):u);for(let y=0;y<R.length;y++){const I=R[y];v.push(I.originalDelegate?I.originalDelegate:I.callback)}return v},m[g]=function(){const o=this||t;let u=arguments[0];if(u){h&&h.transferEventName&&(u=h.transferEventName(u));const v=ne[u];if(v){const I=o[v[le]],M=o[v[ae]];if(I){const Z=I.slice();for(let F=0;F<Z.length;F++){const U=Z[F];this[f].call(this,u,U.originalDelegate?U.originalDelegate:U.callback,U.options)}}if(M){const Z=M.slice();for(let F=0;F<Z.length;F++){const U=Z[F];this[f].call(this,u,U.originalDelegate?U.originalDelegate:U.callback,U.options)}}}}else{const v=Object.keys(o);for(let R=0;R<v.length;R++){const I=nt.exec(v[R]);let M=I&&I[1];M&&"removeListener"!==M&&this[g].call(this,M)}this[g].call(this,"removeListener")}if(B)return this},fe(m[s],w),fe(m[f],b),ee&&fe(m[g],ee),S&&fe(m[T],S),!0}let X=[];for(let k=0;k<i.length;k++)X[k]=J(i[k],n);return X}function st(t,r){if(!r){const f=[];for(let T in t){const g=nt.exec(T);let p=g&&g[1];if(p&&(!r||p===r)){const C=t[T];if(C)for(let E=0;E<C.length;E++)f.push(C[E])}}return f}let i=ne[r];i||(ot(r),i=ne[r]);const n=t[i[le]],s=t[i[ae]];return n?s?n.concat(s):n.slice():s?s.slice():[]}function Pt(t,r){const i=t.Event;i&&i.prototype&&r.patchMethod(i.prototype,"stopImmediatePropagation",n=>function(s,f){s[rt]=!0,n&&n.apply(s,f)})}const Oe=H("zoneTask");function me(t,r,i,n){let s=null,f=null;i+=n;const T={};function g(C){const E=C.data;E.args[0]=function(){return C.invoke.apply(this,arguments)};const P=s.apply(t,E.args);return et(P)?E.handleId=P:(E.handle=P,E.isRefreshable=Qe(P.refresh)),C}function p(C){const{handle:E,handleId:P}=C.data;return f.call(t,E??P)}s=ue(t,r+=n,C=>function(E,P){if(Qe(P[0])){const A={isRefreshable:!1,isPeriodic:"Interval"===n,delay:"Timeout"===n||"Interval"===n?P[1]||0:void 0,args:P},V=P[0];P[0]=function(){try{return V.apply(this,arguments)}finally{const{handle:x,handleId:G,isPeriodic:Y,isRefreshable:B}=A;!Y&&!B&&(G?delete T[G]:x&&(x[Oe]=null))}};const z=xe(r,P[0],A,g,p);if(!z)return z;const{handleId:K,handle:J,isRefreshable:X,isPeriodic:k}=z.data;if(K)T[K]=z;else if(J&&(J[Oe]=z,X&&!k)){const h=J.refresh;J.refresh=function(){const{zone:x,state:G}=z;return"notScheduled"===G?(z._state="scheduled",x._updateTaskCount(z,1)):"running"===G&&(z._state="scheduling"),h.call(this)}}return J??K??z}return C.apply(t,P)}),f=ue(t,i,C=>function(E,P){const A=P[0];let V;et(A)?(V=T[A],delete T[A]):(V=A?.[Oe],V?A[Oe]=null:V=A),V?.type?V.cancelFn&&V.zone.cancelTask(V):C.apply(t,P)})}function it(t,r,i){if(!i||0===i.length)return r;const n=i.filter(f=>f.target===t);if(!n||0===n.length)return r;const s=n[0].ignoreProperties;return r.filter(f=>-1===s.indexOf(f))}function ct(t,r,i,n){t&&Ke(t,it(t,r,i),n)}function Fe(t){return Object.getOwnPropertyNames(t).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(t,r,i,n,s){const f=Zone.__symbol__(n);if(r[f])return;const T=r[f]=r[n];r[n]=function(g,p,C){return p&&p.prototype&&s.forEach(function(E){const P=`${i}.${n}::`+E,A=p.prototype;try{if(A.hasOwnProperty(E)){const V=t.ObjectGetOwnPropertyDescriptor(A,E);V&&V.value?(V.value=t.wrapWithCurrentZone(V.value,P),t._redefineProperty(p.prototype,E,V)):A[E]&&(A[E]=t.wrapWithCurrentZone(A[E],P))}else A[E]&&(A[E]=t.wrapWithCurrentZone(A[E],P))}catch{}}),T.call(r,g,p,C)},t.attachOriginToPatched(r[n],T)}const at=function be(){const t=globalThis,r=!0===t[Q("forceDuplicateZoneCheck")];if(t.Zone&&(r||"function"!=typeof t.Zone.__symbol__))throw new Error("Zone already loaded.");return t.Zone??=function ve(){const t=te.performance;function r(j){t&&t.mark&&t.mark(j)}function i(j,_){t&&t.measure&&t.measure(j,_)}r("Zone");let n=(()=>{var j;class _{static assertZonePatched(){if(te.Promise!==L.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=_.current;for(;e.parent;)e=e.parent;return e}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(e,d,O=!1){if(L.hasOwnProperty(e)){const N=!0===te[Q("forceDuplicateZoneCheck")];if(!O&&N)throw Error("Already loaded patch: "+e)}else if(!te["__Zone_disable_"+e]){const N="Zone:"+e;r(N),L[e]=d(te,_,w),i(N,N)}}get parent(){return this._parent}get name(){return this._name}constructor(e,d){this._parent=e,this._name=d?d.name||"unnamed":"<root>",this._properties=d&&d.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,d)}get(e){const d=this.getZoneWith(e);if(d)return d._properties[e]}getZoneWith(e){let d=this;for(;d;){if(d._properties.hasOwnProperty(e))return d;d=d._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,d){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const O=this._zoneDelegate.intercept(this,e,d),N=this;return function(){return N.runGuarded(O,this,arguments,d)}}run(e,d,O,N){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,e,d,O,N)}finally{b=b.parent}}runGuarded(e,d=null,O,N){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,e,d,O,N)}catch(D){if(this._zoneDelegate.handleError(this,D))throw D}}finally{b=b.parent}}runTask(e,d,O){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||J).name+"; Execution: "+this.name+")");const N=e,{type:D,data:{isPeriodic:_e=!1,isRefreshable:he=!1}={}}=e;if(e.state===X&&(D===W||D===m))return;const oe=e.state!=x;oe&&N._transitionTo(x,h);const ye=S;S=N,b={parent:b,zone:this};try{D==m&&e.data&&!_e&&!he&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,N,d,O)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{const l=e.state;if(l!==X&&l!==Y)if(D==W||_e||he&&l===k)oe&&N._transitionTo(h,x,k);else{const a=N._zoneDelegates;this._updateTaskCount(N,-1),oe&&N._transitionTo(X,x,X),he&&(N._zoneDelegates=a)}b=b.parent,S=ye}}scheduleTask(e){if(e.zone&&e.zone!==this){let O=this;for(;O;){if(O===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);O=O.parent}}e._transitionTo(k,X);const d=[];e._zoneDelegates=d,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(O){throw e._transitionTo(Y,k,X),this._zoneDelegate.handleError(this,O),O}return e._zoneDelegates===d&&this._updateTaskCount(e,1),e.state==k&&e._transitionTo(h,k),e}scheduleMicroTask(e,d,O,N){return this.scheduleTask(new T(B,e,d,O,N,void 0))}scheduleMacroTask(e,d,O,N,D){return this.scheduleTask(new T(m,e,d,O,N,D))}scheduleEventTask(e,d,O,N,D){return this.scheduleTask(new T(W,e,d,O,N,D))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||J).name+"; Execution: "+this.name+")");if(e.state===h||e.state===x){e._transitionTo(G,h,x);try{this._zoneDelegate.cancelTask(this,e)}catch(d){throw e._transitionTo(Y,G),this._zoneDelegate.handleError(this,d),d}return this._updateTaskCount(e,-1),e._transitionTo(X,G),e.runCount=-1,e}}_updateTaskCount(e,d){const O=e._zoneDelegates;-1==d&&(e._zoneDelegates=null);for(let N=0;N<O.length;N++)O[N]._updateTaskCount(e.type,d)}static#e=j=()=>this.__symbol__=Q}return j(),_})();const s={name:"",onHasTask:(j,_,c,e)=>j.hasTask(c,e),onScheduleTask:(j,_,c,e)=>j.scheduleTask(c,e),onInvokeTask:(j,_,c,e,d,O)=>j.invokeTask(c,e,d,O),onCancelTask:(j,_,c,e)=>j.cancelTask(c,e)};class f{get zone(){return this._zone}constructor(_,c,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=c,this._forkZS=e&&(e&&e.onFork?e:c._forkZS),this._forkDlgt=e&&(e.onFork?c:c._forkDlgt),this._forkCurrZone=e&&(e.onFork?this._zone:c._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:c._interceptZS),this._interceptDlgt=e&&(e.onIntercept?c:c._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this._zone:c._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:c._invokeZS),this._invokeDlgt=e&&(e.onInvoke?c:c._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this._zone:c._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:c._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?c:c._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this._zone:c._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:c._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?c:c._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this._zone:c._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:c._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?c:c._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this._zone:c._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:c._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?c:c._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this._zone:c._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const d=e&&e.onHasTask;(d||c&&c._hasTaskZS)&&(this._hasTaskZS=d?e:s,this._hasTaskDlgt=c,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,e.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=c,this._scheduleTaskCurrZone=this._zone),e.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=c,this._invokeTaskCurrZone=this._zone),e.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=c,this._cancelTaskCurrZone=this._zone))}fork(_,c){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,c):new n(_,c)}intercept(_,c,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,c,e):c}invoke(_,c,e,d,O){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,c,e,d,O):c.apply(e,d)}handleError(_,c){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,c)}scheduleTask(_,c){let e=c;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,c),e||(e=c);else if(c.scheduleFn)c.scheduleFn(c);else{if(c.type!=B)throw new Error("Task is missing scheduleFn.");z(c)}return e}invokeTask(_,c,e,d){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,c,e,d):c.callback.apply(e,d)}cancelTask(_,c){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,c);else{if(!c.cancelFn)throw Error("Task is not cancelable");e=c.cancelFn(c)}return e}hasTask(_,c){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,c)}catch(e){this.handleError(_,e)}}_updateTaskCount(_,c){const e=this._taskCounts,d=e[_],O=e[_]=d+c;if(O<0)throw new Error("More tasks executed then were scheduled.");0!=d&&0!=O||this.hasTask(this._zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:_})}}class T{constructor(_,c,e,d,O,N){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=c,this.data=d,this.scheduleFn=O,this.cancelFn=N,!e)throw new Error("callback is not defined");this.callback=e;const D=this;this.invoke=_===W&&d&&d.useG?T.invokeTask:function(){return T.invokeTask.call(te,D,this,arguments)}}static invokeTask(_,c,e){_||(_=this),ee++;try{return _.runCount++,_.zone.runTask(_,c,e)}finally{1==ee&&K(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(X,k)}_transitionTo(_,c,e){if(this._state!==c&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${c}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=_,_==X&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const g=Q("setTimeout"),p=Q("Promise"),C=Q("then");let A,E=[],P=!1;function V(j){if(A||te[p]&&(A=te[p].resolve(0)),A){let _=A[C];_||(_=A.then),_.call(A,j)}else te[g](j,0)}function z(j){0===ee&&0===E.length&&V(K),j&&E.push(j)}function K(){if(!P){for(P=!0;E.length;){const j=E;E=[];for(let _=0;_<j.length;_++){const c=j[_];try{c.zone.runTask(c,null,null)}catch(e){w.onUnhandledError(e)}}}w.microtaskDrainDone(),P=!1}}const J={name:"NO ZONE"},X="notScheduled",k="scheduling",h="scheduled",x="running",G="canceling",Y="unknown",B="microTask",m="macroTask",W="eventTask",L={},w={symbol:Q,currentZoneFrame:()=>b,onUnhandledError:q,microtaskDrainDone:q,scheduleMicroTask:z,showUncaughtError:()=>!n[Q("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:q,patchMethod:()=>q,bindArguments:()=>[],patchThen:()=>q,patchMacroTask:()=>q,patchEventPrototype:()=>q,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>q,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>q,wrapWithCurrentZone:()=>q,filterProperties:()=>[],attachOriginToPatched:()=>q,_redefineProperty:()=>q,patchCallbacks:()=>q,nativeScheduleMicroTask:V};let b={parent:null,zone:new n(null,null)},S=null,ee=0;function q(){}return i("Zone","Zone"),n}(),t.Zone}();(function Zt(t){(function Nt(t){t.__load_patch("ZoneAwarePromise",(r,i,n)=>{const s=Object.getOwnPropertyDescriptor,f=Object.defineProperty,g=n.symbol,p=[],C=!1!==r[g("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],E=g("Promise"),P=g("then");n.onUnhandledError=l=>{if(n.showUncaughtError()){const a=l&&l.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(l)}},n.microtaskDrainDone=()=>{for(;p.length;){const l=p.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(a){z(a)}}};const V=g("unhandledPromiseRejectionHandler");function z(l){n.onUnhandledError(l);try{const a=i[V];"function"==typeof a&&a.call(this,l)}catch{}}function K(l){return l&&l.then}function J(l){return l}function X(l){return D.reject(l)}const k=g("state"),h=g("value"),x=g("finally"),G=g("parentPromiseValue"),Y=g("parentPromiseState"),m=null,W=!0,L=!1;function b(l,a){return o=>{try{j(l,a,o)}catch(u){j(l,!1,u)}}}const S=function(){let l=!1;return function(o){return function(){l||(l=!0,o.apply(null,arguments))}}},ee="Promise resolved with itself",q=g("currentTaskTrace");function j(l,a,o){const u=S();if(l===o)throw new TypeError(ee);if(l[k]===m){let v=null;try{("object"==typeof o||"function"==typeof o)&&(v=o&&o.then)}catch(R){return u(()=>{j(l,!1,R)})(),l}if(a!==L&&o instanceof D&&o.hasOwnProperty(k)&&o.hasOwnProperty(h)&&o[k]!==m)c(o),j(l,o[k],o[h]);else if(a!==L&&"function"==typeof v)try{v.call(o,u(b(l,a)),u(b(l,!1)))}catch(R){u(()=>{j(l,!1,R)})()}else{l[k]=a;const R=l[h];if(l[h]=o,l[x]===x&&a===W&&(l[k]=l[Y],l[h]=l[G]),a===L&&o instanceof Error){const y=i.currentTask&&i.currentTask.data&&i.currentTask.data.__creationTrace__;y&&f(o,q,{configurable:!0,enumerable:!1,writable:!0,value:y})}for(let y=0;y<R.length;)e(l,R[y++],R[y++],R[y++],R[y++]);if(0==R.length&&a==L){l[k]=0;let y=o;try{throw new Error("Uncaught (in promise): "+function T(l){return l&&l.toString===Object.prototype.toString?(l.constructor&&l.constructor.name||"")+": "+JSON.stringify(l):l?l.toString():Object.prototype.toString.call(l)}(o)+(o&&o.stack?"\n"+o.stack:""))}catch(I){y=I}C&&(y.throwOriginal=!0),y.rejection=o,y.promise=l,y.zone=i.current,y.task=i.currentTask,p.push(y),n.scheduleMicroTask()}}}return l}const _=g("rejectionHandledHandler");function c(l){if(0===l[k]){try{const a=i[_];a&&"function"==typeof a&&a.call(this,{rejection:l[h],promise:l})}catch{}l[k]=L;for(let a=0;a<p.length;a++)l===p[a].promise&&p.splice(a,1)}}function e(l,a,o,u,v){c(l);const R=l[k],y=R?"function"==typeof u?u:J:"function"==typeof v?v:X;a.scheduleMicroTask("Promise.then",()=>{try{const I=l[h],M=!!o&&x===o[x];M&&(o[G]=I,o[Y]=R);const Z=a.run(y,void 0,M&&y!==X&&y!==J?[]:[I]);j(o,!0,Z)}catch(I){j(o,!1,I)}},o)}const O=function(){},N=r.AggregateError;class D{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof D?a:j(new this(null),W,a)}static reject(a){return j(new this(null),L,a)}static withResolvers(){const a={};return a.promise=new D((o,u)=>{a.resolve=o,a.reject=u}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new N([],"All promises were rejected"));const o=[];let u=0;try{for(let y of a)u++,o.push(D.resolve(y))}catch{return Promise.reject(new N([],"All promises were rejected"))}if(0===u)return Promise.reject(new N([],"All promises were rejected"));let v=!1;const R=[];return new D((y,I)=>{for(let M=0;M<o.length;M++)o[M].then(Z=>{v||(v=!0,y(Z))},Z=>{R.push(Z),u--,0===u&&(v=!0,I(new N(R,"All promises were rejected")))})})}static race(a){let o,u,v=new this((I,M)=>{o=I,u=M});function R(I){o(I)}function y(I){u(I)}for(let I of a)K(I)||(I=this.resolve(I)),I.then(R,y);return v}static all(a){return D.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof D?this:D).allWithCallback(a,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(a,o){let u,v,R=new this((Z,F)=>{u=Z,v=F}),y=2,I=0;const M=[];for(let Z of a){K(Z)||(Z=this.resolve(Z));const F=I;try{Z.then(U=>{M[F]=o?o.thenCallback(U):U,y--,0===y&&u(M)},U=>{o?(M[F]=o.errorCallback(U),y--,0===y&&u(M)):v(U)})}catch(U){v(U)}y++,I++}return y-=2,0===y&&u(M),R}constructor(a){const o=this;if(!(o instanceof D))throw new Error("Must be an instanceof Promise.");o[k]=m,o[h]=[];try{const u=S();a&&a(u(b(o,W)),u(b(o,L)))}catch(u){j(o,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return D}then(a,o){let u=this.constructor?.[Symbol.species];(!u||"function"!=typeof u)&&(u=this.constructor||D);const v=new u(O),R=i.current;return this[k]==m?this[h].push(R,v,a,o):e(this,R,v,a,o),v}catch(a){return this.then(null,a)}finally(a){let o=this.constructor?.[Symbol.species];(!o||"function"!=typeof o)&&(o=D);const u=new o(O);u[x]=x;const v=i.current;return this[k]==m?this[h].push(v,u,a,a):e(this,v,u,a,a),u}}D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;const _e=r[E]=r.Promise;r.Promise=D;const he=g("thenPatched");function oe(l){const a=l.prototype,o=s(a,"then");if(o&&(!1===o.writable||!o.configurable))return;const u=a.then;a[P]=u,l.prototype.then=function(v,R){return new D((I,M)=>{u.call(this,I,M)}).then(v,R)},l[he]=!0}return n.patchThen=oe,_e&&(oe(_e),ue(r,"fetch",l=>function ye(l){return function(a,o){let u=l.apply(a,o);if(u instanceof D)return u;let v=u.constructor;return v[he]||oe(v),u}}(l))),Promise[i.__symbol__("uncaughtPromiseErrors")]=p,D})})(t),function Lt(t){t.__load_patch("toString",r=>{const i=Function.prototype.toString,n=H("OriginalDelegate"),s=H("Promise"),f=H("Error"),T=function(){if("function"==typeof this){const E=this[n];if(E)return"function"==typeof E?i.call(E):Object.prototype.toString.call(E);if(this===Promise){const P=r[s];if(P)return i.call(P)}if(this===Error){const P=r[f];if(P)return i.call(P)}}return i.call(this)};T[n]=i,Function.prototype.toString=T;const g=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":g.call(this)}})}(t),function Mt(t){t.__load_patch("util",(r,i,n)=>{const s=Fe(r);n.patchOnProperties=Ke,n.patchMethod=ue,n.bindArguments=Ve,n.patchMacroTask=yt;const f=i.__symbol__("BLACK_LISTED_EVENTS"),T=i.__symbol__("UNPATCHED_EVENTS");r[T]&&(r[f]=r[T]),r[f]&&(i[f]=i[T]=r[f]),n.patchEventPrototype=Pt,n.patchEventTarget=bt,n.isIEOrEdge=kt,n.ObjectDefineProperty=Le,n.ObjectGetOwnPropertyDescriptor=Ee,n.ObjectCreate=_t,n.ArraySlice=Et,n.patchClass=we,n.wrapWithCurrentZone=He,n.filterProperties=it,n.attachOriginToPatched=fe,n._redefineProperty=Object.defineProperty,n.patchCallbacks=It,n.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:s,isBrowser:Ge,isMix:Xe,isNode:De,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:Me,REMOVE_EVENT_LISTENER_STR:Ze})})}(t)})(at),function Ot(t){t.__load_patch("legacy",r=>{const i=r[t.__symbol__("legacyPatch")];i&&i()}),t.__load_patch("timers",r=>{const i="set",n="clear";me(r,i,n,"Timeout"),me(r,i,n,"Interval"),me(r,i,n,"Immediate")}),t.__load_patch("requestAnimationFrame",r=>{me(r,"request","cancel","AnimationFrame"),me(r,"mozRequest","mozCancel","AnimationFrame"),me(r,"webkitRequest","webkitCancel","AnimationFrame")}),t.__load_patch("blocking",(r,i)=>{const n=["alert","prompt","confirm"];for(let s=0;s<n.length;s++)ue(r,n[s],(T,g,p)=>function(C,E){return i.current.run(T,r,E,p)})}),t.__load_patch("EventTarget",(r,i,n)=>{(function Dt(t,r){r.patchEventPrototype(t,r)})(r,n),function Ct(t,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:n,TRUE_STR:s,FALSE_STR:f,ZONE_SYMBOL_PREFIX:T}=r.getGlobalObjects();for(let p=0;p<i.length;p++){const C=i[p],A=T+(C+f),V=T+(C+s);n[C]={},n[C][f]=A,n[C][s]=V}const g=t.EventTarget;g&&g.prototype&&r.patchEventTarget(t,r,[g&&g.prototype])}(r,n);const s=r.XMLHttpRequestEventTarget;s&&s.prototype&&n.patchEventTarget(r,n,[s.prototype])}),t.__load_patch("MutationObserver",(r,i,n)=>{we("MutationObserver"),we("WebKitMutationObserver")}),t.__load_patch("IntersectionObserver",(r,i,n)=>{we("IntersectionObserver")}),t.__load_patch("FileReader",(r,i,n)=>{we("FileReader")}),t.__load_patch("on_property",(r,i,n)=>{!function St(t,r){if(De&&!Xe||Zone[t.symbol("patchEvents")])return;const i=r.__Zone_ignore_on_properties;let n=[];if(Ge){const s=window;n=n.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const f=function pt(){try{const t=Te.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:s,ignoreProperties:["error"]}]:[];ct(s,Fe(s),i&&i.concat(f),Ie(s))}n=n.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let s=0;s<n.length;s++){const f=r[n[s]];f&&f.prototype&&ct(f.prototype,Fe(f.prototype),i)}}(n,r)}),t.__load_patch("customElements",(r,i,n)=>{!function Rt(t,r){const{isBrowser:i,isMix:n}=r.getGlobalObjects();(i||n)&&t.customElements&&"customElements"in t&&r.patchCallbacks(r,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,n)}),t.__load_patch("XHR",(r,i)=>{!function C(E){const P=E.XMLHttpRequest;if(!P)return;const A=P.prototype;let z=A[Ae],K=A[je];if(!z){const w=E.XMLHttpRequestEventTarget;if(w){const b=w.prototype;z=b[Ae],K=b[je]}}const J="readystatechange",X="scheduled";function k(w){const b=w.data,S=b.target;S[T]=!1,S[p]=!1;const ee=S[f];z||(z=S[Ae],K=S[je]),ee&&K.call(S,J,ee);const q=S[f]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[T]&&w.state===X){const _=S[i.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const c=w.invoke;w.invoke=function(){const e=S[i.__symbol__("loadfalse")];for(let d=0;d<e.length;d++)e[d]===w&&e.splice(d,1);!b.aborted&&w.state===X&&c.call(w)},_.push(w)}else w.invoke()}else!b.aborted&&!1===S[T]&&(S[p]=!0)};return z.call(S,J,q),S[n]||(S[n]=w),W.apply(S,b.args),S[T]=!0,w}function h(){}function x(w){const b=w.data;return b.aborted=!0,L.apply(b.target,b.args)}const G=ue(A,"open",()=>function(w,b){return w[s]=0==b[2],w[g]=b[1],G.apply(w,b)}),B=H("fetchTaskAborting"),m=H("fetchTaskScheduling"),W=ue(A,"send",()=>function(w,b){if(!0===i.current[m]||w[s])return W.apply(w,b);{const S={target:w,url:w[g],isPeriodic:!1,args:b,aborted:!1},ee=xe("XMLHttpRequest.send",h,S,k,x);w&&!0===w[p]&&!S.aborted&&ee.state===X&&ee.invoke()}}),L=ue(A,"abort",()=>function(w,b){const S=function V(w){return w[n]}(w);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===i.current[B])return L.apply(w,b)})}(r);const n=H("xhrTask"),s=H("xhrSync"),f=H("xhrListener"),T=H("xhrScheduled"),g=H("xhrURL"),p=H("xhrErrorBeforeScheduled")}),t.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(t,r){const i=t.constructor.name;for(let n=0;n<r.length;n++){const s=r[n],f=t[s];if(f){if(!We(Ee(t,s)))continue;t[s]=(g=>{const p=function(){return g.apply(this,Ve(arguments,i+"."+s))};return fe(p,g),p})(f)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),t.__load_patch("PromiseRejectionEvent",(r,i)=>{function n(s){return function(f){st(r,s).forEach(g=>{const p=r.PromiseRejectionEvent;if(p){const C=new p(s,{promise:f.promise,reason:f.rejection});g.invoke(C)}})}}r.PromiseRejectionEvent&&(i[H("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),i[H("rejectionHandledHandler")]=n("rejectionhandled"))}),t.__load_patch("queueMicrotask",(r,i,n)=>{!function wt(t,r){r.patchMethod(t,"queueMicrotask",i=>function(n,s){Zone.current.scheduleMicroTask("queueMicrotask",s[0])})}(r,n)})}(at)}},te=>{te(te.s=5360)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e].call(t.exports,t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,u,o)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,u,o]=e[i],
|
|
1
|
+
(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e].call(t.exports,t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,u,o)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,u,o]=e[i],s=!0,f=0;f<t.length;f++)(!1&o||a>=o)&&Object.keys(r.O).every(b=>r.O[b](t[f]))?t.splice(f--,1):(s=!1,o<a&&(a=o));if(s){e.splice(i--,1);var d=u();void 0!==d&&(n=d)}}return n}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,u,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+".55dd545601007b28.js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="nucliadb-admin:";r.l=(t,u,o,i)=>{if(e[t])e[t].push(u);else{var a,s;if(void 0!==o)for(var f=document.getElementsByTagName("script"),d=0;d<f.length;d++){var l=f[d];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==n+o){a=l;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[u];var c=(g,b)=>{a.onerror=a.onload=null,clearTimeout(p);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(b)),g)return g(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(u,o)=>{var i=r.o(e,u)?e[u]:void 0;if(0!==i)if(i)o.push(i[2]);else if(121!=u){var a=new Promise((l,c)=>i=e[u]=[l,c]);o.push(i[2]=a);var s=r.p+r.u(u),f=new Error;r.l(s,l=>{if(r.o(e,u)&&(0!==(i=e[u])&&(e[u]=void 0),i)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;f.message="Loading chunk "+u+" failed.\n("+c+": "+p+")",f.name="ChunkLoadError",f.type=c,f.request=p,i[1](f)}},"chunk-"+u,u)}else e[u]=0},r.O.j=u=>0===e[u];var n=(u,o)=>{var f,d,[i,a,s]=o,l=0;if(i.some(p=>0!==e[p])){for(f in a)r.o(a,f)&&(r.m[f]=a[f]);if(s)var c=s(r)}for(u&&u(o);l<i.length;l++)r.o(e,d=i[l])&&e[d]&&e[d][0](),e[d]=0;return r.O(c)},t=self.webpackChunknucliadb_admin=self.webpackChunknucliadb_admin||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
nucliadb_admin_assets/3rdpartylicenses.txt,sha256=wVdvBvNe7s0N3frQe4vFo1Lh3bG3yj3gCDkUpja8jQI,82915
|
|
2
|
-
nucliadb_admin_assets/538.
|
|
2
|
+
nucliadb_admin_assets/538.55dd545601007b28.js,sha256=Pox-V31uCADcKXjQhlNm7kRMefRM21rQtsb0ZqtEoko,95838
|
|
3
3
|
nucliadb_admin_assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
nucliadb_admin_assets/index.html,sha256=
|
|
5
|
-
nucliadb_admin_assets/main.
|
|
6
|
-
nucliadb_admin_assets/polyfills.
|
|
7
|
-
nucliadb_admin_assets/runtime.
|
|
4
|
+
nucliadb_admin_assets/index.html,sha256=GJ1j1m9DhRMw5M2R6NtmpoQJ4Lno4RMdOlH4EKLW1Tc,11567
|
|
5
|
+
nucliadb_admin_assets/main.7afd6336f3d33795.js,sha256=I9ACPaOp-XdEy8D7fGQ1s5FJqN4qFgf6X4vsiq0DlZc,2417992
|
|
6
|
+
nucliadb_admin_assets/polyfills.9066651cc91e9048.js,sha256=U6Ox3rV8JCbi3x4DGvv7g_3WYKGGKiG4PQSVkgl1JZQ,34835
|
|
7
|
+
nucliadb_admin_assets/runtime.49058055c24c8f17.js,sha256=XiSGuswqleQEJZoDW1i2Gu2BuxFC60acOPVfidW_EKM,2794
|
|
8
8
|
nucliadb_admin_assets/source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff,sha256=GV4qsmC5J3Vp_LIKREDLIiTMyOLV-cZjRz_ZpH28hus,17580
|
|
9
9
|
nucliadb_admin_assets/source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2,sha256=T6BrAKCLCUSQ5K9RAXKslv4oA538WqwmxDni4CMsnMc,13764
|
|
10
10
|
nucliadb_admin_assets/styles.93af2737f32fdfdf.css,sha256=kffqYcVGaZx5EIuyO40cLpugLdYW6VW6f1ZHcZFWMHs,58560
|
|
@@ -23,20 +23,20 @@ nucliadb_admin_assets/assets/connector-logos/s3.svg,sha256=Epeegdcu-r4zLQi7Kpk0B
|
|
|
23
23
|
nucliadb_admin_assets/assets/connector-logos/sharepoint.svg,sha256=TtgboCPM2euyPJRK0b5Q3XdQl9oEhKZgrYHb-n8zV8M,4803
|
|
24
24
|
nucliadb_admin_assets/assets/connector-logos/sitefinity.svg,sha256=dAr7-jWC2Rzx7c4ALMe3r8arOCoHvkLDckLXOm_M5Fs,902
|
|
25
25
|
nucliadb_admin_assets/assets/connector-logos/sitemap.svg,sha256=R8Cx7rgI-gOBCRqzS_mDhBg4zKog08XIX1fH-0UnUMk,1744
|
|
26
|
-
nucliadb_admin_assets/assets/deployment/app-config.json,sha256=
|
|
26
|
+
nucliadb_admin_assets/assets/deployment/app-config.json,sha256=dTYiO1zm1mmkd6R1o-e8KN0zBQ1RnHjcm_xGbn02bAo,388
|
|
27
27
|
nucliadb_admin_assets/assets/deployment/app-config.json.bak,sha256=lbaBuAGjHtFWWuL5zHhJPMtky7_9FauLwmjY2T5ZGgA,373
|
|
28
28
|
nucliadb_admin_assets/assets/fonts/source-code-pro/source-code-pro-v14-latin-regular.woff,sha256=GV4qsmC5J3Vp_LIKREDLIiTMyOLV-cZjRz_ZpH28hus,17580
|
|
29
29
|
nucliadb_admin_assets/assets/fonts/source-code-pro/source-code-pro-v14-latin-regular.woff2,sha256=T6BrAKCLCUSQ5K9RAXKslv4oA538WqwmxDni4CMsnMc,13764
|
|
30
30
|
nucliadb_admin_assets/assets/fonts/videoagular/Videogular.json,sha256=tmp9XQvGJmARb5HELAE0gqfoyGTEDopaAsWkcjoJE1Y,522679
|
|
31
31
|
nucliadb_admin_assets/assets/fonts/videoagular/videogular.woff,sha256=x1eUFvuNLjRHkGZUpAbWqagayNFDMhyILQ7LoSsWtxI,3892
|
|
32
|
-
nucliadb_admin_assets/assets/i18n/common/ca.json,sha256=
|
|
33
|
-
nucliadb_admin_assets/assets/i18n/common/en.json,sha256=
|
|
34
|
-
nucliadb_admin_assets/assets/i18n/common/es.json,sha256=
|
|
35
|
-
nucliadb_admin_assets/assets/i18n/common/fr.json,sha256=
|
|
36
|
-
nucliadb_admin_assets/assets/i18n/sync/ca.json,sha256=
|
|
37
|
-
nucliadb_admin_assets/assets/i18n/sync/en.json,sha256=
|
|
38
|
-
nucliadb_admin_assets/assets/i18n/sync/es.json,sha256=
|
|
39
|
-
nucliadb_admin_assets/assets/i18n/sync/fr.json,sha256=
|
|
32
|
+
nucliadb_admin_assets/assets/i18n/common/ca.json,sha256=GOqnV1sQSpD2Bua9HHx8nFqNEIy7zHda5LUqjMXyi_Q,197668
|
|
33
|
+
nucliadb_admin_assets/assets/i18n/common/en.json,sha256=R1CEnU-UHE2yVMk6cC6FL4WsemzkFoYbYu-Ybaw29gE,186024
|
|
34
|
+
nucliadb_admin_assets/assets/i18n/common/es.json,sha256=4BG4WZCuPIXKN3KucjHSWHLWdTtZ1q1VcoY86btj61k,198764
|
|
35
|
+
nucliadb_admin_assets/assets/i18n/common/fr.json,sha256=2W20dYmkNX6MFdSUjiZMTYw55V-55Jaj06JzhuUpiGA,207030
|
|
36
|
+
nucliadb_admin_assets/assets/i18n/sync/ca.json,sha256=7OqZuUcT0SAILHUGPsK3z8mprYPUodv1pblX3UwTSbY,14781
|
|
37
|
+
nucliadb_admin_assets/assets/i18n/sync/en.json,sha256=LH076wfqmJW2859jiPS2te-EJtn_p8tLyglWa9kMjhA,13601
|
|
38
|
+
nucliadb_admin_assets/assets/i18n/sync/es.json,sha256=fC4xGEaE5ZW3klAQ05vwkQ-esX5gUiVLTOTLyG0bPVk,14635
|
|
39
|
+
nucliadb_admin_assets/assets/i18n/sync/fr.json,sha256=F0VvwUlJ0F-5Rq37JnOuEF5GIGVBQKS_Q-CvHkZemNc,15177
|
|
40
40
|
nucliadb_admin_assets/assets/i18n/user/ca.json,sha256=TaUWUWxVfp4QcCVuznk0oP5RlddMgTYGs81BDmcwkQs,11759
|
|
41
41
|
nucliadb_admin_assets/assets/i18n/user/en.json,sha256=1wvOg0Mh4E4z3xqR-Zlg6Ad1TTeppr0ipTiMLKPp8tc,10894
|
|
42
42
|
nucliadb_admin_assets/assets/i18n/user/es.json,sha256=J_bJ_G-2PtZ3KUJ5f68zfYlHG6Q2hdFii7pFdEzQBTA,11621
|
|
@@ -54,8 +54,8 @@ nucliadb_admin_assets/assets/signup/check-email.png,sha256=w61IaLxWx2sH4AHYTXkU_
|
|
|
54
54
|
nucliadb_admin_assets/assets/sso-icons/github.svg,sha256=ec0987nvzdqyYKJy_Fqu9h3q2gEraVP38jD80s3lh70,1782
|
|
55
55
|
nucliadb_admin_assets/assets/sso-icons/google.svg,sha256=X8pb0LT48dHF6av2iM8W7iy2Ww8Qtu1nrWygTMTM7Mc,1268
|
|
56
56
|
nucliadb_admin_assets/assets/sso-icons/microsoft.svg,sha256=ZQB8MxBehdh9nfDjSUBix63VAtBZyReS70K93fivOSg,256
|
|
57
|
-
nucliadb_admin_assets-1.0.0.
|
|
58
|
-
nucliadb_admin_assets-1.0.0.
|
|
59
|
-
nucliadb_admin_assets-1.0.0.
|
|
60
|
-
nucliadb_admin_assets-1.0.0.
|
|
61
|
-
nucliadb_admin_assets-1.0.0.
|
|
57
|
+
nucliadb_admin_assets-1.0.0.post2515.dist-info/METADATA,sha256=FvsoWP-EIhms45ynzPo6s2Pa2xbqc-ZOATbFPTNfOMI,295
|
|
58
|
+
nucliadb_admin_assets-1.0.0.post2515.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
59
|
+
nucliadb_admin_assets-1.0.0.post2515.dist-info/top_level.txt,sha256=OL7L9uvpjIDq52Fb7PjKMalAh0X76FpN062pJMxqmNo,22
|
|
60
|
+
nucliadb_admin_assets-1.0.0.post2515.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
61
|
+
nucliadb_admin_assets-1.0.0.post2515.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknucliadb_admin=self.webpackChunknucliadb_admin||[]).push([[538],{8538:(Dn,L,c)=>{c.r(L),c.d(L,{SYNC_ROUTES:()=>Xn});var s=c(2306),I=c(419),k=c(1413),he=c(1584),_=c(5964),p=c(5558),P=c(6977);const T="assets/connector-logos";var $=function(o){return o.PENDING="PENDING",o.PROCESSING="PROCESSING",o.UPLOADED="UPLOADED",o.ERROR="ERROR",o}($||{}),R=c(4412),h=c(6354),m=c(7673),v=c(8141),b=c(6697),V=c(9437),C=c(2542);const me={id:"sitemap",title:"Sitemap",logo:`${T}/sitemap.svg`,description:"Upload web pages from a sitemap.xml",permanentSyncOnly:!0,factory:()=>new ge};class ge{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"Sitemap",originalId:"SITEMAP",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.sitemap.url.section-title",fields:[{id:"sitemap",label:"sync.connectors.sitemap.url.label",type:"text",required:!0,pattern:/.+\.(ashx|xml)/,placeholder:"https://my-website.com/sitemap.xml"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"keepQueryString",label:"sync.connectors.common.keep-querystring.label",help:"sync.connectors.common.keep-querystring.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}const ye={id:"folder",title:"Folder",logo:`${T}/folder.svg`,description:"Upload a folder from your device",factory:()=>new fe};class fe{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!1,this.files=[],this.path="",this.canSyncSecurityGroups=!1}getStaticFolders(){return this.path?[{uuid:"",title:this.path,originalId:this.path,metadata:{},status:$.PENDING}]:[]}getParametersSections(){return(0,m.of)([{id:"local-path",title:"sync.connectors.folder.local-path.title",description:"sync.connectors.folder.local-path.description",fields:[{id:"path",label:"sync.connectors.folder.local-path.field-label",placeholder:"/Users/alice/Documents or C:\\Users\\Alice\\Documents",type:"text",required:!0}]}])}goToOAuth(){}cleanAuthData(){throw new Error("Method not implemented.")}handleParameters(r){r.path&&(this.path=r.path)}getParametersValues(){return{path:this.path}}authenticate(){return(0,m.of)(!0)}}const X="token",A="refresh";class D{constructor(r,t,n){this.hasServerSideAuth=!0,this.isExternal=!0,this.allowToSelectFolders=!0,this.resumable=!1,this.isAuthenticated=new R.t(!1),this.canSyncSecurityGroups="gdrive"===r,this.name=r,this.id=t,this.path=n}getParametersSections(){return(0,m.of)([])}handleParameters(r){}getParametersValues(){return{token:localStorage.getItem(this.prefixStorageKey(X)),refresh:localStorage.getItem(this.prefixStorageKey(A)),refresh_endpoint:`${this.path}/api/external_auth/${this.name}/refresh`}}cleanAuthData(){localStorage.removeItem(this.prefixStorageKey(X)),localStorage.removeItem(this.prefixStorageKey(A))}goToOAuth(r,t){if(t&&this.cleanAuthData(),localStorage.getItem(this.prefixStorageKey(X)))this.isAuthenticated.next(!0);else{const i=`${this.path}/api/external_auth/${this.name}/authorize`;window.electron?window.electron.openExternal(`${i}?redirect=nuclia-desktop://index.html`):location.href=`${i}?redirect=${r}`}}authenticate(){if(!this.isAuthenticated.getValue()){const r=setInterval(()=>{const t=function _e(){let o=location.search;if(!o&&location.href.includes("#")){const r=location.href.split("#")[1];o=r.includes("?")?"?"+r.split("?")[1]:"?"+r}return o&&o.includes("#")&&!o.includes("?")&&(o=o.replace("#","?")),o}();if(t&&t.includes("?")){const n=new URLSearchParams(t.split("?")[1]),i=n.get("token")||"",a=n.get("refresh")||"";clearInterval(r),i?(localStorage.setItem(this.prefixStorageKey(X),i),localStorage.setItem(this.prefixStorageKey(A),a||""),this.isAuthenticated.next(!0)):this.isAuthenticated.next(!1)}},500)}return this.isAuthenticated.asObservable()}prefixStorageKey(r){return`${this.name}-${this.id}-${r}`}getStaticFolders(){return[]}}const J="SHAREPOINT_SITE_NAME";class be extends D{constructor(r,t,n){super(r,t,n)}getParametersSections(){return(0,m.of)([{id:"account",title:"sync.connectors.sharepoint.account.title",fields:[{id:"site_name",label:"sync.connectors.sharepoint.site.label",type:"text",required:!0}]}])}handleParameters(r){localStorage.setItem(J,r.site_name)}getParametersValues(){return{...super.getParametersValues(),site_name:localStorage.getItem(J)}}}const Ce={id:"confluence",title:"Confluence",logo:`${T}/confluence.svg`,description:"Collaboration platform developed by Atlassian",helpUrl:"https://docs.nuclia.dev/docs/docs/using/sync-agent#confluence-connector-usage",deprecated:!0,factory:()=>new ve},Q="CONFLUENCE_TOKEN";class ve{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!0,this.canSyncSecurityGroups=!1}getParametersSections(){return(0,m.of)([{id:"account",title:"sync.connectors.confluence.account.title",description:"sync.connectors.confluence.account.description",fields:[{id:"url",label:"sync.connectors.confluence.url.label",type:"text",placeholder:"https://my-site.atlassian.net/wiki",required:!0},{id:"user",label:"sync.connectors.confluence.user.label",type:"text",placeholder:"me@mycompany.com",required:!0},{id:"token",label:"sync.connectors.confluence.token.label",type:"text",required:!0}]}])}handleParameters(r){localStorage.setItem(Q,r.token)}getParametersValues(){return{token:localStorage.getItem(Q)}}goToOAuth(r,t){return(0,m.of)(!0)}cleanAuthData(){throw new Error("Method not implemented.")}authenticate(){return(0,m.of)(!!this.getParametersValues().token)}getStaticFolders(){return[]}}const Se={id:"rss",title:"RSS",logo:`${T}/rss.svg`,description:"Upload web pages from a RSS feed",permanentSyncOnly:!0,factory:()=>new xe};class xe{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"RSS",originalId:"rss",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.rss.url.label",fields:[{id:"url",label:"sync.connectors.rss.url.label",type:"text",required:!0,placeholder:"https://rss-feed-url"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}var Te=c(5512);const Fe={id:"sitefinity",title:"Sitefinity",logo:`${T}/sitefinity.svg`,description:"Progress Sitefinity CMS",permanentSyncOnly:!0,factory:()=>new Ie};class Ie{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"Sitefinity",originalId:"SITEFINITY",metadata:{},status:$.PENDING}]}getParametersSections(){return(0,m.of)([{id:"url",title:"sync.connectors.sitefinity.url.section-title",fields:[{id:"url",label:"sync.connectors.sitefinity.url.label",type:"text",required:!0,placeholder:"https://my-website.com"},{id:"apikey",label:"sync.connectors.sitefinity.apikey.label",type:"text",required:!0,help:"sync.connectors.sitefinity.apikey.help"},{id:"siteId",label:"sync.connectors.sitefinity.site-id.label",type:"text",required:!0,help:"sync.connectors.sitefinity.site-id.help"}]}])}handleParameters(r){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,m.of)(!0)}}var Re=c(9330);const W="http://localhost:8090",H="NUCLIA_SYNC_SERVER",z="NUCLIA_SYNC_SERVER_TYPE";let w=(()=>{class o{constructor(t,n,i,a,g){this.sdk=t,this.http=n,this.config=i,this.notificationService=a,this.features=g,this.connectors={gdrive:{definition:{id:"gdrive",title:"Google Drive",logo:`${T}/gdrive.svg`,description:"File storage and synchronization service developed by Google",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("gdrive",y?.id||"",this.config.getOAuthServer())}},onedrive:{definition:{id:"onedrive",title:"One Drive",logo:`${T}/onedrive.svg`,description:"Microsoft OneDrive file hosting service",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("onedrive",y?.id||"",this.config.getOAuthServer())}},sharepoint:{definition:{id:"sharepoint",title:"SharePoint",logo:`${T}/sharepoint.svg`,description:"Microsoft Sharepoint service",permanentSyncOnly:!0,deprecated:!0,factory:y=>new be("sharepoint",y?.id||"",this.config.getOAuthServer())}},dropbox:{definition:{id:"dropbox",title:"Dropbox",logo:`${T}/dropbox.svg`,description:"File storage and synchronization service developed by Dropbox",permanentSyncOnly:!0,deprecated:!0,factory:y=>new D("dropbox",y?.id||"",this.config.getOAuthServer())}},folder:{definition:ye},sitemap:{definition:me},confluence:{definition:Ce},rss:{definition:Se},sitefinity:{definition:Fe}},this.connectorsObs=new R.t(Object.values(this.connectors).map(y=>y.definition).filter(y=>!y.deprecated)).pipe((0,p.n)(y=>this.features.unstable.sitefinityConnector.pipe((0,h.T)(x=>y.filter(F=>x||"sitefinity"!==F.id))))),this._syncServer=new R.t({serverUrl:localStorage.getItem(H)||W,type:localStorage.getItem(z)||"desktop"}),this.syncServer=this._syncServer.asObservable(),this._isServerDown=new R.t(!0),this._currentSyncId=new R.t(null),this._syncCache=new R.t({}),this._cacheUpdated=new R.t((new Date).toISOString()),this._isSyncing=new R.t({}),this.isServerDown=this._isServerDown.asObservable(),this.currentSyncId=this._currentSyncId.asObservable(),this.serverHeaders={token:this.sdk.nuclia.auth.getToken(!0)},this.cacheUpdated=this._cacheUpdated.asObservable(),this.isSyncing=this._isSyncing.asObservable()}getConnectorDefinition(t){return this.connectors[t]?.definition}getConnector(t,n){const i=this.connectors[t];i.instances||(i.instances={});const a=i.instances;return a[n]||(a[n]=i.definition.factory({id:n})),a[n]}getCurrentSync(){return this.currentSyncId.pipe((0,_.p)(t=>!!t),(0,p.n)(t=>this.getSync(t)))}getSync(t){const n=this._syncCache.getValue();return n[t]?(0,m.of)(n[t]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{headers:this.serverHeaders}).pipe((0,v.M)(i=>{n[t]=i,this._syncCache.next(n)}))}addSync(t){return this.sdk.currentKb.pipe((0,b.s)(1),(0,p.n)(n=>this.sdk.nuclia.options.standalone?(0,m.of)({...t,kb:{...this.sdk.nuclia.options,knowledgeBox:n.id}}):this.getNucliaKey(n).pipe((0,h.T)(i=>({...t,kb:{zone:this.sdk.nuclia.options.zone,backend:this.sdk.nuclia.options.backend,knowledgeBox:i.kbid,apiKey:i.token}})))),(0,p.n)(n=>this.http.post(`${this._syncServer.getValue().serverUrl}/sync`,n,{headers:this.serverHeaders})),(0,v.M)(()=>{const n=this._syncCache.getValue();n[t.id]=t,this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}),(0,h.T)(()=>{}))}updateSync(t,n,i){return this.http.patch(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{...n,lastSyncGMT:i?"1970-01-01":void 0},{headers:this.serverHeaders}).pipe((0,v.M)(()=>{const a=this._syncCache.getValue();a[t]={...a[t],...n},this._syncCache.next(a),this._cacheUpdated.next((new Date).toISOString())}))}deleteSync(t){return this.http.delete(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{headers:this.serverHeaders}).pipe((0,v.M)(()=>{const n=this._syncCache.getValue();delete n[t],this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}))}hasCurrentSourceAuth(){return this.getCurrentSyncId()?this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/auth`).pipe((0,h.T)(n=>n.hasAuth)):(0,m.of)(!1)}getSyncsForKB(t){return this.isServerDown.pipe((0,p.n)(n=>n?(0,m.of)([]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/kb/${t}`).pipe((0,h.T)(i=>i.map(a=>({...a,kbId:t,connectorId:a.connector,connector:this.getConnector(a.connector,"")})).filter(a=>a.kbId===t)))))}getFiles(t){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/files/search${t?`?query=${t}`:""}`)}getFolders(t){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/folders`,{headers:this.serverHeaders})}canSelectFiles(t){const n=this._syncCache.getValue()[t];return n&&!("sitemap"===n.connector.name||"folder"===n.connector.name||"rss"===n.connector.name)}getNucliaKey(t){return t.createKeyForService({title:"Sync",role:"SCONTRIBUTOR"},this.getExpirationDate()).pipe((0,h.T)(n=>({...n,kbid:t.id})))}getExpirationDate(){const t=new Date;return t.setFullYear(t.getFullYear()+1),Math.floor(t.getTime()/1e3).toString()}serverStatus(t){return this.http.get(`${t}/status`).pipe((0,V.W)(()=>(0,m.of)({running:!1,logs:["Server down"]})),(0,h.T)(n=>((n.logs||[]).forEach(i=>console.log("[SERVER]",i)),{running:n.running})))}setSyncServer(t,n){localStorage.setItem(H,t||""),localStorage.setItem(z,n),this._syncServer.next({serverUrl:t||"",type:n}),t&&this.serverStatus(t).subscribe(i=>{this.setServerStatus(!i.running)})}authenticateToConnector(t,n){return n.authenticate().pipe((0,_.p)(i=>i),(0,b.s)(1),(0,p.n)(()=>this.updateSync(this.getCurrentSyncId()||"",{connector:{name:t,parameters:n.getParametersValues()}})),(0,h.T)(()=>(n.cleanAuthData(),!0)))}getCurrentSyncId(){return this._currentSyncId.getValue()}setCurrentSyncId(t){this._currentSyncId.next(t)}clearCurrentSourceId(){this._currentSyncId.next(null)}getLogs(t,n){return this.http.get(`${this._syncServer.getValue().serverUrl}/logs${t?"/"+t:""}${n?"/"+n:""}`).pipe((0,h.T)(i=>i.sort((a,g)=>{const y=(0,Te.T)(a.createdAt,g.createdAt);return 0===y?a.action.startsWith("start")?1:-1:y})))}clearLogs(){return this.http.delete(`${this._syncServer.getValue().serverUrl}/logs`)}getSyncServer(){return this._syncServer.getValue().serverUrl}setServerStatus(t){t&&!this._isServerDown.value&&this.notificationService.pushNotifications([{type:"sync-server",data:[],timestamp:(new Date).toISOString(),unread:!0,failure:!0}]),this._isServerDown.next(t)}triggerSync(t,n=!1){return this._isSyncing.next({...this._isSyncing.value,[t]:!0}),(n?this.updateSync(t,{},!0).pipe((0,h.T)(()=>!0)):(0,m.of)(!0)).pipe((0,p.n)(()=>this.http.get(`${this._syncServer.getValue().serverUrl}/sync/execute/${t}`)),(0,v.M)(()=>this._isSyncing.next({...this._isSyncing.value,[t]:!1})),(0,V.W)(a=>(console.warn("Trigger sync failed:",a),this._isSyncing.next({...this._isSyncing.value,[t]:!1}),(0,m.of)())))}static#e=this.\u0275fac=function(n){return new(n||o)(s.KVO(C.ok),s.KVO(Re.Qq),s.KVO(C.M),s.KVO(C.JE),s.KVO(C.Dr))};static#t=this.\u0275prov=s.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var e=c(2898);let Me=(()=>{class o{constructor(){this.unsubscribeAll=new k.B,this.syncService=(0,s.WQX)(w)}ngOnInit(){let t=!1,n=0;(0,he.O)(0,5e3).pipe((0,_.p)(()=>{const a=n>=(t?12:0);return n++,a}),(0,p.n)(()=>this.syncService.serverStatus(this.syncService.getSyncServer())),(0,P.Q)(this.unsubscribeAll)).subscribe(i=>{t=i.running,n=0,this.syncService.setServerStatus(!t)})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],decls:1,vars:0,template:function(n,i){1&n&&e.nrm(0,"router-outlet")},dependencies:[I.n3],encapsulation:2,changeDetection:0})}return o})();var M=c(7705),l=c(8743),ke=c(9874),E=c(4929);let $e=(()=>{class o{constructor(){this.title="",this.logo="",this.disabled=!1,this.selectConnector=new e.bkB}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-connector"]],inputs:{title:"title",logo:"logo",disabled:[2,"disabled","disabled",M.L39]},outputs:{selectConnector:"selectConnector"},decls:5,vars:3,consts:[[3,"cardClick","disabled"],[1,"connector"],["size","large",3,"path"]],template:function(n,i){1&n&&(e.j41(0,"pa-card",0),e.bIt("cardClick",function(g){return i.selectConnector.emit(g)}),e.j41(1,"div",1),e.nrm(2,"pa-icon",2),e.j41(3,"div"),e.EFF(4),e.k0s()()()),2&n&&(e.Y8G("disabled",i.disabled),e.R7$(2),e.Y8G("path",i.logo),e.R7$(2),e.JRh(i.title))},dependencies:[l.ALJ,ke.i,l.V3x,E.R],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.connector[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:6rem}'],changeDetection:0})}return o})();var S=c(2200),d=c(9417),K=c(4825),f=c(8018),u=c(4795),j=c(3606),Pe=c(820),Z=c(6812),N=c(3085),U=c(4899),we=c(7481),Ee=c(3257),je=c(6010),q=c(5472),ee=c(9435),te=c(3107),Ge=c(7839),Oe=c(4099),ne=c(4684),Ve=c(9122);const Xe=()=>({section:"activity"}),oe=(o,r)=>r.id;function De(o,r){1&o&&(e.j41(0,"nsi-dropdown-button",17),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"sync.home-page.setup-server.on-desktop.download-dropdown")," "))}function Ae(o,r){if(1&o&&(e.j41(0,"nsi-badge"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.nVh(3,De,3,3,"nsi-dropdown-button",17)),2&o){const t=e.XpG(2);e.R7$(),e.JRh(e.bMT(2,2,"sync.badge.inactive")),e.R7$(2),e.vxM(t.downloadSyncAgentFeature?3:-1)}}function Ne(o,r){1&o&&(e.j41(0,"nsi-badge",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.active")))}function Ue(o,r){if(1&o&&(e.nVh(0,Ae,4,4),e.nI1(1,"async"),e.vZN(2,Ne,3,3,"nsi-badge",16)),2&o){const t=e.XpG();e.vxM(e.bMT(1,1,t.inactiveServer)?0:2)}}function Be(o,r){1&o&&(e.j41(0,"nsi-badge"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.inactive")))}function Ye(o,r){1&o&&(e.j41(0,"nsi-badge",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.active")))}function Le(o,r){if(1&o&&(e.j41(0,"div",13),e.nVh(1,Be,3,3,"nsi-badge"),e.nI1(2,"async"),e.vZN(3,Ye,3,3,"nsi-badge",16),e.j41(4,"pa-input",18),e.EFF(5," Server URL "),e.k0s(),e.j41(6,"pa-button",19),e.EFF(7),e.nI1(8,"translate"),e.k0s()()),2&o){const t=e.XpG();e.R7$(),e.vxM(e.bMT(2,3,t.inactiveServer)?1:3),e.R7$(5),e.Y8G("disabled",!t.serverUrlChanged),e.R7$(),e.SpI(" ",e.bMT(8,5,"generic.save")," ")}}function Je(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-connector",20),e.nI1(1,"async"),e.nI1(2,"translate"),e.nI1(3,"async"),e.bIt("selectConnector",function(){const i=s.eBV(t).$implicit,a=e.XpG();return s.Njj(a.onSelectConnector(i))}),e.k0s()}if(2&o){const t=r.$implicit,n=e.XpG();e.Y8G("paTooltip",e.bMT(2,6,e.bMT(1,4,n.inactiveServer)?"sync.home-page.add-sources.disabled-source-tooltip":""))("disabled",e.bMT(3,8,n.inactiveServer))("title",t.title)("logo",t.logo)}}function Qe(o,r){1&o&&(e.j41(0,"nsi-info-card",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.home-page.sync-list.empty-info")))}function We(o,r){if(1&o&&(e.j41(0,"div",25),e.nrm(1,"pa-icon",33),e.EFF(2),e.k0s()),2&o){const t=r;e.R7$(),e.Y8G("path",t.logo),e.R7$(),e.SpI(" ",t.title," ")}}function He(o,r){if(1&o&&e.nrm(0,"pa-datetime",28),2&o){const t=e.XpG().$implicit;e.Y8G("datetime",t.lastSyncGMT)}}function ze(o,r){1&o&&e.EFF(0," \u2013 ")}function Ke(o,r){if(1&o&&(e.j41(0,"pa-option",30),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("routerLink","./"+t.id+"/edit"),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.home-page.sync-list.menu.edit-folders")," ")}}function Ze(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"a",24),e.EFF(3),e.k0s()(),e.j41(4,"pa-table-cell"),e.nVh(5,We,3,2,"div",25),e.k0s(),e.j41(6,"pa-table-cell")(7,"div",26),e.EFF(8),e.k0s()(),e.j41(9,"pa-table-cell")(10,"pa-toggle",27),e.bIt("valueChange",function(i){const a=s.eBV(t).$implicit,g=e.XpG(3);return s.Njj(g.toggleSync(a.id,i))}),e.EFF(11),e.k0s()(),e.j41(12,"pa-table-cell")(13,"div",26),e.nVh(14,He,1,1,"pa-datetime",28)(15,ze,1,0),e.k0s()(),e.j41(16,"pa-table-cell-menu")(17,"pa-button",29),e.EFF(18," Menu "),e.k0s(),e.j41(19,"pa-dropdown",null,0)(21,"pa-option",30),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.nVh(24,Ke,3,4,"pa-option",30),e.j41(25,"pa-option",31),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.j41(28,"pa-option",32),e.bIt("selectOption",function(){const i=s.eBV(t).$implicit,a=e.XpG(3);return s.Njj(a.deleteSync(i))}),e.EFF(29),e.nI1(30,"translate"),e.k0s()()()()}if(2&o){let t;const n=r.$implicit,i=e.sdS(20),a=e.XpG(3);e.R7$(2),e.Y8G("routerLink","./"+n.id),e.R7$(),e.SpI(" ",n.title," "),e.R7$(2),e.vxM((t=null==a.connectors[n.connectorId]?null:a.connectors[n.connectorId].definition)?5:-1,t),e.R7$(3),e.JRh(n.totalSyncedResources),e.R7$(2),e.Y8G("value",!n.disabled),e.R7$(),e.SpI(" ",n.disabled?"Off":"On"," "),e.R7$(3),e.vxM("1970-01-01"!==n.lastSyncGMT?14:15),e.R7$(3),e.Y8G("paPopup",i),e.R7$(4),e.Y8G("routerLink","./"+n.id+"/edit"),e.R7$(),e.SpI(" ",e.bMT(23,15,"sync.home-page.sync-list.menu.edit-settings")," "),e.R7$(2),e.vxM(n.connector.allowToSelectFolders?24:-1),e.R7$(),e.Y8G("routerLink","./"+n.id)("queryParams",e.lJ4(21,Xe)),e.R7$(),e.SpI(" ",e.bMT(27,17,"sync.home-page.sync-list.menu.activity-logs")," "),e.R7$(3),e.SpI(" ",e.bMT(30,19,"sync.home-page.sync-list.menu.delete")," ")}}function qe(o,r){if(1&o&&(e.j41(0,"pa-table",22),e.nrm(1,"pa-table-sortable-header",23),e.Z7z(2,Ze,31,22,"pa-table-row",null,oe),e.k0s()),2&o){const t=e.XpG(),n=e.XpG();e.R7$(),e.Y8G("cells",n.syncTableHeader),e.R7$(),e.Dyx(t)}}function et(o,r){1&o&&e.nVh(0,Qe,3,3,"nsi-info-card",21)(1,qe,4,1,"pa-table",22),2&o&&e.vxM(0===r.length?0:1)}let tt=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.syncService=(0,s.WQX)(w),this.sdk=(0,s.WQX)(C.ok),this.toaster=(0,s.WQX)(u._g),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.unsubscribeAll=new k.B,this.downloadSyncAgentFeature=!1,this.inactiveServer=this.syncService.isServerDown,this.syncAgentForm=new d.gE({type:new d.MJ("desktop",{nonNullable:!0}),serverUrl:new d.MJ("",{nonNullable:!0,validators:[d.k0.required]})}),this.connectors=this.syncService.connectors,this.connectorList=this.syncService.connectorsObs.pipe((0,h.T)(t=>t.sort((n,i)=>n.title.localeCompare(i.title)))),this.serverUrlBackup="",this.syncs=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.sdk.currentKb),(0,p.n)(t=>this.syncService.getSyncsForKB(t.id))),this.syncTableHeader=[new l.A3f({id:"name",label:"sync.home-page.sync-list.table-columns.name"}),new l.A3f({id:"connector",label:"sync.home-page.sync-list.table-columns.connector"}),new l.A3f({id:"resources",label:"sync.home-page.sync-list.table-columns.resources"}),new l.A3f({id:"sync",label:"sync.home-page.sync-list.table-columns.sync"}),new l.A3f({id:"latest-sync",label:"sync.home-page.sync-list.table-columns.latest-sync",sortable:!0}),new l.A3f({id:"actions",label:"sync.home-page.sync-list.table-columns.actions"})]}get syncAgentOnServer(){return"server"===this.syncAgentForm.controls.type.value}get syncAgentTypeControl(){return this.syncAgentForm.controls.type}get syncServerUrl(){return this.syncAgentForm.controls.serverUrl.value}get serverUrlChanged(){return this.serverUrlBackup!==this.syncServerUrl}ngOnInit(){this.syncService.syncServer.pipe((0,b.s)(1)).subscribe(t=>{this.syncAgentForm.patchValue(t),this.serverUrlBackup=t.serverUrl}),this.syncAgentTypeControl.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(()=>this.saveSyncServer())}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}saveSyncServer(){if(this.syncAgentForm.valid){const t=this.syncAgentForm.getRawValue();this.syncService.setSyncServer("server"===t.type?t.serverUrl:W,t.type)}}onSelectConnector(t){this.router.navigate(["./add",t.id],{relativeTo:this.currentRoute})}deleteSync(t){this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:t.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,_.p)(n=>!!n),(0,p.n)(()=>this.syncService.deleteSync(t.id))).subscribe({error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}toggleSync(t,n){this.syncService.updateSync(t,{disabled:!n}).subscribe({error:()=>this.toaster.error(n?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],decls:56,vars:44,consts:[["syncMenu",""],[1,"page-spacing"],[1,"page-title"],[1,"page-description"],[1,"section-description"],[1,"title-l"],[1,"setup-sync-agent",3,"ngSubmit","formGroup"],["formControlName","type"],[1,"radio-config-row"],["value","desktop",3,"help"],[1,"title-m"],[1,"separator-line"],["value","server",3,"help"],[1,"inline-form"],[1,"connector-list"],[3,"paTooltip","disabled","title","logo"],["kind","success"],["aspect","basic"],["formControlName","serverUrl",1,"server-url"],["type","submit",3,"disabled"],[3,"selectConnector","paTooltip","disabled","title","logo"],["icon","info"],["border","","columns","repeat(5, 1fr) 96px"],[3,"cells"],[1,"body-m","black-link",3,"routerLink"],[1,"logo-title"],[1,"body-s"],["labelOnRight","",3,"valueChange","value"],[3,"datetime"],["icon","more-vertical","aspect","basic","size","small",3,"paPopup"],[3,"routerLink"],[3,"routerLink","queryParams"],["destructive","",3,"selectOption"],["size","small",3,"path"]],template:function(n,i){if(1&n&&(e.j41(0,"div",1)(1,"div")(2,"h1",2),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",3),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"section")(9,"div",4)(10,"div",5),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"div",3),e.EFF(14),e.nI1(15,"translate"),e.k0s()(),e.j41(16,"form",6),e.bIt("ngSubmit",function(){return i.saveSyncServer()}),e.j41(17,"pa-radio-group",7)(18,"div",8)(19,"pa-radio",9),e.nI1(20,"translate"),e.j41(21,"span",10),e.EFF(22),e.nI1(23,"translate"),e.k0s()(),e.nVh(24,Ue,3,3),e.k0s(),e.nrm(25,"div",11),e.j41(26,"div",8)(27,"pa-radio",12),e.nI1(28,"translate"),e.j41(29,"span",10),e.EFF(30),e.nI1(31,"translate"),e.k0s()(),e.nVh(32,Le,9,7,"div",13),e.k0s()()()(),e.nrm(33,"div",11),e.j41(34,"section")(35,"div",4)(36,"div",5),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"div",3),e.EFF(40),e.nI1(41,"translate"),e.k0s()(),e.j41(42,"div",14),e.Z7z(43,Je,4,10,"nsy-connector",15,oe),e.nI1(45,"async"),e.k0s()(),e.j41(46,"section")(47,"div",4)(48,"div",5),e.EFF(49),e.nI1(50,"translate"),e.k0s(),e.j41(51,"div",3),e.EFF(52),e.nI1(53,"translate"),e.k0s()(),e.nVh(54,et,2,1),e.nI1(55,"async"),e.k0s()()),2&n){let a;e.R7$(3),e.JRh(e.bMT(4,16,"navbar.sync")),e.R7$(3),e.JRh(e.bMT(7,18,"sync.home-page.description")),e.R7$(5),e.JRh(e.bMT(12,20,"sync.home-page.setup-server.title")),e.R7$(3),e.JRh(e.bMT(15,22,"sync.home-page.setup-server.description")),e.R7$(2),e.Y8G("formGroup",i.syncAgentForm),e.R7$(3),e.Y8G("help",e.bMT(20,24,"sync.home-page.setup-server.on-desktop.radio-help")),e.R7$(3),e.JRh(e.bMT(23,26,"sync.home-page.setup-server.on-desktop.radio-label")),e.R7$(2),e.vxM(i.syncAgentOnServer?-1:24),e.R7$(3),e.Y8G("help",e.bMT(28,28,"sync.home-page.setup-server.on-server.radio-help")),e.R7$(3),e.JRh(e.bMT(31,30,"sync.home-page.setup-server.on-server.radio-label")),e.R7$(2),e.vxM(i.syncAgentOnServer?32:-1),e.R7$(5),e.JRh(e.bMT(38,32,"sync.home-page.add-sources.title")),e.R7$(3),e.JRh(e.bMT(41,34,"sync.home-page.add-sources.description")),e.R7$(3),e.Dyx(e.bMT(45,36,i.connectorList)),e.R7$(6),e.JRh(e.bMT(50,38,"sync.home-page.sync-list.title")),e.R7$(3),e.JRh(e.bMT(53,40,"sync.home-page.sync-list.description")),e.R7$(2),e.vxM((a=e.bMT(55,42,i.syncs))?54:-1,a)}},dependencies:[S.MD,S.Jj,u.nS,$e,u.vY,l.Ymm,j.Q,l.Rx2,Pe.P,Z.P,l.XgI,N.S,l.rkm,U.a,we.v,Ee.u,l.tml,je.d,d.X1,d.qT,d.BC,d.cb,d.j4,d.JD,f.h,f.D9,l.EGN,q.O,ee.e,te.U,Ge.N,Oe.V,K.Wk,l.V3x,E.R,l.Pa6,ne.Z,u.IA,l.OgD,Ve.w],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] .section-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%]{border:1px solid var(--color-neutral-lighter, hsl(207, 17%, 91%));border-radius:.5rem;padding:1.5rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem;justify-content:space-between}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%] pa-radio[_ngcontent-%COMP%]{flex:1 0 auto}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .inline-form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:20rem}@media (min-width: 1440px){section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:26.5rem}}section[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%]{margin:1.5rem 0}section[_ngcontent-%COMP%] .connector-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem}section[_ngcontent-%COMP%] .logo-title[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.25rem;letter-spacing:0;font-weight:400;align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%] pa-table-cell[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{gap:.5rem}section[_ngcontent-%COMP%] pa-table-sortable-header[_ngcontent-%COMP%] .pa-table-grid--header{z-index:1}'],changeDetection:0})}return o})();var nt=c(3129),ot=c(2193),it=c(3728),rt=c(6851),st=c(2071),at=c(5814),ct=c(9285),ie=c(6420);const lt=()=>[],re=(o,r)=>r.id,dt=(o,r)=>r.value;function pt(o,r){if(1&o&&(e.j41(0,"pa-input",30),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("placeholder",t.placeholder)("help",t.help),e.R7$(),e.SpI(" ",e.bMT(2,4,t.label)," ")}}function ht(o,r){if(1&o&&(e.j41(0,"pa-toggle",31),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("help",t.help),e.R7$(),e.SpI(" ",e.bMT(2,3,t.label)," ")}}function ut(o,r){if(1&o&&(e.j41(0,"pa-option",34),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=r.$implicit;e.Y8G("disabled",t.disabled)("value",t.value),e.R7$(),e.SpI(" ",e.bMT(2,3,t.label)," ")}}function mt(o,r){if(1&o&&(e.j41(0,"pa-select",32),e.Z7z(1,ut,3,5,"pa-option",34,dt),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("label",t.label)("help",t.help),e.R7$(),e.Dyx(t.options)}}function gt(o,r){if(1&o&&(e.j41(0,"pa-textarea",31),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("help",t.help),e.R7$(),e.SpI(" ",t.label," ")}}function yt(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.help))}}function ft(o,r){1&o&&(e.j41(0,"nsi-info-card",36),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"sync.form-validation.extra-parameters-incomplete")," "))}function _t(o,r){if(1&o){const t=e.RV6();e.j41(0,"div",33)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nVh(4,yt,3,3,"p"),e.j41(5,"app-parameters-table",35),e.bIt("valuesChange",function(i){s.eBV(t);const a=e.XpG().$implicit,g=e.XpG(3);return s.Njj(g.updateTable(a.id,i))}),e.k0s(),e.nVh(6,ft,3,3,"nsi-info-card",36),e.k0s()}if(2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,4,t.label)),e.R7$(2),e.vxM(t.help?4:-1),e.R7$(),e.Y8G("values",n.tables[t.id]||e.lJ4(6,lt)),e.R7$(),e.vxM(n.invalidTables.includes(t.id)?6:-1)}}function bt(o,r){if(1&o&&e.nVh(0,pt,3,6,"pa-input",30)(1,ht,3,5,"pa-toggle",31)(2,mt,3,3,"pa-select",32)(3,gt,2,3,"pa-textarea",31)(4,_t,7,7,"div",33),2&o){let t;e.vxM("text"===(t=r.$implicit.type)?0:"boolean"===t?1:"select"===t?2:"textarea"===t?3:"table"===t?4:-1)}}function Ct(o,r){if(1&o&&(e.j41(0,"nsi-two-columns-configuration-item",5)(1,"div",2),e.Z7z(2,bt,5,1,null,null,re),e.k0s()()),2&o){const t=r.$implicit;e.Y8G("badge",t.badge)("itemTitle",t.title)("description",t.description||""),e.R7$(2),e.Dyx(t.fields)}}function vt(o,r){1&o&&(e.j41(0,"nsi-two-columns-configuration-item",9)(1,"div",7)(2,"pa-toggle",37),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&o&&(e.R7$(3),e.SpI(" ",e.bMT(4,1,"sync.add-page.security-group.toggle-label")," "))}function St(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsi-label",38),e.bIt("removeLabel",function(){const i=s.eBV(t).$implicit,a=e.XpG(2);return s.Njj(a.removeLabel(i))}),e.EFF(1),e.k0s()}if(2&o){const t=r.$implicit;e.Y8G("color",t.color),e.R7$(),e.SpI(" ",t.label," ")}}function xt(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsi-label",39),e.bIt("removeLabel",function(){const i=s.eBV(t).$implicit,a=e.XpG(2);return s.Njj(a.removeExtension(i))}),e.EFF(1),e.k0s()}if(2&o){const t=r.$implicit;e.R7$(),e.SpI(" ",t," ")}}function Tt(o,r){if(1&o){const t=e.RV6();e.j41(0,"form",0)(1,"nsi-two-columns-configuration-item",1)(2,"div",2)(3,"pa-input",3),e.EFF(4),e.nI1(5,"translate"),e.k0s()()(),e.qex(6,4),e.Z7z(7,Ct,4,3,"nsi-two-columns-configuration-item",5,re),e.nI1(9,"async"),e.bVm(),e.j41(10,"nsi-two-columns-configuration-item",6)(11,"div",7)(12,"app-extraction-select",8),e.bIt("extractConfigChange",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.updateExtractStrategy(i))}),e.k0s()()(),e.nVh(13,vt,5,3,"nsi-two-columns-configuration-item",9),e.j41(14,"nsi-two-columns-configuration-item",10)(15,"div",2)(16,"div",11)(17,"app-label-dropdown",12),e.nI1(18,"async"),e.nI1(19,"async"),e.bIt("selectionChange",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.updateLabelSelection(i))}),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"span",13),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.j41(25,"pa-button",14),e.bIt("click",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.createLabelSet())}),e.EFF(26),e.nI1(27,"translate"),e.k0s()(),e.j41(28,"div",15),e.Z7z(29,St,2,2,"nsi-label",16,e.fX1),e.k0s()(),e.j41(31,"div",17)(32,"pa-toggle",18),e.EFF(33),e.nI1(34,"translate"),e.k0s()()(),e.j41(35,"nsi-two-columns-configuration-item",19)(36,"div",2)(37,"nsi-info-card"),e.EFF(38),e.nI1(39,"translate"),e.k0s(),e.j41(40,"div",20)(41,"div",21)(42,"pa-select",22)(43,"pa-option",23),e.EFF(44),e.nI1(45,"translate"),e.k0s(),e.j41(46,"pa-option",24),e.EFF(47),e.nI1(48,"translate"),e.k0s()(),e.j41(49,"pa-input",25),e.EFF(50),e.nI1(51,"translate"),e.k0s()(),e.j41(52,"div",15),e.Z7z(53,xt,2,1,"nsi-label",26,e.fX1),e.k0s(),e.j41(55,"div",27)(56,"label"),e.EFF(57),e.nI1(58,"translate"),e.k0s(),e.j41(59,"div",21),e.nrm(60,"pa-date-picker",28),e.nI1(61,"translate"),e.nrm(62,"pa-date-picker",29),e.nI1(63,"translate"),e.k0s()()()()()()}if(2&o){const t=e.XpG();e.Y8G("formGroup",t.form),e.R7$(),e.Y8G("noTopBorder",t.noTopBorder),e.R7$(3),e.JRh(e.bMT(5,20,"sync.add-page.connector-name.field-label")),e.R7$(3),e.Dyx(e.bMT(9,22,t.connector.getParametersSections())),e.R7$(5),e.Y8G("onlyExtract",!0)("extractConfig",t.extractStrategy),e.R7$(),e.vxM(t.connector.canSyncSecurityGroups?13:-1),e.R7$(4),e.Y8G("labelSets",e.bMT(18,24,t.labelSets))("selection",t.labelSelection)("disabled",!1===e.bMT(19,26,t.hasLabelSet)),e.R7$(3),e.SpI(" ",e.bMT(21,28,"sync.add-page.add-labels.select-labels")," "),e.R7$(3),e.JRh(e.bMT(24,30,"generic.or")),e.R7$(3),e.SpI(" ",e.bMT(27,32,"sync.add-page.add-labels.create-labelset")," "),e.R7$(3),e.Dyx(t.labelSelection),e.R7$(4),e.SpI(" ",e.bMT(34,34,"sync.add-page.preserve-labels.toggle-label")," "),e.R7$(5),e.JRh(e.bMT(39,36,"sync.add-page.filter-resources.file-extension.info")),e.R7$(6),e.SpI(" ",e.bMT(45,38,"sync.add-page.filter-resources.file-extension.include")," "),e.R7$(3),e.SpI(" ",e.bMT(48,40,"sync.add-page.filter-resources.file-extension.exclude")," "),e.R7$(3),e.SpI(" ",e.bMT(51,42,"sync.add-page.filter-resources.file-extension.label")," "),e.R7$(3),e.Dyx(t.extensionList),e.R7$(4),e.JRh(e.bMT(58,44,"sync.add-page.filter-resources.modification-date.label")),e.R7$(3),e.Y8G("label",e.bMT(61,46,"sync.add-page.filter-resources.modification-date.from")),e.R7$(2),e.Y8G("label",e.bMT(63,48,"sync.add-page.filter-resources.modification-date.to"))}}const Ft=new RegExp(/[^a-z0-9_-]/g);let se=(()=>{class o{constructor(){this.labelService=(0,s.WQX)(C.xQ),this.modalService=(0,s.WQX)(u.w8),this.cdr=(0,s.WQX)(M.gRc),this.unsubscribeAll=new k.B,this.noTopBorder=!1,this.validForm=new e.bkB,this.configurationChange=new e.bkB,this.form=new d.gE({name:new d.MJ("",{nonNullable:!0,validators:[d.k0.required]}),syncSecurityGroups:new d.MJ(null),preserveLabels:new d.MJ(null),filterResources:new d.gE({extensions:new d.MJ("",{updateOn:"blur"}),extensionUsage:new d.MJ("include",{nonNullable:!0}),from:new d.MJ(""),to:new d.MJ("")}),extra:new d.gE({})}),this.labelSets=this.labelService.resourceLabelSets,this.hasLabelSet=this.labelService.hasResourceLabelSets,this.labelSelection=[],this.extensionList=[],this.tables={},this.invalidTables=[],this.extractStrategy="",this._extra={}}set sync(t){if(t){this.connectorParametersBackup=t.connector.parameters;const n={extensions:t.filters?.fileExtensions?.extensions||"",extensionUsage:t.filters?.fileExtensions?.exclude?"exclude":"include",from:t.filters?.modified?.from||"",to:t.filters?.modified?.to||""};this.form.patchValue({name:t.title,syncSecurityGroups:t.syncSecurityGroups,filterResources:n,preserveLabels:t.preserveLabels}),this.labelSelection=t.labels||[],this.extensionList=this.formatExtensionList(n.extensions),t.extract_strategy&&(this.extractStrategy=t.extract_strategy),t.connector.parameters&&Object.entries(t.connector.parameters).forEach(([i,a])=>{"object"!=typeof a?this._extra[i]=a:this.tables[i]=a})}}get extensionsControl(){return this.form.controls.filterResources.controls.extensions}ngOnInit(){this.connector&&this.connector.getParametersSections().subscribe(t=>{t.forEach(n=>n.fields.forEach(i=>{"table"!==i.type&&this.form.controls.extra.addControl(i.id,new d.MJ("",{nonNullable:!0,validators:i.required?[d.k0.required]:[]}))})),Object.keys(this._extra).length>0&&this.form.patchValue({extra:this._extra})}),this.extensionsControl.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(t=>this.extensionList=this.formatExtensionList(t)),this.form.valueChanges.pipe((0,P.Q)(this.unsubscribeAll)).subscribe(()=>{this.validForm.emit(this.form.valid),this.emitSyncEntity()})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}updateTable(t,n){this.tables[t]=n,n.some(i=>!(i.value.trim()&&i.key.trim()||!i.value.trim()&&!i.key.trim()))?this.invalidTables.includes(t)||this.invalidTables.push(t):this.invalidTables.includes(t)&&(this.invalidTables=this.invalidTables.filter(i=>i!==t)),this.cdr.markForCheck(),this.emitSyncEntity()}createLabelSet(){this.modalService.openModal(C.Tv,new l.S6u({data:{kind:ot.po.RESOURCES}}))}updateLabelSelection(t){this.labelSets.pipe((0,b.s)(1),(0,_.p)(n=>!!n),(0,h.T)(n=>n)).subscribe(n=>{this.labelSelection=t.map(i=>({...i,color:n[i.labelset]?.color})),this.emitSyncEntity()})}removeExtension(t){const n=this.extensionList.filter(i=>i!==t);this.extensionsControl.patchValue(n.join(", "))}removeLabel(t){this.labelSelection=this.labelSelection.filter(n=>!(n.labelset===t.labelset&&n.label===t.label)),this.emitSyncEntity()}formatExtensionList(t){return t&&t.length>0?t.split(",").map(n=>n.trim()).filter(n=>!!n):[]}emitSyncEntity(){if(!this.connectorId)return;const t=this.form.getRawValue(),n=t.name,i=(Math.random()+1).toString(36).substring(7),a=`${this.kbId}-${n?.toLowerCase().replace(Ft,"-")}-${i}`,g={fileExtensions:t.filterResources.extensions?{extensions:t.filterResources.extensions,exclude:"exclude"===t.filterResources.extensionUsage}:void 0,modified:t.filterResources.from||t.filterResources.to?{from:t.filterResources.from||void 0,to:t.filterResources.to||void 0}:void 0},y=Object.entries(t.extra||{}).reduce((G,[O,Y])=>({...G,[O]:Y}),{}),x=Object.entries(this.tables).reduce((G,[O,Y])=>(G[O]=Y.filter(pe=>!(!pe.key.trim()||!pe.value.trim())),G),{}),F={id:a,title:n,labels:this.labelSelection,preserveLabels:t.preserveLabels||!1,filters:g,connector:{name:this.connectorId,parameters:{...this.connectorParametersBackup,...x,...y}}};null!==t.syncSecurityGroups&&(F.syncSecurityGroups=t.syncSecurityGroups),F.extract_strategy=this.extractStrategy,this.configurationChange.emit(F)}updateExtractStrategy(t){this.extractStrategy=t,this.validForm.emit(this.form.valid),this.emitSyncEntity()}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-configuration-form"]],inputs:{connector:"connector",connectorId:"connectorId",kbId:"kbId",sync:"sync",noTopBorder:[2,"noTopBorder","noTopBorder",M.L39]},outputs:{validForm:"validForm",configurationChange:"configurationChange"},decls:1,vars:1,consts:[[3,"formGroup"],["itemTitle","sync.add-page.connector-name.title","description","sync.add-page.connector-name.description",3,"noTopBorder"],[1,"form-container"],["formControlName","name"],["formGroupName","extra"],[3,"badge","itemTitle","description"],["itemTitle","sync.add-page.extract-config.title","description","sync.add-page.extract-config.description","badge","generic.badge.advanced"],[1,"form-container","toggle-container"],[3,"extractConfigChange","onlyExtract","extractConfig"],["itemTitle","sync.add-page.security-group.title","description","sync.add-page.security-group.description","badge","generic.badge.advanced"],["badge","generic.badge.optional","itemTitle","sync.add-page.add-labels.title","description","sync.add-page.add-labels.description"],[1,"inline-form","full-width"],["displayRadioForNonMultiple","","aspect","basic","fullWidth","",3,"selectionChange","labelSets","selection","disabled"],[1,"separator-word","body-s"],["icon","circle-plus","aspect","basic","iconAndText","",1,"full-width",3,"click"],[1,"inline-form","small-gap"],[3,"color"],[1,"toggle-container"],["formControlName","preserveLabels"],["badge","generic.badge.optional","itemTitle","sync.add-page.filter-resources.title","description","sync.add-page.filter-resources.description"],["formGroupName","filterResources",1,"form-container"],[1,"inline-form","full-width","small-gap"],["formControlName","extensionUsage"],["value","include"],["value","exclude"],["id","extension","placeholder",".pdf,.docx","formControlName","extensions"],["neutral",""],[1,"label-field-container"],["formControlName","from",3,"label"],["formControlName","to",3,"label"],[3,"formControlName","placeholder","help"],[3,"formControlName","help"],[3,"formControlName","label","help"],[1,"table-container"],[3,"disabled","value"],[3,"valuesChange","values"],["type","warning","icon","warning"],["withBackground","","formControlName","syncSecurityGroups"],[3,"removeLabel","color"],["neutral","",3,"removeLabel"]],template:function(n,i){1&n&&e.nVh(0,Tt,64,50,"form",0),2&n&&e.vxM(i.connector?0:-1)},dependencies:[S.MD,S.Jj,u.IA,u._8,d.X1,d.qT,d.BC,d.cb,d.j4,d.JD,d.$R,l.XgI,N.S,rt.w,st.Q,Z.P,C.Qy,C.Bo,at.L,l.Ymm,j.Q,f.h,f.D9,l.OYn,ct.I,u.OE,ie.U,l.rkm,U.a,it.RxD],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.toggle-container[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{justify-content:space-between}.table-container[_ngcontent-%COMP%] nsi-info-card[_ngcontent-%COMP%]{margin-top:.75rem}'],changeDetection:0})}return o})();var It=c(1943),ae=c(7670);const Rt=o=>({total:o}),Mt=o=>({count:o});function kt(o,r){1&o&&e.nrm(0,"nsi-spinner")}function $t(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsi-folder-tree",3),e.bIt("selectionChange",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("selection",t.selection)("folderTree",t.folders)}}function Pt(o,r){if(1&o&&e.nrm(0,"nsi-folder-list",2),2&o){const t=e.XpG(2);e.Y8G("folders",t.selectedPaths)}}function wt(o,r){if(1&o&&e.nVh(0,$t,1,2,"nsi-folder-tree",1)(1,Pt,1,1,"nsi-folder-list",2),2&o){const t=e.XpG();e.vxM(t.seeAll?0:1)}}let B=(()=>{class o{constructor(){this.syncService=(0,s.WQX)(w),this.toaster=(0,s.WQX)(u._g),this.cdr=(0,s.WQX)(M.gRc),this.selectedSyncItems=new e.bkB,this.searchQuery=new d.MJ("",{nonNullable:!0}),this.totalFolders=0,this.selectionCount=0,this.loading=!1,this.seeAll=!0,this.selection=[],this.selectedPaths=[],this.syncItems=[],this.selectedIds=[]}ngOnInit(){this.updateSelection((this.sync.foldersToSync||[]).map(t=>({id:t.uuid,path:t.metadata.path}))),this.loadFolders()}updateView(t){this.seeAll="left"===t}updateSelection(t){this.selection=t,this.selectedPaths=t.map(n=>n.path),this.selectedIds=t.map(n=>n.id),this.selectionCount=t.length,this.selectedSyncItems.emit(this.syncItems.filter(n=>this.selectedIds.includes(n.uuid))),this.cdr.markForCheck()}loadFolders(t){this.loading=!0,this.syncService.getFolders(t?.value||"").pipe((0,V.W)(n=>(n&&this.toaster.error("string"==typeof n?n:n.error?.message||n.error||n.message||"An error occurred"),(0,m.of)({items:[],nextPage:void 0}))),(0,It.S)((n,i)=>n.concat(i.items),[]),(0,h.T)(n=>[{uuid:"root",originalId:"/",title:"/",status:$.PENDING,metadata:{path:"/"}},...n]),(0,h.T)(n=>n.sort((i,a)=>i.metadata.path.localeCompare(a.metadata.path))),(0,v.M)(n=>{this.totalFolders=n.length,this.syncItems=n}),(0,h.T)(n=>this.getFolderTreeFromSyncItems(n))).subscribe({next:n=>{this.loading=!1,this.folders=n,this.cdr.markForCheck()}})}getFolderTreeFromSyncItems(t){const n={id:"root",path:"/",title:"/",expanded:!0,children:{}};return t.filter(i=>"root"!==i.uuid).forEach(i=>{const a=i.metadata.path,g=i.originalId,y={id:g,title:i.title,path:a,displayPath:i.metadata.displayPath||a,children:{}};if("/"===a)n.children[g]=y;else{let F,x=n;a.split("/").slice(1,-1).forEach(O=>{x&&(F=x.children?.[O],F&&(x=F))}),x.children?x.children[g]=y:x.children={[g]:y}}}),n}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-folder-selection"]],inputs:{sync:"sync"},outputs:{selectedSyncItems:"selectedSyncItems"},decls:7,vars:14,consts:[[3,"activeChange","leftButton","rightButton"],[3,"selection","folderTree"],[3,"folders"],[3,"selectionChange","selection","folderTree"]],template:function(n,i){1&n&&(e.j41(0,"header"),e.nrm(1,"div"),e.j41(2,"nsi-segmented-buttons",0),e.nI1(3,"translate"),e.nI1(4,"translate"),e.bIt("activeChange",function(g){return i.updateView(g)}),e.k0s()(),e.nVh(5,kt,1,0,"nsi-spinner"),e.nVh(6,wt,2,1)),2&n&&(e.R7$(2),e.Y8G("leftButton",e.i5U(3,4,"sync.folder-selection.see-all",e.eq3(10,Rt,i.totalFolders)))("rightButton",e.i5U(4,7,"sync.folder-selection.see-selection",e.eq3(12,Mt,i.selectionCount))),e.R7$(3),e.vxM(i.loading?5:-1),e.R7$(),e.vxM(i.folders?6:-1))},dependencies:[u.Sq,u.sH,l.Ymm,l.XgI,d.X1,u.vI,u.J4,ae.t,f.h,f.D9],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}return o})();const Et=o=>({connector:o}),jt=(o,r)=>({index:o,total:r});function Gt(o,r){if(1&o&&(e.j41(0,"div")(1,"h1",2),e.nrm(2,"pa-icon",3),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",4),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&o){const t=r,n=e.XpG();e.R7$(2),e.Y8G("path",t.logo),e.R7$(),e.SpI(" ",e.i5U(4,3,"sync.add-page.title",e.eq3(8,Et,t.title))," "),e.R7$(3),e.JRh(e.bMT(7,6,"sync.add-page.description."+n))}}function Ot(o,r){if(1&o&&(e.nVh(0,Gt,8,10,"div"),e.nI1(1,"async")),2&o){let t;const n=e.XpG();e.vxM((t=e.bMT(1,1,n.connectorDefinition))?0:-1,t)}}function Vt(o,r){1&o&&e.nrm(0,"nsi-spinner")}function Xt(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-configuration-form",6),e.nI1(1,"async"),e.nI1(2,"async"),e.bIt("configurationChange",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.updateConfiguration(i))})("validForm",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.validForm=i)}),e.k0s()}if(2&o){const t=e.XpG(2),n=e.XpG();e.Y8G("sync",n.sync)("kbId",e.bMT(1,4,n.kbId))("connector",t)("connectorId",e.bMT(2,6,n.connectorId))}}function Dt(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",8),e.bIt("selectedSyncItems",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("sync",t.sync)}}function At(o,r){if(1&o&&e.nVh(0,Dt,1,1,"nsy-folder-selection",7),2&o){const t=e.XpG(3);e.vxM(t.sync?0:-1)}}function Nt(o,r){if(1&o&&(e.EFF(0),e.nI1(1,"translate")),2&o){const t=e.XpG(),n=e.XpG(3);e.SpI(" ",e.i5U(1,1,"sync.add-page.footer.steps",e.l_i(4,jt,n.step(),t.length))," ")}}function Ut(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-button",12),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.cancel())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"generic.cancel")," "))}function Bt(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-button",12),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.goBack())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"generic.back")," "))}function Yt(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-button",13),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.goNext())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("disabled",!t.validForm||t.saving),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.add-page.footer.folder-selection-button")," ")}}function Lt(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-button",13),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.save())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(3),n=e.XpG();e.Y8G("disabled",!n.validForm||t.allowToSelectFolders&&0===n.folderSelection.length||n.saving),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.add-page.footer.save-button")," ")}}function Jt(o,r){if(1&o&&(e.j41(0,"nsi-sticky-footer")(1,"div",9),e.nVh(2,Nt,2,7),e.k0s(),e.nVh(3,Ut,3,3,"pa-button",10)(4,Bt,3,3,"pa-button",10),e.nVh(5,Yt,3,4,"pa-button",11)(6,Lt,3,4,"pa-button",11),e.k0s()),2&o){const t=r,n=e.XpG(3);e.R7$(2),e.vxM(t.length>1?2:-1),e.R7$(),e.vxM(1===n.step()?3:4),e.R7$(2),e.vxM(t.length>1&&n.step()<t.length?5:6)}}function Qt(o,r){if(1&o&&(e.nVh(0,Xt,3,8,"nsy-configuration-form",5)(1,At,1,1),e.nVh(2,Jt,7,3,"nsi-sticky-footer"),e.nI1(3,"async")),2&o){let t,n;const i=e.XpG(2);e.vxM(1===(t=i.step())?0:2===t?1:-1),e.R7$(2),e.vxM((n=e.bMT(3,2,i.steps))?2:-1,n)}}function Wt(o,r){if(1&o&&(e.j41(0,"div"),e.nVh(1,Vt,1,0,"nsi-spinner")(2,Qt,4,4),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.loading?1:2)}}let ce=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.sdk=(0,s.WQX)(C.ok),this.syncService=(0,s.WQX)(w),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.toaster=(0,s.WQX)(u._g),this.cdr=(0,s.WQX)(M.gRc),this.connectorId=this.currentRoute.params.pipe((0,_.p)(t=>t.connector),(0,h.T)(t=>t.connector)),this.connectorDefinition=this.connectorId.pipe((0,h.T)(t=>this.syncService.getConnectorDefinition(t))),this.connector=this.connectorId.pipe((0,h.T)(t=>this.syncService.getConnector(t,""))),this.kbId=this.sdk.currentKb.pipe((0,h.T)(t=>t.id)),this.steps=this.connector.pipe((0,h.T)(t=>t.allowToSelectFolders?["configuration","folder-selection"]:["configuration"])),this.stepIndex=(0,s.vPA)(0),this.step=(0,nt.EW)(()=>this.stepIndex()+1),this.validForm=!1,this.folderSelection=[],this.loading=!1,this.saving=!1}get backPath(){return this.syncId?"../../..":"../.."}ngOnInit(){this.currentRoute.params.pipe((0,_.p)(t=>!!t.syncId),(0,b.s)(1),(0,v.M)(t=>{this.loading=!0,this.cdr.markForCheck(),this.syncId=t.syncId,this.syncService.setCurrentSyncId(this.syncId),this.validForm=!0}),(0,p.n)(()=>this.syncService.getSync(this.syncId)),(0,v.M)(t=>{this.sync=t,this.configuration=t,this.cdr.markForCheck()}),(0,p.n)(t=>this.syncService.hasCurrentSourceAuth().pipe((0,v.M)(n=>{n&&(this.loading=!1,this.cdr.markForCheck())}),(0,_.p)(n=>!n),(0,h.T)(()=>this.syncService.getConnector(t.connector.name,t.id)),(0,p.n)(n=>this.syncService.authenticateToConnector(t.connector.name,n))))).subscribe({next:()=>{this._goNext(),this.loading=!1,this.cdr.markForCheck(),this.router.navigate([],{queryParams:{}})},error:()=>this.toaster.error("sync.details.authentication.fail")})}goBack(){this.stepIndex()>0&&this.stepIndex.update(t=>t-1)}goNext(){if(!this.configuration)return;const t=this.configuration;this.syncId?this._goNext():this.connectorDefinition.pipe((0,b.s)(1),(0,p.n)(n=>this.modalService.openConfirm({title:this.translate.instant("sync.add-page.confirm-authenticate.title",{connector:n.title}),description:this.translate.instant("sync.add-page.confirm-authenticate.description"),confirmLabel:this.translate.instant("sync.add-page.confirm-authenticate.confirm-button")}).onClose),(0,_.p)(n=>!!n),(0,p.n)(()=>this._createSync(t)),(0,p.n)(n=>this._onSuccessfulCreation(n,t))).subscribe({error:n=>{console.warn(n),this.toaster.error("sync.add-page.toast.generic-error")}})}cancel(){this.syncId?this.modalService.openConfirm({title:"sync.confirm.cancel-oauth.title",description:"sync.confirm.cancel-oauth.description",isDestructive:!0,confirmLabel:"sync.confirm.cancel-oauth.confirm-label",cancelLabel:"sync.confirm.cancel-oauth.cancel-label"}).onClose.pipe((0,_.p)(t=>!!t),(0,p.n)(()=>this.syncService.deleteSync(this.syncId))).subscribe({next:()=>this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}):this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}save(){if(!this.configuration)return;this.saving=!0;const t=this.configuration;if(this.syncId){if(this.folderSelection.length>0){const n=this.syncId;this.syncService.updateSync(n,{foldersToSync:this.folderSelection},!0).pipe((0,p.n)(()=>this._syncCreationDone(n))).subscribe({error:i=>this._errorHandler(i)})}}else this._createSync(t).pipe((0,p.n)(n=>this._onSuccessfulCreation(n,t))).subscribe({error:n=>this._errorHandler(n)})}updateConfiguration(t){this.configuration=t}updateSelection(t){this.folderSelection=t}_goNext(){this.steps.pipe((0,b.s)(1)).subscribe(t=>{this.stepIndex()<t.length&&this.stepIndex.update(n=>n+1)})}_createSync(t){return this.syncService.addSync(t).pipe((0,v.M)(()=>this.syncService.setCurrentSyncId(t.id)),(0,h.T)(()=>this.syncService.getConnector(t.connector.name,t.id)),(0,p.n)(n=>n.allowToSelectFolders?(0,m.of)(n):("function"==typeof n.handleParameters&&n.handleParameters(t.connector.parameters),this.syncService.updateSync(t.id,{foldersToSync:n.getStaticFolders()}).pipe((0,h.T)(()=>this.syncService.getConnector(t.connector.name,t.id))))))}_onSuccessfulCreation(t,n){if(t.hasServerSideAuth){let i=location.href.split("/sync/add/")[0];return this.sdk.nuclia.options.standalone&&(i=i.replace("#/","")),t.goToOAuth(`${i}/sync/add/${n.connector.name}/${n.id}`,!0),(0,m.of)()}return this._syncCreationDone(n.id)}_syncCreationDone(t){return(0,m.of)(!0).pipe((0,v.M)(()=>{this.router.navigate([this.syncId?`../../../${t}`:`../../${t}`],{relativeTo:this.currentRoute})}),(0,p.n)(()=>(this.toaster.success("sync.details.toast.triggering-sync-success"),this.syncService.triggerSync(t).pipe((0,V.W)(()=>(this.toaster.error("sync.details.toast.triggering-sync-failed"),(0,m.of)()))))))}_errorHandler(t){this.saving=!1,console.warn(t),this.toaster.error("sync.add-page.toast.generic-error")}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-add-sync-page"]],decls:8,vars:10,consts:[[1,"page-spacing"],[3,"link"],[1,"page-title"],["size","large",3,"path"],[1,"page-description"],[3,"sync","kbId","connector","connectorId"],[3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"sync"],[3,"selectedSyncItems","sync"],["footerNote",""],["aspect","basic"],["kind","primary",3,"disabled"],["aspect","basic",3,"click"],["kind","primary",3,"click","disabled"]],template:function(n,i){if(1&n&&(e.j41(0,"div",0)(1,"nsi-back-button",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nVh(4,Ot,2,3),e.nI1(5,"async"),e.nVh(6,Wt,3,1,"div"),e.nI1(7,"async"),e.k0s()),2&n){let a,g;e.R7$(),e.Y8G("link",i.backPath),e.R7$(),e.SpI(" ",e.bMT(3,4,"sync.add-page.back-button")," "),e.R7$(2),e.vxM((a=e.bMT(5,6,i.connectorId))?4:-1,a),e.R7$(2),e.vxM((g=e.bMT(7,8,i.connector))?6:-1,g)}},dependencies:[S.MD,S.Jj,u.Xp,l.Ymm,j.Q,l.V3x,E.R,u.o3,f.h,f.D9,se,B,u.J4,ae.t],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.inline-form[_ngcontent-%COMP%] pa-select[_ngcontent-%COMP%]{flex:0 0 auto;min-width:8rem;width:fit-content}.inline-form[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{max-width:unset}'],changeDetection:0})}return o})();var Ht=c(4572),zt=c(2885);const Kt=["activitySection"],le=(o,r)=>r.id;function Zt(o,r){if(1&o&&(e.j41(0,"div",3)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",14),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.nrm(7,"div",4)),2&o){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,2,"sync.details.settings.synchronize-security-groups")),e.R7$(3),e.SpI(" ",e.bMT(6,4,t.sync.syncSecurityGroups?"sync.details.settings.boolean.true":"sync.details.settings.boolean.false")," ")}}function qt(o,r){if(1&o&&(e.j41(0,"nsi-label",6),e.EFF(1),e.k0s()),2&o){const t=r.$implicit;e.Y8G("color",t.color),e.R7$(),e.SpI(" ",t.label," ")}}function en(o,r){1&o&&e.EFF(0," \u2013 ")}function tn(o,r){if(1&o&&(e.j41(0,"nsi-label",15),e.EFF(1),e.k0s()),2&o){const t=r.$implicit;e.R7$(),e.SpI(" ",t," ")}}function nn(o,r){1&o&&e.EFF(0," \u2013 ")}function on(o,r){1&o&&(e.j41(0,"div",5),e.Z7z(1,tn,2,1,"nsi-label",15,e.fX1,!1,nn,1,0),e.k0s()),2&o&&(e.R7$(),e.Dyx(r.extensions.split(", ")))}function rn(o,r){1&o&&e.EFF(0," \u2013 ")}function sn(o,r){if(1&o&&(e.EFF(0),e.nI1(1,"translate"),e.nrm(2,"pa-datetime",16),e.EFF(3),e.nI1(4,"translate"),e.nrm(5,"pa-datetime",16)),2&o){const t=r;e.SpI(" ",e.bMT(1,4,"sync.details.settings.modification-date.from")," "),e.R7$(2),e.Y8G("datetime",t.from),e.R7$(),e.SpI(" ",e.bMT(4,6,"sync.details.settings.modification-date.to")," "),e.R7$(2),e.Y8G("datetime",t.to)}}function an(o,r){1&o&&e.EFF(0," \u2013 ")}function cn(o,r){if(1&o&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(),e.JRh(n.sync.connector.parameters[t.id]||"_")}}function ln(o,r){if(1&o&&e.nrm(0,"app-parameters-table",18),2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("values",n.sync.connector.parameters[t.id])}}function dn(o,r){1&o&&e.EFF(0," \u2013 ")}function pn(o,r){1&o&&e.nrm(0,"div",4)}function hn(o,r){if(1&o&&(e.j41(0,"div",3)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nVh(4,cn,2,1,"div")(5,ln,1,1,"app-parameters-table",18)(6,dn,1,0),e.k0s(),e.nVh(7,pn,1,0,"div",4)),2&o){const t=r.$implicit,n=r.$index,i=r.$count,a=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,3,t.label)),e.R7$(2),e.vxM("table"!==t.type?4:(null==a.sync.connector.parameters[t.id]?null:a.sync.connector.parameters[t.id].length)>0?5:6),e.R7$(3),e.vxM(n!==i-1?7:-1)}}function un(o,r){if(1&o&&(e.j41(0,"nsi-two-columns-configuration-item",17)(1,"div",2),e.Z7z(2,hn,8,5,null,null,le),e.k0s()()),2&o){const t=r.$implicit;e.Y8G("itemTitle",t.title)("description",t.description||""),e.R7$(2),e.Dyx(t.fields)}}function mn(o,r){if(1&o&&(e.Z7z(0,un,4,2,"nsi-two-columns-configuration-item",17,le),e.nI1(2,"async")),2&o){const t=e.XpG();e.Dyx(e.bMT(2,0,t.connector.getParametersSections()))}}function gn(o,r){if(1&o&&(e.j41(0,"nsi-two-columns-configuration-item",8)(1,"div"),e.EFF(2),e.k0s()()),2&o){const t=e.XpG();e.R7$(2),e.JRh(t.extractStrategy)}}function yn(o,r){1&o&&e.nrm(0,"pa-icon",20)}function fn(o,r){1&o&&e.nrm(0,"pa-icon",21)}function _n(o,r){1&o&&e.nrm(0,"pa-icon",22)}function bn(o,r){if(1&o&&(e.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"div",19),e.nVh(3,yn,1,0,"pa-icon",20)(4,fn,1,0,"pa-icon",21)(5,_n,1,0,"pa-icon",22),e.EFF(6),e.k0s()(),e.j41(7,"pa-table-cell")(8,"div",23),e.nrm(9,"pa-datetime",24),e.k0s()()()),2&o){let t;const n=r.$implicit;e.R7$(3),e.vxM("high"===(t=n.level)?3:"medium"===t?4:"low"===t?5:-1),e.R7$(3),e.SpI(" ",n.message," "),e.R7$(3),e.Y8G("datetime",n.createdAt)}}function Cn(o,r){1&o&&(e.j41(0,"pa-table-row",13)(1,"pa-table-cell")(2,"div",23),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&o&&(e.R7$(3),e.JRh(e.bMT(4,1,"sync.details.activity-log.no-activity")))}let vn=(()=>{class o{constructor(){this.labelService=(0,s.WQX)(C.xQ),this.cdr=(0,s.WQX)(M.gRc),this.currentRoute=(0,s.WQX)(I.nX),this.sdk=(0,s.WQX)(C.ok),this.connector=null,this._logs=[],this.labelSets={},this.coloredLabels=[],this.extractStrategy=""}set logs(t){t&&(this._logs=t)}get logs(){return this._logs}ngAfterViewInit(){this.currentRoute.queryParams.pipe((0,_.p)(t=>t.section),(0,h.T)(t=>t.section),(0,b.s)(1)).subscribe({next:t=>{setTimeout(()=>{"activity"===t&&this.activitySection&&this.activitySection.nativeElement.scrollIntoView({behavior:"smooth"})},300)}})}ngOnInit(){this.labelService.resourceLabelSets.pipe((0,b.s)(1),(0,_.p)(n=>!!n),(0,h.T)(n=>n)).subscribe(n=>{this.labelSets=n,this.coloredLabels=this.sync.labels?.map(i=>({...i,color:this.labelSets[i.labelset]?.color}))||[],this.cdr.detectChanges()});const t=this.sync.extract_strategy;t&&this.sdk.currentKb.pipe((0,b.s)(1),(0,p.n)(n=>n.getExtractStrategies())).subscribe(n=>{this.extractStrategy=n[t]?.name||"",this.cdr.markForCheck()})}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-sync-settings"]],viewQuery:function(n,i){if(1&n&&e.GBs(Kt,5),2&n){let a;e.mGM(a=e.lsd())&&(i.activitySection=a.first)}},inputs:{sync:"sync",connector:"connector",logs:"logs"},decls:48,vars:26,consts:[["activitySection",""],["noTopBorder","","itemTitle","sync.details.settings.title","description","sync.details.settings.description"],[1,"sync-settings-container"],[1,"body-s","settings-item"],[1,"separator-line"],[1,"row-container"],["readonly","",3,"color"],[1,"body-s","row-container"],["itemTitle","sync.add-page.extract-config.title","description","sync.add-page.extract-config.description"],["itemTitle","sync.details.activity-log.title","description","sync.details.activity-log.description"],[1,"activity-logs-container"],["border","","columns","2fr 1fr"],["header",""],["last",""],[2,"text-transform","capitalize"],["readonly","","neutral",""],["dateOnly","",3,"datetime"],[3,"itemTitle","description"],["readonly","",3,"values"],[1,"body-s","icon-and-text"],["size","small","name","circle-cross",1,"error"],["size","small","name","warning",1,"warning"],["size","small","name","circle-check",1,"success"],[1,"body-s"],[3,"datetime"]],template:function(n,i){if(1&n&&(e.j41(0,"nsi-two-columns-configuration-item",1)(1,"div",2)(2,"div",3)(3,"label"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div"),e.EFF(7),e.k0s()(),e.nrm(8,"div",4),e.nVh(9,Zt,8,6),e.j41(10,"div",3)(11,"label"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"div",5),e.Z7z(15,qt,2,2,"nsi-label",6,e.fX1,!1,en,1,0),e.k0s()(),e.nrm(18,"div",4),e.j41(19,"label"),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"div",3),e.nVh(23,on,4,1,"div",5)(24,rn,1,0),e.k0s(),e.nrm(25,"div",4),e.j41(26,"label"),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"div",7),e.nVh(30,sn,6,8)(31,an,1,0),e.k0s()()(),e.nVh(32,mn,3,2),e.nVh(33,gn,3,1,"nsi-two-columns-configuration-item",8),e.j41(34,"nsi-two-columns-configuration-item",9)(35,"div",10,0)(37,"pa-table",11)(38,"pa-table-header")(39,"pa-table-cell",12),e.EFF(40),e.nI1(41,"translate"),e.k0s(),e.j41(42,"pa-table-cell",12),e.EFF(43),e.nI1(44,"translate"),e.k0s()(),e.Z7z(45,bn,10,3,"pa-table-row",null,e.fX1,!1,Cn,5,3,"pa-table-row",13),e.k0s()()()),2&n){let a,g;e.R7$(4),e.JRh(e.bMT(5,14,"sync.details.settings.name")),e.R7$(3),e.JRh(i.sync.title),e.R7$(2),e.vxM(null!=i.connector&&i.connector.canSyncSecurityGroups?9:-1),e.R7$(3),e.JRh(e.bMT(13,16,"sync.details.settings.labels")),e.R7$(3),e.Dyx(i.coloredLabels),e.R7$(5),e.SpI(" ",e.bMT(21,18,null!=i.sync.filters&&null!=i.sync.filters.fileExtensions&&i.sync.filters.fileExtensions.exclude?"sync.details.settings.file-extensions.excluded":"sync.details.settings.file-extensions.included")," "),e.R7$(3),e.vxM((a=null==i.sync.filters?null:i.sync.filters.fileExtensions)?23:24,a),e.R7$(4),e.JRh(e.bMT(28,20,"sync.details.settings.modification-date.label")),e.R7$(3),e.vxM((g=null==i.sync.filters?null:i.sync.filters.modified)?30:31,g),e.R7$(2),e.vxM(i.connector?32:-1),e.R7$(),e.vxM(i.extractStrategy?33:-1),e.R7$(7),e.JRh(e.bMT(41,22,"sync.details.activity-log.table-header.message")),e.R7$(3),e.JRh(e.bMT(44,24,"sync.details.activity-log.table-header.date")),e.R7$(2),e.Dyx(i.logs)}},dependencies:[S.MD,S.Jj,u._8,f.h,f.D9,u.OE,ie.U,l.Pa6,ne.Z,l.EGN,q.O,ee.e,te.U,zt.Bz,l.V3x,E.R,C.Qy],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.sync-settings-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.sync-settings-container[_ngcontent-%COMP%] .settings-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.sync-settings-container[_ngcontent-%COMP%] .body-s[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:var(--color-neutral-regular, hsl(207, 17%, 58%));font-weight:600}.sync-settings-container[_ngcontent-%COMP%] .row-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.25rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] pa-icon[_ngcontent-%COMP%]{display:flex}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .error[_ngcontent-%COMP%], .activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{color:var(--color-secondary-stronger, hsl(7, 90%, 35%))}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:var(--color-primary-strong)}'],changeDetection:0})}return o})();const Sn=o=>({count:o});function xn(o,r){if(1&o){const t=e.RV6();e.j41(0,"header")(1,"pa-input",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"pa-button",2),e.bIt("click",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.editing=!0)}),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",3),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.nrm(10,"nsi-folder-list",4)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("formControl",t.queryControl),e.R7$(),e.SpI(" ",e.bMT(3,6,"sync.folder-selection.search-input-label")," "),e.R7$(3),e.JRh(e.bMT(6,8,"sync.folder-selection.edit-folders-button")),e.R7$(3),e.JRh(e.bMT(9,10,"sync.folder-selection.current-selection")),e.R7$(2),e.Y8G("filtered",!!t.query)("folders",t.selectedFolders)}}function Tn(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",5),e.bIt("selectedSyncItems",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.updateSelection(i))}),e.k0s(),e.j41(1,"nsi-sticky-footer")(2,"div",6),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"pa-button",7),e.bIt("click",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.editing=!1)}),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.j41(8,"pa-button",8),e.bIt("click",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.saveSelection())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()}if(2&o){const t=e.XpG();e.Y8G("sync",t.sync),e.R7$(3),e.SpI(" ",e.i5U(4,4,"sync.folder-selection.footer.selection-count",e.eq3(11,Sn,t.selectionCount))," "),e.R7$(3),e.SpI(" ",e.bMT(7,7,"generic.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(10,9,"sync.folder-selection.footer.save-changes")," ")}}let Fn=(()=>{class o{constructor(){this.cdr=(0,s.WQX)(M.gRc),this._unsubscribeAll=new k.B,this.selectionChange=new e.bkB,this.editing=!1,this.selection=[],this.selectionCount=0,this.queryControl=new d.MJ("")}set sync(t){this._sync=t,this.updateSelection(t.foldersToSync||[])}get sync(){return this._sync}get selectedFolders(){const t=this.selection.map(i=>i.metadata.displayPath||i.metadata.path)||[],n=this.query?this.query.toLocaleLowerCase():"";return n?t.filter(i=>i.toLocaleLowerCase().includes(n)):t}get query(){return this.queryControl.value}updateSelection(t){this.selection=t,this.selectionCount=this.selection.length,this.cdr.detectChanges()}saveSelection(){this.selectionChange.emit(this.selection),this.editing=!1,this.cdr.markForCheck()}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-folders-tab"]],inputs:{sync:"sync"},outputs:{selectionChange:"selectionChange"},decls:3,vars:1,consts:[[1,"folders-tab"],["icon","search",3,"formControl"],[3,"click"],[1,"title-xxs"],[3,"filtered","folders"],[3,"selectedSyncItems","sync"],["footerNote","",1,"title-xs"],["aspect","basic",3,"click"],["kind","primary",3,"click"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.nVh(1,xn,11,12)(2,Tn,11,13),e.k0s()),2&n&&(e.R7$(),e.vxM(i.editing?i.sync?2:-1:1))},dependencies:[B,l.XgI,N.S,l.Ymm,j.Q,f.h,f.D9,l.V3x,u.Sq,u.o3,d.X1,d.BC,d.l_],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.folders-tab[_ngcontent-%COMP%]{position:relative}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}return o})();var In=c(7725),Rn=c(3515);function Mn(o,r){if(1&o){const t=e.RV6();e.j41(0,"div",8)(1,"div",9)(2,"pa-toggle",10),e.bIt("valueChange",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.toggleSync(i))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"pa-button",11),e.nI1(6,"async"),e.bIt("click",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.triggerSync())}),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"pa-button",12),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"pa-button",13),e.bIt("click",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.deleteSync())}),e.EFF(13),e.nI1(14,"translate"),e.k0s()()}if(2&o){const t=e.XpG(2),n=e.XpG();e.R7$(2),e.Y8G("value",!t.disabled),e.R7$(),e.SpI(" ",e.bMT(4,6,t.disabled?"sync.badge.inactive":"sync.badge.active")," "),e.R7$(2),e.Y8G("disabled",e.bMT(6,8,n.isSyncing)),e.R7$(2),e.SpI(" ",e.bMT(8,10,"sync.details.buttons.sync-now")," "),e.R7$(3),e.SpI(" ",e.bMT(11,12,"sync.details.buttons.edit-settings")," "),e.R7$(3),e.SpI(" ",e.bMT(14,14,"sync.details.buttons.delete")," ")}}function kn(o,r){if(1&o&&(e.j41(0,"div",2)(1,"h1",6),e.nrm(2,"pa-icon",7),e.EFF(3),e.k0s(),e.nVh(4,Mn,15,16,"div",8),e.nI1(5,"async"),e.k0s()),2&o){const t=e.XpG(),n=e.XpG();e.R7$(2),e.Y8G("path",r.logo),e.R7$(),e.SpI(" ",t.title," "),e.R7$(),e.vxM(!1===e.bMT(5,3,n.editMode)?4:-1)}}function $n(o,r){if(1&o){const t=e.RV6();e.j41(0,"pa-tab",14),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.activeTab="folders")}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("active","folders"===t.activeTab),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.details.tabs.folders")," ")}}function Pn(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-configuration-form",19),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("configurationChange",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.updateConfiguration(i))})("validForm",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.validForm=i)}),e.k0s()}if(2&o){let t;const n=e.XpG(2),i=e.XpG();e.Y8G("sync",n)("kbId",e.bMT(1,4,i.kbId))("connector",e.bMT(2,6,i.connector))("connectorId",null==(t=e.bMT(3,8,i.connectorDef))?null:t.id)}}function wn(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",20),e.bIt("selectedSyncItems",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("sync",t)}}function En(o,r){if(1&o){const t=e.RV6();e.j41(0,"div"),e.nVh(1,Pn,4,10,"nsy-configuration-form",15)(2,wn,1,1,"nsy-folder-selection",16),e.j41(3,"nsi-sticky-footer")(4,"pa-button",17),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"pa-button",18),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.saveChanges())}),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()}if(2&o){let t;const n=e.XpG(2);e.R7$(),e.vxM("settings"===(t=n.activeTab)?1:"folders"===t?2:-1),e.R7$(4),e.SpI(" ",e.bMT(6,3,"generic.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(9,5,"sync.details.buttons.save-changes")," ")}}function jn(o,r){if(1&o&&(e.nrm(0,"nsy-sync-settings",21),e.nI1(1,"async"),e.nI1(2,"async")),2&o){const t=e.XpG(2),n=e.XpG();e.Y8G("sync",t)("connector",e.bMT(1,3,n.connector))("logs",e.bMT(2,5,n.activityLogs))}}function Gn(o,r){if(1&o){const t=e.RV6();e.j41(0,"nsy-folders-tab",22),e.bIt("selectionChange",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.updateFolders(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("sync",t)}}function On(o,r){if(1&o&&e.nVh(0,jn,3,7,"nsy-sync-settings",21)(1,Gn,1,1,"nsy-folders-tab",16),2&o){let t;const n=e.XpG(2);e.vxM("settings"===(t=n.activeTab)?0:"folders"===t?1:-1)}}function Vn(o,r){if(1&o){const t=e.RV6();e.nVh(0,kn,6,5,"div",2),e.nI1(1,"async"),e.j41(2,"pa-tabs",3)(3,"pa-tab",4),e.bIt("click",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.activeTab="settings")}),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.nVh(6,$n,3,4,"pa-tab",5),e.nI1(7,"async"),e.k0s(),e.nVh(8,En,10,7,"div"),e.nI1(9,"async"),e.vZN(10,On,2,1)}if(2&o){let t,n;const i=e.XpG();e.vxM((t=e.bMT(1,5,i.connectorDef))?0:-1,t),e.R7$(3),e.Y8G("active","settings"===i.activeTab),e.R7$(),e.SpI(" ",e.bMT(5,7,"sync.details.tabs.settings")," "),e.R7$(2),e.vxM(null!=(n=e.bMT(7,9,i.connector))&&n.allowToSelectFolders?6:-1),e.R7$(2),e.vxM(e.bMT(9,11,i.editMode)?8:10)}}let de=(()=>{class o{constructor(){this.router=(0,s.WQX)(I.Ix),this.currentRoute=(0,s.WQX)(I.nX),this.syncService=(0,s.WQX)(w),this.toaster=(0,s.WQX)(u._g),this.sdk=(0,s.WQX)(C.ok),this.modalService=(0,s.WQX)(u.w8),this.translate=(0,s.WQX)(f.c$),this.unsubscribeAll=new k.B,this.isDeleted=new k.B,this.kbId=this.sdk.currentKb.pipe((0,h.T)(t=>t.id)),this.syncId=this.currentRoute.params.pipe((0,_.p)(t=>!!t.syncId),(0,h.T)(t=>t.syncId),(0,v.M)(t=>this.syncService.setCurrentSyncId(t))),this.sync=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.syncId),(0,p.n)(t=>this.syncService.getSync(t)),(0,P.Q)(this.isDeleted)),this.connectorDef=this.sync.pipe((0,h.T)(t=>this.syncService.connectors[t.connector.name].definition)),this.connector=this.connectorDef.pipe((0,h.T)(t=>this.syncService.getConnector(t.id,""))),this.activityLogs=this.syncId.pipe((0,p.n)(t=>this.syncService.getLogs(t))),this.activeTab="settings",this.editMode=this.currentRoute.url.pipe((0,h.T)(t=>t.length>1&&"edit"===t[1].path)),this.validForm=!1,this.isSyncing=(0,Ht.z)([this.syncId,this.syncService.isSyncing]).pipe((0,h.T)(([t,n])=>n[t]||!1))}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete(),this.isDeleted.next(),this.isDeleted.complete()}toggleSync(t){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{disabled:!t}))).subscribe({error:()=>this.toaster.error(t?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}triggerSync(){this.modalService.openConfirm({title:this.translate.instant("sync.details.modal.title"),description:"sync.details.modal.description",confirmLabel:"sync.details.modal.sync-new",cancelLabel:"sync.details.modal.re-sync-all"}).onClose.pipe((0,p.n)(t=>this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.triggerSync(n,!t))))).subscribe({next:()=>this.toaster.success("sync.details.toast.triggering-sync-success"),error:()=>this.toaster.error("sync.details.toast.triggering-sync-failed")})}deleteSync(){this.sync.pipe((0,p.n)(t=>this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:t.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,_.p)(n=>!!n),(0,v.M)(()=>this.isDeleted.next()),(0,p.n)(()=>this.syncService.deleteSync(t.id))))).subscribe({next:()=>this.router.navigate([".."],{relativeTo:this.currentRoute}),error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}updateConfiguration(t){this.updatedConfig=t}updateSelection(t){this.updatedSelection=t}saveChanges(){!this.updatedConfig&&!this.updatedSelection||this.syncId.pipe((0,b.s)(1),(0,p.n)(t=>{const n={...this.updatedConfig};return this.updatedSelection&&(n.foldersToSync=this.updatedSelection),this.syncService.updateSync(t,n)})).subscribe({next:()=>{this.toaster.success("sync.details.toast.modification-success"),this.router.navigate([".."],{relativeTo:this.currentRoute})},error:()=>this.toaster.error("sync.details.toast.modification-failed")})}updateFolders(t){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{foldersToSync:t}))).subscribe({error:()=>this.toaster.error("sync.details.toast.modification-failed")})}static#e=this.\u0275fac=function(n){return new(n||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-sync-details-page"]],decls:7,vars:9,consts:[[1,"page-spacing"],[3,"link"],[1,"details-header"],["notFullWidth",""],["data-cy","settings-tab",3,"click","active"],["data-cy","folders-tab",3,"active"],[1,"page-title"],["size","large",3,"path"],[1,"cta-container"],[1,"toggle-container"],["withBackground","","data-cy","active-toggle",3,"valueChange","value"],["aspect","basic","data-cy","sync-now",3,"click","disabled"],["aspect","basic","routerLink","./edit"],["kind","destructive","data-cy","delete",3,"click"],["data-cy","folders-tab",3,"click","active"],["noTopBorder","",3,"sync","kbId","connector","connectorId"],[3,"sync"],["aspect","basic","routerLink",".."],["kind","primary",3,"click"],["noTopBorder","",3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"selectedSyncItems","sync"],[3,"sync","connector","logs"],[3,"selectionChange","sync"]],template:function(n,i){if(1&n&&(e.j41(0,"div",0)(1,"nsi-back-button",1),e.nI1(2,"async"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nVh(5,Vn,11,13),e.nI1(6,"async"),e.k0s()),2&n){let a;e.R7$(),e.Y8G("link",e.bMT(2,3,i.editMode)?"../..":".."),e.R7$(2),e.SpI(" ",e.bMT(4,5,"sync.add-page.back-button")," "),e.R7$(2),e.vxM((a=e.bMT(6,7,i.sync))?5:-1,a)}},dependencies:[S.MD,S.Jj,u.Xp,f.h,f.D9,l.V3x,E.R,l.Ymm,j.Q,l.rkm,U.a,l.aT,In.Q,Rn.w,vn,Fn,K.Wk,u.o3,se,B],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap";@charset "UTF-8";@font-face{font-family:Source Code Pro;font-style:normal;font-weight:400;src:url(source-code-pro-v14-latin-regular.e7bb30b550ed09e8.woff2) format("woff2"),url(source-code-pro-v14-latin-regular.c54f7f16da733fd8.woff) format("woff")}[_ngcontent-%COMP%]:root{--color-dark-stronger: #000;--color-light-stronger: #fff;--color-neutral-regular: var(--custom-color-neutral-regular, hsl(0, 0%, 44%));--color-neutral-light: var(--custom-color-neutral-light, hsl(0, 0%, 77%));--color-neutral-lighter: var(--custom-color-neutral-lighter, hsl(0, 0%, 90%));--color-neutral-lightest: var(--custom-color-neutral-lightest, hsl(240, 7%, 97%));--color-primary-stronger: var(--custom-color-primary-stronger, hsl(252, 100%, 24%));--color-primary-strong: var(--custom-color-primary-strong, hsl(223.74, 100%, 39.8%));--color-primary-regular: var(--custom-color-primary-regular, hsl(223.2, 100%, 50.98%));--color-primary-light: var(--custom-color-primary-light, hsl(252, 100%, 73%));--color-primary-lighter: var(--custom-color-primary-lighter, hsl(212.57, 100%, 93.14%));--color-primary-lightest: var(--custom-color-primary-lightest, hsl(215.29, 100%, 96.67%));--color-secondary-stronger: hsl(49, 100%, 30%);--color-secondary-strong: hsl(49, 100%, 40%);--color-secondary-regular: hsl(49, 100%, 60%);--color-secondary-light: hsl(49, 100%, 80%);--color-secondary-lighter: hsl(49, 100%, 90%);--color-secondary-lightest: hsl(49, 100%, 95%);--color-tertiary-stronger: hsl(2251, 100%, 24%);--color-tertiary-strong: hsl(2251, 100%, 40%);--color-tertiary-regular: hsl(2251, 100%, 50%);--color-tertiary-light: hsl(2251, 100%, 65%);--color-tertiary-lighter: hsl(2251, 100%, 92%);--color-tertiary-lightest: hsl(2251, 100%, 96%)}.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.details-header[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.cta-container[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}'],changeDetection:0})}return o})();const Xn=[{path:"",component:Me,children:[{path:"",component:tt},{path:"add/:connector",component:ce},{path:"add/:connector/:syncId",component:ce},{path:":syncId/edit",component:de},{path:":syncId",component:de}]}]}}]);
|